feat(agent-spec): add explicit start/resume launch methods - #157
feat(agent-spec): add explicit start/resume launch methods#157schickling-assistant wants to merge 3 commits into
Conversation
agent-tool: Codex agent-tool-version: 0.145.0 agent-runtime: Codex 0.145.0 agent-session-lookup: unavailable tooling-profile: dotfiles@unknown-dirty
agent-tool: Codex agent-tool-version: 0.145.0 agent-runtime: Codex 0.145.0 agent-session-lookup: unavailable tooling-profile: dotfiles@unknown-dirty
agent-tool: Codex agent-tool-version: 0.145.0 agent-runtime: Codex 0.145.0 agent-session-lookup: unavailable tooling-profile: dotfiles@unknown-dirty
|
Closing this draft as superseded by the renderer-first ownership decision consolidated in #124. The implementation and its tests remain useful evidence: they prove that distinct fresh/resume payloads can be validated and selected without parsing provider transcripts. The API boundary is the part being superseded. Core Agent Spec and the Follow-up work is now separated as:
The branch and verification record are intentionally retained. No claim is made that the experiments or implementation were invalid; only that the proposed core API no longer matches the agreed ownership boundary. |
Problem
Agent Spec currently gives a compact agent one launch payload, so fresh-start and exact-resume intent are encoded inside provider-specific argv. That prevents st2 from validating a closed lifecycle selection policy while keeping provider details outside core.
Goal
Implement the concrete
start/resume/launchproposal requested from #124, while preserving legacy top-levelcommand/argvbehavior. This PR is a proposal implementation, not a claim that the broader session-store, ownership, or provider boundary in #124 is ratified.Decisions
startorresumemethod owns one complete, non-empty argv.resumemay preserve one optional opaque exact provider-native session ID.on-unavailablefallback, or refuses the agent.agent-specmodel, while only the selected argv lowers to exactly one generatedpty "agent"successor.pty "agent".Verification
cargo test -q --offline --workspace --lib --bins --test discovery --test codex_hooks --test hooks --test validate --test up_once_exit -- --test-threads=1cargo test --offline -p st2 --test run up_once_ -- --test-threads=1— 12/12 passed.cargo clippy --offline -p agent-spec --all-targets -- -D warnings— passed.start-programversusresume-program), then the unmodified implementation passed.add6139and its exact binary:Complexity
The change adds parser/raw/public model types, selection lowering, validation diagnostics, tests, and VRS/README documentation. It adds no dependency and no provider-specific runtime logic. The one-shot exit correction adds one typed
UpReportsignal so declaration errors are not conflated with execution errors.Concerns
/usr/bin/gitand/bin/sleep, one retired-name scan matches the pre-existing phrase “st2 removes”, and one unchanged live-PTY targeted-reconcile test reproducibly reports an unexpected restart. None was changed or skipped in the focused/official gate above.clippy -D warningsare also not clean baselines; relevantagent-specClippy and diff checks pass.Friction & bottlenecks
kdl6.7.1 requires Rust 1.95. Verification used an already available Rust 1.97 toolchain; no dependency or flake change is included.Follow-ups
Session stores, receipts, cross-host fencing, ownership transfer, and portable logical session identity remain outside this proposal and belong to the broader work tracked by #124 and #145.
References
References #124.