11 KiB
11 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:
- ユーザーから「続けて」と明示 follow-up があり、queued dependency chain の最終 Ticket として再確認した。
00001KVXK0WEAは WIT / PDK / templates / docs を、既に実装済みの Component Model-only runtime、Service lifecycle / ingress queue、Service output commands、host-owned WebSocket driver に合わせる finishing slice である。- outgoing
depends_onは00001KVXK0WE4だが、00001KVXK0WE4は done / merged / reviewed / validated 済み。TicketShowderived blockers は空で、implementation acceptance blocker は残っていない。 - bounded context check で
resources/plugin/wit/*,crates/plugin-pdk,resources/plugin/templates/rust-component-tool,crates/yoi/src/plugin_cli.rs,docs/development/plugin-development.md周辺に authoring-facing surfaces があることを確認した。Ticket は runtime 実装ではなく authoring surface alignment に限定されており、残る不確実性は local implementation / fixture update に閉じる。
Evidence checked:
- Ticket body / thread:
item.md,thread.md。未解決 planning question は記録されていない。 - Relations / orchestration plan: outgoing depends_on
00001KVXK0WE4は done。routing 前 plan は historical blocked_by00001KVXK0WE4のみで、prerequisite 完了により解消済み。accepted planorch-plan-20260625-070739-2を記録済み。 - Related Tickets:
00001KVXK0WD3,00001KVXK0WDH,00001KVXK0WDQ,00001KVXK0WDX,00001KVXK0WE4are done. - Code/docs context:
resources/plugin/wit/*.wit,crates/plugin-pdk,resources/plugin/templates/rust-component-tool,crates/yoi/src/plugin_cli.rs,docs/development/plugin-development.md。 - Workspace state:
/home/hare/Projects/yoi/.worktree/orchestrationは clean。inprogress Ticket は 0 件。
IntentPacket:
Intent:
- Plugin authoring surface (WIT, Rust PDK, embedded templates, docs,
yoi plugin new/check/packfixtures) を、Component Model-only runtime と Service ingress event / output command / host-owned WebSocket model に合わせて更新する。
Binding decisions / invariants:
plugin.tomltemplate はwasm-componentruntime のみを生成する。- Service/WebSocket authoring pattern は polling
recv(timeout)loop ではなく、ingress event handler + output command (websocket_send) を正とする。 - Tool Plugin authoring support must continue to work.
- Runtime implementation from previous Tickets is not redesigned here; this Ticket updates WIT/PDK/templates/docs/tests to match it.
- No raw core-Wasm compatibility template or legacy runtime alias is introduced.
- No protocol-specific Discord/Slack integration, secret store/auth injection, or full reconnect policy is implemented.
Requirements / acceptance criteria:
- WIT expresses Service ingress event payloads and output command model enough for authoring/tests.
yoi-plugin-pdkexposes ergonomic Tool and Service/Ingress helpers aligned with runtime JSON envelopes.- Embedded templates include current Tool template and a service-oriented template or equivalent examples using ingress event / output command pattern.
yoi plugin new/check/packare consistent with new templates/schema.- Docs no longer recommend long-running
recv(timeout)loop for Service WebSocket integration. - Tests cover PDK helpers, template generation/check/pack, and docs/manifest fixture consistency.
Implementation latitude:
- Exact WIT/interface names and Rust PDK helper APIs may follow existing PDK style, as long as runtime envelopes and docs are consistent.
- If a full new
plugin newtemplate name is too large, coder may add minimal service template/example plus CLI support needed to satisfy acceptance, but must keep scope bounded. - Template wasm build/check may use existing test helpers and temporary target dirs.
Escalate if:
- WIT/PDK update requires changing runtime JSON envelope semantics from previous Tickets.
yoi plugin new/check/packrequires broad CLI redesign.- Real WebSocket network/protocol integration or secret handling is needed.
- Legacy raw-WASM compatibility has to be restored for templates/tests.
Validation:
cargo test -p yoi-plugin-pdkcargo test -p yoi pluginor focused plugin CLI/template testscargo check -p yoigit diff --checknix build .#yoi --no-link- Template cargo-check if applicable, with cleanup of generated template artifacts.
Current code/docs map:
- Primary:
resources/plugin/wit/*.wit,crates/plugin-pdk,resources/plugin/templates/rust-component-tool, possible new template underresources/plugin/templates/,crates/yoi/src/plugin_cli.rs,docs/development/plugin-development.md。 - Secondary: manifest tests/fixtures only as needed.
- Avoid: Pod runtime reimplementation, WebSocket driver changes unless minor doc/test alignment, protocol-specific integrations, secret store/auth injection, raw-WASM compatibility。
Critical risks / reviewer focus:
- PDK/template API drift from runtime JSON envelopes。
- Tool template regression while adding Service support。
- reintroducing
recv(timeout)as recommended Service pattern。 - template generation/check/pack writing outside destination or leaving build artifacts。
- accidental legacy raw-WASM runtime compatibility in examples。
Next action:
queued -> inprogressを記録してから worktree-workflow で/home/hare/Projects/yoi/.worktree/00001KVXK0WEA-plugin-pdk-service-eventsを作成し、multi-agent-workflow で Coder/Reviewer sibling loop に進める。
State changed
Orchestrator acceptance: queued -> inprogress
- 直前確認で
TicketShowは statequeued、derived blockers は空。 - outgoing dependency
00001KVXK0WE4は done / merged / reviewed / validated 済み。 - accepted plan
orch-plan-20260625-070739-2を確認した。 - routing decision と IntentPacket は Ticket thread に記録済み。
- これ以降に worktree-workflow で
/home/hare/Projects/yoi/.worktree/00001KVXK0WEA-plugin-pdk-service-eventsを作成し、multi-agent-workflow に接続する。
Implementation report
Implementation orchestration update:
- prerequisite
00001KVXK0WE4が done になったため、00001KVXK0WEAを再 routing して受理した。 - worktree-workflow に従い、implementation worktree
/home/hare/Projects/yoi/.worktree/00001KVXK0WEA-plugin-pdk-service-eventsと branchwork/00001KVXK0WEA-plugin-pdk-service-eventsを作成した。 - child worktree では tracked
.yoiproject records を見える状態にし、.yoi/memory、local/runtime/log/lock/secret-like.yoipaths を sparse-checkout で除外する方針にした。 - Coder Pod
yoi-coder-00001KVXK0WEA-pdk-service-eventsを sibling として起動した。write scope は child worktree に限定し、runtime workspace root/home/hare/Projects/yoiは startup 要件を満たすため non-recursive read のみにした。 - Coder には root/original workspace と orchestration worktree で read/write/validation/git operation を行わないよう明示した。
Implementation report
Implementation report:
対象 Ticket:
00001KVXK0WEA— Update Plugin WIT PDK templates for service event runtime
実装概要:
- Plugin authoring surface を Component Model-only / Service ingress event / output command model に合わせて更新した。
変更ファイル:
resources/plugin/wit/yoi-plugin-instance-v1.wit- Service ingress event JSON と
output_commands/websocket_sendの authoring 向け説明を追加。
- Service ingress event JSON と
resources/plugin/wit/yoi-plugin-tool-v1.wit- current runtime 前提の説明に整理。
crates/plugin-pdk/src/lib.rsPluginIngressEventにingress_name,created_at,attempt,correlation_idを追加。ServiceOutput,ServiceOutputCommand,ServiceOutputCommandKindを追加。PluginIngressEvent::websocket_text(),websocket_send(),ServiceOutput::websocket_send()を追加。Plugin::handle_ingressの戻り値をServiceOutputに変更。
crates/plugin-pdk/tests/template.rs- PDK helper / WIT / template consistency tests を追加・更新。
resources/plugin/templates/rust-component-instance/*- Service-oriented template に更新。
- guest-side
recv(timeout)loop ではなく、handle_ingressで ingress event を受け、ServiceOutput::websocket_sendで output command を返す構成に変更。 plugin.tomlはruntime.kind = "wasm-component"のみ。- Tool handler も残し、Tool Plugin authoring support を維持。
crates/yoi/src/plugin_cli.rs,crates/yoi/src/main.rsyoi plugin new rust-component-service <path>を追加。- service template の
new/check/packconsistency を unit test で確認。 - CLI usage を更新。
docs/development/plugin-development.md- Service/Ingress は host-owned ingress event + output command model として記述。
- Service WebSocket integration で long-running guest
recv(timeout)loop を推奨しない内容に更新。
Validation:
cargo test -p yoi-plugin-pdk: successcargo test -p yoi plugin: successcargo check -p yoi: successgit diff --check: successnix build .#yoi --no-link: success (nix-exit:0)- Template cargo-check: success
cargo test -p yoi-plugin-pdk内でrust-component-tool/rust-component-instanceのcargo check --target wasm32-unknown-unknown --offline --target-dir <temp>を実行し、temporary target dir を使用。
Commit:
7a4fd975268b655dca2f0861b8f2bd767c1e914f feat: update plugin service authoring templates
Residual risks / notes:
- Runtime envelope の再設計は行っていない。
- protocol-specific integration / secret injection / reconnect policy / runtime reimplementation は範囲外として未実装。