DSH XD Pool
XDTrees/dsh-xdpool把本机 WorkBuddy 桌面 App 登录过的所有账号自动并入 DSH 模型池:多账号轮换自动容错、实时积分,模型目录按模型标注积分倍率与限时免费 / 夜间折扣。
将本机已登录的 AGY CLI 接入 DSH 作为模型 Provider:支持 Gemini/Claude 模型发现、独立推理强度、DSH-owned 工具、受限上下文与工具结果管理、Windows 安全流式传输;如遇问题,请在 GitHub 提交 Issue:https://github.com/darkings/dsh-agy-provider/issues。
Expose the locally authenticated AGY CLI as a model Provider for DSH.
The project lets DSH use the models and quota available to the user's AGY account while keeping DSH's conversations, Sessions, Web mode, and headless mode. The Provider does not call the Google Gemini API directly and does not store OAuth credentials. Authentication and model selection remain owned by the local agy CLI, while tool execution remains in DSH ToolRuntime.
0.10.0 is published to npm with latest=0.10.0. Building on 0.9.0's settings panel, workspace auto-detection, and model/effort separation, 0.10.0 adds optimized-full context budgets, deterministic tool-result eviction, privacy-safe diagnostics, and a Windows no-console launcher; sessionMode: full remains the default.
0.7.0 / 0.8.0 merged: v0.7.0 → b94fa32 (latest=0.7.0 released), v0.8.0 → b7c9a45 merged to main. Since 0.7.0 the bundle defaults to dsh-owned (DSH Session/ToolRuntime/sandbox/approval own the project and permissions).
0.10.0 highlights:
Context and tool safety: DSH-owned structured prompts use a 56 KiB fail-closed limit, return AGY_INPUT_TOO_LARGE when exceeded, recover after compaction, and evict whole tool-result segments deterministically.
Performance and observability: stable prefixes, canonical tool schemas, step-level usage accounting, and fingerprint diagnostics improve cache eligibility and make failures auditable without promising backend cacheRead hits.
Settings panel: full zh-CN/en i18n via schemastery .i18n, registerConfigurableProviders(settingsNs dsh-agy-provider) + registerModelDiscovery, multi-select visible models and independent reasoning effort dropdown.
Workspace-transparent: workspaceRoot deprecated (.deprecated(), hidden when dsh-owned), tool calls use DSH Session header.cwd + workspaceRegistry + sandboxPolicy transparently; pure text needs no workspace, tool without workspace returns actionable DSH_WORKSPACE_MISMATCH.
Model/effort split: gemini-3.7-flash as base, reasoningEffort: low|medium|high separately; listModels returns bases with reasoning.efforts, legacy -high/-medium/-low suffix auto-compat with DEPRECATED_MODEL_EFFORT_SUFFIX.
Model visibility: visibleModels: string[] empty = all, non-empty = only checked bases (explicit request still compat).
Keeps the 0.7.0 DSH-owned tool bridge, Agent presets, doctor v5 (profileSchemaVersion: 4), zero retries, quota-free diagnostics, and cross-platform gates; imageInput: experimental now has an end-to-end multimodal path.
The image bridge remains experimental. When enabled it advertises inputModalities: ['text', 'image'] and uses a dedicated dsh-agy-image-view Agent for staged images. Real pixel answers, same-session follow-ups, stable failures, and cleanup were verified in DSH Desktop; this is still not an unconditional production image capability.
User / DSH Web / DSH headless
│
▼
dsh-agy-provider
├─ DSH LlmAdapter
├─ Prompt / stream mapping
├─ Session / Conversation mapping
├─ Model discovery / retry / telemetry
└─ Agent and workspace safety boundaries
│
▼
agy --output-format stream-json
│
▼
AGY account quota, models, and Agent tools
The Provider starts AGY with spawn(executable, args), without shell command composition. It incrementally parses AGY's line-delimited output and converts it into DSH text, usage, finish, and stable error events.
| Capability | Status | Default |
|---|---|---|
| DSH text conversations | Implemented | Enabled in the profile bundle |
| AGY authentication/quota | Implemented | Owned by local AGY |
| Dynamic model discovery | Implemented | modelDiscovery: auto |
| Reasoning effort | Implemented | No implicit effort |
| DSH tool-call bridge | Implemented and covered by cross-platform gates in 0.7.0 | dsh-owned since 0.7.0 |
| read-only Agent | Implemented | Explicit installation/configuration |
| workspace-write Agent | Implemented | dsh-owned needs no manual workspaceRoot; legacy agy-owned still requires explicit dir |
| Image staging bridge | Experimental in 0.9.0; Desktop loop verified | imageInput: experimental in the bundle |
| Image modality | Limited public capability | text+image when experimental; text-only when off |
| Persistent stream transport | Implemented opt-in in 0.8.0 | one-shot by default, explicit transport: persistent reuses worker |
| Model visibility | Implemented in 0.9.0 | visibleModels: [] empty = all, non-empty = checked bases |
| Settings panel | Implemented in 0.9.0 | zh-CN/en i18n, multi-select + base/effort split |
| Workspace-transparent | Implemented in 0.9.0 | workspaceRoot deprecated under dsh-owned, DSH Session cwd auto-used |
A normal npm install only installs the Node.js package. It does not modify a DSH profile. Use the native DSH plugin manager:
npx @deepseek-ai/dsh plugin --profile web add dsh-agy-provider@0.10.0
npx @deepseek-ai/dsh plugin --profile headless add dsh-agy-provider@0.10.0
The 0.9.0 bundle defaults (cordis.patch.yml) are equivalent to:
enabled: true
provider: agy
model: gemini-3.1-pro
agent: deepseek-proxy
toolPolicy: dsh-owned
sessionMode: full
imageInput: off
Direct library Config({}) remains enabled: false, toolPolicy: reject. Importing the package does not modify a user's DSH profile; BundleConfig is the explicit enabled: true / dsh-owned.
Read-only (dsh-owned needs no workspaceRoot):
agentPreset: read-only
toolPolicy: dsh-owned
# no workspaceRoot needed; open the folder in DSH and the Session cwd is the project
Workspace write (dsh-owned still needs no manual dir; DSH permission preset decides):
agentPreset: workspace-write
toolPolicy: dsh-owned
# dsh-owned: workspaceRoot deprecated, DSH workspace-write / danger-full-access decides the boundary
Legacy agy-owned with explicit dir (not recommended):
agentPreset: workspace-write
toolPolicy: agy-owned
workspaceRoot: C:\work\my-project
Write access is enforced by DSH permission preset and sandbox; the provider does not bypass it.
enabled: true
provider: agy
agent: deepseek-proxy
model: gemini-3.7-flash # base id, pick reasoningEffort low/medium/high per-session in DSH
visibleModels: # panel-checked models, empty = all
- gemini-3.7-flash
- gemini-3.1-pro
models:
- id: gemini-3.7-flash
name: Gemini 3.7 Flash
- id: gemini-3.1-pro
name: Gemini 3.1 Pro
toolPolicy: dsh-owned
transport: one-shot # or persistent (opt-in, one worker per Session)
sessionMode: full
modelDiscovery: auto
retryPolicy:
maxRetries: 5
retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT]
imageInput: off
Compat: legacy
model: gemini-3.7-flash-highstill resolves tobase + highwith a warning; prefer base + per-sessionreasoningEffort.
Retries follow the DSH normal policy by default: up to five retries after the initial request, including TIMEOUT (at most six AGY requests total). retryPolicy can narrow the count and error-code allowlist in settings.yaml.
Quota-free diagnostics:
npm run diagnose -- --json
npx dsh-agy-provider doctor --profile web --json
npx dsh-agy-provider agents list
Local development:
npm ci
npm run verify
npm run benchmark
npm run smoke:dsh:self-contained
Experiments that call a real AGY model never run automatically. The 0.9.0 multimodal loop was completed under explicit quota authorization; future runs must not consume real-model quota again without authorization.
Future work follows the same rules: verifiable behavior, safe fallback, and bounded quota use.
cwd and its read-only, workspace-write, or danger-full-access selection instead of duplicating switches in this plugin.--dangerously-skip-permissions.stream-json input as a stable, session-affine opt-in transport; one-shot remains the default (transport: persistent explicit).Config i18n (zh-CN/en) + registerConfigurableProviders + registerModelDiscovery, visibleModels multi-select and base + reasoningEffort split.workspaceRoot deprecated under dsh-owned, project auto-owned by DSH Session, text needs no workspace.doctor v5 (profileSchemaVersion 4).V8-M4 go); 0.9.0 keeps it opt-in.persistent.dsh-agy-provider/
├─ src/
│ ├─ provider/ # DSH Adapter, config, serialization, image bridge
│ ├─ agy/ # process, argv, stream-json, discovery, redaction (incl. persistent-transport)
│ ├─ session/ # DSH Session to AGY Conversation mapping
│ ├─ doctor.ts # profile-aware doctor v5 (profileSchemaVersion 4)
│ ├─ dsh/context.ts # DSH Session/workspace/sandbox/approval transparent check
│ └─ agent-*.ts # presets, installer, and agents CLI
├─ agents/ # tool-free/read-only/workspace-write templates
├─ scripts/ # verify, benchmark, diagnose, and DSH smoke
├─ tests/ # L1 unit + L2 integration (visibleModels/normalization/i18n)
├─ docs/
├─ cordis.patch.yml
└─ package.json
visibleModels)MIT