Purpose
Expose a public, generation-scoped proof of attach-negotiated daemon client capabilities. This is required before Comet can use correlated_prompt_lifecycle_v1, and it should repair Pylon's current server-offer shortcut at the same shared SDK seam.
Coordination:
Current gap at 7238ac8cff25962ada9ffe4530b7d4d1cddc1b47
DaemonClient.supportsServerCapability("correlated_prompt_lifecycle_v1") proves only the daemon_hello offer.
DaemonAgentConnection.attach() conditionally advertises the matching client capability.
DaemonAttachResult.client.capabilities contains the daemon-established attach-side set, but the public connection does not expose it.
DaemonAgentConnection.supportsCorrelatedPromptLifecycle() currently delegates to the server offer.
- Pylon computes
correlatedPromptLifecycleAvailable from the same offer before attach.
A server offer is not a negotiated intersection. Method presence, package version, ignored options, or a successful attach without validating its returned client capability are not substitutes.
Proposed contract
- Add frozen public-root
PRIME_AGENT_SDK_FEATURES token negotiated_daemon_session_capabilities_v1.
- Add public
DaemonAgentConnection.supportsNegotiatedCapability(capability: DaemonClientCapability): boolean.
- Return
true only after the current attached generation has:
- the matching validated server offer;
- the capability in the exact attach/reattach request; and
- the same capability in the validated
DaemonAttachResult.client.capabilities for this connection/client/generation.
- Return
false before attach, during invalidation/replacement, after dispose, and after any failed or ambiguous reattach until the new generation is proved.
- Reject malformed, duplicate-conflicting, unsupported, wrong-client, or wrong-generation attach capability data rather than treating it as proof.
- Keep
supportsCorrelatedPromptLifecycle() as server-offer evidence because the SDK currently uses it before attach to construct the advertised capability list. Document that it is not a negotiated proof; consumers must use the new accessor after attach. Do not make the pre-attach method false or negotiation would never start.
- Commit the negotiated set only after attach identity and snapshot validation succeeds, not merely when the raw attach response arrives.
- Return a boolean only. Do not expose client IDs, session IDs, paths, raw attach results, or mutable capability collections.
The exact public name is proposed for review. If a different generic accessor is chosen, it must preserve these semantics and the frozen feature token.
Compatibility
- Protocol v7 foundation behavior stays compatible.
- Stock Prime and older fork artifacts omit the new SDK token/accessor and remain detectable before prompt construction.
- Existing attach capability lists and server offers do not become mandatory globally.
- Pylon must enable correlated lifecycle only from the post-attach proof. Its ordinary-prompt fallback may remain Pylon-local.
- Comet will fail its prompt feature gate and cleanly close the fresh owned session when proof is unavailable. It will not fall back to an uncorrelated prompt.
Deterministic tests
- token exported and public root frozen;
- offer without attach request/response proof => false;
- method/options presence without token => incompatible consumer gate;
- attach request plus missing/invalid/wrong-client response capability => fail/false;
- exact offer + advertised + echoed capability after successful attach => true;
- attach failure/cancellation, dispose, replacement, reattach failure, and stale old-generation result => false;
- reattach can re-establish proof only for the new exact generation;
- concurrent event-before-attach-response cannot use correlated behavior early;
- stock/current compatibility matrix;
- no native client/session identity appears in public errors or logs.
Upstream overlap decision
Current upstream/main@a903d4b6768f484bd6d459b7b0aa7dee38e461e2 has no correlated prompt lifecycle or negotiated-capability accessor. Decision: retain this small fork-boundary proof and record the evidence in .pylon/features.yaml and .pylon/upstream-review.md.
Merge bar
Update the fork ownership ledgers, run exact stock/current compatibility tests, build a reproducibly hashed artifact, and review the Prime/Pylon/Comet consumer assumptions together. No consumer may infer this proof from versions, method presence, server offers, or attach success alone.
Purpose
Expose a public, generation-scoped proof of attach-negotiated daemon client capabilities. This is required before Comet can use
correlated_prompt_lifecycle_v1, and it should repair Pylon's current server-offer shortcut at the same shared SDK seam.Coordination:
Current gap at
7238ac8cff25962ada9ffe4530b7d4d1cddc1b47DaemonClient.supportsServerCapability("correlated_prompt_lifecycle_v1")proves only thedaemon_hellooffer.DaemonAgentConnection.attach()conditionally advertises the matching client capability.DaemonAttachResult.client.capabilitiescontains the daemon-established attach-side set, but the public connection does not expose it.DaemonAgentConnection.supportsCorrelatedPromptLifecycle()currently delegates to the server offer.correlatedPromptLifecycleAvailablefrom the same offer before attach.A server offer is not a negotiated intersection. Method presence, package version, ignored options, or a successful attach without validating its returned client capability are not substitutes.
Proposed contract
PRIME_AGENT_SDK_FEATUREStokennegotiated_daemon_session_capabilities_v1.DaemonAgentConnection.supportsNegotiatedCapability(capability: DaemonClientCapability): boolean.trueonly after the current attached generation has:DaemonAttachResult.client.capabilitiesfor this connection/client/generation.falsebefore attach, during invalidation/replacement, after dispose, and after any failed or ambiguous reattach until the new generation is proved.supportsCorrelatedPromptLifecycle()as server-offer evidence because the SDK currently uses it before attach to construct the advertised capability list. Document that it is not a negotiated proof; consumers must use the new accessor after attach. Do not make the pre-attach method false or negotiation would never start.The exact public name is proposed for review. If a different generic accessor is chosen, it must preserve these semantics and the frozen feature token.
Compatibility
Deterministic tests
Upstream overlap decision
Current
upstream/main@a903d4b6768f484bd6d459b7b0aa7dee38e461e2has no correlated prompt lifecycle or negotiated-capability accessor. Decision: retain this small fork-boundary proof and record the evidence in.pylon/features.yamland.pylon/upstream-review.md.Merge bar
Update the fork ownership ledgers, run exact stock/current compatibility tests, build a reproducibly hashed artifact, and review the Prime/Pylon/Comet consumer assumptions together. No consumer may infer this proof from versions, method presence, server offers, or attach success alone.