From d09a6f5da11f95fa974d9e1534d5ae99a91a82ed Mon Sep 17 00:00:00 2001 From: Hare Date: Sun, 28 Jun 2026 15:56:54 +0900 Subject: [PATCH] ticket: record companion llm implementation --- .yoi/tickets/00001KW55B33H/item.md | 2 +- .yoi/tickets/00001KW55B33H/thread.md | 44 ++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/.yoi/tickets/00001KW55B33H/item.md b/.yoi/tickets/00001KW55B33H/item.md index 90bdf0d9..42ebcf4b 100644 --- a/.yoi/tickets/00001KW55B33H/item.md +++ b/.yoi/tickets/00001KW55B33H/item.md @@ -2,7 +2,7 @@ title: 'Workspace Companionを実LLM実行Workerとして起動する' state: 'inprogress' created_at: '2026-06-27T18:26:47Z' -updated_at: '2026-06-28T06:27:08Z' +updated_at: '2026-06-28T06:56:50Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-27T19:06:32Z' diff --git a/.yoi/tickets/00001KW55B33H/thread.md b/.yoi/tickets/00001KW55B33H/thread.md index 17451590..a3b2e461 100644 --- a/.yoi/tickets/00001KW55B33H/thread.md +++ b/.yoi/tickets/00001KW55B33H/thread.md @@ -251,3 +251,47 @@ request_changes - 現状の `cargo test -p yoi-workspace-server` は古い rejected Companion behavior を assert して通っている可能性があり、この Ticket の acceptance evidence にはならない。 --- + + + +## Implementation report + +Change-response implementation report: + +Reviewer blockers を修正し、実装 commit を作成済み。Ticket ファイル編集、merge、close、cleanup は未実施。 + +Commit: +- `ee25cfbcfd90983a24091ef30c0128d653095003 fix: route workspace companion through worker runtime` + +変更概要: + +- `/api/companion/messages` の旧 `companion_llm_not_connected` 固定拒否経路を廃止し、通常の `RuntimeRegistry::send_input` / Worker runtime 入力経路へ接続。 +- Companion status / transport を更新。 + - Worker が input-capable の場合は `completion: "connected"`。 + - missing provider/config/profile/authority 等で input-capable でない場合は `completion: "not_input_capable"` と typed diagnostic。 + - fake/providerless/canned assistant 応答は追加していない。 +- Companion bootstrap を `builtin:companion` profile + Companion 用 config bundle sync へ変更。 +- `WorkspaceCompanion` intent の embedded profile projection も `builtin:companion` に変更。 +- Companion transcript projection を runtime transcript 由来に変更し、旧独自 transcript / 旧非実行 semantics を置換。 +- `/api/workspace` の Browser-facing response から raw `local_root: PathBuf` を削除。 +- Tests を更新・追加。 + - Companion bootstrap / input dispatch / assistant output / observation event / transcript projection を deterministic test execution backend で検証。 + - legacy `/api/companion/messages` route が Worker runtime 経由で input dispatch することを server test で検証。 + - 旧 `companion_llm_not_connected` 依存 assertion を削除。 + +Validation: +- `cargo fmt --check`: success +- `cd web/workspace && deno task test`: success +- `cd web/workspace && deno task check`: success +- `cd web/workspace && deno task build`: success +- `cargo test -p yoi-workspace-server`: success +- `cargo check -p yoi`: success +- `git diff --check`: success +- `nix build .#yoi`: success + +Residual risks / review focus: +- `/api/companion/*` は互換 route として残しつつ、内部動作は Worker runtime 経路へ寄せている。主 UI path は引き続き `runtime_id + worker_id` の Worker Console。 +- provider/profile/secret/authority 欠落時は input 不可 diagnostic になる。実 provider 設定がない環境では Companion は起動 projection されても入力不可。 +- deterministic test backend による検証のため、外部 secret/provider には依存しない。 + +---