@tagma/sdk 0.6.11 → 0.7.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 +91 -18
- package/dist/bootstrap.d.ts +6 -6
- package/dist/bootstrap.d.ts.map +1 -1
- package/dist/bootstrap.js +5 -6
- package/dist/bootstrap.js.map +1 -1
- package/dist/config-ops.d.ts +4 -2
- package/dist/config-ops.d.ts.map +1 -1
- package/dist/config-ops.js +16 -2
- package/dist/config-ops.js.map +1 -1
- package/dist/config.d.ts +8 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -0
- package/dist/core/dataflow.d.ts +23 -0
- package/dist/core/dataflow.d.ts.map +1 -0
- package/dist/core/dataflow.js +63 -0
- package/dist/core/dataflow.js.map +1 -0
- package/dist/core/log-prune.d.ts +16 -0
- package/dist/core/log-prune.d.ts.map +1 -0
- package/dist/core/log-prune.js +34 -0
- package/dist/core/log-prune.js.map +1 -0
- package/dist/core/preflight.d.ts +13 -0
- package/dist/core/preflight.d.ts.map +1 -0
- package/dist/core/preflight.js +61 -0
- package/dist/core/preflight.js.map +1 -0
- package/dist/core/run-context.d.ts +52 -0
- package/dist/core/run-context.d.ts.map +1 -0
- package/dist/core/run-context.js +156 -0
- package/dist/core/run-context.js.map +1 -0
- package/dist/core/run-state.d.ts +25 -0
- package/dist/core/run-state.d.ts.map +1 -0
- package/dist/core/run-state.js +93 -0
- package/dist/core/run-state.js.map +1 -0
- package/dist/core/scheduler.d.ts +13 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +35 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/task-executor.d.ts +13 -0
- package/dist/core/task-executor.d.ts.map +1 -0
- package/dist/core/task-executor.js +639 -0
- package/dist/core/task-executor.js.map +1 -0
- package/dist/core/trigger-errors.d.ts +9 -0
- package/dist/core/trigger-errors.d.ts.map +1 -0
- package/dist/core/trigger-errors.js +15 -0
- package/dist/core/trigger-errors.js.map +1 -0
- package/dist/engine.d.ts +6 -14
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +71 -990
- package/dist/engine.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/pipeline-definition.d.ts +3 -0
- package/dist/pipeline-definition.d.ts.map +1 -0
- package/dist/pipeline-definition.js +4 -0
- package/dist/pipeline-definition.js.map +1 -0
- package/dist/pipeline-runner.d.ts +2 -1
- package/dist/pipeline-runner.d.ts.map +1 -1
- package/dist/pipeline-runner.js +2 -2
- package/dist/pipeline-runner.js.map +1 -1
- package/dist/plugins.d.ts +5 -0
- package/dist/plugins.d.ts.map +1 -0
- package/dist/plugins.js +3 -0
- package/dist/plugins.js.map +1 -0
- package/dist/ports.d.ts +23 -1
- package/dist/ports.d.ts.map +1 -1
- package/dist/ports.js +160 -0
- package/dist/ports.js.map +1 -1
- package/dist/registry.d.ts +3 -19
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +7 -35
- package/dist/registry.js.map +1 -1
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +7 -3
- package/dist/schema.js.map +1 -1
- package/dist/tagma.d.ts +24 -0
- package/dist/tagma.d.ts.map +1 -0
- package/dist/tagma.js +23 -0
- package/dist/tagma.js.map +1 -0
- package/dist/utils-api.d.ts +2 -0
- package/dist/utils-api.d.ts.map +1 -0
- package/dist/utils-api.js +2 -0
- package/dist/utils-api.js.map +1 -0
- package/dist/validate-raw.js +118 -0
- package/dist/validate-raw.js.map +1 -1
- package/dist/yaml.d.ts +4 -0
- package/dist/yaml.d.ts.map +1 -0
- package/dist/yaml.js +3 -0
- package/dist/yaml.js.map +1 -0
- package/package.json +53 -8
- package/src/bootstrap.ts +6 -6
- package/src/config-ops.ts +12 -2
- package/src/config.ts +26 -0
- package/src/core/dataflow.test.ts +167 -0
- package/src/core/dataflow.ts +118 -0
- package/src/core/log-prune.test.ts +58 -0
- package/src/core/log-prune.ts +43 -0
- package/src/core/preflight.test.ts +49 -0
- package/src/core/preflight.ts +89 -0
- package/src/core/run-context.test.ts +244 -0
- package/src/core/run-context.ts +207 -0
- package/src/core/run-state.test.ts +98 -0
- package/src/core/run-state.ts +122 -0
- package/src/core/scheduler.test.ts +83 -0
- package/src/core/scheduler.ts +42 -0
- package/src/core/task-executor.ts +803 -0
- package/src/core/trigger-errors.ts +15 -0
- package/src/engine-ports.test.ts +66 -0
- package/src/engine-task-type.test.ts +56 -0
- package/src/engine.ts +86 -1180
- package/src/index.ts +28 -0
- package/src/pipeline-definition.ts +5 -0
- package/src/pipeline-runner.ts +3 -2
- package/src/plugin-registry.test.ts +7 -10
- package/src/plugins.ts +18 -0
- package/src/ports.test.ts +127 -0
- package/src/ports.ts +224 -1
- package/src/registry.ts +7 -49
- package/src/schema-ports.test.ts +86 -0
- package/src/schema.ts +7 -3
- package/src/tagma.test.ts +84 -0
- package/src/tagma.ts +47 -0
- package/src/utils-api.ts +8 -0
- package/src/validate-raw-ports.test.ts +66 -0
- package/src/validate-raw.ts +137 -0
- package/src/yaml.ts +11 -0
- package/dist/sdk.d.ts +0 -32
- package/dist/sdk.d.ts.map +0 -1
- package/dist/sdk.js +0 -41
- package/dist/sdk.js.map +0 -1
- package/src/sdk.ts +0 -147
package/src/schema-ports.test.ts
CHANGED
|
@@ -13,6 +13,34 @@ const WORK_DIR = process.platform === 'win32' ? 'D:\\fake-work' : '/fake-work';
|
|
|
13
13
|
// ─── resolveConfig preserves ports ───────────────────────────────────
|
|
14
14
|
|
|
15
15
|
describe('resolveConfig — ports passthrough', () => {
|
|
16
|
+
test('raw lightweight bindings survive onto the resolved task', () => {
|
|
17
|
+
const raw: RawPipelineConfig = {
|
|
18
|
+
name: 'p',
|
|
19
|
+
tracks: [
|
|
20
|
+
{
|
|
21
|
+
id: 't',
|
|
22
|
+
name: 'T',
|
|
23
|
+
tasks: [
|
|
24
|
+
{
|
|
25
|
+
id: 'a',
|
|
26
|
+
command: 'echo "{{inputs.city}}"',
|
|
27
|
+
inputs: {
|
|
28
|
+
city: { from: 't.plan.outputs.city', required: true },
|
|
29
|
+
},
|
|
30
|
+
outputs: {
|
|
31
|
+
report: { from: 'json.reportPath' },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
const resolved = resolveConfig(raw, WORK_DIR);
|
|
39
|
+
const task = resolved.tracks[0]!.tasks[0]!;
|
|
40
|
+
expect(task.inputs).toEqual(raw.tracks[0]!.tasks[0]!.inputs!);
|
|
41
|
+
expect(task.outputs).toEqual(raw.tracks[0]!.tasks[0]!.outputs!);
|
|
42
|
+
});
|
|
43
|
+
|
|
16
44
|
test('raw ports survive onto the resolved task', () => {
|
|
17
45
|
const raw: RawPipelineConfig = {
|
|
18
46
|
name: 'p',
|
|
@@ -83,6 +111,35 @@ describe('resolveConfig — ports passthrough', () => {
|
|
|
83
111
|
// ─── deresolvePipeline preserves ports ───────────────────────────────
|
|
84
112
|
|
|
85
113
|
describe('deresolvePipeline — ports round-trip', () => {
|
|
114
|
+
test('lightweight bindings round-trip', () => {
|
|
115
|
+
const raw: RawPipelineConfig = {
|
|
116
|
+
name: 'p',
|
|
117
|
+
tracks: [
|
|
118
|
+
{
|
|
119
|
+
id: 't',
|
|
120
|
+
name: 'T',
|
|
121
|
+
tasks: [
|
|
122
|
+
{
|
|
123
|
+
id: 'a',
|
|
124
|
+
command: 'echo "{{inputs.city}}"',
|
|
125
|
+
inputs: {
|
|
126
|
+
city: { from: 't.plan.outputs.city', required: true },
|
|
127
|
+
mode: { default: 'quick' },
|
|
128
|
+
},
|
|
129
|
+
outputs: {
|
|
130
|
+
raw: { from: 'stdout' },
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
};
|
|
137
|
+
const resolved = resolveConfig(raw, WORK_DIR);
|
|
138
|
+
const back = deresolvePipeline(resolved, WORK_DIR);
|
|
139
|
+
expect(back.tracks[0]!.tasks[0]!.inputs).toEqual(raw.tracks[0]!.tasks[0]!.inputs!);
|
|
140
|
+
expect(back.tracks[0]!.tasks[0]!.outputs).toEqual(raw.tracks[0]!.tasks[0]!.outputs!);
|
|
141
|
+
});
|
|
142
|
+
|
|
86
143
|
test('ports with both inputs and outputs round-trip', () => {
|
|
87
144
|
const raw: RawPipelineConfig = {
|
|
88
145
|
name: 'p',
|
|
@@ -200,6 +257,35 @@ describe('deresolvePipeline — ports round-trip', () => {
|
|
|
200
257
|
// ─── parseYaml accepts ports ─────────────────────────────────────────
|
|
201
258
|
|
|
202
259
|
describe('parseYaml — accepts ports declarations', () => {
|
|
260
|
+
test('real-world YAML with lightweight bindings parses cleanly', () => {
|
|
261
|
+
const text = `pipeline:
|
|
262
|
+
name: demo
|
|
263
|
+
tracks:
|
|
264
|
+
- id: t
|
|
265
|
+
name: Main
|
|
266
|
+
tasks:
|
|
267
|
+
- id: build
|
|
268
|
+
command: bun run build
|
|
269
|
+
outputs:
|
|
270
|
+
bundlePath: { from: json.bundlePath }
|
|
271
|
+
- id: test
|
|
272
|
+
depends_on: [build]
|
|
273
|
+
command: 'bun test "{{inputs.bundlePath}}"'
|
|
274
|
+
inputs:
|
|
275
|
+
bundlePath:
|
|
276
|
+
from: t.build.outputs.bundlePath
|
|
277
|
+
required: true
|
|
278
|
+
`;
|
|
279
|
+
const config = parseYaml(text);
|
|
280
|
+
const build = config.tracks[0]!.tasks[0]!;
|
|
281
|
+
const testTask = config.tracks[0]!.tasks[1]!;
|
|
282
|
+
expect(build.outputs!.bundlePath).toEqual({ from: 'json.bundlePath' });
|
|
283
|
+
expect(testTask.inputs!.bundlePath).toEqual({
|
|
284
|
+
from: 't.build.outputs.bundlePath',
|
|
285
|
+
required: true,
|
|
286
|
+
});
|
|
287
|
+
});
|
|
288
|
+
|
|
203
289
|
test('real-world YAML with ports parses cleanly', () => {
|
|
204
290
|
const text = `pipeline:
|
|
205
291
|
name: demo
|
package/src/schema.ts
CHANGED
|
@@ -97,7 +97,7 @@ function validateRawTask(task: RawTaskConfig, trackId: string): void {
|
|
|
97
97
|
throw new Error(`task "${task.id}": cannot have both "prompt" and "command"`);
|
|
98
98
|
}
|
|
99
99
|
// Empty-content tasks (e.g. `prompt: ''`) are allowed at parse time and
|
|
100
|
-
// flagged as
|
|
100
|
+
// flagged as hard validation errors by validate-raw.ts.
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
// ═══ Config Inheritance Resolution ═══
|
|
@@ -161,8 +161,10 @@ export function resolveConfig(raw: RawPipelineConfig, workDir: string): Pipeline
|
|
|
161
161
|
completion: rawTask.completion,
|
|
162
162
|
agent_profile: rawTask.agent_profile ?? rawTrack.agent_profile,
|
|
163
163
|
cwd: rawTask.cwd ? validatePath(rawTask.cwd, workDir) : trackCwd,
|
|
164
|
-
//
|
|
165
|
-
//
|
|
164
|
+
// Lightweight bindings and ports: no inheritance — they describe
|
|
165
|
+
// per-task data flow, not cross-task defaults.
|
|
166
|
+
inputs: rawTask.inputs,
|
|
167
|
+
outputs: rawTask.outputs,
|
|
166
168
|
ports: rawTask.ports,
|
|
167
169
|
};
|
|
168
170
|
});
|
|
@@ -309,6 +311,8 @@ export function deresolvePipeline(config: PipelineConfig, workDir: string): RawP
|
|
|
309
311
|
...(task.permissions && !permissionsEqual(task.permissions, track.permissions)
|
|
310
312
|
? { permissions: task.permissions }
|
|
311
313
|
: {}),
|
|
314
|
+
...(task.inputs && Object.keys(task.inputs).length > 0 ? { inputs: task.inputs } : {}),
|
|
315
|
+
...(task.outputs && Object.keys(task.outputs).length > 0 ? { outputs: task.outputs } : {}),
|
|
312
316
|
...(task.ports &&
|
|
313
317
|
((task.ports.inputs && task.ports.inputs.length > 0) ||
|
|
314
318
|
(task.ports.outputs && task.ports.outputs.length > 0))
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { describe, expect, test } from 'bun:test';
|
|
2
|
+
import { mkdtempSync, rmSync } from 'node:fs';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { join } from 'node:path';
|
|
5
|
+
import { createTagma } from './tagma';
|
|
6
|
+
import type { DriverPlugin, PipelineConfig } from './types';
|
|
7
|
+
|
|
8
|
+
function makeDir(prefix: string): string {
|
|
9
|
+
return mkdtempSync(join(tmpdir(), prefix));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function makeDriver(name: string, marker: string[]): DriverPlugin {
|
|
13
|
+
return {
|
|
14
|
+
name,
|
|
15
|
+
capabilities: { sessionResume: false, systemPrompt: false, outputFormat: false },
|
|
16
|
+
async buildCommand() {
|
|
17
|
+
marker.push(name);
|
|
18
|
+
return { args: ['echo', name] };
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe('createTagma', () => {
|
|
24
|
+
test('instances own isolated plugin registries', () => {
|
|
25
|
+
const seenA: string[] = [];
|
|
26
|
+
const seenB: string[] = [];
|
|
27
|
+
const tagmaA = createTagma({ builtins: false });
|
|
28
|
+
const tagmaB = createTagma({ builtins: false });
|
|
29
|
+
|
|
30
|
+
tagmaA.registry.registerPlugin('drivers', 'mock', makeDriver('driver-a', seenA));
|
|
31
|
+
tagmaB.registry.registerPlugin('drivers', 'mock', makeDriver('driver-b', seenB));
|
|
32
|
+
|
|
33
|
+
expect(tagmaA.registry.getHandler<DriverPlugin>('drivers', 'mock').name).toBe('driver-a');
|
|
34
|
+
expect(tagmaB.registry.getHandler<DriverPlugin>('drivers', 'mock').name).toBe('driver-b');
|
|
35
|
+
expect(seenA).toEqual([]);
|
|
36
|
+
expect(seenB).toEqual([]);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
test('run uses only the instance registry', async () => {
|
|
40
|
+
const tagma = createTagma({ builtins: false });
|
|
41
|
+
const dir = makeDir('tagma-instance-run-');
|
|
42
|
+
try {
|
|
43
|
+
await expect(
|
|
44
|
+
tagma.run(
|
|
45
|
+
{
|
|
46
|
+
name: 'instance-run',
|
|
47
|
+
tracks: [
|
|
48
|
+
{
|
|
49
|
+
id: 't',
|
|
50
|
+
name: 'T',
|
|
51
|
+
tasks: [{ id: 'prompt', name: 'prompt', prompt: 'hello' }],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
cwd: dir,
|
|
57
|
+
skipPluginLoading: true,
|
|
58
|
+
},
|
|
59
|
+
),
|
|
60
|
+
).rejects.toThrow(/driver "opencode" not registered/);
|
|
61
|
+
} finally {
|
|
62
|
+
rmSync(dir, { recursive: true, force: true });
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
test('validate returns structural pipeline errors without running tasks', () => {
|
|
67
|
+
const tagma = createTagma({ builtins: false });
|
|
68
|
+
|
|
69
|
+
expect(
|
|
70
|
+
tagma.validate({
|
|
71
|
+
name: 'invalid',
|
|
72
|
+
tracks: [
|
|
73
|
+
{
|
|
74
|
+
id: 't',
|
|
75
|
+
name: 'T',
|
|
76
|
+
tasks: [
|
|
77
|
+
{ id: 'a', name: 'A', command: 'echo a', depends_on: ['missing'] },
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
}),
|
|
82
|
+
).toEqual(['Task reference "missing" not found']);
|
|
83
|
+
});
|
|
84
|
+
});
|
package/src/tagma.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { runPipeline, type EngineResult, type RunPipelineOptions } from './engine';
|
|
2
|
+
import { bootstrapBuiltins } from './bootstrap';
|
|
3
|
+
import { PluginRegistry } from './registry';
|
|
4
|
+
import { validateConfig } from './schema';
|
|
5
|
+
import type { PipelineConfig } from './types';
|
|
6
|
+
|
|
7
|
+
export interface CreateTagmaOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Registry used by this SDK instance. Omit to create an isolated registry.
|
|
10
|
+
*/
|
|
11
|
+
readonly registry?: PluginRegistry;
|
|
12
|
+
/**
|
|
13
|
+
* Register built-in drivers/triggers/completions/middlewares into the
|
|
14
|
+
* instance registry. Defaults to true.
|
|
15
|
+
*/
|
|
16
|
+
readonly builtins?: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface TagmaRunOptions extends Omit<RunPipelineOptions, 'registry'> {
|
|
20
|
+
readonly cwd: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface Tagma {
|
|
24
|
+
readonly registry: PluginRegistry;
|
|
25
|
+
run(config: PipelineConfig, options: TagmaRunOptions): Promise<EngineResult>;
|
|
26
|
+
validate(config: PipelineConfig): readonly string[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function createTagma(options: CreateTagmaOptions = {}): Tagma {
|
|
30
|
+
const registry = options.registry ?? new PluginRegistry();
|
|
31
|
+
if (options.builtins !== false) {
|
|
32
|
+
bootstrapBuiltins(registry);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
registry,
|
|
37
|
+
run(config, { cwd, ...runOptions }) {
|
|
38
|
+
return runPipeline(config, cwd, {
|
|
39
|
+
...runOptions,
|
|
40
|
+
registry,
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
validate(config) {
|
|
44
|
+
return validateConfig(config);
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
}
|
package/src/utils-api.ts
ADDED
|
@@ -38,6 +38,12 @@ function portsErrors(errors: ReturnType<typeof validateRaw>): typeof errors {
|
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
function bindingErrors(errors: ReturnType<typeof validateRaw>): typeof errors {
|
|
42
|
+
return errors.filter(
|
|
43
|
+
(e) => e.path.includes('.inputs') || e.path.includes('.outputs'),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
// ─── Structural validation (Command Tasks) ───────────────────────────
|
|
42
48
|
|
|
43
49
|
describe('validateRaw — port structure (command tasks)', () => {
|
|
@@ -123,6 +129,66 @@ describe('validateRaw — port structure (command tasks)', () => {
|
|
|
123
129
|
});
|
|
124
130
|
});
|
|
125
131
|
|
|
132
|
+
// ─── Lightweight binding validation ──────────────────────────────────
|
|
133
|
+
|
|
134
|
+
describe('validateRaw — lightweight task bindings', () => {
|
|
135
|
+
test('accepts top-level inputs for command placeholder references', () => {
|
|
136
|
+
const errors = errorsFor(
|
|
137
|
+
commandTask({
|
|
138
|
+
id: 'a',
|
|
139
|
+
command: 'echo {{inputs.city}}',
|
|
140
|
+
inputs: { city: { value: 'Shanghai' } },
|
|
141
|
+
}),
|
|
142
|
+
);
|
|
143
|
+
expect(errors.some((e) => e.message.includes('references "{{inputs.city}}"'))).toBe(false);
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
test('rejects non-object binding maps and entries', () => {
|
|
147
|
+
const errors = errorsFor(
|
|
148
|
+
commandTask({
|
|
149
|
+
id: 'a',
|
|
150
|
+
inputs: 'bad' as unknown as never,
|
|
151
|
+
outputs: { ok: 'bad' as unknown as never },
|
|
152
|
+
}),
|
|
153
|
+
);
|
|
154
|
+
const msgs = bindingErrors(errors).map((e) => e.message);
|
|
155
|
+
expect(msgs.some((m) => /task\.inputs must be an object/.test(m))).toBe(true);
|
|
156
|
+
expect(msgs.some((m) => /task\.outputs\.ok must be an object/.test(m))).toBe(true);
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
test('rejects invalid binding names and duplicate loose/strict names', () => {
|
|
160
|
+
const errors = errorsFor(
|
|
161
|
+
commandTask({
|
|
162
|
+
id: 'a',
|
|
163
|
+
inputs: { 'bad-name': { value: 'x' }, city: { value: 'Shanghai' } },
|
|
164
|
+
outputs: { report: { from: 'stdout' } },
|
|
165
|
+
ports: {
|
|
166
|
+
inputs: [{ name: 'city', type: 'string' }],
|
|
167
|
+
outputs: [{ name: 'report', type: 'string' }],
|
|
168
|
+
},
|
|
169
|
+
}),
|
|
170
|
+
);
|
|
171
|
+
const msgs = errors.map((e) => e.message);
|
|
172
|
+
expect(msgs.some((m) => /binding name "bad-name" is invalid/.test(m))).toBe(true);
|
|
173
|
+
expect(msgs.some((m) => /duplicates strict ports\.inputs/.test(m))).toBe(true);
|
|
174
|
+
expect(msgs.some((m) => /duplicates strict ports\.outputs/.test(m))).toBe(true);
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test('fully-qualified binding sources must reference direct dependencies', () => {
|
|
178
|
+
const errors = validateRaw(
|
|
179
|
+
pipeline([
|
|
180
|
+
commandTask({ id: 'up', outputs: { city: {} } }),
|
|
181
|
+
commandTask({
|
|
182
|
+
id: 'down',
|
|
183
|
+
depends_on: [],
|
|
184
|
+
inputs: { city: { from: 't.up.outputs.city', required: true } },
|
|
185
|
+
}),
|
|
186
|
+
]),
|
|
187
|
+
);
|
|
188
|
+
expect(errors.some((e) => /not a direct dependency/.test(e.message))).toBe(true);
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
|
|
126
192
|
// ─── Input/output separation (Command Tasks) ─────────────────────────
|
|
127
193
|
|
|
128
194
|
describe('validateRaw — input vs output constraints (command tasks)', () => {
|
package/src/validate-raw.ts
CHANGED
|
@@ -538,6 +538,136 @@ function validatePortList(
|
|
|
538
538
|
}
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
+
function validateBindingMap(
|
|
542
|
+
value: unknown,
|
|
543
|
+
basePath: string,
|
|
544
|
+
kind: 'inputs' | 'outputs',
|
|
545
|
+
errors: ValidationError[],
|
|
546
|
+
): void {
|
|
547
|
+
if (value === undefined) return;
|
|
548
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
549
|
+
errors.push({ path: basePath, message: `task.${kind} must be an object map` });
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
const map = value as Record<string, unknown>;
|
|
554
|
+
for (const [name, rawBinding] of Object.entries(map)) {
|
|
555
|
+
const path = `${basePath}.${name}`;
|
|
556
|
+
if (!PORT_NAME_RE.test(name)) {
|
|
557
|
+
errors.push({
|
|
558
|
+
path,
|
|
559
|
+
message: `binding name "${name}" is invalid. Must match /^[A-Za-z_][A-Za-z0-9_]*$/.`,
|
|
560
|
+
});
|
|
561
|
+
}
|
|
562
|
+
if (!rawBinding || typeof rawBinding !== 'object' || Array.isArray(rawBinding)) {
|
|
563
|
+
errors.push({ path, message: `task.${kind}.${name} must be an object` });
|
|
564
|
+
continue;
|
|
565
|
+
}
|
|
566
|
+
const binding = rawBinding as Record<string, unknown>;
|
|
567
|
+
if ('from' in binding && typeof binding.from !== 'string') {
|
|
568
|
+
errors.push({ path: `${path}.from`, message: `task.${kind}.${name}.from must be a string` });
|
|
569
|
+
}
|
|
570
|
+
if (kind === 'inputs' && 'required' in binding && typeof binding.required !== 'boolean') {
|
|
571
|
+
errors.push({
|
|
572
|
+
path: `${path}.required`,
|
|
573
|
+
message: `task.inputs.${name}.required must be a boolean`,
|
|
574
|
+
});
|
|
575
|
+
}
|
|
576
|
+
if (kind === 'outputs' && typeof binding.from === 'string') {
|
|
577
|
+
const source = binding.from;
|
|
578
|
+
const ok =
|
|
579
|
+
source === 'stdout' ||
|
|
580
|
+
source === 'stderr' ||
|
|
581
|
+
source === 'normalizedOutput' ||
|
|
582
|
+
/^json\.[A-Za-z_][A-Za-z0-9_]*$/.test(source);
|
|
583
|
+
if (!ok) {
|
|
584
|
+
errors.push({
|
|
585
|
+
path: `${path}.from`,
|
|
586
|
+
message: `task.outputs.${name}.from must be stdout, stderr, normalizedOutput, or json.<key>`,
|
|
587
|
+
});
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
function validateBindingPortNameOverlap(
|
|
594
|
+
task: RawTaskConfig,
|
|
595
|
+
taskPath: string,
|
|
596
|
+
errors: ValidationError[],
|
|
597
|
+
): void {
|
|
598
|
+
const looseInputs = objectKeys(task.inputs);
|
|
599
|
+
const looseOutputs = objectKeys(task.outputs);
|
|
600
|
+
const strictInputs = new Set(
|
|
601
|
+
Array.isArray(task.ports?.inputs) ? task.ports.inputs.map((p) => p?.name) : [],
|
|
602
|
+
);
|
|
603
|
+
const strictOutputs = new Set(
|
|
604
|
+
Array.isArray(task.ports?.outputs) ? task.ports.outputs.map((p) => p?.name) : [],
|
|
605
|
+
);
|
|
606
|
+
|
|
607
|
+
for (const name of looseInputs) {
|
|
608
|
+
if (strictInputs.has(name)) {
|
|
609
|
+
errors.push({
|
|
610
|
+
path: `${taskPath}.inputs.${name}`,
|
|
611
|
+
message: `task input binding "${name}" duplicates strict ports.inputs; choose one layer for this name`,
|
|
612
|
+
});
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
for (const name of looseOutputs) {
|
|
616
|
+
if (strictOutputs.has(name)) {
|
|
617
|
+
errors.push({
|
|
618
|
+
path: `${taskPath}.outputs.${name}`,
|
|
619
|
+
message: `task output binding "${name}" duplicates strict ports.outputs; choose one layer for this name`,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
function objectKeys(value: unknown): string[] {
|
|
626
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) return [];
|
|
627
|
+
return Object.keys(value as Record<string, unknown>);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
function validateInputBindingSources(
|
|
631
|
+
task: RawTaskConfig,
|
|
632
|
+
trackId: string,
|
|
633
|
+
taskPath: string,
|
|
634
|
+
index: TaskIndex,
|
|
635
|
+
errors: ValidationError[],
|
|
636
|
+
): void {
|
|
637
|
+
if (!task.inputs || typeof task.inputs !== 'object' || Array.isArray(task.inputs)) return;
|
|
638
|
+
for (const [name, rawBinding] of Object.entries(task.inputs)) {
|
|
639
|
+
if (!rawBinding || typeof rawBinding !== 'object' || Array.isArray(rawBinding)) continue;
|
|
640
|
+
const source = (rawBinding as Record<string, unknown>).from;
|
|
641
|
+
if (typeof source !== 'string') continue;
|
|
642
|
+
const upstreamId = bindingSourceTaskId(source);
|
|
643
|
+
if (!upstreamId) continue;
|
|
644
|
+
const deps = task.depends_on ?? [];
|
|
645
|
+
const isDirectDep = deps.some((dep) => {
|
|
646
|
+
const resolved = resolveTaskRef(dep, trackId, index);
|
|
647
|
+
return resolved.kind === 'resolved' && resolved.qid === upstreamId;
|
|
648
|
+
});
|
|
649
|
+
if (!isDirectDep) {
|
|
650
|
+
errors.push({
|
|
651
|
+
path: `${taskPath}.inputs.${name}.from`,
|
|
652
|
+
message: `Task "${task.id}": input binding "${name}" from "${source}" references task "${upstreamId}" which is not a direct dependency (must be listed in depends_on)`,
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
function bindingSourceTaskId(source: string): string | null {
|
|
659
|
+
const outputMarker = '.outputs.';
|
|
660
|
+
const outputIdx = source.lastIndexOf(outputMarker);
|
|
661
|
+
if (outputIdx > 0) return source.slice(0, outputIdx);
|
|
662
|
+
for (const field of ['stdout', 'stderr', 'normalizedOutput', 'exitCode']) {
|
|
663
|
+
const suffix = `.${field}`;
|
|
664
|
+
if (source.endsWith(suffix) && source.length > suffix.length) {
|
|
665
|
+
return source.slice(0, -suffix.length);
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
return null;
|
|
669
|
+
}
|
|
670
|
+
|
|
541
671
|
function validateTaskPorts(
|
|
542
672
|
task: RawTaskConfig,
|
|
543
673
|
trackId: string,
|
|
@@ -550,6 +680,11 @@ function validateTaskPorts(
|
|
|
550
680
|
const isPromptTask = typeof task.prompt === 'string' && typeof task.command !== 'string';
|
|
551
681
|
const isCommandTask = typeof task.command === 'string' && typeof task.prompt !== 'string';
|
|
552
682
|
|
|
683
|
+
validateBindingMap(task.inputs, `${taskPath}.inputs`, 'inputs', errors);
|
|
684
|
+
validateBindingMap(task.outputs, `${taskPath}.outputs`, 'outputs', errors);
|
|
685
|
+
validateBindingPortNameOverlap(task, taskPath, errors);
|
|
686
|
+
validateInputBindingSources(task, trackId, taskPath, index, errors);
|
|
687
|
+
|
|
553
688
|
// ─── Prompt tasks do not declare ports ──
|
|
554
689
|
//
|
|
555
690
|
// A Prompt Task's I/O contract is inferred from direct-neighbor
|
|
@@ -585,6 +720,7 @@ function validateTaskPorts(
|
|
|
585
720
|
let availableInputs: Set<string>;
|
|
586
721
|
if (isPromptTask) {
|
|
587
722
|
availableInputs = collectUpstreamCommandOutputNames(task, trackId, qidIndex, index);
|
|
723
|
+
for (const name of objectKeys(task.inputs)) availableInputs.add(name);
|
|
588
724
|
} else {
|
|
589
725
|
// Command Task (or the pathological both-keys case, which is caught
|
|
590
726
|
// earlier as a separate error — tolerate it here).
|
|
@@ -593,6 +729,7 @@ function validateTaskPorts(
|
|
|
593
729
|
? ports.inputs.filter((p): p is PortDef => !!p && typeof p === 'object').map((p) => p.name)
|
|
594
730
|
: [],
|
|
595
731
|
);
|
|
732
|
+
for (const name of objectKeys(task.inputs)) availableInputs.add(name);
|
|
596
733
|
}
|
|
597
734
|
|
|
598
735
|
for (const name of referenced) {
|
package/src/yaml.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export {
|
|
2
|
+
parseYaml,
|
|
3
|
+
resolveConfig,
|
|
4
|
+
loadPipeline,
|
|
5
|
+
serializePipeline,
|
|
6
|
+
deresolvePipeline,
|
|
7
|
+
validateConfig,
|
|
8
|
+
} from './schema';
|
|
9
|
+
export { compileYamlContent } from './yaml-compiler';
|
|
10
|
+
export type { YamlCompileResult, CompileYamlOptions } from './yaml-compiler';
|
|
11
|
+
|
package/dist/sdk.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export { runPipeline, TriggerBlockedError, TriggerTimeoutError } from './engine';
|
|
2
|
-
export type { EngineResult, RunPipelineOptions, RunEventPayload } from './engine';
|
|
3
|
-
export { PipelineRunner } from './pipeline-runner';
|
|
4
|
-
export type { PipelineRunnerStatus } from './pipeline-runner';
|
|
5
|
-
export { createEmptyPipeline, setPipelineField, upsertTrack, removeTrack, moveTrack, updateTrack, upsertTask, removeTask, moveTask, transferTask, } from './config-ops';
|
|
6
|
-
export { validateRaw } from './validate-raw';
|
|
7
|
-
export type { ValidationError, KnownPluginTypes } from './validate-raw';
|
|
8
|
-
export { compileYamlContent } from './yaml-compiler';
|
|
9
|
-
export type { YamlCompileResult, CompileYamlOptions } from './yaml-compiler';
|
|
10
|
-
export { parseYaml, resolveConfig, loadPipeline, serializePipeline, deresolvePipeline, validateConfig, } from './schema';
|
|
11
|
-
export { buildDag, buildRawDag } from './dag';
|
|
12
|
-
export type { DagNode, Dag, RawDagNode, RawDag } from './dag';
|
|
13
|
-
export { bootstrapBuiltins } from './bootstrap';
|
|
14
|
-
export { PluginRegistry, defaultRegistry, loadPlugins, registerPlugin, unregisterPlugin, getHandler, hasHandler, listRegistered, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest, } from './registry';
|
|
15
|
-
export type { RegisterResult } from './registry';
|
|
16
|
-
export { InMemoryApprovalGateway } from './approval';
|
|
17
|
-
export type { ApprovalGateway, ApprovalRequest, ApprovalDecision, ApprovalOutcome, ApprovalEvent, ApprovalListener, } from './approval';
|
|
18
|
-
export { attachStdinApprovalAdapter } from './adapters/stdin-approval';
|
|
19
|
-
export type { StdinApprovalAdapter } from './adapters/stdin-approval';
|
|
20
|
-
export { attachWebSocketApprovalAdapter } from './adapters/websocket-approval';
|
|
21
|
-
export type { WebSocketApprovalAdapter, WebSocketApprovalAdapterOptions, } from './adapters/websocket-approval';
|
|
22
|
-
export { Logger, tailLines, clip } from './logger';
|
|
23
|
-
export type { LogRecord, LogLevel, LogListener } from './logger';
|
|
24
|
-
export type { HookResult, PipelineInfo, TrackInfo, TaskInfo } from './hooks';
|
|
25
|
-
export { parseDuration, validatePath, generateRunId, nowISO, truncateForName, _resetShellCache, } from './utils';
|
|
26
|
-
export { TASK_ID_RE, isValidTaskId, qualifyTaskId, isQualifiedRef, buildTaskIndex, resolveTaskRef, AMBIGUOUS, } from './task-ref';
|
|
27
|
-
export type { TaskIndex, RefResolution } from './task-ref';
|
|
28
|
-
export { promptDocumentFromString, serializePromptDocument, appendContext, prependContext, renderInputsBlock, renderOutputSchemaBlock, } from './prompt-doc';
|
|
29
|
-
export { substituteInputs, extractInputReferences, resolveTaskInputs, extractTaskOutputs, inferPromptPorts, } from './ports';
|
|
30
|
-
export type { SubstituteResult, InputResolution, ExtractResult, PromptPortInference, PromptPortConflict, PromptUpstreamNeighbor, PromptDownstreamNeighbor, } from './ports';
|
|
31
|
-
export * from './types';
|
|
32
|
-
//# sourceMappingURL=sdk.d.ts.map
|
package/dist/sdk.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACjF,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAG9D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,UAAU,EACV,QAAQ,EACR,YAAY,GACb,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAGxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAG7E,OAAO,EACL,SAAS,EACT,aAAa,EACb,Y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ACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,GACV,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3D,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAKtB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAGjB,cAAc,SAAS,CAAC"}
|
package/dist/sdk.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// ═══ tagma-sdk public API ═══
|
|
2
|
-
//
|
|
3
|
-
// This is the SDK entry point. Import from here, not from internal modules.
|
|
4
|
-
// The CLI (src/index.ts in the CLI project) also imports from here.
|
|
5
|
-
// ── Core engine ──
|
|
6
|
-
export { runPipeline, TriggerBlockedError, TriggerTimeoutError } from './engine';
|
|
7
|
-
// ── Pipeline runner (multi-pipeline lifecycle management) ──
|
|
8
|
-
export { PipelineRunner } from './pipeline-runner';
|
|
9
|
-
// ── Raw config CRUD (visual editor / YAML sync) ──
|
|
10
|
-
export { createEmptyPipeline, setPipelineField, upsertTrack, removeTrack, moveTrack, updateTrack, upsertTask, removeTask, moveTask, transferTask, } from './config-ops';
|
|
11
|
-
// ── Raw config validation (real-time feedback) ──
|
|
12
|
-
export { validateRaw } from './validate-raw';
|
|
13
|
-
// ── YAML compiler (validation + compile log support) ──
|
|
14
|
-
export { compileYamlContent } from './yaml-compiler';
|
|
15
|
-
// ── Schema: parse / resolve / load / serialize / validate ──
|
|
16
|
-
export { parseYaml, resolveConfig, loadPipeline, serializePipeline, deresolvePipeline, validateConfig, } from './schema';
|
|
17
|
-
// ── DAG ──
|
|
18
|
-
export { buildDag, buildRawDag } from './dag';
|
|
19
|
-
// ── Plugin registry ──
|
|
20
|
-
export { bootstrapBuiltins } from './bootstrap';
|
|
21
|
-
export { PluginRegistry, defaultRegistry, loadPlugins, registerPlugin, unregisterPlugin, getHandler, hasHandler, listRegistered, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest, } from './registry';
|
|
22
|
-
// ── Approval gateway ──
|
|
23
|
-
export { InMemoryApprovalGateway } from './approval';
|
|
24
|
-
// ── Approval adapters ──
|
|
25
|
-
export { attachStdinApprovalAdapter } from './adapters/stdin-approval';
|
|
26
|
-
export { attachWebSocketApprovalAdapter } from './adapters/websocket-approval';
|
|
27
|
-
// ── Logger ──
|
|
28
|
-
export { Logger, tailLines, clip } from './logger';
|
|
29
|
-
// ── Utils (public subset) ──
|
|
30
|
-
export { parseDuration, validatePath, generateRunId, nowISO, truncateForName, _resetShellCache, } from './utils';
|
|
31
|
-
// ── Task reference resolution (shared id normalization) ──
|
|
32
|
-
export { TASK_ID_RE, isValidTaskId, qualifyTaskId, isQualifiedRef, buildTaskIndex, resolveTaskRef, AMBIGUOUS, } from './task-ref';
|
|
33
|
-
// ── Prompt document helpers (middleware authors + drivers) ──
|
|
34
|
-
export { promptDocumentFromString, serializePromptDocument, appendContext, prependContext, renderInputsBlock, renderOutputSchemaBlock, } from './prompt-doc';
|
|
35
|
-
// ── Task ports (editor: substitute placeholders, resolve upstream
|
|
36
|
-
// values, extract downstream outputs; drivers that wrap the prompt
|
|
37
|
-
// may want substituteInputs on their own envelope) ──
|
|
38
|
-
export { substituteInputs, extractInputReferences, resolveTaskInputs, extractTaskOutputs, inferPromptPorts, } from './ports';
|
|
39
|
-
// ── All types from @tagma/types + runtime constants ──
|
|
40
|
-
export * from './types';
|
|
41
|
-
//# sourceMappingURL=sdk.js.map
|
package/dist/sdk.js.map
DELETED
|
@@ -1 +0,0 @@
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