Liking cljdoc? Tell your friends :D

propolis

A small, protocol-neutral Clojure kernel for agent interoperability over A2A 1.0 (Agent2Agent) and ACP v1 (Agent Client Protocol). It is pure .cljc, depends only on org.clojure/clojure and metosin/malli, and is licensed MIT.

What it holds:

  • The JSON-RPC 2.0 envelope.
  • One lifecycle table. RunState, WorkState, A2A TaskState and ACP StopReason meet in a single place.
  • Content projections. Neutral blocks project to A2A Parts and to ACP ContentBlocks.
  • Error tables.
  • Role-sized ports. These are defprotocols from std01 §3.4. The package ships no implementations.
  • Conformance cases. They are keyed by the official a2a-tck and acp-tck requirement ids.

It works on decoded maps: there is no transport, no JSON codec and no SDK. Wire correctness at the JVM boundary belongs to the official SDKs. Codecs to and from those SDKs (propolis.a2a.sdk, propolis.acp.sdk) come later, once spikes sp1 and sp2 of plan-interop-03 decide whether to adopt them.

Namespace map

nswhat
propolis.core.jsonrpcRequest / Notification / Response malli schemas, constructors, classify
propolis.core.errorsJSON-RPC, A2A (-32001..-32009 with HTTP/gRPC/ErrorInfo reason) and ACP code tables; error builds the plain-data error value ports return
propolis.core.lifecycleWorkState hub; task-state<->work-state, stop-reason<->work-state, run-state<->work-state, composed projections; terminal/interrupted predicates
propolis.core.contentneutral ContentBlock (:content/kind), multimethod projections ->a2a-part / a2a-part->block, ->acp-block / acp-block->block
propolis.core.portsIAgentDescriptor, IContentCodec
propolis.a2a.v1.portsIA2AMessageSender IA2AStreamer IA2ATaskReader IA2ATaskCanceller IA2APushConfigs IA2AExtendedCard; client side IA2ARemote IA2APushReceiver
propolis.acp.v1.portsagent side IAcpInitializer IAcpSessions IAcpSessionRestore IAcpSessionCatalog IAcpPrompter IAcpConfigurable IAcpAuthenticator; client side IAcpPermissionGate IAcpFileSystem IAcpTerminals IAcpElicitor
propolis.capabilityA2A card flags and ACP agentCapabilities derived from satisfies? on the ports, plus an honesty check
propolis.conformance.catalogthe 133 a2a-tck and 134 acp-tck v1 requirement rows (from resources/propolis/conformance/tck-requirements.edn), plus gating?
propolis.conformance.casescore-level cases as data. Each one :pins an official id (CORE-SEND-002, ACP-CANCEL-001 and so on); the checks are pure

Strata. core names no protocol and changes rarely. The per-protocol ports sit above it. capability reads both protocol contexts, and conformance sits on top. Nothing depends on conformance.

Port contract. A port takes a decoded request map with the wire's camelCase keyword keys. It returns either the response map or an propolis.core.errors/error value. No exceptions and no Result type cross the seam; hive adapters lift these values into their own Result types at the edge.

JVM SDK layer (:sdk alias)

src-sdk/ holds propolis.a2a.sdk.*, which builds on a2a-java 1.5.1.Final (spec, server-common, transport-jsonrpc). It is reachable only through the :sdk alias, so a consumer of the cljc core never pulls the SDK: clojure -Spath lists no org.a2aproject jar.

nswhat
propolis.a2a.sdk.codecpure codecs between A2A 1.0 wire maps and org.a2aproject.sdk.spec records (Message, Text/File/Data Part, Task, TaskStatus, Artifact, AgentCard, TaskStatusUpdateEvent, TaskArtifactUpdateEvent), built only through the SDK's builders; the ns doc lists the normalisations
propolis.a2a.sdk.adapteragent-executor: IA2AExecutor (+ IA2ATaskCanceller) -> AgentExecutor; task-store: IA2ATaskReader + IA2ATaskWriter -> TaskStore + TaskStateProvider; ->a2a-error: error value -> SDK A2AError

Tests

clojure -M:test                 # core only, no SDK on the classpath
clojure -M:sdk:sdk-test:test    # core + SDK codec/adapter tests

The SDK tests use the real SDK as the oracle. Their property tests send malli-generated maps through the SDK builders and the SDK's JSON-RPC ProtoJSON (JSONRPCUtils, ProtoUtils, JsonUtil) and back again. The adapter tests drive a real DefaultRequestHandler.

The suite finds every *-test ns under test/. Three test namespaces cover:

  • the core tables and projections;
  • the conformance cases, including a check that every pinned id exists in the official catalog;
  • the dependency guard rails, which allow only clojure + malli and forbid any hive-* or JSON-library require.

Regenerating the TCK catalog

tck-requirements.edn is a snapshot. On a TCK bump, re-extract the rows:

  • a2a-tck: tck/requirements/*.py, from the RequirementSpec fields id, section, level and title;
  • acp-tck: src/tck/v1/requirements.py, from the Requirement fields id, tier, capability and text.

Then update the pinned commits in propolis.conformance.catalog and NOTICE, and run the tests. cases-pin-official-ids fails if a case pins an id the new TCK no longer has.

Paused work

The branch wip/codegen-paused holds the earlier slice:

  • a proto3 parser plus an a2a.proto→malli generator;
  • the vendored A2A v1.0.1 a2a.proto;
  • the generated propolis.a2a.v1.schema;
  • a drift check and 21 golden vectors.

That work is paused by plan-interop-03. It resumes only if a spike shows an SDK cannot run inside hive, or a cljc/bb consumer needs map schemas.

Licence

MIT, see LICENSE. Third-party attributions are in NOTICE.

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close