Skip to content

feat(community): add the cybion runtime over its Agent API - #965

Merged
stamp-build[bot] merged 10 commits into
botiverse:mainfrom
zccz14:feat/cybion-runtime
Nov 19, 2026
Merged

stamp-build[bot] merged 10 commits into
botiverse:mainfrom
zccz14:feat/cybion-runtime

Conversation

@zccz14

@zccz14 zccz14 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Adds a community runtime for Cybion, an agent harness platform whose Thread is a server-side agent conversation: it keeps its own context, Manuals and notes, and runs its tools on the owner's registered devices (Workers) rather than in the host's process.

Cybion exposes a documented HTTP Agent API (/v1/threads, bearer API key), so a Thread is a runtime OAR can drive like any other — with the twist that the conversation lives on the server, so resume reattaches to a real conversation rather than a local process's state.

Mapping

OAR Cybion
Session.id, SessionOptions.resume The Thread id
SessionOptions.name / model / effort title / model / reasoning_effort at creation
prompt POST /v1/threads/{id}/inputs, then the turn is followed by polling status + history
queue / withdraw Held by the adapter; sent when the Thread idles
turn_ended The Thread's own status leaving running, after two quiet polls
text_delta / reasoning / tool_call_started / tool_call_ended One history record each (message, reasoning, function_call/custom_tool_call, tool_output)
usage The Thread's own totals, less what it carried when the session opened

Every history record becomes a frame carrying the record verbatim; the events are a projection over it. A record the mapping does not interpret still enters the stream with its own type and no events, per the record-stream contract.

What the surface lacks is refused, not faked

The same deployment's browser API has turn cancellation, Thread editing, model listing and account usage; its external_api router does not. So:

  • abort answers unsupported while a turn runs (no_active_turn when none does). POST /v1/threads/{id}/cancel on the Agent API is the change that would make it real.
  • A model or effort that differs from the stored one on resume is an UnsupportedOptionError, because no route changes either.
  • steer is absent (the API takes no mid-turn input) and queue is adapter-held, so a held input never becomes a second turn the status cannot tell from this one.
  • No listModels, accountUsage or inventories: defineRuntime already answers unsupported for undeclared inventories.
  • cwd is not transmitted (the Thread runs on its owner's Workers) and additionalDirectories is refused rather than ignored.

Scope notes

  • It is a community runtime: exported from @botiverse/oar/community, not in defaultRuntimes, and added by a host as createRuntimeRegistry([...defaultRuntimes.list(), createCybionRuntime({ baseUrl, apiKey })]). The deployment and its API key are constructor inputs, so the adapter holds no credential of its own.
  • docs/runtimes/cybion.md follows the runtime-page outline, with the native source it rests on (src/cloud.rs, the external_api router and the history_records kind constraint).
  • Tests are in tests/community/cybion/ and run with OAR_COMMUNITY_TESTS=1, as morph's do. They cover the projection and a whole session against a scripted deployment; no authenticated call has been made from this repository, so the live mapping is unverified here and the page says so.

pnpm --filter @botiverse/oar typecheck and oxlint --type-aware on the new files are clean.

Cybion is an agent harness platform: a Thread is a server-side agent
conversation that keeps its own context, Manuals and notes, and runs its
tools on the owner's Workers. Its Agent API (`/v1/threads`) is a documented
HTTP surface, so a Cybion Thread is a runtime OAR can drive like any other:
one session is one Thread, resumable from any process because Cybion keeps
the conversation.

- session: create (`POST /v1/threads`) or resume (`GET /v1/threads/{id}`);
  `prompt` posts an input, and the turn is followed by polling the Thread's
  status and append-only history.
- records: every history record becomes one frame carrying the record
  verbatim; the events read out of it (a `message` item, a `reasoning` item,
  a function call, its `tool_output`) are a projection. A record the mapping
  does not interpret still enters the stream with no events.
- usage: Cybion's own Thread totals, reported as the session's running total;
  `context_tokens` as context fullness.
- what the surface lacks is refused, not faked: no route cancels a turn, so
  `abort` answers `unsupported`; no route changes a Thread's model or effort,
  so a differing value on resume is an `UnsupportedOptionError`; `steer` is
  absent, and `queue` is held by the adapter.

Community runtimes are contributed outside the core team, so this one is
exported from `@botiverse/oar/community` and left out of `defaultRuntimes`;
its tests run under `OAR_COMMUNITY_TESTS=1` like morph's.
…handshake

The surface probe runs this repository's own adapter against a local server
speaking the Agent API shapes, so the client, the polled tracker and the
session lifecycle are exercised over a socket rather than a stubbed fetch.
With CYBION_BASE_URL set it also drives a real deployment: without a key it
records the refusal an unauthenticated caller gets, which is what the page's
evidence section now says was observed (401 Bearer token is required, 401
invalid user credential, /health 200) alongside what remains unverified.
@stamp-build

stamp-build Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks for the Cybion adapter. Its scope is right. A managed cloud runtime driven over its own API is the one case where OAR adapts a remote service as its client, and the community runtime path fits it. The packaging is right too:

  • @botiverse/oar/community only, no new dependency;
  • tests stay out of CI;
  • the key stays in the authorization header and never reaches frames or errors (we asserted that against a scripted deployment);
  • resume does not replay old records;
  • usage is baselined at open.

Typecheck, lint and the 11 cybion tests pass on 5f6cef1. Two problems need fixing before merge, and a few more should be fixed. We reproduced each of the first five with a stubbed fetch against a scripted deployment, with no network calls.

Blocking

1. A turn can end before the Thread starts it (tracker.ts follow, record, observe).

  • follow sets the cursor to record_idx - 1, so the input's own record is the first "new" record, and record() sets worked = true.
  • That disables the START_POLLS guard. The idle status left from the previous turn then counts as quiet polls.
  • If the Thread is still idle/ready for two polls after POST /inputs (for example while waiting for a Worker), the stream emits turn_started, user_message, usage, turn_ended: completed and the session goes idle. The real reply never arrives, and a following prompt is accepted while the Thread runs.
  • A leftover failed or stopped status gives a false failed or aborted outcome in the same way.
  • Fix: the input's own record should not count as work; only status: running or a record after the input should. If Cybion guarantees status: running by the time POST /inputs answers, cite where, and add a scripted case where it is still idle for a few polls.

2. Records between turns are skipped for good (follow: base = Math.max(seen, recordIdx - 1)).

  • Nothing polls between turns. When the next input jumps the cursor to record_idx - 1, every record between the last framed one and the input is never framed: a late output, a context or activity record, or the tail of a turn cut short.
  • The record-stream contract needs every native record in the stream, and your page says so too ("every history record newer than the ones this process already recorded").
  • Fix: keep the cursor at seen and frame those records (with no turn events, or with what they mean) before the new turn's.

Should fix

  1. Queued input runs without a turn the status shows (session.ts, held-input send on idle and queue on an idle session; tracker.ts follow).
    • The dispatch of a held input is not recorded as a request, so no turn_started is emitted and status() stays idle while the Thread runs.
    • prompt checks only that status, so it is accepted mid-turn. This is the double input the PR says it avoids.
    • A second follow() replaces the current turn without a turn_ended, so two inputs yield one turn_ended.
    • Record the dispatch as the spec's adapter-held queue records describe (docs/spec/record-stream.md, "Adapter-held queue records"), so it starts a turn, and make busy() cover it.
  2. A network blip becomes exited (lose()).
    • Eight failed reads (429, 5xx or network errors, about 9 s of backoff) record exited and reject every later control, though nothing exited and the Thread can still be resumed.
    • finish() then calls onIdle, which still posts the held input: a real model turn starts after OAR said the runtime exited, and its frames land after exited.
    • Prefer failing the turn as transport-unreachable and keeping the session usable, or, if you keep exited, clear held and stop recording.
  3. Frames after dispose. close() sets turn = null, but a step already in flight still records frames and can call finish. Check closed after each await. The delay timers in settle and the pump are ref'd, so they keep a host process alive up to 3 s; morph uses { ref: false }.
  4. A failed held-input send is lost silently (void send(...) in session.ts). An input that queue accepted and whose send then fails (4xx, 5xx, missing image) should produce input_dropped so the host gets it back.

Minor

  • display_status: "blocked" maps to failure: "limit_reached", but your page lists blocked as unresolved. Use unknown until Cybion says what it means.
  • Transport errors: every 4xx becomes runtime_refused without a failure class. 401 should carry the auth class, 429 the rate-limit class, and 404 on resume should be session_not_found.
  • Each poll fetches the whole history (every 250 ms to 2 s). If the API has an after or index parameter, use it; otherwise note the cost on the page.
  • The Thread reports its model and effort, but no model/effort event is emitted at open, and a model requested on create is not checked against what the Thread actually runs.
  • appendContext is exported but unused.
  • Add a "Known gaps" section to docs/runtimes/cybion.md like morph's: abort is unsupported until the Agent API has cancel, polling latency, and whatever of the above you leave open.

Before merge

Please run it once against a real deployment, after the fixes: one turn with a tool call, one queued input, and one resume. Record the date and Cybion version on the page. Nobody on our side has a Cybion account, and CI does not run community tests, so that run is the only live evidence the mapping will have.

CI does not run on fork PRs here. Once you push the fixes we'll run the full CI on our side and merge from there, keeping your authorship.

Written by Cindy, an AI agent maintaining OAR.


Cindy commented through Stamp · server open-agent-runtime · head when posted f03de94
View in Stamp →

One authenticated turn on a real Thread: the adapter created it, prompted it,
reported turn_started / user_message / text_delta / usage / turn_ended
completed, and read the Thread's own totals back. Its history held exactly the
kinds the mapping expects, including two activity records the projection
leaves uninterpreted. Names what the live run did not exercise.
…is a prompt

Review fixes for the cybion community runtime.

Blocking:

- A turn no longer ends before the Thread starts it. The input's own record used
  to count as work, which turned off the started-guard; now only the Thread
  reporting `running` or writing a record *after* the input counts, so a leftover
  idle/failed/stopped status cannot end a turn that has not begun. The guard
  before a never-started turn gives up after 60 polls, because Cybion answers
  `POST /inputs` with the record the input occupies, not with a settled status.
- Records written between two turns are framed instead of skipped: the cursor only
  moves forward and a new turn starts from it, rather than jumping past
  everything up to `record_idx`.

Should fix:

- A held input is dispatched as a prompt of its own, per the record-stream
  spec's adapter-held queue records: the queue request carries its `inputId`, the
  dispatch prompt is a new control identity with `carries` naming the held one,
  and `Session.prompt` treats a held input as busy so nothing overtakes it.
- A deployment that stops answering no longer records `exited`. One turn fails
  as transport-unreachable, nothing claims a process exited, the session stays
  usable, and a held input waits instead of starting an unwatched turn.
- Nothing is framed after release: each await is followed by a re-check, and the
  poll timer no longer holds a host process open (`{ ref: false }`).
- A held input the Thread refuses now lands as `input_dropped` on the dispatch
  request, so the host gets it back.

Minor: `blocked` reports `unknown` rather than a guessed limit; a refusal is
classified by its status (401/403 auth, 429 rate-limited, 5xx provider) and a
404 on resume is `SessionNotFoundError`; the Thread's own model and effort are
emitted at open and a substituted model on create fails the open; `appendContext`
is gone; the page gains a Known gaps section, the whole-history poll cost, and
the live run that exercised tools, a queued input and a resume against Cybion
0.6.108. Tests cover the idle-then-run turn, between-turn records, the
unreachable turn, queue dispatch and the dropped input.
@zccz14

zccz14 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks Cindy — both blocking issues were real, and reproducing them on our side matched your reading exactly. Everything is in 4d63b6e (on top of the f03de94 you reviewed). typecheck is clean, oxlint --type-aware on the new files is clean, and 16 community tests pass under OAR_COMMUNITY_TESTS=1 (5 of them new, one per fix below).

Blocking

1. A turn can end before the Thread starts it. Fixed as you suggested: the input's own record no longer counts as work. record() now only marks the turn as worked for records with an id past recordIdx, and observe() for a running status, so a leftover idle/ready/failed/stopped cannot end a turn that has not begun. On citing a guarantee: there isn't one to cite — POST /v1/threads/{id}/inputs answers {thread_id, record_idx, status} where status is the input's own queued state, not a settled Thread status, and a Thread may sit idle while it waits for its Worker. So the started-guard stays, and it now runs until 60 polls before giving up with failure: "unknown" ("Cybion recorded the input but the Thread never ran a turn") instead of failing a live turn early. New scripted case: cybion-turn.test.ts › does not end before the Thread runs, even though the input record is already there — idle for five polls, then running, then one turn_ended: completed.

2. Records between turns are skipped for good. Fixed: follow() no longer moves the cursor at all; it only records the id the input occupies as the point a turn must get past. record() frames every history record past seen, so a late output, an activity or a context record written between two turns is framed by the next turn's first poll, with no turn events, and nothing is framed twice. New case: cybion-turn.test.ts › frames records written between two turns instead of skipping them.

Should fix

3. Queued input runs without a turn the status shows. Held input now dispatches as the spec's adapter-held queue record: the queue request carries its inputId (generated when the caller gave none), the dispatch is a new prompt with its own control identity carrying carries: [heldInputId], and prompt() treats a held input as busy (occupied() = running turn or held input), so nothing overtakes it. Two things worth passing on: the kernel's invalidCarriedInput rejects a dispatch whose own inputId equals the carried one, so the held id must travel in carries only — and a queue request recorded without an inputId cannot be carried at all, which is why one is now always written. New case: cybion-queue.test.ts › is dispatched as a prompt of its own, so its turn is in the stream (three inputs → three turn_started, one per real turn, plus the rejected overtake, which the contract records too).

4. A network blip becomes exited. Fixed: nothing records exited any more. Eight consecutive failed reads fail one turn with failure: "unknown" and a reason saying the deployment stopped answering; no exit record is written, controls keep working (the Thread still exists), and onIdle is suppressed for that ending so a held input waits rather than starting a turn nobody is watching. New case: cybion-turn.test.ts › fails one turn when the deployment stops answering, without claiming a process exited (asserts no exited event and kernel.unreachable() === null).

5. Frames after dispose. Every await in step() is followed by an abandoned() re-check (closed, or the turn was replaced), and both timers use { ref: false } (delay(ms, undefined, { ref: false })), including the settle race.

6. A failed held-input send is lost silently. Fixed: a refused dispatch records input_dropped (reason: "runtime_refused", the Thread's message, the failure class) on the dispatch request before its rejection response, the way Cursor's send_rejected does. New case: cybion-queue.test.ts › is handed back as input_dropped when the Thread refuses it.

Minor

  • blocked now reports failure: "unknown", and the page lists it as unresolved rather than guessing limit_reached.
  • Refusals are classified by status: 401/403 → auth, 429 → rate_limited, 5xx → code: "error" with failure: "provider"; a 404 on resume is SessionNotFoundError.
  • The Thread's own model and effort are emitted at open (a thread/opened frame read from the Thread, not from the request), and a create whose Thread runs a different model than requested now fails the open instead of the first turn.
  • appendContext is gone.
  • The whole-history poll cost is on the page: /history takes no after/index parameter, so each poll reads everything a Thread holds — fine for tens of records, wasteful for thousands, and it costs the deployment bandwidth, never model tokens.
  • docs/runtimes/cybion.md gained a Known gaps section (no cancellation, poll-granularity text, whole-history polls, no replay on resume, no model/usage/inventory, inline images).

The live run you asked for

Run after these fixes, on the deployment our account uses — Cybion 0.6.108 (its version, from GET /api/config), 2026-11-18, Thread 01a1f066-4924-7d40-861d-83e5ca373ed6. All three are now recorded on the page with the observations below:

  • One turn with a tool call — turn_started, user_message, reasoning×2, tool_call_started×2, tool_call_ended×2, text_delta, turn_ended: completed, the text being the tool's own output. So reasoning, function_call and tool_output are live-verified now, not just read off the source.
  • One queued input — queued while a turn ran (status stayed running), then dispatched as its own prompt: three inputs produced three turn_started events and the queued text came back as its own turn's answer.
  • One resume — a fresh session on the same Thread reported the same id, model=deepseek-flash, effort=max (read from the Thread at open), and its prompt answered inside the same conversation.

Usage across those turns: {input: 78598, output: 647, cacheRead: 59392}.

One caveat worth knowing before merge: the Agent API has no route that deletes a Thread, so a probe leaves one in its owner's list. That is on the page too.

@stamp-build

stamp-build Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Thanks, that was quick, and the live run is exactly what the page needed. We re-reviewed 4d63b6e against the same scripted deployment (no network, no real key). Typecheck passes and the 16 cybion tests pass.

Seven of the nine findings are fixed:

  • the turn start;
  • records between turns;
  • the queued turn showing in status, with the dispatch and carries matching the spec's adapter-held queue records;
  • no exited;
  • the silent held send;
  • blocked;
  • the minor items.

Withdraw and dispose with a held input also behave correctly. Two new problems block merge, and a few smaller items remain.

Blocking

1. pnpm lint fails with 20 errors, all in experiments/cybion-agent-api-probe.ts: no-await-in-loop, type assertions, avoid-new and strict-void-return. experiments/ is in the lint path and the community ignore pattern does not cover it, so CI would fail. Please fix them; the other probes in experiments/ pass the same rules.

2. Concurrent prompts are no longer refused (session.ts, prompt: const busy = occupied()).

  • occupied() is tracker.busy() || held.length > 0, and tracker.busy() only turns true after the POST to /inputs returns. The draining flag is not counted at all.
  • Two prompt() calls in the same tick are both accepted: two POSTs and one turn_ended.
  • A prompt while a held input's dispatch POST is in flight is also accepted, so two turns run in the Thread at once.
  • The first version refused both, because it read the status fold, which records the request synchronously.
  • Fix: busy when the status fold says running, or occupied(), or draining. Also update the comment above it and the "Prompt, steer, queue" section of the page, which still say the status fold decides.

Should fix

  1. After the unreachable failure, a held input waits forever (finish(..., false) skips onIdle).
    • Nothing polls again, so only another queue, a withdraw or dispose wakes it.
    • Meanwhile status stays running (waiting_model) with no turn, so awaitIdle never resolves, prompt answers busy and abort answers no_active_turn.
    • Either retry the dispatch after the next successful read (a timer that reads the Thread until it answers), or hand the input back with input_dropped so the host can resend it.
  2. One frame after dispose remains. In step(), record(current, await readHistory(...)) frames history before the abandoned() check, so a history/input frame can still land after the dispose response. Check abandoned() between the await and record.
  3. input_dropped must come from what Cybion said. A transport error or an unreadable image is also recorded as reason: "runtime_refused". The contract allows input_dropped only on native evidence, and a failed write must not be reported as a refusal by the runtime. Keep runtime_refused for an HTTP answer from Cybion. For a send that never got an answer, reject the dispatch with the transport reason; for the image, reject it before sending.

Minor

  • A 404 on POST /inputs (Thread deleted mid-session) is still runtime_refused; it should be session_not_found.
  • When the created Thread runs a different model or effort, the open fails after the Thread exists, leaving it orphaned. Say so in Known gaps, since there is no delete route.
  • The start guard now waits about 111 s of wall time (60 polls with the backoff capped at 2 s). During that time status is running and abort answers unsupported, so a Thread that failed or blocked without writing a record is reported only after about 2 minutes. That is acceptable, but please note it in Known gaps with the number.
  • Add cybion to the community runtime paragraph in packages/oar/README.md, next to morph. That paragraph also says "The oar CLI includes them", which is not true for cybion: it needs a base URL and key, and packages/cli/src/runtimes.ts does not add it. Either say the CLI leaves it out, or add it there behind explicit environment variables.

Once 1 and 2 are fixed we'll run full CI on our side and take it from there. If you want to settle 3 to 5 in the same push, even better.

Written by Cindy, an AI agent maintaining OAR.


Cindy commented through Stamp · server open-agent-runtime · head when posted 4d63b6e
View in Stamp →

Second review round.

Blocking:

- `pnpm lint` on `experiments/cybion-agent-api-probe.ts` is clean now: the
  probe polls by recursion instead of awaiting inside a loop, reads JSON and the
  server address through narrowing instead of assertions, and returns from
  listeners in blocks, so all 20 findings are gone.
- Concurrent prompts are refused again. `busy` is read before the request is
  recorded and counts every source of work: the status fold (a prompt already
  accepted), the followed turn, input held for a later turn, and a dispatch
  whose POST is in flight. The tracker alone was too late — it learns of a turn
  only once `/inputs` answers — so two prompts in one tick were both accepted.

Should fix:

- Input held when a turn is given up as unreachable is handed back as
  `input_dropped` (`turn_interrupted`) instead of waiting behind a turn that
  ended, which left the status fold running with no turn to end it.
- Nothing is framed after a release: the history read is followed by the same
  `abandoned()` check before `record()`.
- `input_dropped` now comes only from an answer Cybion gave: a send that never
  reached it, or an image refused before sending, rejects the dispatch without
  claiming the runtime dropped an accepted input.

Minor: a 404 on `POST /inputs` is `session_not_found`; Known gaps names the
Thread a failed create leaves behind and the ~111 s a record-less turn takes to
be reported; `packages/oar/README.md` names cybion beside morph and no longer
claims the CLI includes every community runtime; the page's busy rules match the
code.

Local equivalents of CI: typecheck 0 errors, `oxlint --type-aware` 0 findings on
every path this PR touches, 16 cybion tests pass. Whole-tree `pnpm test` fails 11
tests in `tests/login/**` on this machine, and whole-tree `pnpm run lint` reports
type-aware findings in untouched files; both reproduce on the base commit here,
and neither mentions a file this PR changes.
@zccz14

zccz14 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Both blocking items are fixed in a34e8219, and I took 3–5 and the minors in the same push.

1. pnpm lint. experiments/cybion-agent-api-probe.ts is clean now — 20 findings to 0. The probe polls by recursion instead of awaiting inside a loop (no-await-in-loop, and it removes the new Promise executor findings with it), reads the JSON body and the server address through narrowing (parseJson/asRecord and an object check) instead of type assertions, and returns from listeners inside blocks (strict-void-return, no-confusing-void-expression). Verified with the same command the repo's lint script uses, on that file: oxlint --type-aware --deny-warnings experiments/cybion-agent-api-probe.ts → 0 warnings, 0 errors.

2. Concurrent prompts. You are right about the mechanism. busy is now read before the request is recorded and counts every source of work: the status fold (a prompt already accepted), the followed turn, held input, and draining. So two prompt() calls in one tick give one accepted and one busy, and a prompt during a held input's dispatch POST is refused while that dispatch also starts its turn. The comment above it and the page's "Prompt, steer, queue and cancel" section now say that instead of "the status fold decides".

3. Held input after the unreachable failure — taken the hand-back route rather than a retry timer: onGivenUp fires when a turn is given up, and every held input is recorded as input_dropped with reason: "turn_interrupted" and its inputId, then released. Nothing waits behind a turn that already ended, and the fold is not left running with no turn to end it.

4. The frame after dispose — step() now keeps the history in a variable, re-checks abandoned(), and only then frames it, so a history/input frame cannot land after the dispose response.

5. input_dropped only on native evidence — the frame is written only when the rejection carries Cybion's own answer (outcome.native !== undefined). A send that never reached it, and an image refused before sending, reject the dispatch with their own reason and write no input_dropped.

Minor — a 404 on POST /inputs is session_not_found; Known gaps now names the Thread a failed create leaves behind and the ~111 s (60 polls, backoff capped at 2 s) a record-less turn takes to be reported, with what that means for abort and prompt meanwhile; packages/oar/README.md names cybion beside morph and no longer claims the CLI includes every community runtime (it needs a base URL and key, and packages/cli/src/runtimes.ts does not add it).

Local equivalents of CI, run before pushing

  • pnpm --filter @botiverse/oar typecheck → 0 errors.
  • oxlint --type-aware --deny-warnings on every path this PR touches (packages/oar/src/community/cybion, experiments/cybion-agent-api-probe.ts) → 0 warnings, 0 errors.
  • OAR_COMMUNITY_TESTS=1 vitest run tests/community/cybion → 16 passed.
  • Whole-tree pnpm test: 11 failures, all in tests/login/** (codex/claude login), which is 8 failures in 5 files when I run tests/login alone on the base commit with this PR's changes stashed — so they are this machine's, not this PR's. Nothing in the output mentions a file this PR changes.
  • Whole-tree pnpm run lint: reports type-aware findings in untouched files here (packages/cli/src/*.ts among them) that pnpm run lint does not report on your side, so that run is not a usable signal on this machine; the per-path run above is, and it is clean.

Your full CI is the authority either way. If it disagrees with any of that, send me the output and I will fix it.

Abort was refused with `unsupported` because the Agent API's `/v1/threads`
router has no cancel. That conclusion was wrong about the deployment: the
`/api` router authenticates the same bearer credential, so an API key reaches
`POST /api/threads/{id}/cancel` — the route Cybion's own UI calls.

Checked against the deployment rather than the router source: `GET` on that
path answers 405 where `/v1/threads/{id}/cancel` answers `404 route not found`,
and cancelling a `running` Thread turned it into `idle`/`stopped` in one
answer. Through this adapter, a prompt whose tool call was sleeping: `running`
→ `abort` accepted → `turn_ended` `{kind: "aborted"}` 2.2 s later.

- `abort` now calls the route and reports what Cybion answered (404 is
  `session_not_found`, a refusal `runtime_refused`); the turn ends through the
  Thread's own `stopped` status, which the tracker already mapped to `aborted`.
- `endTurnProcessesOnAbort` stays refused: Cybion cancels a turn but exposes no
  per-turn control over the processes it started.
- The page drops its "No cancellation" gap, names the route in the native
  table, corrects the claim that an API key cannot reach `/api`, and records the
  observation.
@zccz14

zccz14 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Two corrections to what I told you earlier, both in 3458f6a.

abort is available, and my "no route cancels a turn" was wrong. I had read Cybion's router source and seen cancellation only on /api/threads/{id}/cancel, behind browser auth. That reading missed that the /api router authenticates the same bearer credential an API key carries, so POST /api/threads/{id}/cancel is reachable from the host. Checked against the deployment rather than the source: GET on that path answers 405 where /v1/threads/{id}/cancel answers 404 route not found, and cancelling a running Thread answered the stopped Thread (idle/stopped). Through this adapter, aborting a prompt whose tool call was sleeping: running → abort accepted → turn_ended {kind: "aborted"} 2.2 s later.

So abort now calls that route and reports what Cybion answered (404 → session_not_found, a refusal → runtime_refused); the turn itself ends through the Thread's own stopped status, which the tracker already mapped to aborted. endTurnProcessesOnAbort stays refused — Cybion cancels a turn but exposes no per-turn control over the processes it started. The page drops its "No cancellation" gap, names the route in the native table, corrects the /api claim, and records the observation; cybion-queue.test.ts gains a case for it and the old "abort is refused" case now asserts no_active_turn with nothing running.

That leaves steer and the model/usage routes as the real Agent API gaps, plus the two I owe on this side (a superseded input reported as input_dropped, and progressive text from the /response snapshot's unfinished items).

Cybion takes an input written while a turn runs by superseding the request
in flight: it cancels the Worker tool call or inference request, writes that
request's late output as an `activity` record, and re-enters its loop with
the new input, leaving the Thread `running` throughout. So the input lands in
the same turn, and that turn ends once.

The adapter now offers `Session.steer` on that route. It writes the input and
leaves the followed turn alone — `follow()` there would replace the turn
instead of continuing it. Only a turn that ended just before the write landed
leaves the input starting a turn of its own, which the tracker then follows.
A status read that predates an accepted steer no longer ends the turn, since
Cybion keeps the Thread running for the input it just took in.

`sessionCapabilities` advertises `steer: true`. Tests: a mid-turn input keeps
one `turn_started` and one `turn_ended` with both inputs as `user_message`s,
`no_active_turn` sends nothing, and a steer that lands during an idle status
read does not end the turn. Docs and the live probe carry the observation.
The live probe's baseline sat before the prompt, so the prompt's own
`turn_started` was reported as the steer's. Take both counts after the
prompt is running: a steer then shows ended+1 and started+0.
@zccz14

zccz14 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Correction: Cybion does steer, and this branch now offers Session.steer (5885feba, probe fix 23aae6dd)

I said earlier that Cybion had no mid-turn input because it supersedes a request that is running. That was wrong: the supersede is the steer. An input written while a turn runs cancels only the request in flight — the Worker tool call, the inference request — and the Thread stays running, so the next inference reads both messages in the same conversation. The input lands in the turn that runs, and that turn ends once.

Native evidence (src/cloud.rs, src/cloud/thread_controls.rs): enqueue persists the input record, sets status='running', cancels the previous request's watch channel and spawns a new process_request; the superseded one returns without touching the Thread's status (if cancellation.borrow() … { clear_current_request(…); return; }), and its late output is persisted as activity (append_response_output_items). finalize_request_success flips running → idle once, and only for the newest request.

Live, Cybion 0.6.108 at cybion.ntnl.io: a turn running bash sleep 45 took a second input mid-turn — steer accepted status=running, then ended+1 started+0 from the probe (one turn ended, none started), thread 01a1f0b7-e6e4-7b51-a1c9-e4e7383213bd. A curl run on thread 01a1f0b1-745a-7e33-8b87-516f8c936cfd shows the history: input (the prompt), reasoning, the bash call, input (the steer), then one response_output message answering the steer; the status never returned to idle between the two inputs.

What the adapter does

  • steer writes to the same POST /v1/threads/{id}/inputs and does not call tracker.follow() — following would replace the turn instead of continuing it. Only a turn that ended just before the write landed leaves the input starting a turn of its own, which the tracker then follows.
  • The tracker keeps the turn's identity across a steer, and a status read that predates an accepted steer no longer ends the turn, because Cybion keeps the Thread running for the input it just took in.
  • sessionCapabilities now answers steer: true; with nothing running, steer is rejected no_active_turn and nothing is sent.

Two things the stream shows honestly (both under Known gaps): a tool call cancelled by a steer gets no tool_output, so its tool_call_started stays open; and the input the steer superseded is not dropped — its own input record stays in the conversation.

Verification: tests/community/cybion/cybion-steer.test.ts — one turn_started and one turn_ended with both inputs as user_messages, no_active_turn sends nothing, and a steer landing while a status read already says idle does not end the turn. OAR_COMMUNITY_TESTS=1 pnpm vitest run tests/community/cybion → 20 passed. oxlint --type-aware --deny-warnings on the changed paths → 0 errors; pnpm --filter @botiverse/oar typecheck → clean.

@stamp-build

stamp-build Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Re-reviewed at 23aae6d. Every round-2 item is fixed:

  • Full pnpm lint passes.
  • Two prompts in one tick give one accepted and one busy, and a prompt during a dispatch is refused.
  • No frame lands after dispose.
  • input_dropped is written only when Cybion answered.
  • A 404 on POST /inputs is session_not_found.

pnpm vitest run tests outside community passes too, so steer: true breaks no registry or capability test. Abort and steer are welcome, and the tool call a steer leaves open is fine: the session view closes running root tools at turn end, so not inventing a tool_call_ended is right.

Two blocking problems, then smaller ones. We reproduced S1 to S4 against a scripted Thread, with no network calls and no real key.

Blocking

1. pnpm typecheck fails.

  • The error is at experiments/cybion-agent-api-probe.ts:206: first.steer is possibly undefined (TS2722, TS18048). Session.steer is optional, so narrow it first.
  • pnpm --filter @botiverse/oar typecheck does not cover experiments/. Please run the root pnpm typecheck and pnpm lint from a pnpm install --frozen-lockfile checkout; that is what CI runs. If pnpm run lint still reports findings in files you did not touch, your oxlint differs from the lockfile's.

2. A steer in the quiet window can end the turn before the steered run happens (tracker.ts, steer()).

  • steer() only moves after forward. It does not reset quiet or worked, and the steersBefore guard covers only a steer that lands during a step.
  • Scenario: the turn's work is done, the Thread reads idle once (one quiet poll counted), then a steer is accepted. If Cybion takes a poll or two to pick the input up, the next idle read ends the turn as completed. The reply to the steered input is never framed.
  • This is round 1's early-end problem coming back through steer.
  • Fix: an accepted steer resets the turn's quiet count, and the turn cannot end until the Thread has been seen running, or has recorded something, after the steer's record_idx.

Should fix

  1. A steer that lands after the turn ended starts a turn the status does not show.
    • When the turn is gone, steer() calls followTurn, but no request starts a turn. Status stays idle while the Thread runs, yet prompt answers busy because occupied() counts the tracker. The contract says a prompt sent while idle is never refused as busy.
    • awaitIdle returns early, and the stream gets a turn_ended with no turn_started.
    • By reading the code, it can also race the onIdle drain: if both POSTs land, the later follow replaces the earlier turn without a turn_ended.
    • Simplest fix: check occupied() before sending, and answer no_active_turn without sending when the turn has ended.
    • If the input reaches Cybion anyway because the turn ended during the POST, record it as an adapter-held dispatch, the same way you record a queued input, so it gets its own turn_started.
  2. An abort during the start guard is not seen for about 111 s.
    • observe() ignores display_status until the turn has worked.
    • If the cancel answers 2xx and the Thread goes idle/stopped without ever being seen running, status stays running. The turn then ends failed ("never ran") about two minutes later instead of aborted.
    • Treat stopped as the end of the turn whether or not it worked.

Minor

  • An abort that races the turn's end still answers accepted. Our repro: the cancel landed after turn_ended: completed. The contract says an abort whose turn ended first is no_active_turn. The cancel route takes no turn id, so a late cancel could also stop a held input dispatched at that finish. Check that the followed turn is still the one you are aborting before sending, and read the cancel answer's prior status if it has one.
  • The reason on a held input handed back after give-up. reason: "turn_interrupted" describes something the native side did. Here OAR gave up and Cybion never saw the input. Input-scoped waits also read turn_interrupted as aborted, though nobody aborted. Either keep the input held and resume the drain after the next successful read, or say in the reason that OAR stopped following and Cybion never received it. The input still goes back to the host either way.
  • Known gaps still says abort answers unsupported during the start guard; it now sends the cancel.
  • Please add the abort and steer live observations to the page's evidence list with the date and version, as you did for the first run. Our review rests on your reading of src/cloud.rs and those runs.

Written by Cindy, an AI agent maintaining OAR.


Cindy commented through Stamp · server open-agent-runtime · head when posted 23aae6d
View in Stamp →

Round-3 review fixes.

- A steer no longer ends a turn the Thread has not run yet: an accepted
  steer restarts the turn's quiet count, and the turn cannot end until the
  Thread is seen running or writing past the steer's record. A stay that
  never happens fails the turn after the start-guard budget with a reason
  that says so.
- A steer with no turn followed answers `no_active_turn` and writes
  nothing. When the turn ends while the write is already travelling, the
  turn Cybion started for that input is recorded as a prompt request
  (nothing is re-sent) and followed, so it has its own `turn_started`.
- A Thread the cancel stopped ends the turn as `aborted` at the next poll,
  even before it was ever seen running, instead of waiting out the start
  guard and reporting a turn that never ran.
- `abort` reads the cancel's answer: `stopped` means it stopped a running
  turn; anything else — or a turn that changed while the cancel travelled —
  answers `no_active_turn` and leaves the stream's own ending alone.
- The live probe narrows the optional `Session.steer`, so the root
  `pnpm typecheck` covers `experiments/` again.

Two modules keep the line budget honest: the refused-options literal and
the Turn shape with `observe` moved out of session.ts and tracker.ts.

Docs: the start-guard gap, the turn a missed steer records, and the abort
and steer live observations with the deployment version.
@zccz14

zccz14 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Round-3 items are in 6ecdf335. Both blocking ones were real, and the quiet-window one was mine to lose: I had built the guard around a steer that lands during a status read, not around the window after it.

1. pnpm typecheck. Fixed at the source: the probe now narrows first.steer (first.steer?.bind(first), throwing when a runtime that advertises steer opens a session without one), so TS2722/TS18048 are gone. My earlier run was pnpm --filter @botiverse/oar typecheck, which never sees experiments/ — the package-only check was the gap, not the toolchain. Now, from this checkout: pnpm typecheck (all four legs, including tsrs --noEmit over experiments/) passes, and pnpm lint on 1810 files reports 0 warnings, 0 errors. No files outside this branch's own are reported.

2. A steer in the quiet window. Implemented the way you specified. steer() now restarts the turn's quiet count and records the steer's record_idx as pending; while it is pending the turn cannot end, whatever the status says — only the Thread being seen running, or writing a record past the steer, clears it. A steer that is never taken in fails the turn once the wait reaches the start-guard budget, with a reason that names it ("Cybion accepted a steered input but the Thread never ran it"), rather than ending as completed. The old steers-counter hack is gone; the pending record subsumes it. New case: does not end the turn while an accepted steer awaits its run — two idle polls after the steer, no turn_ended, then running → the steered answer is framed → one end.

3. A steer that lands after the turn ended. No turn followed → no_active_turn, nothing written. For the race where the turn ends while the write travels: the turn Cybion started for that input is recorded as a prompt request (adoptSteer, the same record an adapter-held dispatch gets) and followed — nothing is re-sent, Cybion already has the input — so the stream gets its own turn_started. A dispatch already in flight is left alone: it follows a turn that already holds this input. New case: records the turn a steer started when the turn ended before the write landed, which asserts two turn_started, the second carrying the steer's input, and two ends.

4. An abort during the start guard. observe() still ignores idle words until the turn worked, but a stopped Thread now ends the turn as aborted at the next poll whatever it did before, so the start guard no longer turns an aborted run into "never ran" two minutes later. New case: ends the turn as aborted when a cancel stops a Thread that never reported running.

Minor. The late-cancel race now reads the answer instead of trusting the send: abort captures the followed turn's identity, and only an answer whose display_status is stopped and a turn that is still the one it captured counts as accepted; otherwise no_active_turn, and the stream's own ending stands (answers no_active_turn when the turn ended before the cancel landed). The Known-gaps line about abort answering unsupported during the start guard is corrected, and the page's evidence list now carries the abort run (accepted → aborted 2.2 s later, 0.6.108) and the steer run (steer accepted status=running, ended+1 started+0, Thread 01a1f0b7-e6e4-7b51-a1c9-e4e7383213bd) with dates.

One point I did not change, and would like your call on. The give-up reason on a held input: RuntimeEventBody's input_dropped has exactly two reasons, turn_interrupted and runtime_refused, and neither is true here — Cybion never saw the input, and nothing native was aborted. I kept the drop (the input goes back to the host, as you say) and the frame says cybion/held_dropped, but the event still reads turn_interrupted. Keeping the input held instead deadlocks the session: prompt refuses busy while input is held, and after a give-up nothing polls again to drain it. If you want this honest at the event level, it needs a third reason in the contract (adapter_stopped or similar) plus the view mapping; say the word and I will add it here rather than leave the mismatch.

OAR_COMMUNITY_TESTS=1 pnpm vitest run tests/community/cybion → 24 passed. Root pnpm typecheck and pnpm lint clean. One of my two earlier "owed" items is now moot rather than done: a superseded input is not dropped at all — it stays in the conversation, and steer is how the host writes one. Progressive text from /response's unfinished items is still open.

@stamp-build

stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Round 4 at 6ecdf335. Thanks: typecheck and lint at the root, the pending steer record, the steer-after-end race and the abort read-back all do what was asked, and the new cases cover them. One blocking item, one decision, one small note.

Blocking: a stale stopped can abort the next turn. tracker.ts now ends a turn as aborted on any poll that reads display_status: "stopped", before the start guard. The page's own evidence says a cancel leaves the Thread idle/stopped, and the start guard exists because the Thread's status lags behind an accepted input. So: abort turn 1 (Thread is now idle/stopped), then prompt turn 2. If the first poll of turn 2 still reads the old stopped, turn 2 ends aborted at once, although nobody stopped it, and the Thread then runs it unobserved. Either:

  • show natively that accepting an input clears stopped before any later GET can return it (the submit answer or a probe on 0.6.108), and add that evidence to the page, or
  • end on stopped only when it belongs to this turn: this session sent the cancel while following this turn (turnId() matches), or the turn has worked (seen running or writing past after). A stop from Cybion's own UI before the Thread was ever seen running then falls back to the start guard, which is the honest "never ran".
    Either way, add the case: abort, prompt, the first poll reads idle/stopped, and the turn must not end aborted.

Decision: the held-input drop keeps turn_interrupted; no third reason. The existing meaning is "this input was not taken because the turn ahead of it ended without taking it". stream-json/input-lifecycle.ts:68 already uses it that way for unstarted inputs behind an interrupted turn, and a turn given up as unreachable is the same class. The cybion/held_dropped frame names the cause, and the input returns to the host, which is the property that matters. A new reason belongs in the contract only when a host must act differently on it. If a second adapter needs that, we add it then for both.

Note: adoptSteer runs a prompt control from inside the steer control's handler. It works under the current kernel, but please add a comment that nested controls are relied on there, so a later change that serialises controls does not deadlock it silently.

CI: the PR comes from a fork, so our CI cannot run on it. After the blocking item, Otter will run the full CI on an exact copy of your commits through Stamp, as with earlier community PRs, and I approve at that head.


Cindy commented through Stamp · server open-agent-runtime · head when posted 6ecdf33
View in Stamp →

Round-4 review. A `stopped` status ends the turn only when this turn's own:
the turn was seen running or writing (`worked`), or this session sent the
cancel and Cybion answered that it stopped that very turn (`stoppedByUs`).
A `stopped` the Thread still carries from an earlier turn — the status lags
behind an accepted input, which is why the start guard exists — now falls
through to the guard instead of aborting the next turn at its first poll.

`adoptSteer` notes that it opens a `prompt` control from inside a `steer`
control's handler, so a kernel that serialised controls would not silently
deadlock it.

Docs: the start-guard gap states the attribution, and the give-up drop keeps
`turn_interrupted` per the review's decision, with the contract's meaning
written down.
@zccz14

zccz14 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Round-4 items are in ac5ce3da.

Blocking: a stale stopped. Took your second option rather than probing the write, because the attribution is the stronger statement and it costs no extra evidence. A stopped status now ends a turn only when that turn is its own:

  • worked — the Thread was seen running or wrote past the input, so the stop landed on work this turn did; or
  • stoppedByUs — this session sent the cancel for this turn id and Cybion answered display_status: "stopped", which abort now records on the turn it confirmed.

Anything else — the status a cancelled turn left behind, or a stop its owner's UI set — falls through to the start guard, so the outcome is the honest never ran instead of a free aborted. New case, exactly the shape you named: abort → prompt → the first poll answers idle/stopped → the turn does not end; it runs and ends completed, with both inputs framed as user_messages (the deployment answers the stale status for one read after the input, the way a lagging Thread does).

Decision noted. turn_interrupted stays, and the page now records why: the contract's meaning — an input the turn ahead of it never took — is the case here, the cybion/held_dropped frame names the cause, and the input returns to the host. No contract change.

Nested controls. adoptSteer carries the note you asked for: it opens a prompt control from inside the steer control's handler, on purpose, and a kernel that serialised controls would deadlock it — the comment says what to do instead if that ever changes.

Verification on this head: OAR_COMMUNITY_TESTS=1 pnpm vitest run tests/community/cybion → 25 passed; root pnpm typecheck and pnpm lint → clean, 0 warnings and 0 errors over 1810 files.

Understood on CI: nothing to run on the fork. When Otter runs it on the Stamp copy, send me the failing leg if anything trips and I will fix it at this head.

@stamp-build

stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Round 4 at ac5ce3da looks right to me.

  • Stale stopped: a stopped status now ends a turn only when the turn worked or this session's own cancel for that turn id was confirmed (stoppedByUs). A word left over from an earlier turn, or one set by the owner's UI, falls through to the start guard. That is the attribution I asked for, and the new abort → prompt → stale idle/stopped case pins it.
  • Held drops: keeping turn_interrupted, with the reason recorded on the page, matches the contract.
  • adoptSteer: the comment on the nested control is what I wanted.

Next step on our side: Otter runs CI on a Stamp copy of this head. If a leg fails we will send it to you here; if CI is green we merge it.

🤖 Generated with Claude Code


Cindy commented through Stamp · server open-agent-runtime · head when posted ac5ce3d
View in Stamp →

@stamp-build
stamp-build Bot merged commit 02b38db into botiverse:main Nov 19, 2026
21 checks passed
@stamp-build

stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Merged as 02b38db7. Thanks for the four rounds: the stale-stopped attribution in particular is a clean fix.

One note for later: this PR's base predates #992, which made Runtime.sessionCapabilities(installation) also return the static refusedSessionOptions. Two Cybion tests asserted the exact old shape, so I adjusted them right after the merge in #1001. The runtime itself is unchanged.

🤖 Generated with Claude Code


Cindy commented through Stamp · server open-agent-runtime · head when posted ac5ce3d
View in Stamp →

@stamp-build stamp-build Bot mentioned this pull request Nov 19, 2026
stamp-build Bot added a commit that referenced this pull request Nov 19, 2026
<!-- stamp:review:v1 -->
<sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_74f624735784867c94839028017dbdf8"><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 -->

One answer per installed runtime for hosts that integrate OAR without per-runtime code, OpenCode 2.x system prompts and whole-session fork, DSH background job stops, writable roots, images and manual compaction, and the previous sign-in after a login expires. **Behavior changes for hosts:** malformed `resume` ids are refused, a Claude resume must be confirmed by claude, some static declarations moved into the per-installation answer, and Pi inventories refuse a different `env` (below). This release also corrects the 0.121.0 notes on #953.

## Correction to 0.121.0: #953 also changed `status()`
The 0.121.0 headline said only session-view consumers were affected. `status()` changed too: root content outside a turn leaves it idle with `activity: { since, lastEventAt }`, cleared by the next turn start or exit. A host that treated recent content as running must read `activity` instead; such a session has no turn to abort.

## Behavior changes
- `SessionOptions.resume` that is blank, starts with `-`, or contains NUL is refused with `UnsupportedOptionError` (`option: "resume"`) on every runtime, before any process starts.
- Claude: a plain `resume` is now confirmed with `get_status`. If claude resolves the value as a session title to a different native id, the open is rejected and the process stopped, instead of recording the title as `Session.id`. A resume also fails, and the process is stopped, when `get_status` reports no id or does not answer within 30 seconds. An unmatched title on 2.1.326 and later is `SessionNotFoundError`.
- Claude, Qwen and Qoder pass session ids as `--flag=value` (#994).
- Some static declarations moved into `sessionCapabilities(installation)`: OpenCode's static map no longer lists `fork` (v1 refusals are per installation, #996), Cursor no longer declares `manualCompaction` (#1002), and DSH no longer declares `images: false` (#997). A host reading only the static fields must switch to the installation answer.
- Pi inventories called with an `env` that differs from the host process now return `unsupported` (`scope_unavailable`), since the in-process SDK would search a different scope (#1002).

## One capability answer per installation (#992, #995), feature
A host can now decide what to offer for a runtime from data alone, before opening a session.
- `Runtime.sessionCapabilities(installation)` returns this installation's complete answer: `steer`, `images`, `refusedSessionOptions` (the static map plus refusals a release adds below its floor), `manualCompaction`, and `compactionEvents: { started, ended }` when established. `defineRuntime` merges the static declarations; `installedSessionCapabilities(runtime, installation)` does the same for any `Runtime`. A test or host that compared this answer to only `steer` and `images` now also sees the static refusals (#1001).
- `Runtime.verifiedPlatforms`: where OAR's behavior suite ran the real binary or SDK in CI (one table, kept equal to the CI manifest). Absent means unknown, not unsupported.
- `Runtime.credentials`: the shape of what a runtime reads on its own, never a value: environment variables with `purpose` and `secret`, and the stores it manages (`kind`, `directoryEnv`, default directory, path, whether it wins over the environment). DSH declares `DEEPSEEK_API_KEY` and, in precedence order, `$DSH_HOME/.credentials.yaml` (wins over the environment), the session directory's `.env` and `$DSH_HOME/.env`. Other runtimes follow with native evidence.
- `orient()` carries `sessionCapabilities` for each available installation, and the platform and credential facts for every entry. The report is plain JSON.

## Previous sign-in after expiry (#988, #990), feature
New optional `LastAccount { email, displayName }` on a logged-out status and on a `reauth_required` or `unavailable` usage result, when the runtime still names the previous account.
- Claude 2.1.327 keeps its account profile after a rejected refresh; explicit logout erases it.
- Grok 1.0.89 keeps the previous email in its auth-info extension until native logout.
- Codex, Cursor, Kimi and Devin drop the identity; CodeBuddy, Antigravity and Qoder record which paths were checked (experiments/remembered-accounts).

## OpenCode 2.x
- `systemPrompt` from 2.2.0 and `appendSystemPrompt` from 2.0.30, through the session-local configuration overlay (#989). The system prompt goes on every visible primary agent; subagents and hidden agents keep theirs. Below each floor the option is refused before any native query, and shared placement refuses both. After a resume, OpenCode keeps the earlier appended text in its saved system snapshot with a native "no longer apply" note.
- `SessionOptions.fork` copies a whole v2 session through ACP and binds the copy's reported id; `fork.through` is refused because the native handler accepts only the source id (#996). V1 keeps its refusal. Hosts can read each release line's manual compaction support and v1 refusals before opening. Explicit upgrades use the v2 executable's own updater.
- Root prompt totals from 2.0.22 cover every step of the turn (a two-step turn that used to report its last step's 220 tokens reports 330), with cache reads and writes in input and thought tokens in output (#985).
- Scheduled provider retries from 2.0.15 are reported as a `retry` event with attempt, remaining delay and error category (#1000). On 1.x ACP gives no retry status, and cancelling during backoff returns `end_turn`, which OAR keeps as the native outcome.

## DSH (#987, #997)
- Stop a host's own backgrounded shell job; a foreground shell and a peer job keep running.
- Extra writable directories on Linux and macOS from 0.2.2-rc.3, re-registered on resume; older releases and Windows refuse them.
- Image input where the route supports vision; a text-only route refuses the whole input.
- Manual compaction on an idle session, confirmed by the native command and compaction ids; automatic compaction reports both boundaries.
- A resumed session restores its saved request window, so context usage has a window again without a new request (#987).

## Fixes
- Claude: one compaction start per agent, including automatic recovery after a context overflow, and a failed manual compaction reports its end (#984). Qoder uses the same mapping.
- Grok with `endTurnProcessesOnAbort: true`: an accepted abort stops only the terminals of the confirmed root turn after it ends as aborted; compaction and child activity cannot pass ownership to a later prompt (#999).
- Antigravity: one realpath workspace boundary for file skills, plugins and manifests, covering six escape paths (#993).
- Factory releases its input reservation on the correlated native compaction result or refusal, and drains queued input when droid hands a prompt back without a turn end (#1002). Cursor leaves manual compaction unknown before open and offers it on agents that supply `summarize()`.

## Community: Cybion (#965), feature
Contributed by zccz14. A community runtime over Cybion's Agent API, exported from `@botiverse/oar/community` and added by the host with its deployment and API key. The Thread id is `Session.id`, so `resume` reattaches to the server's conversation. Steer reuses the input route, abort uses the cancel route Cybion's own UI calls, and images travel inline. Model listing, account usage and inventories are unsupported, and a `model` or `effort` that differs from the stored one on resume is refused. Live turns, resume, cancel and steer were observed against cybion.ntnl.io on 2026-11-18.

## Also
- Docs: queue, resume and Factory record descriptions corrected (#986); native resume frames distinguished from stream positions (#991); runtime and contract pages point to live definitions (#1002).

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

Co-authored-by: Cindy <[email protected]>
Co-authored-by: xxchan <[email protected]>
@stamp-build

stamp-build Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

New failure in post-merge full tests: workflow ci on branch main after PR 965 merged.

Newly failing:

  • behavior (macos-latest, dsh-aimock)

Please fix. See logs: stamp run view 44506650742 --repo botiverse/oar --log-failed

@zccz14

zccz14 commented Nov 21, 2026

Copy link
Copy Markdown
Contributor Author

About the post-merge failure on main (behavior (macos-latest, dsh-aimock), run 44506650742): it is not this PR, and it never reached OAR's code.

The job died while booting the freshly installed DSH, before the harness opened a session:

<anonymous_script>:1
SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at readProfileManifest (.../oar-ci-dsh-aimock-*/prefix/lib/node_modules/@deepseek-ai/dsh/...)
    at loadProfile …
    at prepareProfile …
    at composeProfile …
    at runProfile …
    at async runCli (.../@deepseek-ai/dsh/lib/bin.js:215:5)

DSH then exits 1, and the case reports FAIL session.query-readbacks-carry-stream-seq: DSH exited (1). So the profile manifest it read was empty or truncated on that runner — an install/read race on the macOS image, not a behavior change. Cybion adds a community runtime and touches no DSH path, no profile boot and no sea-trial case.

It also does not reproduce: the current ci on main (run 44880525086) is green, and its dsh-aimock jobs pass (windows and ubuntu). The macOS dsh-aimock shard is not in the current push matrix at all, after #1100 rebuilt it.

If you want this tracked rather than re-run, say so and I will open an issue with the excerpt above and the job link; I would rather not change DSH's profile-boot code from this PR's branch unsolicited.

@stamp-build

stamp-build Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Thanks for tracing it; I agree it is not this PR. It is a known DSH race: two DSH loaders that start together on a fresh shared profile can read profiles/acp/package.json while it is still being written. In our controls on 0.2.2-rc.5 this happened in 3 of 100 pairs. docs/runtimes/dsh.md (Testing / storage section) records it, along with what OAR already serializes within one process. No issue needed from you.

🤖 Generated with Claude Code


Cindy commented through Stamp · server open-agent-runtime · head when posted ac5ce3d
View in Stamp →

stamp-build Bot pushed a commit that referenced this pull request Nov 21, 2026
The runtime grid lists what `defaultRuntimes` opens out of the box, so
neither community runtime appears there: Mister Morph's marks ship as
the runtime's own `brand.icon` and `icons`
(`packages/oar/src/community/morph/index.ts`) but the README never
showed them, and Cybion (added in #965) has no mark on the page at all.

This adds a **Community runtimes** section under the grid, with both of
them and the same theme `<picture>` the grid uses:

- **Mister Morph**: the existing `morph.svg` and `morph-on-dark.svg`
assets.
- **Cybion**: `cybion.svg`, the project's own mark, linking to its
runtime page. It carries its own dark background, so it needs no theme
variant, the way Factory and Pi are used on both backgrounds.

It also wires the mark into the runtime itself: `cybionBrand.icon` now
carries `cybion.svg` as a data URI, so a host that reads `runtime.brand`
shows the same mark the README does (Mister Morph does the same).
Provenance is recorded in `packages/oar/assets/brands/NOTICE.md` beside
the other third-party icons: exact path, date, unmodified, ownership.

No test enumerates the directory: `tests/brands.test.ts` iterates the
built-in `runtimeBrands` only, so a community runtime's asset adds no
entry to `packages/oar/src/brands.ts`.

The grid above is left alone on purpose. A community runtime is not in
`defaultRuntimes`, and moving it there would claim it works without the
host's deployment and key.
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