Skip to content

feat: define experimental runtime protocol - #186

Merged
oratis merged 10 commits into
mainfrom
codex/protocol-runtime
Aug 2, 2026
Merged

feat: define experimental runtime protocol#186
oratis merged 10 commits into
mainfrom
codex/protocol-runtime

Conversation

@oratis

@oratis oratis commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a dependency-free, transport-neutral lifecycle protocol package
  • persist threads, turns, and completed items while keeping streaming deltas transient
  • enforce one active turn and idempotent terminal transitions
  • document version negotiation and record/replay semantics

Validation

  • pnpm typecheck
  • pnpm lint (0 errors, 3 pre-existing warnings)
  • pnpm test (925 passed, 12 skipped)
  • pnpm build
  • pnpm docs:check

Stack

Depends on #185.

@oratis
oratis changed the base branch from codex/session-writer to main August 2, 2026 06:36
@oratis
oratis marked this pull request as ready for review August 2, 2026 06:39
@oratis

oratis commented Aug 2, 2026

Copy link
Copy Markdown
Owner Author

Review: approved ✅

+621/-0, new isolated package, zero changes to existing code paths — about as low-risk as a foundational PR gets.

What I checked

  • Dependency-free and transport-neutral. @deepcode/protocol pulls nothing in, which is what lets it be imported by the renderer, the VS Code extension host, the LSP process, and the app-server without dragging Node or provider code into browser bundles. That constraint is load-bearing for feat: move desktop runtime behind app server #192's "no provider code in the renderer" goal — please keep it dependency-free.
  • Persist completed items, keep streaming deltas transient. Right call: replaying a thread should reconstruct meaning, not re-simulate typing. It also bounds durable storage growth, which token-by-token persistence would not.
  • One active turn + idempotent terminal transitions, enforced in the protocol layer rather than by convention in each client. Idempotent terminals in particular mean a duplicate interrupt or a reconnect racing a completion can't corrupt thread state.
  • 161 lines of tests for 217 lines of state machine, covering the transition rules rather than just the happy path.

Version negotiation and record/replay semantics being documented up front (docs/design/runtime-protocol-v1.md) is what will make the later capability-gated additions (#190, #197, #203, #205) additive rather than breaking.

Validation: CI green; protocol package 24 tests pass locally at the stack tip.

@oratis
oratis merged commit 403cdfa into main Aug 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant