ticket: split plugin runtime redesign
This commit is contained in:
parent
79df31ccf6
commit
577bf75051
|
|
@ -2,8 +2,8 @@
|
||||||
title: "Plugin platform roadmap"
|
title: "Plugin platform roadmap"
|
||||||
state: "active"
|
state: "active"
|
||||||
created_at: "2026-06-19T13:18:58Z"
|
created_at: "2026-06-19T13:18:58Z"
|
||||||
updated_at: "2026-06-19T13:18:58Z"
|
updated_at: "2026-06-24T19:55:00Z"
|
||||||
linked_tickets: ["00001KV5R5V2S", "00001KV5W3PHA", "00001KV5W3PHW", "00001KV5W3PJ3", "00001KVFD3YSV", "00001KVFDX9AF", "00001KVFDX9AY", "00001KVG0HR96"]
|
linked_tickets: ["00001KV5R5V2S", "00001KV5W3PHA", "00001KV5W3PHW", "00001KV5W3PJ3", "00001KVFD3YSV", "00001KVFDX9AF", "00001KVFDX9AY", "00001KVG0HR96", "00001KVXHVCR5", "00001KVXK0WD3", "00001KVXK0WDH", "00001KVXK0WDQ", "00001KVXK0WDX", "00001KVXK0WE4", "00001KVXK0WEA"]
|
||||||
---
|
---
|
||||||
|
|
||||||
## Goal
|
## Goal
|
||||||
|
|
@ -42,10 +42,10 @@ Research of common Wasm extension systems points to the same pattern: mature sys
|
||||||
- Package presence never registers a Tool/Hook, executes Wasm, starts a Service, reads files, opens network, or injects context.
|
- Package presence never registers a Tool/Hook, executes Wasm, starts a Service, reads files, opens network, or injects context.
|
||||||
- Explicit enablement and Plugin grants are required before registration/execution/host API use.
|
- Explicit enablement and Plugin grants are required before registration/execution/host API use.
|
||||||
- Tool calls/results continue through ordinary ToolRegistry and Worker history paths.
|
- Tool calls/results continue through ordinary ToolRegistry and Worker history paths.
|
||||||
- Treat Component Model as the preferred future Plugin runtime shape.
|
- Treat Component Model as the active Plugin runtime shape before public release.
|
||||||
- New typed Plugin host APIs should be designed in WIT-compatible terms.
|
- New typed Plugin host APIs should be designed in WIT-compatible terms.
|
||||||
- `runtime.kind = "wasm-component"` should become the preferred runtime once implemented.
|
- `runtime.kind = "wasm-component"` is the current Plugin runtime authority for new work.
|
||||||
- Current `yoi-plugin-wasm-1` raw core-Wasm ABI remains a compatibility / migration bridge until Component Model execution and authoring are validated.
|
- The earlier `yoi-plugin-wasm-1` raw core-Wasm compatibility bridge is retired from the active roadmap because Plugin has not been publicly released and compatibility would preserve the wrong boundary.
|
||||||
- Sequence the platform in usable layers:
|
- Sequence the platform in usable layers:
|
||||||
1. Package discovery / explicit enablement / digest-pinned restore. Completed foundation.
|
1. Package discovery / explicit enablement / digest-pinned restore. Completed foundation.
|
||||||
2. Tool surface registration. Completed foundation.
|
2. Tool surface registration. Completed foundation.
|
||||||
|
|
@ -53,30 +53,49 @@ Research of common Wasm extension systems points to the same pattern: mature sys
|
||||||
4. Permission grants. Completed foundation.
|
4. Permission grants. Completed foundation.
|
||||||
5. Read-only Plugin CLI inspection (`yoi plugin list/show`) for debugging discovery/enablement/grants/runtime metadata.
|
5. Read-only Plugin CLI inspection (`yoi plugin list/show`) for debugging discovery/enablement/grants/runtime metadata.
|
||||||
6. `https` and `fs` host APIs for Tool Plugins, grant-gated and WIT-compatible.
|
6. `https` and `fs` host APIs for Tool Plugins, grant-gated and WIT-compatible.
|
||||||
7. Component Model runtime migration and authoring model.
|
7. Remove the raw core-Wasm compatibility bridge and reject legacy runtime manifests.
|
||||||
8. Guest SDK/PDK, examples, `check`/`pack`/`new` authoring tooling.
|
8. Component Model runtime and authoring model become the only active Plugin runtime path.
|
||||||
9. Service / Ingress / WebSocket or inbound HTTP only after Tool + host API foundations are stable.
|
9. Guest SDK/PDK, examples, `check`/`pack`/`new` authoring tooling target Component Model only.
|
||||||
|
10. Service / Ingress runtime is developed as host-managed lifecycle, event queue, output command, and diagnostics slices.
|
||||||
|
11. WebSocket support for long-lived integrations is host-owned connection driver + ingress event delivery + output command, not Plugin-owned polling with `recv(timeout)`.
|
||||||
- Keep Discord-style bridge goals split into two stages.
|
- Keep Discord-style bridge goals split into two stages.
|
||||||
- Outbound Discord/webhook Tool is possible after `https`.
|
- Outbound Discord/webhook Tool is possible after `https`.
|
||||||
- Bidirectional Discord bridge requires Service + Ingress + WebSocket or inbound HTTP and host routing policy.
|
- Bidirectional Discord bridge requires Service + Ingress + WebSocket or inbound HTTP and host routing policy.
|
||||||
|
|
||||||
|
## Current implementation split
|
||||||
|
|
||||||
|
The broad Plugin runtime redesign is tracked by `00001KVXHVCR5` as context only; implementation should proceed through concrete Tickets instead of routing that umbrella as a single coding task.
|
||||||
|
|
||||||
|
1. `00001KVXK0WD3` Remove legacy raw WASM Plugin runtime.
|
||||||
|
- Deletes the active `LegacyToolAdapter` / raw-Wasm execution path.
|
||||||
|
2. `00001KVXK0WDH` Reject legacy Plugin runtime in manifest and CLI diagnostics.
|
||||||
|
- Makes `plugin.toml`, `yoi plugin check/list/show`, docs, and fixtures reflect Component Model only runtime authority.
|
||||||
|
3. `00001KVXK0WDQ` Define Plugin Service lifecycle and ingress queue runtime.
|
||||||
|
- Adds host-managed lifecycle, bounded queue, serial dispatch, backpressure, timeout, and diagnostics.
|
||||||
|
4. `00001KVXK0WDX` Add Plugin service output command model.
|
||||||
|
- Lets service handlers request side effects as grant-checked commands rather than ambient authority.
|
||||||
|
5. `00001KVXK0WE4` Add host-owned WebSocket driver for Plugin services.
|
||||||
|
- Converts incoming WS frames into ingress events and sends outbound frames through output commands.
|
||||||
|
6. `00001KVXK0WEA` Update Plugin WIT PDK templates for service event runtime.
|
||||||
|
- Aligns authoring API, WIT, PDK, templates, and docs with the new event/command execution model.
|
||||||
|
|
||||||
## Success criteria / exit conditions
|
## Success criteria / exit conditions
|
||||||
|
|
||||||
- Users can inspect Plugin discovery/enablement/grant/runtime state through a read-only CLI without executing Plugin code.
|
- Users can inspect Plugin discovery/enablement/grant/runtime state through a read-only CLI without executing Plugin code.
|
||||||
- Plugin authors can build a Tool Plugin without writing raw memory/pointer ABI plumbing.
|
- Plugin authors can build a Tool Plugin without writing raw memory/pointer ABI plumbing.
|
||||||
- Tool Plugins can safely call grant-gated `https` and `fs` host APIs.
|
- Tool Plugins can safely call grant-gated `https` and `fs` host APIs.
|
||||||
- Component Model support is available or a documented migration path is active, with WIT-compatible host API types and measured packaging/runtime impact.
|
- Component Model is the only active Plugin runtime path, with WIT-compatible host API types and measured packaging/runtime impact.
|
||||||
- Plugin grants remain authoritative over registration, execution, and host API calls.
|
- Plugin grants remain authoritative over registration, execution, and host API calls.
|
||||||
- Plugin diagnostics explain missing package, invalid manifest, digest/version mismatch, missing grant, rejected schema, runtime mismatch, and unsupported host API cases safely.
|
- Plugin diagnostics explain missing package, invalid manifest, digest/version mismatch, missing grant, rejected schema, runtime mismatch, legacy runtime rejection, and unsupported host API cases safely.
|
||||||
- Existing raw core-Wasm Plugin tests either remain passing or have an explicit compatibility/deprecation decision.
|
- Raw core-Wasm Plugin compatibility is removed before public release; tests and docs no longer treat it as a current runtime.
|
||||||
- Documentation covers package format, runtime kinds, Component Model direction, host API authority, authoring SDK/templates, and operational debugging.
|
- Documentation covers package format, Component Model runtime, host API authority, authoring SDK/templates, Service/Ingress event runtime, and operational debugging.
|
||||||
- Service/Ingress work starts only after Tool Plugin + host API + diagnostics foundations are usable.
|
- Service/Ingress work is host-managed: services have lifecycle/status, ingress uses bounded queues, side effects are output commands, and WebSocket integrations use host-owned connection drivers.
|
||||||
|
|
||||||
## Decision context
|
## Decision context
|
||||||
|
|
||||||
- This Objective is roadmap context, not Ticket authority. Implementation still requires reading concrete Ticket bodies, threads, artifacts, and relations.
|
- This Objective is roadmap context, not Ticket authority. Implementation still requires reading concrete Ticket bodies, threads, artifacts, and relations.
|
||||||
- Component Model direction supersedes making Yoi's custom raw ABI the long-term authoring interface, but does not require an immediate flag-day rewrite.
|
- Component Model direction supersedes Yoi's custom raw ABI as both long-term and current active Plugin runtime authority before public release.
|
||||||
- `https` / `fs` work should avoid choices that conflict with later WIT typed interfaces.
|
- `https` / `fs` work should avoid choices that conflict with later WIT typed interfaces.
|
||||||
- Guest SDK work should either target Component Model directly or keep the raw ABI wrapper clearly transitional.
|
- Guest SDK work targets Component Model directly; raw ABI wrappers are not a supported transitional authoring path.
|
||||||
- Plugin and MCP remain separate. Component Model adoption for Plugin does not imply MCP server execution, MCP prompt/resource injection, or MCP trust policy changes.
|
- Plugin and MCP remain separate. Component Model adoption for Plugin does not imply MCP server execution, MCP prompt/resource injection, or MCP trust policy changes.
|
||||||
- Plugin surfaces remain Tool / Hook / Service / Ingress; outbound side effects are Tool metadata and host API grants, not a separate surface.
|
- Plugin surfaces remain Tool / Hook / Service / Ingress; outbound side effects are Tool metadata and host API grants, not a separate surface.
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
---
|
---
|
||||||
title: 'Redesign Plugin WASM runtime API and execution model'
|
title: 'Redesign Plugin WASM runtime API and execution model'
|
||||||
state: 'planning'
|
state: 'closed'
|
||||||
created_at: '2026-06-24T19:31:28Z'
|
created_at: '2026-06-24T19:31:28Z'
|
||||||
updated_at: '2026-06-24T19:40:53Z'
|
updated_at: '2026-06-24T19:55:18Z'
|
||||||
assignee: null
|
assignee: null
|
||||||
queued_by: 'workspace-panel'
|
queued_by: 'workspace-panel'
|
||||||
queued_at: '2026-06-24T19:39:36Z'
|
queued_at: '2026-06-24T19:39:36Z'
|
||||||
|
|
|
||||||
10
.yoi/tickets/00001KVXHVCR5/resolution.md
Normal file
10
.yoi/tickets/00001KVXHVCR5/resolution.md
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
Decomposed into the Plugin objective and concrete implementation Tickets:
|
||||||
|
|
||||||
|
- 00001KVXK0WD3 Remove legacy raw WASM Plugin runtime
|
||||||
|
- 00001KVXK0WDH Reject legacy Plugin runtime in manifest and CLI diagnostics
|
||||||
|
- 00001KVXK0WDQ Define Plugin Service lifecycle and ingress queue runtime
|
||||||
|
- 00001KVXK0WDX Add Plugin service output command model
|
||||||
|
- 00001KVXK0WE4 Add host-owned WebSocket driver for Plugin services
|
||||||
|
- 00001KVXK0WEA Update Plugin WIT PDK templates for service event runtime
|
||||||
|
|
||||||
|
The broad redesign record is no longer an implementation work item.
|
||||||
|
|
@ -105,4 +105,31 @@ Why implementation latitude is insufficient:
|
||||||
Next planning action:
|
Next planning action:
|
||||||
- Decide split plan / Objective context or convert this to an explicit design/planning artifact Ticket with a bounded v0 API decision before implementation routing.
|
- Decide split plan / Objective context or convert this to an explicit design/planning artifact Ticket with a bounded v0 API decision before implementation routing.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: hare at: 2026-06-24T19:55:18Z from: planning to: closed reason: closed field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Ticket を closed にしました。
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: close author: hare at: 2026-06-24T19:55:18Z status: closed -->
|
||||||
|
|
||||||
|
## 完了
|
||||||
|
|
||||||
|
Decomposed into the Plugin objective and concrete implementation Tickets:
|
||||||
|
|
||||||
|
- 00001KVXK0WD3 Remove legacy raw WASM Plugin runtime
|
||||||
|
- 00001KVXK0WDH Reject legacy Plugin runtime in manifest and CLI diagnostics
|
||||||
|
- 00001KVXK0WDQ Define Plugin Service lifecycle and ingress queue runtime
|
||||||
|
- 00001KVXK0WDX Add Plugin service output command model
|
||||||
|
- 00001KVXK0WE4 Add host-owned WebSocket driver for Plugin services
|
||||||
|
- 00001KVXK0WEA Update Plugin WIT PDK templates for service event runtime
|
||||||
|
|
||||||
|
The broad redesign record is no longer an implementation work item.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
|
||||||
0
.yoi/tickets/00001KVXK0WD3/artifacts/.gitkeep
Normal file
0
.yoi/tickets/00001KVXK0WD3/artifacts/.gitkeep
Normal file
39
.yoi/tickets/00001KVXK0WD3/item.md
Normal file
39
.yoi/tickets/00001KVXK0WD3/item.md
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
title: 'Remove legacy raw WASM Plugin runtime'
|
||||||
|
state: 'ready'
|
||||||
|
created_at: '2026-06-24T19:51:56Z'
|
||||||
|
updated_at: '2026-06-24T19:55:29Z'
|
||||||
|
assignee: null
|
||||||
|
---
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Plugin platform roadmap は、public release 前に raw core-Wasm runtime を compatibility bridge として残す方針を撤回し、`wasm-component` / Component Model を正の Plugin runtime として一本化する。未公開機能に legacy layer を残すと、Manifest / WIT / PDK / runtime authority / Service execution model の境界が曖昧になる。
|
||||||
|
|
||||||
|
この Ticket は最初の実装 slice として、Pod runtime 内の legacy raw `wasm` execution path と `LegacyToolAdapter` を削除する。Manifest validation / CLI diagnostics の外向き rejection は別 Ticket で扱う。
|
||||||
|
|
||||||
|
## 要件
|
||||||
|
|
||||||
|
- `PluginInstanceRuntime::LegacyToolAdapter` 相当の active execution path を削除する。
|
||||||
|
- raw core-Wasm tool execution を Plugin instance runtime の active path から外す。
|
||||||
|
- `wasm-component` runtime を Plugin execution の唯一の active runtime path とする。
|
||||||
|
- legacy path 削除に伴い、不要になった adapter-only tests / fixtures / helper を削除または component runtime 用に更新する。
|
||||||
|
- Plugin Tool execution は Component Model path で維持する。
|
||||||
|
- Host API grant boundary、package discovery、enablement、digest pinning、ToolRegistry 登録の既存挙動を壊さない。
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- Manifest / CLI diagnostics で legacy runtime を拒否する外向き UX の完成。
|
||||||
|
- Service / Ingress event queue の実装。
|
||||||
|
- WebSocket driver の実装。
|
||||||
|
- WIT / PDK / templates の service event model 更新。
|
||||||
|
- Public registry / install / update policy。
|
||||||
|
|
||||||
|
## 受け入れ条件
|
||||||
|
|
||||||
|
- `LegacyToolAdapter` または同等の legacy raw-Wasm adapter が active runtime から削除されている。
|
||||||
|
- raw `wasm` runtime を通じた Plugin Tool execution path が使われていない。
|
||||||
|
- Component Model Plugin Tool execution の既存 tests が通る。
|
||||||
|
- Legacy runtime 削除に伴う dead code / dead tests / obsolete fixtures が整理されている。
|
||||||
|
- Plugin discovery / enablement / Tool registration / grant validation の既存 tests が通る。
|
||||||
|
- `cargo test -p pod`、`cargo check -p yoi`、`git diff --check`、`nix build .#yoi --no-link` が通る。
|
||||||
24
.yoi/tickets/00001KVXK0WD3/thread.md
Normal file
24
.yoi/tickets/00001KVXK0WD3/thread.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- event: create author: "yoi ticket" at: 2026-06-24T19:51:56Z -->
|
||||||
|
|
||||||
|
## 作成
|
||||||
|
|
||||||
|
LocalTicketBackend によって作成されました。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: intake_summary author: hare at: 2026-06-24T19:55:29Z -->
|
||||||
|
|
||||||
|
## Intake summary
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: "yoi ticket" at: 2026-06-24T19:55:29Z from: planning to: ready reason: cli_state field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
0
.yoi/tickets/00001KVXK0WDH/artifacts/.gitkeep
Normal file
0
.yoi/tickets/00001KVXK0WDH/artifacts/.gitkeep
Normal file
13
.yoi/tickets/00001KVXK0WDH/artifacts/relations.json
Normal file
13
.yoi/tickets/00001KVXK0WDH/artifacts/relations.json
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"relations": [
|
||||||
|
{
|
||||||
|
"ticket_id": "00001KVXK0WDH",
|
||||||
|
"kind": "depends_on",
|
||||||
|
"target": "00001KVXK0WD3",
|
||||||
|
"note": "Manifest/CLI rejection should follow removal of the active legacy runtime path.",
|
||||||
|
"author": "yoi ticket",
|
||||||
|
"at": "2026-06-24T19:55:30Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
39
.yoi/tickets/00001KVXK0WDH/item.md
Normal file
39
.yoi/tickets/00001KVXK0WDH/item.md
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
title: 'Reject legacy Plugin runtime in manifest and CLI diagnostics'
|
||||||
|
state: 'ready'
|
||||||
|
created_at: '2026-06-24T19:51:56Z'
|
||||||
|
updated_at: '2026-06-24T19:55:30Z'
|
||||||
|
assignee: null
|
||||||
|
---
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Plugin runtime は public release 前に `wasm-component` へ一本化する。runtime implementation から legacy raw `wasm` path を削除しても、Manifest parser / validator / `yoi plugin check/list/show` が legacy runtime を曖昧に受け付けると、ユーザー向け API と実装方針がズレる。
|
||||||
|
|
||||||
|
この Ticket では、legacy runtime を外向き schema / diagnostics でも明示的に拒否し、docs / fixtures から transitional wording を消す。
|
||||||
|
|
||||||
|
## 要件
|
||||||
|
|
||||||
|
- `plugin.toml` の runtime validation で legacy raw `wasm` / `yoi-plugin-wasm-1` を新規 Plugin runtime として受け付けない。
|
||||||
|
- `runtime.kind = "wasm-component"` を正の runtime kind として扱う。
|
||||||
|
- `yoi plugin check` は legacy runtime を invalid / unsupported として分かりやすく報告する。
|
||||||
|
- `yoi plugin list/show` は legacy package を有効 Plugin として曖昧に表示しない。
|
||||||
|
- docs/design / docs/development / templates / examples から「raw core-Wasm compatibility bridge を残す」前提の記述を削除または撤回済み方針に更新する。
|
||||||
|
- Manifest schema / static inspection / error message tests を更新する。
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- Runtime internal の legacy adapter 削除そのもの。
|
||||||
|
- Service / Ingress event runtime の実装。
|
||||||
|
- WebSocket driver の実装。
|
||||||
|
- PDK API の全面更新。
|
||||||
|
|
||||||
|
## 受け入れ条件
|
||||||
|
|
||||||
|
- Legacy raw `wasm` runtime manifest が validation で拒否される。
|
||||||
|
- `yoi-plugin-wasm-1` ABI は current public/recommended Plugin API として表示されない。
|
||||||
|
- `yoi plugin check/list/show` が legacy runtime package を安全かつ明確に diagnostic する。
|
||||||
|
- Component Model package の check/list/show は regress しない。
|
||||||
|
- Plugin objective / design / development docs が Component Model only 方針と整合している。
|
||||||
|
- Legacy runtime 前提の fixtures が削除または rejected fixture として更新されている。
|
||||||
|
- `cargo test -p manifest`、`cargo test -p yoi`、`cargo check -p yoi`、`git diff --check`、`nix build .#yoi --no-link` が通る。
|
||||||
24
.yoi/tickets/00001KVXK0WDH/thread.md
Normal file
24
.yoi/tickets/00001KVXK0WDH/thread.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- event: create author: "yoi ticket" at: 2026-06-24T19:51:56Z -->
|
||||||
|
|
||||||
|
## 作成
|
||||||
|
|
||||||
|
LocalTicketBackend によって作成されました。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: intake_summary author: hare at: 2026-06-24T19:55:29Z -->
|
||||||
|
|
||||||
|
## Intake summary
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: "yoi ticket" at: 2026-06-24T19:55:29Z from: planning to: ready reason: cli_state field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
0
.yoi/tickets/00001KVXK0WDQ/artifacts/.gitkeep
Normal file
0
.yoi/tickets/00001KVXK0WDQ/artifacts/.gitkeep
Normal file
13
.yoi/tickets/00001KVXK0WDQ/artifacts/relations.json
Normal file
13
.yoi/tickets/00001KVXK0WDQ/artifacts/relations.json
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"relations": [
|
||||||
|
{
|
||||||
|
"ticket_id": "00001KVXK0WDQ",
|
||||||
|
"kind": "depends_on",
|
||||||
|
"target": "00001KVXK0WDH",
|
||||||
|
"note": "Service runtime should build on Component Model-only plugin runtime authority.",
|
||||||
|
"author": "yoi ticket",
|
||||||
|
"at": "2026-06-24T19:55:30Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
44
.yoi/tickets/00001KVXK0WDQ/item.md
Normal file
44
.yoi/tickets/00001KVXK0WDQ/item.md
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
title: 'Define Plugin Service lifecycle and ingress queue runtime'
|
||||||
|
state: 'ready'
|
||||||
|
created_at: '2026-06-24T19:51:56Z'
|
||||||
|
updated_at: '2026-06-24T19:55:30Z'
|
||||||
|
assignee: null
|
||||||
|
---
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Current Plugin instance support exposes `start` / `handle-ingress` / `status` / `stop`, but the execution model is still effectively synchronous function invocation. Service Plugins need a host-managed lifecycle and event queue so `start()` can return promptly, while external events are later delivered to `handle-ingress` without requiring a Plugin-owned polling loop.
|
||||||
|
|
||||||
|
This Ticket implements the first service runtime slice: lifecycle state, ingress queue, serial dispatch, backpressure, timeout, and failure semantics. WebSocket-specific event sources and output commands are handled by later Tickets.
|
||||||
|
|
||||||
|
## 要件
|
||||||
|
|
||||||
|
- Service Plugin lifecycle を host-managed state として扱う。
|
||||||
|
- ready / starting / running / stopping / stopped / failed 相当。
|
||||||
|
- `start()` は initialization only とし、long-running loop / polling loop / recv loop を担わない。
|
||||||
|
- Service Plugin ごとに bounded ingress queue を持つ。
|
||||||
|
- Ingress event は source / ingress name / payload / created_at / attempt / correlation id を持つ。
|
||||||
|
- v0 dispatch は per-plugin serial dispatch とする。
|
||||||
|
- dispatch timeout、Plugin failure、queue full、invalid event、stop 中 event の扱いを typed にする。
|
||||||
|
- queue / lifecycle / failure state は status diagnostics として取得できる。
|
||||||
|
- Existing Tool Plugin execution は service queue に巻き込まず、request-response operation として維持する。
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- WebSocket connection driver の実装。
|
||||||
|
- Plugin output command model の本実装。
|
||||||
|
- Discord / Slack など特定 integration。
|
||||||
|
- Concurrent per-plugin event execution。
|
||||||
|
- Durable cross-process event queue。
|
||||||
|
|
||||||
|
## 受け入れ条件
|
||||||
|
|
||||||
|
- Service Plugin instance が host-managed lifecycle state を持つ。
|
||||||
|
- `start()` が返った後でも ingress event を queue 経由で配送できる。
|
||||||
|
- Queue は bounded で、full / timeout / failed service が typed error / diagnostic として扱われる。
|
||||||
|
- 同一 Plugin instance への ingress dispatch は serial に処理される。
|
||||||
|
- `status()` または host diagnostics から lifecycle state / queue depth / last error / dispatch counters を確認できる。
|
||||||
|
- Service lifecycle / ingress queue の unit tests が追加されている。
|
||||||
|
- Tool Plugin execution tests が regress しない。
|
||||||
|
- `cargo test -p pod`、`cargo check -p yoi`、`git diff --check`、`nix build .#yoi --no-link` が通る。
|
||||||
24
.yoi/tickets/00001KVXK0WDQ/thread.md
Normal file
24
.yoi/tickets/00001KVXK0WDQ/thread.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- event: create author: "yoi ticket" at: 2026-06-24T19:51:56Z -->
|
||||||
|
|
||||||
|
## 作成
|
||||||
|
|
||||||
|
LocalTicketBackend によって作成されました。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: intake_summary author: hare at: 2026-06-24T19:55:29Z -->
|
||||||
|
|
||||||
|
## Intake summary
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: "yoi ticket" at: 2026-06-24T19:55:29Z from: planning to: ready reason: cli_state field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
0
.yoi/tickets/00001KVXK0WDX/artifacts/.gitkeep
Normal file
0
.yoi/tickets/00001KVXK0WDX/artifacts/.gitkeep
Normal file
13
.yoi/tickets/00001KVXK0WDX/artifacts/relations.json
Normal file
13
.yoi/tickets/00001KVXK0WDX/artifacts/relations.json
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"relations": [
|
||||||
|
{
|
||||||
|
"ticket_id": "00001KVXK0WDX",
|
||||||
|
"kind": "depends_on",
|
||||||
|
"target": "00001KVXK0WDQ",
|
||||||
|
"note": "Output commands are returned by service ingress dispatch.",
|
||||||
|
"author": "yoi ticket",
|
||||||
|
"at": "2026-06-24T19:55:30Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
44
.yoi/tickets/00001KVXK0WDX/item.md
Normal file
44
.yoi/tickets/00001KVXK0WDX/item.md
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
title: 'Add Plugin service output command model'
|
||||||
|
state: 'ready'
|
||||||
|
created_at: '2026-06-24T19:51:56Z'
|
||||||
|
updated_at: '2026-06-24T19:55:30Z'
|
||||||
|
assignee: null
|
||||||
|
---
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Service / Ingress Plugin が外部 event を処理した後、WebSocket send、HTTP request、diagnostic update などの side effect を直接 ambient authority で実行すると、grant boundary と observability が曖昧になる。Plugin は event handler の戻り値として output commands を返し、Host が manifest declaration / enablement grant / runtime policy を検査して実行する形にしたい。
|
||||||
|
|
||||||
|
この Ticket では WebSocket driver 実装前に、Service Plugin の output command envelope と grant check 境界を追加する。
|
||||||
|
|
||||||
|
## 要件
|
||||||
|
|
||||||
|
- `handle-ingress` / service event handler の戻り値に output command list を表現できる型を追加する。
|
||||||
|
- v0 command kind を最小集合で定義する。
|
||||||
|
- diagnostic/status update。
|
||||||
|
- host request dispatch placeholder。
|
||||||
|
- websocket send placeholder。
|
||||||
|
- Command は correlation id / source event id / command id / kind / payload / requested_at を持つ。
|
||||||
|
- Host が command ごとに manifest declaration と enablement grant を検査する。
|
||||||
|
- Unsupported / ungranted / malformed command は fail closed で diagnostic に残す。
|
||||||
|
- Command execution result は service status / run overview / diagnostics から追える形にする。
|
||||||
|
- Tool Plugin の ordinary ToolOutput path と混同しない。
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- WebSocket send の実 transport 実装。
|
||||||
|
- HTTP request dispatch command の完全実装。
|
||||||
|
- Domain operation command の完成。
|
||||||
|
- LLM history への hidden context injection。
|
||||||
|
- Unrestricted shell / filesystem command。
|
||||||
|
|
||||||
|
## 受け入れ条件
|
||||||
|
|
||||||
|
- Service Plugin ingress handler が output command envelope を返せる。
|
||||||
|
- Host が output command を parse / validate / grant-check する。
|
||||||
|
- Ungranted command は実行されず、typed diagnostic になる。
|
||||||
|
- Diagnostic/status update command のような safe v0 command が実行または記録される。
|
||||||
|
- WebSocket send / request dispatch は placeholder command として grant-check 可能で、実 transport が無くても安全に unsupported として扱える。
|
||||||
|
- Tool Plugin output と Service Plugin output command が型・docs・testsで区別されている。
|
||||||
|
- `cargo test -p pod`、`cargo check -p yoi`、`git diff --check`、`nix build .#yoi --no-link` が通る。
|
||||||
24
.yoi/tickets/00001KVXK0WDX/thread.md
Normal file
24
.yoi/tickets/00001KVXK0WDX/thread.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- event: create author: "yoi ticket" at: 2026-06-24T19:51:56Z -->
|
||||||
|
|
||||||
|
## 作成
|
||||||
|
|
||||||
|
LocalTicketBackend によって作成されました。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: intake_summary author: hare at: 2026-06-24T19:55:29Z -->
|
||||||
|
|
||||||
|
## Intake summary
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: "yoi ticket" at: 2026-06-24T19:55:29Z from: planning to: ready reason: cli_state field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
0
.yoi/tickets/00001KVXK0WE4/artifacts/.gitkeep
Normal file
0
.yoi/tickets/00001KVXK0WE4/artifacts/.gitkeep
Normal file
21
.yoi/tickets/00001KVXK0WE4/artifacts/relations.json
Normal file
21
.yoi/tickets/00001KVXK0WE4/artifacts/relations.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"relations": [
|
||||||
|
{
|
||||||
|
"ticket_id": "00001KVXK0WE4",
|
||||||
|
"kind": "depends_on",
|
||||||
|
"target": "00001KVXK0WDQ",
|
||||||
|
"note": "WebSocket frames are delivered through the service ingress queue.",
|
||||||
|
"author": "yoi ticket",
|
||||||
|
"at": "2026-06-24T19:55:30Z"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ticket_id": "00001KVXK0WE4",
|
||||||
|
"kind": "depends_on",
|
||||||
|
"target": "00001KVXK0WDX",
|
||||||
|
"note": "WebSocket sends are executed through output commands.",
|
||||||
|
"author": "yoi ticket",
|
||||||
|
"at": "2026-06-24T19:55:30Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
46
.yoi/tickets/00001KVXK0WE4/item.md
Normal file
46
.yoi/tickets/00001KVXK0WE4/item.md
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
---
|
||||||
|
title: 'Add host-owned WebSocket driver for Plugin services'
|
||||||
|
state: 'ready'
|
||||||
|
created_at: '2026-06-24T19:51:56Z'
|
||||||
|
updated_at: '2026-06-24T19:55:30Z'
|
||||||
|
assignee: null
|
||||||
|
---
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Current `host_api.websocket` is a pull primitive: Plugin code must explicitly call `recv(timeout)` while an exported function is running. That is insufficient for Discord Gateway / Slack Socket Mode style long-lived integrations. Service Plugins need Host-owned WebSocket connections whose incoming frames are queued as ingress events and whose outgoing sends are requested through output commands.
|
||||||
|
|
||||||
|
This Ticket adds the WebSocket-specific event source and command executor on top of the Service ingress queue and output command model.
|
||||||
|
|
||||||
|
## 要件
|
||||||
|
|
||||||
|
- Host-owned WebSocket connection driver を追加する。
|
||||||
|
- Plugin manifest / grant で WebSocket subscription / target authority を表現できる。
|
||||||
|
- Host が connect / reader task / close / error detection を管理する。
|
||||||
|
- Incoming text frame を Plugin ingress event に変換し、service ingress queue に enqueue する。
|
||||||
|
- Close / error / reconnect-needed も ingress event または status diagnostic として扱う。
|
||||||
|
- Plugin からの WebSocket send は output command として受け取り、grant check 後に Host が送信する。
|
||||||
|
- v0 で扱う frame kind を明確にする。
|
||||||
|
- text frame required。
|
||||||
|
- binary / ping / pong / close の扱いを diagnostic / unsupported / control handling として定義する。
|
||||||
|
- Connection status、last frame time、last error、queue drops、send failures を diagnostics に出す。
|
||||||
|
- Existing `recv(timeout)` pull API は long-lived integration の recommended path にしない。
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- Discord protocol implementation。
|
||||||
|
- Full reconnect / resume policy の完成。
|
||||||
|
- Secret store / auth injection の全面設計。
|
||||||
|
- Binary frame application payload support。
|
||||||
|
- Browser-facing WebSocket API。
|
||||||
|
|
||||||
|
## 受け入れ条件
|
||||||
|
|
||||||
|
- Host-owned WebSocket driver が Service Plugin に紐づく connection を管理できる。
|
||||||
|
- Incoming text frame が Plugin ingress queue に event として入る。
|
||||||
|
- Plugin output command から WebSocket text send が実行される。
|
||||||
|
- Ungranted send / unauthorized target は fail closed で diagnostic になる。
|
||||||
|
- Connection close / error が service status diagnostics に反映される。
|
||||||
|
- Existing pull `recv(timeout)` API が docs/templates の recommended service integration path から外れている。
|
||||||
|
- WebSocket driver / ingress / send command の tests が追加されている。
|
||||||
|
- `cargo test -p pod`、`cargo check -p yoi`、`git diff --check`、`nix build .#yoi --no-link` が通る。
|
||||||
24
.yoi/tickets/00001KVXK0WE4/thread.md
Normal file
24
.yoi/tickets/00001KVXK0WE4/thread.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- event: create author: "yoi ticket" at: 2026-06-24T19:51:56Z -->
|
||||||
|
|
||||||
|
## 作成
|
||||||
|
|
||||||
|
LocalTicketBackend によって作成されました。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: intake_summary author: hare at: 2026-06-24T19:55:30Z -->
|
||||||
|
|
||||||
|
## Intake summary
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: "yoi ticket" at: 2026-06-24T19:55:30Z from: planning to: ready reason: cli_state field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
0
.yoi/tickets/00001KVXK0WEA/artifacts/.gitkeep
Normal file
0
.yoi/tickets/00001KVXK0WEA/artifacts/.gitkeep
Normal file
13
.yoi/tickets/00001KVXK0WEA/artifacts/relations.json
Normal file
13
.yoi/tickets/00001KVXK0WEA/artifacts/relations.json
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"relations": [
|
||||||
|
{
|
||||||
|
"ticket_id": "00001KVXK0WEA",
|
||||||
|
"kind": "depends_on",
|
||||||
|
"target": "00001KVXK0WE4",
|
||||||
|
"note": "Authoring templates should reflect the implemented WebSocket event/command model.",
|
||||||
|
"author": "yoi ticket",
|
||||||
|
"at": "2026-06-24T19:55:30Z"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
41
.yoi/tickets/00001KVXK0WEA/item.md
Normal file
41
.yoi/tickets/00001KVXK0WEA/item.md
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
title: 'Update Plugin WIT PDK templates for service event runtime'
|
||||||
|
state: 'ready'
|
||||||
|
created_at: '2026-06-24T19:51:56Z'
|
||||||
|
updated_at: '2026-06-24T19:55:30Z'
|
||||||
|
assignee: null
|
||||||
|
---
|
||||||
|
|
||||||
|
## 背景
|
||||||
|
|
||||||
|
Runtime implementation が Component Model only、host-managed Service lifecycle、Ingress queue、output command、host-owned WebSocket driver へ移るなら、WIT / PDK / templates / docs もその実行モデルを正として表現する必要がある。PDK が long-running `start()` loop や explicit `recv(timeout)` polling を推奨すると、runtime 方針と authoring UX がズレる。
|
||||||
|
|
||||||
|
この Ticket は implementation runtime が揃った後、外部 authoring API を新 model に合わせて更新する仕上げ slice とする。
|
||||||
|
|
||||||
|
## 要件
|
||||||
|
|
||||||
|
- WIT world / interfaces を新しい Service lifecycle / Ingress event / output command model に合わせて更新する。
|
||||||
|
- PDK API は `start()` で long-running loop を書かせない形にする。
|
||||||
|
- PDK は ingress event handler から output command を返す authoring model を提供する。
|
||||||
|
- WebSocket integration template は Host-owned subscription / ingress event / send command pattern を示す。
|
||||||
|
- Tool template は bounded request-response Tool Plugin として維持する。
|
||||||
|
- `plugin.toml` template は `wasm-component` runtime のみを生成する。
|
||||||
|
- `yoi plugin new` / `check` / `pack` が新 templates / schema と整合する。
|
||||||
|
- Docs は legacy raw `wasm` runtime、polling WebSocket loop、ambient authority を推奨しない。
|
||||||
|
|
||||||
|
## Non-goals
|
||||||
|
|
||||||
|
- Runtime internal queue / WebSocket driver の本実装。
|
||||||
|
- Discord-specific PDK abstraction。
|
||||||
|
- Public plugin registry。
|
||||||
|
- MCP bridge integration。
|
||||||
|
|
||||||
|
## 受け入れ条件
|
||||||
|
|
||||||
|
- WIT files が Component Model only runtime と Service event/command model を表現している。
|
||||||
|
- `yoi-plugin-pdk` が Tool Plugin と Service/Ingress Plugin の新 API を提供する。
|
||||||
|
- Templates は legacy raw `wasm` runtime を生成しない。
|
||||||
|
- Service/WebSocket template は polling `recv(timeout)` loop ではなく ingress event / output command pattern を使う。
|
||||||
|
- `yoi plugin new rust-component-tool` と service-oriented template が check/pack できる。
|
||||||
|
- Development docs が新 authoring model と authority boundary を説明している。
|
||||||
|
- `cargo test -p yoi-plugin-pdk`、`cargo test -p yoi`、`cargo check -p yoi`、`git diff --check`、`nix build .#yoi --no-link` が通る。
|
||||||
24
.yoi/tickets/00001KVXK0WEA/thread.md
Normal file
24
.yoi/tickets/00001KVXK0WEA/thread.md
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
<!-- event: create author: "yoi ticket" at: 2026-06-24T19:51:56Z -->
|
||||||
|
|
||||||
|
## 作成
|
||||||
|
|
||||||
|
LocalTicketBackend によって作成されました。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: intake_summary author: hare at: 2026-06-24T19:55:30Z -->
|
||||||
|
|
||||||
|
## Intake summary
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- event: state_changed author: "yoi ticket" at: 2026-06-24T19:55:30Z from: planning to: ready reason: cli_state field: state -->
|
||||||
|
|
||||||
|
## State changed
|
||||||
|
|
||||||
|
Marked ready by `yoi ticket state`.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
Loading…
Reference in New Issue
Block a user