Repository navigation
Release 0.6.0
Resolves aiperceivable/apcore-a2a issues #2, #3, #4, #5 and apcore-a2a-rust #2.
One principle runs through all five: apcore already draws these distinctions,
and a transport binding's job is to convey them, not to flatten them.
Suite: 190 tests (was 164).
Runtime floor moves to apcore 0.28.0 / apcore-toolkit 0.10.2 (apcore = ">=0.28, <0.29" / apcore-toolkit = ">=0.10.2").
Changed
-
A governance refusal is reported as itself (spec srs FR-ERR-003, FR-ERR-009,
FR-ERR-010, FR-ERR-012).ACL_DENIEDmoves from-32001 "Task not found"to
-32040 "Access denied";APPROVAL_DENIEDandAPPROVAL_TIMEOUTleave the
-32603catch-all for-32041 "Approval denied"and-32042 "Approval timed out". All three now reachTASK_STATE_REJECTEDinstead of
TASK_STATE_FAILED, which matters most onmessage/send, where the response
is a JSON-RPCresultand the error code never reaches the caller at all —
the state and its message are the entire payload.The old mapping told an agent a different failure had happened, one whose
correct response was the opposite of the real one:"Task not found"sends a
caller back to re-fetch or re-send the one thing that was fine, and
"Internal server error"is the canonical retryable failure — for a call a
human had explicitly refused. A2A §13.2's MUST NOT forbids revealing the
existence of a resource, not the class of failure, so a fixed
"Access denied"naming no caller, target or rule satisfies it while still
telling an agent to stop.-32001now means only "unknown task id, or a task owned by another
principal".APPROVAL_PENDINGis untouched: still a resumable
TASK_STATE_INPUT_REQUIREDcarrying its message verbatim, which is how a
caller learns the approval id it resumes with.Breaking for callers that matched
-32001or the literal"Task not found"to detect an authorization failure. -
The public Agent Card shows what an anonymous caller could actually invoke
(spec srs FR-AGC-003): every registered skill, minus those the ACL denies to
the anonymous principal, minus those annotatedrequires_approval. The filter
resolves one identity, so it runs once at card-build time — never per request
on the auth-exempt/.well-known/route. -
The extended Agent Card carries what the authenticated caller may invoke
(spec srs FR-AGC-004), includingrequires_approvalskills, resolved against
that caller's own identity. -
capabilities.extendedAgentCardis no longer derived fromauth != null
alone (spec srs FR-AGC-002, FR-AGC-006): this binding advertises the
capability only because it now serves it. -
Card visibility reads apcore's two governance axes apart (spec srs
FR-AGC-003 "The two axes" and criterion 11; FR-AGC-004 criteria 2 and 10).
apcore 0.28.0 (PROTOCOL_SPEC§6.1.6) gave an ACL rule anapproval: required
field orthogonal toeffect, so one check now resolves two independent results
— may this caller reach this target, and must this call be put to a human — and
made the legacy booleanACL.checkfail closed on the second. This binding
filtered its cards on that boolean. Left alone, a skill the ACL allows the
caller but gates behind a human would have silently vanished from the
extended card too: a refusal the ACL never issued, and the caller left
unable to learn that a capability it holds exists at all.Every card filter now reads
ACL::check_accessand filters on the
authorization axis alone. The approval axis decides only which surface: it
joins the module'srequires_approvalannotation as the second source the
public card subtracts, composed by union exactly as apcore §6.9 composes them.
Since 0.28.0 the annotation describes the module, not the call (apcore#110),
so reading it alone would leave on the public card a skill an anonymous caller
cannot in fact just call.The bug this closes was one line:
handlers::acl_filtered_cardcalled
acl.check(...).ACL::check_accessreturns anAccessDecision, and the filter
now readsdecision.is_allowed()for visibility anddecision.approval_required
only to decide which surface — thehide_approval_gatedargument,truefor the
public card andfalsefor the extended one. The projection argument isNone:
a card is discovery and there is no call site.apcore::acl::ACLRulealso gained a requiredapprovalfield, a source break for
the struct literals in this crate's integration tests. -
apcore's
system.*management namespace never reaches the public Agent Card
(spec srs FR-AGC-003 criteria 12 and 13, FR-AGC-004 criterion 11;
aiperceivable/apcore-a2a#5). Removed unconditionally — independent of ACL
state, of therequires_approvalannotation, and of howsys_modulesis
configured. Kept on the extended card, filtered per identity like any other
skill.Every other subtraction the public card makes is governance-shaped, and with no
ACL configured they all collapse: the ACL predicates are empty and the
annotation covers only the threesystem.control.*write modules — leaving the
six read modules, which enumerate the deployment's module inventory, health and
usage, published to any anonymous caller on the auth-exempt/.well-known/
route.ACL.discover()yields nothing for a missing root by design, so "no ACL
at all" is the default rather than an edge case, and the rule that has to hold
there cannot be shaped like a governance verdict. -
Warns when an unprotected control surface is served (spec srs FR-AGC-007),
asserted by capturingtracingoutput with a thread-local
subscriber::set_defaultrather than a global subscriber, so the check cannot
race the other tests in the integration binary.
Server construction reads apcore'sExecutor::governance_stateand warns when
unprotected_control_surfaceis true. It never refuses to start and never
alters a card. Withholdingsystem.*from the public card removes the surface
from discovery, not from dispatch: apcore's approval gate warns once and
continues with noApprovalHandler, so the write modules stay callable, and the
card rule must not be mistaken for a fix to that.
Added
-
apcore's behavioral annotations reach the wire (spec srs FR-SKL-004):
readonly,destructive,idempotentandrequires_approvalare emitted as
namespaced entries in the standardtagsfield —apcore:readonly,
apcore:destructive,apcore:idempotent,apcore:requires-approval— in
that fixed order, appended after the module's own tags and de-duplicated
against them. Onlytrueflags are emitted.A2A 1.0
AgentSkillhas noextensionsand nometadatamember, sotags
is the only carrier that exists. Without them the card carried enough to
construct a call and not enough to judge whether making it is safe — and
retry semantics were unusable, sinceretryableis a property of the error
while whether a retry is safe is a property of the operation. -
Governance refusal errors on the client, so a refusal is not reported as
a transient server failure. -
A2AClientError::AccessDenied/ApprovalDenied/ApprovalTimeout, plus
A2AClientError::is_governance_refusal(). -
APCoreA2AConfig::disclose_refusal_reason(defaultfalse, spec srs
FR-ERR-011): forwards apcore's own sanitized reason for the three governance
codes instead of the fixed per-class string. The code never changes with the
flag; only the message does. -
GET /agent/authenticatedExtendedCardand theGetExtendedAgentCard
JSON-RPC method. This crate advertisedcapabilities.extendedAgentCardand
routed neither, so a client that read the flag and called the method — which
A2A §3.2.x entitles it to do — got method-not-found.
Fixed
-
sys_modulesregistered nothing (aiperceivable/apcore-a2a#5). apcore reads
sys_modules.enabled, a top-level config section; the flag was a silent
no-op in every deployment since it was introduced.This binding passed
&Config::default()toregister_sys_modules, which reads
sys_modules.enabledand returns an empty context when it is absent — and
let _ =discarded the result, so nothing reported the no-op. The config is now
built with the key set, theResultis inspected, a failure is warned about
rather than dropped, and the registered ids are logged.Fixed together with the namespace rule above, deliberately in that order:
repairing the config path on its own is precisely what would have opened the
hole that rule closes. -
async_serveno longer derives its bind address fromconfig.url(#2).
APCoreA2AConfiggainshostandport;urlis now the Agent Card
endpoint only, defaulting tohttp://{host}:{port}exactly as the Python and
TypeScript bindings have always done. The old code string-spliturlon
://and fell back to0.0.0.0:8000when the split failed, so a scheme-less
loopback value like127.0.0.1:18999silently published every skill on every
interface, on a port the operator never chose — with nothing logged. A path, a
trailing slash or a missing port failed to bind with an address-parse error
naming neither the URL nor the cause.Breaking:
APCoreA2AConfiggains two fields, so struct-literal
construction must be updated (useAPCoreA2AConfig::default()with.., or
the builder's new.host()/.port()/.bind()setters). -
Rust now emits the unauthenticated-public-bind warning Python and TypeScript
already did — the one configuration that most deserves a line in the log
produced none.