dsh-deeppilot 0.9.13 → 0.9.15

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
@@ -1,10 +1,7 @@
1
1
  import z from "@deepseek-ai/schemastery";
2
2
  import { Context } from "@deepseek-ai/cordis";
3
- //#region src/device-auth.d.ts
4
3
  declare const DEVICE_SCOPES: readonly ['sessions.read', 'prompt.send', 'sessions.manage', 'interactions.respond', 'notifications.register', 'schedule.manage'];
5
4
  type DeviceScope = (typeof DEVICE_SCOPES)[number];
6
- //#endregion
7
- //#region src/wire-errors.d.ts
8
5
  /**
9
6
  * 错误词表(error vocabulary)的唯一属主。
10
7
  *
@@ -31,10 +28,9 @@ declare const ERROR_CODES: {
31
28
  readonly E_UNSUPPORTED: 'protocol version or capability unsupported';
32
29
  readonly E_INTERNAL: 'internal error';
33
30
  readonly E_STEER_UNAVAILABLE: 'queued item can no longer steer the current turn';
31
+ readonly E_TOO_LARGE: 'response exceeds the client frame limit';
34
32
  };
35
33
  type WireErrorCode = keyof typeof ERROR_CODES;
36
- //#endregion
37
- //#region src/dispatch-journal.d.ts
38
34
  /** 落盘条目:两个通用字段 + codec 私有字段。 */
39
35
  interface JournalEntry {
40
36
  fingerprint: string;
@@ -202,8 +198,6 @@ type MutationDispatchResult<T> = {
202
198
  message?: string;
203
199
  replayed?: boolean;
204
200
  };
205
- //#endregion
206
- //#region src/command-api.d.ts
207
201
  interface CommandSummary {
208
202
  name: string;
209
203
  description: string;
@@ -242,14 +236,119 @@ interface PermissionCatalog {
242
236
  options: PermissionOption[];
243
237
  currentValue?: string;
244
238
  }
245
- //#endregion
246
- //#region src/protocol.d.ts
247
239
  /**
248
240
  * `format` 缺省为 `zip`,与扩展出现前的行为逐字节相同;`markdown` 需要
249
241
  * `welcome.capabilities.sessionMarkdown`,否则 Bridge 回 E_UNSUPPORTED。
250
242
  * 不认识该字段的旧 Bridge 会忽略它并照常返回 ZIP,所以客户端必须先看能力位。
251
243
  */
252
244
  type SessionExportFormat = 'zip' | 'markdown';
245
+ /** `at` 的本地日历写法;与 DSH `LocalAtInput` 一一对应。 */
246
+ interface HostScheduleLocalAt {
247
+ date: string;
248
+ time: string;
249
+ time_zone: string;
250
+ }
251
+ type HostScheduleTiming = {
252
+ kind: 'after';
253
+ after_seconds: number;
254
+ } | {
255
+ kind: 'at';
256
+ at: string | HostScheduleLocalAt;
257
+ } | {
258
+ kind: 'every';
259
+ every_seconds: number;
260
+ } | {
261
+ kind: 'daily';
262
+ daily: {
263
+ time: string;
264
+ time_zone: string;
265
+ };
266
+ } | {
267
+ kind: 'weekly';
268
+ weekly: {
269
+ time: string;
270
+ time_zone: string;
271
+ weekdays: number[];
272
+ };
273
+ } | {
274
+ kind: 'cron';
275
+ cron: {
276
+ expression: string;
277
+ time_zone: string;
278
+ };
279
+ } | {
280
+ kind: 'rrule';
281
+ rrule: string;
282
+ };
283
+ /** `new_once` / `new` 目标建会话时的工作目录与预设(省略用 Host 默认)。 */
284
+ interface HostScheduleCreateSpec {
285
+ cwd?: string;
286
+ agentPreset?: string;
287
+ }
288
+ /**
289
+ * 任务视图里的交付目标。`new_once` 的 `sessionId` 是 Host 创建时预留的会话,
290
+ * 首次投递后目标会转成 `session`。
291
+ */
292
+ type HostScheduleTarget = {
293
+ kind: 'session';
294
+ sessionId: string;
295
+ } | {
296
+ kind: 'new_once';
297
+ sessionId: string;
298
+ create?: HostScheduleCreateSpec;
299
+ } | {
300
+ kind: 'new';
301
+ create?: HostScheduleCreateSpec;
302
+ };
303
+ /**
304
+ * 创建/编辑请求里客户端可给出的目标:`new_once` 的会话由 Host 预留,客户端不填
305
+ * `sessionId`。
306
+ */
307
+ type HostScheduleTargetRequest = {
308
+ kind: 'session';
309
+ sessionId: string;
310
+ } | {
311
+ kind: 'new_once';
312
+ create?: HostScheduleCreateSpec;
313
+ } | {
314
+ kind: 'new';
315
+ create?: HostScheduleCreateSpec;
316
+ };
317
+ /** 最近一次已确认投递的回执;不含 prompt 正文。 */
318
+ interface HostScheduleDeliveryReceipt {
319
+ scheduledAt: string;
320
+ deliveredAt: string;
321
+ messageId: string;
322
+ targetSessionId: string;
323
+ }
324
+ /**
325
+ * 宿主级任务视图。可选字段(createdAt/updatedAt/executionActive/
326
+ * deliveryFloorEndsAt/lastDelivery)客户端不得依赖;`involvedSessionIds` 是
327
+ * Host 内部字段,Bridge 不返回。
328
+ */
329
+ interface HostScheduleTask {
330
+ id: string;
331
+ title: string;
332
+ prompt: string;
333
+ timing: HostScheduleTiming;
334
+ target: HostScheduleTarget;
335
+ status: 'active' | 'paused' | 'ended';
336
+ scheduledAt: string;
337
+ createdAt?: string;
338
+ updatedAt?: string;
339
+ executionActive?: boolean;
340
+ deliveryFloorEndsAt?: string;
341
+ lastDelivery?: HostScheduleDeliveryReceipt;
342
+ }
343
+ /** 编辑补丁:至少一个字段;省略的字段保持原值。 */
344
+ interface HostSchedulePatch {
345
+ title?: string;
346
+ prompt?: string;
347
+ timing?: HostScheduleTiming;
348
+ target?: HostScheduleTargetRequest;
349
+ /** false 暂停、true 恢复。 */
350
+ active?: boolean;
351
+ }
253
352
  interface WelcomeCapabilities {
254
353
  /** 会话命令目录、执行、权限与原生日志导出入口。缺省不支持。 */
255
354
  commands?: boolean;
@@ -275,6 +374,10 @@ interface WelcomeCapabilities {
275
374
  projectSelection: boolean;
276
375
  /** Host exposes the optional DSH Schedule service. */
277
376
  schedules?: boolean;
377
+ /** 宿主级计划任务模型(DSH 0.2.2-alpha.3 起):true 时
378
+ * 「Schedule 宿主级任务扩展」帧可用,schedulesHost=false/缺失时客户端只能
379
+ * 使用会话级 schedule 帧。与 `schedules` 相互独立(后者只表示服务存在)。 */
380
+ schedulesHost?: boolean;
278
381
  /** Bridge has APNs configured; clients may send c2s.push.register. */
279
382
  push?: boolean;
280
383
  widgetPush?: boolean;
@@ -298,6 +401,11 @@ interface WelcomeCapabilities {
298
401
  * the phone replace this plugin with a published version. Absent ⇒ the phone
299
402
  * can only link out to npm. */
300
403
  pluginUpdate?: boolean;
404
+ /** Bridge answers c2s.session.export / c2s.session.attachment requests that
405
+ * carry `binary: true` with binary frames (raw bytes after a JSON header,
406
+ * see binary-frame.ts). Plugin-level, independent of the host. Absent ⇒ the
407
+ * client must keep requesting base64 text frames. */
408
+ binaryFrames?: boolean;
301
409
  }
302
410
  type SessionStatus = "running" | "idle" | "error" | "unknown";
303
411
  /**
@@ -370,6 +478,21 @@ interface SessionSummary {
370
478
  }
371
479
  type MessageRole = 'user' | 'assistant' | 'tool' | 'system' | 'error';
372
480
  type ToolState = 'running' | 'ok' | 'error';
481
+ /**
482
+ * 文件编辑类工具调用的改动内容(v2 追加式扩展,见 PROTOCOL.md「工具改动对比」)。
483
+ * Bridge 把宿主 `str_replace_editor` 的参数名(old_str/new_str/file_text/insert_line)
484
+ * 归一化成这里的字段,手机端不依赖宿主工具参数命名。`oldText` / `newText` 各自超过
485
+ * 16 KiB(UTF-8)时都不发,只带 `truncated: true`。
486
+ */
487
+ interface ToolEditProjection {
488
+ path: string;
489
+ operation: 'replace' | 'create' | 'insert';
490
+ oldText?: string;
491
+ newText?: string;
492
+ /** `insert` 专用:在该行之后插入,0 表示文件开头。 */
493
+ insertLine?: number;
494
+ truncated?: boolean;
495
+ }
373
496
  /** Provenance of host-injected context; present only on `role: "system"` rows.
374
497
  * Mirrors the durable DSH message source (`dsh-llm` MessageSource): `label`
375
498
  * names the producer (plugin name, skill name, instruction paths…), `form` is
@@ -403,6 +526,7 @@ interface MessageProjection {
403
526
  name: string;
404
527
  state: ToolState;
405
528
  summary: string;
529
+ edit?: ToolEditProjection;
406
530
  };
407
531
  attachments?: MessageAttachment[];
408
532
  /** Present only on system rows: provenance of the injected context.
@@ -464,8 +588,6 @@ interface PendingSnapshotPayload {
464
588
  approvals: PendingApprovalPayload[];
465
589
  questions: PendingQuestionPayload[];
466
590
  }
467
- //#endregion
468
- //#region src/host-api.d.ts
469
591
  interface CommandsApiLike {
470
592
  list(req: RpcRequestLike<{
471
593
  sessionId: string;
@@ -640,7 +762,10 @@ interface ScheduleHistoryViewLike {
640
762
  };
641
763
  nextBefore?: string;
642
764
  }
643
- interface ScheduleApiLike {
765
+ /** 会话级 Schedule 服务(DSH ≤ 0.2.2-alpha.2):任务绑定单一 Session。 */
766
+ interface LegacyScheduleApiLike {
767
+ /** 判别位缺省即 legacy:旧宿主与既有测试夹具不必补字段。 */
768
+ readonly mode?: 'legacy';
644
769
  list(req: RpcRequestLike<{
645
770
  sessionId: string;
646
771
  }>): Promise<RpcResponseLike<{
@@ -684,6 +809,107 @@ interface ScheduleApiLike {
684
809
  code?: string;
685
810
  }>>;
686
811
  }
812
+ /** 宿主级任务视图:与 wire 的 `HostScheduleTask` 同一形状(Bridge 直接透传)。 */
813
+ type HostScheduleTaskView = HostScheduleTask;
814
+ interface HostScheduleListRequestLike {
815
+ /** true 只列运行中;false 只列暂停/结束;省略列全部。 */
816
+ active?: boolean;
817
+ limit?: number;
818
+ offset?: number;
819
+ }
820
+ interface HostScheduleListResultLike {
821
+ tasks: HostScheduleTaskView[];
822
+ shown: number;
823
+ total: number;
824
+ limit: number;
825
+ offset: number;
826
+ }
827
+ /** 查看结果:命中或非变更 miss(Host 用 code 表示 miss,不是抛错)。 */
828
+ type HostScheduleViewOutcome = {
829
+ kind: 'task';
830
+ task: HostScheduleTaskView;
831
+ } | {
832
+ kind: 'not-found';
833
+ id: string;
834
+ };
835
+ /** 编辑结果:更新后的任务、已删除、miss,或乐观锁冲突(wire 上回 E_BUSY)。 */
836
+ type HostScheduleEditOutcome = {
837
+ kind: 'task';
838
+ task: HostScheduleTaskView;
839
+ } | {
840
+ kind: 'deleted';
841
+ id: string;
842
+ } | {
843
+ kind: 'not-found';
844
+ id: string;
845
+ } | {
846
+ kind: 'conflict';
847
+ id: string;
848
+ };
849
+ /** 手动执行结果:已投递、已有执行在进行中(E_BUSY),或目标已不存在。 */
850
+ type HostScheduleRunOutcome = {
851
+ kind: 'task';
852
+ task: HostScheduleTaskView;
853
+ } | {
854
+ kind: 'pending';
855
+ id: string;
856
+ } | {
857
+ kind: 'not-found';
858
+ id: string;
859
+ };
860
+ /** 清理已结束任务的结果:删除的条数(宿主上没有已结束任务时为 0)。 */
861
+ interface HostScheduleDeleteEndedResult {
862
+ deleted: number;
863
+ }
864
+ interface HostScheduleLimitsView {
865
+ /** 以新建会话方式投递的最小间隔秒数;客户端只展示,不自行节流。 */
866
+ newSessionIntervalSeconds: number;
867
+ }
868
+ interface HostScheduleCreateRequestLike {
869
+ title: string;
870
+ prompt: string;
871
+ timing: HostScheduleTiming;
872
+ /** 省略时由 Host 默认:首次投递新建并复用会话。 */
873
+ target?: HostScheduleTargetRequest;
874
+ }
875
+ type HostScheduleEditRequestLike = {
876
+ id: string;
877
+ action: 'update';
878
+ patch: HostSchedulePatch;
879
+ expectedUpdatedAt?: string | null;
880
+ } | {
881
+ id: string;
882
+ action: 'delete';
883
+ expectedUpdatedAt?: string | null;
884
+ };
885
+ /**
886
+ * 宿主级 Schedule 服务(DSH 0.2.2-alpha.3 起)。
887
+ *
888
+ * 探测只看形状:`edit` 存在且 `update` 不存在。`remoteXxx` 是同一服务的
889
+ * 「人类 Remote 调用」变体(不记录 acting Session);Bridge 就是人类 Remote
890
+ * 调用方,因此直接用公开方法并省略 actorSessionId。
891
+ */
892
+ interface HostScheduleApiLike {
893
+ readonly mode: 'host';
894
+ list(req: RpcRequestLike<HostScheduleListRequestLike>): Promise<RpcResponseLike<HostScheduleListResultLike>>;
895
+ view(req: RpcRequestLike<{
896
+ id: string;
897
+ }>): Promise<RpcResponseLike<HostScheduleViewOutcome>>;
898
+ create(req: RpcRequestLike<HostScheduleCreateRequestLike>): Promise<RpcResponseLike<HostScheduleTaskView>>;
899
+ edit(req: RpcRequestLike<HostScheduleEditRequestLike>): Promise<RpcResponseLike<HostScheduleEditOutcome>>;
900
+ run(req: RpcRequestLike<{
901
+ id: string;
902
+ }>): Promise<RpcResponseLike<HostScheduleRunOutcome>>;
903
+ history(req: RpcRequestLike<{
904
+ id: string;
905
+ limit: number;
906
+ before?: string;
907
+ }>): Promise<RpcResponseLike<ScheduleHistoryViewLike>>;
908
+ limits(req: RpcRequestLike<Record<string, never>>): Promise<RpcResponseLike<HostScheduleLimitsView>>;
909
+ /** 删除宿主上全部 `status="ended"` 的任务;进行中与暂停的任务不受影响。 */
910
+ deleteEnded(req: RpcRequestLike<Record<string, never>>): Promise<RpcResponseLike<HostScheduleDeleteEndedResult>>;
911
+ }
912
+ type ScheduleApiLike = LegacyScheduleApiLike | HostScheduleApiLike;
687
913
  interface HostApiLike {
688
914
  listDirectory?(req: RpcRequestLike<{
689
915
  path?: string;
@@ -914,16 +1140,48 @@ interface PushOutlet {
914
1140
  */
915
1141
  isAvailable(): boolean;
916
1142
  }
917
- //#endregion
918
- //#region src/document-payload.d.ts
1143
+ interface QuietCompletionResult {
1144
+ suppressed: boolean;
1145
+ note?: string;
1146
+ }
1147
+ interface TurnVerdict {
1148
+ /** 本轮最近一条驱动消息是计划任务投递(且其后没有用户消息)。 */
1149
+ scheduled: boolean;
1150
+ /** 本轮 `turn/start` 的轮次号;日志里读不到时为 undefined。 */
1151
+ turn?: number;
1152
+ }
1153
+ declare class QuietCompletionTracker {
1154
+ /**
1155
+ * 判定过计划任务轮次的会话。粘性集合:加入后不再移除,工具不按轮出现或消失。
1156
+ * 宿主每次工具列表变化都会往会话追加一条工具增减消息并让提示词缓存失效,
1157
+ * 按轮开关会让同一会话反复产生这类消息。
1158
+ */
1159
+ private readonly scheduleSessions;
1160
+ private readonly quiet;
1161
+ /** 启动时用宿主任务列表里的投递目标会话预热,避免重启后工具先消失再出现。 */
1162
+ seed(sessionIds: Iterable<string>): void;
1163
+ isScheduleSession(sessionId: string): boolean;
1164
+ /** 加入粘性集合;返回是否为新加入(调用方据此记一次日志)。 */
1165
+ markScheduleSession(sessionId: string): boolean;
1166
+ /** 工具执行:只在计划任务轮次内生效。 */
1167
+ requestQuiet(sessionId: string | undefined, verdict: TurnVerdict, seq: number): QuietCompletionResult;
1168
+ /**
1169
+ * 桥接层观察到 user/message:用户在请求静默之后插话(日志位置更晚)就撤销静默,
1170
+ * 本轮照常提醒。计划任务与注入上下文不影响。
1171
+ */
1172
+ noteUserMessage(sessionId: string, sourceKind: string | undefined, seq: number | undefined): void;
1173
+ /**
1174
+ * turn.end 时调用。返回 true 表示本轮完成通知应被抑制:成功结束、且本轮请求过静默。
1175
+ * 轮次号能对上时按轮次号判定;迟到的上一轮 turn.end 保留本轮的请求。
1176
+ */
1177
+ consumeTurnEnd(sessionId: string, ok: boolean, turn: number | undefined, seq: number | undefined): boolean;
1178
+ }
919
1179
  interface PromptDocument {
920
1180
  name: string;
921
1181
  mediaType: string;
922
1182
  text: string;
923
1183
  truncated?: boolean;
924
1184
  }
925
- //#endregion
926
- //#region src/host-bridge.d.ts
927
1185
  /**
928
1186
  * 失败结果直接携带 wire 错误码(error vocabulary 见 wire-errors.ts)。
929
1187
  *
@@ -942,7 +1200,19 @@ type ScheduleBridgeResult<T> = {
942
1200
  message: string;
943
1201
  replayed?: boolean;
944
1202
  };
945
- declare class HostBridge {
1203
+ /**
1204
+ * 宿主级编辑(update / delete 合一的 `edit`)的 Bridge 结果值。
1205
+ *
1206
+ * 与 legacy 的 updated/deleted 两个独立帧结果分开表达,wire handler 用
1207
+ * `'deleted' in value` 落成 `deleted:true` 或 `task`。
1208
+ */
1209
+ type HostScheduleEditValue = {
1210
+ task: HostScheduleTaskView;
1211
+ } | {
1212
+ deleted: true;
1213
+ id: string;
1214
+ };
1215
+ export declare class HostBridge {
946
1216
  private readonly apiProxy;
947
1217
  private readonly historyBufferMax;
948
1218
  /** 三个 journal 的落盘失败诊断输出;缺省即静默。不打任何消息体。 */
@@ -957,6 +1227,8 @@ declare class HostBridge {
957
1227
  * and restore them. Excluded from `summaries` and from the live broadcast. */
958
1228
  private archivedSummaries;
959
1229
  private subagentSessionIds;
1230
+ /** 计划任务按需完成通知(quiet-completion.ts):index.ts 用它注册 Agent 工具。 */
1231
+ readonly quietCompletion: QuietCompletionTracker;
960
1232
  /**
961
1233
  * 每个会话最近一次已知的队列(inbox 投影的折叠结果)及其指纹。来源是实时
962
1234
  * 投影通知或打开会话时读到的基线;指纹用来丢掉内容没变的重复通知。
@@ -1040,6 +1312,13 @@ declare class HostBridge {
1040
1312
  private record;
1041
1313
  /** Start consuming host + mux streams. Idempotent; aborts on dispose(). */
1042
1314
  start(): void;
1315
+ /**
1316
+ * 用宿主任务列表里的投递目标会话预热计划任务会话集合,避免插件重启后工具
1317
+ * 先消失、等下一次投递再出现(每次变化都会给会话追加工具增减消息)。
1318
+ * `new` 目标没有固定会话,只能从最近一次投递回执里取。失败只记日志:集合仍会
1319
+ * 在下一次投递时补上。由 index.ts 在 schedule 服务就绪、注册工具时调用。
1320
+ */
1321
+ seedQuietCompletionSessions(): Promise<void>;
1043
1322
  dispose(): void;
1044
1323
  private runHostStream;
1045
1324
  private runMuxStream;
@@ -1149,7 +1428,52 @@ declare class HostBridge {
1149
1428
  }): Promise<ScheduleBridgeResult<{
1150
1429
  sessionId: string;
1151
1430
  }>>;
1431
+ /**
1432
+ * 当前 adapter 是否宿主级计划任务模型。
1433
+ *
1434
+ * 能力位 `schedulesHost`(host-capabilities.ts)与新帧、旧帧映射全部读这一个
1435
+ * 判别位:探测只发生一次(DshApiProxy.resolveSchedule),这里不再看控制器
1436
+ * 方法,也不看版本号字符串。
1437
+ */
1438
+ private get hostSchedule();
1152
1439
  listSchedules(sessionId: string): Promise<ScheduleBridgeResult<ScheduleTaskViewLike[]>>;
1440
+ /** 宿主级列表 -> 旧会话级视图:过滤 session 目标、丢弃 ended、按 scheduledAt 升序。 */
1441
+ private listHostSchedulesAsLegacy;
1442
+ listHostSchedules(request?: HostScheduleListRequestLike): Promise<ScheduleBridgeResult<HostScheduleListResultLike>>;
1443
+ viewHostSchedule(id: string): Promise<ScheduleBridgeResult<HostScheduleTaskView>>;
1444
+ createHostSchedule(deviceId: string, payload: Record<string, unknown> & {
1445
+ clientRequestId: string;
1446
+ title: string;
1447
+ prompt: string;
1448
+ timing: unknown;
1449
+ target?: unknown;
1450
+ }): Promise<ScheduleBridgeResult<HostScheduleTaskView>>;
1451
+ editHostSchedule(deviceId: string, payload: Record<string, unknown> & {
1452
+ clientRequestId: string;
1453
+ id: string;
1454
+ action: 'update' | 'delete';
1455
+ expectedUpdatedAt?: string | null;
1456
+ patch?: unknown;
1457
+ }): Promise<ScheduleBridgeResult<HostScheduleEditValue>>;
1458
+ runHostSchedule(deviceId: string, payload: {
1459
+ clientRequestId: string;
1460
+ id: string;
1461
+ }): Promise<ScheduleBridgeResult<HostScheduleTaskView>>;
1462
+ /**
1463
+ * 删除宿主上全部已结束(`status="ended"`)的任务,返回删除条数。
1464
+ *
1465
+ * 与其他变更帧共用 scheduleMutations journal:同一 clientRequestId 重放时直接回放
1466
+ * 首次结果,不会再删一次。成功后广播 `s2c.schedule.changed`;失败时同样广播——上游
1467
+ * 文档说明失败的批次无法确定哪些行已删除,客户端应重新读取列表。
1468
+ */
1469
+ deleteEndedHostSchedules(deviceId: string, payload: {
1470
+ clientRequestId: string;
1471
+ }): Promise<ScheduleBridgeResult<{
1472
+ deleted?: number;
1473
+ }>>;
1474
+ scheduleLimits(): Promise<ScheduleBridgeResult<{
1475
+ newSessionIntervalSeconds: number;
1476
+ }>>;
1153
1477
  scheduleHistory(sessionId: string, id: string, limit: number, before?: string): Promise<ScheduleBridgeResult<ScheduleHistoryViewLike>>;
1154
1478
  createSchedule(deviceId: string, payload: Record<string, unknown> & {
1155
1479
  sessionId: string;
@@ -1182,9 +1506,7 @@ declare class HostBridge {
1182
1506
  respondApproval(requestId: string, decision: 'allow' | 'deny', reason?: string): Promise<PendingResponseOutcome>;
1183
1507
  respondQuestion(requestId: string, answers: unknown): Promise<PendingResponseOutcome>;
1184
1508
  }
1185
- //#endregion
1186
- //#region src/config.d.ts
1187
- interface Config {
1509
+ export interface Config {
1188
1510
  /** Master switch; when false the plugin activates and does nothing. */
1189
1511
  enabled?: boolean;
1190
1512
  /** Protocol-v2 device registry JSON path. */
@@ -1237,7 +1559,7 @@ interface Config {
1237
1559
  relayToken?: string;
1238
1560
  };
1239
1561
  }
1240
- declare const Config: z<Schemastery.ObjectS<NoInfer<{
1562
+ export declare const Config: z<Schemastery.ObjectS<NoInfer<{
1241
1563
  enabled: z<boolean, boolean, "volatile-defined">;
1242
1564
  devicesPath: z<string, string, "defined">;
1243
1565
  historyBufferMax: z<number, number, "defined">;
@@ -1342,12 +1664,10 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
1342
1664
  relayToken: z<string, string, "defined">;
1343
1665
  }>>, "defined">;
1344
1666
  }>>, "plain">;
1345
- //#endregion
1346
- //#region src/push-policy.d.ts
1347
1667
  /** Prune only when the provider supplies an authoritative token-lifecycle verdict. */
1348
- declare function shouldPrunePushToken(outcome: 'sent' | 'invalid-token' | 'failed', reason?: string): boolean;
1668
+ export declare function shouldPrunePushToken(outcome: 'sent' | 'invalid-token' | 'failed', reason?: string): boolean;
1349
1669
  /** APNs requires both registration and the same content permission as WS. */
1350
- declare function mayReceivePush(device: {
1670
+ export declare function mayReceivePush(device: {
1351
1671
  scopes?: readonly string[];
1352
1672
  }, notification: unknown): boolean;
1353
1673
  /**
@@ -1356,13 +1676,11 @@ declare function mayReceivePush(device: {
1356
1676
  * re-derive it; an explicitly configured relay token remains user-owned
1357
1677
  * configuration and is never silently rewritten.
1358
1678
  */
1359
- declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome: 'sent' | 'invalid-token' | 'failed', reason: string | undefined, opts: {
1679
+ export declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome: 'sent' | 'invalid-token' | 'failed', reason: string | undefined, opts: {
1360
1680
  usedCellToken: boolean;
1361
1681
  hasEnrollKey: boolean;
1362
1682
  tokenStillCurrent: boolean;
1363
1683
  }): boolean;
1364
- //#endregion
1365
- //#region src/index.d.ts
1366
1684
  /**
1367
1685
  * dsh-deeppilot — data bridge between the DSH host and DeepPilot
1368
1686
  * clients. Owns independent, narrowly routed LAN (TLS-only, pinned by paired
@@ -1377,10 +1695,9 @@ declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome:
1377
1695
  * Protocol: PROTOCOL.md is normative; src/protocol.ts and the private app's
1378
1696
  * Swift models mirror that v2 contract.
1379
1697
  */
1380
- declare const name = "deeppilot";
1698
+ export declare const name = "deeppilot";
1381
1699
  /** No web-service requirement: the plugin owns its own transport listeners. */
1382
- declare const inject: string[];
1383
- declare function apply(ctx: Context, options: unknown): void;
1384
- //#endregion
1385
- export { Config, HostBridge, apply, inject, mayReceivePush, name, shouldPrunePushToken, shouldReEnrollRelayToken };
1700
+ export declare const inject: string[];
1701
+ export declare function apply(ctx: Context, options: unknown): void;
1702
+ export {};
1386
1703
  //# sourceMappingURL=index.d.ts.map