Skip to content

feat(opencode): discover skills after native plugin activation - #849

Merged
stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/skills-discovery
Nov 16, 2026
Merged

stamp-build[bot] merged 2 commits into
mainfrom
agent/otter/skills-discovery

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Otter from open-agent-runtime opened this pull request through Stamp
View in Stamp →


OpenCode skills() now returns its native discovery catalog without an OAR session or a model request. V1 uses debug skill. V2 starts a private loopback server, awaits the native provider endpoint's plugin-activation barrier, inspects plugin failures, and then reads skills. A cold direct skill query on the tested 2.3.0 binary returns an incorrect empty snapshot before activation finishes.

Keep native names, descriptions and paths, including the shared .claude/skills and .agents/skills directories. Omit skill bodies and plugin errors; failed plugins mark a successful catalog partial. Deadlines cancel version detection and HTTP work, and owned processes and listeners are reclaimed before returning. V2 requires 2.2.7, the oldest verified activation-barrier implementation; this requirement applies only to this reader.

Validation: full local check on base 4dc6ae1b passed (4,498 unit tests, 18 mock behavior cases, typecheck, lint and builds). Native Linux probes passed on 1.19.5, 2.2.7 and 2.3.0: six fixture directories, malformed frontmatter, real failed-plugin discovery, and cleanup after success, transport failure and timeout. The native cases join the existing v1 and v2 CI jobs. Evidence and a standalone cold-start reproduction are in experiments/opencode-skills/.

Upstream #51680 was closed by #62569, but the tested published binary and tag still exhibit the race. An unposted follow-up asks which release contains the fix. Cursor discovery remains a separate batch. Requested by xxchan; implementation and scope reviewed through task #core:#245.

The first Windows run returned all six fixtures but used a long home path where the test expected an 8.3 alias. The vendor test now compares canonical filesystem paths, while leaving native returned paths unchanged. The full local check passed again after this test correction.

@stamp-build
stamp-build Bot force-pushed the agent/otter/skills-discovery branch from 6bcb8c7 to ff54828 Compare November 16, 2026 20:40
@stamp-build
stamp-build Bot merged commit 05cde67 into main Nov 16, 2026
42 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/skills-discovery branch November 16, 2026 21:40
stamp-build Bot added a commit that referenced this pull request Nov 16, 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_34918c388f6e72af8577a8fb287d4eaa"><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 -->

Record the November 16 core runtime inventory: all fifteen release
sources are unchanged, while the worktree now loads the separately
adopted Cursor 1.4.0 and Pi/Durable 1.5.2 packages. ZCode's new 3.18.2
desktop release does not add documented standalone app-server login
support in the inspected material.

The report retains all 30 failed CI jobs across the observation window,
distinguishes 29 available logs from one unavailable runner log, and
keeps queued, skipped and cancelled work separate from passes. It also
records unchanged upstream watches. No runtime behavior, dependencies or
CI configuration change.

Validation: `CI=1 pnpm run check` passed (4,498 tests and 18 mock
cases); selected evidence counts and unchanged upstream fields
cross-checked against the retained raw responses. No new real-account or
paid inference.

Rebased after #849: only the experiment index required resolution; both
entries are preserved and the report and selected JSON are byte-for-byte
unchanged. The preceding head's Windows process-capture timeout remains
recorded separately; the new head receives fresh CI.

Co-authored-by: Otter <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 16, 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_70ef3c2fef37820c4bd012234862b9e3"><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 -->

Hosts can group discovered skills without interpreting each runtime's
source strings. Add optional `SkillEntry.scope` (`builtin`, `user`,
`project`, `managed`, `other`) and independent native `plugin` identity.
Preserve raw `source` and paths; unrecognized provenance leaves scope
absent.

Map Claude, Codex, Grok, Kimi and Pi's native categories, including both
Pi SDK and RPC. OpenCode compares real paths with its verified native
loading roots, including shared `.claude/skills` and `.agents/skills`;
unknown custom roots and ambiguous paths remain unclassified. Both roots
and entries are canonicalized, while the returned path remains the
original native string. No Pi-specific contract fields are added.

Validation: full local check, source/category and plugin regression
cases, real filesystem alias controls, and native OpenCode 1.19.5 /
2.2.7 / 2.3.0 six-directory discovery cases. A Windows-only regression
covers real 8.3 aliases in both directions through the public reader; it
is skipped on Linux and on volumes without short aliases. Native probes
used isolated fixture homes and no model requests. Mapping rules and
version evidence are in `docs/spec/inventory.md` and the runtime pages.

Based on main after #849 merged as 05cde67. Both commits are unchanged
by the rebase; the full local check passed again. Requested in task
#core:#245.


CI follow-up: the initial `pi-rpc-minimum` job exposed an exact-object
vendor assertion that omitted the new `scope: "user"`. The assertion is
updated, both native Pi 1.4.0 and 1.5.2 reader cases pass, and the full
local check passes (4505 unit tests plus 18 mock behavior cases).
OpenCode documentation now explicitly ties the built-in URI allowlist to
verified versions and the daily version audit.

---------

Co-authored-by: Otter <[email protected]>
@stamp-build stamp-build Bot mentioned this pull request Nov 16, 2026
stamp-build Bot added a commit that referenced this pull request Nov 16, 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_eceb15d527901fd3e637198cbc05d8c3"><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 -->

Three breaking changes to the public API surface (109 unused or retired export names and `usability()` removed, and a stricter installation type), skill lists for Kimi and OpenCode with a shared `scope` field on every runtime's skills, DSH system prompts, and upgrading an Antigravity CLI that is below OAR's minimum version. Runtimes and sessions behave as before.

## Breaking: unused public exports removed (#851)
109 export names that are unused or explicitly retired are no longer public: mostly per-runtime entry points that duplicate a `Runtime` member (`codexSession`, `claudeListModels`, `antigravityInstallation`, ...), internal parsers and convenience reducers. Where there is a replacement it is usually the runtime object, for example `codexRuntime.session` or `claudeRuntime.accountUsage`; some names (internal parsers, `PiModelCatalogOptions`) have none. Every removed name is listed with its replacement, or the reason there is none, in the [migration table](https://github.com/botiverse/oar/blob/main/experiments/public-api-sweep-2026-11-16/README.md#migration-table). Runtime behavior, record formats and the retained types are unchanged. Kept on purpose: `orient()` and its types, `claudeInstallation`, and the runtime-author SPI on `@botiverse/oar/kernel` (`inputImagesRefusal`, `withInputImages`, `withdrawHeld`, `HeldInput`).

## Breaking: `usability()` removed; `orient()` kept (#835)
`usability()` and its types (`RuntimeUsability`, `UsabilityOptions`, `UnusableReason`) are gone from every entry point (root, browser and `@botiverse/oar/observe`). Readiness is host policy: read the probes in an `orient()` snapshot directly. A probe answered `unsupported` (this runtime has no such reader) stays distinct from one that failed or timed out, and an auth probe that answered can still say `unknown`. `orient()` stays because a host depends on its single time budget, its three depths and its per-probe outcomes.

## Breaking: installation snapshot types; upgrade a too-old Antigravity (#856)
`installation()` now reports a located executable below OAR's minimum version as the new exported type `VersionUnsupportedInstallation`: `kind: "unsupported"`, `code: "version_unsupported"`, `reason`, `via: "executable"` and its `command`, with `installedVersion` and `requiredVersion` when known. Other `unsupported` snapshots no longer carry `code` or version fields. Code that builds or narrows these snapshots must follow the new shapes.
`checkUpdate()` and `upgrade()` accept a `VersionUnsupportedInstallation`; other readers still take only an available installation. The `oar upgrade` command accepts it too. Antigravity gains `upgrade` through its own `agy update` (measured from 1.4.9 to 1.5.9), so a host can update an agy below 1.5.0 in place. DSH has no native self-updater and so no `upgrade`; Pi's `pi update --self` is not connected yet.

## Skills: Kimi, OpenCode, and `scope` everywhere (#840, #849, #850)
- **Kimi** `skills()` reads Kimi's own Web workspace catalog, including its built-in skills, without a session or a prompt. It starts a private loopback service, reads, and stops it on success, failure and timeout. Kimi can write its usual logs, indexes, project registration and a persistent `server.token`, as opening a Kimi session would. A workspace that already existed is never unregistered; an interrupted read can leave the one it created behind.
- **OpenCode** `skills()` uses `debug skill` on v1 and the native HTTP catalog on v2 (2.2.7 or newer), read after plugin activation; older v2 answers `version_unsupported`. On v2 a plugin that failed to load marks the result `partial`. Built-in skills get `source: "builtin"`.
- **Grok** skills keep their native source and path (1.0.77 reports them as an object).
- **New optional fields on `SkillEntry`, filled for Claude, Codex, Grok, Kimi, OpenCode and Pi:** `scope` (`builtin`, `user`, `project`, `managed` or `other`) and `plugin` (the native plugin or package). `scope` comes only from a category the runtime itself reports, or for OpenCode from the native root a skill was loaded from; absent means unknown. The native `source` string is unchanged.

## DSH: system prompts (#836, #853)
DSH sessions now accept `systemPrompt` and `appendSystemPrompt` instead of refusing them, as literal agent-scoped prompt sections. Replacement and append together become one complete section; a conflicting native complete prompt refuses the open. On resume a supplied value applies immediately and an omitted one returns to the native default (declared in `Runtime.resumedSessionOptions`). Native child agents keep their own default prompts. `launchArgs` and a root-session `outputSchema` stay refused; the `launchArgs` refusal message now gives the measured reason (an overlay can disable the OAR bridge).

## Testing (#847, #848)
`scriptedRuntime` scripts can make the runtime's process exit on its own (`turn.exit(code)`), recorded like a vendor process's unexpected exit, so a host can test that path. Passing an `effort` to a scripted runtime that lists no effort levels now throws `UnsupportedOptionError` instead of a plain `Error`, like other runtimes. Contributed by TennyZhuang (Airwing).

## Also
- Design: a tool-only environment (`toolEnv`) for sharing one Codex process across agents with their own credentials (#852); not implemented yet. Evidence on per-thread MCP environment (#842).
- Daily runtime version record (#854) and clearer sea-trial failure messages (#855).

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

Co-authored-by: Cindy <[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.

0 participants