cordis.yml 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Self-referential TUI demo: the coding spine plus tools to inspect the live
  2. # service/plugin/tool/mount/API/event state, mount a model-written plugin under
  3. # `cordis-dynamic`, and quiescently unmount it. The app bin loads the gitignored
  4. # root `.env` before reading the required DeepSeek key and optional base URL.
  5. # Trust stance: the vm and context façade limit accidental global/framework
  6. # access but are not a security boundary; mounted code can reach live capabilities
  7. # such as `ctx.bash`. Grant this toolset like bash access. See
  8. # ../../.agents/notes/implemented/feature/2026-07-08-self-referential-cordis-toolset.md.
  9. # Development-only hot reload; production assemblies omit it.
  10. - id: hmr
  11. name: '@cordisjs/plugin-hmr'
  12. config:
  13. root: ['.']
  14. # The DeepSeek adapter. Shipped default: full thinking at max effort on every
  15. # request (wire-only defaults; they never enter the request header).
  16. - id: llm-deepseek
  17. name: '@deepseek-ai/dsh-llm-deepseek'
  18. config:
  19. apiKey: !!js process.env.DEEPSEEK_API_KEY
  20. baseURL: !!js process.env.DEEPSEEK_BASE_URL
  21. thinking: enabled
  22. reasoningEffort: max
  23. # Local bash executor for agent-spine-demo's tool-bash schema — gives the agent an
  24. # ordinary tool whose calls make the mounted listeners observably fire.
  25. - id: bash
  26. name: '@deepseek-ai/dsh-bash-local'
  27. config:
  28. timeoutMs: 60000
  29. # Filesystem service for mounted plugins (ctx.fs) — the local provider only.
  30. # The model-facing read/write/edit tools stay unmounted on purpose: this demo
  31. # is about the agent building its own tools over the services.
  32. - id: fs-local
  33. name: '@deepseek-ai/dsh-fs-local'
  34. config:
  35. cwd: !!js process.cwd()
  36. # Web service for mounted plugins (ctx.web): the seam plus the anonymous local
  37. # fetch provider (keyless). No search provider is loaded — ctx.web search
  38. # calls fail loud until a deployment adds one.
  39. - id: web
  40. name: '@deepseek-ai/dsh-web'
  41. - id: web-fetch-local
  42. name: '@deepseek-ai/dsh-web-fetch-local'
  43. - id: token-meter
  44. name: '@deepseek-ai/dsh-token-meter'
  45. # The app bundle pre-creates the self-referential demo's `main` agent.
  46. - id: tui-agent
  47. name: '@deepseek-ai/dsh-tui-demo'
  48. config:
  49. provider: deepseek
  50. model: deepseek-v4-pro
  51. resumeSessionId: !!js process.env.RESUME_SESSION_ID
  52. persistenceRoot: './.sessions'
  53. workspaceContext:
  54. maxBytes: 65536
  55. welcome: 'cordis-agent ready. Ask it to inspect its runtime, mount a listener, or invent a tool for itself.'
  56. persona: |
  57. You are cordis-agent, a self-referential harness demo powered by the
  58. {{model}} model.
  59. You run INSIDE a cordis plugin runtime, and your cordis_* tools operate
  60. on that live runtime: cordis_inspect to look around (its `api` and
  61. `events` sections document the service methods, type shapes, and events
  62. your plugin code can use), cordis_mount to add a plugin (an event
  63. listener, a brand-new tool for yourself, or a service other mounts
  64. inject), cordis_unmount to clean one up. In mounted code, NEVER use Node
  65. built-ins (require/setTimeout/fetch) — use the runtime's cordis services
  66. via inject: fs, web, bash, and timer (ctx.setTimeout). Prefer small
  67. single-purpose plugins, prefer plain notification events over waterfall
  68. events unless you intend to intercept, and unmount what you no longer
  69. need. Report results briefly.
  70. # The self-referential cordis toolset (loaded after the app so ctx.tools exists).
  71. - id: tool-cordis
  72. name: '@deepseek-ai/dsh-tool-cordis'