@xmoon76/dsh-pi-tui 0.4.9 → 0.5.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.
@@ -179,8 +179,13 @@ interface SurfaceSnapshot {
179
179
  readonly themeId: string;
180
180
  readonly themeRevision: number;
181
181
  }
182
- /** The live session's identity and mode (plan §7.2). Secrets, credentials,
183
- * raw Context and live Agent objects are NEVER included. */
182
+ /** The LIVE (main/owner) session's identity and mode (plan §7.2). Its v2
183
+ * semantics are UNCHANGED (M3-5 PR1 contract decision): every field describes
184
+ * the live session owner, whether or not a subagent viewer is mounted. The
185
+ * session the user is currently LOOKING AT is a separate concept, published
186
+ * additively as {@link SessionSnapshot.displaySubject} — a viewer transition
187
+ * never re-points this snapshot. Secrets, credentials, raw Context and live
188
+ * Agent objects are NEVER included. */
184
189
  interface SessionSnapshot {
185
190
  readonly sessionId?: string;
186
191
  readonly title?: string;
@@ -195,17 +200,46 @@ interface SessionSnapshot {
195
200
  /** Completed turns and steps (footer t/s counters). */
196
201
  readonly turns: number;
197
202
  readonly steps: number;
203
+ /** The current DISPLAY SUBJECT (M3-5 PR1, ADDITIVE — the live-session fields
204
+ * above keep their v2 meaning): the viewed child session while a child
205
+ * viewer is mounted (`viewerMode`). Absent = no child viewer is mounted and
206
+ * the live session above is what the user sees. */
207
+ readonly displaySubject?: DisplaySubjectSnapshot;
208
+ }
209
+ /** The session the user is currently looking at while a child viewer is
210
+ * mounted (M3-5 PR1, ADDITIVE): the viewed child's identity plus the
211
+ * Session-owned facts resolved from `SessionReader.sessionStatus(childId)`.
212
+ * It never describes the live/main owner (that is {@link SessionSnapshot}) and
213
+ * it is only ever present while `viewerMode` is true. */
214
+ interface DisplaySubjectSnapshot {
215
+ readonly sessionId: string;
216
+ /** The child session's durable title ('' = none yet). */
217
+ readonly title: string;
218
+ readonly workspaceRoot: string;
219
+ readonly cwd: string;
220
+ readonly branch?: string;
221
+ /** The child's own model label (`provider/model [@effort]`). */
222
+ readonly model?: string;
223
+ readonly permission?: string;
224
+ /** The child's own completed turns/steps. */
225
+ readonly turns: number;
226
+ readonly steps: number;
227
+ /** The display subject's todo list count and rendered summary line. */
228
+ readonly todoCount: number;
229
+ readonly todoSummary?: string;
198
230
  }
199
- /** Background activity counts (plan §7.3). */
231
+ /** Background activity counts of the LIVE session (plan §7.3). */
200
232
  interface ActivitySnapshot {
201
233
  readonly working: boolean;
202
234
  readonly workingMessage?: string;
203
235
  readonly queuedCount: number;
204
236
  readonly taskCount: number;
205
237
  readonly childAgentCount: number;
238
+ /** The live session's active todo count; the display subject's own todo
239
+ * facts are published on {@link SessionSnapshot.displaySubject}. */
206
240
  readonly todoCount: number;
207
- /** The rendered todo summary line (`☑ N active · first`), when the host
208
- * provides one (the first-party builtin dock item renders it). */
241
+ /** The live session's rendered todo summary line (`☑ N active · first`); the
242
+ * display subject's line is `session.displaySubject.todoSummary` (M3-5 PR1). */
209
243
  readonly todoSummary?: string;
210
244
  }
211
245
  /** The store's three named slices (state subscriptions deliver these). */