cordis.yml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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. - id: tool-subagent
  86. name: '@deepseek-ai/dsh-tool-subagent'
  87. config:
  88. provider: spawn
  89. toolName: subagent
  90. maxDepth: 1
  91. - id: tool-subagent-fork
  92. name: '@deepseek-ai/dsh-tool-subagent'
  93. config:
  94. provider: fork
  95. toolName: subagent_fork
  96. maxDepth: 1
  97. # The worker-thread workflow engine fans a model-written JavaScript script's
  98. # `agent()` calls out through the spawn backend; the adjacent tool exposes it to the model.
  99. - id: workflow-workerthread
  100. name: '@deepseek-ai/dsh-workflow-workerthread'
  101. config:
  102. provider: spawn
  103. - id: tool-workflow
  104. name: '@deepseek-ai/dsh-tool-workflow'
  105. - id: tool-ralph
  106. name: '@deepseek-ai/dsh-tool-ralph'
  107. # `todo_write` replaces the logged whole list for later model requests.
  108. - id: tool-todo
  109. name: '@deepseek-ai/dsh-tool-todo'
  110. # Identical repeat calls trigger advisory context, never a block, at the default
  111. # thresholds [3, 5, 8]. Only the repeat-tool-guard snapshot scenario reaches them.
  112. - id: repeat-tool-guard
  113. name: '@deepseek-ai/dsh-repeat-tool-guard'
  114. # The filesystem stack rides the SAME sandbox policy as bash: dsh-fs-sandbox
  115. # replaces dsh-fs-local behind ctx.fs and fences write/edit by the effective
  116. # mode (read-only denies, workspace-write contains to the workspace + temp
  117. # roots, danger-full-access passes through), so read/write/edit are available
  118. # under every mode. fs-policy (read-before-edit) composes orthogonally on top.
  119. - id: fs-sandbox
  120. name: '@deepseek-ai/dsh-fs-sandbox'
  121. config:
  122. cwd: !!js process.cwd()
  123. - id: fs-policy
  124. name: '@deepseek-ai/dsh-fs-policy'
  125. - id: tool-fs
  126. name: '@deepseek-ai/dsh-tool-fs'
  127. # `configPath` is read once at load and resolves from the server launch cwd, not
  128. # `session/new.cwd`; one `hooks.json` therefore applies to every session and a
  129. # project-local file is not discovered. Missing config registers nothing. Hook
  130. # commands still run in the session cwd. Warnings use `ctx.logger`, never stdout;
  131. # see packages/hooks/hooks-claude/README.md for the deferred per-session design.
  132. - id: hooks-claude
  133. name: '@deepseek-ai/dsh-hooks-claude'
  134. config:
  135. configPath: ./hooks.json
  136. # Codex uses its own `codex-hooks.json` and snake_case five-event dialect; it
  137. # cannot share Claude's file. It has the same process-level, read-once, missing-is-no-op,
  138. # logger-only contract. Shipping both bridges lets a scenario seed and exercise either dialect.
  139. - id: hooks-codex
  140. name: '@deepseek-ai/dsh-hooks-codex'
  141. config:
  142. configPath: ./codex-hooks.json