dsh-rewind-plugin 0.11.0 → 0.12.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.
@@ -163,6 +163,40 @@ export declare function actionsContainerOf(row: HTMLElement | undefined): HTMLEl
163
163
  * is otherwise only reachable through a full React portal render.
164
164
  */
165
165
  export declare function collectTargets(chat: HiddenChat, hiddenSeqs: ReadonlySet<number>): readonly PortalTarget[];
166
+ /**
167
+ * The session-kind slice the durable-target gate reads — the session
168
+ * snapshot's `subagent` cell, the Harness's own runtime signal for a
169
+ * direct-subagent (child) session. Typed structurally so the plugin never
170
+ * imports the session-controller snapshot contract.
171
+ */
172
+ export interface SessionKindLike {
173
+ /** Non-null exactly while this Session is addressed as a subagent child. */
174
+ readonly subagent: unknown;
175
+ }
176
+ /**
177
+ * Whether a session is rewind-inert: a direct-subagent (child) session.
178
+ *
179
+ * The Harness refuses every generic Session RPC for a subagent-owned identity
180
+ * (`session/agent-busy`, "use subagent delivery for this child session"), so
181
+ * `/rewind` can never execute there — the command's own admission is the
182
+ * refusal, before any handler runs. A wired-up ↶ button in such a session is
183
+ * therefore dead UI that closes its popover and does nothing
184
+ * (SiriLee/dsh-rewind#26). This mirrors the Harness's own slash-command
185
+ * directory (which returns no commands for an addressed child), the pending
186
+ * path's `collectPendingTargets` gate, and the Host's `isSubagentSession`
187
+ * skips: a child session gets no rewind surface and records no snapshot.
188
+ */
189
+ export declare function isRewindInertSession(snapshot: SessionKindLike): boolean;
190
+ /**
191
+ * Collect the durable (sent-message) rewind targets of one session: none at all
192
+ * for a rewind-inert subagent session, otherwise `collectTargets`' DOM→target
193
+ * pairing. Kept separate from `collectTargets` so the session-kind gate is a
194
+ * pure, directly testable decision.
195
+ * @param snapshot - the session snapshot carrying the `subagent` cell.
196
+ * @param chat - the session's chat snapshot, or undefined while unavailable.
197
+ * @param hiddenSeqs - anchor seqs withdrawn by previous rewinds.
198
+ */
199
+ export declare function collectDurableTargets(snapshot: SessionKindLike, chat: HiddenChat | undefined, hiddenSeqs: ReadonlySet<number>): readonly PortalTarget[];
166
200
  interface RewindPortalsProps extends RewindBridgeDeps {
167
201
  readonly sessionId: string;
168
202
  }
@@ -50,6 +50,7 @@ export declare const en: {
50
50
  'delete.count': string;
51
51
  'skip.count': string;
52
52
  noRestorable: string;
53
+ storeUnsupported: string;
53
54
  success: string;
54
55
  noUserMessages: string;
55
56
  chooseMode: string;