38 KiB
作成
LocalTicketBackend によって作成されました。
Intake summary
Marked ready by yoi ticket state.
State changed
Marked ready by yoi ticket state.
State changed
Ticket を workspace-panel が queued にしました。
Decision
Routing decision: implementation_ready
Reason:
- Workspace Dashboard Queue により、この Ticket は Orchestrator routing 対象として明示許可された。
- Ticket body は Plugin instance model / registry、new Component instance world、legacy Tool adapters、manifest/static validation、plugin check/list/show reporting、Service/Ingress lifecycle/status、Ingress test path、per-surface grants、docs/templates/PDK updates、validation を詳細に定義している。
- 未解決 relation blocker はない。
- 現在 queued はこの Ticket のみ、inprogress は 0 件、spawned child implementation Pods はなし、matching branch/worktree はなし、Orchestrator worktree は clean。
- Risk domain は plugin / wasm-component / service / ingress / lifecycle / grants / runtime architecture だが、Ticket は no hidden context injection、ToolRegistry run-stability、legacy Tool compatibility、no ambient WASI network/socket、per-surface grants、host-mediated outputs を明示している。bounded context check 後も implementation 前に必要な追加 human decision は見つからなかった。
Evidence checked:
- Ticket
00001KVJHYP4Qbody / thread / relations / artifacts。 TicketRelationQuery(00001KVJHYP4Q): no blockers。TicketOrchestrationPlanQuery(00001KVJHYP4Q): no previous plan records; accepted plan recorded now。- Workspace state:
- Orchestrator worktree clean at
7f06e656。 - queued: this Ticket only。
- inprogress: 0。
- visible Pods are self/peers only; spawned children 0。
- no matching implementation branch/worktree。
- Orchestrator worktree clean at
IntentPacket:
Intent:
- Move Plugin runtime semantics from per-Tool artifact execution to host-managed
PluginInstance/PluginInstanceRegistry。 - Treat Tool / Service / Ingress as surfaces of the same Plugin instance, sharing instance state/config/diagnostics while preserving explicit authorization and ordinary visible output paths。
- Preserve existing Tool-only component/raw wasm Plugin packages through compatibility adapters。
Binding decisions / invariants:
- Existing Tool Plugin packages must continue to work through instance registry compatibility path。
- Tool execution remains model/user initiated and returns through ordinary Tool result/history path。
- Service/Ingress must not secretly call model Tools or mutate context/history directly。
- Plugin outputs/events must use Tool results or explicit durable/visible host-mediated paths; no hidden context injection。
- Tool schemas remain run-stable and model-visible only through normal ToolRegistry construction。
- Per-surface grants are independent: Tool, Service, Ingress grants must be validated separately; sharing an instance must not bypass authorization。
- Host APIs remain separately grant-gated。
- No raw ambient WASI network/socket authority。
- Ingress events are bounded typed untrusted inputs。
- If a safe host action path does not exist, expose diagnostics/status rather than inventing unsafe paths。
Requirements / acceptance criteria:
- Add
PluginInstanceRegistryor equivalent host-managed instance boundary。 - ToolRegistry dispatch goes through Plugin instance handles。
- Add new Component instance world/resource files and Rust PDK support。
- Add legacy Tool component/raw wasm adapters behind the instance registry。
- Extend manifest/static validation for Service/Ingress declarations and runtime compatibility。
- Update
yoi plugin check/list/showreporting for legacy Tool-only vs instance-capable packages and rejected surfaces。 - Add host-managed start/status/stop lifecycle and bounded diagnostics。
- Add Ingress dispatch API and at least one bounded in-process ingress delivery test path。
- Validate Tool/Service/Ingress grants independently。
- Update docs/templates for instance-oriented authoring。
- Focused tests cover manifest validation, legacy compatibility, instance state persistence across Tool calls, Tool/Ingress shared instance dispatch, grant denial, timeout/trap/failure diagnostics。
- Validation includes
cargo fmt --check, relevant tests/checks,git diff --check,yoi ticket doctor, andnix build .#yoi --no-link。
Escalate if:
- The instance boundary cannot be implemented without broad Worker/ToolRegistry redesign beyond Ticket scope。
- Preserving legacy Tool runtime while adding instance runtime would substantially distort architecture。
- Safe Service/Ingress host action semantics require a product decision not already specified。
- WIT/PDK interface shape requires a compatibility-breaking public API decision beyond this Ticket。
Next action:
- Record
queued -> inprogressand commit Ticket records before creating implementation worktree and spawning Coder。
State changed
Ticket body/thread, relation metadata, Orchestrator worktree state, visible Pods, existing branch/worktree, and bounded Plugin instance lifecycle context were checked. There is no unresolved blocking dependency, no inprogress/capacity blocker, and no missing planning decision. Accepting this queued Ticket for implementation before worktree/Pod side effects.
Implementation report
Implementation orchestration start:
- Acceptance records were committed on Orchestrator branch:
5ec8bae9 ticket: accept plugin instance lifecycle。 - Created implementation worktree
/home/hare/Projects/yoi/.worktree/00001KVJHYP4Q-plugin-instance-lifecycleon branchimpl/00001KVJHYP4Q-plugin-instance-lifecycleat5ec8bae9。 - Spawned Coder Pod
yoi-coder-00001KVJHYP4Qwith write scope limited to the implementation worktree and read-only root scope only for runtime workspace identity。 - Coder task explicitly forbids root/original workspace implementation, unsafe hidden context/action paths, broad ToolRegistry bypasses, merge, Ticket close, and cleanup。
Next action:
- Wait for Coder implementation report, then inspect branch diff/validation evidence and route to Reviewer。
Implementation report
Coder implementation report received from yoi-coder-00001KVJHYP4Q.
Implementation commit:
147a6005 plugin: add instance lifecycle surface
Changed areas reported:
- Manifest support for Service/Ingress declarations and permissions。
- New
yoi:plugin/instance@1.0.0WIT/resource surface。 - Host-managed
PluginInstanceRegistry/PluginInstanceHandlein Pod plugin feature layer。 - Plugin Tool registration/dispatch now routes through instance handles。
- Legacy raw-wasm and
yoi:plugin/tool@1.0.0component Tool runtimes preserved through registry adapter path。 - Instance lifecycle/status/stop/diagnostics surfaces and bounded Ingress dispatch API added。
- Independent Tool/Service/Ingress grant validation added。
- Static inspection / Plugin CLI diagnostics extended for Service/Ingress eligibility。
- Rust PDK instance-oriented types/trait/macro support added。
- Rust component instance template resources added。
- Plugin component model docs updated。
- Tests added/updated for manifest validation, CLI reporting/templates, legacy compatibility, grant checks, and in-process shared Tool/Ingress dispatch。
Coder validation reported as passing:
cargo test -p manifest plugin -- --nocapturecargo test -p pod plugin -- --nocapturecargo test -p yoi plugin -- --nocapturecargo check -p yoicargo check -p yoi-plugin-pdkcargo fmt --checkgit diff --checkyoi ticket doctornix build .#yoi --no-link
Dependency/package impact:
- No new Rust dependencies。
- Added package/resource files under
resources/plugin/templates/rust-component-instance/andresources/plugin/wit/yoi-plugin-instance-v1.wit。 - No
Cargo.lockorpackage.nixchanges required; Nix build succeeded。
Known risks / deferrals:
- Instance Component ABI is intentionally minimal string-JSON host dispatch (
start,handle-tool,handle-ingress,status,stop) and should be reviewed before treating it as stable public low-level ABI。 - Service lifecycle is surfaced as host-managed registration/status/stop diagnostics; no unsafe hidden model/tool/context action path was added。
- Rust PDK instance macro provides author-facing instance helpers, but full cargo-component generated glue ergonomics may need follow-up polish if public PDK shape becomes stricter。
Orchestrator evidence checked before review dispatch:
- Implementation worktree is clean。
- HEAD is
147a6005。 - Diff from acceptance
5ec8bae9..HEADis one implementation commit touching 12 files, about 1399 insertions / 34 deletions。 git diff --check 5ec8bae9..HEADproduced no diagnostics。
Next action:
- Dispatch Reviewer for r1 review against Ticket requirements, with focus on instance registry boundary, legacy compatibility, ToolRegistry run-stability, no hidden context/action paths, per-surface grants, Service/Ingress lifecycle semantics, static inspection/CLI reporting, WIT/PDK/template correctness, bounds/resource limits, and validation evidence。
Plan
Review dispatch:
- Spawned Reviewer Pod
yoi-reviewer-00001KVJHYP4Q-r1against implementation branchimpl/00001KVJHYP4Q-plugin-instance-lifecycle。 - Review target commit:
147a6005 plugin: add instance lifecycle surface。 - Review baseline:
5ec8bae9。 - Reviewer task focuses on instance registry boundary, legacy Tool compatibility, ordinary Tool result/history path, Service/Ingress no hidden action/context paths, ToolRegistry run-stability, per-surface and host API grant independence, no ambient WASI/network authority, bounded ingress/events/diagnostics, static inspection no-exec behavior, WIT/PDK/template coherence, tests, and Nix/package evidence。
- Reviewer is instructed not to edit source, commit, merge, close the Ticket, or use TicketReview directly; it will report verdict/evidence back to Orchestrator。
Review: request changes
Verdict: request_changes
確認範囲:
- Ticket contract / Orchestrator IntentPacket。
- Implementation diff:
5ec8bae9..147a6005。 - 主な対象:
crates/pod/src/feature/plugin.rscrates/manifest/src/plugin.rscrates/yoi/src/plugin_cli.rscrates/plugin-pdk/src/lib.rsresources/plugin/wit/yoi-plugin-instance-v1.witresources/plugin/templates/rust-component-instance/*- Plugin component docs/templates and focused tests。
- Hidden history/context injection、ToolRegistry bypass、Ingress/Service production call path、ambient WASI/network authority の有無を確認。
Blocking issues:
-
Rust instance PDK/template が buildable ではなく、WIT component instance ABI を実際に export していない。
resources/plugin/templates/rust-component-instance/Cargo.tomlは repository 配下 package だが[workspace]がなく、direct authoring check が workspace membership error で失敗する。resources/plugin/templates/rust-component-instance/src/lib.rsはToolOutput::text(...)を呼ぶが、crates/plugin-pdk/src/lib.rsにはToolOutput::new,ToolOutput::json,ToolOutput::summaryしかない。export_plugin_instance!は generated WIT bindings / generatedexport!macro forworld instanceを実装していない。raw placeholder#[unsafe(export_name = "start")]と private Rust methods を定義するだけで、host が期待する component-model exports (start,handle-tool,handle-ingress,status,stop) を生成しない。- Ticket が要求する WIT/PDK/template coherence と instance-oriented authoring surface を満たしていない。
-
Component instance lifecycle が status/error outputs を parse せず、component
statusexport が実質 unused。PluginInstance::statusは host-side lifecycle/diagnostics のみを返し、component runtime のstatusexport を呼ばない。PluginComponentInstanceRuntime::startは componentstartexport の returned string を捨てている。PluginComponentInstanceRuntime::stopも returned string を捨てている。- WIT は
statusを export しているが、host-side runtime method がない。 - Component が
{"error": ...}をstartから返しても host が started と扱い得るため、lifecycle/status/diagnostics acceptance criteria を満たしていない。
-
Service/Ingress surfaces が Tool 登録なしでは host-managed Plugin instance を作成・保持しない。
PluginToolFeature::installの実 install path では Service declarations は metadata only、Ingress declarations は authorization-check only。- Instance は Tool registration loop 内でのみ作られる。
- Service-only / Ingress-only instance-capable plugin は host-managed instance、lifecycle start、status、diagnostics、retained ingress dispatch handle を得られない。
deliver_ingressは production caller に接続されておらず、focused ingress test は syntheticTestIngressinstance を使っている。- Ticket intent の “Tool / Service / Ingress as surfaces of the same Plugin instance” を満たしていない。
Non-blocking concerns / follow-ups:
- Human
yoi plugin showoutput でも Service/Ingress eligibility を明示すると JSON なしでも rejected surfaces が分かりやすい。 - Real instance-component tests が弱い。Rust/PDK generated
yoi:plugin/instance@1.0.0component の build/execution through start/tool/ingress/status/stop coverage が欲しい。
Reviewer validation:
git diff --check 5ec8bae9..HEAD: passed。cargo fmt --check: passed。cargo test -p manifest plugin -- --nocapture: passed。cargo test -p pod plugin -- --nocapture: passed。cargo test -p yoi plugin -- --nocapture: passed。cargo check -p yoi: passed。cargo check -p yoi-plugin-pdk: passed。yoi ticket doctor: passed。nix build .#yoi --no-link: passed。- Additional focused template validation failed:
CARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.tomlwith workspace membership error。
Worktree status at review end: clean。
Implementation report
Coder r1-fix report received from yoi-coder-00001KVJHYP4Q.
New fix commit:
870bcc76 plugin: fix instance lifecycle blockers
Branch commits now:
870bcc76 plugin: fix instance lifecycle blockers147a6005 plugin: add instance lifecycle surface
Fix summary:
crates/plugin-pdk/src/lib.rs:- Reworked instance PDK export macro to use generated
wit-bindgenGuest/export!shape instead of raw placeholder exports。 - Added coherent instance-world helpers/status/error JSON handling。
- Reworked instance PDK export macro to use generated
resources/plugin/templates/rust-component-instance/:- Added empty
[workspace]so template checks as an in-tree standalone authoring package。 - Fixed template API mismatch by using existing
ToolOutput::json。 - Added
wit_bindgen::generate!forinstanceworld and updated export macro usage。
- Added empty
crates/pod/src/feature/plugin.rs:- Component instance lifecycle now decodes
start/stopreturned JSON and fails closed on returned errors / failed status。 - Host now calls component
statusexport and includes component status inPluginInstanceStatus。 - Service/Ingress-capable installs create and retain host-managed instances even without Tool registration。
- Added retained registry handle and bounded installed-path Ingress dispatch API。
- Added tests for component start error handling, component status/stop reporting, service-only instance retention, and installed-path Tool/Ingress shared-instance dispatch。
- Component instance lifecycle now decodes
- No
Cargo.lock, dependency, orpackage.nixchanges。
Coder validation reported as passing:
cargo test -p manifest plugin -- --nocapturecargo test -p pod plugin -- --nocapturecargo test -p yoi plugin -- --nocapturecargo check -p yoicargo check -p yoi-plugin-pdkCARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.tomlcargo fmt --checkgit diff --check 5ec8bae9..HEADyoi ticket doctornix build .#yoi --no-link
Remaining deferral / risk:
- Instance PDK now uses
wit-bindgenexport glue and template checks, butyoi:plugin/instance@1.0.0remains first public shape and should be reviewed before broad external stability promises。
Orchestrator evidence checked before r2 review:
- Implementation worktree is clean。
- HEAD is
870bcc76。 - Fix diff from
147a6005..HEADtouches 4 files, about 506 insertions / 119 deletions。 - Overall
git diff --check 5ec8bae9..HEADproduced no diagnostics。
Next action:
- Route back to Reviewer for r2 verification of the PDK/template export glue, lifecycle status/error parsing, Service/Ingress instance retention, installed-path ingress dispatch, and final acceptance criteria。
Review: request changes
Verdict: request_changes
確認範囲:
- Ticket authority / Orchestrator IntentPacket。
- Fix diff:
147a6005..870bcc76。 - Overall implementation shape:
5ec8bae9..870bcc76。 - 主な対象:
crates/plugin-pdk/src/lib.rsresources/plugin/templates/rust-component-instance/Cargo.tomlresources/plugin/templates/rust-component-instance/src/lib.rsresources/plugin/wit/yoi-plugin-instance-v1.witcrates/pod/src/feature/plugin.rscrates/manifest/src/plugin.rscrates/yoi/src/plugin_cli.rs
Previous blocker verification:
- Rust instance PDK/template buildability / WIT export shape: substantially addressed。
export_plugin_instance!now targets generatedwit-bindgenGuest/export!shape。- Instance template has empty
[workspace], usesToolOutput::json, and includeswit_bindgen::generate!。 - Focused template validation passes。
- Component lifecycle start/status/stop handling: substantially addressed。
- Host parses lifecycle JSON and fails closed on error/failure status。
- Component
statusexport is called and reflected in instance status。 - Stop output is decoded/reported。
- Service/Ingress instance retention and installed-path dispatch: substantially addressed。
PluginToolFeatureretains aPluginInstanceRegistry。- Service/Ingress-capable installs can create/retain instance without Tool registration。
- Installed-path
dispatch_ingressexists and tests cover shared Tool/Ingress dispatch。
Blocking issue:
- Enabled surface selection is not enforced per surface during descriptor/install, so mixed-surface plugins can expose or block the wrong surfaces。
PluginToolFeatureis gated at coarse whole-record level by whether any of Tool/Service/Ingress appears inrecord.enabled_surfaces。- Once feature exists, descriptor and install paths iterate over all declared manifest services/tools/ingresses, not only selected/enabled surfaces。
- Concrete risk:
- Plugin declaring both Tool and Service with only Service selected can still attempt to authorize/register Tool。
- Missing Tool grant can fail selected Service install。
- If Tool grant exists, unselected Tool can become model-visible。
- Unselected Service/Ingress can be provided/started if their grants exist。
- This violates the Ticket requirement that Tool / Service / Ingress grants and exposure remain independent and explicitly gated。
Required fix:
- Filter descriptor/install loops by
record.enabled_surfaces。 - Ensure registered/denial behavior accounts for selected surface set, not all manifest declarations。
- Add focused tests for mixed-surface packages with partial enabled surfaces:
- Service selected, Tool declared but not selected: Service installs and Tool does not register。
- Tool selected, Service/Ingress declared but not selected: no Service/Ingress instance/dispatch exposure。
- Missing grants for unselected surfaces do not fail selected-surface install。
- Grants for unselected surfaces do not cause exposure。
Non-blocking concern:
- Existing disabled-surface test only clears all enabled surfaces and does not cover mixed-surface partial enablement。
Reviewer validation:
cargo fmt --check: passed。git diff --check 5ec8bae9..HEAD: passed。CARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.toml: passed。cargo test -p manifest plugin -- --nocapture: passed。cargo test -p pod plugin -- --nocapture: passed。cargo test -p yoi plugin -- --nocapture: passed。cargo check -p yoi: passed。cargo check -p yoi-plugin-pdk: passed。yoi ticket doctor: passed。nix build .#yoi --no-link: passed。
Worktree status at end: clean。
Implementation report
Coder r2-fix report received from yoi-coder-00001KVJHYP4Q.
New fix commit:
79ca0f7f plugin: enforce enabled lifecycle surfaces
Branch commits now:
79ca0f7f plugin: enforce enabled lifecycle surfaces870bcc76 plugin: fix instance lifecycle blockers147a6005 plugin: add instance lifecycle surface
Fix summary:
crates/pod/src/feature/plugin.rs:- Added per-surface
record.enabled_surfacesgating for Plugin descriptor construction。 - Filtered install loops so Tool / Service / Ingress setup only processes selected surfaces。
- Changed install denial/exposure accounting to consider selected surfaces only。
- Added runtime dispatch guards so unselected Tool/Ingress surfaces cannot be used even if grants exist。
- Added focused tests for mixed-surface partial enablement:
- Service selected, Tool declared but not selected: Service installs, Tool does not register, missing Tool grants do not fail install。
- Tool selected, Service/Ingress declared but not selected: no Service descriptor/install exposure, Ingress dispatch denied even with grants。
- Kept previous lifecycle/status/ingress retention tests passing。
- Added per-surface
Coder validation reported as passing:
cargo test -p manifest plugin -- --nocapturecargo test -p pod plugin -- --nocapturecargo test -p yoi plugin -- --nocapturecargo check -p yoicargo check -p yoi-plugin-pdkCARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.tomlcargo fmt --checkgit diff --check 5ec8bae9..HEADyoi ticket doctornix build .#yoi --no-link
Orchestrator evidence checked before r3 review:
- Implementation worktree is clean。
- HEAD is
79ca0f7f。 - Fix diff from
870bcc76..HEADtouches onlycrates/pod/src/feature/plugin.rs, about 190 insertions / 97 deletions。 - Overall
git diff --check 5ec8bae9..HEADproduced no diagnostics。
Next action:
- Route back to Reviewer for r3 verification of per-surface enabled selection enforcement and final acceptance criteria。
Review: request changes
Verdict: request_changes
確認範囲:
- Ticket authority / Orchestrator IntentPacket。
- r3 fix diff:
870bcc76..79ca0f7f。 - Relevant overall implementation shape:
5ec8bae9..79ca0f7f。 - 主な対象:
crates/pod/src/feature/plugin.rscrates/yoi/src/plugin_cli.rscrates/manifest/src/plugin.rscrates/plugin-pdk/src/lib.rsresources/plugin/templates/rust-component-instance/*resources/plugin/wit/yoi-plugin-instance-v1.wit
Previous r2 blocker verification:
- Runtime/registration side is mostly fixed。
- Descriptor construction is gated by
record.enabled_surfaces。 - Install loops now gate Service / Ingress / Tool setup independently。
- Install denial accounting counts selected exposed surfaces rather than only Tools。
- Runtime dispatch guards exist for unselected Tool/Ingress use。
- Tests cover requested selected/unselected mixed-surface cases。
Blocking issue:
- Static inspection /
yoi plugin list/showstill evaluates unselected surfaces and can mark valid partial-surface enablement as rejected。- Runtime install now filters enabled surfaces, but static inspection still treats all declared manifest Tool / Service / Ingress surfaces as active eligibility requirements。
PluginStaticInspection::statically_eligible()requires all inspected tools, services, and ingresses to be eligible。inspect_resolved_plugin_static()still iterates over all declared manifest tools/services/ingresses rather than selected/enabled surfaces。yoi plugin list/showuses this unfiltered static inspection for resolved items。- Status calculation can classify the resolved item as
rejectedwhen no usable Tool exists andstatic_eligibleis false。
Concrete failure mode:
- Mixed package declares Tool + Service。
- Enablement selects only Service。
- Service grants are present; Tool grants are absent because Tool is not selected。
- Runtime install correctly ignores unselected Tool。
- Static inspection still checks unselected Tool and records missing Tool grant diagnostics, so
static_eligible = false。 - For service-only selection with no usable Tool,
yoi plugin list/showcan report the resolved plugin asrejectedeven though selected Service surface is valid/installable。
Why this blocks approval:
- Ticket requires Tool / Service / Ingress grants to be independent。
- Unselected surfaces must not block selected surfaces。
- Ticket also requires
yoi plugin check/list/showto report legacy vs instance-capable/rejected surfaces accurately。 - Runtime path is fixed, but inspection/status can still be blocked by unselected surfaces, creating authority/reporting mismatch。
Required fix:
- Make resolved static inspection eligibility account for
record.enabled_surfaces。 - Alternatively, separate declared-surface inspection from enabled-surface inspection and compute resolved
list/showstatus from enabled surfaces only。 - Keep
plugin checkfree to inspect full package declaration if appropriate, butplugin list/showfor a resolved enablement must not mark selected Service/Ingress invalid because unrelated unselected Tool grants are absent。 - Add focused
yoi plugintests for mixed-surface partial enablement status/reporting。
Non-blocking concern:
- Runtime install tests now cover partial enablement, but focused
yoi plugin list/showtests are still missing and should be added with the fix。
Reviewer validation:
cargo fmt --check: passed。git diff --check 5ec8bae9..HEAD: passed。- Template cargo-check: passed。
cargo test -p manifest plugin -- --nocapture: passed。cargo test -p pod plugin -- --nocapture: passed。cargo test -p yoi plugin -- --nocapture: passed。cargo check -p yoi: passed。cargo check -p yoi-plugin-pdk: passed。yoi ticket doctor: passed。nix build .#yoi --no-link: passed。
Worktree status at end: clean。
Implementation report
Coder r3-fix report received from yoi-coder-00001KVJHYP4Q.
New fix commit:
627c8f36 plugin: filter static enabled surfaces
Branch commits now:
627c8f36 plugin: filter static enabled surfaces79ca0f7f plugin: enforce enabled lifecycle surfaces870bcc76 plugin: fix instance lifecycle blockers147a6005 plugin: add instance lifecycle surface
Fix summary:
crates/pod/src/feature/plugin.rs:inspect_resolved_plugin_static()now filters Tool / Service / Ingress inspection byrecord.enabled_surfaces。PluginStaticInspection::statically_eligible()therefore reflects enabled/selected surfaces only for resolved Plugin records。plugin checkremains full-declaration oriented because check-time inspection uses all declared manifest surfaces as enabled。
crates/yoi/src/plugin_cli.rs:- Resolved
plugin list/showdiagnostics now use filtered static inspection。 - Added focused CLI inspection test for mixed Tool+Service package where only Service is enabled and Tool grants are absent:
- status remains
active。 - static eligibility remains true。
- unselected Tool is not listed/reported。
- unselected Tool missing grants do not produce diagnostics/rejection。
- status remains
- Resolved
Coder validation reported as passing:
cargo test -p manifest plugin -- --nocapturecargo test -p pod plugin -- --nocapturecargo test -p yoi plugin -- --nocapturecargo check -p yoicargo check -p yoi-plugin-pdkCARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.tomlcargo fmt --checkgit diff --check 5ec8bae9..HEADyoi ticket doctornix build .#yoi --no-link
Orchestrator evidence checked before r4 review:
- Implementation worktree is clean。
- HEAD is
627c8f36。 - Fix diff from
79ca0f7f..HEADtouchescrates/pod/src/feature/plugin.rsandcrates/yoi/src/plugin_cli.rs, about 209 insertions / 76 deletions。 - Overall
git diff --check 5ec8bae9..HEADproduced no diagnostics。
Next action:
- Route back to Reviewer for r4 verification of static inspection /
plugin list/showpartial-surface reporting and final acceptance criteria。
Review: approve
Verdict: approve
確認範囲:
- Ticket contract:
.yoi/tickets/00001KVJHYP4Q/item.md.yoi/tickets/00001KVJHYP4Q/thread.md
- r4 fix diff:
79ca0f7f..627c8f36 - overall implementation shape:
5ec8bae9..627c8f36 - Focused files:
crates/pod/src/feature/plugin.rscrates/yoi/src/plugin_cli.rscrates/manifest/src/plugin.rscrates/plugin-pdk/src/lib.rsresources/plugin/templates/rust-component-instance/*resources/plugin/wit/yoi-plugin-instance-v1.wit
r3 blocker verification:
- Previous static-inspection/list-show blocker is resolved。
inspect_resolved_plugin_static()now filters Tool / Service / Ingress eligibility byrecord.enabled_surfaces。PluginStaticInspection::statically_eligible()now operates over filtered/selected surface vectors for resolved records。plugin checkremains full-declaration oriented because check-time inspection constructs the record with all declared manifest surfaces enabled。- Resolved
plugin list/showdiagnostics now use filtered static inspection and include selected Service/Ingress diagnostics。 - Focused CLI test
service_only_enablement_ignores_unselected_tool_static_grantsconfirms a mixed Tool+Service package with only Service enabled remainsactive, is statically eligible, does not report the unselected Tool, and does not emit missing Tool grant diagnostics。
Earlier blocker re-check:
- Instance PDK/template shape, lifecycle returned JSON/status handling, Service/Ingress instance retention, installed-path ingress dispatch, and per-surface runtime guards remain present at a high level。
Blocking issues:
- None found。
Non-blocking follow-ups:
- None requiring this Ticket to remain blocked。
Reviewer validation passed:
cargo fmt --checkgit diff --check 5ec8bae9..HEADCARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.tomlcargo test -p manifest plugin -- --nocapturecargo test -p pod plugin -- --nocapturecargo test -p yoi plugin -- --nocapturecargo check -p yoicargo check -p yoi-plugin-pdk/home/hare/Projects/yoi/target/debug/yoi ticket doctornix build .#yoi --no-link
Template check generated resources/plugin/templates/rust-component-instance/Cargo.lock; reviewer removed it after validation。
Worktree status:
- Clean at commit
627c8f36onimpl/00001KVJHYP4Q-plugin-instance-lifecycle。
Implementation report
Reviewer r4 approvalを受けて、実装ブランチを Orchestrator worktree の orchestration branch に統合した。
統合:
- Merge commit:
43c9216e merge: plugin instance lifecycle surface - Merged branch:
impl/00001KVJHYP4Q-plugin-instance-lifecycle - Implementation commits:
147a6005 plugin: add instance lifecycle surface870bcc76 plugin: fix instance lifecycle blockers79ca0f7f plugin: enforce enabled lifecycle surfaces627c8f36 plugin: filter static enabled surfaces
Orchestrator worktree validation:
cargo fmt --check: passedgit diff --check HEAD^1..HEAD: passedcargo test -p manifest plugin -- --nocapture: passedcargo test -p pod plugin -- --nocapture: passedcargo test -p yoi plugin -- --nocapture: passedcargo check -p yoi: passedcargo check -p yoi-plugin-pdk: passedCARGO_TARGET_DIR=target/review-template cargo check --manifest-path resources/plugin/templates/rust-component-instance/Cargo.toml: passed/home/hare/Projects/yoi/target/debug/yoi ticket doctor: passednix build .#yoi --no-link: passed
Template validation generated resources/plugin/templates/rust-component-instance/Cargo.lock; it was removed after validation. Final Orchestrator worktree status is clean。
State changed
Reviewer approval、Orchestrator worktree への統合、必要な検証が完了したため done に遷移する。実装は Plugin instance lifecycle surface、Service/Ingress declarations and grants、PDK/template、static/runtime inspection、legacy compatibility、および focused tests を含む。
State changed
Ticket を closed にしました。
完了
Plugin Service/Ingress component lifecycle surface を実装し、Orchestrator worktree の orchestration branch に統合した。
主な成果:
- Pod plugin feature に host-managed
PluginInstanceRegistry/ instance handle 境界を追加し、Tool dispatch を instance 経由に変更。 - New instance-capable component world
yoi:plugin/instance@1.0.0と WIT resource を追加。 yoi-plugin-pdkと Rust component template に instance-oriented authoring support を追加。- Existing component Tool world / raw wasm Tool runtime を instance registry compatibility path に維持。
- Manifest/static validation に Service / Ingress declarations と per-surface grant validation を追加。
- Service lifecycle/status/diagnostics と bounded in-process ingress dispatch path を実装。
- Tool / Service / Ingress enabled-surface filtering を runtime install, dispatch guard, and resolved static inspection /
yoi plugin list/showに適用。 plugin checkは package declaration inspection、resolvedplugin list/showは selected/enabled surfaces に基づく reporting に分離。- Focused tests added for manifest validation, legacy Tool compatibility, instance state persistence, ingress dispatch, Service/Ingress grant denial, failure diagnostics, and partial enabled-surface static reporting。
統合・検証:
- Merge commit:
43c9216e merge: plugin instance lifecycle surface - Implementation commits:
147a6005,870bcc76,79ca0f7f,627c8f36 - Reviewer final verdict: approve
- Validation passed:
cargo fmt --check,git diff --check HEAD^1..HEAD,cargo test -p manifest plugin -- --nocapture,cargo test -p pod plugin -- --nocapture,cargo test -p yoi plugin -- --nocapture,cargo check -p yoi,cargo check -p yoi-plugin-pdk, template cargo-check,yoi ticket doctor, andnix build .#yoi --no-link。
範囲外:
- Discord Bridge 本体、public registry/install/update/signature tooling、arbitrary Plugin UI channel、hidden context injection、Service/Ingress による model-visible Tool schema mutation は実装していない。
Implementation report
Post-close cleanup completed。
- Stopped child Pods and reclaimed scope:
yoi-coder-00001KVJHYP4Qyoi-reviewer-00001KVJHYP4Q-r1
- Removed implementation worktree:
/home/hare/Projects/yoi/.worktree/00001KVJHYP4Q-plugin-instance-lifecycle
- Deleted implementation branch:
impl/00001KVJHYP4Q-plugin-instance-lifecycle
- Orchestrator worktree remains clean on
orchestrationatbc484338。
Root/original workspace was not used for merge/validation/cleanup operations beyond observing the worktree list output from the Orchestrator worktree command。