Skip to content

docs(design): capabilities - #103

Merged
xxchan merged 2 commits into
mainfrom
docs/capabilities-design
Oct 3, 2026
Merged

xxchan merged 2 commits into
mainfrom
docs/capabilities-design

Conversation

@xxchan

@xxchan xxchan commented Oct 3, 2026

Copy link
Copy Markdown
Member

A design page for how hosts learn what a runtime can do, per the #core discussion (thread 0aafd2d3):

  1. A whole operation is an optional member; presence is the capability (accountUsage, listModels, checkUpdate, upgrade, and newly Session.steer / queue).
  2. An option a runtime cannot honor makes session() reject with a typed UnsupportedOptionError (runtime, option, reason), never a session that drops it.
  3. A declaration (Runtime.refusedSessionOptions, Session.capabilities) only where a host must decide before acting, read by the same single check that refuses.

Also: docs chain to the capability like OpenDAL's option docs; shared tests skip by capability, not runtime name; what it refuses (one struct for everything, static declarations of handshake facts, mandatory ask-before-try). Evidence: OpenDAL main 95f7c8b sources and RFCs 2852/7700, rowrow, kimi.

Implementation follows in a separate PR (breaking, 0.17.0). Docs only.

🤖 Generated with Claude Code

exe.dev user and others added 2 commits October 3, 2026 14:01
How a host learns what a runtime picked at run time can do: a whole
operation is a member that may be absent; an option is refused with a typed
error, never dropped; a declaration only where a host must decide before
acting, read by the same check that refuses. Modeled on OpenDAL's
capability struct and correctness check, minus the operations TypeScript
can express as optional members. Asked for by xxchan in #core.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit 2a7cbac into main Oct 3, 2026
12 checks passed
@xxchan
xxchan deleted the docs/capabilities-design branch October 3, 2026 14:49
xxchan pushed a commit that referenced this pull request Oct 3, 2026
…ped UnsupportedOptionError

Implements docs/design/capabilities.md (#103).

- UnsupportedOptionError (option, message), exported from the root:
  refuseSessionOptions (cursor, kimi, antigravity) and kimi's refusal of
  a resume in another directory (option "cwd") throw it.
- Session.steer and AdapterSession.steer are optional; presence is the
  capability. SessionCapabilities loses steer, and queue is always
  { durable }. ACP sessions expose steer only when the profile has steer
  params (grok); kimi and antigravity sessions have none.
- sealSession seals steer only where the adapter has it; steerOrQueue and
  deliver queue directly without it. The queue-null branches are gone.
- cursor: a run without run.steer refuses the steer runtime_refused;
  images on a steer stay unsupported.
- Subagent send(..., "steer") is rejected unsupported when the child's
  session has no steer.
- sea-trial steer cases and the live-contract steer scenario skip on a
  session without steer; kill-runtime skips on a bundled installation,
  not on runtime names.
- Docs: each refusable SessionOptions field names its refusing runtimes
  and the typed error, pointing at refusedSessionOptions and the runtime
  matrix table; runtime pages say the session has no steer.

BREAKING CHANGE: SessionCapabilities.steer is removed and
capabilities.queue is never null; Session.steer may be undefined; a
refused session option rejects with UnsupportedOptionError.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
xxchan added a commit that referenced this pull request Oct 3, 2026
…ped UnsupportedOptionError (#108)

Implements docs/design/capabilities.md (#103).

**Breaking (0.17.0):**
- `Session.steer` is optional: a session that cannot steer (kimi,
antigravity) has no `steer`; `SessionCapabilities.steer` is gone. Hosts
show a steer control only where `session.steer` exists; `steerOrQueue`
and `deliver` queue without it.
- `SessionCapabilities.queue` is always `{ durable }` (every runtime
holds input at least in the adapter); the null case and its branches are
gone.
- An option a runtime refuses at open now rejects with
`UnsupportedOptionError` (`option` names it, message is the reason):
cursor, kimi, antigravity declared refusals, and kimi's resume in
another directory (`option: "cwd"`).
- `RejectionCode "unsupported"` now means "this control with these
inputs" (images on a cursor steer); a control the runtime cannot do at
all is an absent member.

**Also:** `SessionOptions` and each refusable field document the refusal
and link the table (OpenDAL-style chain); spec and runtime pages
updated; shared tests skip by capability (`session.steer === undefined`,
`installation.via === "bundled"` for the kill case), not by runtime
name.

**Checks:** typecheck, lint, full vitest (566 passed), sea-trial on mock
and the three aimock backends. Live: `live-contract --only
basic,steer,queue,busy-and-late-control` on kimi (steer skipped: no
steer), claude and cursor, all pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: exe.dev user <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@xxchan xxchan mentioned this pull request Oct 3, 2026
xxchan added a commit that referenced this pull request Oct 3, 2026
Minor release with breaking changes, version bump only:
- #108: `Session.steer` is optional (absent on kimi and antigravity);
`SessionCapabilities.steer` removed; `capabilities.queue` is always `{
durable }`; refused session options reject with a typed
`UnsupportedOptionError` (cursor, kimi, antigravity; kimi's resume in
another directory).
- #103: docs/design/capabilities.md.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: exe.dev user <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
stamp-build Bot added a commit that referenced this pull request Oct 30, 2026
<!-- stamp:review:v1 -->
<sup><img
src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp"
width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_233eea9b5b9cd4ef1694b6d2cf98eebc"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

The first three-platform sharing run failed on equivalent path spellings
and malformed Windows fixture commands, and skipped resource collection
after observation failures. Normalize both cwd paths while retaining
their raw values, use PowerShell's call operator for
Antigravity/OpenCode, and target Qoder's identified daemon root for
crash injection instead of a transient first child.

Record native request/condition waits, setup failures, and Qoder
fault-to-exit/turn-settlement times. Increase only the manual Windows
probe budgets. Collect resources after successful installation even when
observations fail, preserving both failures and artifacts. Runtime
defaults, child attribution rules and sharing admission remain
unchanged.

Validation: all six pinned native observation programs passed locally on
Linux with synthetic configuration and local model responses; both
active Qoder turns settled about 69 ms after the injected crash. Codex,
ACP/Kimi and Qoder resource programs passed two-session collection smoke
runs. Unit regressions cover filesystem aliases, wrong-directory
rejection and persisted setup-timeout evidence; the literal PowerShell
argument round trip requires Windows CI. The full local check passes.
Corrected Windows/macOS native evidence and ten-session resource
measurements still require the manual main-branch workflow, which Cindy
owns.

[First-run diagnosis and evidence
limits](https://github.com/botiverse/oar/blob/081d1663242cd73027cd3f82cada7abaa1f3a285/experiments/sharing/portability-2026-10-30.md).
Follow-up for tasks #102 and #103; Windows installation timeout risks
also recorded under task #97.

Co-authored-by: Otter <[email protected]>
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