@executioncontrolprotocol/plugin-sdk 0.50.0 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -26
- package/dist/bin/ecp-plugin-manifest.d.ts +3 -0
- package/dist/bin/ecp-plugin-manifest.d.ts.map +1 -0
- package/dist/bin/ecp-plugin-manifest.js +94 -0
- package/dist/bin/ecp-plugin-manifest.js.map +1 -0
- package/dist/canonical.d.ts +15 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +30 -0
- package/dist/canonical.js.map +1 -0
- package/dist/define.d.ts +117 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/define.js +88 -0
- package/dist/define.js.map +1 -0
- package/dist/file-ref.d.ts +58 -0
- package/dist/file-ref.d.ts.map +1 -0
- package/dist/file-ref.js +33 -0
- package/dist/file-ref.js.map +1 -0
- package/dist/index.d.ts +13 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -14
- package/dist/index.js.map +1 -1
- package/dist/manifest.d.ts +67 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +163 -0
- package/dist/manifest.js.map +1 -0
- package/dist/version.d.ts +6 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +7 -0
- package/dist/version.js.map +1 -0
- package/package.json +14 -13
- package/dist/build/build-plugin.d.ts +0 -7
- package/dist/build/build-plugin.d.ts.map +0 -1
- package/dist/build/build-plugin.js +0 -52
- package/dist/build/build-plugin.js.map +0 -1
- package/dist/build/check-plugin.d.ts +0 -7
- package/dist/build/check-plugin.d.ts.map +0 -1
- package/dist/build/check-plugin.js +0 -98
- package/dist/build/check-plugin.js.map +0 -1
- package/dist/build/generated-pjson.d.ts +0 -23
- package/dist/build/generated-pjson.d.ts.map +0 -1
- package/dist/build/generated-pjson.js +0 -72
- package/dist/build/generated-pjson.js.map +0 -1
- package/dist/build/scaffold-plugin.d.ts +0 -6
- package/dist/build/scaffold-plugin.d.ts.map +0 -1
- package/dist/build/scaffold-plugin.js +0 -103
- package/dist/build/scaffold-plugin.js.map +0 -1
- package/dist/build/types.d.ts +0 -37
- package/dist/build/types.d.ts.map +0 -1
- package/dist/build/types.js +0 -2
- package/dist/build/types.js.map +0 -1
- package/dist/codes.d.ts +0 -12
- package/dist/codes.d.ts.map +0 -1
- package/dist/codes.js +0 -12
- package/dist/codes.js.map +0 -1
- package/dist/define-operation.d.ts +0 -77
- package/dist/define-operation.d.ts.map +0 -1
- package/dist/define-operation.js +0 -47
- package/dist/define-operation.js.map +0 -1
- package/dist/ecp-command.d.ts +0 -40
- package/dist/ecp-command.d.ts.map +0 -1
- package/dist/ecp-command.js +0 -100
- package/dist/ecp-command.js.map +0 -1
- package/dist/envelope.d.ts +0 -48
- package/dist/envelope.d.ts.map +0 -1
- package/dist/envelope.js +0 -15
- package/dist/envelope.js.map +0 -1
- package/dist/errors.d.ts +0 -27
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -38
- package/dist/errors.js.map +0 -1
- package/dist/flags-from-schema.d.ts +0 -17
- package/dist/flags-from-schema.d.ts.map +0 -1
- package/dist/flags-from-schema.js +0 -129
- package/dist/flags-from-schema.js.map +0 -1
- package/dist/help-text.d.ts +0 -13
- package/dist/help-text.d.ts.map +0 -1
- package/dist/help-text.js +0 -38
- package/dist/help-text.js.map +0 -1
- package/dist/host.d.ts +0 -51
- package/dist/host.d.ts.map +0 -1
- package/dist/host.js +0 -30
- package/dist/host.js.map +0 -1
- package/dist/input-merge.d.ts +0 -12
- package/dist/input-merge.d.ts.map +0 -1
- package/dist/input-merge.js +0 -76
- package/dist/input-merge.js.map +0 -1
- package/dist/kebab.d.ts +0 -6
- package/dist/kebab.d.ts.map +0 -1
- package/dist/kebab.js +0 -12
- package/dist/kebab.js.map +0 -1
- package/dist/reserved-names.d.ts +0 -16
- package/dist/reserved-names.d.ts.map +0 -1
- package/dist/reserved-names.js +0 -37
- package/dist/reserved-names.js.map +0 -1
- package/dist/schema-fields.d.ts +0 -7
- package/dist/schema-fields.d.ts.map +0 -1
- package/dist/schema-fields.js +0 -11
- package/dist/schema-fields.js.map +0 -1
- package/dist/to-commands.d.ts +0 -9
- package/dist/to-commands.d.ts.map +0 -1
- package/dist/to-commands.js +0 -162
- package/dist/to-commands.js.map +0 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type PluginManifest, type PluginSchemaDocument } from "@executioncontrolprotocol/protocol";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import type { PluginDefinition } from "./define.js";
|
|
4
|
+
/**
|
|
5
|
+
* Package.json fields the manifest bin reads.
|
|
6
|
+
* @category Plugins
|
|
7
|
+
*/
|
|
8
|
+
export interface PackageJsonInfo {
|
|
9
|
+
/** npm package name. */
|
|
10
|
+
name: string;
|
|
11
|
+
/** Package version. */
|
|
12
|
+
version: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Options for {@link buildPluginManifest}.
|
|
16
|
+
* @category Plugins
|
|
17
|
+
*/
|
|
18
|
+
export interface BuildManifestOptions {
|
|
19
|
+
/** Plugin definition (default export of the entry). */
|
|
20
|
+
definition: PluginDefinition;
|
|
21
|
+
/** Surrounding package.json. */
|
|
22
|
+
packageJson: PackageJsonInfo;
|
|
23
|
+
/** Relative entry path written into the manifest. Default `./dist/index.js`. */
|
|
24
|
+
entry?: string;
|
|
25
|
+
/** SDK version stamped into the manifest. Default {@link VERSION}. */
|
|
26
|
+
sdkVersion?: string;
|
|
27
|
+
/** Relative path for `pluginSchema.path`. Default `./ecp.schema.json`. */
|
|
28
|
+
schemaPath?: string;
|
|
29
|
+
/** Pre-built schema document. When omitted, one is built from the definition. */
|
|
30
|
+
schemaDocument?: PluginSchemaDocument;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Options for {@link buildPluginSchemaDocument}.
|
|
34
|
+
* @category Plugins
|
|
35
|
+
*/
|
|
36
|
+
export interface BuildPluginSchemaOptions {
|
|
37
|
+
/** Plugin definition (default export of the entry). */
|
|
38
|
+
definition: PluginDefinition;
|
|
39
|
+
/** Surrounding package.json. */
|
|
40
|
+
packageJson: PackageJsonInfo;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Convert a zod schema to a JSON Schema object for the manifest.
|
|
44
|
+
* @category Plugins
|
|
45
|
+
*/
|
|
46
|
+
export declare function zodToJsonSchema(schema: z.ZodType, io: "input" | "output"): Record<string, unknown>;
|
|
47
|
+
/**
|
|
48
|
+
* Build the per-plugin {@link PluginSchemaDocument} (`ecp.schema.json`).
|
|
49
|
+
* @category Plugins
|
|
50
|
+
*/
|
|
51
|
+
export declare function buildPluginSchemaDocument(options: BuildPluginSchemaOptions): Promise<PluginSchemaDocument>;
|
|
52
|
+
/**
|
|
53
|
+
* Build a deterministic light {@link PluginManifest} from a definition and package.json.
|
|
54
|
+
* @category Plugins
|
|
55
|
+
*/
|
|
56
|
+
export declare function buildPluginManifest(options: BuildManifestOptions): Promise<PluginManifest>;
|
|
57
|
+
/**
|
|
58
|
+
* Serialize a light manifest as deterministic JSON with a trailing newline.
|
|
59
|
+
* @category Plugins
|
|
60
|
+
*/
|
|
61
|
+
export declare function serializeManifest(manifest: PluginManifest): string;
|
|
62
|
+
/**
|
|
63
|
+
* Serialize a plugin schema document as deterministic JSON with a trailing newline.
|
|
64
|
+
* @category Plugins
|
|
65
|
+
*/
|
|
66
|
+
export declare function serializePluginSchema(doc: PluginSchemaDocument): string;
|
|
67
|
+
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,oBAAoB,EAC1B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAwB,gBAAgB,EAAE,MAAM,aAA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PLUGIN_MANIFEST_VERSION, } from "@executioncontrolprotocol/protocol";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { canonicalJson, sha256Hex } from "./canonical.js";
|
|
4
|
+
import { PluginDefinitionError } from "./define.js";
|
|
5
|
+
import { VERSION } from "./version.js";
|
|
6
|
+
/** Relative path written into light manifests for the schema document. */
|
|
7
|
+
const DEFAULT_SCHEMA_PATH = "./ecp.schema.json";
|
|
8
|
+
/** Draft id stamped on written `ecp.schema.json` files. */
|
|
9
|
+
const JSON_SCHEMA_DRAFT = "https://json-schema.org/draft/2020-12/schema";
|
|
10
|
+
/**
|
|
11
|
+
* Convert a zod schema to a JSON Schema object for the manifest.
|
|
12
|
+
* @category Plugins
|
|
13
|
+
*/
|
|
14
|
+
export function zodToJsonSchema(schema, io) {
|
|
15
|
+
const raw = z.toJSONSchema(schema, { target: "draft-2020-12", io });
|
|
16
|
+
return hoistZodJsonSchemaMeta(stripSchemaKeys(sortKeys(raw)));
|
|
17
|
+
}
|
|
18
|
+
function hoistZodJsonSchemaMeta(value) {
|
|
19
|
+
if (Array.isArray(value))
|
|
20
|
+
return value.map((item) => hoistZodJsonSchemaMeta(item));
|
|
21
|
+
if (typeof value !== "object" || value === null)
|
|
22
|
+
return value;
|
|
23
|
+
const record = value;
|
|
24
|
+
const output = {};
|
|
25
|
+
for (const [key, child] of Object.entries(record)) {
|
|
26
|
+
output[key] = hoistZodJsonSchemaMeta(child);
|
|
27
|
+
}
|
|
28
|
+
const meta = record.jsonSchema;
|
|
29
|
+
if (typeof meta === "object" && meta !== null && !Array.isArray(meta)) {
|
|
30
|
+
for (const [metaKey, metaValue] of Object.entries(meta)) {
|
|
31
|
+
output[metaKey] = metaValue;
|
|
32
|
+
}
|
|
33
|
+
delete output.jsonSchema;
|
|
34
|
+
}
|
|
35
|
+
return output;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Build the per-plugin {@link PluginSchemaDocument} (`ecp.schema.json`).
|
|
39
|
+
* @category Plugins
|
|
40
|
+
*/
|
|
41
|
+
export async function buildPluginSchemaDocument(options) {
|
|
42
|
+
const { definition, packageJson } = options;
|
|
43
|
+
assertPackageJson(packageJson);
|
|
44
|
+
const defs = {};
|
|
45
|
+
const names = Object.keys(definition.capabilities).sort();
|
|
46
|
+
for (const name of names) {
|
|
47
|
+
const cap = definition.capabilities[name];
|
|
48
|
+
if (!cap)
|
|
49
|
+
continue;
|
|
50
|
+
if (cap.contract === "step")
|
|
51
|
+
continue;
|
|
52
|
+
defs[`${name}.accepts`] = zodToJsonSchema(cap.accepts, "input");
|
|
53
|
+
defs[`${name}.returns`] = zodToJsonSchema(cap.returns, "output");
|
|
54
|
+
}
|
|
55
|
+
if (definition.config) {
|
|
56
|
+
defs.config = zodToJsonSchema(definition.config, "input");
|
|
57
|
+
}
|
|
58
|
+
return sortKeys({
|
|
59
|
+
$schema: JSON_SCHEMA_DRAFT,
|
|
60
|
+
$id: `ecp://plugins/${definition.id}/${packageJson.version}/schema.json`,
|
|
61
|
+
$defs: defs,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Build a deterministic light {@link PluginManifest} from a definition and package.json.
|
|
66
|
+
* @category Plugins
|
|
67
|
+
*/
|
|
68
|
+
export async function buildPluginManifest(options) {
|
|
69
|
+
const { definition, packageJson } = options;
|
|
70
|
+
assertPackageJson(packageJson);
|
|
71
|
+
// One name per plugin: the host refuses to load a plugin whose id isn't its package name, so fail the build here.
|
|
72
|
+
if (definition.id !== packageJson.name) {
|
|
73
|
+
throw new PluginDefinitionError("ECP_PLUGIN_MANIFEST", `Plugin id ${definition.id} does not match package.json name ${packageJson.name}; a plugin's id must be its npm package name.`);
|
|
74
|
+
}
|
|
75
|
+
const schemaDocument = options.schemaDocument ??
|
|
76
|
+
(await buildPluginSchemaDocument({ definition, packageJson }));
|
|
77
|
+
const schemaHash = await sha256Hex(canonicalJson(schemaDocument));
|
|
78
|
+
const capabilities = Object.entries(definition.capabilities).map(([name, cap]) => toCapabilityManifest(definition.id, name, cap));
|
|
79
|
+
capabilities.sort((left, right) => (left.name < right.name ? -1 : left.name > right.name ? 1 : 0));
|
|
80
|
+
const withoutHash = {
|
|
81
|
+
schema: PLUGIN_MANIFEST_SCHEMA,
|
|
82
|
+
version: PLUGIN_MANIFEST_VERSION,
|
|
83
|
+
plugin: {
|
|
84
|
+
id: definition.id,
|
|
85
|
+
package: packageJson.name,
|
|
86
|
+
version: packageJson.version,
|
|
87
|
+
summary: definition.summary,
|
|
88
|
+
description: definition.description,
|
|
89
|
+
},
|
|
90
|
+
sdkVersion: options.sdkVersion ?? VERSION,
|
|
91
|
+
pluginSchema: {
|
|
92
|
+
path: options.schemaPath ?? DEFAULT_SCHEMA_PATH,
|
|
93
|
+
hash: schemaHash,
|
|
94
|
+
},
|
|
95
|
+
capabilities,
|
|
96
|
+
entry: options.entry ?? "./dist/index.js",
|
|
97
|
+
};
|
|
98
|
+
const sorted = sortKeys(withoutHash);
|
|
99
|
+
const hash = await sha256Hex(canonicalJson(sorted));
|
|
100
|
+
return { ...sorted, hash };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Serialize a light manifest as deterministic JSON with a trailing newline.
|
|
104
|
+
* @category Plugins
|
|
105
|
+
*/
|
|
106
|
+
export function serializeManifest(manifest) {
|
|
107
|
+
return `${JSON.stringify(sortKeys(manifest), null, 2)}\n`;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Serialize a plugin schema document as deterministic JSON with a trailing newline.
|
|
111
|
+
* @category Plugins
|
|
112
|
+
*/
|
|
113
|
+
export function serializePluginSchema(doc) {
|
|
114
|
+
return `${JSON.stringify(sortKeys(doc), null, 2)}\n`;
|
|
115
|
+
}
|
|
116
|
+
function assertPackageJson(packageJson) {
|
|
117
|
+
if (packageJson.version === undefined || packageJson.version === "") {
|
|
118
|
+
throw new PluginDefinitionError("ECP_PLUGIN_MANIFEST", "package.json is missing version.");
|
|
119
|
+
}
|
|
120
|
+
if (!packageJson.name) {
|
|
121
|
+
throw new PluginDefinitionError("ECP_PLUGIN_MANIFEST", "package.json is missing name.");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function toCapabilityManifest(pluginId, name, cap) {
|
|
125
|
+
return {
|
|
126
|
+
id: `${pluginId}.${name}`,
|
|
127
|
+
name,
|
|
128
|
+
summary: cap.summary,
|
|
129
|
+
description: cap.description,
|
|
130
|
+
useCases: [...cap.useCases],
|
|
131
|
+
projections: [...cap.projections],
|
|
132
|
+
...(cap.timeoutMs === undefined ? {} : { timeoutMs: cap.timeoutMs }),
|
|
133
|
+
...(cap.contract === undefined ? {} : { contract: cap.contract }),
|
|
134
|
+
...(cap.code === undefined ? {} : { code: cap.code }),
|
|
135
|
+
...(cap.role === undefined ? {} : { role: cap.role }),
|
|
136
|
+
...(cap.publish === undefined ? {} : { publish: cap.publish }),
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
function stripSchemaKeys(value) {
|
|
140
|
+
if (Array.isArray(value))
|
|
141
|
+
return value.map((item) => stripSchemaKeys(item));
|
|
142
|
+
if (typeof value !== "object" || value === null)
|
|
143
|
+
return value;
|
|
144
|
+
const output = {};
|
|
145
|
+
for (const [key, child] of Object.entries(value)) {
|
|
146
|
+
if (key === "$schema")
|
|
147
|
+
continue;
|
|
148
|
+
output[key] = stripSchemaKeys(child);
|
|
149
|
+
}
|
|
150
|
+
return output;
|
|
151
|
+
}
|
|
152
|
+
function sortKeys(value) {
|
|
153
|
+
if (Array.isArray(value))
|
|
154
|
+
return value.map((item) => sortKeys(item));
|
|
155
|
+
if (typeof value !== "object" || value === null)
|
|
156
|
+
return value;
|
|
157
|
+
const output = {};
|
|
158
|
+
for (const key of Object.keys(value).sort()) {
|
|
159
|
+
output[key] = sortKeys(value[key]);
|
|
160
|
+
}
|
|
161
|
+
return output;
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,MAEb,CAAA"}
|
package/dist/version.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
/**
|
|
3
|
+
* Package version from this package's `package.json` (single source of truth).
|
|
4
|
+
* @category Plugin SDK
|
|
5
|
+
*/
|
|
6
|
+
export const VERSION = createRequire(import.meta.url)("../package.json").version;
|
|
7
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAE3C;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAClB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CACjD,CAAC,OAAO,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@executioncontrolprotocol/plugin-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "Apache-2.0",
|
|
3
|
+
"version": "0.60.0",
|
|
4
|
+
"description": "Authoring API and ecp-plugin-manifest bin for ECP capability plugins.",
|
|
6
5
|
"type": "module",
|
|
7
|
-
"
|
|
8
|
-
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22.12"
|
|
8
|
+
},
|
|
9
|
+
"bin": {
|
|
10
|
+
"ecp-plugin-manifest": "./dist/bin/ecp-plugin-manifest.js"
|
|
11
|
+
},
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
11
14
|
"types": "./dist/index.d.ts",
|
|
12
15
|
"import": "./dist/index.js"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
15
19
|
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
"README.md"
|
|
20
|
+
"dist"
|
|
18
21
|
],
|
|
19
22
|
"dependencies": {
|
|
20
|
-
"@
|
|
23
|
+
"@executioncontrolprotocol/protocol": "0.60.0"
|
|
21
24
|
},
|
|
22
25
|
"peerDependencies": {
|
|
23
|
-
"zod": "^
|
|
24
|
-
"@executioncontrolprotocol/core": "^0.50.0"
|
|
26
|
+
"zod": "^4.0.0"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
|
-
"
|
|
28
|
-
"zod": "^
|
|
29
|
-
"@executioncontrolprotocol/core": "^0.50.0"
|
|
29
|
+
"@types/node": "^22.0.0",
|
|
30
|
+
"zod": "^4.0.0"
|
|
30
31
|
},
|
|
31
32
|
"scripts": {
|
|
32
33
|
"build": "tsc -b"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { BuildReport } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Generate oclif files and package.json fields from the compiled definition.
|
|
4
|
-
* @category CLI
|
|
5
|
-
*/
|
|
6
|
-
export declare function buildPlugin(dir: string): Promise<BuildReport>;
|
|
7
|
-
//# sourceMappingURL=build-plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-plugin.d.ts","sourceRoot":"","sources":["../../src/build/build-plugin.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAiB7C;;;GAGG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6BnE"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { Config } from "@oclif/core";
|
|
5
|
-
import { toCommands } from "../to-commands.js";
|
|
6
|
-
import { applyGeneratedFields, generatedPackageFields } from "./generated-pjson.js";
|
|
7
|
-
const OCLIF_JS = `import { toCommands } from "@executioncontrolprotocol/plugin-sdk"
|
|
8
|
-
import definition from "./index.js"
|
|
9
|
-
|
|
10
|
-
export const COMMANDS = toCommands(definition)
|
|
11
|
-
`;
|
|
12
|
-
async function loadDefinition(dir) {
|
|
13
|
-
const href = pathToFileURL(join(dir, "dist", "index.js")).href;
|
|
14
|
-
const mod = (await import(href));
|
|
15
|
-
if (!mod.default) {
|
|
16
|
-
throw new Error(`Plugin at ${dir} must default-export an extension or policy definition`);
|
|
17
|
-
}
|
|
18
|
-
return mod.default;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Generate oclif files and package.json fields from the compiled definition.
|
|
22
|
-
* @category CLI
|
|
23
|
-
*/
|
|
24
|
-
export async function buildPlugin(dir) {
|
|
25
|
-
const definition = await loadDefinition(dir);
|
|
26
|
-
const pkgPath = join(dir, "package.json");
|
|
27
|
-
const pkg = JSON.parse(await readFile(pkgPath, "utf8"));
|
|
28
|
-
const existingKeywords = Array.isArray(pkg.keywords) ? pkg.keywords.map(String) : [];
|
|
29
|
-
const fields = generatedPackageFields(definition, existingKeywords);
|
|
30
|
-
const next = applyGeneratedFields(pkg, fields);
|
|
31
|
-
await writeFile(pkgPath, `${JSON.stringify(next, null, 2)}\n`, "utf8");
|
|
32
|
-
await writeFile(join(dir, "dist", "oclif.js"), OCLIF_JS, "utf8");
|
|
33
|
-
const commands = toCommands(definition);
|
|
34
|
-
const commandIds = Object.keys(commands);
|
|
35
|
-
const config = await Config.load({ root: dir });
|
|
36
|
-
const cached = {};
|
|
37
|
-
for (const cmd of config.commands) {
|
|
38
|
-
cached[cmd.id] = cmd;
|
|
39
|
-
}
|
|
40
|
-
const manifest = {
|
|
41
|
-
version: typeof pkg.version === "string" ? pkg.version : "0.0.0",
|
|
42
|
-
commands: cached,
|
|
43
|
-
};
|
|
44
|
-
await writeFile(join(dir, "oclif.manifest.json"), `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
|
|
45
|
-
return {
|
|
46
|
-
dir,
|
|
47
|
-
written: ["package.json", "dist/oclif.js", "oclif.manifest.json"],
|
|
48
|
-
definitionId: definition.id,
|
|
49
|
-
commandIds,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=build-plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-plugin.js","sourceRoot":"","sources":["../../src/build/build-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAGnF,MAAM,QAAQ,GAAG;;;;CAIhB,CAAA;AAED,KAAK,UAAU,cAAc,CAAC,GAAW;IACvC,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAA;IAC9D,MAAM,GAAG,GAAG,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,CAAyD,CAAA;IACxF,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,aAAa,GAAG,wDAAwD,CAAC,CAAA;IAC3F,CAAC;IACD,OAAO,GAAG,CAAC,OAAO,CAAA;AACpB,CAAC;AAED;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,MAAM,UAAU,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,CAAA;IAC5C,MAAM,OAAO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AC,OAAO;QAChE,QAAQ,EAAE,MAAM;KACjB,CAAA;IACD,MAAM,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAEnG,OAAO;QACL,GAAG;QACH,OAAO,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,qBAAqB,CAAC;QACjE,YAAY,EAAE,UAAU,CAAC,EAAE;QAC3B,UAAU;KACX,CAAA;AACH,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CheckReport } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* Fail when generated plugin files are stale relative to the compiled definition.
|
|
4
|
-
* @category CLI
|
|
5
|
-
*/
|
|
6
|
-
export declare function checkPlugin(dir: string): Promise<CheckReport>;
|
|
7
|
-
//# sourceMappingURL=check-plugin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-plugin.d.ts","sourceRoot":"","sources":["../../src/build/check-plugin.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,YAAY,CAAA;AAsBzD;;;GAGG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA2EnE"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { readFile } from "node:fs/promises";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import { pathToFileURL } from "node:url";
|
|
4
|
-
import { applyGeneratedFields, generatedPackageFields } from "./generated-pjson.js";
|
|
5
|
-
import { isReservedRootName } from "../reserved-names.js";
|
|
6
|
-
import { toCommands } from "../to-commands.js";
|
|
7
|
-
function commandIdsIncludingAliases(definition) {
|
|
8
|
-
const commands = toCommands(definition);
|
|
9
|
-
const ids = new Set();
|
|
10
|
-
for (const [id, cls] of Object.entries(commands)) {
|
|
11
|
-
ids.add(id);
|
|
12
|
-
for (const alias of cls.aliases ?? [])
|
|
13
|
-
ids.add(alias);
|
|
14
|
-
}
|
|
15
|
-
return [...ids].sort();
|
|
16
|
-
}
|
|
17
|
-
async function readJson(path) {
|
|
18
|
-
return JSON.parse(await readFile(path, "utf8"));
|
|
19
|
-
}
|
|
20
|
-
function deepEqual(a, b) {
|
|
21
|
-
return JSON.stringify(a) === JSON.stringify(b);
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Fail when generated plugin files are stale relative to the compiled definition.
|
|
25
|
-
* @category CLI
|
|
26
|
-
*/
|
|
27
|
-
export async function checkPlugin(dir) {
|
|
28
|
-
const issues = [];
|
|
29
|
-
let definition;
|
|
30
|
-
try {
|
|
31
|
-
const href = pathToFileURL(join(dir, "dist", "index.js")).href;
|
|
32
|
-
const mod = (await import(`${href}?check=${Date.now()}`));
|
|
33
|
-
if (!mod.default)
|
|
34
|
-
throw new Error("missing default export");
|
|
35
|
-
definition = mod.default;
|
|
36
|
-
}
|
|
37
|
-
catch (err) {
|
|
38
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
39
|
-
return {
|
|
40
|
-
dir,
|
|
41
|
-
ok: false,
|
|
42
|
-
issues: [{ path: "dist/index.js", message: `Cannot load definition: ${message}` }],
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
if (isReservedRootName(definition.name)) {
|
|
46
|
-
issues.push({
|
|
47
|
-
path: "definition.name",
|
|
48
|
-
message: `Topic "${definition.name}" collides with a reserved CLI root command`,
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
const pkgPath = join(dir, "package.json");
|
|
52
|
-
const pkg = (await readJson(pkgPath));
|
|
53
|
-
const existingKeywords = Array.isArray(pkg.keywords) ? pkg.keywords.map(String) : [];
|
|
54
|
-
if (!isReservedRootName(definition.name)) {
|
|
55
|
-
const expected = applyGeneratedFields(pkg, generatedPackageFields(definition, existingKeywords));
|
|
56
|
-
if (!deepEqual(pkg.oclif, expected.oclif)) {
|
|
57
|
-
issues.push({ path: "package.json#oclif", message: "oclif block is stale; run ecp plugins build" });
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
else if (pkg.oclif !== undefined) {
|
|
61
|
-
issues.push({ path: "package.json#oclif", message: "oclif block is stale; run ecp plugins build" });
|
|
62
|
-
}
|
|
63
|
-
const ecp = pkg.ecp;
|
|
64
|
-
if (ecp?.extension !== "./dist/index.js") {
|
|
65
|
-
issues.push({ path: "package.json#ecp.extension", message: "ecp.extension is missing or stale" });
|
|
66
|
-
}
|
|
67
|
-
const exportsValue = pkg.exports;
|
|
68
|
-
const oclifExport = exportsValue?.["./oclif"];
|
|
69
|
-
const oclifImport = typeof oclifExport === "string" ? oclifExport : oclifExport?.import;
|
|
70
|
-
if (oclifImport !== "./dist/oclif.js") {
|
|
71
|
-
issues.push({ path: "package.json#exports./oclif", message: "exports['./oclif'] is missing or stale" });
|
|
72
|
-
}
|
|
73
|
-
try {
|
|
74
|
-
await readFile(join(dir, "dist", "oclif.js"), "utf8");
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
issues.push({ path: "dist/oclif.js", message: "missing generated oclif entry; run ecp plugins build" });
|
|
78
|
-
}
|
|
79
|
-
try {
|
|
80
|
-
const manifest = (await readJson(join(dir, "oclif.manifest.json")));
|
|
81
|
-
const expectedIds = commandIdsIncludingAliases(definition);
|
|
82
|
-
const actualIds = Object.keys(manifest.commands ?? {}).sort();
|
|
83
|
-
if (JSON.stringify(expectedIds) !== JSON.stringify(actualIds)) {
|
|
84
|
-
issues.push({
|
|
85
|
-
path: "oclif.manifest.json",
|
|
86
|
-
message: `command ids stale: expected ${expectedIds.join(", ") || "(none)"}`,
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
catch {
|
|
91
|
-
issues.push({
|
|
92
|
-
path: "oclif.manifest.json",
|
|
93
|
-
message: "missing generated manifest; run ecp plugins build",
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
return { dir, ok: issues.length === 0, issues };
|
|
97
|
-
}
|
|
98
|
-
//# sourceMappingURL=check-plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-plugin.js","sourceRoot":"","sources":["../../src/build/check-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAGxC,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9C,SAAS,0BAA0B,CACjC,UAAkD;IAElD,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,CAAA;IACvC,MAAM,GAAG,GAAG,IAAI,GAAG,EAAU,CAAA;IAC7B,KAAK,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAA8B,EAAE,CAAC;QAC9E,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;QACX,KAAK,MAAM,KAAK,IAAI,GAAG,CAAC,OAAO,IAAI,EAAE;YAAE,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;IACvD,CAAC;IACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,IAAI,EAAE,CAAA;AACxB,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAY,CAAA;AAC5D,CAAC;AAED,SAAS,SAAS,CAAC,CAAU,EAAE,CAAU;IACvC,OAAO,IAAI,CAAC,SAAS,CA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ition, PolicyDefinition } from "@executioncontrolprotocol/core";
|
|
2
|
-
/**
|
|
3
|
-
* Generated `package.json` fields written by {@link buildPlugin}.
|
|
4
|
-
* @category CLI
|
|
5
|
-
*/
|
|
6
|
-
export interface GeneratedPackageFields {
|
|
7
|
-
"ecp.extension": string;
|
|
8
|
-
exportsOclif: string;
|
|
9
|
-
oclif: Record<string, unknown>;
|
|
10
|
-
keywords: string[];
|
|
11
|
-
files: string[];
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Compute generated package.json fields from a definition.
|
|
15
|
-
* @category CLI
|
|
16
|
-
*/
|
|
17
|
-
export declare function generatedPackageFields(definition: ExtensionDefinition | PolicyDefinition, existingKeywords?: string[]): GeneratedPackageFields;
|
|
18
|
-
/**
|
|
19
|
-
* Apply generated fields onto a package.json object.
|
|
20
|
-
* @category CLI
|
|
21
|
-
*/
|
|
22
|
-
export declare function applyGeneratedFields(pkg: Record<string, unknown>, fields: GeneratedPackageFields): Record<string, unknown>;
|
|
23
|
-
//# sourceMappingURL=generated-pjson.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-pjson.d.ts","sourceRoot":"","sources":["../../src/build/generated-pjson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AAG3F;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,MAAM,CAAA;IACvB,YAAY,EAAE,MAAM,CAAA;IACpB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC9B,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAMD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,mBAAmB,GAAG,gBAAgB,EAClD,gBAAgB,GAAE,MAAM,EAAO,GAC9B,sBAAsB,CAwCxB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,MAAM,EAAE,sBAAsB,GAC7B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBzB"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { isReservedRootName } from "../reserved-names.js";
|
|
2
|
-
function isExtension(def) {
|
|
3
|
-
return "capabilities" in def;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Compute generated package.json fields from a definition.
|
|
7
|
-
* @category CLI
|
|
8
|
-
*/
|
|
9
|
-
export function generatedPackageFields(definition, existingKeywords = []) {
|
|
10
|
-
const topic = definition.name;
|
|
11
|
-
if (isReservedRootName(topic)) {
|
|
12
|
-
throw new Error(`Plugin topic "${topic}" collides with a reserved CLI root command. Rename the extension.`);
|
|
13
|
-
}
|
|
14
|
-
const summary = isExtension(definition)
|
|
15
|
-
? definition.metadata?.summary ?? definition.name
|
|
16
|
-
: definition.name;
|
|
17
|
-
const topics = {
|
|
18
|
-
[topic]: { description: summary },
|
|
19
|
-
};
|
|
20
|
-
const topicAlias = isExtension(definition) ? definition.metadata?.topicAlias : undefined;
|
|
21
|
-
if (topicAlias && topicAlias !== topic) {
|
|
22
|
-
if (isReservedRootName(topicAlias)) {
|
|
23
|
-
throw new Error(`Plugin topic alias "${topicAlias}" collides with a reserved CLI root command. Rename metadata.topicAlias.`);
|
|
24
|
-
}
|
|
25
|
-
topics[topicAlias] = { description: summary };
|
|
26
|
-
}
|
|
27
|
-
const keywords = [...new Set([...existingKeywords, "ecosystem:ecp-plugin", "oclif-plugin"])];
|
|
28
|
-
return {
|
|
29
|
-
"ecp.extension": "./dist/index.js",
|
|
30
|
-
exportsOclif: "./dist/oclif.js",
|
|
31
|
-
oclif: {
|
|
32
|
-
bin: "ecp",
|
|
33
|
-
dirname: "ecp",
|
|
34
|
-
topicSeparator: " ",
|
|
35
|
-
commands: {
|
|
36
|
-
strategy: "explicit",
|
|
37
|
-
target: "./dist/oclif.js",
|
|
38
|
-
identifier: "COMMANDS",
|
|
39
|
-
},
|
|
40
|
-
topics,
|
|
41
|
-
},
|
|
42
|
-
keywords,
|
|
43
|
-
files: ["dist", "oclif.manifest.json", "README.md"],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Apply generated fields onto a package.json object.
|
|
48
|
-
* @category CLI
|
|
49
|
-
*/
|
|
50
|
-
export function applyGeneratedFields(pkg, fields) {
|
|
51
|
-
const exportsValue = pkg.exports && typeof pkg.exports === "object" && !Array.isArray(pkg.exports)
|
|
52
|
-
? { ...pkg.exports }
|
|
53
|
-
: {};
|
|
54
|
-
exportsValue["./oclif"] = {
|
|
55
|
-
types: "./dist/oclif.d.ts",
|
|
56
|
-
import: fields.exportsOclif,
|
|
57
|
-
};
|
|
58
|
-
const ecp = pkg.ecp && typeof pkg.ecp === "object" && !Array.isArray(pkg.ecp)
|
|
59
|
-
? { ...pkg.ecp }
|
|
60
|
-
: {};
|
|
61
|
-
ecp.extension = fields["ecp.extension"];
|
|
62
|
-
const existingFiles = Array.isArray(pkg.files) ? pkg.files.map(String) : [];
|
|
63
|
-
return {
|
|
64
|
-
...pkg,
|
|
65
|
-
ecp,
|
|
66
|
-
exports: exportsValue,
|
|
67
|
-
oclif: fields.oclif,
|
|
68
|
-
keywords: fields.keywords,
|
|
69
|
-
files: [...new Set([...existingFiles, ...fields.files])],
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=generated-pjson.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generated-pjson.js","sourceRoot":"","sources":["../../src/build/generated-pjson.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAczD,SAAS,WAAW,CAAC,GAA2C;IAC9D,OAAO,cAAc,IAAI,GAAG,CAAA;AAC9B,CAAC;AAED;;;GAGG;AACH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