@atomic-chat/core 0.20.6 → 0.21.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 (226) hide show
  1. package/dist/audio/jobs.js +4 -0
  2. package/dist/audio/jobs.js.map +1 -1
  3. package/dist/audio/service.d.ts +1 -1
  4. package/dist/audio/service.js +3 -1
  5. package/dist/audio/service.js.map +1 -1
  6. package/dist/audio/session.js +28 -16
  7. package/dist/audio/session.js.map +1 -1
  8. package/dist/audio/state.d.ts +3 -1
  9. package/dist/audio/state.js +3 -1
  10. package/dist/audio/state.js.map +1 -1
  11. package/dist/cli/launch.d.ts +23 -3
  12. package/dist/cli/launch.js +59 -8
  13. package/dist/cli/launch.js.map +1 -1
  14. package/dist/cli/main.d.ts +1 -1
  15. package/dist/contracts/events.d.ts +8 -0
  16. package/dist/contracts/settings.d.ts +5 -0
  17. package/dist/contracts/settings.js.map +1 -1
  18. package/dist/core/atomic-core.d.ts +3 -1
  19. package/dist/core/atomic-core.js +4 -1
  20. package/dist/core/atomic-core.js.map +1 -1
  21. package/dist/core/create.js +4 -1
  22. package/dist/core/create.js.map +1 -1
  23. package/dist/core/sessions.js +1 -0
  24. package/dist/core/sessions.js.map +1 -1
  25. package/dist/integrations/catalog.d.ts +25 -8
  26. package/dist/integrations/catalog.js +105 -38
  27. package/dist/integrations/catalog.js.map +1 -1
  28. package/dist/integrations/configure/atomic-agent.d.ts +9 -1
  29. package/dist/integrations/configure/atomic-agent.js +42 -3
  30. package/dist/integrations/configure/atomic-agent.js.map +1 -1
  31. package/dist/integrations/configure/backup.d.ts +21 -0
  32. package/dist/integrations/configure/backup.js +52 -0
  33. package/dist/integrations/configure/backup.js.map +1 -0
  34. package/dist/integrations/configure/claude-code.d.ts +11 -4
  35. package/dist/integrations/configure/claude-code.js +73 -24
  36. package/dist/integrations/configure/claude-code.js.map +1 -1
  37. package/dist/integrations/configure/cline.d.ts +14 -4
  38. package/dist/integrations/configure/cline.js +78 -6
  39. package/dist/integrations/configure/cline.js.map +1 -1
  40. package/dist/integrations/configure/codex.d.ts +5 -3
  41. package/dist/integrations/configure/codex.js +12 -5
  42. package/dist/integrations/configure/codex.js.map +1 -1
  43. package/dist/integrations/configure/copilot.d.ts +28 -5
  44. package/dist/integrations/configure/copilot.js +124 -8
  45. package/dist/integrations/configure/copilot.js.map +1 -1
  46. package/dist/integrations/configure/droid.d.ts +13 -7
  47. package/dist/integrations/configure/droid.js +48 -17
  48. package/dist/integrations/configure/droid.js.map +1 -1
  49. package/dist/integrations/configure/dsh.d.ts +36 -20
  50. package/dist/integrations/configure/dsh.js +250 -48
  51. package/dist/integrations/configure/dsh.js.map +1 -1
  52. package/dist/integrations/configure/goose.d.ts +21 -7
  53. package/dist/integrations/configure/goose.js +141 -10
  54. package/dist/integrations/configure/goose.js.map +1 -1
  55. package/dist/integrations/configure/hermes.d.ts +63 -10
  56. package/dist/integrations/configure/hermes.js +360 -75
  57. package/dist/integrations/configure/hermes.js.map +1 -1
  58. package/dist/integrations/configure/json-backup.d.ts +73 -0
  59. package/dist/integrations/configure/json-backup.js +292 -0
  60. package/dist/integrations/configure/json-backup.js.map +1 -0
  61. package/dist/integrations/configure/json-key-backup.d.ts +43 -0
  62. package/dist/integrations/configure/json-key-backup.js +113 -0
  63. package/dist/integrations/configure/json-key-backup.js.map +1 -0
  64. package/dist/integrations/configure/kilo.d.ts +4 -4
  65. package/dist/integrations/configure/kilo.js +6 -9
  66. package/dist/integrations/configure/kilo.js.map +1 -1
  67. package/dist/integrations/configure/legacy-env-block.d.ts +18 -0
  68. package/dist/integrations/configure/legacy-env-block.js +47 -0
  69. package/dist/integrations/configure/legacy-env-block.js.map +1 -0
  70. package/dist/integrations/configure/mimo.d.ts +3 -2
  71. package/dist/integrations/configure/mimo.js +8 -9
  72. package/dist/integrations/configure/mimo.js.map +1 -1
  73. package/dist/integrations/configure/muse.d.ts +3 -3
  74. package/dist/integrations/configure/muse.js +5 -6
  75. package/dist/integrations/configure/muse.js.map +1 -1
  76. package/dist/integrations/configure/openclaude.d.ts +22 -7
  77. package/dist/integrations/configure/openclaude.js +132 -39
  78. package/dist/integrations/configure/openclaude.js.map +1 -1
  79. package/dist/integrations/configure/openclaw.d.ts +19 -5
  80. package/dist/integrations/configure/openclaw.js +79 -23
  81. package/dist/integrations/configure/openclaw.js.map +1 -1
  82. package/dist/integrations/configure/opencode-style.d.ts +53 -11
  83. package/dist/integrations/configure/opencode-style.js +218 -23
  84. package/dist/integrations/configure/opencode-style.js.map +1 -1
  85. package/dist/integrations/configure/opencode.d.ts +5 -4
  86. package/dist/integrations/configure/opencode.js +8 -10
  87. package/dist/integrations/configure/opencode.js.map +1 -1
  88. package/dist/integrations/configure/openhands.d.ts +5 -4
  89. package/dist/integrations/configure/openhands.js +7 -7
  90. package/dist/integrations/configure/openhands.js.map +1 -1
  91. package/dist/integrations/configure/pi.d.ts +6 -5
  92. package/dist/integrations/configure/pi.js +79 -30
  93. package/dist/integrations/configure/pi.js.map +1 -1
  94. package/dist/integrations/configure/poolside.d.ts +5 -4
  95. package/dist/integrations/configure/poolside.js +7 -7
  96. package/dist/integrations/configure/poolside.js.map +1 -1
  97. package/dist/integrations/configure/registry.d.ts +6 -0
  98. package/dist/integrations/configure/registry.js +1 -0
  99. package/dist/integrations/configure/registry.js.map +1 -1
  100. package/dist/integrations/configure/zcode.d.ts +6 -7
  101. package/dist/integrations/configure/zcode.js +26 -11
  102. package/dist/integrations/configure/zcode.js.map +1 -1
  103. package/dist/integrations/configure/zed.d.ts +16 -4
  104. package/dist/integrations/configure/zed.js +61 -13
  105. package/dist/integrations/configure/zed.js.map +1 -1
  106. package/dist/models/gguf/kv-cache.d.ts +20 -1
  107. package/dist/models/gguf/kv-cache.js +97 -7
  108. package/dist/models/gguf/kv-cache.js.map +1 -1
  109. package/dist/models/gguf/reader.d.ts +5 -3
  110. package/dist/models/gguf/reader.js +10 -6
  111. package/dist/models/gguf/reader.js.map +1 -1
  112. package/dist/runtime/llamacpp/args.d.ts +14 -0
  113. package/dist/runtime/llamacpp/args.js +48 -4
  114. package/dist/runtime/llamacpp/args.js.map +1 -1
  115. package/dist/runtime/llamacpp/ctx-ladder.d.ts +6 -3
  116. package/dist/runtime/llamacpp/ctx-ladder.js +6 -3
  117. package/dist/runtime/llamacpp/ctx-ladder.js.map +1 -1
  118. package/dist/runtime/llamacpp/fit-margin.d.ts +24 -0
  119. package/dist/runtime/llamacpp/fit-margin.js +31 -0
  120. package/dist/runtime/llamacpp/fit-margin.js.map +1 -1
  121. package/dist/runtime/llamacpp/generation-limits.d.ts +45 -0
  122. package/dist/runtime/llamacpp/generation-limits.js +61 -0
  123. package/dist/runtime/llamacpp/generation-limits.js.map +1 -0
  124. package/dist/runtime/llamacpp/load-plan.d.ts +14 -2
  125. package/dist/runtime/llamacpp/load-plan.js +64 -13
  126. package/dist/runtime/llamacpp/load-plan.js.map +1 -1
  127. package/dist/runtime/llamacpp/runtime.d.ts +1 -0
  128. package/dist/runtime/llamacpp/runtime.js +2 -0
  129. package/dist/runtime/llamacpp/runtime.js.map +1 -1
  130. package/dist/runtime/managed-engines/runtime.js +13 -2
  131. package/dist/runtime/managed-engines/runtime.js.map +1 -1
  132. package/dist/runtime/managed-engines/spec.d.ts +6 -0
  133. package/dist/runtime/managed-engines/spec.js.map +1 -1
  134. package/dist/runtime/managed-models/auto-limits.d.ts +47 -0
  135. package/dist/runtime/managed-models/auto-limits.js +60 -0
  136. package/dist/runtime/managed-models/auto-limits.js.map +1 -0
  137. package/dist/runtime/managed-models/index.d.ts +1 -0
  138. package/dist/runtime/managed-models/index.js +1 -0
  139. package/dist/runtime/managed-models/index.js.map +1 -1
  140. package/dist/runtime/mlx/config.d.ts +9 -5
  141. package/dist/runtime/mlx/config.js +12 -6
  142. package/dist/runtime/mlx/config.js.map +1 -1
  143. package/dist/runtime/mlx/model-files.d.ts +9 -0
  144. package/dist/runtime/mlx/model-files.js +26 -0
  145. package/dist/runtime/mlx/model-files.js.map +1 -1
  146. package/dist/runtime/mlx/runtime.d.ts +7 -0
  147. package/dist/runtime/mlx/runtime.js +24 -2
  148. package/dist/runtime/mlx/runtime.js.map +1 -1
  149. package/dist/runtime/sglang/adapter.d.ts +4 -0
  150. package/dist/runtime/sglang/adapter.js +9 -6
  151. package/dist/runtime/sglang/adapter.js.map +1 -1
  152. package/dist/runtime/sglang/engine.js +2 -1
  153. package/dist/runtime/sglang/engine.js.map +1 -1
  154. package/dist/runtime/sglang/memory.d.ts +11 -1
  155. package/dist/runtime/sglang/memory.js +34 -3
  156. package/dist/runtime/sglang/memory.js.map +1 -1
  157. package/dist/runtime/sglang/settings.d.ts +2 -1
  158. package/dist/runtime/sglang/settings.js +11 -7
  159. package/dist/runtime/sglang/settings.js.map +1 -1
  160. package/dist/runtime/vllm/adapter.d.ts +4 -0
  161. package/dist/runtime/vllm/adapter.js +9 -6
  162. package/dist/runtime/vllm/adapter.js.map +1 -1
  163. package/dist/runtime/vllm/engine.js +1 -0
  164. package/dist/runtime/vllm/engine.js.map +1 -1
  165. package/dist/runtime/vllm/memory.d.ts +12 -1
  166. package/dist/runtime/vllm/memory.js +44 -2
  167. package/dist/runtime/vllm/memory.js.map +1 -1
  168. package/dist/runtime/vllm/settings.d.ts +2 -1
  169. package/dist/runtime/vllm/settings.js +12 -7
  170. package/dist/runtime/vllm/settings.js.map +1 -1
  171. package/dist/server/public/context-window.d.ts +29 -0
  172. package/dist/server/public/context-window.js +77 -0
  173. package/dist/server/public/context-window.js.map +1 -0
  174. package/dist/server/public/decision-preview.js +1 -0
  175. package/dist/server/public/decision-preview.js.map +1 -1
  176. package/dist/server/public/errors.d.ts +15 -4
  177. package/dist/server/public/errors.js +53 -7
  178. package/dist/server/public/errors.js.map +1 -1
  179. package/dist/server/public/forward.js +65 -5
  180. package/dist/server/public/forward.js.map +1 -1
  181. package/dist/server/public/index.d.ts +1 -0
  182. package/dist/server/public/index.js +1 -0
  183. package/dist/server/public/index.js.map +1 -1
  184. package/dist/server/public/listing.d.ts +9 -2
  185. package/dist/server/public/listing.js +30 -9
  186. package/dist/server/public/listing.js.map +1 -1
  187. package/dist/server/public/responses.js +9 -5
  188. package/dist/server/public/responses.js.map +1 -1
  189. package/dist/server/public/system-messages.d.ts +39 -0
  190. package/dist/server/public/system-messages.js +166 -0
  191. package/dist/server/public/system-messages.js.map +1 -0
  192. package/dist/server/public/telemetry.d.ts +9 -0
  193. package/dist/server/public/telemetry.js +42 -6
  194. package/dist/server/public/telemetry.js.map +1 -1
  195. package/dist/server/public/thinking.d.ts +26 -0
  196. package/dist/server/public/thinking.js +62 -0
  197. package/dist/server/public/thinking.js.map +1 -0
  198. package/dist/server/public/trace.d.ts +8 -0
  199. package/dist/server/public/trace.js +17 -0
  200. package/dist/server/public/trace.js.map +1 -1
  201. package/dist/server/public/types.d.ts +8 -0
  202. package/dist/server/shims/index.d.ts +1 -0
  203. package/dist/server/shims/index.js +1 -0
  204. package/dist/server/shims/index.js.map +1 -1
  205. package/dist/server/shims/reminders.d.ts +8 -0
  206. package/dist/server/shims/reminders.js +14 -0
  207. package/dist/server/shims/reminders.js.map +1 -0
  208. package/dist/server/shims/responses.d.ts +33 -9
  209. package/dist/server/shims/responses.js +160 -36
  210. package/dist/server/shims/responses.js.map +1 -1
  211. package/dist/settings/default-migrations.d.ts +34 -0
  212. package/dist/settings/default-migrations.js +47 -0
  213. package/dist/settings/default-migrations.js.map +1 -0
  214. package/dist/settings/schema/atomic-prism.json +23 -9
  215. package/dist/settings/schema/llamacpp-upstream.json +23 -9
  216. package/dist/settings/schema/llamacpp.json +23 -9
  217. package/dist/settings/schema/sglang.json +8 -8
  218. package/dist/settings/schema/vllm.json +8 -8
  219. package/dist/settings/schema.js +1 -0
  220. package/dist/settings/schema.js.map +1 -1
  221. package/dist/settings/store.d.ts +6 -0
  222. package/dist/settings/store.js +18 -1
  223. package/dist/settings/store.js.map +1 -1
  224. package/dist/version.d.ts +1 -1
  225. package/dist/version.js +1 -1
  226. package/package.json +1 -1
@@ -1,33 +1,49 @@
1
1
  /**
2
- * DeepSeek Harness (`dsh`) reads `$DSH_HOME/settings.yaml` (default `~/.dsh`) live, so pointing it at
3
- * the local server is a single upsert of the `llm-pi-ai.providers.atomic` route — no restart needed.
2
+ * DeepSeek Harness (`dsh`). Twin of `configure_dsh_at` in the app's `commands.rs` and `dsh_config.rs`.
4
3
  *
5
- * This is the only writer here that refuses its input, and the reason is blast radius: dsh rejects
6
- * the ENTIRE `llm-pi-ai` section when one route in it is invalid, taking the user's other providers
7
- * down with it. A route needs `api`, `baseURL` and a non-empty `models` list, so a blank URL or model
8
- * is refused before the tree is touched at all. The credential is validated for the same reason: an
9
- * unquoted dotenv value ends at whitespace or `#`, and a newline would inject a second assignment, so
10
- * a key carrying any of those is rejected — with a message that names the variable and never the
11
- * value, so a rejected key cannot leak into a log or a toast.
4
+ * dsh 0.2 dropped the live `$DSH_HOME/settings.yaml` (default `~/.dsh`): settings now live in the
5
+ * active profile's `cordis.patch.yml`, a YAML list of entry overrides (`- id: llm-pi-ai` /
6
+ * `config: …`), and a leftover `settings.yaml` is merged into that profile once and renamed
7
+ * `settings.yaml.imported`. `dsh web`, which `launch` runs, boots the `web` profile, so the `atomic`
8
+ * route goes under its `llm-pi-ai` row's `providers` and its `agent-default-model` row is set to it,
9
+ * so new sessions open on the local model instead of DeepSeek's. dsh picks both up without a restart.
12
10
  *
13
- * Two more things are load-bearing. The route is replaced WHOLESALE rather than deep-merged: a merge
14
- * would let a stale `apiKeyEnv` from an earlier keyed run survive a keyless run and break every
15
- * request with MISSING_CREDENTIAL. And because the YAML round trip drops comments and expands
16
- * anchors, the pre-existing file is copied to `settings.yaml.atomic-backup` — once, so a later run
17
- * cannot overwrite the true pre-Atomic state with our own generated output.
11
+ * The profile patch is the user's (dsh's Settings page edits it, keeping comments and `!!js`
12
+ * expressions), so only our two rows are re-serialized; every other row, comment and blank line is
13
+ * kept byte for byte. A file whose rows cannot be told apart that way is rewritten whole only when
14
+ * nothing but comments would be lost, and refused when it holds `!!js` expressions. The default the
15
+ * user had is kept in the backup sidecar for the desktop's Disconnect.
16
+ *
17
+ * A `settings.yaml` that is still there is read live by dsh before 0.2 and merged over the profile
18
+ * by 0.2+, so it gets the route too (and our default, when it names one); one is never created, and
19
+ * `settings.yaml.imported` is never touched.
20
+ *
21
+ * This writer refuses its input when it would do harm: dsh rejects the ENTIRE `llm-pi-ai` section
22
+ * when one route in it is invalid, taking the user's other providers down with it. A route needs
23
+ * `api`, `baseURL` and a non-empty `models` list, so a blank URL or model is refused before anything
24
+ * is touched. The credential is validated for the same reason: an unquoted dotenv value ends at
25
+ * whitespace or `#`, and a newline would inject a second assignment, so a key carrying any of those
26
+ * is rejected — with a message that names the variable and never the value. The route is replaced
27
+ * WHOLESALE rather than deep-merged: a merge would let a stale `apiKeyEnv` from an earlier keyed run
28
+ * survive a keyless run and break every request with MISSING_CREDENTIAL.
18
29
  */
19
30
  import type { ConfigureWriter } from './registry.js';
20
31
  type YamlMapping = Record<string, unknown>;
21
32
  /** Reject a value no dotenv line can carry. The message names the variable, never the value. */
22
33
  export declare function dshValidateEnvValue(name: string, value: string): void;
23
- /** The `llm-pi-ai.providers.atomic` node. Keyless omits `apiKeyEnv` rather than writing an empty one. */
24
- export declare function dshRouteNode(apiUrl: string, model: string, withKey: boolean): YamlMapping;
25
34
  /**
26
- * Upsert our route into an already-parsed tree. Pure: no I/O, no environment. Everything outside
27
- * `llm-pi-ai.providers.atomic` is preserved, including relative order — assigning to an existing key
28
- * keeps its position, in JavaScript as in `serde_yaml`'s insertion-ordered mapping.
35
+ * The `atomic` route node. Keyless omits `apiKeyEnv` rather than writing an empty one. A model the
36
+ * pi-ai catalog does not ship falls back to a 262144 window and 32768 output tokens; a known served
37
+ * window is declared instead, with a reply of a quarter of it (8192 at most).
38
+ */
39
+ export declare function dshRouteNode(apiUrl: string, model: string, withKey: boolean, contextLength?: number): YamlMapping;
40
+ /**
41
+ * Upsert our route into an already-parsed legacy `settings.yaml` tree. Pure: no I/O, no environment.
42
+ * Everything outside `llm-pi-ai.providers.atomic` is preserved, including relative order.
29
43
  */
30
- export declare function applyDshProvider(root: unknown, apiUrl: string, model: string, withKey: boolean): unknown;
44
+ export declare function applyDshProvider(root: unknown, apiUrl: string, model: string, withKey: boolean, contextLength?: number): unknown;
45
+ /** A YAML tag such as `!!js`, which a re-serialization would drop. */
46
+ export declare function hasYamlTag(text: string): boolean;
31
47
  /** `$DSH_HOME` when set, else `~/.dsh`. A literal `~` can reach us from a quoted rc-file value. */
32
48
  export declare function dshHome(env: NodeJS.ProcessEnv, home: string): string;
33
49
  export declare const configureDsh: ConfigureWriter;
@@ -1,30 +1,46 @@
1
1
  /**
2
- * DeepSeek Harness (`dsh`) reads `$DSH_HOME/settings.yaml` (default `~/.dsh`) live, so pointing it at
3
- * the local server is a single upsert of the `llm-pi-ai.providers.atomic` route — no restart needed.
2
+ * DeepSeek Harness (`dsh`). Twin of `configure_dsh_at` in the app's `commands.rs` and `dsh_config.rs`.
4
3
  *
5
- * This is the only writer here that refuses its input, and the reason is blast radius: dsh rejects
6
- * the ENTIRE `llm-pi-ai` section when one route in it is invalid, taking the user's other providers
7
- * down with it. A route needs `api`, `baseURL` and a non-empty `models` list, so a blank URL or model
8
- * is refused before the tree is touched at all. The credential is validated for the same reason: an
9
- * unquoted dotenv value ends at whitespace or `#`, and a newline would inject a second assignment, so
10
- * a key carrying any of those is rejected — with a message that names the variable and never the
11
- * value, so a rejected key cannot leak into a log or a toast.
4
+ * dsh 0.2 dropped the live `$DSH_HOME/settings.yaml` (default `~/.dsh`): settings now live in the
5
+ * active profile's `cordis.patch.yml`, a YAML list of entry overrides (`- id: llm-pi-ai` /
6
+ * `config: …`), and a leftover `settings.yaml` is merged into that profile once and renamed
7
+ * `settings.yaml.imported`. `dsh web`, which `launch` runs, boots the `web` profile, so the `atomic`
8
+ * route goes under its `llm-pi-ai` row's `providers` and its `agent-default-model` row is set to it,
9
+ * so new sessions open on the local model instead of DeepSeek's. dsh picks both up without a restart.
12
10
  *
13
- * Two more things are load-bearing. The route is replaced WHOLESALE rather than deep-merged: a merge
14
- * would let a stale `apiKeyEnv` from an earlier keyed run survive a keyless run and break every
15
- * request with MISSING_CREDENTIAL. And because the YAML round trip drops comments and expands
16
- * anchors, the pre-existing file is copied to `settings.yaml.atomic-backup` — once, so a later run
17
- * cannot overwrite the true pre-Atomic state with our own generated output.
11
+ * The profile patch is the user's (dsh's Settings page edits it, keeping comments and `!!js`
12
+ * expressions), so only our two rows are re-serialized; every other row, comment and blank line is
13
+ * kept byte for byte. A file whose rows cannot be told apart that way is rewritten whole only when
14
+ * nothing but comments would be lost, and refused when it holds `!!js` expressions. The default the
15
+ * user had is kept in the backup sidecar for the desktop's Disconnect.
16
+ *
17
+ * A `settings.yaml` that is still there is read live by dsh before 0.2 and merged over the profile
18
+ * by 0.2+, so it gets the route too (and our default, when it names one); one is never created, and
19
+ * `settings.yaml.imported` is never touched.
20
+ *
21
+ * This writer refuses its input when it would do harm: dsh rejects the ENTIRE `llm-pi-ai` section
22
+ * when one route in it is invalid, taking the user's other providers down with it. A route needs
23
+ * `api`, `baseURL` and a non-empty `models` list, so a blank URL or model is refused before anything
24
+ * is touched. The credential is validated for the same reason: an unquoted dotenv value ends at
25
+ * whitespace or `#`, and a newline would inject a second assignment, so a key carrying any of those
26
+ * is rejected — with a message that names the variable and never the value. The route is replaced
27
+ * WHOLESALE rather than deep-merged: a merge would let a stale `apiKeyEnv` from an earlier keyed run
28
+ * survive a keyless run and break every request with MISSING_CREDENTIAL.
18
29
  */
30
+ import { parse as yamlParse, stringify as yamlStringify } from 'yaml';
19
31
  import { AtomicCoreError } from '../../contracts/index.js';
20
32
  import { ATOMIC_MANAGED_BEGIN, ATOMIC_MANAGED_END, canonicalYaml, expandTilde, parseYaml, stripAtomicManagedBlock, } from '../config-io.js';
33
+ import { knownWindow, outputCap, readSidecar, sameJson, writeSidecar } from './backup.js';
21
34
  import { registerWriter } from './registry.js';
22
35
  const SECTION = 'llm-pi-ai';
36
+ const SECTION_NAME = '@deepseek-ai/dsh-llm-pi-ai';
37
+ const DEFAULT_SECTION = 'agent-default-model';
38
+ const DEFAULT_NAME = '@deepseek-ai/dsh-agent-default-model';
23
39
  const ROUTE_ID = 'atomic';
24
40
  /** The route names an env var, never the secret itself. */
25
41
  const KEY_ENV = 'ATOMIC_API_KEY';
26
- const CONTEXT_WINDOW = 65_536;
27
- const MAX_TOKENS = 8_192;
42
+ /** The profile `dsh web` boots. */
43
+ const PROFILE = 'web';
28
44
  function asMapping(value) {
29
45
  if (typeof value !== 'object' || value === null || Array.isArray(value))
30
46
  return undefined;
@@ -33,15 +49,14 @@ function asMapping(value) {
33
49
  /**
34
50
  * Borrow `parent[key]` as a mapping, creating it when absent. A bare `llm-pi-ai:` with nothing under
35
51
  * it parses to null, which is a hole to fill rather than data to protect. Anything else non-mapping
36
- * is real user content and errors out — `settings.yaml` is shared with every other harness plugin, so
37
- * a silent overwrite would delete config we do not own.
52
+ * is real user content and errors out — a silent overwrite would delete config we do not own.
38
53
  */
39
- function childMapping(parent, key, label) {
54
+ function childMapping(parent, key, label, file = 'settings.yaml') {
40
55
  if (parent[key] === undefined || parent[key] === null)
41
56
  parent[key] = {};
42
57
  const child = asMapping(parent[key]);
43
58
  if (!child) {
44
- throw new AtomicCoreError('IO_ERROR', `\`${label}\` in settings.yaml is not a mapping. Fix or remove it and try again.`);
59
+ throw new AtomicCoreError('IO_ERROR', `\`${label}\` in ${file} is not a mapping. Fix or remove it and try again.`);
45
60
  }
46
61
  return child;
47
62
  }
@@ -51,29 +66,38 @@ export function dshValidateEnvValue(name, value) {
51
66
  throw new AtomicCoreError('INVALID_ARGUMENT', `${name} contains characters that cannot be stored in a .env file`);
52
67
  }
53
68
  }
54
- /** The `llm-pi-ai.providers.atomic` node. Keyless omits `apiKeyEnv` rather than writing an empty one. */
55
- export function dshRouteNode(apiUrl, model, withKey) {
69
+ function validateRoute(apiUrl, model) {
70
+ if (apiUrl.trim() === '') {
71
+ throw new AtomicCoreError('INVALID_ARGUMENT', 'No local server URL. Start the local API server and try again.');
72
+ }
73
+ if (model.trim() === '') {
74
+ throw new AtomicCoreError('INVALID_ARGUMENT', 'No model selected. DeepSeek Harness rejects a provider with an empty model list, which would ' +
75
+ 'also disable any other provider configured in that section.');
76
+ }
77
+ }
78
+ /**
79
+ * The `atomic` route node. Keyless omits `apiKeyEnv` rather than writing an empty one. A model the
80
+ * pi-ai catalog does not ship falls back to a 262144 window and 32768 output tokens; a known served
81
+ * window is declared instead, with a reply of a quarter of it (8192 at most).
82
+ */
83
+ export function dshRouteNode(apiUrl, model, withKey, contextLength) {
84
+ const window = knownWindow(contextLength);
56
85
  return {
57
86
  displayName: 'Atomic Chat',
58
87
  api: 'openai-completions',
59
88
  baseURL: apiUrl,
60
89
  ...(withKey ? { apiKeyEnv: KEY_ENV } : {}),
61
- models: [{ id: model, contextWindow: CONTEXT_WINDOW, maxTokens: MAX_TOKENS }],
90
+ models: [
91
+ { id: model, ...(window !== undefined ? { contextWindow: window, maxTokens: outputCap(window) } : {}) },
92
+ ],
62
93
  };
63
94
  }
64
95
  /**
65
- * Upsert our route into an already-parsed tree. Pure: no I/O, no environment. Everything outside
66
- * `llm-pi-ai.providers.atomic` is preserved, including relative order — assigning to an existing key
67
- * keeps its position, in JavaScript as in `serde_yaml`'s insertion-ordered mapping.
96
+ * Upsert our route into an already-parsed legacy `settings.yaml` tree. Pure: no I/O, no environment.
97
+ * Everything outside `llm-pi-ai.providers.atomic` is preserved, including relative order.
68
98
  */
69
- export function applyDshProvider(root, apiUrl, model, withKey) {
70
- if (apiUrl.trim() === '') {
71
- throw new AtomicCoreError('INVALID_ARGUMENT', 'No local server URL. Start the local API server and try again.');
72
- }
73
- if (model.trim() === '') {
74
- throw new AtomicCoreError('INVALID_ARGUMENT', 'No model selected. DeepSeek Harness rejects a provider with an empty model list, which would ' +
75
- 'also disable any other provider configured in that section.');
76
- }
99
+ export function applyDshProvider(root, apiUrl, model, withKey, contextLength) {
100
+ validateRoute(apiUrl, model);
77
101
  // An empty, whitespace-only or comment-only document parses to null; one heal covers all three.
78
102
  const healed = root === null || root === undefined ? {} : root;
79
103
  const map = asMapping(healed);
@@ -81,9 +105,169 @@ export function applyDshProvider(root, apiUrl, model, withKey) {
81
105
  throw new AtomicCoreError('IO_ERROR', 'settings.yaml top level is not a YAML mapping');
82
106
  const section = childMapping(map, SECTION, SECTION);
83
107
  const providers = childMapping(section, 'providers', `${SECTION}.providers`);
84
- providers[ROUTE_ID] = dshRouteNode(apiUrl, model, withKey);
108
+ providers[ROUTE_ID] = dshRouteNode(apiUrl, model, withKey, contextLength);
85
109
  return map;
86
110
  }
111
+ // ── the profile patch ───────────────────────────────────────────────────────────────────────────
112
+ const JS_TAG = [{ tag: 'tag:yaml.org,2002:js', resolve: (value) => value }];
113
+ function parseYamlText(text, path) {
114
+ try {
115
+ return yamlParse(text, { customTags: JS_TAG, logLevel: 'error' });
116
+ }
117
+ catch (e) {
118
+ throw new AtomicCoreError('IO_ERROR', `Failed to parse ${path}`, e.message);
119
+ }
120
+ }
121
+ /** `serde_yaml` 0.9's shape: single quotes, and aliases expanded rather than re-anchored. */
122
+ function rowsYaml(rows) {
123
+ return yamlStringify(rows, {
124
+ indentSeq: false,
125
+ lineWidth: 0,
126
+ nullStr: 'null',
127
+ singleQuote: true,
128
+ aliasDuplicateObjects: false,
129
+ });
130
+ }
131
+ /** A YAML tag such as `!!js`, which a re-serialization would drop. */
132
+ export function hasYamlTag(text) {
133
+ return text.split('\n').some((line) => {
134
+ const trimmed = line.trimStart();
135
+ return !trimmed.startsWith('#') && trimmed.split(/[\s[{,]+/).some((token) => token.startsWith('!'));
136
+ });
137
+ }
138
+ const isRowStart = (line) => line === '-' || line.startsWith('- ') || line.startsWith('-\n') || line.startsWith('-\r');
139
+ const isGap = (line) => line.trim() === '' || line.startsWith('#');
140
+ function parsePatch(text, path) {
141
+ const parsed = parseYamlText(text, path);
142
+ if (parsed !== null && parsed !== undefined && !Array.isArray(parsed)) {
143
+ throw new AtomicCoreError('IO_ERROR', `${path} is not a YAML list of patches. Fix or remove it and try again.`);
144
+ }
145
+ const items = (parsed ?? []);
146
+ const mappings = () => items.map((item) => {
147
+ const mapping = asMapping(item);
148
+ if (!mapping) {
149
+ throw new AtomicCoreError('IO_ERROR', `${path} has a patch that is not a mapping. Fix or remove it and try again.`);
150
+ }
151
+ return mapping;
152
+ });
153
+ const rewriteWhole = () => {
154
+ if (hasYamlTag(text)) {
155
+ throw new AtomicCoreError('IO_ERROR', `${path} uses \`!!js\` expressions in a layout Atomic Chat cannot edit without losing them. ` +
156
+ "Add the Atomic Chat provider in DeepSeek Harness's Settings → Models instead.");
157
+ }
158
+ return {
159
+ head: '',
160
+ rows: mappings().map((value) => ({ text: undefined, trailer: '', value, touched: true })),
161
+ whole: true,
162
+ };
163
+ };
164
+ const lines = text.split(/(?<=\n)/).filter((line) => line !== '');
165
+ const starts = lines.flatMap((line, i) => (isRowStart(line) ? [i] : []));
166
+ const first = starts[0] ?? lines.length;
167
+ let head = '';
168
+ for (const line of lines.slice(0, first)) {
169
+ const trimmed = line.trim();
170
+ if (trimmed === '[]' && items.length === 0)
171
+ continue;
172
+ if (!isGap(line) && trimmed !== '---')
173
+ return rewriteWhole();
174
+ head += line;
175
+ }
176
+ if (starts.length !== items.length)
177
+ return rewriteWhole();
178
+ const rows = [];
179
+ for (const [n, start] of starts.entries()) {
180
+ const end = starts[n + 1] ?? lines.length;
181
+ let bodyEnd = end;
182
+ while (bodyEnd > start + 1 && isGap(lines[bodyEnd - 1]))
183
+ bodyEnd--;
184
+ const rowText = lines.slice(start, bodyEnd).join('');
185
+ let one;
186
+ try {
187
+ one = yamlParse(rowText, { customTags: JS_TAG, logLevel: 'error' });
188
+ }
189
+ catch {
190
+ return rewriteWhole();
191
+ }
192
+ const value = Array.isArray(one) && one.length === 1 ? asMapping(one[0]) : undefined;
193
+ if (!value)
194
+ return rewriteWhole();
195
+ rows.push({ text: rowText, trailer: lines.slice(bodyEnd, end).join(''), value, touched: false });
196
+ }
197
+ return { head, rows, whole: false };
198
+ }
199
+ /** The last override of entry `id`, as dsh's own editor picks it: no `insert`, no other `name`. */
200
+ function findRow(doc, id, name) {
201
+ for (let i = doc.rows.length - 1; i >= 0; i--) {
202
+ const value = doc.rows[i].value;
203
+ if (value['id'] === id && !('insert' in value) && (value['name'] === undefined || value['name'] === name))
204
+ return i;
205
+ }
206
+ return -1;
207
+ }
208
+ function editRow(doc, index, path) {
209
+ const row = doc.rows[index];
210
+ if (row.text !== undefined && hasYamlTag(row.text)) {
211
+ throw new AtomicCoreError('IO_ERROR', `The \`${String(row.value['id'])}\` patch in ${path} uses \`!!js\` expressions Atomic Chat cannot keep. ` +
212
+ "Edit it in DeepSeek Harness's Settings instead.");
213
+ }
214
+ row.touched = true;
215
+ return row.value;
216
+ }
217
+ function renderPatch(doc) {
218
+ if (doc.whole)
219
+ return rowsYaml(doc.rows.map((row) => row.value));
220
+ let out = doc.head;
221
+ for (const row of doc.rows) {
222
+ if (out !== '' && !out.endsWith('\n'))
223
+ out += '\n';
224
+ out += row.text !== undefined && !row.touched ? row.text : rowsYaml([row.value]);
225
+ out += row.trailer;
226
+ }
227
+ return doc.rows.length === 0 ? `${out}[]\n` : out;
228
+ }
229
+ /** Write our route and select it in the profile patch; the default it replaces goes to the backup. */
230
+ async function configureProfile(fs, dir, route, model, platform) {
231
+ const path = `${dir}/profiles/${PROFILE}/cordis.patch.yml`;
232
+ const text = await fs.read(path);
233
+ const doc = text === undefined ? { head: '', rows: [], whole: false } : parsePatch(text, fs.absolute(path));
234
+ const routes = findRow(doc, SECTION, SECTION_NAME);
235
+ if (routes >= 0) {
236
+ const row = editRow(doc, routes, fs.absolute(path));
237
+ const config = childMapping(row, 'config', SECTION, 'the dsh profile');
238
+ childMapping(config, 'providers', `${SECTION}.providers`, 'the dsh profile')[ROUTE_ID] = route;
239
+ }
240
+ else {
241
+ doc.rows.push({
242
+ text: undefined,
243
+ trailer: '',
244
+ value: { id: SECTION, name: SECTION_NAME, config: { providers: { [ROUTE_ID]: route } } },
245
+ touched: true,
246
+ });
247
+ }
248
+ const ours = { provider: ROUTE_ID, model };
249
+ const selected = findRow(doc, DEFAULT_SECTION, DEFAULT_NAME);
250
+ const current = (selected >= 0 ? doc.rows[selected].value['config'] : undefined);
251
+ if (selected >= 0)
252
+ editRow(doc, selected, fs.absolute(path))['config'] = ours;
253
+ else
254
+ doc.rows.push({
255
+ text: undefined,
256
+ trailer: '',
257
+ value: { id: DEFAULT_SECTION, name: DEFAULT_NAME, config: ours },
258
+ touched: true,
259
+ });
260
+ // The default from before the first Connect, kept while ours is in place.
261
+ const backup = await readSidecar(fs, path);
262
+ const written = backup?.['written']?.defaultModel;
263
+ const previous = backup !== undefined && current !== undefined && current !== null && sameJson(written, current)
264
+ ? (backup['previous']?.defaultModel ?? null)
265
+ : (current ?? null);
266
+ // Owner-only, as dsh writes it.
267
+ await fs.write(path, renderPatch(doc), platform === 'win32' ? {} : { mode: 0o600 });
268
+ await writeSidecar(fs, path, { previous: { defaultModel: previous }, written: { defaultModel: ours } }, platform);
269
+ }
270
+ // ── .env ────────────────────────────────────────────────────────────────────────────────────────
87
271
  /**
88
272
  * Upsert — or, with no vars, remove — our managed block in a dotenv file, preserving every line
89
273
  * outside it. Deliberately not the shell-rc writer: that one emits `export K='V'`, uses a different
@@ -114,29 +298,47 @@ export function dshHome(env, home) {
114
298
  const raw = env['DSH_HOME']?.trim();
115
299
  return raw ? expandTilde(raw, home) : '.dsh';
116
300
  }
117
- export const configureDsh = async ({ apiUrl, model, apiKey, fs, env, platform }) => {
301
+ export const configureDsh = async ({ apiUrl, model, apiKey, fs, env, platform, contextLength, }) => {
118
302
  const dir = dshHome(env, fs.home);
119
303
  const settingsPath = `${dir}/settings.yaml`;
120
304
  const trimmed = apiKey.trim();
121
305
  const key = trimmed === '' ? undefined : trimmed;
122
- // Validate the credential before settings.yaml, so an unusable key cannot leave a route pointing at
306
+ // Validate everything before writing anything, so an unusable key cannot leave a route pointing at
123
307
  // a reference we then failed to store.
308
+ validateRoute(apiUrl, model);
124
309
  if (key !== undefined)
125
310
  dshValidateEnvValue(KEY_ENV, key);
126
- // Parse before creating anything, so a malformed file leaves no debris.
127
- const text = (await fs.read(settingsPath)) ?? '';
128
- const root = parseYaml(text, fs.absolute(settingsPath));
129
- const patched = applyDshProvider(root, apiUrl, model, key !== undefined);
130
- const serialized = canonicalYaml(patched);
131
- if (text !== '') {
311
+ // Parse the legacy document before writing anything, so a malformed file leaves no debris.
312
+ const text = await fs.read(settingsPath);
313
+ let legacy;
314
+ if (text !== undefined) {
315
+ const patched = applyDshProvider(parseYaml(text, fs.absolute(settingsPath)), apiUrl, model, key !== undefined, contextLength);
316
+ let previousDefault;
317
+ // An old default would be laid over ours by a 0.2+ import, so it becomes ours too.
318
+ const current = patched[DEFAULT_SECTION];
319
+ if (current !== undefined) {
320
+ if (asMapping(current)?.['provider'] !== ROUTE_ID)
321
+ previousDefault = current;
322
+ patched[DEFAULT_SECTION] = { provider: ROUTE_ID, model };
323
+ }
324
+ const serialized = canonicalYaml(patched);
325
+ legacy = { serialized: serialized.endsWith('\n') ? serialized : `${serialized}\n`, previousDefault };
326
+ }
327
+ await configureProfile(fs, dir, dshRouteNode(apiUrl, model, key !== undefined, contextLength), model, platform);
328
+ if (legacy !== undefined && text !== undefined) {
329
+ // The round trip drops comments and expands anchors, so keep one copy of whatever the user had
330
+ // before we first touched it — once, so a later run cannot overwrite the pre-Atomic state.
132
331
  const backup = `${dir}/settings.yaml.atomic-backup`;
133
- if (!(await fs.exists(backup)))
332
+ if (text !== '' && !(await fs.exists(backup)))
134
333
  await fs.write(backup, text);
334
+ await fs.write(settingsPath, legacy.serialized);
335
+ if (legacy.previousDefault !== undefined) {
336
+ await writeSidecar(fs, settingsPath, { previous: { defaultModel: legacy.previousDefault } }, platform);
337
+ }
135
338
  }
136
- await fs.write(settingsPath, serialized.endsWith('\n') ? serialized : `${serialized}\n`);
137
- // The secret never enters settings.yaml. dsh resolves the reference from the inherited environment,
138
- // then `$DSH_HOME/.credentials.yaml`, then the invoking directory's `.env`, then this file — the
139
- // lowest-precedence layer, so anything the user sets deliberately still wins.
339
+ // The secret never enters a config file. dsh resolves the reference from the inherited
340
+ // environment, then `$DSH_HOME/.credentials.yaml`, then the invoking directory's `.env`, then this
341
+ // file — the lowest-precedence layer, so anything the user sets deliberately still wins.
140
342
  const unix = platform !== 'win32';
141
343
  await writeManagedEnv(fs, `${dir}/.env`,
142
344
  // Keyless: the route carries no `apiKeyEnv`, so a leftover value would outlive its use.
@@ -1 +1 @@
1
- {"version":3,"file":"dsh.js","sourceRoot":"","sources":["../../../src/integrations/configure/dsh.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAE1D,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,WAAW,EACX,SAAS,EACT,uBAAuB,GACxB,MAAM,iBAAiB,CAAA;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,MAAM,OAAO,GAAG,WAAW,CAAA;AAC3B,MAAM,QAAQ,GAAG,QAAQ,CAAA;AACzB,2DAA2D;AAC3D,MAAM,OAAO,GAAG,gBAAgB,CAAA;AAChC,MAAM,cAAc,GAAG,MAAM,CAAA;AAC7B,MAAM,UAAU,GAAG,KAAK,CAAA;AAIxB,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,SAAS,CAAA;IACzF,OAAO,KAAoB,CAAA;AAC7B,CAAC;AAED;;;;;GAKG;AACH,SAAS,YAAY,CAAC,MAAmB,EAAE,GAAW,EAAE,KAAa;IACnE,IAAI,MAAM,CAAC,GAAG,CAAC,KAAK,SAAS,IAAI,MAAM,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3F,MAAM,MAAM,GAAG,GAAG,GAAG,8BAA8B,CAAA;QACnD,IAAI,IAAI,KAAK,EAAE,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAAE,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QAC3E,MAAM,EAAE,CAAC,KAAK,CAAC,YAAY,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;QAC/C,IAAI,MAAM,CAAC,eAAe,KAAK,SAAS,EAAE,CAAC;YACzC,MAAM,YAAY,CAAC,EAAE,EAAE,YAAY,EAAE,EAAE,QAAQ,EAAE,EAAE,YAAY,EAAE,MAAM,CAAC,eAAe,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAA;QACxG,CAAC;IACH,CAAC;IAED,uFAAuF;IACvF,mGAAmG;IACnG,yFAAyF;IACzF,MAAM,IAAI,GAAG,QAAQ,KAAK,OAAO,CAAA;IACjC,MAAM,eAAe,CACnB,EAAE,EACF,GAAG,GAAG,OAAO;IACb,wFAAwF;IACxF,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,EACxD,IAAI,CACL,CAAA;AACH,CAAC,CAAA;AAED,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAA"}
@@ -1,12 +1,26 @@
1
1
  /**
2
- * Goose reads `GOOSE_PROVIDER` / `GOOSE_MODEL` plus the OpenAI host variables from the environment;
3
- * there is no provider file to patch. Goose appends its own path, so `OPENAI_HOST` is the bare
4
- * host:port (the catalog marks it `endpointWithPrefix: false`) and `OPENAI_BASE_PATH` carries the
5
- * chat-completions path.
2
+ * Goose — a connection writes nothing. `launch` starts `goose session` with its provider, model,
3
+ * endpoint, key and window in that one process's environment (`childEnv` in the catalog), so nothing
4
+ * outside it changes.
6
5
  *
7
- * The block also holds `OPENAI_*` variables, which do not share the `GOOSE_` prefix. Rerun stays
8
- * idempotent because the whole marked region is removed first; the prefix filter is only the safety
9
- * net for stray lines outside it, which is why a user's own `export OPENAI_API_KEY` survives.
6
+ * Earlier releases saved the same variables for the whole user instead — a marked block in the shell
7
+ * rc file, or `setx` on Windows — which pointed every OpenAI SDK tool on the machine at Atomic Chat
8
+ * (`OPENAI_API_KEY`, `OPENAI_HOST`). Configuring takes exactly that out again, and nothing a user
9
+ * wrote. Port of `goose_config.rs` in the app.
10
10
  */
11
11
  import type { ConfigureWriter } from './registry.js';
12
+ /** The line that opened and closed the block earlier releases wrote. */
13
+ export declare const LEGACY_SHELL_MARKER = "# Atomic Chat - Goose Config";
14
+ /**
15
+ * `content` without our Goose blocks, or `undefined` when it has none. A block runs from one marker
16
+ * line to the next; within it only the marker lines, our `export` lines and blank lines go — anything
17
+ * else a user put there stays. A marker without a partner goes alone.
18
+ */
19
+ export declare function stripLegacyGooseBlock(content: string): string | undefined;
20
+ /**
21
+ * The User-scope variables (`read` looks one up) that are recognisably what an earlier release set
22
+ * with `setx`: Goose on the OpenAI provider with our fixed base path at a local host. The key goes
23
+ * only when it is our placeholder or the server's own key.
24
+ */
25
+ export declare function legacyGooseUserVars(read: (name: string) => string | undefined, apiKey: string): string[];
12
26
  export declare const configureGoose: ConfigureWriter;