@powerhousedao/clint 6.3.0-dev.8 → 6.4.0-next.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/dist/build-DZIv63eB.mjs +77 -0
- package/dist/build-DZIv63eB.mjs.map +1 -0
- package/dist/{build-skills-BnqGyuCH.mjs → build-skills-BNEOn-cl.mjs} +15 -6
- package/dist/build-skills-BNEOn-cl.mjs.map +1 -0
- package/dist/dist--xzirmg-.mjs +655 -0
- package/dist/dist--xzirmg-.mjs.map +1 -0
- package/dist/glob-CGjvhxgW.mjs +48 -0
- package/dist/glob-CGjvhxgW.mjs.map +1 -0
- package/dist/index-C3-HSfKb.d.mts +389 -0
- package/dist/index-C3-HSfKb.d.mts.map +1 -0
- package/dist/index.d.mts +55 -303
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +7 -8
- package/dist/integrations/mastra/index.d.mts +248 -0
- package/dist/integrations/mastra/index.d.mts.map +1 -0
- package/dist/integrations/mastra/index.mjs +509 -0
- package/dist/integrations/mastra/index.mjs.map +1 -0
- package/dist/integrations/powerhouse/index.d.mts +4 -0
- package/dist/integrations/powerhouse/index.mjs +3 -0
- package/dist/markdown-BUeGwhbR.mjs +1588 -0
- package/dist/markdown-BUeGwhbR.mjs.map +1 -0
- package/dist/powerhouse-BDnj7kqd.mjs +1922 -0
- package/dist/powerhouse-BDnj7kqd.mjs.map +1 -0
- package/dist/{proxy-BFR8GScT.mjs → proxy-ji3EHzLn.mjs} +128 -28
- package/dist/proxy-ji3EHzLn.mjs.map +1 -0
- package/dist/remote-reactor-BQzq4yfO.mjs +69 -0
- package/dist/remote-reactor-BQzq4yfO.mjs.map +1 -0
- package/dist/{start-b7Mn2cxB.mjs → repl-Czb7u0x_.mjs} +6 -29
- package/dist/repl-Czb7u0x_.mjs.map +1 -0
- package/dist/runners/cli-runner.d.mts +339 -0
- package/dist/runners/cli-runner.d.mts.map +1 -0
- package/dist/runners/cli-runner.mjs +324 -0
- package/dist/runners/cli-runner.mjs.map +1 -0
- package/dist/runners/mastra-runner.d.mts +5 -3
- package/dist/runners/mastra-runner.d.mts.map +1 -1
- package/dist/runners/mastra-runner.mjs +10 -60
- package/dist/runners/mastra-runner.mjs.map +1 -1
- package/dist/runners/proxy-runner.d.mts +281 -0
- package/dist/runners/proxy-runner.d.mts.map +1 -0
- package/dist/runners/proxy-runner.mjs +91 -0
- package/dist/runners/proxy-runner.mjs.map +1 -0
- package/dist/schema-BEKAZGyT.mjs +47 -0
- package/dist/schema-BEKAZGyT.mjs.map +1 -0
- package/dist/{src-BebNN3xc.mjs → src-BehwgLP6.mjs} +395 -1481
- package/dist/src-BehwgLP6.mjs.map +1 -0
- package/dist/start-BHn9LIyX.mjs +37 -0
- package/dist/start-BHn9LIyX.mjs.map +1 -0
- package/dist/store-CxqB-OrX.mjs +101 -0
- package/dist/store-CxqB-OrX.mjs.map +1 -0
- package/dist/{stream-DVuufwIj.mjs → stream-BguHx7vC.mjs} +4 -2
- package/dist/{stream-DVuufwIj.mjs.map → stream-BguHx7vC.mjs.map} +1 -1
- package/dist/testing/index.d.mts +81 -0
- package/dist/testing/index.d.mts.map +1 -0
- package/dist/testing/index.mjs +131 -0
- package/dist/testing/index.mjs.map +1 -0
- package/dist/{types-CRkoD-Mm.d.mts → types-CF6GuPJd.d.mts} +241 -261
- package/dist/types-CF6GuPJd.d.mts.map +1 -0
- package/dist/types-CbHJ-ZnH.d.mts +60 -0
- package/dist/types-CbHJ-ZnH.d.mts.map +1 -0
- package/package.json +44 -25
- package/dist/build-skills-BnqGyuCH.mjs.map +0 -1
- package/dist/dist-CUltriBW.mjs +0 -1628
- package/dist/dist-CUltriBW.mjs.map +0 -1
- package/dist/drive-Bu9zoFrO.mjs +0 -85
- package/dist/drive-Bu9zoFrO.mjs.map +0 -1
- package/dist/esm-C1DOsF1a.mjs +0 -13140
- package/dist/esm-C1DOsF1a.mjs.map +0 -1
- package/dist/events-BnwGFTjv.mjs +0 -237
- package/dist/events-BnwGFTjv.mjs.map +0 -1
- package/dist/folders-BYO1Wqqb.mjs +0 -256
- package/dist/folders-BYO1Wqqb.mjs.map +0 -1
- package/dist/local-signer-EFzJV3bn.mjs +0 -128
- package/dist/local-signer-EFzJV3bn.mjs.map +0 -1
- package/dist/markdown-D-sP2zw_.mjs +0 -275
- package/dist/markdown-D-sP2zw_.mjs.map +0 -1
- package/dist/proxy-BFR8GScT.mjs.map +0 -1
- package/dist/proxy-routes-DP3ztsnS.mjs +0 -215
- package/dist/proxy-routes-DP3ztsnS.mjs.map +0 -1
- package/dist/reactor-C9VIUX1H.mjs +0 -51
- package/dist/reactor-C9VIUX1H.mjs.map +0 -1
- package/dist/runners/clint-runner.d.mts +0 -398
- package/dist/runners/clint-runner.d.mts.map +0 -1
- package/dist/runners/clint-runner.mjs +0 -519
- package/dist/runners/clint-runner.mjs.map +0 -1
- package/dist/services-9E-r0nWl.mjs +0 -999
- package/dist/services-9E-r0nWl.mjs.map +0 -1
- package/dist/src-BebNN3xc.mjs.map +0 -1
- package/dist/start-b7Mn2cxB.mjs.map +0 -1
- package/dist/subscriptions-CfiflAsI.mjs +0 -38
- package/dist/subscriptions-CfiflAsI.mjs.map +0 -1
- package/dist/switchboard-CyvOavqL.mjs +0 -57
- package/dist/switchboard-CyvOavqL.mjs.map +0 -1
- package/dist/types-CRkoD-Mm.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CF6GuPJd.d.mts","names":[],"sources":["../src/core/project-scanner.ts","../src/core/skills.ts","../src/core/types.ts","../../../node_modules/.pnpm/kysely@0.28.16/node_modules/kysely/dist/esm/kysely.d.ts","../../reactor-attachments/dist/interfaces-cFMtcMqR.d.ts","../src/integrations/powerhouse/types.ts"],"x_google_ignoreList":[3],"mappings":";;;;;;;;;;;cAYa;;;;;;;;;;;;;iBAgEG,aACd,iBACA,SAAS,iBACR;;;;;;UCzEc;EACf;EACA;;EAEA;;EAEA;;;;;;;;;;;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,KAAA;;;;;;EAMxC,cAAc;;;;;;;EAOd,wBAAwB,gBAAgB;;;;;;UAOzB,qBACf,UAAU,mBAAmB;;;;;;EAO7B,SAAS,KAAK,oBAAoB,OAAO,QAAQ,eAAe;;;;;;;;EAQhE,SAAS,oBAAoB;;;KAInB,oBAAoB,UAAU,mBAAmB,eACzD,oBAAoB,OAElB,OAAO,oBAAoB,OACxB,oBAAoB,KAAK,QAAQ,oBAAoB;;;;;;;;UAS7C,oBAAoB,UAAU,mBAAmB;;EAEhE,0BAA0B;;EAE1B,QAAQ;;EAER,SAAS,MAAM;IAAgB;;EAC/B,gBAAgB,mBAAmB;;;;;;;;;;;;;EAanC,SAAS;;EAET,gBAAgB;;;;;;;EAOhB,kBAAkB;;EAElB;;EAEA,WAAW;IACT;MACE;MACA;MACA,mBAAmB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { F as Cli, O as AgentProvider, jt as StreamChunk, z as CommandContext } from "./types-CF6GuPJd.mjs";
|
|
2
|
+
//#region src/interactive/types.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Output from processing a REPL input line.
|
|
5
|
+
*/
|
|
6
|
+
interface ReplOutput {
|
|
7
|
+
text: string;
|
|
8
|
+
type: "result" | "error" | "help" | "exit" | "empty" | "prompt" | "panel";
|
|
9
|
+
/** When type is 'prompt', the label to show instead of '> ' (e.g. "priority"). */
|
|
10
|
+
promptLabel?: string;
|
|
11
|
+
/** When type is 'panel', the panel identifier to render (e.g. 'services'). */
|
|
12
|
+
panelId?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Options for creating a REPL session.
|
|
16
|
+
*/
|
|
17
|
+
interface ReplSessionOptions {
|
|
18
|
+
cli: Cli;
|
|
19
|
+
context: CommandContext;
|
|
20
|
+
/** Agent provider for default command routing. Resolved by defineCli from integrations. */
|
|
21
|
+
agentProvider?: AgentProvider;
|
|
22
|
+
/** Thread ID for conversation memory (from --resume flag). */
|
|
23
|
+
threadId?: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* A REPL session — processes input lines and returns output.
|
|
27
|
+
* The session is the testable logic layer, independent of Ink rendering.
|
|
28
|
+
*/
|
|
29
|
+
interface ReplSession {
|
|
30
|
+
processInput(input: string): Promise<ReplOutput>;
|
|
31
|
+
getCompletions(partial: string): string[];
|
|
32
|
+
/** Get inline ghost suggestion (full input with first completion applied), or null. */
|
|
33
|
+
getGhostSuggestion(input: string): string | null;
|
|
34
|
+
/** Get suffix to append after applying a completion (e.g. ` "` for string flags). */
|
|
35
|
+
getCompletionSuffix(completion: string, input: string): string;
|
|
36
|
+
/** True when the session is waiting for a prompt answer. */
|
|
37
|
+
readonly isPrompting: boolean;
|
|
38
|
+
welcome: string | undefined;
|
|
39
|
+
/** The exit message (includes resume hint when a threadId is set). */
|
|
40
|
+
readonly exitMessage: string;
|
|
41
|
+
/** Callback invoked for each chunk during agent streaming. Receives the raw chunk and cumulative formatted text. */
|
|
42
|
+
onStreamChunk?: (chunk: StreamChunk, fullText: string) => void;
|
|
43
|
+
/** Number of trailing lines to show for tool output in the rolling window. */
|
|
44
|
+
outputWindow: number;
|
|
45
|
+
/** Abort the currently running agent stream. The LLM request is cancelled and the session stays on the same thread. */
|
|
46
|
+
abortCurrentStream(): void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* A single entry in the REPL history.
|
|
50
|
+
*/
|
|
51
|
+
interface HistoryEntry {
|
|
52
|
+
id: number;
|
|
53
|
+
input: string;
|
|
54
|
+
output: string;
|
|
55
|
+
type: ReplOutput["type"];
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { ReplSessionOptions as i, ReplOutput as n, ReplSession as r, HistoryEntry as t };
|
|
59
|
+
export {};
|
|
60
|
+
//# sourceMappingURL=types-CbHJ-ZnH.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-CbHJ-ZnH.d.mts","names":[],"sources":["../src/interactive/types.ts"],"mappings":";;;;;UAUiB;EACf;EACA;;EAEA;;EAEA;;;;;UAMe;EACf,KAAK;EACL,SAAS;;EAET,gBAAgB;;EAEhB;;;;;;UAOe;EACf,aAAa,gBAAgB,QAAQ;EACrC,eAAe;;EAEf,mBAAmB;;EAEnB,oBAAoB,oBAAoB;;WAE/B;EACT;;WAES;;EAET,iBAAiB,OAAO,aAAa;;EAErC;;EAEA;;;;;UAMe;EACf;EACA;EACA;EACA,MAAM"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/clint",
|
|
3
|
-
"version": "6.
|
|
4
|
-
"description": "The clint framework: AI-powered CLIs over the Powerhouse stack —
|
|
3
|
+
"version": "6.4.0-next.0",
|
|
4
|
+
"description": "The clint framework: AI-powered CLIs over the Powerhouse stack — mastra-runner (headless agent host), cli-runner (a package's ./cli in the terminal) and proxy-runner (one front port for a compound's members) for uniform-runners hosts.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/powerhouse-inc/powerhouse",
|
|
@@ -21,30 +21,53 @@
|
|
|
21
21
|
"import": "./dist/index.mjs",
|
|
22
22
|
"default": "./dist/index.mjs"
|
|
23
23
|
},
|
|
24
|
-
"./clint-runner": {
|
|
25
|
-
"source": "./src/runners/clint-runner.ts",
|
|
26
|
-
"types": "./dist/runners/clint-runner.d.mts",
|
|
27
|
-
"import": "./dist/runners/clint-runner.mjs",
|
|
28
|
-
"default": "./dist/runners/clint-runner.mjs"
|
|
29
|
-
},
|
|
30
24
|
"./mastra-runner": {
|
|
31
25
|
"source": "./src/runners/mastra-runner.ts",
|
|
32
26
|
"types": "./dist/runners/mastra-runner.d.mts",
|
|
33
27
|
"import": "./dist/runners/mastra-runner.mjs",
|
|
34
28
|
"default": "./dist/runners/mastra-runner.mjs"
|
|
35
29
|
},
|
|
30
|
+
"./cli-runner": {
|
|
31
|
+
"source": "./src/runners/cli-runner.ts",
|
|
32
|
+
"types": "./dist/runners/cli-runner.d.mts",
|
|
33
|
+
"import": "./dist/runners/cli-runner.mjs",
|
|
34
|
+
"default": "./dist/runners/cli-runner.mjs"
|
|
35
|
+
},
|
|
36
|
+
"./proxy-runner": {
|
|
37
|
+
"source": "./src/runners/proxy-runner.ts",
|
|
38
|
+
"types": "./dist/runners/proxy-runner.d.mts",
|
|
39
|
+
"import": "./dist/runners/proxy-runner.mjs",
|
|
40
|
+
"default": "./dist/runners/proxy-runner.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./mastra": {
|
|
43
|
+
"source": "./src/integrations/mastra/index.ts",
|
|
44
|
+
"types": "./dist/integrations/mastra/index.d.mts",
|
|
45
|
+
"import": "./dist/integrations/mastra/index.mjs",
|
|
46
|
+
"default": "./dist/integrations/mastra/index.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./powerhouse": {
|
|
49
|
+
"source": "./src/integrations/powerhouse/index.ts",
|
|
50
|
+
"types": "./dist/integrations/powerhouse/index.d.mts",
|
|
51
|
+
"import": "./dist/integrations/powerhouse/index.mjs",
|
|
52
|
+
"default": "./dist/integrations/powerhouse/index.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./testing": {
|
|
55
|
+
"source": "./src/testing/index.ts",
|
|
56
|
+
"types": "./dist/testing/index.d.mts",
|
|
57
|
+
"import": "./dist/testing/index.mjs",
|
|
58
|
+
"default": "./dist/testing/index.mjs"
|
|
59
|
+
},
|
|
36
60
|
"./package.json": "./package.json"
|
|
37
61
|
},
|
|
38
62
|
"dependencies": {
|
|
39
|
-
"@powerhousedao/host-core": "6.
|
|
40
|
-
"@powerhousedao/reactor": "6.
|
|
41
|
-
"@powerhousedao/reactor-api": "6.
|
|
42
|
-
"@powerhousedao/reactor-browser": "6.
|
|
43
|
-
"@powerhousedao/shared": "6.
|
|
44
|
-
"@powerhousedao/switchboard": "6.3.0-dev.8",
|
|
63
|
+
"@powerhousedao/host-core": "6.4.0-next.0",
|
|
64
|
+
"@powerhousedao/reactor": "6.4.0-next.0",
|
|
65
|
+
"@powerhousedao/reactor-api": "6.4.0-next.0",
|
|
66
|
+
"@powerhousedao/reactor-browser": "6.4.0-next.0",
|
|
67
|
+
"@powerhousedao/shared": "6.4.0-next.0",
|
|
45
68
|
"cli-highlight": "^2.1.11",
|
|
46
69
|
"commander": "12.1.0",
|
|
47
|
-
"document-model": "6.
|
|
70
|
+
"document-model": "6.4.0-next.0",
|
|
48
71
|
"handlebars": "^4.7.10",
|
|
49
72
|
"http-proxy": "^1.18.1",
|
|
50
73
|
"ink": "^6.8.0",
|
|
@@ -56,15 +79,11 @@
|
|
|
56
79
|
"zod": "^4.5.4"
|
|
57
80
|
},
|
|
58
81
|
"peerDependencies": {
|
|
59
|
-
"@electric-sql/pglite": ">=0.2.0",
|
|
60
82
|
"@mastra/core": ">=1.41.0",
|
|
61
83
|
"@mastra/libsql": ">=1.12.1",
|
|
62
84
|
"@mastra/memory": ">=1.20.2"
|
|
63
85
|
},
|
|
64
86
|
"peerDependenciesMeta": {
|
|
65
|
-
"@electric-sql/pglite": {
|
|
66
|
-
"optional": true
|
|
67
|
-
},
|
|
68
87
|
"@mastra/core": {
|
|
69
88
|
"optional": true
|
|
70
89
|
},
|
|
@@ -80,20 +99,20 @@
|
|
|
80
99
|
"@mastra/core": "1.67.0",
|
|
81
100
|
"@mastra/libsql": "1.23.0",
|
|
82
101
|
"@mastra/memory": "1.30.0",
|
|
83
|
-
"@powerhousedao/reactor": "6.
|
|
84
|
-
"@powerhousedao/reactor-api": "6.
|
|
85
|
-
"@powerhousedao/reactor-attachments": "6.
|
|
86
|
-
"@powerhousedao/switchboard": "6.
|
|
102
|
+
"@powerhousedao/reactor": "6.4.0-next.0",
|
|
103
|
+
"@powerhousedao/reactor-api": "6.4.0-next.0",
|
|
104
|
+
"@powerhousedao/reactor-attachments": "6.4.0-next.0",
|
|
105
|
+
"@powerhousedao/switchboard": "6.4.0-next.0",
|
|
87
106
|
"@types/http-proxy": "^1.17.15",
|
|
88
107
|
"@types/react": "19.2.14",
|
|
89
|
-
"document-model": "6.
|
|
108
|
+
"document-model": "6.4.0-next.0",
|
|
90
109
|
"expect-type": "^1.2.0",
|
|
91
110
|
"ink-testing-library": "^4.0.0",
|
|
92
111
|
"kysely": "0.28.16",
|
|
93
112
|
"kysely-pglite-dialect": "1.2.0",
|
|
94
113
|
"tsdown": "0.23.0",
|
|
95
114
|
"vitest": "5.0.3",
|
|
96
|
-
"@powerhousedao/reactor-browser": "6.
|
|
115
|
+
"@powerhousedao/reactor-browser": "6.4.0-next.0"
|
|
97
116
|
},
|
|
98
117
|
"scripts": {
|
|
99
118
|
"tsc": "tsc",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-skills-BnqGyuCH.mjs","names":[],"sources":["../src/dev/agent-profiles.ts","../src/dev/skill-builder.ts","../src/dev/skill-copier.ts","../src/dev/build-skills.ts"],"sourcesContent":["import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { renderSkillTemplate } from \"../index.js\";\nimport type { ResolvedBuildConfig } from \"./types.js\";\n\n/**\n * Find the first existing file across multiple include directories.\n */\nfunction findInIncludes(\n includes: string[],\n subdir: string,\n filename: string,\n): string | undefined {\n for (const dir of includes) {\n const p = path.join(dir, subdir, filename);\n if (fs.existsSync(p)) return p;\n }\n return undefined;\n}\n\n/**\n * Build agent profile instructions by rendering base+specialized template pairs.\n * Writes each profile as a Markdown file in {output}/agents/{ProfileName}.md.\n *\n * @returns Number of profiles built and any warnings.\n */\nexport function buildAgentProfiles(config: ResolvedBuildConfig): {\n count: number;\n warnings: string[];\n} {\n const log = config.logger;\n const profiles = config.agentProfiles;\n if (profiles.length === 0) return { count: 0, warnings: [] };\n\n const profilesSubdir = config.subdirs?.profiles ?? \"agent-profiles\";\n\n log(\"\\n--- Building agent instructions ---\");\n\n const allWarnings: string[] = [];\n let count = 0;\n\n for (const profile of profiles) {\n // Check all section files exist before rendering\n const sectionPaths: string[] = [];\n let missing = false;\n for (const section of profile.sections) {\n const found = findInIncludes(config.include, profilesSubdir, section);\n if (!found) {\n log(` SKIP ${profile.name}: missing section ${section}`);\n missing = true;\n break;\n }\n sectionPaths.push(found);\n }\n if (missing) continue;\n\n const agentContext = { ...config.context, agentName: profile.name };\n const renderOpts = config.customHelpers\n ? { helpers: config.customHelpers }\n : undefined;\n\n const renderedSections: string[] = [];\n for (let i = 0; i < profile.sections.length; i++) {\n const raw = fs.readFileSync(sectionPaths[i], \"utf-8\");\n const result = renderSkillTemplate(raw, agentContext, renderOpts);\n for (const w of result.warnings) {\n const msg = `${profile.name}/${profile.sections[i]}: ${w}`;\n allWarnings.push(msg);\n log(` WARN ${msg}`);\n }\n renderedSections.push(result.rendered.trim());\n }\n\n const combined = renderedSections.join(\"\\n\\n\") + \"\\n\";\n for (const out of config.output) {\n const agentsDir = path.join(out, \"agent-profiles\");\n fs.mkdirSync(agentsDir, { recursive: true });\n fs.writeFileSync(\n path.join(agentsDir, `${profile.name}.md`),\n combined,\n \"utf-8\",\n );\n }\n\n log(` OK ${profile.name} → ${profile.name}.md (${combined.length} chars)`);\n count++;\n }\n\n return { count, warnings: allWarnings };\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { renderSkillTemplate, slugToTitle } from \"../index.js\";\nimport type { ResolvedBuildConfig } from \"./types.js\";\n\n/**\n * Find the first existing directory across multiple include paths.\n */\nfunction findSubdir(includes: string[], subdir: string): string | undefined {\n for (const dir of includes) {\n const p = path.join(dir, subdir);\n if (fs.existsSync(p)) return p;\n }\n return undefined;\n}\n\n/**\n * Build SKILL.md files from Handlebars templates in skills-tpl/.\n * Each skill directory produces a SKILL.md + references/ folder.\n *\n * @returns Number of skills built and any warnings.\n */\nexport function buildSkillTemplates(config: ResolvedBuildConfig): {\n count: number;\n warnings: string[];\n} {\n const log = config.logger;\n const skillsTplSubdir = config.subdirs?.skillsTpl ?? \"skills-tpl\";\n const skillsTplDir = findSubdir(config.include, skillsTplSubdir);\n\n log(\"\\n--- Building SKILL.md files (templates) ---\");\n\n if (!skillsTplDir) {\n log(\" No skills-tpl/ directory — skipping.\");\n return { count: 0, warnings: [] };\n }\n\n const skillDirs = fs\n .readdirSync(skillsTplDir, { withFileTypes: true })\n .filter((d) => d.isDirectory())\n .map((d) => d.name)\n .sort();\n\n const allWarnings: string[] = [];\n const renderOpts = config.customHelpers\n ? { helpers: config.customHelpers }\n : undefined;\n let count = 0;\n\n for (const skillName of skillDirs) {\n const skillDir = path.join(skillsTplDir, skillName);\n\n // Preamble\n const preamblePath = path.join(skillDir, \".preamble.md\");\n const preambleRaw = fs.existsSync(preamblePath)\n ? fs.readFileSync(preamblePath, \"utf-8\").trim()\n : \"\";\n let preamble = \"\";\n if (preambleRaw) {\n const r = renderSkillTemplate(preambleRaw, config.context, renderOpts);\n preamble = r.rendered;\n for (const w of r.warnings) {\n const msg = `${skillName}/.preamble.md: ${w}`;\n allWarnings.push(msg);\n log(` WARN ${msg}`);\n }\n }\n\n // Scenario files (NN.name.md)\n const scenarioFiles = fs\n .readdirSync(skillDir)\n .filter((f) => /^\\d+\\..*\\.md$/.test(f))\n .sort();\n\n // Result file\n const resultPath = path.join(skillDir, \".result.md\");\n const hasResult = fs.existsSync(resultPath);\n\n if (!preamble && scenarioFiles.length === 0 && !hasResult) {\n log(` SKIP ${skillName}: no content files found`);\n continue;\n }\n\n // Render references into memory\n const files: Map<string, string> = new Map();\n const refLinks: string[] = [];\n\n for (const scenarioFile of scenarioFiles) {\n const content = fs\n .readFileSync(path.join(skillDir, scenarioFile), \"utf-8\")\n .trim();\n const r = renderSkillTemplate(content, config.context, renderOpts);\n for (const w of r.warnings) {\n const msg = `${skillName}/${scenarioFile}: ${w}`;\n allWarnings.push(msg);\n log(` WARN ${msg}`);\n }\n files.set(path.join(\"references\", scenarioFile), r.rendered + \"\\n\");\n const label = slugToTitle(\n scenarioFile.replace(/^\\d+\\./, \"\").replace(/\\.md$/, \"\"),\n );\n refLinks.push(\n `* **${label}** [references/${scenarioFile}](references/${scenarioFile})`,\n );\n }\n\n if (hasResult) {\n const content = fs.readFileSync(resultPath, \"utf-8\").trim();\n const r = renderSkillTemplate(content, config.context, renderOpts);\n for (const w of r.warnings) {\n const msg = `${skillName}/.result.md: ${w}`;\n allWarnings.push(msg);\n log(` WARN ${msg}`);\n }\n files.set(\n path.join(\"references\", \"expected-outcome.md\"),\n r.rendered + \"\\n\",\n );\n refLinks.push(\n `* **Expected Outcome** [references/expected-outcome.md](references/expected-outcome.md)`,\n );\n }\n\n // Build SKILL.md\n const description =\n config.skillDescriptions[skillName] ?? `${slugToTitle(skillName)} tasks`;\n\n const frontmatter = [\n \"---\",\n `name: ${skillName}`,\n `description: \"${description}\"`,\n \"metadata:\",\n \" author: Powerhouse\",\n ' version: \"1.0.0\"',\n \"---\",\n ].join(\"\\n\");\n\n const sections = [preamble];\n if (refLinks.length > 0) {\n sections.push(\"## Specific tasks\\n\\n\" + refLinks.join(\"\\n\"));\n }\n\n const skillMd =\n frontmatter + \"\\n\\n\" + sections.filter(Boolean).join(\"\\n\\n\") + \"\\n\";\n files.set(\"SKILL.md\", skillMd);\n\n // Copy .cli-docs.md if present (render through Handlebars)\n const cliDocsPath = path.join(skillDir, \".cli-docs.md\");\n if (fs.existsSync(cliDocsPath)) {\n const cliDocsRaw = fs.readFileSync(cliDocsPath, \"utf-8\").trim();\n if (cliDocsRaw) {\n const r = renderSkillTemplate(cliDocsRaw, config.context, renderOpts);\n for (const w of r.warnings) {\n const msg = `${skillName}/.cli-docs.md: ${w}`;\n allWarnings.push(msg);\n log(` WARN ${msg}`);\n }\n files.set(\".cli-docs.md\", r.rendered + \"\\n\");\n }\n }\n\n // Write to all output directories\n for (const out of config.output) {\n const outputDir = path.join(out, \"skills\", skillName);\n for (const [relPath, content] of files) {\n const fullPath = path.join(outputDir, relPath);\n fs.mkdirSync(path.dirname(fullPath), { recursive: true });\n fs.writeFileSync(fullPath, content, \"utf-8\");\n }\n }\n\n log(\n ` OK ${skillName} → SKILL.md + ${scenarioFiles.length + (hasResult ? 1 : 0)} references (${skillMd.length} chars)`,\n );\n count++;\n }\n\n return { count, warnings: allWarnings };\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport type { ResolvedBuildConfig } from \"./types.js\";\n\n/**\n * Copy external skills from skills-ext/ to the output directory without processing.\n *\n * @returns Number of skills copied.\n */\nexport function copyExternalSkills(config: ResolvedBuildConfig): number {\n const log = config.logger;\n const skillsExtSubdir = config.subdirs?.skillsExt ?? \"skills-ext\";\n\n log(\"\\n--- Copying external skills ---\");\n\n // Search all include dirs for skills-ext/\n let found = false;\n let total = 0;\n\n for (const dir of config.include) {\n const skillsExtDir = path.join(dir, skillsExtSubdir);\n if (!fs.existsSync(skillsExtDir)) continue;\n found = true;\n\n const skillDirs = fs\n .readdirSync(skillsExtDir, { withFileTypes: true })\n .filter((d) => d.isDirectory())\n .map((d) => d.name)\n .sort();\n\n for (const skillName of skillDirs) {\n const srcDir = path.join(skillsExtDir, skillName);\n for (const out of config.output) {\n fs.cpSync(srcDir, path.join(out, \"skills\", skillName), {\n recursive: true,\n });\n }\n log(` OK ${skillName} → copied as-is`);\n }\n\n total += skillDirs.length;\n }\n\n if (!found) {\n log(\" No skills-ext/ directory — skipping.\");\n }\n\n return total;\n}\n","import fs from \"node:fs\";\nimport path from \"node:path\";\nimport { buildAgentProfiles } from \"./agent-profiles.js\";\nimport { buildSkillTemplates } from \"./skill-builder.js\";\nimport { copyExternalSkills } from \"./skill-copier.js\";\nimport type { AgentProfile, ResolvedBuildConfig } from \"./types.js\";\n\n/**\n * Path-driven skill/profile compilation (ph-clint-dev's pipeline, decoupled\n * from the old BuildConfig.cli metadata coupling). Conventions:\n *\n * <skillsDir>/ include root (default: prompts/ then agents/)\n * agent-profiles/ profile section templates\n * skills-tpl/<skill>/ Handlebars skill templates → SKILL.md\n * skills-ext/<skill>/ external skills copied as-is\n * profiles.json optional [{ name, sections: [...] }]\n *\n * Output: <outDir> (default: dist/skills).\n */\nexport interface BuildSkillsOptions {\n rootDir: string;\n skillsDir?: string;\n agentsDir?: string;\n outDir?: string;\n context?: Record<string, unknown>;\n logger?: (msg: string) => void;\n}\n\nexport interface BuildSkillsResult {\n skills: number;\n profiles: number;\n copied: number;\n warnings: string[];\n outDir: string;\n}\n\nfunction firstExisting(\n rootDir: string,\n candidates: (string | undefined)[],\n): string[] {\n const dirs: string[] = [];\n for (const candidate of candidates) {\n if (!candidate) continue;\n const abs = path.resolve(rootDir, candidate);\n if (fs.existsSync(abs)) dirs.push(abs);\n }\n return dirs;\n}\n\nfunction readProfilesManifest(include: string[]): AgentProfile[] {\n for (const dir of include) {\n const manifest = path.join(dir, \"profiles.json\");\n if (fs.existsSync(manifest)) {\n try {\n return JSON.parse(fs.readFileSync(manifest, \"utf8\")) as AgentProfile[];\n } catch {\n return [];\n }\n }\n }\n return [];\n}\n\nexport async function buildSkills(\n options: BuildSkillsOptions,\n): Promise<BuildSkillsResult> {\n const log = options.logger ?? console.log;\n const include = firstExisting(options.rootDir, [\n options.skillsDir,\n options.agentsDir,\n \"prompts\",\n \"agents\",\n ]);\n const outDir = path.resolve(options.rootDir, options.outDir ?? \"dist/skills\");\n\n if (include.length === 0) {\n log(\n \"No prompt template directories found (prompts/ or agents/) — nothing to build.\",\n );\n return { skills: 0, profiles: 0, copied: 0, warnings: [], outDir };\n }\n\n const resolved: ResolvedBuildConfig = {\n include,\n output: [outDir],\n context: { builtAt: new Date().toISOString(), ...options.context },\n agentProfiles: readProfilesManifest(include),\n skillDescriptions: {},\n clean: true,\n logger: log,\n };\n\n for (const dir of resolved.output) {\n if (fs.existsSync(dir)) fs.rmSync(dir, { recursive: true });\n }\n\n const profiles = buildAgentProfiles(resolved);\n const templates = buildSkillTemplates(resolved);\n const copied = copyExternalSkills(resolved);\n\n return {\n skills: templates.count,\n profiles: profiles.count,\n copied,\n warnings: [...profiles.warnings, ...templates.warnings],\n outDir,\n };\n}\n"],"mappings":";;;;;;;;AAQA,SAAS,eACP,UACA,QACA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