dsh-dty 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +224 -2
  3. package/assets/icon.png +0 -0
  4. package/cordis.patch.yml +9 -0
  5. package/lib/client.js +13201 -0
  6. package/lib/index.js +7275 -0
  7. package/lib/typert.host.d.ts +3 -0
  8. package/lib/typert.host.js +724 -0
  9. package/lib/typert.remote-client.d.ts +46 -0
  10. package/lib/typert.remote-client.js +512 -0
  11. package/lib/types/client/EntryIcon.d.ts +27 -0
  12. package/lib/types/client/FoldableRedBlock.d.ts +27 -0
  13. package/lib/types/client/ShopDetailAction.d.ts +46 -0
  14. package/lib/types/client/ShopGlyph.d.ts +12 -0
  15. package/lib/types/client/ShopPage.d.ts +27 -0
  16. package/lib/types/client/ShopTab.d.ts +110 -0
  17. package/lib/types/client/flow-registry.d.ts +91 -0
  18. package/lib/types/client/index.d.ts +89 -0
  19. package/lib/types/client/listeners.d.ts +27 -0
  20. package/lib/types/client/locales.d.ts +427 -0
  21. package/lib/types/client/module-table.d.ts +131 -0
  22. package/lib/types/client/page-store.d.ts +259 -0
  23. package/lib/types/client/present.d.ts +627 -0
  24. package/lib/types/client/restart-monitor.d.ts +156 -0
  25. package/lib/types/client/useFlows.d.ts +88 -0
  26. package/lib/types/client/useFoldableRedBlock.d.ts +36 -0
  27. package/lib/types/client/useUpdateSelf.d.ts +28 -0
  28. package/lib/types/host/activation.d.ts +58 -0
  29. package/lib/types/host/bundle-patch.d.ts +35 -0
  30. package/lib/types/host/catalog.d.ts +82 -0
  31. package/lib/types/host/child-env.d.ts +36 -0
  32. package/lib/types/host/client-half.d.ts +28 -0
  33. package/lib/types/host/compatibility.d.ts +244 -0
  34. package/lib/types/host/dsh-cli.d.ts +88 -0
  35. package/lib/types/host/executor.d.ts +288 -0
  36. package/lib/types/host/harness.d.ts +166 -0
  37. package/lib/types/host/hot.d.ts +134 -0
  38. package/lib/types/host/index.d.ts +965 -0
  39. package/lib/types/host/install.d.ts +69 -0
  40. package/lib/types/host/manager-runner.d.ts +81 -0
  41. package/lib/types/host/npm-origin.d.ts +28 -0
  42. package/lib/types/host/npmrc.d.ts +23 -0
  43. package/lib/types/host/origin.d.ts +46 -0
  44. package/lib/types/host/peers.d.ts +269 -0
  45. package/lib/types/host/plugin-manager.d.ts +144 -0
  46. package/lib/types/host/prefetch.d.ts +67 -0
  47. package/lib/types/host/profile.d.ts +173 -0
  48. package/lib/types/host/race.d.ts +41 -0
  49. package/lib/types/host/repo-pins.d.ts +22 -0
  50. package/lib/types/host/restart.d.ts +76 -0
  51. package/lib/types/host/self-update.d.ts +17 -0
  52. package/lib/types/host/state.d.ts +118 -0
  53. package/lib/types/host/supervisor.d.ts +15 -0
  54. package/lib/types/host/types.d.ts +166 -0
  55. package/lib/types/index.d.ts +3 -0
  56. package/lib/types/own-version.d.ts +45 -0
  57. package/lib/types/shared/identity.d.ts +97 -0
  58. package/lib/types/shared/install-state.d.ts +16 -0
  59. package/lib/types/shared/npm-name.d.ts +42 -0
  60. package/lib/types/shared/shop-like.d.ts +32 -0
  61. package/lib/types/shared/tar.d.ts +18 -0
  62. package/lib/types/shared/zh-intents.d.ts +89 -0
  63. package/package.json +136 -3
@@ -0,0 +1,724 @@
1
+ /* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
2
+ /* dsh-plugin-shop: create() added beside every schema for harness 0.1.7 (scripts/typert-dual-codecs.ts). */
3
+ import { z } from 'zod'
4
+
5
+ const dsh_dty_shop_catalog_parameter_0$schema = z.union([z.undefined(), z.object({
6
+ 'refresh': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
7
+ })])
8
+ const dsh_dty_shop_catalog_result$schema = z.object({
9
+ 'schemaVersion': z.number(),
10
+ 'builtAt': z.string(),
11
+ 'stale': z.boolean(),
12
+ 'plugins': z.array(z.object({
13
+ 'name': z.string(),
14
+ 'version': z.string(),
15
+ 'integrity': z.union([z.literal(null), z.string()]),
16
+ 'publishedAt': z.union([z.literal(null), z.string()]),
17
+ 'repository': z.union([z.literal(null), z.string()]),
18
+ 'license': z.union([z.literal(null), z.string()]),
19
+ 'tier': z.union([z.literal("verified"), z.literal("verified-stale"), z.literal("community")]),
20
+ 'metadata': z.union([z.literal("declared"), z.literal("derived")]),
21
+ 'review': z.union([z.undefined(), z.object({
22
+ 'reviewedVersion': z.union([z.undefined(), z.string()]).optional(),
23
+ 'reviewedCommit': z.union([z.undefined(), z.string()]).optional(),
24
+ 'reviewedSha256': z.union([z.undefined(), z.string()]).optional(),
25
+ 'repo': z.union([z.undefined(), z.string()]).optional(),
26
+ 'reviewer': z.string(),
27
+ 'reviewCommit': z.string(),
28
+ 'notes': z.string(),
29
+ })]).optional(),
30
+ 'catalog': z.union([z.undefined(), z.object({
31
+ 'category': z.union([z.literal("tool"), z.literal("provider"), z.literal("ui"), z.literal("workflow"), z.literal("integration"), z.literal("theme"), z.literal("other")]),
32
+ 'summary': z.object({
33
+ 'en': z.string(),
34
+ 'zh': z.union([z.undefined(), z.string()]).optional(),
35
+ }),
36
+ 'capabilities': z.array(z.string()),
37
+ })]).optional(),
38
+ 'source': z.union([z.literal("npm"), z.literal("github")]),
39
+ 'publisher': z.union([z.undefined(), z.string()]).optional(),
40
+ 'repo': z.union([z.undefined(), z.string()]).optional(),
41
+ 'subdir': z.union([z.undefined(), z.string()]).optional(),
42
+ 'tarball': z.union([z.undefined(), z.object({
43
+ 'url': z.string(),
44
+ 'sha256': z.string(),
45
+ })]).optional(),
46
+ 'added': z.union([z.undefined(), z.string()]).optional(),
47
+ 'peers': z.union([z.undefined(), z.array(z.string())]).optional(),
48
+ 'compatibility': z.union([z.undefined(), z.object({
49
+ 'dsh': z.union([z.undefined(), z.string()]).optional(),
50
+ 'profiles': z.union([z.undefined(), z.array(z.string())]).optional(),
51
+ })]).optional(),
52
+ 'dshPeers': z.union([z.undefined(), z.record(z.string(), z.string())]).optional(),
53
+ 'manifestVersion': z.union([z.undefined(), z.string()]).optional(),
54
+ 'engines': z.union([z.undefined(), z.string()]).optional(),
55
+ 'dependencies': z.union([z.undefined(), z.number()]).optional(),
56
+ 'bin': z.union([z.undefined(), z.array(z.string())]).optional(),
57
+ 'installScripts': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
58
+ 'unpackedSize': z.union([z.undefined(), z.number()]).optional(),
59
+ 'installSize': z.union([z.undefined(), z.number()]).optional(),
60
+ 'archived': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
61
+ 'forked': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
62
+ 'icon': z.union([z.undefined(), z.string()]).optional(),
63
+ })),
64
+ 'denied': z.array(z.object({
65
+ 'name': z.string(),
66
+ 'detail': z.string(),
67
+ 'replacement': z.union([z.undefined(), z.string()]).optional(),
68
+ })),
69
+ 'notAShop': z.union([z.undefined(), z.array(z.string())]).optional(),
70
+ 'stars': z.record(z.string(), z.number()),
71
+ 'icons': z.record(z.string(), z.string()),
72
+ 'incompatible': z.record(z.string(), z.array(z.string())),
73
+ 'incompatibleHarness': z.record(z.string(), z.object({
74
+ 'dsh': z.union([z.undefined(), z.object({
75
+ 'range': z.string(),
76
+ 'running': z.string(),
77
+ })]).optional(),
78
+ 'profile': z.union([z.undefined(), z.object({
79
+ 'declared': z.array(z.string()),
80
+ 'running': z.string(),
81
+ })]).optional(),
82
+ 'peers': z.union([z.undefined(), z.object({
83
+ 'refused': z.record(z.string(), z.string()),
84
+ 'running': z.string(),
85
+ 'allowCommand': z.union([z.literal(null), z.string()]),
86
+ })]).optional(),
87
+ })),
88
+ })
89
+ const dsh_dty_shop_installed_result$schema = z.array(z.object({
90
+ 'name': z.string(),
91
+ 'source': z.union([z.literal("npm"), z.literal("github")]),
92
+ 'repo': z.union([z.undefined(), z.string()]).optional(),
93
+ 'subdir': z.union([z.undefined(), z.string()]).optional(),
94
+ 'installed': z.string(),
95
+ 'latest': z.union([z.literal(null), z.string()]),
96
+ 'outdated': z.boolean(),
97
+ 'enabled': z.boolean(),
98
+ 'shadowed': z.union([z.undefined(), z.literal(true)]).optional(),
99
+ }))
100
+ const dsh_dty_shop_installedSpecs_result$schema = z.union([z.literal(null), z.record(z.string(), z.string())])
101
+ const dsh_dty_shop_installStart_parameter_0$schema = z.object({
102
+ 'name': z.string(),
103
+ 'version': z.string(),
104
+ 'acknowledged': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
105
+ 'source': z.union([z.undefined(), z.literal("npm"), z.literal("github")]).optional(),
106
+ 'repo': z.union([z.undefined(), z.string()]).optional(),
107
+ 'subdir': z.union([z.undefined(), z.string()]).optional(),
108
+ })
109
+ const dsh_dty_shop_installStart_result$schema = z.union([z.object({
110
+ 'ok': z.literal(true),
111
+ 'installId': z.string(),
112
+ 'state': z.union([z.literal("downloading"), z.literal("running"), z.literal("done"), z.literal("failed")]),
113
+ }), z.object({
114
+ 'ok': z.literal(false),
115
+ 'code': z.union([z.literal("not-in-catalog"), z.literal("denied"), z.literal("version-mismatch"), z.literal("needs-acknowledgement"), z.literal("tarball-integrity"), z.literal("ambiguous-identity"), z.literal("name-taken"), z.literal("desktop-profile")]),
116
+ 'detail': z.string(),
117
+ })])
118
+ const dsh_dty_shop_installStatus_parameter_0$schema = z.object({
119
+ 'installId': z.string(),
120
+ })
121
+ const dsh_dty_shop_installStatus_result$schema = z.object({
122
+ 'found': z.boolean(),
123
+ 'state': z.union([z.literal("downloading"), z.literal("running"), z.literal("done"), z.literal("failed")]),
124
+ 'log': z.array(z.string()),
125
+ 'activation': z.union([z.undefined(), z.literal("live"), z.literal("reload"), z.literal("restart")]).optional(),
126
+ 'restartReason': z.union([z.undefined(), z.literal("no-patch"), z.literal("not-simple"), z.literal("host-unsupported"), z.literal("timeout"), z.literal("mount-failed"), z.literal("already-loaded")]).optional(),
127
+ 'detail': z.union([z.undefined(), z.string()]).optional(),
128
+ 'command': z.union([z.undefined(), z.string()]).optional(),
129
+ })
130
+ const dsh_dty_shop_restart_result$schema = z.union([z.object({
131
+ 'ok': z.literal(true),
132
+ 'logFile': z.union([z.undefined(), z.string()]).optional(),
133
+ 'bootId': z.union([z.undefined(), z.string()]).optional(),
134
+ 'pid': z.union([z.undefined(), z.number()]).optional(),
135
+ }), z.object({
136
+ 'ok': z.literal(false),
137
+ 'detail': z.string(),
138
+ })])
139
+ const dsh_dty_shop_rollbackStart_parameter_0$schema = z.object({
140
+ 'key': z.string(),
141
+ })
142
+ const dsh_dty_shop_rollbackStart_result$schema = z.union([z.object({
143
+ 'ok': z.literal(true),
144
+ 'installId': z.string(),
145
+ 'state': z.union([z.literal("downloading"), z.literal("running"), z.literal("done"), z.literal("failed")]),
146
+ }), z.object({
147
+ 'ok': z.literal(false),
148
+ 'code': z.union([z.literal("not-in-catalog"), z.literal("denied"), z.literal("version-mismatch"), z.literal("needs-acknowledgement"), z.literal("tarball-integrity"), z.literal("ambiguous-identity"), z.literal("name-taken"), z.literal("desktop-profile")]),
149
+ 'detail': z.string(),
150
+ })])
151
+ const dsh_dty_shop_setEnabled_parameter_0$schema = z.object({
152
+ 'name': z.string(),
153
+ 'enabled': z.boolean(),
154
+ })
155
+ const dsh_dty_shop_setEnabled_result$schema = z.union([z.object({
156
+ 'ok': z.literal(true),
157
+ 'activation': z.union([z.literal("live"), z.literal("reload"), z.literal("restart")]),
158
+ }), z.object({
159
+ 'ok': z.literal(false),
160
+ 'detail': z.string(),
161
+ })])
162
+ const dsh_dty_shop_setFavorite_parameter_0$schema = z.object({
163
+ 'key': z.string(),
164
+ 'favorite': z.boolean(),
165
+ })
166
+ const dsh_dty_shop_setFavorite_result$schema = z.object({
167
+ 'ok': z.boolean(),
168
+ 'detail': z.union([z.undefined(), z.string()]).optional(),
169
+ })
170
+ const dsh_dty_shop_state_result$schema = z.object({
171
+ 'favorites': z.array(z.string()),
172
+ 'rollback': z.record(z.string(), z.string()),
173
+ })
174
+ const dsh_dty_shop_uninstallStart_parameter_0$schema = z.object({
175
+ 'name': z.string(),
176
+ })
177
+ const dsh_dty_shop_uninstallStart_result$schema = z.union([z.object({
178
+ 'ok': z.literal(true),
179
+ 'installId': z.string(),
180
+ }), z.object({
181
+ 'ok': z.literal(false),
182
+ 'detail': z.string(),
183
+ })])
184
+ const dsh_dty_shop_updateStart_parameter_0$schema = z.object({
185
+ 'version': z.string(),
186
+ })
187
+ const dsh_dty_shop_updateStart_result$schema = z.union([z.object({
188
+ 'ok': z.literal(true),
189
+ 'installId': z.string(),
190
+ 'state': z.union([z.literal("downloading"), z.literal("running"), z.literal("done"), z.literal("failed")]),
191
+ }), z.object({
192
+ 'ok': z.literal(false),
193
+ 'code': z.union([z.undefined(), z.literal("desktop-manual")]).optional(),
194
+ 'detail': z.string(),
195
+ })])
196
+ const dsh_dty_shop_version_result$schema = z.object({
197
+ 'installed': z.string(),
198
+ 'latest': z.union([z.literal(null), z.string()]),
199
+ 'outdated': z.boolean(),
200
+ 'restartBlocked': z.union([z.literal(null), z.literal("desktop"), z.literal("from-default-profile"), z.literal("windows"), z.literal("systemd"), z.literal("port-zero")]),
201
+ 'pendingVersion': z.union([z.undefined(), z.literal(null), z.string()]).optional(),
202
+ 'bootId': z.union([z.undefined(), z.string()]).optional(),
203
+ 'selfUpdate': z.union([z.undefined(), z.literal(null), z.literal("dsh-page")]).optional(),
204
+ })
205
+
206
+ export const TYPERT = {
207
+ package: 'dsh-dty',
208
+ face: 'host',
209
+ schemas: [
210
+ ],
211
+ invocations: [
212
+ {
213
+ id: 'dsh-dty#shop/catalog',
214
+ service: 'shop',
215
+ namespace: 'shop',
216
+ method: 'catalog',
217
+ invocation: { kind: 'direct' },
218
+ parameters: [
219
+ {
220
+ name: 'args',
221
+ wire: 'args',
222
+ source: 'json',
223
+ acceptsUndefined: true,
224
+ codec: {
225
+ mode: 'strict',
226
+ typeSymbol: 'dsh-dty#shop/catalog:args',
227
+ schema: dsh_dty_shop_catalog_parameter_0$schema,
228
+ create: () => dsh_dty_shop_catalog_parameter_0$schema,
229
+ },
230
+ },
231
+ ],
232
+ result: {
233
+ mode: 'strict',
234
+ typeSymbol: 'dsh-dty/types#ShopCatalogResult',
235
+ schema: dsh_dty_shop_catalog_result$schema,
236
+ create: () => dsh_dty_shop_catalog_result$schema,
237
+ },
238
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":1384,"column":9},
239
+ },
240
+ {
241
+ id: 'dsh-dty#shop/installed',
242
+ service: 'shop',
243
+ namespace: 'shop',
244
+ method: 'installed',
245
+ invocation: { kind: 'direct' },
246
+ parameters: [
247
+ ],
248
+ result: {
249
+ mode: 'strict',
250
+ typeSymbol: 'dsh-dty#shop/installed:result',
251
+ schema: dsh_dty_shop_installed_result$schema,
252
+ create: () => dsh_dty_shop_installed_result$schema,
253
+ },
254
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2226,"column":9},
255
+ },
256
+ {
257
+ id: 'dsh-dty#shop/installedSpecs',
258
+ service: 'shop',
259
+ namespace: 'shop',
260
+ method: 'installedSpecs',
261
+ invocation: { kind: 'direct' },
262
+ parameters: [
263
+ ],
264
+ result: {
265
+ mode: 'strict',
266
+ typeSymbol: 'dsh-dty#shop/installedSpecs:result',
267
+ schema: dsh_dty_shop_installedSpecs_result$schema,
268
+ create: () => dsh_dty_shop_installedSpecs_result$schema,
269
+ },
270
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2064,"column":9},
271
+ },
272
+ {
273
+ id: 'dsh-dty#shop/installStart',
274
+ service: 'shop',
275
+ namespace: 'shop',
276
+ method: 'installStart',
277
+ implementation: 'install',
278
+ invocation: { kind: 'direct' },
279
+ parameters: [
280
+ {
281
+ name: 'args',
282
+ wire: 'args',
283
+ source: 'json',
284
+ codec: {
285
+ mode: 'strict',
286
+ typeSymbol: 'dsh-dty/types#InstallArgs',
287
+ schema: dsh_dty_shop_installStart_parameter_0$schema,
288
+ create: () => dsh_dty_shop_installStart_parameter_0$schema,
289
+ },
290
+ },
291
+ ],
292
+ result: {
293
+ mode: 'strict',
294
+ typeSymbol: 'dsh-dty/types#ShopInstallResult',
295
+ schema: dsh_dty_shop_installStart_result$schema,
296
+ create: () => dsh_dty_shop_installStart_result$schema,
297
+ },
298
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":1511,"column":9},
299
+ },
300
+ {
301
+ id: 'dsh-dty#shop/installStatus',
302
+ service: 'shop',
303
+ namespace: 'shop',
304
+ method: 'installStatus',
305
+ invocation: { kind: 'direct' },
306
+ parameters: [
307
+ {
308
+ name: 'args',
309
+ wire: 'args',
310
+ source: 'json',
311
+ codec: {
312
+ mode: 'strict',
313
+ typeSymbol: 'dsh-dty#shop/installStatus:args',
314
+ schema: dsh_dty_shop_installStatus_parameter_0$schema,
315
+ create: () => dsh_dty_shop_installStatus_parameter_0$schema,
316
+ },
317
+ },
318
+ ],
319
+ result: {
320
+ mode: 'strict',
321
+ typeSymbol: 'dsh-dty/types#ShopInstallStatusResult',
322
+ schema: dsh_dty_shop_installStatus_result$schema,
323
+ create: () => dsh_dty_shop_installStatus_result$schema,
324
+ },
325
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2040,"column":3},
326
+ },
327
+ {
328
+ id: 'dsh-dty#shop/restart',
329
+ service: 'shop',
330
+ namespace: 'shop',
331
+ method: 'restart',
332
+ invocation: { kind: 'direct' },
333
+ parameters: [
334
+ ],
335
+ result: {
336
+ mode: 'strict',
337
+ typeSymbol: 'dsh-dty/types#ShopRestartResult',
338
+ schema: dsh_dty_shop_restart_result$schema,
339
+ create: () => dsh_dty_shop_restart_result$schema,
340
+ },
341
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2477,"column":9},
342
+ },
343
+ {
344
+ id: 'dsh-dty#shop/rollbackStart',
345
+ service: 'shop',
346
+ namespace: 'shop',
347
+ method: 'rollbackStart',
348
+ invocation: { kind: 'direct' },
349
+ parameters: [
350
+ {
351
+ name: 'args',
352
+ wire: 'args',
353
+ source: 'json',
354
+ codec: {
355
+ mode: 'strict',
356
+ typeSymbol: 'dsh-dty#shop/rollbackStart:args',
357
+ schema: dsh_dty_shop_rollbackStart_parameter_0$schema,
358
+ create: () => dsh_dty_shop_rollbackStart_parameter_0$schema,
359
+ },
360
+ },
361
+ ],
362
+ result: {
363
+ mode: 'strict',
364
+ typeSymbol: 'dsh-dty/types#ShopInstallResult',
365
+ schema: dsh_dty_shop_rollbackStart_result$schema,
366
+ create: () => dsh_dty_shop_rollbackStart_result$schema,
367
+ },
368
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2157,"column":9},
369
+ },
370
+ {
371
+ id: 'dsh-dty#shop/setEnabled',
372
+ service: 'shop',
373
+ namespace: 'shop',
374
+ method: 'setEnabled',
375
+ invocation: { kind: 'direct' },
376
+ parameters: [
377
+ {
378
+ name: 'args',
379
+ wire: 'args',
380
+ source: 'json',
381
+ codec: {
382
+ mode: 'strict',
383
+ typeSymbol: 'dsh-dty#shop/setEnabled:args',
384
+ schema: dsh_dty_shop_setEnabled_parameter_0$schema,
385
+ create: () => dsh_dty_shop_setEnabled_parameter_0$schema,
386
+ },
387
+ },
388
+ ],
389
+ result: {
390
+ mode: 'strict',
391
+ typeSymbol: 'dsh-dty/types#ShopSetEnabledResult',
392
+ schema: dsh_dty_shop_setEnabled_result$schema,
393
+ create: () => dsh_dty_shop_setEnabled_result$schema,
394
+ },
395
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":1036,"column":9},
396
+ },
397
+ {
398
+ id: 'dsh-dty#shop/setFavorite',
399
+ service: 'shop',
400
+ namespace: 'shop',
401
+ method: 'setFavorite',
402
+ invocation: { kind: 'direct' },
403
+ parameters: [
404
+ {
405
+ name: 'args',
406
+ wire: 'args',
407
+ source: 'json',
408
+ codec: {
409
+ mode: 'strict',
410
+ typeSymbol: 'dsh-dty#shop/setFavorite:args',
411
+ schema: dsh_dty_shop_setFavorite_parameter_0$schema,
412
+ create: () => dsh_dty_shop_setFavorite_parameter_0$schema,
413
+ },
414
+ },
415
+ ],
416
+ result: {
417
+ mode: 'strict',
418
+ typeSymbol: 'dsh-dty#shop/setFavorite:result',
419
+ schema: dsh_dty_shop_setFavorite_result$schema,
420
+ create: () => dsh_dty_shop_setFavorite_result$schema,
421
+ },
422
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2114,"column":9},
423
+ },
424
+ {
425
+ id: 'dsh-dty#shop/state',
426
+ service: 'shop',
427
+ namespace: 'shop',
428
+ method: 'state',
429
+ implementation: 'shopState',
430
+ invocation: { kind: 'direct' },
431
+ parameters: [
432
+ ],
433
+ result: {
434
+ mode: 'strict',
435
+ typeSymbol: 'dsh-dty/types#ShopStateResult',
436
+ schema: dsh_dty_shop_state_result$schema,
437
+ create: () => dsh_dty_shop_state_result$schema,
438
+ },
439
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2079,"column":9},
440
+ },
441
+ {
442
+ id: 'dsh-dty#shop/uninstallStart',
443
+ service: 'shop',
444
+ namespace: 'shop',
445
+ method: 'uninstallStart',
446
+ implementation: 'uninstall',
447
+ invocation: { kind: 'direct' },
448
+ parameters: [
449
+ {
450
+ name: 'args',
451
+ wire: 'args',
452
+ source: 'json',
453
+ codec: {
454
+ mode: 'strict',
455
+ typeSymbol: 'dsh-dty#shop/uninstallStart:args',
456
+ schema: dsh_dty_shop_uninstallStart_parameter_0$schema,
457
+ create: () => dsh_dty_shop_uninstallStart_parameter_0$schema,
458
+ },
459
+ },
460
+ ],
461
+ result: {
462
+ mode: 'strict',
463
+ typeSymbol: 'dsh-dty/types#ShopUninstallResult',
464
+ schema: dsh_dty_shop_uninstallStart_result$schema,
465
+ create: () => dsh_dty_shop_uninstallStart_result$schema,
466
+ },
467
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2371,"column":9},
468
+ },
469
+ {
470
+ id: 'dsh-dty#shop/updateStart',
471
+ service: 'shop',
472
+ namespace: 'shop',
473
+ method: 'updateStart',
474
+ invocation: { kind: 'direct' },
475
+ parameters: [
476
+ {
477
+ name: 'args',
478
+ wire: 'args',
479
+ source: 'json',
480
+ codec: {
481
+ mode: 'strict',
482
+ typeSymbol: 'dsh-dty#shop/updateStart:args',
483
+ schema: dsh_dty_shop_updateStart_parameter_0$schema,
484
+ create: () => dsh_dty_shop_updateStart_parameter_0$schema,
485
+ },
486
+ },
487
+ ],
488
+ result: {
489
+ mode: 'strict',
490
+ typeSymbol: 'dsh-dty/types#ShopUpdateResult',
491
+ schema: dsh_dty_shop_updateStart_result$schema,
492
+ create: () => dsh_dty_shop_updateStart_result$schema,
493
+ },
494
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2585,"column":9},
495
+ },
496
+ {
497
+ id: 'dsh-dty#shop/version',
498
+ service: 'shop',
499
+ namespace: 'shop',
500
+ method: 'version',
501
+ invocation: { kind: 'direct' },
502
+ parameters: [
503
+ ],
504
+ result: {
505
+ mode: 'strict',
506
+ typeSymbol: 'dsh-dty/types#ShopVersionResult',
507
+ schema: dsh_dty_shop_version_result$schema,
508
+ create: () => dsh_dty_shop_version_result$schema,
509
+ },
510
+ sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":2541,"column":9},
511
+ },
512
+ ],
513
+ model: {
514
+ "services": [
515
+ {
516
+ "description": "Remote-only service exposing the shop Remote methods of §7.3.",
517
+ "summary": "Remote-only service exposing the shop Remote methods of §7.3.",
518
+ "tags": [
519
+ {
520
+ "name": "typert",
521
+ "comment": "service shop",
522
+ "text": "@typert service shop"
523
+ }
524
+ ],
525
+ "jsDoc": "/** Remote-only service exposing the shop Remote methods of §7.3.\n *\n * @typert service shop */",
526
+ "key": "shop",
527
+ "exportName": "ShopGateway",
528
+ "members": [
529
+ {
530
+ "kind": "method",
531
+ "name": "setEnabled",
532
+ "signature": "@Remote('setEnabled') async setEnabled(args: { name: string; enabled: boolean }): Promise<ShopSetEnabledResult>",
533
+ "summary": "Enable or disable one installed plugin, hot (§8): the write sets the `disabled` key of each owned entry's row in the user layer and changes nothing else there (design 2026-09-26-market-borrowings §2) — the CLI's watchUserPatches applies it through HMR.",
534
+ "jsDoc": "/** Enable or disable one installed plugin, hot (§8): the write sets the\n * `disabled` key of each owned entry's row in the user layer and changes\n * nothing else there (design 2026-09-26-market-borrowings §2) — the CLI's\n * watchUserPatches applies it through HMR. The shop's own row and the\n * framework's bundles are never toggleable: disabling the host chain would\n * break HMR itself. */"
535
+ },
536
+ {
537
+ "kind": "method",
538
+ "name": "catalog",
539
+ "signature": "@Remote('catalog') async catalog(args?: { refresh?: boolean }): Promise<ShopCatalogResult>",
540
+ "summary": "Browse the catalog (§7.3): cached snapshot, refreshed on demand.",
541
+ "jsDoc": "/** Browse the catalog (§7.3): cached snapshot, refreshed on demand. */"
542
+ },
543
+ {
544
+ "kind": "method",
545
+ "name": "install",
546
+ "signature": "@Remote('installStart') async install(args: InstallArgs): Promise<ShopInstallResult>",
547
+ "summary": "Install one cataloged version into the profile (§7.2).",
548
+ "jsDoc": "/**\n * Install one cataloged version into the profile (§7.2). The rejection\n * paths run against this Host's snapshot before anything is spawned; only a\n * passing request reaches the executor.\n */"
549
+ },
550
+ {
551
+ "kind": "method",
552
+ "name": "installStatus",
553
+ "signature": "@Remote('installStatus') installStatus(args: { installId: string }): ShopInstallStatusResult",
554
+ "summary": "Poll one install's progress (§7.2); unknown ids report `found: false`.",
555
+ "jsDoc": "/** Poll one install's progress (§7.2); unknown ids report `found: false`. */"
556
+ },
557
+ {
558
+ "kind": "method",
559
+ "name": "installedSpecs",
560
+ "signature": "@Remote('installedSpecs') async installedSpecs(): Promise<Record<string, string> | null>",
561
+ "summary": "The profile manifest's dependency spec for every name it holds — exactly what the install gate reads, unfiltered.",
562
+ "jsDoc": "/**\n * The profile manifest's dependency spec for every name it holds — exactly\n * what the install gate reads, unfiltered.\n *\n * The client cannot derive this from `installed()`. That list drops any\n * dependency no catalog entry matches, so a fork, a hand `dsh plugin add`,\n * or an entry the catalog has since dropped is invisible to it — while the\n * gate, which reads the raw manifest, still refuses over it. That gap is\n * what made the card show a plain Install button for a name the host was\n * about to refuse. Shipping the gate's own input is what makes the badge\n * and the refusal one rule rather than two implementations that agree\n * until they do not.\n *\n * `null` is \"cannot say\" — an unreadable manifest — and is deliberately\n * distinct from `{}`, \"nothing is installed\": the client must not read a\n * failed read as a clean bill of health.\n */"
563
+ },
564
+ {
565
+ "kind": "method",
566
+ "name": "shopState",
567
+ "signature": "@Remote('state') async shopState(): Promise<ShopStateResult>",
568
+ "summary": "What the shop remembers between visits: the reader's favorites and, per install identity, the version an update replaced (design 2026-11-02-market-borrowings §6–§7).",
569
+ "jsDoc": "/**\n * What the shop remembers between visits: the reader's favorites and, per\n * install identity, the version an update replaced (design\n * 2026-11-02-market-borrowings §6–§7).\n *\n * `rollback` carries a VERSION rather than a spec: the client renders it as\n * the offer (\"roll back to 1.2.3\"), and the spec that installs it is built\n * by the host from the same record. A malformed or missing file reads as\n * empty state — losing stars must never take the page down.\n */"
570
+ },
571
+ {
572
+ "kind": "method",
573
+ "name": "setFavorite",
574
+ "signature": "@Remote('setFavorite') async setFavorite(args: { key: string; favorite: boolean }): Promise<{ ok: boolean; detail?: string }>",
575
+ "summary": "Star or unstar one install identity (§7).",
576
+ "jsDoc": "/**\n * Star or unstar one install identity (§7).\n *\n * A write failure is reported rather than swallowed: the client flips its\n * star optimistically and would otherwise show a favorite that is gone on\n * the next visit. The key is stored verbatim — it is the identity the\n * catalog itself uses, and an unknown one is harmless until it matches.\n */"
577
+ },
578
+ {
579
+ "kind": "method",
580
+ "name": "rollbackStart",
581
+ "signature": "@Remote('rollbackStart') async rollbackStart(args: { key: string }): Promise<ShopInstallResult>",
582
+ "summary": "Re-install the version an entry was updated from (§6).",
583
+ "jsDoc": "/**\n * Re-install the version an entry was updated from (§6).\n *\n * Takes only the install identity. The spec is built by `rollbackSpec` from\n * this host's own record, so a client cannot name a version or a spec the\n * shop never wrote — the same invariant `installStart` holds by building\n * its spec from the snapshot. The install then runs through the ordinary\n * CLI path, with the same records, activation verdict and notices an\n * update gets.\n */"
584
+ },
585
+ {
586
+ "kind": "method",
587
+ "name": "installed",
588
+ "signature": "@Remote('installed') async installed(): Promise<ShopInstalledEntry[]>",
589
+ "summary": "Installed catalog plugins (§7.3): every entry of the snapshot the profile manifest declares as a dependency, with the Host's `outdated` verdict attached.",
590
+ "jsDoc": "/** Installed catalog plugins (§7.3): every entry of the snapshot the profile\n * manifest declares as a dependency, with the Host's `outdated` verdict\n * attached. The tab's shelf cards and its Updatable section both derive\n * from this one list. */"
591
+ },
592
+ {
593
+ "kind": "method",
594
+ "name": "uninstall",
595
+ "signature": "@Remote('uninstallStart') async uninstall(args: { name: string }): Promise<ShopUninstallResult>",
596
+ "summary": "Uninstall one installed catalog plugin from the profile (§7.3 follow-up amendment).",
597
+ "jsDoc": "/** Uninstall one installed catalog plugin from the profile (§7.3 follow-up\n * amendment). Removing revokes privilege rather than granting it, so there\n * is no acknowledgement gate. The name must be a catalog entry the profile\n * manifest declares as a dependency — the RPC cannot remove profile\n * dependencies the shop does not manage (the base bundle, the shop\n * itself). The same install records/polling serve the client. */"
598
+ },
599
+ {
600
+ "kind": "method",
601
+ "name": "restart",
602
+ "signature": "@Remote('restart') async restart(): Promise<ShopRestartResult>",
603
+ "summary": "Restart the dsh process the shop runs in (§8 amendment, 2026-08-27): commit a two-phase handoff — a detached helper waits for this pid to exit, then re-runs this process's own command line — and exit once the response is out.",
604
+ "jsDoc": "/** Restart the dsh process the shop runs in (§8 amendment, 2026-08-27):\n * commit a two-phase handoff — a detached helper waits for this pid to\n * exit, then re-runs this process's own command line — and exit once the\n * response is out. The browser monitors the origin and refreshes when the\n * new server answers. Refusals are issued before anything is torn down. */"
605
+ },
606
+ {
607
+ "kind": "method",
608
+ "name": "version",
609
+ "signature": "@Remote('version') async version(): Promise<ShopVersionResult>",
610
+ "summary": "The shop's own version and whether npm has a newer one (§7.3).",
611
+ "jsDoc": "/** The shop's own version and whether npm has a newer one (§7.3). The\n * check is advisory: a registry that cannot answer leaves `latest` null\n * and the client shows the version alone. `installed` is the RUNNING\n * version (own-version.ts), not the manifest's range spec. */"
612
+ },
613
+ {
614
+ "kind": "method",
615
+ "name": "updateStart",
616
+ "signature": "@Remote('updateStart') async updateStart(args: { version: string }): Promise<ShopUpdateResult>",
617
+ "summary": "Update the shop itself to a published version (§7.3): the explicit pin is the only install form that bypasses pnpm's release cooldown.",
618
+ "jsDoc": "/** Update the shop itself to a published version (§7.3): the explicit pin\n * is the only install form that bypasses pnpm's release cooldown. The\n * version is re-validated as plain semver at the boundary — the spec\n * `dsh-dty@<version>` is built here, never from the wire. */"
619
+ }
620
+ ],
621
+ "types": [
622
+ {
623
+ "name": "Activation",
624
+ "declaration": "export type Activation = 'live' | 'reload' | 'restart';"
625
+ },
626
+ {
627
+ "name": "CatalogEntry",
628
+ "declaration": "export interface CatalogEntry {\n name: string;\n version: string;\n integrity: string | null;\n publishedAt: string | null;\n repository: string | null;\n license: string | null;\n tier: 'verified' | 'verified-stale' | 'community';\n metadata: 'declared' | 'derived';\n review?: { reviewedVersion?: string; reviewedCommit?: string; reviewedSha256?: string; repo?: string; reviewer: string; reviewCommit: string; notes: string; };\n catalog?: CatalogSection;\n source: 'npm' | 'github';\n publisher?: string;\n repo?: string;\n subdir?: string;\n tarball?: { url: string; sha256: string; };\n added?: string;\n peers?: string[];\n compatibility?: { dsh?: string; profiles?: string[]; };\n dshPeers?: Record<string, string>;\n manifestVersion?: string;\n engines?: string;\n dependencies?: number;\n bin?: string[];\n installScripts?: boolean;\n unpackedSize?: number;\n installSize?: number;\n archived?: boolean;\n forked?: boolean;\n icon?: string;\n}"
629
+ },
630
+ {
631
+ "name": "CatalogSection",
632
+ "declaration": "export interface CatalogSection {\n category: 'tool' | 'provider' | 'ui' | 'workflow' | 'integration' | 'theme' | 'other';\n summary: CatalogSummary;\n capabilities: string[];\n}"
633
+ },
634
+ {
635
+ "name": "CatalogSummary",
636
+ "declaration": "export interface CatalogSummary {\n en: string;\n zh?: string;\n}"
637
+ },
638
+ {
639
+ "name": "DeniedEntry",
640
+ "declaration": "export interface DeniedEntry {\n name: string;\n detail: string;\n replacement?: string;\n}"
641
+ },
642
+ {
643
+ "name": "HarnessVerdict",
644
+ "declaration": "export interface HarnessVerdict {\n dsh?: { range: string; running: string; };\n profile?: { declared: string[]; running: string; };\n peers?: PeerVerdict;\n}"
645
+ },
646
+ {
647
+ "name": "HotRestartReason",
648
+ "declaration": "export type HotRestartReason = 'no-patch' | 'not-simple' | 'host-unsupported' | 'timeout' | 'mount-failed' | 'already-loaded';"
649
+ },
650
+ {
651
+ "name": "InstallArgs",
652
+ "declaration": "export interface InstallArgs {\n name: string;\n version: string;\n acknowledged?: boolean;\n source?: 'npm' | 'github';\n repo?: string;\n subdir?: string;\n}"
653
+ },
654
+ {
655
+ "name": "InstallRejectionCode",
656
+ "declaration": "export type InstallRejectionCode = 'not-in-catalog' | 'denied' | 'version-mismatch' | 'needs-acknowledgement' | 'tarball-integrity' | 'ambiguous-identity' | 'name-taken' | 'desktop-profile';"
657
+ },
658
+ {
659
+ "name": "InstallState",
660
+ "declaration": "export type InstallState = 'downloading' | 'running' | 'done' | 'failed';"
661
+ },
662
+ {
663
+ "name": "InstallStatus",
664
+ "declaration": "export interface InstallStatus {\n state: InstallState;\n log: string[];\n activation?: Activation;\n restartReason?: HotRestartReason;\n detail?: string;\n command?: string;\n}"
665
+ },
666
+ {
667
+ "name": "PeerVerdict",
668
+ "declaration": "export interface PeerVerdict {\n refused: Record<string, string>;\n running: string;\n allowCommand: string | null;\n}"
669
+ },
670
+ {
671
+ "name": "RestartBlockedReason",
672
+ "declaration": "export type RestartBlockedReason = 'desktop' | 'from-default-profile' | 'windows' | 'systemd' | 'port-zero';"
673
+ },
674
+ {
675
+ "name": "RestartOutcome",
676
+ "declaration": "export type RestartOutcome = { ok: true; logFile?: string; bootId?: string; pid?: number; } | { ok: false; detail: string; };"
677
+ },
678
+ {
679
+ "name": "ShopCatalogResult",
680
+ "declaration": "export interface ShopCatalogResult {\n schemaVersion: number;\n builtAt: string;\n stale: boolean;\n plugins: CatalogEntry[];\n denied: DeniedEntry[];\n notAShop?: string[];\n stars: Record<string, number>;\n icons: Record<string, string>;\n incompatible: Record<string, string[]>;\n incompatibleHarness: Record<string, HarnessVerdict>;\n}"
681
+ },
682
+ {
683
+ "name": "ShopInstalledEntry",
684
+ "declaration": "export interface ShopInstalledEntry {\n name: string;\n source: 'npm' | 'github';\n repo?: string;\n subdir?: string;\n installed: string;\n latest: string | null;\n outdated: boolean;\n enabled: boolean;\n shadowed?: true;\n}"
685
+ },
686
+ {
687
+ "name": "ShopInstallResult",
688
+ "declaration": "export type ShopInstallResult = { ok: true; installId: string; state: InstallState; } | { ok: false; code: InstallRejectionCode; detail: string; };"
689
+ },
690
+ {
691
+ "name": "ShopInstallStatusResult",
692
+ "declaration": "export interface ShopInstallStatusResult extends InstallStatus {\n found: boolean;\n}"
693
+ },
694
+ {
695
+ "name": "ShopRestartResult",
696
+ "declaration": "export type ShopRestartResult = RestartOutcome;"
697
+ },
698
+ {
699
+ "name": "ShopSetEnabledResult",
700
+ "declaration": "export type ShopSetEnabledResult = { ok: true; activation: Activation; } | { ok: false; detail: string; };"
701
+ },
702
+ {
703
+ "name": "ShopStateResult",
704
+ "declaration": "export interface ShopStateResult {\n favorites: string[];\n rollback: Record<string, string>;\n}"
705
+ },
706
+ {
707
+ "name": "ShopUninstallResult",
708
+ "declaration": "export type ShopUninstallResult = { ok: true; installId: string; } | { ok: false; detail: string; };"
709
+ },
710
+ {
711
+ "name": "ShopUpdateResult",
712
+ "declaration": "export type ShopUpdateResult = { ok: true; installId: string; state: InstallState; } | { ok: false; code?: 'desktop-manual'; detail: string; };"
713
+ },
714
+ {
715
+ "name": "ShopVersionResult",
716
+ "declaration": "export interface ShopVersionResult {\n installed: string;\n latest: string | null;\n outdated: boolean;\n restartBlocked: RestartBlockedReason | null;\n pendingVersion?: string | null;\n bootId?: string;\n selfUpdate?: 'dsh-page' | null;\n}"
717
+ }
718
+ ]
719
+ }
720
+ ],
721
+ "events": [],
722
+ "objects": []
723
+ },
724
+ }