dsh-plugin-shop 0.4.13 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -21
- package/README.md +4 -4
- package/lib/client.js +211 -118
- package/lib/index.js +523 -49
- package/lib/typert.host.js +31 -20
- package/lib/typert.remote-client.js +22 -11
- package/lib/types/client/locales.d.ts +10 -0
- package/lib/types/client/present.d.ts +11 -2
- package/lib/types/host/catalog.d.ts +5 -2
- package/lib/types/host/executor.d.ts +13 -2
- package/lib/types/host/hot.d.ts +105 -0
- package/lib/types/host/index.d.ts +80 -2
- package/lib/types/host/install.d.ts +2 -2
- package/lib/types/host/supervisor.d.ts +15 -0
- package/lib/types/host/types.d.ts +18 -1
- package/package.json +7 -2
package/lib/typert.host.js
CHANGED
|
@@ -20,12 +20,13 @@ const dsh_plugin_shop_shop_catalog_result$schema = z.object({
|
|
|
20
20
|
'review': z.union([z.undefined(), z.object({
|
|
21
21
|
'reviewedVersion': z.union([z.undefined(), z.string()]).optional(),
|
|
22
22
|
'reviewedCommit': z.union([z.undefined(), z.string()]).optional(),
|
|
23
|
+
'reviewedSha256': z.union([z.undefined(), z.string()]).optional(),
|
|
23
24
|
'reviewer': z.string(),
|
|
24
25
|
'reviewCommit': z.string(),
|
|
25
26
|
'notes': z.string(),
|
|
26
27
|
})]).optional(),
|
|
27
28
|
'catalog': z.union([z.undefined(), z.object({
|
|
28
|
-
'category': z.union([z.literal("tool"), z.literal("provider"), z.literal("ui"), z.literal("workflow"), z.literal("integration"), z.literal("other")]),
|
|
29
|
+
'category': z.union([z.literal("tool"), z.literal("provider"), z.literal("ui"), z.literal("workflow"), z.literal("integration"), z.literal("theme"), z.literal("other")]),
|
|
29
30
|
'summary': z.object({
|
|
30
31
|
'en': z.string(),
|
|
31
32
|
'zh': z.union([z.undefined(), z.string()]).optional(),
|
|
@@ -34,10 +35,17 @@ const dsh_plugin_shop_shop_catalog_result$schema = z.object({
|
|
|
34
35
|
})]).optional(),
|
|
35
36
|
'source': z.union([z.literal("npm"), z.literal("github")]),
|
|
36
37
|
'repo': z.union([z.undefined(), z.string()]).optional(),
|
|
38
|
+
'subdir': z.union([z.undefined(), z.string()]).optional(),
|
|
39
|
+
'tarball': z.union([z.undefined(), z.object({
|
|
40
|
+
'url': z.string(),
|
|
41
|
+
'sha256': z.string(),
|
|
42
|
+
})]).optional(),
|
|
43
|
+
'added': z.string(),
|
|
37
44
|
})),
|
|
38
45
|
'denied': z.array(z.object({
|
|
39
46
|
'name': z.string(),
|
|
40
47
|
'detail': z.string(),
|
|
48
|
+
'replacement': z.union([z.undefined(), z.string()]).optional(),
|
|
41
49
|
})),
|
|
42
50
|
'stars': z.record(z.string(), z.number()),
|
|
43
51
|
})
|
|
@@ -46,6 +54,7 @@ const dsh_plugin_shop_shop_installed_result$schema = z.array(z.object({
|
|
|
46
54
|
'installed': z.string(),
|
|
47
55
|
'latest': z.string(),
|
|
48
56
|
'outdated': z.boolean(),
|
|
57
|
+
'enabled': z.boolean(),
|
|
49
58
|
}))
|
|
50
59
|
const dsh_plugin_shop_shop_installStart_parameter_0$schema = z.object({
|
|
51
60
|
'name': z.string(),
|
|
@@ -57,7 +66,7 @@ const dsh_plugin_shop_shop_installStart_result$schema = z.union([z.object({
|
|
|
57
66
|
'installId': z.string(),
|
|
58
67
|
}), z.object({
|
|
59
68
|
'ok': z.literal(false),
|
|
60
|
-
'code': z.union([z.literal("not-in-catalog"), z.literal("denied"), z.literal("version-mismatch"), z.literal("needs-acknowledgement"), z.literal("git-missing")]),
|
|
69
|
+
'code': z.union([z.literal("not-in-catalog"), z.literal("denied"), z.literal("version-mismatch"), z.literal("needs-acknowledgement"), z.literal("git-missing"), z.literal("tarball-integrity")]),
|
|
61
70
|
'detail': z.string(),
|
|
62
71
|
})])
|
|
63
72
|
const dsh_plugin_shop_shop_installStatus_parameter_0$schema = z.object({
|
|
@@ -68,6 +77,7 @@ const dsh_plugin_shop_shop_installStatus_result$schema = z.object({
|
|
|
68
77
|
'state': z.union([z.literal("running"), z.literal("done"), z.literal("failed")]),
|
|
69
78
|
'log': z.array(z.string()),
|
|
70
79
|
'needsRestart': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
|
|
80
|
+
'restartReason': z.union([z.undefined(), z.string()]).optional(),
|
|
71
81
|
'detail': z.union([z.undefined(), z.string()]).optional(),
|
|
72
82
|
})
|
|
73
83
|
const dsh_plugin_shop_shop_restart_result$schema = z.union([z.object({
|
|
@@ -108,6 +118,7 @@ const dsh_plugin_shop_shop_version_result$schema = z.object({
|
|
|
108
118
|
'installed': z.string(),
|
|
109
119
|
'latest': z.union([z.literal(null), z.string()]),
|
|
110
120
|
'outdated': z.boolean(),
|
|
121
|
+
'restartSupported': z.boolean(),
|
|
111
122
|
})
|
|
112
123
|
|
|
113
124
|
export const TYPERT = {
|
|
@@ -140,7 +151,7 @@ export const TYPERT = {
|
|
|
140
151
|
typeSymbol: 'dsh-plugin-shop/types#ShopCatalogResult',
|
|
141
152
|
schema: dsh_plugin_shop_shop_catalog_result$schema,
|
|
142
153
|
},
|
|
143
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
154
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":447,"column":9},
|
|
144
155
|
},
|
|
145
156
|
{
|
|
146
157
|
id: 'dsh-plugin-shop#shop/installed',
|
|
@@ -155,7 +166,7 @@ export const TYPERT = {
|
|
|
155
166
|
typeSymbol: 'dsh-plugin-shop#shop/installed:result',
|
|
156
167
|
schema: dsh_plugin_shop_shop_installed_result$schema,
|
|
157
168
|
},
|
|
158
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
169
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":597,"column":9},
|
|
159
170
|
},
|
|
160
171
|
{
|
|
161
172
|
id: 'dsh-plugin-shop#shop/installStart',
|
|
@@ -181,7 +192,7 @@ export const TYPERT = {
|
|
|
181
192
|
typeSymbol: 'dsh-plugin-shop/types#ShopInstallResult',
|
|
182
193
|
schema: dsh_plugin_shop_shop_installStart_result$schema,
|
|
183
194
|
},
|
|
184
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
195
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":473,"column":9},
|
|
185
196
|
},
|
|
186
197
|
{
|
|
187
198
|
id: 'dsh-plugin-shop#shop/installStatus',
|
|
@@ -206,7 +217,7 @@ export const TYPERT = {
|
|
|
206
217
|
typeSymbol: 'dsh-plugin-shop/types#ShopInstallStatusResult',
|
|
207
218
|
schema: dsh_plugin_shop_shop_installStatus_result$schema,
|
|
208
219
|
},
|
|
209
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
220
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":586,"column":3},
|
|
210
221
|
},
|
|
211
222
|
{
|
|
212
223
|
id: 'dsh-plugin-shop#shop/restart',
|
|
@@ -221,7 +232,7 @@ export const TYPERT = {
|
|
|
221
232
|
typeSymbol: 'dsh-plugin-shop/types#ShopRestartResult',
|
|
222
233
|
schema: dsh_plugin_shop_shop_restart_result$schema,
|
|
223
234
|
},
|
|
224
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
235
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":721,"column":9},
|
|
225
236
|
},
|
|
226
237
|
{
|
|
227
238
|
id: 'dsh-plugin-shop#shop/setEnabled',
|
|
@@ -246,7 +257,7 @@ export const TYPERT = {
|
|
|
246
257
|
typeSymbol: 'dsh-plugin-shop/types#ShopSetEnabledResult',
|
|
247
258
|
schema: dsh_plugin_shop_shop_setEnabled_result$schema,
|
|
248
259
|
},
|
|
249
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
260
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":400,"column":3},
|
|
250
261
|
},
|
|
251
262
|
{
|
|
252
263
|
id: 'dsh-plugin-shop#shop/uninstallStart',
|
|
@@ -272,7 +283,7 @@ export const TYPERT = {
|
|
|
272
283
|
typeSymbol: 'dsh-plugin-shop/types#ShopUninstallResult',
|
|
273
284
|
schema: dsh_plugin_shop_shop_uninstallStart_result$schema,
|
|
274
285
|
},
|
|
275
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
286
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":668,"column":9},
|
|
276
287
|
},
|
|
277
288
|
{
|
|
278
289
|
id: 'dsh-plugin-shop#shop/updateStart',
|
|
@@ -297,7 +308,7 @@ export const TYPERT = {
|
|
|
297
308
|
typeSymbol: 'dsh-plugin-shop/types#ShopUpdateResult',
|
|
298
309
|
schema: dsh_plugin_shop_shop_updateStart_result$schema,
|
|
299
310
|
},
|
|
300
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
311
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":781,"column":9},
|
|
301
312
|
},
|
|
302
313
|
{
|
|
303
314
|
id: 'dsh-plugin-shop#shop/version',
|
|
@@ -312,7 +323,7 @@ export const TYPERT = {
|
|
|
312
323
|
typeSymbol: 'dsh-plugin-shop/types#ShopVersionResult',
|
|
313
324
|
schema: dsh_plugin_shop_shop_version_result$schema,
|
|
314
325
|
},
|
|
315
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
326
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":765,"column":9},
|
|
316
327
|
},
|
|
317
328
|
],
|
|
318
329
|
model: {
|
|
@@ -336,7 +347,7 @@ export const TYPERT = {
|
|
|
336
347
|
"name": "setEnabled",
|
|
337
348
|
"signature": "@Remote('setEnabled') setEnabled(args: { name: string; enabled: boolean }): ShopSetEnabledResult",
|
|
338
349
|
"summary": "Enable or disable one installed plugin, hot (§8): a disable writes the row to the user layer, an enable drops it again so the bundle default rules — the CLI's watchUserPatches applies either through HMR.",
|
|
339
|
-
"jsDoc": "/** Enable or disable one installed plugin, hot (§8): a disable writes the\n * row to the user layer, an enable drops it again so the bundle default\n * rules — the CLI's watchUserPatches applies either through HMR. */"
|
|
350
|
+
"jsDoc": "/** Enable or disable one installed plugin, hot (§8): a disable writes the\n * row to the user layer, an enable drops it again so the bundle default\n * rules — the CLI's watchUserPatches applies either through HMR. The shop's\n * own row and the framework's bundles are never toggleable: disabling the\n * host chain would break HMR itself. */"
|
|
340
351
|
},
|
|
341
352
|
{
|
|
342
353
|
"kind": "method",
|
|
@@ -350,7 +361,7 @@ export const TYPERT = {
|
|
|
350
361
|
"name": "install",
|
|
351
362
|
"signature": "@Remote('installStart') async install(args: InstallArgs): Promise<ShopInstallResult>",
|
|
352
363
|
"summary": "Install one cataloged version into the profile (§7.2).",
|
|
353
|
-
"jsDoc": "/**\n * Install one cataloged version into the profile (§7.2). The
|
|
364
|
+
"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 */"
|
|
354
365
|
},
|
|
355
366
|
{
|
|
356
367
|
"kind": "method",
|
|
@@ -398,11 +409,11 @@ export const TYPERT = {
|
|
|
398
409
|
"types": [
|
|
399
410
|
{
|
|
400
411
|
"name": "CatalogEntry",
|
|
401
|
-
"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; reviewer: string; reviewCommit: string; notes: string; };\n catalog?: CatalogSection;\n source: 'npm' | 'github';\n repo?: string;\n}"
|
|
412
|
+
"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; reviewer: string; reviewCommit: string; notes: string; };\n catalog?: CatalogSection;\n source: 'npm' | 'github';\n repo?: string;\n subdir?: string;\n tarball?: { url: string; sha256: string; };\n added: string;\n}"
|
|
402
413
|
},
|
|
403
414
|
{
|
|
404
415
|
"name": "CatalogSection",
|
|
405
|
-
"declaration": "export interface CatalogSection {\n category: 'tool' | 'provider' | 'ui' | 'workflow' | 'integration' | 'other';\n summary: CatalogSummary;\n capabilities: string[];\n}"
|
|
416
|
+
"declaration": "export interface CatalogSection {\n category: 'tool' | 'provider' | 'ui' | 'workflow' | 'integration' | 'theme' | 'other';\n summary: CatalogSummary;\n capabilities: string[];\n}"
|
|
406
417
|
},
|
|
407
418
|
{
|
|
408
419
|
"name": "CatalogSummary",
|
|
@@ -410,7 +421,7 @@ export const TYPERT = {
|
|
|
410
421
|
},
|
|
411
422
|
{
|
|
412
423
|
"name": "DeniedEntry",
|
|
413
|
-
"declaration": "export interface DeniedEntry {\n name: string;\n detail: string;\n}"
|
|
424
|
+
"declaration": "export interface DeniedEntry {\n name: string;\n detail: string;\n replacement?: string;\n}"
|
|
414
425
|
},
|
|
415
426
|
{
|
|
416
427
|
"name": "InstallArgs",
|
|
@@ -418,7 +429,7 @@ export const TYPERT = {
|
|
|
418
429
|
},
|
|
419
430
|
{
|
|
420
431
|
"name": "InstallRejectionCode",
|
|
421
|
-
"declaration": "export type InstallRejectionCode = 'not-in-catalog' | 'denied' | 'version-mismatch' | 'needs-acknowledgement' | 'git-missing';"
|
|
432
|
+
"declaration": "export type InstallRejectionCode = 'not-in-catalog' | 'denied' | 'version-mismatch' | 'needs-acknowledgement' | 'git-missing' | 'tarball-integrity';"
|
|
422
433
|
},
|
|
423
434
|
{
|
|
424
435
|
"name": "InstallState",
|
|
@@ -426,7 +437,7 @@ export const TYPERT = {
|
|
|
426
437
|
},
|
|
427
438
|
{
|
|
428
439
|
"name": "InstallStatus",
|
|
429
|
-
"declaration": "export interface InstallStatus {\n state: InstallState;\n log: string[];\n needsRestart?: boolean;\n detail?: string;\n}"
|
|
440
|
+
"declaration": "export interface InstallStatus {\n state: InstallState;\n log: string[];\n needsRestart?: boolean;\n restartReason?: string;\n detail?: string;\n}"
|
|
430
441
|
},
|
|
431
442
|
{
|
|
432
443
|
"name": "RestartOutcome",
|
|
@@ -438,7 +449,7 @@ export const TYPERT = {
|
|
|
438
449
|
},
|
|
439
450
|
{
|
|
440
451
|
"name": "ShopInstalledEntry",
|
|
441
|
-
"declaration": "export interface ShopInstalledEntry {\n name: string;\n installed: string;\n latest: string;\n outdated: boolean;\n}"
|
|
452
|
+
"declaration": "export interface ShopInstalledEntry {\n name: string;\n installed: string;\n latest: string;\n outdated: boolean;\n enabled: boolean;\n}"
|
|
442
453
|
},
|
|
443
454
|
{
|
|
444
455
|
"name": "ShopInstallResult",
|
|
@@ -466,7 +477,7 @@ export const TYPERT = {
|
|
|
466
477
|
},
|
|
467
478
|
{
|
|
468
479
|
"name": "ShopVersionResult",
|
|
469
|
-
"declaration": "export interface ShopVersionResult {\n installed: string;\n latest: string | null;\n outdated: boolean;\n}"
|
|
480
|
+
"declaration": "export interface ShopVersionResult {\n installed: string;\n latest: string | null;\n outdated: boolean;\n restartSupported: boolean;\n}"
|
|
470
481
|
}
|
|
471
482
|
]
|
|
472
483
|
}
|
|
@@ -20,12 +20,13 @@ const dsh_plugin_shop_shop_catalog_result$schema = z.object({
|
|
|
20
20
|
'review': z.union([z.undefined(), z.object({
|
|
21
21
|
'reviewedVersion': z.union([z.undefined(), z.string()]).optional(),
|
|
22
22
|
'reviewedCommit': z.union([z.undefined(), z.string()]).optional(),
|
|
23
|
+
'reviewedSha256': z.union([z.undefined(), z.string()]).optional(),
|
|
23
24
|
'reviewer': z.string(),
|
|
24
25
|
'reviewCommit': z.string(),
|
|
25
26
|
'notes': z.string(),
|
|
26
27
|
})]).optional(),
|
|
27
28
|
'catalog': z.union([z.undefined(), z.object({
|
|
28
|
-
'category': z.union([z.literal("tool"), z.literal("provider"), z.literal("ui"), z.literal("workflow"), z.literal("integration"), z.literal("other")]),
|
|
29
|
+
'category': z.union([z.literal("tool"), z.literal("provider"), z.literal("ui"), z.literal("workflow"), z.literal("integration"), z.literal("theme"), z.literal("other")]),
|
|
29
30
|
'summary': z.object({
|
|
30
31
|
'en': z.string(),
|
|
31
32
|
'zh': z.union([z.undefined(), z.string()]).optional(),
|
|
@@ -34,10 +35,17 @@ const dsh_plugin_shop_shop_catalog_result$schema = z.object({
|
|
|
34
35
|
})]).optional(),
|
|
35
36
|
'source': z.union([z.literal("npm"), z.literal("github")]),
|
|
36
37
|
'repo': z.union([z.undefined(), z.string()]).optional(),
|
|
38
|
+
'subdir': z.union([z.undefined(), z.string()]).optional(),
|
|
39
|
+
'tarball': z.union([z.undefined(), z.object({
|
|
40
|
+
'url': z.string(),
|
|
41
|
+
'sha256': z.string(),
|
|
42
|
+
})]).optional(),
|
|
43
|
+
'added': z.string(),
|
|
37
44
|
})),
|
|
38
45
|
'denied': z.array(z.object({
|
|
39
46
|
'name': z.string(),
|
|
40
47
|
'detail': z.string(),
|
|
48
|
+
'replacement': z.union([z.undefined(), z.string()]).optional(),
|
|
41
49
|
})),
|
|
42
50
|
'stars': z.record(z.string(), z.number()),
|
|
43
51
|
})
|
|
@@ -46,6 +54,7 @@ const dsh_plugin_shop_shop_installed_result$schema = z.array(z.object({
|
|
|
46
54
|
'installed': z.string(),
|
|
47
55
|
'latest': z.string(),
|
|
48
56
|
'outdated': z.boolean(),
|
|
57
|
+
'enabled': z.boolean(),
|
|
49
58
|
}))
|
|
50
59
|
const dsh_plugin_shop_shop_installStart_parameter_0$schema = z.object({
|
|
51
60
|
'name': z.string(),
|
|
@@ -57,7 +66,7 @@ const dsh_plugin_shop_shop_installStart_result$schema = z.union([z.object({
|
|
|
57
66
|
'installId': z.string(),
|
|
58
67
|
}), z.object({
|
|
59
68
|
'ok': z.literal(false),
|
|
60
|
-
'code': z.union([z.literal("not-in-catalog"), z.literal("denied"), z.literal("version-mismatch"), z.literal("needs-acknowledgement"), z.literal("git-missing")]),
|
|
69
|
+
'code': z.union([z.literal("not-in-catalog"), z.literal("denied"), z.literal("version-mismatch"), z.literal("needs-acknowledgement"), z.literal("git-missing"), z.literal("tarball-integrity")]),
|
|
61
70
|
'detail': z.string(),
|
|
62
71
|
})])
|
|
63
72
|
const dsh_plugin_shop_shop_installStatus_parameter_0$schema = z.object({
|
|
@@ -68,6 +77,7 @@ const dsh_plugin_shop_shop_installStatus_result$schema = z.object({
|
|
|
68
77
|
'state': z.union([z.literal("running"), z.literal("done"), z.literal("failed")]),
|
|
69
78
|
'log': z.array(z.string()),
|
|
70
79
|
'needsRestart': z.union([z.undefined(), z.literal(false), z.literal(true)]).optional(),
|
|
80
|
+
'restartReason': z.union([z.undefined(), z.string()]).optional(),
|
|
71
81
|
'detail': z.union([z.undefined(), z.string()]).optional(),
|
|
72
82
|
})
|
|
73
83
|
const dsh_plugin_shop_shop_restart_result$schema = z.union([z.object({
|
|
@@ -108,6 +118,7 @@ const dsh_plugin_shop_shop_version_result$schema = z.object({
|
|
|
108
118
|
'installed': z.string(),
|
|
109
119
|
'latest': z.union([z.literal(null), z.string()]),
|
|
110
120
|
'outdated': z.boolean(),
|
|
121
|
+
'restartSupported': z.boolean(),
|
|
111
122
|
})
|
|
112
123
|
|
|
113
124
|
export const TYPERT_REMOTE = {
|
|
@@ -137,7 +148,7 @@ export const TYPERT_REMOTE = {
|
|
|
137
148
|
typeSymbol: 'dsh-plugin-shop/types#ShopCatalogResult',
|
|
138
149
|
schema: dsh_plugin_shop_shop_catalog_result$schema,
|
|
139
150
|
},
|
|
140
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
151
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":447,"column":9},
|
|
141
152
|
},
|
|
142
153
|
{
|
|
143
154
|
id: 'dsh-plugin-shop#shop/installed',
|
|
@@ -152,7 +163,7 @@ export const TYPERT_REMOTE = {
|
|
|
152
163
|
typeSymbol: 'dsh-plugin-shop#shop/installed:result',
|
|
153
164
|
schema: dsh_plugin_shop_shop_installed_result$schema,
|
|
154
165
|
},
|
|
155
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
166
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":597,"column":9},
|
|
156
167
|
},
|
|
157
168
|
{
|
|
158
169
|
id: 'dsh-plugin-shop#shop/installStart',
|
|
@@ -178,7 +189,7 @@ export const TYPERT_REMOTE = {
|
|
|
178
189
|
typeSymbol: 'dsh-plugin-shop/types#ShopInstallResult',
|
|
179
190
|
schema: dsh_plugin_shop_shop_installStart_result$schema,
|
|
180
191
|
},
|
|
181
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
192
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":473,"column":9},
|
|
182
193
|
},
|
|
183
194
|
{
|
|
184
195
|
id: 'dsh-plugin-shop#shop/installStatus',
|
|
@@ -203,7 +214,7 @@ export const TYPERT_REMOTE = {
|
|
|
203
214
|
typeSymbol: 'dsh-plugin-shop/types#ShopInstallStatusResult',
|
|
204
215
|
schema: dsh_plugin_shop_shop_installStatus_result$schema,
|
|
205
216
|
},
|
|
206
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
217
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":586,"column":3},
|
|
207
218
|
},
|
|
208
219
|
{
|
|
209
220
|
id: 'dsh-plugin-shop#shop/restart',
|
|
@@ -218,7 +229,7 @@ export const TYPERT_REMOTE = {
|
|
|
218
229
|
typeSymbol: 'dsh-plugin-shop/types#ShopRestartResult',
|
|
219
230
|
schema: dsh_plugin_shop_shop_restart_result$schema,
|
|
220
231
|
},
|
|
221
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
232
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":721,"column":9},
|
|
222
233
|
},
|
|
223
234
|
{
|
|
224
235
|
id: 'dsh-plugin-shop#shop/setEnabled',
|
|
@@ -243,7 +254,7 @@ export const TYPERT_REMOTE = {
|
|
|
243
254
|
typeSymbol: 'dsh-plugin-shop/types#ShopSetEnabledResult',
|
|
244
255
|
schema: dsh_plugin_shop_shop_setEnabled_result$schema,
|
|
245
256
|
},
|
|
246
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
257
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":400,"column":3},
|
|
247
258
|
},
|
|
248
259
|
{
|
|
249
260
|
id: 'dsh-plugin-shop#shop/uninstallStart',
|
|
@@ -269,7 +280,7 @@ export const TYPERT_REMOTE = {
|
|
|
269
280
|
typeSymbol: 'dsh-plugin-shop/types#ShopUninstallResult',
|
|
270
281
|
schema: dsh_plugin_shop_shop_uninstallStart_result$schema,
|
|
271
282
|
},
|
|
272
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
283
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":668,"column":9},
|
|
273
284
|
},
|
|
274
285
|
{
|
|
275
286
|
id: 'dsh-plugin-shop#shop/updateStart',
|
|
@@ -294,7 +305,7 @@ export const TYPERT_REMOTE = {
|
|
|
294
305
|
typeSymbol: 'dsh-plugin-shop/types#ShopUpdateResult',
|
|
295
306
|
schema: dsh_plugin_shop_shop_updateStart_result$schema,
|
|
296
307
|
},
|
|
297
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
308
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":781,"column":9},
|
|
298
309
|
},
|
|
299
310
|
{
|
|
300
311
|
id: 'dsh-plugin-shop#shop/version',
|
|
@@ -309,7 +320,7 @@ export const TYPERT_REMOTE = {
|
|
|
309
320
|
typeSymbol: 'dsh-plugin-shop/types#ShopVersionResult',
|
|
310
321
|
schema: dsh_plugin_shop_shop_version_result$schema,
|
|
311
322
|
},
|
|
312
|
-
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":
|
|
323
|
+
sourceLocation: {"file":"packages/dsh-plugin-shop/src/host/index.ts","line":765,"column":9},
|
|
313
324
|
},
|
|
314
325
|
],
|
|
315
326
|
}
|
|
@@ -15,6 +15,7 @@ export declare const zh: {
|
|
|
15
15
|
categoryUi: string;
|
|
16
16
|
categoryWorkflow: string;
|
|
17
17
|
categoryIntegration: string;
|
|
18
|
+
categoryTheme: string;
|
|
18
19
|
categoryOther: string;
|
|
19
20
|
empty: string;
|
|
20
21
|
emptySearch: string;
|
|
@@ -39,11 +40,13 @@ export declare const zh: {
|
|
|
39
40
|
license: string;
|
|
40
41
|
customLicense: string;
|
|
41
42
|
reviewedVersionLine: string;
|
|
43
|
+
reviewedPinLine: string;
|
|
42
44
|
deniedCode: string;
|
|
43
45
|
notInCatalogCode: string;
|
|
44
46
|
versionMismatchCode: string;
|
|
45
47
|
needsAcknowledgementCode: string;
|
|
46
48
|
gitMissingCode: string;
|
|
49
|
+
tarballIntegrityCode: string;
|
|
47
50
|
githubSource: string;
|
|
48
51
|
installedSection: string;
|
|
49
52
|
installedVersion: string;
|
|
@@ -54,6 +57,7 @@ export declare const zh: {
|
|
|
54
57
|
uninstalling: string;
|
|
55
58
|
uninstallFailed: string;
|
|
56
59
|
uninstallTransportFailed: string;
|
|
60
|
+
uninstalledLiveNotice: string;
|
|
57
61
|
uninstalledRestartNotice: string;
|
|
58
62
|
restart: string;
|
|
59
63
|
restartTitle: string;
|
|
@@ -62,6 +66,7 @@ export declare const zh: {
|
|
|
62
66
|
restarting: string;
|
|
63
67
|
restartFailedNotice: string;
|
|
64
68
|
restartTransportFailed: string;
|
|
69
|
+
restartDisabledNotice: string;
|
|
65
70
|
updateFailed: string;
|
|
66
71
|
updateTransportFailed: string;
|
|
67
72
|
checkUpdate: string;
|
|
@@ -89,6 +94,7 @@ export declare const en: {
|
|
|
89
94
|
categoryUi: string;
|
|
90
95
|
categoryWorkflow: string;
|
|
91
96
|
categoryIntegration: string;
|
|
97
|
+
categoryTheme: string;
|
|
92
98
|
categoryOther: string;
|
|
93
99
|
empty: string;
|
|
94
100
|
emptySearch: string;
|
|
@@ -113,11 +119,13 @@ export declare const en: {
|
|
|
113
119
|
license: string;
|
|
114
120
|
customLicense: string;
|
|
115
121
|
reviewedVersionLine: string;
|
|
122
|
+
reviewedPinLine: string;
|
|
116
123
|
deniedCode: string;
|
|
117
124
|
notInCatalogCode: string;
|
|
118
125
|
versionMismatchCode: string;
|
|
119
126
|
needsAcknowledgementCode: string;
|
|
120
127
|
gitMissingCode: string;
|
|
128
|
+
tarballIntegrityCode: string;
|
|
121
129
|
githubSource: string;
|
|
122
130
|
installedSection: string;
|
|
123
131
|
installedVersion: string;
|
|
@@ -128,6 +136,7 @@ export declare const en: {
|
|
|
128
136
|
uninstalling: string;
|
|
129
137
|
uninstallFailed: string;
|
|
130
138
|
uninstallTransportFailed: string;
|
|
139
|
+
uninstalledLiveNotice: string;
|
|
131
140
|
uninstalledRestartNotice: string;
|
|
132
141
|
restart: string;
|
|
133
142
|
restartTitle: string;
|
|
@@ -136,6 +145,7 @@ export declare const en: {
|
|
|
136
145
|
restarting: string;
|
|
137
146
|
restartFailedNotice: string;
|
|
138
147
|
restartTransportFailed: string;
|
|
148
|
+
restartDisabledNotice: string;
|
|
139
149
|
updateFailed: string;
|
|
140
150
|
updateTransportFailed: string;
|
|
141
151
|
checkUpdate: string;
|
|
@@ -18,6 +18,12 @@ export declare function displayVersion(entry: {
|
|
|
18
18
|
source: 'npm' | 'github';
|
|
19
19
|
version: string;
|
|
20
20
|
}): string;
|
|
21
|
+
/** The hash pin a stale line names for a repo or release-rescued entry — the
|
|
22
|
+
* reviewed commit, or the reviewed release tarball sha256 (market borrowings
|
|
23
|
+
* §3.1). Shortened to 7 chars like the card's own version; '' only for a
|
|
24
|
+
* hand-built fixture carrying no pin. The npm form is a version and keeps the
|
|
25
|
+
* version line's `v` prefix instead. */
|
|
26
|
+
export declare function reviewHashPin(review: NonNullable<CatalogEntry['review']>): string;
|
|
21
27
|
/**
|
|
22
28
|
* Whether the license value is the npm idiom `SEE LICENSE IN <file>` — a
|
|
23
29
|
* valid SPDX form meaning "custom license, text ships in that file". The
|
|
@@ -31,6 +37,7 @@ export interface InstallStatusShape {
|
|
|
31
37
|
state: 'running' | 'done' | 'failed';
|
|
32
38
|
log: string[];
|
|
33
39
|
needsRestart?: boolean;
|
|
40
|
+
restartReason?: string;
|
|
34
41
|
detail?: string;
|
|
35
42
|
}
|
|
36
43
|
/** The install view state machine (§7.2). */
|
|
@@ -47,6 +54,7 @@ export type InstallView = {
|
|
|
47
54
|
} | {
|
|
48
55
|
kind: 'done';
|
|
49
56
|
needsRestart: boolean;
|
|
57
|
+
restartReason?: string;
|
|
50
58
|
} | {
|
|
51
59
|
kind: 'failed';
|
|
52
60
|
detail: string;
|
|
@@ -105,15 +113,16 @@ declare const CATEGORY_KEYS: {
|
|
|
105
113
|
readonly ui: "categoryUi";
|
|
106
114
|
readonly workflow: "categoryWorkflow";
|
|
107
115
|
readonly integration: "categoryIntegration";
|
|
116
|
+
readonly theme: "categoryTheme";
|
|
108
117
|
readonly other: "categoryOther";
|
|
109
118
|
};
|
|
110
119
|
/** The locale key for one entry's category — derived entries read as `other`
|
|
111
120
|
* (§6.1: a derived listing has no declared category). */
|
|
112
121
|
export declare function categoryKey(entry: CatalogEntry): ShopLocaleKey;
|
|
113
122
|
/** The category vocabulary as a type, derived from the map above so the
|
|
114
|
-
* client never repeats the
|
|
123
|
+
* client never repeats the seven literals. */
|
|
115
124
|
export type Category = keyof typeof CATEGORY_KEYS;
|
|
116
|
-
/** The
|
|
125
|
+
/** The seven categories in display order (map insertion order). */
|
|
117
126
|
export declare const CATEGORY_ORDER: Category[];
|
|
118
127
|
/** The locale key for one bare category value (the filter buttons). */
|
|
119
128
|
export declare function categoryLocaleKey(category: Category): ShopLocaleKey;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/** Catalog fetch, verification, and disk cache — the Host's only network path. */
|
|
2
2
|
import type { CatalogEntry, DeniedEntry } from './types.ts';
|
|
3
3
|
/** Highest schemaVersion this build understands; a higher one is refused (§10).
|
|
4
|
-
* 3 adds `source` and repo entries (github install channel)
|
|
5
|
-
|
|
4
|
+
* 3 adds `source` and repo entries (github install channel); 4 adds `subdir`
|
|
5
|
+
* for monorepo-subpackage entries (2026-08-31 hub-borrowings A); 5 adds
|
|
6
|
+
* `added`, `tarball` (release rescue), the `theme` category, and
|
|
7
|
+
* `denied[].replacement` (2026-08-31 market borrowings). */
|
|
8
|
+
export declare const SUPPORTED_SCHEMA_VERSION = 5;
|
|
6
9
|
export interface CatalogSnapshot {
|
|
7
10
|
schemaVersion: number;
|
|
8
11
|
builtAt: string;
|
|
@@ -7,6 +7,7 @@ export interface InstallStatus {
|
|
|
7
7
|
state: InstallState;
|
|
8
8
|
log: string[];
|
|
9
9
|
needsRestart?: boolean;
|
|
10
|
+
restartReason?: string;
|
|
10
11
|
detail?: string;
|
|
11
12
|
}
|
|
12
13
|
interface RunningInstall {
|
|
@@ -17,7 +18,8 @@ interface RunningInstall {
|
|
|
17
18
|
/**
|
|
18
19
|
* Run one `dsh plugin --profile <profile> add <spec>` and track it.
|
|
19
20
|
* When `expectedName` is given, a zero exit is confirmed against the profile
|
|
20
|
-
* manifest (§7.2 step 6) before the install reports `done`.
|
|
21
|
+
* manifest (§7.2 step 6) before the install reports `done`. When `afterDone`
|
|
22
|
+
* is given, the terminal `done` waits for it to settle (§D hot mount).
|
|
21
23
|
*/
|
|
22
24
|
export declare function startInstall(options: {
|
|
23
25
|
profile: string;
|
|
@@ -25,13 +27,18 @@ export declare function startInstall(options: {
|
|
|
25
27
|
dshBin?: string;
|
|
26
28
|
env?: NodeJS.ProcessEnv;
|
|
27
29
|
expectedName?: string;
|
|
30
|
+
afterDone?: (home: string | undefined) => Promise<{
|
|
31
|
+
needsRestart: boolean;
|
|
32
|
+
restartReason?: string;
|
|
33
|
+
} | void>;
|
|
28
34
|
onStatus?: (status: InstallStatus) => void;
|
|
29
35
|
}): RunningInstall;
|
|
30
36
|
/**
|
|
31
37
|
* Run one `dsh plugin --profile <profile> remove <name>` and track it.
|
|
32
38
|
* When `expectedName` is given, a zero exit is confirmed against the profile
|
|
33
39
|
* manifest — the bundle must actually have LEFT `dsh.profile.bundles` — before
|
|
34
|
-
* the uninstall reports `done`.
|
|
40
|
+
* the uninstall reports `done`. When `afterDone` is given, the terminal `done`
|
|
41
|
+
* waits for it to settle (§D hot mount).
|
|
35
42
|
*/
|
|
36
43
|
export declare function startUninstall(options: {
|
|
37
44
|
profile: string;
|
|
@@ -39,6 +46,10 @@ export declare function startUninstall(options: {
|
|
|
39
46
|
dshBin?: string;
|
|
40
47
|
env?: NodeJS.ProcessEnv;
|
|
41
48
|
expectedName?: string;
|
|
49
|
+
afterDone?: (home: string | undefined) => Promise<{
|
|
50
|
+
needsRestart: boolean;
|
|
51
|
+
restartReason?: string;
|
|
52
|
+
} | void>;
|
|
42
53
|
onStatus?: (status: InstallStatus) => void;
|
|
43
54
|
}): RunningInstall;
|
|
44
55
|
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Restart-free installs: mount a freshly installed plugin into the running
|
|
3
|
+
* composition through a shop-owned Include subtree (design 2026-08-31
|
|
4
|
+
* market-borrowings §4, mechanism ported from dsh-market's hot.ts).
|
|
5
|
+
*
|
|
6
|
+
* Durable state stays with the profile's `dsh.profile.bundles`, so the next
|
|
7
|
+
* boot loads the plugin through the normal bundle layer. The subtree exists
|
|
8
|
+
* only for this process: its input files live under `<profile>/.dsh-shop/`
|
|
9
|
+
* and are wiped on every boot, so a crash can never leave a file that
|
|
10
|
+
* collides with the bundle layer (inserting an id the bundle layer also
|
|
11
|
+
* inserts is a hard boot failure). Rows are prefixed `mkt-` for the same
|
|
12
|
+
* reason: within this session the hot entry must never share an id with a
|
|
13
|
+
* boot-layer entry, including a disabled one left behind by an update swap.
|
|
14
|
+
*
|
|
15
|
+
* The Include subclass suppresses `write()` — the loader otherwise persists
|
|
16
|
+
* tree changes back to the file it read (dsh-market hot.ts; the in-tree
|
|
17
|
+
* precedent is dsh's agent-presets PresetTree).
|
|
18
|
+
*
|
|
19
|
+
* Deliberate non-port: dsh-market's client-only shim (`mountClientOnlyDeps`
|
|
20
|
+
* and `shimNames`, which hot-mounted a package with no server-side entry by
|
|
21
|
+
* inserting a shim loader entry) is omitted. Our catalog never lists a
|
|
22
|
+
* package without `dsh.bundle`, so the shim branch is unreachable here
|
|
23
|
+
* (YAGNI). `hotMount` still distinguishes "no patch file / not
|
|
24
|
+
* hot-mountable" from "restart will fix it" through the bilingual `reason`.
|
|
25
|
+
*/
|
|
26
|
+
/** One hot-mountable insert row: a plain `- id:` / `name:` pair. */
|
|
27
|
+
export interface HotRow {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
}
|
|
31
|
+
/** The loader-side surface hot mounts consume: a cordis plugin registration
|
|
32
|
+
* and (optionally) a logger. The real ctx satisfies this structurally. */
|
|
33
|
+
export interface HotContext {
|
|
34
|
+
plugin(plugin: unknown, config: unknown): PluginHandle;
|
|
35
|
+
logger?: {
|
|
36
|
+
info(message: string): void;
|
|
37
|
+
warn(message: string): void;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/** A cordis Fiber handle: `await()` settles when activation finishes (or
|
|
41
|
+
* fails); `dispose()` tears the fiber down. */
|
|
42
|
+
export interface PluginHandle {
|
|
43
|
+
await(): Promise<unknown>;
|
|
44
|
+
dispose(): Promise<unknown> | void;
|
|
45
|
+
}
|
|
46
|
+
export interface HotMountResult {
|
|
47
|
+
ok: boolean;
|
|
48
|
+
/** Bilingual, distinguishing "restart will fix it" (a transient mount
|
|
49
|
+
* failure) from "this package can never hot-mount" (no patch file, or a
|
|
50
|
+
* patch the hot tree cannot replicate). null exactly when ok. */
|
|
51
|
+
reason: string | null;
|
|
52
|
+
}
|
|
53
|
+
/** Test injection for the host shell (filesystem + ctx + clock). Production
|
|
54
|
+
* defaults: the real include import, node:fs, `join(profileDir, '.dsh-shop')`
|
|
55
|
+
* and `DSH_SHOP_HOT_MOUNT_TIMEOUT_MS || 10000`. */
|
|
56
|
+
export interface HotDeps {
|
|
57
|
+
/** The tree class to mount; production loads the Include class via the
|
|
58
|
+
* optional peer. An explicit null means "the include is unavailable" and
|
|
59
|
+
* short-circuits the load (the old-harness fallback). */
|
|
60
|
+
hotTreeClass?: unknown;
|
|
61
|
+
fs?: HotFs;
|
|
62
|
+
dir?: string;
|
|
63
|
+
timeoutMs?: number;
|
|
64
|
+
now?: () => number;
|
|
65
|
+
}
|
|
66
|
+
/** The node:fs surface hot.ts uses; injectable so tests never touch disk. */
|
|
67
|
+
export interface HotFs {
|
|
68
|
+
read: (path: string) => string;
|
|
69
|
+
write: (path: string, data: string) => void;
|
|
70
|
+
list: (path: string) => string[];
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Parse a bundle patch into the plain insert rows a hot tree can replicate.
|
|
74
|
+
* Only `- id:` / `name:` pairs parse — a row with config, an expression
|
|
75
|
+
* name, or a dangling id returns null, and the caller falls back to restart
|
|
76
|
+
* activation. CRLF-aware: a patch authored with Windows line endings must
|
|
77
|
+
* not read as "contains config rows" (the Windows-patch regression their
|
|
78
|
+
* hot.ts documents). Pure: string in, rows out.
|
|
79
|
+
*/
|
|
80
|
+
export declare function parseSimplePatch(patchText: string): HotRow[] | null;
|
|
81
|
+
/**
|
|
82
|
+
* Mount one installed package into the running composition through an
|
|
83
|
+
* Include subtree: read its bundle patch, replicate the simple rows under
|
|
84
|
+
* `mkt-` ids into `<profile>/.dsh-shop/hot-<n>.yml`, register the tree, and
|
|
85
|
+
* race its activation against `timeoutMs`. Success returns `ok: true` with
|
|
86
|
+
* no reason; any fallback returns `ok: false` with a bilingual reason
|
|
87
|
+
* distinguishing "restart will fix it" (timeout, activation failure,
|
|
88
|
+
* unavailable include) from "this package can never hot-mount" (no patch
|
|
89
|
+
* file, or rows the hot tree cannot replicate). The plugin is installed in
|
|
90
|
+
* the bundle layer either way, so a restart always activates it.
|
|
91
|
+
*/
|
|
92
|
+
export declare function hotMount(ctx: HotContext, profileDir: string, packageName: string, deps?: HotDeps): Promise<HotMountResult>;
|
|
93
|
+
/**
|
|
94
|
+
* Dispose a package's hot mount. Returns false (without touching anything)
|
|
95
|
+
* when the name is not mounted; the handle leaves the map before the
|
|
96
|
+
* dispose so a mount can never be disposed twice, and a throwing dispose
|
|
97
|
+
* propagates — the plugin may still be live in this session.
|
|
98
|
+
*/
|
|
99
|
+
export declare function hotUnmount(packageName: string): Promise<boolean>;
|
|
100
|
+
/** The package names hot-mounted this session, in mount order. */
|
|
101
|
+
export declare function listHotMounts(): string[];
|
|
102
|
+
/** Wipe the session's mount inputs at host start: `hot-<n>.yml` files under
|
|
103
|
+
* `<profile>/.dsh-shop/` only — anything else in the namespace directory is
|
|
104
|
+
* left alone, and a missing directory is a no-op. */
|
|
105
|
+
export declare function cleanHotDir(profileDir: string): void;
|