@orchestrator-claude/definitions 3.32.2 → 3.33.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 +113 -0
- package/agents/debug-sidecar.md +1 -1
- package/agents/doc-sidecar.md +1 -1
- package/agents/test-sidecar.md +1 -1
- package/dist/cli.js +78 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/DiffCommand.js +1 -1
- package/dist/commands/DiffCommand.js.map +1 -1
- package/dist/commands/InstallCommand.d.ts +41 -0
- package/dist/commands/InstallCommand.d.ts.map +1 -0
- package/dist/commands/InstallCommand.js +253 -0
- package/dist/commands/InstallCommand.js.map +1 -0
- package/dist/http/ApiClient.d.ts +5 -0
- package/dist/http/ApiClient.d.ts.map +1 -1
- package/dist/http/ApiClient.js.map +1 -1
- package/dist/install/DevCheckoutDetector.d.ts +66 -0
- package/dist/install/DevCheckoutDetector.d.ts.map +1 -0
- package/dist/install/DevCheckoutDetector.js +150 -0
- package/dist/install/DevCheckoutDetector.js.map +1 -0
- package/dist/install/HooksWirer.d.ts +29 -0
- package/dist/install/HooksWirer.d.ts.map +1 -0
- package/dist/install/HooksWirer.js +80 -0
- package/dist/install/HooksWirer.js.map +1 -0
- package/dist/install/LocalDiffReporter.d.ts +25 -0
- package/dist/install/LocalDiffReporter.d.ts.map +1 -0
- package/dist/install/LocalDiffReporter.js +50 -0
- package/dist/install/LocalDiffReporter.js.map +1 -0
- package/dist/install/Materializer.d.ts +67 -0
- package/dist/install/Materializer.d.ts.map +1 -0
- package/dist/install/Materializer.js +196 -0
- package/dist/install/Materializer.js.map +1 -0
- package/dist/install/McpRegistrar.d.ts +63 -0
- package/dist/install/McpRegistrar.d.ts.map +1 -0
- package/dist/install/McpRegistrar.js +114 -0
- package/dist/install/McpRegistrar.js.map +1 -0
- package/dist/install/ProcessRunner.d.ts +25 -0
- package/dist/install/ProcessRunner.d.ts.map +1 -0
- package/dist/install/ProcessRunner.js +41 -0
- package/dist/install/ProcessRunner.js.map +1 -0
- package/dist/install/ProjectSettingsNeutralizer.d.ts +39 -0
- package/dist/install/ProjectSettingsNeutralizer.d.ts.map +1 -0
- package/dist/install/ProjectSettingsNeutralizer.js +100 -0
- package/dist/install/ProjectSettingsNeutralizer.js.map +1 -0
- package/dist/install/types.d.ts +52 -0
- package/dist/install/types.d.ts.map +1 -0
- package/dist/install/types.js +8 -0
- package/dist/install/types.js.map +1 -0
- package/dist/manifest/ManifestLoader.d.ts.map +1 -1
- package/dist/manifest/ManifestLoader.js +3 -2
- package/dist/manifest/ManifestLoader.js.map +1 -1
- package/dist/manifest/types.d.ts +3 -0
- package/dist/manifest/types.d.ts.map +1 -1
- package/dist/scripts/bundle-hooks.d.ts +39 -0
- package/dist/scripts/bundle-hooks.d.ts.map +1 -0
- package/dist/scripts/bundle-hooks.js +165 -0
- package/dist/scripts/bundle-hooks.js.map +1 -0
- package/dist/scripts/generate-manifest.d.ts +22 -3
- package/dist/scripts/generate-manifest.d.ts.map +1 -1
- package/dist/scripts/generate-manifest.js +78 -35
- package/dist/scripts/generate-manifest.js.map +1 -1
- package/hooks/dangling-guard.mjs +7426 -0
- package/hooks/dangling-guard.ts +223 -6
- package/hooks/gate-guardian.mjs +463 -0
- package/hooks/lib/additional-directories-sync.ts +295 -0
- package/hooks/lib/api-client.ts +388 -7
- package/hooks/lib/session-selection.ts +81 -0
- package/hooks/mailbox-listener.mjs +259 -0
- package/hooks/post-compact.mjs +7931 -0
- package/hooks/post-implement.mjs +238 -0
- package/hooks/session-start.mjs +8234 -0
- package/hooks/session-start.ts +264 -23
- package/hooks/sprint-registry.mjs +59 -0
- package/hooks/subagent-start.mjs +289 -0
- package/hooks/subagent-stop.mjs +7793 -0
- package/hooks/subagent-stop.ts +4 -2
- package/hooks/user-prompt.mjs +329 -0
- package/hooks/workflow-guard.mjs +7805 -0
- package/hooks/workflow-guard.ts +360 -119
- package/hooks-settings-template.json +63 -0
- package/manifest.json +54 -68
- package/mcp-servers.json +48 -0
- package/package.json +10 -4
- package/personas/auditor-compliance.md +104 -0
- package/personas/cfo-conservador.md +88 -0
- package/personas/designer-perfeccionista.md +104 -0
- package/personas/diretor-cetico-fmcg.md +80 -0
- package/personas/engenheiro-cetico-construcao.md +107 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the `orch-defs install` command (RFC-040 §9.1).
|
|
3
|
+
*
|
|
4
|
+
* These types define the public contract used across the install pipeline
|
|
5
|
+
* (detection, MCP server registration, hooks wiring, project neutralization).
|
|
6
|
+
*/
|
|
7
|
+
export interface InstallCommandOptions {
|
|
8
|
+
dryRun?: boolean;
|
|
9
|
+
devCheckoutAck?: boolean;
|
|
10
|
+
homeDir?: string;
|
|
11
|
+
monorepoRoot?: string;
|
|
12
|
+
cwd?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface InstallResult {
|
|
15
|
+
success: boolean;
|
|
16
|
+
mode: 'clean-install' | 'dev-checkout';
|
|
17
|
+
dryRun: boolean;
|
|
18
|
+
summary: {
|
|
19
|
+
filesWritten: number;
|
|
20
|
+
filesUnchanged: number;
|
|
21
|
+
mcpServersRegistered: number;
|
|
22
|
+
mcpServersSkipped: number;
|
|
23
|
+
hooksWired: boolean;
|
|
24
|
+
projectNeutralized: boolean;
|
|
25
|
+
};
|
|
26
|
+
warnings: string[];
|
|
27
|
+
errors: string[];
|
|
28
|
+
}
|
|
29
|
+
export interface DetectionResult {
|
|
30
|
+
mode: 'clean-install' | 'dev-checkout';
|
|
31
|
+
matchedSlugs: string[];
|
|
32
|
+
reason: string;
|
|
33
|
+
}
|
|
34
|
+
export interface McpServerSpec {
|
|
35
|
+
name: string;
|
|
36
|
+
type?: 'stdio' | 'http';
|
|
37
|
+
command?: string;
|
|
38
|
+
args?: string[];
|
|
39
|
+
env?: Record<string, string>;
|
|
40
|
+
url?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface HooksTemplate {
|
|
43
|
+
hooks: Record<string, Array<{
|
|
44
|
+
matcher: string;
|
|
45
|
+
hooks: Array<{
|
|
46
|
+
type: 'command';
|
|
47
|
+
command: string;
|
|
48
|
+
timeout: number;
|
|
49
|
+
}>;
|
|
50
|
+
}>>;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/install/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,eAAe,GAAG,cAAc,CAAC;IACvC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,MAAM,CAAC;QACvB,oBAAoB,EAAE,MAAM,CAAC;QAC7B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,OAAO,CAAC;QACpB,kBAAkB,EAAE,OAAO,CAAC;KAC7B,CAAC;IACF,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,eAAe,GAAG,cAAc,CAAC;IACvC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CACX,MAAM,EACN,KAAK,CAAC;QACJ,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,SAAS,CAAC;YAAC,OAAO,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KACrE,CAAC,CACH,CAAC;CACH"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the `orch-defs install` command (RFC-040 §9.1).
|
|
3
|
+
*
|
|
4
|
+
* These types define the public contract used across the install pipeline
|
|
5
|
+
* (detection, MCP server registration, hooks wiring, project neutralization).
|
|
6
|
+
*/
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/install/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestLoader.d.ts","sourceRoot":"","sources":["../../src/manifest/ManifestLoader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAItF,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,WAAW,CAAC,EAAE,MAAM;IAKhC;;OAEG;IACH,IAAI,IAAI,cAAc;IAqBtB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAuBxC;;;OAGG;IACH,eAAe,IAAI;QAAE,KAAK,EAAE,eAAe,EAAE,CAAC;QAAC,OAAO,EAAE,eAAe,EAAE,CAAA;KAAE;
|
|
1
|
+
{"version":3,"file":"ManifestLoader.d.ts","sourceRoot":"","sources":["../../src/manifest/ManifestLoader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAItF,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAA+B;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,WAAW,CAAC,EAAE,MAAM;IAKhC;;OAEG;IACH,IAAI,IAAI,cAAc;IAqBtB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI;IAuBxC;;;OAGG;IACH,eAAe,IAAI;QAAE,KAAK,EAAE,eAAe,EAAE,CAAC;QAAC,OAAO,EAAE,eAAe,EAAE,CAAA;KAAE;IAiC3E;;OAEG;IACH,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,MAAM;IAQrD;;OAEG;IACH,aAAa,IAAI,KAAK,CAAC,eAAe,GAAG;QAAE,QAAQ,EAAE,kBAAkB,CAAA;KAAE,CAAC;IAc1E,cAAc,IAAI,MAAM;CAGzB"}
|
|
@@ -40,7 +40,7 @@ export class ManifestLoader {
|
|
|
40
40
|
if (!manifest.version || typeof manifest.version !== 'string') {
|
|
41
41
|
throw new Error('Manifest must have a version string.');
|
|
42
42
|
}
|
|
43
|
-
const categories = ['agents', 'skills', 'hooks', 'kb'];
|
|
43
|
+
const categories = ['agents', 'skills', 'hooks', 'personas', 'kb'];
|
|
44
44
|
for (const cat of categories) {
|
|
45
45
|
if (!Array.isArray(manifest.definitions[cat])) {
|
|
46
46
|
throw new Error(`Manifest definitions.${cat} must be an array.`);
|
|
@@ -59,6 +59,7 @@ export class ManifestLoader {
|
|
|
59
59
|
...manifest.definitions.agents,
|
|
60
60
|
...manifest.definitions.skills,
|
|
61
61
|
...manifest.definitions.hooks,
|
|
62
|
+
...manifest.definitions.personas,
|
|
62
63
|
...manifest.definitions.kb,
|
|
63
64
|
];
|
|
64
65
|
for (const entry of allEntries) {
|
|
@@ -94,7 +95,7 @@ export class ManifestLoader {
|
|
|
94
95
|
getAllEntries() {
|
|
95
96
|
const manifest = this.load();
|
|
96
97
|
const entries = [];
|
|
97
|
-
const categories = ['agents', 'skills', 'hooks', 'kb'];
|
|
98
|
+
const categories = ['agents', 'skills', 'hooks', 'personas', 'kb'];
|
|
98
99
|
for (const cat of categories) {
|
|
99
100
|
for (const entry of manifest.definitions[cat]) {
|
|
100
101
|
entries.push({ ...entry, category: cat });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManifestLoader.js","sourceRoot":"","sources":["../../src/manifest/ManifestLoader.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAE1D,MAAM,OAAO,cAAc;IACjB,QAAQ,GAA0B,IAAI,CAAC;IAC9B,WAAW,CAAS;IAErC,YAAY,WAAoB;QAC9B,8EAA8E;QAC9E,IAAI,CAAC,WAAW,GAAG,WAAW,IAAI,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,IAAI;QACF,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,IAAI,CAAC,QAAQ,CAAC;QACvB,CAAC;QAED,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;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E,CAAC,CAAC;YAC5C,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;CACF"}
|
package/dist/manifest/types.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface ManifestSchema {
|
|
|
18
18
|
agents: DefinitionEntry[];
|
|
19
19
|
skills: DefinitionEntry[];
|
|
20
20
|
hooks: DefinitionEntry[];
|
|
21
|
+
personas: DefinitionEntry[];
|
|
21
22
|
kb: DefinitionEntry[];
|
|
22
23
|
};
|
|
23
24
|
}
|
|
@@ -35,6 +36,8 @@ export interface SeedResult {
|
|
|
35
36
|
skillsFailed: number;
|
|
36
37
|
hooksSeeded: number;
|
|
37
38
|
hooksFailed: number;
|
|
39
|
+
personasSeeded: number;
|
|
40
|
+
personasFailed: number;
|
|
38
41
|
kbSeeded: number;
|
|
39
42
|
kbFailed: number;
|
|
40
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/manifest/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,6BAA6B,CAAC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE;QACX,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1B,MAAM,EAAE,eAAe,EAAE,CAAC;QAC1B,KAAK,EAAE,eAAe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,EAAE,kBAAkB,CAAC;IAC7B,MAAM,EAAE,KAAK,GAAG,SAAS,GAAG,WAAW,GAAG,eAAe,CAAC;IAC1D,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,SAAS,EAAE,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
export interface BundledHook {
|
|
3
|
+
entryFile: string;
|
|
4
|
+
outputFile: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Lists TOP-LEVEL `.ts` files directly under `hooksDir` — never recursing
|
|
8
|
+
* into `lib/` (or any other subdirectory). `hooks/lib/*.ts` files are
|
|
9
|
+
* imported BY these entry points, not separate install-time artifacts once
|
|
10
|
+
* bundled (their code is inlined into whichever top-level bundle(s)
|
|
11
|
+
* reference them).
|
|
12
|
+
*/
|
|
13
|
+
export declare function discoverTopLevelHookEntryPoints(hooksDir: string): string[];
|
|
14
|
+
/**
|
|
15
|
+
* Bundles ONE entry point to `outputPath` via esbuild, using the exact
|
|
16
|
+
* options the real build relies on (ESM + Node platform + the CJS-interop
|
|
17
|
+
* `require` shim banner — see module JSDoc for why each option is needed).
|
|
18
|
+
*
|
|
19
|
+
* IMPORTANT (empirically verified — TASK freshness-guard probe): esbuild's
|
|
20
|
+
* generated bytes depend on the ENTRY file's real on-disk path (its
|
|
21
|
+
* relative depth from `process.cwd()` affects both an embedded path comment
|
|
22
|
+
* and, less obviously, the generated CJS-interop helper call for `yaml`).
|
|
23
|
+
* Only `outputPath` is safe to redirect to a throwaway location — copying
|
|
24
|
+
* the `.ts` SOURCE to a different absolute path before bundling changes the
|
|
25
|
+
* output for reasons unrelated to source drift. Callers that need a
|
|
26
|
+
* freshness/drift check (bundle now, compare against a committed file) MUST
|
|
27
|
+
* bundle the entry from its real location and only redirect `outputPath`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function bundleOneHook(entryPath: string, outputPath: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Bundles every top-level hook entry point discovered under
|
|
32
|
+
* `<packageRoot>/hooks` into a co-located, self-contained `<name>.mjs` file.
|
|
33
|
+
* Pure side effect is writing those `.mjs` files (esbuild `buildSync`) —
|
|
34
|
+
* mirrors the `generateManifest`/`writeManifest` split in spirit (this
|
|
35
|
+
* module has no separate "pure" variant since bundling IS the write), but
|
|
36
|
+
* is safe to call repeatedly: each run fully regenerates its own outputs.
|
|
37
|
+
*/
|
|
38
|
+
export declare function bundleHooks(packageRoot?: string): BundledHook[];
|
|
39
|
+
//# sourceMappingURL=bundle-hooks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-hooks.d.ts","sourceRoot":"","sources":["../../src/scripts/bundle-hooks.ts"],"names":[],"mappings":";AA4FA,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAQ1E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAYzE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,WAAW,GAAE,MAA6B,GAAG,WAAW,EAAE,CAmBrF"}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Build-time script: bundles every TOP-LEVEL hook entry point
|
|
4
|
+
* (`hooks/*.ts`, excluding `hooks/lib/*.ts`) into a self-contained ESM
|
|
5
|
+
* `.mjs` bundle, co-located next to its `.ts` source (RFC-040 installer,
|
|
6
|
+
* TASK-043 "hook bundling", inserted between Fase 9 and Fase 10).
|
|
7
|
+
*
|
|
8
|
+
* ROOT CAUSE this fixes (measured by the AC-008 probe re-run, Fase 9):
|
|
9
|
+
* `Materializer` stages manifested hook entries as bare TypeScript source
|
|
10
|
+
* (a raw text copy driven by `manifest.json`), and `HooksWirer` wires them
|
|
11
|
+
* as `npx tsx <target>/hooks/<hook>.ts`. On a genuinely fresh install
|
|
12
|
+
* target (no monorepo, no INTERIM/C6-TD-204 symlink farm masking this on a
|
|
13
|
+
* dev machine), every hook that imports a non-builtin package (`yaml`,
|
|
14
|
+
* `@orchestrator-claude/project-root-resolver`, transitively `glob` via
|
|
15
|
+
* `lib/finops-parser.ts` — verified empirically, NOT just the `yaml` +
|
|
16
|
+
* `project-root-resolver` surface originally hypothesized) crashes at
|
|
17
|
+
* import time with `MODULE_NOT_FOUND`, before the hook's own logic ever
|
|
18
|
+
* runs.
|
|
19
|
+
*
|
|
20
|
+
* BUILD-TIME vs INSTALL-TIME bundling (verify-before-assert decision):
|
|
21
|
+
* bundling happens HERE, as a `packages/definitions` build step (wired into
|
|
22
|
+
* `npm run build` / `prepublishOnly`, alongside the existing `tsc` +
|
|
23
|
+
* `generate-manifest` steps) — NOT inside `Materializer` at install-time.
|
|
24
|
+
* Reasons, confirmed by reading the package's real build/publish flow
|
|
25
|
+
* (`package.json` `build`/`prepublishOnly` scripts) before choosing:
|
|
26
|
+
* 1. `esbuild` bundling here needs to resolve `yaml` and the WORKSPACE
|
|
27
|
+
* package `@orchestrator-claude/project-root-resolver` from
|
|
28
|
+
* node_modules — reliably available inside this monorepo (where
|
|
29
|
+
* `npm run build` always runs) but NOT guaranteed on an end user's
|
|
30
|
+
* fresh install target (the exact absence that causes the bug).
|
|
31
|
+
* 2. A single deterministic bundle is produced once at publish time and
|
|
32
|
+
* shipped as the actual package artifact (`hooks/*.mjs` is covered by
|
|
33
|
+
* the existing `files: ["hooks", ...]` entry) — every `orch-defs
|
|
34
|
+
* install` run then just copies pre-verified bytes (unchanged
|
|
35
|
+
* `Materializer`/manifest-driven flow), instead of re-invoking esbuild
|
|
36
|
+
* (and re-trusting whatever esbuild version happens to be installed)
|
|
37
|
+
* on every end-user machine at install time.
|
|
38
|
+
*
|
|
39
|
+
* ESM + a `createRequire` banner shim (not CJS, not bare `.js`) — verified
|
|
40
|
+
* empirically, not by extension convention alone:
|
|
41
|
+
* - `import.meta.url` (used by several hooks/libs for `__dirname`
|
|
42
|
+
* derivation) is used natively and correctly ONLY in esbuild's `esm`
|
|
43
|
+
* output format; the `cjs` format empties `import.meta` at build time
|
|
44
|
+
* (esbuild's own documented behavior), which crashes
|
|
45
|
+
* `fileURLToPath(import.meta.url)` at runtime (`ERR_INVALID_ARG_TYPE`,
|
|
46
|
+
* confirmed empirically during this task's Verify-Before-Assert probe).
|
|
47
|
+
* - `.mjs` (not bare `.js`) guarantees Node interprets the bundle as an ES
|
|
48
|
+
* module regardless of Node version or the absence of any nearby
|
|
49
|
+
* `package.json` `"type"` field at the install target (a bare `.js`
|
|
50
|
+
* bundle's module-type is otherwise version-dependent on Node's
|
|
51
|
+
* experimental CommonJS/ESM entry-point sniffing heuristic).
|
|
52
|
+
* - `yaml` is a genuine CommonJs package (`"type": "commonjs"`) whose
|
|
53
|
+
* internal modules `require()` Node builtins (e.g. `require('process')`
|
|
54
|
+
* in `yaml/dist/compose/composer.js`). When esbuild bundles such a
|
|
55
|
+
* lazily-wrapped CJS dependency into an `esm` bundle, its generated
|
|
56
|
+
* `require()`-forwarding shim throws `Dynamic require of "..." is not
|
|
57
|
+
* supported` at runtime UNLESS a real `require` function exists in
|
|
58
|
+
* scope — confirmed empirically. The `banner` below injects exactly
|
|
59
|
+
* that (`createRequire(import.meta.url)`), which resolves Node builtins
|
|
60
|
+
* natively; this is the standard, documented esbuild fix for this exact
|
|
61
|
+
* ESM+CJS-interop class of bug.
|
|
62
|
+
*
|
|
63
|
+
* `bundleHooks(packageRoot)` (like `generateManifest`) is written to be
|
|
64
|
+
* called directly from `scripts/sync-hook-mirrors.ts` in the future (its
|
|
65
|
+
* write-mode currently regenerates `manifest.json` after syncing hook
|
|
66
|
+
* mirrors but does NOT yet re-run this bundler — see the TASK-043
|
|
67
|
+
* implementation report's flagged follow-up finding, deliberately NOT
|
|
68
|
+
* fixed here to keep this fix's blast radius to the RFC-040 installer
|
|
69
|
+
* pipeline, per the "document, don't silently expand scope" rule).
|
|
70
|
+
*
|
|
71
|
+
* Usage: npx tsx src/scripts/bundle-hooks.ts
|
|
72
|
+
*/
|
|
73
|
+
import { readdirSync, statSync, existsSync } from 'node:fs';
|
|
74
|
+
import { resolve, join, dirname, basename } from 'node:path';
|
|
75
|
+
import { fileURLToPath } from 'node:url';
|
|
76
|
+
import { buildSync } from 'esbuild';
|
|
77
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
78
|
+
const DEFAULT_PACKAGE_ROOT = resolve(__dirname, '../..');
|
|
79
|
+
/**
|
|
80
|
+
* esbuild's generated `require()`-forwarding shim throws `Dynamic require of
|
|
81
|
+
* "..." is not supported` for CJS dependencies (e.g. `yaml`) that `require()`
|
|
82
|
+
* a Node builtin from inside a lazily-invoked CommonJS wrapper, when the
|
|
83
|
+
* output format is `esm` and no real `require` exists at runtime. Injecting
|
|
84
|
+
* a real one via `createRequire` (Node's own documented mechanism) resolves
|
|
85
|
+
* this — verified empirically against every real distributable hook.
|
|
86
|
+
*/
|
|
87
|
+
const REQUIRE_SHIM_BANNER = "import { createRequire as __createRequireShim } from 'node:module'; " +
|
|
88
|
+
'const require = __createRequireShim(import.meta.url);';
|
|
89
|
+
/**
|
|
90
|
+
* Lists TOP-LEVEL `.ts` files directly under `hooksDir` — never recursing
|
|
91
|
+
* into `lib/` (or any other subdirectory). `hooks/lib/*.ts` files are
|
|
92
|
+
* imported BY these entry points, not separate install-time artifacts once
|
|
93
|
+
* bundled (their code is inlined into whichever top-level bundle(s)
|
|
94
|
+
* reference them).
|
|
95
|
+
*/
|
|
96
|
+
export function discoverTopLevelHookEntryPoints(hooksDir) {
|
|
97
|
+
if (!existsSync(hooksDir)) {
|
|
98
|
+
return [];
|
|
99
|
+
}
|
|
100
|
+
return readdirSync(hooksDir)
|
|
101
|
+
.filter((name) => name.endsWith('.ts') && statSync(join(hooksDir, name)).isFile())
|
|
102
|
+
.sort();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Bundles ONE entry point to `outputPath` via esbuild, using the exact
|
|
106
|
+
* options the real build relies on (ESM + Node platform + the CJS-interop
|
|
107
|
+
* `require` shim banner — see module JSDoc for why each option is needed).
|
|
108
|
+
*
|
|
109
|
+
* IMPORTANT (empirically verified — TASK freshness-guard probe): esbuild's
|
|
110
|
+
* generated bytes depend on the ENTRY file's real on-disk path (its
|
|
111
|
+
* relative depth from `process.cwd()` affects both an embedded path comment
|
|
112
|
+
* and, less obviously, the generated CJS-interop helper call for `yaml`).
|
|
113
|
+
* Only `outputPath` is safe to redirect to a throwaway location — copying
|
|
114
|
+
* the `.ts` SOURCE to a different absolute path before bundling changes the
|
|
115
|
+
* output for reasons unrelated to source drift. Callers that need a
|
|
116
|
+
* freshness/drift check (bundle now, compare against a committed file) MUST
|
|
117
|
+
* bundle the entry from its real location and only redirect `outputPath`.
|
|
118
|
+
*/
|
|
119
|
+
export function bundleOneHook(entryPath, outputPath) {
|
|
120
|
+
buildSync({
|
|
121
|
+
entryPoints: [entryPath],
|
|
122
|
+
bundle: true,
|
|
123
|
+
platform: 'node',
|
|
124
|
+
format: 'esm',
|
|
125
|
+
target: 'node20',
|
|
126
|
+
banner: { js: REQUIRE_SHIM_BANNER },
|
|
127
|
+
sourcemap: false,
|
|
128
|
+
logLevel: 'silent',
|
|
129
|
+
outfile: outputPath,
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Bundles every top-level hook entry point discovered under
|
|
134
|
+
* `<packageRoot>/hooks` into a co-located, self-contained `<name>.mjs` file.
|
|
135
|
+
* Pure side effect is writing those `.mjs` files (esbuild `buildSync`) —
|
|
136
|
+
* mirrors the `generateManifest`/`writeManifest` split in spirit (this
|
|
137
|
+
* module has no separate "pure" variant since bundling IS the write), but
|
|
138
|
+
* is safe to call repeatedly: each run fully regenerates its own outputs.
|
|
139
|
+
*/
|
|
140
|
+
export function bundleHooks(packageRoot = DEFAULT_PACKAGE_ROOT) {
|
|
141
|
+
const hooksDir = resolve(packageRoot, 'hooks');
|
|
142
|
+
const entryNames = discoverTopLevelHookEntryPoints(hooksDir);
|
|
143
|
+
const results = [];
|
|
144
|
+
for (const entryName of entryNames) {
|
|
145
|
+
const entryPath = join(hooksDir, entryName);
|
|
146
|
+
const outputName = `${basename(entryName, '.ts')}.mjs`;
|
|
147
|
+
const outputPath = join(hooksDir, outputName);
|
|
148
|
+
bundleOneHook(entryPath, outputPath);
|
|
149
|
+
results.push({
|
|
150
|
+
entryFile: `hooks/${entryName}`,
|
|
151
|
+
outputFile: `hooks/${outputName}`,
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
return results;
|
|
155
|
+
}
|
|
156
|
+
// ─── CLI Entry Guard ──────────────────────────────────────────────────────────
|
|
157
|
+
const isCli = process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1];
|
|
158
|
+
if (isCli) {
|
|
159
|
+
const results = bundleHooks();
|
|
160
|
+
console.log(`Bundled ${String(results.length)} hook(s):`);
|
|
161
|
+
for (const { entryFile, outputFile } of results) {
|
|
162
|
+
console.log(` ${entryFile} -> ${outputFile}`);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
//# sourceMappingURL=bundle-hooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundle-hooks.js","sourceRoot":"","sources":["../../src/scripts/bundle-hooks.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAC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AAC,CAAC;IACjD,CAAC;AACH,CAAC"}
|
|
@@ -3,8 +3,27 @@
|
|
|
3
3
|
* Build-time script: generates manifest.json with SHA256 checksums
|
|
4
4
|
* for all definition files in the package.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* generateManifest(packageRoot) is a PURE, in-memory computation (no writes) —
|
|
7
|
+
* safe to import from other packages/scripts (e.g. scripts/sync-hook-mirrors.ts,
|
|
8
|
+
* RFC-040/TD-204 follow-up) without triggering a manifest.json write as a side
|
|
9
|
+
* effect of module import. The CLI entry point (writeManifest + isCli guard,
|
|
10
|
+
* mirroring the pattern in scripts/sync-hook-mirrors.ts) performs the actual
|
|
11
|
+
* write and is the only thing that runs when this file is executed directly.
|
|
12
|
+
*
|
|
13
|
+
* Usage: npx tsx src/scripts/generate-manifest.ts
|
|
14
|
+
*/
|
|
15
|
+
import type { ManifestSchema } from '../manifest/types.js';
|
|
16
|
+
/**
|
|
17
|
+
* Pure, in-memory computation of the definitions manifest for `packageRoot`.
|
|
18
|
+
* Performs NO writes — safe to call repeatedly (e.g. from a check-mode drift
|
|
19
|
+
* detector) without side effects. Defaults to this package's own root when
|
|
20
|
+
* called with no argument (preserves the original CLI behavior).
|
|
21
|
+
*/
|
|
22
|
+
export declare function generateManifest(packageRoot?: string): ManifestSchema;
|
|
23
|
+
/**
|
|
24
|
+
* Thin writer: computes the manifest via generateManifest() and writes it to
|
|
25
|
+
* <packageRoot>/manifest.json. This is the only function in this module that
|
|
26
|
+
* performs I/O writes.
|
|
8
27
|
*/
|
|
9
|
-
export
|
|
28
|
+
export declare function writeManifest(packageRoot?: string): ManifestSchema;
|
|
10
29
|
//# sourceMappingURL=generate-manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-manifest.d.ts","sourceRoot":"","sources":["../../src/scripts/generate-manifest.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"generate-manifest.d.ts","sourceRoot":"","sources":["../../src/scripts/generate-manifest.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAMH,OAAO,KAAK,EAAE,cAAc,EAAmB,MAAM,sBAAsB,CAAC;AAkF5E;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,GAAE,MAA6B,GAAG,cAAc,CAuC3F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,GAAE,MAA6B,GAAG,cAAc,CAKxF"}
|
|
@@ -3,24 +3,30 @@
|
|
|
3
3
|
* Build-time script: generates manifest.json with SHA256 checksums
|
|
4
4
|
* for all definition files in the package.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
6
|
+
* generateManifest(packageRoot) is a PURE, in-memory computation (no writes) —
|
|
7
|
+
* safe to import from other packages/scripts (e.g. scripts/sync-hook-mirrors.ts,
|
|
8
|
+
* RFC-040/TD-204 follow-up) without triggering a manifest.json write as a side
|
|
9
|
+
* effect of module import. The CLI entry point (writeManifest + isCli guard,
|
|
10
|
+
* mirroring the pattern in scripts/sync-hook-mirrors.ts) performs the actual
|
|
11
|
+
* write and is the only thing that runs when this file is executed directly.
|
|
12
|
+
*
|
|
13
|
+
* Usage: npx tsx src/scripts/generate-manifest.ts
|
|
8
14
|
*/
|
|
9
15
|
import { readFileSync, writeFileSync, readdirSync, statSync, existsSync } from 'node:fs';
|
|
10
16
|
import { resolve, join, dirname } from 'node:path';
|
|
11
17
|
import { createHash } from 'node:crypto';
|
|
12
18
|
import { fileURLToPath } from 'node:url';
|
|
13
19
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
const
|
|
20
|
+
const DEFAULT_PACKAGE_ROOT = resolve(__dirname, '../..');
|
|
15
21
|
function sha256(content) {
|
|
16
22
|
return `sha256:${createHash('sha256').update(content).digest('hex')}`;
|
|
17
23
|
}
|
|
18
|
-
function getPackageVersion() {
|
|
19
|
-
const pkg = JSON.parse(readFileSync(join(
|
|
24
|
+
function getPackageVersion(packageRoot) {
|
|
25
|
+
const pkg = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf-8'));
|
|
20
26
|
return pkg.version;
|
|
21
27
|
}
|
|
22
|
-
function scanDirectory(dir, extension) {
|
|
23
|
-
const fullDir = resolve(
|
|
28
|
+
function scanDirectory(packageRoot, dir, extension) {
|
|
29
|
+
const fullDir = resolve(packageRoot, dir);
|
|
24
30
|
if (!existsSync(fullDir))
|
|
25
31
|
return [];
|
|
26
32
|
const files = [];
|
|
@@ -56,13 +62,13 @@ function slugFromFile(filePath) {
|
|
|
56
62
|
const filename = parts[parts.length - 1] ?? '';
|
|
57
63
|
// For skills, use the directory name as slug (e.g., skills/release/SKILL.md -> release)
|
|
58
64
|
if (filePath.startsWith('skills/') && filename === 'SKILL.md') {
|
|
59
|
-
return parts[1] ?? filename.replace(/\.(md|json|sh|ts)$/, '');
|
|
65
|
+
return parts[1] ?? filename.replace(/\.(md|json|sh|ts|mjs)$/, '');
|
|
60
66
|
}
|
|
61
|
-
// For other files, strip extension
|
|
62
|
-
return filename.replace(/\.(md|json|sh|ts)$/, '');
|
|
67
|
+
// For other files, strip extension. `.mjs` covers TASK-043's bundled hooks.
|
|
68
|
+
return filename.replace(/\.(md|json|sh|ts|mjs)$/, '');
|
|
63
69
|
}
|
|
64
|
-
function buildEntry(filePath, version) {
|
|
65
|
-
const absolutePath = resolve(
|
|
70
|
+
function buildEntry(packageRoot, filePath, version) {
|
|
71
|
+
const absolutePath = resolve(packageRoot, filePath);
|
|
66
72
|
const content = readFileSync(absolutePath, 'utf-8');
|
|
67
73
|
return {
|
|
68
74
|
slug: slugFromFile(filePath),
|
|
@@ -73,39 +79,76 @@ function buildEntry(filePath, version) {
|
|
|
73
79
|
metadata: {},
|
|
74
80
|
};
|
|
75
81
|
}
|
|
76
|
-
|
|
77
|
-
|
|
82
|
+
// ─── Public Interface ─────────────────────────────────────────────────────────
|
|
83
|
+
/**
|
|
84
|
+
* Pure, in-memory computation of the definitions manifest for `packageRoot`.
|
|
85
|
+
* Performs NO writes — safe to call repeatedly (e.g. from a check-mode drift
|
|
86
|
+
* detector) without side effects. Defaults to this package's own root when
|
|
87
|
+
* called with no argument (preserves the original CLI behavior).
|
|
88
|
+
*/
|
|
89
|
+
export function generateManifest(packageRoot = DEFAULT_PACKAGE_ROOT) {
|
|
90
|
+
const version = getPackageVersion(packageRoot);
|
|
78
91
|
// Scan all categories
|
|
79
92
|
// ADR-017 Phase 5: workflow_definitions table dropped — workflows category removed (TD-177)
|
|
80
|
-
const agentFiles = scanDirectory('agents', '.md');
|
|
81
|
-
const skillFiles = scanDirectory('skills', '.md');
|
|
82
|
-
|
|
83
|
-
|
|
93
|
+
const agentFiles = scanDirectory(packageRoot, 'agents', '.md');
|
|
94
|
+
const skillFiles = scanDirectory(packageRoot, 'skills', '.md');
|
|
95
|
+
// TASK-043 (RFC-040 installer, hook bundling): scan pre-bundled `.mjs`
|
|
96
|
+
// hooks (produced by `bundle-hooks.ts`, run BEFORE this script in `npm run
|
|
97
|
+
// build`), never raw `.ts` source — a fresh install target has no
|
|
98
|
+
// node_modules for `npx tsx` to resolve non-builtin hook imports against
|
|
99
|
+
// (AC-008 probe finding). Scanning `.mjs` at the top level of `hooks/`
|
|
100
|
+
// naturally excludes `hooks/lib/*.ts` (still `.ts`, inlined into the
|
|
101
|
+
// bundles, no longer separately manifested).
|
|
102
|
+
const hookFiles = scanDirectory(packageRoot, 'hooks', '.mjs');
|
|
103
|
+
// RFC-040/TD-204: personas category (5th definition category). INDEX.md is a
|
|
104
|
+
// navigation catalog, not a persona definition — exclude it explicitly so
|
|
105
|
+
// adding future non-definition catalog docs to personas/ doesn't silently
|
|
106
|
+
// leak into the manifest.
|
|
107
|
+
const personaFiles = scanDirectory(packageRoot, 'personas', '.md').filter((f) => !f.endsWith('/INDEX.md') && f !== 'personas/INDEX.md');
|
|
108
|
+
const kbFiles = scanDirectory(packageRoot, 'kb', '.md');
|
|
84
109
|
const manifest = {
|
|
85
110
|
schema: 'orchestrator-definitions/v1',
|
|
86
111
|
namespace: 'orchestrator',
|
|
87
112
|
version,
|
|
88
113
|
generatedAt: new Date().toISOString(),
|
|
89
114
|
definitions: {
|
|
90
|
-
agents: agentFiles.map((f) => buildEntry(f, '1.0.0')),
|
|
91
|
-
skills: skillFiles.map((f) => buildEntry(f, '1.0.0')),
|
|
92
|
-
hooks: hookFiles.map((f) => buildEntry(f, '1.0.0')),
|
|
93
|
-
|
|
115
|
+
agents: agentFiles.map((f) => buildEntry(packageRoot, f, '1.0.0')),
|
|
116
|
+
skills: skillFiles.map((f) => buildEntry(packageRoot, f, '1.0.0')),
|
|
117
|
+
hooks: hookFiles.map((f) => buildEntry(packageRoot, f, '1.0.0')),
|
|
118
|
+
personas: personaFiles.map((f) => buildEntry(packageRoot, f, '1.0.0')),
|
|
119
|
+
kb: kbFiles.map((f) => buildEntry(packageRoot, f, '1.0.0')),
|
|
94
120
|
},
|
|
95
121
|
};
|
|
96
122
|
return manifest;
|
|
97
123
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
manifest
|
|
105
|
-
manifest.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
124
|
+
/**
|
|
125
|
+
* Thin writer: computes the manifest via generateManifest() and writes it to
|
|
126
|
+
* <packageRoot>/manifest.json. This is the only function in this module that
|
|
127
|
+
* performs I/O writes.
|
|
128
|
+
*/
|
|
129
|
+
export function writeManifest(packageRoot = DEFAULT_PACKAGE_ROOT) {
|
|
130
|
+
const manifest = generateManifest(packageRoot);
|
|
131
|
+
const outputPath = resolve(packageRoot, 'manifest.json');
|
|
132
|
+
writeFileSync(outputPath, JSON.stringify(manifest, null, 2) + '\n');
|
|
133
|
+
return manifest;
|
|
134
|
+
}
|
|
135
|
+
// ─── CLI Entry Guard ──────────────────────────────────────────────────────────
|
|
136
|
+
// Mirrors the pattern in scripts/sync-hook-mirrors.ts: importing this module
|
|
137
|
+
// (e.g. from scripts/sync-hook-mirrors.ts) must NOT trigger a write — only
|
|
138
|
+
// direct CLI execution does.
|
|
139
|
+
const isCli = process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1];
|
|
140
|
+
if (isCli) {
|
|
141
|
+
const manifest = writeManifest();
|
|
142
|
+
const totalDefs = manifest.definitions.agents.length +
|
|
143
|
+
manifest.definitions.skills.length +
|
|
144
|
+
manifest.definitions.hooks.length +
|
|
145
|
+
manifest.definitions.personas.length +
|
|
146
|
+
manifest.definitions.kb.length;
|
|
147
|
+
console.log(`Generated manifest.json (${totalDefs} definitions, version ${manifest.version})`);
|
|
148
|
+
console.log(` agents: ${manifest.definitions.agents.length}`);
|
|
149
|
+
console.log(` skills: ${manifest.definitions.skills.length}`);
|
|
150
|
+
console.log(` hooks: ${manifest.definitions.hooks.length}`);
|
|
151
|
+
console.log(` personas: ${manifest.definitions.personas.length}`);
|
|
152
|
+
console.log(` kb: ${manifest.definitions.kb.length}`);
|
|
153
|
+
}
|
|
111
154
|
//# sourceMappingURL=generate-manifest.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-manifest.js","sourceRoot":"","sources":["../../src/scripts/generate-manifest.ts"],"names":[],"mappings":";AACA
|
|
1
|
+
{"version":3,"file":"generate-manifest.js","sourceRoot":"","sources":["../../src/scripts/generate-manifest.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAA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