feat(agentfabric): Add support for artifact and status update echo node types#56
Closed
Drake-Ash wants to merge 3 commits into
Closed
Conversation
…ifact-and-status-update-echo-node-types # Conflicts: # dialect/agentfabric/src/lint/passes/rules/terminal-status-rules.ts
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
Redesigns the AgentFabric
echonode around A2A v1 task-update events, replacing the singlea2a:responsevariant with two purpose-built event types, and adds graph-aware lint rules toenforce correct terminal behavior.
The echo node now supports two
kindvariants:a2a:status_update_event— sets the taskstate(required; an A2A v1TASK_STATE_*value) with an optional
message.a2a:artifact_update_event— emits anartifact(required) with optionalappendandlastChunkflags.Why
The previous
a2a:responseecho wrapped a full A2ATaskobject (viaa2a.task(...)) and onlysupported non-streaming responses. Modeling responses as discrete A2A v1 task-update events
(status vs. artifact) aligns the dialect with the A2A v1 task lifecycle, enables
incremental/streaming artifact updates, and lets the linter statically guarantee that every
execution path drives the task to a terminal state.
How
Schema (
src/schema.ts)a2a:responsevariant (withtask/artifacts/message/metadata) with the twoevent variants above.
a2a:status_update_event:stateis required and constrained to the A2A v1TASK_STATE_*enum;
messageis optional.a2a:artifact_update_event:artifactis required;append/lastChunkare optionalbooleans.
A2A_TASK_STATES(the 8TASK_STATE_*values) andA2A_TERMINAL_STATESfor shareduse across schema, compiler, and linter.
a2a.tasknamespaced function;a2a.message/textPart/dataPart/filePart/artifact/partsremain.Lint rules
terminal-requires-status-update(new,terminal-status-rules.ts): every terminal branchin the graph must reach an
a2a:status_update_eventecho with a terminal state. Uses graphextraction + reverse-BFS so the status echo need not be the leaf node (a branch may continue
afterward, e.g. to emit an artifact or run cleanup).
echo-invalid-state(new, inecho-rules.ts): validates that a status-update echo'sstateis a known A2A v1 task state.echo-task-or-message-required, which no longer applies under the event model.Other
@agentscript/agentfabric-dialect0.1.30→0.4.0(breaking) and added a CHANGELOGentry.
apps/docs) for the new echo node, field tables, anda2anamespace notes.
.agent/.yaml/.graph.json) and all inline test sources to thenew event variants; the customer-support fixture now also exercises a chained
status_update→artifact_updateecho.Breaking change / migration
Flows using
kind: "a2a:response", thetask:orartifacts:echo fields, ora2a.task(...)must migrate. Replace the response with a status-update echo (set a terminal
TASK_STATE_*) and,where artifacts were attached, an
a2a:artifact_update_eventecho:Test Plan
pnpm --filter @agentscript/agentfabric-dialect test→ 144passed (incl. 61 lint tests)
terminal-requires-status-update(terminal node not an echo, non-terminal state, valid terminal echo,
status-echo-then-more-nodes),
echo-invalid-state, andunknown-variantfor the removeda2a:responsekindpnpm --filter @agentscript/agentfabric-dialect typecheckcleanChecklist
apps/docs+ dialect CHANGELOG)