cordis.yml 3.7 KB

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