@tagma/sdk 0.7.6 → 0.7.7

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.
Files changed (86) hide show
  1. package/README.md +52 -24
  2. package/dist/approval.d.ts +1 -1
  3. package/dist/approval.d.ts.map +1 -1
  4. package/dist/completions/exit-code.d.ts +1 -1
  5. package/dist/completions/exit-code.d.ts.map +1 -1
  6. package/dist/completions/file-exists.d.ts +1 -1
  7. package/dist/completions/file-exists.d.ts.map +1 -1
  8. package/dist/completions/output-check.d.ts +1 -1
  9. package/dist/completions/output-check.d.ts.map +1 -1
  10. package/dist/completions/output-check.js +13 -61
  11. package/dist/completions/output-check.js.map +1 -1
  12. package/dist/config-ops.d.ts +1 -1
  13. package/dist/config-ops.d.ts.map +1 -1
  14. package/dist/config.d.ts +2 -2
  15. package/dist/config.d.ts.map +1 -1
  16. package/dist/config.js +1 -1
  17. package/dist/config.js.map +1 -1
  18. package/dist/drivers/opencode.d.ts +1 -1
  19. package/dist/drivers/opencode.d.ts.map +1 -1
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/middlewares/static-context.d.ts +1 -1
  25. package/dist/middlewares/static-context.d.ts.map +1 -1
  26. package/dist/pipeline-runner.d.ts +2 -2
  27. package/dist/pipeline-runner.d.ts.map +1 -1
  28. package/dist/pipeline-runner.js +2 -2
  29. package/dist/pipeline-runner.js.map +1 -1
  30. package/dist/plugins.d.ts +2 -2
  31. package/dist/plugins.d.ts.map +1 -1
  32. package/dist/schema.d.ts +6 -1
  33. package/dist/schema.d.ts.map +1 -1
  34. package/dist/schema.js +17 -0
  35. package/dist/schema.js.map +1 -1
  36. package/dist/tagma.d.ts +1 -1
  37. package/dist/tagma.d.ts.map +1 -1
  38. package/dist/triggers/file.d.ts +1 -1
  39. package/dist/triggers/file.d.ts.map +1 -1
  40. package/dist/triggers/file.js +29 -7
  41. package/dist/triggers/file.js.map +1 -1
  42. package/dist/triggers/manual.d.ts +1 -1
  43. package/dist/triggers/manual.d.ts.map +1 -1
  44. package/dist/triggers/manual.js +38 -39
  45. package/dist/triggers/manual.js.map +1 -1
  46. package/dist/validate-raw.d.ts +1 -1
  47. package/dist/validate-raw.d.ts.map +1 -1
  48. package/dist/validate-raw.js +7 -1
  49. package/dist/validate-raw.js.map +1 -1
  50. package/dist/yaml.d.ts +1 -1
  51. package/dist/yaml.d.ts.map +1 -1
  52. package/dist/yaml.js +1 -1
  53. package/dist/yaml.js.map +1 -1
  54. package/package.json +5 -20
  55. package/dist/engine.d.ts +0 -13
  56. package/dist/engine.d.ts.map +0 -1
  57. package/dist/engine.js +0 -10
  58. package/dist/engine.js.map +0 -1
  59. package/dist/logger.d.ts +0 -3
  60. package/dist/logger.d.ts.map +0 -1
  61. package/dist/logger.js +0 -2
  62. package/dist/logger.js.map +0 -1
  63. package/dist/runner.d.ts +0 -2
  64. package/dist/runner.d.ts.map +0 -1
  65. package/dist/runner.js +0 -2
  66. package/dist/runner.js.map +0 -1
  67. package/dist/runtime/adapters/stdin-approval.d.ts +0 -2
  68. package/dist/runtime/adapters/stdin-approval.d.ts.map +0 -1
  69. package/dist/runtime/adapters/stdin-approval.js +0 -2
  70. package/dist/runtime/adapters/stdin-approval.js.map +0 -1
  71. package/dist/runtime/adapters/websocket-approval.d.ts +0 -2
  72. package/dist/runtime/adapters/websocket-approval.d.ts.map +0 -1
  73. package/dist/runtime/adapters/websocket-approval.js +0 -2
  74. package/dist/runtime/adapters/websocket-approval.js.map +0 -1
  75. package/dist/runtime/bun-process-runner.d.ts +0 -2
  76. package/dist/runtime/bun-process-runner.d.ts.map +0 -1
  77. package/dist/runtime/bun-process-runner.js +0 -2
  78. package/dist/runtime/bun-process-runner.js.map +0 -1
  79. package/dist/runtime.d.ts +0 -3
  80. package/dist/runtime.d.ts.map +0 -1
  81. package/dist/runtime.js +0 -2
  82. package/dist/runtime.js.map +0 -1
  83. package/dist/types.d.ts +0 -3
  84. package/dist/types.d.ts.map +0 -1
  85. package/dist/types.js +0 -3
  86. package/dist/types.js.map +0 -1
package/README.md CHANGED
@@ -1,25 +1,25 @@
1
1
  # @tagma/sdk
2
2
 
3
- > ## ⚠️ Bun-only runtime
3
+ > ## Bun-only runtime
4
4
  >
5
5
  > ```bash
6
6
  > bun add @tagma/sdk
7
7
  > ```
8
8
  >
9
9
  > This package is published as pre-built JavaScript (`dist/`), but the runtime
10
- > uses Bun-only APIs (`Bun.spawn`, `Bun.file`, `Bun.serve`). It will install
11
- > under `npm` / `yarn` / `pnpm` without error, but **crash at runtime on Node**
12
- > the first time a pipeline spawns a task. Get Bun at <https://bun.sh>.
10
+ > uses Bun-only APIs (`Bun.spawn`, `Bun.file`, `Bun.serve`). Installing with
11
+ > `npm`, `yarn`, or `pnpm` is blocked by the package preinstall guard. Get Bun
12
+ > at <https://bun.sh>.
13
13
  >
14
14
  > _(The `npm i @tagma/sdk` line in the npmjs.com sidebar is auto-generated by
15
- > the npm registry website and cannot be removed — please ignore it and use
16
- > the command above.)_
15
+ > the npm registry website and cannot be removed; ignore it and use the command
16
+ > above.)_
17
17
 
18
18
  A local AI task orchestration SDK for [Bun](https://bun.sh). Define multi-track pipelines in YAML, run AI coding agents (OpenCode, Codex, Claude Code) and shell commands in parallel with dependency resolution, approval gates, and lifecycle hooks.
19
19
 
20
20
  ## Install
21
21
 
22
- **Requires Bun 1.3.** Node/npm are not supported.
22
+ **Requires Bun >= 1.3.** Node/npm are not supported.
23
23
 
24
24
  ```bash
25
25
  bun add @tagma/sdk
@@ -86,6 +86,7 @@ directly only when you need lower-level package boundaries.
86
86
  ```yaml
87
87
  pipeline:
88
88
  name: my-pipeline
89
+ mode: trusted
89
90
  driver: opencode
90
91
  timeout: 30m
91
92
  plugins:
@@ -150,6 +151,7 @@ pipeline:
150
151
  | Field | Type | Required | Description |
151
152
  | ------------- | --------------- | -------- | ------------------------------------------------------------------------------------------ |
152
153
  | `name` | `string` | Yes | Pipeline name, used in logs and run IDs |
154
+ | `mode` | `trusted \| safe` | No | Execution boundary. Defaults to `trusted`; `safe` blocks shell tasks, hooks, automatic plugins, and non-allowlisted capabilities |
153
155
  | `driver` | `string` | No | Default driver for all tracks/tasks (inherited). Built-in: `opencode` |
154
156
  | `model` | `string` | No | Default model for all tracks/tasks (inherited). Exact model name, e.g. `claude-sonnet-4-6` |
155
157
  | `permissions` | `Permissions` | No | Default permissions inherited by all tracks/tasks (see Permissions) |
@@ -171,6 +173,8 @@ Each hook value can be a single command string or an array of commands.
171
173
  | `pipeline_complete` | `string \| string[]` | Runs when the pipeline finishes successfully |
172
174
  | `pipeline_error` | `string \| string[]` | Runs when the pipeline finishes with errors |
173
175
 
176
+ `pipeline_start` and `task_start` are gates: any non-zero exit code blocks the run/task. Hook stdout and stderr are written into the unified run log.
177
+
174
178
  ### Track Fields
175
179
 
176
180
  | Field | Type | Required | Default | Description |
@@ -191,7 +195,7 @@ Each hook value can be a single command string or an array of commands.
191
195
 
192
196
  | Field | Type | Required | Default | Description |
193
197
  | --------------- | -------------------- | -------- | -------------------- | ------------------------------------------------------------------------------------------------------ |
194
- | `id` | `string` | Yes | — | Unique task identifier (unique within the pipeline) |
198
+ | `id` | `string` | Yes | — | Unique task identifier within its track. Cross-track refs use `trackId.taskId` |
195
199
  | `name` | `string` | No | — | Display name |
196
200
  | `prompt` | `string` | No\* | — | AI prompt to send to the driver. \*Mutually exclusive with `command` |
197
201
  | `command` | `string` | No\* | — | Shell command to execute directly. \*Mutually exclusive with `prompt` |
@@ -211,11 +215,15 @@ Each hook value can be a single command string or an array of commands.
211
215
 
212
216
  ### Permissions
213
217
 
214
- | Field | Type | Default | Description |
215
- | --------- | --------- | ------- | ----------------------------------- |
216
- | `read` | `boolean` | — | Allow the agent to read files |
217
- | `write` | `boolean` | — | Allow the agent to write files |
218
- | `execute` | `boolean` | — | Allow the agent to execute commands |
218
+ | Field | Type | Default | Description |
219
+ | --------- | --------- | ------- | ------------------------------------------------ |
220
+ | `read` | `boolean` | — | Allow the AI driver/agent to read files |
221
+ | `write` | `boolean` | — | Allow the AI driver/agent to write files |
222
+ | `execute` | `boolean` | — | Allow the AI driver/agent to execute tool commands |
223
+
224
+ `permissions` are passed to AI drivers that support them. They do not sandbox
225
+ YAML `command` tasks; command tasks are host shell execution and are controlled
226
+ by `mode: safe` / `mode: trusted`.
219
227
 
220
228
  ### Inheritance
221
229
 
@@ -401,6 +409,7 @@ Tasks can declare named, typed `inputs` / `outputs`. Inputs flow in from upstrea
401
409
 
402
410
  - immutable config editing helpers
403
411
  - raw validation helpers
412
+ - resolved and raw DAG helpers
404
413
  - task reference helpers
405
414
 
406
415
  ### Dataflow helpers: `@tagma/sdk/dataflow`
@@ -408,10 +417,14 @@ Tasks can declare named, typed `inputs` / `outputs`. Inputs flow in from upstrea
408
417
  - placeholder substitution, binding resolution, output extraction, and internal prompt-contract inference
409
418
  - stable public subpath for pure dataflow helpers; no runtime/process imports
410
419
 
420
+ ### Pipeline runner: `@tagma/sdk/pipeline-runner`
421
+
422
+ - `PipelineRunner` lifecycle wrapper for hosts that manage multiple concurrent runs
423
+
411
424
  ### Runtime approval adapters
412
425
 
413
- - `@tagma/sdk/runtime/adapters/stdin-approval`
414
- - `@tagma/sdk/runtime/adapters/websocket-approval`
426
+ - `@tagma/runtime-bun/adapters/stdin-approval`
427
+ - `@tagma/runtime-bun/adapters/websocket-approval`
415
428
 
416
429
  ### Split packages
417
430
 
@@ -453,9 +466,13 @@ Options:
453
466
  - `run_end` — pipeline finished; includes `success: boolean` and `abortReason: 'timeout' | 'stop_all' | 'external' | null`. `null` means the run completed on its own steam (success may still be `false` if tasks failed).
454
467
  - `run_error` — reserved for fatal engine errors surfaced over the wire.
455
468
  - `approval_request` / `approval_resolved` — bridged from the approval gateway so hosts see approvals on the same channel as task updates, without separately subscribing to the gateway.
456
- - `runId` -- caller-supplied run ID. When provided the engine uses this instead of generating its own, keeping the caller and the SDK log directories aligned on the same ID
469
+ - `runId` -- caller-supplied run ID. Must match `run_[A-Za-z0-9_-]{1,128}`. When provided the engine uses this instead of generating its own, keeping the caller and the SDK log directories aligned on the same ID
457
470
  - `maxLogRuns` -- number of per-run log directories to keep under `<workDir>/.tagma/logs/` (default: 20)
458
471
  - `skipPluginLoading` -- skip the engine's built-in `loadPlugins(config.plugins)` call. Set this when the host has already pre-loaded plugins from a custom resolution path (e.g. the editor loading from the user's workspace `node_modules`) so the engine doesn't re-resolve them via Node's default cwd-based import.
472
+ - `mode` -- override `config.mode` for this run. `trusted` is the default. `safe` blocks `command` tasks, lifecycle hooks, automatic `pipeline.plugins` loading, and non-allowlisted driver/trigger/completion/middleware types.
473
+ - `safeModeAllowlist` -- extends the built-in safe-mode allowlist for trusted host integrations.
474
+ - `envPolicy` -- controls child process environment inheritance. Defaults to a minimal environment (`PATH`, home/user/temp/system keys). Use `{ mode: 'allowlist', keys: [...] }` or `{ mode: 'inherit' }` only when the host deliberately wants to expose more env vars.
475
+ - `logPrompt` -- when `true`, writes the final middleware-expanded prompt to the run log. Defaults to `false`.
459
476
 
460
477
  > **stdout / stderr persistence.** With the default Bun runtime, the engine streams every task's stdout and stderr to disk under `<workDir>/.tagma/logs/<runId>/<taskId>.stdout` and `.stderr`. Custom runtimes can relocate those artifacts by implementing `runtime.logStore.taskOutputPath()`. The `TaskResult.stdout` / `stderr` strings are bounded tails (8 MB / 4 MB by default) — long outputs are truncated from the head with a marker, and consumers that need the full bytes should read `TaskResult.stdoutPath` / `stderrPath`. Use `TaskResult.stdoutBytes` / `stderrBytes` to display "32 MB (truncated)" without re-stat'ing the file.
461
478
 
@@ -464,6 +481,8 @@ Options:
464
481
  Higher-level wrapper for managing multiple concurrent pipeline runs — designed for sidecar / Tauri IPC scenarios where the frontend controls pipeline lifecycle by ID.
465
482
 
466
483
  ```ts
484
+ import { PipelineRunner } from '@tagma/sdk/pipeline-runner';
485
+
467
486
  const runner = new PipelineRunner(config, workDir, options?); // options: Omit<RunPipelineOptions, 'signal' | 'onEvent'>
468
487
 
469
488
  // Subscribe before start — handler is called for every RunEventPayload
@@ -521,13 +540,13 @@ export default {
521
540
 
522
541
  Pass `resolveFrom` when plugins are installed in a workspace-local `node_modules`.
523
542
 
524
- ### `PluginRegistry.registerTagmaPlugin(plugin): RegisteredCapability[]`
543
+ ### `PluginRegistry.registerTagmaPlugin(plugin, options?): RegisteredCapability[]`
525
544
 
526
- Registers every supported capability from a `TagmaPlugin` default export.
545
+ Registers every supported capability from a `TagmaPlugin` default export. Duplicate capabilities fail by default; pass `{ replace: true }` only for an intentional reload.
527
546
 
528
- ### `PluginRegistry.registerPlugin(category, type, handler): void`
547
+ ### `PluginRegistry.registerPlugin(category, type, handler, options?): RegisterResult`
529
548
 
530
- Registers one capability handler manually. Prefer `registerTagmaPlugin()` for package-level plugins.
549
+ Registers one capability handler manually. Duplicate `category/type` registrations fail by default; pass `{ replace: true }` only for an intentional hot replacement. Prefer `registerTagmaPlugin()` for package-level plugins.
531
550
 
532
551
  Plugin handlers (`TriggerPlugin`, `CompletionPlugin`, `MiddlewarePlugin`) may optionally expose a declarative `schema: PluginSchema` field so visual editors can render a typed form for the plugin's config instead of a raw key/value editor:
533
552
 
@@ -544,15 +563,24 @@ export const HttpTrigger: TriggerPlugin = {
544
563
  timeout: { type: 'duration', description: 'Give up after this long.' },
545
564
  },
546
565
  },
547
- async watch(config, ctx) {
566
+ watch(config, ctx) {
548
567
  // Trigger plugins should use ctx.runtime for file IO, watching, and
549
568
  // timing so they can run under non-Bun test/runtime implementations.
550
- /* ... */
569
+ const controller = new AbortController();
570
+ const fired = waitForHttp(config, ctx, controller.signal);
571
+ return {
572
+ fired,
573
+ dispose(reason = 'trigger disposed') {
574
+ controller.abort(reason);
575
+ },
576
+ };
551
577
  },
552
578
  };
553
579
  ```
554
580
 
555
- The schema is purely descriptive — plugins still perform their own runtime validation. Supported field types: `string`, `number`, `boolean`, `enum`, `path`, `duration`, `number-or-list`. Each field can declare `required`, `default`, `description`, `enum`, `min`/`max`, `placeholder`. Built-in plugins (`file`/`manual` triggers; `exit_code`/`file_exists`/`output_check` completions; `static_context` middleware) all ship with schemas so editors can generate forms out of the box.
581
+ Trigger `watch()` methods must return `{ fired, dispose }`: the engine awaits
582
+ `fired` and calls `dispose()` on success, failure, task timeout, and pipeline
583
+ abort. The schema is purely descriptive — plugins still perform their own runtime validation. Supported field types: `string`, `number`, `boolean`, `enum`, `path`, `duration`, `number-or-list`. Each field can declare `required`, `default`, `description`, `enum`, `min`/`max`, `placeholder`. Built-in plugins (`file`/`manual` triggers; `exit_code`/`file_exists`/`output_check` completions; `static_context` middleware) all ship with schemas so editors can generate forms out of the box.
556
584
 
557
585
  ### `PluginRegistry.getHandler(category, type): PluginType`
558
586
 
@@ -764,7 +792,7 @@ structured `LogRecord`; the engine uses this to emit `task_log` events:
764
792
 
765
793
  ```ts
766
794
  import { bunRuntime } from '@tagma/sdk';
767
- import { Logger, type LogRecord } from '@tagma/sdk/logger';
795
+ import { Logger, type LogRecord } from '@tagma/core';
768
796
 
769
797
  const logger = new Logger(workDir, runId, bunRuntime().logStore, (record: LogRecord) => {
770
798
  // record = { level, taskId, timestamp, text }
@@ -1,3 +1,3 @@
1
1
  export { InMemoryApprovalGateway } from '@tagma/core';
2
- export type { ApprovalDecision, ApprovalEvent, ApprovalGateway, ApprovalListener, ApprovalOutcome, ApprovalRequest, } from '@tagma/core';
2
+ export type { ApprovalDecision, ApprovalEvent, ApprovalGateway, ApprovalListener, ApprovalOutcome, ApprovalRequest, ApprovalRequestHandle, } from '@tagma/core';
3
3
  //# sourceMappingURL=approval.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,GAChB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"approval.d.ts","sourceRoot":"","sources":["../src/approval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { CompletionPlugin } from '../types';
1
+ import type { CompletionPlugin } from '@tagma/types';
2
2
  export declare const ExitCodeCompletion: CompletionPlugin;
3
3
  //# sourceMappingURL=exit-code.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exit-code.d.ts","sourceRoot":"","sources":["../../src/completions/exit-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,UAAU,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,gBA+BhC,CAAC"}
1
+ {"version":3,"file":"exit-code.d.ts","sourceRoot":"","sources":["../../src/completions/exit-code.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,cAAc,CAAC;AAEpF,eAAO,MAAM,kBAAkB,EAAE,gBA+BhC,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { CompletionPlugin } from '../types';
1
+ import type { CompletionPlugin } from '@tagma/types';
2
2
  export declare const FileExistsCompletion: CompletionPlugin;
3
3
  //# sourceMappingURL=file-exists.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-exists.d.ts","sourceRoot":"","sources":["../../src/completions/file-exists.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,UAAU,CAAC;AAKhF,eAAO,MAAM,oBAAoB,EAAE,gBA2DlC,CAAC"}
1
+ {"version":3,"file":"file-exists.d.ts","sourceRoot":"","sources":["../../src/completions/file-exists.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,cAAc,CAAC;AAKpF,eAAO,MAAM,oBAAoB,EAAE,gBA2DlC,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { CompletionPlugin } from '../types';
1
+ import type { CompletionPlugin } from '@tagma/types';
2
2
  export declare const OutputCheckCompletion: CompletionPlugin;
3
3
  //# sourceMappingURL=output-check.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"output-check.d.ts","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,UAAU,CAAC;AAgBhF,eAAO,MAAM,qBAAqB,EAAE,gBA0FnC,CAAC"}
1
+ {"version":3,"file":"output-check.d.ts","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAiC,MAAM,cAAc,CAAC;AAKpF,eAAO,MAAM,qBAAqB,EAAE,gBAwDnC,CAAC"}
@@ -1,14 +1,5 @@
1
1
  import { parseDuration, shellArgs } from '@tagma/core';
2
2
  const DEFAULT_TIMEOUT_MS = 30_000;
3
- async function drain(stream) {
4
- if (!stream)
5
- return;
6
- await stream.pipeTo(new WritableStream({
7
- write() {
8
- // Discard check stdout; only exit status matters.
9
- },
10
- }));
11
- }
12
3
  export const OutputCheckCompletion = {
13
4
  name: 'output_check',
14
5
  schema: {
@@ -33,61 +24,22 @@ export const OutputCheckCompletion = {
33
24
  if (!checkCmd)
34
25
  throw new Error('output_check completion: "check" is required');
35
26
  const timeoutMs = config.timeout != null ? parseDuration(String(config.timeout)) : DEFAULT_TIMEOUT_MS;
36
- const controller = new AbortController();
37
- const timer = setTimeout(() => controller.abort(), timeoutMs);
38
- // Wire pipeline abort signal into the check process so external abort
39
- // terminates the child instead of leaving it running undetected.
40
- const onAbort = () => controller.abort();
41
- if (ctx.signal) {
42
- if (ctx.signal.aborted) {
43
- controller.abort();
44
- }
45
- else {
46
- ctx.signal.addEventListener('abort', onAbort, { once: true });
47
- }
48
- }
49
- const proc = Bun.spawn(shellArgs(checkCmd), {
27
+ const payload = result.normalizedOutput ?? result.stdout;
28
+ const checkResult = await ctx.runtime.runSpawn({
29
+ args: shellArgs(checkCmd),
50
30
  cwd: ctx.workDir,
51
- stdin: 'pipe',
52
- stdout: 'pipe',
53
- stderr: 'pipe',
54
- signal: controller.signal,
31
+ stdin: payload,
32
+ }, null, {
33
+ timeoutMs,
34
+ signal: ctx.signal,
35
+ maxStdoutTailBytes: 256 * 1024,
36
+ maxStderrTailBytes: 256 * 1024,
37
+ envPolicy: ctx.envPolicy,
55
38
  });
56
- try {
57
- if (proc.stdin) {
58
- try {
59
- // Prefer driver-normalized text (e.g. concatenated message text for
60
- // AI drivers that emit NDJSON). Falling back to raw stdout keeps
61
- // command tasks and drivers without parseResult working.
62
- const payload = result.normalizedOutput ?? result.stdout;
63
- proc.stdin.write(payload);
64
- proc.stdin.end(); // no await — consistent with runner.ts; proc.exited handles sync
65
- }
66
- catch (err) {
67
- // EPIPE is expected when the check process exits before reading all of stdin
68
- // (e.g. `grep -q` exits on first match). Anything else is a real failure.
69
- const code = err?.code;
70
- if (code !== 'EPIPE')
71
- throw err;
72
- }
73
- }
74
- // Drain stdout and stderr concurrently so verbose check commands cannot
75
- // block on pipe buffers while the parent waits for process exit.
76
- const [exitCode, , stderr] = await Promise.all([
77
- proc.exited,
78
- drain(proc.stdout),
79
- new Response(proc.stderr).text(),
80
- ]);
81
- if (exitCode !== 0 && stderr.trim()) {
82
- console.warn(`[output_check] "${checkCmd}" exit=${exitCode}: ${stderr.trim()}`);
83
- }
84
- return exitCode === 0;
85
- }
86
- finally {
87
- clearTimeout(timer);
88
- if (ctx.signal)
89
- ctx.signal.removeEventListener('abort', onAbort);
39
+ if (checkResult.exitCode !== 0 && checkResult.stderr.trim()) {
40
+ console.warn(`[output_check] "${checkCmd}" exit=${checkResult.exitCode}: ${checkResult.stderr.trim()}`);
90
41
  }
42
+ return checkResult.exitCode === 0 && checkResult.failureKind === null;
91
43
  },
92
44
  };
93
45
  //# sourceMappingURL=output-check.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"output-check.js","sourceRoot":"","sources":["../../src/completions/output-check.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,KAAK,UAAU,KAAK,CAAC,MAAyC;IAC5D,IAAI,CAAC,MAAM;QAAE,OAAO;IACpB,MAAM,MAAM,CAAC,MAAM,CACjB,IAAI,cAAc,CAAa;QAC7B,KAAK;YACH,kDAAkD;QACpD,CAAC;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,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,QAAQ;gBACd,QAAQ,EAAE,IAAI;gBACd,WAAW,EACT,oIAAoI;gBACtI,WAAW,EAAE,gBAAgB;aAC9B;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,KAAK,CACT,MAA+B,EAC/B,MAAkB,EAClB,GAAsB;QAEtB,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAe,CAAC;QACxC,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;QAE/E,MAAM,SAAS,GACb,MAAM,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC;QAEtF,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC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
1
- import type { RawPipelineConfig, RawTrackConfig, RawTaskConfig } from './types';
1
+ import type { RawPipelineConfig, RawTrackConfig, RawTaskConfig } from '@tagma/types';
2
2
  /**
3
3
  * Create a minimal empty pipeline config.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"config-ops.d.ts","sourceRoot":"","sources":["../src/config-ops.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIhF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,CAEnE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC,GACjD,iBAAiB,CAEnB;AAID;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,cAAc,GAAG,iBAAiB,CAQ/F;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,GAAG,iBAAiB,CAGzF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACvB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,iBAAiB,CAQnB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC,GACpD,iBAAiB,CAMnB;AAID;;;GAGG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,aAAa,GAClB,iBAAiB,CAanB;AAED;;;;;;GAMG;AACH,wBAAgB,U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,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC,CAAC,GACpD,iBAAiB,CAMnB;AAID;;;GAGG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,aAAa,GAClB,iBAAiB,CAanB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,SAAS,UAAQ,GAChB,iBAAiB,CAsDnB;AAkBD;;;;GAIG;AACH,wBAAgB,QAAQ,CACtB,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,iBAAiB,CAgBnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,WAAW,UAAO,GACjB,iBAAiB,CAwEnB"}
package/dist/config.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export { createEmptyPipeline, setPipelineField, upsertTrack, removeTrack, moveTrack, updateTrack, upsertTask, removeTask, moveTask, transferTask, } from './config-ops';
2
2
  export { validateRaw } from './validate-raw';
3
3
  export type { ValidationError, KnownPluginTypes } from './validate-raw';
4
- export { buildRawDag } from '@tagma/core';
5
- export type { RawDag, RawDagNode } from '@tagma/core';
4
+ export { buildDag, buildRawDag } from '@tagma/core';
5
+ export type { Dag, DagNode, RawDag, RawDagNode } from '@tagma/core';
6
6
  export { TASK_ID_RE, isValidTaskId, qualifyTaskId, isQualifiedRef, buildTaskIndex, resolveTaskRef, AMBIGUOUS, } from '@tagma/core';
7
7
  export type { TaskIndex, RefResolution } from '@tagma/core';
8
8
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,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;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,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;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpD,YAAY,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { createEmptyPipeline, setPipelineField, upsertTrack, removeTrack, moveTrack, updateTrack, upsertTask, removeTask, moveTask, transferTask, } from './config-ops';
2
2
  export { validateRaw } from './validate-raw';
3
- export { buildRawDag } from '@tagma/core';
3
+ export { buildDag, buildRawDag } from '@tagma/core';
4
4
  export { TASK_ID_RE, isValidTaskId, qualifyTaskId, isQualifiedRef, buildTaskIndex, resolveTaskRef, AMBIGUOUS, } from '@tagma/core';
5
5
  //# sourceMappingURL=config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,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;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,GACV,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,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;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,EACL,UAAU,EACV,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,SAAS,GACV,MAAM,aAAa,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { DriverPlugin } from '../types';
1
+ import type { DriverPlugin } from '@tagma/types';
2
2
  export declare const OpenCodeDriver: DriverPlugin;
3
3
  //# sourceMappingURL=opencode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"opencode.d.ts","sourceRoot":"","sources":["../../src/drivers/opencode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EAOb,MAAM,UAAU,CAAC;AA4JlB,eAAO,MAAM,cAAc,EAAE,YAiL5B,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;AA4JtB,eAAO,MAAM,cAAc,EAAE,YAiL5B,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { createTagma } from './tagma';
2
2
  export type { CreateTagmaOptions, Tagma, TagmaRunOptions } from './tagma';
3
3
  export { bunRuntime } from '@tagma/runtime-bun';
4
- export type { TagmaRuntime, RunOptions as RuntimeRunOptions } from '@tagma/core';
4
+ export type { EnvPolicy, TagmaRuntime, RunOptions as RuntimeRunOptions } from '@tagma/core';
5
5
  export { definePipeline, PluginRegistry, TriggerBlockedError, TriggerTimeoutError } from '@tagma/core';
6
- export type { EngineResult, RunEventPayload } from '@tagma/core';
7
- export { RUN_PROTOCOL_VERSION, TASK_LOG_CAP } from './types';
8
- export type { PipelineConfig, RawPipelineConfig, RawTrackConfig, RawTaskConfig, TrackConfig, TaskConfig, RunSnapshotPayload, WireRunEvent, RunTaskState, TaskLogLine, ApprovalRequestInfo, TaskStatus, ApprovalRequest, PluginCategory, PluginCapabilities, PluginSetupContext, TagmaPlugin, DriverPlugin, TriggerPlugin, CompletionPlugin, MiddlewarePlugin, RunEventPayload as PipelineRunEventPayload, } from '@tagma/types';
6
+ export type { EngineResult, RegisterPluginOptions, RunEventPayload } from '@tagma/core';
7
+ export { RUN_PROTOCOL_VERSION, TASK_LOG_CAP } from '@tagma/types';
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';
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -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,YAAY,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvG,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7D,YAAY,EACV,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,IAAI,uBAAuB,GAC3C,MAAM,cAAc,CAAC"}
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,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvG,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
3
  export { definePipeline, PluginRegistry, TriggerBlockedError, TriggerTimeoutError } from '@tagma/core';
4
- export { RUN_PROTOCOL_VERSION, TASK_LOG_CAP } from './types';
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,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvG,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC"}
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,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvG,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
@@ -1,3 +1,3 @@
1
- import type { MiddlewarePlugin } from '../types';
1
+ import type { MiddlewarePlugin } from '@tagma/types';
2
2
  export declare const StaticContextMiddleware: MiddlewarePlugin;
3
3
  //# sourceMappingURL=static-context.d.ts.map
@@ -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,UAAU,CAAC;AAGpF,eAAO,MAAM,uBAAuB,EAAE,gBA2CrC,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;AAGxF,eAAO,MAAM,uBAAuB,EAAE,gBA2CrC,CAAC"}
@@ -1,5 +1,5 @@
1
- import type { EngineResult, RunPipelineOptions } from './engine';
2
- import { type PipelineConfig, type RunEventPayload, type RunTaskState } from './types';
1
+ import { type EngineResult, type RunPipelineOptions } from '@tagma/core';
2
+ import { type PipelineConfig, type RunEventPayload, type RunTaskState } from '@tagma/types';
3
3
  export type { EngineResult };
4
4
  export type PipelineRunnerStatus = 'idle' | 'running' | 'done' | 'aborted';
5
5
  export type PipelineRunnerOptions = Omit<RunPipelineOptions, 'signal' | 'onEvent'>;
@@ -1 +1 @@
1
- {"version":3,"file":"pipeline-runner.d.ts","sourceRoot":"","sources":["../src/pipeline-runner.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACjE,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EAClB,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,MAAM,oBAAoB,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAC3E,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,EAA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;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;IAiC9B,OAAO,CAAC,WAAW;IA0DnB;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAK5B;;;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"}
@@ -20,8 +20,8 @@
20
20
  //
21
21
  // // Later, from IPC:
22
22
  // runners.get(id)?.abort();
23
- import { runPipeline } from './engine';
24
- import { TASK_LOG_CAP, } from './types';
23
+ import { runPipeline } from '@tagma/core';
24
+ import { TASK_LOG_CAP, } from '@tagma/types';
25
25
  import { generateRunId } from '@tagma/core';
26
26
  export class PipelineRunner {
27
27
  config;
@@ -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,sEAAsE;AACtE,4DAA4D;AAC5D,oBAAoB;AACpB,4CAA4C;AAC5C,EAAE;AACF,wBAAwB;AACxB,8BAA8B;AA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AAI,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
2
  export { PluginRegistry, isValidPluginName, PLUGIN_NAME_RE, readPluginManifest, } from '@tagma/core';
3
- export type { RegisteredCapability, RegisterResult } from '@tagma/core';
4
- export type { CapabilityHandler, PluginCategory, PluginCapabilities, PluginModule, PluginManifest, PluginSetupContext, TagmaPlugin, DriverPlugin, TriggerPlugin, CompletionPlugin, MiddlewarePlugin, } from './types';
3
+ export type { RegisteredCapability, RegisterPluginOptions, RegisterResult } from '@tagma/core';
4
+ export type { CapabilityHandler, PluginCategory, PluginCapabilities, PluginModule, PluginManifest, TagmaPlugin, DriverPlugin, TriggerPlugin, CompletionPlugin, MiddlewarePlugin, } from '@tagma/types';
5
5
  //# sourceMappingURL=plugins.d.ts.map
@@ -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,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACxE,YAAY,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,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/schema.d.ts CHANGED
@@ -1,4 +1,9 @@
1
- import type { PipelineConfig, RawPipelineConfig } from './types';
1
+ import type { PipelineConfig, RawPipelineConfig } from '@tagma/types';
2
+ import { type ValidationError } from './validate-raw';
3
+ export declare class PipelineValidationError extends Error {
4
+ readonly diagnostics: readonly ValidationError[];
5
+ constructor(diagnostics: readonly ValidationError[]);
6
+ }
2
7
  export declare function parseYaml(content: string): RawPipelineConfig;
3
8
  export declare function resolveConfig(raw: RawPipelineConfig, workDir: string): PipelineConfig;
4
9
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EAOlB,MAAM,SAAS,CAAC;AAKjB,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,CA8B5D;AAwDD,wBAAgB,aAAa,CAAC,GAAG,EAAE,iBAAiB,EAAE,OAAO,EA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AAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAOhG"}
package/dist/schema.js CHANGED
@@ -1,6 +1,17 @@
1
1
  import yaml from 'js-yaml';
2
2
  import { relative } from 'path';
3
3
  import { buildDag, DEFAULT_PERMISSIONS, truncateForName, validatePath } from '@tagma/core';
4
+ import { validateRaw } from './validate-raw';
5
+ export class PipelineValidationError extends Error {
6
+ diagnostics;
7
+ constructor(diagnostics) {
8
+ super(`Pipeline validation failed:\n${diagnostics
9
+ .map((d) => ` - ${d.path}: ${d.message}`)
10
+ .join('\n')}`);
11
+ this.name = 'PipelineValidationError';
12
+ this.diagnostics = diagnostics;
13
+ }
14
+ }
4
15
  // ═══ YAML Parsing ═══
5
16
  export function parseYaml(content) {
6
17
  const doc = yaml.load(content);
@@ -164,6 +175,7 @@ export function resolveConfig(raw, workDir) {
164
175
  });
165
176
  return {
166
177
  name: raw.name,
178
+ mode: raw.mode,
167
179
  driver: raw.driver,
168
180
  model: raw.model,
169
181
  reasoning_effort: raw.reasoning_effort,
@@ -297,6 +309,7 @@ export function deresolvePipeline(config, workDir) {
297
309
  });
298
310
  return {
299
311
  name: config.name,
312
+ ...(config.mode ? { mode: config.mode } : {}),
300
313
  ...(config.driver ? { driver: config.driver } : {}),
301
314
  ...(config.model ? { model: config.model } : {}),
302
315
  ...(config.reasoning_effort ? { reasoning_effort: config.reasoning_effort } : {}),
@@ -328,6 +341,10 @@ export function validateConfig(config) {
328
341
  // ═══ Full Parse Pipeline ═══
329
342
  export async function loadPipeline(yamlContent, workDir) {
330
343
  const raw = parseYaml(yamlContent);
344
+ const diagnostics = validateRaw(raw).filter((d) => d.severity !== 'warning');
345
+ if (diagnostics.length > 0) {
346
+ throw new PipelineValidationError(diagnostics);
347
+ }
331
348
  return resolveConfig(raw, workDir);
332
349
  }
333
350
  //# sourceMappingURL=schema.js.map