@tagma/sdk 0.7.9 → 0.7.11
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 +16 -16
- package/dist/completions/output-check.d.ts.map +1 -1
- package/dist/completions/output-check.js +19 -10
- package/dist/completions/output-check.js.map +1 -1
- package/dist/drivers/opencode.d.ts.map +1 -1
- package/dist/drivers/opencode.js +7 -118
- package/dist/drivers/opencode.js.map +1 -1
- package/dist/duration.d.ts +2 -0
- package/dist/duration.d.ts.map +1 -0
- package/dist/duration.js +5 -0
- package/dist/duration.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/middlewares/static-context.d.ts.map +1 -1
- package/dist/middlewares/static-context.js +20 -1
- package/dist/middlewares/static-context.js.map +1 -1
- package/dist/pipeline-runner.d.ts +1 -1
- package/dist/pipeline-runner.d.ts.map +1 -1
- package/dist/pipeline-runner.js +15 -3
- package/dist/pipeline-runner.js.map +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.d.ts.map +1 -1
- package/dist/plugins.js +1 -1
- package/dist/plugins.js.map +1 -1
- package/dist/schema.d.ts +1 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +112 -8
- package/dist/schema.js.map +1 -1
- package/dist/tagma.d.ts.map +1 -1
- package/dist/tagma.js +7 -3
- package/dist/tagma.js.map +1 -1
- package/dist/triggers/file.d.ts.map +1 -1
- package/dist/triggers/file.js +13 -10
- package/dist/triggers/file.js.map +1 -1
- package/dist/triggers/manual.d.ts.map +1 -1
- package/dist/triggers/manual.js +11 -9
- package/dist/triggers/manual.js.map +1 -1
- package/dist/validate-raw.d.ts.map +1 -1
- package/dist/validate-raw.js +322 -80
- package/dist/validate-raw.js.map +1 -1
- package/dist/yaml-compiler.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -149,17 +149,17 @@ pipeline:
|
|
|
149
149
|
|
|
150
150
|
### Pipeline Fields
|
|
151
151
|
|
|
152
|
-
| Field | Type
|
|
153
|
-
| ------------- |
|
|
154
|
-
| `name` | `string`
|
|
155
|
-
| `mode` | `trusted \| safe` | No
|
|
156
|
-
| `driver` | `string`
|
|
157
|
-
| `model` | `string`
|
|
158
|
-
| `permissions` | `Permissions`
|
|
159
|
-
| `timeout` | `string`
|
|
160
|
-
| `plugins` | `string[]`
|
|
161
|
-
| `hooks` | `HooksConfig`
|
|
162
|
-
| `tracks` | `TrackConfig[]`
|
|
152
|
+
| Field | Type | Required | Description |
|
|
153
|
+
| ------------- | ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
154
|
+
| `name` | `string` | Yes | Pipeline name, used in logs and run IDs |
|
|
155
|
+
| `mode` | `trusted \| safe` | No | Execution boundary. Defaults to `safe`; `safe` blocks shell tasks, hooks, automatic plugins, execute permissions, and non-allowlisted capabilities |
|
|
156
|
+
| `driver` | `string` | No | Default driver for all tracks/tasks (inherited). Built-in: `opencode` |
|
|
157
|
+
| `model` | `string` | No | Default model for all tracks/tasks (inherited). Exact model name, e.g. `claude-sonnet-4-6` |
|
|
158
|
+
| `permissions` | `Permissions` | No | Default permissions inherited by all tracks/tasks (see Permissions) |
|
|
159
|
+
| `timeout` | `string` | No | Pipeline-level timeout. Format: `"30s"`, `"5m"`, `"2h"` |
|
|
160
|
+
| `plugins` | `string[]` | No | External plugin packages to load, e.g. `["@tagma/driver-codex"]` |
|
|
161
|
+
| `hooks` | `HooksConfig` | No | Shell commands to run at lifecycle events (see Hooks below) |
|
|
162
|
+
| `tracks` | `TrackConfig[]` | Yes | List of parallel execution tracks |
|
|
163
163
|
|
|
164
164
|
### Hooks Fields
|
|
165
165
|
|
|
@@ -216,10 +216,10 @@ Each hook value can be a single command string or an array of commands.
|
|
|
216
216
|
|
|
217
217
|
### Permissions
|
|
218
218
|
|
|
219
|
-
| Field | Type | Default | Description
|
|
220
|
-
| --------- | --------- | ------- |
|
|
221
|
-
| `read` | `boolean` | — | Allow the AI driver/agent to read files
|
|
222
|
-
| `write` | `boolean` | — | Allow the AI driver/agent to write files
|
|
219
|
+
| Field | Type | Default | Description |
|
|
220
|
+
| --------- | --------- | ------- | -------------------------------------------------- |
|
|
221
|
+
| `read` | `boolean` | — | Allow the AI driver/agent to read files |
|
|
222
|
+
| `write` | `boolean` | — | Allow the AI driver/agent to write files |
|
|
223
223
|
| `execute` | `boolean` | — | Allow the AI driver/agent to execute tool commands |
|
|
224
224
|
|
|
225
225
|
`permissions` are passed to AI drivers that support them. They do not sandbox
|
|
@@ -508,7 +508,7 @@ Properties:
|
|
|
508
508
|
|
|
509
509
|
- `instanceId` — stable ID assigned at construction, safe to use as a Map key before `start()`
|
|
510
510
|
- `runId` — engine-assigned run ID, available after the first `run_start` event (`null` until then)
|
|
511
|
-
- `status` — `'idle' | 'running' | 'done' | 'aborted'` (see `PipelineRunnerStatus`)
|
|
511
|
+
- `status` — `'idle' | 'running' | 'done' | 'aborted' | 'failed'` (see `PipelineRunnerStatus`). `aborted` covers caller-initiated `abort()`; `failed` covers engine errors (config/preflight/plugin-load) thrown out of `runPipeline()`
|
|
512
512
|
|
|
513
513
|
### `TriggerBlockedError` / `TriggerTimeoutError`
|
|
514
514
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-check.d.ts","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"output-check.d.ts","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,gBAAgB,EAAiC,MAAM,cAAc,CAAC;AAMnG,eAAO,MAAM,qBAAqB,EAAE,gBAsEnC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { commandLabel, commandToSpawnSpec } from '@tagma/core';
|
|
2
|
+
import { parseOptionalPluginTimeout } from '../duration';
|
|
2
3
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
3
4
|
export const OutputCheckCompletion = {
|
|
4
5
|
name: 'output_check',
|
|
@@ -6,10 +7,10 @@ export const OutputCheckCompletion = {
|
|
|
6
7
|
description: 'Pipe the task output into a shell command; mark success when that command exits 0. For AI driver tasks the driver-normalized text is piped (not the raw NDJSON); command tasks see their raw stdout.',
|
|
7
8
|
fields: {
|
|
8
9
|
check: {
|
|
9
|
-
type: '
|
|
10
|
+
type: 'json',
|
|
10
11
|
required: true,
|
|
11
|
-
description: 'Shell command to run. The task output is piped to
|
|
12
|
-
placeholder: "grep -q
|
|
12
|
+
description: 'Shell command string or { argv: string[] } to run. The task output is piped to stdin.',
|
|
13
|
+
placeholder: '{ "argv": ["grep", "-q", "PASS"] }',
|
|
13
14
|
},
|
|
14
15
|
timeout: {
|
|
15
16
|
type: 'duration',
|
|
@@ -21,13 +22,21 @@ export const OutputCheckCompletion = {
|
|
|
21
22
|
},
|
|
22
23
|
async check(config, result, ctx) {
|
|
23
24
|
const checkCmd = config.check;
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
if (typeof checkCmd !== 'string' &&
|
|
26
|
+
!(checkCmd &&
|
|
27
|
+
typeof checkCmd === 'object' &&
|
|
28
|
+
!Array.isArray(checkCmd) &&
|
|
29
|
+
(('shell' in checkCmd && typeof checkCmd.shell === 'string') ||
|
|
30
|
+
('argv' in checkCmd &&
|
|
31
|
+
Array.isArray(checkCmd.argv) &&
|
|
32
|
+
checkCmd.argv.every((arg) => typeof arg === 'string'))))) {
|
|
33
|
+
throw new Error('output_check completion: "check" must be a shell string or { argv: string[] }');
|
|
34
|
+
}
|
|
35
|
+
const command = checkCmd;
|
|
36
|
+
const timeoutMs = parseOptionalPluginTimeout(config.timeout, DEFAULT_TIMEOUT_MS);
|
|
27
37
|
const payload = result.normalizedOutput ?? result.stdout;
|
|
28
38
|
const checkResult = await ctx.runtime.runSpawn({
|
|
29
|
-
|
|
30
|
-
cwd: ctx.workDir,
|
|
39
|
+
...commandToSpawnSpec(command, ctx.workDir),
|
|
31
40
|
stdin: payload,
|
|
32
41
|
}, null, {
|
|
33
42
|
timeoutMs,
|
|
@@ -37,7 +46,7 @@ export const OutputCheckCompletion = {
|
|
|
37
46
|
envPolicy: ctx.envPolicy,
|
|
38
47
|
});
|
|
39
48
|
if (checkResult.exitCode !== 0 && checkResult.stderr.trim()) {
|
|
40
|
-
console.warn(`[output_check] "${
|
|
49
|
+
console.warn(`[output_check] "${commandLabel(command)}" exit=${checkResult.exitCode}: ${checkResult.stderr.trim()}`);
|
|
41
50
|
}
|
|
42
51
|
return checkResult.exitCode === 0 && checkResult.failureKind === null;
|
|
43
52
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-check.js","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"output-check.js","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACrD,IAAI,EAAE,cAAc;IACpB,MAAM,EAAE;QACN,WAAW,EACT,sMAAsM;QACxM,MAAM,EAAE;YACN,KAAK,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,uFAAuF;gBACzF,WAAW,EAAE,oCAAoC;aAClD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,UAAU;gBAChB,OAAO,EAAE,KAAK;gBACd,WAAW,EAAE,6CAA6C;gBAC1D,WAAW,EAAE,KAAK;aACnB;SACF;KACF;IAED,KAAK,CAAC,KAA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M,CAAC,IAAI,EAAE,EAAE,CAAC;YAC5D,OAAO,CAAC,IAAI,CACV,mBAAmB,YAAY,CAAC,OAAO,CAAC,UAAU,WAAW,CAAC,QAAQ,KAAK,WAAW,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CACvG,CAAC;QACJ,CAAC;QAED,OAAO,WAAW,CAAC,QAAQ,KAAK,CAAC,IAAI,WAAW,CAAC,WAAW,KAAK,IAAI,CAAC;IACxE,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/drivers/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAOb,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/drivers/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAOb,MAAM,cAAc,CAAC;AAiCtB,eAAO,MAAM,cAAc,EAAE,YA8K5B,CAAC"}
|
package/dist/drivers/opencode.js
CHANGED
|
@@ -18,118 +18,11 @@ const EFFORT_TO_VARIANT = {
|
|
|
18
18
|
medium: null,
|
|
19
19
|
high: 'high',
|
|
20
20
|
};
|
|
21
|
-
// Memoize both success and failure so every task in a failed run reports
|
|
22
|
-
// the same setup error without re-probing.
|
|
23
|
-
let opencodeReady;
|
|
24
|
-
let opencodeReadyError;
|
|
25
21
|
let cachedDefaultModel;
|
|
26
|
-
|
|
27
|
-
try {
|
|
28
|
-
const proc = Bun.spawn(args, { stdout: 'pipe', stderr: 'pipe' });
|
|
29
|
-
const [stdout, stderr, code] = await Promise.all([
|
|
30
|
-
new Response(proc.stdout).text(),
|
|
31
|
-
new Response(proc.stderr).text(),
|
|
32
|
-
proc.exited,
|
|
33
|
-
]);
|
|
34
|
-
return { code, stdout, stderr };
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
return { code: -1, stdout: '', stderr: '' };
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
// Shared tail for every failure message. Desktop users get the in-app setup
|
|
41
|
-
// path first; direct SDK users still see the manual bun/npm install hint.
|
|
42
|
-
const SETUP_HINT = 'If you are using the Tagma desktop app, open Editor Settings -> OpenCode CLI to install or update the bundled binary. ' +
|
|
43
|
-
'Otherwise install it manually: `bun install -g opencode-ai` or `npm install -g opencode-ai`.';
|
|
44
|
-
async function ensureOpencodeInstalled() {
|
|
45
|
-
if (opencodeReady === true)
|
|
46
|
-
return;
|
|
47
|
-
if (opencodeReady === false && opencodeReadyError) {
|
|
48
|
-
throw new Error(opencodeReadyError);
|
|
49
|
-
}
|
|
50
|
-
// Probe existing install first; this is the hot path for desktop users
|
|
51
|
-
// (bundled binary in PATH) and for anyone who already has opencode.
|
|
52
|
-
const probe = await runCapture(['opencode', '--version']);
|
|
53
|
-
if (probe.code === 0) {
|
|
54
|
-
opencodeReady = true;
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
opencodeReady = false;
|
|
58
|
-
opencodeReadyError = `OpenCode CLI is not available on PATH. ${SETUP_HINT}`;
|
|
59
|
-
throw new Error(opencodeReadyError);
|
|
60
|
-
}
|
|
61
|
-
// `opencode models --verbose` emits "<provider>/<id>\n{...json...}\n" pairs.
|
|
62
|
-
// Walk balanced braces rather than split on newlines so we survive any
|
|
63
|
-
// whitespace oddities in the JSON payload.
|
|
64
|
-
function parseVerboseModels(stdout) {
|
|
65
|
-
const out = [];
|
|
66
|
-
let depth = 0;
|
|
67
|
-
let start = -1;
|
|
68
|
-
for (let i = 0; i < stdout.length; i++) {
|
|
69
|
-
const c = stdout[i];
|
|
70
|
-
if (c === '{') {
|
|
71
|
-
if (depth === 0)
|
|
72
|
-
start = i;
|
|
73
|
-
depth++;
|
|
74
|
-
}
|
|
75
|
-
else if (c === '}') {
|
|
76
|
-
depth--;
|
|
77
|
-
if (depth === 0 && start !== -1) {
|
|
78
|
-
try {
|
|
79
|
-
out.push(JSON.parse(stdout.slice(start, i + 1)));
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
/* skip malformed block */
|
|
83
|
-
}
|
|
84
|
-
start = -1;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
return out;
|
|
89
|
-
}
|
|
90
|
-
function pickFreeModel(models) {
|
|
91
|
-
const fullId = (m) => `${m.providerID ?? 'opencode'}/${m.id ?? ''}`;
|
|
92
|
-
const eligible = models.filter((m) => {
|
|
93
|
-
if (!m.id || m.id === 'big-pickle')
|
|
94
|
-
return false;
|
|
95
|
-
if (m.status && m.status !== 'active')
|
|
96
|
-
return false;
|
|
97
|
-
const cost = m.cost;
|
|
98
|
-
if (!cost || cost.input !== 0 || cost.output !== 0)
|
|
99
|
-
return false;
|
|
100
|
-
const ctx = m.limit?.context;
|
|
101
|
-
if (typeof ctx !== 'number' || ctx <= 128000)
|
|
102
|
-
return false;
|
|
103
|
-
return true;
|
|
104
|
-
});
|
|
105
|
-
// Prefer models explicitly labelled "-free" by the provider; those are
|
|
106
|
-
// a stronger stability signal than "cost happens to be 0 right now".
|
|
107
|
-
const preferred = eligible.filter((m) => m.id?.endsWith('-free'));
|
|
108
|
-
const pool = preferred.length > 0 ? preferred : eligible;
|
|
109
|
-
if (pool.length === 0)
|
|
110
|
-
return null;
|
|
111
|
-
// Deterministic pick: sort by full id so upstream model-list reordering
|
|
112
|
-
// doesn't flip our choice between runs.
|
|
113
|
-
pool.sort((a, b) => fullId(a).localeCompare(fullId(b)));
|
|
114
|
-
return fullId(pool[0]);
|
|
115
|
-
}
|
|
116
|
-
async function resolveDefaultModel() {
|
|
22
|
+
function resolveDefaultModel() {
|
|
117
23
|
if (cachedDefaultModel !== undefined)
|
|
118
24
|
return cachedDefaultModel;
|
|
119
|
-
|
|
120
|
-
// CLI can't be provisioned, so we let the error bubble up to the task
|
|
121
|
-
// runner instead of silently falling back to DEFAULT_MODEL (which would
|
|
122
|
-
// produce a second confusing ENOENT a few lines later in `opencode run`).
|
|
123
|
-
await ensureOpencodeInstalled();
|
|
124
|
-
console.error('[driver:opencode] resolving free opencode model...');
|
|
125
|
-
const { code, stdout } = await runCapture(['opencode', 'models', '--verbose']);
|
|
126
|
-
if (code !== 0) {
|
|
127
|
-
cachedDefaultModel = DEFAULT_MODEL;
|
|
128
|
-
return cachedDefaultModel;
|
|
129
|
-
}
|
|
130
|
-
const picked = pickFreeModel(parseVerboseModels(stdout));
|
|
131
|
-
cachedDefaultModel = picked ?? DEFAULT_MODEL;
|
|
132
|
-
console.error(`[driver:opencode] default model: ${cachedDefaultModel}`);
|
|
25
|
+
cachedDefaultModel = DEFAULT_MODEL;
|
|
133
26
|
return cachedDefaultModel;
|
|
134
27
|
}
|
|
135
28
|
export const OpenCodeDriver = {
|
|
@@ -138,20 +31,14 @@ export const OpenCodeDriver = {
|
|
|
138
31
|
sessionResume: true, // supports --session
|
|
139
32
|
systemPrompt: false, // no --system-prompt flag; prepend to prompt instead
|
|
140
33
|
outputFormat: true, // supports --format json
|
|
34
|
+
enforcesPermissions: false,
|
|
141
35
|
},
|
|
142
36
|
resolveModel() {
|
|
143
37
|
return DEFAULT_MODEL;
|
|
144
38
|
},
|
|
145
39
|
async buildCommand(task, track, ctx) {
|
|
146
40
|
const explicitModel = task.model ?? track.model;
|
|
147
|
-
|
|
148
|
-
// when the user pinned a model. ensureOpencodeInstalled throws with an
|
|
149
|
-
// actionable message when the binary is not present on PATH.
|
|
150
|
-
if (explicitModel)
|
|
151
|
-
await ensureOpencodeInstalled();
|
|
152
|
-
// Otherwise resolveDefaultModel both ensures the CLI and picks a free
|
|
153
|
-
// model from `opencode models --verbose` (cached per-process).
|
|
154
|
-
const model = explicitModel ?? (await resolveDefaultModel());
|
|
41
|
+
const model = explicitModel ?? resolveDefaultModel();
|
|
155
42
|
// Resolve reasoning_effort to opencode --variant. SDK schema layer already
|
|
156
43
|
// resolved task -> track -> pipeline inheritance, so we only need to read
|
|
157
44
|
// task.reasoning_effort here.
|
|
@@ -170,7 +57,9 @@ export const OpenCodeDriver = {
|
|
|
170
57
|
// continue_from: prefer session resume, fall back to text injection
|
|
171
58
|
let sessionId = null;
|
|
172
59
|
if (task.continue_from) {
|
|
173
|
-
|
|
60
|
+
const sessionDriver = ctx.sessionDriverMap.get(task.continue_from);
|
|
61
|
+
sessionId =
|
|
62
|
+
sessionDriver === 'opencode' ? (ctx.sessionMap.get(task.continue_from) ?? null) : null;
|
|
174
63
|
if (!sessionId) {
|
|
175
64
|
// no session; degrade to text context passthrough
|
|
176
65
|
let prev = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/drivers/opencode.ts"],"names":[],"mappings":"AAUA,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,yDAAyD;AAEzD,8EAA8E;AAC9E,2EAA2E;AAC3E,wDAAwD;AACxD,wCAAwC;AACxC,0CAA0C;AAC1C,uCAAuC;AACvC,uEAAuE;AACvE,4CAA4C;AAC5C,MAAM,iBAAiB,GAAkC;IACvD,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE,MAAM;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"opencode.js","sourceRoot":"","sources":["../../src/drivers/opencode.ts"],"names":[],"mappings":"AAUA,MAAM,aAAa,GAAG,qBAAqB,CAAC;AAE5C,6EAA6E;AAC7E,2EAA2E;AAC3E,yEAAyE;AACzE,2EAA2E;AAC3E,yEAAyE;AACzE,yDAAyD;AAEzD,8EAA8E;AAC9E,2EAA2E;AAC3E,wDAAwD;AACxD,wCAAwC;AACxC,0CAA0C;AAC1C,uCAAuC;AACvC,uEAAuE;AACvE,4CAA4C;AAC5C,MAAM,iBAAiB,GAAkC;IACvD,GAAG,EAAE,SAAS;IACd,MAAM,EAAE,IAAI;IACZ,IAAI,EAAE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AClC,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;gBACpB,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;gBACtB,CAAC,CAAC,MAAM,CAAC;QAEb,OAAO;YACL,SAAS;YACT,gBAAgB;SACjB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../src/duration.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/duration.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Single source of truth lives in @tagma/types so external plugins
|
|
2
|
+
// (trigger-webhook, etc.) and SDK-bundled plugins go through the same
|
|
3
|
+
// wrapper without the externals needing to depend on @tagma/sdk.
|
|
4
|
+
export { parseOptionalPluginTimeout } from '@tagma/types';
|
|
5
|
+
//# sourceMappingURL=duration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"duration.js","sourceRoot":"","sources":["../src/duration.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,sEAAsE;AACtE,iEAAiE;AACjE,OAAO,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { createTagma } from './tagma';
|
|
|
2
2
|
export type { CreateTagmaOptions, Tagma, TagmaRunOptions } from './tagma';
|
|
3
3
|
export { bunRuntime } from '@tagma/runtime-bun';
|
|
4
4
|
export type { EnvPolicy, TagmaRuntime, RunOptions as RuntimeRunOptions } from '@tagma/core';
|
|
5
|
-
export { definePipeline, PluginRegistry, TriggerBlockedError, TriggerTimeoutError } from '@tagma/core';
|
|
5
|
+
export { definePipeline, PluginRegistry, TriggerBlockedError, TriggerTimeoutError, } from '@tagma/core';
|
|
6
6
|
export type { EngineResult, RegisterPluginOptions, RunEventPayload } from '@tagma/core';
|
|
7
7
|
export { RUN_PROTOCOL_VERSION, TASK_LOG_CAP } from '@tagma/types';
|
|
8
8
|
export type { PipelineConfig, PipelineExecutionMode, RawPipelineConfig, RawTrackConfig, RawTaskConfig, TrackConfig, TaskConfig, RunSnapshotPayload, WireRunEvent, RunTaskState, TaskLogLine, ApprovalRequestInfo, ApprovalRequestHandle, TaskStatus, ApprovalRequest, ApprovalGateway, PluginCategory, PluginCapabilities, TagmaPlugin, DriverPlugin, TriggerPlugin, TriggerWatchHandle, CompletionPlugin, MiddlewarePlugin, RunEventPayload as PipelineRunEventPayload, } from '@tagma/types';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,kBAAkB,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,YAAY,EAAE,kBAAkB,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,YAAY,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxF,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAClE,YAAY,EACV,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,IAAI,uBAAuB,GAC3C,MAAM,cAAc,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { createTagma } from './tagma';
|
|
2
2
|
export { bunRuntime } from '@tagma/runtime-bun';
|
|
3
|
-
export { definePipeline, PluginRegistry, TriggerBlockedError, TriggerTimeoutError } from '@tagma/core';
|
|
3
|
+
export { definePipeline, PluginRegistry, TriggerBlockedError, TriggerTimeoutError, } from '@tagma/core';
|
|
4
4
|
export { RUN_PROTOCOL_VERSION, TASK_LOG_CAP } from '@tagma/types';
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-context.d.ts","sourceRoot":"","sources":["../../src/middlewares/static-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAqC,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"static-context.d.ts","sourceRoot":"","sources":["../../src/middlewares/static-context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAqC,MAAM,cAAc,CAAC;AAaxF,eAAO,MAAM,uBAAuB,EAAE,gBAsDrC,CAAC"}
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { basename } from 'path';
|
|
2
2
|
import { appendContext, validatePath } from '@tagma/core';
|
|
3
|
+
const DEFAULT_MAX_CONTEXT_CHARS = 200_000;
|
|
4
|
+
function parseMaxChars(value) {
|
|
5
|
+
if (value === undefined)
|
|
6
|
+
return DEFAULT_MAX_CONTEXT_CHARS;
|
|
7
|
+
if (typeof value !== 'number' || !Number.isSafeInteger(value) || value <= 0) {
|
|
8
|
+
throw new Error('static_context middleware: "max_chars" must be a positive integer');
|
|
9
|
+
}
|
|
10
|
+
return value;
|
|
11
|
+
}
|
|
3
12
|
export const StaticContextMiddleware = {
|
|
4
13
|
name: 'static_context',
|
|
5
14
|
schema: {
|
|
@@ -16,6 +25,12 @@ export const StaticContextMiddleware = {
|
|
|
16
25
|
description: 'Header shown before the content. Defaults to "Reference: <basename>".',
|
|
17
26
|
placeholder: 'Reference: spec.md',
|
|
18
27
|
},
|
|
28
|
+
max_chars: {
|
|
29
|
+
type: 'number',
|
|
30
|
+
description: 'Maximum number of characters to read from the file.',
|
|
31
|
+
default: DEFAULT_MAX_CONTEXT_CHARS,
|
|
32
|
+
min: 1,
|
|
33
|
+
},
|
|
19
34
|
},
|
|
20
35
|
},
|
|
21
36
|
async enhanceDoc(doc, config, ctx) {
|
|
@@ -28,7 +43,11 @@ export const StaticContextMiddleware = {
|
|
|
28
43
|
console.warn(`static_context: file ${filePath} not found, skipping`);
|
|
29
44
|
return doc;
|
|
30
45
|
}
|
|
31
|
-
const
|
|
46
|
+
const maxChars = parseMaxChars(config.max_chars);
|
|
47
|
+
const rawContent = await file.slice(0, maxChars + 1).text();
|
|
48
|
+
const content = rawContent.length > maxChars
|
|
49
|
+
? `${rawContent.slice(0, maxChars)}\n\n[truncated static context at ${maxChars} chars]`
|
|
50
|
+
: rawContent;
|
|
32
51
|
const label = config.label ?? `Reference: ${basename(filePath)}`;
|
|
33
52
|
// Append a labeled context block; the engine's serializer joins blocks
|
|
34
53
|
// with blank lines and places the task last. No [Task] header here —
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-context.js","sourceRoot":"","sources":["../../src/middlewares/static-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE1D,MAAM,CAAC,MAAM,uBAAuB,GAAqB;IACvD,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE;QACN,WAAW,EAAE,2DAA2D;QACxE,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;gBACd,WAAW,EAAE,+DAA+D;gBAC5E,WAAW,EAAE,cAAc;aAC5B;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uEAAuE;gBACpF,WAAW,EAAE,oBAAoB;aAClC;SACF;KACF;IAED,KAAK,CAAC,UAAU,CACd,GAAmB,EACnB,MAA+B,EAC/B,GAAsB;QAEtB,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAc,CAAC;QACvC,IAAI,CAAC,QAAQ;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,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;IAChD,CAAC;CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EngineResult, type RunPipelineOptions } from '@tagma/core';
|
|
2
2
|
import { type PipelineConfig, type RunEventPayload, type RunTaskState } from '@tagma/types';
|
|
3
3
|
export type { EngineResult };
|
|
4
|
-
export type PipelineRunnerStatus = 'idle' | 'running' | 'done' | 'aborted';
|
|
4
|
+
export type PipelineRunnerStatus = 'idle' | 'running' | 'done' | 'aborted' | 'failed';
|
|
5
5
|
export type PipelineRunnerOptions = Omit<RunPipelineOptions, 'signal' | 'onEvent'>;
|
|
6
6
|
export declare class PipelineRunner {
|
|
7
7
|
private readonly config;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-runner.d.ts","sourceRoot":"","sources":["../src/pipeline-runner.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAe,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"pipeline-runner.d.ts","sourceRoot":"","sources":["../src/pipeline-runner.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAe,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,CAAC;AACtF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,kBAAkB,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAC;AAEnF,qBAAa,cAAc;IAyBvB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI;IA1BvB;;;OAGG;IACH,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,OAAO,CAAgC;IAC/C,OAAO,CAAC,OAAO,CAAsC;IACrD,OAAO,CAAC,gBAAgB,CAAyB;IACjD,OAAO,CAAC,SAAS,CAA+C;IAChE;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAmC;gBAG9B,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,qBAAqB;IAK9C,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAEzB;IACD,IAAI,MAAM,IAAI,oBAAoB,CAEjC;IAED;;OAEG;IACH,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC;IAuC9B,OAAO,CAAC,WAAW;IA6DnB;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAM5B;;;OAGG;IACH,QAAQ,IAAI,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC;IAM7C;;;;OAIG;IACH,SAAS,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,GAAG,MAAM,IAAI;CAIjE"}
|
package/dist/pipeline-runner.js
CHANGED
|
@@ -80,8 +80,14 @@ export class PipelineRunner {
|
|
|
80
80
|
signal: this._abortController.signal,
|
|
81
81
|
onEvent: (event) => {
|
|
82
82
|
this._applyEvent(event);
|
|
83
|
-
for (const h of this._handlers)
|
|
84
|
-
|
|
83
|
+
for (const h of [...this._handlers]) {
|
|
84
|
+
try {
|
|
85
|
+
h(event);
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
console.error('[PipelineRunner] subscriber threw while handling run event', err);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
85
91
|
},
|
|
86
92
|
})
|
|
87
93
|
.then((result) => {
|
|
@@ -90,7 +96,7 @@ export class PipelineRunner {
|
|
|
90
96
|
return result;
|
|
91
97
|
})
|
|
92
98
|
.catch((err) => {
|
|
93
|
-
this._status = 'aborted';
|
|
99
|
+
this._status = this._abortController.signal.aborted ? 'aborted' : 'failed';
|
|
94
100
|
throw err;
|
|
95
101
|
});
|
|
96
102
|
return this._result;
|
|
@@ -151,6 +157,10 @@ export class PipelineRunner {
|
|
|
151
157
|
case 'run_end':
|
|
152
158
|
this._status = this._abortController.signal.aborted ? 'aborted' : 'done';
|
|
153
159
|
return;
|
|
160
|
+
case 'run_error':
|
|
161
|
+
if (this._status !== 'aborted')
|
|
162
|
+
this._status = 'failed';
|
|
163
|
+
return;
|
|
154
164
|
default:
|
|
155
165
|
return;
|
|
156
166
|
}
|
|
@@ -159,6 +169,8 @@ export class PipelineRunner {
|
|
|
159
169
|
* Cancel the running pipeline. Safe to call multiple times or before start().
|
|
160
170
|
*/
|
|
161
171
|
abort(reason) {
|
|
172
|
+
if (this._status === 'done' || this._status === 'aborted' || this._status === 'failed')
|
|
173
|
+
return;
|
|
162
174
|
this._status = 'aborted';
|
|
163
175
|
this._abortController.abort(reason);
|
|
164
176
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-runner.js","sourceRoot":"","sources":["../src/pipeline-runner.ts"],"names":[],"mappings":"AAAA,yBAAyB;AACzB,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,oBAAoB;AACpB,EAAE;AACF,iEAAiE;AACjE,0EAA0E;AAC1E,kEAAkE;AAClE,sBAAsB;AACtB,EAAE;AACF,yBAAyB;AACzB,EAAE;AACF,uDAAuD;AACvD,EAAE;AACF,sE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C,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,QAAQ;YAAE,OAAO;QAC/F,IAAI,CAAC,OAAO,GAAG,SAAS,CAAC;QACzB,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACtC,CAAC;IAED;;;OAGG;IACH,QAAQ;QACN,MAAM,IAAI,GAAG,IAAI,GAAG,EAAwB,CAAC;QAC7C,KAAK,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,SAAS,CAAC,OAAyC;QACjD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC5B,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
package/dist/plugins.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { bootstrapBuiltins } from './bootstrap';
|
|
2
|
-
export { PluginRegistry, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest
|
|
2
|
+
export { PluginRegistry, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest } from '@tagma/core';
|
|
3
3
|
export type { RegisteredCapability, RegisterPluginOptions, RegisterResult } from '@tagma/core';
|
|
4
4
|
export type { CapabilityHandler, PluginCategory, PluginCapabilities, PluginModule, PluginManifest, TagmaPlugin, DriverPlugin, TriggerPlugin, CompletionPlugin, MiddlewarePlugin, } from '@tagma/types';
|
|
5
5
|
//# sourceMappingURL=plugins.d.ts.map
|
package/dist/plugins.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpG,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC/F,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,cAAc,CAAC"}
|
package/dist/plugins.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { bootstrapBuiltins } from './bootstrap';
|
|
2
|
-
export { PluginRegistry, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest
|
|
2
|
+
export { PluginRegistry, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest } from '@tagma/core';
|
|
3
3
|
//# sourceMappingURL=plugins.js.map
|
package/dist/plugins.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -27,5 +27,6 @@ export declare function deresolvePipeline(config: PipelineConfig, workDir: strin
|
|
|
27
27
|
* Returns an array of error messages (empty = valid).
|
|
28
28
|
*/
|
|
29
29
|
export declare function validateConfig(config: PipelineConfig): string[];
|
|
30
|
+
export declare function validateConfigDiagnostics(config: PipelineConfig, workDir?: string): ValidationError[];
|
|
30
31
|
export declare function loadPipeline(yamlContent: string, workDir: string): Promise<PipelineConfig>;
|
|
31
32
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,cAAc,EACd,iBAAiB,EAOlB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEnE,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,QAAQ,CAAC,WAAW,EAAE,SAAS,eAAe,EAAE,CAAC;gBAErC,WAAW,EAAE,SAAS,eAAe,EAAE;CASpD;AAID,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CA8B5D;AAqGD,wBAAgB,aAAa,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,cAAc,CAkGrF;AA0DD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,GAAG,MAAM,CAEpF;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAgF5F;AAID;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,EAAE,CAE/D;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,MAAM,GACf,eAAe,EAAE,CAoBnB;AAmDD,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAOhG"}
|