dsh-agent-enhancer 0.2.0 → 0.3.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 (184) hide show
  1. package/README.en.md +58 -39
  2. package/README.md +58 -39
  3. package/lib/client/context/chart.d.ts +21 -0
  4. package/lib/client/context/chart.d.ts.map +1 -0
  5. package/lib/client/context/dock.d.ts +10 -0
  6. package/lib/client/context/dock.d.ts.map +1 -0
  7. package/lib/client/context/enhance-meter.d.ts +12 -0
  8. package/lib/client/context/enhance-meter.d.ts.map +1 -0
  9. package/lib/client/context/format.d.ts +3 -0
  10. package/lib/client/context/format.d.ts.map +1 -0
  11. package/lib/client/context/icons.d.ts +10 -0
  12. package/lib/client/context/icons.d.ts.map +1 -0
  13. package/lib/client/context/open-tab.d.ts +21 -0
  14. package/lib/client/context/open-tab.d.ts.map +1 -0
  15. package/lib/client/context/right-tab.d.ts +14 -0
  16. package/lib/client/context/right-tab.d.ts.map +1 -0
  17. package/lib/client/context/tab.d.ts +15 -0
  18. package/lib/client/context/tab.d.ts.map +1 -0
  19. package/lib/client/context/title.d.ts +5 -0
  20. package/lib/client/context/title.d.ts.map +1 -0
  21. package/lib/client/dsh/controls.d.ts.map +1 -1
  22. package/lib/client/dsh/conversation.d.ts.map +1 -1
  23. package/lib/client/dsh/icons.d.ts +2 -0
  24. package/lib/client/dsh/icons.d.ts.map +1 -1
  25. package/lib/client/dsh/model-catalog.d.ts +7 -0
  26. package/lib/client/dsh/model-catalog.d.ts.map +1 -1
  27. package/lib/client/dsh/model-pill-label.d.ts +21 -0
  28. package/lib/client/dsh/model-pill-label.d.ts.map +1 -0
  29. package/lib/client/dsh/overlay.d.ts.map +1 -1
  30. package/lib/client/dsh/provider-balance-chip.d.ts +9 -0
  31. package/lib/client/dsh/provider-balance-chip.d.ts.map +1 -0
  32. package/lib/client/dsh/settings.d.ts +3 -0
  33. package/lib/client/dsh/settings.d.ts.map +1 -1
  34. package/lib/client/dsh/usage-chart.d.ts +28 -0
  35. package/lib/client/dsh/usage-chart.d.ts.map +1 -0
  36. package/lib/client/dsh/usage-dock.d.ts +8 -0
  37. package/lib/client/dsh/usage-dock.d.ts.map +1 -0
  38. package/lib/client/dsh/usage-format.d.ts +5 -0
  39. package/lib/client/dsh/usage-format.d.ts.map +1 -0
  40. package/lib/client/dsh/usage-kind.d.ts +8 -0
  41. package/lib/client/dsh/usage-kind.d.ts.map +1 -0
  42. package/lib/client/dsh/usage-meter.d.ts +16 -0
  43. package/lib/client/dsh/usage-meter.d.ts.map +1 -0
  44. package/lib/client/dsh/usage-panel.d.ts +8 -0
  45. package/lib/client/dsh/usage-panel.d.ts.map +1 -0
  46. package/lib/client/dsh/usage-tab.d.ts +11 -0
  47. package/lib/client/dsh/usage-tab.d.ts.map +1 -0
  48. package/lib/client/index.d.ts.map +1 -1
  49. package/lib/client/locales.d.ts +373 -11
  50. package/lib/client/locales.d.ts.map +1 -1
  51. package/lib/client/prompt/coordinator.d.ts +2 -0
  52. package/lib/client/prompt/coordinator.d.ts.map +1 -1
  53. package/lib/client/prompt/history.d.ts.map +1 -1
  54. package/lib/client/prompt/ledger-store.d.ts +8 -0
  55. package/lib/client/prompt/ledger-store.d.ts.map +1 -0
  56. package/lib/client/prompt/ledger.d.ts +15 -0
  57. package/lib/client/prompt/ledger.d.ts.map +1 -0
  58. package/lib/client/remote.d.ts +28 -1
  59. package/lib/client/remote.d.ts.map +1 -1
  60. package/lib/client/rollback/actions.d.ts +1 -0
  61. package/lib/client/rollback/actions.d.ts.map +1 -1
  62. package/lib/client/rollback/controller.d.ts +24 -2
  63. package/lib/client/rollback/controller.d.ts.map +1 -1
  64. package/lib/client/rollback/failure.d.ts +7 -0
  65. package/lib/client/rollback/failure.d.ts.map +1 -0
  66. package/lib/client/rollback/format.d.ts +23 -0
  67. package/lib/client/rollback/format.d.ts.map +1 -0
  68. package/lib/client/rollback/input-actions-cache.d.ts +6 -0
  69. package/lib/client/rollback/input-actions-cache.d.ts.map +1 -0
  70. package/lib/client/rollback/modal-host.d.ts +13 -0
  71. package/lib/client/rollback/modal-host.d.ts.map +1 -1
  72. package/lib/client/rollback/preview.d.ts +3 -2
  73. package/lib/client/rollback/preview.d.ts.map +1 -1
  74. package/lib/client/rollback/prompt-entries.d.ts +9 -0
  75. package/lib/client/rollback/prompt-entries.d.ts.map +1 -0
  76. package/lib/client/rollback/remote.d.ts +2 -1
  77. package/lib/client/rollback/remote.d.ts.map +1 -1
  78. package/lib/client/rollback/session-stats-dock.d.ts +10 -0
  79. package/lib/client/rollback/session-stats-dock.d.ts.map +1 -0
  80. package/lib/client/rollback/session-stats-filter.d.ts +18 -0
  81. package/lib/client/rollback/session-stats-filter.d.ts.map +1 -0
  82. package/lib/client/rollback/session-stats-meter.d.ts +18 -0
  83. package/lib/client/rollback/session-stats-meter.d.ts.map +1 -0
  84. package/lib/client/rollback/timeline-format.d.ts +23 -0
  85. package/lib/client/rollback/timeline-format.d.ts.map +1 -0
  86. package/lib/client/rollback/timeline-kind.d.ts +13 -0
  87. package/lib/client/rollback/timeline-kind.d.ts.map +1 -0
  88. package/lib/client/rollback/timeline-panel.d.ts +25 -0
  89. package/lib/client/rollback/timeline-panel.d.ts.map +1 -0
  90. package/lib/client/rollback/timeline-tab.d.ts +39 -0
  91. package/lib/client/rollback/timeline-tab.d.ts.map +1 -0
  92. package/lib/client/rollback/transcript-filter.d.ts +5 -0
  93. package/lib/client/rollback/transcript-filter.d.ts.map +1 -1
  94. package/lib/client/rollback/transcript.d.ts +45 -5
  95. package/lib/client/rollback/transcript.d.ts.map +1 -1
  96. package/lib/client/rollback/turn-outline-filter.d.ts.map +1 -1
  97. package/lib/client/rollback/types.d.ts +14 -1
  98. package/lib/client/rollback/types.d.ts.map +1 -1
  99. package/lib/client/rollback/user-node.d.ts +1 -0
  100. package/lib/client/rollback/user-node.d.ts.map +1 -1
  101. package/lib/client.js +4880 -386
  102. package/lib/client.js.map +1 -1
  103. package/lib/config.d.ts +21 -2
  104. package/lib/config.d.ts.map +1 -1
  105. package/lib/errors.d.ts +1 -1
  106. package/lib/errors.d.ts.map +1 -1
  107. package/lib/host/auto-route/classifier.d.ts +5 -0
  108. package/lib/host/auto-route/classifier.d.ts.map +1 -0
  109. package/lib/host/auto-route/heuristic.d.ts +16 -0
  110. package/lib/host/auto-route/heuristic.d.ts.map +1 -0
  111. package/lib/host/auto-route/router.d.ts +15 -0
  112. package/lib/host/auto-route/router.d.ts.map +1 -0
  113. package/lib/host/auto-route/sentinel.d.ts +7 -0
  114. package/lib/host/auto-route/sentinel.d.ts.map +1 -0
  115. package/lib/host/auto-route/session-hook.d.ts +6 -0
  116. package/lib/host/auto-route/session-hook.d.ts.map +1 -0
  117. package/lib/host/auto-route/session-resolved-route.d.ts +7 -0
  118. package/lib/host/auto-route/session-resolved-route.d.ts.map +1 -0
  119. package/lib/host/auto-route/session-selection.d.ts +10 -0
  120. package/lib/host/auto-route/session-selection.d.ts.map +1 -0
  121. package/lib/host/auto-route/session-turn-hint.d.ts +8 -0
  122. package/lib/host/auto-route/session-turn-hint.d.ts.map +1 -0
  123. package/lib/host/auto-route/types.d.ts +18 -0
  124. package/lib/host/auto-route/types.d.ts.map +1 -0
  125. package/lib/host/checkpoint/activity.d.ts +43 -0
  126. package/lib/host/checkpoint/activity.d.ts.map +1 -0
  127. package/lib/host/checkpoint/availability.d.ts +8 -1
  128. package/lib/host/checkpoint/availability.d.ts.map +1 -1
  129. package/lib/host/checkpoint/capture.d.ts +12 -4
  130. package/lib/host/checkpoint/capture.d.ts.map +1 -1
  131. package/lib/host/checkpoint/dsh.d.ts.map +1 -1
  132. package/lib/host/checkpoint/files.d.ts +3 -0
  133. package/lib/host/checkpoint/files.d.ts.map +1 -1
  134. package/lib/host/checkpoint/live.d.ts +8 -0
  135. package/lib/host/checkpoint/live.d.ts.map +1 -1
  136. package/lib/host/checkpoint/service.d.ts +82 -0
  137. package/lib/host/checkpoint/service.d.ts.map +1 -1
  138. package/lib/host/checkpoint/store.d.ts +7 -0
  139. package/lib/host/checkpoint/store.d.ts.map +1 -1
  140. package/lib/host/checkpoint/workspace-snapshot.d.ts +30 -0
  141. package/lib/host/checkpoint/workspace-snapshot.d.ts.map +1 -0
  142. package/lib/host/context-compact.d.ts +42 -0
  143. package/lib/host/context-compact.d.ts.map +1 -0
  144. package/lib/host/context-inspect.d.ts +46 -0
  145. package/lib/host/context-inspect.d.ts.map +1 -0
  146. package/lib/host/index.d.ts +59 -2
  147. package/lib/host/index.d.ts.map +1 -1
  148. package/lib/host/model.d.ts +9 -1
  149. package/lib/host/model.d.ts.map +1 -1
  150. package/lib/host/rpc.d.ts +182 -0
  151. package/lib/host/rpc.d.ts.map +1 -1
  152. package/lib/host/update/check.d.ts +32 -0
  153. package/lib/host/update/check.d.ts.map +1 -0
  154. package/lib/host/update/cli.d.ts +15 -0
  155. package/lib/host/update/cli.d.ts.map +1 -0
  156. package/lib/host/update/install-kind.d.ts +3 -0
  157. package/lib/host/update/install-kind.d.ts.map +1 -0
  158. package/lib/host/update/registry.d.ts +16 -0
  159. package/lib/host/update/registry.d.ts.map +1 -0
  160. package/lib/host/update/semver.d.ts +2 -0
  161. package/lib/host/update/semver.d.ts.map +1 -0
  162. package/lib/host/update/types.d.ts +17 -0
  163. package/lib/host/update/types.d.ts.map +1 -0
  164. package/lib/host/usage/balance.d.ts +113 -0
  165. package/lib/host/usage/balance.d.ts.map +1 -0
  166. package/lib/host/usage/history.d.ts +23 -0
  167. package/lib/host/usage/history.d.ts.map +1 -0
  168. package/lib/host/usage/ledger.d.ts +20 -0
  169. package/lib/host/usage/ledger.d.ts.map +1 -0
  170. package/lib/host/usage/observe.d.ts +9 -0
  171. package/lib/host/usage/observe.d.ts.map +1 -0
  172. package/lib/host/usage/pricing.d.ts +55 -0
  173. package/lib/host/usage/pricing.d.ts.map +1 -0
  174. package/lib/host/usage/source.d.ts +14 -0
  175. package/lib/host/usage/source.d.ts.map +1 -0
  176. package/lib/host/usage/summarize.d.ts +7 -0
  177. package/lib/host/usage/summarize.d.ts.map +1 -0
  178. package/lib/host/usage/types.d.ts +105 -0
  179. package/lib/host/usage/types.d.ts.map +1 -0
  180. package/lib/identity.d.ts +1 -1
  181. package/lib/identity.d.ts.map +1 -1
  182. package/lib/index.js +4217 -466
  183. package/lib/index.js.map +4 -4
  184. package/package.json +74 -50
@@ -0,0 +1,15 @@
1
+ import type { PromptEntry } from './types.ts';
2
+ /**
3
+ * Session input snapshots for ↑↓ / search history.
4
+ * Unique by exact prompt text (same characters → one row); newer seq wins.
5
+ * Chat filters and rollback must not drop distinct prompts from this ledger.
6
+ * Rollback draft prefill is a separate composer write — never feed it here.
7
+ */
8
+ export declare class PromptHistoryLedger {
9
+ /** Keyed by exact `text`; value is the newest seq for that string. */
10
+ private readonly byText;
11
+ observe(incoming: readonly PromptEntry[]): readonly PromptEntry[];
12
+ list(): readonly PromptEntry[];
13
+ clear(): void;
14
+ }
15
+ //# sourceMappingURL=ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ledger.d.ts","sourceRoot":"","sources":["../../../src/client/prompt/ledger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAE7C;;;;;GAKG;AACH,qBAAa,mBAAmB;IAC9B,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;IAExD,OAAO,CAAC,QAAQ,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,WAAW,EAAE;IAUjE,IAAI,IAAI,SAAS,WAAW,EAAE;IAI9B,KAAK,IAAI,IAAI;CAGd"}
@@ -1,4 +1,8 @@
1
1
  import type { TypertCodec } from '@deepseek-ai/dsh-typert-protocol';
2
+ import type { ContextCompactRequest, ContextCompactResult } from '../host/context-compact.ts';
3
+ import type { ContextInspectRequest, ContextInspectResult } from '../host/context-inspect.ts';
4
+ import type { ApplyUpdateResult, UpdateCheckResult } from '../host/update/types.ts';
5
+ import type { ProviderBalances, ProviderBalancesRequest, UsageRange, UsageSummary } from '../host/usage/types.ts';
2
6
  import type { RpcPayload } from '../host/rpc.ts';
3
7
  import type { AuxiliaryResult } from '../host/types.ts';
4
8
  export declare const clientRemoteInfo: {
@@ -31,7 +35,12 @@ export declare const clientRemoteInfo: {
31
35
  invocation: {
32
36
  kind: "direct";
33
37
  };
34
- parameters: never[];
38
+ parameters: {
39
+ name: string;
40
+ wire: string;
41
+ source: "json";
42
+ codec: TypertCodec;
43
+ }[];
35
44
  result: TypertCodec;
36
45
  })[];
37
46
  };
@@ -40,4 +49,22 @@ export declare const agentEnhancerCall: {
40
49
  readonly payload: RpcPayload;
41
50
  }, signal?: AbortSignal): Promise<AuxiliaryResult | null>;
42
51
  };
52
+ export declare const agentEnhancerInspectContext: {
53
+ invoke(remote: unknown, request: ContextInspectRequest, signal?: AbortSignal): Promise<ContextInspectResult>;
54
+ };
55
+ export declare const agentEnhancerCompactContext: {
56
+ invoke(remote: unknown, request: ContextCompactRequest, signal?: AbortSignal): Promise<ContextCompactResult>;
57
+ };
58
+ export declare const agentEnhancerCheckUpdate: {
59
+ invoke(remote: unknown): Promise<UpdateCheckResult>;
60
+ };
61
+ export declare const agentEnhancerUsageSummary: {
62
+ invoke(remote: unknown, range: UsageRange): Promise<UsageSummary>;
63
+ };
64
+ export declare const agentEnhancerProviderBalances: {
65
+ invoke(remote: unknown, request?: ProviderBalancesRequest): Promise<ProviderBalances>;
66
+ };
67
+ export declare const agentEnhancerApplyUpdate: {
68
+ invoke(remote: unknown): Promise<ApplyUpdateResult>;
69
+ };
43
70
  //# sourceMappingURL=remote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../src/client/remote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,kCAAkC,CAAA;AAE7F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,eAAe,EAAE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,OAAO,SAAS,UAAU;CA0BhD,CAAA;AAMD,eAAO,MAAM,6BAA6B;mBACnB,OAAO,YAAW,uBAAuB;CA0B/D,CAAA;AAID,eAAO,MAAM,wBAAwB;mBACd,OAAO;CA4B7B,CAAA"}
@@ -9,6 +9,7 @@ export interface RollbackMessageActionsProps {
9
9
  running: boolean;
10
10
  }) => unknown) => unknown;
11
11
  readonly useAccess: (action: string) => boolean | undefined;
12
+ readonly onOpenTimeline?: (turn: number) => void;
12
13
  }
13
14
  /** Icon entry for the common “Restore to here” action beside Copy. */
14
15
  export declare function RollbackMessageActions(props: RollbackMessageActionsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAIlF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAA;IACrC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,KAAK,OAAO,CAAA;IACpF,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAA;CAC5D;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,kDAkCxE"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/actions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAIlF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAInE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAGzD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,QAAQ,EAAE,kBAAkB,CAAA;IACrC,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;IAC3B,QAAQ,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,KAAK,OAAO,CAAA;IACpF,QAAQ,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,GAAG,SAAS,CAAA;IAC3D,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACjD;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,kDAmExE"}
@@ -1,22 +1,44 @@
1
1
  import type { CheckpointRollbackOperation, CheckpointRollbackScope } from '../../host/checkpoint/service.ts';
2
- import type { RollbackControllerOptions, RollbackDraftActions, RollbackSnapshot } from './types.ts';
2
+ import type { RollbackControllerOptions, RollbackDraftActions, RollbackModalSurface, RollbackSnapshot } from './types.ts';
3
3
  export type { RollbackRemote } from './types.ts';
4
4
  export declare class RollbackController {
5
5
  private readonly options;
6
6
  private readonly listeners;
7
+ private readonly surfaces;
7
8
  private operation;
9
+ private coverageByTurn;
10
+ private coverageController;
8
11
  private snapshot;
9
12
  private version;
10
13
  private disposed;
14
+ /** Last agent running bit from the composer overlay; drives stale-modal refresh. */
15
+ private lastKnownRunning;
11
16
  constructor(options: RollbackControllerOptions);
17
+ /**
18
+ * Modal hosts register so `open` can fall back to any mounted surface — a
19
+ * timeline click must never leave `active` with no host willing to render it.
20
+ */
21
+ registerSurface(surface: RollbackModalSurface): () => void;
12
22
  subscribe: (listener: () => void) => (() => void);
13
23
  getSnapshot: () => RollbackSnapshot;
14
24
  refreshSettings(): void;
15
- open(turn: number, operation?: CheckpointRollbackOperation): void;
25
+ /**
26
+ * Refresh an open ready/error modal when the session run cycle flips
27
+ * (running→idle clears session-running / recovery waits; idle→running refreshes gates).
28
+ */
29
+ notifySessionRunning(running: boolean): void;
30
+ open(turn: number, operation?: CheckpointRollbackOperation, options?: {
31
+ readonly surface?: RollbackModalSurface;
32
+ }): void;
16
33
  close(turn?: number): void;
17
34
  confirm(actions: RollbackDraftActions, scope?: CheckpointRollbackScope): Promise<void>;
18
35
  dispose(): void;
36
+ private refreshCoverage;
37
+ private rememberPreviewCoverage;
38
+ private clearCoverage;
39
+ private resolveSurface;
19
40
  private current;
41
+ private failExecute;
20
42
  private cancelOperation;
21
43
  private publish;
22
44
  }
@@ -1 +1 @@
1
- {"version":3,"file":"controller.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/controller.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,2BAA2B,EAI3B,uBAAuB,EACxB,MAAM,kCAAkC,CAAA;AAEzC,OAAO,KAAK,EAEV,yBAAyB,EACzB,oBAAoB,EAEpB,gBAAgB,EACjB,MAAM,YAAY,CAAA;AAEnB,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAMhD,qBAAa,kBAAkB;IAOjB,OAAO,CAAC,QAAQ,CAAC,OAAO;IANpC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAwB;IAClD,OAAO,CAAC,SAAS,CAAyB;IAC1C,OAAO,CAAC,QAAQ,CAAkB;IAClC,OAAO,CAAC,OAAO,CAAI;IACnB,OAAO,CAAC,QAAQ,CAAQ;gBAEK,OAAO,EAAE,yBAAyB;IAI/D,SAAS,GAAI,UAAU,MAAM,IAAI,KAAG,CA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AS,GAAI,UAAU,MAAM,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,CAI/C;IAED,WAAW,QAAO,gBAAgB,CAAiB;IAEnD,eAAe,IAAI,IAAI;IAcvB;;;OAGG;IACH,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAU5C,IAAI,CACF,IAAI,EAAE,MAAM,EACZ,SAAS,GAAE,2BAAwC,EACnD,OAAO,GAAE;QAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,oBAAoB,CAAA;KAAO,GACxD,IAAI;IAgCP,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI;IAQpB,OAAO,CACX,OAAO,EAAE,oBAAoB,EAC7B,KAAK,GAAE,uBAAkD,GACxD,OAAO,CAAC,IAAI,CAAC;IA4DhB,OAAO,IAAI,IAAI;IAQf,OAAO,CAAC,eAAe;IAkBvB,OAAO,CAAC,uBAAuB;IAuB/B,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,WAAW;IAsBnB,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,OAAO;CAkBhB"}
@@ -0,0 +1,7 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { CheckpointRollbackErrorCode } from '../../host/checkpoint/service.ts';
3
+ export type RollbackFailureLocaleKey = Parameters<TranslateNS<'agent-enhancer'>>[0];
4
+ export declare function rollbackErrorCodeOf(error: unknown): CheckpointRollbackErrorCode | undefined;
5
+ /** Map host rollback failure codes to localized copy with a next step. */
6
+ export declare function rollbackFailureMessageKey(code: CheckpointRollbackErrorCode | undefined): RollbackFailureLocaleKey;
7
+ //# sourceMappingURL=failure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failure.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/failure.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAGnF,MAAM,MAAM,wBAAwB,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEnF,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,2BAA2B,GAAG,SAAS,CAE3F;AAED,0EAA0E;AAC1E,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,2BAA2B,GAAG,SAAS,GAC5C,wBAAwB,CAgB1B"}
@@ -0,0 +1,23 @@
1
+ export declare const PREVIEW_TEXT_MAX = 140;
2
+ /** Collapse whitespace and truncate for scannable restore previews. */
3
+ export declare function truncatePreviewText(text: string, max?: number): string;
4
+ export type PreviewMessageRole = 'user' | 'assistant' | 'tool' | 'system' | 'other';
5
+ export declare function previewMessageRole(type: string): PreviewMessageRole;
6
+ export type CoverageAffordance = 'files' | 'partial' | 'conversation' | 'unknown';
7
+ /** Classify a stored turn summary for restore-button tooltips. */
8
+ export declare function coverageAffordance(summary: {
9
+ readonly coverage: 'complete' | 'partial';
10
+ readonly fileCount: number;
11
+ } | undefined): CoverageAffordance;
12
+ /**
13
+ * Exactly one primary action per checkpoint card / message affordance.
14
+ * Only the live tip undoes (brings back everything that tip withdrew).
15
+ * A later rolled-back card restores *to that turn* (moves the tip forward) so
16
+ * undoing from turn 2 never also resurrects turn 3.
17
+ */
18
+ export type CheckpointPrimaryAction = 'restore' | 'undo';
19
+ export declare function checkpointPrimaryAction(summary: {
20
+ readonly tip?: boolean;
21
+ readonly rolledBack?: boolean;
22
+ } | undefined): CheckpointPrimaryAction;
23
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,MAAM,CAAA;AAEnC,uEAAuE;AACvE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAmB,GAAG,MAAM,CAIhF;AAED,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AAEnF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAMnE;AAED,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,CAAA;AAEjF,kEAAkE;AAClE,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,QAAQ,CAAC,QAAQ,EAAE,UAAU,GAAG,SAAS,CAAA;IACzC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAA;CAC3B,GAAG,SAAS,GAAG,kBAAkB,CAMjC;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,MAAM,CAAA;AAExD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE;IAC/C,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAA;CAC9B,GAAG,SAAS,GAAG,uBAAuB,CAGtC"}
@@ -0,0 +1,6 @@
1
+ import type { InputActions } from '@deepseek-ai/dsh-client-ui-conversation/client';
2
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
3
+ /** Remember the stable composer InputActions so the timeline modal can confirm restores. */
4
+ export declare function rememberRollbackInputActions(sessionId: SessionId | undefined, actions: InputActions | undefined): void;
5
+ export declare function rollbackInputActionsFor(sessionId: SessionId): InputActions;
6
+ //# sourceMappingURL=input-actions-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-actions-cache.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/input-actions-cache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAClF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAgB/D,4FAA4F;AAC5F,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,SAAS,GAAG,SAAS,EAChC,OAAO,EAAE,YAAY,GAAG,SAAS,GAChC,IAAI,CAGN;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,SAAS,GAAG,YAAY,CAE1E"}
@@ -1,10 +1,23 @@
1
1
  import type { InputActions } from '@deepseek-ai/dsh-client-ui-conversation/client';
2
2
  import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
3
4
  import type { RollbackController } from './controller.ts';
5
+ import type { RollbackModalSurface } from './types.ts';
4
6
  export interface RollbackModalHostProps {
5
7
  readonly rollback: RollbackController;
6
8
  readonly t: TranslateNS<'agent-enhancer'>;
7
9
  readonly inputActions: InputActions;
10
+ readonly useSession?: (selector: (state: {
11
+ running: boolean;
12
+ }) => unknown) => unknown;
13
+ readonly onOpenTimeline?: (turn: number) => void;
14
+ /**
15
+ * Which opens this host should present. Composer overlay owns message-row
16
+ * restores; the timeline tab owns right-pane restores so the dialog still
17
+ * appears when the overlay subscriber is not the active surface.
18
+ */
19
+ readonly surface?: RollbackModalSurface;
20
+ readonly sessionId?: SessionId;
8
21
  }
9
22
  /** Stable session-level modal so surface replacement cannot unmount an in-flight restore. */
10
23
  export declare function RollbackModalHost(props: RollbackModalHostProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"modal-host.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/modal-host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAA;AAElF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAGnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAIzD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,Q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-ai/dsh-client-ui-slots';
2
2
  import type { CheckpointRollbackScope } from '../../host/checkpoint/availability.ts';
3
3
  import type { RollbackActive } from './types.ts';
4
- export declare function RollbackPreview({ active, t }: {
4
+ export declare function RollbackPreview({ active, t, onOpenTimeline }: {
5
5
  readonly active: RollbackActive;
6
6
  readonly t: TranslateNS<'agent-enhancer'>;
7
+ readonly onOpenTimeline?: (turn: number) => void;
7
8
  }): import("react/jsx-runtime").JSX.Element | null;
8
- export declare function rollbackModalCopy(operation: RollbackActive['operation'], t: TranslateNS<'agent-enhancer'>, turn: number, scope?: CheckpointRollbackScope): {
9
+ export declare function rollbackModalCopy(operation: RollbackActive['operation'], t: TranslateNS<'agent-enhancer'>, turn: number, scope?: CheckpointRollbackScope, alreadyRestored?: boolean, coveredByEarlier?: boolean): {
9
10
  readonly title: string;
10
11
  readonly description: string;
11
12
  readonly confirm: string;
@@ -1 +1 @@
1
- {"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/preview.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,KAAK,EAAE,uBAAuB,EAAyB,MAAM,uCAAuC,CAAA;AAG3G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AA6BhD,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;IAC7C,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C,kDAsDA;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,cAAc,CAAC,WAAW,CAAC,EACtC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,EAChC,IAAI,EAAE,MAAM,EACZ,KAAK,CAAC,EAAE,uBAAuB,GAC9B;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CA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;CACvC,CA8BA"}
@@ -0,0 +1,9 @@
1
+ import type { SessionEventLikeEntry } from '@deepseek-ai/dsh-api-session-controller/client';
2
+ import type { PromptEntry } from '../prompt/types.ts';
3
+ /**
4
+ * Collect direct human prompts from a session event window.
5
+ * Used to feed the prompt-history ledger before transcript filtering hides
6
+ * rolled-back turns — history is an input snapshot, not a rollback artifact.
7
+ */
8
+ export declare function promptsFromSessionEntries(entries: readonly SessionEventLikeEntry[]): readonly PromptEntry[];
9
+ //# sourceMappingURL=prompt-entries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-entries.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/prompt-entries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAA;AAC3F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAErD;;;;GAIG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,SAAS,WAAW,EAAE,CAcxB"}
@@ -1,5 +1,5 @@
1
1
  import type { TypertCodec } from '@deepseek-ai/dsh-typert-protocol';
2
- import type { CheckpointRollbackErrorCode, CheckpointRollbackPreview, CheckpointRollbackRequest, CheckpointRollbackResult } from '../../host/checkpoint/service.ts';
2
+ import type { CheckpointRollbackErrorCode, CheckpointRollbackPreview, CheckpointRollbackRequest, CheckpointRollbackResult, CheckpointSummariesRequest, CheckpointSummariesResult } from '../../host/checkpoint/service.ts';
3
3
  export declare const checkpointClientRemoteInfo: {
4
4
  package: string;
5
5
  descriptors: {
@@ -30,5 +30,6 @@ export declare class CheckpointRollbackClientError extends Error {
30
30
  export declare const checkpointRollbackRemote: {
31
31
  preview(remote: unknown, request: CheckpointRollbackRequest, signal?: AbortSignal): Promise<CheckpointRollbackPreview>;
32
32
  execute(remote: unknown, request: CheckpointRollbackRequest, signal?: AbortSignal): Promise<CheckpointRollbackResult>;
33
+ summaries(remote: unknown, request: CheckpointSummariesRequest, signal?: AbortSignal): Promise<CheckpointSummariesResult>;
33
34
  };
34
35
  //# sourceMappingURL=remote.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/remote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,kCAAkC,CAAA;AAYzC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;CAuBH,CAAA;AAEpC,qBAAa,6BAA8B,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,2BAA2B;gBAAjC,IAAI,EAAE,2BAA2B;CAIvD;AAsBD,eAAO,MAAM,wBAAwB;oBACnB,OAAO,WAAW,yBAAyB,WAAW,WAAW,GAC1B,OAAO,CAAC,yBAAyB,CAAC;oBAEzE,OAAO,WAAW,yBAAyB,WAAW,WAAW,GAC1B,OAAO,CAAC,wBAAwB,CAAC;CAEzF,CAAA"}
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/remote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAA4B,MAAM,kCAAkC,CAAA;AAC7F,OAAO,KAAK,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EAC1B,MAAM,kCAAkC,CAAA;AAazC,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;CAiCH,CAAA;AAEpC,qBAAa,6BAA8B,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,EAAE,2BAA2B;gBAAjC,IAAI,EAAE,2BAA2B;CAIvD;AA8BD,eAAO,MAAM,wBAAwB;oBACnB,OAAO,WAAW,yBAAyB,WAAW,WAAW,GAC1B,OAAO,CAAC,yBAAyB,CAAC;oBAEzE,OAAO,WAAW,yBAAyB,WAAW,WAAW,GAC1B,OAAO,CAAC,wBAAwB,CAAC;sBAEtE,OAAO,WAAW,0BAA0B,WAAW,WAAW,GAC3B,OAAO,CAAC,yBAAyB,CAAC;CAE5F,CAAA"}
@@ -0,0 +1,10 @@
1
+ import type { TranslateNS, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
3
+ export interface SessionStatsCheckpointDockProps extends PropsRuntime<'conversation.composer.dock'> {
4
+ readonly enabled: () => boolean;
5
+ readonly open: (sessionId: SessionId) => void;
6
+ readonly t: TranslateNS<'agent-enhancer'>;
7
+ }
8
+ /** Invisible dock resident: adds a checkpoint jump on the official 会话统计 title. */
9
+ export declare function SessionStatsCheckpointDock(props: SessionStatsCheckpointDockProps): null;
10
+ //# sourceMappingURL=session-stats-dock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-stats-dock.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/session-stats-dock.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAG/D,MAAM,WAAW,+BAAgC,SAAQ,YAAY,CAAC,4BAA4B,CAAC;IACjG,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAA;IAC/B,QAAQ,CAAC,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,CAAA;IAC7C,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C;AAED,kFAAkF;AAClF,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,+BAA+B,QAYhF"}
@@ -0,0 +1,18 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ /**
3
+ * Fold surface turns/steps onto the Host sessionStats object. Never invent a
4
+ * zeroed timing shell — ActivityPill falls back to a non-button PlainPill when
5
+ * llmMs/toolMs/ttft/speed are all empty, which makes 轮/步 look unclickable.
6
+ */
7
+ export declare function withActivityCounts(base: unknown, activity: {
8
+ readonly turns: number;
9
+ readonly steps: number;
10
+ }): unknown;
11
+ /**
12
+ * Composer ActivityPill reads Host `sessionStats` (whole append-only log).
13
+ * Always own turns+steps from the presented chat surface so the gauge matches
14
+ * visible conversation on first paint — Host whole-log (and undo shells) must
15
+ * never inflate 轮/步. Timing / tok/s stay on the Host projection.
16
+ */
17
+ export declare function installRollbackSessionStatsFilter(ctx: Context): () => void;
18
+ //# sourceMappingURL=session-stats-filter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-stats-filter.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/session-stats-filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAgClD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3D,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,IAAI,CA6F1E"}
@@ -0,0 +1,18 @@
1
+ export interface SessionStatsCheckpointLinkOptions {
2
+ readonly enabled: () => boolean;
3
+ readonly sessionId: () => string | undefined;
4
+ readonly open: () => void;
5
+ readonly label: () => string;
6
+ }
7
+ /** Official 会话统计 popover opened from the composer turn/step pill. */
8
+ export declare function findOpenSessionStatsPanel(): HTMLElement | null;
9
+ /**
10
+ * Title row for "会话统计" — prefer the smallest node that still carries the title.
11
+ */
12
+ export declare function findSessionStatsTitleRow(panel: HTMLElement): HTMLElement | null;
13
+ /**
14
+ * Wire the official 会话统计 title to open the checkpoint timeline — a stable
15
+ * entry when per-message restore buttons are gone after a full rollback.
16
+ */
17
+ export declare function installSessionStatsCheckpointLink(options: SessionStatsCheckpointLinkOptions): () => void;
18
+ //# sourceMappingURL=session-stats-meter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-stats-meter.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/session-stats-meter.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,iCAAiC;IAChD,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAA;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,MAAM,GAAG,SAAS,CAAA;IAC5C,QAAQ,CAAC,IAAI,EAAE,MAAM,IAAI,CAAA;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,MAAM,CAAA;CAC7B;AA0BD,qEAAqE;AACrE,wBAAgB,yBAAyB,IAAI,WAAW,GAAG,IAAI,CAY9D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAa/E;AAqCD;;;GAGG;AACH,wBAAgB,iCAAiC,CAC/C,OAAO,EAAE,iCAAiC,GACzC,MAAM,IAAI,CAkBZ"}
@@ -0,0 +1,23 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { CheckpointGap } from '../../host/checkpoint/types.ts';
3
+ import type { CheckpointTurnSummary } from '../../host/checkpoint/service.ts';
4
+ export declare function timelineCoverageLabel(summary: CheckpointTurnSummary, t: TranslateNS<'agent-enhancer'>): string;
5
+ export declare function timelineGapLabel(gap: CheckpointGap, t: TranslateNS<'agent-enhancer'>): string;
6
+ /**
7
+ * Conversation order for the timeline rail (oldest → newest by log position).
8
+ * Sorting by turn id alone inverts after undo shells / reused turn numbers and
9
+ * makes “第 3 个检查点” look later while restoring an earlier cut.
10
+ */
11
+ export declare function sortTimelineByConversation(turns: readonly CheckpointTurnSummary[]): CheckpointTurnSummary[];
12
+ /** @deprecated Use {@link sortTimelineByConversation}. */
13
+ export declare function sortTimelineNewestFirst(turns: readonly CheckpointTurnSummary[]): CheckpointTurnSummary[];
14
+ export declare function formatCheckpointTime(createdAt: number, locale: string): string;
15
+ /**
16
+ * Collapsed-row label: prefer prompt preview; fall back to a file path so empty
17
+ * historical captures are still distinguishable without memorizing turn numbers.
18
+ */
19
+ export declare function timelinePromptLabel(summary: CheckpointTurnSummary, t: TranslateNS<'agent-enhancer'>): {
20
+ readonly text: string;
21
+ readonly empty: boolean;
22
+ };
23
+ //# sourceMappingURL=timeline-format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-format.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/timeline-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAA;AAG7E,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,qBAAqB,EAC9B,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAC/B,MAAM,CAgBR;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,aAAa,EAClB,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAC/B,MAAM,CAWR;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,SAAS,qBAAqB,EAAE,GACtC,qBAAqB,EAAE,CAIzB;AAED,0DAA0D;AAC1D,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,SAAS,qBAAqB,EAAE,GACtC,qBAAqB,EAAE,CAEzB;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAW9E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,qBAAqB,EAC9B,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,GAC/B;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAcpD"}
@@ -0,0 +1,13 @@
1
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
2
+ export declare const CHECKPOINT_TIMELINE_TAB_ID = "dsh-agent-enhancer/checkpointTimeline";
3
+ export declare const CHECKPOINT_TIMELINE_TAB_KIND = "agentEnhancerCheckpointTimeline";
4
+ export interface CheckpointTimelineTabParams {
5
+ readonly sessionId: SessionId;
6
+ readonly turn?: number;
7
+ }
8
+ declare module '@deepseek-ai/dsh-client-ui-sidebar-right/client' {
9
+ interface SidebarRightTabParamsMap {
10
+ agentEnhancerCheckpointTimeline: CheckpointTimelineTabParams;
11
+ }
12
+ }
13
+ //# sourceMappingURL=timeline-kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-kind.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/timeline-kind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAE/D,eAAO,MAAM,0BAA0B,0CAA0C,CAAA;AACjF,eAAO,MAAM,4BAA4B,oCAAoC,CAAA;AAE7E,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,OAAO,QAAQ,iDAAiD,CAAC;IAC/D,UAAU,wBAAwB;QAChC,+BAA+B,EAAE,2BAA2B,CAAA;KAC7D;CACF"}
@@ -0,0 +1,25 @@
1
+ import type { TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
3
+ import type { RollbackController } from './controller.ts';
4
+ import type { RollbackRemote } from './types.ts';
5
+ export interface CheckpointTimelinePanelProps {
6
+ readonly sessionId: SessionId;
7
+ readonly focusTurn?: number;
8
+ readonly remote: RollbackRemote;
9
+ readonly t: TranslateNS<'agent-enhancer'>;
10
+ readonly locale?: string;
11
+ readonly rollback?: RollbackController;
12
+ /**
13
+ * Live chat-surface turns/steps (same fold as ActivityPill). When provided,
14
+ * the lead line uses these so the timeline never drifts from visible chat.
15
+ */
16
+ readonly readChatActivity?: () => {
17
+ readonly turns: number;
18
+ readonly steps: number;
19
+ } | undefined;
20
+ readonly subscribeChatActivity?: (listener: () => void) => () => void;
21
+ readonly onRestore: (turn: number) => void;
22
+ readonly onUndo: (turn: number) => void;
23
+ }
24
+ export declare function CheckpointTimelinePanel(props: CheckpointTimelinePanelProps): import("react/jsx-runtime").JSX.Element;
25
+ //# sourceMappingURL=timeline-panel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-panel.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/timeline-panel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAShD,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,kBAAkB,CAAA;IACtC;;;OAGG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,MAAM;QAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAA;IAChG,QAAQ,CAAC,qBAAqB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;IACrE,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AA2BD,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,4BAA4B,2CAsN1E"}
@@ -0,0 +1,39 @@
1
+ import type { PropsRuntime, TranslateNS } from '@deepseek-ai/dsh-client-ui-slots';
2
+ import type { SessionId } from '@deepseek-ai/dsh-session/types';
3
+ import type { RollbackController } from './controller.ts';
4
+ import type { RollbackRemote } from './types.ts';
5
+ interface SessionStatsProjection {
6
+ get(key: string): unknown;
7
+ faceOf(key: string): {
8
+ subscribe(listener: () => void): () => void;
9
+ };
10
+ }
11
+ interface SessionBinding {
12
+ readonly eventSource: {
13
+ getSnapshot(): {
14
+ entries: readonly unknown[];
15
+ };
16
+ subscribe(listener: () => void): () => void;
17
+ };
18
+ readonly session: {
19
+ readonly projections: SessionStatsProjection;
20
+ };
21
+ }
22
+ interface SessionsLookup {
23
+ binding(id: SessionId): SessionBinding | undefined;
24
+ }
25
+ export interface CheckpointTimelineTabProps extends PropsRuntime<'sidebar.right.pane.tab'> {
26
+ readonly t: TranslateNS<'agent-enhancer'>;
27
+ readonly remote: RollbackRemote;
28
+ readonly locale?: string;
29
+ readonly sessions?: SessionsLookup;
30
+ readonly rollbackFor: (sessionId: SessionId) => RollbackController;
31
+ readonly onRestore: (sessionId: SessionId, turn: number) => void;
32
+ readonly onUndo: (sessionId: SessionId, turn: number) => void;
33
+ }
34
+ export declare function CheckpointTimelineTab(props: CheckpointTimelineTabProps): import("react/jsx-runtime").JSX.Element;
35
+ export declare function CheckpointTimelineTabTitle(props: PropsRuntime<'sidebar.right.pane.tab.title'> & {
36
+ readonly t: TranslateNS<'agent-enhancer'>;
37
+ }): import("react/jsx-runtime").JSX.Element;
38
+ export {};
39
+ //# sourceMappingURL=timeline-tab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline-tab.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/timeline-tab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEjF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAGzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAKhD,UAAU,sBAAsB;IAC9B,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;IACzB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG;QAAE,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;KAAE,CAAA;CACrE;AAED,UAAU,cAAc;IACtB,QAAQ,CAAC,WAAW,EAAE;QACpB,WAAW,IAAI;YAAE,OAAO,EAAE,SAAS,OAAO,EAAE,CAAA;SAAE,CAAA;QAC9C,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;KAC5C,CAAA;IACD,QAAQ,CAAC,OAAO,EAAE;QAAE,QAAQ,CAAC,WAAW,EAAE,sBAAsB,CAAA;KAAE,CAAA;CACnE;AAED,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,EAAE,SAAS,GAAG,cAAc,GAAG,SAAS,CAAA;CACnD;AAyCD,MAAM,WAAW,0BAA2B,SAAQ,YAAY,CAAC,wBAAwB,CAAC;IACxF,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAA;IAC/B,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,kBAAkB,CAAA;IAClE,QAAQ,CAAC,SAAS,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAChE,QAAQ,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9D;AAoDD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAatE;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,YAAY,CAAC,8BAA8B,CAAC,GAAG;IAC/F,QAAQ,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAA;CAC1C,2CAEA"}
@@ -4,6 +4,11 @@ import type { RollbackUndoTipStore } from './undo-tip.ts';
4
4
  * Keep Chat's loaded window aligned with rollback surface semantics without
5
5
  * rewriting the Host append-only log. Also refreshes the session undo tip used
6
6
  * by the composer + / command menu.
7
+ *
8
+ * After a restore tip lands, Chat often only has the recent page (rolled-back
9
+ * turns + marker). Filtering removes those turns and leaves the notice alone —
10
+ * so we page older history through the keep-prefix cut until earlier messages
11
+ * reappear (at most once per tip, bounded page count).
7
12
  */
8
13
  export declare function installRollbackTranscriptFilter(ctx: Context, tips?: RollbackUndoTipStore): () => void;
9
14
  //# sourceMappingURL=transcript-filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transcript-filter.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/transcript-filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAkBzD;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,OAAO,EACZ,IAAI,CAAC,EAAE,oBAAoB,GAC1B,MAAM,IAAI,CAmDZ"}
1
+ {"version":3,"file":"transcript-filter.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/transcript-filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAelD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAA;AAiCzD;;;;;;;;;GASG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,OAAO,EACZ,IAAI,CAAC,EAAE,oBAAoB,GAC1B,MAAM,IAAI,CA8IZ"}
@@ -1,11 +1,22 @@
1
1
  import type { SessionEventLikeEntry } from '@deepseek-ai/dsh-api-session-controller/client';
2
+ import type { SessionEvent } from '@deepseek-ai/dsh-session/types';
2
3
  /**
3
- * Lowest turn number covered by an active rollback marker, if any.
4
- * TurnNavigator's host `turnOutline` still lists every turn; Client filters from this cut.
4
+ * First turn hidden by any still-active tip (stacked uncleared markers keep the
5
+ * most aggressive tip). Marker `rollback:N` means cut before turn N → hide from N.
5
6
  */
6
7
  export declare function activeRollbackHideTurnsFrom(entries: readonly SessionEventLikeEntry[]): number | undefined;
7
- /** Latest active restore marker seq; events after it are a fresh continuation, not rolled-back history. */
8
+ /** Latest live tip seq; events after it are a fresh continuation, not rolled-back history. */
8
9
  export declare function activeRollbackContinueAfterSeq(entries: readonly SessionEventLikeEntry[]): number | undefined;
10
+ /**
11
+ * Oldest seq the Chat window must cover so keep-prefix turns (before the tip) can render.
12
+ * Derived from active tips' `sourceEventSeqs` (the first withdrawn surface node).
13
+ */
14
+ export declare function keepPrefixLoadThroughSeq(entries: readonly SessionEventLikeEntry[]): number | undefined;
15
+ /**
16
+ * True when an active restore tip is visible but earlier conversation is still outside
17
+ * the loaded Chat window (filter removed rolled-back turns, leaving mostly the notice).
18
+ */
19
+ export declare function needsKeepPrefixHistory(entries: readonly SessionEventLikeEntry[], hasMore: boolean): boolean;
9
20
  /**
10
21
  * Turn number for the latest undoable restore tip, if Host would still accept undo.
11
22
  * After rollback, turn chrome is gone so Chat may place the marker outside a TurnLocation;
@@ -14,11 +25,40 @@ export declare function activeRollbackContinueAfterSeq(entries: readonly Session
14
25
  export declare function activeRollbackUndoTip(entries: readonly SessionEventLikeEntry[]): {
15
26
  readonly turn: number;
16
27
  } | undefined;
17
- export declare function filterTurnOutline(outline: unknown, hideTurnsFrom: number | undefined, continueAfterSeq?: number): unknown;
28
+ /** Host undo scaffolding ranges — omit matching turnOutline rows by `seq`. */
29
+ export declare function undoShellRangesFromEntries(entries: readonly SessionEventLikeEntry[]): readonly {
30
+ readonly turn: number;
31
+ readonly startSeq: number;
32
+ readonly endSeq: number;
33
+ }[];
34
+ /**
35
+ * Own surface fold (not Host whole-log): dedupe closed steps by `(turn, step)`,
36
+ * then turns = distinct turns with ≥1 closed step. Applied to the *presented*
37
+ * transcript so restore hides rolled-back work and undo shells never inflate
38
+ * the gauge — rewind must not look like extra rounds.
39
+ */
40
+ export declare function activityStatsFromEvents(events: readonly SessionEvent[]): {
41
+ readonly turns: number;
42
+ readonly steps: number;
43
+ };
44
+ /**
45
+ * ActivityPill turns/steps — always from the presented chat surface while
46
+ * restore/undo scaffolding is in play.
47
+ */
48
+ export declare function activityStatsFromEntries(entries: readonly SessionEventLikeEntry[]): {
49
+ readonly turns: number;
50
+ readonly steps: number;
51
+ };
52
+ export declare function filterTurnOutline(outline: unknown, hideTurnsFrom: number | undefined, continueAfterSeq?: number, omitShellRanges?: readonly {
53
+ readonly startSeq: number;
54
+ readonly endSeq: number;
55
+ }[]): unknown;
18
56
  /**
19
57
  * Present rollback to the human transcript: hide shadowed append-origin messages,
20
58
  * drop rolled-back turn boundaries (so Completed/duration and the turn rail clear),
21
- * show active rollback markers as append tips, and keep undo copies visible.
59
+ * keep a single live restore tip as append-origin for bookkeeping (Chat hides it as
60
+ * ordinary context — it is not a real turn), keep undo copies visible, and strip the
61
+ * Host-only undo turn/step shell so unmask does not look like a new user round.
22
62
  *
23
63
  * Host surface replace only updates model-visible history; Chat matches append-origin
24
64
  * events only, so the Client must reshape the loaded window for UI.
@@ -1 +1 @@
1
- {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAA;AA6D3F;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,MAAM,GAAG,SAAS,CAUpB;AAED,2GAA2G;AAC3G,wBAAgB,8BAA8B,CAC5C,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,MAAM,GAAG,SAAS,CAIpB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAcvC;AAED,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,gBAAgB,CAAC,EAAE,MAAM,GACxB,OAAO,CAWT;AAgED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,SAAS,qBAAqB,EAAE,CAoFlC"}
1
+ {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/transcript.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gDAAgD,CAAA;AAC3F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAA;AAsGlE;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,MAAM,GAA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,SAAS;IAAE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,GAClF,OAAO,CAgBT;AAgED;;;;;;;;;GASG;AACH,wBAAgB,yBAAyB,CACvC,OAAO,EAAE,SAAS,qBAAqB,EAAE,GACxC,SAAS,qBAAqB,EAAE,CA4FlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"turn-outline-filter.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/turn-outline-filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAkClD;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,IAAI,CAkFzE"}
1
+ {"version":3,"file":"turn-outline-filter.d.ts","sourceRoot":"","sources":["../../../src/client/rollback/turn-outline-filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAmClD;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,IAAI,CAoFzE"}