@parcha/agentrun-dsl 0.1.0-beta.42 → 0.1.0-beta.43
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 +1 -1
- package/dist/author-references.d.ts +1 -1
- package/dist/author-references.js +1 -1
- package/dist/author.js +1 -11
- package/dist/dry-run.js +0 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/recovery/driver.d.ts +1 -1
- package/dist/vocabulary.d.ts +0 -12
- package/dist/vocabulary.js +7 -18
- package/dist/workflow.d.ts +1 -104
- package/dist/workflow.js +6 -424
- package/package.json +1 -1
- package/schema/workflow.schema.json +0 -54
- package/skills/author/references/language.md +9 -18
|
@@ -51,12 +51,6 @@
|
|
|
51
51
|
"type": "string",
|
|
52
52
|
"title": "as"
|
|
53
53
|
},
|
|
54
|
-
"guard": {
|
|
55
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
56
|
-
"type": "object",
|
|
57
|
-
"additionalProperties": {},
|
|
58
|
-
"title": "guard"
|
|
59
|
-
},
|
|
60
54
|
"metadata": {
|
|
61
55
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
62
56
|
"type": "object",
|
|
@@ -211,12 +205,6 @@
|
|
|
211
205
|
"type": "string",
|
|
212
206
|
"title": "context"
|
|
213
207
|
},
|
|
214
|
-
"guard": {
|
|
215
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
216
|
-
"type": "object",
|
|
217
|
-
"additionalProperties": {},
|
|
218
|
-
"title": "guard"
|
|
219
|
-
},
|
|
220
208
|
"metadata": {
|
|
221
209
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
222
210
|
"type": "object",
|
|
@@ -351,12 +339,6 @@
|
|
|
351
339
|
"type": "string",
|
|
352
340
|
"title": "tier"
|
|
353
341
|
},
|
|
354
|
-
"guard": {
|
|
355
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
356
|
-
"type": "object",
|
|
357
|
-
"additionalProperties": {},
|
|
358
|
-
"title": "guard"
|
|
359
|
-
},
|
|
360
342
|
"metadata": {
|
|
361
343
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
362
344
|
"type": "object",
|
|
@@ -491,12 +473,6 @@
|
|
|
491
473
|
"type": "string",
|
|
492
474
|
"title": "tier"
|
|
493
475
|
},
|
|
494
|
-
"guard": {
|
|
495
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
496
|
-
"type": "object",
|
|
497
|
-
"additionalProperties": {},
|
|
498
|
-
"title": "guard"
|
|
499
|
-
},
|
|
500
476
|
"metadata": {
|
|
501
477
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
502
478
|
"type": "object",
|
|
@@ -924,12 +900,6 @@
|
|
|
924
900
|
"$ref": "#/definitions/DecisionImages",
|
|
925
901
|
"title": "images"
|
|
926
902
|
},
|
|
927
|
-
"guard": {
|
|
928
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
929
|
-
"type": "object",
|
|
930
|
-
"additionalProperties": {},
|
|
931
|
-
"title": "guard"
|
|
932
|
-
},
|
|
933
903
|
"metadata": {
|
|
934
904
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
935
905
|
"type": "object",
|
|
@@ -1016,12 +986,6 @@
|
|
|
1016
986
|
"$ref": "#/definitions/DecisionImages",
|
|
1017
987
|
"title": "images"
|
|
1018
988
|
},
|
|
1019
|
-
"guard": {
|
|
1020
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
1021
|
-
"type": "object",
|
|
1022
|
-
"additionalProperties": {},
|
|
1023
|
-
"title": "guard"
|
|
1024
|
-
},
|
|
1025
989
|
"metadata": {
|
|
1026
990
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
1027
991
|
"type": "object",
|
|
@@ -1122,12 +1086,6 @@
|
|
|
1122
1086
|
"$ref": "#/definitions/DecisionImages",
|
|
1123
1087
|
"title": "images"
|
|
1124
1088
|
},
|
|
1125
|
-
"guard": {
|
|
1126
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
1127
|
-
"type": "object",
|
|
1128
|
-
"additionalProperties": {},
|
|
1129
|
-
"title": "guard"
|
|
1130
|
-
},
|
|
1131
1089
|
"metadata": {
|
|
1132
1090
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
1133
1091
|
"type": "object",
|
|
@@ -1750,12 +1708,6 @@
|
|
|
1750
1708
|
},
|
|
1751
1709
|
"title": "requires"
|
|
1752
1710
|
},
|
|
1753
|
-
"guard": {
|
|
1754
|
-
"description": "A step guard (StepGuard): its signal can only be `jev`, a call reports no confidence.",
|
|
1755
|
-
"type": "object",
|
|
1756
|
-
"additionalProperties": {},
|
|
1757
|
-
"title": "guard"
|
|
1758
|
-
},
|
|
1759
1711
|
"metadata": {
|
|
1760
1712
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
1761
1713
|
"type": "object",
|
|
@@ -1800,12 +1752,6 @@
|
|
|
1800
1752
|
"type": "string",
|
|
1801
1753
|
"title": "as"
|
|
1802
1754
|
},
|
|
1803
|
-
"guard": {
|
|
1804
|
-
"description": "A step guard as a document holds it (StepGuard once validateWorkflow accepted it): an object the validator reads field\nby field, so a wrong signal or threshold is refused in words an author can act on, never a schema union's.",
|
|
1805
|
-
"type": "object",
|
|
1806
|
-
"additionalProperties": {},
|
|
1807
|
-
"title": "guard"
|
|
1808
|
-
},
|
|
1809
1755
|
"metadata": {
|
|
1810
1756
|
"description": "Host-owned markers on a node: any JSON object. The engine admits, carries and hashes it with the\ndocument and never reads it; it never reaches state, events, prompts or effect identities.",
|
|
1811
1757
|
"type": "object",
|
|
@@ -19,21 +19,21 @@ A workflow is {"v":2,"name","schemas","input"?,"output","root"}.
|
|
|
19
19
|
|
|
20
20
|
This is the complete set. Each kind accepts exactly these fields; any other field is an error.
|
|
21
21
|
- `chain`: `steps`
|
|
22
|
-
- `code`: `label`, `code`, `as
|
|
23
|
-
- `agent`: `label`, `state`, `instructions`, `sopSection`, `out`, `as`, `requires`, `tools`, `effort`, `thinking`, `verify`, `tier`, `
|
|
24
|
-
- `decide`: `label`, `state`, `instructions`, `sopSection`, `out`, `as`, `requires`, `tools`, `effort`, `thinking`, `verify`, `tier
|
|
25
|
-
- `extract`: `label`, `state`, `instructions`, `sopSection`, `out`, `as`, `requires`, `tools`, `effort`, `thinking`, `verify`, `tier
|
|
22
|
+
- `code`: `label`, `code`, `as`
|
|
23
|
+
- `agent`: `label`, `state`, `instructions`, `sopSection`, `out`, `as`, `requires`, `tools`, `effort`, `thinking`, `verify`, `tier`, `budget_usd`, `max_turns`, `context`
|
|
24
|
+
- `decide`: `label`, `state`, `instructions`, `sopSection`, `out`, `as`, `requires`, `tools`, `effort`, `thinking`, `verify`, `tier`
|
|
25
|
+
- `extract`: `label`, `state`, `instructions`, `sopSection`, `out`, `as`, `requires`, `tools`, `effort`, `thinking`, `verify`, `tier`
|
|
26
26
|
- `report`: `label`, `state`, `instructions`, `sopSection`, `requires`, `tools`, `effort`, `thinking`
|
|
27
27
|
- `artifact`: `label`, `state`, `type`, `path`, `instructions`, `sopSection`, `requires`, `tools`, `effort`, `thinking`
|
|
28
28
|
- `map`: `label`, `itemsPath`, `body`, `as`, `resultPath`, `maxConcurrency`, `onItemFailure`, `failedAs`
|
|
29
29
|
- `parallel`: `label`, `branches`
|
|
30
30
|
- `loop`: `label`, `body`, `until`, `maxIters`, `expect_iters`
|
|
31
31
|
- `escalate`: `label`, `when`, `kind`, `stage`, `summary`
|
|
32
|
-
- `call`: `label`, `via`, `tool`, `args`, `code`, `input`, `command`, `env`, `where`, `out`, `as`, `produces`, `deadline_s`, `retry`, `poll`, `requires
|
|
33
|
-
- `workflow`: `label`, `workflow`, `input`, `out`, `as
|
|
34
|
-
- `judge`: `label`, `state`, `out`, `as`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images
|
|
35
|
-
- `pick`: `label`, `itemsPath`, `describe`, `instructions`, `state`, `allowNone`, `as`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images
|
|
36
|
-
- `sift`: `label`, `itemsPath`, `describe`, `state`, `out`, `as`, `keep`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images
|
|
32
|
+
- `call`: `label`, `via`, `tool`, `args`, `code`, `input`, `command`, `env`, `where`, `out`, `as`, `produces`, `deadline_s`, `retry`, `poll`, `requires`
|
|
33
|
+
- `workflow`: `label`, `workflow`, `input`, `out`, `as`
|
|
34
|
+
- `judge`: `label`, `state`, `out`, `as`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images`
|
|
35
|
+
- `pick`: `label`, `itemsPath`, `describe`, `instructions`, `state`, `allowNone`, `as`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images`
|
|
36
|
+
- `sift`: `label`, `itemsPath`, `describe`, `state`, `out`, `as`, `keep`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images`
|
|
37
37
|
- `route`: `label`, `state`, `instructions`, `branches`, `unsure`, `valuePath`, `otherwise`, `as`, `requires`, `provider`, `model`, `evidence`, `timeoutMs`, `images`
|
|
38
38
|
|
|
39
39
|
Every kind also accepts `metadata`, an object the host owns and the engine never reads; set only the keys the host addendum names.
|
|
@@ -92,15 +92,6 @@ Typed questions answered by the host's judge in one request each: no tools, no s
|
|
|
92
92
|
- `poll` {until, fail_when?, interval_s: >= 0.1 (a busy-loop guard), deadline_s: at least the call's deadline_s (no maximum)} repeats the call until `until` holds on its own result; `fail_when` fails it at once. Both are mechanical predicates whose paths are relative to the result and lie in its declared shape.
|
|
93
93
|
- Validation and dry runs never perform effects: they synthesize the declared result, and a shell result's stdout is "{}".
|
|
94
94
|
|
|
95
|
-
### Step guards
|
|
96
|
-
|
|
97
|
-
A `guard` on a step (agent, decide, extract, code, call, workflow, judge, pick, sift) checks the step once it ran: below its threshold, the run hands the job back (it escalates, kind `guard`, at the step, with the state it reached), so an uncertain step never answers alone.
|
|
98
|
-
- `guard` is {"signal": self|jev|both, "threshold": a number between 0 and 1 (exclusive), "question"?: text, "fit"?: {"w", "b", "n", "fitted_at"}}.
|
|
99
|
-
- `self` reads the step's own confidence: agent, decide, judge, pick, sift nodes only. An agent or decide node with it submits a `confidence` field (0 to 1) beside its record, which lands at `<key>$confidence`, never in its value; its `out` is an object schema. A judge, pick or sift reads its weakest answer's confidence.
|
|
100
|
-
- `jev` asks Jev one yes/no question over what the step saw and what it wrote: `question` (at most 2000 characters), or by default whether the output is right for the input. Every guarded kind may use it; it is the only signal for extract, code, call, workflow nodes.
|
|
101
|
-
- `both` combines the two: through `fit` when it has one, else the lower of the two.
|
|
102
|
-
- `fit` is the host's, written when it fits the threshold on graded runs: {"w": one weight per signal ([self, jev] for both), "b", "n": the runs it was fitted on, "fitted_at": an ISO time}. Never write or change one yourself. A raw confidence is not a calibrated probability: without a fit, set a threshold the host has measured, or leave the guard to the host.
|
|
103
|
-
|
|
104
95
|
## Predicates
|
|
105
96
|
|
|
106
97
|
`loop.until` and `escalate.when` take one of these; `poll` takes only the first 11. Each path or key reads a state value an input or an earlier node produced.
|