agentopology 0.3.0 → 0.4.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/README.md +52 -4
- package/dist/analyzer/__tests__/analyzer.test.js +36 -9
- package/dist/analyzer/__tests__/analyzer.test.js.map +1 -1
- package/dist/analyzer/__tests__/observability-gap.test.js +40 -10
- package/dist/analyzer/__tests__/observability-gap.test.js.map +1 -1
- package/dist/analyzer/index.d.ts +2 -1
- package/dist/analyzer/index.d.ts.map +1 -1
- package/dist/analyzer/index.js +1 -1
- package/dist/analyzer/index.js.map +1 -1
- package/dist/bindings/__tests__/bindings.test.js +20 -5
- package/dist/bindings/__tests__/bindings.test.js.map +1 -1
- package/dist/bindings/__tests__/claude-workflow.test.js +12 -3
- package/dist/bindings/__tests__/claude-workflow.test.js.map +1 -1
- package/dist/bindings/__tests__/defaults-agreement.test.d.ts +16 -0
- package/dist/bindings/__tests__/defaults-agreement.test.d.ts.map +1 -0
- package/dist/bindings/__tests__/defaults-agreement.test.js +80 -0
- package/dist/bindings/__tests__/defaults-agreement.test.js.map +1 -0
- package/dist/bindings/__tests__/observability.test.js +8 -2
- package/dist/bindings/__tests__/observability.test.js.map +1 -1
- package/dist/bindings/__tests__/stub-generation.test.js +8 -2
- package/dist/bindings/__tests__/stub-generation.test.js.map +1 -1
- package/dist/bindings/claude-code.d.ts.map +1 -1
- package/dist/bindings/claude-code.js +2 -1
- package/dist/bindings/claude-code.js.map +1 -1
- package/dist/bindings/claude-workflow.d.ts.map +1 -1
- package/dist/bindings/claude-workflow.js +2 -1
- package/dist/bindings/claude-workflow.js.map +1 -1
- package/dist/bindings/codex.d.ts.map +1 -1
- package/dist/bindings/codex.js +6 -2
- package/dist/bindings/codex.js.map +1 -1
- package/dist/bindings/gemini-cli.d.ts.map +1 -1
- package/dist/bindings/gemini-cli.js +2 -1
- package/dist/bindings/gemini-cli.js.map +1 -1
- package/dist/bindings/kiro.d.ts.map +1 -1
- package/dist/bindings/kiro.js +2 -1
- package/dist/bindings/kiro.js.map +1 -1
- package/dist/bindings/openclaw.d.ts.map +1 -1
- package/dist/bindings/openclaw.js +2 -1
- package/dist/bindings/openclaw.js.map +1 -1
- package/dist/cli/__tests__/cli.test.d.ts +12 -0
- package/dist/cli/__tests__/cli.test.d.ts.map +1 -0
- package/dist/cli/__tests__/cli.test.js +171 -0
- package/dist/cli/__tests__/cli.test.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +149 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/docs/content.d.ts.map +1 -1
- package/dist/docs/content.js +112 -0
- package/dist/docs/content.js.map +1 -1
- package/dist/exporters/ascii.d.ts +13 -0
- package/dist/exporters/ascii.d.ts.map +1 -0
- package/dist/exporters/ascii.js +26 -0
- package/dist/exporters/ascii.js.map +1 -0
- package/dist/exporters/brief.d.ts +14 -0
- package/dist/exporters/brief.d.ts.map +1 -0
- package/dist/exporters/brief.js +37 -0
- package/dist/exporters/brief.js.map +1 -0
- package/dist/exporters/index.d.ts +2 -0
- package/dist/exporters/index.d.ts.map +1 -1
- package/dist/exporters/index.js +6 -0
- package/dist/exporters/index.js.map +1 -1
- package/dist/exporters/markdown.d.ts.map +1 -1
- package/dist/exporters/markdown.js +2 -1
- package/dist/exporters/markdown.js.map +1 -1
- package/dist/exporters/mermaid.d.ts.map +1 -1
- package/dist/exporters/mermaid.js +2 -1
- package/dist/exporters/mermaid.js.map +1 -1
- package/dist/import/__tests__/import.test.js +8 -2
- package/dist/import/__tests__/import.test.js.map +1 -1
- package/dist/parser/__tests__/parser.test.js +1386 -210
- package/dist/parser/__tests__/parser.test.js.map +1 -1
- package/dist/parser/__tests__/spec-sync.test.d.ts +10 -0
- package/dist/parser/__tests__/spec-sync.test.d.ts.map +1 -0
- package/dist/parser/__tests__/spec-sync.test.js +60 -0
- package/dist/parser/__tests__/spec-sync.test.js.map +1 -0
- package/dist/parser/index.d.ts +50 -6
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +183 -28
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/validator.d.ts +7 -1
- package/dist/parser/validator.d.ts.map +1 -1
- package/dist/parser/validator.js +77 -2
- package/dist/parser/validator.js.map +1 -1
- package/dist/plan/__tests__/brief.test.d.ts +2 -0
- package/dist/plan/__tests__/brief.test.d.ts.map +1 -0
- package/dist/plan/__tests__/brief.test.js +442 -0
- package/dist/plan/__tests__/brief.test.js.map +1 -0
- package/dist/plan/brief.d.ts +207 -0
- package/dist/plan/brief.d.ts.map +1 -0
- package/dist/plan/brief.js +342 -0
- package/dist/plan/brief.js.map +1 -0
- package/dist/plan/render.d.ts +20 -0
- package/dist/plan/render.d.ts.map +1 -0
- package/dist/plan/render.js +425 -0
- package/dist/plan/render.js.map +1 -0
- package/dist/render/__tests__/ascii.test.d.ts +2 -0
- package/dist/render/__tests__/ascii.test.d.ts.map +1 -0
- package/dist/render/__tests__/ascii.test.js +171 -0
- package/dist/render/__tests__/ascii.test.js.map +1 -0
- package/dist/render/ascii.d.ts +23 -0
- package/dist/render/ascii.d.ts.map +1 -0
- package/dist/render/ascii.js +178 -0
- package/dist/render/ascii.js.map +1 -0
- package/dist/resolve/__tests__/defaults.test.d.ts +2 -0
- package/dist/resolve/__tests__/defaults.test.d.ts.map +1 -0
- package/dist/resolve/__tests__/defaults.test.js +109 -0
- package/dist/resolve/__tests__/defaults.test.js.map +1 -0
- package/dist/resolve/__tests__/order.test.d.ts +2 -0
- package/dist/resolve/__tests__/order.test.d.ts.map +1 -0
- package/dist/resolve/__tests__/order.test.js +238 -0
- package/dist/resolve/__tests__/order.test.js.map +1 -0
- package/dist/resolve/__tests__/phase.test.d.ts +12 -0
- package/dist/resolve/__tests__/phase.test.d.ts.map +1 -0
- package/dist/resolve/__tests__/phase.test.js +81 -0
- package/dist/resolve/__tests__/phase.test.js.map +1 -0
- package/dist/resolve/defaults.d.ts +51 -0
- package/dist/resolve/defaults.d.ts.map +1 -0
- package/dist/resolve/defaults.js +109 -0
- package/dist/resolve/defaults.js.map +1 -0
- package/dist/resolve/order.d.ts +73 -0
- package/dist/resolve/order.d.ts.map +1 -0
- package/dist/resolve/order.js +208 -0
- package/dist/resolve/order.js.map +1 -0
- package/dist/resolve/phase.d.ts +57 -0
- package/dist/resolve/phase.d.ts.map +1 -0
- package/dist/resolve/phase.js +60 -0
- package/dist/resolve/phase.js.map +1 -0
- package/dist/scaffold/__tests__/scaffold.test.js +8 -2
- package/dist/scaffold/__tests__/scaffold.test.js.map +1 -1
- package/dist/scaffold/__tests__/settings-merge.test.js +95 -0
- package/dist/scaffold/__tests__/settings-merge.test.js.map +1 -1
- package/dist/scaffold/incremental.d.ts.map +1 -1
- package/dist/scaffold/incremental.js +13 -2
- package/dist/scaffold/incremental.js.map +1 -1
- package/dist/visualizer/__tests__/topology-brain-link.test.js +19 -4
- package/dist/visualizer/__tests__/topology-brain-link.test.js.map +1 -1
- package/examples/code-review.at +32 -4
- package/examples/data-processing.at +33 -4
- package/package.json +1 -1
- package/spec/grammar.md +25 -1
- package/spec/validation.md +103 -35
package/spec/validation.md
CHANGED
|
@@ -665,40 +665,108 @@ agent researcher {
|
|
|
665
665
|
|
|
666
666
|
## Summary Table
|
|
667
667
|
|
|
668
|
+
All 92 rules, generated from `src/parser/validator.ts` so the spec cannot drift
|
|
669
|
+
from the implementation. Rules V8, V12, V23, V24, V89 and V90 are collected at
|
|
670
|
+
**parse time** — the misuse they catch leaves no trace in the AST — and surfaced
|
|
671
|
+
through the validator like any other rule.
|
|
672
|
+
|
|
673
|
+
`error` fails `agentopology validate` with exit 1. `warning` reports and exits 0.
|
|
674
|
+
|
|
668
675
|
| Rule | Severity | Description |
|
|
669
676
|
|------|----------|-------------|
|
|
670
|
-
| V1 | error |
|
|
671
|
-
| V2 | error | No
|
|
672
|
-
| V3 | error |
|
|
673
|
-
| V4 | error |
|
|
674
|
-
| V5 | error |
|
|
675
|
-
| V6 | error |
|
|
676
|
-
| V7 | error |
|
|
677
|
-
| V8 | error |
|
|
678
|
-
| V9 | error |
|
|
679
|
-
| V10 | warning |
|
|
680
|
-
| V11 | error |
|
|
681
|
-
| V12 | error | Edge attribute order
|
|
682
|
-
| V13 | error | Gate
|
|
683
|
-
| V14 | error |
|
|
684
|
-
| V15 | error |
|
|
685
|
-
| V16 | error |
|
|
686
|
-
| V17 | error |
|
|
687
|
-
| V18 | warning |
|
|
688
|
-
| V19 | error |
|
|
689
|
-
| V20 | error |
|
|
690
|
-
| V21 | error | Interface
|
|
691
|
-
| V22 | warning |
|
|
692
|
-
| V23 | warning | Duplicate
|
|
693
|
-
| V24 | warning | Unknown
|
|
694
|
-
| V25 | warning |
|
|
695
|
-
| V26 | error |
|
|
696
|
-
| V27 | warning |
|
|
697
|
-
| V28 | error |
|
|
698
|
-
| V29 | warning |
|
|
699
|
-
| V30 | error |
|
|
700
|
-
| V31 |
|
|
701
|
-
| V32 |
|
|
702
|
-
| V33 | error |
|
|
703
|
-
| V34 | error |
|
|
704
|
-
| V35 | error |
|
|
677
|
+
| V1 | error | All agent, action, and gate names must be globally unique |
|
|
678
|
+
| V2 | error | No name may match a reserved keyword |
|
|
679
|
+
| V3 | error | Every node referenced in flow must be a declared agent, action, or gate |
|
|
680
|
+
| V4 | error | Every agent must appear in flow unless it has `invocation: manual` or is a group member |
|
|
681
|
+
| V5 | error/warning | Every `[when x.y]` must reference a declared output |
|
|
682
|
+
| V6 | error/warning | Every back-edge must have `max N` |
|
|
683
|
+
| V7 | error/warning | Every agent and orchestrator must have a model |
|
|
684
|
+
| V8 | error/warning | Import references should resolve (warning only -- we cannot check the filesystem) |
|
|
685
|
+
| V9 | error/warning | Every action referenced in flow must appear in orchestrator.handles |
|
|
686
|
+
| V10 | error/warning | Prompt content should not be empty if a prompt block is declared |
|
|
687
|
+
| V11 | error | If agent A writes X and agent B reads X, a path A -> B must exist in flow |
|
|
688
|
+
| V12 | error | Edge attribute order must be [when, max, per] |
|
|
689
|
+
| V13 | error | Gate `after` and `before` must reference declared nodes |
|
|
690
|
+
| V14 | error | `tools` and `disallowed-tools` cannot both appear on the same agent |
|
|
691
|
+
| V15 | error/warning | When a node has ONLY conditional outgoing edges, the conditions must |
|
|
692
|
+
| V16 | error/warning | `api-key` must be a `${...}` env-var reference (no literal secrets) |
|
|
693
|
+
| V17 | error/warning | At most one provider may have `default: true` |
|
|
694
|
+
| V18 | error/warning | Every model referenced by an agent should exist in at least one provider's models list |
|
|
695
|
+
| V19 | error/warning | Provider names must be unique |
|
|
696
|
+
| V20 | error/warning | Every schedule job must reference a declared agent or action; cron and every are mutually exclusive |
|
|
697
|
+
| V21 | error/warning | Interface webhook/auth values containing literal secrets (not `${ENV_VAR}`) should error |
|
|
698
|
+
| V22 | error/warning | Every model in a fallback-chain should exist in at least one provider's models list |
|
|
699
|
+
| V23 | error/warning | Duplicate top-level singleton sections |
|
|
700
|
+
| V24 | error/warning | Unknown sub-blocks in the `memory` section |
|
|
701
|
+
| V25 | error/warning | `on-fail: bounce-back` enforcement depends on the gate's `after` target |
|
|
702
|
+
| V26 | error/warning | `action.kind` must be one of the allowed values |
|
|
703
|
+
| V27 | error/warning | `agent.permissions` should be one of the known values |
|
|
704
|
+
| V28 | error/warning | `metering.format` must be one of the allowed values |
|
|
705
|
+
| V29 | error/warning | `metering.pricing` should be one of the known values |
|
|
706
|
+
| V30 | error | Validate `timeout` format is a valid duration string (matches /^\d+[smhd]$/) |
|
|
707
|
+
| V31 | error | Validate `on-fail` is one of: halt, retry, skip, continue, or starts with "fallback " |
|
|
708
|
+
| V32 | error | If `on-fail: fallback <id>`, validate that the referenced agent exists |
|
|
709
|
+
| V33 | error | Validate retry block fields (backoff enum, interval format, non-retryable is list) |
|
|
710
|
+
| V34 | error | Validate `temperature` is between 0 and 2 (on agents and defaults) |
|
|
711
|
+
| V35 | error | Validate `thinking` is one of: off, low, medium, high, max |
|
|
712
|
+
| V36 | error | Validate `output-format` is one of: text, json, json-schema |
|
|
713
|
+
| V37 | error | Validate `log-level` is one of: debug, info, warn, error |
|
|
714
|
+
| V38 | error | Validate `max-tokens` is a positive integer |
|
|
715
|
+
| V39 | error | Validate `join` is one of: all, any, all-done, none-failed, or N-of-M |
|
|
716
|
+
| V40 | error | Error edge target must be a declared node |
|
|
717
|
+
| V41 | error | `[race]` is only valid on fan-out edges (node has multiple outgoing edges) |
|
|
718
|
+
| V42 | error | `[tolerance]` format is valid (integer or percentage string matching /^\d+%?$/) |
|
|
719
|
+
| V43 | error | `[wait]` format is a valid duration string (reuse timeout validation pattern) |
|
|
720
|
+
| V44 | error | Topology-level `error-handler` must reference a declared node |
|
|
721
|
+
| V45 | error | Topology-level `timeout` must be a valid duration string |
|
|
722
|
+
| V46 | error | Schema type names must be valid (primitive, array of X, enum, or ref) |
|
|
723
|
+
| V47 | error | Schema `ref` names must resolve to a declared schema in the top-level `schemas` block |
|
|
724
|
+
| V48 | error/warning | Validate `observability.level` is one of: debug, info, warn, error |
|
|
725
|
+
| V49 | error/warning | Validate `observability.exporter` is one of: otlp, langsmith, datadog, stdout, none |
|
|
726
|
+
| V50 | error/warning | Validate `observability.sample-rate` is between 0 and 1 (inclusive) |
|
|
727
|
+
| V51 | error/warning | When `sensitive` is used with a literal string (not a `${...}` env var |
|
|
728
|
+
| V52 | error | Validate that secret URI schemes are one of the supported providers |
|
|
729
|
+
| V53 | error | Param type must be one of: `string`, `number`, `boolean` |
|
|
730
|
+
| V54 | error | Interface entry and exit must reference declared node ids |
|
|
731
|
+
| V55 | error | No two imports may share the same alias |
|
|
732
|
+
| V56 | error | Import source must be a syntactically valid path (starts with `./`, |
|
|
733
|
+
| V57 | error | Validate circuit-breaker fields — threshold must be a positive integer, |
|
|
734
|
+
| V58 | error/warning | `compensates` must reference a declared agent node |
|
|
735
|
+
| V59 | error | Human node `on-timeout` must be one of: halt, skip, or start with "fallback " |
|
|
736
|
+
| V60 | error/warning | When `join` uses quorum syntax `N-of-M`, validate: |
|
|
737
|
+
| V61 | error/warning | Validate `[weight N]` edge attributes: |
|
|
738
|
+
| V62 | error/warning | `[reflection]` is only valid on back-edges (edges that form cycles) |
|
|
739
|
+
| V63 | error | `members` in a group node must reference declared agent nodes |
|
|
740
|
+
| V64 | error | `speaker-selection` must be one of: auto, round-robin, random, manual |
|
|
741
|
+
| V65 | error | `max-rounds` must be a positive integer |
|
|
742
|
+
| V66 | error/warning | `rate-limit` must match N/unit where N >= 1 and unit is sec\|min\|hour\|day |
|
|
743
|
+
| V67 | error/warning | checkpoint `backend` must be one of the known values |
|
|
744
|
+
| V68 | error/warning | checkpoint `strategy` must be one of the known values, |
|
|
745
|
+
| V69 | error/warning | replay requires strategy "every-node"; max-history must be a positive |
|
|
746
|
+
| V70 | error | All artifact IDs in the artifacts block must be unique |
|
|
747
|
+
| V71 | error | depends-on, produces, and consumes must reference declared artifact IDs |
|
|
748
|
+
| V72 | error | Artifact dependency graph must be acyclic |
|
|
749
|
+
| V73 | error/warning | Registry package names must match `[a-z0-9-]+(/[a-z0-9-]+)*` |
|
|
750
|
+
| V74 | error/warning | Registry package version must be valid semver or "latest" |
|
|
751
|
+
| V75 | error/warning | If sha256 is present on an import, it must be a valid 64-char hex string |
|
|
752
|
+
| V76 | error/warning | Variant ids must be unique within each agent |
|
|
753
|
+
| V77 | error/warning | Variant weights must sum to approximately 1.0 (within 0.01 tolerance) |
|
|
754
|
+
| V78 | error/warning | `encrypted` values must match SOPS envelope format ENC[METHOD,data:BASE64] |
|
|
755
|
+
| V79 | error/warning | provider auth.type must be one of the known auth types |
|
|
756
|
+
| V80 | error/warning | OIDC and OAuth2 auth types require an issuer field |
|
|
757
|
+
| V81 | error/warning | StoreNode.backend must be one of the known values |
|
|
758
|
+
| V82 | error/warning | When StoreNode.type is "semantic", "episodic", or "procedural", |
|
|
759
|
+
| V83 | error/warning | Every store should have a scope defined. Warning level |
|
|
760
|
+
| V84 | error | Every source in RetrievalNode.sources must match a store ID in ast.stores |
|
|
761
|
+
| V85 | error | Remote backends (pinecone, neo4j, qdrant, pgvector) require a connection field |
|
|
762
|
+
| V86 | error | Every ID in AgentNode.memory must match a store ID in ast.stores |
|
|
763
|
+
| V87 | error/warning | `orchestrator.delegation` must be "subagent" or "inline" |
|
|
764
|
+
| V88 | error/warning | Every store in an agent's `custodian-of` must reference a declared store |
|
|
765
|
+
| V89 | error | `agent.prompt` must be a `prompt { }` block, not a `prompt: "path"` key-value pair (the string form belongs to `skill`) |
|
|
766
|
+
| V90 | error | A field value must not swallow the next field — fields are one per line (`spec/grammar.md` §2) |
|
|
767
|
+
| V91 | error | A required field must not be satisfied by a parser-injected placeholder — `meta.version` and `orchestrator.model` are required, and their sentinels (`0.0.0`, `unknown`) satisfied every downstream check |
|
|
768
|
+
| V92 | error | An edge's attributes go in ONE bracket, comma-separated — `[when ...] [max N]` produced a condition string containing brackets, silently |
|
|
769
|
+
|
|
770
|
+
> Sections above document the first 35 rules with worked examples. The rest are
|
|
771
|
+
> single-line entries here plus their doc comment in the source. Adding an
|
|
772
|
+
> example section for a rule is always welcome.
|