@deepseek-ai/dsh-plugin-manager 0.1.6-alpha.2 → 0.1.7-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 +2 -2
- package/README.md +14 -2
- package/README.zh.md +14 -2
- package/lib/index.js +373 -74
- package/lib/typert.host.js +207 -33
- package/lib/typert.remote-client.d.ts +7 -3
- package/lib/typert.remote-client.js +159 -19
- package/lib/types/index.d.ts +30 -8
- package/lib/types/index.js +210 -70
- package/lib/types/install-failure.js +1 -1
- package/lib/types/install-spec.d.ts +7 -1
- package/lib/types/install-spec.js +16 -2
- package/lib/types/operations.d.ts +27 -3
- package/lib/types/operations.js +35 -5
- package/lib/types/registry.d.ts +49 -0
- package/lib/types/registry.js +97 -0
- package/lib/types/tools.js +5 -1
- package/lib/types/types.d.ts +46 -4
- package/package.json +37 -32
|
@@ -9,6 +9,10 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_cancelInstall_result$schema
|
|
|
9
9
|
}))
|
|
10
10
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_0$schema$value
|
|
11
11
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_0$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_0$schema$value ??= z.string())
|
|
12
|
+
let _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_1$schema$value
|
|
13
|
+
const _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_1$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_1$schema$value ??= z.union([z.undefined(), z.object({
|
|
14
|
+
'registry': z.union([z.literal(null), z.string()]).readonly().optional(),
|
|
15
|
+
})]))
|
|
12
16
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema$value
|
|
13
17
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema$value ??= z.union([z.object({
|
|
14
18
|
'status': z.literal("accepted").readonly(),
|
|
@@ -17,10 +21,13 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema = () =
|
|
|
17
21
|
'version': z.string().readonly().optional(),
|
|
18
22
|
'description': z.string().readonly().optional(),
|
|
19
23
|
'bundle': z.union([z.literal(null), z.literal(false), z.literal(true)]).readonly(),
|
|
24
|
+
'registry': z.union([z.literal(null), z.string()]).readonly(),
|
|
25
|
+
'host': z.string().readonly().optional(),
|
|
20
26
|
}), z.object({
|
|
21
27
|
'status': z.literal("refused").readonly(),
|
|
22
|
-
'problem': z.union([z.literal("
|
|
28
|
+
'problem': z.union([z.literal("network"), z.literal("unknown"), z.literal("invalid-spec"), z.literal("already-installed"), z.literal("not-found"), z.literal("not-a-package"), z.literal("not-a-bundle")]).readonly(),
|
|
23
29
|
'reason': z.string().readonly(),
|
|
30
|
+
'registries': z.array(z.union([z.literal(null), z.string()])).readonly().optional(),
|
|
24
31
|
})]))
|
|
25
32
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_0$schema$value
|
|
26
33
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_0$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_0$schema$value ??= z.string())
|
|
@@ -29,11 +36,12 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_parameter_1$sc
|
|
|
29
36
|
'enabled': z.boolean().optional(),
|
|
30
37
|
'requestId': z.intersection(z.string(), z.unknown()).optional(),
|
|
31
38
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
39
|
+
'registry': z.union([z.literal(null), z.string()]).optional(),
|
|
32
40
|
})]))
|
|
33
41
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema$value
|
|
34
42
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema$value ??= z.object({
|
|
35
43
|
'changed': z.boolean(),
|
|
36
|
-
'application': z.union([z.literal("
|
|
44
|
+
'application': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("applied"), z.literal("restart-required"), z.literal("overridden")]),
|
|
37
45
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]),
|
|
38
46
|
'target': z.string(),
|
|
39
47
|
'enabled': z.boolean().optional(),
|
|
@@ -47,16 +55,28 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema
|
|
|
47
55
|
'output': z.string(),
|
|
48
56
|
'truncated': z.boolean(),
|
|
49
57
|
'logPath': z.string(),
|
|
50
|
-
'kind': z.union([z.literal("
|
|
58
|
+
'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional(),
|
|
51
59
|
}).optional(),
|
|
52
60
|
'bundle': z.string().optional(),
|
|
53
61
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
54
62
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
63
|
+
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
64
|
+
'failedAt': z.union([z.literal("registry"), z.literal("spec-host")]).optional(),
|
|
55
65
|
}))
|
|
56
66
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value
|
|
57
67
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema$value ??= z.array(z.object({
|
|
58
68
|
'name': z.string(),
|
|
59
69
|
'version': z.string().optional(),
|
|
70
|
+
'meta': z.object({
|
|
71
|
+
'title': z.union([z.string(), z.intersection(z.object({
|
|
72
|
+
'en': z.string().readonly(),
|
|
73
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
74
|
+
'description': z.union([z.string(), z.intersection(z.object({
|
|
75
|
+
'en': z.string().readonly(),
|
|
76
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
77
|
+
'icon': z.string().readonly().optional(),
|
|
78
|
+
'error': z.string().readonly().optional(),
|
|
79
|
+
}).optional(),
|
|
60
80
|
'description': z.string().optional(),
|
|
61
81
|
'enabled': z.boolean(),
|
|
62
82
|
'installed': z.boolean(),
|
|
@@ -70,6 +90,16 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema =
|
|
|
70
90
|
'rows': z.array(z.object({
|
|
71
91
|
'rowId': z.string(),
|
|
72
92
|
'moduleName': z.string(),
|
|
93
|
+
'meta': z.object({
|
|
94
|
+
'title': z.union([z.string(), z.intersection(z.object({
|
|
95
|
+
'en': z.string().readonly(),
|
|
96
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
97
|
+
'description': z.union([z.string(), z.intersection(z.object({
|
|
98
|
+
'en': z.string().readonly(),
|
|
99
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
100
|
+
'icon': z.string().readonly().optional(),
|
|
101
|
+
'error': z.string().readonly().optional(),
|
|
102
|
+
}).optional(),
|
|
73
103
|
'entryId': z.intersection(z.string(), z.unknown()).optional(),
|
|
74
104
|
})),
|
|
75
105
|
'overrides': z.array(z.string()),
|
|
@@ -78,26 +108,52 @@ let _deepseek_ai_dsh_plugin_manager_pluginManager_listPlugins_result$schema$valu
|
|
|
78
108
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_listPlugins_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_listPlugins_result$schema$value ??= z.array(z.union([z.intersection(z.object({
|
|
79
109
|
'entryId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
80
110
|
'moduleName': z.string().readonly(),
|
|
111
|
+
'meta': z.object({
|
|
112
|
+
'title': z.union([z.string(), z.intersection(z.object({
|
|
113
|
+
'en': z.string().readonly(),
|
|
114
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
115
|
+
'description': z.union([z.string(), z.intersection(z.object({
|
|
116
|
+
'en': z.string().readonly(),
|
|
117
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
118
|
+
'icon': z.string().readonly().optional(),
|
|
119
|
+
'error': z.string().readonly().optional(),
|
|
120
|
+
}).readonly().optional(),
|
|
81
121
|
'enabled': z.boolean().readonly(),
|
|
82
|
-
'fiberPhase': z.union([z.literal(null), z.literal("
|
|
122
|
+
'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("pending"), z.literal("active"), z.literal("loading"), z.literal("unloading")]).readonly(),
|
|
83
123
|
}), z.object({
|
|
84
124
|
'patchId': z.string(),
|
|
85
125
|
'readOnlyReason': z.never().optional(),
|
|
86
126
|
})), z.intersection(z.object({
|
|
87
127
|
'entryId': z.intersection(z.string(), z.unknown()).readonly(),
|
|
88
128
|
'moduleName': z.string().readonly(),
|
|
129
|
+
'meta': z.object({
|
|
130
|
+
'title': z.union([z.string(), z.intersection(z.object({
|
|
131
|
+
'en': z.string().readonly(),
|
|
132
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
133
|
+
'description': z.union([z.string(), z.intersection(z.object({
|
|
134
|
+
'en': z.string().readonly(),
|
|
135
|
+
}), z.record(z.string(), z.string()).readonly())]).readonly().optional(),
|
|
136
|
+
'icon': z.string().readonly().optional(),
|
|
137
|
+
'error': z.string().readonly().optional(),
|
|
138
|
+
}).readonly().optional(),
|
|
89
139
|
'enabled': z.boolean().readonly(),
|
|
90
|
-
'fiberPhase': z.union([z.literal(null), z.literal("
|
|
140
|
+
'fiberPhase': z.union([z.literal(null), z.literal("failed"), z.literal("pending"), z.literal("active"), z.literal("loading"), z.literal("unloading")]).readonly(),
|
|
91
141
|
}), z.object({
|
|
92
142
|
'patchId': z.never().optional(),
|
|
93
143
|
'readOnlyReason': z.union([z.literal("management-required"), z.literal("unaddressable")]),
|
|
94
144
|
}))])))
|
|
145
|
+
let _deepseek_ai_dsh_plugin_manager_pluginManager_registries_result$schema$value
|
|
146
|
+
const _deepseek_ai_dsh_plugin_manager_pluginManager_registries_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_registries_result$schema$value ??= z.object({
|
|
147
|
+
'registry': z.union([z.literal(null), z.string()]).readonly(),
|
|
148
|
+
'fallbackRegistries': z.array(z.string()).readonly(),
|
|
149
|
+
'resolved': z.union([z.literal(null), z.string()]).readonly(),
|
|
150
|
+
}))
|
|
95
151
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_parameter_0$schema$value
|
|
96
152
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_parameter_0$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_parameter_0$schema$value ??= z.string())
|
|
97
153
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema$value
|
|
98
154
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema$value ??= z.object({
|
|
99
155
|
'changed': z.boolean(),
|
|
100
|
-
'application': z.union([z.literal("
|
|
156
|
+
'application': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("applied"), z.literal("restart-required"), z.literal("overridden")]),
|
|
101
157
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]),
|
|
102
158
|
'target': z.string(),
|
|
103
159
|
'enabled': z.boolean().optional(),
|
|
@@ -111,11 +167,13 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema =
|
|
|
111
167
|
'output': z.string(),
|
|
112
168
|
'truncated': z.boolean(),
|
|
113
169
|
'logPath': z.string(),
|
|
114
|
-
'kind': z.union([z.literal("
|
|
170
|
+
'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional(),
|
|
115
171
|
}).optional(),
|
|
116
172
|
'bundle': z.string().optional(),
|
|
117
173
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
118
174
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
175
|
+
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
176
|
+
'failedAt': z.union([z.literal("registry"), z.literal("spec-host")]).optional(),
|
|
119
177
|
}))
|
|
120
178
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_parameter_0$schema$value
|
|
121
179
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_parameter_0$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_parameter_0$schema$value ??= z.string())
|
|
@@ -124,7 +182,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_parameter_1
|
|
|
124
182
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema$value
|
|
125
183
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema$value ??= z.object({
|
|
126
184
|
'changed': z.boolean(),
|
|
127
|
-
'application': z.union([z.literal("
|
|
185
|
+
'application': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("applied"), z.literal("restart-required"), z.literal("overridden")]),
|
|
128
186
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]),
|
|
129
187
|
'target': z.string(),
|
|
130
188
|
'enabled': z.boolean().optional(),
|
|
@@ -138,11 +196,13 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$sche
|
|
|
138
196
|
'output': z.string(),
|
|
139
197
|
'truncated': z.boolean(),
|
|
140
198
|
'logPath': z.string(),
|
|
141
|
-
'kind': z.union([z.literal("
|
|
199
|
+
'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional(),
|
|
142
200
|
}).optional(),
|
|
143
201
|
'bundle': z.string().optional(),
|
|
144
202
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
145
203
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
204
|
+
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
205
|
+
'failedAt': z.union([z.literal("registry"), z.literal("spec-host")]).optional(),
|
|
146
206
|
}))
|
|
147
207
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_parameter_0$schema$value
|
|
148
208
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_parameter_0$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
@@ -151,7 +211,7 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_parameter_1
|
|
|
151
211
|
let _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema$value
|
|
152
212
|
const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema$value ??= z.object({
|
|
153
213
|
'changed': z.boolean(),
|
|
154
|
-
'application': z.union([z.literal("
|
|
214
|
+
'application': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("applied"), z.literal("restart-required"), z.literal("overridden")]),
|
|
155
215
|
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]),
|
|
156
216
|
'target': z.string(),
|
|
157
217
|
'enabled': z.boolean().optional(),
|
|
@@ -165,12 +225,41 @@ const _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$sche
|
|
|
165
225
|
'output': z.string(),
|
|
166
226
|
'truncated': z.boolean(),
|
|
167
227
|
'logPath': z.string(),
|
|
168
|
-
'kind': z.union([z.literal("
|
|
228
|
+
'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional(),
|
|
169
229
|
}).optional(),
|
|
170
230
|
'bundle': z.string().optional(),
|
|
171
231
|
'pendingBuilds': z.array(z.string()).optional(),
|
|
172
232
|
'approvedBuilds': z.array(z.string()).optional(),
|
|
233
|
+
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
234
|
+
'failedAt': z.union([z.literal("registry"), z.literal("spec-host")]).optional(),
|
|
173
235
|
}))
|
|
236
|
+
let _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_parameter_0$schema$value
|
|
237
|
+
const _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_parameter_0$schema = () => (_deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_parameter_0$schema$value ??= z.intersection(z.string(), z.unknown()))
|
|
238
|
+
let _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema$value
|
|
239
|
+
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({
|
|
240
|
+
'changed': z.boolean(),
|
|
241
|
+
'application': z.union([z.literal("cancelled"), z.literal("failed"), z.literal("applied"), z.literal("restart-required"), z.literal("overridden")]),
|
|
242
|
+
'stage': z.union([z.literal("remove"), z.literal("install"), z.literal("enable")]),
|
|
243
|
+
'target': z.string(),
|
|
244
|
+
'enabled': z.boolean().optional(),
|
|
245
|
+
'error': z.object({
|
|
246
|
+
'code': z.union([z.literal("management-required"), z.literal("unaddressable"), z.literal("unknown-plugin"), z.literal("invalid-spec"), z.literal("ambiguous-install"), z.literal("not-bundle"), z.literal("not-removable"), z.literal("stop-profile"), z.literal("bundle-in-use"), z.literal("stale-approval"), z.literal("operation-error")]),
|
|
247
|
+
'diagnostic': z.string().optional(),
|
|
248
|
+
}).optional(),
|
|
249
|
+
'warnings': z.array(z.string()).optional(),
|
|
250
|
+
'packageResult': z.object({
|
|
251
|
+
'exitCode': z.number(),
|
|
252
|
+
'output': z.string(),
|
|
253
|
+
'truncated': z.boolean(),
|
|
254
|
+
'logPath': z.string(),
|
|
255
|
+
'kind': z.union([z.literal("network"), z.literal("unknown"), z.literal("timeout"), z.literal("integrity"), z.literal("not-found"), z.literal("pnpm-missing"), z.literal("no-matching-version"), z.literal("disk-full"), z.literal("permission"), z.literal("build-blocked")]).optional(),
|
|
256
|
+
}).optional(),
|
|
257
|
+
'bundle': z.string().optional(),
|
|
258
|
+
'pendingBuilds': z.array(z.string()).optional(),
|
|
259
|
+
'approvedBuilds': z.array(z.string()).optional(),
|
|
260
|
+
'registries': z.array(z.union([z.literal(null), z.string()])).optional(),
|
|
261
|
+
'failedAt': z.union([z.literal("registry"), z.literal("spec-host")]).optional(),
|
|
262
|
+
})]))
|
|
174
263
|
|
|
175
264
|
export const TYPERT_REMOTE = {
|
|
176
265
|
package: '@deepseek-ai/dsh-plugin-manager',
|
|
@@ -198,7 +287,7 @@ export const TYPERT_REMOTE = {
|
|
|
198
287
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginInstallCancellation',
|
|
199
288
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_cancelInstall_result$schema,
|
|
200
289
|
},
|
|
201
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
290
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":516,"column":9},
|
|
202
291
|
},
|
|
203
292
|
{
|
|
204
293
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/inspect',
|
|
@@ -217,6 +306,17 @@ export const TYPERT_REMOTE = {
|
|
|
217
306
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_0$schema,
|
|
218
307
|
},
|
|
219
308
|
},
|
|
309
|
+
{
|
|
310
|
+
name: 'options',
|
|
311
|
+
wire: 'options',
|
|
312
|
+
source: 'json',
|
|
313
|
+
acceptsUndefined: true,
|
|
314
|
+
codec: {
|
|
315
|
+
mode: 'strict',
|
|
316
|
+
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#InspectOptions',
|
|
317
|
+
create: _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_parameter_1$schema,
|
|
318
|
+
},
|
|
319
|
+
},
|
|
220
320
|
],
|
|
221
321
|
cancellation: { parameter: 'signal' },
|
|
222
322
|
result: {
|
|
@@ -224,7 +324,7 @@ export const TYPERT_REMOTE = {
|
|
|
224
324
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginSpecInspection',
|
|
225
325
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_inspect_result$schema,
|
|
226
326
|
},
|
|
227
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
327
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":299,"column":9},
|
|
228
328
|
},
|
|
229
329
|
{
|
|
230
330
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/installBundle',
|
|
@@ -260,7 +360,7 @@ export const TYPERT_REMOTE = {
|
|
|
260
360
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
261
361
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_installBundle_result$schema,
|
|
262
362
|
},
|
|
263
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
363
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":418,"column":3},
|
|
264
364
|
},
|
|
265
365
|
{
|
|
266
366
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listBundles',
|
|
@@ -275,7 +375,7 @@ export const TYPERT_REMOTE = {
|
|
|
275
375
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listBundles:result',
|
|
276
376
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listBundles_result$schema,
|
|
277
377
|
},
|
|
278
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
378
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":241,"column":3},
|
|
279
379
|
},
|
|
280
380
|
{
|
|
281
381
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/listPlugins',
|
|
@@ -290,7 +390,22 @@ export const TYPERT_REMOTE = {
|
|
|
290
390
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/listPlugins:result',
|
|
291
391
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_listPlugins_result$schema,
|
|
292
392
|
},
|
|
293
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
393
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":217,"column":9},
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/registries',
|
|
397
|
+
service: 'pluginManager',
|
|
398
|
+
namespace: 'pluginManager',
|
|
399
|
+
method: 'registries',
|
|
400
|
+
invocation: { kind: 'direct' },
|
|
401
|
+
parameters: [
|
|
402
|
+
],
|
|
403
|
+
result: {
|
|
404
|
+
mode: 'strict',
|
|
405
|
+
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginRegistries',
|
|
406
|
+
create: _deepseek_ai_dsh_plugin_manager_pluginManager_registries_result$schema,
|
|
407
|
+
},
|
|
408
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":283,"column":9},
|
|
294
409
|
},
|
|
295
410
|
{
|
|
296
411
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/removeBundle',
|
|
@@ -315,7 +430,7 @@ export const TYPERT_REMOTE = {
|
|
|
315
430
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
316
431
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_removeBundle_result$schema,
|
|
317
432
|
},
|
|
318
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
433
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":532,"column":3},
|
|
319
434
|
},
|
|
320
435
|
{
|
|
321
436
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setBundleEnabled',
|
|
@@ -350,7 +465,7 @@ export const TYPERT_REMOTE = {
|
|
|
350
465
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
351
466
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setBundleEnabled_result$schema,
|
|
352
467
|
},
|
|
353
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
468
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":401,"column":3},
|
|
354
469
|
},
|
|
355
470
|
{
|
|
356
471
|
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/setPluginEnabled',
|
|
@@ -385,7 +500,32 @@ export const TYPERT_REMOTE = {
|
|
|
385
500
|
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#ChangeResult',
|
|
386
501
|
create: _deepseek_ai_dsh_plugin_manager_pluginManager_setPluginEnabled_result$schema,
|
|
387
502
|
},
|
|
388
|
-
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":
|
|
503
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":383,"column":3},
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
id: '@deepseek-ai/dsh-plugin-manager#pluginManager/waitForInstall',
|
|
507
|
+
service: 'pluginManager',
|
|
508
|
+
namespace: 'pluginManager',
|
|
509
|
+
method: 'waitForInstall',
|
|
510
|
+
invocation: { kind: 'direct' },
|
|
511
|
+
parameters: [
|
|
512
|
+
{
|
|
513
|
+
name: 'requestId',
|
|
514
|
+
wire: 'requestId',
|
|
515
|
+
source: 'json',
|
|
516
|
+
codec: {
|
|
517
|
+
mode: 'strict',
|
|
518
|
+
typeSymbol: '@deepseek-ai/dsh-plugin-manager/types#PluginInstallRequestId',
|
|
519
|
+
create: _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_parameter_0$schema,
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
],
|
|
523
|
+
result: {
|
|
524
|
+
mode: 'strict',
|
|
525
|
+
typeSymbol: '@deepseek-ai/dsh-plugin-manager#pluginManager/waitForInstall:result',
|
|
526
|
+
create: _deepseek_ai_dsh_plugin_manager_pluginManager_waitForInstall_result$schema,
|
|
527
|
+
},
|
|
528
|
+
sourceLocation: {"file":"packages/boot/plugin-manager/src/index.ts","line":506,"column":9},
|
|
389
529
|
},
|
|
390
530
|
],
|
|
391
531
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Context } from '@deepseek-ai/cordis';
|
|
2
2
|
import z from '@deepseek-ai/schemastery';
|
|
3
3
|
import { TypertRemoteService } from '@deepseek-ai/dsh-typert-protocol';
|
|
4
|
-
import type { BundleInfo, ChangeResult, InstallBundleOptions, PluginEntryId, PluginInfo, PluginInstallCancellation, PluginInstallRequestId, PluginSpecInspection } from './types.ts';
|
|
4
|
+
import type { BundleInfo, ChangeResult, InspectOptions, InstallBundleOptions, PluginEntryId, PluginInfo, PluginInstallCancellation, PluginInstallRequestId, PluginRegistries, PluginSpecInspection } from './types.ts';
|
|
5
5
|
export type * from './types.ts';
|
|
6
6
|
export { classifyInstallFailure, type InstallFailureFacts } from './install-failure.ts';
|
|
7
7
|
export { InvalidInstallSpecError, parseInstallSpec, type ParsedInstallSpec } from './install-spec.ts';
|
|
8
|
-
/** The pnpm executable and the limits for package diagnostics and registry lookups. */
|
|
8
|
+
/** The pnpm executable, the registries asked, and the limits for package diagnostics and registry lookups. */
|
|
9
9
|
export interface Config {
|
|
10
10
|
/** The pnpm executable name or path; resolved through `PATH` like the `dsh plugin` command. */
|
|
11
11
|
pnpmCommand?: string;
|
|
@@ -15,6 +15,14 @@ export interface Config {
|
|
|
15
15
|
lockWaitMs?: number;
|
|
16
16
|
/** Bound on one registry lookup an inspection runs, in milliseconds. */
|
|
17
17
|
inspectTimeoutMs?: number;
|
|
18
|
+
/** The registry lookups and installations ask first, as an http(s) URL; absent, the one pnpm's own configuration names. */
|
|
19
|
+
registry?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Registries asked in turn, as http(s) URLs, while the one before is unreachable or holds no copy of the package.
|
|
22
|
+
* A registry outside this set and `registry` is asked alone, and so is the one pnpm's own configuration names
|
|
23
|
+
* unless that is npm's own registry or one of these.
|
|
24
|
+
*/
|
|
25
|
+
fallbackRegistries?: string[];
|
|
18
26
|
}
|
|
19
27
|
declare module '@deepseek-ai/cordis' {
|
|
20
28
|
interface Context {
|
|
@@ -26,6 +34,8 @@ declare module '@deepseek-ai/cordis' {
|
|
|
26
34
|
export declare class PluginManager extends TypertRemoteService {
|
|
27
35
|
static inject: string[];
|
|
28
36
|
static Config: z<Config>;
|
|
37
|
+
/** Management bundles remain protected if their files become unreadable. */
|
|
38
|
+
private readonly managementBundles;
|
|
29
39
|
private readonly ownerEntryId;
|
|
30
40
|
private readonly packageOperations;
|
|
31
41
|
private readonly profile;
|
|
@@ -33,6 +43,7 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
33
43
|
private readonly lockWaitMs;
|
|
34
44
|
private readonly inspectTimeoutMs;
|
|
35
45
|
private readonly pnpmCommand;
|
|
46
|
+
private readonly configuredRegistries;
|
|
36
47
|
private readonly ownerContext;
|
|
37
48
|
private readonly abort;
|
|
38
49
|
/** Installations by request id, from their call until it settles. */
|
|
@@ -44,16 +55,21 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
44
55
|
listPlugins(): Promise<PluginInfo[]>;
|
|
45
56
|
/** Read the profile's installed bundles, the bundles this dsh installation supplies, and the selected names that are not bundles.
|
|
46
57
|
* A dependency without a bundle patch is listed, as a `not-bundle` problem, only while it is selected.
|
|
47
|
-
* @returns Package versions,
|
|
48
|
-
* bundle, and removal availability.
|
|
58
|
+
* @returns Package versions, manifest descriptions, rows, optional display metadata, activation selections,
|
|
59
|
+
* whether the installation offers the bundle, and removal availability.
|
|
49
60
|
*/
|
|
50
61
|
listBundles(): Promise<BundleInfo[]>;
|
|
62
|
+
/** Read the registries this manager asks: the configured first one, its fallbacks in order, and what pnpm's own configuration names.
|
|
63
|
+
* @returns The registries in pnpm's comparison form; null is the one pnpm's own configuration names, `resolved` as pnpm reads it now.
|
|
64
|
+
*/
|
|
65
|
+
registries(): Promise<PluginRegistries>;
|
|
51
66
|
/** Read what a spec names before installing it.
|
|
52
67
|
* @param spec One package spec: a registry name, an absolute path, a git address, or a tarball.
|
|
68
|
+
* @param options The registry asked first.
|
|
53
69
|
* @param signal Ends a registry lookup early.
|
|
54
70
|
* @returns The package the spec names, or why it is refused.
|
|
55
71
|
*/
|
|
56
|
-
inspect(spec: string, signal?: AbortSignal): Promise<PluginSpecInspection>;
|
|
72
|
+
inspect(spec: string, options?: InspectOptions, signal?: AbortSignal): Promise<PluginSpecInspection>;
|
|
57
73
|
/** Persist a plugin entry's desired enablement and apply it on live profiles.
|
|
58
74
|
* @param id Loader entry identity returned by listPlugins.
|
|
59
75
|
* @param enabled Whether the plugin should run.
|
|
@@ -71,11 +87,17 @@ export declare class PluginManager extends TypertRemoteService {
|
|
|
71
87
|
* that fails, is cancelled, or adds a package without a bundle patch restores
|
|
72
88
|
* `package.json` and `pnpm-lock.yaml` as they were; downloaded files can stay.
|
|
73
89
|
* @param spec One package spec, including local paths relative to the invocation directory.
|
|
74
|
-
* @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,
|
|
75
|
-
* the pending build scripts to allow for this profile before pnpm runs.
|
|
76
|
-
* @returns Package-manager diagnostics and observed activation outcome.
|
|
90
|
+
* @param options Whether to activate the installed bundle (defaults to true), the request id a cancellation names,
|
|
91
|
+
* the pending build scripts to allow for this profile before pnpm runs, and the registry asked first.
|
|
92
|
+
* @returns Package-manager diagnostics, the registries asked, and the observed activation outcome.
|
|
77
93
|
*/
|
|
78
94
|
installBundle(spec: string, options?: InstallBundleOptions): Promise<ChangeResult>;
|
|
95
|
+
/** Recover the result of an active installation without cancelling it.
|
|
96
|
+
* @param requestId The id supplied when installation started.
|
|
97
|
+
* @returns The installation's outcome after it settles, or null if no active request has that id.
|
|
98
|
+
* Completed results are not retained; null establishes neither success nor cancellation.
|
|
99
|
+
*/
|
|
100
|
+
waitForInstall(requestId: PluginInstallRequestId): Promise<ChangeResult | null>;
|
|
79
101
|
/** Stop an installation this manager owns and wait until its files are back.
|
|
80
102
|
* @param requestId The id the installation was started with.
|
|
81
103
|
* @returns `cancelled` once pnpm exited and the files are restored, `too-late` once the bundle is being
|