Repository navigation
feat: expose installed agents and fresh session preparation - #596
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 16, 2026, 3:14 AM ET / 07:14 UTC (Revision 3). ClawSweeper reviewWhat this changesAdds installed-agent inspection for embedding applications, native model display names, and an explicit fresh-session operation that survives restart. Merge readiness⛔ Blocked before merge - 3 items remain The PR provides distinct functionality absent from main, with credible installed-adapter upgrade and restart evidence. No blocking code defect was found; acceptance of the added public API remains a maintainer product decision. Priority: P2 Review scores
Verification
How this fits togetheracpx’s registry supplies agent launch commands to its embedded runtime, which owns ACP connections and persistent session records. This change lets embedding applications inspect installations and model labels, then explicitly request a new conversation through the existing lifecycle. flowchart TD
A[Embedding application] --> B[Agent registry]
C[Installed commands and packages] --> B
B --> D[Installed launch or missing requirements]
A --> E[ACP session runtime]
E --> F[Model labels and session status]
E --> G[Persistent fresh-session marker]
G --> H[Next ensure creates new conversation]
Decision needed
Why: The implementation fits the backend vision and preserves compatibility, but repository policy calls for deliberate acceptance of lasting API conventions. Before merge
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one registry and lifecycle owner, with maintainer-approved additive APIs that preserve existing launches, stored sessions, and ordinary close/resume behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature proposal; the supplied installed-adapter trace demonstrates the requested lifecycle and metadata behavior. Is this the best way to solve the issue? Yes technically: extending the existing registry and close lifecycle avoids competing implementations, while optional metadata preserves older records and consumers. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against d0137d66dbac. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
d5f617c to
bf59cf7
Compare
bf59cf7 to
29534d7
Compare
|
Accepted at Inspection is filesystem-only. Fresh preparation records local reset intent, and the next ensure starts a new conversation. Ordinary close stays resumable; explicit remote discard retains its required protocol support. |
|
Landed as
|
What Problem This Solves
Embedding hosts need installed agent launch details, native model names, and durable fresh-session preparation to offer locally installed ACP agents.
User Impact
Hosts can inspect local launch commands through
acpx/agent-registry, display native model labels, and prepare a fresh session that survives a host restart. Inspection performs filesystem lookup only. Agent authentication and model discovery still happen during session acquisition.Why This Change Was Made
The existing agent registry owns launch inspection and retains its runtime export, command resolution, overrides, and
resolve/listcompatibility. Session status optionally exposes{ modelId, name }entries while preserving opaque model IDs.prepareFreshSession({ handle })uses the existing local close lifecycle and persisted reset marker. The next ensure creates a fresh session whenresumeSessionIdis omitted. Ordinary close stays resumable, and explicit remote discard retains itssession/closerequirement.Evidence
29534d785c21da9c234638c6ab8a299a726bbccb:pnpm run checkpassed 1,159 tests with 2 skipped; the declared coverage suite passed all 166 tests and all coverage gates.pnpm run check:docsand the seven changed guide/skill Markdown checks: passed.resolve/list-only registry.Installed-adapter upgrade and restart evidence
Recorded with installed OpenCode 1.18.31 on macOS, published npm acpx 0.15.1, and source revision bf59cf7. OpenCode used a loopback model fixture and dummy credentials. This exercises the installed adapter; it does not qualify a real account or provider.
The published runtime opened a catalog-discovery session, closed it, and created the traced persistent session with the second advertised model. Each subsequent phase used a new Node process:
published: ensure, prompt, ordinary close.candidate-resume: ensure the same key, prompt, ordinary close.candidate-restart: ensure again, read saved labels, prompt, thenprepareFreshSession({ handle }).candidate-fresh: ensure the same key withoutresumeSessionId, then prompt. Fresh creation explicitly requests the same model; persistent reuse ignores creation-time session options.This sanitized trace combines recorded runtime status and conversation messages forwarded to the local endpoint. Generated native session IDs are represented consistently as A and B. Native system prompts are omitted.
The resumed requests contain the earlier fixture conversation. The fresh request contains only the new fixture message after reset intent survives process restart. The archived mock returned the literal text
fixture title; this is session, routing, and metadata proof, without a semantic-recall claim. All native ACP children exited after each phase.Production scope: 232 net lines
src/agent-registry.tssrc/spawn-command-options.tssrc/runtime.tssrc/runtime/engine/manager.tssrc/runtime/engine/status.tssrc/runtime/public/contract.tssrc/session/model-state.tssrc/session/conversation-model.tssrc/session/persistence/parse.tssrc/persisted-key-policy.tssrc/types.ts