@dan-ai-studio/dshopencodego 0.1.96 → 0.1.97

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/client.js CHANGED
@@ -173,75 +173,6 @@ var catalogRemote = {
173
173
  ]
174
174
  };
175
175
 
176
- // src/desktop/contract.ts
177
- function parseRelease(value) {
178
- if (value === null || typeof value !== "object") throw new Error("invalid desktop release");
179
- const row = value;
180
- const version = row["version"];
181
- const url = row["url"];
182
- if (typeof version !== "string" || version.length === 0) throw new Error("invalid desktop release");
183
- if (typeof url !== "string" || url.length === 0) throw new Error("invalid desktop release");
184
- const size = row["size"];
185
- const sha512 = row["sha512"];
186
- const stagingPercentage = row["stagingPercentage"];
187
- const releaseDate = row["releaseDate"];
188
- return {
189
- version,
190
- url,
191
- ...typeof size === "number" && Number.isFinite(size) && size >= 0 ? { size } : {},
192
- ...typeof sha512 === "string" && sha512.length > 0 ? { sha512 } : {},
193
- ...typeof stagingPercentage === "number" && Number.isFinite(stagingPercentage) ? { stagingPercentage } : {},
194
- ...typeof releaseDate === "string" && releaseDate.length > 0 ? { releaseDate } : {}
195
- };
196
- }
197
- function parseDesktopReading(value) {
198
- if (value === null || typeof value !== "object") throw new Error("invalid desktop reading");
199
- const row = value;
200
- if (typeof row["checked"] !== "boolean") throw new Error("invalid desktop reading");
201
- if (typeof row["checkedAt"] !== "number" || !Number.isFinite(row["checkedAt"])) {
202
- throw new Error("invalid desktop reading");
203
- }
204
- if (typeof row["platform"] !== "string") throw new Error("invalid desktop reading");
205
- if (typeof row["channel"] !== "string") throw new Error("invalid desktop reading");
206
- const release = row["release"];
207
- return {
208
- checked: row["checked"],
209
- checkedAt: row["checkedAt"],
210
- platform: row["platform"],
211
- channel: row["channel"],
212
- ...release === void 0 ? {} : { release: parseRelease(release) }
213
- };
214
- }
215
- var codec2 = {
216
- mode: "strict",
217
- typeSymbol: "@dan-ai-studio/dshopencodego#DesktopReading",
218
- schema: { parse: parseDesktopReading },
219
- create: () => ({ parse: parseDesktopReading })
220
- };
221
- var desktopRemote = {
222
- package: "@dan-ai-studio/dshopencodego",
223
- descriptors: [
224
- {
225
- id: "@dan-ai-studio/dshopencodego#opencodeGoDesktop/readDesktop",
226
- service: "opencodeGoDesktop",
227
- namespace: "opencodeGoDesktop",
228
- method: "readDesktop",
229
- invocation: { kind: "direct" },
230
- parameters: [],
231
- result: codec2
232
- },
233
- {
234
- id: "@dan-ai-studio/dshopencodego#opencodeGoDesktop/refreshDesktop",
235
- service: "opencodeGoDesktop",
236
- namespace: "opencodeGoDesktop",
237
- method: "refreshDesktop",
238
- invocation: { kind: "direct" },
239
- parameters: [],
240
- result: codec2
241
- }
242
- ]
243
- };
244
-
245
176
  // src/network/contract.ts
246
177
  function parseNetworkReading(value) {
247
178
  if (value === null || typeof value !== "object") throw new Error("invalid network reading");
@@ -256,7 +187,7 @@ function parseNetworkReading(value) {
256
187
  ...typeof failed === "boolean" ? { failed } : {}
257
188
  };
258
189
  }
259
- var codec3 = {
190
+ var codec2 = {
260
191
  mode: "strict",
261
192
  typeSymbol: "@dan-ai-studio/dshopencodego#NetworkReading",
262
193
  schema: { parse: parseNetworkReading },
@@ -272,7 +203,7 @@ var networkRemote = {
272
203
  method: "readNetwork",
273
204
  invocation: { kind: "direct" },
274
205
  parameters: [],
275
- result: codec3
206
+ result: codec2
276
207
  }
277
208
  ]
278
209
  };
@@ -414,7 +345,7 @@ function parseRequestLogSnapshot(value) {
414
345
  ...typeof row["poolKey"] === "string" ? { poolKey: row["poolKey"] } : {}
415
346
  };
416
347
  }
417
- var codec4 = {
348
+ var codec3 = {
418
349
  mode: "strict",
419
350
  typeSymbol: "@dan-ai-studio/dshopencodego#RequestLogSnapshot",
420
351
  schema: { parse: parseRequestLogSnapshot },
@@ -430,7 +361,7 @@ var requestLogRemote = {
430
361
  method: "readLog",
431
362
  invocation: { kind: "direct" },
432
363
  parameters: [],
433
- result: codec4
364
+ result: codec3
434
365
  }
435
366
  ]
436
367
  };
@@ -454,7 +385,45 @@ function parseUpdateStatus(value) {
454
385
  checked: row["checked"]
455
386
  };
456
387
  }
457
- var codec5 = (typeSymbol, parse) => ({
388
+ function parseRelease(value) {
389
+ if (value === null || typeof value !== "object") throw new Error("invalid desktop release");
390
+ const row = value;
391
+ const version = row["version"];
392
+ const url = row["url"];
393
+ if (typeof version !== "string" || version.length === 0) throw new Error("invalid desktop release");
394
+ if (typeof url !== "string" || url.length === 0) throw new Error("invalid desktop release");
395
+ const size = row["size"];
396
+ const sha512 = row["sha512"];
397
+ const stagingPercentage = row["stagingPercentage"];
398
+ const releaseDate = row["releaseDate"];
399
+ return {
400
+ version,
401
+ url,
402
+ ...typeof size === "number" && Number.isFinite(size) && size >= 0 ? { size } : {},
403
+ ...typeof sha512 === "string" && sha512.length > 0 ? { sha512 } : {},
404
+ ...typeof stagingPercentage === "number" && Number.isFinite(stagingPercentage) ? { stagingPercentage } : {},
405
+ ...typeof releaseDate === "string" && releaseDate.length > 0 ? { releaseDate } : {}
406
+ };
407
+ }
408
+ function parseDesktopReading(value) {
409
+ if (value === null || typeof value !== "object") throw new Error("invalid desktop reading");
410
+ const row = value;
411
+ if (typeof row["checked"] !== "boolean") throw new Error("invalid desktop reading");
412
+ if (typeof row["checkedAt"] !== "number" || !Number.isFinite(row["checkedAt"])) {
413
+ throw new Error("invalid desktop reading");
414
+ }
415
+ if (typeof row["platform"] !== "string") throw new Error("invalid desktop reading");
416
+ if (typeof row["channel"] !== "string") throw new Error("invalid desktop reading");
417
+ const release = row["release"];
418
+ return {
419
+ checked: row["checked"],
420
+ checkedAt: row["checkedAt"],
421
+ platform: row["platform"],
422
+ channel: row["channel"],
423
+ ...release === void 0 ? {} : { release: parseRelease(release) }
424
+ };
425
+ }
426
+ var codec4 = (typeSymbol, parse) => ({
458
427
  mode: "strict",
459
428
  typeSymbol,
460
429
  schema: { parse },
@@ -470,7 +439,7 @@ var updateRemote = {
470
439
  method: "readUpdate",
471
440
  invocation: { kind: "direct" },
472
441
  parameters: [],
473
- result: codec5("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
442
+ result: codec4("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
474
443
  },
475
444
  {
476
445
  id: "@dan-ai-studio/dshopencodego#opencodeGoUpdate/refreshUpdate",
@@ -479,7 +448,31 @@ var updateRemote = {
479
448
  method: "refreshUpdate",
480
449
  invocation: { kind: "direct" },
481
450
  parameters: [],
482
- result: codec5("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
451
+ result: codec4("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
452
+ },
453
+ // The desktop download feed rides this namespace rather than one of its
454
+ // own. A separate namespace would need its descriptor listed in both the
455
+ // Host contribution and the Client's `$mount`, and a namespace missing
456
+ // from either side is invisible in a way that takes the whole settings
457
+ // section with it (0.1.92). Riding `opencodeGoUpdate` — a namespace that
458
+ // already mounts — makes that class of defect impossible here.
459
+ {
460
+ id: "@dan-ai-studio/dshopencodego#opencodeGoUpdate/readDesktop",
461
+ service: "opencodeGoUpdate",
462
+ namespace: "opencodeGoUpdate",
463
+ method: "readDesktop",
464
+ invocation: { kind: "direct" },
465
+ parameters: [],
466
+ result: codec4("@dan-ai-studio/dshopencodego#DesktopReading", parseDesktopReading)
467
+ },
468
+ {
469
+ id: "@dan-ai-studio/dshopencodego#opencodeGoUpdate/refreshDesktop",
470
+ service: "opencodeGoUpdate",
471
+ namespace: "opencodeGoUpdate",
472
+ method: "refreshDesktop",
473
+ invocation: { kind: "direct" },
474
+ parameters: [],
475
+ result: codec4("@dan-ai-studio/dshopencodego#DesktopReading", parseDesktopReading)
483
476
  }
484
477
  ]
485
478
  };
@@ -545,7 +538,7 @@ function parseGoMeter(value) {
545
538
  })
546
539
  };
547
540
  }
548
- var codec6 = (typeSymbol, parse) => ({
541
+ var codec5 = (typeSymbol, parse) => ({
549
542
  mode: "strict",
550
543
  typeSymbol,
551
544
  schema: { parse },
@@ -561,7 +554,7 @@ var usageRemote = {
561
554
  method: "readWindows",
562
555
  invocation: { kind: "direct" },
563
556
  parameters: [],
564
- result: codec6("@dan-ai-studio/dshopencodego#GoUsageWindows", parseUsageWindows)
557
+ result: codec5("@dan-ai-studio/dshopencodego#GoUsageWindows", parseUsageWindows)
565
558
  },
566
559
  {
567
560
  id: "@dan-ai-studio/dshopencodego#opencodeGoUsage/readMeter",
@@ -570,7 +563,7 @@ var usageRemote = {
570
563
  method: "readMeter",
571
564
  invocation: { kind: "direct" },
572
565
  parameters: [],
573
- result: codec6("@dan-ai-studio/dshopencodego#GoMeter", parseGoMeter)
566
+ result: codec5("@dan-ai-studio/dshopencodego#GoMeter", parseGoMeter)
574
567
  }
575
568
  ]
576
569
  };
@@ -1479,17 +1472,22 @@ var SectionController = class _SectionController {
1479
1472
  }
1480
1473
  }
1481
1474
  /**
1482
- * The desktop download Remote, when the running build mounted it.
1475
+ * The desktop download methods, when the running Host offers them.
1483
1476
  *
1484
- * Read through the holder rather than from `services.remote`: Cordis refuses
1485
- * a service read that was not declared in an injection, and declaring this
1486
- * one in the *main* injection is what removed the whole settings section in
1487
- * 0.1.92. The holder is filled by its own `scope.inject`, so it is populated
1488
- * exactly when the namespace exists and empty otherwise.
1489
- * @returns the mounted desktop Remote, or undefined when it is absent.
1477
+ * They ride `remote.opencodeGoUpdate` — a namespace this page already
1478
+ * injects — so there is no second namespace to keep in sync between the Host
1479
+ * contribution and the Client's `$mount`. That sync is what broke 0.1.92:
1480
+ * a namespace present on one side only leaves the page unable to read it,
1481
+ * and a *declared* missing namespace removes the whole section.
1482
+ * @returns the two zero-argument wire calls, or undefined on an older Host.
1490
1483
  */
1491
1484
  desktopRemote() {
1492
- return this.services.desktop?.current;
1485
+ const remote = this.services.remote.opencodeGoUpdate;
1486
+ if (remote?.readDesktop === void 0 || remote.refreshDesktop === void 0) return void 0;
1487
+ return {
1488
+ readDesktop: () => remote.readDesktop(),
1489
+ refreshDesktop: () => remote.refreshDesktop()
1490
+ };
1493
1491
  }
1494
1492
  /**
1495
1493
  * Ask the Host which installer the desktop download host publishes.
@@ -3524,7 +3522,6 @@ function apply(ctx) {
3524
3522
  ...catalogRemote.descriptors,
3525
3523
  ...updateRemote.descriptors,
3526
3524
  ...networkRemote.descriptors,
3527
- ...desktopRemote.descriptors,
3528
3525
  ...requestLogRemote.descriptors
3529
3526
  ]
3530
3527
  });
@@ -3541,20 +3538,12 @@ function apply(ctx) {
3541
3538
  ctx.inject(["configForms", "remote.opencodeGoCatalog", "remote.opencodeGoUpdate", "remote.opencodeGoNetwork", "remote.opencodeGoRequestLog", "remote.credentials"], (scope) => {
3542
3539
  const forms = scope.get("configForms");
3543
3540
  const pluginManager = {};
3544
- const desktop = {};
3545
3541
  const profile = forms?.get("dshopencodego");
3546
3542
  const controller = new SectionController({
3547
3543
  remote: scope.remote,
3548
3544
  pluginManager,
3549
- desktop,
3550
3545
  scope: profile
3551
3546
  });
3552
- scope.inject(["remote.opencodeGoDesktop"], (desktopScope) => {
3553
- desktop.current = desktopScope.remote.opencodeGoDesktop;
3554
- return () => {
3555
- desktop.current = void 0;
3556
- };
3557
- });
3558
3547
  scope.inject(["remote.pluginManager"], (managerScope) => {
3559
3548
  pluginManager.current = managerScope.remote.pluginManager;
3560
3549
  return () => {
package/lib/index.js CHANGED
@@ -79399,75 +79399,6 @@ var catalogRemote = {
79399
79399
  ]
79400
79400
  };
79401
79401
 
79402
- // src/desktop/contract.ts
79403
- function parseRelease(value) {
79404
- if (value === null || typeof value !== "object") throw new Error("invalid desktop release");
79405
- const row = value;
79406
- const version = row["version"];
79407
- const url = row["url"];
79408
- if (typeof version !== "string" || version.length === 0) throw new Error("invalid desktop release");
79409
- if (typeof url !== "string" || url.length === 0) throw new Error("invalid desktop release");
79410
- const size = row["size"];
79411
- const sha512 = row["sha512"];
79412
- const stagingPercentage = row["stagingPercentage"];
79413
- const releaseDate = row["releaseDate"];
79414
- return {
79415
- version,
79416
- url,
79417
- ...typeof size === "number" && Number.isFinite(size) && size >= 0 ? { size } : {},
79418
- ...typeof sha512 === "string" && sha512.length > 0 ? { sha512 } : {},
79419
- ...typeof stagingPercentage === "number" && Number.isFinite(stagingPercentage) ? { stagingPercentage } : {},
79420
- ...typeof releaseDate === "string" && releaseDate.length > 0 ? { releaseDate } : {}
79421
- };
79422
- }
79423
- function parseDesktopReading(value) {
79424
- if (value === null || typeof value !== "object") throw new Error("invalid desktop reading");
79425
- const row = value;
79426
- if (typeof row["checked"] !== "boolean") throw new Error("invalid desktop reading");
79427
- if (typeof row["checkedAt"] !== "number" || !Number.isFinite(row["checkedAt"])) {
79428
- throw new Error("invalid desktop reading");
79429
- }
79430
- if (typeof row["platform"] !== "string") throw new Error("invalid desktop reading");
79431
- if (typeof row["channel"] !== "string") throw new Error("invalid desktop reading");
79432
- const release = row["release"];
79433
- return {
79434
- checked: row["checked"],
79435
- checkedAt: row["checkedAt"],
79436
- platform: row["platform"],
79437
- channel: row["channel"],
79438
- ...release === void 0 ? {} : { release: parseRelease(release) }
79439
- };
79440
- }
79441
- var codec2 = {
79442
- mode: "strict",
79443
- typeSymbol: "@dan-ai-studio/dshopencodego#DesktopReading",
79444
- schema: { parse: parseDesktopReading },
79445
- create: () => ({ parse: parseDesktopReading })
79446
- };
79447
- var desktopRemote = {
79448
- package: "@dan-ai-studio/dshopencodego",
79449
- descriptors: [
79450
- {
79451
- id: "@dan-ai-studio/dshopencodego#opencodeGoDesktop/readDesktop",
79452
- service: "opencodeGoDesktop",
79453
- namespace: "opencodeGoDesktop",
79454
- method: "readDesktop",
79455
- invocation: { kind: "direct" },
79456
- parameters: [],
79457
- result: codec2
79458
- },
79459
- {
79460
- id: "@dan-ai-studio/dshopencodego#opencodeGoDesktop/refreshDesktop",
79461
- service: "opencodeGoDesktop",
79462
- namespace: "opencodeGoDesktop",
79463
- method: "refreshDesktop",
79464
- invocation: { kind: "direct" },
79465
- parameters: [],
79466
- result: codec2
79467
- }
79468
- ]
79469
- };
79470
-
79471
79402
  // src/network/contract.ts
79472
79403
  function parseNetworkReading(value) {
79473
79404
  if (value === null || typeof value !== "object") throw new Error("invalid network reading");
@@ -79482,7 +79413,7 @@ function parseNetworkReading(value) {
79482
79413
  ...typeof failed === "boolean" ? { failed } : {}
79483
79414
  };
79484
79415
  }
79485
- var codec3 = {
79416
+ var codec2 = {
79486
79417
  mode: "strict",
79487
79418
  typeSymbol: "@dan-ai-studio/dshopencodego#NetworkReading",
79488
79419
  schema: { parse: parseNetworkReading },
@@ -79498,7 +79429,7 @@ var networkRemote = {
79498
79429
  method: "readNetwork",
79499
79430
  invocation: { kind: "direct" },
79500
79431
  parameters: [],
79501
- result: codec3
79432
+ result: codec2
79502
79433
  }
79503
79434
  ]
79504
79435
  };
@@ -79856,7 +79787,7 @@ function parseRequestLogSnapshot(value) {
79856
79787
  ...typeof row["poolKey"] === "string" ? { poolKey: row["poolKey"] } : {}
79857
79788
  };
79858
79789
  }
79859
- var codec4 = {
79790
+ var codec3 = {
79860
79791
  mode: "strict",
79861
79792
  typeSymbol: "@dan-ai-studio/dshopencodego#RequestLogSnapshot",
79862
79793
  schema: { parse: parseRequestLogSnapshot },
@@ -79872,7 +79803,7 @@ var requestLogRemote = {
79872
79803
  method: "readLog",
79873
79804
  invocation: { kind: "direct" },
79874
79805
  parameters: [],
79875
- result: codec4
79806
+ result: codec3
79876
79807
  }
79877
79808
  ]
79878
79809
  };
@@ -79896,7 +79827,45 @@ function parseUpdateStatus(value) {
79896
79827
  checked: row["checked"]
79897
79828
  };
79898
79829
  }
79899
- var codec5 = (typeSymbol, parse) => ({
79830
+ function parseRelease(value) {
79831
+ if (value === null || typeof value !== "object") throw new Error("invalid desktop release");
79832
+ const row = value;
79833
+ const version = row["version"];
79834
+ const url = row["url"];
79835
+ if (typeof version !== "string" || version.length === 0) throw new Error("invalid desktop release");
79836
+ if (typeof url !== "string" || url.length === 0) throw new Error("invalid desktop release");
79837
+ const size = row["size"];
79838
+ const sha512 = row["sha512"];
79839
+ const stagingPercentage = row["stagingPercentage"];
79840
+ const releaseDate = row["releaseDate"];
79841
+ return {
79842
+ version,
79843
+ url,
79844
+ ...typeof size === "number" && Number.isFinite(size) && size >= 0 ? { size } : {},
79845
+ ...typeof sha512 === "string" && sha512.length > 0 ? { sha512 } : {},
79846
+ ...typeof stagingPercentage === "number" && Number.isFinite(stagingPercentage) ? { stagingPercentage } : {},
79847
+ ...typeof releaseDate === "string" && releaseDate.length > 0 ? { releaseDate } : {}
79848
+ };
79849
+ }
79850
+ function parseDesktopReading(value) {
79851
+ if (value === null || typeof value !== "object") throw new Error("invalid desktop reading");
79852
+ const row = value;
79853
+ if (typeof row["checked"] !== "boolean") throw new Error("invalid desktop reading");
79854
+ if (typeof row["checkedAt"] !== "number" || !Number.isFinite(row["checkedAt"])) {
79855
+ throw new Error("invalid desktop reading");
79856
+ }
79857
+ if (typeof row["platform"] !== "string") throw new Error("invalid desktop reading");
79858
+ if (typeof row["channel"] !== "string") throw new Error("invalid desktop reading");
79859
+ const release = row["release"];
79860
+ return {
79861
+ checked: row["checked"],
79862
+ checkedAt: row["checkedAt"],
79863
+ platform: row["platform"],
79864
+ channel: row["channel"],
79865
+ ...release === void 0 ? {} : { release: parseRelease(release) }
79866
+ };
79867
+ }
79868
+ var codec4 = (typeSymbol, parse) => ({
79900
79869
  mode: "strict",
79901
79870
  typeSymbol,
79902
79871
  schema: { parse },
@@ -79912,7 +79881,7 @@ var updateRemote = {
79912
79881
  method: "readUpdate",
79913
79882
  invocation: { kind: "direct" },
79914
79883
  parameters: [],
79915
- result: codec5("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
79884
+ result: codec4("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
79916
79885
  },
79917
79886
  {
79918
79887
  id: "@dan-ai-studio/dshopencodego#opencodeGoUpdate/refreshUpdate",
@@ -79921,7 +79890,31 @@ var updateRemote = {
79921
79890
  method: "refreshUpdate",
79922
79891
  invocation: { kind: "direct" },
79923
79892
  parameters: [],
79924
- result: codec5("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
79893
+ result: codec4("@dan-ai-studio/dshopencodego#UpdateStatus", parseUpdateStatus)
79894
+ },
79895
+ // The desktop download feed rides this namespace rather than one of its
79896
+ // own. A separate namespace would need its descriptor listed in both the
79897
+ // Host contribution and the Client's `$mount`, and a namespace missing
79898
+ // from either side is invisible in a way that takes the whole settings
79899
+ // section with it (0.1.92). Riding `opencodeGoUpdate` — a namespace that
79900
+ // already mounts — makes that class of defect impossible here.
79901
+ {
79902
+ id: "@dan-ai-studio/dshopencodego#opencodeGoUpdate/readDesktop",
79903
+ service: "opencodeGoUpdate",
79904
+ namespace: "opencodeGoUpdate",
79905
+ method: "readDesktop",
79906
+ invocation: { kind: "direct" },
79907
+ parameters: [],
79908
+ result: codec4("@dan-ai-studio/dshopencodego#DesktopReading", parseDesktopReading)
79909
+ },
79910
+ {
79911
+ id: "@dan-ai-studio/dshopencodego#opencodeGoUpdate/refreshDesktop",
79912
+ service: "opencodeGoUpdate",
79913
+ namespace: "opencodeGoUpdate",
79914
+ method: "refreshDesktop",
79915
+ invocation: { kind: "direct" },
79916
+ parameters: [],
79917
+ result: codec4("@dan-ai-studio/dshopencodego#DesktopReading", parseDesktopReading)
79925
79918
  }
79926
79919
  ]
79927
79920
  };
@@ -79987,7 +79980,7 @@ function parseGoMeter(value) {
79987
79980
  })
79988
79981
  };
79989
79982
  }
79990
- var codec6 = (typeSymbol, parse) => ({
79983
+ var codec5 = (typeSymbol, parse) => ({
79991
79984
  mode: "strict",
79992
79985
  typeSymbol,
79993
79986
  schema: { parse },
@@ -80003,7 +79996,7 @@ var usageRemote = {
80003
79996
  method: "readWindows",
80004
79997
  invocation: { kind: "direct" },
80005
79998
  parameters: [],
80006
- result: codec6("@dan-ai-studio/dshopencodego#GoUsageWindows", parseUsageWindows)
79999
+ result: codec5("@dan-ai-studio/dshopencodego#GoUsageWindows", parseUsageWindows)
80007
80000
  },
80008
80001
  {
80009
80002
  id: "@dan-ai-studio/dshopencodego#opencodeGoUsage/readMeter",
@@ -80012,7 +80005,7 @@ var usageRemote = {
80012
80005
  method: "readMeter",
80013
80006
  invocation: { kind: "direct" },
80014
80007
  parameters: [],
80015
- result: codec6("@dan-ai-studio/dshopencodego#GoMeter", parseGoMeter)
80008
+ result: codec5("@dan-ai-studio/dshopencodego#GoMeter", parseGoMeter)
80016
80009
  }
80017
80010
  ]
80018
80011
  };
@@ -80025,7 +80018,6 @@ var contribution = {
80025
80018
  ...catalogRemote.descriptors,
80026
80019
  ...updateRemote.descriptors,
80027
80020
  ...networkRemote.descriptors,
80028
- ...desktopRemote.descriptors,
80029
80021
  ...requestLogRemote.descriptors
80030
80022
  ]
80031
80023
  };
@@ -80161,174 +80153,6 @@ function catalogFailure(error) {
80161
80153
  }, { cause: error });
80162
80154
  }
80163
80155
 
80164
- // src/desktop/feed.ts
80165
- var DESKTOP_FEED_PLATFORM = "win-x64";
80166
- var DESKTOP_FEED_CHANNEL = "nightly";
80167
- var DESKTOP_FEED_URL = `https://download.deepseek.com/dsh-desk/feeds/${DESKTOP_FEED_PLATFORM}/${DESKTOP_FEED_CHANNEL}.yml`;
80168
- var DESKTOP_CACHE_MS = 6 * 60 * 60 * 1e3;
80169
- var DESKTOP_TIMEOUT_MS = 1e4;
80170
- function indentOf(line) {
80171
- return line.length - line.trimStart().length;
80172
- }
80173
- function unquote(raw) {
80174
- const value = raw.trim();
80175
- const quoted = value.length >= 2 && (value.startsWith("'") && value.endsWith("'") || value.startsWith('"') && value.endsWith('"'));
80176
- return quoted ? value.slice(1, -1) : value;
80177
- }
80178
- function toNumber(value) {
80179
- if (!/^\d+$/.test(value)) return void 0;
80180
- const parsed = Number(value);
80181
- return Number.isFinite(parsed) ? parsed : void 0;
80182
- }
80183
- function foldBlocks(source) {
80184
- const lines = source.split(/\r?\n/);
80185
- const out = [];
80186
- for (let index = 0; index < lines.length; index += 1) {
80187
- const line = lines[index] ?? "";
80188
- const open = /^([ \t]*)([A-Za-z][\w-]*):[ \t]*(>-?|>|\|-?|\|)[ \t]*$/.exec(line);
80189
- if (open === null) {
80190
- out.push({ indent: indentOf(line), text: line.trim() });
80191
- continue;
80192
- }
80193
- const [, leading = "", key = "", marker = ""] = open;
80194
- const indent = leading.length;
80195
- const parts = [];
80196
- let cursor = index + 1;
80197
- for (; cursor < lines.length; cursor += 1) {
80198
- const next = lines[cursor] ?? "";
80199
- if (next.trim().length === 0) continue;
80200
- if (indentOf(next) <= indent) break;
80201
- parts.push(next.trim());
80202
- }
80203
- out.push({ indent, text: `${key}: ${parts.join(marker.startsWith("|") ? "\n" : " ")}` });
80204
- index = cursor - 1;
80205
- }
80206
- return out;
80207
- }
80208
- function assignFile(target, text2) {
80209
- const match = /^([A-Za-z][\w-]*):[ \t]*(.*)$/.exec(text2);
80210
- if (match === null) return;
80211
- const [, key = "", raw = ""] = match;
80212
- const value = unquote(raw);
80213
- if (key === "url") target.url = value;
80214
- else if (key === "sha512") target.sha512 = value;
80215
- else if (key === "size") {
80216
- const size = toNumber(value);
80217
- if (size !== void 0) target.size = size;
80218
- }
80219
- }
80220
- function parseDesktopFeed(source) {
80221
- let version;
80222
- let path5;
80223
- let digest;
80224
- let stagingPercentage;
80225
- let releaseDate;
80226
- const files = [];
80227
- let section = "top";
80228
- for (const line of foldBlocks(source)) {
80229
- const text2 = line.text;
80230
- if (text2.length === 0 || text2.startsWith("#")) continue;
80231
- if (line.indent === 0) {
80232
- const match = /^([A-Za-z][\w-]*):[ \t]*(.*)$/.exec(text2);
80233
- if (match === null) continue;
80234
- const [, key = "", raw = ""] = match;
80235
- section = key === "files" ? "files" : "top";
80236
- if (section === "files") continue;
80237
- const value = unquote(raw);
80238
- if (key === "version") version = value;
80239
- else if (key === "path") path5 = value;
80240
- else if (key === "sha512") digest = value;
80241
- else if (key === "releaseDate") releaseDate = value;
80242
- else if (key === "stagingPercentage") stagingPercentage = toNumber(value);
80243
- continue;
80244
- }
80245
- if (section !== "files") continue;
80246
- if (text2.startsWith("-")) {
80247
- files.push({});
80248
- const rest = text2.slice(1).trim();
80249
- const target2 = files[files.length - 1];
80250
- if (target2 !== void 0 && rest.length > 0) assignFile(target2, rest);
80251
- continue;
80252
- }
80253
- const target = files[files.length - 1];
80254
- if (target !== void 0) assignFile(target, text2);
80255
- }
80256
- const first = files[0];
80257
- const url = path5 ?? first?.url;
80258
- if (version === void 0 || version.length === 0) return void 0;
80259
- if (url === void 0 || url.length === 0) return void 0;
80260
- const sha512 = digest ?? first?.sha512;
80261
- return {
80262
- version,
80263
- url,
80264
- ...first?.size === void 0 ? {} : { size: first.size },
80265
- ...sha512 === void 0 ? {} : { sha512 },
80266
- ...stagingPercentage === void 0 ? {} : { stagingPercentage },
80267
- ...releaseDate === void 0 ? {} : { releaseDate }
80268
- };
80269
- }
80270
- function createDesktopFeedReader(deps = {}) {
80271
- const now = deps.now ?? Date.now;
80272
- const fetchImpl = deps.fetchImpl ?? fetch;
80273
- let cached;
80274
- let inflight;
80275
- async function lookup() {
80276
- const checkedAt = now();
80277
- const identity = { checkedAt, platform: DESKTOP_FEED_PLATFORM, channel: DESKTOP_FEED_CHANNEL };
80278
- try {
80279
- const response = await fetchImpl(DESKTOP_FEED_URL, {
80280
- signal: AbortSignal.timeout(DESKTOP_TIMEOUT_MS),
80281
- headers: { accept: "text/yaml, text/plain, */*" }
80282
- });
80283
- if (!response.ok) throw new Error(`feed answered ${response.status}`);
80284
- const release = parseDesktopFeed(await response.text());
80285
- if (release === void 0) throw new Error("feed carried no release");
80286
- return { ...identity, checked: true, release };
80287
- } catch {
80288
- return { ...identity, checked: false };
80289
- }
80290
- }
80291
- return {
80292
- read(force = false) {
80293
- if (!force && cached !== void 0 && now() - cached.checkedAt < DESKTOP_CACHE_MS) {
80294
- return Promise.resolve(cached);
80295
- }
80296
- inflight ??= lookup().then((reading) => {
80297
- cached = reading;
80298
- inflight = void 0;
80299
- return reading;
80300
- });
80301
- return inflight;
80302
- }
80303
- };
80304
- }
80305
-
80306
- // src/desktop/service.ts
80307
- import { TypertRemoteService as TypertRemoteService2 } from "@deepseek-ai/dsh-typert-protocol";
80308
- var OpencodeGoDesktopService = class extends TypertRemoteService2 {
80309
- read;
80310
- constructor(ctx) {
80311
- super(ctx, "opencodeGoDesktop");
80312
- const reader = createDesktopFeedReader();
80313
- this.read = (force) => reader.read(force);
80314
- }
80315
- /**
80316
- * The newest published installer (cached reading).
80317
- *
80318
- * The wire method takes no arguments — the gateway client rejects any call
80319
- * whose positional arity differs from the descriptor's `parameters`, so a
80320
- * `force` flag cannot ride this call. Forced revalidation is the separate
80321
- * `refreshDesktop` method below, mirroring the update Remote's pair.
80322
- */
80323
- readDesktop() {
80324
- return this.read(false);
80325
- }
80326
- /** Revalidate against the feed, bypassing the cache. */
80327
- refreshDesktop() {
80328
- return this.read(true);
80329
- }
80330
- };
80331
-
80332
80156
  // src/network/pinning.ts
80333
80157
  var import_undici = __toESM(require_undici(), 1);
80334
80158
  import { isIP } from "node:net";
@@ -80485,8 +80309,8 @@ function gatewayFetch(pin, keepAliveTimeoutMs) {
80485
80309
  }
80486
80310
 
80487
80311
  // src/network/service.ts
80488
- import { TypertRemoteService as TypertRemoteService3 } from "@deepseek-ai/dsh-typert-protocol";
80489
- var OpencodeGoNetworkService = class extends TypertRemoteService3 {
80312
+ import { TypertRemoteService as TypertRemoteService2 } from "@deepseek-ai/dsh-typert-protocol";
80313
+ var OpencodeGoNetworkService = class extends TypertRemoteService2 {
80490
80314
  options;
80491
80315
  constructor(ctx, options) {
80492
80316
  super(ctx, "opencodeGoNetwork");
@@ -80504,8 +80328,8 @@ var OpencodeGoNetworkService = class extends TypertRemoteService3 {
80504
80328
  };
80505
80329
 
80506
80330
  // src/request-log/service.ts
80507
- import { TypertRemoteService as TypertRemoteService4 } from "@deepseek-ai/dsh-typert-protocol";
80508
- var OpencodeGoRequestLogService = class extends TypertRemoteService4 {
80331
+ import { TypertRemoteService as TypertRemoteService3 } from "@deepseek-ai/dsh-typert-protocol";
80332
+ var OpencodeGoRequestLogService = class extends TypertRemoteService3 {
80509
80333
  options;
80510
80334
  constructor(ctx, options) {
80511
80335
  super(ctx, "opencodeGoRequestLog");
@@ -80611,16 +80435,163 @@ function createUpdateChecker(deps) {
80611
80435
  }
80612
80436
 
80613
80437
  // src/update/version.ts
80614
- var PLUGIN_VERSION = true ? "0.1.96" : "0.0.0-dev";
80438
+ var PLUGIN_VERSION = true ? "0.1.97" : "0.0.0-dev";
80615
80439
 
80616
80440
  // src/update/service.ts
80617
- import { TypertRemoteService as TypertRemoteService5 } from "@deepseek-ai/dsh-typert-protocol";
80618
- var OpencodeGoUpdateService = class extends TypertRemoteService5 {
80441
+ import { TypertRemoteService as TypertRemoteService4 } from "@deepseek-ai/dsh-typert-protocol";
80442
+
80443
+ // src/desktop/feed.ts
80444
+ var DESKTOP_FEED_PLATFORM = "win-x64";
80445
+ var DESKTOP_FEED_CHANNEL = "nightly";
80446
+ var DESKTOP_FEED_URL = `https://download.deepseek.com/dsh-desk/feeds/${DESKTOP_FEED_PLATFORM}/${DESKTOP_FEED_CHANNEL}.yml`;
80447
+ var DESKTOP_CACHE_MS = 6 * 60 * 60 * 1e3;
80448
+ var DESKTOP_TIMEOUT_MS = 1e4;
80449
+ function indentOf(line) {
80450
+ return line.length - line.trimStart().length;
80451
+ }
80452
+ function unquote(raw) {
80453
+ const value = raw.trim();
80454
+ const quoted = value.length >= 2 && (value.startsWith("'") && value.endsWith("'") || value.startsWith('"') && value.endsWith('"'));
80455
+ return quoted ? value.slice(1, -1) : value;
80456
+ }
80457
+ function toNumber(value) {
80458
+ if (!/^\d+$/.test(value)) return void 0;
80459
+ const parsed = Number(value);
80460
+ return Number.isFinite(parsed) ? parsed : void 0;
80461
+ }
80462
+ function foldBlocks(source) {
80463
+ const lines = source.split(/\r?\n/);
80464
+ const out = [];
80465
+ for (let index = 0; index < lines.length; index += 1) {
80466
+ const line = lines[index] ?? "";
80467
+ const open = /^([ \t]*)([A-Za-z][\w-]*):[ \t]*(>-?|>|\|-?|\|)[ \t]*$/.exec(line);
80468
+ if (open === null) {
80469
+ out.push({ indent: indentOf(line), text: line.trim() });
80470
+ continue;
80471
+ }
80472
+ const [, leading = "", key = "", marker = ""] = open;
80473
+ const indent = leading.length;
80474
+ const parts = [];
80475
+ let cursor = index + 1;
80476
+ for (; cursor < lines.length; cursor += 1) {
80477
+ const next = lines[cursor] ?? "";
80478
+ if (next.trim().length === 0) continue;
80479
+ if (indentOf(next) <= indent) break;
80480
+ parts.push(next.trim());
80481
+ }
80482
+ out.push({ indent, text: `${key}: ${parts.join(marker.startsWith("|") ? "\n" : " ")}` });
80483
+ index = cursor - 1;
80484
+ }
80485
+ return out;
80486
+ }
80487
+ function assignFile(target, text2) {
80488
+ const match = /^([A-Za-z][\w-]*):[ \t]*(.*)$/.exec(text2);
80489
+ if (match === null) return;
80490
+ const [, key = "", raw = ""] = match;
80491
+ const value = unquote(raw);
80492
+ if (key === "url") target.url = value;
80493
+ else if (key === "sha512") target.sha512 = value;
80494
+ else if (key === "size") {
80495
+ const size = toNumber(value);
80496
+ if (size !== void 0) target.size = size;
80497
+ }
80498
+ }
80499
+ function parseDesktopFeed(source) {
80500
+ let version;
80501
+ let path5;
80502
+ let digest;
80503
+ let stagingPercentage;
80504
+ let releaseDate;
80505
+ const files = [];
80506
+ let section = "top";
80507
+ for (const line of foldBlocks(source)) {
80508
+ const text2 = line.text;
80509
+ if (text2.length === 0 || text2.startsWith("#")) continue;
80510
+ if (line.indent === 0) {
80511
+ const match = /^([A-Za-z][\w-]*):[ \t]*(.*)$/.exec(text2);
80512
+ if (match === null) continue;
80513
+ const [, key = "", raw = ""] = match;
80514
+ section = key === "files" ? "files" : "top";
80515
+ if (section === "files") continue;
80516
+ const value = unquote(raw);
80517
+ if (key === "version") version = value;
80518
+ else if (key === "path") path5 = value;
80519
+ else if (key === "sha512") digest = value;
80520
+ else if (key === "releaseDate") releaseDate = value;
80521
+ else if (key === "stagingPercentage") stagingPercentage = toNumber(value);
80522
+ continue;
80523
+ }
80524
+ if (section !== "files") continue;
80525
+ if (text2.startsWith("-")) {
80526
+ files.push({});
80527
+ const rest = text2.slice(1).trim();
80528
+ const target2 = files[files.length - 1];
80529
+ if (target2 !== void 0 && rest.length > 0) assignFile(target2, rest);
80530
+ continue;
80531
+ }
80532
+ const target = files[files.length - 1];
80533
+ if (target !== void 0) assignFile(target, text2);
80534
+ }
80535
+ const first = files[0];
80536
+ const url = path5 ?? first?.url;
80537
+ if (version === void 0 || version.length === 0) return void 0;
80538
+ if (url === void 0 || url.length === 0) return void 0;
80539
+ const sha512 = digest ?? first?.sha512;
80540
+ return {
80541
+ version,
80542
+ url,
80543
+ ...first?.size === void 0 ? {} : { size: first.size },
80544
+ ...sha512 === void 0 ? {} : { sha512 },
80545
+ ...stagingPercentage === void 0 ? {} : { stagingPercentage },
80546
+ ...releaseDate === void 0 ? {} : { releaseDate }
80547
+ };
80548
+ }
80549
+ function createDesktopFeedReader(deps = {}) {
80550
+ const now = deps.now ?? Date.now;
80551
+ const fetchImpl = deps.fetchImpl ?? fetch;
80552
+ let cached;
80553
+ let inflight;
80554
+ async function lookup() {
80555
+ const checkedAt = now();
80556
+ const identity = { checkedAt, platform: DESKTOP_FEED_PLATFORM, channel: DESKTOP_FEED_CHANNEL };
80557
+ try {
80558
+ const response = await fetchImpl(DESKTOP_FEED_URL, {
80559
+ signal: AbortSignal.timeout(DESKTOP_TIMEOUT_MS),
80560
+ headers: { accept: "text/yaml, text/plain, */*" }
80561
+ });
80562
+ if (!response.ok) throw new Error(`feed answered ${response.status}`);
80563
+ const release = parseDesktopFeed(await response.text());
80564
+ if (release === void 0) throw new Error("feed carried no release");
80565
+ return { ...identity, checked: true, release };
80566
+ } catch {
80567
+ return { ...identity, checked: false };
80568
+ }
80569
+ }
80570
+ return {
80571
+ read(force = false) {
80572
+ if (!force && cached !== void 0 && now() - cached.checkedAt < DESKTOP_CACHE_MS) {
80573
+ return Promise.resolve(cached);
80574
+ }
80575
+ inflight ??= lookup().then((reading) => {
80576
+ cached = reading;
80577
+ inflight = void 0;
80578
+ return reading;
80579
+ });
80580
+ return inflight;
80581
+ }
80582
+ };
80583
+ }
80584
+
80585
+ // src/update/service.ts
80586
+ var OpencodeGoUpdateService = class extends TypertRemoteService4 {
80619
80587
  check;
80588
+ desktop;
80620
80589
  constructor(ctx, options) {
80621
80590
  super(ctx, "opencodeGoUpdate");
80622
80591
  const checker = createUpdateChecker({ currentVersion: options.currentVersion });
80623
80592
  this.check = (force) => checker.check(force);
80593
+ const feed = createDesktopFeedReader();
80594
+ this.desktop = (force) => feed.read(force);
80624
80595
  }
80625
80596
  /**
80626
80597
  * Whether a newer release is published (cached reading).
@@ -80637,6 +80608,18 @@ var OpencodeGoUpdateService = class extends TypertRemoteService5 {
80637
80608
  refreshUpdate() {
80638
80609
  return this.check(true);
80639
80610
  }
80611
+ /**
80612
+ * The newest published desktop installer (cached feed reading).
80613
+ *
80614
+ * Same zero-argument shape as `readUpdate`, and for the same reason.
80615
+ */
80616
+ readDesktop() {
80617
+ return this.desktop(false);
80618
+ }
80619
+ /** Revalidate against the desktop download feed, bypassing the cache. */
80620
+ refreshDesktop() {
80621
+ return this.desktop(true);
80622
+ }
80640
80623
  };
80641
80624
 
80642
80625
  // src/usage/windows.ts
@@ -80695,7 +80678,7 @@ async function readUsageWindows(options) {
80695
80678
 
80696
80679
  // src/usage/service.ts
80697
80680
  import { randomUUID as randomUUID3 } from "node:crypto";
80698
- import { RemoteError as RemoteError2, TypertRemoteService as TypertRemoteService6 } from "@deepseek-ai/dsh-typert-protocol";
80681
+ import { RemoteError as RemoteError2, TypertRemoteService as TypertRemoteService5 } from "@deepseek-ai/dsh-typert-protocol";
80699
80682
  import { LlmError as LlmError12 } from "@deepseek-ai/dsh-llm";
80700
80683
  function usageFailure(error, source) {
80701
80684
  const missing = error instanceof LlmError12 && error.code === "MISSING_CREDENTIAL";
@@ -80706,7 +80689,7 @@ function usageFailure(error, source) {
80706
80689
  { cause: error }
80707
80690
  );
80708
80691
  }
80709
- var OpencodeGoUsageService = class extends TypertRemoteService6 {
80692
+ var OpencodeGoUsageService = class extends TypertRemoteService5 {
80710
80693
  identity;
80711
80694
  options;
80712
80695
  constructor(ctx, options) {
@@ -80858,7 +80841,6 @@ function apply(ctx, raw) {
80858
80841
  }
80859
80842
  });
80860
80843
  ctx.plugin(OpencodeGoUpdateService, { currentVersion: PLUGIN_VERSION });
80861
- ctx.plugin(OpencodeGoDesktopService);
80862
80844
  ctx.effect(() => {
80863
80845
  const refresh = () => {
80864
80846
  void adapter.catalogOf(current2()).snapshot().catch(() => void 0);
@@ -6,5 +6,3 @@
6
6
  export { DESKTOP_CACHE_MS, DESKTOP_FEED_CHANNEL, DESKTOP_FEED_PLATFORM, DESKTOP_FEED_URL, DESKTOP_TIMEOUT_MS, } from './feed.ts';
7
7
  export type { DesktopReading, DesktopRelease } from './feed.ts';
8
8
  export { createDesktopFeedReader, parseDesktopFeed } from './feed.ts';
9
- export { OpencodeGoDesktopService } from './service.ts';
10
- export { desktopRemote, parseDesktopReading } from './contract.ts';
@@ -8,15 +8,21 @@
8
8
  * @module @dan-ai-studio/dshopencodego/update/contract
9
9
  */
10
10
  import type { RemoteResult, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
11
+ import type { DesktopReading } from '../desktop/feed.ts';
11
12
  import type { UpdateStatus } from './check.ts';
12
13
  export type { UpdateStatus } from './check.ts';
14
+ export type { DesktopReading, DesktopRelease } from '../desktop/feed.ts';
13
15
  /** Validate an update reading crossing the wire. */
14
16
  export declare function parseUpdateStatus(value: unknown): UpdateStatus;
17
+ /** Validate a desktop download reading crossing the wire. */
18
+ export declare function parseDesktopReading(value: unknown): DesktopReading;
15
19
  declare module '@deepseek-ai/dsh-typert-protocol' {
16
20
  interface TypertRemoteNamespaceMap {
17
21
  opencodeGoUpdate: {
18
22
  readUpdate(): Promise<RemoteResult<UpdateStatus>>;
19
23
  refreshUpdate(): Promise<RemoteResult<UpdateStatus>>;
24
+ readDesktop(): Promise<RemoteResult<DesktopReading>>;
25
+ refreshDesktop(): Promise<RemoteResult<DesktopReading>>;
20
26
  };
21
27
  }
22
28
  }
@@ -1,27 +1,37 @@
1
1
  /**
2
2
  * Host half of the update Remote.
3
3
  *
4
- * One method, one question: is a newer release of this package published?
5
- * The service answers from the registry through the cached checker in
6
- * `./check.ts`, so the settings page learns about updates without the model
7
- * path ever touching the network. Applying an update is intentionally absent
8
- * here — the page drives the host's own `pluginManager` (`removeBundle` then
9
- * `installBundle`), which owns the manifest lock, peer checks, build
10
- * approvals, and the HMR lifecycle a self-replacing plugin would bypass.
4
+ * Two questions, one namespace: is a newer release of this package published,
5
+ * and where does the newest desktop installer live? Both are advisory reads
6
+ * the settings page asks for on open.
7
+ *
8
+ * The desktop methods ride this namespace instead of one of their own on
9
+ * purpose. A separate namespace has to be listed in the Host contribution
10
+ * *and* in the Client's `$mount`, and a namespace missing from either side is
11
+ * invisible in a way that takes the whole settings section down with it — that
12
+ * is the 0.1.92 regression. `opencodeGoUpdate` already mounts, so adding
13
+ * methods to it cannot fail that way.
14
+ *
15
+ * Applying an update is intentionally absent here — the page drives the host's
16
+ * own `pluginManager` (`removeBundle` then `installBundle`), which owns the
17
+ * manifest lock, peer checks, build approvals, and the HMR lifecycle a
18
+ * self-replacing plugin would bypass.
11
19
  *
12
20
  * @module @dan-ai-studio/dshopencodego/update/service
13
21
  */
14
22
  import type { Context } from '@deepseek-ai/cordis';
15
23
  import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
24
+ import type { DesktopReading } from '../desktop/feed.ts';
16
25
  import type { UpdateStatus } from './check.ts';
17
26
  /** Host inputs for the update service. */
18
27
  export interface UpdateServiceOptions {
19
28
  /** Running build's version. */
20
29
  readonly currentVersion: string;
21
30
  }
22
- /** Update Remote: the cached registry reading for the settings page. */
31
+ /** Update Remote: the cached registry reading and the desktop download feed. */
23
32
  export declare class OpencodeGoUpdateService extends TypertRemoteService {
24
33
  private readonly check;
34
+ private readonly desktop;
25
35
  constructor(ctx: Context, options: UpdateServiceOptions);
26
36
  /**
27
37
  * Whether a newer release is published (cached reading).
@@ -34,4 +44,12 @@ export declare class OpencodeGoUpdateService extends TypertRemoteService {
34
44
  readUpdate(): Promise<UpdateStatus>;
35
45
  /** Revalidate against the registry, bypassing the cache. */
36
46
  refreshUpdate(): Promise<UpdateStatus>;
47
+ /**
48
+ * The newest published desktop installer (cached feed reading).
49
+ *
50
+ * Same zero-argument shape as `readUpdate`, and for the same reason.
51
+ */
52
+ readDesktop(): Promise<DesktopReading>;
53
+ /** Revalidate against the desktop download feed, bypassing the cache. */
54
+ refreshDesktop(): Promise<DesktopReading>;
37
55
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dan-ai-studio/dshopencodego",
3
- "version": "0.1.96",
3
+ "version": "0.1.97",
4
4
  "description": "OpenCode Go provider for DeepSeek Harness: live gateway catalog, per-conversation session header, usage",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,25 +0,0 @@
1
- /**
2
- * Wire contract for the desktop Remote.
3
- *
4
- * `readDesktop` answers which installer the desktop download host publishes
5
- * right now, and where it lives. The reading is advisory: the page shows the
6
- * address so a human can copy it or open it in a browser, and nothing here
7
- * downloads or installs anything.
8
- *
9
- * @module @dan-ai-studio/dshopencodego/desktop/contract
10
- */
11
- import type { RemoteResult, TypertRemoteContribution } from '@deepseek-ai/dsh-typert-protocol';
12
- import type { DesktopReading } from './feed.ts';
13
- export type { DesktopReading, DesktopRelease } from './feed.ts';
14
- /** Validate a desktop reading crossing the wire. */
15
- export declare function parseDesktopReading(value: unknown): DesktopReading;
16
- declare module '@deepseek-ai/dsh-typert-protocol' {
17
- interface TypertRemoteNamespaceMap {
18
- opencodeGoDesktop: {
19
- readDesktop(): Promise<RemoteResult<DesktopReading>>;
20
- refreshDesktop(): Promise<RemoteResult<DesktopReading>>;
21
- };
22
- }
23
- }
24
- /** Remote methods this package owns, mounted together by the plugin. */
25
- export declare const desktopRemote: TypertRemoteContribution;
@@ -1,30 +0,0 @@
1
- /**
2
- * Host half of the desktop Remote.
3
- *
4
- * One question: which installer does the desktop download host publish right
5
- * now? The service answers from the cached feed reader in `./feed.ts`, so the
6
- * settings page learns the address without the model path ever touching the
7
- * network. Downloading and installing are intentionally absent — this only
8
- * reports where the installer lives.
9
- *
10
- * @module @dan-ai-studio/dshopencodego/desktop/service
11
- */
12
- import type { Context } from '@deepseek-ai/cordis';
13
- import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
14
- import type { DesktopReading } from './feed.ts';
15
- /** Desktop Remote: the cached feed reading for the settings page. */
16
- export declare class OpencodeGoDesktopService extends TypertRemoteService {
17
- private readonly read;
18
- constructor(ctx: Context);
19
- /**
20
- * The newest published installer (cached reading).
21
- *
22
- * The wire method takes no arguments — the gateway client rejects any call
23
- * whose positional arity differs from the descriptor's `parameters`, so a
24
- * `force` flag cannot ride this call. Forced revalidation is the separate
25
- * `refreshDesktop` method below, mirroring the update Remote's pair.
26
- */
27
- readDesktop(): Promise<DesktopReading>;
28
- /** Revalidate against the feed, bypassing the cache. */
29
- refreshDesktop(): Promise<DesktopReading>;
30
- }