dsh-deeppilot 0.6.2 → 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;
@@ -498,9 +513,13 @@ declare class HostBridge {
498
513
  private readonly historyBufferMax;
499
514
  readonly id: number;
500
515
  private summaries;
516
+ private activeTools;
501
517
  private approvals;
502
518
  private questions;
503
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;
504
523
  private subagentSessionIds;
505
524
  private sinks;
506
525
  private ring;
@@ -528,6 +547,7 @@ declare class HostBridge {
528
547
  notifyAllCategories: boolean;
529
548
  models: boolean;
530
549
  sessionManagement: boolean;
550
+ sessionRestore: boolean;
531
551
  projectSelection: boolean;
532
552
  push: boolean;
533
553
  widgetPush: boolean;
@@ -582,17 +602,26 @@ declare class HostBridge {
582
602
  refreshSummaries(): Promise<void>;
583
603
  /** Cold sessions may lack a title projection; fall back to first user text. */
584
604
  private deriveTitleFallback;
605
+ private captureActivity;
585
606
  private noteActivity;
586
607
  private applyProjection;
587
608
  private bumpPendingFlags;
588
609
  private pushSummary;
589
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[];
590
617
  /**
591
618
  * Complete transient interaction state. Unlike the replay ring, this remains
592
619
  * authoritative after a long disconnect and is rehydrated by apiProxy's mux
593
620
  * stream when the bridge itself restarts.
594
621
  */
595
622
  pendingSnapshot(): PendingSnapshotPayload;
623
+ /** Resolve only the exact invocation in this session; never guess from the latest tool. */
624
+ private loadApprovalArguments;
596
625
  /** Tail history for an opened session; pushes s2c.session.tail to the sink. */
597
626
  openSession(sink: BridgeSink, sessionId: string, tailCount: number): Promise<boolean>;
598
627
  historyPage(sessionId: string, beforeSeq: number, limit: number): Promise<{
@@ -609,6 +638,7 @@ declare class HostBridge {
609
638
  selectSessionModel(sessionId: string, selection: HostModelSelection): Promise<ModelBridgeResult<HostModelSelection>>;
610
639
  renameSession(sessionId: string, title: string): Promise<SessionManagementResult<string>>;
611
640
  archiveSession(sessionId: string): Promise<SessionManagementResult<true>>;
641
+ unarchiveSession(sessionId: string): Promise<SessionManagementResult<true>>;
612
642
  cancelSession(sessionId: string): Promise<SessionManagementResult<true>>;
613
643
  listWorkspaces(): Promise<SessionManagementResult<Array<{
614
644
  id: string;
@@ -812,9 +842,9 @@ declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome:
812
842
  //#region src/index.d.ts
813
843
  /**
814
844
  * dsh-deeppilot — data bridge between the DSH host and DeepPilot
815
- * clients. Owns independent, narrowly routed LAN and Funnel-origin listeners;
816
- * temporary compatibility routes remain on the existing DSH web server. The
817
- * 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.
818
848
  *
819
849
  * Data plane: an in-process HostBridge consumes a local compatibility façade
820
850
  * over DSH 0.1.2 Session/Workspace controllers, mirrors session summaries,
@@ -825,7 +855,7 @@ declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome:
825
855
  * Swift models mirror that v2 contract.
826
856
  */
827
857
  declare const name = "deeppilot";
828
- /** No eager web-service requirement: independent transports start on their own. */
858
+ /** No web-service requirement: the plugin owns its own transport listeners. */
829
859
  declare const inject: string[];
830
860
  declare function apply(ctx: Context, options: unknown): void;
831
861
  //#endregion