dsh-deeppilot 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.ts CHANGED
@@ -88,6 +88,8 @@ interface SessionSummary {
88
88
  } | null;
89
89
  /** Full checklist so a conversation view can render progress, not just counts. Absent/null when the session has none. */
90
90
  todoItems?: SessionTodoItem[] | null;
91
+ /** Current tool operation, bounded to 160 Unicode code points. */
92
+ activity?: string | null;
91
93
  pendingApproval: boolean;
92
94
  pendingQuestion: boolean;
93
95
  /** Optional cumulative usage stats (see SessionUsageStats); hosts without
@@ -96,6 +98,10 @@ interface SessionSummary {
96
98
  workspaceLabel: string | null;
97
99
  workspaceId?: string | null;
98
100
  workspacePath?: string | null;
101
+ /** Present only on rows served by `c2s.sessions.archived`; the live session
102
+ * list never contains archived rows. Clients restore one with
103
+ * `c2s.session.unarchive`. */
104
+ archived?: boolean;
99
105
  }
100
106
  type MessageRole = 'user' | 'assistant' | 'tool' | 'system' | 'error';
101
107
  type ToolState = 'running' | 'ok' | 'error';
@@ -162,6 +168,7 @@ interface PendingApprovalPayload {
162
168
  sessionId: string;
163
169
  toolName: string;
164
170
  summary: string;
171
+ toolArguments?: string;
165
172
  riskLevel: 'read' | 'write' | 'destructive';
166
173
  }
167
174
  interface PendingQuestionOption {
@@ -274,6 +281,11 @@ interface WorkspaceApiLike {
274
281
  }>): Promise<RpcResponseLike<{
275
282
  archivedSessionIds: string[];
276
283
  }>>;
284
+ unarchiveSession?(req: RpcRequestLike<{
285
+ sessionId: string;
286
+ }>): Promise<RpcResponseLike<{
287
+ archivedSessionIds: string[];
288
+ }>>;
277
289
  }
278
290
  interface HostApiLike {
279
291
  listDirectory?(req: RpcRequestLike<{
@@ -396,6 +408,8 @@ interface SessionEventLike {
396
408
  data?: unknown;
397
409
  }
398
410
  interface MuxFrameLike {
411
+ /** Internal Host identity hint; never serialized into the phone protocol. */
412
+ isSubagent?: boolean;
399
413
  type: string;
400
414
  rpcId?: string;
401
415
  payload?: any;
@@ -404,6 +418,7 @@ interface MuxFrameLike {
404
418
  key?: string;
405
419
  value?: unknown;
406
420
  approvalId?: string;
421
+ callId?: string;
407
422
  toolName?: string;
408
423
  reason?: string;
409
424
  questions?: unknown;
@@ -474,6 +489,7 @@ interface BridgeSink {
474
489
  interface PushOutlet {
475
490
  fanOut(notification: PushNotification): void;
476
491
  widgetChanged?(): void;
492
+ liveActivityChanged?(sessions: SessionSummary[]): void;
477
493
  /**
478
494
  * Whether offline push is currently configured and usable. Drives the
479
495
  * welcome capability bit: advertising push while no APNs credentials are
@@ -497,9 +513,13 @@ declare class HostBridge {
497
513
  private readonly historyBufferMax;
498
514
  readonly id: number;
499
515
  private summaries;
516
+ private activeTools;
500
517
  private approvals;
501
518
  private questions;
502
519
  private archivedSessionIds;
520
+ /** Mirrors archived rows from the last sessions.list so the phone can browse
521
+ * and restore them. Excluded from `summaries` and from the live broadcast. */
522
+ private archivedSummaries;
503
523
  private subagentSessionIds;
504
524
  private sinks;
505
525
  private ring;
@@ -527,9 +547,11 @@ declare class HostBridge {
527
547
  notifyAllCategories: boolean;
528
548
  models: boolean;
529
549
  sessionManagement: boolean;
550
+ sessionRestore: boolean;
530
551
  projectSelection: boolean;
531
552
  push: boolean;
532
553
  widgetPush: boolean;
554
+ liveActivityPush: boolean;
533
555
  };
534
556
  diagnostic(message: string): void;
535
557
  currentCursor(): number;
@@ -568,6 +590,7 @@ declare class HostBridge {
568
590
  * frames back (R1/P2).
569
591
  */
570
592
  resumeFrom(cursor: number, target?: BridgeSink): boolean;
593
+ refreshLiveActivities(): void;
571
594
  private record;
572
595
  /** Start consuming host + mux streams. Idempotent; aborts on dispose(). */
573
596
  start(): void;
@@ -579,17 +602,26 @@ declare class HostBridge {
579
602
  refreshSummaries(): Promise<void>;
580
603
  /** Cold sessions may lack a title projection; fall back to first user text. */
581
604
  private deriveTitleFallback;
605
+ private captureActivity;
582
606
  private noteActivity;
583
607
  private applyProjection;
584
608
  private bumpPendingFlags;
585
609
  private pushSummary;
586
610
  listSessions(): SessionSummary[];
611
+ /**
612
+ * Archived rows from the last sessions.list, newest first. Served only on
613
+ * demand so the live session list and its broadcast keep their shape for
614
+ * clients that predate `c2s.sessions.archived`.
615
+ */
616
+ listArchivedSessions(): SessionSummary[];
587
617
  /**
588
618
  * Complete transient interaction state. Unlike the replay ring, this remains
589
619
  * authoritative after a long disconnect and is rehydrated by apiProxy's mux
590
620
  * stream when the bridge itself restarts.
591
621
  */
592
622
  pendingSnapshot(): PendingSnapshotPayload;
623
+ /** Resolve only the exact invocation in this session; never guess from the latest tool. */
624
+ private loadApprovalArguments;
593
625
  /** Tail history for an opened session; pushes s2c.session.tail to the sink. */
594
626
  openSession(sink: BridgeSink, sessionId: string, tailCount: number): Promise<boolean>;
595
627
  historyPage(sessionId: string, beforeSeq: number, limit: number): Promise<{
@@ -606,6 +638,7 @@ declare class HostBridge {
606
638
  selectSessionModel(sessionId: string, selection: HostModelSelection): Promise<ModelBridgeResult<HostModelSelection>>;
607
639
  renameSession(sessionId: string, title: string): Promise<SessionManagementResult<string>>;
608
640
  archiveSession(sessionId: string): Promise<SessionManagementResult<true>>;
641
+ unarchiveSession(sessionId: string): Promise<SessionManagementResult<true>>;
609
642
  cancelSession(sessionId: string): Promise<SessionManagementResult<true>>;
610
643
  listWorkspaces(): Promise<SessionManagementResult<Array<{
611
644
  id: string;
@@ -809,9 +842,9 @@ declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome:
809
842
  //#region src/index.d.ts
810
843
  /**
811
844
  * dsh-deeppilot — data bridge between the DSH host and DeepPilot
812
- * clients. Owns independent, narrowly routed LAN and Funnel-origin listeners;
813
- * temporary compatibility routes remain on the existing DSH web server. The
814
- * web UI and the rest of DSH's API are never exposed by these listeners.
845
+ * clients. Owns independent, narrowly routed LAN (TLS-only, pinned by paired
846
+ * devices) and loopback Funnel-origin listeners. The web UI and the rest of
847
+ * DSH's API are never exposed by these listeners.
815
848
  *
816
849
  * Data plane: an in-process HostBridge consumes a local compatibility façade
817
850
  * over DSH 0.1.2 Session/Workspace controllers, mirrors session summaries,
@@ -822,7 +855,7 @@ declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome:
822
855
  * Swift models mirror that v2 contract.
823
856
  */
824
857
  declare const name = "deeppilot";
825
- /** No eager web-service requirement: independent transports start on their own. */
858
+ /** No web-service requirement: the plugin owns its own transport listeners. */
826
859
  declare const inject: string[];
827
860
  declare function apply(ctx: Context, options: unknown): void;
828
861
  //#endregion