@farmslot/protocol 0.10.0 → 0.11.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.
- package/CHANGELOG.md +12 -1
- package/README.md +12 -4
- package/dist/contracts/runs.d.ts +1 -1
- package/dist/contracts/runs.d.ts.map +1 -1
- package/dist/recipe/artifact.d.ts.map +1 -1
- package/dist/recipe/artifact.js +153 -20
- package/dist/recipe/artifact.js.map +1 -1
- package/dist/recipe/common.d.ts +27 -36
- package/dist/recipe/common.d.ts.map +1 -1
- package/dist/recipe/common.js +0 -3
- package/dist/recipe/common.js.map +1 -1
- package/dist/recipe/digest.d.ts +5 -0
- package/dist/recipe/digest.d.ts.map +1 -0
- package/dist/recipe/digest.js +26 -0
- package/dist/recipe/digest.js.map +1 -0
- package/dist/recipe/document.d.ts +4 -20
- package/dist/recipe/document.d.ts.map +1 -1
- package/dist/recipe/document.js +160 -123
- package/dist/recipe/document.js.map +1 -1
- package/dist/recipe/index.d.ts +5 -3
- package/dist/recipe/index.d.ts.map +1 -1
- package/dist/recipe/index.js +5 -3
- package/dist/recipe/index.js.map +1 -1
- package/dist/recipe/manifest.d.ts +0 -1
- package/dist/recipe/manifest.d.ts.map +1 -1
- package/dist/recipe/manifest.js +68 -45
- package/dist/recipe/manifest.js.map +1 -1
- package/dist/recipe/params.d.ts +9 -0
- package/dist/recipe/params.d.ts.map +1 -0
- package/dist/recipe/params.js +264 -0
- package/dist/recipe/params.js.map +1 -0
- package/dist/recipe/trust.d.ts +5 -3
- package/dist/recipe/trust.d.ts.map +1 -1
- package/dist/recipe/trust.js.map +1 -1
- package/dist/recipe/workflow.d.ts +13 -30
- package/dist/recipe/workflow.d.ts.map +1 -1
- package/dist/recipe/workflow.js +200 -526
- package/dist/recipe/workflow.js.map +1 -1
- package/dist/rpc/dispatch.d.ts +8 -0
- package/dist/rpc/dispatch.d.ts.map +1 -1
- package/package.json +4 -1
- package/schemas/recipe-v1.schema.json +119 -197
|
@@ -1,43 +1,26 @@
|
|
|
1
1
|
import { type MutableValidationContext } from './common.js';
|
|
2
|
-
interface WorkflowGraph {
|
|
2
|
+
export interface WorkflowGraph {
|
|
3
3
|
entry: string;
|
|
4
4
|
nodes: Record<string, Record<string, unknown>>;
|
|
5
|
-
|
|
5
|
+
teardown?: string;
|
|
6
6
|
}
|
|
7
|
-
interface
|
|
7
|
+
export interface WorkflowActionEntry {
|
|
8
|
+
nodeId: string;
|
|
9
|
+
action: string;
|
|
8
10
|
node: Record<string, unknown>;
|
|
9
11
|
path: string;
|
|
10
12
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
/** Canonical flow identifier used by validation, planning, and execution. */
|
|
16
|
-
export declare function normalizeRecipeFlowRef(value: string): string;
|
|
17
|
-
export declare function isDynamicRecipeFlowRef(value: string): boolean;
|
|
13
|
+
export declare function normalizeRecipeRef(value: string): string;
|
|
14
|
+
export declare function isDynamicRecipeRef(value: string): boolean;
|
|
15
|
+
export declare function getRecipeActionParams(node: Record<string, unknown>): Record<string, unknown>;
|
|
18
16
|
export declare function extractWorkflow(ctx: MutableValidationContext, recipe: Record<string, unknown>): WorkflowGraph | null;
|
|
19
|
-
export declare function validateWorkflowGraph(ctx: MutableValidationContext, workflow: WorkflowGraph
|
|
17
|
+
export declare function validateWorkflowGraph(ctx: MutableValidationContext, workflow: WorkflowGraph): void;
|
|
20
18
|
export declare function getRecipeWorkflowNodeIds(recipe: unknown): string[];
|
|
19
|
+
export declare function getRecipeCallRefs(recipe: unknown): string[];
|
|
21
20
|
export declare function getRecipeWorkflowActions(recipe: unknown): string[];
|
|
22
|
-
export declare function getRecipeWorkflowActionEntries(recipe: unknown):
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
path: string;
|
|
26
|
-
}>;
|
|
27
|
-
export declare function validateInlineFlows(ctx: MutableValidationContext, recipe: Record<string, unknown>): void;
|
|
28
|
-
export declare function validateWorkflowPreconditions(ctx: MutableValidationContext, workflow: Record<string, unknown>): void;
|
|
29
|
-
export declare function getRecipeWorkflowPreconditionEntries(recipe: unknown): RecipePreconditionGate[];
|
|
30
|
-
export declare function validateFlowCalls(ctx: MutableValidationContext, recipe: Record<string, unknown>, workflow: WorkflowGraph, options?: {
|
|
31
|
-
externalFlowIds?: ReadonlySet<string>;
|
|
32
|
-
/** Skip `call.ref` resolution (unresolved_call_ref) only; shape checks still run. */
|
|
21
|
+
export declare function getRecipeWorkflowActionEntries(recipe: unknown): WorkflowActionEntry[];
|
|
22
|
+
export declare function validateRecipeCalls(ctx: MutableValidationContext, workflow: WorkflowGraph, options?: {
|
|
23
|
+
externalRecipeIds?: ReadonlySet<string>;
|
|
33
24
|
skipResolution?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Whether a declared `uses` catalog counts as resolving `call.ref`s. True at
|
|
36
|
-
* authoring/run time (catalogs are loaded). False at artifact-package validation,
|
|
37
|
-
* where the catalogs are not in the package, so only inline `flows` (or a proven
|
|
38
|
-
* resolved-recipe.json) count.
|
|
39
|
-
*/
|
|
40
|
-
externalCatalogsResolvable?: boolean;
|
|
41
25
|
}): void;
|
|
42
|
-
export {};
|
|
43
26
|
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/recipe/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/recipe/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,wBAAwB,EAG9B,MAAM,aAAa,CAAC;AAIrB,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB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