SAGE Wrapper

io.github.PsYcGoD由 GitHub 帳號 PsYcGoD 發布v2.6.2更新於 Oct 24, 2026

Command wrapper MCP server for coding agents, compression, workflows, and local automation.

已驗證STDIO僅桌面效率與工作流開發者工具

概覽

AI 產生的概覽

本地優先的命令包裝器,為編碼代理執行終端機命令,並回傳壓縮後的摘要而非冗長的原始輸出。

可以做什麼
透過包裝器執行測試、建置、git 等終端機命令,原始輸出保存在本機,只向代理回傳精簡摘要,支援 sage pytest、sage git status 等快捷寫法,並可為宿主整合明確指定工作目錄。檢視本機指標與歷史:token 節省量、壓縮報告、最近命令歷史,以及針對最近失敗命令的解釋與修正建議,並可選擇自動套用修正。為支援的本機 AI 代理啟用並驗證設定,可選擇啟動本機儀表板或手動設定 MCP。
適用情境
當 AI 編碼代理反覆因測試日誌、堆疊追蹤、安裝雜訊或建置刷屏而消耗上下文時適用,可讓原始輸出留在本機,代理只看到有用的摘要。
執行需求
以本機程序在使用者機器上執行(僅桌面端)。透過 pip 安裝 Python 套件 psycgod-sage,或安裝 npm 套件 psycgod-sage(其委派給 Python 核心,因此仍需 Python)。安裝後需執行一次 sage install 為支援的代理啟用,並重新啟動已開啟的代理工作階段。未宣告帳號、API 金鑰或環境變數;可選擇以 SAGE_WORKSPACE_CWD 指定工作目錄。
安裝前請注意
套件安裝依設計為被動,只有執行 sage install 才會啟用,而該命令會修改本機的全域與專案代理指示。修正命令可自動套用修正,使用前應檢查變更。原始命令輸出、歷史與指標存入本機資料庫;只有主動啟用偵錯遙測時資料才會離開本機,且僅傳送去識別化的診斷摘要。MCP 為選用且需手動啟用,在某些 stdio 代理工作階段中可能中斷連線。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 SAGE Wrapper,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

SAGE - Smart Agent Guidance Engine

[CI] [Python] [PyPI] [npm] [License] [SAGE Wrapper MCP server]

SAGE is a local-first command wrapper for AI coding agents. It keeps full terminal output on your machine, sends agents a clean compressed summary, and tracks proof metrics without uploading your raw logs.

Use it with Claude Code, Codex, Cursor, Windsurf, OpenCode, Cline, custom agents, CI scripts, and normal terminal workflows.

Start Here: Install SAGE, Use once sage run -- python -m pytest, Then Use Any AI Agent

Package installation is passive for package-registry safety. After installing, run sage install once to activate SAGE for supported local AI agents.

PyPI / pip

powershell
pip install psycgod-sage# orpython -m pip install --upgrade psycgod-sagesage installsage run -- python -m pytest

npm / npx

bash
npm install -g psycgod-sagenpx -y psycgod-sage installnpx -y psycgod-sage run -- npm test

After install, restart any open AI-agent sessions. New sessions should read the SAGE instructions automatically and route terminal commands through SAGE.

Example prompt after restarting your AI agent:

text
Please help me with my general book in this folder.

Natural shortcuts also work:

bash
sage pytestsage npm testsage git status

These are treated as:

bash
sage run -- pytestsage run -- npm testsage run -- git status

What SAGE Does

StepResult
sage installActivates the machine locally, repairs global/project agent instructions, and verifies activation
sage run -- <command>Runs the command, stores raw output locally, and returns a compact useful summary
Agent memory/hooksTell supported AI agents to use SAGE for noisy terminal work
Local databaseKeeps command history, compression proof, and retry context on the user's machine
Local proofKeeps command and compression metrics on the user's machine

SAGE does not auto-enable MCP. MCP is optional and manual for users who want it.

Recorded Local Metrics

Latest pulled stats as of 2026-08-01:

MetricValue
SAGE telemetry command events27,892
Tokens processed799.5M
Tokens saved783.7M
Compression rate98.02%
Estimated savings$16,261.90
Command success rate88.3%
PyPI downloads, last 7 days632
npm downloads, last 7 days362
GitHub clones, last 14 days574

Why It Helps

AI coding agents burn context on repeated logs, failed test output, install noise, stack traces, and build spam. SAGE sits between the command and the agent.

Without SAGEWith SAGE
Agent sees full noisy terminal outputAgent sees the useful summary
Context disappears fastContext lasts longer
Repeated failures waste tokensErrors are grouped and explained
Raw logs may enter promptsRaw logs stay local
Hard to prove savingsSAGE records proof metrics

Distribution

ChannelPackageStatus
PyPIpsycgod-sageCanonical Python package
npm / npxpsycgod-sageNode launcher for the Python core
MCP Registryio.github.PsYcGoD/sageOptional/manual MCP entry
GlamaPsYcGoD/sageOptional/manual hosted MCP listing

The npm package delegates to the Python implementation so both install paths use the same local database, telemetry rules, compression, and command behavior.

Common Commands

bash
sage install                       # Activate this machine and AI-agent instructionssage doctor --activation           # Verify activationnpx -y psycgod-sage doctor --activationsage run -- <command>              # Wrap any commandsage run --cwd /project -- <command> # Explicit workspace for host integrationssage pytest                        # Shortcut for: sage run -- pytestsage npm test                      # Shortcut for: sage run -- npm testsage git status                    # Shortcut for: sage run -- git statussage context stats                 # Token savings summarysage context report                # Full compression reportsage history --limit 10            # Recent command historysage explain --failed              # Explain the latest failed commandsage suggest --failed              # Suggest the next fixsage fix --apply                   # Try an automatic fixsage ml setup                      # Optional ML V2 dependenciessage mcp install                   # Optional/manual MCP configsage dashboard start               # Local dashboard

Privacy Modes

ModeRequires login?Sends data?What leaves the machine?
Local-onlyNoNoNothing
Debug telemetryOptionalOpt-in onlyRedacted diagnostic summaries

SAGE is designed to keep prompts, source code, credentials, raw command output, and project files local unless the user deliberately enables a feature that requires sending data.

Known Limitations

LimitationWhat To Do
Already-open AI-agent sessions may not reload new instructionsRestart Claude/Codex/Cursor/Windsurf/OpenCode after sage install
Locked-down host apps can disable shell toolsSAGE cannot enable tools the host application has blocked
A host starts its shell in the wrong folderPass sage run --cwd <project> -- <command> or set SAGE_WORKSPACE_CWD
npm/PyPI installs cannot safely auto-run activationRun sage install once after package install
MCP can disconnect in some stdio agent sessionsUse normal sage run -- <command> by default; enable MCP manually only if needed
Package installs are passive by designReal activation starts with sage install

Demos

FlowPreview
PyPI install[PyPI install flow]
npm install[npm install flow]
sage run --[sage run]
CLI run[SAGE CLI demo]

Links

License

MIT. See LICENSE.

來源:README.md,提交 0b57e69

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v2.6.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分