@deepseek-ai/dsh-plugin-manager 0.2.0-rc.2 → 0.2.1-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.i18n.yaml +6 -6
- package/README.md +17 -6
- package/README.zh.md +17 -6
- package/lib/index.js +200 -28
- package/lib/typert.host.js +34 -20
- package/lib/typert.remote-client.js +26 -12
- package/lib/types/build-approval.d.ts +14 -2
- package/lib/types/build-approval.js +35 -5
- package/lib/types/index.d.ts +8 -6
- package/lib/types/index.js +91 -29
- package/lib/types/install-spec.d.ts +13 -0
- package/lib/types/install-spec.js +33 -1
- package/lib/types/official-install-target.d.ts +15 -0
- package/lib/types/official-install-target.js +54 -0
- package/lib/types/tools.js +1 -1
- package/lib/types/types.d.ts +20 -2
- package/package.json +35 -34
package/lib/typert.host.js
CHANGED
|
@@ -34,6 +34,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_0$sc
|
|
|
34
34
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$schema$value
|
|
35
35
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$schema$value ??= z.union([z.undefined(), z.object({
|
|
36
36
|
'enabled': z.boolean().optional(),
|
|
37
|
+
'saveExact': z.boolean().optional(),
|
|
37
38
|
'requestId': z.intersection(z.string(), z.unknown()).optional(),
|
|
38
39
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
39
40
|
'registry': z.union([z.literal(null), z.string()]).optional(),
|
|
@@ -71,6 +72,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
|
|
|
71
72
|
})).optional(),
|
|
72
73
|
}).optional(),
|
|
73
74
|
'bundle': z.string().optional(),
|
|
75
|
+
'version': z.string().optional(),
|
|
74
76
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
75
77
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
76
78
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -79,6 +81,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
|
|
|
79
81
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value
|
|
80
82
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value ??= z.array(z.object({
|
|
81
83
|
'name': z.string(),
|
|
84
|
+
'official': z.boolean(),
|
|
85
|
+
'availability': z.union([z.literal("profile"), z.literal("installation"), z.literal("missing")]),
|
|
86
|
+
'installTarget': z.object({
|
|
87
|
+
'spec': z.string(),
|
|
88
|
+
'version': z.string(),
|
|
89
|
+
}).optional(),
|
|
82
90
|
'version': z.string().optional(),
|
|
83
91
|
'meta': z.object({
|
|
84
92
|
'title': z.union([z.string(), z.intersection(z.object({
|
|
@@ -93,6 +101,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema =
|
|
|
93
101
|
'description': z.string().optional(),
|
|
94
102
|
'enabled': z.boolean(),
|
|
95
103
|
'installed': z.boolean(),
|
|
104
|
+
'source': z.string().optional(),
|
|
96
105
|
'optional': z.boolean(),
|
|
97
106
|
'removable': z.boolean(),
|
|
98
107
|
'readOnlyReason': z.union([z.literal("management-required"), z.literal("unaddressable")]).optional(),
|
|
@@ -207,6 +216,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
|
|
|
207
216
|
})).optional(),
|
|
208
217
|
}).optional(),
|
|
209
218
|
'bundle': z.string().optional(),
|
|
219
|
+
'version': z.string().optional(),
|
|
210
220
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
211
221
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
212
222
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -249,6 +259,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
|
|
|
249
259
|
})).optional(),
|
|
250
260
|
}).optional(),
|
|
251
261
|
'bundle': z.string().optional(),
|
|
262
|
+
'version': z.string().optional(),
|
|
252
263
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
253
264
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
254
265
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -291,6 +302,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
|
|
|
291
302
|
})).optional(),
|
|
292
303
|
}).optional(),
|
|
293
304
|
'bundle': z.string().optional(),
|
|
305
|
+
'version': z.string().optional(),
|
|
294
306
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
295
307
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
296
308
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -337,6 +349,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
|
|
|
337
349
|
})).optional(),
|
|
338
350
|
}).optional(),
|
|
339
351
|
'bundle': z.string().optional(),
|
|
352
|
+
'version': z.string().optional(),
|
|
340
353
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
341
354
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
342
355
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -377,6 +390,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
|
|
|
377
390
|
})).optional(),
|
|
378
391
|
}).optional(),
|
|
379
392
|
'bundle': z.string().optional(),
|
|
393
|
+
'version': z.string().optional(),
|
|
380
394
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
381
395
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
382
396
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -412,7 +426,7 @@ export const TYPERT = {
|
|
|
412
426
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginInstallCancellation',
|
|
413
427
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_cancelInstall_result$schema,
|
|
414
428
|
},
|
|
415
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
429
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":628,"column":9},
|
|
416
430
|
},
|
|
417
431
|
{
|
|
418
432
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/inspect',
|
|
@@ -449,7 +463,7 @@ export const TYPERT = {
|
|
|
449
463
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginSpecInspection',
|
|
450
464
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema,
|
|
451
465
|
},
|
|
452
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
466
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":374,"column":9},
|
|
453
467
|
},
|
|
454
468
|
{
|
|
455
469
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/installBundle',
|
|
@@ -485,7 +499,7 @@ export const TYPERT = {
|
|
|
485
499
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
486
500
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema,
|
|
487
501
|
},
|
|
488
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
502
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":497,"column":3},
|
|
489
503
|
},
|
|
490
504
|
{
|
|
491
505
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listBundles',
|
|
@@ -500,7 +514,7 @@ export const TYPERT = {
|
|
|
500
514
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listBundles:result',
|
|
501
515
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema,
|
|
502
516
|
},
|
|
503
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
517
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":282,"column":3},
|
|
504
518
|
},
|
|
505
519
|
{
|
|
506
520
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listPlugins',
|
|
@@ -515,7 +529,7 @@ export const TYPERT = {
|
|
|
515
529
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listPlugins:result',
|
|
516
530
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listPlugins_result$schema,
|
|
517
531
|
},
|
|
518
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
532
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":258,"column":9},
|
|
519
533
|
},
|
|
520
534
|
{
|
|
521
535
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listVersionExemptions',
|
|
@@ -530,7 +544,7 @@ export const TYPERT = {
|
|
|
530
544
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listVersionExemptions:result',
|
|
531
545
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listVersionExemptions_result$schema,
|
|
532
546
|
},
|
|
533
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
547
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":234,"column":3},
|
|
534
548
|
},
|
|
535
549
|
{
|
|
536
550
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/registries',
|
|
@@ -545,7 +559,7 @@ export const TYPERT = {
|
|
|
545
559
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginRegistries',
|
|
546
560
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_registries_result$schema,
|
|
547
561
|
},
|
|
548
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
562
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":358,"column":9},
|
|
549
563
|
},
|
|
550
564
|
{
|
|
551
565
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/removeBundle',
|
|
@@ -570,7 +584,7 @@ export const TYPERT = {
|
|
|
570
584
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
571
585
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema,
|
|
572
586
|
},
|
|
573
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
587
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":645,"column":3},
|
|
574
588
|
},
|
|
575
589
|
{
|
|
576
590
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setBundleEnabled',
|
|
@@ -605,7 +619,7 @@ export const TYPERT = {
|
|
|
605
619
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
606
620
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema,
|
|
607
621
|
},
|
|
608
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
622
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":476,"column":3},
|
|
609
623
|
},
|
|
610
624
|
{
|
|
611
625
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setPluginEnabled',
|
|
@@ -640,7 +654,7 @@ export const TYPERT = {
|
|
|
640
654
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
641
655
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema,
|
|
642
656
|
},
|
|
643
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
657
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":458,"column":3},
|
|
644
658
|
},
|
|
645
659
|
{
|
|
646
660
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setVersionExemption',
|
|
@@ -696,7 +710,7 @@ export const TYPERT = {
|
|
|
696
710
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
697
711
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$schema,
|
|
698
712
|
},
|
|
699
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
713
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":247,"column":3},
|
|
700
714
|
},
|
|
701
715
|
{
|
|
702
716
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/waitForInstall',
|
|
@@ -721,7 +735,7 @@ export const TYPERT = {
|
|
|
721
735
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/waitForInstall:result',
|
|
722
736
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema,
|
|
723
737
|
},
|
|
724
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
738
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":618,"column":9},
|
|
725
739
|
},
|
|
726
740
|
],
|
|
727
741
|
model: {
|
|
@@ -759,8 +773,8 @@ export const TYPERT = {
|
|
|
759
773
|
"kind": "method",
|
|
760
774
|
"name": "listBundles",
|
|
761
775
|
"signature": "@Remote listBundles(): Promise<BundleInfo[]>",
|
|
762
|
-
"summary": "Read
|
|
763
|
-
"jsDoc": "/** Read
|
|
776
|
+
"summary": "Read installed, installation-provided, and offline Official catalog bundles, plus selected non-bundle names.",
|
|
777
|
+
"jsDoc": "/** Read installed, installation-provided, and offline Official catalog bundles, plus selected non-bundle names.\n * A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.\n * @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional\n * display metadata, activation selections, whether the installation offers the bundle, and removal availability.\n */"
|
|
764
778
|
},
|
|
765
779
|
{
|
|
766
780
|
"kind": "method",
|
|
@@ -795,7 +809,7 @@ export const TYPERT = {
|
|
|
795
809
|
"name": "installBundle",
|
|
796
810
|
"signature": "@Remote installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>",
|
|
797
811
|
"summary": "Install a package using the same pnpm implementation as dsh plugin.",
|
|
798
|
-
"jsDoc": "/**\n * Install a package using the same pnpm implementation as dsh plugin. GitHub\n * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;\n * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. A run\n * that fails, is cancelled, or adds a package without a bundle patch restores\n * `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.\n * @param spec One package spec, including local paths relative to the invocation directory.\n * @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,\n * the pending build scripts to allow
|
|
812
|
+
"jsDoc": "/**\n * Install a package using the same pnpm implementation as dsh plugin. GitHub\n * repositories get a connection check bounded by githubConnectionTimeoutMs before pnpm starts;\n * only network failures or timeouts stop installation, while pnpm owns authentication and transport fallback. A run\n * that fails, is cancelled, or adds a package without a bundle patch restores\n * `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.\n * @param spec One package spec, including local paths relative to the invocation directory.\n * @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,\n * the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.\n * @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.\n */"
|
|
799
813
|
},
|
|
800
814
|
{
|
|
801
815
|
"kind": "method",
|
|
@@ -815,8 +829,8 @@ export const TYPERT = {
|
|
|
815
829
|
"kind": "method",
|
|
816
830
|
"name": "removeBundle",
|
|
817
831
|
"signature": "@Remote removeBundle(name: string): Promise<ChangeResult>",
|
|
818
|
-
"summary": "Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path.",
|
|
819
|
-
"jsDoc": "/** Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path.\n * @param name Installed dependency name.\n * @returns Removal diagnostics and the remaining profile state.\n */"
|
|
832
|
+
"summary": "Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path; a selected name no dependency holds is only deselected.",
|
|
833
|
+
"jsDoc": "/** Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path; a selected name no\n * dependency holds is only deselected.\n * @param name Installed dependency or selected bundle name.\n * @returns Removal diagnostics and the remaining profile state.\n */"
|
|
820
834
|
}
|
|
821
835
|
],
|
|
822
836
|
"types": [
|
|
@@ -826,7 +840,7 @@ export const TYPERT = {
|
|
|
826
840
|
},
|
|
827
841
|
{
|
|
828
842
|
"name": "BundleInfo",
|
|
829
|
-
"declaration": "export interface BundleInfo {\n name: string;\n version?: string;\n meta?: PluginLocalizedMeta;\n description?: string;\n enabled: boolean;\n installed: boolean;\n optional: boolean;\n removable: boolean;\n readOnlyReason?: ReadOnlyReason;\n error?: ManagementError;\n rows: BundleRowInfo[];\n overrides: string[];\n}"
|
|
843
|
+
"declaration": "export interface BundleInfo {\n name: string;\n official: boolean;\n availability: 'installation' | 'profile' | 'missing';\n installTarget?: { spec: string; version: string; };\n version?: string;\n meta?: PluginLocalizedMeta;\n description?: string;\n enabled: boolean;\n installed: boolean;\n source?: string;\n optional: boolean;\n removable: boolean;\n readOnlyReason?: ReadOnlyReason;\n error?: ManagementError;\n rows: BundleRowInfo[];\n overrides: string[];\n}"
|
|
830
844
|
},
|
|
831
845
|
{
|
|
832
846
|
"name": "BundleRowInfo",
|
|
@@ -834,7 +848,7 @@ export const TYPERT = {
|
|
|
834
848
|
},
|
|
835
849
|
{
|
|
836
850
|
"name": "ChangeResult",
|
|
837
|
-
"declaration": "export interface ChangeResult {\n changed: boolean;\n application: 'applied' | 'restart-required' | 'overridden' | 'failed' | 'cancelled';\n stage: 'install' | 'enable' | 'remove';\n target: string;\n enabled?: boolean;\n error?: ManagementError;\n warnings?: string[];\n packageResult?: PackageResult;\n bundle?: string;\n pendingBuilds?: string[];\n approvedBuilds?: string[];\n registries?: Registry[];\n failedAt?: 'registry' | 'spec-host';\n}"
|
|
851
|
+
"declaration": "export interface ChangeResult {\n changed: boolean;\n application: 'applied' | 'restart-required' | 'overridden' | 'failed' | 'cancelled';\n stage: 'install' | 'enable' | 'remove';\n target: string;\n enabled?: boolean;\n error?: ManagementError;\n warnings?: string[];\n packageResult?: PackageResult;\n bundle?: string;\n version?: string;\n pendingBuilds?: string[];\n approvedBuilds?: string[];\n registries?: Registry[];\n failedAt?: 'registry' | 'spec-host';\n}"
|
|
838
852
|
},
|
|
839
853
|
{
|
|
840
854
|
"name": "IncompatiblePlugin",
|
|
@@ -846,7 +860,7 @@ export const TYPERT = {
|
|
|
846
860
|
},
|
|
847
861
|
{
|
|
848
862
|
"name": "InstallBundleOptions",
|
|
849
|
-
"declaration": "export interface InstallBundleOptions {\n enabled?: boolean;\n requestId?: PluginInstallRequestId;\n approvedBuilds?: string[];\n registry?: Registry;\n}"
|
|
863
|
+
"declaration": "export interface InstallBundleOptions {\n enabled?: boolean;\n saveExact?: boolean;\n requestId?: PluginInstallRequestId;\n approvedBuilds?: string[];\n registry?: Registry;\n}"
|
|
850
864
|
},
|
|
851
865
|
{
|
|
852
866
|
"name": "InstallSpecKind",
|
|
@@ -34,6 +34,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_0$sc
|
|
|
34
34
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$schema$value
|
|
35
35
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$schema$value ??= z.union([z.undefined(), z.object({
|
|
36
36
|
'enabled': z.boolean().optional(),
|
|
37
|
+
'saveExact': z.boolean().optional(),
|
|
37
38
|
'requestId': z.intersection(z.string(), z.unknown()).optional(),
|
|
38
39
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
39
40
|
'registry': z.union([z.literal(null), z.string()]).optional(),
|
|
@@ -71,6 +72,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
|
|
|
71
72
|
})).optional(),
|
|
72
73
|
}).optional(),
|
|
73
74
|
'bundle': z.string().optional(),
|
|
75
|
+
'version': z.string().optional(),
|
|
74
76
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
75
77
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
76
78
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -79,6 +81,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
|
|
|
79
81
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value
|
|
80
82
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value ??= z.array(z.object({
|
|
81
83
|
'name': z.string(),
|
|
84
|
+
'official': z.boolean(),
|
|
85
|
+
'availability': z.union([z.literal("profile"), z.literal("installation"), z.literal("missing")]),
|
|
86
|
+
'installTarget': z.object({
|
|
87
|
+
'spec': z.string(),
|
|
88
|
+
'version': z.string(),
|
|
89
|
+
}).optional(),
|
|
82
90
|
'version': z.string().optional(),
|
|
83
91
|
'meta': z.object({
|
|
84
92
|
'title': z.union([z.string(), z.intersection(z.object({
|
|
@@ -93,6 +101,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema =
|
|
|
93
101
|
'description': z.string().optional(),
|
|
94
102
|
'enabled': z.boolean(),
|
|
95
103
|
'installed': z.boolean(),
|
|
104
|
+
'source': z.string().optional(),
|
|
96
105
|
'optional': z.boolean(),
|
|
97
106
|
'removable': z.boolean(),
|
|
98
107
|
'readOnlyReason': z.union([z.literal("management-required"), z.literal("unaddressable")]).optional(),
|
|
@@ -207,6 +216,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
|
|
|
207
216
|
})).optional(),
|
|
208
217
|
}).optional(),
|
|
209
218
|
'bundle': z.string().optional(),
|
|
219
|
+
'version': z.string().optional(),
|
|
210
220
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
211
221
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
212
222
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -249,6 +259,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
|
|
|
249
259
|
})).optional(),
|
|
250
260
|
}).optional(),
|
|
251
261
|
'bundle': z.string().optional(),
|
|
262
|
+
'version': z.string().optional(),
|
|
252
263
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
253
264
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
254
265
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -291,6 +302,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
|
|
|
291
302
|
})).optional(),
|
|
292
303
|
}).optional(),
|
|
293
304
|
'bundle': z.string().optional(),
|
|
305
|
+
'version': z.string().optional(),
|
|
294
306
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
295
307
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
296
308
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -337,6 +349,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$s
|
|
|
337
349
|
})).optional(),
|
|
338
350
|
}).optional(),
|
|
339
351
|
'bundle': z.string().optional(),
|
|
352
|
+
'version': z.string().optional(),
|
|
340
353
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
341
354
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
342
355
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -377,6 +390,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema
|
|
|
377
390
|
})).optional(),
|
|
378
391
|
}).optional(),
|
|
379
392
|
'bundle': z.string().optional(),
|
|
393
|
+
'version': z.string().optional(),
|
|
380
394
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
381
395
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
382
396
|
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
@@ -409,7 +423,7 @@ export const TYPERT_REMOTE = {
|
|
|
409
423
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginInstallCancellation',
|
|
410
424
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_cancelInstall_result$schema,
|
|
411
425
|
},
|
|
412
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
426
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":628,"column":9},
|
|
413
427
|
},
|
|
414
428
|
{
|
|
415
429
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/inspect',
|
|
@@ -446,7 +460,7 @@ export const TYPERT_REMOTE = {
|
|
|
446
460
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginSpecInspection',
|
|
447
461
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema,
|
|
448
462
|
},
|
|
449
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
463
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":374,"column":9},
|
|
450
464
|
},
|
|
451
465
|
{
|
|
452
466
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/installBundle',
|
|
@@ -482,7 +496,7 @@ export const TYPERT_REMOTE = {
|
|
|
482
496
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
483
497
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema,
|
|
484
498
|
},
|
|
485
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
499
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":497,"column":3},
|
|
486
500
|
},
|
|
487
501
|
{
|
|
488
502
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listBundles',
|
|
@@ -497,7 +511,7 @@ export const TYPERT_REMOTE = {
|
|
|
497
511
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listBundles:result',
|
|
498
512
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema,
|
|
499
513
|
},
|
|
500
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
514
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":282,"column":3},
|
|
501
515
|
},
|
|
502
516
|
{
|
|
503
517
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listPlugins',
|
|
@@ -512,7 +526,7 @@ export const TYPERT_REMOTE = {
|
|
|
512
526
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listPlugins:result',
|
|
513
527
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listPlugins_result$schema,
|
|
514
528
|
},
|
|
515
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
529
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":258,"column":9},
|
|
516
530
|
},
|
|
517
531
|
{
|
|
518
532
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listVersionExemptions',
|
|
@@ -527,7 +541,7 @@ export const TYPERT_REMOTE = {
|
|
|
527
541
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listVersionExemptions:result',
|
|
528
542
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listVersionExemptions_result$schema,
|
|
529
543
|
},
|
|
530
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
544
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":234,"column":3},
|
|
531
545
|
},
|
|
532
546
|
{
|
|
533
547
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/registries',
|
|
@@ -542,7 +556,7 @@ export const TYPERT_REMOTE = {
|
|
|
542
556
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginRegistries',
|
|
543
557
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_registries_result$schema,
|
|
544
558
|
},
|
|
545
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
559
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":358,"column":9},
|
|
546
560
|
},
|
|
547
561
|
{
|
|
548
562
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/removeBundle',
|
|
@@ -567,7 +581,7 @@ export const TYPERT_REMOTE = {
|
|
|
567
581
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
568
582
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema,
|
|
569
583
|
},
|
|
570
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
584
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":645,"column":3},
|
|
571
585
|
},
|
|
572
586
|
{
|
|
573
587
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setBundleEnabled',
|
|
@@ -602,7 +616,7 @@ export const TYPERT_REMOTE = {
|
|
|
602
616
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
603
617
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema,
|
|
604
618
|
},
|
|
605
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
619
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":476,"column":3},
|
|
606
620
|
},
|
|
607
621
|
{
|
|
608
622
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setPluginEnabled',
|
|
@@ -637,7 +651,7 @@ export const TYPERT_REMOTE = {
|
|
|
637
651
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
638
652
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema,
|
|
639
653
|
},
|
|
640
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
654
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":458,"column":3},
|
|
641
655
|
},
|
|
642
656
|
{
|
|
643
657
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setVersionExemption',
|
|
@@ -693,7 +707,7 @@ export const TYPERT_REMOTE = {
|
|
|
693
707
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
694
708
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setVersionExemption_result$schema,
|
|
695
709
|
},
|
|
696
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
710
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":247,"column":3},
|
|
697
711
|
},
|
|
698
712
|
{
|
|
699
713
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/waitForInstall',
|
|
@@ -718,7 +732,7 @@ export const TYPERT_REMOTE = {
|
|
|
718
732
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/waitForInstall:result',
|
|
719
733
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema,
|
|
720
734
|
},
|
|
721
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
735
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":618,"column":9},
|
|
722
736
|
},
|
|
723
737
|
],
|
|
724
738
|
}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Record the build scripts a failed run reported as ignored, then list every name awaiting a decision.
|
|
3
|
+
*
|
|
4
|
+
* pnpm writes those policy entries itself only when it can prompt, and the
|
|
5
|
+
* manager always runs it non-interactively, so the run's own report is the
|
|
6
|
+
* record that survives.
|
|
2
7
|
* @param dir Current profile directory.
|
|
8
|
+
* @param output Captured output of the failed run.
|
|
3
9
|
* @returns Exact package names awaiting a build decision; wildcard rules are excluded.
|
|
4
10
|
*/
|
|
5
|
-
export declare function
|
|
11
|
+
export declare function recordPendingBuilds(dir: string, output: string): Promise<string[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Read the package names a pnpm run reported as ignored build scripts.
|
|
14
|
+
* @param output Captured output of the run.
|
|
15
|
+
* @returns Exact names in report order; wildcard patterns are excluded.
|
|
16
|
+
*/
|
|
17
|
+
export declare function ignoredBuildNames(output: string): string[];
|
|
6
18
|
/** Persist approval without running scripts; the caller holds the profile manifest lock.
|
|
7
19
|
* @param dir Current profile directory.
|
|
8
20
|
* @param names Explicit package names from the pending build list.
|
|
@@ -4,6 +4,10 @@ import { join } from 'node:path';
|
|
|
4
4
|
import { isAlias, isMap, isNode, isScalar, parseDocument, visit } from 'yaml';
|
|
5
5
|
import { ManagementFailure } from "./failure.js";
|
|
6
6
|
import { writeFileAtomic } from '@deepseek-ai/dsh-atomic-write';
|
|
7
|
+
/** Value pnpm leaves for a build script that still needs a decision. */
|
|
8
|
+
const UNDECIDED_BUILD = 'set this to true or false';
|
|
9
|
+
/** Where a non-interactive run names the build scripts it skipped. */
|
|
10
|
+
const IGNORED_BUILDS = /\bIgnored build scripts: (.+)/;
|
|
7
11
|
async function readPolicy(dir) {
|
|
8
12
|
let text;
|
|
9
13
|
try {
|
|
@@ -27,16 +31,42 @@ async function readPolicy(dir) {
|
|
|
27
31
|
throw new Error('allowBuilds must not contain YAML anchors or aliases');
|
|
28
32
|
}
|
|
29
33
|
});
|
|
34
|
+
const keys = isMap(builds) ? builds.items.flatMap(({ key }) => isScalar(key) && typeof key.value === 'string' ? [key.value] : []) : [];
|
|
30
35
|
const pending = isMap(builds) ? builds.items.flatMap(({ key, value }) => isScalar(key) && typeof key.value === 'string' && !/[*?]/.test(key.value)
|
|
31
|
-
&& isScalar(value) && value.value ===
|
|
32
|
-
return { document, pending };
|
|
36
|
+
&& isScalar(value) && value.value === UNDECIDED_BUILD ? [key.value] : []) : [];
|
|
37
|
+
return { document, pending, keys };
|
|
33
38
|
}
|
|
34
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Record the build scripts a failed run reported as ignored, then list every name awaiting a decision.
|
|
41
|
+
*
|
|
42
|
+
* pnpm writes those policy entries itself only when it can prompt, and the
|
|
43
|
+
* manager always runs it non-interactively, so the run's own report is the
|
|
44
|
+
* record that survives.
|
|
35
45
|
* @param dir Current profile directory.
|
|
46
|
+
* @param output Captured output of the failed run.
|
|
36
47
|
* @returns Exact package names awaiting a build decision; wildcard rules are excluded.
|
|
37
48
|
*/
|
|
38
|
-
export async function
|
|
39
|
-
|
|
49
|
+
export async function recordPendingBuilds(dir, output) {
|
|
50
|
+
const { document, pending, keys } = await readPolicy(dir);
|
|
51
|
+
const known = new Set(keys);
|
|
52
|
+
const added = ignoredBuildNames(output).filter(name => !known.has(name));
|
|
53
|
+
if (added.length === 0)
|
|
54
|
+
return pending;
|
|
55
|
+
for (const name of added)
|
|
56
|
+
document.setIn(['allowBuilds', name], UNDECIDED_BUILD);
|
|
57
|
+
await writeFileAtomic(join(dir, 'pnpm-workspace.yaml'), String(document), { mode: 0o600 });
|
|
58
|
+
return [...pending, ...added];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Read the package names a pnpm run reported as ignored build scripts.
|
|
62
|
+
* @param output Captured output of the run.
|
|
63
|
+
* @returns Exact names in report order; wildcard patterns are excluded.
|
|
64
|
+
*/
|
|
65
|
+
export function ignoredBuildNames(output) {
|
|
66
|
+
const reported = IGNORED_BUILDS.exec(output)?.[1];
|
|
67
|
+
if (reported === undefined)
|
|
68
|
+
return [];
|
|
69
|
+
return reported.split(',').map(name => name.trim()).filter(name => name !== '' && !/[*?]/.test(name));
|
|
40
70
|
}
|
|
41
71
|
/** Persist approval without running scripts; the caller holds the profile manifest lock.
|
|
42
72
|
* @param dir Current profile directory.
|
package/lib/types/index.d.ts
CHANGED
|
@@ -75,10 +75,10 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
75
75
|
* @returns Current runtime entries with persistent patch targets.
|
|
76
76
|
*/
|
|
77
77
|
listPlugins(): Promise<PluginInfo[]>;
|
|
78
|
-
/** Read
|
|
78
|
+
/** Read installed, installation-provided, and offline Official catalog bundles, plus selected non-bundle names.
|
|
79
79
|
* A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
|
|
80
|
-
* @returns Package versions, manifest descriptions,
|
|
81
|
-
* whether the installation offers the bundle, and removal availability.
|
|
80
|
+
* @returns Package versions, manifest descriptions, the installable spec of profile dependencies, rows, optional
|
|
81
|
+
* display metadata, activation selections, whether the installation offers the bundle, and removal availability.
|
|
82
82
|
*/
|
|
83
83
|
listBundles(): Promise<BundleInfo[]>;
|
|
84
84
|
/** Read the registries this manager asks: the configured first one, its fallbacks in order, and what pnpm's own configuration names.
|
|
@@ -112,7 +112,7 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
112
112
|
* `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.
|
|
113
113
|
* @param spec One package spec, including local paths relative to the invocation directory.
|
|
114
114
|
* @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,
|
|
115
|
-
* the pending build scripts to allow
|
|
115
|
+
* the pending build scripts to allow, whether to save an exact dependency, and the registry asked first.
|
|
116
116
|
* @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.
|
|
117
117
|
*/
|
|
118
118
|
installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>;
|
|
@@ -128,8 +128,9 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
128
128
|
* applied, `not-running` for any other id.
|
|
129
129
|
*/
|
|
130
130
|
cancelInstall(requestId: PluginInstallRequestId): Promise<PluginInstallCancellation>;
|
|
131
|
-
/** Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path
|
|
132
|
-
*
|
|
131
|
+
/** Unload and remove a profile-owned bundle dependency through dsh plugin's pnpm path; a selected name no
|
|
132
|
+
* dependency holds is only deselected.
|
|
133
|
+
* @param name Installed dependency or selected bundle name.
|
|
133
134
|
* @returns Removal diagnostics and the remaining profile state.
|
|
134
135
|
*/
|
|
135
136
|
removeBundle(name: string): Promise<ChangeResult>;
|
|
@@ -145,6 +146,7 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
145
146
|
private bundleRows;
|
|
146
147
|
private protectsManager;
|
|
147
148
|
private configure;
|
|
149
|
+
private refreshPackages;
|
|
148
150
|
private reload;
|
|
149
151
|
private change;
|
|
150
152
|
private diskState;
|