cordis.yml 3.6 KB

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