botmux-workflow-core 3.16.0 → 3.17.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/dist/cjs/control.cjs +7 -0
- package/dist/cjs/control.cjs.map +3 -3
- package/dist/cjs/engine.cjs +7 -0
- package/dist/cjs/engine.cjs.map +3 -3
- package/dist/cjs/gate-policy.cjs +7 -0
- package/dist/cjs/gate-policy.cjs.map +3 -3
- package/dist/cjs/index.cjs +135 -8
- package/dist/cjs/index.cjs.map +4 -4
- package/dist/cjs/runtime.cjs +205 -33
- package/dist/cjs/runtime.cjs.map +4 -4
- package/dist/cjs/schema.cjs +135 -8
- package/dist/cjs/schema.cjs.map +4 -4
- package/dist/esm/control.js +7 -0
- package/dist/esm/control.js.map +3 -3
- package/dist/esm/engine.js +7 -0
- package/dist/esm/engine.js.map +3 -3
- package/dist/esm/gate-policy.js +7 -0
- package/dist/esm/gate-policy.js.map +3 -3
- package/dist/esm/index.js +135 -8
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/runtime.js +205 -33
- package/dist/esm/runtime.js.map +4 -4
- package/dist/esm/schema.js +135 -8
- package/dist/esm/schema.js.map +4 -4
- package/dist/types/src/workflows/v3/artifact-contract-declarations.d.ts +21 -0
- package/dist/types/src/workflows/v3/dag.d.ts +7 -0
- package/dist/types/src/workflows/v3/event-contract.d.ts +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Authored public-artifact contracts for v3 DAG schemaVersion 2.
|
|
3
|
+
*
|
|
4
|
+
* A stable output key is the only cross-node identifier. Manifest `name`
|
|
5
|
+
* remains presentation metadata; the contract resolves the key to path/kind.
|
|
6
|
+
*/
|
|
7
|
+
import { type Manifest, type ManifestFileKind } from './artifact-contract.js';
|
|
8
|
+
export declare const V3_ARTIFACT_OUTPUT_KEY_RE: RegExp;
|
|
9
|
+
export declare const V3_ARTIFACT_OUTPUT_MAX_COUNT = 32;
|
|
10
|
+
export declare const V3_ARTIFACT_OUTPUT_MAX_BYTES: number;
|
|
11
|
+
export interface V3ArtifactOutputDeclaration {
|
|
12
|
+
path: string;
|
|
13
|
+
kind: ManifestFileKind;
|
|
14
|
+
}
|
|
15
|
+
export type V3ArtifactOutputs = Record<string, V3ArtifactOutputDeclaration>;
|
|
16
|
+
export interface V3ArtifactContractValidation {
|
|
17
|
+
ok: boolean;
|
|
18
|
+
problems: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare function normalizeArtifactOutputs(value: unknown, where: string, problems: string[]): V3ArtifactOutputs | undefined;
|
|
21
|
+
export declare function validateManifestArtifactContract(outputs: V3ArtifactOutputs | undefined, manifest: Manifest): V3ArtifactContractValidation;
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* two schemas would drag v0.2's complexity into the new engine. See
|
|
12
12
|
* `docs/design/2026-06-01-v3-mvp-engine-split.md` §3 for the authored shape.
|
|
13
13
|
*/
|
|
14
|
+
import { type V3ArtifactOutputs } from './artifact-contract-declarations.js';
|
|
14
15
|
/**
|
|
15
16
|
* `goal` — an LLM node driven by the `botmux-goal` skill (single goal, one
|
|
16
17
|
* ephemeral worker). `host` — a deterministic side-effect node (feishu-send
|
|
@@ -73,6 +74,8 @@ export interface V3InputRef {
|
|
|
73
74
|
name?: string;
|
|
74
75
|
path?: string;
|
|
75
76
|
};
|
|
77
|
+
/** schemaVersion 2 stable public-output key. */
|
|
78
|
+
output?: string;
|
|
76
79
|
}
|
|
77
80
|
/**
|
|
78
81
|
* A normalized incoming edge (edge-activation design 2026-06-06 §1.1).
|
|
@@ -224,6 +227,8 @@ export interface V3Node {
|
|
|
224
227
|
override?: V3CapabilityOverride;
|
|
225
228
|
/** Upstream products to thread in as inputs (every `from` ⊆ `depends`). */
|
|
226
229
|
inputs: V3InputRef[];
|
|
230
|
+
/** schemaVersion 2 public products addressable by downstream output keys. */
|
|
231
|
+
outputs?: V3ArtifactOutputs;
|
|
227
232
|
/** Wall-clock budget in seconds; falls back to DEFAULT_NODE_TIMEOUT_SEC. */
|
|
228
233
|
timeoutSec?: number;
|
|
229
234
|
/** Optional human approval gate, evaluated *before* the node's work runs. */
|
|
@@ -303,6 +308,8 @@ export declare function isLoopNode(node: V3Node): node is V3LoopNode;
|
|
|
303
308
|
*/
|
|
304
309
|
export declare function loopInstanceId(loopId: string, iteration: number, bodyNodeId: string): string;
|
|
305
310
|
export interface V3Dag {
|
|
311
|
+
/** Missing means legacy v1. Newly authored DAGs use schemaVersion 2. */
|
|
312
|
+
schemaVersion?: 1 | 2;
|
|
306
313
|
/** Stable id for this run; used as the runDir name, so path-segment safe. */
|
|
307
314
|
runId: string;
|
|
308
315
|
nodes: V3Node[];
|
|
@@ -20,8 +20,9 @@ export type GoalAnswer = {
|
|
|
20
20
|
text: string;
|
|
21
21
|
by: string;
|
|
22
22
|
};
|
|
23
|
-
export type V3ErrorClass = 'workerError' | 'manifestInvalid' | 'resultInvalid' | 'timeout' | 'gateRejected' | 'cancelled';
|
|
23
|
+
export type V3ErrorClass = 'workerError' | 'manifestInvalid' | 'artifactContractInvalid' | 'resultInvalid' | 'timeout' | 'gateRejected' | 'cancelled';
|
|
24
24
|
export type V3RunFailureReason = 'allSinksSkipped';
|
|
25
|
+
export type V3BlockedRecovery = 'retry' | 'reviseWorkflow';
|
|
25
26
|
export interface V3UncertainHostEffect {
|
|
26
27
|
nodeId: string;
|
|
27
28
|
instanceId: string;
|
|
@@ -128,6 +129,7 @@ export type V3Event = {
|
|
|
128
129
|
errorClass: V3ErrorClass;
|
|
129
130
|
errorCode?: string;
|
|
130
131
|
message?: string;
|
|
132
|
+
recovery?: V3BlockedRecovery;
|
|
131
133
|
ask?: GoalAsk;
|
|
132
134
|
revisitTo?: string;
|
|
133
135
|
} | {
|