ReachForStar/dsh-client-ui-polish--packages-subagent-pi ↗★ 0

@reachforstar/dsh-subagent-pi

One-shot Pi coding agent subagent provider over the Pi RPC protocol 适合需要利用 Pi 协议和子进程执行单次 AI 编码任务的开发者。

Package
@reachforstar/dsh-subagent-pi
Compatibility
Unverified
Harness peer range
^0.1.1-rc.2
Cordis peer range
*
Version
0.1.1-rc.2
License
MIT
Last updated
Aug 22, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ReachForStar/dsh-client-ui-polish#132f53bc4fe37fe4993412b28890cf41a1be0dd0&path:packages/subagent-pi

Configuration

KeyDefaultMeaning
env{}Explicit child environment layered over the subprocess seam's credential-scrubbed parent environment. Pi credentials (for example DEEPSEEK_API_KEY) and any Pi extension variables belong here.
disposeEofGraceMs6000Positive finite grace in milliseconds, no greater than MAX_TIMER_DELAY_MS, between Pi's stdin-EOF shutdown request and the shared process-tree termination escalation.
disposeGraceMs3000Positive finite grace in milliseconds, no greater than MAX_TIMER_DELAY_MS, between the shared process-tree owner's termination tiers.
commandpiPi executable (bare name on PATH) or a test fixture launcher. On Windows the argv is wrapped in cmd.exe /d /s /c because npm and pnpm installs expose pi.cmd.
args['--mode', 'rpc']Fixed arguments appended after the executable; the array replaces the default, so an override must restate --mode rpc. A deployment may pin Pi's model here, for example ['--mode', 'rpc', '--provider', 'deepseek'].
agentDirunsetAbsolute PI_CODING_AGENT_DIR override naming where Pi keeps agent settings and trust state; when omitted, Pi uses its native home (~/.pi/agent). Wins over an env.PI_CODING_AGENT_DIR entry.
sessionDirunsetAbsolute PI_CODING_AGENT_SESSION_DIR override naming where Pi keeps session files; when omitted, Pi uses its native session location. Wins over an env.PI_CODING_AGENT_SESSION_DIR entry.

Production resolves pi from the subprocess execution world's credential-scrubbed PATH. Native Pi settings and authentication remain authoritative: the plugin does not install Pi, select a model, create a Pi home, log in, or probe a version. Credential-shaped ambient variables are removed before the explicit env overlay is applied, so an API key or token intended for the child must be supplied there.

Install this bundle (dsh plugin --profile web add ./packages/subagent-pi) to load the provider once on the host; it starts no Pi process until a tool call. The model-facing delegation tool is granted per agent: the presets/standard-polished preset in this repository carries the enabled tool-subagent-pi row, or add the two rows below to an existing preset (copy a preset and remove disabled from the tool row, exactly like the codex/claude-code rows).

- id: subagent-pi
  name: '@reachforstar/dsh-subagent-pi'
  config:
    env:
      DEEPSEEK_API_KEY: !!js process.env.DEEPSEEK_API_KEY

- id: tool-subagent-pi
  name: '@deepseek-ai/dsh-tool-subagent'
  disabled: true
  config:
    provider: pi
    toolName: subagent_pi
    enableRunInBackground: false
    maxDepth: provider-managed