@deepseek-harness-tui/dsh-tui 0.11.2 → 0.12.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 (168) hide show
  1. package/README.md +21 -5
  2. package/bin/dsh-tui.js +30 -3
  3. package/cordis.patch.yml +24 -5
  4. package/guide/dsh-tui-guide/SKILL.md +37 -0
  5. package/guide/dsh-tui-guide/configuration.en.md +410 -0
  6. package/guide/dsh-tui-guide/configuration.md +349 -0
  7. package/guide/dsh-tui-guide/getting-started.en.md +398 -0
  8. package/guide/dsh-tui-guide/getting-started.md +397 -0
  9. package/guide/dsh-tui-guide/interaction.en.md +674 -0
  10. package/guide/dsh-tui-guide/interaction.md +747 -0
  11. package/guide/dsh-tui-guide/migrate.en.md +166 -0
  12. package/guide/dsh-tui-guide/migrate.md +132 -0
  13. package/guide/dsh-tui-guide/plugins.en.md +68 -0
  14. package/guide/dsh-tui-guide/plugins.md +56 -0
  15. package/guide/dsh-tui-guide/themes.en.md +192 -0
  16. package/guide/dsh-tui-guide/themes.md +185 -0
  17. package/guide/dsh-tui-guide/user-guide.en.md +608 -0
  18. package/guide/dsh-tui-guide/user-guide.md +586 -0
  19. package/guide/dsh-tui-guide/vscode.en.md +301 -0
  20. package/guide/dsh-tui-guide/vscode.md +272 -0
  21. package/lib/settings.json +5 -5
  22. package/lib/types/adapter/channel/ui-policy.d.ts +3 -2
  23. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  24. package/lib/types/adapter/channel/ui-policy.js +4 -0
  25. package/lib/types/adapter/ports/channel-settings.d.ts +2 -1
  26. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  27. package/lib/types/adapter/ports/channel-ui.d.ts +29 -2
  28. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  29. package/lib/types/adapter/ports/channel-view.d.ts +43 -9
  30. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  31. package/lib/types/components/Chat/JobCard.d.ts +9 -0
  32. package/lib/types/components/Chat/JobCard.d.ts.map +1 -1
  33. package/lib/types/components/Chat/JobCard.js +42 -15
  34. package/lib/types/components/Chat/SubagentMessage.js +6 -6
  35. package/lib/types/components/JobsPanel.d.ts.map +1 -1
  36. package/lib/types/components/JobsPanel.js +80 -33
  37. package/lib/types/components/MessageList.js +3 -3
  38. package/lib/types/components/PresetPicker.d.ts +4 -0
  39. package/lib/types/components/PresetPicker.d.ts.map +1 -1
  40. package/lib/types/components/PresetPicker.js +5 -1
  41. package/lib/types/components/PromptInput.d.ts.map +1 -1
  42. package/lib/types/components/PromptInput.js +12 -1
  43. package/lib/types/components/StarPrompt.d.ts +6 -0
  44. package/lib/types/components/StarPrompt.d.ts.map +1 -1
  45. package/lib/types/components/StarPrompt.js +45 -0
  46. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  47. package/lib/types/components/SubagentCard.js +8 -8
  48. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  49. package/lib/types/components/SubagentDetailScene.js +108 -10
  50. package/lib/types/components/WhaleGirl.d.ts +6 -0
  51. package/lib/types/components/WhaleGirl.d.ts.map +1 -1
  52. package/lib/types/components/WhaleGirl.js +18 -0
  53. package/lib/types/components/messages/AssistantThinkingMessage.js +4 -4
  54. package/lib/types/components/trajectory/MiniWake.d.ts +11 -1
  55. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  56. package/lib/types/components/trajectory/MiniWake.js +9 -3
  57. package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
  58. package/lib/types/dsh-adapter/channel/external-commands.js +8 -2
  59. package/lib/types/dsh-adapter/channel/job-projection.d.ts +1 -0
  60. package/lib/types/dsh-adapter/channel/job-projection.d.ts.map +1 -1
  61. package/lib/types/dsh-adapter/channel/job-projection.js +88 -3
  62. package/lib/types/dsh-adapter/channel/mode-actions.d.ts +13 -0
  63. package/lib/types/dsh-adapter/channel/mode-actions.d.ts.map +1 -1
  64. package/lib/types/dsh-adapter/channel/mode-actions.js +48 -7
  65. package/lib/types/dsh-adapter/channel/mode-permission-actions.d.ts.map +1 -1
  66. package/lib/types/dsh-adapter/channel/mode-permission-actions.js +25 -9
  67. package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
  68. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
  69. package/lib/types/dsh-adapter/channel/preferences.js +17 -7
  70. package/lib/types/dsh-adapter/channel/state.d.ts +4 -2
  71. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  72. package/lib/types/dsh-adapter/channel/state.js +1 -1
  73. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  74. package/lib/types/dsh-adapter/channel/subagent-projection.js +5 -0
  75. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  76. package/lib/types/dsh-adapter/channel.js +16 -1
  77. package/lib/types/dsh-adapter/contract.d.ts +5 -4
  78. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  79. package/lib/types/dsh-adapter/contract.js +9 -3
  80. package/lib/types/dsh-adapter/jobs.d.ts +82 -16
  81. package/lib/types/dsh-adapter/jobs.d.ts.map +1 -1
  82. package/lib/types/dsh-adapter/jobs.js +104 -9
  83. package/lib/types/dsh-adapter/oauth/bonus.d.ts +27 -0
  84. package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -0
  85. package/lib/types/dsh-adapter/oauth/bonus.js +69 -0
  86. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.d.ts +2 -1
  87. package/lib/types/dsh-adapter/oauth/command.d.ts.map +1 -0
  88. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/command.js +7 -4
  89. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.d.ts +13 -10
  90. package/lib/types/dsh-adapter/oauth/credentials.d.ts.map +1 -0
  91. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/credentials.js +61 -23
  92. package/lib/types/dsh-adapter/oauth/deepseek.d.ts +39 -0
  93. package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -0
  94. package/lib/types/dsh-adapter/oauth/deepseek.js +189 -0
  95. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.d.ts +24 -16
  96. package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -0
  97. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/index.js +34 -20
  98. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/interaction.d.ts +14 -12
  99. package/lib/types/dsh-adapter/oauth/interaction.d.ts.map +1 -0
  100. package/lib/types/dsh-adapter/oauth/interaction.js +283 -0
  101. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.d.ts +2 -1
  102. package/lib/types/dsh-adapter/oauth/opener.d.ts.map +1 -0
  103. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/opener.js +1 -1
  104. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.d.ts +10 -3
  105. package/lib/types/dsh-adapter/oauth/pi-ai.d.ts.map +1 -0
  106. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/pi-ai.js +8 -3
  107. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.d.ts +6 -3
  108. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -0
  109. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/profiles.js +11 -3
  110. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.d.ts +14 -7
  111. package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -0
  112. package/{node_modules/@deepseek-harness-tui/dsh-auth/lib → lib/types/dsh-adapter/oauth}/service.js +82 -17
  113. package/lib/types/dsh-adapter/plugin.d.ts +8 -1
  114. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  115. package/lib/types/dsh-adapter/plugin.js +72 -12
  116. package/lib/types/dsh-adapter/presets.d.ts +6 -4
  117. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  118. package/lib/types/dsh-adapter/presets.js +6 -4
  119. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  120. package/lib/types/dsh-adapter/providerWizard.js +6 -2
  121. package/lib/types/dsh-adapter/subagents.d.ts +1 -0
  122. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  123. package/lib/types/dsh-adapter/subagents.js +10 -1
  124. package/lib/types/i18n.d.ts +174 -18
  125. package/lib/types/i18n.d.ts.map +1 -1
  126. package/lib/types/i18n.js +53 -11
  127. package/lib/types/ink/components/App.d.ts.map +1 -1
  128. package/lib/types/ink/components/App.js +10 -1
  129. package/lib/types/ink/parse-keypress.d.ts +35 -0
  130. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  131. package/lib/types/ink/parse-keypress.js +611 -83
  132. package/lib/types/ink/terminal-querier.d.ts +25 -0
  133. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  134. package/lib/types/ink/terminal-querier.js +42 -0
  135. package/lib/types/ink/update-overflow-guard.d.ts +24 -0
  136. package/lib/types/ink/update-overflow-guard.d.ts.map +1 -1
  137. package/lib/types/ink/update-overflow-guard.js +25 -3
  138. package/lib/types/minimalUiMode.d.ts +19 -0
  139. package/lib/types/minimalUiMode.d.ts.map +1 -0
  140. package/lib/types/minimalUiMode.js +23 -0
  141. package/lib/types/oauth.d.ts +5 -10
  142. package/lib/types/oauth.d.ts.map +1 -1
  143. package/lib/types/oauth.js +5 -10
  144. package/lib/types/screens/Chat.d.ts +4 -1
  145. package/lib/types/screens/Chat.d.ts.map +1 -1
  146. package/lib/types/screens/Chat.js +27 -7
  147. package/lib/types/screens/StatusLine.d.ts +4 -0
  148. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  149. package/lib/types/screens/StatusLine.js +12 -12
  150. package/lib/types/settings/definitions.js +4 -4
  151. package/lib/types/tips.d.ts.map +1 -1
  152. package/lib/types/tips.js +10 -4
  153. package/lib/types/update.js +2 -2
  154. package/lib/types/utils/pastedImagePath.d.ts +8 -0
  155. package/lib/types/utils/pastedImagePath.d.ts.map +1 -1
  156. package/lib/types/utils/pastedImagePath.js +29 -5
  157. package/package.json +111 -100
  158. package/presets/liangshen/agent.cordis.yml +4 -1
  159. package/presets/liangshen/preset.yml +1 -1
  160. package/lib/types/minimalMode.d.ts +0 -13
  161. package/lib/types/minimalMode.d.ts.map +0 -1
  162. package/lib/types/minimalMode.js +0 -17
  163. package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +0 -21
  164. package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +0 -143
  165. package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +0 -11
  166. package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +0 -44
  167. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +0 -193
  168. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +0 -69
@@ -2,6 +2,30 @@ import { t } from '../../i18n.js';
2
2
  import { modeDisplayName } from '../../sessionModes.js';
3
3
  import { assertShadowPolicy } from '../../adapter/kernel/runtime.js';
4
4
  import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
5
+ /**
6
+ * Fail-soft reporting for a session-mode write. The mutation path reaches
7
+ * kernel-owned state (`session.append`, `approval.setPolicy` → the agent
8
+ * inbox) that can legitimately refuse while a turn is publishing, and the
9
+ * keyboard entry point (`Shift+Tab`) cannot await it — a rejection there
10
+ * becomes an unhandledRejection, which the process guard treats as fatal and
11
+ * which kills the TUI with the session still open. A refused switch is a
12
+ * user-visible outcome, not a crash: log it, say so in the status line, and
13
+ * re-derive the indicator from the durable log so the UI cannot keep showing
14
+ * a mode the session never entered. Shared by the base actions and the
15
+ * permission-aware composition so both report the same way.
16
+ */
17
+ export function reportModeSwitchFailure(ctx, notify, refreshMode, error) {
18
+ const message = error instanceof Error ? error.message : String(error);
19
+ ctx.logger.warn(`dsh-tui: session mode switch failed: ${message}`);
20
+ notify(t('mode-switch-failed', { err: message }), { color: 'error', timeoutMs: 8000 });
21
+ try {
22
+ refreshMode();
23
+ }
24
+ catch {
25
+ // Re-deriving the indicator is best effort — the failure itself is
26
+ // already reported, and a broken fold must not become a second throw.
27
+ }
28
+ }
5
29
  /** Durable session-mode folds and transitions. Construction is inert; root wires it after state construction. */
6
30
  export function createModeActions(ctx, state, deps) {
7
31
  const { owner, runtime, binding, sessionModes, commandService, executeRegistryCommand, notify } = deps;
@@ -131,8 +155,18 @@ export function createModeActions(ctx, state, deps) {
131
155
  }
132
156
  }
133
157
  };
134
- /** Apply the configured atoms; an explicit exit owns its target mode. */
135
- const applyMode = async (spec, capture = binding.capture()) => {
158
+ /** Apply the configured atoms; an explicit exit owns its target mode.
159
+ * Never rejects: a refused kernel write is reported, not thrown (see
160
+ * {@link reportModeSwitchFailure}). */
161
+ const applyMode = async (spec, capture) => {
162
+ try {
163
+ await applyModeUnsafe(spec, capture ?? binding.capture());
164
+ }
165
+ catch (error) {
166
+ reportModeSwitchFailure(ctx, notify, refreshMode, error);
167
+ }
168
+ };
169
+ const applyModeUnsafe = async (spec, capture) => {
136
170
  if (!current(capture))
137
171
  return;
138
172
  // This action writes durable session policy. The runtime snapshot comes
@@ -205,11 +239,18 @@ export function createModeActions(ctx, state, deps) {
205
239
  * from the mode DERIVED from the session log (never a stored index), so
206
240
  * manual `/plan` use can never desync the cycle. */
207
241
  const cycleMode = async () => {
208
- const capture = binding.capture();
209
- if (!current(capture))
210
- return;
211
- const index = deriveModeIndex(snapshotLiveSessionEvents(capturedSession(capture)));
212
- await applyMode(sessionModes[(index + 1) % sessionModes.length], capture);
242
+ try {
243
+ const capture = binding.capture();
244
+ if (!current(capture))
245
+ return;
246
+ const index = deriveModeIndex(snapshotLiveSessionEvents(capturedSession(capture)));
247
+ await applyMode(sessionModes[(index + 1) % sessionModes.length], capture);
248
+ }
249
+ catch (error) {
250
+ // The fold/capture ahead of the write can fail too (a dead binding, an
251
+ // unreadable log); same contract as the write itself — report it.
252
+ reportModeSwitchFailure(ctx, notify, refreshMode, error);
253
+ }
213
254
  };
214
255
  const onSessionEvent = (session, event) => {
215
256
  const capture = binding.capture();
@@ -1 +1 @@
1
- {"version":3,"file":"mode-permission-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/mode-permission-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,OAAO,EAAmB,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE7E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAkD,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAC9G,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACtD,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC,CAAA;AAClE,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAA;AACjD;gDACgD;AAChD,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;AAmEjE;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,OAA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,MAAM,CAAC,CAAA;AAClE,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAA;AACjD;gDACgD;AAChD,KAAK,kBAAkB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;AAmEjE;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE,IAAI,CACR,kBAAkB,EAClB,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,GAAG,gBAAgB,GAAG,wBAAwB,GAAG,QAAQ,CAC1G,GAAG;IAAE,MAAM,EAAE,oBAAoB,CAAA;CAAE,GACnC;IACD,WAAW,IAAI,IAAI,CAAA;IACnB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IAC1B,SAAS,CAAC,IAAI,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IACtE,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CAAA;IACtD,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;IACnD,UAAU,EAAE,kBAAkB,CAAA;CAC/B,CAsIA"}
@@ -2,7 +2,7 @@ import { assertShadowPolicy } from '../../adapter/kernel/runtime.js';
2
2
  import { t } from '../../i18n.js';
3
3
  import { modeDisplayName } from '../../sessionModes.js';
4
4
  import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
5
- import { createModeActions } from './mode-actions.js';
5
+ import { createModeActions, reportModeSwitchFailure } from './mode-actions.js';
6
6
  import { createPermissionIdentity, foldPermissionPreset } from './mode-permission.js';
7
7
  // Atom folds mirrored from mode-actions.ts: `createModeActions` does not
8
8
  // export them, and the permission-aware derive below must reproduce its
@@ -103,8 +103,18 @@ export function createPermissionModeActions(ctx, state, deps) {
103
103
  * Permission identity is applied BEFORE plan and atom changes: dynamic
104
104
  * presets use the official command path (or the service write fallback)
105
105
  * and are confirmed by event/registry readback; the TUI never manufactures
106
- * permission events. */
107
- const applyMode = async (spec, capture = binding.capture()) => {
106
+ * permission events. Never rejects: a half-applied switch (identity landed,
107
+ * atoms refused) is reported and the indicator is re-derived — the caller
108
+ * is the Shift+Tab keyboard entry, which cannot await. */
109
+ const applyMode = async (spec, capture) => {
110
+ try {
111
+ await applyModeUnsafe(spec, capture ?? binding.capture());
112
+ }
113
+ catch (error) {
114
+ reportModeSwitchFailure(ctx, notify, refreshMode, error);
115
+ }
116
+ };
117
+ const applyModeUnsafe = async (spec, capture) => {
108
118
  if (!owner.current() || !binding.isCurrent(capture))
109
119
  return;
110
120
  // This action writes durable session policy; the permission switch writes
@@ -147,13 +157,19 @@ export function createPermissionModeActions(ctx, state, deps) {
147
157
  state.emit();
148
158
  };
149
159
  /** Shift+Tab: advance from the mode DERIVED from the session log (never a
150
- * stored index), so manual `/plan` use can never desync the cycle. */
160
+ * stored index), so manual `/plan` use can never desync the cycle. Never
161
+ * rejects — same fail-soft contract as {@link applyMode}. */
151
162
  const cycleMode = async () => {
152
- const capture = binding.capture();
153
- if (!owner.current() || !binding.isCurrent(capture))
154
- return;
155
- const index = derivePermissionModeIndex(sessionModes, snapshotLiveSessionEvents(capture.agent.session));
156
- await applyMode(sessionModes[(index + 1) % sessionModes.length], capture);
163
+ try {
164
+ const capture = binding.capture();
165
+ if (!owner.current() || !binding.isCurrent(capture))
166
+ return;
167
+ const index = derivePermissionModeIndex(sessionModes, snapshotLiveSessionEvents(capture.agent.session));
168
+ await applyMode(sessionModes[(index + 1) % sessionModes.length], capture);
169
+ }
170
+ catch (error) {
171
+ reportModeSwitchFailure(ctx, notify, refreshMode, error);
172
+ }
157
173
  };
158
174
  const onSessionEvent = (session, event) => {
159
175
  const subject = session;
@@ -1,3 +1,3 @@
1
1
  import type { ChannelState } from '../channel/types.js';
2
- export declare function createPreferences(getState: () => Pick<ChannelState, 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'splashFont' | 'minimal' | 'emit'>): Pick<ChannelState, 'setDiffLayout' | 'setThinkingFold' | 'setToolBackground' | 'setScrollGutter' | 'setPageMargin' | 'setFoldTerminalCommand' | 'setPromptSessionLabel' | 'setExpandEditor' | 'setSmoothStreaming' | 'setStatusBar' | 'setWhale' | 'setWhaleIdle' | 'setWhaleGirl' | 'setSplashFont' | 'setMinimal'>;
2
+ export declare function createPreferences(getState: () => Pick<ChannelState, 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'splashFont' | 'minimalUi' | 'emit'>): Pick<ChannelState, 'setDiffLayout' | 'setThinkingFold' | 'setToolBackground' | 'setScrollGutter' | 'setPageMargin' | 'setFoldTerminalCommand' | 'setPromptSessionLabel' | 'setExpandEditor' | 'setSmoothStreaming' | 'setStatusBar' | 'setWhale' | 'setWhaleIdle' | 'setWhaleGirl' | 'setSplashFont' | 'setMinimalUi' | 'setMinimal'>;
3
3
  //# sourceMappingURL=preferences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/preferences.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,eAAe,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,eAAe,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC,CAqHxnB"}
1
+ {"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/preferences.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAYvD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,eAAe,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,eAAe,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,GAAG,YAAY,CAAC,CAuH3oB"}
@@ -1,6 +1,16 @@
1
- import { setMinimalMode } from '../../minimalMode.js';
1
+ import { setMinimalUiMode } from '../../minimalUiMode.js';
2
2
  import { normalizeSplashFont } from '../../components/splashFonts.js';
3
3
  import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
4
+ /** The single minimal-UI write path: module store + channel field + one
5
+ * revision. `setMinimalUi` and its deprecated `setMinimal` alias share it. */
6
+ function applyMinimalUi(getState, enabled) {
7
+ const state = getState();
8
+ setMinimalUiMode(enabled);
9
+ if (enabled === state.minimalUi)
10
+ return;
11
+ state.minimalUi = enabled;
12
+ state.emit();
13
+ }
4
14
  export function createPreferences(getState) {
5
15
  return {
6
16
  setDiffLayout(layout) {
@@ -107,13 +117,13 @@ export function createPreferences(getState) {
107
117
  state.whaleGirl = enabled;
108
118
  state.emit();
109
119
  },
120
+ setMinimalUi(enabled) {
121
+ applyMinimalUi(getState, enabled);
122
+ },
123
+ /** @deprecated Pre-rename alias of setMinimalUi (kept for plugin scenes
124
+ * and older embedders that call `channel.setMinimal()`). */
110
125
  setMinimal(enabled) {
111
- const state = getState();
112
- setMinimalMode(enabled);
113
- if (enabled === state.minimal)
114
- return;
115
- state.minimal = enabled;
116
- state.emit();
126
+ applyMinimalUi(getState, enabled);
117
127
  }
118
128
  };
119
129
  }
@@ -39,7 +39,9 @@ export interface ChannelLaunchOptions {
39
39
  /** Maid portrait for the header splash (settings `dsh-tui.whaleGirl`;
40
40
  * off by default). */
41
41
  whaleGirl?: boolean;
42
- minimal?: boolean;
42
+ /** Minimal UI (settings key `dsh-tui.minimal`, 极简界面 / "Minimal UI"):
43
+ * purely a decoration switch. NOT the kernel agent preset `minimal`. */
44
+ minimalUi?: boolean;
43
45
  contextBar?: boolean;
44
46
  configuredPreset?: string;
45
47
  configuredProvider?: string;
@@ -60,5 +62,5 @@ export declare function createInitialChannelView(options: ChannelLaunchOptions,
60
62
  sessionId: string;
61
63
  mode: ChannelState['mode'];
62
64
  cwdDescription: string;
63
- }): Pick<ChannelState, 'effortLevels' | 'version' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'minimal' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimal' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
65
+ }): Pick<ChannelState, 'effortLevels' | 'version' | 'rows' | 'status' | 'sessionTitle' | 'sessionColor' | 'agentId' | 'sessionId' | 'agentBindingGeneration' | 'model' | 'provider' | 'tokens' | 'cwd' | 'displayCwd' | 'gitBranch' | 'working' | 'compaction' | 'cancelPending' | 'spinnerMode' | 'responseChars' | 'activeToolCount' | 'turnStart' | 'lastUserText' | 'notifications' | 'contextWindow' | 'reasoningEffort' | 'mode' | 'modeIndex' | 'activityFrames' | 'configuredProvider' | 'configuredModel' | 'configuredPreset' | 'configuredActivityFrames' | 'configuredLang' | 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'splashFont' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'minimalUi' | 'activityEnabled' | 'contextBarEnabled' | 'agentPreset' | 'goal' | 'todos' | 'loadedContext' | 'pending' | 'commandList' | 'lastUsage' | 'tps' | 'tpsSamples' | 'contextSegments' | 'mainCost' | 'subagentCost' | 'subagents' | 'backgroundJobs' | 'selection'>;
64
66
  //# sourceMappingURL=state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,EAA2F,KAAK,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE5N,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AAC7F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,sFAAsF;AACtF,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;IACX,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;+DAE2D;IAC3D,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;IACzC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;uEAImE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;IACzC,YAAY,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IACjC,cAAc,CAAC,EAAE,cAAc,CAAA;IAC/B,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,UAAU,CAAC,EAAE,iBAAiB,CAAA;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,kBAAkB,CAAC,EAA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24
24
  pageMargin: normalizePageMargin(options.pageMargin), foldTerminalCommand: options.foldTerminalCommand === true,
25
25
  promptSessionLabel: options.promptSessionLabel === true, expandEditor: options.expandEditor !== false,
26
26
  smoothStreaming: options.smoothStreaming !== false, statusBar: normalizeStatusBar(options.statusBar),
27
- whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont), minimal: options.minimal === true, activityEnabled: options.activity !== false,
27
+ whale: options.whale !== false, whaleIdle: options.whaleIdle !== false, whaleGirl: options.whaleGirl === true, splashFont: normalizeSplashFont(options.splashFont), minimalUi: options.minimalUi === true, activityEnabled: options.activity !== false,
28
28
  contextBarEnabled: options.contextBar !== false, agentPreset: options.agentPreset, goal: undefined,
29
29
  todos: [], loadedContext: undefined, pending: [], commandList: [], lastUsage: undefined,
30
30
  tps: undefined, tpsSamples: [], contextSegments: { system: 0, prompt: 0, assistant: 0, thinking: 0, tools: 0 },
@@ -1 +1 @@
1
- {"version":3,"file":"subagent-projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/subagent-projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAEzE,OAAO,EAAE,qBAAqB,EAAsB,MAAM,iBAAiB,CAAA;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAyC,MAAM,YAAY,CAAA;AAGrF,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,MAAM,GAAG,YAAY,CAAC,CAAA;AACxG,UAAU,sBAAsB;IAC9B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,KAAK,IAAI,KAAK,CAAA;IACd,SAAS,IAAI;QAAE,SAAS,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,G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;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,KAAG,IAAI,CA/PnE,CAAC,CAAC,CAAC,WAAW,MAAM,GAAG,IAAI;2BAC/C,OAAO;6BACL,SAAS,OAAO,EAAE;;;;kBA5CxB,KAAK,KAAG,IAAI;qBAIT,KAAK,KAAG,IAAI;kBAkDpB,KAAK;;;EAItB"}
@@ -158,6 +158,7 @@ function createSessionSubagentProjection(getState, deps) {
158
158
  }
159
159
  const view = {
160
160
  agentId: sub.agentId, runId: sub.runId, description: sub.description,
161
+ ...(sub.mode === undefined ? {} : { mode: sub.mode }),
161
162
  provider: sub.provider, model: sub.model || 'default', effort: sub.effort,
162
163
  status: sub.status, startedAt: sub.startedAt, completedAt: sub.completedAt,
163
164
  durationMs: sub.completedAt ? sub.completedAt - sub.startedAt : Date.now() - sub.startedAt,
@@ -276,6 +277,7 @@ function createSessionSubagentProjection(getState, deps) {
276
277
  live: running,
277
278
  provider: info.provider ?? child?.options?.provider,
278
279
  model: child?.options?.model,
280
+ ...(info.mode === undefined ? {} : { mode: info.mode }),
279
281
  });
280
282
  if (info.runId !== undefined)
281
283
  store.patch(childId, { runId: info.runId });
@@ -311,9 +313,12 @@ function createSessionSubagentProjection(getState, deps) {
311
313
  else if (ev.type === 'subagent/catalog') {
312
314
  if (childId === undefined)
313
315
  return;
316
+ const rawMode = typeof data.mode === 'string' ? data.mode : undefined;
314
317
  discover(childId, {
315
318
  label: typeof data.label === 'string' ? data.label : undefined,
316
319
  childCreatedAt: typeof data.childCreatedAt === 'number' ? data.childCreatedAt : eventTime(event),
320
+ // v0 rows carry no mode; v1 also retains 'unknown' children.
321
+ ...(rawMode === 'one-shot' || rawMode === 'continuable' || rawMode === 'unknown' ? { mode: rawMode } : {}),
317
322
  });
318
323
  }
319
324
  else if (ev.type === 'tool-workflow/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EAAE,SAAS,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,cAAc,EAAE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACrxB,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA"}
@@ -162,6 +162,7 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
162
162
  const jobControl = jobProjection.control;
163
163
  const attachJobs = jobProjection.attach;
164
164
  const resetJobProjection = jobProjection.reset;
165
+ const reanchorJobProjection = jobProjection.reanchor;
165
166
  // The DSH slash-command registry (optional service): /plan, /goal and
166
167
  // friends register here; the TUI merges their descriptors into the slash
167
168
  // menu and dispatches through `execute` (which logs the paired
@@ -413,6 +414,15 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
413
414
  mode: sessionModes[0],
414
415
  cwdDescription: workspaceService.describe(options.cwd).description ?? options.cwd,
415
416
  }),
417
+ // Deprecated pre-rename alias of `minimalUi`. An accessor is required here
418
+ // (a field set in createInitialChannelView would be copied by the spread
419
+ // into a stale data property). Read-only on purpose: the only supported
420
+ // write path is `setMinimalUi()` / its `setMinimal()` alias, and the
421
+ // frozen `ChannelUi` view third-party scenes receive exposes it read-only
422
+ // anyway.
423
+ get minimal() {
424
+ return state.minimalUi;
425
+ },
416
426
  commandList: LOCAL_COMMANDS,
417
427
  ...actionMethods,
418
428
  subagentControl,
@@ -715,7 +725,12 @@ function createChannelWithOwner(ctx, initialAgent, options, owner) {
715
725
  messageObserver,
716
726
  retireAttachment,
717
727
  });
718
- const bindAgent = bindingEvents.bind;
728
+ const rawBindAgent = bindingEvents.bind;
729
+ /** Bind the new agent, then re-anchor the job projection: its event
730
+ * subscription is deliberately owner-agnostic, so this is what makes the
731
+ * /jobs roster follow a session switch immediately instead of waiting for
732
+ * the new session's first job event. */
733
+ const bindAgent = () => { rawBindAgent(); reanchorJobProjection(); };
719
734
  const sessionAdoption = createSessionAdoption(state, {
720
735
  binding,
721
736
  rowIds,
@@ -1,9 +1,10 @@
1
1
  /** Primary validated upstream line (newest). */
2
- export declare const UPSTREAM_VALIDATED_VERSION = "0.2.0-rc.1";
2
+ export declare const UPSTREAM_VALIDATED_VERSION = "0.2.0-rc.2";
3
3
  /**
4
4
  * Explicitly supported upstream prerelease lines, oldest first.
5
5
  *
6
- * 0.2.0-rc.1 = primary continuous-CI line; 0.1.7-rc.2/rc.1 = previous
6
+ * 0.2.0-rc.2 = primary continuous-CI line; 0.2.0-rc.1 and
7
+ * 0.1.7-rc.2/rc.1 = previous
7
8
  * family (mapped compatibility); 0.1.5-rc.1/alpha.2/alpha.1 = mapped
8
9
  * compatibility lines (source-checked when the primary line moves);
9
10
  * 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
@@ -16,14 +17,14 @@ export declare const UPSTREAM_VALIDATED_VERSION = "0.2.0-rc.1";
16
17
  * The peer range in package.json is deliberately wider than this list: an
17
18
  * install on an older or newer line is allowed but reports drift at boot.
18
19
  */
19
- export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.1.0-rc.6", "0.1.0-rc.7", "0.1.0-rc.8", "0.1.1-rc.1", "0.1.1-rc.2", "0.1.2-alpha.3", "0.1.2-alpha.4", "0.1.2-alpha.5", "0.1.2-rc.1", "0.1.3-alpha.2", "0.1.5-alpha.1", "0.1.5-alpha.2", "0.1.5-rc.1", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1"];
20
+ export declare const UPSTREAM_VALIDATED_VERSIONS: readonly ["0.1.0-rc.6", "0.1.0-rc.7", "0.1.0-rc.8", "0.1.1-rc.1", "0.1.1-rc.2", "0.1.2-alpha.3", "0.1.2-alpha.4", "0.1.2-alpha.5", "0.1.2-rc.1", "0.1.3-alpha.2", "0.1.5-alpha.1", "0.1.5-alpha.2", "0.1.5-rc.1", "0.1.7-rc.1", "0.1.7-rc.2", "0.2.0-rc.1", "0.2.0-rc.2"];
20
21
  /**
21
22
  * Framework packages version on their own lines; the contract validates
22
23
  * their MAJOR (breaking surface), not the harness prerelease number.
23
24
  */
24
25
  export declare const UPSTREAM_FRAMEWORK_MAJORS: Record<string, number>;
25
26
  /** Official packages the adapter consumes at runtime or as types. */
26
- export declare const UPSTREAM_BLESSED_PACKAGES: readonly ["@deepseek-ai/cordis", "@deepseek-ai/schemastery", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-preset-registry", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-ptc-runtime-node", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-cordis-host-runner", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-persona", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-storage", "@deepseek-ai/dsh-storage-domain", "@deepseek-ai/dsh-storage-json", "@deepseek-ai/dsh-workspace", "@deepseek-ai/dsh-web-app", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-terminal", "@deepseek-ai/dsh-terminal-bash", "@deepseek-ai/dsh-tool-ask-user", "@deepseek-ai/dsh-tool-bash-persistent", "@deepseek-ai/dsh-tool-cordis", "@deepseek-ai/dsh-tool-subagent", "@deepseek-ai/dsh-user-approval", "@deepseek-ai/dsh-user-questions"];
27
+ export declare const UPSTREAM_BLESSED_PACKAGES: readonly ["@deepseek-ai/cordis", "@deepseek-ai/schemastery", "@deepseek-ai/dsh-invariants", "@deepseek-ai/dsh-agent", "@deepseek-ai/dsh-agent-instructions", "@deepseek-ai/dsh-agent-preset-registry", "@deepseek-ai/dsh-atomic-write", "@deepseek-ai/dsh-ptc-runtime-node", "@deepseek-ai/dsh-commands", "@deepseek-ai/dsh-cordis-host-runner", "@deepseek-ai/dsh-deepseek-account", "@deepseek-ai/dsh-host-webserver", "@deepseek-ai/dsh-llm", "@deepseek-ai/dsh-llm-pi-ai", "@deepseek-ai/dsh-persona", "@deepseek-ai/dsh-scope", "@deepseek-ai/dsh-session", "@deepseek-ai/dsh-settings", "@deepseek-ai/dsh-skill", "@deepseek-ai/dsh-storage", "@deepseek-ai/dsh-storage-domain", "@deepseek-ai/dsh-storage-json", "@deepseek-ai/dsh-workspace", "@deepseek-ai/dsh-web-app", "@deepseek-ai/dsh-system-prompt", "@deepseek-ai/dsh-terminal", "@deepseek-ai/dsh-terminal-bash", "@deepseek-ai/dsh-tool-ask-user", "@deepseek-ai/dsh-tool-bash-persistent", "@deepseek-ai/dsh-tool-cordis", "@deepseek-ai/dsh-tool-subagent", "@deepseek-ai/dsh-user-approval", "@deepseek-ai/dsh-user-questions"];
27
28
  export interface UpstreamDriftEntry {
28
29
  package: string;
29
30
  installed: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../../src/dsh-adapter/contract.ts"],"names":[],"mappings":"AAkBA,gDAAgD;AAChD,eAAO,MAAM,0BAA0B,eAAe,CAAA;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,2BAA2B,6PAiB9B,CAAA;AAEV;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAG5D,CAAA;AAED,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,89BAgC5B,CAAA;AAEV,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,MAAM,CAAA;CAClB;AAUD,4EAA4E;AAC5E,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,CAAA;AAE/D,4FAA4F;AAC5F,MAAM,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,EAAE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E9F;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,kBAAkB,EAAE,CAuBtB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEtE,wEAAwE;AACxE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,iBAAiB,CAAA;IACvB,sFAAsF;IACtF,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,iBAAiB,GAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAA+B,GAC5F,oBAAoB,GAAG,SAAS,CA0BlC"}
@@ -2,7 +2,7 @@
2
2
  * Upstream compatibility contract.
3
3
  *
4
4
  * The TUI is validated against a set of upstream prerelease lines — the
5
- * current primary (0.2.0-rc.1) plus older lines kept in backward
5
+ * current primary (0.2.0-rc.2) plus older lines kept in backward
6
6
  * compatibility across the 0.1.7, 0.1.5, 0.1.3, 0.1.2, 0.1.1 and 0.1.0
7
7
  * release families.
8
8
  * Every official package this adapter touches is blessed here; anything
@@ -16,11 +16,12 @@
16
16
  import { readFileSync } from 'node:fs';
17
17
  import { fileURLToPath } from 'node:url';
18
18
  /** Primary validated upstream line (newest). */
19
- export const UPSTREAM_VALIDATED_VERSION = '0.2.0-rc.1';
19
+ export const UPSTREAM_VALIDATED_VERSION = '0.2.0-rc.2';
20
20
  /**
21
21
  * Explicitly supported upstream prerelease lines, oldest first.
22
22
  *
23
- * 0.2.0-rc.1 = primary continuous-CI line; 0.1.7-rc.2/rc.1 = previous
23
+ * 0.2.0-rc.2 = primary continuous-CI line; 0.2.0-rc.1 and
24
+ * 0.1.7-rc.2/rc.1 = previous
24
25
  * family (mapped compatibility); 0.1.5-rc.1/alpha.2/alpha.1 = mapped
25
26
  * compatibility lines (source-checked when the primary line moves);
26
27
  * 0.1.3-alpha.2 = compatibility line (the only 0.1.3 build on npm);
@@ -50,6 +51,7 @@ export const UPSTREAM_VALIDATED_VERSIONS = [
50
51
  '0.1.7-rc.1',
51
52
  '0.1.7-rc.2',
52
53
  '0.2.0-rc.1',
54
+ '0.2.0-rc.2',
53
55
  ];
54
56
  /**
55
57
  * Framework packages version on their own lines; the contract validates
@@ -71,6 +73,8 @@ export const UPSTREAM_BLESSED_PACKAGES = [
71
73
  '@deepseek-ai/dsh-ptc-runtime-node',
72
74
  '@deepseek-ai/dsh-commands',
73
75
  '@deepseek-ai/dsh-cordis-host-runner',
76
+ '@deepseek-ai/dsh-deepseek-account',
77
+ '@deepseek-ai/dsh-host-webserver',
74
78
  '@deepseek-ai/dsh-llm',
75
79
  '@deepseek-ai/dsh-llm-pi-ai',
76
80
  '@deepseek-ai/dsh-persona',
@@ -98,6 +102,8 @@ export const UPSTREAM_BLESSED_PACKAGES = [
98
102
  const OPTIONAL_RUNTIME_PACKAGES = new Set([
99
103
  '@deepseek-ai/dsh-agent-preset-registry',
100
104
  '@deepseek-ai/dsh-ptc-runtime-node',
105
+ '@deepseek-ai/dsh-deepseek-account',
106
+ '@deepseek-ai/dsh-host-webserver',
101
107
  '@deepseek-ai/dsh-web-app',
102
108
  ]);
103
109
  /** Parse an upstream prerelease version; undefined when unparseable. */
@@ -1,5 +1,5 @@
1
- import type { BackgroundJobStatus, BackgroundJobState } from '../adapter/ports/channel-view.js';
2
- export type { BackgroundJobStatus, BackgroundJobState } from '../adapter/ports/channel-view.js';
1
+ import type { BackgroundJobOutputChannel, BackgroundJobStatus, BackgroundJobState } from '../adapter/ports/channel-view.js';
2
+ export type { BackgroundJobOutputChannel, BackgroundJobOutputLine, BackgroundJobStatus, BackgroundJobState } from '../adapter/ports/channel-view.js';
3
3
  /**
4
4
  * Structural mirror of the registry's `JobSnapshot` — only the fields the
5
5
  * UI reads. Declared locally so no `@deepseek-ai/dsh-jobs` dependency (peer
@@ -15,24 +15,79 @@ export interface BackgroundJobSnapshot {
15
15
  status: BackgroundJobStatus;
16
16
  /** Kind-specific status detail, usually terminal ('exit code: 0'). */
17
17
  detail?: string;
18
+ /** Live producer progress line (`3/10`, phase name); cleared at settle. */
19
+ progress?: string;
18
20
  /** Epoch ms when the job was registered. */
19
21
  startedAt: number;
20
22
  /** Epoch ms when the job settled; absent while running/stopping. */
21
23
  finishedAt?: number;
24
+ /** Output-ring facts when the snapshot came from the real registry:
25
+ * `total`/`earliest` are absolute byte coordinates; `spillPaths` name
26
+ * producer-retained files holding the complete stream. */
27
+ output?: {
28
+ total: number;
29
+ earliest: number;
30
+ spillPaths?: readonly string[];
31
+ };
32
+ }
33
+ /** Kernel `output` event: no payload — observers pull `readAt` themselves. */
34
+ export interface KernelJobOutputEvent {
35
+ type: 'output';
36
+ id: string;
37
+ owner?: string;
38
+ total: number;
39
+ }
40
+ /** Kernel lifecycle event carrying the committed job projection. */
41
+ export interface KernelJobLifecycleEvent {
42
+ type: 'registered' | 'progress' | 'stopping' | 'settled' | 'removed';
43
+ job: BackgroundJobSnapshot;
44
+ /** Settlement extras (`settled` only): who ended it, whether a waiter
45
+ * had already collected it (the UI skips duplicate toasts then). */
46
+ cause?: 'producer' | 'kill' | 'teardown';
47
+ awaited?: boolean;
48
+ }
49
+ export type KernelJobEvent = KernelJobOutputEvent | KernelJobLifecycleEvent;
50
+ /** One kernel output-ring chunk at an absolute byte offset. */
51
+ export interface KernelJobChunk {
52
+ at: number;
53
+ text: string;
54
+ channel?: BackgroundJobOutputChannel;
55
+ gapBefore?: true;
56
+ }
57
+ /** Non-consuming ring read result; `next` is the resume offset. */
58
+ export interface KernelJobOutputRead {
59
+ chunks: readonly KernelJobChunk[];
60
+ next: number;
61
+ lossy?: boolean;
22
62
  }
23
63
  /**
24
64
  * Duck-typed registry surface the channel consumes. `caller` is the owning
25
- * live agent (`Agent` in the harness) — typed as object here because the
26
- * UI only forwards the instance it already holds.
65
+ * session id string (`Agent.id`): the kernel fence compares
66
+ * `job.owner.id === caller`, so passing the Agent OBJECT matches nothing —
67
+ * the id string is the only value that opens owned jobs.
27
68
  */
28
69
  export interface JobsRuntime {
29
70
  /** Caller-owned + unowned job snapshots in registration order. */
30
- list(caller?: object): BackgroundJobSnapshot[];
71
+ list(caller?: string): BackgroundJobSnapshot[];
31
72
  /** Request cancellation by id; resolves to 'requested'/'already-finished'. */
32
- kill(id: string, caller?: object, reason?: string): unknown;
33
- /** Fires after every commit changing one owner's visible set; re-read. */
73
+ kill(id: string, caller?: string, reason?: string): unknown;
74
+ /**
75
+ * Kernel event bus (the real `JobRegistry.events` surface). Present on
76
+ * modern kernels: lifecycle events re-read the roster, `output` events
77
+ * pull `readAt` increments with the UI's own byte cursor. Absent on older
78
+ * kernels and test doubles — the mirror falls back to `onJobsChanged` +
79
+ * `job_output` tails.
80
+ */
81
+ events?: {
82
+ subscribe(filter: {
83
+ owner?: string;
84
+ owners?: 'all' | 'scope';
85
+ }, listener: (event: KernelJobEvent) => void): () => void;
86
+ };
87
+ /** Non-consuming ring read at an absolute byte offset (kernel `readAt`). */
88
+ readAt?(id: string, from: number, caller?: string): KernelJobOutputRead;
89
+ /** Legacy push hooks; absent on the real registry, kept for old doubles. */
34
90
  onJobsChanged?(listener: (owner: unknown) => void): () => void;
35
- /** Fires on every settlement with the terminal snapshot + owner. */
36
91
  onJobDone?(listener: (snapshot: BackgroundJobSnapshot, owner: unknown) => void): () => void;
37
92
  }
38
93
  /** Store event hooks the channel injects (toast on settle, emit on change). */
@@ -47,17 +102,11 @@ export declare const JOBS_MAX_TRACKED = 40;
47
102
  /** Output tail lines retained per job (the card waterfall shows the last 3;
48
103
  * the /jobs panel detail shows the whole retained tail). */
49
104
  export declare const JOBS_MAX_OUTPUT_LINES = 30;
50
- /**
51
- * Ordered store of the current conversation's background jobs. Fed by
52
- * {@link BackgroundJobStore.replace} with a fresh `list()` after every
53
- * `onJobsChanged` commit, and by {@link BackgroundJobStore.onOutputSeen}
54
- * with the tail of every `job_output` tool result. Emits no React state of
55
- * its own — the channel wires the events into its version bump, exactly
56
- * like the subagent projection.
57
- */
58
105
  export declare class BackgroundJobStore {
59
106
  private readonly events;
60
107
  private readonly jobs;
108
+ /** Kernel-ring read state per job id (own cursor — never the model's). */
109
+ private readonly kernelReads;
61
110
  /** Commands captured from start acks that arrived before the registry
62
111
  * registered the job (the tool/result stream and the registry commit can
63
112
  * race); consumed on registration. */
@@ -88,6 +137,23 @@ export declare class BackgroundJobStore {
88
137
  * @param at - wall-clock receipt time of the read (defaults to now).
89
138
  */
90
139
  onOutputSeen(id: string, text: string, at?: number): void;
140
+ /**
141
+ * Seed the kernel-ring cursor for one job at its retained head. Called from
142
+ * replace() whenever a snapshot carries ring facts — before any output
143
+ * pull — so the first readAt starts at `earliest`, never at 0 (bytes
144
+ * before `earliest` are already evicted).
145
+ */
146
+ private seedKernelRead;
147
+ /**
148
+ * Pull one non-consuming increment from the kernel ring after an `output`
149
+ * event. Chunks split into lines; a chunk without a trailing newline parks
150
+ * its tail until the next pull (producers append streaming bytes, so line
151
+ * boundaries routinely straddle chunks). `gapBefore`/`lossy` mark bytes
152
+ * lost before the retained tail — surfaced as the dropped banner.
153
+ */
154
+ onKernelOutput(id: string, read: KernelJobOutputRead, at?: number): void;
155
+ /** Kernel read state accessor for tests and cursor diagnostics. */
156
+ kernelCursorOf(id: string): number | undefined;
91
157
  /** A fresh snapshot in registration order (newest tracked job last). */
92
158
  snapshot(): readonly BackgroundJobState[];
93
159
  get(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