cordis.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # REPL agent with swappable DeepSeek and local-bash backends. `dsh-stdio-demo`
  2. # supplies the agent spine, generic task controls, logging, JSONL persistence,
  3. # readline UI, and `main` agent.
  4. # HMR remains a leaf because it requires Loader internals; `demo:repl` passes
  5. # `--expose-internals`. The app bin loads the gitignored root `.env`; this file
  6. # reads `DEEPSEEK_API_KEY` and optional `DEEPSEEK_BASE_URL` through `!!js`.
  7. # Hot-module reload for the dev/demo loop (needs `node --expose-internals`).
  8. - id: hmr
  9. name: '@cordisjs/plugin-hmr'
  10. config:
  11. root: ['.']
  12. # The DeepSeek adapter. Swap to '@deepseek-ai/dsh-llm-pi-ai' for the pi-ai-backed
  13. # twin (same config shape; `reasoning: high` replaces thinking/reasoningEffort).
  14. - id: llm-deepseek
  15. name: '@deepseek-ai/dsh-llm-deepseek'
  16. config:
  17. apiKey: !!js process.env.DEEPSEEK_API_KEY
  18. baseURL: !!js process.env.DEEPSEEK_BASE_URL
  19. models:
  20. - deepseek-v4-pro
  21. - deepseek-v4-flash
  22. # Local executor for the app bundle's bash tool.
  23. - id: bash
  24. name: '@deepseek-ai/dsh-bash-local'
  25. config:
  26. timeoutMs: 60000
  27. # The app bundle pre-creates the REPL's `main` agent.
  28. - id: stdio-agent
  29. name: '@deepseek-ai/dsh-stdio-demo'
  30. config:
  31. model: deepseek-v4-flash
  32. # Set RESUME_SESSION_ID to continue a prior persisted session (the ids live
  33. # under ./.sessions); unset starts a fresh session each run.
  34. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  35. persistenceRoot: './.sessions'
  36. welcome: 'agent REPL ready. Give it a coding task.'
  37. # Keep the persona to identity and behavior; tool plugins own tool guidance.
  38. # The loop resolves {{model}} from this agent's configuration.
  39. persona: |
  40. You are coding-agent, a coding assistant powered by the {{model}} model.
  41. Verify your work by running the code or tests. Keep answers brief and
  42. factual.
  43. # Summarize an older range when derived history approaches the context window.
  44. # This leaf consumes `ctx.llm` and the app's `agent/pre-step` seam.
  45. - id: compact-basic
  46. name: '@deepseek-ai/dsh-compact-basic'
  47. config:
  48. contextWindow: 128000
  49. thresholdRatio: 0.8
  50. retainTokens: 20480
  51. summarizationModel: ''
  52. maxTokens: 8192
  53. compactionRetries: 1
  54. # Expose fresh-child `spawn` and completed-prefix `fork` through independent
  55. # in-process backends. Each tool instance needs a distinct `toolName`; the registry
  56. # rejects duplicates. These leaves follow the app because it provides `ctx.agents` and `ctx.tools`.
  57. - id: subagent
  58. name: '@deepseek-ai/dsh-subagent'
  59. - id: subagent-spawn
  60. name: '@deepseek-ai/dsh-subagent-spawn'
  61. config:
  62. providerName: spawn
  63. - id: subagent-fork
  64. name: '@deepseek-ai/dsh-subagent-fork'
  65. config:
  66. providerName: fork
  67. - id: tool-subagent
  68. name: '@deepseek-ai/dsh-tool-subagent'
  69. config:
  70. provider: spawn
  71. toolName: subagent
  72. - id: tool-subagent-fork
  73. name: '@deepseek-ai/dsh-tool-subagent'
  74. config:
  75. provider: fork
  76. toolName: subagent_fork
  77. # The worker-thread workflow engine fans a model-written JavaScript script's
  78. # `agent()` calls out through the spawn backend; the adjacent tool exposes it to the model.
  79. - id: workflow-workerthread
  80. name: '@deepseek-ai/dsh-workflow-workerthread'
  81. config:
  82. provider: spawn
  83. - id: tool-workflow
  84. name: '@deepseek-ai/dsh-tool-workflow'
  85. # `todo_write` replaces the logged whole list and renders as a stdio checklist or ACP plan.
  86. - id: tool-todo
  87. name: '@deepseek-ai/dsh-tool-todo'
  88. # Policy loads before the model-facing filesystem tools so writes and edits require
  89. # an observed file. This single-session app resolves relative paths from the process cwd.
  90. - id: fs-local
  91. name: '@deepseek-ai/dsh-fs-local'
  92. config:
  93. cwd: !!js process.cwd()
  94. - id: fs-policy
  95. name: '@deepseek-ai/dsh-fs-policy'
  96. - id: tool-fs
  97. name: '@deepseek-ai/dsh-tool-fs'