dsh-deeppilot 0.8.0 → 0.8.2

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
@@ -264,8 +264,8 @@ interface SessionsApiLike {
264
264
  };
265
265
  data: string;
266
266
  }>>;
267
- /** DSH 0.1.7+: complete projection baseline for one session; null when the session is gone. */
268
- projections?(req: RpcRequestLike<{
267
+ /** Complete projection baseline for one session; null when it is gone. */
268
+ projections(req: RpcRequestLike<{
269
269
  sessionId: string;
270
270
  }>): Promise<RpcResponseLike<{
271
271
  asOfSeq: number;
@@ -446,12 +446,6 @@ interface ApiProxyLike {
446
446
  sessions: SessionsApiLike;
447
447
  workspace?: WorkspaceApiLike;
448
448
  host?: HostApiLike;
449
- /**
450
- * DSH 0.1.7 added `session.projections`. Absent/false keeps the bridge on
451
- * its existing list-row projection hints — the call is gated on this flag so
452
- * older hosts never see a failing RPC.
453
- */
454
- supportsProjections?: boolean;
455
449
  respond(message: {
456
450
  type: 'client-response';
457
451
  rpcId: string;
@@ -639,7 +633,7 @@ declare class HostBridge {
639
633
  /** Tail history for an opened session; pushes s2c.session.tail to the sink. */
640
634
  openSession(sink: BridgeSink, sessionId: string, tailCount: number): Promise<boolean>;
641
635
  /**
642
- * Pull one session's projection baseline (DSH 0.1.7+) and fold every key
636
+ * Pull one session's projection baseline and fold every key
643
637
  * through applyProjection — unknown keys are ignored there, `null` means the
644
638
  * session no longer exists, and any failure degrades to a diagnostic: opening
645
639
  * a session must never fail because a baseline could not be read.
@@ -744,18 +738,18 @@ interface Config {
744
738
  };
745
739
  }
746
740
  declare const Config: z<Schemastery.ObjectS<NoInfer<{
747
- enabled: z<boolean, boolean, "defined">;
741
+ enabled: z<boolean, boolean, "volatile-defined">;
748
742
  devicesPath: z<string, string, "defined">;
749
743
  historyBufferMax: z<number, number, "defined">;
750
- debug: z<boolean, boolean, "defined">;
751
- local: z<Schemastery.ObjectS<NoInfer<{
744
+ debug: z<boolean, boolean, "volatile-defined">;
745
+ local: z<NoInfer<Schemastery.ObjectS<NoInfer<{
752
746
  enabled: z<boolean, boolean, "defined">;
753
747
  port: z<number, number, "defined">;
754
- }>>, Schemastery.ObjectT<NoInfer<{
748
+ }>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
755
749
  enabled: z<boolean, boolean, "defined">;
756
750
  port: z<number, number, "defined">;
757
- }>>, "defined">;
758
- remote: z<Schemastery.ObjectS<NoInfer<{
751
+ }>>>, "volatile-defined">;
752
+ remote: z<NoInfer<Schemastery.ObjectS<NoInfer<{
759
753
  enabled: z<boolean, boolean, "defined">;
760
754
  provider: z<"tailscale-funnel", "tailscale-funnel", "defined">;
761
755
  hostname: z<string, string, "defined">;
@@ -763,7 +757,7 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
763
757
  helperPath: z<string, string, "defined">;
764
758
  funnelPort: z<443 | 8443 | 10000, 443 | 8443 | 10000, "defined">;
765
759
  maxConnectionsPerSource: z<number, number, "defined">;
766
- }>>, Schemastery.ObjectT<NoInfer<{
760
+ }>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
767
761
  enabled: z<boolean, boolean, "defined">;
768
762
  provider: z<"tailscale-funnel", "tailscale-funnel", "defined">;
769
763
  hostname: z<string, string, "defined">;
@@ -771,7 +765,7 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
771
765
  helperPath: z<string, string, "defined">;
772
766
  funnelPort: z<443 | 8443 | 10000, 443 | 8443 | 10000, "defined">;
773
767
  maxConnectionsPerSource: z<number, number, "defined">;
774
- }>>, "defined">;
768
+ }>>>, "volatile-defined">;
775
769
  push: z<Schemastery.ObjectS<NoInfer<{
776
770
  provider: z<"apns" | "none" | "relay", "apns" | "none" | "relay", "defined">;
777
771
  contentMode: z<"generic" | "preview", "generic" | "preview", "defined">;
@@ -792,18 +786,18 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
792
786
  relayToken: z<string, string, "defined">;
793
787
  }>>, "defined">;
794
788
  }>>, Schemastery.ObjectT<NoInfer<{
795
- enabled: z<boolean, boolean, "defined">;
789
+ enabled: z<boolean, boolean, "volatile-defined">;
796
790
  devicesPath: z<string, string, "defined">;
797
791
  historyBufferMax: z<number, number, "defined">;
798
- debug: z<boolean, boolean, "defined">;
799
- local: z<Schemastery.ObjectS<NoInfer<{
792
+ debug: z<boolean, boolean, "volatile-defined">;
793
+ local: z<NoInfer<Schemastery.ObjectS<NoInfer<{
800
794
  enabled: z<boolean, boolean, "defined">;
801
795
  port: z<number, number, "defined">;
802
- }>>, Schemastery.ObjectT<NoInfer<{
796
+ }>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
803
797
  enabled: z<boolean, boolean, "defined">;
804
798
  port: z<number, number, "defined">;
805
- }>>, "defined">;
806
- remote: z<Schemastery.ObjectS<NoInfer<{
799
+ }>>>, "volatile-defined">;
800
+ remote: z<NoInfer<Schemastery.ObjectS<NoInfer<{
807
801
  enabled: z<boolean, boolean, "defined">;
808
802
  provider: z<"tailscale-funnel", "tailscale-funnel", "defined">;
809
803
  hostname: z<string, string, "defined">;
@@ -811,7 +805,7 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
811
805
  helperPath: z<string, string, "defined">;
812
806
  funnelPort: z<443 | 8443 | 10000, 443 | 8443 | 10000, "defined">;
813
807
  maxConnectionsPerSource: z<number, number, "defined">;
814
- }>>, Schemastery.ObjectT<NoInfer<{
808
+ }>>>, NoInfer<Schemastery.ObjectT<NoInfer<{
815
809
  enabled: z<boolean, boolean, "defined">;
816
810
  provider: z<"tailscale-funnel", "tailscale-funnel", "defined">;
817
811
  hostname: z<string, string, "defined">;
@@ -819,7 +813,7 @@ declare const Config: z<Schemastery.ObjectS<NoInfer<{
819
813
  helperPath: z<string, string, "defined">;
820
814
  funnelPort: z<443 | 8443 | 10000, 443 | 8443 | 10000, "defined">;
821
815
  maxConnectionsPerSource: z<number, number, "defined">;
822
- }>>, "defined">;
816
+ }>>>, "volatile-defined">;
823
817
  push: z<Schemastery.ObjectS<NoInfer<{
824
818
  provider: z<"apns" | "none" | "relay", "apns" | "none" | "relay", "defined">;
825
819
  contentMode: z<"generic" | "preview", "generic" | "preview", "defined">;
@@ -867,8 +861,8 @@ declare function shouldReEnrollRelayToken(transport: 'apns' | 'relay', outcome:
867
861
  * devices) and loopback Funnel-origin listeners. The web UI and the rest of
868
862
  * DSH's API are never exposed by these listeners.
869
863
  *
870
- * Data plane: an in-process HostBridge consumes a local compatibility façade
871
- * over DSH 0.1.2 Session/Workspace controllers, mirrors session summaries,
864
+ * Data plane: an in-process HostBridge consumes a local adapter over DSH
865
+ * Session/Workspace controllers, mirrors session summaries,
872
866
  * tracks pending approvals/questions, and fans projected protocol-v2 pushes
873
867
  * out to every connected device.
874
868
  *
package/lib/index.js CHANGED
@@ -2479,26 +2479,26 @@ var HostBridge = class {
2479
2479
  hasMore: Boolean(result.hasMore) || page.dropped > 0
2480
2480
  });
2481
2481
  this.deriveTitleFallback(sessionId, messages);
2482
- if (this.apiProxy.supportsProjections === true) this.refreshProjections(sessionId);
2482
+ this.refreshProjections(sessionId);
2483
2483
  return true;
2484
2484
  } catch {
2485
2485
  return false;
2486
2486
  }
2487
2487
  }
2488
2488
  /**
2489
- * Pull one session's projection baseline (DSH 0.1.7+) and fold every key
2489
+ * Pull one session's projection baseline and fold every key
2490
2490
  * through applyProjection — unknown keys are ignored there, `null` means the
2491
2491
  * session no longer exists, and any failure degrades to a diagnostic: opening
2492
2492
  * a session must never fail because a baseline could not be read.
2493
2493
  */
2494
2494
  async refreshProjections(sessionId) {
2495
2495
  try {
2496
- const response = await this.apiProxy.sessions.projections?.({
2496
+ const response = await this.apiProxy.sessions.projections({
2497
2497
  rpcId: randomUUID(),
2498
2498
  payload: { sessionId }
2499
2499
  });
2500
2500
  if (this.disposed) return;
2501
- const result = response?.result;
2501
+ const result = response.result;
2502
2502
  if (!result) return;
2503
2503
  if (!result.ok) {
2504
2504
  this.diagnostic("sessions.projections failed: " + result.error.code);
@@ -3303,9 +3303,9 @@ function projectSessionModels(value) {
3303
3303
  }
3304
3304
  /** Project a history page (raw events) into MessageProjection rows. */
3305
3305
  //#endregion
3306
- //#region src/dsh012-remote-interactions.ts
3306
+ //#region src/dsh-remote-interactions.ts
3307
3307
  /**
3308
- * Resident DSH 0.1.2-alpha.3 Remote Events client for phone interactions.
3308
+ * Resident DSH Remote Events client for phone interactions.
3309
3309
  *
3310
3310
  * The Host-side `approval/request` and `user-questions/request` events are
3311
3311
  * owned once by DSH API Remotes. API Gateway then fans each pending waterfall
@@ -3313,6 +3313,10 @@ function projectSessionModels(value) {
3313
3313
  * that official Client plane in-process instead of registering a competing
3314
3314
  * Host waterfall listener or replacing the official Web composer.
3315
3315
  */
3316
+ /** The rc.1 Client sends relative RPC paths to its in-process carrier. */
3317
+ function inProcessRemoteRequest(input, init) {
3318
+ return new Request(new URL(input, "http://localhost/"), init);
3319
+ }
3316
3320
  let clientFaces;
3317
3321
  /**
3318
3322
  * Load DSH's browser-distributed Client faces into a tiny Host-side module
@@ -3371,7 +3375,7 @@ function createAgentScope(ctx, identity) {
3371
3375
  }
3372
3376
  function inProcessStream(gateway, endpoint, payload, signal) {
3373
3377
  return (async function* () {
3374
- yield* await gateway.wireStream.open(endpoint, payload, signal);
3378
+ yield* await gateway.wireStream.open(endpoint, payload, void 0, void 0, signal);
3375
3379
  })();
3376
3380
  }
3377
3381
  /**
@@ -3381,16 +3385,16 @@ function inProcessStream(gateway, endpoint, payload, signal) {
3381
3385
  * The returned disposer tears down the Remote Events generation, all pending
3382
3386
  * listeners, and every lazily minted Agent scope.
3383
3387
  */
3384
- async function startDsh012RemoteInteractions(hostCtx, handlers) {
3388
+ async function startDshRemoteInteractions(hostCtx, handlers) {
3385
3389
  const connection = hostCtx.get("connection");
3386
3390
  const gateway = hostCtx.get("typertGateway");
3387
- if (connection === void 0) throw new Error("dsh 0.1.2-alpha.3 Host connection is unavailable");
3388
- if (gateway === void 0) throw new Error("dsh 0.1.2-alpha.3 typertGateway is unavailable");
3391
+ if (connection === void 0) throw new Error("DSH Host connection is unavailable");
3392
+ if (gateway === void 0) throw new Error("DSH typertGateway is unavailable");
3389
3393
  const faces = await loadClientFaces();
3390
3394
  const client = new Context();
3391
3395
  const fetchHandler = connection.createSharedFetchHandler("/api");
3392
3396
  const transport = {
3393
- fetch: (input, init) => fetchHandler.fetch(new Request(input, init)),
3397
+ fetch: (input, init) => fetchHandler.fetch(inProcessRemoteRequest(input, init)),
3394
3398
  openStream: (endpoint, payload, signal) => inProcessStream(gateway, endpoint, payload, signal),
3395
3399
  ownsHost: true
3396
3400
  };
@@ -3437,19 +3441,17 @@ async function startDsh012RemoteInteractions(hostCtx, handlers) {
3437
3441
  }
3438
3442
  }
3439
3443
  //#endregion
3440
- //#region src/dsh012-api-proxy.ts
3444
+ //#region src/dsh-api-proxy.ts
3441
3445
  /**
3442
- * Compatibility façade for the DSH 0.1.2 controller API.
3446
+ * Adapter for the DSH rc.1 controller API.
3443
3447
  *
3444
3448
  * DeepPilot's phone protocol deliberately speaks one stable in-process
3445
- * `apiProxy` vocabulary. Harness 0.1.2 removed that service in favor of
3446
- * direct Session/Workspace controllers plus Gateway-backed Remote Events.
3447
- * This adapter rebuilds the small subset the bridge needs from those public
3448
- * controllers and joins the official Client interaction plane in-process,
3449
- * keeping the phone protocol isolated from the Host API migration.
3449
+ * `apiProxy` vocabulary. This adapter maps it to the current public
3450
+ * Session/Workspace controllers and Gateway-backed Remote Events, keeping
3451
+ * the phone protocol isolated from the Host API.
3450
3452
  */
3451
- /** Direct-controller facade with the exact legacy shape HostBridge consumes. */
3452
- var Dsh012ApiProxy = class {
3453
+ /** Direct-controller adapter with the shape HostBridge consumes. */
3454
+ var DshApiProxy = class {
3453
3455
  ctx;
3454
3456
  session;
3455
3457
  workspaceController;
@@ -3459,22 +3461,14 @@ var Dsh012ApiProxy = class {
3459
3461
  constructor(ctx, options = {}) {
3460
3462
  this.ctx = ctx;
3461
3463
  const session = ctx.get("sessionController");
3462
- if (session === void 0) throw new Error("dsh 0.1.2 sessionController is unavailable");
3464
+ if (session === void 0) throw new Error("DSH sessionController is unavailable");
3463
3465
  this.session = session;
3464
3466
  this.workspaceController = ctx.get("workspaceController");
3465
- if (typeof this.workspaceController?.unarchiveSession !== "function") delete this.workspace?.unarchiveSession;
3467
+ if (this.workspaceController === void 0) delete this.workspace?.unarchiveSession;
3466
3468
  this.directoryPicker = ctx.get("directoryPickerController");
3467
3469
  this.shouldSurfaceInteraction = options.shouldSurfaceInteraction ?? (() => true);
3468
3470
  }
3469
3471
  /**
3470
- * Whether the host controller implements `session.projections` (added in
3471
- * DSH 0.1.7). HostBridge gates its open-time baseline refresh on this so
3472
- * older hosts keep their current list-row-hint behaviour with no RPC noise.
3473
- */
3474
- get supportsProjections() {
3475
- return typeof this.session.projections === "function";
3476
- }
3477
- /**
3478
3472
  * Decide whether this Gateway Client can surface a phone card. The decision
3479
3473
  * fails open to false so a broken device registry delegates this delivery
3480
3474
  * while the official Web Client remains able to answer.
@@ -3529,11 +3523,7 @@ var Dsh012ApiProxy = class {
3529
3523
  rename: async (request) => this.call(() => this.session.rename(request.payload)),
3530
3524
  cancel: async (request) => this.call(() => this.session.cancel(request.payload)),
3531
3525
  attachment: async (request) => this.call(() => this.session.attachment(request.payload)),
3532
- projections: async (request) => this.call(() => {
3533
- const read = this.session.projections;
3534
- if (typeof read !== "function") throw unavailable("session projections unavailable");
3535
- return read.call(this.session, request.payload);
3536
- })
3526
+ projections: async (request) => this.call(() => this.session.projections(request.payload))
3537
3527
  };
3538
3528
  workspace = {
3539
3529
  list: async () => this.call(async () => {
@@ -3558,9 +3548,7 @@ var Dsh012ApiProxy = class {
3558
3548
  }),
3559
3549
  unarchiveSession: async (request) => this.call(async () => {
3560
3550
  if (this.workspaceController === void 0) throw unavailable("workspace controller unavailable");
3561
- const unarchive = this.workspaceController.unarchiveSession;
3562
- if (typeof unarchive !== "function") throw unavailable("session restore unavailable on this host version");
3563
- return { archivedSessionIds: [...(await unarchive.call(this.workspaceController, request.payload)).archivedSessionIds] };
3551
+ return { archivedSessionIds: [...(await this.workspaceController.unarchiveSession(request.payload)).archivedSessionIds] };
3564
3552
  })
3565
3553
  };
3566
3554
  host = {
@@ -3611,7 +3599,7 @@ var Dsh012ApiProxy = class {
3611
3599
  });
3612
3600
  let disposeInteractions;
3613
3601
  try {
3614
- disposeInteractions = await startDsh012RemoteInteractions(this.ctx, {
3602
+ disposeInteractions = await startDshRemoteInteractions(this.ctx, {
3615
3603
  approval: (sessionId, request, next) => this.answerApproval(queue, sessionId, request, next),
3616
3604
  question: (sessionId, request, next) => this.answerQuestion(queue, sessionId, request, next)
3617
3605
  });
@@ -4111,28 +4099,11 @@ const booleanSchema = { parse(value) {
4111
4099
  if (typeof value !== "boolean") reject("boolean");
4112
4100
  return value;
4113
4101
  } };
4114
- /**
4115
- * One strict boundary codec carrying both generation shapes of the supported
4116
- * `0.1.x` host family.
4117
- *
4118
- * Through `0.1.6-alpha.1` a descriptor published the schema value itself and
4119
- * every consumer parsed through `codec.schema.parse(value)`. `0.1.6-alpha.2`
4120
- * switched to a lazily materialized process-realm factory: `TypertRegistry`
4121
- * now rejects a strict codec without `create()`, and the Gateway parses
4122
- * through `codec.create().parse(value)`.
4123
- *
4124
- * Publishing both keys — `create()` returning the same hand-written,
4125
- * dependency-free codec — keeps one package valid across the entire declared
4126
- * peer range instead of forking the wire contract per host generation. The
4127
- * cast is required because each generation's `TypertCodec` declares only its
4128
- * own key, so a fresh object literal carrying both fails excess-property
4129
- * checking against either one.
4130
- */
4102
+ /** The rc.1 Gateway materializes each strict codec through `create()`. */
4131
4103
  function strictCodec(typeSymbol, schema) {
4132
4104
  return {
4133
4105
  mode: "strict",
4134
4106
  typeSymbol,
4135
- schema,
4136
4107
  create: () => schema
4137
4108
  };
4138
4109
  }
@@ -5368,18 +5339,18 @@ function localListenError(error, port) {
5368
5339
  /** Operator-run relay used by distributed builds; overridable via config. */
5369
5340
  const DEFAULT_RELAY_URL = "https://pilot.hailab.dev";
5370
5341
  const Config = z.object({
5371
- enabled: live(z.boolean().default(true)),
5342
+ enabled: z.boolean().default(true).volatile(),
5372
5343
  devicesPath: z.string().default(join(bridgeDataDir(), "devices-v2.json")),
5373
5344
  historyBufferMax: z.natural().min(100).default(2e3),
5374
- debug: live(z.boolean().default(false)),
5375
- local: live(z.object({
5345
+ debug: z.boolean().default(false).volatile(),
5346
+ local: z.object({
5376
5347
  enabled: z.boolean().default(true),
5377
5348
  port: z.natural().min(MIN_LOCAL_PORT).max(MAX_LOCAL_PORT).default(DEFAULT_LOCAL_PORT).description("DeepPilot 局域网独立端口(仅 TLS;默认 3098,修改后本地连接会短暂重连)")
5378
5349
  }).default({
5379
5350
  enabled: true,
5380
5351
  port: DEFAULT_LOCAL_PORT
5381
- })),
5382
- remote: live(z.object({
5352
+ }).volatile(),
5353
+ remote: z.object({
5383
5354
  enabled: z.boolean().default(false),
5384
5355
  provider: z.union(["tailscale-funnel"]).default("tailscale-funnel"),
5385
5356
  hostname: z.string().default(DEFAULT_REMOTE_HOSTNAME),
@@ -5399,7 +5370,7 @@ const Config = z.object({
5399
5370
  helperPath: "",
5400
5371
  funnelPort: 443,
5401
5372
  maxConnectionsPerSource: 8
5402
- })),
5373
+ }).volatile(),
5403
5374
  push: z.object({
5404
5375
  provider: z.union([
5405
5376
  "none",
@@ -5425,21 +5396,6 @@ const Config = z.object({
5425
5396
  })
5426
5397
  });
5427
5398
  /**
5428
- * Declare one live-update (volatile) config node when the host supports it.
5429
- *
5430
- * DSH 0.1.7's schemastery adds `Schema#volatile()`; the schemas this package
5431
- * typechecks against (3.18.x line) do not have the method, so the call goes
5432
- * through a structural check instead of a direct chain — a direct
5433
- * `.volatile()` would both fail typecheck today and throw at import on an
5434
- * older host, killing plugin activation.
5435
- */
5436
- function live(node) {
5437
- const schema = node;
5438
- if (typeof schema.volatile === "function") return schema.volatile();
5439
- if (typeof schema.extra === "function") return schema.extra("volatile", true);
5440
- return node;
5441
- }
5442
- /**
5443
5399
  * Deep-unwrap live-update (volatile) references to plain values.
5444
5400
  *
5445
5401
  * On a 0.1.7 host, `apply()`'s options — and even a direct `Config(raw)` call
@@ -5447,8 +5403,7 @@ function live(node) {
5447
5403
  * `currentConfig()` compares plain values (`=== true`, numeric bounds, object
5448
5404
  * fields), and schemastery refuses to re-parse a reference, so normalization
5449
5405
  * unwraps on the way in and on the way out. A JSON-shaped config value cannot
5450
- * carry a function, so the `get` check cannot false-positive; plain input
5451
- * passes through unchanged, keeping older-host behavior identical.
5406
+ * carry a function, so the `get` check cannot false-positive.
5452
5407
  */
5453
5408
  function plainConfig(value) {
5454
5409
  if (value === null || typeof value !== "object") return value;
@@ -5462,8 +5417,7 @@ function plainConfig(value) {
5462
5417
  * Cordis hands the second argument in different shapes depending on host
5463
5418
  * composition: a reactive options getter, the resolved config value, or
5464
5419
  * nothing when the patch row omits `config`. Normalize all of them — and
5465
- * unwrap volatile references so the returned Config is plain data on every
5466
- * host generation.
5420
+ * unwrap volatile references so the returned Config is plain data.
5467
5421
  */
5468
5422
  function normalizeOptions(options) {
5469
5423
  if (typeof options === "function") return plainConfig(options());
@@ -6001,8 +5955,8 @@ async function writePrivate(path, contents) {
6001
5955
  * devices) and loopback Funnel-origin listeners. The web UI and the rest of
6002
5956
  * DSH's API are never exposed by these listeners.
6003
5957
  *
6004
- * Data plane: an in-process HostBridge consumes a local compatibility façade
6005
- * over DSH 0.1.2 Session/Workspace controllers, mirrors session summaries,
5958
+ * Data plane: an in-process HostBridge consumes a local adapter over DSH
5959
+ * Session/Workspace controllers, mirrors session summaries,
6006
5960
  * tracks pending approvals/questions, and fans projected protocol-v2 pushes
6007
5961
  * out to every connected device.
6008
5962
  *
@@ -6043,36 +5997,10 @@ function apply(ctx, options) {
6043
5997
  };
6044
5998
  const auditSalt = randomBytes(32);
6045
5999
  const auditLabel = (value) => createHash("sha256").update(auditSalt).update(value).digest("hex").slice(0, 12);
6046
- /**
6047
- * Settings-section source: while a settings service is attached this holds
6048
- * the user-edited section value; otherwise the composition defaults. Read
6049
- * through currentConfig() everywhere (normalizeOptions prefers it).
6050
- */
6051
- let liveSource;
6052
6000
  let scheduleRemoteReconcile;
6053
6001
  let scheduleLocalReconcile;
6054
- const currentConfig = () => {
6055
- if (liveSource !== void 0) return normalizeOptions(liveSource());
6056
- return normalizeOptions(options);
6057
- };
6002
+ const currentConfig = () => normalizeOptions(options);
6058
6003
  const enabledNow = () => currentConfig().enabled === true;
6059
- const settingsHooks = {
6060
- setSource: (source) => {
6061
- liveSource = source;
6062
- queueMicrotask(() => {
6063
- scheduleLocalReconcile?.();
6064
- scheduleRemoteReconcile?.();
6065
- });
6066
- },
6067
- onChange: () => queueMicrotask(() => {
6068
- scheduleLocalReconcile?.();
6069
- scheduleRemoteReconcile?.();
6070
- })
6071
- };
6072
- ctx.inject(["settings"], (settingsCtx) => {
6073
- if (typeof settingsCtx.settings?.installSection !== "function") return;
6074
- settingsCtx.settings.installSection(ctx, "deeppilot", Config, normalizeOptions(void 0), settingsHooks);
6075
- });
6076
6004
  ctx.on("loader/volatile-update", () => queueMicrotask(() => {
6077
6005
  scheduleLocalReconcile?.();
6078
6006
  scheduleRemoteReconcile?.();
@@ -7082,9 +7010,9 @@ function apply(ctx, options) {
7082
7010
  const apiCtx = sub;
7083
7011
  let proxy;
7084
7012
  try {
7085
- proxy = new Dsh012ApiProxy(apiCtx, { shouldSurfaceInteraction: hasPairedPhoneSurface });
7013
+ proxy = new DshApiProxy(apiCtx, { shouldSurfaceInteraction: hasPairedPhoneSurface });
7086
7014
  } catch (error) {
7087
- log("dsh 0.1.2 session bridge unavailable: " + String(error));
7015
+ log("DSH session bridge unavailable: " + String(error));
7088
7016
  return;
7089
7017
  }
7090
7018
  const bridge = new HostBridge(proxy, cfg.historyBufferMax, join(dataDir, "prompt-deliveries-v1.json"));