cordis.yml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. # ACP automation server and backend snapshot-record composition. With
  2. # `DSH_SNAPSHOT=record`, the app bin runs the real DeepSeek adapter and the
  3. # harness harvests its persisted log. The bin loads the gitignored root `.env`
  4. # before this config. This tree has no stdout logger or HMR because stdout
  5. # carries ACP JSON-RPC.
  6. # The DeepSeek adapter. Shipped default: full thinking at max effort on every
  7. # request; exact-model resolution materializes request defaults before logging.
  8. - id: llm-deepseek
  9. name: '@deepseek-ai/dsh-llm-deepseek'
  10. config:
  11. apiKey: !!js process.env.DEEPSEEK_API_KEY
  12. baseURL: !!js process.env.DEEPSEEK_BASE_URL
  13. thinking: enabled
  14. reasoningEffort: max
  15. models:
  16. - id: deepseek-v4-flash
  17. - id: deepseek-v4-pro
  18. # The default composition confines bash AND the filesystem tools to the
  19. # workspace and asks before a wider retry. Snapshot runs select
  20. # danger-full-access so the established scenarios remain runner-independent;
  21. # DSH_PERMISSION_MODE provides the same explicit deployment/test override
  22. # outside the snapshot harness. The sandbox default + fallback root live on
  23. # ctx.sandboxPolicy; agent calls resolve both families against the session cwd.
  24. - id: sandbox
  25. name: '@deepseek-ai/dsh-sandbox-local'
  26. - id: sandbox-policy
  27. name: '@deepseek-ai/dsh-sandbox-policy'
  28. config:
  29. mode: !!js "process.env.DSH_PERMISSION_MODE ?? (process.env.DSH_SNAPSHOT === undefined ? 'workspace-write' : 'danger-full-access')"
  30. workspaceRoot: !!js process.cwd()
  31. # Managed child-process groups for the bash executor (spawn/kill/output plumbing).
  32. - id: subprocess
  33. name: '@deepseek-ai/dsh-subprocess-local'
  34. - id: bash
  35. name: '@deepseek-ai/dsh-bash-sandbox'
  36. config:
  37. timeoutMs: 60000
  38. - id: approval
  39. name: '@deepseek-ai/dsh-user-approval'
  40. config:
  41. policy: !!js "(process.env.DSH_PERMISSION_MODE ?? (process.env.DSH_SNAPSHOT === undefined ? 'workspace-write' : 'danger-full-access')) === 'danger-full-access' ? 'never' : 'ask'"
  42. # The ACP automation app: agent spine + JSONL persistence + protocol bridge.
  43. # Persistence root: $DSH_SNAPSHOT_SESSIONS_ROOT when the snapshot harness sets it
  44. # (so it can harvest / isolate the log), else ./.sessions for the demo.
  45. # Snapshot modes use raw JSONL fixtures; ordinary runs keep the compressed default.
  46. - id: acp-agent
  47. name: '@deepseek-ai/dsh-acp-demo'
  48. config:
  49. provider: deepseek-official
  50. model: deepseek-v4-pro
  51. persistenceRoot: !!js process.env.DSH_SNAPSHOT_SESSIONS_ROOT ?? './.sessions'
  52. persistenceCompression: !!js "process.env.DSH_SNAPSHOT === undefined ? 'zstd' : 'none'"
  53. workspaceContext:
  54. maxBytes: 65536
  55. # Keep the persona to identity and behavior; tool plugins own tool guidance.
  56. # The loop resolves {{model}} and each ACP session's client-supplied {{cwd}}.
  57. persona: |
  58. You are a coding assistant powered by the {{model}} model. Your working directory is {{cwd}}. Your bash tool runs under a file sandbox — a `[sandbox: file access denied …]` result is policy, not a command bug.
  59. Verify your work by running the code or tests. Keep answers brief and factual.
  60. # Replay-aware request pressure; the routed adapter supplies model capacity.
  61. - id: token-meter
  62. name: '@deepseek-ai/dsh-token-meter'
  63. # Summarize an older range after measured pressure or a canonical provider overflow.
  64. # Ratios scale against the routed model's context window.
  65. - id: compact-basic
  66. name: '@deepseek-ai/dsh-compact-basic'
  67. config:
  68. thresholdRatio: 0.8
  69. retainRatio: 0.08
  70. maxTokens: 8192
  71. compactionRetries: 1
  72. # Expose fresh-child `spawn` and completed-prefix `fork` through separate tool
  73. # names so multi-child scenarios exercise both transports. These leaves follow
  74. # the app because it provides `ctx.agents` and `ctx.tools`.
  75. - id: subagent
  76. name: '@deepseek-ai/dsh-subagent'
  77. - id: subagent-spawn
  78. name: '@deepseek-ai/dsh-subagent-spawn'
  79. config:
  80. providerName: spawn
  81. - id: subagent-fork
  82. name: '@deepseek-ai/dsh-subagent-fork'
  83. config:
  84. providerName: fork
  85. # Continuable background children are selected per delegation tool. The
  86. # separately loaded control package registers the global `send_message`; its
  87. # list plugin registers `list_agents` and requires the app's session query.
  88. # `report` is installed only in continuable child scopes.
  89. - id: tool-subagent-control
  90. name: '@deepseek-ai/dsh-tool-subagent-control'
  91. - id: tool-subagent-list-agents
  92. name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
  93. - id: tool-subagent-report
  94. name: '@deepseek-ai/dsh-tool-subagent-report'
  95. - id: tool-subagent
  96. name: '@deepseek-ai/dsh-tool-subagent'
  97. config:
  98. provider: spawn
  99. toolName: subagent
  100. backgroundMode: continuable
  101. maxDepth: 1
  102. - id: tool-subagent-fork
  103. name: '@deepseek-ai/dsh-tool-subagent'
  104. config:
  105. provider: fork
  106. toolName: subagent_fork
  107. backgroundMode: continuable
  108. maxDepth: 1
  109. # The worker-thread workflow engine fans a model-written JavaScript script's
  110. # `agent()` calls out through the spawn backend; the adjacent tool exposes it to the model.
  111. - id: workflow-workerthread
  112. name: '@deepseek-ai/dsh-workflow-workerthread'
  113. config:
  114. provider: spawn
  115. - id: tool-workflow
  116. name: '@deepseek-ai/dsh-tool-workflow'
  117. - id: tool-ralph
  118. name: '@deepseek-ai/dsh-tool-ralph'
  119. # `todo_write` replaces the logged whole list for later model requests.
  120. - id: tool-todo
  121. name: '@deepseek-ai/dsh-tool-todo'
  122. # Identical repeat calls trigger advisory context, never a block, at the default
  123. # thresholds [3, 5, 8]. Only the repeat-tool-guard snapshot scenario reaches them.
  124. - id: repeat-tool-guard
  125. name: '@deepseek-ai/dsh-repeat-tool-guard'
  126. # The filesystem stack rides the SAME sandbox policy as bash: dsh-fs-sandbox
  127. # replaces dsh-fs-local behind ctx.fs and fences write/edit by the effective
  128. # mode (read-only denies, workspace-write contains to the workspace + temp
  129. # roots, danger-full-access passes through), so read/write/edit are available
  130. # under every mode. fs-policy (read-before-edit) composes orthogonally on top.
  131. - id: fs-sandbox
  132. name: '@deepseek-ai/dsh-fs-sandbox'
  133. config:
  134. cwd: !!js process.cwd()
  135. - id: fs-policy
  136. name: '@deepseek-ai/dsh-fs-policy'
  137. - id: tool-fs
  138. name: '@deepseek-ai/dsh-tool-fs'
  139. # `configPath` is read once at load and resolves from the server launch cwd, not
  140. # `session/new.cwd`; one `hooks.json` therefore applies to every session and a
  141. # project-local file is not discovered. Missing config registers nothing. Hook
  142. # commands still run in the session cwd. Warnings use `ctx.logger`, never stdout;
  143. # see packages/hooks/hooks-claude/README.md for the deferred per-session design.
  144. - id: hooks-claude
  145. name: '@deepseek-ai/dsh-hooks-claude'
  146. config:
  147. configPath: ./hooks.json
  148. # Codex uses its own `codex-hooks.json` and snake_case five-event dialect; it
  149. # cannot share Claude's file. It has the same process-level, read-once, missing-is-no-op,
  150. # logger-only contract. Shipping both bridges lets a scenario seed and exercise either dialect.
  151. - id: hooks-codex
  152. name: '@deepseek-ai/dsh-hooks-codex'
  153. config:
  154. configPath: ./codex-hooks.json