mano-coding 0.1.28 → 0.1.30
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/dist/bin.js +11587 -3504
- package/dist/schemas/manifest.schema.json +14 -2
- package/dist/schemas/project-lock.schema.json +53 -262
- package/package.json +1 -5
- package/schemas/manifest.schema.json +14 -2
- package/schemas/project-lock.schema.json +53 -262
- package/dist/index.d.ts +0 -175
- package/dist/index.js +0 -32
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "project-lock.schema.json",
|
|
4
|
-
"title": "Mano Coding Project Lock",
|
|
4
|
+
"title": "Mano Coding Project Lock (AD-10)",
|
|
5
5
|
"type": "object",
|
|
6
|
-
"required": ["
|
|
6
|
+
"required": ["apiVersion", "kind", "desired", "resolved", "resources"],
|
|
7
7
|
"properties": {
|
|
8
|
+
"apiVersion": { "type": "string", "pattern": "^mano-coding/v[0-9]+$" },
|
|
8
9
|
"kind": { "const": "ProjectLock" },
|
|
9
10
|
"generatedBy": { "$ref": "#/$defs/generatedBy" },
|
|
11
|
+
"createdWith": { "$ref": "#/$defs/createdWith" },
|
|
10
12
|
"desired": { "$ref": "#/$defs/desired" },
|
|
11
13
|
"resolved": { "$ref": "#/$defs/resolved" },
|
|
12
14
|
"resources": {
|
|
@@ -50,42 +52,31 @@
|
|
|
50
52
|
"type": "string",
|
|
51
53
|
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
52
54
|
},
|
|
53
|
-
"
|
|
54
|
-
"enum": [
|
|
55
|
-
"cursor",
|
|
56
|
-
"opencode",
|
|
57
|
-
"claude-code",
|
|
58
|
-
"codex",
|
|
59
|
-
"codebuddy",
|
|
60
|
-
"trae",
|
|
61
|
-
"deepseek-harness"
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
"customTargetId": {
|
|
65
|
-
"type": "string",
|
|
66
|
-
"pattern": "^[a-z][a-z0-9-]*\\.[a-z][a-z0-9-]*(?:\\.[a-z][a-z0-9-]*)*$",
|
|
67
|
-
"maxLength": 128
|
|
68
|
-
},
|
|
69
|
-
"targetId": {
|
|
70
|
-
"oneOf": [
|
|
71
|
-
{ "$ref": "#/$defs/builtInTargetId" },
|
|
72
|
-
{ "$ref": "#/$defs/customTargetId" }
|
|
73
|
-
]
|
|
74
|
-
},
|
|
75
|
-
"targetRef": {
|
|
55
|
+
"generatedBy": {
|
|
76
56
|
"type": "object",
|
|
77
|
-
"required": ["
|
|
57
|
+
"required": ["cliVersion"],
|
|
78
58
|
"properties": {
|
|
79
|
-
"
|
|
80
|
-
"scope": { "const": "project" }
|
|
59
|
+
"cliVersion": { "$ref": "#/$defs/semver" }
|
|
81
60
|
},
|
|
82
61
|
"additionalProperties": false
|
|
83
62
|
},
|
|
84
|
-
"
|
|
63
|
+
"createdWith": {
|
|
85
64
|
"type": "object",
|
|
86
|
-
"required": ["
|
|
65
|
+
"required": ["packages"],
|
|
87
66
|
"properties": {
|
|
88
|
-
"
|
|
67
|
+
"packages": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"required": ["packageId", "version", "contentDigest"],
|
|
72
|
+
"properties": {
|
|
73
|
+
"packageId": { "$ref": "#/$defs/packageName" },
|
|
74
|
+
"version": { "$ref": "#/$defs/semver" },
|
|
75
|
+
"contentDigest": { "$ref": "#/$defs/digest" }
|
|
76
|
+
},
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
}
|
|
79
|
+
}
|
|
89
80
|
},
|
|
90
81
|
"additionalProperties": false
|
|
91
82
|
},
|
|
@@ -133,53 +124,32 @@
|
|
|
133
124
|
},
|
|
134
125
|
"desiredPackage": {
|
|
135
126
|
"type": "object",
|
|
136
|
-
"required": ["id", "
|
|
127
|
+
"required": ["id", "requested", "source", "inputs"],
|
|
137
128
|
"properties": {
|
|
138
129
|
"id": { "$ref": "#/$defs/packageName" },
|
|
139
|
-
"
|
|
130
|
+
"requested": { "$ref": "#/$defs/semverRange" },
|
|
140
131
|
"source": { "$ref": "#/$defs/requestedSource" },
|
|
141
|
-
"inputs": { "$ref": "#/$defs/inputValues" }
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
"type": "object",
|
|
147
|
-
"required": ["packageId", "id", "version"],
|
|
148
|
-
"properties": {
|
|
149
|
-
"packageId": { "$ref": "#/$defs/packageName" },
|
|
150
|
-
"id": { "$ref": "#/$defs/localId" },
|
|
151
|
-
"version": { "$ref": "#/$defs/semverRange" }
|
|
132
|
+
"inputs": { "$ref": "#/$defs/inputValues" },
|
|
133
|
+
"assetTypes": {
|
|
134
|
+
"type": "array",
|
|
135
|
+
"items": { "type": "string" }
|
|
136
|
+
}
|
|
152
137
|
},
|
|
153
138
|
"additionalProperties": false
|
|
154
139
|
},
|
|
155
140
|
"desired": {
|
|
156
141
|
"type": "object",
|
|
157
|
-
"required": ["
|
|
142
|
+
"required": ["packages", "targets"],
|
|
158
143
|
"properties": {
|
|
159
|
-
"
|
|
160
|
-
"templates": {
|
|
144
|
+
"packages": {
|
|
161
145
|
"type": "array",
|
|
162
146
|
"items": { "$ref": "#/$defs/desiredPackage" }
|
|
163
147
|
},
|
|
164
|
-
"addons": {
|
|
165
|
-
"type": "array",
|
|
166
|
-
"items": { "$ref": "#/$defs/desiredPackage" }
|
|
167
|
-
},
|
|
168
|
-
"capabilities": {
|
|
169
|
-
"type": "array",
|
|
170
|
-
"items": { "$ref": "#/$defs/desiredCapability" }
|
|
171
|
-
},
|
|
172
148
|
"targets": {
|
|
173
149
|
"type": "array",
|
|
174
|
-
"
|
|
175
|
-
"items": { "$ref": "#/$defs/targetRef" }
|
|
150
|
+
"items": { "type": "string" }
|
|
176
151
|
}
|
|
177
152
|
},
|
|
178
|
-
"anyOf": [
|
|
179
|
-
{ "required": ["templates"] },
|
|
180
|
-
{ "required": ["template"] },
|
|
181
|
-
{ "properties": { "addons": { "minItems": 1 } } }
|
|
182
|
-
],
|
|
183
153
|
"additionalProperties": false
|
|
184
154
|
},
|
|
185
155
|
"resolvedNpmSource": {
|
|
@@ -221,236 +191,57 @@
|
|
|
221
191
|
},
|
|
222
192
|
"resolvedPackage": {
|
|
223
193
|
"type": "object",
|
|
224
|
-
"required": ["id", "version", "source"],
|
|
194
|
+
"required": ["id", "version", "contentDigest", "source"],
|
|
225
195
|
"properties": {
|
|
226
196
|
"id": { "$ref": "#/$defs/packageName" },
|
|
227
197
|
"version": { "$ref": "#/$defs/semver" },
|
|
228
|
-
"
|
|
229
|
-
"
|
|
230
|
-
|
|
231
|
-
"additionalProperties": false
|
|
232
|
-
},
|
|
233
|
-
"requestedBy": {
|
|
234
|
-
"oneOf": [
|
|
235
|
-
{
|
|
236
|
-
"type": "object",
|
|
237
|
-
"required": ["kind", "packageId"],
|
|
238
|
-
"properties": {
|
|
239
|
-
"kind": { "enum": ["template", "addon"] },
|
|
240
|
-
"packageId": { "$ref": "#/$defs/packageName" }
|
|
241
|
-
},
|
|
242
|
-
"additionalProperties": false
|
|
243
|
-
},
|
|
244
|
-
{
|
|
245
|
-
"type": "object",
|
|
246
|
-
"required": ["kind", "packageId", "id"],
|
|
247
|
-
"properties": {
|
|
248
|
-
"kind": { "const": "capability" },
|
|
249
|
-
"packageId": { "$ref": "#/$defs/packageName" },
|
|
250
|
-
"id": { "$ref": "#/$defs/localId" }
|
|
251
|
-
},
|
|
252
|
-
"additionalProperties": false
|
|
253
|
-
}
|
|
254
|
-
]
|
|
255
|
-
},
|
|
256
|
-
"resolvedProject": {
|
|
257
|
-
"type": "object",
|
|
258
|
-
"required": ["packageId", "id", "version"],
|
|
259
|
-
"properties": {
|
|
260
|
-
"packageId": { "$ref": "#/$defs/packageName" },
|
|
261
|
-
"id": { "$ref": "#/$defs/localId" },
|
|
262
|
-
"version": { "$ref": "#/$defs/semver" }
|
|
263
|
-
},
|
|
264
|
-
"additionalProperties": false
|
|
265
|
-
},
|
|
266
|
-
"resolvedCapability": {
|
|
267
|
-
"type": "object",
|
|
268
|
-
"required": ["packageId", "id", "type", "version", "requestedBy", "targets", "requiresUserInstallation"],
|
|
269
|
-
"properties": {
|
|
270
|
-
"packageId": { "$ref": "#/$defs/packageName" },
|
|
271
|
-
"id": { "$ref": "#/$defs/localId" },
|
|
272
|
-
"type": { "enum": ["skill", "rule", "instruction", "mcp", "agent"] },
|
|
273
|
-
"version": { "$ref": "#/$defs/semver" },
|
|
274
|
-
"requestedBy": {
|
|
275
|
-
"type": "array",
|
|
276
|
-
"minItems": 1,
|
|
277
|
-
"items": { "$ref": "#/$defs/requestedBy" }
|
|
278
|
-
},
|
|
279
|
-
"targets": {
|
|
280
|
-
"type": "array",
|
|
281
|
-
"minItems": 1,
|
|
282
|
-
"items": { "$ref": "#/$defs/targetRef" }
|
|
283
|
-
},
|
|
284
|
-
"requiresUserInstallation": { "type": "boolean" }
|
|
285
|
-
},
|
|
286
|
-
"additionalProperties": false
|
|
287
|
-
},
|
|
288
|
-
"resolvedPlugin": {
|
|
289
|
-
"type": "object",
|
|
290
|
-
"required": ["packageId", "id", "version", "target"],
|
|
291
|
-
"properties": {
|
|
292
|
-
"packageId": { "$ref": "#/$defs/packageName" },
|
|
293
|
-
"id": { "$ref": "#/$defs/localId" },
|
|
294
|
-
"version": { "$ref": "#/$defs/semver" },
|
|
295
|
-
"target": { "$ref": "#/$defs/targetRef" }
|
|
296
|
-
},
|
|
297
|
-
"additionalProperties": false
|
|
298
|
-
},
|
|
299
|
-
"resolvedTarget": {
|
|
300
|
-
"type": "object",
|
|
301
|
-
"required": ["id", "scope", "adapter"],
|
|
302
|
-
"properties": {
|
|
303
|
-
"id": { "$ref": "#/$defs/targetId" },
|
|
304
|
-
"scope": { "const": "project" },
|
|
305
|
-
"hostVersion": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
306
|
-
"adapter": {
|
|
307
|
-
"oneOf": [
|
|
308
|
-
{ "$ref": "#/$defs/builtInAdapter" },
|
|
309
|
-
{ "$ref": "#/$defs/packageAdapter" }
|
|
310
|
-
]
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
"additionalProperties": false
|
|
314
|
-
},
|
|
315
|
-
"builtInAdapter": {
|
|
316
|
-
"type": "object",
|
|
317
|
-
"required": ["id", "version"],
|
|
318
|
-
"properties": {
|
|
319
|
-
"id": { "$ref": "#/$defs/builtInTargetId" },
|
|
320
|
-
"version": { "$ref": "#/$defs/semver" }
|
|
321
|
-
},
|
|
322
|
-
"additionalProperties": false
|
|
323
|
-
},
|
|
324
|
-
"packageAdapter": {
|
|
325
|
-
"type": "object",
|
|
326
|
-
"required": ["id", "version", "packageId", "source", "integrity"],
|
|
327
|
-
"properties": {
|
|
328
|
-
"id": { "$ref": "#/$defs/customTargetId" },
|
|
329
|
-
"version": { "$ref": "#/$defs/semver" },
|
|
330
|
-
"packageId": { "$ref": "#/$defs/packageName" },
|
|
331
|
-
"source": { "$ref": "#/$defs/resolvedSource" },
|
|
332
|
-
"integrity": { "$ref": "#/$defs/integrity" }
|
|
198
|
+
"integrity": { "$ref": "#/$defs/integrity" },
|
|
199
|
+
"contentDigest": { "$ref": "#/$defs/digest" },
|
|
200
|
+
"source": { "$ref": "#/$defs/resolvedSource" }
|
|
333
201
|
},
|
|
334
202
|
"additionalProperties": false
|
|
335
203
|
},
|
|
336
204
|
"resolved": {
|
|
337
205
|
"type": "object",
|
|
338
|
-
"required": ["
|
|
206
|
+
"required": ["packages"],
|
|
339
207
|
"properties": {
|
|
340
|
-
"
|
|
341
|
-
"templates": {
|
|
208
|
+
"packages": {
|
|
342
209
|
"type": "array",
|
|
343
210
|
"items": { "$ref": "#/$defs/resolvedPackage" }
|
|
344
|
-
},
|
|
345
|
-
"addons": {
|
|
346
|
-
"type": "array",
|
|
347
|
-
"items": { "$ref": "#/$defs/resolvedPackage" }
|
|
348
|
-
},
|
|
349
|
-
"projects": {
|
|
350
|
-
"type": "array",
|
|
351
|
-
"items": { "$ref": "#/$defs/resolvedProject" }
|
|
352
|
-
},
|
|
353
|
-
"capabilities": {
|
|
354
|
-
"type": "array",
|
|
355
|
-
"items": { "$ref": "#/$defs/resolvedCapability" }
|
|
356
|
-
},
|
|
357
|
-
"plugins": {
|
|
358
|
-
"type": "array",
|
|
359
|
-
"items": { "$ref": "#/$defs/resolvedPlugin" }
|
|
360
|
-
},
|
|
361
|
-
"targets": {
|
|
362
|
-
"type": "array",
|
|
363
|
-
"minItems": 1,
|
|
364
|
-
"items": { "$ref": "#/$defs/resolvedTarget" }
|
|
365
211
|
}
|
|
366
212
|
},
|
|
367
|
-
"anyOf": [
|
|
368
|
-
{ "required": ["templates"] },
|
|
369
|
-
{ "required": ["template"] },
|
|
370
|
-
{ "properties": { "addons": { "minItems": 1 } } }
|
|
371
|
-
],
|
|
372
|
-
"additionalProperties": false
|
|
373
|
-
},
|
|
374
|
-
"packageOwner": {
|
|
375
|
-
"type": "object",
|
|
376
|
-
"required": ["kind", "packageId"],
|
|
377
|
-
"properties": {
|
|
378
|
-
"kind": { "enum": ["template", "addon"] },
|
|
379
|
-
"packageId": { "$ref": "#/$defs/packageName" }
|
|
380
|
-
},
|
|
381
213
|
"additionalProperties": false
|
|
382
214
|
},
|
|
383
|
-
"
|
|
215
|
+
"resourceOwner": {
|
|
384
216
|
"type": "object",
|
|
385
|
-
"required": ["
|
|
217
|
+
"required": ["packageId", "assetType"],
|
|
386
218
|
"properties": {
|
|
387
|
-
"kind": { "enum": ["project", "capability", "plugin"] },
|
|
388
219
|
"packageId": { "$ref": "#/$defs/packageName" },
|
|
389
|
-
"
|
|
220
|
+
"assetType": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
221
|
+
"assetId": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
390
222
|
},
|
|
391
223
|
"additionalProperties": false
|
|
392
224
|
},
|
|
393
|
-
"
|
|
394
|
-
"oneOf": [
|
|
395
|
-
{ "$ref": "#/$defs/packageOwner" },
|
|
396
|
-
{ "$ref": "#/$defs/objectOwner" }
|
|
397
|
-
]
|
|
398
|
-
},
|
|
399
|
-
"resourceCommon": {
|
|
225
|
+
"resource": {
|
|
400
226
|
"type": "object",
|
|
401
|
-
"required": ["
|
|
227
|
+
"required": ["target", "path", "selector", "hash", "owners"],
|
|
402
228
|
"properties": {
|
|
403
|
-
"
|
|
229
|
+
"target": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
404
230
|
"path": { "$ref": "#/$defs/projectPath" },
|
|
231
|
+
"selector": { "type": ["string", "null"] },
|
|
232
|
+
"hash": { "$ref": "#/$defs/digest" },
|
|
405
233
|
"digest": { "$ref": "#/$defs/digest" },
|
|
234
|
+
"type": { "enum": ["file", "config-entry", "managed-section"] },
|
|
235
|
+
"format": { "enum": ["json", "jsonc", "toml"] },
|
|
236
|
+
"sectionId": { "type": "string" },
|
|
237
|
+
"executable": { "type": "boolean" },
|
|
406
238
|
"owners": {
|
|
407
239
|
"type": "array",
|
|
408
240
|
"minItems": 1,
|
|
409
|
-
"items": { "$ref": "#/$defs/
|
|
410
|
-
}
|
|
411
|
-
"target": { "$ref": "#/$defs/targetRef" },
|
|
412
|
-
"adapter": {
|
|
413
|
-
"type": "object",
|
|
414
|
-
"required": ["id", "version"],
|
|
415
|
-
"properties": {
|
|
416
|
-
"id": { "$ref": "#/$defs/targetId" },
|
|
417
|
-
"version": { "$ref": "#/$defs/semver" }
|
|
418
|
-
},
|
|
419
|
-
"additionalProperties": false
|
|
420
|
-
},
|
|
421
|
-
"executable": { "type": "boolean", "default": false },
|
|
422
|
-
"selector": {
|
|
423
|
-
"type": "string",
|
|
424
|
-
"minLength": 1,
|
|
425
|
-
"maxLength": 512,
|
|
426
|
-
"pattern": "^(/(?:[^~/]|~[01])*)+$",
|
|
427
|
-
"description": "RFC 6901 JSON Pointer"
|
|
428
|
-
},
|
|
429
|
-
"format": { "enum": ["json", "jsonc", "toml"] },
|
|
430
|
-
"sectionId": { "type": "string", "minLength": 1, "maxLength": 128 }
|
|
241
|
+
"items": { "$ref": "#/$defs/resourceOwner" }
|
|
242
|
+
}
|
|
431
243
|
},
|
|
432
244
|
"additionalProperties": false
|
|
433
|
-
},
|
|
434
|
-
"resource": {
|
|
435
|
-
"allOf": [
|
|
436
|
-
{ "$ref": "#/$defs/resourceCommon" },
|
|
437
|
-
{
|
|
438
|
-
"if": {
|
|
439
|
-
"properties": { "type": { "const": "config-entry" } },
|
|
440
|
-
"required": ["type"]
|
|
441
|
-
},
|
|
442
|
-
"then": { "required": ["selector", "target", "adapter"] },
|
|
443
|
-
"else": { "not": { "required": ["selector"] } }
|
|
444
|
-
},
|
|
445
|
-
{
|
|
446
|
-
"if": {
|
|
447
|
-
"properties": { "type": { "const": "managed-section" } },
|
|
448
|
-
"required": ["type"]
|
|
449
|
-
},
|
|
450
|
-
"then": { "required": ["sectionId", "target", "adapter"] },
|
|
451
|
-
"else": { "not": { "required": ["sectionId"] } }
|
|
452
|
-
}
|
|
453
|
-
]
|
|
454
245
|
}
|
|
455
246
|
}
|
|
456
247
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Extension SDK 公共契约 (DD-03)
|
|
3
|
-
*/
|
|
4
|
-
export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
|
|
5
|
-
readonly [key: string]: JsonValue;
|
|
6
|
-
};
|
|
7
|
-
export type InputValue = string | boolean | number;
|
|
8
|
-
export type ExtensionOperation = 'create' | 'apply' | 'install' | 'configure' | 'remove';
|
|
9
|
-
export type CapabilityType = 'skill' | 'rule' | 'instruction' | 'mcp' | 'agent';
|
|
10
|
-
export type TargetId = 'cursor' | 'opencode' | 'claude-code' | 'codex' | 'codebuddy' | 'trae' | 'deepseek-harness';
|
|
11
|
-
export interface TargetRef {
|
|
12
|
-
id: TargetId;
|
|
13
|
-
scope: 'project';
|
|
14
|
-
hostVersion?: string;
|
|
15
|
-
}
|
|
16
|
-
export interface ProjectFileSystem {
|
|
17
|
-
readonly root: string;
|
|
18
|
-
readonly exists: boolean;
|
|
19
|
-
read(path: string): Promise<Uint8Array | undefined>;
|
|
20
|
-
write(path: string, content: Uint8Array | string): Promise<void>;
|
|
21
|
-
remove(path: string): Promise<void>;
|
|
22
|
-
mkdir(path: string): Promise<void>;
|
|
23
|
-
}
|
|
24
|
-
export interface CommandRegistration {
|
|
25
|
-
readonly name: string;
|
|
26
|
-
readonly executable: string;
|
|
27
|
-
readonly args?: readonly string[];
|
|
28
|
-
}
|
|
29
|
-
export type EnvironmentChange = {
|
|
30
|
-
readonly type: 'path';
|
|
31
|
-
readonly path: string;
|
|
32
|
-
readonly operation: 'prepend' | 'append';
|
|
33
|
-
} | {
|
|
34
|
-
readonly type: 'variable';
|
|
35
|
-
readonly name: string;
|
|
36
|
-
readonly value: string;
|
|
37
|
-
};
|
|
38
|
-
export interface UserInstallationFileSystem {
|
|
39
|
-
readonly root: string;
|
|
40
|
-
write(path: string, content: Uint8Array | string): Promise<void>;
|
|
41
|
-
remove(path: string): Promise<void>;
|
|
42
|
-
mkdir(path: string): Promise<void>;
|
|
43
|
-
registerCommand(command: CommandRegistration): Promise<void>;
|
|
44
|
-
registerEnvironment(change: EnvironmentChange): Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
export interface ExecRequest {
|
|
47
|
-
readonly command: string;
|
|
48
|
-
readonly args?: readonly string[];
|
|
49
|
-
readonly cwd?: 'project' | 'installation';
|
|
50
|
-
readonly env?: Readonly<Record<string, string>>;
|
|
51
|
-
readonly timeoutMs?: number;
|
|
52
|
-
}
|
|
53
|
-
export interface ExecResult {
|
|
54
|
-
readonly exitCode: number;
|
|
55
|
-
readonly stdout: string;
|
|
56
|
-
readonly stderr: string;
|
|
57
|
-
}
|
|
58
|
-
export interface ProcessExecutor {
|
|
59
|
-
run(request: ExecRequest): Promise<ExecResult>;
|
|
60
|
-
}
|
|
61
|
-
export interface HttpClient {
|
|
62
|
-
fetch(url: string, init?: RequestInit): Promise<Response>;
|
|
63
|
-
}
|
|
64
|
-
export interface SecretReader {
|
|
65
|
-
get(name: string): Promise<string | undefined>;
|
|
66
|
-
}
|
|
67
|
-
export interface ExtensionLogger {
|
|
68
|
-
debug(message: string, fields?: Readonly<Record<string, JsonValue>>): void;
|
|
69
|
-
info(message: string, fields?: Readonly<Record<string, JsonValue>>): void;
|
|
70
|
-
warn(message: string, fields?: Readonly<Record<string, JsonValue>>): void;
|
|
71
|
-
}
|
|
72
|
-
export interface TargetDeliveryRequest {
|
|
73
|
-
readonly target: TargetRef;
|
|
74
|
-
readonly capabilityType: CapabilityType;
|
|
75
|
-
readonly id: string;
|
|
76
|
-
readonly source: string;
|
|
77
|
-
}
|
|
78
|
-
export interface TargetWriter {
|
|
79
|
-
deliver(request: TargetDeliveryRequest): Promise<void>;
|
|
80
|
-
}
|
|
81
|
-
export interface RollbackRegistrar {
|
|
82
|
-
defer(name: string, action: () => Promise<void>): void;
|
|
83
|
-
}
|
|
84
|
-
export interface ExtensionContext {
|
|
85
|
-
readonly mode: 'plan' | 'execute';
|
|
86
|
-
readonly operation: ExtensionOperation;
|
|
87
|
-
readonly package: {
|
|
88
|
-
readonly id: string;
|
|
89
|
-
readonly version: string;
|
|
90
|
-
readonly root: string;
|
|
91
|
-
};
|
|
92
|
-
readonly inputs: Readonly<Record<string, InputValue>>;
|
|
93
|
-
readonly project: ProjectFileSystem;
|
|
94
|
-
readonly user: UserInstallationFileSystem;
|
|
95
|
-
readonly exec: ProcessExecutor;
|
|
96
|
-
readonly http: HttpClient;
|
|
97
|
-
readonly secrets: SecretReader;
|
|
98
|
-
readonly log: ExtensionLogger;
|
|
99
|
-
readonly rollback: RollbackRegistrar;
|
|
100
|
-
readonly signal: AbortSignal;
|
|
101
|
-
}
|
|
102
|
-
export interface ProjectExtensionContext extends ExtensionContext {
|
|
103
|
-
}
|
|
104
|
-
export interface CapabilityDescriptor {
|
|
105
|
-
readonly packageId: string;
|
|
106
|
-
readonly id: string;
|
|
107
|
-
readonly type: CapabilityType;
|
|
108
|
-
readonly version: string;
|
|
109
|
-
readonly targets: readonly TargetRef[];
|
|
110
|
-
}
|
|
111
|
-
export interface CapabilityInstallContext extends ExtensionContext {
|
|
112
|
-
readonly capability: CapabilityDescriptor;
|
|
113
|
-
}
|
|
114
|
-
export interface CapabilityConfigureContext extends ExtensionContext {
|
|
115
|
-
readonly capability: CapabilityDescriptor;
|
|
116
|
-
readonly targets: TargetWriter;
|
|
117
|
-
}
|
|
118
|
-
export interface CapabilityRemoveContext extends ExtensionContext {
|
|
119
|
-
readonly capability: CapabilityDescriptor;
|
|
120
|
-
readonly resources: readonly ManagedResource[];
|
|
121
|
-
}
|
|
122
|
-
export interface CapabilityHealthContext extends ExtensionContext {
|
|
123
|
-
readonly capability: CapabilityDescriptor;
|
|
124
|
-
}
|
|
125
|
-
export interface ProjectResult {
|
|
126
|
-
readonly summary?: string;
|
|
127
|
-
readonly outputs?: Readonly<Record<string, JsonValue>>;
|
|
128
|
-
}
|
|
129
|
-
export type InstallResult = {
|
|
130
|
-
readonly kind: 'none';
|
|
131
|
-
} | {
|
|
132
|
-
readonly kind: 'user';
|
|
133
|
-
};
|
|
134
|
-
export interface ConfigureResult {
|
|
135
|
-
readonly summary?: string;
|
|
136
|
-
}
|
|
137
|
-
export interface ManagedResource {
|
|
138
|
-
readonly type: 'file' | 'config-entry';
|
|
139
|
-
readonly path: string;
|
|
140
|
-
readonly selector?: string;
|
|
141
|
-
readonly digest: string;
|
|
142
|
-
}
|
|
143
|
-
export interface RetainedSideEffect {
|
|
144
|
-
readonly description: string;
|
|
145
|
-
readonly reason: string;
|
|
146
|
-
}
|
|
147
|
-
export interface RemoveResult {
|
|
148
|
-
readonly summary?: string;
|
|
149
|
-
readonly retained?: readonly RetainedSideEffect[];
|
|
150
|
-
}
|
|
151
|
-
export interface HealthReport {
|
|
152
|
-
readonly status: 'healthy' | 'degraded' | 'broken';
|
|
153
|
-
readonly message?: string;
|
|
154
|
-
}
|
|
155
|
-
export declare abstract class ProjectExtension {
|
|
156
|
-
static readonly id: string;
|
|
157
|
-
abstract create(context: ProjectExtensionContext): Promise<ProjectResult>;
|
|
158
|
-
abstract apply(context: ProjectExtensionContext): Promise<ProjectResult>;
|
|
159
|
-
}
|
|
160
|
-
export declare abstract class CapabilityExtension {
|
|
161
|
-
static readonly id: string;
|
|
162
|
-
static readonly type: CapabilityType;
|
|
163
|
-
abstract install(context: CapabilityInstallContext): Promise<InstallResult>;
|
|
164
|
-
abstract configure(context: CapabilityConfigureContext, installation: InstallResult): Promise<ConfigureResult>;
|
|
165
|
-
abstract remove(context: CapabilityRemoveContext): Promise<RemoveResult>;
|
|
166
|
-
healthCheck?(context: CapabilityHealthContext): Promise<HealthReport>;
|
|
167
|
-
}
|
|
168
|
-
export declare class ExtensionError extends Error {
|
|
169
|
-
readonly code: string;
|
|
170
|
-
readonly safeMessage: string;
|
|
171
|
-
readonly details?: Readonly<Record<string, JsonValue>>;
|
|
172
|
-
readonly retryable?: boolean;
|
|
173
|
-
constructor(code: string, safeMessage: string, details?: Readonly<Record<string, JsonValue>>, retryable?: boolean);
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
const require = __createRequire(import.meta.url);
|
|
3
|
-
import * as __manoNodeUtil from 'node:util';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
// packages/sdk/src/index.ts
|
|
7
|
-
var ProjectExtension = class {
|
|
8
|
-
static id;
|
|
9
|
-
};
|
|
10
|
-
var CapabilityExtension = class {
|
|
11
|
-
static id;
|
|
12
|
-
static type;
|
|
13
|
-
};
|
|
14
|
-
var ExtensionError = class extends Error {
|
|
15
|
-
code;
|
|
16
|
-
safeMessage;
|
|
17
|
-
details;
|
|
18
|
-
retryable;
|
|
19
|
-
constructor(code, safeMessage, details, retryable) {
|
|
20
|
-
super(safeMessage);
|
|
21
|
-
this.name = "ExtensionError";
|
|
22
|
-
this.code = code;
|
|
23
|
-
this.safeMessage = safeMessage;
|
|
24
|
-
this.details = details;
|
|
25
|
-
this.retryable = retryable;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
export {
|
|
29
|
-
CapabilityExtension,
|
|
30
|
-
ExtensionError,
|
|
31
|
-
ProjectExtension
|
|
32
|
-
};
|