✨ feat(acp): ACPX provider package (acp-stack 07) - #136
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
PR #136: ✨ feat(acp): ACPX provider package (acp-stack 07)20 files, +3303 / -114 Scope🔴 PR has 3417 lines changed. Split into focused PRs. 🟡 3417 lines changed. PRs under 400 receive more thorough review. 🟡 PR mixes config and source changes. 🟡 New abstraction files: packages/acp/src/provider.ts, packages/acp/tests/helpers.ts. Verify 3+ consumers. 🟡 package.json changed without dependency justification. Structural✅ No structural bloat detected. Slop✅ Slop indicators look low. Static Analysis✅ Oxlint found no issues. CorrectnessNo extraneous code patterns detected. |
d57f9eb to
47c467bCompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
packages/acp implements #135's rootProvider seam over acpx@0.12.0, connecting the core Agent Api to real coding agents. Library-only — no <TestAgent> vocabulary, CLI provider selection, or real-subprocess smoke. - createAcpxProvider() (the rootProvider factory) + useAcpxProviderState; agent availability via acpx doctor(), session placement/routing by (agent, session key, cwd), cold prompt streams → normalized events, per-session FIFO serialization with cross-session concurrency, permission routing through Agent.requestPermission, contextual timeout, structured teardown aggregating cleanup failures. - Effection-shaped: acpx Promise-returning leaves are consumed with `until`; the provider's only Promise-producing adapter is the acpx onPermissionRequest callback (scope.run over the operation-based bridge). The fake runtime returns Promises/an async iterable only at the acpx AcpRuntime boundary; its manual-turn gates use Effection Futures. - Tests (fake runtime, no subprocess): AP, SQ, SK, PB, plus a new XA acceptance test exercising the full lifecycle through the rootProvider seam (availability → session → normalized prompt → teardown, asserting the handle closes before completion settles). - Workspace: root deno.json (workspace + check/test/lint), pnpm-lock, deno.lock, publish workflow (8 packages), release-spec lockstep list; acp-client-spec.md expanded with the ACPX provider section.
47c467b to
e7bce64CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Why
The
<TestAgent>phase (turning the manual ACPX walkthrough into anxmd testfixture) sits on top of an ACP-client provider. #135 (merged) added the
provider-neutral core agent vocabulary and the
rootProviderfactory seam.This PR adds
packages/acp— the ACPX implementation of that seam,connecting the core
AgentApi toacpx@0.12.0. Library-only: no<TestAgent>vocabulary, no CLI provider selection, no real-subprocess smoke —those follow in the
<TestAgent>phase.What changes
packages/acp(@executablemd/acpv0.4.2):createAcpxProvider()— theAgentProviderFactoryforinstallAgentVocabulary({ rootProvider });useAcpxProviderStatefor thesame operations without the Agent install (sibling states).
doctor()(cached); sessioncreation + routing by (agent, session key, contextual cwd) with a
Git-root placement walk; cold prompt streams normalized to
started/text_delta/terminal+ final text; per-session FIFOserialization with cross-session concurrency; permission routing through
Agent.requestPermission(fails closed); contextual timeout; structuredteardown that closes handles and aggregates cleanup failures.
with
until; the provider's only Promise-producing adapter is the acpxonPermissionRequestcallback. The fake runtime returns Promises / an asynciterable only at the acpx
AcpRuntimeboundary; its manual-turn gates useEffection
withResolvers/Futures, notnew Promise/async. Noasassertions; no
node:fsin tests.deno.json(Denoworkspacearray +check/test/linttasks),
pnpm-lock.yaml,deno.lock, publish workflow (now 8 packages),and the
release-process-spec.mdlockstep list.pnpm-workspace.yamlalreadyglobs
packages/*(no addition);tsconfig.node.jsonintentionally excludesacp (it depends on
acpx, stays Deno-typechecked).specs/acp-client-spec.mdgains a present-tense ACPX provider section.What is deferred
Named provider selection (
<AgentProvider>/ registry), permission-policycomponents, CLI flags, and the real-subprocess / compiled-binary smoke — the
later general-provider and
<TestAgent>phases.DEFAULT_AGENT_NAMEis notre-exported here.
How to verify it
On Deno 2.9.1:
Tests are deterministic and fake-runtime-driven (no agent subprocess): Tier
AP (provider: stream shape, timeout, serialization/concurrency, halt/teardown,
doctor caching, permission routing), SQ (serial queues), SK (session
identity), PB (permission bridge), and Tier XA — the acceptance test
installing
createAcpxProvider()through #135'srootProviderseam andexercising the full availability → session → normalized prompt → structured
teardown lifecycle, asserting the runtime handle closes before the
DocumentExecutioncompletion settles.deno task test: 115 passed.Scope
The ACPX provider library only. The
<TestAgent>vocabulary + smoke consumeuseAcpxProviderStatefrom this package in the following PR.Targets
main. Next:agent/acp-stack-08-test-agent-vocabulary.