@shundoo-ai/dsh-cosmic 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cordis.patch.yml CHANGED
@@ -1,3 +1,7 @@
1
+ # ⚠️ 本文件由 docs/gen-preset-patch.cjs 生成,请勿直接编辑。
2
+ # 改插件行 → 编辑 agent.cordis.yml(并对照官方 standard 做对齐)
3
+ # 改 id/名称/描述/排序 → 编辑 preset.yml
4
+ # 然后重跑: node docs/gen-preset-patch.cjs
1
5
  - insert:
2
6
  - id: preset-cosmic
3
7
  name: '@deepseek-ai/dsh-agent-preset'
package/package.json CHANGED
@@ -1,12 +1,10 @@
1
1
  {
2
2
  "name": "@shundoo-ai/dsh-cosmic",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  ".config",
7
- "agent.cordis.yml",
8
7
  "cordis.patch.yml",
9
- "preset.yml",
10
8
  "run.py",
11
9
  "skills",
12
10
  "!**/__pycache__",
package/agent.cordis.yml DELETED
@@ -1,269 +0,0 @@
1
- # The `standard` agent preset: the full coding agent, mounted once per process.
2
- #
3
- # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
4
- # standing scope; every session naming it joins by scope parentage, so the
5
- # tools and prompt sections registered here cover each joined agent while a
6
- # session's own state stays keyed per Session/Agent inside the plugins. The
7
- # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
8
- # preset must not own: the registries themselves, the sandbox and approval
9
- # stack, persistence, and the model route.
10
- #
11
- # A service row here MUST sit inside a group carrying an `isolate` realm.
12
- # Without one it publishes into the root realm, where it is process-global —
13
- # another preset publishing the same name collides, and a host reader would
14
- # resolve one preset's instance for every session; `dsh-agent-presets` rejects
15
- # that at mount. `true` means an entry-local realm: this standing mount's own
16
- # private instance, apart from every other preset's. (A shared label does NOT
17
- # pool instances — `provide()` throws on the second registration under the
18
- # same realm symbol; labels join REALMS, and are not what this file needs.)
19
-
20
- # ── identity ────────────────────────────────────────────────────────────────
21
-
22
- # The preset's own persona, shadowing the deployment default for this agent.
23
- # `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
24
- - id: persona
25
- name: '@deepseek-ai/dsh-persona'
26
- config:
27
- suffix: Your working directory is {{cwd}}.
28
- prefix: >-
29
- You are 苍穹助手 (Cosmic Assistant), the 金蝶云星空 (Kingdee Cloud Cosmic) 开发与数据分析 agent, powered by the {{model}} model. Two capabilities: (1) 苍穹开发 — build and modify 苍穹 apps, menus, forms, entities, fields, plugins, APIs, workflows, and scheduling; follow the cosmic-dev-best-practices and app-build skills for that work. (2) 数据分析 — answer business-data questions through the 苍穹 OpenAPI, analyze with Python (pandas/plotly), and deliver markdown tables in chat plus interactive HTML reports; load the erp-analysis skill before any data query (its SKILL.md is the authority for the workflow and report format). Match the user's intent to the right capability and load the appropriate skill.
30
-
31
- - id: agent-instructions
32
- name: '@deepseek-ai/dsh-agent-instructions'
33
- config:
34
- maxBytes: 65536
35
-
36
- # ── shell ───────────────────────────────────────────────────────────────────
37
-
38
- # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
39
- # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
40
- # the criterion for host-plane ownership — injection resolves before any session
41
- # exists, so there is no agent to key by. Behind a preset realm those variables
42
- # never reached the model's shell at all. Both shell tools consume the host
43
- # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
44
- # host-plane too.
45
- - id: tool-bash
46
- name: '@deepseek-ai/dsh-tool-bash'
47
- disabled: !!js process.platform === 'win32'
48
-
49
- - id: tool-pwsh
50
- name: '@deepseek-ai/dsh-tool-pwsh'
51
- disabled: !!js process.platform !== 'win32'
52
-
53
- # ── filesystem ──────────────────────────────────────────────────────────────
54
-
55
- # Both register into the host `tools` registry and provide nothing, so
56
- # they need no realm. The `fs` service and its policy stay in the host.
57
- - id: tool-fs
58
- name: '@deepseek-ai/dsh-tool-fs'
59
-
60
- - id: tool-fs-search
61
- name: '@deepseek-ai/dsh-tool-fs-search'
62
- config:
63
- sampleOverCapGlobResults: false
64
-
65
- # ── background jobs ────────────────────────────────────────────────────────
66
-
67
- # Only the model-facing controls. The task REGISTRY stays on the host plane:
68
- # its producers sit outside any realm this file could put it in — `tool-bash`
69
- # above resolves it with `ctx.get`, and an entry-local realm here is invisible
70
- # to every sibling row, so `run_in_background` would answer "background jobs
71
- # unavailable" while these controls sat in the catalog. The registry is keyed by
72
- # owning agent anyway, so one host instance serves every session. What a preset
73
- # chooses is whether its agent can collect and stop background work at all.
74
- - id: tool-jobs
75
- name: '@deepseek-ai/dsh-tool-jobs'
76
-
77
- # ── skills ──────────────────────────────────────────────────────────────────
78
-
79
- # The skill REGISTRY lives in the host composition and is layered per scope:
80
- # these rows register into THIS preset's layer of it, so they need no realm.
81
- # `skill-filesystem` contributes local-root discovery for agents on this preset, and
82
- # `tool-skill` gives them the catalog and loader; the merged catalog also
83
- # carries whatever the deployment registered globally (repository plugins).
84
- - id: skill-filesystem
85
- name: '@deepseek-ai/dsh-skill-filesystem'
86
- config:
87
- customSkillDirs:
88
- - !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
89
-
90
- - id: tool-skill
91
- name: '@deepseek-ai/dsh-tool-skill'
92
-
93
- # ── goals ───────────────────────────────────────────────────────────────────
94
-
95
- # The goal service and session driver stay on the host plane, where the Gateway
96
- # can resolve them. The human command and model-facing tool register into this
97
- # preset's scoped layers.
98
- - id: command-goal
99
- name: '@deepseek-ai/dsh-command-goal'
100
-
101
- - id: tool-goal
102
- name: '@deepseek-ai/dsh-tool-goal'
103
-
104
- # ── plan mode ───────────────────────────────────────────────────────────────
105
-
106
- # Plan state is per-agent by nature, so an entry-local realm is not a
107
- # workaround here — it is the correct lifetime.
108
- - id: planning
109
- name: cordis:group
110
- group: true
111
- isolate:
112
- planMode: true
113
- config:
114
- - id: plan-mode
115
- name: '@deepseek-ai/dsh-plan-mode'
116
- config:
117
- section: |
118
- You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
119
-
120
- Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
121
-
122
- The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
123
-
124
- Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
125
-
126
- Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
127
-
128
- When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
129
-
130
- # ── compaction ──────────────────────────────────────────────────────────────
131
-
132
- # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
133
- # share this realm rather than sit outside it.
134
- #
135
- # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
136
- # plane, and the rows here resolve that one instance. It takes no configuration,
137
- # keys every fold by Session, and owns the context-meter projection units the
138
- # browser reads for every session — behind a realm those units would come and go
139
- # with whichever presets happen to be mounted. What a preset chooses is whether
140
- # its agent compacts at all, which is `compaction-basic` below.
141
- - id: compaction
142
- name: cordis:group
143
- group: true
144
- isolate:
145
- compaction: true
146
- toolResultPruner: true
147
- config:
148
- - id: compaction-basic
149
- name: '@deepseek-ai/dsh-compaction-basic'
150
-
151
- - id: command-compact
152
- name: '@deepseek-ai/dsh-command-compact'
153
-
154
- - id: tool-result-pruner
155
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
156
- config:
157
- thresholdChars: 8192
158
- headChars: 4096
159
- tailChars: 1024
160
-
161
- # ── delegation and workflows ────────────────────────────────────────────────
162
-
163
- # The `subagents` registry and its spawn/fork backends live in the HOST
164
- # composition: the registry is a process singleton whose cross-session queries
165
- # the api-proxy serves to the browser, and a provider name may only be
166
- # registered once. This preset contributes the delegation TOOLS, which resolve
167
- # that host registry.
168
- #
169
- # `workflows` is different — nothing outside an agent reads it — so every row
170
- # that reaches it shares one entry-local realm here, and a consumer left
171
- # outside would resolve a host registry this preset does not populate.
172
- - id: delegation
173
- name: cordis:group
174
- group: true
175
- isolate:
176
- workflowEngine: true
177
- config:
178
- - id: tool-subagent-control
179
- name: '@deepseek-ai/dsh-tool-subagent-control'
180
-
181
- - id: tool-subagent-list-agents
182
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
183
-
184
- - id: tool-subagent
185
- name: '@deepseek-ai/dsh-tool-subagent'
186
- config:
187
- provider: spawn
188
- toolName: subagent
189
- modelSelectionSettings: true
190
- backgroundMode: continuable
191
-
192
- # Fork omits model selection so provider/model stay equal to the parent and
193
- # the inherited history remains eligible for KV Cache reuse. This preset
194
- # keeps fork continuable; parent and child inherit the same messaging tool,
195
- # while the parent id and return guidance follow the inherited history.
196
- - id: tool-subagent-fork
197
- name: '@deepseek-ai/dsh-tool-subagent'
198
- config:
199
- provider: fork
200
- toolName: subagent_fork
201
- backgroundMode: continuable
202
-
203
- # Production dsh does not install these optional providers. Install the
204
- # matching Bundle in this Profile and restart the Host, then copy this
205
- # preset and remove `disabled` from the matching tool row. Host availability
206
- # alone grants no tool.
207
- - id: tool-subagent-codex
208
- name: '@deepseek-ai/dsh-tool-subagent'
209
- disabled: true
210
- config:
211
- provider: codex
212
- toolName: subagent_codex
213
- backgroundMode: one-shot
214
- maxDepth: provider-managed
215
-
216
- - id: tool-subagent-claude-code
217
- name: '@deepseek-ai/dsh-tool-subagent'
218
- disabled: true
219
- config:
220
- provider: claude-code
221
- toolName: subagent_claude_code
222
- backgroundMode: one-shot
223
- maxDepth: provider-managed
224
-
225
- - id: workflow-ptc
226
- name: '@deepseek-ai/dsh-workflow-ptc'
227
- config:
228
- provider: spawn
229
-
230
- - id: tool-workflow
231
- name: '@deepseek-ai/dsh-tool-workflow'
232
-
233
- # Off by default with the base row it mirrors: the tool description
234
- # restricts `ralph` to runs the human explicitly asked for, and completion
235
- # is a worker self-report, not an independent evaluation. Preset files take
236
- # no patches, so a session that wants it duplicates this preset under a new
237
- # id and drops `disabled`; the shipped root shadows a copy that reuses this
238
- # id.
239
- - id: tool-ralph
240
- name: '@deepseek-ai/dsh-tool-ralph'
241
- disabled: true
242
- config:
243
- subagentProvider: spawn
244
- maxRounds: 64
245
-
246
- # ── remaining model-facing rows ─────────────────────────────────────────────
247
-
248
- - id: tool-ask-user
249
- name: '@deepseek-ai/dsh-tool-ask-user'
250
-
251
- - id: tool-todo
252
- name: '@deepseek-ai/dsh-tool-todo'
253
- config:
254
- allowParallelInProgress: true
255
-
256
- # The `web` service and its search provider stay in the host composition; only
257
- # the model-facing tool is per-session.
258
- - id: tool-web
259
- name: '@deepseek-ai/dsh-tool-web'
260
- config:
261
- fetch: true
262
- searchTimeoutMs: 60000
263
-
264
- - id: present
265
- name: '@deepseek-ai/dsh-tool-present'
266
-
267
- - id: tool-plugin-manager
268
- name: '@deepseek-ai/dsh-plugin-manager/tools'
269
- disabled: true
package/preset.yml DELETED
@@ -1,2 +0,0 @@
1
- name: 苍穹助手
2
- description: 金蝶云苍穹开发与数据分析助手:开发苍穹应用,洞察业务数据,产出可视化报告。