feat(agentfabric): schema-driven graph extraction + graph-aware lint rules#53
Merged
marianogonzalez merged 5 commits intoJun 8, 2026
Conversation
Sync the agentfabric dialect and the @agentscript/language APIs it depends on from the internal module-agentscript repo, so the build and test suite pass in op-agentscript. - Add agentfabric compiler and graph-extraction modules, lint rules, and tests carried over from module-agentscript. - Extend @agentscript/language with the graph field markers the dialect needs: transitionContainer, predicateField, outputNameField, and displayLabelField (core/types.ts FieldMetadata flags + field-builder methods). Export isAstNodeLike and the Range type. - Update getValueCompletions to the AST-aware signature and add walkParentsToSchemaContext plus CompletionCandidate.insertText; thread cycle detection through scope.ts walkers; update the lsp caller. - Mark agentscript-dialect baseSubagentFields.label as displayLabelField so orchestrator nodes (cloned from SubagentBlock) surface their label in the extracted graph.
setu4993
approved these changes
Jun 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Expands the AgentFabric dialect with new graph-aware lint rules, a schema-driven
graph-extraction library, and the @agentscript/language primitives those features
depend on.
The diff spans three layers:
action-binding validation, unused-node, strict schema validation) and removal
of two deprecated
routerchecks.node/edge graph from a parsed document purely from schema metadata, plus an
adapter to the agent-graph canvas protocol.
resolver, and cycle-safe schema walkers.
How
New lint rules (src/lint/passes/rules/)
edges, deduped by a rotation-invariant signature. Warns on each cycle member
(
cycle-detected), e.g.Cycle detected in execution flow: @a → @b → @a.Triggers are excluded from membership but seed the traversal.
dobody:settargets must be@variables./@outputs.;
runtargets must reference an @actions.* def whosekind is a2a:send_message or mcp:tool;
withparams must match declared inputs;bare @ and @actions.* are rejected as values.
every
with <param>in a reasoning.actions binding is a declared input (orimplicit param).
diagnostic tagged Unnecessary, with a removalRange for quick removal.
Warning → Error (AgentFabric is a strict compile target).
Removed: deprecated switch-choices-deprecated and switch-on-exit router checks.
New graph library (src/graph/)
transitionTarget capability and transitionContainer/transitionTarget field
markers — no block/field names hardcoded. Surfaces lexical ranges, sibling
primitives, and predicates.
first-class kind + open additionalProperties). Documents a comma-escaping
grammar for the joined outputs summary that must stay in sync with the UI parser.
@agentscript/language core
predicateField(), outputNameField(), displayLabelField().
walkParentsToSchemaContext resolver (the two prior divergent walkers were a bug
source). Value completions are discriminant-variant aware and add quoted
enum-member completions via insertText. getValueCompletions now takes
ast.Schema changes
items/properties) via lazy proxy field wrappers; adds includeDefault. Applies
the new field markers across node blocks. Adds XHIGH to reasoning_effort.
Removes explicit http_headers (now an implicit
withparam).orchestrator nodes surface their label in the extracted graph.
Tests
New suites cover the extractor, protocol adapter, LLM variant/value completions,
snippet indentation, and the new lint rules.
Test Plan
pnpm test)pnpm lint && pnpm typecheck)Checklist