@cat-factory/orchestration 0.35.1 → 0.36.1

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.
@@ -0,0 +1,40 @@
1
+ import type { Block, ExecutionInstance, PipelineStep } from '@cat-factory/kernel';
2
+ import type { AdvanceResult, AdvanceOptions } from './advance.js';
3
+ /** Everything a {@link StepHandler} needs about the step it may handle. */
4
+ export interface StepHandlerContext {
5
+ workspaceId: string;
6
+ instance: ExecutionInstance;
7
+ step: PipelineStep;
8
+ /** The run's block, already loaded by the preamble. */
9
+ block: Block;
10
+ /** Whether this step is the pipeline's last (drives terminal finalization). */
11
+ isFinalStep: boolean;
12
+ /** The advance options threaded from the durable driver (e.g. `rethrowAgentErrors`). */
13
+ options: AdvanceOptions;
14
+ }
15
+ /**
16
+ * One step-kind's slice of the old `stepInstance` per-kind body. The engine builds the
17
+ * ordered list once, caches it, and dispatches each step to the first handler that
18
+ * `canHandle`s it.
19
+ */
20
+ export interface StepHandler {
21
+ /** Documentary id for the handled kind(s); dispatch is by `canHandle`, not this. */
22
+ readonly kind: string;
23
+ /**
24
+ * Dispatch order — the lower it runs first, so a specific handler can shadow the
25
+ * generic fallthrough. Replaces the load-bearing-but-implicit ordering of the old
26
+ * `if`/early-return chain with an explicit, declared number.
27
+ */
28
+ readonly order: number;
29
+ /** Whether this handler owns the given step (keyed on `step.agentKind` / gate lookup). */
30
+ canHandle(ctx: StepHandlerContext): boolean;
31
+ /** Run the step's per-kind work, returning the same outcome `stepInstance` always has. */
32
+ handle(ctx: StepHandlerContext): Promise<AdvanceResult>;
33
+ }
34
+ /**
35
+ * The order of the generic container/inline-agent fallthrough handler — the LAST resort,
36
+ * matching every step that no more-specific handler claimed (today's body tail). Kept far
37
+ * above any specific handler's order so specific handlers always shadow it.
38
+ */
39
+ export declare const FALLTHROUGH_STEP_HANDLER_ORDER: number;
40
+ //# sourceMappingURL=step-handler-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-handler-registry.d.ts","sourceRoot":"","sources":["../../../src/modules/execution/step-handler-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAA;AAsBjE,2EAA2E;AAC3E,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,IAAI,EAAE,YAAY,CAAA;IAClB,uDAAuD;IACvD,KAAK,EAAE,KAAK,CAAA;IACZ,+EAA+E;IAC/E,WAAW,EAAE,OAAO,CAAA;IACpB,wFAAwF;IACxF,OAAO,EAAE,cAAc,CAAA;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,oFAAoF;IACpF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,0FAA0F;IAC1F,SAAS,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAA;IAC3C,0FAA0F;IAC1F,MAAM,CAAC,GAAG,EAAE,kBAAkB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;CACxD;AAED;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,QAA0B,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * The order of the generic container/inline-agent fallthrough handler — the LAST resort,
3
+ * matching every step that no more-specific handler claimed (today's body tail). Kept far
4
+ * above any specific handler's order so specific handlers always shadow it.
5
+ */
6
+ export const FALLTHROUGH_STEP_HANDLER_ORDER = Number.MAX_SAFE_INTEGER;
7
+ //# sourceMappingURL=step-handler-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"step-handler-registry.js","sourceRoot":"","sources":["../../../src/modules/execution/step-handler-registry.ts"],"names":[],"mappings":"AAwDA;;;;GAIG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAAG,MAAM,CAAC,gBAAgB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cat-factory/orchestration",
3
- "version": "0.35.1",
3
+ "version": "0.36.1",
4
4
  "description": "Delivery-workflow engine for the Agent Architecture Board (execution, bootstrap, pipelines, board, boardScan, requirements, and composition root).",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,19 +25,19 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "ai": "^6.0.209",
28
- "@cat-factory/agents": "0.21.0",
29
- "@cat-factory/contracts": "0.42.0",
30
- "@cat-factory/integrations": "0.25.2",
31
- "@cat-factory/kernel": "0.44.0",
32
- "@cat-factory/prompt-fragments": "0.7.41",
33
- "@cat-factory/sandbox": "0.8.23",
34
- "@cat-factory/spend": "0.10.15",
35
- "@cat-factory/workspaces": "0.9.6"
28
+ "@cat-factory/agents": "0.21.2",
29
+ "@cat-factory/integrations": "0.26.1",
30
+ "@cat-factory/contracts": "0.43.0",
31
+ "@cat-factory/sandbox": "0.8.25",
32
+ "@cat-factory/kernel": "0.45.1",
33
+ "@cat-factory/prompt-fragments": "0.8.0",
34
+ "@cat-factory/workspaces": "0.9.8",
35
+ "@cat-factory/spend": "0.10.17"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "7.0.1-rc",
39
39
  "vitest": "^4.1.9",
40
- "@cat-factory/sandbox-fixtures": "0.7.42"
40
+ "@cat-factory/sandbox-fixtures": "0.7.43"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsc -b tsconfig.build.json",