@deepseek-ai/dsh-plugin-manager 0.2.2-rc.4 → 0.2.3-alpha.1
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/README.i18n.yaml +8 -8
- package/README.md +5 -4
- package/README.zh.md +5 -4
- package/lib/index.js +39 -7
- package/lib/typert.host.js +28 -28
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +26 -26
- package/lib/types/catalog.d.ts +14 -0
- package/lib/types/catalog.d.ts.map +1 -0
- package/lib/types/catalog.js +16 -0
- package/lib/types/catalog.js.map +1 -0
- package/lib/types/error.d.ts +25 -0
- package/lib/types/error.d.ts.map +1 -0
- package/lib/types/error.js +38 -0
- package/lib/types/error.js.map +1 -0
- package/lib/types/index.d.ts +5 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js +15 -5
- package/lib/types/index.js.map +1 -1
- package/lib/types/registry.js +1 -1
- package/lib/types/registry.js.map +1 -1
- package/lib/types/tools.js +8 -8
- package/lib/types/tools.js.map +1 -1
- package/package.json +38 -33
- package/src/catalog.ts +18 -0
- package/src/error.ts +47 -0
- package/src/index.ts +15 -5
- package/src/registry.ts +1 -1
- package/src/tools.ts +8 -8
|
@@ -18,7 +18,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_1$schema =
|
|
|
18
18
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema$value
|
|
19
19
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema$value ??= z.union([z.object({
|
|
20
20
|
'status': z.literal("accepted").readonly(),
|
|
21
|
-
'kind': z.union([z.literal("
|
|
21
|
+
'kind': z.union([z.literal("path"), z.literal("registry"), z.literal("git"), z.literal("tarball")]).readonly(),
|
|
22
22
|
'name': z.string().readonly().optional(),
|
|
23
23
|
'version': z.string().readonly().optional(),
|
|
24
24
|
'description': z.string().readonly().optional().describe('`description` of the package manifest.'),
|
|
@@ -48,7 +48,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$sc
|
|
|
48
48
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema$value
|
|
49
49
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema$value ??= z.object({
|
|
50
50
|
'changed': z.boolean(),
|
|
51
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
51
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
52
52
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
53
53
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
54
54
|
'target': z.string(),
|
|
@@ -90,7 +90,7 @@ let _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$valu
|
|
|
90
90
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value ??= z.array(z.object({
|
|
91
91
|
'name': z.string(),
|
|
92
92
|
'official': z.boolean().describe('Project-maintained shipped optional bundle or on-demand catalog entry, independent of installation and selection.'),
|
|
93
|
-
'availability': z.union([z.literal("profile"), z.literal("
|
|
93
|
+
'availability': z.union([z.literal("profile"), z.literal("missing"), z.literal("installation")]).describe('Readable package location; on-demand catalog entries exclude undeclared transitive copies, and declared files may be missing.'),
|
|
94
94
|
'installTarget': z.object({
|
|
95
95
|
'spec': z.string(),
|
|
96
96
|
'version': z.string(),
|
|
@@ -254,7 +254,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_parameter_0$sch
|
|
|
254
254
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema$value
|
|
255
255
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema$value ??= z.object({
|
|
256
256
|
'changed': z.boolean(),
|
|
257
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
257
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
258
258
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
259
259
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
260
260
|
'target': z.string(),
|
|
@@ -299,7 +299,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_parameter_1
|
|
|
299
299
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema$value
|
|
300
300
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema$value ??= z.object({
|
|
301
301
|
'changed': z.boolean(),
|
|
302
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
302
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
303
303
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
304
304
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
305
305
|
'target': z.string(),
|
|
@@ -344,7 +344,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_parameter_1
|
|
|
344
344
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema$value
|
|
345
345
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema$value ??= z.object({
|
|
346
346
|
'changed': z.boolean(),
|
|
347
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
347
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
348
348
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
349
349
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
350
350
|
'target': z.string(),
|
|
@@ -393,7 +393,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_paramete
|
|
|
393
393
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$schema$value
|
|
394
394
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$schema$value ??= z.object({
|
|
395
395
|
'changed': z.boolean(),
|
|
396
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
396
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
397
397
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
398
398
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
399
399
|
'target': z.string(),
|
|
@@ -448,7 +448,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_updateBundle_result$schema =
|
|
|
448
448
|
'step': z.union([z.literal("remove"), z.literal("check"), z.literal("install")]).readonly(),
|
|
449
449
|
'result': z.object({
|
|
450
450
|
'changed': z.boolean(),
|
|
451
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
451
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
452
452
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
453
453
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
454
454
|
'target': z.string(),
|
|
@@ -488,7 +488,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_updateBundle_result$schema =
|
|
|
488
488
|
}).readonly(),
|
|
489
489
|
'restore': z.object({
|
|
490
490
|
'changed': z.boolean(),
|
|
491
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
491
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
492
492
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
493
493
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
494
494
|
'target': z.string(),
|
|
@@ -532,7 +532,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_parameter_0$s
|
|
|
532
532
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema$value
|
|
533
533
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema$value ??= z.union([z.literal(null), z.object({
|
|
534
534
|
'changed': z.boolean(),
|
|
535
|
-
'application': z.union([z.literal("failed"), z.literal("
|
|
535
|
+
'application': z.union([z.literal("failed"), z.literal("applied"), z.literal("cancelled"), z.literal("restart-required"), z.literal("overridden")]).describe('`cancelled` is an installation the caller stopped, its files restored.'),
|
|
536
536
|
'restartReason': z.union([z.literal("no-hmr"), z.literal("package-moved"), z.literal("host-module"), z.literal("unmanaged-plugin"), z.literal("module-comparison")]).optional().describe('Present with `restart-required`: why the change takes effect only at the next start.'),
|
|
537
537
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]).describe('Last attempted step; successful installation can proceed to enablement.'),
|
|
538
538
|
'target': z.string(),
|
|
@@ -670,7 +670,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
670
670
|
description: '`cancelled` once the Git check or pnpm exited and the files are restored, `too-late` once the bundle is being applied, `not-running` for any other id.',
|
|
671
671
|
jsonSchema: {"type":"object","properties":{"status":{"type":"string","enum":["not-running","cancelled","too-late"]}},"required":["status"],"additionalProperties":true},
|
|
672
672
|
},
|
|
673
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
673
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1139,"column":9},
|
|
674
674
|
},
|
|
675
675
|
'pluginManager/inspect': {
|
|
676
676
|
service: 'pluginManager',
|
|
@@ -719,9 +719,9 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
719
719
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginSpecInspection',
|
|
720
720
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema,
|
|
721
721
|
description: 'The package the spec names, or why it is refused.',
|
|
722
|
-
jsonSchema: {"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"accepted"},"kind":{"type":"string","enum":["
|
|
722
|
+
jsonSchema: {"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"accepted"},"kind":{"type":"string","enum":["path","registry","git","tarball"]},"name":{"type":"string"},"version":{"type":"string"},"description":{"type":"string","description":"`description` of the package manifest."},"bundle":{"oneOf":[{"type":"null","const":null},{"type":"boolean","enum":[false,true]}],"description":"Whether the package declares a bundle patch; null when the spec's form does not say."},"registry":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The registry that answered for a name, and for the other forms the one an install of the spec asks first."},"host":{"type":"string","description":"The host a git spec or a tarball URL is fetched from, which no registry stands in for."}},"required":["status","kind","bundle","registry"],"additionalProperties":true},{"type":"object","properties":{"status":{"type":"string","const":"refused"},"problem":{"type":"string","enum":["unknown","network","not-found","invalid-spec","already-installed","not-a-package","not-a-bundle"]},"reason":{"type":"string","description":"What pnpm, the registry, or the file system said."},"registries":{"type":"array","items":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"description":"The registries asked, in order, when the refusal came from asking them; `reason` is the last one's."}},"required":["status","problem","reason"],"additionalProperties":true}]},
|
|
723
723
|
},
|
|
724
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
724
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":628,"column":9},
|
|
725
725
|
},
|
|
726
726
|
'pluginManager/installBundle': {
|
|
727
727
|
service: 'pluginManager',
|
|
@@ -771,7 +771,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
771
771
|
description: 'Package-manager diagnostics, the registries asked, and the observed activation outcome.',
|
|
772
772
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
773
773
|
},
|
|
774
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
774
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":977,"column":3},
|
|
775
775
|
},
|
|
776
776
|
'pluginManager/listBundles': {
|
|
777
777
|
service: 'pluginManager',
|
|
@@ -786,7 +786,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
786
786
|
description: 'Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional display metadata, activation selections, whether the installation offers the bundle, and removal availability.',
|
|
787
787
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
788
788
|
},
|
|
789
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
789
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":506,"column":3},
|
|
790
790
|
},
|
|
791
791
|
'pluginManager/listPlugins': {
|
|
792
792
|
service: 'pluginManager',
|
|
@@ -801,7 +801,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
801
801
|
description: 'Current runtime entries with persistent patch targets.',
|
|
802
802
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
803
803
|
},
|
|
804
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
804
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":480,"column":9},
|
|
805
805
|
},
|
|
806
806
|
'pluginManager/listVersionExemptions': {
|
|
807
807
|
service: 'pluginManager',
|
|
@@ -816,7 +816,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
816
816
|
description: 'Accepted package-name@version keys with the runtime versions they may run on, and any record or file problem the reader rejected, which the caller reports instead of failing.',
|
|
817
817
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
818
818
|
},
|
|
819
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
819
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":454,"column":3},
|
|
820
820
|
},
|
|
821
821
|
'pluginManager/listVersions': {
|
|
822
822
|
service: 'pluginManager',
|
|
@@ -867,7 +867,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
867
867
|
description: 'At most `versionListLimit` newer versions, newest first, with their tags, deprecation, bundle declaration, and DSH compatibility, and the registry that answered; or why no list could be read, with every registry asked.',
|
|
868
868
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
869
869
|
},
|
|
870
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
870
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":688,"column":9},
|
|
871
871
|
},
|
|
872
872
|
'pluginManager/readBundleDetail': {
|
|
873
873
|
service: 'pluginManager',
|
|
@@ -934,7 +934,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
934
934
|
description: 'the document with its origin and path, or `none`.',
|
|
935
935
|
jsonSchema: {"oneOf":[{"type":"object","properties":{"status":{"type":"string","const":"found"},"origin":{"type":"string","enum":["locale","readme"],"description":"`locale` for the file locale `meta.detail` names, `readme` for the package's README."},"path":{"type":"string","description":"`/`-separated path of the document inside the package."},"markdown":{"type":"string","description":"Markdown text without a byte order mark or a leading YAML front matter block."}},"required":["status","origin","path","markdown"],"additionalProperties":true},{"type":"object","properties":{"status":{"type":"string","const":"none"}},"required":["status"],"additionalProperties":true}]},
|
|
936
936
|
},
|
|
937
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
937
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":418,"column":9},
|
|
938
938
|
},
|
|
939
939
|
'pluginManager/registries': {
|
|
940
940
|
service: 'pluginManager',
|
|
@@ -949,7 +949,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
949
949
|
description: 'The registries in pnpm\'s comparison form; null is the one pnpm\'s own configuration names, `resolved` as pnpm reads it now.',
|
|
950
950
|
jsonSchema: {"type":"object","properties":{"registry":{"oneOf":[{"type":"null","const":null},{"type":"string"}]},"fallbackRegistries":{"type":"array","items":{"type":"string"}},"resolved":{"oneOf":[{"type":"null","const":null},{"type":"string"}],"description":"The URL pnpm's own configuration names in the profile, read from pnpm; null when it could not be read."}},"required":["registry","fallbackRegistries","resolved"],"additionalProperties":true},
|
|
951
951
|
},
|
|
952
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
952
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":612,"column":9},
|
|
953
953
|
},
|
|
954
954
|
'pluginManager/removeBundle': {
|
|
955
955
|
service: 'pluginManager',
|
|
@@ -981,7 +981,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
981
981
|
description: 'Removal diagnostics and the remaining profile state.',
|
|
982
982
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
983
983
|
},
|
|
984
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
984
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1156,"column":3},
|
|
985
985
|
},
|
|
986
986
|
'pluginManager/setBundleEnabled': {
|
|
987
987
|
service: 'pluginManager',
|
|
@@ -1030,7 +1030,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
1030
1030
|
description: 'Persisted and runtime outcomes.',
|
|
1031
1031
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
1032
1032
|
},
|
|
1033
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
1033
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":955,"column":3},
|
|
1034
1034
|
},
|
|
1035
1035
|
'pluginManager/setPluginEnabled': {
|
|
1036
1036
|
service: 'pluginManager',
|
|
@@ -1079,7 +1079,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
1079
1079
|
description: 'Saved and runtime outcomes, including higher-priority overrides.',
|
|
1080
1080
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
1081
1081
|
},
|
|
1082
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
1082
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":937,"column":3},
|
|
1083
1083
|
},
|
|
1084
1084
|
'pluginManager/setVersionExemption': {
|
|
1085
1085
|
service: 'pluginManager',
|
|
@@ -1163,7 +1163,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
1163
1163
|
description: 'Saved and runtime outcomes. Startup-only profiles require restart.',
|
|
1164
1164
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
1165
1165
|
},
|
|
1166
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
1166
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":467,"column":3},
|
|
1167
1167
|
},
|
|
1168
1168
|
'pluginManager/updateBundle': {
|
|
1169
1169
|
service: 'pluginManager',
|
|
@@ -1230,7 +1230,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
1230
1230
|
description: 'The versions, the last step that ran with its result, and the reinstallation when one ran.',
|
|
1231
1231
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
1232
1232
|
},
|
|
1233
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
1233
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":746,"column":9},
|
|
1234
1234
|
},
|
|
1235
1235
|
'pluginManager/waitForInstall': {
|
|
1236
1236
|
service: 'pluginManager',
|
|
@@ -1262,7 +1262,7 @@ export const TYPERT_REMOTE = createTypertRemoteInfo({
|
|
|
1262
1262
|
description: 'The installation\'s outcome after it settles, or null if no active request has that id. Completed results are not retained; null establishes neither success nor cancellation.',
|
|
1263
1263
|
jsonSchemaError: 'typert tool schema: selected dictionaries require string keys and unconstrained JSON values',
|
|
1264
1264
|
},
|
|
1265
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
1265
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":1129,"column":9},
|
|
1266
1266
|
},
|
|
1267
1267
|
},
|
|
1268
1268
|
}, z)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** English display fields shared by model-facing bundle catalogs. */
|
|
2
|
+
import type { BundleInfo } from './types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Project the English catalog entry used by on-demand recommendation skills.
|
|
5
|
+
* @param bundle - A bundle reported by the plugin manager.
|
|
6
|
+
* @returns Its name, English display text or manifest fallbacks, and current selection.
|
|
7
|
+
*/
|
|
8
|
+
export declare function bundleCatalogEntry(bundle: BundleInfo): {
|
|
9
|
+
name: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/catalog.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAS7H"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project the English catalog entry used by on-demand recommendation skills.
|
|
3
|
+
* @param bundle - A bundle reported by the plugin manager.
|
|
4
|
+
* @returns Its name, English display text or manifest fallbacks, and current selection.
|
|
5
|
+
*/
|
|
6
|
+
export function bundleCatalogEntry(bundle) {
|
|
7
|
+
const title = bundle.meta?.title ?? bundle.name;
|
|
8
|
+
const description = bundle.meta?.description ?? bundle.description ?? '';
|
|
9
|
+
return {
|
|
10
|
+
name: bundle.name,
|
|
11
|
+
title: typeof title === 'string' ? title : title.en,
|
|
12
|
+
description: typeof description === 'string' ? description : description.en,
|
|
13
|
+
enabled: bundle.enabled,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/catalog.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAkB;IACnD,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,EAAE,KAAK,IAAI,MAAM,CAAC,IAAI,CAAA;IAC/C,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,EAAE,WAAW,IAAI,MAAM,CAAC,WAAW,IAAI,EAAE,CAAA;IACxE,OAAO;QACL,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE;QACnD,WAAW,EAAE,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE;QAC3E,OAAO,EAAE,MAAM,CAAC,OAAO;KACxB,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Typed failures thrown by plugin management calls rather than reported in a change result. */
|
|
2
|
+
import { HarnessError } from '@deepseek-ai/dsh-error';
|
|
3
|
+
/**
|
|
4
|
+
* Every {@link PluginManagerError} code:
|
|
5
|
+
* - `PLUGIN_MANAGER_PROFILE_READ_FAILED`: the profile manifest, patches, version exemptions, or
|
|
6
|
+
* installation manifest could not be read or parsed; `cause` is the original error. Repair the
|
|
7
|
+
* profile files before retrying.
|
|
8
|
+
* - `PLUGIN_MANAGER_UNAVAILABLE`: the manager was disposed before the change started.
|
|
9
|
+
*/
|
|
10
|
+
export declare const PLUGIN_MANAGER_ERROR_CODES: readonly ["PLUGIN_MANAGER_PROFILE_READ_FAILED", "PLUGIN_MANAGER_UNAVAILABLE"];
|
|
11
|
+
/** One {@link PluginManagerError} code. */
|
|
12
|
+
export type PluginManagerErrorCode = typeof PLUGIN_MANAGER_ERROR_CODES[number];
|
|
13
|
+
/** Typed plugin management failure; `code` is one of {@link PLUGIN_MANAGER_ERROR_CODES}. */
|
|
14
|
+
export declare class PluginManagerError extends HarnessError {
|
|
15
|
+
readonly code: PluginManagerErrorCode;
|
|
16
|
+
constructor(message: string, code: PluginManagerErrorCode, options?: ErrorOptions);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Run one synchronous profile read, converting its failure.
|
|
20
|
+
* @param read - reads and parses profile files.
|
|
21
|
+
* @returns the read value.
|
|
22
|
+
* @throws {PluginManagerError} `PLUGIN_MANAGER_PROFILE_READ_FAILED` with the original error as `cause`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readProfileState<T>(read: () => T): T;
|
|
25
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAErD;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,+EAG7B,CAAA;AAEV,2CAA2C;AAC3C,MAAM,MAAM,sBAAsB,GAAG,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAA;AAE9E,4FAA4F;AAC5F,qBAAa,kBAAmB,SAAQ,YAAY;IAClD,SAAkB,IAAI,EAAE,sBAAsB,CAAA;gBAElC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,YAAY;CAKlF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,CAAC,CAUpD"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Typed failures thrown by plugin management calls rather than reported in a change result. */
|
|
2
|
+
import { HarnessError } from '@deepseek-ai/dsh-error';
|
|
3
|
+
/**
|
|
4
|
+
* Every {@link PluginManagerError} code:
|
|
5
|
+
* - `PLUGIN_MANAGER_PROFILE_READ_FAILED`: the profile manifest, patches, version exemptions, or
|
|
6
|
+
* installation manifest could not be read or parsed; `cause` is the original error. Repair the
|
|
7
|
+
* profile files before retrying.
|
|
8
|
+
* - `PLUGIN_MANAGER_UNAVAILABLE`: the manager was disposed before the change started.
|
|
9
|
+
*/
|
|
10
|
+
export const PLUGIN_MANAGER_ERROR_CODES = [
|
|
11
|
+
'PLUGIN_MANAGER_PROFILE_READ_FAILED',
|
|
12
|
+
'PLUGIN_MANAGER_UNAVAILABLE',
|
|
13
|
+
];
|
|
14
|
+
/** Typed plugin management failure; `code` is one of {@link PLUGIN_MANAGER_ERROR_CODES}. */
|
|
15
|
+
export class PluginManagerError extends HarnessError {
|
|
16
|
+
code;
|
|
17
|
+
constructor(message, code, options) {
|
|
18
|
+
super(message, code, options);
|
|
19
|
+
this.name = 'PluginManagerError';
|
|
20
|
+
this.code = code;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Run one synchronous profile read, converting its failure.
|
|
25
|
+
* @param read - reads and parses profile files.
|
|
26
|
+
* @returns the read value.
|
|
27
|
+
* @throws {PluginManagerError} `PLUGIN_MANAGER_PROFILE_READ_FAILED` with the original error as `cause`.
|
|
28
|
+
*/
|
|
29
|
+
export function readProfileState(read) {
|
|
30
|
+
try {
|
|
31
|
+
return read();
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
// Profile readers fail with filesystem, JSON, YAML, or validation Error instances.
|
|
35
|
+
throw new PluginManagerError(`plugin-manager: failed to read the profile: ${error.message}`, 'PLUGIN_MANAGER_PROFILE_READ_FAILED', { cause: error });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAEhG,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAErD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;IACxC,oCAAoC;IACpC,4BAA4B;CACpB,CAAA;AAKV,4FAA4F;AAC5F,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAChC,IAAI,CAAwB;IAE9C,YAAY,OAAe,EAAE,IAA4B,EAAE,OAAsB;QAC/E,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;QAC7B,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAA;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;CACF;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAI,IAAa;IAC/C,IAAI,CAAC;QACH,OAAO,IAAI,EAAE,CAAA;IACf,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,mFAAmF;QACnF,MAAM,IAAI,kBAAkB,CAC1B,+CAAgD,KAAe,CAAC,OAAO,EAAE,EACzE,oCAAoC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CACvD,CAAA;IACH,CAAC;AACH,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import type { NpmFileSource } from '@deepseek-ai/dsh-plugin-detail/types';
|
|
|
5
5
|
import type { BundleDetail, BundleInfo, ChangeResult, InspectOptions, InstallBundleOptions, ListVersionsOptions, PluginEntryId, PluginInfo, PluginInstallCancellation, PluginInstallRequestId, PluginRegistries, PluginSpecInspection, PluginUpdateResult, PluginVersionList, UpdateBundleOptions } from './types.ts';
|
|
6
6
|
export type * from './types.ts';
|
|
7
7
|
export { classifyInstallFailure, type InstallFailureFacts } from './install-failure.ts';
|
|
8
|
+
export { PluginManagerError, type PluginManagerErrorCode } from './error.ts';
|
|
8
9
|
export { InvalidInstallSpecError, parseInstallSpec, pinnedGitOrigin, type ParsedInstallSpec } from './install-spec.ts';
|
|
9
10
|
/** The pnpm executable, registries, and limits for diagnostics, lookups and connection checks. */
|
|
10
11
|
export interface Config {
|
|
@@ -118,12 +119,16 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
118
119
|
setVersionExemption(packageVersion: string, runtimeVersion: string, enabled: boolean, acceptRisk?: boolean): Promise<ChangeResult>;
|
|
119
120
|
/** Read current plugins, including why a row cannot be changed through the profile patch.
|
|
120
121
|
* @returns Current runtime entries with persistent patch targets.
|
|
122
|
+
* @throws {PluginManagerError} `PLUGIN_MANAGER_PROFILE_READ_FAILED` to in-process callers when the profile patches
|
|
123
|
+
* cannot be read; Remote callers receive `gateway/internal`.
|
|
121
124
|
*/
|
|
122
125
|
listPlugins(): Promise<PluginInfo[]>;
|
|
123
126
|
/** Read installed, installation-provided, and offline Official catalog bundles, plus selected non-bundle names.
|
|
124
127
|
* A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
|
|
125
128
|
* @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional
|
|
126
129
|
* display metadata, activation selections, whether the installation offers the bundle, and removal availability.
|
|
130
|
+
* @throws {PluginManagerError} `PLUGIN_MANAGER_PROFILE_READ_FAILED` to in-process callers when a profile or
|
|
131
|
+
* installation manifest cannot be read; Remote callers receive `gateway/internal`.
|
|
127
132
|
*/
|
|
128
133
|
listBundles(): Promise<BundleInfo[]>;
|
|
129
134
|
/** The bundle inventory before update eligibility, which is derived from each listed bundle. */
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAG7C,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,OAAO,EAAE,mBAAmB,EAAsC,MAAM,kCAAkC,CAAA;AAE1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAG7C,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAExC,OAAO,EAAE,mBAAmB,EAAsC,MAAM,kCAAkC,CAAA;AAE1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAA;AA4BzE,OAAO,KAAK,EACV,YAAY,EAAE,UAAU,EAAiB,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,mBAAmB,EACnF,aAAa,EAAE,UAAU,EAAE,yBAAyB,EAAyB,sBAAsB,EAChI,gBAAgB,EAAE,oBAAoB,EAAE,kBAAkB,EAAmC,iBAAiB,EAC7F,mBAAmB,EAErC,MAAM,YAAY,CAAA;AACnB,mBAAmB,YAAY,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AACvF,OAAO,EAAE,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,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,CAAC,YAAY,CAAC;IAY5E;;;;OAIG;IAEH,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IAOvE;;;;;;;;;;;;;OAaG;IAEH,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,YAAY,CAAC;IAkJlF;;;;OAIG;IAEG,cAAc,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAIrF;;;;OAIG;IAEG,aAAa,CAAC,SAAS,EAAE,sBAAsB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAW1F;;;;OAIG;IAEH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAkCjD,sGAAsG;IACtG,OAAO,CAAC,YAAY;IAgCpB,wIAAwI;YAC1H,OAAO;IAoCrB,sGAAsG;YACxF,iBAAiB;IAS/B,yEAAyE;YAC3D,YAAY;YAOZ,YAAY;IAuB1B,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,SAAS;IAMjB;;;OAGG;YACW,eAAe;IAY7B;;;;OAIG;YACW,gBAAgB;IAK9B;;;;OAIG;YACW,MAAM;YAYN,MAAM;IA0DpB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,eAAe;IAQvB,+FAA+F;IAC/F,OAAO,CAAC,gBAAgB;IAcxB,OAAO,CAAC,SAAS;CASlB;AAED,eAAe,aAAa,CAAA"}
|
package/lib/types/index.js
CHANGED
|
@@ -55,11 +55,13 @@ import { dependencySpec, InvalidInstallSpecError, parseInstallSpec, pinnedGitOri
|
|
|
55
55
|
import { attributeFailure, normalizeRegistry, NPMMIRROR_REGISTRY, registryPlan } from "./registry.js";
|
|
56
56
|
import { flatten, writePluginEnabled } from "./patch.js";
|
|
57
57
|
import { incompatiblePlugin, ManagementFailure } from "./failure.js";
|
|
58
|
+
import { PluginManagerError, readProfileState } from "./error.js";
|
|
58
59
|
import { approveBuilds, recordPendingBuilds } from "./build-approval.js";
|
|
59
60
|
import { checkGitConnection, checkGithubConnection } from "./github-connection.js";
|
|
60
61
|
import { chooseGitTransport, sshGitSpec } from "./git-transport.js";
|
|
61
62
|
import { newerVersions, VERSION_FIELDS, VERSION_LIST_FIELDS, versionFacts } from "./versions.js";
|
|
62
63
|
export { classifyInstallFailure } from "./install-failure.js";
|
|
64
|
+
export { PluginManagerError } from "./error.js";
|
|
63
65
|
export { InvalidInstallSpecError, parseInstallSpec, pinnedGitOrigin } from "./install-spec.js";
|
|
64
66
|
/** The Fetch route serving images beside bundle detail documents. */
|
|
65
67
|
const DETAIL_FILE_PATH = '/api/plugin-manager/detail-file';
|
|
@@ -447,9 +449,11 @@ let PluginManager = (() => {
|
|
|
447
449
|
}
|
|
448
450
|
/** Read current plugins, including why a row cannot be changed through the profile patch.
|
|
449
451
|
* @returns Current runtime entries with persistent patch targets.
|
|
452
|
+
* @throws {PluginManagerError} `PLUGIN_MANAGER_PROFILE_READ_FAILED` to in-process callers when the profile patches
|
|
453
|
+
* cannot be read; Remote callers receive `gateway/internal`.
|
|
450
454
|
*/
|
|
451
455
|
async listPlugins() {
|
|
452
|
-
const rows = flatten(composeEntries([readProfilePatches('dsh', this.profile)]));
|
|
456
|
+
const rows = readProfileState(() => flatten(composeEntries([readProfilePatches('dsh', this.profile)])));
|
|
453
457
|
const snapshot = await readPluginInventory(this.ctx);
|
|
454
458
|
return snapshot.entries.map((entry) => {
|
|
455
459
|
const actual = [...this.ctx.loader.entries()].find(row => row.id === entry.entryId);
|
|
@@ -469,6 +473,8 @@ let PluginManager = (() => {
|
|
|
469
473
|
* A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
|
|
470
474
|
* @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional
|
|
471
475
|
* display metadata, activation selections, whether the installation offers the bundle, and removal availability.
|
|
476
|
+
* @throws {PluginManagerError} `PLUGIN_MANAGER_PROFILE_READ_FAILED` to in-process callers when a profile or
|
|
477
|
+
* installation manifest cannot be read; Remote callers receive `gateway/internal`.
|
|
472
478
|
*/
|
|
473
479
|
listBundles() {
|
|
474
480
|
return Promise.resolve(this.readBundles().map((bundle) => {
|
|
@@ -478,12 +484,14 @@ let PluginManager = (() => {
|
|
|
478
484
|
}
|
|
479
485
|
/** The bundle inventory before update eligibility, which is derived from each listed bundle. */
|
|
480
486
|
readBundles() {
|
|
481
|
-
const manifest =
|
|
482
|
-
|
|
487
|
+
const { manifest, exemptions, installation } = readProfileState(() => ({
|
|
488
|
+
manifest: readProfileManifest('dsh', this.profile.dir),
|
|
489
|
+
exemptions: readProfileVersionExemptions(this.profile.dir),
|
|
490
|
+
installation: JSON.parse(readFileSync(this.profile.installAnchor, 'utf8')),
|
|
491
|
+
}));
|
|
483
492
|
const selected = bundleSelection(manifest);
|
|
484
493
|
const recorded = manifest.dependencies ?? {};
|
|
485
494
|
const dependencies = Object.keys(recorded);
|
|
486
|
-
const installation = JSON.parse(readFileSync(this.profile.installAnchor, 'utf8'));
|
|
487
495
|
const catalog = new Map(OFFICIAL_ON_DEMAND_CATALOG.map(entry => [entry.packageName, entry]));
|
|
488
496
|
const names = [...new Set([...selected, ...dependencies, ...Object.keys(installation.dependencies ?? {}), ...catalog.keys()])];
|
|
489
497
|
const bundles = [];
|
|
@@ -1427,7 +1435,9 @@ let PluginManager = (() => {
|
|
|
1427
1435
|
let settled;
|
|
1428
1436
|
try {
|
|
1429
1437
|
settled = await withFileLock(join(this.profile.dir, 'package.json'), async () => {
|
|
1430
|
-
this.abort.signal.
|
|
1438
|
+
if (this.abort.signal.aborted) {
|
|
1439
|
+
throw new PluginManagerError('plugin-manager: the manager is disposed; retry after the Host reloads it', 'PLUGIN_MANAGER_UNAVAILABLE');
|
|
1440
|
+
}
|
|
1431
1441
|
const before = this.diskState();
|
|
1432
1442
|
const result = { ...request, changed: false,
|
|
1433
1443
|
...this.ownerContext.get('hmr') !== undefined ? { application: 'applied' } : { application: 'restart-required', restartReason: 'no-hmr' } };
|