@askdkc/dsh-cli 0.12.3 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/cordis.patch.yml +12 -131
  2. package/lib/types/adapter/channel/session-projection.d.ts.map +1 -1
  3. package/lib/types/adapter/channel/session-projection.js +0 -7
  4. package/lib/types/adapter/ports/channel-view.d.ts +1 -1
  5. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  6. package/lib/types/dsh-adapter/bundled-presets.d.ts +3 -8
  7. package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -1
  8. package/lib/types/dsh-adapter/bundled-presets.js +5 -20
  9. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  10. package/lib/types/dsh-adapter/channel/binding-events.js +2 -9
  11. package/lib/types/dsh-adapter/channel/external-commands.d.ts.map +1 -1
  12. package/lib/types/dsh-adapter/channel/external-commands.js +9 -33
  13. package/lib/types/dsh-adapter/channel/local-actions.d.ts +2 -1
  14. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  15. package/lib/types/dsh-adapter/channel/local-actions.js +6 -2
  16. package/lib/types/dsh-adapter/channel/model-actions.js +3 -3
  17. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  18. package/lib/types/dsh-adapter/channel/model-switch.js +0 -1
  19. package/lib/types/dsh-adapter/channel/permissions.d.ts +1 -6
  20. package/lib/types/dsh-adapter/channel/permissions.d.ts.map +1 -1
  21. package/lib/types/dsh-adapter/channel/permissions.js +2 -54
  22. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  23. package/lib/types/dsh-adapter/channel/projection.js +15 -70
  24. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  25. package/lib/types/dsh-adapter/channel/session-fork.js +2 -5
  26. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  27. package/lib/types/dsh-adapter/channel/session-metadata.js +1 -4
  28. package/lib/types/dsh-adapter/channel/session-resume.js +2 -2
  29. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  30. package/lib/types/dsh-adapter/channel/session-rewind.js +0 -1
  31. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  32. package/lib/types/dsh-adapter/channel/session-tree-actions.js +1 -2
  33. package/lib/types/dsh-adapter/channel/session-tree.d.ts.map +1 -1
  34. package/lib/types/dsh-adapter/channel/session-tree.js +9 -62
  35. package/lib/types/dsh-adapter/channel/skill-catalog.js +1 -1
  36. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  37. package/lib/types/dsh-adapter/channel/subagent-projection.js +2 -8
  38. package/lib/types/dsh-adapter/channel/transcript.d.ts +0 -16
  39. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  40. package/lib/types/dsh-adapter/channel/transcript.js +0 -43
  41. package/lib/types/dsh-adapter/channel.js +2 -2
  42. package/lib/types/dsh-adapter/compat/index.d.ts +5 -25
  43. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
  44. package/lib/types/dsh-adapter/compat/index.js +5 -25
  45. package/lib/types/dsh-adapter/compat/liveSession.d.ts +12 -23
  46. package/lib/types/dsh-adapter/compat/liveSession.d.ts.map +1 -1
  47. package/lib/types/dsh-adapter/compat/liveSession.js +15 -68
  48. package/lib/types/dsh-adapter/compat/messages.d.ts +1 -3
  49. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
  50. package/lib/types/dsh-adapter/compat/messages.js +2 -10
  51. package/lib/types/dsh-adapter/compat/persistence.d.ts +2 -3
  52. package/lib/types/dsh-adapter/compat/persistence.d.ts.map +1 -1
  53. package/lib/types/dsh-adapter/compat/persistence.js +9 -14
  54. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +10 -144
  55. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  56. package/lib/types/dsh-adapter/compat/sessionLog.js +45 -275
  57. package/lib/types/dsh-adapter/compat/settings.d.ts +4 -10
  58. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
  59. package/lib/types/dsh-adapter/compat/settings.js +6 -23
  60. package/lib/types/dsh-adapter/compat/shell.d.ts +2 -3
  61. package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -1
  62. package/lib/types/dsh-adapter/compat/shell.js +2 -7
  63. package/lib/types/dsh-adapter/contract.d.ts +4 -34
  64. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  65. package/lib/types/dsh-adapter/contract.js +8 -83
  66. package/lib/types/dsh-adapter/packaged-presets.d.ts +0 -19
  67. package/lib/types/dsh-adapter/packaged-presets.d.ts.map +1 -1
  68. package/lib/types/dsh-adapter/packaged-presets.js +1 -83
  69. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  70. package/lib/types/dsh-adapter/plugin.js +26 -183
  71. package/lib/types/dsh-adapter/preset-resolution.d.ts +1 -22
  72. package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -1
  73. package/lib/types/dsh-adapter/preset-resolution.js +0 -34
  74. package/lib/types/dsh-adapter/presets.d.ts +1 -4
  75. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  76. package/lib/types/dsh-adapter/presets.js +3 -6
  77. package/lib/types/dsh-adapter/questions-answerer.d.ts +5 -43
  78. package/lib/types/dsh-adapter/questions-answerer.d.ts.map +1 -1
  79. package/lib/types/dsh-adapter/questions-answerer.js +7 -63
  80. package/lib/types/dsh-adapter/sessionTree.d.ts +0 -19
  81. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
  82. package/lib/types/dsh-adapter/sessionTree.js +2 -112
  83. package/lib/types/dsh-adapter/sessions/header.d.ts +2 -2
  84. package/lib/types/dsh-adapter/sessions/header.d.ts.map +1 -1
  85. package/lib/types/dsh-adapter/sessions/header.js +2 -8
  86. package/lib/types/dsh-adapter/sessions/list.d.ts +7 -28
  87. package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
  88. package/lib/types/dsh-adapter/sessions/list.js +48 -103
  89. package/lib/types/dsh-adapter/sessions/store.d.ts +1 -2
  90. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
  91. package/lib/types/dsh-adapter/sessions/store.js +7 -10
  92. package/lib/types/dsh-adapter/sharp.d.ts.map +1 -1
  93. package/lib/types/dsh-adapter/sharp.js +0 -1
  94. package/lib/types/dsh-adapter/subagents.d.ts +1 -2
  95. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  96. package/lib/types/dsh-adapter/subagents.js +1 -12
  97. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +1 -1
  98. package/lib/types/dsh-adapter/trajectory/aggregate.js +1 -1
  99. package/lib/types/dsh-adapter/trajectory/guards.d.ts +5 -22
  100. package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -1
  101. package/lib/types/dsh-adapter/trajectory/guards.js +5 -23
  102. package/lib/types/dsh-adapter/trajectory/projection.d.ts +5 -21
  103. package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -1
  104. package/lib/types/dsh-adapter/trajectory/projection.js +4 -38
  105. package/lib/types/dsh-adapter/trajectory/types.d.ts +1 -1
  106. package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -1
  107. package/lib/types/i18n.d.ts +2 -22
  108. package/lib/types/i18n.d.ts.map +1 -1
  109. package/lib/types/i18n.js +2 -10
  110. package/lib/types/presetPrefs.d.ts +1 -3
  111. package/lib/types/presetPrefs.d.ts.map +1 -1
  112. package/lib/types/presetPrefs.js +2 -4
  113. package/lib/types/sessionHistory.d.ts +2 -0
  114. package/lib/types/sessionHistory.d.ts.map +1 -1
  115. package/lib/types/sessionHistory.js +8 -0
  116. package/node_modules/@askdkc/dsh-auth/README.ja.md +28 -9
  117. package/node_modules/@askdkc/dsh-auth/README.md +19 -8
  118. package/node_modules/@askdkc/dsh-auth/dsh-plugin.json +3 -3
  119. package/node_modules/@askdkc/dsh-auth/lib/THIRD_PARTY_NOTICES.txt +168 -0
  120. package/node_modules/@askdkc/dsh-auth/lib/abortable.d.ts +2 -0
  121. package/node_modules/@askdkc/dsh-auth/lib/abortable.js +9 -0
  122. package/node_modules/@askdkc/dsh-auth/lib/auth-contract.d.ts +66 -0
  123. package/node_modules/@askdkc/dsh-auth/lib/auth-contract.js +1 -0
  124. package/node_modules/@askdkc/dsh-auth/lib/command.js +15 -1
  125. package/node_modules/@askdkc/dsh-auth/lib/credentials.d.ts +8 -14
  126. package/node_modules/@askdkc/dsh-auth/lib/credentials.js +1 -1
  127. package/node_modules/@askdkc/dsh-auth/lib/index.d.ts +8 -28
  128. package/node_modules/@askdkc/dsh-auth/lib/index.js +67 -65
  129. package/node_modules/@askdkc/dsh-auth/lib/interaction.d.ts +5 -5
  130. package/node_modules/@askdkc/dsh-auth/lib/opencode-adapter.d.ts +37 -0
  131. package/node_modules/@askdkc/dsh-auth/lib/opencode-adapter.js +206 -0
  132. package/node_modules/@askdkc/dsh-auth/lib/opencode-catalog.d.ts +72 -0
  133. package/node_modules/@askdkc/dsh-auth/lib/opencode-catalog.js +252 -0
  134. package/node_modules/@askdkc/dsh-auth/lib/opencode-codec.d.ts +6 -0
  135. package/node_modules/@askdkc/dsh-auth/lib/opencode-codec.js +93 -0
  136. package/node_modules/@askdkc/dsh-auth/lib/opencode-owned.generated.d.ts +113 -0
  137. package/node_modules/@askdkc/dsh-auth/lib/opencode-owned.generated.js +2866 -0
  138. package/node_modules/@askdkc/dsh-auth/lib/opencode-replay.d.ts +15 -0
  139. package/node_modules/@askdkc/dsh-auth/lib/opencode-replay.js +141 -0
  140. package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.d.ts +5 -0
  141. package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.js +43465 -0
  142. package/node_modules/@askdkc/dsh-auth/lib/opencode-sdk.js.map +7 -0
  143. package/node_modules/@askdkc/dsh-auth/lib/opencode-transport.d.ts +5 -0
  144. package/node_modules/@askdkc/dsh-auth/lib/opencode-transport.js +69 -0
  145. package/node_modules/@askdkc/dsh-auth/lib/pi-routes.d.ts +32 -0
  146. package/node_modules/@askdkc/dsh-auth/lib/pi-routes.js +45 -0
  147. package/node_modules/@askdkc/dsh-auth/lib/profiles.d.ts +2 -20
  148. package/node_modules/@askdkc/dsh-auth/lib/profiles.js +6 -41
  149. package/node_modules/@askdkc/dsh-auth/lib/routes.d.ts +20 -0
  150. package/node_modules/@askdkc/dsh-auth/lib/routes.js +13 -0
  151. package/node_modules/@askdkc/dsh-auth/lib/service.d.ts +11 -2
  152. package/node_modules/@askdkc/dsh-auth/lib/service.js +26 -16
  153. package/node_modules/@askdkc/dsh-auth/package.json +26 -15
  154. package/package.json +100 -96
  155. package/lib/types/dsh-adapter/providerGuard.d.ts +0 -75
  156. package/lib/types/dsh-adapter/providerGuard.d.ts.map +0 -1
  157. package/lib/types/dsh-adapter/providerGuard.js +0 -104
  158. package/lib/types/migrationPrefs.d.ts +0 -60
  159. package/lib/types/migrationPrefs.d.ts.map +0 -1
  160. package/lib/types/migrationPrefs.js +0 -97
  161. package/node_modules/@askdkc/dsh-auth/lib/fresh-models.d.ts +0 -59
  162. package/node_modules/@askdkc/dsh-auth/lib/fresh-models.js +0 -246
  163. package/node_modules/@askdkc/dsh-auth/lib/opencode-snapshot.generated.d.ts +0 -321
  164. package/node_modules/@askdkc/dsh-auth/lib/opencode-snapshot.generated.js +0 -528
  165. package/presets/liangshen/.dsh-tui-managed.json +0 -5
@@ -23,8 +23,6 @@ export declare function permissionPresetRuntime(service: unknown): PermissionPre
23
23
  * The registry may reuse and mutate its option objects between reads; callers
24
24
  * must observe one stable snapshot instead of a live view into that service. */
25
25
  export declare function freezePermissionPresetSnapshot(snapshot: PermissionPresetSnapshot): PermissionPresetSnapshot;
26
- export declare function legacyPermissionPresetOptions(): readonly PermissionPresetOption[];
27
- export declare function legacyPermissionPresetSnapshot(sandbox: SessionModeSpec['sandbox']): PermissionPresetSnapshot;
28
26
  export declare function unavailablePermissionPresetSnapshot(): PermissionPresetSnapshot;
29
27
  export declare function normalizePermissionPresetOption(value: unknown): PermissionPresetOption | undefined;
30
28
  /** Atom bundles the deployment's preset table resolves (value →
@@ -32,9 +30,6 @@ export declare function normalizePermissionPresetOption(value: unknown): Permiss
32
30
  * `resolve` seam — canonical resolution then falls back to the stock
33
31
  * bundles (see `canonicalPresetFor`). */
34
32
  export declare function permissionBundlesFromService(service: unknown): readonly PermissionPresetBundle[];
35
- /** The registry's current readback for one subject. Real harness registries
36
- * resolve `current(session)` through their session-projections seam; earlier
37
- * contract versions folded a raw event log. Try the subject as given, then
38
- * the event-log shape it may carry. */
33
+ /** Read the current registry's Session-based projection. */
39
34
  export declare function permissionPresetSnapshotFromService(service: unknown, subject: unknown): PermissionPresetSnapshot;
40
35
  //# sourceMappingURL=permissions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/permissions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAE3G,eAAO,MAAM,wBAAwB,WAAW,CAAA;AAEhD,eAAO,MAAM,4BAA4B,MAAM,CAAA;AAE/C,eAAO,MAAM,mCAAmC,MAAM,CAAA;AAEtD;;gFAEgF;AAChF,MAAM,WAAW,uBAAwB,SAAQ,uBAAuB;IACtE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IACnC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAClD;AAED,iDAAiD;AACjD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,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BAAwB,SAAQ,uBAAuB;IACtE,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IACnC,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;CAClD;AAED,iDAAiD;AACjD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAA;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;CAChD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,oEAAoE;AACpE,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,uBAAuB,GAAG,SAAS,CAE7F;AAED;;iFAEiF;AACjF,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,wBAAwB,GAAG,wBAAwB,CAQ3G;AAED,wBAAgB,mCAAmC,IAAI,wBAAwB,CAE9E;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,GAAG,SAAS,CAclG;AAED;;;0CAG0C;AAC1C,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,sBAAsB,EAAE,CAwBhG;AAED,4DAA4D;AAC5D,wBAAgB,mCAAmC,CACjD,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,OAAO,GACf,wBAAwB,CA0D1B"}
@@ -1,4 +1,3 @@
1
- import { t } from '../../i18n.js';
2
1
  import { cleanRenderText } from '../sanitize.js';
3
2
  export const PERMISSION_PRESET_CUSTOM = 'custom';
4
3
  export const PERMISSION_PRESET_NAME_CELLS = 120;
@@ -22,36 +21,6 @@ export function freezePermissionPresetSnapshot(snapshot) {
22
21
  ...(current === undefined ? {} : { current }),
23
22
  });
24
23
  }
25
- export function legacyPermissionPresetOptions() {
26
- return [
27
- {
28
- value: 'read-only',
29
- name: t('permission-preset-readonly'),
30
- description: t('permission-preset-readonly-desc'),
31
- },
32
- {
33
- value: 'workspace-write',
34
- name: t('permission-preset-workspace-write'),
35
- description: t('permission-preset-workspace-write-desc'),
36
- },
37
- {
38
- value: 'danger-full-access',
39
- name: t('permission-preset-full-access'),
40
- description: t('permission-preset-full-access-desc'),
41
- },
42
- ];
43
- }
44
- export function legacyPermissionPresetSnapshot(sandbox) {
45
- const options = legacyPermissionPresetOptions();
46
- const currentOption = sandbox === undefined ? undefined : options.find(option => option.value === sandbox);
47
- return freezePermissionPresetSnapshot({
48
- availability: 'legacy',
49
- options,
50
- ...(currentOption === undefined
51
- ? {}
52
- : { current: { ...currentOption, kind: 'preset' } }),
53
- });
54
- }
55
24
  export function unavailablePermissionPresetSnapshot() {
56
25
  return freezePermissionPresetSnapshot({ availability: 'unavailable', options: [] });
57
26
  }
@@ -105,10 +74,7 @@ export function permissionBundlesFromService(service) {
105
74
  }
106
75
  return bundles;
107
76
  }
108
- /** The registry's current readback for one subject. Real harness registries
109
- * resolve `current(session)` through their session-projections seam; earlier
110
- * contract versions folded a raw event log. Try the subject as given, then
111
- * the event-log shape it may carry. */
77
+ /** Read the current registry's Session-based projection. */
112
78
  export function permissionPresetSnapshotFromService(service, subject) {
113
79
  const runtime = permissionPresetRuntime(service);
114
80
  if (runtime === undefined)
@@ -139,25 +105,7 @@ export function permissionPresetSnapshotFromService(service, subject) {
139
105
  return unavailablePermissionPresetSnapshot();
140
106
  options.push({ ...option });
141
107
  }
142
- let currentValue;
143
- try {
144
- currentValue = current(subject);
145
- }
146
- catch {
147
- currentValue = undefined;
148
- }
149
- if (typeof currentValue !== 'string') {
150
- // Second chance for the other contract shape: a subject that carries an
151
- // event log, or a raw log handed in directly.
152
- const fallback = subject?.events ?? subject;
153
- try {
154
- currentValue = current(fallback);
155
- }
156
- catch {
157
- if (typeof currentValue !== 'string')
158
- return unavailablePermissionPresetSnapshot();
159
- }
160
- }
108
+ const currentValue = current(subject);
161
109
  if (typeof currentValue !== 'string' || (currentValue !== PERMISSION_PRESET_CUSTOM && !seen.has(currentValue))) {
162
110
  return unavailablePermissionPresetSnapshot();
163
111
  }
@@ -1 +1 @@
1
- {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAwB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACrH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AActD,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,GAAG,kBAAkB,GAAG,MAAM,GAAG,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,cAAc,GAAG,eAAe,GAAG,KAAK,GAAG,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,GAAG,iBAAiB,GAAG,cAAc,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC,CAAA;AAC7Y,UAAU,sBAAsB;IAC/B,KAAK,IAAI,KAAK,CAAA;IACd,MAAM,EAAE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Q,CAAC,EAAE,eAAe,CAAA;IAC1B;+DAC2D;IAC3D,WAAW,IAAI,OAAO,CAAA;IACtB;4EACwE;IACxE,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAAA;CACrE;AACD,iFAAiF;AACjF,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,sBAAsB;iBA+7BxE,IAAI;2BAtoBQ,SAAS,YAAY,EAAE,KAAG,IAAI;yBA2FhC,YAAY,KAAG,IAAI;+BAxBb,oBAAoB,KAAG,IAAI;2BAhKjC,IAAI;6BAgBF,IAAI;4BA3IH,MAAM,WAAW,MAAM,KAAG,YAAY,GAAG,SAAS;8BAYhD,MAAM,WAAW,MAAM,QAAQ,YAAY,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,KAAG,cAAc,GAAG,SAAS;sBAoBvG,SAAS,YAAY,EAAE,GAAG,SAAS,KAAG,MAAM;2BASvC,SAAS,YAAY,EAAE,GAAG,SAAS,KAAG,MAAM;EAu0B3E"}
@@ -1,6 +1,6 @@
1
1
  import { replaySelectionAttachment } from './ide-selection.js';
2
2
  import { isSubagentToolName, parseJobOutputId, toolCommandOf, BACKGROUND_START_ACK, todoPanelItems } from './projection-helpers.js';
3
- import { ARGS_PREVIEW_LIMIT, harnessToolResultView, LOCAL_OUTPUT_LIMIT, prepareReplayEvents, preview, RESULT_PREVIEW_LIMIT, toolErrorText } from './transcript.js';
3
+ import { ARGS_PREVIEW_LIMIT, harnessToolResultView, LOCAL_OUTPUT_LIMIT, preview, RESULT_PREVIEW_LIMIT, toolErrorText } from './transcript.js';
4
4
  import { estimateTokens, isTokenDelta, tokenDeltaChars, usageOutputTokens } from './usage.js';
5
5
  import { transcriptImagesOf } from '../transcript-images.js';
6
6
  import { isCompactionCheckpointSource, toolResultPayload } from '../compat/messages.js';
@@ -41,14 +41,12 @@ export function createChannelProjection(state, deps) {
41
41
  * row for the same durable sequence number.
42
42
  */
43
43
  const handledAssistantMessages = new Set();
44
- const handledAssistantChunks = new Set();
45
44
  /** One Agent runs one request at a time. Durable step boundaries also let
46
45
  * a freshly attached projector accept chunks whose start it missed. */
47
46
  let openStep;
48
47
  let activeAttempt;
49
48
  let lastStreamRevision = -1;
50
49
  const assistantRowsByStep = new Map();
51
- const lastTextDelta = new Map();
52
50
  const stepKey = (turn, step) => `${turn}:${step}`;
53
51
  const touchRow = (row) => { markChannelReadDirty(row); markChannelReadDirty(state.rows); };
54
52
  const appendRow = (row) => { state.rows.push(row); markChannelReadDirty(state.rows); };
@@ -67,7 +65,6 @@ export function createChannelProjection(state, deps) {
67
65
  const sealedIndex = sealedReasoning.indexOf(row);
68
66
  if (sealedIndex !== -1)
69
67
  sealedReasoning.splice(sealedIndex, 1);
70
- lastTextDelta.delete(row);
71
68
  };
72
69
  const discardAttempt = (turn, step) => {
73
70
  const key = stepKey(turn, step);
@@ -91,32 +88,10 @@ export function createChannelProjection(state, deps) {
91
88
  /** Durable session image blocks, loaded lazily through the attachment
92
89
  * store. Projection never reads pixels; the UI decodes on demand. */
93
90
  const transcriptImages = (content) => transcriptImagesOf(content, deps.attachments);
94
- /** V3 deltas are ordered by frame revision and must stay byte-exact.
95
- * Legacy reconnect/proxy events may instead repeat a cumulative prefix. */
96
- const appendTextDelta = (row, delta, legacy) => {
91
+ /** Live frame deltas are ordered by revision and remain byte-exact. */
92
+ const appendTextDelta = (row, delta) => {
97
93
  if (delta === '')
98
94
  return;
99
- if (!legacy) {
100
- row.text += delta;
101
- touchRow(row);
102
- return;
103
- }
104
- if (lastTextDelta.get(row) === delta)
105
- return;
106
- lastTextDelta.set(row, delta);
107
- if (delta.startsWith(row.text)) {
108
- row.text = delta;
109
- touchRow(row);
110
- return;
111
- }
112
- const maxOverlap = Math.min(row.text.length, delta.length, 4096);
113
- for (let size = maxOverlap; size > 0; size--) {
114
- if (row.text.endsWith(delta.slice(0, size))) {
115
- row.text += delta.slice(size);
116
- touchRow(row);
117
- return;
118
- }
119
- }
120
95
  row.text += delta;
121
96
  touchRow(row);
122
97
  };
@@ -329,27 +304,21 @@ export function createChannelProjection(state, deps) {
329
304
  // idempotency ledger before replay so an old session cannot suppress a
330
305
  // legitimate message in the new transcript.
331
306
  handledAssistantMessages.clear();
332
- handledAssistantChunks.clear();
333
307
  openStep = undefined;
334
308
  activeAttempt = undefined;
335
309
  lastStreamRevision = -1;
336
310
  assistantRowsByStep.clear();
337
- lastTextDelta.clear();
338
311
  replaying = true;
339
312
  try {
340
- for (const event of prepareReplayEvents(events))
313
+ for (const event of events)
341
314
  renderEvent(event);
342
315
  }
343
316
  finally {
344
317
  replaying = false;
345
318
  }
346
319
  };
347
- /**
348
- * One live stream delta, from a 0.1.5 `agent/assistant-stream` chunk frame
349
- * or a legacy `assistant/chunk` session event (pre-0.1.5 hosts and raw
350
- * pre-V3 logs). `seq` exists only on the durable-event path.
351
- */
352
- const renderStreamChunk = (turn, step, chunk, time, seq) => {
320
+ /** One delta from the current transient assistant stream. */
321
+ const renderStreamChunk = (turn, step, chunk, time) => {
353
322
  if (chunk.type === 'text-delta') {
354
323
  if (chunk.text) {
355
324
  // Fold the thinking preview while it is still in the live
@@ -357,20 +326,20 @@ export function createChannelProjection(state, deps) {
357
326
  // transcript and pushes the block into scrollback.
358
327
  foldLiveReasoning('first text token');
359
328
  const key = stepKey(turn, step);
360
- const row = assistantRowsByStep.get(key) ?? ensureStreaming(seq);
329
+ const row = assistantRowsByStep.get(key) ?? ensureStreaming();
361
330
  assistantRowsByStep.set(key, row);
362
331
  streaming = row;
363
332
  row.streaming = true;
364
333
  touchRow(row);
365
334
  const before = row.text.length;
366
- appendTextDelta(row, chunk.text, seq !== undefined);
335
+ appendTextDelta(row, chunk.text);
367
336
  state.responseChars += Math.max(0, row.text.length - before);
368
337
  }
369
338
  }
370
339
  else if (chunk.type === 'reasoning-delta') {
371
340
  if (chunk.text) {
372
- const row = ensureReasoning(seq, turn, step);
373
- appendTextDelta(row, chunk.text, seq !== undefined);
341
+ const row = ensureReasoning(undefined, turn, step);
342
+ appendTextDelta(row, chunk.text);
374
343
  }
375
344
  }
376
345
  const tps = tpsStep;
@@ -435,7 +404,7 @@ export function createChannelProjection(state, deps) {
435
404
  }
436
405
  switch (event.type) {
437
406
  case 'user/message': {
438
- // Both legacy and V4 checkpoints render as a folded summary rather
407
+ // Checkpoints render as a folded summary rather
439
408
  // than disappearing with the other injected context.
440
409
  if (isCompactionCheckpointSource(event.data.source)) {
441
410
  const summary = textOf(event.data.content);
@@ -539,7 +508,7 @@ export function createChannelProjection(state, deps) {
539
508
  break;
540
509
  handledAssistantMessages.add(event.seq);
541
510
  // V3 embeds its complete attempt stream; older settlements may omit
542
- // reasoning that is still durably recorded in assistant/chunk events.
511
+ // reasoning recorded in the settlement stream.
543
512
  const canonical = Array.isArray(event.data.stream);
544
513
  const text = textOf(event.data.message.content);
545
514
  const images = transcriptImages(event.data.message.content);
@@ -921,37 +890,19 @@ export function createChannelProjection(state, deps) {
921
890
  case 'request/header': {
922
891
  // Reasoning effort readout (status line): the header carries the
923
892
  // conversation's call config (provider/model/effort/sampling). The
924
- // system prompt moved out of the header at V3 (see system/message);
925
- // pre-V3 logs still carry it, admitted structurally below.
893
+ // system prompt is projected from system/message.
926
894
  // oxlint-disable-next-line typescript/no-unnecessary-condition -- durable session data may lack header config
927
895
  const effort = event.data.header.config?.reasoningEffort;
928
896
  if (typeof effort === 'string') {
929
897
  state.reasoningEffort = effort;
930
898
  }
931
- const legacySystem = event.data.header.system;
932
- if (typeof legacySystem === 'string') {
933
- state.contextSegments.system = estimateTokens(legacySystem);
934
- }
935
899
  break;
936
900
  }
937
901
  case 'session/title':
938
902
  state.sessionTitle = event.data.title;
939
903
  break;
940
904
  default:
941
- // Pre-0.1.5 live streams and raw pre-V3 logs carry per-token chunks
942
- // as durable session events; 0.1.5 moved live chunks to transient
943
- // `agent/assistant-stream` frames (renderStreamFrame) and compacts the
944
- // durable record into `assistant/message.stream`. Match by name so the
945
- // current union (which no longer lists the type) stays compile-clean.
946
- if (event.type === 'assistant/chunk') {
947
- if (handledAssistantChunks.has(event.seq))
948
- break;
949
- handledAssistantChunks.add(event.seq);
950
- const data = event.data;
951
- renderStreamChunk(data.turn, data.step, data.chunk, event.time, event.seq);
952
- break;
953
- }
954
- // dsh-tool-todo owns this optional module augmentation in alpha.2.
905
+ // dsh-tool-todo owns this optional module augmentation in its own plugin.
955
906
  // Match by name so the TUI remains loadable without that plugin.
956
907
  if (event.type === 'todo/write') {
957
908
  const todos = todoPanelItems(event.data);
@@ -966,11 +917,7 @@ export function createChannelProjection(state, deps) {
966
917
  if (event.type === 'agent-preset/selected') {
967
918
  const data = event.data;
968
919
  const recordedPreset = typeof data.agentPreset === 'string' ? data.agentPreset : undefined;
969
- const renamedOfficialPreset = (recordedPreset === 'code' && state.agentPreset === 'ptc') ||
970
- (recordedPreset === 'ptc' && state.agentPreset === 'code');
971
- const preset = renamedOfficialPreset && state.agentPreset !== undefined
972
- ? state.agentPreset
973
- : recordedPreset ?? 'unknown';
920
+ const preset = recordedPreset ?? 'unknown';
974
921
  appendRow({
975
922
  id: deps.rowIds.value,
976
923
  kind: 'notice',
@@ -1019,12 +966,10 @@ export function createChannelProjection(state, deps) {
1019
966
  lastReasoningRow = undefined;
1020
967
  toolCards.clear();
1021
968
  handledAssistantMessages.clear();
1022
- handledAssistantChunks.clear();
1023
969
  openStep = undefined;
1024
970
  activeAttempt = undefined;
1025
971
  lastStreamRevision = -1;
1026
972
  assistantRowsByStep.clear();
1027
- lastTextDelta.clear();
1028
973
  tpsTurn = undefined;
1029
974
  tpsStep = undefined;
1030
975
  tpsTurnDecodeMs = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"session-fork.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-fork.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qB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,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC,CAAA;AAE9F,8EAA8E;AAC9E,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,SAAS,EAChB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,MAAM,IAAI,OAAO,CAAA;IACjB,oBAAoB,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;QAAE,MAAM,EAAE,WAAW,CAAC;QAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;KAAE,CAAC,CAAA;CACrH,SAEgB,OAAO,CAAC,OAAO,CAAC,CAiFlC"}
@@ -2,6 +2,7 @@ import { SessionId } from '@deepseek-ai/dsh-session';
2
2
  import { randomUUID } from 'node:crypto';
3
3
  import { t } from '../../i18n.js';
4
4
  import { resolveDshProfileName } from '../../update.js';
5
+ import { resumeCommand } from '../../sessionHistory.js';
5
6
  import { appendSessionTitle, liveSessionCreateOptions, sliceLiveSessionSeed } from '../compat/index.js';
6
7
  import { composePreset, runningPresetOf } from '../presets.js';
7
8
  import { attachSessionToWorkspace } from '../workspace.js';
@@ -51,7 +52,6 @@ export function createForkSessionAction(ctx, state, deps) {
51
52
  detached = await deps.createDetachedHandle(() => agents.create(liveSessionCreateOptions({
52
53
  sessionId: childId,
53
54
  seed,
54
- runtimeSession: source,
55
55
  inheritedCount: seed.length,
56
56
  cwd: state.cwd,
57
57
  // NO parentSession: a /fork copy is an independent conversation
@@ -99,10 +99,7 @@ export function createForkSessionAction(ctx, state, deps) {
99
99
  reservation.abandon();
100
100
  }
101
101
  const profile = resolveDshProfileName();
102
- const boot = profile === undefined ? 'dsh --config cordis.yml' : `dsh --profile ${profile}`;
103
- const command = process.platform === 'win32'
104
- ? `dsh-tui --resume ${childId}`
105
- : `DSH_TUI_RESUME_SESSION=${childId} ${boot}`;
102
+ const command = resumeCommand(profile, String(childId));
106
103
  deps.notify(t('fork-done', { id: String(childId), command }), { timeoutMs: 8000 });
107
104
  return true;
108
105
  };
@@ -1 +1 @@
1
- {"version":3,"file":"session-metadata.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-metadata.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAEnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAoE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAK7H,OAAO,EAAoE,KAAK,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE5H,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,YAAY,CAAA;AAKnE,OAAO,QAAQ,sBAAsB,CAAC;IACpC,UAAU,gBAAgB;QACxB,aAAa,EAAE;YAAE,IAAI,EAAE,aAAa,CAAA;SAAE,CAAA;QACtC,eAAe,EAAE;YAAE,IAAI,EAAE,eAAe,CAAA;SAAE,CAAA;KAC3C;CACF;AAID,KAAK,OAAO,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAA;AACrE,KAAK,OAAO,GAAG;IACb,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;IACrB,OAAO,IAAI,OAAO,CAAA;IAClB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,6EAA6E;AAC7E,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE;IAC/D,KAAK,EAAE,IAAI,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AAM,YAAY;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE;4BAkB7E;QAAE,MAAM,CAAC,EAAE,WAAW,CAAC;QAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE;;;;;;;;;;;;2BAuBjE,MAAM,KAAG,IAAI;6BASX,MAAM,KAAG,IAAI;+BAQL,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;iCASvB,MAAM,SAAS,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC;EAcnF"}
@@ -104,12 +104,9 @@ export function createSessionMetadataActions(ctx, deps) {
104
104
  const llmRequest = (capture, messages, includesHistory, signal) => {
105
105
  const header = capture.agent.session.requestHeader();
106
106
  const config = header?.config;
107
- // Pre-V3 headers carried the system prompt inline; V3 moved it to
108
- // `system/message` surface nodes (see currentSystemText).
109
- const legacySystem = header?.system;
110
107
  const system = messages.some(message => message.role === 'system')
111
108
  ? undefined
112
- : typeof legacySystem === 'string' ? legacySystem : includesHistory ? undefined : currentSystemText(capture);
109
+ : includesHistory ? undefined : currentSystemText(capture);
113
110
  return {
114
111
  provider: config?.provider ?? deps.provider(),
115
112
  model: config?.model ?? deps.model(),
@@ -8,7 +8,7 @@ import { readModelPref } from '../../modelPrefs.js';
8
8
  import { migratePresetPref, readPresetPref } from '../../presetPrefs.js';
9
9
  import { agentViewHasTurns } from '../agent-view.js';
10
10
  import { occupancyOf, readSessionOwners, reserveMount, reserveNewSession, } from '../../sessionMounts.js';
11
- import { ensureLegacySessionEventTypes } from '../compat/index.js';
11
+ import { registerTuiSessionEventTypes } from '../compat/index.js';
12
12
  import { snapshotLiveSessionEvents } from '../compat/liveSession.js';
13
13
  import { composePreset, resolvePersistedPreset, resolvePersistedRoute } from '../presets.js';
14
14
  import { attachSessionToWorkspace } from '../workspace.js';
@@ -75,7 +75,7 @@ export function createSessionResumeActions(ctx, state, options, deps) {
75
75
  deps.notify(t('resume-unavailable'), { color: 'error' });
76
76
  return { ok: false, reason: 'unavailable' };
77
77
  }
78
- ensureLegacySessionEventTypes();
78
+ registerTuiSessionEventTypes();
79
79
  const composed = await composePreset(ctx, await resolvePersistedPreset(ctx, SessionId(sessionId)));
80
80
  const explicitRoute = explicitModelRoute({ provider: options.configuredProvider, model: options.configuredModel });
81
81
  const persistedRoute = await resolvePersistedRoute(ctx, SessionId(sessionId));
@@ -1 +1 @@
1
- {"version":3,"file":"session-rewind.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-rewind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AASvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAEvD,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACtD,KAAK,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC,CAAA;AAgB/E,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC,CAAA;IACjF,gBAAgB,IAAI,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EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAC,CAAA;IACjF,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACjC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9B,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,SAAS,YAAY,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,MAAM,CAAA;IAC1K,qBAAqB,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1F,IAEa,KAAK,OAAO,EAAE,OAAM,MAAM,GAAG,IAAW,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAqGhF"}
@@ -75,7 +75,6 @@ export function createRewindToAction(ctx, state, deps) {
75
75
  handle = await deps.binding.prepare(adoption, () => agents.create(liveSessionCreateOptions({
76
76
  sessionId: childId,
77
77
  seed,
78
- runtimeSession: deps.binding.agent.session,
79
78
  inheritedCount: seed.length,
80
79
  cwd: state.cwd,
81
80
  parentSession: deps.binding.agent.session.id,
@@ -1 +1 @@
1
- {"version":3,"file":"session-tree-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,wBAAwB,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAUvE,OAAO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GAAG,IAAI,CAAA;CACnG,IAEa,WAAW,MAAM,EAAE,KAAK,MAAM,EAAE,OAAM,QAAQ,GAAG,MAAiB,KAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAwH1G"}
@@ -40,7 +40,7 @@ export function createTreeRewindAction(ctx, state, deps) {
40
40
  else {
41
41
  forkFromLive = false;
42
42
  const persistence = ctx.get('sessionPersistence');
43
- if (!persistence || (typeof persistence.open !== 'function' && typeof persistence.load !== 'function')) {
43
+ if (!persistence || typeof persistence.open !== 'function') {
44
44
  deps.notify(t('rewind-no-persistence'), { color: 'error' });
45
45
  return null;
46
46
  }
@@ -94,7 +94,6 @@ export function createTreeRewindAction(ctx, state, deps) {
94
94
  handle = await deps.binding.prepare(adoption, () => agents.create(liveSessionCreateOptions({
95
95
  sessionId: childId,
96
96
  seed,
97
- runtimeSession: entrySession,
98
97
  inheritedCount,
99
98
  cwd: sourceCwd,
100
99
  parentSession: SessionId(sessionId),
@@ -1 +1 @@
1
- {"version":3,"file":"session-tree.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAenD,OAAO,EAAwD,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,yFAAyF;AACzF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,EAAE,GAAG,EAAE,MAAM,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,SAClI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAiezD"}
1
+ {"version":3,"file":"session-tree.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/session-tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAenD,OAAO,EAAwD,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAC9G,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAA;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,yFAAyF;AACzF,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,EAAE,GAAG,EAAE,MAAM,MAAM,EAAE,MAAM,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,YAAY,SAClI,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAyazD"}
@@ -14,7 +14,7 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
14
14
  notify(t('tree-unavailable'), { color: 'error' });
15
15
  return null;
16
16
  }
17
- // Pin the live session snapshot NOW: every await below (list/inspect)
17
+ // Pin the live session snapshot NOW: every await below (list/read)
18
18
  // is a window in which a fire-and-forget switch (/new, /resume,
19
19
  // /model) can swap `agent`. Reading agent.session piecemeal would
20
20
  // stitch the NEW session's events under the OLD session's id — a
@@ -295,14 +295,14 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
295
295
  }
296
296
  }
297
297
  catch {
298
- // Best effort — a locate hiccup falls through to inspect.
298
+ // Best effort — a locate hiccup falls through to a read handle.
299
299
  }
300
300
  }
301
- // Alpha.4 deliberately omits the inherited cut from logical list
301
+ // The current contract omits the inherited cut from logical list
302
302
  // headers. Resolve it only for the SELECTED family node currently
303
- // being read: JSONL keeps the exact physical `seedLength`; non-file
304
- // backends expose the cut on inspect below. Never scan every listed
305
- // session and never infer it from an end-seed marker or log length.
303
+ // being read: JSONL records the exact end-seed marker; non-file
304
+ // backends expose inheritedEventCount on a read handle. Never scan
305
+ // unrelated listed sessions or infer the cut from log length.
306
306
  let inheritedCut = parentId === undefined ? undefined : readInheritedCut(entry?.raw);
307
307
  if (parentId !== undefined && inheritedCut === undefined) {
308
308
  inheritedCut = locatedPath !== undefined
@@ -354,9 +354,9 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
354
354
  // names a path, ONLY that file is read: falling back to a
355
355
  // same-id copy under the stock root could surface a STALE log
356
356
  // from another backend configuration. A locate miss or an ABSENT
357
- // file falls through to inspect, never to the stock scan.
357
+ // file falls through to a read handle, never to the stock scan.
358
358
  // 2. Stock root scan — only for backends WITHOUT locate (fakes,
359
- // older custom implementations).
359
+ // optional current embedders).
360
360
  // 3. inspect — the backend's strict read (non-file backends), with
361
361
  // the same budget enforced on what we keep — and ONLY when the
362
362
  // file read found NOTHING (undefined). A read that failed on a
@@ -366,7 +366,6 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
366
366
  // bound (64 MiB frames, decode bombs) — degrade to a placeholder
367
367
  // instead.
368
368
  let events;
369
- let physicalVersion;
370
369
  let complete = true;
371
370
  let failed = false;
372
371
  // First seq the chosen source actually covers: the file readers start
@@ -379,7 +378,6 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
379
378
  if (locatedPath !== undefined) {
380
379
  const viaPath = readSessionEventsFromFile(locatedPath, remaining, scanAllowance, skipBelow);
381
380
  if (viaPath !== undefined) {
382
- physicalVersion = viaPath.formatVersion;
383
381
  scanBudget -= viaPath.scanned;
384
382
  if (viaPath.failed === true)
385
383
  failed = true;
@@ -394,7 +392,6 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
394
392
  else if (!hasLocate) {
395
393
  const read = readSessionEventsFromLog(id, remaining, scanAllowance, skipBelow);
396
394
  if (read !== undefined) {
397
- physicalVersion = read.formatVersion;
398
395
  scanBudget -= read.scanned;
399
396
  if (read.failed === true)
400
397
  failed = true;
@@ -405,17 +402,7 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
405
402
  }
406
403
  }
407
404
  }
408
- // Raw historical files use pre-migration seq coordinates. Normalize
409
- // only a fully budget-checked file through the same read handle used
410
- // by rewind/fork. Failed or truncated reads never escalate to a full
411
- // backend parse, and cannot lend old coordinates to a V3 child.
412
- const needsMigration = typeof persistence.open === 'function'
413
- && physicalVersion !== liveSession.header.version;
414
- if (needsMigration && !complete) {
415
- failed = true;
416
- truncated = true;
417
- }
418
- if (!failed && typeof persistence.open === 'function' && (events === undefined || needsMigration)) {
405
+ if (!failed && events === undefined) {
419
406
  try {
420
407
  const inspection = await readPersistedSession(persistence, SessionId(id));
421
408
  if (inspection.meta.version !== liveSession.header.version)
@@ -434,46 +421,6 @@ export function createSessionTreeReader(ctx, binding, cwd, notify, owner) {
434
421
  failed = true;
435
422
  }
436
423
  }
437
- if (needsMigration && failed) {
438
- // Preserve the branch as a non-actionable placeholder. Its original
439
- // inherited cut is not comparable to normalized family coordinates.
440
- inheritedCut = undefined;
441
- parentCovered = -1;
442
- facts = { ...facts, seedLength: undefined };
443
- }
444
- if (!failed && events === undefined && typeof persistence.inspect === 'function') {
445
- try {
446
- const inspection = await persistence.inspect(SessionId(id));
447
- const inspectedCut = readInheritedCut(inspection);
448
- if (parentId !== undefined && inheritedCut === undefined && inspectedCut !== undefined) {
449
- inheritedCut = inspectedCut;
450
- parentCovered = structuralParentCovered;
451
- skipBelow = parentId !== undefined
452
- ? Math.min(inheritedCut, parentCovered + 1)
453
- : 0;
454
- facts = { ...facts, seedLength: inheritedCut };
455
- }
456
- // inspect parses the WHOLE log up front: charge the full length
457
- // to the scan budget (may overdraw; the next iterations skip).
458
- scanBudget -= inspection.events.length;
459
- // Non-file backends hand back the self-contained log from seq 0:
460
- // the inherited-prefix skip the file readers got must apply here
461
- // too, or a long prefix would fill the slice and the branch's OWN
462
- // events — the only ones nobody else displays — would be cut.
463
- const all = skipBelow > 0
464
- ? inspection.events.filter(event => event.seq >= skipBelow || event.type === 'session/title')
465
- : inspection.events;
466
- readFrom = skipBelow;
467
- events = all;
468
- if (events.length > remaining) {
469
- events = events.slice(0, remaining);
470
- complete = false;
471
- }
472
- }
473
- catch {
474
- events = undefined;
475
- }
476
- }
477
424
  if (failed || events === undefined) {
478
425
  // An unreadable log keeps the branch structure, no entries — and
479
426
  // stays transparent for coverage, so a fork of this branch dedups
@@ -40,7 +40,7 @@ export function createSkillCatalog(ctx, deps) {
40
40
  // `images` became `attachments` upstream (composer attachment
41
41
  // admission); read both so older cohorts keep their image commands.
42
42
  const input = descriptor.input;
43
- merged.push({ name: descriptor.name, description: descriptor.description, ...(descriptions === undefined ? {} : { descriptions }), tag: input?.hint, external: true, acceptsImages: input?.attachments ?? input?.images === true, ...(registrations.has(descriptor.name) ? { skill: true } : {}) });
43
+ merged.push({ name: descriptor.name, description: descriptor.description, ...(descriptions === undefined ? {} : { descriptions }), tag: input?.hint, external: true, acceptsImages: input?.attachments === true, ...(registrations.has(descriptor.name) ? { skill: true } : {}) });
44
44
  }
45
45
  }
46
46
  if (!deps.owner.current() || target !== deps.agent())
@@ -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,EAAW,eAAe,EAAe,MAAM,YAAY,CAAA;AAErF;;;;;;;;;;;;;;;;;;0EAkB0E;AAC1E,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,GAAG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AAK,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAA;KAAE,KAAG,IAAI;mBA5J5F,IAAI;iBAMN,OAAO;oBA0LJ,IAAI;iBACP,IAAI;EAEvB"}
@@ -73,14 +73,8 @@ export function createSubagentProjection(getState, deps) {
73
73
  if (id === undefined)
74
74
  return false;
75
75
  store.onSessionEvent(id, event);
76
- if (event.type === 'assistant/chunk') {
77
- streamDirty = true;
78
- getState().emitStream();
79
- }
80
- else {
81
- syncNow();
82
- getState().emit();
83
- }
76
+ syncNow();
77
+ getState().emit();
84
78
  return true;
85
79
  };
86
80
  // 0.1.5 live stream frames for child agents: the payload carries the Agent