cordis.yml 6.2 KB

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