You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose Coven Automations through a constrained, typed SDK that consumes canonical versioned artifacts, observes one Coven-owned truth, verifies receipts independently, handles replay/reconnect deterministically, and never infers authority from client state.
Ship read/verify/subscribe support before broad mutation. Authority-bearing commands may graduate only after the core protocol and authority profiles are stable and the SDK passes immutable cross-repository conformance.
Canonical boundary
The SDK owns:
generated/pinned public types;
transport-neutral client ergonomics;
typed command, query, event, and error handling;
reconnect/cursor/replay behavior;
independent receipt and binding verification helpers;
compatibility negotiation and client-side validation that does not replace server validation.
The SDK must not own:
automation persistence, scheduling, occurrence planning, run transitions, or leases;
familiar identity or authority decisions;
client-authored approval, success, running, or health state;
direct SQLite/Coven-home access;
silent fallback to Cave routes, Codex files, or direct runtime execution.
Phased public surface
Phase 1 — read, verify, subscribe
Publish stable APIs for:
client.automations.capabilities()client.automations.list(options?)client.automations.get(automationId)client.automations.health(automationId)client.automations.occurrences(automationId,options?)client.automations.runs(automationId,options?)client.automations.getRun(runId)client.automations.getReceipt(receiptId)client.automations.verifyReceipt(receipt,trustContext)client.automations.subscribe({ after, filters, signal })
Requirements:
types are generated from or mechanically checked against coven.automations.v1 artifacts;
pagination and cursors are explicit;
subscriptions tolerate duplicate delivery and reconnect using canonical event IDs/sequences;
stale/degraded/unavailable states remain explicit;
unknown enum/variant behavior follows capability negotiation rather than unsafe coercion;
Generated files must declare provenance, source artifact revision/digest, and regeneration command. Hand-authored ergonomic wrappers stay separate from generated contract types.
Error model
Expose typed errors/results for at least:
invalid request/schema;
unauthenticated/unauthorized;
approval required/rejected/expired/revoked;
revision conflict;
adoption conflict/duplicate;
unsupported capability/profile/variant;
not found/tombstoned;
stale identity/authority/runtime descriptor;
daemon unavailable/degraded;
rate/backpressure limit;
cancellation requested/acknowledged;
timeout;
recovery required/ambiguous outcome;
receipt invalid/unverifiable;
cursor expired/replay required.
Transport, command-adoption, domain, and verification failures must be distinguishable.
Subscription/replay contract
maintain one consumer cursor per explicit subscription context;
deduplicate by canonical event ID/stream sequence;
refuse state regression or impossible transition in local projections;
support reconnect from a retained cursor and explicit snapshot/reset when a cursor is expired;
expose event lag/staleness metadata;
never synthesize missing success events;
cancellation/abort stops the client stream without mutating the automation;
bounded buffers and backpressure prevent memory growth.
Provide a reference reducer for convenience, but document that it is a projection of Coven events, not an alternate authority.
Verification helpers
Provide deterministic helpers for:
contract/schema version support;
canonical definition/event/receipt digests;
familiar embodiment binding verification using pinned Familiar Contract artifacts;
Threads decision/approval evidence verification using pinned profile artifacts;
receipt integrity/authentication and artifact/delivery digest checks;
privacy-aware disclosure of why verification is degraded or impossible.
Trust roots and verification policy must be caller-configured or obtained through an authenticated Coven profile; do not embed environment-specific secrets.
Security and ergonomics
never accept raw bearer tokens/credentials inside automation definition objects;
redact secrets and sensitive prompts/paths from errors/logs;
validate size/count bounds before transport;
use abort signals and explicit timeouts;
default create/import helpers to paused/draft;
require explicit activation and risk/capability intent;
make potentially destructive or external commands visually/API-distinct;
provide safe builders for schedule/action/policy objects without hiding normative fields;
avoid methods named success, approve, or retry that can be mistaken for local state mutation.
Compatibility
publish a machine-readable supported-contract matrix;
pin exact producer artifact revisions in tests/releases;
unknown additive fields are preserved or ignored only according to the core contract;
Hiding recovery-required or degraded states behind automatic retries.
Bead packet
Create one P1 SDK Bead mapped exactly to this issue. Phase 1 depends on OpenCoven/coven#855 and blocks interoperability certification. Authority-bearing phases depend on OpenCoven/coven#857 and #858. Evidence must include generated artifact provenance, package tests, replay/verification vectors, exact cross-repository pins, and supported-contract matrix.
Cross-repository program: OpenCoven/coven#854
Core protocol: OpenCoven/coven#855
Authority integration: OpenCoven/coven#857
Certification: OpenCoven/coven#858
Outcome
Expose Coven Automations through a constrained, typed SDK that consumes canonical versioned artifacts, observes one Coven-owned truth, verifies receipts independently, handles replay/reconnect deterministically, and never infers authority from client state.
Ship read/verify/subscribe support before broad mutation. Authority-bearing commands may graduate only after the core protocol and authority profiles are stable and the SDK passes immutable cross-repository conformance.
Canonical boundary
The SDK owns:
The SDK must not own:
Phased public surface
Phase 1 — read, verify, subscribe
Publish stable APIs for:
Requirements:
coven.automations.v1artifacts;Phase 2 — low-risk lifecycle commands
After #855 adoption/idempotency semantics are certified:
Every mutating command requires:
A timeout after adoption must not invite blind retry with a new key; expose a lookup/reconcile path.
Phase 3 — run, cancel, retry, approval
Graduate only after #857 and #858 pass:
Rules:
Type and module layout
Suggested shape, adapted to the SDK’s actual language/package structure:
Generated files must declare provenance, source artifact revision/digest, and regeneration command. Hand-authored ergonomic wrappers stay separate from generated contract types.
Error model
Expose typed errors/results for at least:
Transport, command-adoption, domain, and verification failures must be distinguishable.
Subscription/replay contract
Provide a reference reducer for convenience, but document that it is a projection of Coven events, not an alternate authority.
Verification helpers
Provide deterministic helpers for:
Trust roots and verification policy must be caller-configured or obtained through an authenticated Coven profile; do not embed environment-specific secrets.
Security and ergonomics
success,approve, orretrythat can be mistaken for local state mutation.Compatibility
Verification
Integrate with:
Acceptance criteria
coven.automations.v1artifacts.Non-goals
Bead packet
Create one P1 SDK Bead mapped exactly to this issue. Phase 1 depends on OpenCoven/coven#855 and blocks interoperability certification. Authority-bearing phases depend on OpenCoven/coven#857 and #858. Evidence must include generated artifact provenance, package tests, replay/verification vectors, exact cross-repository pins, and supported-contract matrix.