-
Notifications
You must be signed in to change notification settings - Fork 0
SDK foundation: stable schema, compatibility policy, and transport #163
Copy link
Copy link
Closed
Labels
area:cliCLI parser, help, capabilitiesCLI parser, help, capabilitiesarea:core-protocolHeadlessProtocol: wire protocol, validation, transportHeadlessProtocol: wire protocol, validation, transportarea:mcpstdio MCP server and harness integrationstdio MCP server and harness integrationpriority:mediumScheduled, not blockingScheduled, not blockingstatus:needs-designRequires an architecture-decision entry firstRequires an architecture-decision entry firsttype:featureNew capability or commandNew capability or command
Description
Activity
Metadata
Metadata
Assignees
Labels
area:cliCLI parser, help, capabilitiesCLI parser, help, capabilitiesarea:core-protocolHeadlessProtocol: wire protocol, validation, transportHeadlessProtocol: wire protocol, validation, transportarea:mcpstdio MCP server and harness integrationstdio MCP server and harness integrationpriority:mediumScheduled, not blockingScheduled, not blockingstatus:needs-designRequires an architecture-decision entry firstRequires an architecture-decision entry firsttype:featureNew capability or commandNew capability or command
Problem
The npm package installs and launches Headless but is not a client SDK. Internal Swift and Rust protocol code does not provide a stable contract for products embedding Headless. Handwritten SDKs would drift from CLI validation and response types.
Proposed contract
Define one machine-readable command and response schema from the existing protocol validators. Generated or schema-validated clients should provide lifecycle management, sessions, typed commands and errors, capability negotiation, timeouts, cancellation, and compatibility checks.
SDKs should launch or connect through the existing local CLI, stdio, or private Unix-socket architecture. They must not introduce TCP, remote control, arbitrary JavaScript, or a second independently evolving protocol.
Security requirements
Page-derived data remains marked untrusted. Unknown fields fail closed. Sensitive diagnostics retain both gates. Credential APIs accept aliases or challenge references, never raw password fields. Transport ownership and socket permissions remain host enforced.
Acceptance criteria