From 2601bfa9f0500701dd7bc85ac7465d6d284c2a40 Mon Sep 17 00:00:00 2001 From: Hare Date: Sun, 21 Jun 2026 17:12:13 +0900 Subject: [PATCH] ticket: complete plugin request host api --- .yoi/tickets/00001KVMG8FTW/item.md | 4 +- .yoi/tickets/00001KVMG8FTW/resolution.md | 23 ++++++++ .yoi/tickets/00001KVMG8FTW/thread.md | 75 ++++++++++++++++++++++++ 3 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 .yoi/tickets/00001KVMG8FTW/resolution.md diff --git a/.yoi/tickets/00001KVMG8FTW/item.md b/.yoi/tickets/00001KVMG8FTW/item.md index 095c6441..b9575353 100644 --- a/.yoi/tickets/00001KVMG8FTW/item.md +++ b/.yoi/tickets/00001KVMG8FTW/item.md @@ -1,8 +1,8 @@ --- title: 'Plugin: host_api.https を廃止して URL 権限ベースの host_api.request に統合する' -state: 'inprogress' +state: 'closed' created_at: '2026-06-21T07:10:30Z' -updated_at: '2026-06-21T08:08:04Z' +updated_at: '2026-06-21T08:12:06Z' assignee: null readiness: 'implementation_ready' risk_flags: ['plugin', 'host-api', 'public-api', 'permissions', 'security', 'local-network', 'breaking-change'] diff --git a/.yoi/tickets/00001KVMG8FTW/resolution.md b/.yoi/tickets/00001KVMG8FTW/resolution.md new file mode 100644 index 00000000..f9ffcfaa --- /dev/null +++ b/.yoi/tickets/00001KVMG8FTW/resolution.md @@ -0,0 +1,23 @@ +Plugin host API の one-shot outbound request capability を `host_api.https` / `grants.https` から URL permission based `host_api.request` に置き換え、Orchestrator worktree の `orchestration` branch に統合した。 + +主な成果: +- Active API / docs / WIT naming を `request` に移行。 +- Manifest に `host_api.request` と `[[request]]` target declaration を追加。 +- Enablement grant を request target grant として扱うよう変更。 +- Runtime authorization を manifest-declared request target と enabled request grant の両方が URL/method/scheme/host/port/path coverage で許可する場合のみ network I/O に進む形にした。 +- Grant-only / missing-grant / broad / partial-coverage states を static inspection と `yoi plugin show` diagnostics で区別。 +- Broad/covering grant と broad manifest + narrower grant の intersection semantics を runtime と static inspection で一致させた。 +- Loopback/local/private target は ambient ではなく、URL host declaration + grant に基づく明示 authority として扱う方針を docs に記録。 +- Embedded credentials、credential-like headers、WebSocket URLs/upgrades、SSE/event-stream requests を reject/unsupported にした。 +- Old `host_api.https` / `grants.https` / `PluginHttps*` / old WIT names は active code/docs/resources から削除。 +- Focused manifest / pod / yoi plugin CLI tests を追加・更新。 + +統合・検証: +- Merge commit: `8a15cca5 merge: plugin request host api` +- Implementation commits: `962b7699`, `0e14e7c1` +- Reviewer final verdict: approve +- Validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p manifest request --quiet`, `cargo test -p pod feature::plugin::tests --lib --quiet`, `cargo test -p yoi plugin_cli::tests --quiet`, `cargo check -p manifest -p pod -p yoi --quiet`, stale active naming grep, `cargo run -p yoi -- ticket doctor`, and `nix build .#yoi --no-link`。 + +範囲外: +- Regex URL target matching は追加していない。 +- WebSocket/SSE/persistent connection support は `host_api.request` に含めていない。WebSocket は別 capability / design Ticket 側で扱う。 \ No newline at end of file diff --git a/.yoi/tickets/00001KVMG8FTW/thread.md b/.yoi/tickets/00001KVMG8FTW/thread.md index 51423be4..25451080 100644 --- a/.yoi/tickets/00001KVMG8FTW/thread.md +++ b/.yoi/tickets/00001KVMG8FTW/thread.md @@ -415,3 +415,78 @@ Worktree status: - Clean at HEAD `0e14e7c1` on `impl/00001KVMG8FTW-plugin-request-host-api`。 --- + + + +## Implementation report + +Reviewer r2 approvalを受けて、実装ブランチを Orchestrator worktree の `orchestration` branch に統合した。 + +統合: +- Merge commit: `8a15cca5 merge: plugin request host api` +- Merged branch: `impl/00001KVMG8FTW-plugin-request-host-api` +- Implementation commits: + - `962b7699 plugin: replace https host api with request grants` + - `0e14e7c1 plugin: align request grant inspection coverage` + +Orchestrator worktree validation: +- `cargo fmt --check`: passed +- `git diff --check HEAD^1..HEAD`: passed +- `cargo test -p manifest request --quiet`: passed (`7 passed`) +- `cargo test -p pod feature::plugin::tests --lib --quiet`: passed (`69 passed`) +- `cargo test -p yoi plugin_cli::tests --quiet`: passed (`18 passed`) +- `cargo check -p manifest -p pod -p yoi --quiet`: passed +- Stale active naming grep: `git grep -n -E 'host_api\.https|grants\.https|PluginHttps|yoi:host/https|yoi:https' -- crates docs resources`: no matches +- `cargo run -p yoi -- ticket doctor`: passed (`doctor: ok`) +- `nix build .#yoi --no-link`: passed + +Final Orchestrator worktree status after validation: clean on `orchestration` at `8a15cca5`。 + +--- + + + +## State changed + +Reviewer approval、Orchestrator worktree への統合、focused plugin request tests/checks、stale naming grep、Ticket doctor、Nix build が完了したため `done` に遷移する。 + +--- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +Plugin host API の one-shot outbound request capability を `host_api.https` / `grants.https` から URL permission based `host_api.request` に置き換え、Orchestrator worktree の `orchestration` branch に統合した。 + +主な成果: +- Active API / docs / WIT naming を `request` に移行。 +- Manifest に `host_api.request` と `[[request]]` target declaration を追加。 +- Enablement grant を request target grant として扱うよう変更。 +- Runtime authorization を manifest-declared request target と enabled request grant の両方が URL/method/scheme/host/port/path coverage で許可する場合のみ network I/O に進む形にした。 +- Grant-only / missing-grant / broad / partial-coverage states を static inspection と `yoi plugin show` diagnostics で区別。 +- Broad/covering grant と broad manifest + narrower grant の intersection semantics を runtime と static inspection で一致させた。 +- Loopback/local/private target は ambient ではなく、URL host declaration + grant に基づく明示 authority として扱う方針を docs に記録。 +- Embedded credentials、credential-like headers、WebSocket URLs/upgrades、SSE/event-stream requests を reject/unsupported にした。 +- Old `host_api.https` / `grants.https` / `PluginHttps*` / old WIT names は active code/docs/resources から削除。 +- Focused manifest / pod / yoi plugin CLI tests を追加・更新。 + +統合・検証: +- Merge commit: `8a15cca5 merge: plugin request host api` +- Implementation commits: `962b7699`, `0e14e7c1` +- Reviewer final verdict: approve +- Validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p manifest request --quiet`, `cargo test -p pod feature::plugin::tests --lib --quiet`, `cargo test -p yoi plugin_cli::tests --quiet`, `cargo check -p manifest -p pod -p yoi --quiet`, stale active naming grep, `cargo run -p yoi -- ticket doctor`, and `nix build .#yoi --no-link`。 + +範囲外: +- Regex URL target matching は追加していない。 +- WebSocket/SSE/persistent connection support は `host_api.request` に含めていない。WebSocket は別 capability / design Ticket 側で扱う。 + +---