@theseus-whale/dsh-continuity 0.0.0-stage → 4.12.2

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.
Files changed (258) hide show
  1. package/INSTALL.md +25 -0
  2. package/PANEL.md +92 -0
  3. package/README.md +286 -2
  4. package/RELEASE-NOTES.md +732 -0
  5. package/bin/bc-acceptance-full.mjs +91 -0
  6. package/bin/bc-acceptance-tight.mjs +66 -0
  7. package/bin/bc-acceptance.mjs +22 -0
  8. package/bin/bc-add-keywords.mjs +21 -0
  9. package/bin/bc-demo.mjs +47 -0
  10. package/bin/bc-expand-hint.mjs +179 -0
  11. package/bin/bc-ingest-index.mjs +35 -0
  12. package/bin/bc-ingest.mjs +31 -0
  13. package/bin/bc-label-demo.mjs +18 -0
  14. package/bin/bc-relabel.mjs +150 -0
  15. package/bin/bc-sessionize.mjs +59 -0
  16. package/bin/coref_pipeline.py +47 -0
  17. package/bin/coref_service.py +57 -0
  18. package/bin/debug_ckip.py +16 -0
  19. package/bin/debug_ner_zh.py +18 -0
  20. package/bin/doctor.mjs +275 -0
  21. package/bin/en_ner_error_audit.py +33 -0
  22. package/bin/eval-label-rules.mjs +342 -0
  23. package/bin/export-turns.py +68 -0
  24. package/bin/extract-user-paragraph.mjs +14 -0
  25. package/bin/extraction-composite-smoke.mjs +28 -0
  26. package/bin/extraction-latency.mjs +58 -0
  27. package/bin/extraction-user-smoke.mjs +28 -0
  28. package/bin/extraction_service.py +164 -0
  29. package/bin/facet-active-experiment.mjs +110 -0
  30. package/bin/facet-covid.mjs +8 -0
  31. package/bin/facet-curve.mjs +27 -0
  32. package/bin/facet-embedding-train.mjs +20 -0
  33. package/bin/facet-embedding-validate.mjs +83 -0
  34. package/bin/facet-eval-roleplay.mjs +42 -0
  35. package/bin/facet-eval.mjs +38 -0
  36. package/bin/facet-fold.mjs +31 -0
  37. package/bin/facet-load.mjs +16 -0
  38. package/bin/facet-mlp-scan.mjs +45 -0
  39. package/bin/facet-mvp.mjs +34 -0
  40. package/bin/facet-online-experiments.mjs +78 -0
  41. package/bin/facet-online-race.mjs +99 -0
  42. package/bin/facet-online-validate.mjs +51 -0
  43. package/bin/facet-panel.mjs +22 -0
  44. package/bin/facet-passage.mjs +41 -0
  45. package/bin/facet-random-validate.mjs +48 -0
  46. package/bin/facet-roleplay.mjs +33 -0
  47. package/bin/facet-scan.mjs +56 -0
  48. package/bin/facet-segment.mjs +34 -0
  49. package/bin/facet-train.mjs +19 -0
  50. package/bin/facet-validate.mjs +103 -0
  51. package/bin/facet-zeroshot.mjs +14 -0
  52. package/bin/install-templates.mjs +72 -0
  53. package/bin/memory-bench.mjs +53 -0
  54. package/bin/memory-build-summary.mjs +43 -0
  55. package/bin/memory-build-vector.mjs +31 -0
  56. package/bin/memory-build.mjs +41 -0
  57. package/bin/memory-calibration.mjs +70 -0
  58. package/bin/memory-closed-loop.mjs +119 -0
  59. package/bin/memory-dry-run.mjs +70 -0
  60. package/bin/memory-eval.mjs +104 -0
  61. package/bin/memory-event-alias-test.mjs +89 -0
  62. package/bin/memory-extraction-bench.mjs +58 -0
  63. package/bin/memory-load-gate-replay.mjs +137 -0
  64. package/bin/memory-loop-test.mjs +90 -0
  65. package/bin/memory-pre-turn-harness.mjs +63 -0
  66. package/bin/memory-query.mjs +39 -0
  67. package/bin/memory-replay-hints.mjs +84 -0
  68. package/bin/memory-scale.mjs +58 -0
  69. package/bin/memory-scenario-test.mjs +146 -0
  70. package/bin/memory-user-loop.mjs +95 -0
  71. package/bin/ner_bench_tiny_zh.py +59 -0
  72. package/bin/ner_bench_zh.py +60 -0
  73. package/bin/ner_conll_en.py +139 -0
  74. package/bin/ner_direct_en.py +123 -0
  75. package/bin/ner_direct_zh.py +100 -0
  76. package/bin/ner_pipeline.py +208 -0
  77. package/bin/noise-selfcheck.mjs +50 -0
  78. package/bin/pack-integrity.mjs +47 -0
  79. package/bin/panel-check.mjs +57 -0
  80. package/bin/plugin-integrity.mjs +74 -0
  81. package/bin/preview-live.mjs +13 -0
  82. package/bin/public-install-check.mjs +222 -0
  83. package/bin/relabel-apply.mjs +272 -0
  84. package/bin/relabel-dry-run.mjs +381 -0
  85. package/bin/relik_pipeline.py +39 -0
  86. package/bin/relik_service.py +52 -0
  87. package/bin/srl_pipeline.py +55 -0
  88. package/bin/srl_service.py +68 -0
  89. package/bin/summary-index.mjs +151 -0
  90. package/bin/summary-query.mjs +79 -0
  91. package/bin/vec-check.mjs +27 -0
  92. package/bin/zh_ner_error_audit.py +36 -0
  93. package/bin/zh_ner_slot_eval.py +38 -0
  94. package/client.js +760 -0
  95. package/cordis.patch.yml +378 -0
  96. package/docs/API-NOTES.md +1743 -0
  97. package/docs/ARCHITECTURE.md +355 -0
  98. package/docs/CACHE.md +253 -0
  99. package/docs/CONDUCT.md +30 -0
  100. package/docs/CREATOR-HANDOFF.md +102 -0
  101. package/docs/EXPERIMENT.md +136 -0
  102. package/docs/FACET-MVP-REPORT.md +473 -0
  103. package/docs/GUIDE-0.4.66.md +195 -0
  104. package/docs/GUIDE.md +127 -0
  105. package/docs/MECHANISM.md +243 -0
  106. package/docs/NEW-INSTANCE-HANDOFF.md +219 -0
  107. package/docs/README.md +37 -0
  108. package/docs/SESSION-LAYOUT.md +151 -0
  109. package/docs/history-map.md +249 -0
  110. package/docs/relabel-migration-wiring.md +366 -0
  111. package/guides/00-READ-FIRST.md +206 -0
  112. package/guides/01-INSTALL.md +207 -0
  113. package/guides/02-TABLES.md +225 -0
  114. package/guides/03-AUDIT.md +201 -0
  115. package/guides/04-REBUILD.md +306 -0
  116. package/guides/05-FIRST-RUN.md +191 -0
  117. package/guides/06-EMBEDDING.md +146 -0
  118. package/guides/07-PTC-AND-ASSETS.md +221 -0
  119. package/icon.svg +7 -0
  120. package/locale/en.json +6 -0
  121. package/locale/zh.json +6 -0
  122. package/models/README.md +13 -0
  123. package/models/Xenova/bge-small-zh-v1.5/config.json +31 -0
  124. package/models/Xenova/bge-small-zh-v1.5/onnx/model_quantized.onnx +0 -0
  125. package/models/Xenova/bge-small-zh-v1.5/tokenizer.json +21278 -0
  126. package/models/Xenova/bge-small-zh-v1.5/tokenizer_config.json +15 -0
  127. package/package.json +139 -4
  128. package/src/asset-tool.mjs +237 -0
  129. package/src/assets.mjs +244 -0
  130. package/src/backfill.mjs +74 -0
  131. package/src/backup.mjs +80 -0
  132. package/src/deadend.mjs +95 -0
  133. package/src/deleted-store.mjs +35 -0
  134. package/src/engine.mjs +3831 -0
  135. package/src/facets/classifier.mjs +146 -0
  136. package/src/facets/embedding-service.mjs +53 -0
  137. package/src/facets/embedding-worker.mjs +27 -0
  138. package/src/facets/embedding.mjs +163 -0
  139. package/src/facets/extract.mjs +80 -0
  140. package/src/facets/fold-plan.mjs +84 -0
  141. package/src/facets/hybrid.mjs +29 -0
  142. package/src/facets/index.mjs +113 -0
  143. package/src/facets/linear-probe.mjs +43 -0
  144. package/src/facets/load.mjs +37 -0
  145. package/src/facets/mlp-probe.mjs +54 -0
  146. package/src/facets/mlp-service.mjs +53 -0
  147. package/src/facets/mlp-worker.mjs +26 -0
  148. package/src/facets/online-knn.mjs +58 -0
  149. package/src/facets/online-models.mjs +227 -0
  150. package/src/facets/panel-state.mjs +23 -0
  151. package/src/facets/panel.mjs +73 -0
  152. package/src/facets/random.mjs +26 -0
  153. package/src/facets/scanner.mjs +35 -0
  154. package/src/facets/schema.mjs +75 -0
  155. package/src/facets/seed-examples.mjs +58 -0
  156. package/src/facets/sensitivity.mjs +98 -0
  157. package/src/facets/service.mjs +53 -0
  158. package/src/facets/store.mjs +39 -0
  159. package/src/facets/worker.mjs +23 -0
  160. package/src/folds-store.mjs +109 -0
  161. package/src/groups.mjs +167 -0
  162. package/src/handoff-tool.mjs +51 -0
  163. package/src/handoff.mjs +127 -0
  164. package/src/index.mjs +649 -0
  165. package/src/inject-policy.mjs +17 -0
  166. package/src/learning.mjs +88 -0
  167. package/src/memory/alias-proposal.mjs +40 -0
  168. package/src/memory/bc-audit.mjs +245 -0
  169. package/src/memory/bc-index-updater.mjs +404 -0
  170. package/src/memory/bc-index.mjs +48 -0
  171. package/src/memory/bc-label.mjs +220 -0
  172. package/src/memory/bc-panel-state.mjs +107 -0
  173. package/src/memory/bc-pre-step.mjs +463 -0
  174. package/src/memory/bc-recall.mjs +470 -0
  175. package/src/memory/bc-shift.mjs +123 -0
  176. package/src/memory/bc-store.mjs +41 -0
  177. package/src/memory/bm25.mjs +112 -0
  178. package/src/memory/calibration.mjs +54 -0
  179. package/src/memory/chatter.mjs +29 -0
  180. package/src/memory/cmap-file.mjs +107 -0
  181. package/src/memory/concepts-file.mjs +41 -0
  182. package/src/memory/coref-slots.mjs +40 -0
  183. package/src/memory/event-alias-ledger.mjs +87 -0
  184. package/src/memory/event-log.mjs +95 -0
  185. package/src/memory/event-model.mjs +132 -0
  186. package/src/memory/event-segmenter.mjs +36 -0
  187. package/src/memory/event-summary-tree.mjs +122 -0
  188. package/src/memory/extraction-adapter.mjs +76 -0
  189. package/src/memory/extraction-composite.mjs +75 -0
  190. package/src/memory/extraction-core.mjs +76 -0
  191. package/src/memory/extraction-pre-step.mjs +161 -0
  192. package/src/memory/extraction-provider.mjs +300 -0
  193. package/src/memory/extraction-score.mjs +36 -0
  194. package/src/memory/facet-stabilizer.mjs +59 -0
  195. package/src/memory/history-map.mjs +139 -0
  196. package/src/memory/language-router.mjs +30 -0
  197. package/src/memory/load-gate.mjs +161 -0
  198. package/src/memory/mechanical-note.mjs +104 -0
  199. package/src/memory/onboarding.mjs +163 -0
  200. package/src/memory/persona.mjs +78 -0
  201. package/src/memory/planner.mjs +249 -0
  202. package/src/memory/pre-turn.mjs +80 -0
  203. package/src/memory/query-aliases.mjs +39 -0
  204. package/src/memory/recall-cue.mjs +43 -0
  205. package/src/memory/recall.mjs +65 -0
  206. package/src/memory/referent-candidates.mjs +55 -0
  207. package/src/memory/referent-ledger.mjs +86 -0
  208. package/src/memory/relabel-migrate.mjs +376 -0
  209. package/src/memory/relik-adapter.mjs +25 -0
  210. package/src/memory/special-keywords.mjs +60 -0
  211. package/src/memory/structured-adapters.mjs +75 -0
  212. package/src/memory/summary-index.mjs +335 -0
  213. package/src/memory/summary-tree.mjs +110 -0
  214. package/src/memory/term-extractor.mjs +44 -0
  215. package/src/memory/tokenize.mjs +9 -0
  216. package/src/memory/vector-index.mjs +54 -0
  217. package/src/memory/window-summary.mjs +133 -0
  218. package/src/mood.mjs +133 -0
  219. package/src/peer-tool.mjs +63 -0
  220. package/src/peer.mjs +144 -0
  221. package/src/policy.mjs +170 -0
  222. package/src/preflight.mjs +113 -0
  223. package/src/provenance.mjs +94 -0
  224. package/src/range.mjs +75 -0
  225. package/src/recall-exact-tool.mjs +267 -0
  226. package/src/recall-tool.mjs +521 -0
  227. package/src/recheck.mjs +99 -0
  228. package/src/save-start.mjs +29 -0
  229. package/src/session-guard.mjs +140 -0
  230. package/src/session-log-tool.mjs +322 -0
  231. package/src/session-log.mjs +606 -0
  232. package/src/skills.mjs +111 -0
  233. package/src/split-range.mjs +115 -0
  234. package/src/state.mjs +198 -0
  235. package/src/t0.mjs +149 -0
  236. package/src/tag-confirm.mjs +78 -0
  237. package/src/tag-detect.mjs +42 -0
  238. package/src/tag-maintenance.mjs +285 -0
  239. package/src/tag-reject.mjs +73 -0
  240. package/src/tags-store.mjs +94 -0
  241. package/src/tags.mjs +692 -0
  242. package/src/threads-backend.mjs +26 -0
  243. package/src/threads-core.mjs +1887 -0
  244. package/src/threads-store.mjs +207 -0
  245. package/src/threads-tool.mjs +522 -0
  246. package/src/threads.mjs +929 -0
  247. package/src/tool-preview.mjs +427 -0
  248. package/src/topic.mjs +63 -0
  249. package/src/training.mjs +75 -0
  250. package/src/turn-tag.mjs +62 -0
  251. package/src/user-turn.mjs +39 -0
  252. package/templates/cmap.md +11 -0
  253. package/templates/concepts.md +12 -0
  254. package/templates/habits.md +40 -0
  255. package/templates/keywords.md +6 -0
  256. package/templates/rebuild.md +134 -0
  257. package/templates/rules-safe.md +184 -0
  258. package/templates/rules.md +177 -0
@@ -0,0 +1,378 @@
1
+ # ============================================================================
2
+ # dsh-continuity 鈥?DSH bundle patch
3
+ # ============================================================================
4
+ # Three things are declared here:
5
+ #
6
+ # 1. The Host row `dsh-continuity`: serves the sidebar panel's JSON snapshot.
7
+ # 2. The `band` agent preset: the shipped `standard` preset with the
8
+ # compaction-basic config-only override (thresholdRatio 0.92,
9
+ # retainRatio 0.5). This is the first experiment; it changes no engine
10
+ # code. `headroomTokens` is omitted on purpose: the shipped default is
11
+ # 65536 and stays explicit in docs/EXPERIMENT.md.
12
+ # 3. The `continuity` agent preset: the shipped `standard` preset with
13
+ # compaction-basic replaced by `dsh-continuity/engine`, the band
14
+ # controller with gist provenance.
15
+ #
16
+ # The shipped `standard` preset is deliberately NOT overridden: existing and
17
+ # default sessions keep the stock backend. Pick either new preset for a new
18
+ # session to test it. Rollback = select another preset, or remove the bundle.
19
+ #
20
+ # Measured loader ids on this desktop profile (DSH 0.2.1-rc.3):
21
+ # - base row: entryId "include:compaction-basic", patchId "compaction-basic"
22
+ # - preset: entryId "include:preset-standard" -> group "compaction"
23
+ # (isolate: compaction, toolResultPruner) -> child "compaction-basic"
24
+ # A patch cannot address the preset child directly; it must override or copy
25
+ # the whole preset declaration, which is why the two presets below restate the
26
+ # shipped plugin list.
27
+ # ============================================================================
28
+
29
+ - insert:
30
+ - id: dsh-continuity
31
+ name: @theseus-whale/dsh-continuity
32
+ required: false
33
+ config:
34
+ safeMode: true
35
+ panel:
36
+ enabled: true
37
+ path: /dsh-continuity/state.json
38
+ projection:
39
+ provider: deepseek-official
40
+ model: deepseek-flash
41
+ extraction:
42
+ mode: "off"
43
+ bcRecall:
44
+ enabled: true
45
+
46
+ # 鈹€鈹€ config-only experiment 鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€
47
+ - id: preset-band
48
+ name: '@deepseek-ai/dsh-agent-preset'
49
+ config:
50
+ id: band
51
+ name: Band (config-only)
52
+ description: Shipped compaction backend with thresholdRatio 0.92 and retainRatio 0.5; no custom engine.
53
+ order: 20
54
+ plugins:
55
+ - id: persona
56
+ name: '@deepseek-ai/dsh-persona'
57
+ config:
58
+ prefix: You are a coding agent powered by the {{model}} model.
59
+ - id: agent-instructions
60
+ name: '@deepseek-ai/dsh-agent-instructions'
61
+ config:
62
+ maxBytes: 65536
63
+ - id: time-context
64
+ name: '@deepseek-ai/dsh-time-context'
65
+ - id: tool-bash
66
+ name: '@deepseek-ai/dsh-tool-bash'
67
+ disabled: !!js process.platform === 'win32'
68
+ - id: tool-pwsh
69
+ name: '@deepseek-ai/dsh-tool-pwsh'
70
+ disabled: !!js process.platform !== 'win32'
71
+ - id: tool-fs
72
+ name: '@deepseek-ai/dsh-tool-fs'
73
+ - id: tool-fs-search
74
+ name: '@deepseek-ai/dsh-tool-fs-search'
75
+ config:
76
+ sampleOverCapGlobResults: false
77
+ - id: tool-jobs
78
+ name: '@deepseek-ai/dsh-tool-jobs'
79
+ - id: tool-schedule
80
+ name: '@deepseek-ai/dsh-tool-schedule'
81
+ - id: skill-filesystem
82
+ name: '@deepseek-ai/dsh-skill-filesystem'
83
+ - id: tool-skill
84
+ name: '@deepseek-ai/dsh-tool-skill'
85
+ - id: command-goal
86
+ name: '@deepseek-ai/dsh-command-goal'
87
+ - id: tool-goal
88
+ name: '@deepseek-ai/dsh-tool-goal'
89
+ - id: planning
90
+ name: cordis:group
91
+ group: true
92
+ isolate:
93
+ planMode: true
94
+ config:
95
+ - id: plan-mode
96
+ name: '@deepseek-ai/dsh-plan-mode'
97
+ config:
98
+ section: |
99
+ You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or 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.
100
+
101
+ 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.
102
+
103
+ 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.
104
+
105
+ 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.
106
+
107
+ 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.
108
+
109
+ 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 the 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.
110
+ - id: compaction
111
+ name: cordis:group
112
+ group: true
113
+ isolate:
114
+ compaction: true
115
+ toolResultPruner: true
116
+ config:
117
+ # CONFIG-ONLY EXPERIMENT: cap-threshold at 92% of the window,
118
+ # retain 50% of the message budget verbatim.
119
+ - id: compaction-basic
120
+ name: '@deepseek-ai/dsh-compaction-basic'
121
+ config:
122
+ thresholdRatio: 0.92
123
+ retainRatio: 0.5
124
+ - id: command-compact
125
+ name: '@deepseek-ai/dsh-command-compact'
126
+ - id: tool-result-pruner
127
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
128
+ config:
129
+ thresholdChars: 8192
130
+ headChars: 4096
131
+ tailChars: 1024
132
+ - id: delegation
133
+ name: cordis:group
134
+ group: true
135
+ isolate:
136
+ workflowEngine: true
137
+ config:
138
+ - id: tool-subagent-control
139
+ name: '@deepseek-ai/dsh-tool-subagent-control'
140
+ - id: tool-subagent-list-agents
141
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
142
+ - id: tool-subagent
143
+ name: '@deepseek-ai/dsh-tool-subagent'
144
+ config:
145
+ provider: spawn
146
+ toolName: subagent
147
+ modelSelectionSettings: true
148
+ - id: tool-subagent-fork
149
+ name: '@deepseek-ai/dsh-tool-subagent'
150
+ config:
151
+ provider: fork
152
+ toolName: subagent_fork
153
+ - id: workflow-ptc
154
+ name: '@deepseek-ai/dsh-workflow-ptc'
155
+ config:
156
+ provider: spawn
157
+ - id: tool-workflow
158
+ name: '@deepseek-ai/dsh-tool-workflow'
159
+ - id: tool-ask-user
160
+ name: '@deepseek-ai/dsh-tool-ask-user'
161
+ - id: tool-todo
162
+ name: '@deepseek-ai/dsh-tool-todo'
163
+ config:
164
+ allowParallelInProgress: true
165
+ - id: tool-web
166
+ name: '@deepseek-ai/dsh-tool-web'
167
+ config:
168
+ fetch: true
169
+ searchTimeoutMs: 60000
170
+ - id: present
171
+ name: '@deepseek-ai/dsh-tool-present'
172
+ - id: tool-plugin-manager
173
+ name: '@deepseek-ai/dsh-plugin-manager/tools'
174
+ disabled: true
175
+ - id: tool-plugin-market
176
+ name: '@deepseek-ai/dsh-plugin-market/tools'
177
+ disabled: true
178
+
179
+ # 鈹€鈹€ band engine + provenance 鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€鈹€
180
+ - id: preset-continuity
181
+ name: '@deepseek-ai/dsh-agent-preset'
182
+ config:
183
+ id: continuity
184
+ name: Continuity
185
+ description: Band-controlled compaction with gist headers and one standing provenance convention.
186
+ order: 21
187
+ plugins:
188
+ - id: persona
189
+ name: '@deepseek-ai/dsh-persona'
190
+ config:
191
+ prefix: You are a coding agent powered by the {{model}} model.
192
+ - id: agent-instructions
193
+ name: '@deepseek-ai/dsh-agent-instructions'
194
+ config:
195
+ maxBytes: 65536
196
+ - id: time-context
197
+ name: '@deepseek-ai/dsh-time-context'
198
+ - id: tool-bash
199
+ name: '@deepseek-ai/dsh-tool-bash'
200
+ disabled: !!js process.platform === 'win32'
201
+ - id: tool-pwsh
202
+ name: '@deepseek-ai/dsh-tool-pwsh'
203
+ disabled: !!js process.platform !== 'win32'
204
+ - id: tool-fs
205
+ name: '@deepseek-ai/dsh-tool-fs'
206
+ - id: tool-fs-search
207
+ name: '@deepseek-ai/dsh-tool-fs-search'
208
+ config:
209
+ sampleOverCapGlobResults: false
210
+ - id: tool-jobs
211
+ name: '@deepseek-ai/dsh-tool-jobs'
212
+ - id: tool-schedule
213
+ name: '@deepseek-ai/dsh-tool-schedule'
214
+ - id: skill-filesystem
215
+ name: '@deepseek-ai/dsh-skill-filesystem'
216
+ - id: tool-skill
217
+ name: '@deepseek-ai/dsh-tool-skill'
218
+ # Retrieval tool: scoped to this preset; standard and band do not get it.
219
+ - id: session-log-tool
220
+ name: @theseus-whale/dsh-continuity/session-log-tool
221
+ # Thread scaffolding: save/load/active/list. The save commit runs at
222
+ # the next pre-step so the tool call/result pair is never split.
223
+ - id: threads-tool
224
+ name: @theseus-whale/dsh-continuity/threads-tool
225
+ config:
226
+ safeMode: true
227
+ - id: command-goal
228
+ name: '@deepseek-ai/dsh-command-goal'
229
+ - id: tool-goal
230
+ name: '@deepseek-ai/dsh-tool-goal'
231
+ - id: planning
232
+ name: cordis:group
233
+ group: true
234
+ isolate:
235
+ planMode: true
236
+ config:
237
+ - id: plan-mode
238
+ name: '@deepseek-ai/dsh-plan-mode'
239
+ config:
240
+ section: |
241
+ You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or 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.
242
+
243
+ 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.
244
+
245
+ 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.
246
+
247
+ 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.
248
+
249
+ 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.
250
+
251
+ 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 the 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.
252
+ - id: compaction
253
+ name: cordis:group
254
+ group: true
255
+ isolate:
256
+ compaction: true
257
+ toolResultPruner: true
258
+ config:
259
+ # One engine per context: this row replaces compaction-basic
260
+ # inside the same isolate realm. command-compact and the pruner
261
+ # stay so /compact and overflow recovery keep working.
262
+ - id: continuity-engine
263
+ name: @theseus-whale/dsh-continuity/engine
264
+ config:
265
+ # Continuity balanced band (4.9.122):
266
+ # setpoint = high = 0.48, low 0.32, emergency 0.65,
267
+ # emergencyTo 0.42, protect 0.14, maxPerBatch 190000,
268
+ # minAction 24000.
269
+ #
270
+ # On the measured 0b window (W 792,576, baseline 133,272):
271
+ # high 380,436 · low 253,624 · floor 244,233
272
+ # band 126,812 < maxPerBatch 190k -> cap does not bite
273
+ # emergencyTo is 182,292 below emergency; 140k would
274
+ # leave emergency short of its target, so keep 190k.
275
+ # protect .14 leaves ~9.4k of baseline headroom below low;
276
+ # it is a conservative default, not a guarantee. budget caps
277
+ # the folded surface only; the associated non-surface prefix
278
+ # can leave with it, so actual request reduction can exceed
279
+ # the budget. Use the next request measurement for that, not
280
+ # budget. One pass per high crossing; no proportional-zone
281
+ # passes.
282
+ #
283
+ # 0.2.4 A4-safe: active open-turn tool calls are hard-pinned;
284
+ # old non-active tool results are previewed toward low 32%
285
+ # (42% for emergency), and the same compression continues with
286
+ # a pass to the target even if the preview drops below high.
287
+ # B previews tool results in the summarization input only.
288
+ # Non-text results become semantic handles; overflow may
289
+ # detach the responsible active result into a pause handle.
290
+ # 0.2.5: handles/pauses/previews are never previewed again;
291
+ # pass records include a post-pass measurement; manual
292
+ # /compact gets a follow-up gist header and a manual record.
293
+ # 0.2.6: emergency 0.85 is 673,690 (85% full).
294
+ # 0.2.7: high .76 / low .38 / emergencyTo .62 / protect .20.
295
+ # band-high budget = .4 * (.76-.38)W = 120,472 < maxPerBatch.
296
+ #
297
+ # All values are explicit so a hot preset reconciliation cannot
298
+ # fall back to an older cached module default.
299
+ policy:
300
+ setpoint: 0.76
301
+ high: 0.76
302
+ low: 0.38
303
+ emergency: 0.85
304
+ emergencyTo: 0.62
305
+ protect: 0.20
306
+ maxPerBatch: 443843
307
+ minAction: 24000
308
+ k: 0.4
309
+ mechanicalNote: false
310
+ # Stage switches: stage 1 (save/load/active/list + state) is
311
+ # always on; stage 2 injects the per-turn [线] line + rules;
312
+ # stage 3 pins the active loadSeq against automatic folds.
313
+ threads:
314
+ inject: true
315
+ pin: true
316
+ pointersOnly: true
317
+ provenance:
318
+ header: false
319
+ standingConvention: false
320
+ turnGate:
321
+ enabled: false
322
+ compactionBasic:
323
+ thresholdRatio: 0.8
324
+ retainRatio: 0.5
325
+ - id: command-compact
326
+ name: '@deepseek-ai/dsh-command-compact'
327
+ - id: tool-result-pruner
328
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
329
+ config:
330
+ thresholdChars: 8192
331
+ headChars: 4096
332
+ tailChars: 1024
333
+ - id: delegation
334
+ name: cordis:group
335
+ group: true
336
+ isolate:
337
+ workflowEngine: true
338
+ config:
339
+ - id: tool-subagent-control
340
+ name: '@deepseek-ai/dsh-tool-subagent-control'
341
+ - id: tool-subagent-list-agents
342
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
343
+ - id: tool-subagent
344
+ name: '@deepseek-ai/dsh-tool-subagent'
345
+ config:
346
+ provider: spawn
347
+ toolName: subagent
348
+ modelSelectionSettings: true
349
+ - id: tool-subagent-fork
350
+ name: '@deepseek-ai/dsh-tool-subagent'
351
+ config:
352
+ provider: fork
353
+ toolName: subagent_fork
354
+ - id: workflow-ptc
355
+ name: '@deepseek-ai/dsh-workflow-ptc'
356
+ config:
357
+ provider: spawn
358
+ - id: tool-workflow
359
+ name: '@deepseek-ai/dsh-tool-workflow'
360
+ - id: tool-ask-user
361
+ name: '@deepseek-ai/dsh-tool-ask-user'
362
+ - id: tool-todo
363
+ name: '@deepseek-ai/dsh-tool-todo'
364
+ config:
365
+ allowParallelInProgress: true
366
+ - id: tool-web
367
+ name: '@deepseek-ai/dsh-tool-web'
368
+ config:
369
+ fetch: true
370
+ searchTimeoutMs: 60000
371
+ - id: present
372
+ name: '@deepseek-ai/dsh-tool-present'
373
+ - id: tool-plugin-manager
374
+ name: '@deepseek-ai/dsh-plugin-manager/tools'
375
+ disabled: true
376
+ - id: tool-plugin-market
377
+ name: '@deepseek-ai/dsh-plugin-market/tools'
378
+ disabled: true