feat(sdk): establish the canonical local protocol contract - #180
Merged
Conversation
This was referenced Sep 12, 2026
SarthakWade
added this pull request to stack #183
September 12, 2026 21:31
yashranaway
approved these changes
Sep 13, 2026
yashranaway
left a comment
Collaborator
There was a problem hiding this comment.
The Swift-owned schema, golden fixtures, and supervised start path match ADR 28 and the host hard rules.
headless schema stays a local CLI command. start --supervised refuses an already-running host, grants ownership only when the ping PID matches the child, and shuts the host down when the owner pipe closes. Transport is still the same-user Unix socket. Auth parameters are challenge/account only. Unknown request fields stay rejected.
Required CI is green, including Linux E2E and macOS E2E.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
Adds a deterministic Swift-owned SDK contract exposed by
headless schema, with typed command parameters, result metadata, command scope, transport timeout policy, local lifecycle errors, trust markings, compatibility policy, support policy, and checked-in golden schema and conformance fixtures.Adds supervised host ownership for SDK-launched processes. The canonical default is platform-neutral
headless start --supervised; macOS presentation is included only when callers explicitly request foreground or background behavior.Closes #163
Security and lifecycle
Verification
pnpm test: 65/65 protocol tests, secure terminal tests, and MCP integrationpnpm test:runtimepnpm test:npmStack
This is the base of the SDK stack. #181 depends on this PR, and #182 depends on #181.