You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 47adc1f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: architecture.md
+52-27Lines changed: 52 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3562,7 +3562,11 @@ translation lives entirely in `@executablemd/acp`, and no ACP or ACPX type cross
3562
3562
A provider-native session identity is the identity an agent asserts for its own durable
3563
3563
session state, distinct from the logical XMD session key and from the ACP/ACPX record
3564
3564
identity. Only an asserted one crosses a handoff; XMD never infers that a string a
3565
-
native CLI would accept is one.
3565
+
native CLI would accept is one. A workflow may retain the distinctly tagged
3566
+
`acpx.acpSessionId` loading target when no native assertion exists. An asserted
3567
+
`acpx.agentSessionId` takes precedence; changed kind or value refuses
3568
+
reattachment. The ACP target never becomes `Session.agentSessionId` or a native
3569
+
CLI handoff identity.
3566
3570
3567
3571
#### Inert placement
3568
3572
@@ -3588,24 +3592,42 @@ constructed.
3588
3592
3589
3593
#### Materialization
3590
3594
3591
-
Session materialization is the transition that makes a placement's chosen route and its
3592
-
backend history resumable. The runtime is the integrity-pinned ACPX 0.21.1 source
3593
-
closure. Its released child environment and response metadata coexist with the
3594
-
local explicit-acceptance barrier: `promptStarted` acknowledges transport only.
3595
-
Promotion and ordinary checkpoints share the released session owner's writer;
3596
-
the asserting copy is saved before memory adopts it, and finalization joins
3597
-
promotion before saving. ACP-first materialization happens only when the backend
3598
-
reports that it accepted the session's first turn; client-native materialization is the
3599
-
native launch's existing retained construction. Nothing else promotes a placement — not
3600
-
a returning ensure, a first output, a terminal result, a checkpoint token, an error code
3601
-
or a diagnostic.
3595
+
An adapter declaring `acceptance: "first-turn-acceptance"` requires explicit
3596
+
backend acceptance before a new ACP session exposes events. Codex and Claude
3597
+
declare it. The integrity-pinned ACPX 0.21.1 runtime consumes the versioned
3598
+
`executablemd.session-materialization/v1` marker. Its `promptStarted` is only
3599
+
transport acknowledgement; text and `end_turn` prove no stronger acceptance.
3600
+
Promotion shares the session owner's writer: the asserting copy is saved before
3601
+
memory adopts it, and finalization joins promotion before saving. Host mapping
3602
+
commits after that save and before events. Missing acceptance never selects the
3603
+
standard path. Client-native materialization keeps the native launch's retained
3604
+
construction.
3605
+
3606
+
A standard adapter uses ordinary ACP creation without this barrier. The provider
3607
+
saves its record and the host retains its identity before configuration,
3608
+
permission routing and turn execution. Events report streamed text and the
3609
+
actual terminal outcome. Native identity exists only when the peer asserted it;
3610
+
an ACP session id alone proves neither native identity nor durable recovery.
3602
3611
3603
3612
#### Established sessions
3604
3613
3605
-
An established session is a placement whose immutable construction route and durable
3606
-
provider or native identity both already exist, and which is therefore validated
3607
-
eagerly: reattached, compared against its retained history, and refused when either is
3608
-
missing or names another conversation.
3614
+
A retained standard record is existing. Cold continuation loads or resumes the
3615
+
exact stored ACP session, or refuses before another prompt. Missing load/resume
3616
+
support refuses even an unused record. The released `-32603` recreation remains
3617
+
only for a provably never-prompted record; used and uncertain conversations are
3618
+
never replaced. Failed attempts may retain their user request and lifecycle
3619
+
facts while preserving earlier messages, identity and configuration.
3620
+
3621
+
A held conversation's canonical history independently establishes use: a turn
3622
+
with nonempty agent output, status other than failed, a stop reason, or a native
3623
+
identity counts as used. Its private issuance requires existing construction. If
3624
+
provider storage is gone, setup refuses before creation or sending, preserves the history and
3625
+
keeps the conversation usable. A history containing only failed-before-answer
3626
+
turns retains its creation retry. An outcome-less turn still refuses opening
3627
+
and is never resent.
3628
+
3629
+
Established strong sessions retain their construction route, asserted native
3630
+
identity and executable checks. Their continuation never silently downgrades.
3609
3631
3610
3632
#### Instruction placement
3611
3633
@@ -3749,7 +3771,9 @@ path; holding a partition grants work, never permission.
3749
3771
3750
3772
The [local-agent example](examples/agent-certification/README.md) uses ordinary
3751
3773
Agent/Session/Prompt routing and literal-command registration. Private comparisons
3752
-
produce categorical capability evidence; expectations confer no execution,
3774
+
report basic authentication, streaming and completion separately from acceptance,
3775
+
asserted native identity, durability and cleanup. Missing stronger evidence
3776
+
leaves demonstrated basic passes intact. Expectations confer no execution,
3753
3777
identity or certification. Reports finalize after the existing owner joins.
3754
3778
Native cleanup remains unverified at the production probe/release boundary,
3755
3779
so cancellation and durable certification remain non-pass. Successfully joined
@@ -3908,20 +3932,21 @@ identity. Cwd and provider placement are never compatibility inputs. What stays
3908
3932
beside the run on disk is the provider's own session store and one empty working
3909
3933
directory per session; both are disposable.
3910
3934
3911
-
The order is placement, then the backend's acceptance of the session's first
3912
-
turn, then the provider's canonical, tagged assertion of a durable identity,
3913
-
then the mapping commit — and only then is anything that first turn produced
3914
-
exposed to the document.
3935
+
Strong adapters order placement, explicit first-turn acceptance, asserting
3936
+
provider save, tagged native assertion and mapping commit before events.
3937
+
Standard adapters order placement, ACP creation and provider save, tagged ACP
3938
+
loading-target mapping, configuration and permission routing, then turn and
3939
+
events. Native assertion takes precedence when available. Neither path derives
3940
+
stronger acceptance from transport acknowledgement or output.
3915
3941
3916
3942
Placement is inert. A `<Session>` says where a session will live and which agent
3917
3943
it is compatible with; it creates no provider session, contacts no backend and
3918
-
writes no row. The session comes into existence when the first subscribed
3919
-
`<Prompt>` starts a turn the backend accepts, through the one handle that
3920
-
ensured it, and acceptance is reported by the adapter rather than inferred from
3921
-
what the turn then produced.
3944
+
writes no row. The first subscribed `<Prompt>` constructs it through the handle that ensured
3945
+
it. Strong construction additionally waits for the adapter's explicit acceptance
3946
+
rather than inferring acceptance from what the turn produced.
3922
3947
3923
3948
Occupancy of a key in the provider's own store is not an assertion: it says
3924
-
something is there, not what conversation it is. A record the provider holds for
3949
+
something is there, not what conversation it is. A pending strong record the provider holds for
3925
3950
a first turn nobody accepted is exactly that — occupancy — so it asserts nothing,
3926
3951
no mapping is committed for it, and the next attempt creates rather than
3927
3952
resumes.
@@ -9575,7 +9600,7 @@ Status is measured against main.
9575
9600
| Agent session portability evidence in an XMD artifact | classifies every logical Agent session that contributed a retained Prompt as portable — with ordered provider checkpoint tokens and an opaque Agent session bundle — or as explicitly unavailable, as two content kinds inside the existing version-1 manifest and identity [Invariant](#portable-xmd-artifacts); [Interface and evidence](specs/xmd-artifact-spec.md#25-agent-session-portability-evidence). | specified by `specs/xmd-artifact-spec.md` §2.5; the closed union, both content kinds and the complete post-identity profile verifier are built on the #621 stack, Deno provider only. Provider bundle capture, Agent-aware export, intrinsic Agent-aware inspection and artifact-backed fork are unbuilt |
9576
9601
| historical authored source | retains an authored durable operation's normalized `SourcePosition` beside its identity, and history parses it or refuses the entry [Invariant](#read-only-lifecycle-inspection); [Interface and evidence](specs/workflow-workspace-spec.md#42-history). | built on the #367 stack |
9577
9602
| history fork | creates a new run from one compatible checkpoint and retained Workspace root, under a new immutable definition and normalized props [Invariant](#retained-effects-and-history-forks); [Interface and evidence](specs/workflow-workspace-spec.md#11-history-forks). | built on the #368 stack, Deno provider only |
9578
-
| workflow Agent session | Uses inert placement and authenticated first-turn mapping under the run-owned no-native-tool profile. [Session mapping](#agent-permissions-and-generated-xmd). | built on the #302 stack, with the explicit ACP-only selection from #561; the portable proof that an adapter honours an empty tool set is tracked by #496 and does not widen the ceiling |
9603
+
| workflow Agent session | Uses inert placement and capability-specific identity mapping under the run-owned no-native-tool profile. [Session mapping](#agent-permissions-and-generated-xmd). | built on the #302 stack, with the explicit ACP-only selection from #561; the portable proof that an adapter honours an empty tool set is tracked by #496 and does not widen the ceiling |
9579
9604
| generated-XMD admission | Preflights and retains one generated fragment under the exact selected identities and forms. [Admission and continuation](#agent-permissions-and-generated-xmd). | built on the #369 stack, continuation basis amended by #589, and the host's contribution narrowed to `Component.generated` by this stack; core owns the mechanics and no host wrapper remains |
9580
9605
| `<Evaluate>` | Runs untrusted fragment text or paired-produced text under the host's captured generated selection; whole-fragment admission, local data expressions and ordinary rendered output remain distinct from provider permission. [Admission and captured implementations](#agent-permissions-and-generated-xmd). | built on the #302 stack, extended by #369, and narrowed to a name-and-form selection by this stack |
9581
9606
| generated mutation proposals | Admits filesystem change proposals through the host's generated selection and ordinary component transactions. [Invariant](#agent-permissions-and-generated-xmd); [Interface and evidence](specs/workflow-workspace-spec.md#mutation-proposal-admission). | Built on #369/#567, with persistent directory creation added by #643; legacy Dir grants refuse, and Git/process/credential/external-write classes remain excluded. |
0 commit comments