cordis.yml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # REPL agent with swappable DeepSeek and local-bash backends. `dsh-stdio-demo`
  2. # supplies the agent spine, workspace instructions, generic task controls,
  3. # logging, JSONL persistence, 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. workspaceContext:
  37. maxBytes: 65536
  38. welcome: 'agent REPL ready. Give it a coding task.'
  39. # Keep the persona to identity and behavior; tool plugins own tool guidance.
  40. # The loop resolves {{model}} from this agent's configuration.
  41. persona: |
  42. You are coding-agent, a coding assistant powered by the {{model}} model.
  43. Verify your work by running the code or tests. Keep answers brief and
  44. factual.
  45. # Summarize an older range when derived history approaches the context window.
  46. # This leaf consumes `ctx.llm` and the app's `agent/pre-step` seam.
  47. - id: compact-basic
  48. name: '@deepseek-ai/dsh-compact-basic'
  49. config:
  50. contextWindow: 128000
  51. thresholdRatio: 0.8
  52. retainTokens: 20480
  53. summarizationModel: ''
  54. maxTokens: 8192
  55. compactionRetries: 1
  56. # Expose fresh-child `spawn` and completed-prefix `fork` through independent
  57. # in-process backends. Each tool instance needs a distinct `toolName`; the registry
  58. # rejects duplicates. These leaves follow the app because it provides `ctx.agents` and `ctx.tools`.
  59. - id: subagent
  60. name: '@deepseek-ai/dsh-subagent'
  61. - id: subagent-spawn
  62. name: '@deepseek-ai/dsh-subagent-spawn'
  63. config:
  64. providerName: spawn
  65. - id: subagent-fork
  66. name: '@deepseek-ai/dsh-subagent-fork'
  67. config:
  68. providerName: fork
  69. - id: tool-subagent
  70. name: '@deepseek-ai/dsh-tool-subagent'
  71. config:
  72. provider: spawn
  73. toolName: subagent
  74. - id: tool-subagent-fork
  75. name: '@deepseek-ai/dsh-tool-subagent'
  76. config:
  77. provider: fork
  78. toolName: subagent_fork
  79. # The worker-thread workflow engine fans a model-written JavaScript script's
  80. # `agent()` calls out through the spawn backend; the adjacent tool exposes it to the model.
  81. - id: workflow-workerthread
  82. name: '@deepseek-ai/dsh-workflow-workerthread'
  83. config:
  84. provider: spawn
  85. - id: tool-workflow
  86. name: '@deepseek-ai/dsh-tool-workflow'
  87. # `todo_write` replaces the logged whole list and renders as a stdio checklist or ACP plan.
  88. - id: tool-todo
  89. name: '@deepseek-ai/dsh-tool-todo'
  90. # Policy loads before the model-facing filesystem tools so writes and edits require
  91. # an observed file. This single-session app resolves relative paths from the process cwd.
  92. - id: fs-local
  93. name: '@deepseek-ai/dsh-fs-local'
  94. config:
  95. cwd: !!js process.cwd()
  96. - id: fs-policy
  97. name: '@deepseek-ai/dsh-fs-policy'
  98. - id: tool-fs
  99. name: '@deepseek-ai/dsh-tool-fs'