@vaudience/aigentflow-flow-validator 0.26.0 → 0.28.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/PARITY.md +96 -4
- package/README.md +5 -2
- package/dist/cli.js +599 -398
- package/dist/index.cjs +592 -389
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +592 -389
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/PARITY.md
CHANGED
|
@@ -4,8 +4,100 @@ This document maps every rule in this JavaScript validator back to the AIgentFlo
|
|
|
4
4
|
Go reference implementation, records the intentional divergences, and defines the
|
|
5
5
|
discipline for keeping the two in sync.
|
|
6
6
|
|
|
7
|
-
**Tracks AIgentFlow flow schema: `v2.
|
|
8
|
-
|
|
7
|
+
**Tracks AIgentFlow flow schema: `v2.837.0`** (`SPEC_VERSION` in [`src/spec/aigentflow-spec.json`](./src/spec/aigentflow-spec.json)), which makes `nexus://` the canonical agent-runtime scheme with `atlas://` as its alias, removes signals, dynamic flow modification and campaigns (`signal_removed`, `flow_modification_removed`, `removed_key_ignored`, `campaign_removed`) and drops share links from the removal advice (package 0.28.0, below). Earlier: it removed the `exons://` and `agent://` executors and the `ai://` agent-loop parameters and adds the errors `executor_removed` and `agentic_param_removed` (package 0.27.0, below). Earlier: it added the rule `unknown_function_operation` and a clearer `unknown_executor_scheme` message (package 0.23.0, below). Earlier: the rule `flow_data_key_reserved` (package 0.22.0). Earlier: the `here` executor scheme, the `strict_templates` flow key and the rule `template_default_piped` (package 0.21.0). Earlier: the warning `compliance_residency_unenforced` (package 0.20.0). `orchestrator.region` / `orchestrator.enforce_region` (package 0.19.0). Earlier: the AigentChat executor was removed (package 0.18.0). Earlier additions: the `examples:` block (package 0.17.0), `server_owned_query_key` (package 0.15.1) from the AIgentFlow release after v2.790.0, `credential_endpoint_unpaired` (package 0.15.2) from AIgentFlow v2.793.0 and the release after it, and `display_name_too_long` (package 0.15.3) from AIgentFlow v2.802.0.
|
|
8
|
+
|
|
9
|
+
> package 0.28.0 — **`nexus://` with `atlas://` as its alias; signals, DFM and campaigns removed
|
|
10
|
+
> (BREAKING).** `SPEC_VERSION` is `2.837.0`. Contracts: AIgentFlow's traps doc, sections "An executor
|
|
11
|
+
> scheme with two spellings", "AGENTCUT B1 validator contract" and "AGENTCUT B2 validator contract".
|
|
12
|
+
>
|
|
13
|
+
> _`nexus://` (AIgentFlow v2.835.0)._ `nexus` joins `executorSchemes` (no `unknown_executor_scheme`
|
|
14
|
+
> warning). The `atlasExecutor` block names `scheme: nexus` and `aliases: [atlas]`; every rule
|
|
15
|
+
> (`atlas_operation_unknown`, `atlas_agent_missing`, `atlas_agent_not_literal`,
|
|
16
|
+
> `atlas_capabilities_not_literal`, `atlas_prompt_missing`, `atlas_prompt_both`,
|
|
17
|
+
> `atlas_capability_ref_invalid`, `atlas_model_not_literal`, `atlas_param_refused`) answers
|
|
18
|
+
> identically for both spellings; the codes keep their `atlas_` prefix, and the messages say
|
|
19
|
+
> `nexus://` / "Nexus". The scheme match stays exact and case-sensitive. An AigentChat-shaped
|
|
20
|
+
> `nexus://<org>/<agent>` (that executor was removed in v2.819.0) is now `atlas_operation_unknown`,
|
|
21
|
+
> no longer an `unknown_executor_scheme` warning; `aigentchat://` stays an unknown scheme.
|
|
22
|
+
>
|
|
23
|
+
> _Signals and DFM (AIgentFlow v2.834.0)._ **`signal_removed`** (ERROR): `orchestrator.enable_signals:
|
|
24
|
+
true`; one of `aif_signal_complete`, `aif_signal_need_human`, `aif_signal_delegate`,
|
|
25
|
+
> `aif_signal_need_tool`, `aif_signal_modify_flow` in `orchestrator.tools`, `deny_tools`,
|
|
26
|
+
> `require_approval_for` (field = the list) or in the orchestrator definition's `tools.allow` (field
|
|
27
|
+
> `orchestrator.exons`), ONE finding per list naming the removed names in list order, each once; and
|
|
28
|
+
> `enable_signals` on an `aiv://` step or loop sub-step (on presence, null included).
|
|
29
|
+
> **`flow_modification_removed`** (ERROR): a `dfm_suggestion` trigger (one finding, field
|
|
30
|
+
> `orchestrator.triggers`) and `flow_modification_allowed` in any step's or loop sub-step's query.
|
|
31
|
+
> Step keys skip templated executors, removed schemes and `flow://` (its query is the child's inputs).
|
|
32
|
+
> **`removed_key_ignored`** (WARNING, never an error): `checkpoint.pre_dfm` (any non-null value; AIgentFlow
|
|
33
|
+
> wrote it into stored flows itself) and `orchestrator.enable_signals: false`. A YAML null on either
|
|
34
|
+
> block key is absent.
|
|
35
|
+
>
|
|
36
|
+
> _Campaigns (AIgentFlow v2.836.0)._ **`campaign_removed`** (ERROR): a `campaign` key with ANY non-null
|
|
37
|
+
> value (field `campaign`; the block is refused whole), one of `aif_campaign_spawn`,
|
|
38
|
+
> `aif_campaign_status`, `aif_campaign_results`, `aif_campaign_cancel` in one of the four tool lists
|
|
39
|
+
> (one finding per list), and a `campaign_child_completed` / `campaign_child_failed` trigger (one
|
|
40
|
+
> finding, the removed types in order). Steps are never judged.
|
|
41
|
+
>
|
|
42
|
+
> _Removals._ The removed tool and trigger names leave `orchestrator.tools` / `orchestrator.triggers`
|
|
43
|
+
> but are TOLERATED by `orchestrator_tool_unknown` and `orchestrator_trigger_unknown` (also under
|
|
44
|
+
> `strictRegistries`), so each is reported once, with advice. `orchestrator_tool_withheld` loses its
|
|
45
|
+
> signal exemption and its campaign arm and never names a removed tool; `orchestratorToolAllow` drops
|
|
46
|
+
> `enableSignalsDefault`, `signalTools` and `campaignTools`. The campaign rules are deleted
|
|
47
|
+
> (`campaign_requires_orchestrator`, `campaign_handoff_step_unknown`,
|
|
48
|
+
> `campaign_invalid_max_credits_per_child`, `campaign_no_child_flows`, `campaign_child_flow_no_id`, and
|
|
49
|
+
> the retired-key arm for `campaign.budget_max_per_child`), and the `campaign` block decodes untyped
|
|
50
|
+
> (`knownKeys`: `any`; `CampaignConfig` and `CampaignChildFlowDef` are gone), so nothing inside it is
|
|
51
|
+
> an unknown key. `enable_signals` and `pre_dfm` stay in `knownKeys`.
|
|
52
|
+
>
|
|
53
|
+
> _Share links (AIgentFlow v2.837.0)._ The `executor_removed` / `agentic_param_removed` suggestion is
|
|
54
|
+
> AIgentFlow's current `SUGGESTION_REMOVED_AGENT_ADVICE`: it writes `nexus://`, says share links no
|
|
55
|
+
> longer exist, and names the run's responsible person.
|
|
56
|
+
>
|
|
57
|
+
> _Fixtures_, byte-identical to the Go port's (v0.18.0). Added: `valid-nexus-agent-run`,
|
|
58
|
+
> `valid-nexus-capability`, `valid-atlas-alias-agent-run`, `invalid-nexus-agent-missing`,
|
|
59
|
+
> `invalid-nexus-loop-substep-agent-not-literal`, `invalid-nexus-aigentchat-shape`,
|
|
60
|
+
> `invalid-signal-removed-{enable-signals,tool-lists,aiv-step}`,
|
|
61
|
+
> `invalid-flow-modification-removed-{trigger,step}`,
|
|
62
|
+
> `warn-removed-key-ignored-{pre-dfm,enable-signals-false}`, `valid-signal-surfaces-not-refused`,
|
|
63
|
+
> `invalid-campaign-removed-{block,empty-block,retired-key,tool-lists,triggers}` and
|
|
64
|
+
> `valid-campaign-surfaces-not-refused`. Renamed: `warn-removed-executor-nexus` →
|
|
65
|
+
> `warn-removed-executor-aigentchat` (aigentchat:// only). Edited: `warn-orchestrator-tool-withheld-named`,
|
|
66
|
+
> `valid-orchestrator-tool-allow-consistent`, `valid-orchestrator-tool-allow-absent` (no removed names).
|
|
67
|
+
> Deleted: `valid-campaign-handoff`, `valid-campaign-decoded-shapes`,
|
|
68
|
+
> `invalid-campaign-{handoff-unknown-step,no-child-flows,child-flow-no-id}`,
|
|
69
|
+
> `invalid-retired-campaign-budget-max-per-child`, `valid-orchestrator-tool-allow-campaign`,
|
|
70
|
+
> `warn-orchestrator-tool-withheld-{campaign,signals-off}`.
|
|
71
|
+
|
|
72
|
+
> package 0.27.0 — **the agent surfaces are removed (BREAKING).** AIgentFlow v2.833.0 no longer
|
|
73
|
+
> runs agents of its own: the `ai://<provider>/…` agent loop, the `exons://` scheme and the
|
|
74
|
+
> `agent://` scheme are gone. Two new ERROR codes, both addressed to the step (`steps.<id>`, or
|
|
75
|
+
> `steps.<id>.loop.steps[<index>]` for a loop sub-step), as the atlas findings are, so a host that
|
|
76
|
+
> merges several verdicts drops a finding only when code and field both match.
|
|
77
|
+
> `executor_removed`: a step or loop sub-step whose executor scheme (the text before `://`,
|
|
78
|
+
> whitespace-trimmed, case-insensitive) is `exons` or `agent`; and a top-level `exons_uploads` key
|
|
79
|
+
> (field `exons_uploads`). A step on a removed scheme yields **only** this code: no
|
|
80
|
+
> `unknown_executor_scheme` warning and no executor-URL-shape error. `agentic_param_removed`: an
|
|
81
|
+
> `ai://` step or loop sub-step whose `query` carries any of `agentic`, `max_tool_turns`,
|
|
82
|
+
> `parallel_tool_calls`, `mcp_server_url`, `tool_auth_token`, `tool_discovery`, `discoverable_tools`,
|
|
83
|
+
> `enable_signals`, `deny_tools`, `max_tool_calls`, `require_confirmation`, `guardrails`,
|
|
84
|
+
> `timeout_seconds`. A key is refused on **presence**: a null value and `agentic: false` included.
|
|
85
|
+
> **One** finding per step, the keys sorted in the message. Only the `ai` scheme is judged. Not
|
|
86
|
+
> refused: a templated executor, `aiv://` (it keeps its own `agentic` flag), `atlas://`, any other
|
|
87
|
+
> scheme, `tools` / `tool_choice` / `autofix` / `content_parts` / `stream` on `ai://`, the flow-level
|
|
88
|
+
> `tool_discovery` / `discoverable_tools`, and the `orchestrator:` block's own keys. The vocabulary
|
|
89
|
+
> is the spec block `removedAgentSurfaces`. Removals: `exons` and `agent` leave `executorSchemes`
|
|
90
|
+
> (40 protocols; a near-miss no longer suggests them); `spec.exons` keeps only the frontmatter
|
|
91
|
+
> delimiter. The rules that judge the **orchestrator's** `.exons` document stay, since the
|
|
92
|
+
> orchestrator is not removed in this release; the flow-level `exons_uploads` key stays a known key
|
|
93
|
+
> so it reports `executor_removed` rather than `unknown_yaml_key`. `SPEC_VERSION` is `2.833.0`.
|
|
94
|
+
> Fixtures: `invalid-exons-step-attributes.yaml` and `valid-exons-step-attributes-skipped.yaml` are
|
|
95
|
+
> deleted (both judged an `exons://` step's inline document); added, byte-identical to the Go
|
|
96
|
+
> port's: `invalid-executor-removed-{exons,agent,scheme-case-whitespace,loop-substep,
|
|
97
|
+
exons-uploads}.yaml`, `invalid-agentic-param-removed{,-false,-null-value,-loop-substep}.yaml` and
|
|
98
|
+
> `valid-removed-surfaces-not-refused.yaml` (the no-false-positive control). The Go port carries the
|
|
99
|
+
> same two codes (v0.17.0).
|
|
100
|
+
>
|
|
9
101
|
> package 0.26.0 — **three new rules, and the atlas rules brought in line with the reference.**
|
|
10
102
|
> `reserved_input_name` (error): an input the flow declares under the top-level `query:` map, or as an
|
|
11
103
|
> `input_schema` field name, that starts with two underscores. That namespace belongs to the platform
|
|
@@ -189,7 +281,7 @@ own state, so it is not seeded.` and the suggestion its text (spec keys `message
|
|
|
189
281
|
> `executor_config.<provider>.base_url`). The provider is the literal segment of
|
|
190
282
|
> `ai://<provider>/<operation>`, lower-cased for the lane test and printed as written; an
|
|
191
283
|
> empty, slash-less or templated one is skipped, as are providers with no region lane
|
|
192
|
-
> (anthropic native, scaleway, vaiembed) and `
|
|
284
|
+
> (anthropic native, scaleway, vaiembed) and `aiv://` steps. The
|
|
193
285
|
> orchestrator's provider is `execution.provider` of its `.exons` frontmatter, read by the
|
|
194
286
|
> same light frontmatter reader the save-door rules use; a document that reader cannot
|
|
195
287
|
> read the way the engine would is skipped. Finding: code `compliance_residency_unenforced`,
|
|
@@ -1114,7 +1206,7 @@ max_retries` and `QualityGateDefinition.max_retries` are unchanged. Removing
|
|
|
1114
1206
|
> separate target functions; widening `hasCycle` too would invent a divergence
|
|
1115
1207
|
> and emit a spurious `potential_infinite_loop` on any rendezvous or error
|
|
1116
1208
|
> redirect back to an earlier step.
|
|
1117
|
-
> 4. **`executorSchemes` is AIgentFlow's registered set exactly** (43 protocols at v2.608.0, 42 since the AigentChat executor was removed,
|
|
1209
|
+
> 4. **`executorSchemes` is AIgentFlow's registered set exactly** (43 protocols at v2.608.0, 42 since the AigentChat executor was removed, 40 since `exons` and `agent` were,
|
|
1118
1210
|
> enumerated from `NewExecutorSchemaRegistry`). `web://` was missing, so a
|
|
1119
1211
|
> correct step warned; nine schemes AIgentFlow does not register (`openai`,
|
|
1120
1212
|
> `anthropic`, `perplexity`, `vertexai`, `ollama`, `vllm`, `aigentchat`,
|
package/README.md
CHANGED
|
@@ -170,7 +170,10 @@ interface ValidationIssue {
|
|
|
170
170
|
- **Connectivity** — `next.default` / `next.conditions[].goto` references (error; only `null` and `orchestrator` need no step, so `end` must name one, and is then an ordinary step); unreachable steps (warning); cycles (warning).
|
|
171
171
|
- **Parallel + orchestrator routing** — `next.parallel` rendezvous/steps; `orchestrator` next requires an orchestrator block.
|
|
172
172
|
- **Loop / for_each / throttle** — required fields, iteration limits, mutual exclusions, throttle ceilings.
|
|
173
|
-
- **
|
|
173
|
+
- **Removed agent surfaces** — `executor_removed` (an `exons://` or `agent://` step, or the `exons_uploads` key) and `agentic_param_removed` (an `ai://` step carrying `agentic`, `max_tool_turns`, `mcp_server_url`, …); both errors, one finding per step.
|
|
174
|
+
- **Orchestrator** — exons presence, trigger types, timer intervals, tool names.
|
|
175
|
+
- **Removed surfaces** — the `exons://` / `agent://` executors and the `ai://` agent-loop parameters (`executor_removed`, `agentic_param_removed`); agent signals and dynamic flow modification (`signal_removed`, `flow_modification_removed`, and the `removed_key_ignored` warning for `checkpoint.pre_dfm` and `orchestrator.enable_signals: false`); campaigns (`campaign_removed`: the `campaign:` block, the campaign tools and triggers).
|
|
176
|
+
- **Nexus agent steps** — `nexus://agent/run` and `nexus://capability/<ref>` (also written `atlas://`, an accepted alias): a literal agent and capabilities, exactly one of `prompt` / `prompt_template`, a valid capability reference, no refused parameters (`atlas_*` codes).
|
|
174
177
|
- **Orchestrator `.exons` frontmatter** — the document must open with a closed `---` frontmatter spec (`orchestrator_exons_parse_failed`) that sets `execution.provider` (`orchestrator_exons_no_provider`) and declares no `requirements.resources` (`exons_resources_unhonoured`); a tool that `orchestrator.tools` and the definition's `tools.allow` disagree about is never offered (`orchestrator_tool_withheld`, warning). The document body is not parsed: that needs the `.exons` engine (see PARITY.md).
|
|
175
178
|
- **`executor_config` environment references** — a `${NAME}` value may name only the variables of the provider or protocol it is written under (`executor_config_env_scope`).
|
|
176
179
|
- **Server-owned query keys** — a step's or loop sub-step's `query:` may not declare `aiv_api_key`, `aiv_base_url` or `aiv_delegation`, which only the server sets (`server_owned_query_key`).
|
|
@@ -192,7 +195,7 @@ These need a live server / org context and are intentionally out of scope:
|
|
|
192
195
|
|
|
193
196
|
- **Credentials** — whether a bound credential actually exists or is authorised.
|
|
194
197
|
- **Model compliance** — the `compliance:` block is enforced against the provider catalogue at flow-create time on the server. (The one catalogue-free part, the warning `compliance_residency_unenforced` for an EU-only residency beside an unpinned call, is checked here.)
|
|
195
|
-
- **`.exons` document bodies** — whether
|
|
198
|
+
- **`.exons` document bodies** — whether the orchestrator's inline `.exons` document parses and whether its tags can render (`exons_attributes`) needs the `.exons` template engine, which this package does not embed.
|
|
196
199
|
- **Template field resolution** — whether `.data.x.y` will actually be populated at runtime (we validate syntax, not data flow).
|
|
197
200
|
- **Publish gates** — `visibility`/`classification`/template-metadata publish rules are server- and org-context dependent.
|
|
198
201
|
|