@tagma/sdk 0.4.9 → 0.4.10
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/LICENSE +21 -21
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +3 -0
- package/dist/runner.js.map +1 -1
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +2 -6
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/dag.ts +17 -17
- package/src/registry.ts +214 -214
- package/src/runner.ts +4 -0
- package/src/schema.test.ts +97 -97
- package/src/sdk.ts +2 -2
- package/src/utils.ts +3 -8
- package/dist/templates.d.ts +0 -20
- package/dist/templates.d.ts.map +0 -1
- package/dist/templates.js +0 -93
- package/dist/templates.js.map +0 -1
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Tagma
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Tagma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAc,MAAM,SAAS,CAAC;AA+B/E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAqFD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoClF;AAED,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,YAAY,GAAG,IAAI,EAC3B,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAc,MAAM,SAAS,CAAC;AA+B/E,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC;CAC/B;AAqFD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoClF;AAED,wBAAsB,QAAQ,CAC5B,IAAI,EAAE,SAAS,EACf,MAAM,EAAE,YAAY,GAAG,IAAI,EAC3B,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,UAAU,CAAC,CAmNrB;AAED,wBAAsB,UAAU,CAC9B,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,UAAe,GACpB,OAAO,CAAC,UAAU,CAAC,CAMrB"}
|
package/dist/runner.js
CHANGED
|
@@ -154,6 +154,9 @@ export async function runSpawn(spec, driver, opts = {}) {
|
|
|
154
154
|
const { timeoutMs, signal } = opts;
|
|
155
155
|
const start = performance.now();
|
|
156
156
|
const elapsed = () => Math.round(performance.now() - start);
|
|
157
|
+
if (signal?.aborted) {
|
|
158
|
+
return failResult('Pipeline aborted before spawn', 0);
|
|
159
|
+
}
|
|
157
160
|
// R2: validate the spec before touching it. A third-party driver that
|
|
158
161
|
// returns a malformed SpawnSpec used to crash deep inside Bun.spawn with
|
|
159
162
|
// an opaque TypeError; now we report a clear "Driver X returned …" message.
|
package/dist/runner.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,+EAA+E;AAC/E,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAE/B;;;;;GAKG;AACH,SAAS,eAAe,CAAC,GAAW;IAClC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,OAAO;IACzC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,GAAG,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE;YAC1E,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;SACf,CAAC,CAAC;QACH,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACvD,+EAA+E;YAC/E,IAAI,MAAM,CAAC,QAAQ,KAAK,GAAG,EAAE,CAAC;gBAC5B,OAAO,CAAC,KAAK,CAAC,qCAAqC,MAAM,CAAC,QAAQ,YAAY,GAAG,KAAK,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACzG,CAAC;QACH,CAAC;IACH,CAAC;IAAC,M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AE,CAAC;QAClC,OAAO;YACL,QAAQ,EAAE,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ;YACvC,MAAM;YACN,MAAM,EAAE,MAAM,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,YAAY,oBAAoB,EAAE;YACzF,UAAU,EAAE,IAAI;YAChB,UAAU;YACV,SAAS;YACT,gBAAgB;YAChB,WAAW,EAAE,cAAc;SAC5B,CAAC;IACJ,CAAC;IACD,OAAO;QACL,QAAQ;QACR,MAAM;QACN,MAAM;QACN,UAAU,EAAE,IAAI;QAChB,UAAU;QACV,SAAS;QACT,gBAAgB;QAChB,qEAAqE;QACrE,qEAAqE;QACrE,WAAW,EAAE,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;KACpD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,UAAU,CAC9B,OAAe,EACf,GAAW,EACX,OAAmB,EAAE;IAErB,MAAM,IAAI,GAAc;QACtB,IAAI,EAAE,SAAS,CAAC,OAAO,CAAC;QACxB,GAAG;KACJ,CAAC;IACF,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcnD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAY1E;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAKA,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAcnD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAY1E;AAED,wBAAgB,aAAa,IAAI,MAAM,CAItC;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,MAAM,CAMjE;AAED,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAsDD,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAU5D;AAcD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,CAE7E;AAGD,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
package/dist/utils.js
CHANGED
|
@@ -25,14 +25,10 @@ export function validatePath(filePath, projectRoot) {
|
|
|
25
25
|
}
|
|
26
26
|
return resolved;
|
|
27
27
|
}
|
|
28
|
-
let runCounter = 0;
|
|
29
28
|
export function generateRunId() {
|
|
30
29
|
const ts = Date.now().toString(36);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
// the same millisecond or after a process restart resets the counter.
|
|
34
|
-
const rand = randomBytes(3).toString('hex');
|
|
35
|
-
return `run_${ts}_${seq}_${rand}`;
|
|
30
|
+
const rand = randomBytes(6).toString('hex');
|
|
31
|
+
return `run_${ts}_${rand}`;
|
|
36
32
|
}
|
|
37
33
|
export function truncateForName(text, maxLen = 40) {
|
|
38
34
|
const first = text.split('\n')[0].trim();
|
package/dist/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,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CAAC;AACjD,CAAC;AAED,wDAAwD;AACxD,MAAM,UAAU,gBAAgB;IAC9B,aAAa,GAAG,IAAI,CAAC;AACvB,CAAC"}
|
package/package.json
CHANGED
package/src/dag.ts
CHANGED
|
@@ -178,22 +178,22 @@ export interface RawDag {
|
|
|
178
178
|
}
|
|
179
179
|
|
|
180
180
|
/**
|
|
181
|
-
* Build a lightweight DAG from a raw (unresolved) pipeline config.
|
|
182
|
-
* Unlike buildDag, this function:
|
|
183
|
-
* - Does not require a workDir or resolved PipelineConfig
|
|
184
|
-
* - Is lenient: missing or ambiguous refs are silently skipped
|
|
185
|
-
*
|
|
186
|
-
* Intended for the visual editor to render the flow graph before a pipeline is run.
|
|
187
|
-
*/
|
|
188
|
-
export function buildRawDag(config: RawPipelineConfig): RawDag {
|
|
181
|
+
* Build a lightweight DAG from a raw (unresolved) pipeline config.
|
|
182
|
+
* Unlike buildDag, this function:
|
|
183
|
+
* - Does not require a workDir or resolved PipelineConfig
|
|
184
|
+
* - Is lenient: missing or ambiguous refs are silently skipped
|
|
185
|
+
*
|
|
186
|
+
* Intended for the visual editor to render the flow graph before a pipeline is run.
|
|
187
|
+
*/
|
|
188
|
+
export function buildRawDag(config: RawPipelineConfig): RawDag {
|
|
189
189
|
const nodes = new Map<string, RawDagNode>();
|
|
190
190
|
const bareToQualified = new Map<string, string>();
|
|
191
191
|
|
|
192
|
-
// 1. Register all concrete tasks
|
|
193
|
-
for (const track of config.tracks) {
|
|
194
|
-
for (const task of track.tasks) {
|
|
195
|
-
const qid = `${track.id}.${task.id}`;
|
|
196
|
-
if (nodes.has(qid)) continue; // skip duplicates silently
|
|
192
|
+
// 1. Register all concrete tasks
|
|
193
|
+
for (const track of config.tracks) {
|
|
194
|
+
for (const task of track.tasks) {
|
|
195
|
+
const qid = `${track.id}.${task.id}`;
|
|
196
|
+
if (nodes.has(qid)) continue; // skip duplicates silently
|
|
197
197
|
|
|
198
198
|
if (bareToQualified.has(task.id)) {
|
|
199
199
|
bareToQualified.set(task.id, '__ambiguous__');
|
|
@@ -216,10 +216,10 @@ export function buildRawDag(config: RawPipelineConfig): RawDag {
|
|
|
216
216
|
|
|
217
217
|
const edges: { from: string; to: string }[] = [];
|
|
218
218
|
|
|
219
|
-
for (const track of config.tracks) {
|
|
220
|
-
for (const task of track.tasks) {
|
|
221
|
-
const qid = `${track.id}.${task.id}`;
|
|
222
|
-
const deps: string[] = [];
|
|
219
|
+
for (const track of config.tracks) {
|
|
220
|
+
for (const task of track.tasks) {
|
|
221
|
+
const qid = `${track.id}.${task.id}`;
|
|
222
|
+
const deps: string[] = [];
|
|
223
223
|
|
|
224
224
|
for (const ref of task.depends_on ?? []) {
|
|
225
225
|
const resolved = tryResolve(ref, track.id);
|
package/src/registry.ts
CHANGED
|
@@ -1,214 +1,214 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
PluginCategory, DriverPlugin, TriggerPlugin,
|
|
3
|
-
CompletionPlugin, MiddlewarePlugin, PluginManifest,
|
|
4
|
-
} from './types';
|
|
5
|
-
|
|
6
|
-
type PluginType = DriverPlugin | TriggerPlugin | CompletionPlugin | MiddlewarePlugin;
|
|
7
|
-
|
|
8
|
-
const VALID_CATEGORIES: ReadonlySet<PluginCategory> = new Set([
|
|
9
|
-
'drivers', 'triggers', 'completions', 'middlewares',
|
|
10
|
-
]);
|
|
11
|
-
|
|
12
|
-
const registries = {
|
|
13
|
-
drivers: new Map<string, DriverPlugin>(),
|
|
14
|
-
triggers: new Map<string, TriggerPlugin>(),
|
|
15
|
-
completions: new Map<string, CompletionPlugin>(),
|
|
16
|
-
middlewares: new Map<string, MiddlewarePlugin>(),
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Minimal contract enforcement so a malformed plugin fails fast at
|
|
21
|
-
* registration time rather than crashing the engine mid-run.
|
|
22
|
-
*
|
|
23
|
-
* For drivers we materialize `capabilities` and assert each field is a
|
|
24
|
-
* boolean — otherwise a plugin author can write
|
|
25
|
-
* get capabilities() { throw new Error('boom') }
|
|
26
|
-
* and pass the basic typeof check, then crash preflight when the engine
|
|
27
|
-
* touches `driver.capabilities.sessionResume`. (R8)
|
|
28
|
-
*/
|
|
29
|
-
function validateContract(category: PluginCategory, handler: unknown): void {
|
|
30
|
-
if (!handler || typeof handler !== 'object') {
|
|
31
|
-
throw new Error(`Plugin handler for category "${category}" must be an object`);
|
|
32
|
-
}
|
|
33
|
-
const h = handler as Record<string, unknown>;
|
|
34
|
-
if (typeof h.name !== 'string' || h.name.length === 0) {
|
|
35
|
-
throw new Error(`Plugin handler for category "${category}" must declare a non-empty "name"`);
|
|
36
|
-
}
|
|
37
|
-
switch (category) {
|
|
38
|
-
case 'drivers': {
|
|
39
|
-
if (typeof h.buildCommand !== 'function') {
|
|
40
|
-
throw new Error(`drivers plugin "${h.name}" must export buildCommand()`);
|
|
41
|
-
}
|
|
42
|
-
// Materialize capabilities — this triggers any throwing getter NOW
|
|
43
|
-
// instead of during preflight.
|
|
44
|
-
let caps: unknown;
|
|
45
|
-
try {
|
|
46
|
-
caps = h.capabilities;
|
|
47
|
-
} catch (err) {
|
|
48
|
-
throw new Error(
|
|
49
|
-
`drivers plugin "${h.name}" capabilities accessor threw: ` +
|
|
50
|
-
(err instanceof Error ? err.message : String(err))
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
if (!caps || typeof caps !== 'object') {
|
|
54
|
-
throw new Error(`drivers plugin "${h.name}" must declare capabilities object`);
|
|
55
|
-
}
|
|
56
|
-
const c = caps as Record<string, unknown>;
|
|
57
|
-
for (const field of ['sessionResume', 'systemPrompt', 'outputFormat'] as const) {
|
|
58
|
-
if (typeof c[field] !== 'boolean') {
|
|
59
|
-
throw new Error(
|
|
60
|
-
`drivers plugin "${h.name}".capabilities.${field} must be a boolean (got ${typeof c[field]})`
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
// Optional methods, but if present must be functions.
|
|
65
|
-
for (const opt of ['parseResult', 'resolveModel', 'resolveTools'] as const) {
|
|
66
|
-
if (h[opt] !== undefined && typeof h[opt] !== 'function') {
|
|
67
|
-
throw new Error(
|
|
68
|
-
`drivers plugin "${h.name}".${opt} must be a function or undefined`
|
|
69
|
-
);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
case 'triggers':
|
|
75
|
-
if (typeof h.watch !== 'function') {
|
|
76
|
-
throw new Error(`triggers plugin "${h.name}" must export watch()`);
|
|
77
|
-
}
|
|
78
|
-
break;
|
|
79
|
-
case 'completions':
|
|
80
|
-
if (typeof h.check !== 'function') {
|
|
81
|
-
throw new Error(`completions plugin "${h.name}" must export check()`);
|
|
82
|
-
}
|
|
83
|
-
break;
|
|
84
|
-
case 'middlewares':
|
|
85
|
-
if (typeof h.enhance !== 'function') {
|
|
86
|
-
throw new Error(`middlewares plugin "${h.name}" must export enhance()`);
|
|
87
|
-
}
|
|
88
|
-
break;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
export type RegisterResult = 'registered' | 'replaced' | 'unchanged';
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Register a plugin under (category, type). Returns:
|
|
96
|
-
* - 'registered' on first registration
|
|
97
|
-
* - 'replaced' when an existing entry was overwritten with a different handler
|
|
98
|
-
* - 'unchanged' when the same handler instance was already present
|
|
99
|
-
*
|
|
100
|
-
* Throws if `category` is unknown, `type` is empty, or `handler` violates the
|
|
101
|
-
* minimum interface contract for the category.
|
|
102
|
-
*/
|
|
103
|
-
export function registerPlugin<T extends PluginType>(
|
|
104
|
-
category: PluginCategory, type: string, handler: T,
|
|
105
|
-
): RegisterResult {
|
|
106
|
-
if (!VALID_CATEGORIES.has(category)) {
|
|
107
|
-
throw new Error(`Unknown plugin category "${category}"`);
|
|
108
|
-
}
|
|
109
|
-
if (typeof type !== 'string' || type.length === 0) {
|
|
110
|
-
throw new Error(`Plugin type must be a non-empty string (category="${category}")`);
|
|
111
|
-
}
|
|
112
|
-
validateContract(category, handler);
|
|
113
|
-
const registry = registries[category] as Map<string, T>;
|
|
114
|
-
const existing = registry.get(type);
|
|
115
|
-
if (existing === handler) return 'unchanged';
|
|
116
|
-
const wasReplaced = existing !== undefined;
|
|
117
|
-
registry.set(type, handler);
|
|
118
|
-
return wasReplaced ? 'replaced' : 'registered';
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Remove a plugin from the in-process registry. Returns true if a plugin
|
|
123
|
-
* was actually removed. Note: ESM module caching is not affected, so
|
|
124
|
-
* re-importing the same file after unregister will yield the cached module —
|
|
125
|
-
* callers wanting a fresh load must restart the host process.
|
|
126
|
-
*/
|
|
127
|
-
export function unregisterPlugin(category: PluginCategory, type: string): boolean {
|
|
128
|
-
if (!VALID_CATEGORIES.has(category)) return false;
|
|
129
|
-
return registries[category].delete(type);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export function getHandler<T extends PluginType>(
|
|
133
|
-
category: PluginCategory, type: string,
|
|
134
|
-
): T {
|
|
135
|
-
const handler = registries[category].get(type);
|
|
136
|
-
if (!handler) {
|
|
137
|
-
throw new Error(
|
|
138
|
-
`${category} type "${type}" not registered.\n` +
|
|
139
|
-
`Install the plugin: bun add @tagma/${category.replace(/s$/, '')}-${type}`
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
return handler as T;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export function hasHandler(category: PluginCategory, type: string): boolean {
|
|
146
|
-
return registries[category].has(type);
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
// Plugin name must be a scoped npm package or a tagma-prefixed package.
|
|
150
|
-
// Reject absolute/relative paths and suspicious patterns to prevent
|
|
151
|
-
// arbitrary code execution via crafted YAML configs.
|
|
152
|
-
export const PLUGIN_NAME_RE = /^(@[a-z0-9-]+\/[a-z0-9._-]+|tagma-plugin-[a-z0-9._-]+)$/;
|
|
153
|
-
|
|
154
|
-
export function isValidPluginName(name: unknown): name is string {
|
|
155
|
-
return typeof name === 'string' && PLUGIN_NAME_RE.test(name);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Parse and validate the `tagmaPlugin` field of a `package.json` blob.
|
|
160
|
-
*
|
|
161
|
-
* Returns the strongly-typed manifest if the field is present and
|
|
162
|
-
* well-formed (`category` is one of the four known categories and `type`
|
|
163
|
-
* is a non-empty string). Returns `null` if the field is absent — that
|
|
164
|
-
* is the host's signal that the package is a library, not a plugin.
|
|
165
|
-
*
|
|
166
|
-
* Throws if the field is present but malformed: that's a packaging bug
|
|
167
|
-
* the plugin author should hear about loudly, not a silent skip.
|
|
168
|
-
*
|
|
169
|
-
* Hosts use this during auto-discovery to decide whether to load a
|
|
170
|
-
* package as a plugin without having to dynamically `import()` it.
|
|
171
|
-
*/
|
|
172
|
-
export function readPluginManifest(pkgJson: unknown): PluginManifest | null {
|
|
173
|
-
if (!pkgJson || typeof pkgJson !== 'object') return null;
|
|
174
|
-
const raw = (pkgJson as Record<string, unknown>).tagmaPlugin;
|
|
175
|
-
if (raw === undefined) return null;
|
|
176
|
-
if (!raw || typeof raw !== 'object') {
|
|
177
|
-
throw new Error('tagmaPlugin field must be an object with { category, type }');
|
|
178
|
-
}
|
|
179
|
-
const m = raw as Record<string, unknown>;
|
|
180
|
-
const category = m.category;
|
|
181
|
-
const type = m.type;
|
|
182
|
-
if (typeof category !== 'string' || !VALID_CATEGORIES.has(category as PluginCategory)) {
|
|
183
|
-
throw new Error(
|
|
184
|
-
`tagmaPlugin.category must be one of ${[...VALID_CATEGORIES].join(', ')}, got ${JSON.stringify(category)}`
|
|
185
|
-
);
|
|
186
|
-
}
|
|
187
|
-
if (typeof type !== 'string' || type.length === 0) {
|
|
188
|
-
throw new Error(`tagmaPlugin.type must be a non-empty string, got ${JSON.stringify(type)}`);
|
|
189
|
-
}
|
|
190
|
-
return { category: category as PluginCategory, type };
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export async function loadPlugins(pluginNames: readonly string[]): Promise<void> {
|
|
194
|
-
for (const name of pluginNames) {
|
|
195
|
-
if (!isValidPluginName(name)) {
|
|
196
|
-
throw new Error(
|
|
197
|
-
`Plugin "${name}" rejected: plugin names must be scoped npm packages ` +
|
|
198
|
-
`(e.g. @tagma/trigger-xyz) or tagma-plugin-* packages. ` +
|
|
199
|
-
`Relative/absolute paths are not allowed.`
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
const mod = await import(name);
|
|
203
|
-
if (!mod.pluginCategory || !mod.pluginType || !mod.default) {
|
|
204
|
-
throw new Error(
|
|
205
|
-
`Plugin "${name}" must export pluginCategory, pluginType, and default`
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
registerPlugin(mod.pluginCategory, mod.pluginType, mod.default);
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export function listRegistered(category: PluginCategory): string[] {
|
|
213
|
-
return [...registries[category].keys()];
|
|
214
|
-
}
|
|
1
|
+
import type {
|
|
2
|
+
PluginCategory, DriverPlugin, TriggerPlugin,
|
|
3
|
+
CompletionPlugin, MiddlewarePlugin, PluginManifest,
|
|
4
|
+
} from './types';
|
|
5
|
+
|
|
6
|
+
type PluginType = DriverPlugin | TriggerPlugin | CompletionPlugin | MiddlewarePlugin;
|
|
7
|
+
|
|
8
|
+
const VALID_CATEGORIES: ReadonlySet<PluginCategory> = new Set([
|
|
9
|
+
'drivers', 'triggers', 'completions', 'middlewares',
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
const registries = {
|
|
13
|
+
drivers: new Map<string, DriverPlugin>(),
|
|
14
|
+
triggers: new Map<string, TriggerPlugin>(),
|
|
15
|
+
completions: new Map<string, CompletionPlugin>(),
|
|
16
|
+
middlewares: new Map<string, MiddlewarePlugin>(),
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Minimal contract enforcement so a malformed plugin fails fast at
|
|
21
|
+
* registration time rather than crashing the engine mid-run.
|
|
22
|
+
*
|
|
23
|
+
* For drivers we materialize `capabilities` and assert each field is a
|
|
24
|
+
* boolean — otherwise a plugin author can write
|
|
25
|
+
* get capabilities() { throw new Error('boom') }
|
|
26
|
+
* and pass the basic typeof check, then crash preflight when the engine
|
|
27
|
+
* touches `driver.capabilities.sessionResume`. (R8)
|
|
28
|
+
*/
|
|
29
|
+
function validateContract(category: PluginCategory, handler: unknown): void {
|
|
30
|
+
if (!handler || typeof handler !== 'object') {
|
|
31
|
+
throw new Error(`Plugin handler for category "${category}" must be an object`);
|
|
32
|
+
}
|
|
33
|
+
const h = handler as Record<string, unknown>;
|
|
34
|
+
if (typeof h.name !== 'string' || h.name.length === 0) {
|
|
35
|
+
throw new Error(`Plugin handler for category "${category}" must declare a non-empty "name"`);
|
|
36
|
+
}
|
|
37
|
+
switch (category) {
|
|
38
|
+
case 'drivers': {
|
|
39
|
+
if (typeof h.buildCommand !== 'function') {
|
|
40
|
+
throw new Error(`drivers plugin "${h.name}" must export buildCommand()`);
|
|
41
|
+
}
|
|
42
|
+
// Materialize capabilities — this triggers any throwing getter NOW
|
|
43
|
+
// instead of during preflight.
|
|
44
|
+
let caps: unknown;
|
|
45
|
+
try {
|
|
46
|
+
caps = h.capabilities;
|
|
47
|
+
} catch (err) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
`drivers plugin "${h.name}" capabilities accessor threw: ` +
|
|
50
|
+
(err instanceof Error ? err.message : String(err))
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
if (!caps || typeof caps !== 'object') {
|
|
54
|
+
throw new Error(`drivers plugin "${h.name}" must declare capabilities object`);
|
|
55
|
+
}
|
|
56
|
+
const c = caps as Record<string, unknown>;
|
|
57
|
+
for (const field of ['sessionResume', 'systemPrompt', 'outputFormat'] as const) {
|
|
58
|
+
if (typeof c[field] !== 'boolean') {
|
|
59
|
+
throw new Error(
|
|
60
|
+
`drivers plugin "${h.name}".capabilities.${field} must be a boolean (got ${typeof c[field]})`
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// Optional methods, but if present must be functions.
|
|
65
|
+
for (const opt of ['parseResult', 'resolveModel', 'resolveTools'] as const) {
|
|
66
|
+
if (h[opt] !== undefined && typeof h[opt] !== 'function') {
|
|
67
|
+
throw new Error(
|
|
68
|
+
`drivers plugin "${h.name}".${opt} must be a function or undefined`
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
case 'triggers':
|
|
75
|
+
if (typeof h.watch !== 'function') {
|
|
76
|
+
throw new Error(`triggers plugin "${h.name}" must export watch()`);
|
|
77
|
+
}
|
|
78
|
+
break;
|
|
79
|
+
case 'completions':
|
|
80
|
+
if (typeof h.check !== 'function') {
|
|
81
|
+
throw new Error(`completions plugin "${h.name}" must export check()`);
|
|
82
|
+
}
|
|
83
|
+
break;
|
|
84
|
+
case 'middlewares':
|
|
85
|
+
if (typeof h.enhance !== 'function') {
|
|
86
|
+
throw new Error(`middlewares plugin "${h.name}" must export enhance()`);
|
|
87
|
+
}
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export type RegisterResult = 'registered' | 'replaced' | 'unchanged';
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Register a plugin under (category, type). Returns:
|
|
96
|
+
* - 'registered' on first registration
|
|
97
|
+
* - 'replaced' when an existing entry was overwritten with a different handler
|
|
98
|
+
* - 'unchanged' when the same handler instance was already present
|
|
99
|
+
*
|
|
100
|
+
* Throws if `category` is unknown, `type` is empty, or `handler` violates the
|
|
101
|
+
* minimum interface contract for the category.
|
|
102
|
+
*/
|
|
103
|
+
export function registerPlugin<T extends PluginType>(
|
|
104
|
+
category: PluginCategory, type: string, handler: T,
|
|
105
|
+
): RegisterResult {
|
|
106
|
+
if (!VALID_CATEGORIES.has(category)) {
|
|
107
|
+
throw new Error(`Unknown plugin category "${category}"`);
|
|
108
|
+
}
|
|
109
|
+
if (typeof type !== 'string' || type.length === 0) {
|
|
110
|
+
throw new Error(`Plugin type must be a non-empty string (category="${category}")`);
|
|
111
|
+
}
|
|
112
|
+
validateContract(category, handler);
|
|
113
|
+
const registry = registries[category] as Map<string, T>;
|
|
114
|
+
const existing = registry.get(type);
|
|
115
|
+
if (existing === handler) return 'unchanged';
|
|
116
|
+
const wasReplaced = existing !== undefined;
|
|
117
|
+
registry.set(type, handler);
|
|
118
|
+
return wasReplaced ? 'replaced' : 'registered';
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Remove a plugin from the in-process registry. Returns true if a plugin
|
|
123
|
+
* was actually removed. Note: ESM module caching is not affected, so
|
|
124
|
+
* re-importing the same file after unregister will yield the cached module —
|
|
125
|
+
* callers wanting a fresh load must restart the host process.
|
|
126
|
+
*/
|
|
127
|
+
export function unregisterPlugin(category: PluginCategory, type: string): boolean {
|
|
128
|
+
if (!VALID_CATEGORIES.has(category)) return false;
|
|
129
|
+
return registries[category].delete(type);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function getHandler<T extends PluginType>(
|
|
133
|
+
category: PluginCategory, type: string,
|
|
134
|
+
): T {
|
|
135
|
+
const handler = registries[category].get(type);
|
|
136
|
+
if (!handler) {
|
|
137
|
+
throw new Error(
|
|
138
|
+
`${category} type "${type}" not registered.\n` +
|
|
139
|
+
`Install the plugin: bun add @tagma/${category.replace(/s$/, '')}-${type}`
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
return handler as T;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function hasHandler(category: PluginCategory, type: string): boolean {
|
|
146
|
+
return registries[category].has(type);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Plugin name must be a scoped npm package or a tagma-prefixed package.
|
|
150
|
+
// Reject absolute/relative paths and suspicious patterns to prevent
|
|
151
|
+
// arbitrary code execution via crafted YAML configs.
|
|
152
|
+
export const PLUGIN_NAME_RE = /^(@[a-z0-9-]+\/[a-z0-9._-]+|tagma-plugin-[a-z0-9._-]+)$/;
|
|
153
|
+
|
|
154
|
+
export function isValidPluginName(name: unknown): name is string {
|
|
155
|
+
return typeof name === 'string' && PLUGIN_NAME_RE.test(name);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Parse and validate the `tagmaPlugin` field of a `package.json` blob.
|
|
160
|
+
*
|
|
161
|
+
* Returns the strongly-typed manifest if the field is present and
|
|
162
|
+
* well-formed (`category` is one of the four known categories and `type`
|
|
163
|
+
* is a non-empty string). Returns `null` if the field is absent — that
|
|
164
|
+
* is the host's signal that the package is a library, not a plugin.
|
|
165
|
+
*
|
|
166
|
+
* Throws if the field is present but malformed: that's a packaging bug
|
|
167
|
+
* the plugin author should hear about loudly, not a silent skip.
|
|
168
|
+
*
|
|
169
|
+
* Hosts use this during auto-discovery to decide whether to load a
|
|
170
|
+
* package as a plugin without having to dynamically `import()` it.
|
|
171
|
+
*/
|
|
172
|
+
export function readPluginManifest(pkgJson: unknown): PluginManifest | null {
|
|
173
|
+
if (!pkgJson || typeof pkgJson !== 'object') return null;
|
|
174
|
+
const raw = (pkgJson as Record<string, unknown>).tagmaPlugin;
|
|
175
|
+
if (raw === undefined) return null;
|
|
176
|
+
if (!raw || typeof raw !== 'object') {
|
|
177
|
+
throw new Error('tagmaPlugin field must be an object with { category, type }');
|
|
178
|
+
}
|
|
179
|
+
const m = raw as Record<string, unknown>;
|
|
180
|
+
const category = m.category;
|
|
181
|
+
const type = m.type;
|
|
182
|
+
if (typeof category !== 'string' || !VALID_CATEGORIES.has(category as PluginCategory)) {
|
|
183
|
+
throw new Error(
|
|
184
|
+
`tagmaPlugin.category must be one of ${[...VALID_CATEGORIES].join(', ')}, got ${JSON.stringify(category)}`
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
if (typeof type !== 'string' || type.length === 0) {
|
|
188
|
+
throw new Error(`tagmaPlugin.type must be a non-empty string, got ${JSON.stringify(type)}`);
|
|
189
|
+
}
|
|
190
|
+
return { category: category as PluginCategory, type };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export async function loadPlugins(pluginNames: readonly string[]): Promise<void> {
|
|
194
|
+
for (const name of pluginNames) {
|
|
195
|
+
if (!isValidPluginName(name)) {
|
|
196
|
+
throw new Error(
|
|
197
|
+
`Plugin "${name}" rejected: plugin names must be scoped npm packages ` +
|
|
198
|
+
`(e.g. @tagma/trigger-xyz) or tagma-plugin-* packages. ` +
|
|
199
|
+
`Relative/absolute paths are not allowed.`
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
const mod = await import(name);
|
|
203
|
+
if (!mod.pluginCategory || !mod.pluginType || !mod.default) {
|
|
204
|
+
throw new Error(
|
|
205
|
+
`Plugin "${name}" must export pluginCategory, pluginType, and default`
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
registerPlugin(mod.pluginCategory, mod.pluginType, mod.default);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export function listRegistered(category: PluginCategory): string[] {
|
|
213
|
+
return [...registries[category].keys()];
|
|
214
|
+
}
|
package/src/runner.ts
CHANGED
|
@@ -176,6 +176,10 @@ export async function runSpawn(
|
|
|
176
176
|
const start = performance.now();
|
|
177
177
|
const elapsed = () => Math.round(performance.now() - start);
|
|
178
178
|
|
|
179
|
+
if (signal?.aborted) {
|
|
180
|
+
return failResult('Pipeline aborted before spawn', 0);
|
|
181
|
+
}
|
|
182
|
+
|
|
179
183
|
// R2: validate the spec before touching it. A third-party driver that
|
|
180
184
|
// returns a malformed SpawnSpec used to crash deep inside Bun.spawn with
|
|
181
185
|
// an opaque TypeError; now we report a clear "Driver X returned …" message.
|
package/src/schema.test.ts
CHANGED
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { describe, expect, test } from 'bun:test';
|
|
2
|
-
import yaml from 'js-yaml';
|
|
3
|
-
import type { PipelineConfig, RawPipelineConfig } from './types';
|
|
4
|
-
import { parseYaml, deresolvePipeline, serializePipeline } from './schema';
|
|
5
|
-
|
|
6
|
-
function parsePipelineYaml(content: string): RawPipelineConfig {
|
|
7
|
-
const doc = yaml.load(content) as { pipeline: RawPipelineConfig };
|
|
8
|
-
return doc.pipeline;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
describe('completion default serialization', () => {
|
|
12
|
-
test('serializePipeline omits default exit_code completions from raw configs', () => {
|
|
13
|
-
const raw: RawPipelineConfig = {
|
|
14
|
-
name: 'Serialize Defaults',
|
|
15
|
-
tracks: [
|
|
16
|
-
{
|
|
17
|
-
id: 'track_a',
|
|
18
|
-
name: 'Track A',
|
|
19
|
-
tasks: [
|
|
20
|
-
{ id: 'task_1', prompt: 'hello', completion: { type: 'exit_code' } },
|
|
21
|
-
{ id: 'task_2', prompt: 'world', completion: { type: 'exit_code', expect: 0 } },
|
|
22
|
-
{ id: 'task_3', prompt: 'keep me', completion: { type: 'exit_code', expect: 2 } },
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const parsed = parsePipelineYaml(serializePipeline(raw));
|
|
29
|
-
expect(parsed.tracks[0].tasks[0].completion).toBeUndefined();
|
|
30
|
-
expect(parsed.tracks[0].tasks[1].completion).toBeUndefined();
|
|
31
|
-
expect(parsed.tracks[0].tasks[2].completion).toEqual({ type: 'exit_code', expect: 2 });
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
test('serializePipeline preserves non-default completion plugins', () => {
|
|
35
|
-
const raw: RawPipelineConfig = {
|
|
36
|
-
name: 'Serialize Explicit',
|
|
37
|
-
tracks: [
|
|
38
|
-
{
|
|
39
|
-
id: 'track_a',
|
|
40
|
-
name: 'Track A',
|
|
41
|
-
tasks: [
|
|
42
|
-
{ id: 'task_1', prompt: 'check file', completion: { type: 'file_exists', path: './out.txt' } },
|
|
43
|
-
],
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const parsed = parsePipelineYaml(serializePipeline(raw));
|
|
49
|
-
expect(parsed.tracks[0].tasks[0].completion).toEqual({
|
|
50
|
-
type: 'file_exists',
|
|
51
|
-
path: './out.txt',
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
test('deresolvePipeline also omits the default exit_code completion', () => {
|
|
56
|
-
const resolved: PipelineConfig = {
|
|
57
|
-
name: 'Deresolve Defaults',
|
|
58
|
-
tracks: [
|
|
59
|
-
{
|
|
60
|
-
id: 'track_a',
|
|
61
|
-
name: 'Track A',
|
|
62
|
-
driver: 'claude-code',
|
|
63
|
-
permissions: { read: true, write: false, execute: false },
|
|
64
|
-
on_failure: 'skip_downstream',
|
|
65
|
-
cwd: 'D:/workspace',
|
|
66
|
-
tasks: [
|
|
67
|
-
{
|
|
68
|
-
id: 'task_1',
|
|
69
|
-
name: 'Task 1',
|
|
70
|
-
prompt: 'hello',
|
|
71
|
-
driver: 'claude-code',
|
|
72
|
-
permissions: { read: true, write: false, execute: false },
|
|
73
|
-
cwd: 'D:/workspace',
|
|
74
|
-
completion: { type: 'exit_code', expect: 0 },
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
id: 'task_2',
|
|
78
|
-
name: 'Task 2',
|
|
79
|
-
prompt: 'custom',
|
|
80
|
-
driver: 'claude-code',
|
|
81
|
-
permissions: { read: true, write: false, execute: false },
|
|
82
|
-
cwd: 'D:/workspace',
|
|
83
|
-
completion: { type: 'output_check', check: 'test -f ./done.txt' },
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
},
|
|
87
|
-
],
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
const raw = deresolvePipeline(resolved, 'D:/workspace');
|
|
91
|
-
expect(raw.tracks[0].tasks[0].completion).toBeUndefined();
|
|
92
|
-
expect(raw.tracks[0].tasks[1].completion).toEqual({
|
|
93
|
-
type: 'output_check',
|
|
94
|
-
check: 'test -f ./done.txt',
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
});
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
import yaml from 'js-yaml';
|
|
3
|
+
import type { PipelineConfig, RawPipelineConfig } from './types';
|
|
4
|
+
import { parseYaml, deresolvePipeline, serializePipeline } from './schema';
|
|
5
|
+
|
|
6
|
+
function parsePipelineYaml(content: string): RawPipelineConfig {
|
|
7
|
+
const doc = yaml.load(content) as { pipeline: RawPipelineConfig };
|
|
8
|
+
return doc.pipeline;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
describe('completion default serialization', () => {
|
|
12
|
+
test('serializePipeline omits default exit_code completions from raw configs', () => {
|
|
13
|
+
const raw: RawPipelineConfig = {
|
|
14
|
+
name: 'Serialize Defaults',
|
|
15
|
+
tracks: [
|
|
16
|
+
{
|
|
17
|
+
id: 'track_a',
|
|
18
|
+
name: 'Track A',
|
|
19
|
+
tasks: [
|
|
20
|
+
{ id: 'task_1', prompt: 'hello', completion: { type: 'exit_code' } },
|
|
21
|
+
{ id: 'task_2', prompt: 'world', completion: { type: 'exit_code', expect: 0 } },
|
|
22
|
+
{ id: 'task_3', prompt: 'keep me', completion: { type: 'exit_code', expect: 2 } },
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const parsed = parsePipelineYaml(serializePipeline(raw));
|
|
29
|
+
expect(parsed.tracks[0].tasks[0].completion).toBeUndefined();
|
|
30
|
+
expect(parsed.tracks[0].tasks[1].completion).toBeUndefined();
|
|
31
|
+
expect(parsed.tracks[0].tasks[2].completion).toEqual({ type: 'exit_code', expect: 2 });
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
test('serializePipeline preserves non-default completion plugins', () => {
|
|
35
|
+
const raw: RawPipelineConfig = {
|
|
36
|
+
name: 'Serialize Explicit',
|
|
37
|
+
tracks: [
|
|
38
|
+
{
|
|
39
|
+
id: 'track_a',
|
|
40
|
+
name: 'Track A',
|
|
41
|
+
tasks: [
|
|
42
|
+
{ id: 'task_1', prompt: 'check file', completion: { type: 'file_exists', path: './out.txt' } },
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const parsed = parsePipelineYaml(serializePipeline(raw));
|
|
49
|
+
expect(parsed.tracks[0].tasks[0].completion).toEqual({
|
|
50
|
+
type: 'file_exists',
|
|
51
|
+
path: './out.txt',
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test('deresolvePipeline also omits the default exit_code completion', () => {
|
|
56
|
+
const resolved: PipelineConfig = {
|
|
57
|
+
name: 'Deresolve Defaults',
|
|
58
|
+
tracks: [
|
|
59
|
+
{
|
|
60
|
+
id: 'track_a',
|
|
61
|
+
name: 'Track A',
|
|
62
|
+
driver: 'claude-code',
|
|
63
|
+
permissions: { read: true, write: false, execute: false },
|
|
64
|
+
on_failure: 'skip_downstream',
|
|
65
|
+
cwd: 'D:/workspace',
|
|
66
|
+
tasks: [
|
|
67
|
+
{
|
|
68
|
+
id: 'task_1',
|
|
69
|
+
name: 'Task 1',
|
|
70
|
+
prompt: 'hello',
|
|
71
|
+
driver: 'claude-code',
|
|
72
|
+
permissions: { read: true, write: false, execute: false },
|
|
73
|
+
cwd: 'D:/workspace',
|
|
74
|
+
completion: { type: 'exit_code', expect: 0 },
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'task_2',
|
|
78
|
+
name: 'Task 2',
|
|
79
|
+
prompt: 'custom',
|
|
80
|
+
driver: 'claude-code',
|
|
81
|
+
permissions: { read: true, write: false, execute: false },
|
|
82
|
+
cwd: 'D:/workspace',
|
|
83
|
+
completion: { type: 'output_check', check: 'test -f ./done.txt' },
|
|
84
|
+
},
|
|
85
|
+
],
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const raw = deresolvePipeline(resolved, 'D:/workspace');
|
|
91
|
+
expect(raw.tracks[0].tasks[0].completion).toBeUndefined();
|
|
92
|
+
expect(raw.tracks[0].tasks[1].completion).toEqual({
|
|
93
|
+
type: 'output_check',
|
|
94
|
+
check: 'test -f ./done.txt',
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
});
|
package/src/sdk.ts
CHANGED
|
@@ -29,8 +29,8 @@ export {
|
|
|
29
29
|
export { validateRaw } from './validate-raw';
|
|
30
30
|
export type { ValidationError } from './validate-raw';
|
|
31
31
|
|
|
32
|
-
// ── Schema: parse / resolve / load / serialize / validate ──
|
|
33
|
-
export { parseYaml, resolveConfig, loadPipeline, serializePipeline, deresolvePipeline, validateConfig } from './schema';
|
|
32
|
+
// ── Schema: parse / resolve / load / serialize / validate ──
|
|
33
|
+
export { parseYaml, resolveConfig, loadPipeline, serializePipeline, deresolvePipeline, validateConfig } from './schema';
|
|
34
34
|
|
|
35
35
|
// ── DAG ──
|
|
36
36
|
export { buildDag, buildRawDag } from './dag';
|
package/src/utils.ts
CHANGED
|
@@ -33,16 +33,11 @@ export function validatePath(filePath: string, projectRoot: string): string {
|
|
|
33
33
|
return resolved;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
let runCounter = 0;
|
|
37
|
-
|
|
38
36
|
export function generateRunId(): string {
|
|
39
37
|
const ts = Date.now().toString(36);
|
|
40
|
-
const
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const rand = randomBytes(3).toString('hex');
|
|
44
|
-
return `run_${ts}_${seq}_${rand}`;
|
|
45
|
-
}
|
|
38
|
+
const rand = randomBytes(6).toString('hex');
|
|
39
|
+
return `run_${ts}_${rand}`;
|
|
40
|
+
}
|
|
46
41
|
|
|
47
42
|
export function truncateForName(text: string, maxLen = 40): string {
|
|
48
43
|
const first = text.split('\n')[0]!.trim();
|
package/dist/templates.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { TemplateConfig } from './types';
|
|
2
|
-
export interface TemplateManifest extends TemplateConfig {
|
|
3
|
-
/** The package ref as it would appear in `task.use`, e.g. `@tagma/template-review`. */
|
|
4
|
-
readonly ref: string;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Scan the workspace's `node_modules/@tagma/*` for packages whose name starts
|
|
8
|
-
* with `template-` and load each one's manifest. Packages without a valid
|
|
9
|
-
* `template.yaml` (or that fail to parse) are silently skipped.
|
|
10
|
-
*
|
|
11
|
-
* Returns an empty array when `workDir` doesn't exist or has no such packages.
|
|
12
|
-
*/
|
|
13
|
-
export declare function discoverTemplates(workDir: string): TemplateManifest[];
|
|
14
|
-
/**
|
|
15
|
-
* Load a single template's manifest by its ref (e.g. `@tagma/template-review`)
|
|
16
|
-
* from the given workspace's `node_modules`. Returns `null` if the package
|
|
17
|
-
* isn't installed or its manifest can't be parsed.
|
|
18
|
-
*/
|
|
19
|
-
export declare function loadTemplateManifest(ref: string, workDir: string): TemplateManifest | null;
|
|
20
|
-
//# sourceMappingURL=templates.d.ts.map
|
package/dist/templates.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,uFAAuF;IACvF,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,EAAE,CA8BrE;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAO1F"}
|
package/dist/templates.js
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// ═══ Template Discovery (F1) ═══
|
|
2
|
-
//
|
|
3
|
-
// Public helpers so editors / UIs can enumerate installed `@tagma/template-*`
|
|
4
|
-
// packages in a workspace and read each template's declarative metadata
|
|
5
|
-
// (name, description, params) without actually expanding the template.
|
|
6
|
-
//
|
|
7
|
-
// The legacy private `loadTemplate` in schema.ts uses Bun-specific APIs
|
|
8
|
-
// (Bun.file, require.resolve). These helpers are Node-compatible because
|
|
9
|
-
// the editor server runs on Node, not Bun.
|
|
10
|
-
import { readFileSync, existsSync, readdirSync, statSync } from 'fs';
|
|
11
|
-
import { join } from 'path';
|
|
12
|
-
import yaml from 'js-yaml';
|
|
13
|
-
/**
|
|
14
|
-
* Scan the workspace's `node_modules/@tagma/*` for packages whose name starts
|
|
15
|
-
* with `template-` and load each one's manifest. Packages without a valid
|
|
16
|
-
* `template.yaml` (or that fail to parse) are silently skipped.
|
|
17
|
-
*
|
|
18
|
-
* Returns an empty array when `workDir` doesn't exist or has no such packages.
|
|
19
|
-
*/
|
|
20
|
-
export function discoverTemplates(workDir) {
|
|
21
|
-
const out = [];
|
|
22
|
-
const scopeDir = join(workDir, 'node_modules', '@tagma');
|
|
23
|
-
if (!existsSync(scopeDir))
|
|
24
|
-
return out;
|
|
25
|
-
let entries = [];
|
|
26
|
-
try {
|
|
27
|
-
entries = readdirSync(scopeDir);
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return out;
|
|
31
|
-
}
|
|
32
|
-
for (const entry of entries) {
|
|
33
|
-
if (!entry.startsWith('template-'))
|
|
34
|
-
continue;
|
|
35
|
-
const pkgDir = join(scopeDir, entry);
|
|
36
|
-
try {
|
|
37
|
-
const st = statSync(pkgDir);
|
|
38
|
-
if (!st.isDirectory())
|
|
39
|
-
continue;
|
|
40
|
-
}
|
|
41
|
-
catch {
|
|
42
|
-
continue;
|
|
43
|
-
}
|
|
44
|
-
const ref = `@tagma/${entry}`;
|
|
45
|
-
const manifest = loadTemplateManifestFromDir(pkgDir, ref);
|
|
46
|
-
if (manifest)
|
|
47
|
-
out.push(manifest);
|
|
48
|
-
}
|
|
49
|
-
// Sort alphabetically for deterministic UI rendering.
|
|
50
|
-
out.sort((a, b) => a.ref.localeCompare(b.ref));
|
|
51
|
-
return out;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Load a single template's manifest by its ref (e.g. `@tagma/template-review`)
|
|
55
|
-
* from the given workspace's `node_modules`. Returns `null` if the package
|
|
56
|
-
* isn't installed or its manifest can't be parsed.
|
|
57
|
-
*/
|
|
58
|
-
export function loadTemplateManifest(ref, workDir) {
|
|
59
|
-
// Only @tagma/template-* refs are supported (matches SDK validateTemplateRef).
|
|
60
|
-
const stripped = ref.replace(/@v\d+$/, '');
|
|
61
|
-
if (!stripped.startsWith('@tagma/template-'))
|
|
62
|
-
return null;
|
|
63
|
-
const pkgDir = join(workDir, 'node_modules', stripped);
|
|
64
|
-
if (!existsSync(pkgDir))
|
|
65
|
-
return null;
|
|
66
|
-
return loadTemplateManifestFromDir(pkgDir, stripped);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Resolve a template manifest from an absolute package directory. Tries
|
|
70
|
-
* `template.yaml` first (the documented convention), then a `template` export
|
|
71
|
-
* from `package.json`'s `main`. Returns `null` on any failure so discovery
|
|
72
|
-
* stays robust against malformed packages.
|
|
73
|
-
*/
|
|
74
|
-
function loadTemplateManifestFromDir(pkgDir, ref) {
|
|
75
|
-
const yamlPath = join(pkgDir, 'template.yaml');
|
|
76
|
-
if (existsSync(yamlPath)) {
|
|
77
|
-
try {
|
|
78
|
-
const content = readFileSync(yamlPath, 'utf-8');
|
|
79
|
-
const doc = yaml.load(content);
|
|
80
|
-
const tpl = (doc && typeof doc === 'object' && 'template' in doc
|
|
81
|
-
? doc.template
|
|
82
|
-
: doc);
|
|
83
|
-
if (tpl && typeof tpl === 'object' && tpl.name && Array.isArray(tpl.tasks)) {
|
|
84
|
-
return { ...tpl, ref };
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
catch {
|
|
88
|
-
return null;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return null;
|
|
92
|
-
}
|
|
93
|
-
//# sourceMappingURL=templates.js.map
|
package/dist/templates.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../src/templates.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,8EAA8E;AAC9E,wEAAwE;AACxE,uEAAuE;AACvE,EAAE;AACF,wEAAwE;AACxE,yEAAyE;AACzE,2CAA2C;AAE3C,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACrE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,IAAI,MAAM,SAAS,CAAC;AAQ3B;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe;IAC/C,MAAM,GAAG,GAAuB,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,CAAC,CAAC;IACzD,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,GAAG,CAAC;IAEtC,IAAI,OAAO,GAAa,EAAE,CAAC;IAC3B,IAAI,CAAC;QACH,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;IAED,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC;YAAE,SAAS;QAC7C,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACrC,IAAI,CAAC;YACH,MAAM,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;YAC5B,IAAI,CAAC,EAAE,CA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