dsh-plugin-dev-kb 1.0.9 → 1.3.0

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 (169) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.en.md +14 -8
  3. package/README.md +14 -8
  4. package/docs/banner.svg +25 -0
  5. package/kb/INDEX.md +8 -2
  6. package/kb/README.md +4 -4
  7. package/kb/extra/AGENTS.md +3 -3
  8. package/kb/extra/cookbook/adding-a-remote-api.md +197 -0
  9. package/kb/extra/cookbook/adding-a-remote-api.zh.md +197 -0
  10. package/kb/extra/cookbook/adding-a-session-format-version.md +109 -0
  11. package/kb/extra/cookbook/adding-a-session-format-version.zh.md +109 -0
  12. package/kb/extra/cookbook/adding-a-vendored-package.md +1 -1
  13. package/kb/extra/cookbook/adding-a-vendored-package.zh.md +1 -1
  14. package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.md +1 -1
  15. package/kb/extra/cookbook/responding-to-pr-review-on-a-stack.zh.md +1 -1
  16. package/kb/extra/deepseek-llm-api-wire-extensions.md +19 -15
  17. package/kb/extra/deepseek-llm-api-wire-extensions.zh.md +19 -15
  18. package/kb/extra/development.md +13 -3
  19. package/kb/extra/development.zh.md +13 -3
  20. package/kb/extra/event-producer-consumer.md +49 -46
  21. package/kb/extra/event-producer-consumer.zh.md +52 -49
  22. package/kb/extra/i18n/README.md +2 -1
  23. package/kb/extra/i18n/README.zh.md +3 -2
  24. package/kb/extra/i18n/style-samples.md +2 -2
  25. package/kb/extra/i18n/translation-prompt.md +1 -1
  26. package/kb/extra/module-graph.md +493 -1002
  27. package/kb/extra/module-graph.zh.md +495 -1004
  28. package/kb/extra/rescope.md +1 -1
  29. package/kb/extra/rescope.zh.md +1 -1
  30. package/kb/extra/session-format-status.md +47 -0
  31. package/kb/extra/session-format-status.zh.md +47 -0
  32. package/kb/extra/subsystems/agent-team.md +3 -2
  33. package/kb/extra/subsystems/agent-team.zh.md +3 -2
  34. package/kb/extra/subsystems/attachment.md +157 -4
  35. package/kb/extra/subsystems/attachment.zh.md +157 -4
  36. package/kb/extra/subsystems/feedback.md +164 -30
  37. package/kb/extra/subsystems/feedback.zh.md +164 -30
  38. package/kb/extra/testing.md +9 -4
  39. package/kb/extra/testing.zh.md +9 -4
  40. package/kb/extra/web-styling.md +5 -0
  41. package/kb/extra/web-styling.zh.md +5 -0
  42. package/kb/meta/search-index.json +223 -151
  43. package/kb/meta/site-pages.txt +187 -181
  44. package/kb/meta/source.json +5 -5
  45. package/kb/meta/topics.md +5 -5
  46. package/kb/site/develop/basic/publish.md +1 -1
  47. package/kb/site/develop/cordis-tutorial/07-into-the-harness.md +3 -2
  48. package/kb/site/develop/practice/llm-adapter.md +4 -3
  49. package/kb/site/en/develop/basic/publish.md +1 -1
  50. package/kb/site/en/develop/cordis-tutorial/07-into-the-harness.md +3 -2
  51. package/kb/site/en/develop/practice/llm-adapter.md +4 -3
  52. package/kb/site/en/guide/network-proxy.md +87 -0
  53. package/kb/site/en/guide/providers.md +70 -17
  54. package/kb/site/en/guide/python-sdk.md +19 -3
  55. package/kb/site/en/guide/schedule.md +2 -0
  56. package/kb/site/en/reference/agent-lifecycle.md +17 -8
  57. package/kb/site/en/reference/api-gateway.md +2 -2
  58. package/kb/site/en/reference/capability-seams.md +24 -10
  59. package/kb/site/en/reference/config-catalog.md +322 -264
  60. package/kb/site/en/reference/cookbook/adding-a-package.md +1 -2
  61. package/kb/site/en/reference/cookbook/adding-a-settings-card.md +10 -8
  62. package/kb/site/en/reference/cookbook/adding-a-tool.md +1 -1
  63. package/kb/site/en/reference/cookbook/extension-cookbook.md +16 -13
  64. package/kb/site/en/reference/index.md +26 -9
  65. package/kb/site/en/reference/persistence-catalog.md +189 -95
  66. package/kb/site/en/reference/subsystems/approval.md +1 -1
  67. package/kb/site/en/reference/subsystems/client-modules.md +9 -0
  68. package/kb/site/en/reference/subsystems/client-resources.md +94 -0
  69. package/kb/site/en/reference/subsystems/code-runtime.md +7 -3
  70. package/kb/site/en/reference/subsystems/commands.md +25 -16
  71. package/kb/site/en/reference/subsystems/compaction.md +10 -10
  72. package/kb/site/en/reference/subsystems/conversation.md +11 -4
  73. package/kb/site/en/reference/subsystems/core.md +173 -29
  74. package/kb/site/en/reference/subsystems/credentials.md +5 -4
  75. package/kb/site/en/reference/subsystems/filesystem.md +15 -0
  76. package/kb/site/en/reference/subsystems/goal.md +38 -2
  77. package/kb/site/en/reference/subsystems/index.md +3 -1
  78. package/kb/site/en/reference/subsystems/invariants.md +1 -1
  79. package/kb/site/en/reference/subsystems/llm-streaming.md +43 -12
  80. package/kb/site/en/reference/subsystems/lsp.md +1 -1
  81. package/kb/site/en/reference/subsystems/permission-presets.md +5 -5
  82. package/kb/site/en/reference/subsystems/persistence.md +211 -199
  83. package/kb/site/en/reference/subsystems/plan.md +3 -3
  84. package/kb/site/en/reference/subsystems/sandbox.md +2 -0
  85. package/kb/site/en/reference/subsystems/schedule.md +9 -3
  86. package/kb/site/en/reference/subsystems/scope.md +1 -1
  87. package/kb/site/en/reference/subsystems/session-projection.md +50 -24
  88. package/kb/site/en/reference/subsystems/session-query.md +19 -13
  89. package/kb/site/en/reference/subsystems/session-reference.md +29 -1
  90. package/kb/site/en/reference/subsystems/session-telemetry.md +27 -10
  91. package/kb/site/en/reference/subsystems/session-title.md +6 -6
  92. package/kb/site/en/reference/subsystems/session.md +208 -103
  93. package/kb/site/en/reference/subsystems/settings.md +30 -12
  94. package/kb/site/en/reference/subsystems/shell.md +9 -6
  95. package/kb/site/en/reference/subsystems/sidebar-right.md +151 -0
  96. package/kb/site/en/reference/subsystems/skills.md +1 -1
  97. package/kb/site/en/reference/subsystems/slots.md +41 -32
  98. package/kb/site/en/reference/subsystems/spill.md +13 -6
  99. package/kb/site/en/reference/subsystems/storage.md +28 -5
  100. package/kb/site/en/reference/subsystems/subagent.md +58 -105
  101. package/kb/site/en/reference/subsystems/subprocess.md +25 -26
  102. package/kb/site/en/reference/subsystems/system-prompt.md +18 -3
  103. package/kb/site/en/reference/subsystems/token-meter.md +4 -3
  104. package/kb/site/en/reference/subsystems/tools.md +5 -5
  105. package/kb/site/en/reference/subsystems/typert.md +18 -18
  106. package/kb/site/en/reference/subsystems/web-client.md +1 -1
  107. package/kb/site/en/reference/subsystems/workspace.md +88 -9
  108. package/kb/site/en/reference/tool-catalog.md +56 -66
  109. package/kb/site/en/reference/tool-execution-pipeline.md +2 -2
  110. package/kb/site/guide/network-proxy.md +87 -0
  111. package/kb/site/guide/providers.md +70 -17
  112. package/kb/site/guide/python-sdk.md +19 -3
  113. package/kb/site/guide/schedule.md +2 -0
  114. package/kb/site/reference/agent-lifecycle.md +17 -8
  115. package/kb/site/reference/api-gateway.md +2 -2
  116. package/kb/site/reference/capability-seams.md +24 -10
  117. package/kb/site/reference/config-catalog.md +321 -263
  118. package/kb/site/reference/cookbook/adding-a-package.md +1 -2
  119. package/kb/site/reference/cookbook/adding-a-settings-card.md +10 -8
  120. package/kb/site/reference/cookbook/adding-a-tool.md +1 -1
  121. package/kb/site/reference/cookbook/extension-cookbook.md +16 -13
  122. package/kb/site/reference/index.md +26 -9
  123. package/kb/site/reference/persistence-catalog.md +190 -96
  124. package/kb/site/reference/subsystems/approval.md +1 -1
  125. package/kb/site/reference/subsystems/client-modules.md +9 -0
  126. package/kb/site/reference/subsystems/client-resources.md +94 -0
  127. package/kb/site/reference/subsystems/code-runtime.md +7 -3
  128. package/kb/site/reference/subsystems/commands.md +25 -16
  129. package/kb/site/reference/subsystems/compaction.md +10 -10
  130. package/kb/site/reference/subsystems/conversation.md +11 -4
  131. package/kb/site/reference/subsystems/core.md +173 -29
  132. package/kb/site/reference/subsystems/credentials.md +5 -4
  133. package/kb/site/reference/subsystems/filesystem.md +15 -0
  134. package/kb/site/reference/subsystems/goal.md +38 -2
  135. package/kb/site/reference/subsystems/index.md +14 -12
  136. package/kb/site/reference/subsystems/invariants.md +1 -1
  137. package/kb/site/reference/subsystems/llm-streaming.md +43 -12
  138. package/kb/site/reference/subsystems/lsp.md +1 -1
  139. package/kb/site/reference/subsystems/permission-presets.md +5 -5
  140. package/kb/site/reference/subsystems/persistence.md +210 -198
  141. package/kb/site/reference/subsystems/plan.md +3 -3
  142. package/kb/site/reference/subsystems/schedule.md +9 -3
  143. package/kb/site/reference/subsystems/scope.md +1 -1
  144. package/kb/site/reference/subsystems/session-projection.md +50 -24
  145. package/kb/site/reference/subsystems/session-query.md +19 -13
  146. package/kb/site/reference/subsystems/session-reference.md +29 -1
  147. package/kb/site/reference/subsystems/session-telemetry.md +27 -10
  148. package/kb/site/reference/subsystems/session-title.md +6 -6
  149. package/kb/site/reference/subsystems/session.md +208 -103
  150. package/kb/site/reference/subsystems/settings.md +30 -12
  151. package/kb/site/reference/subsystems/shell.md +9 -6
  152. package/kb/site/reference/subsystems/sidebar-right.md +151 -0
  153. package/kb/site/reference/subsystems/skills.md +1 -1
  154. package/kb/site/reference/subsystems/slots.md +41 -32
  155. package/kb/site/reference/subsystems/spill.md +13 -6
  156. package/kb/site/reference/subsystems/storage.md +28 -5
  157. package/kb/site/reference/subsystems/subagent.md +58 -105
  158. package/kb/site/reference/subsystems/subprocess.md +25 -26
  159. package/kb/site/reference/subsystems/system-prompt.md +18 -3
  160. package/kb/site/reference/subsystems/token-meter.md +4 -3
  161. package/kb/site/reference/subsystems/tools.md +5 -5
  162. package/kb/site/reference/subsystems/typert.md +18 -18
  163. package/kb/site/reference/subsystems/web-client.md +1 -1
  164. package/kb/site/reference/subsystems/workspace.md +88 -9
  165. package/kb/site/reference/tool-catalog.md +55 -65
  166. package/kb/site/reference/tool-execution-pipeline.md +2 -2
  167. package/lib/index.js +25 -44
  168. package/package.json +3 -2
  169. package/skills/dsh-plugin-dev-kb.md +4 -4
@@ -14,21 +14,39 @@ Open **Settings → Models**. The DeepSeek card exposes one API-key field; enter
14
14
 
15
15
  Keys are write-only. The page receives a redacted descriptor after saving, never the literal secret. The key is stored in `$DSH_HOME/.credentials.yaml`, while settings retain only its credential reference.
16
16
 
17
- ## Add a catalog provider
17
+ ## Add a built-in provider
18
18
 
19
- Choose **Add provider**, select a provider such as Anthropic or OpenAI, enter its API key, and save. The installed catalog supplies the endpoint, protocol, and model list.
19
+ Choose **Add provider** and pick a provider dsh ships with; the list shows provider ids such as `anthropic`, `openai`, `moonshotai` for Kimi, or `zai` for GLM. Enter its API key and save. The installed catalog supplies the endpoint, protocol, and model list.
20
20
 
21
- Providers with native authentication need their native credentials instead. Bedrock, Vertex, Azure, and Codex use AWS credentials and a region, an ADC project, an `api-version`, and OAuth respectively; filling only the API-key field does not configure them.
21
+ Providers that sign in with OAuth, such as Codex, are not supported here yet.
22
22
 
23
23
  ## Add a custom provider
24
24
 
25
- Choose **Add a custom provider** for a company gateway, self-hosted server, or provider absent from the installed catalog. Supply a lowercase Provider ID, base URL, API protocol, credential, and at least one model.
25
+ Choose **Add a custom provider** for a company gateway, self-hosted server, or provider absent from the installed catalog. Supply a lowercase Provider ID, base URL, API protocol, credential, and at least one model. The **API protocol** must be the one your gateway speaks, and the form offers three: `openai-completions` for OpenAI Chat Completions, `openai-responses` for the OpenAI Responses API, and `anthropic-messages` for the Anthropic Messages API. A provider speaks one protocol, so a gateway that serves two needs two providers.
26
26
 
27
27
  ![The custom provider form: Provider ID, display name, base URL, API protocol, and API key](./providers-custom-form.png)
28
28
 
29
29
  The Provider ID is permanent because requests, saved sessions, model defaults, and credential references use it. To rename a provider, add a new provider and delete the old one. The display name, base URL, protocol, credential, and models remain editable.
30
30
 
31
- Under **Model catalog**, choose **Fetch available models** to query the base URL and credential currently shown in the form. Selecting candidates updates the draft; the provider is not stored until you save. Catalog providers use their installed catalog without a network request.
31
+ ### Discover models
32
+
33
+ Under **Model catalog**, choose **Fetch available models** to ask the endpoint which models it serves. The request uses the base URL, protocol, and key currently in the form, or a saved provider's stored key, and the reply opens a searchable picker: search, tick the models you want, and choose **Add selected**. Nothing is stored until you save or create the provider.
34
+
35
+ Discovery reads the listing formats common gateways publish, but not every endpoint answers in one of them, so treat it as a convenience rather than a guarantee: when it fails or lists nothing, add the model ids by hand and they work just the same. A built-in provider is always answered from the installed catalog, even when its base URL points at a gateway, so fetch through a custom provider to see what the gateway really serves.
36
+
37
+ ## Select a model
38
+
39
+ Configured providers appear in the model picker. Selecting a model also makes it the default for new sessions. A session that has already sent a request retains the model recorded in its own log.
40
+
41
+ If a saved default names a provider that was deleted, the composer displays **Select model** and blocks input until another model is selected.
42
+
43
+ ## Advanced configuration
44
+
45
+ The generated [plugin configuration catalog](../reference/config-catalog.md) lists every supported field and default for every plugin; [`dsh-llm-pi-ai`](../reference/config-catalog.md#deepseek-aidsh-llm-pi-ai) is the provider section this page configures. The [`dsh-llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm-pi-ai/README.md) and [`dsh-llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm-deepseek/README.md) references own direct `settings.yaml` configuration, catalog resolution, reasoning controls, credentials, and adapter errors.
46
+
47
+ ::: tip The form is deliberately small
48
+ The Models page exposes only what a route needs to exist: the API key, display name, base URL, API protocol, and for each model its id, display name, context window, and max output tokens. Every other field — reasoning effort levels, image input, request-compatibility switches, headers, timeouts, retry policy — is set in `$DSH_HOME/settings.yaml`, the same document the page writes. Edit it directly, or, when the browser runs on the same machine as the server, open it with **Open configuration file** in the Settings header; the adapters re-read it on the next request, so nothing needs a restart. The subsections below cover the fields most gateways need.
49
+ :::
32
50
 
33
51
  ### Image input
34
52
 
@@ -66,7 +84,7 @@ llm-pi-ai:
66
84
  - id: second-model
67
85
  ```
68
86
 
69
- `defaultInput` is a fallback, not an override, and defaults to `[text]`: on a catalog provider it answers only for models the catalog does not describe, so it never removes images from a catalog model that has them. Narrow one of those with that model's own `input`. A catalog provider has no `models` list to put it in, so write it under `modelOverrides`, keyed by model id:
87
+ `defaultInput` is a fallback, not an override, and defaults to `[text]`: on a built-in provider it answers only for models its catalog does not describe, so it never removes images from a catalog model that has them. Narrow one of those with that model's own `input`. A built-in provider has no `models` list to put it in, so write it under `modelOverrides`, keyed by model id:
70
88
 
71
89
  ```yaml
72
90
  llm-pi-ai:
@@ -81,6 +99,48 @@ Every list must name at least one modality except a model's own, where an empty
81
99
 
82
100
  Both fields state a claim about your endpoint rather than checking it. A model that declares images its endpoint does not serve is not caught here; the provider rejects the request instead.
83
101
 
102
+ ### Reasoning effort
103
+
104
+ The model picker offers an **Effort** menu for a model that declares reasoning levels. A built-in provider's models inherit their levels from the installed catalog. A model you enter by hand declares none, so the Effort entry does not appear in the menu and the endpoint's own default decides whether the model thinks. Declare the levels with `reasoningEfforts` in `$DSH_HOME/settings.yaml`:
105
+
106
+ ```yaml
107
+ llm-pi-ai:
108
+ providers:
109
+ my-gateway:
110
+ apiKeyEnv: GATEWAY_API_KEY
111
+ api: openai-completions
112
+ baseURL: https://gateway.example/v1
113
+ reasoning: high
114
+ models:
115
+ - id: my-reasoner
116
+ reasoningEfforts:
117
+ off:
118
+ high: high
119
+ max: max
120
+ ```
121
+
122
+ Each key is a level the menu offers, and its value is the spelling sent on the wire as `reasoning_effort`, so `max: xhigh` renames a level for a gateway with its own vocabulary. Only `off` may stay empty, because for most endpoints not thinking is the parameter's absence. The route's `reasoning` is the level used while a session has picked none; choosing an effort in the picker saves it, with the model, as the default for new sessions.
123
+
124
+ An `off` left empty sends nothing, which only stops a model that thinks on request; an `off` given a value sends that value as `reasoning_effort` instead. A model that thinks unless told not to — DeepSeek V4 behind an OpenAI-compatible gateway, for example — needs `compat.thinkingFormat: deepseek`, which makes `off` send `thinking: {type: disabled}` and every other level send `thinking: {type: enabled}` beside the effort:
125
+
126
+ ```yaml
127
+ models:
128
+ - id: deepseek-v4-pro
129
+ compat:
130
+ thinkingFormat: deepseek
131
+ reasoningEfforts:
132
+ off:
133
+ high: high
134
+ max: max
135
+ ```
136
+
137
+ A built-in provider's model whose gateway does not reason loses its levels with `reasoningEfforts: false` under `modelOverrides`; selecting an effort for it is then refused as `UNSUPPORTED_REASONING_EFFORT`. DeepSeek's own route needs none of this: its models already offer `off`, `low`, `high`, and `max`, and `llm-deepseek.reasoningEffort` sets the default the picker starts from:
138
+
139
+ ```yaml
140
+ llm-deepseek:
141
+ reasoningEffort: max
142
+ ```
143
+
84
144
  ### Request compatibility
85
145
 
86
146
  A gateway can hold a working key at a reachable address and still refuse every request. pi-ai decides the shape of a request — which role carries the system prompt, which field caps the output, how a thinking level travels — from the endpoint's URL, and an address it does not recognize is addressed as though it were OpenAI itself. Most OpenAI-compatible gateways refuse at least one thing OpenAI accepts.
@@ -117,23 +177,16 @@ Each switch belongs to the protocols that declare it, so a switch valid on one `
117
177
 
118
178
  Every switch, its accepted values, and the protocols that take it are listed under `PiAiCompatProfile` in the [generated `dsh-llm-pi-ai` configuration reference](../reference/config-catalog.md#deepseek-aidsh-llm-pi-ai) — which is derived from the source, so it cannot fall behind what the adapter accepts.
119
179
 
120
- ## Select a model
121
-
122
- Configured providers appear in the model picker. Selecting a model also makes it the default for new sessions. A session that has already sent a request retains the model recorded in its own log.
123
-
124
- If a saved default names a provider that was deleted, the composer displays **Select model** and blocks input until another model is selected.
125
-
126
180
  ## Troubleshooting
127
181
 
128
182
  - **`MISSING_CREDENTIAL`** — Store the provider key through the Models page or supply the referenced environment variable.
129
183
  - **`UNKNOWN_MODEL`** — Select a configured model or add the missing model to the custom provider.
130
184
  - **Fetching available models returns 401** — Check the key. Model discovery calls the OpenAI-compatible `GET /models` endpoint; enter models manually for endpoints that do not provide it.
185
+ - **Fetching available models reports neither a `data` array nor a `models` object** — The endpoint's listing is in a format discovery does not read. Enter the models by hand.
131
186
  - **The gateway refuses every request although the key and URL are right** — Its request shape differs from OpenAI's. Start with `compat.supportsDeveloperRole: false` and `compat.maxTokensField: max_tokens` on the route.
132
187
  - **Only reasoning models fail** — pi-ai sends their system prompt as the `developer` role, which the gateway rejects. Set `compat.supportsDeveloperRole: false`.
188
+ - **The Effort menu does not appear for a model you entered by hand** — It declares no levels. Add `reasoningEfforts` to the model in `settings.yaml`.
189
+ - **`off` does not stop a DeepSeek model from thinking** — An empty `off` sends no reasoning field at all, and an endpoint that thinks by default keeps thinking. Set `compat.thinkingFormat: deepseek` on the model or the route.
133
190
  - **A compat switch is refused as having no value** — A key written with nothing after the colon. Give it a value, or remove the key to keep the installed catalog's.
134
- - **An image is refused before sending** — The model declares no image modality. Give a custom provider's model `input: [text, image]`; DeepSeek's own chat-completions route is text-only and cannot be configured otherwise.
191
+ - **An image is refused before sending** — The model declares no image modality. Give a custom provider's model `input: [text, image]`; on DeepSeek's own route, select an image-capable entry from the configured catalog (`deepseek-flash` by default) and confirm that your gateway serves that model with image input.
135
192
  - **The provider rejects a request carrying an image** — The model declares images its endpoint does not actually serve. Remove `image` from whichever list granted it — the model's `input`, or the route's `defaultInput` — then start a new session: the attached image stays in the session log, so the same request repeats until the session moves off it.
136
-
137
- ## Advanced configuration
138
-
139
- The generated [plugin configuration catalog](../reference/config-catalog.md) lists every supported field and default for every plugin; [`dsh-llm-pi-ai`](../reference/config-catalog.md#deepseek-aidsh-llm-pi-ai) is the provider section this page configures. The [`dsh-llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm-pi-ai/README.md) and [`dsh-llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/blob/master/packages/llm/llm-deepseek/README.md) references own direct `settings.yaml` configuration, catalog resolution, reasoning controls, credentials, and adapter errors.
@@ -131,19 +131,35 @@ The first command initializes the shipped standalone profile. The second forward
131
131
 
132
132
  Another `profile` is valid when it includes `@deepseek-ai/dsh-sdk-app` or another JSON-RPC server row. Missing server rows, unresolved plugins, and invalid patches fail during startup instead of falling back to another composition.
133
133
 
134
+ <a id="opt-in-to-str_replace_editor"></a>
135
+ ### Opt in to `str_replace_editor`
136
+
137
+ The bundled runtime includes `str_replace_editor`, but `sdk-minimal` omits it from the default Cordis tree. To use it, save this configuration as `editor.patch.yml`; `insert` adds both the editor and the filesystem provider that the minimal profile lacks:
138
+
139
+ ```yaml
140
+ - insert:
141
+ - id: fs-local
142
+ name: '@deepseek-ai/dsh-fs-local'
143
+ config:
144
+ cwd: !!js process.cwd()
145
+ - id: tool-str-replace-editor
146
+ name: '@deepseek-ai/dsh-tool-str-replace-editor'
147
+ ```
148
+
149
+ Pass `patches=("/absolute/path/to/editor.patch.yml",)` when constructing `DeepSeekHarness(profile="sdk-minimal", ...)`, or put the patch in `$DSH_HOME/profiles/sdk-minimal/cordis.patch.yml` for persistent configuration. On the next runtime launch, model requests include `str_replace_editor` beside the persistent shell. The local filesystem provider uses the runtime working directory for relative paths; like the minimal shell, it does not confine access to that directory. For the standard `sdk` profile, insert only the editor row so it uses the existing filesystem provider and policies.
150
+
134
151
  ## Understand the minimal profile
135
152
 
136
153
  | Property | Value |
137
154
  |---|---|
138
155
  | System prompt | `DSH_SYSTEM_PROMPT`, falling back to `You are a helpful software engineer assistant.` |
139
156
  | Model in `minimal.py` | `--model`, then `DSH_MODEL`, then `deepseek-v4-flash` |
140
- | Model-facing tools | Persistent `bash` on Linux/macOS or `pwsh` on Windows, plus `str_replace_editor` |
157
+ | Model-facing tool | Persistent `bash` on Linux/macOS or `pwsh` on Windows |
141
158
  | Shell timeout | 300 seconds |
142
- | Editor output limit | 16,000 characters |
143
159
  | Runtime context and compaction | Absent |
144
160
  | Session persistence | Uncompressed JSONL under `<dsh_home>/sessions` |
145
161
 
146
- The profile's sole bundle inserts the complete tree over an empty root and does not include `dsh-base`; later base-profile tools therefore cannot appear implicitly. It contains the SDK protocol, one environment-configured DeepSeek adapter, local execution, and persistence, while settings, managed credentials, telemetry, Web tools, subagents, local instruction discovery, and compaction are absent. It pins `danger-full-access`, so the platform-selected persistent shell and editor can modify any path visible to the runtime; use a disposable checkout or container.
162
+ The profile's sole bundle inserts the complete tree over an empty root and does not include `dsh-base`; later base-profile tools therefore cannot appear implicitly. It contains the SDK protocol, one environment-configured DeepSeek adapter, local execution, and persistence, while filesystem tools, settings, managed credentials, telemetry, Web tools, subagents, local instruction discovery, and compaction are absent. It pins `danger-full-access`, so the platform-selected persistent shell can modify any path visible to the runtime; use a disposable checkout or container.
147
163
 
148
164
  The installed wheel still packages the full `web` profile and frontend assets. Run `dsh web` against an explicit `DSH_HOME` when a Python SDK deployment also needs the browser application; `web` is a separate CLI application and cannot serve a Python SDK client.
149
165
 
@@ -12,6 +12,8 @@ dsh web --patch apps/cli/config/examples/schedule/cordis.yml
12
12
 
13
13
  The current overlay supports reminders created with a positive whole-number `after_seconds`, an absolute `at` target, or a fixed-rate `every_seconds` interval of at least 300 seconds. The model manages them through `schedule_create`, `schedule_list`, and `schedule_delete`; every result identifies delivery as `session-local`.
14
14
 
15
+ With this overlay enabled, a successfully opened Session with active reminders shows a read-only catalog in the conversation header. It lists the complete prompt, scheduled or overdue status, one-time or exact repeating cadence, browser-local target time, and relative time. The sidebar also places a non-interactive alarm after the title of grouped, flat, and search rows when their currently available projection value is non-empty. These surfaces never create, edit, delete, or acknowledge reminders, and a cold Session's cached alarm can be briefly missing or stale.
16
+
15
17
  The browser attaches its IANA zone to each prompt. Time-context tells the model to interpret otherwise-unqualified dates and times in that request's browser zone. This assumption belongs to natural-language interpretation only: `schedule_create.at` must be either a strict RFC 3339 date-time with `Z` or a numeric offset, or `{ date, time, time_zone }` with an explicit `UTC` or IANA Area/Location zone. Schedule does not retain or infer a Session default zone. Daylight-saving gaps are rejected, overlaps choose the first instant, and successful records keep only the resulting UTC target.
16
18
 
17
19
  The original Session log owns each reminder. A live root Agent waits until it is fully idle, then queues a normal follow-up turn in that conversation. It never steers current work and adds no separate receipt or reminder card. Closing the process or leaving the Session cold stops its in-memory timer without deleting the record; reopening that same Session restores the wait and delivers an overdue reminder. Reading cold history never activates it, and a fork does not inherit its parent's reminders.
@@ -29,24 +29,33 @@ sequenceDiagram
29
29
  Note over Agent,Driver: claim pending next-step input plus one queued prompt
30
30
  Driver-->>SDK: <code>agent/inbox/spliced</code> pure deletion
31
31
  Driver-->>SDK: <code>agent/inbox/claimed</code> { message, turn } per message
32
+ Driver->>Prompt: <code>system-prompt/assemble</code> waterfall
32
33
  Driver->>Hooks: <code>agent/pre-step</code> waterfall
33
34
  Hooks-->>Driver: authoritative reject or enter(messages)
34
- alt proposed step rejected or pre-step failed
35
+ alt proposed step rejected, first batch empty, or pre-step failed
35
36
  Driver-->>Driver: claimed batch stays removed, the open turn spends no step
36
37
  else enter proposed step
37
38
  Driver->>Session: <code>step/start</code>
39
+ Driver->>Hooks: <code>agent/request</code> waterfall
40
+ Driver->>LLM: prepareCall(config, signal)
41
+ Note over Driver,LLM: cancellation during either async phase commits neither system nor users
42
+ Note over Driver,Session: synchronous admission using the prepared call capability
43
+ Driver->>Session: <code>system/message</code> ordered per-node reconciliation
38
44
  Driver->>Session: <code>user/message</code> per entered message
39
- Driver->>Prompt: <code>system-prompt/assemble</code> waterfall
40
- Driver->>LLM: <code>agent/request</code> waterfall, then <code>llm/stream</code> waterfall
45
+ Driver->>Session: <code>request/header</code> and <code>request/context</code> as needed
46
+ Driver->>Driver: derive and freeze request from the log
47
+ Driver->>LLM: bound prepared call through <code>llm/stream</code> waterfall
41
48
  LLM-->>Driver: StreamChunk*
42
- Driver->>Session: <code>assistant/chunk</code>*
43
- Session-->>SDK: <code>session/event</code> <code>assistant/chunk</code>*
49
+ Driver-->>SDK: <code>agent/assistant-stream</code> chunk*
44
50
  alt final adapter or terminal in-band request failure
45
- Driver->>Session: <code>step/end</code>
51
+ Driver->>Session: <code>assistant/attempt</code>
52
+ Driver-->>SDK: <code>agent/assistant-stream</code> committed end
46
53
  Driver->>Hooks: <code>agent/request-error</code> waterfall
47
54
  Hooks-->>Driver: return retry action or preserve the original error
55
+ Note over Driver,LLM: retry in the open step: prepare and reconcile the same rendered assembly without repeating pre-step or users
48
56
  else model request succeeded
49
57
  Driver->>Session: <code>assistant/message</code>
58
+ Driver-->>SDK: <code>agent/assistant-stream</code> committed end
50
59
  Driver->>Tools: classify pending call by executionMode
51
60
  loop barriers and bounded rolling pool, reclassify before start
52
61
  opt call starts
@@ -75,9 +84,9 @@ sequenceDiagram
75
84
  Driver-->>SDK: <code>agent/status</code> idle
76
85
  ```
77
86
 
78
- The `assistant/message` event records every successful provider call, including content-less and `max-tokens` finishes. Empty content stays out of derived history, while the durable event keeps usage and `sourceEventSeqs` listing the exact `assistant/chunk` events, including an explicit empty list.
87
+ The `assistant/message` event records every successful provider call, including content-less and `max-tokens` finishes, and embeds the exact compact timed stream. Empty content stays out of derived history. A failed, retried, cancelled, or stream-error attempt that reaches settlement without a surface message records its stream as `assistant/attempt`. Live `agent/assistant-stream` chunk frames are transient; replay reads either durable settlement, and a hard process loss before settlement leaves no durable attempt stream.
79
88
 
80
- `dsh-compaction-basic` uses `agent/pre-step` for pressure before request derivation and `agent/request-error` only for canonical context overflow. Once either trigger qualifies, optional tool-result pruning runs before summary selection. Recovery works between the closed failed step and failed turn close, and opens a fresh retry turn only when pruning or summarization advances the surface replacement generation; otherwise the original request error remains authoritative.
89
+ `dsh-compaction-basic` uses `agent/pre-step` for pressure before request derivation and `agent/request-error` only for canonical context overflow. Once either trigger qualifies, optional tool-result pruning runs before summary selection. Recovery runs within the open step and retries only when pruning or summarization advances the surface replacement generation; otherwise the original request error remains authoritative. Each retry prepares its call and reconciles the retained rendered assembly before request derivation, without repeating assembly, pre-step, or user admission.
81
90
 
82
91
  The returned `agent/pre-step` decision is authoritative; listeners wrapping `next()` preserve downstream messages and `startsRequestSeries` unless replacement is intentional. Steering and injected context pass through the same waterfall after a later claim operation takes their next-step batch.
83
92
 
@@ -126,13 +126,13 @@ The Connection performs the unified trust check for `/api` before the HTTP bridg
126
126
 
127
127
  For every call, the Gateway resolves the descriptor and live service from the current registries instead of caching business objects. It requires the fields in `args` to match the descriptor exactly, validates wire values with codecs, resolves objects or receivers through registered lookup or Context providers, invokes the service method targeted by the binding, and validates the return value. A missing provider, unknown identity, binding mismatch, missing or extra argument, schema failure, or missing method fails before entering or after leaving business code.
128
128
 
129
- The lookup provider's `register()` supplies both the stable declaration and the default resolver; `configure()` supplies a resolver owned by Host composition that may execute asynchronously and is scoped to an effect lifetime. Configuration may precede provider mounting; without a provider, invocation still fails with `lookup-unavailable`, and unloading the configuration restores the provider's default policy. The Session Controller owns the standard `agentFor()` semantics for `agent` and `session`: it reuses a live Agent, automatically resumes ordinary cold sessions, deduplicates concurrent resumes, and rejects identities owned by subagent routing; the `session` lookup returns that Agent's Session. Resume failures and ownership fences pass through unchanged as existing RPC errors rather than being collapsed into the Gateway's `internal` error.
129
+ The lookup provider's `register()` supplies both the stable declaration and the default resolver; `configure()` supplies a resolver owned by Host composition that may execute asynchronously and is scoped to an effect lifetime. Configuration may precede provider mounting; without a provider, invocation still fails with `gateway/lookup-unavailable`, and unloading the configuration restores the provider's default policy. The Session Controller owns the standard resolver semantics for `agent` and `session`: it reuses a live Agent, automatically resumes ordinary cold sessions, deduplicates concurrent resumes, and rejects identities owned by subagent routing; the `session` lookup returns that Agent's Session. A resume failure and an ownership fence raise a `RemoteError` carrying their own code, `session/not-found` or `session/agent-busy`, which the Gateway encodes onto the wire unchanged; only an unclassified throw folds into `gateway/internal`.
130
130
 
131
131
  Unloading a Client contribution removes its descriptors and concrete methods together, aborts its in-flight calls, and makes stale method handles retained by external code reject further calls. A strict endpoint withdrawn on the Host also does not degrade to SRC inference, preventing a hot unload from silently weakening validation.
132
132
 
133
133
  ## SRC development fallback
134
134
 
135
- When the Host starts from source through `node --import tsx/esm`, it does not execute the Typert compiler plugin. Standard decorator initializers still record the method name and invocation mode in a module-private `WeakMap`, while `TypertRemoteService` or `bindTypertRemote()` supplies the explicit service binding; the Gateway can therefore construct a weaker temporary descriptor without starting a `ts.Program`.
135
+ When the Host starts from source through `node --import tsx/esm`, it does not execute the Typert compiler plugin. Standard decorator initializers still record the method name and invocation mode in a versioned descriptor on the Service prototype, while `TypertRemoteService` or `bindTypertRemote()` supplies the explicit service binding; the Gateway can therefore construct a weaker temporary descriptor without starting a `ts.Program`. The descriptor's stable string property name lets `remoteMethods()` read markers written by another installed copy of the protocol package.
136
136
 
137
137
  The SRC fallback parses simple parameter names from the live function. When a parameter name matches the `parameter` of a registered lookup, such as `agent` or `session`, it uses the lookup's `agentId` or `sessionId` wire field and resolves the object on the Host; other parameters are checked only for cycle-free, JSON-safe data with no special prototype. `@RemoteScope` directly uses the wire field of a registered Host Context provider. SRC does not read TypeScript types, generate Zod schemas, infer optional parameters, or support destructuring, default values, rest parameters, or duplicate parameter names.
138
138
 
@@ -18,6 +18,8 @@ flowchart LR
18
18
  pkg_tool_fs["tool-fs"]
19
19
  pkg_llm_pi_ai["llm-pi-ai"]
20
20
  pkg_llm_deepseek["llm-deepseek"]
21
+ pkg_client_file_upload["client-file-upload"]
22
+ svc_fileUploads["ctx.fileUploads<br/>Agent-scoped staged file uploads"]
21
23
  pkg_llm["llm"]
22
24
  svc_llm["ctx.llm<br/>LLM adapter registry"]
23
25
  pkg_llm_replay["llm-replay"]
@@ -46,6 +48,8 @@ flowchart LR
46
48
  pkg_api_settings_controller["api-settings-controller"]
47
49
  svc_credentialsController["ctx.credentialsController<br/>Host credential-surface Remote controller"]
48
50
  svc_settingsController["ctx.settingsController<br/>Host settings-surface Remote controller"]
51
+ pkg_api_workspace_files["api-workspace-files"]
52
+ svc_workspaceFiles["ctx.workspaceFiles<br/>Host workspace file Remote service"]
49
53
  pkg_api_workspace_controller["api-workspace-controller"]
50
54
  svc_workspaceController["ctx.workspaceController<br/>Host Workspace Remote controller"]
51
55
  svc_directoryPickerController["ctx.directoryPickerController<br/>Host directory-picking Remote controller"]
@@ -58,7 +62,6 @@ flowchart LR
58
62
  svc_typertGateway["ctx.typertGateway<br/>Typert Host invocation gateway"]
59
63
  svc_sessionPersistence["ctx.sessionPersistence<br/>Durable session persistence seam"]
60
64
  pkg_session_persistence_jsonl["session-persistence-jsonl"]
61
- pkg_session_persistence_sqlite["session-persistence-sqlite"]
62
65
  pkg_tool_bash["tool-bash"]
63
66
  pkg_hooks_claude_code["hooks-claude-code"]
64
67
  pkg_hooks_codex["hooks-codex"]
@@ -83,6 +86,8 @@ flowchart LR
83
86
  svc_storageDomain["ctx.storageDomain<br/>Domain data facility"]
84
87
  pkg_workspace["workspace"]
85
88
  svc_messageFeedback["ctx.messageFeedback<br/>Lifecycle-bound message feedback"]
89
+ pkg_command_feedback["command-feedback"]
90
+ svc_sessionFeedback["ctx.sessionFeedback<br/>Session-level feedback recorder"]
86
91
  svc_workspaceRegistry["ctx.workspaceRegistry<br/>Workspace entity registry"]
87
92
  svc_sessionQuery["ctx.sessionQuery<br/>Session reads, traces, filters, and search"]
88
93
  pkg_session_reference["session-reference"]
@@ -128,7 +133,8 @@ flowchart LR
128
133
  svc_agentDefaultModel["ctx.agentDefaultModel<br/>Default Agent model selection"]
129
134
  pkg_headless["headless"]
130
135
  svc_agentLoop["ctx.agentLoop<br/>Concrete loop driver"]
131
- pkg_agent_spine_demo["agent-spine-demo"]
136
+ pkg_base["base"]
137
+ pkg_sdk_minimal["sdk-minimal"]
132
138
  pkg_goal["goal"]
133
139
  svc_goals["ctx.goals<br/>Same-session goal domain"]
134
140
  pkg_e2b["e2b"]
@@ -166,6 +172,7 @@ flowchart LR
166
172
  pkg_code_runtime["code-runtime"]
167
173
  svc_codeRuntime["ctx.codeRuntime<br/>Code-execution seam"]
168
174
  pkg_code_runtime_worker_thread["code-runtime-worker-thread"]
175
+ pkg_experimental_code_runtime_python["experimental-code-runtime-python"]
169
176
  pkg_fs["fs"]
170
177
  svc_fs["ctx.fs<br/>Filesystem provider seam"]
171
178
  pkg_fs_local["fs-local"]
@@ -233,14 +240,17 @@ flowchart LR
233
240
  pkg_api_settings_controller --> svc_settingsController
234
241
  pkg_api_workspace_controller --> svc_directoryPickerController
235
242
  pkg_api_workspace_controller --> svc_workspaceController
243
+ pkg_api_workspace_files --> svc_workspaceFiles
236
244
  pkg_attachment --> svc_attachments
237
245
  pkg_attachment_local --> svc_attachments
238
246
  pkg_authorization --> svc_authorization
239
247
  pkg_bash_local --> svc_shell
240
248
  pkg_bash_sandbox --> svc_shell
249
+ pkg_client_file_upload --> svc_fileUploads
241
250
  pkg_client_modules --> svc_clientModules
242
251
  pkg_code_runtime --> svc_codeRuntime
243
252
  pkg_code_runtime_worker_thread --> svc_codeRuntime
253
+ pkg_command_feedback --> svc_sessionFeedback
244
254
  pkg_commands --> svc_commands
245
255
  pkg_compaction --> svc_compaction
246
256
  pkg_compaction_basic --> svc_compaction
@@ -252,6 +262,7 @@ flowchart LR
252
262
  pkg_deepseek_llm_api_extensions --> svc_deepseekLlmApiExtensions
253
263
  pkg_e2b --> svc_e2b
254
264
  pkg_experimental_agent_team --> svc_agentTeams
265
+ pkg_experimental_code_runtime_python --> svc_codeRuntime
255
266
  pkg_file_reference --> svc_fileReferences
256
267
  pkg_file_reference_local --> svc_fileReferences
257
268
  pkg_fs --> svc_fs
@@ -285,7 +296,6 @@ flowchart LR
285
296
  pkg_session_log_deepseek --> svc_deepseekLlmApiExtensions
286
297
  pkg_session_persistence --> svc_sessionPersistence
287
298
  pkg_session_persistence_jsonl --> svc_sessionPersistence
288
- pkg_session_persistence_sqlite --> svc_sessionPersistence
289
299
  pkg_session_projection --> svc_sessionProjections
290
300
  pkg_session_projection_cache --> svc_sessionProjectionCache
291
301
  pkg_session_query --> svc_sessionQuery
@@ -339,7 +349,8 @@ flowchart LR
339
349
  pkg_workspace --> svc_workspaceRegistry
340
350
  svc_agentDefaultModel --> pkg_api_session_controller
341
351
  svc_agentDefaultModel --> pkg_headless
342
- svc_agentLoop --> pkg_agent_spine_demo
352
+ svc_agentLoop --> pkg_base
353
+ svc_agentLoop --> pkg_sdk_minimal
343
354
  svc_agentTeams --> pkg_experimental_client_ui_agent_team
344
355
  svc_agentTeams --> pkg_experimental_tool_agent_team
345
356
  svc_agents --> pkg_acp
@@ -366,6 +377,7 @@ flowchart LR
366
377
  svc_e2b --> pkg_fs_e2b
367
378
  svc_e2b --> pkg_subprocess_e2b
368
379
  svc_fileReferences --> pkg_api_session_controller
380
+ svc_fileUploads --> pkg_api_session_controller
369
381
  svc_fs --> pkg_tool_fs
370
382
  svc_invariants --> pkg_agent
371
383
  svc_invariants --> pkg_agent_loop
@@ -419,7 +431,6 @@ flowchart LR
419
431
  svc_skills --> pkg_tool_skill
420
432
  svc_spillStore --> pkg_spill_policy
421
433
  svc_storage --> pkg_storage_domain
422
- svc_storageDomain --> pkg_message_feedback
423
434
  svc_storageDomain --> pkg_workspace
424
435
  svc_subagentModelSelection --> pkg_tool_subagent
425
436
  svc_subagents --> pkg_tool_ralph
@@ -468,6 +479,7 @@ flowchart LR
468
479
  | ctx key | Role | Owner | Implementations | Direct consumers | Companion plugins | Note |
469
480
  | --- | --- | --- | --- | --- | --- | --- |
470
481
  | `ctx.attachments` | `seam` | [`attachment`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/attachment/attachment) | [`attachment-local`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/attachment/attachment-local) | [`api-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller), [`tool-fs`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/tool-fs), [`llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-pi-ai), [`llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-deepseek) | - | The host commits accepted images before session events; provider adapters resolve authorized durable references into provider-native content. |
482
+ | `ctx.fileUploads` | `core` | [`client-file-upload`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/client/file-upload) | - | [`api-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) | - | Owns streaming intake, durable storage, and staged receipt lifetime; the Session controller binds receipts to accepted submissions. |
471
483
  | `ctx.llm` | `seam` | [`llm`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm) | [`llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-deepseek), [`llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-pi-ai), [`llm-replay`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/test-support/llm-replay) | [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop), [`compaction-basic`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/compaction/compaction-basic) | - | Adapters register provider implementations; the loop and compaction call the provider-neutral stream service. |
472
484
  | `ctx.deepseekLlmApiExtensions` | `seam` | [`deepseek-llm-api-extensions`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/deepseek-llm-api-extensions) | [`session-log-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-log-deepseek), [`plugin-package-inventory-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/plugin-package-inventory-deepseek) | [`llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-deepseek) | - | Plugins prepare independent top-level fields; the official adapter merges them and commits their delivery state after HTTP acceptance. |
473
485
  | `ctx.tokenMeter` | `core` | [`token-meter`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/token-meter) | - | [`compaction-basic`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/compaction/compaction-basic) | - | Owns isolated per-session replay folds; pressure consumers share immutable revisioned measurements. |
@@ -478,20 +490,22 @@ flowchart LR
478
490
  | `ctx.sessionSkillCatalog` | `core` | [`api-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) | - | - | - | Lists the Session composition's user-invocable skills without activating a cold Agent. |
479
491
  | `ctx.credentialsController` | `core` | [`api-settings-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/settings-controller) | - | - | - | Projects the credential-reference seam onto the generated Remote namespace: batch fan-out, view projection, and refusal mapping live here, not on the seam Definition. |
480
492
  | `ctx.settingsController` | `core` | [`api-settings-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/settings-controller) | - | - | - | Projects the user-settings seam onto the generated Remote namespace: the read is always redacted and every refusal is classified here, not on the seam Definition. |
493
+ | `ctx.workspaceFiles` | `core` | [`api-workspace-files`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-files) | - | - | - | Serves stat, paged text, byte windows, directory listings, and the change feed for files inside a Session's workspace root, confined by lstat, containment, and a stat re-check. |
481
494
  | `ctx.workspaceController` | `core` | [`api-workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-controller) | - | - | - | Owns Workspace commands and reconnect-safe Workspace state delivery through the generated Remote namespace. |
482
495
  | `ctx.directoryPickerController` | `core` | [`api-workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-controller) | - | - | - | Carries the picking seam onto the wire: capability gating, cancellation, and the seam-coded failures a browser directory flow discriminates on. |
483
496
  | `ctx.invariants` | `core` | [`invariants`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/runtime-diagnostics/invariants) | - | [`session`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/session), [`agent`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent), [`scope`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/scope), [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop) | - | Companion subpaths register owner-local checks; the service owns selection, uniqueness, child fibers, and package-attributed failures. |
484
497
  | `ctx.typert` | `core` | [`typert-registry`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/typert/registry) | - | [`typert-loader`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/typert/loader), [`api-gateway`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/gateway) | - | Plugins register live zod contributions directly or through dsh-typert-loader; the API gateway consumes invocation descriptors and providers, while other runtime consumers query schemas and reflection metadata at their own edges. |
485
498
  | `ctx.typertGateway` | `core` | [`api-gateway`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/gateway) | - | - | - | Associates generated Remote descriptors with live Cordis services, resolves registered identities, and exposes unary calls through the shared Connection RPC carrier. |
486
- | `ctx.sessionPersistence` | `seam` | [`session-persistence`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence) | [`session-persistence-jsonl`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-jsonl), [`session-persistence-sqlite`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-sqlite) | [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop), [`tool-bash`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/shell/tool-bash), [`hooks-claude-code`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/hooks/hooks-claude-code), [`hooks-codex`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/hooks/hooks-codex), [`session-query`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/session-query), [`session-query-sqlite`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/session-query-sqlite), [`message-feedback`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/feedback/message-feedback) | - | Backends persist the same SessionEvent vocabulary; apps choose a backend at composition time. |
499
+ | `ctx.sessionPersistence` | `seam` | [`session-persistence`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence) | [`session-persistence-jsonl`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-persistence-jsonl) | [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop), [`tool-bash`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/shell/tool-bash), [`hooks-claude-code`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/hooks/hooks-claude-code), [`hooks-codex`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/hooks/hooks-codex), [`session-query`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/session-query), [`session-query-sqlite`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/session-query-sqlite), [`message-feedback`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/feedback/message-feedback) | - | The JSONL backend persists the SessionEvent vocabulary as one artifact per Session. |
487
500
  | `ctx.settings` | `seam` | [`settings`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/settings/settings) | [`settings-file`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/settings/settings-file) | [`api-settings-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/settings-controller), [`llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-deepseek), [`llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-pi-ai) | - | Plugins register namespace schemas and resolve layered values; providers store the raw document. The LLM adapters register their entry config as the composition base under the user section; the settings controller serves redacted layered descriptors and writes the user layer. |
488
501
  | `ctx.subagentModelSelection` | `core` | [`tool-subagent`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent) | - | [`tool-subagent`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent) | - | Owns the default-off settings namespace that Agent-scoped delegation tools sample when composing a new top-level Session. |
489
502
  | `ctx.credentials` | `seam` | [`credentials`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/credentials/credentials) | [`credentials-local`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/credentials/credentials-local) | [`api-settings-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/settings-controller), [`llm-deepseek`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-deepseek), [`llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-pi-ai) | - | Configuration carries references to secrets; providers own the values. Consumers resolve per operation, so a rotated credential reaches the very next request; the settings controller exposes value-free views and write-only storage. |
490
503
  | `ctx.authorization` | `seam` | [`authorization`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/credentials/authorization) | - | [`llm-pi-ai`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/llm/llm-pi-ai) | - | Flows are registered by the plugin that knows how to obtain one credential and keyed by the record they write; the seam owns the conversation and the one-attempt-per-key lifecycle, never the protocol. |
491
504
  | `ctx.sessionTelemetry` | `seam` | [`session-telemetry`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-telemetry) | [`session-telemetry-otel`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session/session-telemetry-otel) | - | - | The seam captures, redacts, and hands session records to one backend; nothing else consumes the service — its output leaves the process. |
492
505
  | `ctx.storage` | `seam` | [`storage`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/storage/storage) | [`storage-json`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/storage/storage-json), [`storage-sqlite`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/storage/storage-sqlite) | [`storage-domain`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/storage/storage-domain) | - | Backends register side by side under names; data forms (domain first) mount on the hub and translate typed operations into opaque KV-unit primitives. |
493
- | `ctx.storageDomain` | `core` | [`storage-domain`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/storage/storage-domain) | - | [`workspace`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workspace/workspace), [`message-feedback`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/feedback/message-feedback) | - | Waits for every configured backend, then publishes the domain form as one lifecycle-bound service for typed durable state. |
494
- | `ctx.messageFeedback` | `core` | [`message-feedback`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/feedback/message-feedback) | - | - | - | Owns local per-assistant-message feedback, lifecycle and target validation, per-item compare-and-set, and the Host unary Remote contract without entering Session history or telemetry. |
506
+ | `ctx.storageDomain` | `core` | [`storage-domain`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/storage/storage-domain) | - | [`workspace`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workspace/workspace) | - | Waits for every configured backend, then publishes the domain form as one lifecycle-bound service for typed durable state. |
507
+ | `ctx.messageFeedback` | `core` | [`message-feedback`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/feedback/message-feedback) | - | - | - | Owns per-assistant-message feedback in the canonical Session log, target validation, per-item compare-and-set, and the Host unary Remote contract. Feedback stays outside model history; log export follows the consumer policy. |
508
+ | `ctx.sessionFeedback` | `core` | [`command-feedback`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/feedback/command-feedback) | - | - | - | Records one Session-level remark with its category as a log-only feedback/record event on a live Session through the Host unary Remote contract; the /feedback command shares the same producer. |
495
509
  | `ctx.workspaceRegistry` | `core` | [`workspace`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workspace/workspace) | - | [`api-workspace-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/workspace-controller), [`api-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) | - | Owns WorkspaceId-branded records over the domain facility; stable sessionIds accounts drive Host RPC and GUI projections. |
496
510
  | `ctx.sessionQuery` | `seam` | [`session-query`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/session-query) | [`session-query-sqlite`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/session-query-sqlite) | [`session-reference`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/context/session-reference), [`tool-session-query`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/session-query/tool-session-query) | - | The interface supplies exact reads, filters, and traces; its concrete backend adds full-text reconciliation, ranking, snippets, and cursor generations, while the model consumer owns workspace authority and cursor-free rendering. |
497
511
  | `ctx.fileReferences` | `seam` | [`file-reference`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/context/file-reference) | [`file-reference-local`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/context/file-reference-local) | [`api-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller) | - | The interface returns path-only completion candidates within an Agent cwd; providers own namespace access and ranking without reading file contents. |
@@ -508,7 +522,7 @@ flowchart LR
508
522
  | `ctx.skills` | `seam` | [`skill`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/skill/skill) | [`skill-badge`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/skill/skill-badge), [`skill-filesystem`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/skill/skill-filesystem) | [`tool-skill`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/skill/tool-skill) | - | Merges provider skill catalogs; tool-skill renders the session-prefix catalog and loads complete skill bodies. |
509
523
  | `ctx.agents` | `core` | [`agent`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent) | - | [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop), [`acp`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/acp/acp), [`subagent-in-process-driver`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-in-process-driver) | - | Owns live Agent handles, the create/resume factory seam, and process-local initiator propagation. |
510
524
  | `ctx.agentDefaultModel` | `core` | [`agent-default-model`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-default-model) | - | [`api-session-controller`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/api/session-controller), [`headless`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/bundle/headless) | - | Layers the default ModelSelection through settings so direct and Host-backed Agent entry points share one state owner. |
511
- | `ctx.agentLoop` | `bundle` | [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop) | - | [`agent-spine-demo`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/examples/agent-spine-demo) | - | The one concrete loop plugin; extension packages depend on dsh-agent events and services, not on this package. |
525
+ | `ctx.agentLoop` | `bundle` | [`agent-loop`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/agent-loop) | - | [`base`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/bundle/base), [`sdk-minimal`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/bundle/sdk-minimal) | - | The one concrete loop plugin; extension packages depend on dsh-agent events and services, not on this package. |
512
526
  | `ctx.goals` | `core` | [`goal`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/goal/goal) | - | - | - | Folds revisioned objective state from the session log and keeps live continuation activation process-local. |
513
527
  | `ctx.e2b` | `core` | [`e2b`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/e2b/e2b) | - | [`fs-e2b`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/e2b/fs-e2b), [`subprocess-e2b`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/e2b/subprocess-e2b) | - | Owns one shared E2B SDK handle, remote working directory, and final sandbox disposition so both fundamental E2B providers inhabit the same Linux runtime. |
514
528
  | `ctx.subprocess` | `seam` | [`subprocess`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subprocess/subprocess) | [`subprocess-local`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subprocess/subprocess-local), [`subprocess-e2b`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/e2b/subprocess-e2b) | [`bash-local`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/shell/bash-local), [`bash-sandbox`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/shell/bash-sandbox), [`terminal-bash`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/terminal/terminal-bash), [`lsp-stdio`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/lsp/lsp-stdio), [`subagent-acp`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-acp), [`subagent-codex`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-codex), [`subagent-claude-code`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-claude-code) | - | The bash executors, the PTY shell backend, the LSP host, and the out-of-process ACP, Codex, and Claude Code subagent backends spawn through ctx.subprocess; the service owns process coordinates, tree/session lifetime, stdio dispositions, terminal mechanics, and kill escalation. |
@@ -519,7 +533,7 @@ flowchart LR
519
533
  | `ctx.sandboxPolicy` | `core` | [`sandbox-policy`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/sandbox/sandbox-policy) | - | [`bash-sandbox`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/shell/bash-sandbox), [`fs-sandbox`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/fs-sandbox), [`terminal-bash`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/terminal/terminal-bash) | - | The one home for the deployment default mode + workspace root; only the sandboxed executor and provider read the service (the tool layers use the pure `sandbox/mode` fold it also exports). Both enforcing families read it so bash and fs cannot confine to different roots. |
520
534
  | `ctx.approval` | `seam` | [`user-approval`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/user-approval) | - | [`tools`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/tools), [`tool-bash`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/shell/tool-bash), [`acp`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/acp/acp) | - | One-shot permission decisions dispatched over the `approval/request` waterfall; answerers are listeners (the ACP bridge for its own agents), absence fails closed to `unavailable`. |
521
535
  | `ctx.permissionPresets` | `core` | [`permission-presets`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/interaction/permission-presets) | - | - | - | User-facing preset table (`workspace-write`/`danger-full-access`) bundling the sandbox-mode and approval-policy knobs; a switch writes one `permission/preset` event through to both knob events. |
522
- | `ctx.codeRuntime` | `seam` | [`code-runtime`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/code-runtime/code-runtime) | [`code-runtime-worker-thread`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/code-runtime/code-runtime-worker-thread) | [`tools`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/tools) | - | Runs one model-written program against host-provided async bindings; backends differ by substrate and language (the tool registry consumes it for PTC mode). |
536
+ | `ctx.codeRuntime` | `seam` | [`code-runtime`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/code-runtime/code-runtime) | [`code-runtime-worker-thread`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/code-runtime/code-runtime-worker-thread), [`experimental-code-runtime-python`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/experimental/code-runtime-python) | [`tools`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/core/tools) | - | Runs one model-written program against host-provided async bindings; backends differ by substrate and language (the tool registry consumes it for PTC mode). |
523
537
  | `ctx.fs` | `seam` | [`fs`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/fs) | [`fs-local`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/fs-local), [`fs-sandbox`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/fs-sandbox), [`fs-e2b`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/e2b/fs-e2b) | [`tool-fs`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/tool-fs) | [`fs-observation-policy`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/fs/fs-observation-policy) | tool-fs executes read/write/edit through ctx.fs; fs-sandbox fences mutations by the shared sandbox mode; fs-observation-policy contributes observed-state checks through the fs/* event gate. |
524
538
  | `ctx.compaction` | `seam` | [`compaction`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/compaction/compaction) | [`compaction-basic`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/compaction/compaction-basic) | [`compaction-basic`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/compaction/compaction-basic) | - | The basic backend consumes post-step pressure and request-error recovery events; there is no model-facing compact tool. |
525
539
  | `ctx.subagents` | `seam` | [`subagent`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent) | [`subagent-spawn-in-process`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-spawn-in-process), [`subagent-fork-in-process`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-fork-in-process), [`subagent-acp`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-acp), [`subagent-codex`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-codex), [`subagent-claude-code`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-claude-code), [`subagent-dsh-sdk`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/subagent-dsh-sdk) | [`tool-subagent`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent), [`tool-subagent-control`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/subagent/tool-subagent-control), [`tool-ralph`](https://github.com/deepseek-ai/deepseek-harness/tree/master/packages/workflow/tool-ralph) | - | Providers implement transports; the service also owns optional Activation-based continuation orchestration, tool-subagent selects one-shot or continuable delegation, tool-subagent-control delivers follow-ups, and tool-ralph requires one fresh structured-output route. |