feat(plugin): add Bun assets, prepare script, and pack (stack 6/7)#78
Open
wanglongan587 wants to merge 34 commits into
Open
feat(plugin): add Bun assets, prepare script, and pack (stack 6/7)#78wanglongan587 wants to merge 34 commits into
wanglongan587 wants to merge 34 commits into
Conversation
2 tasks
Establish validated plugin identifiers and strict manifest parsing. Add the v1 Agent and Workbench package model for later wire contracts. Co-authored-by: Cursor <cursoragent@cursor.com>
Define the bounded five-byte frame format and cover split, coalesced, and malformed input behavior before adding JSON-RPC messages. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce opaque IDs, page limits, and JSON-safe numeric leaf types so lifecycle and Agent contract modules can share one validated value layer.
Add the closed Agent request/response/event shapes on top of leaf types so lifecycle stream envelopes and method registry can reference one contract.
Add initialize/activate/deactivate/stream/exit DTOs and invariants so Host and private bootstrap share one wire lifecycle contract.
Add request/response/error framing helpers on top of the binary frame codec so Host and plugin runtimes share one JSON-RPC parse/reject matrix.
Register the closed Agent method set and invocation semantics so SDK and runtime dispatch share one method catalog.
Close the protocol crate with cross-field Agent validators, TypeScript export helpers, and checked-in Frame/Agent golden fixtures for drift detection.
wanglongan587
force-pushed
the
pick-0717-06-assets-pack
branch
from
July 20, 2026 03:45
8d9914d to
b9e7cab
Compare
wanglongan587
marked this pull request as ready for review
July 20, 2026 07:18
FrameEnvelopeMismatch was unreachable because require_allowed_fields rejected result/error/method/params first. Check shape incompatibilities first so mismatch and unknown-field failures stay distinct. Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce the shared process abstraction and Tokio spawner so plugin runtime can depend on a Host-owned process API before Windows Job Object support.
Add Job-bound spawn, named-pipe stdio, and tree terminate/reap so each plugin generation can own a killable Windows process tree.
Introduce config, catalog, enablement, state, receipts, error taxonomy, and management/runtime ports so later install and actor modules share one type layer.
Add no-follow path auditing, safe tree deletion, and deterministic package tree digests used by install staging and integrity checks.
Add single-owner data-dir lease plus atomic state backup/recovery so manager restarts can fail closed instead of silently accepting corrupt state.
Validate manifests and package layout, issue selection/candidate handles, and build the provider registry used by later install and admission flows.
Stage authorized candidates behind digest revalidation, commit receipts, and rebuild catalog snapshots from the installed package store.
Recover interrupted installs and removals from journals/trash so manager bootstrap converges without leaving half-applied package state.
Expose scan/identify/install/enable/disable/uninstall use cases and wire critical runtime events into crash-policy state updates.
Track write certainty and pending request state, and add framed reader/writer lanes with backpressure for one plugin generation.
Assemble pinned Bun ProcessSpecs and adapt ProcessTreeSpawner output into generation transport so plugin runtime can launch one contained process tree.
Perform Host-owned $/initialize and $/activate round-trips with post-activate admission recheck, producing HandshakeProof for the generation actor.
Run admission, asset verification, process launch, and handshake as a cancellable worker that reaps late spawns instead of leaking process trees.
Own one running generation's mailbox: invoke/stream/cancel, deadline and fatal settlement, and deactivate/exit drain before tree reap.
Provide AgentPluginRuntime with single-flight start/invoke/stop so one plugin owns at most one live generation while startup and session actors stay nested.
Route start/invoke/stop by plugin id through late-bound admission and event ports, creating one lazy supervisor per plugin without construction cycles.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
wanglongan587
force-pushed
the
pick-0717-06-assets-pack
branch
from
July 20, 2026 07:29
b9e7cab to
9438bda
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
prepare-plugin-runtimescript.plugin-sdk.Stack
Test plan
pnpm --filter @ora-space/plugin-sdk testtask prepare-plugin-runtime