Skip to content

feat: add RSC plugin framework and audiobook curator example - #1

Merged
ScriptedAlchemy merged 653 commits into
mainfrom
codex/rsc-agent-runtime-demo
Aug 28, 2026
Merged

feat: add RSC plugin framework and audiobook curator example#1
ScriptedAlchemy merged 653 commits into
mainfrom
codex/rsc-agent-runtime-demo

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a first-class RSC authoring runtime with typed AgentBundle, Skill, Script, MCP Server, and Operation components
  • lower one application definition into validated Claude and Codex plugin artifacts, CLI commands, MCP tools, and Skills without duplicate runtime owners
  • add the public workspace example @agent-bundle-example/audiobook-curator with complete feature parity: inventory, library analysis, selection, conversion, Audible matching/cache/review, metadata/artwork/chapters, acoustic and Whisper evidence, and full integrity audits
  • preserve immutable sources and explicit plan/apply mutations with staged writes, hashes, bounded foreign-process output, and caller-owned cancellation
  • retain the foreground-owned Workbench Runtime, MCP App bridge, Eval, Playground, storage, and shutdown hardening already developed on this branch
  • add simple packages/examples workspaces plus Changesets and pkg-pr-new release automation

Real-world acceptance

  • installed and enabled the generated bundle in both Claude and Codex
  • verified Claude MCP connection and native Claude inventory against the mounted ZeroFS audiobook
  • verified native Codex integrity audit against the same media
  • exercised live Audible multi-region search, reviewed edition selection, product/chapter/artwork caching, local stream-copy conversion, metadata/artwork application, chapter repair, and full-decode audit
  • confirmed the 35,713,765-byte NFS source remained byte-identical (SHA-256 4846aa3370ae737b7c2b2e61dad55c05020d4043687c5ffdf2d9d8a825de8ffa)
  • Audiolocate ran honestly and returned inconclusive at 9/14 matches; Whisper remains an optional unavailable capability on this host

Verification

  • audiobook curator: 12 files, 39/39 tests
  • real FFmpeg conversion, metadata, chapters, and immutable-source regression
  • audiobook curator typecheck and production CLI/plugin build
  • generated source, Claude, and Codex artifact validation
  • root typecheck
  • root lint: 630 files, 0 errors, 0 warnings
  • root production build
  • focused shared-host adapter tests: 19/19
  • remote branch SHA matches local 40a3668

ScriptedAlchemy and others added 24 commits August 28, 2026 00:49
The design commits an authenticated callback download for the bounded
Flight preview and HMR-preserved expanded trace IDs, but the download
button's callback was never passed and trace.toggle had a reducer with
no dispatcher - both finished capabilities without a UI entry point.
RuntimeClient gains the bounded octet-stream Flight read; the Playground
wires the download through the controller with a visible failure alert
and dispatches trace.toggle from per-span disclosure buttons that render
details collapsed until expanded, real-Chrome coverage included.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
Both hosts document discovering hooks/hooks.json at the plugin root,
Codex documents running hook commands through a real shell with
CLAUDE_PLUGIN_ROOT exported as a compatibility alias, and its hook
envelope and hookSpecificOutput contract match Claude's - so the bundle
emits one Claude-format hook document and one wrapper per hook. The new
Universal wrapper codec detects the calling host at runtime (PLUGIN_ROOT
is Codex-only; AGENT_BUNDLE_HOOK_HOST pins a host for simulation), and
the matcher table unions Codex's documented apply_patch aliases with
Claude's, which never emits them. The on-disk test compiles the wrapper
and proves all three detection modes against the real process boundary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
Applies the quality review to the bundle seams. Host adapters now export
their conventional document paths and Codex derives the widened manifest
validator from the requested MCP relocation itself, so the pointer and
its validator cannot be configured apart. The bundle reuses each host's
compiled validation schemas and metadata descriptors instead of
recompiling seven ajv schemas at module load (a measured 50-80ms on
every CLI command), emits the shared skill and asset copies once instead
of planning them twice and discarding half, asserts at load that the two
capability tables agree on every hook matcher it does not explicitly
reconcile, and reports hook-document schema issues through the house
schemaDiagnostics shape. The inert nativeHookTargetNames option is gone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
Cursor documents .cursor-plugin/plugin.json with explicit pointers, so
the bundle adds a third host to the same root: shared skills/ as-is, a
Cursor-format MCP document (its auto-discovery reads mcp.json, never the
Claude-convention .mcp.json, and it interpolates CURSOR_PLUGIN_ROOT
rather than Claude's token), and - because Cursor auto-discovers
hooks/hooks.json with an incompatible schema - an explicit pointer to a
Cursor-format hooks document that stays empty until Cursor's hook stdin
contract is pinned. Schemas are pinned from the published reference with
provenance like the other hosts, compiled lazily so ordinary CLI loads
pay nothing, and a non-kebab plugin name diagnoses instead of emitting
an invalid manifest. flutter/agent-plugins ships this exact layout in
production.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
A long-lived dev server accumulated every settled session's full event
history in the in-memory map forever. Settled, subscriber-free,
owner-released sessions beyond the eight newest now evict from memory
only - their durable records stay on disk - and every by-id operation
transparently restores an evicted session through the same load path
reopen uses, preserving each error contract and the synchronous
admission ordering close() depends on. The session GET route reopens
before reporting not-found so eviction is invisible at the API surface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
The quick start now leads with the plugin target: one agent plugin
bundle whose root installs into Claude Code, Codex, and Cursor, with the
per-host targets kept for host-specific layouts. The documented config
was built verbatim through the packaged CLI and its artifact passes
validate --artifact.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
The universal wrapper is sound only because the Claude and Codex codec
bodies stay byte-identical apart from identifier naming and the baked
target constant; the new test normalizes both and asserts equality, and
proves the Universal variant differs from that shared body by exactly
its host-detection block. The generator's docs now state the invariant.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
Every pinned claim was re-verified against the current documentation and
the installed 2.1.250 binary's own strict plugin validator, including a
negative control proving the validator actually reads the documents:
hook events and matchers, document shapes, transports, and path tokens
all hold. The capability table, schema $ids, provenance, fixtures, and
the native evaluator's expected version move to 2.1.250; the separate
minimum-supported floor stays at 2.1.232 so older hosts remain covered.
All five emitted example bundles pass claude plugin validate --strict on
the new version.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EMWczsXAkj7fC5ssSxGK43
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.

2 participants