Skip to content

SDK foundation: stable schema, compatibility policy, and transport #163

Description

@SarthakWade

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

  • An architecture decision defines schema ownership, generation strategy, supported transports, and semantic-version policy.
  • Compatibility behavior is specified for older client, older host, missing capability, and protocol mismatch.
  • Golden fixtures verify parity among CLI parsing, protocol validation, MCP, and generated types.
  • Cancellation and timeout behavior cannot leave orphaned hosts or half-completed state.
  • Release, deprecation, support-window, provenance, and security-reporting policies are documented.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:cliCLI parser, help, capabilitiesarea:core-protocolHeadlessProtocol: wire protocol, validation, transportarea:mcpstdio MCP server and harness integrationpriority:mediumScheduled, not blockingstatus:needs-designRequires an architecture-decision entry firsttype:featureNew capability or command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions