cordis.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # The coding-agent plugin tree, loaded via @cordisjs/plugin-include.
  2. # Infra (logger/timer/hmr) first, then the shared provider/tool core (nested
  3. # include of ../base.yml), then this example's agent-loop config + UI.
  4. #
  5. # Requires DEEPSEEK_API_KEY (and optionally DEEPSEEK_BASE_URL) in the
  6. # environment — start.ts loads the gitignored repo-root .env first.
  7. - id: logger
  8. name: '@cordisjs/plugin-logger-console'
  9. - id: timer
  10. name: '@cordisjs/plugin-timer'
  11. - id: hmr
  12. name: '@cordisjs/plugin-hmr'
  13. config:
  14. root: ['.']
  15. # Shared provider/tool core (llm, sessions, system-prompt, tools, agents,
  16. # invariants, llm-deepseek, bash-local, tool-bash). Nested include: the path is
  17. # resolved relative to THIS file's directory.
  18. - id: base
  19. name: '@cordisjs/plugin-include'
  20. config:
  21. path: '../base.yml'
  22. # agent-loop is per-example (NOT in base.yml): coding-agent pre-creates a `main`
  23. # agent its stdio-chat drives via ctx.agents.get('main').
  24. - id: agent-loop
  25. name: '@deepseek-ai/dsh-agent-loop'
  26. config:
  27. agents:
  28. - id: main
  29. model: deepseek-v4-flash
  30. # Set RESUME_SESSION_ID to continue a prior persisted session (the ids
  31. # live under ./.sessions); unset starts a fresh session each run.
  32. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  33. systemPrompt: |
  34. You are coding-agent, a CLI coding assistant.
  35. Your only tools are bash (plus bash_output/bash_kill for background
  36. tasks). Do ALL file operations through bash: read with cat/sed/head,
  37. search with grep, write with heredocs (cat <<'EOF' > file), edit
  38. with sed or a rewrite. Each bash call runs in a fresh shell — pass
  39. workdir instead of cd, and never rely on shell state between calls.
  40. Check the [exit code: N] marker on every command; investigate
  41. failures before moving on. Verify your work by running the code or
  42. tests. Keep answers brief and factual.
  43. - id: session-persistence
  44. name: '@deepseek-ai/dsh-session-persistence-jsonl'
  45. config:
  46. root: './.sessions'
  47. - id: stdio-chat
  48. name: '@deepseek-ai/dsh-ui-stdio'
  49. config:
  50. welcome: 'coding-agent ready. Give it a coding task (bash is its only tool).'