434 lines
21 KiB
Markdown
434 lines
21 KiB
Markdown
<!-- event: create author: "yoi ticket" at: 2026-06-25T11:45:17Z -->
|
||
|
||
## 作成
|
||
|
||
LocalTicketBackend によって作成されました。
|
||
|
||
---
|
||
|
||
<!-- event: intake_summary author: hare at: 2026-06-25T16:34:16Z -->
|
||
|
||
## Intake summary
|
||
|
||
Marked ready by `yoi ticket state`.
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: "yoi ticket" at: 2026-06-25T16:34:16Z from: planning to: ready reason: cli_state field: state -->
|
||
|
||
## State changed
|
||
|
||
Marked ready by `yoi ticket state`.
|
||
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: workspace-panel at: 2026-06-25T16:44:45Z from: ready to: queued reason: queued field: state -->
|
||
|
||
## State changed
|
||
|
||
Ticket を `workspace-panel` が queued にしました。
|
||
|
||
|
||
---
|
||
|
||
<!-- event: decision author: yoi-orchestrator at: 2026-06-25T16:45:24Z -->
|
||
|
||
## Decision
|
||
|
||
Routing decision: blocked_by_dependency_or_missing_authority
|
||
|
||
Reason:
|
||
- Dashboard Queue による routing 許可を受けて Ticket / relations / orchestration plan / queue state を確認した。
|
||
- 本 Ticket は `00001KVZSGT0Q` (`Backend RuntimeRegistryにembedded worker-runtimeを接続する`) に `depends_on` relation を持つ。
|
||
- `00001KVZSGT0Q` は現在 `queued` で、さらに `00001KVZKSV6C` / `00001KVZBCQH4` の依存 chain により blocked と判断済み。
|
||
- Backend internal Companion Runtime / Web Console MVP は Backend RuntimeRegistry 上の embedded worker-runtime connection を前提にするため、基盤確定前に開始しない。
|
||
|
||
Evidence checked:
|
||
- Ticket body: Backend internal Companion runtime、conversation/transcript model、Web API、Web Console UI、Runtime/LLM integration、Safety/authority、Non-goals。
|
||
- Relations: outgoing `depends_on -> 00001KVZSGT0Q`。
|
||
- Orchestration plan: blocker record `orch-plan-20260625-164513-1` を追加。
|
||
- Queue state: queued は本 Ticket を含む6件。inprogress は worker-runtime core `00001KVZBCQH4` 1件。
|
||
- Workspace state: core implementation is under reviewer Worker; dependent Backend Registry work is not accepted yet。
|
||
|
||
Next action:
|
||
- 本 Ticket は queued のまま待機。
|
||
- `00001KVZSGT0Q` が accepted/completed して Backend embedded runtime connection が使えるようになった後、再 routing する。
|
||
|
||
Escalate if:
|
||
- Companion MVP を `00001KVZSGT0Q` 完了前に独立 spike する human decision がある。
|
||
- Backend internal Runtime foundation の scope が Companion MVP requirements を満たさない。
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-25T20:23:10Z from: queued to: planning reason: web_console_stream_transport_decision_missing field: state -->
|
||
|
||
## State changed
|
||
|
||
ユーザー指摘により queued から planning に戻す。
|
||
|
||
Missing decision / information:
|
||
- 本 Ticket は Web Console MVP の conversation/transcript model で「request/response 完了後に transcript を返す」または「SSE / streaming endpoint」を実装時に選んでよいとしており、実質的に WS/SSE/polling/streaming の transport 方針を固定し得る。
|
||
- これは `00001KVZKSTJT` で決定すべき WebSocket/event-stream transport 設計点であり、未決定のまま queued に置くのは不適切。
|
||
|
||
Context checked:
|
||
- Ticket body: Web Console UI、Companion message API、assistant response 取得または stream、conversation/transcript projection、Safety/authority。
|
||
- Existing relation: `00001KVZSGT0Q` への dependency。
|
||
- Added relation: `00001KVZKSTJT` への `depends_on` を追加し、WS/SSE/polling transport decision が解決するまで本 Ticket を blocker 付き planning として扱う。
|
||
- `00001KVZKSTE2` は REST command server であり、SSE/WebSocket event stream server は Non-goal と明記されているため、この差し戻し対象ではない。
|
||
|
||
Why implementation latitude is insufficient:
|
||
- Web Console の response delivery を request/response、SSE、WebSocket、polling のどれに寄せるかは後続 API/UI/Backend runtime integration の binding decision であり、Coder の local tactic として固定すべきではない。
|
||
|
||
Next planning question/action:
|
||
- `00001KVZKSTJT` で WebSocket/event-stream transport の採否、Backend-owned client / Browser-facing projection / cursor semantics / busy/error behavior を決める。
|
||
- その決定に基づいて、本 Ticket の conversation/transcript model と Web API acceptance criteria を再同期してから ready/queued に戻す。
|
||
|
||
---
|
||
|
||
<!-- event: intake_summary author: hare at: 2026-06-25T20:30:38Z -->
|
||
|
||
## Intake summary
|
||
|
||
Marked ready by `yoi ticket state`.
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: "yoi ticket" at: 2026-06-25T20:30:38Z from: planning to: ready reason: cli_state field: state -->
|
||
|
||
## State changed
|
||
|
||
Marked ready by `yoi ticket state`.
|
||
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: workspace-panel at: 2026-06-25T20:34:27Z from: ready to: queued reason: queued field: state -->
|
||
|
||
## State changed
|
||
|
||
Ticket を `workspace-panel` が queued にしました。
|
||
|
||
|
||
---
|
||
|
||
<!-- event: decision author: yoi-orchestrator at: 2026-06-25T20:36:54Z -->
|
||
|
||
## Decision
|
||
|
||
Routing decision: blocked_by_dependency_or_missing_authority
|
||
|
||
Reason:
|
||
- Dashboard Queue 後に Ticket / relations / workspace state を確認した。
|
||
- 本 Ticket は Web Console MVP であり、WebSocket/event-stream transport/proxy `00001KVZKSTJT` と Backend embedded Runtime connection `00001KVZSGT0Q` を前提にする。
|
||
- `00001KVZKSTJT` は queued/blocked、`00001KVZSGT0Q` も Backend Registry foundation chain 待ち。Web Console を先に始めると response delivery / stream semantics を UI/API 側で先取りして固定するため開始しない。
|
||
|
||
Evidence checked:
|
||
- Ticket body: Companion Runtime/Web Console MVP、message API、transcript/stream response choice、Safety/authority。
|
||
- Relations: `depends_on -> 00001KVZKSTJT` と `depends_on -> 00001KVZSGT0Q`。
|
||
- Orchestration plan: blocker record `orch-plan-20260625-203613-1` を追加。
|
||
|
||
Next action:
|
||
- 本 Ticket は queued のまま待機。
|
||
- `00001KVZKSTJT` と `00001KVZSGT0Q` が done になった後、Web Console MVP の acceptance criteria を再確認して routing する。
|
||
|
||
---
|
||
|
||
<!-- event: decision author: yoi-orchestrator at: 2026-06-26T07:41:53Z -->
|
||
|
||
## Decision
|
||
|
||
Routing decision: implementation_ready
|
||
|
||
Reason:
|
||
- Dependencies are done: `00001KVZSGT0Q` embedded Runtime connection、`00001KVZKSTJT` WebSocket observation proxy、`00001KVZQHPNY` config bundle sync。
|
||
- Current `inprogress` is 0. Web Console MVP can now build on stable Backend internal Runtime / Worker create / transcript / WS/proxy foundations.
|
||
- Ticket body has concrete backend API, Web UI, safety/authority, Non-goals, and validation requirements.
|
||
|
||
Evidence checked:
|
||
- Ticket body: Backend internal Companion runtime, conversation/transcript model, Web API, Web Console UI, Runtime/LLM integration, Safety/authority, acceptance criteria。
|
||
- Relations: depends_on `00001KVZSGT0Q` and `00001KVZKSTJT`, both done.
|
||
- Orchestration plan: accepted plan `orch-plan-20260626-074131-5` recorded.
|
||
- Workspace state: orchestration worktree clean; no spawned child Workers currently active.
|
||
|
||
IntentPacket:
|
||
|
||
Intent:
|
||
- Backend internal Runtime 上に toolsなし Companion Worker を作成・保持し、Web frontend から status/transcript/message send/response display ができる Console MVP を実装する。
|
||
|
||
Binding decisions / invariants:
|
||
- Companion v0 は workspace filesystem / shell / git / Ticket mutation authority を持たない。
|
||
- Browser は raw provider credential、socket path、session path、runtime file path、Runtime direct endpoint/token を扱わない。
|
||
- Backend API / WS/projection を authority とし、local session file / Pod socket を直接読まない。
|
||
- Prompt prose は Rust 直書きではなく `resources/prompts` など prompt resource boundary に置く。
|
||
- v0 は full TUI parity / tool call UI / file viewer / diff viewer / thinking block grouping / multi Worker attach を実装しない。
|
||
- Long-running request 中の追加 message は single-flight / busy reject でよい。
|
||
|
||
Requirements / acceptance criteria:
|
||
- Backend internal runtime 上に Companion Worker が存在し、runtime/worker API から確認できる。
|
||
- Web frontend から Companion status / transcript projection を取得できる。
|
||
- Web Console UI から user message を送信できる。
|
||
- Companion が LLM response を生成し、Web UI に表示される、または v0実装上の provider-less/mock boundary が明確で reviewer が確認できる。
|
||
- v0 Companion は filesystem / shell / git / Ticket mutation tools を持たない。
|
||
- Provider busy/error/timeout/cancelled が typed error/UI state で扱われる。
|
||
- Focused backend/frontend tests or manual validation notes are present.
|
||
|
||
Implementation latitude:
|
||
- Request/response completion vs existing WS/projection usageの具体方式は Coder が既存 foundation に合わせて選べる。ただし `00001KVZKSTJT` の Backend-owned observation/proxy境界を壊さない。
|
||
- v0 LLM/provider integration が重すぎる場合は、Backend internal Runtimeの現在能力内で最小 toolsなし conversational round-trip を成立させ、未実装 provider execution boundaryを明確に報告すること。
|
||
- UI route/layout/component naming は existing `web/workspace` style に合わせる。
|
||
|
||
Escalate if:
|
||
- Filesystem/shell/git/Ticket mutation authority が必要になる。
|
||
- Browser に Runtime/provider credentials や raw path を渡す必要が出る。
|
||
- Full TUI console parity or tool-call UI が必要になる。
|
||
- Existing worker-runtime cannot generate a real LLM response without broad worker/engine integration and acceptance criteria cannot be satisfied honestly.
|
||
|
||
Validation:
|
||
- `cargo fmt --all`
|
||
- `cargo test -p yoi-workspace-server`
|
||
- `cargo check -p yoi`
|
||
- `cd web/workspace && deno task check`
|
||
- `cd web/workspace && deno task build`
|
||
- `git diff --check`
|
||
- 可能なら `nix build .#yoi --no-link`
|
||
|
||
Critical risks / reviewer focus:
|
||
- Authority leakage to Browser or Companion Worker。
|
||
- Hidden context injection instead of normal conversation history。
|
||
- Prompt prose embedded in Rust instead of prompt resource。
|
||
- UI claiming live LLM behavior if implementation is actually mock/provider-less。
|
||
- Over-scoping into full TUI parity/tool UI。
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-26T07:42:06Z from: queued to: inprogress reason: routing_accepted_after_backend_runtime_foundation_done field: state -->
|
||
|
||
## State changed
|
||
|
||
Routing decision: implementation_ready。
|
||
|
||
Embedded Runtime connection、WebSocket observation proxy、Profile/config bundle sync は done。Ticket body / relations / workspace state / accepted plan を確認し、Backend internal Companion Web Console MVP は unblocked と判断した。accepted plan と IntentPacket は thread / orchestration plan に記録済み。
|
||
|
||
これ以降、worktree creation / coder Worker routing などの implementation side effect に進める。
|
||
|
||
---
|
||
|
||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-26T07:43:09Z -->
|
||
|
||
## Implementation report
|
||
|
||
Implementation kickoff:
|
||
|
||
- Worktree created: `/home/hare/Projects/yoi/.worktree/00001KVZ9JGK0-web-console-mvp`
|
||
- Branch: `work/00001KVZ9JGK0-web-console-mvp`
|
||
- Coder Worker spawned: `yoi-coder-00001KVZ9JGK0-web-console`
|
||
|
||
Scope notes:
|
||
- Coder has read access to the implementation worktree and non-recursive workspace root identity path needed by runtime startup.
|
||
- Coder write scope is limited to `crates/workspace-server/**`, `web/workspace/**`, `resources/prompts/**`, root `Cargo.toml`, `Cargo.lock`, and `package.nix` if dependency/package changes are needed.
|
||
- Coder is instructed not to modify Ticket records and not to operate in root/orchestration worktrees.
|
||
|
||
Queued capacity note:
|
||
- `00001KW04A8K6` remains queued while Web Console MVP is inprogress because both are UI/control-surface consumers of the new Runtime APIs; TUI migration should start after this branch is reviewed/merged/done.
|
||
|
||
---
|
||
|
||
<!-- event: implementation_report author: yoi-coder-00001KVZ9JGK0-web-console at: 2026-06-26T08:02:43Z -->
|
||
|
||
## Implementation report
|
||
|
||
Implementation report:
|
||
|
||
実装完了。指定 worktree / branch 上で commit 済み。
|
||
|
||
Commit:
|
||
- `f3ad9c96b3fd48b5afce2a46b9c46efc5dce16f6 feat: add workspace companion console MVP`
|
||
|
||
変更概要:
|
||
|
||
### Backend
|
||
|
||
変更ファイル:
|
||
- `crates/workspace-server/src/companion.rs`
|
||
- `crates/workspace-server/src/lib.rs`
|
||
- `crates/workspace-server/src/server.rs`
|
||
- `resources/prompts/worker/web_companion_providerless.md`
|
||
|
||
実装内容:
|
||
- Backend 内部の tools-less Companion Console 境界を追加。
|
||
- `WorkspaceApi` 初期化時に `embedded-worker-runtime` 上へ `workspace_companion` Worker を spawn。
|
||
- runtime / worker API の `/api/workers` から visible。
|
||
- v0 capabilities は input / bounded transcript projection のみで、filesystem / shell / git / Ticket mutation authority は持たせていない。
|
||
- Companion 専用 API を追加:
|
||
- `GET /api/companion/status`
|
||
- `GET /api/companion/transcript?start=&limit=`
|
||
- `POST /api/companion/messages`
|
||
- `POST /api/companion/cancel`
|
||
- status / transcript / message response は typed state を返す:
|
||
- `ready`, `busy`, `error`, `timeout`, `cancelled`, `accepted`, `rejected`
|
||
- Browser へは Backend API projection のみ返し、raw Worker socket/session/runtime path や provider credentials は返さない設計。
|
||
- 実 LLM/provider 実行は既存 runtime foundation へ狭く接続できなかったため、fake せず provider-less/conversation boundary として実装。
|
||
- user message は backend-internal Worker へ input として記録。
|
||
- UI transcript には resource-defined assistant boundary response を返す。
|
||
- この制限は API diagnostics / UI transport description に明示。
|
||
- prompt / assistant boundary prose は Rust hard-code ではなく `resources/prompts/worker/web_companion_providerless.md` に配置。
|
||
|
||
### Web UI
|
||
|
||
変更ファイル:
|
||
- `web/workspace/src/routes/console/+page.svelte`
|
||
- `web/workspace/src/lib/workspace-sidebar/CompanionNavSection.svelte`
|
||
- `web/workspace/src/lib/workspace-sidebar/WorkspaceSidebar.svelte`
|
||
- `web/workspace/src/lib/workspace-sidebar/types.ts`
|
||
- `web/workspace/src/app.css`
|
||
|
||
実装内容:
|
||
- `/console` route を追加。
|
||
- Sidebar に `Companion Console` 導線を追加。
|
||
- Console UI:
|
||
- Companion status 表示
|
||
- transport / limitation 表示
|
||
- bounded transcript 表示
|
||
- user message composer
|
||
- Send / Refresh / Cancel UI
|
||
- busy / error / timeout / cancelled / rejected state 表示
|
||
- diagnostics 表示
|
||
|
||
Validation:
|
||
- `cargo fmt --all`: success
|
||
- `cargo test -p yoi-workspace-server`: success(36 passed)
|
||
- `cargo check -p yoi`: success
|
||
- `cd web/workspace && deno task check`: success(0 errors / 0 warnings)
|
||
- `cd web/workspace && deno task build`: success
|
||
- `git diff --check`: success
|
||
- `nix build .#yoi --no-link`: success
|
||
|
||
Residual risks / review focus:
|
||
- 実 LLM 応答は未接続。今回の実装は intentionally provider-less boundary であり、assistant response は resource-defined limitation response。
|
||
- 既存 worker-runtime へ安全に provider-backed completion を流すには、Worker engine integration / lifecycle / streaming boundary の追加設計が必要そう。
|
||
- transcript は v0 in-memory projection。server restart で Companion UI transcript は消える。
|
||
- Backend runtime 側には user input のみ記録され、assistant boundary response は Companion projection 側。
|
||
- busy は single-flight typed state として用意しているが、provider-less response は同期即時完了のため見える場面は限定的。
|
||
- UI は Console MVP に限定。tool call UI / thinking grouping / diff/file viewer / multi Worker attach は非対応。
|
||
|
||
---
|
||
|
||
<!-- event: review author: yoi-reviewer-00001KVZ9JGK0-web-console at: 2026-06-26T08:07:24Z status: approve -->
|
||
|
||
## Review: approve
|
||
|
||
Review result: approve
|
||
|
||
確認結果として、Ticket 意図と binding invariants を満たしていると判断する。
|
||
|
||
確認内容:
|
||
- Provider-less 境界は十分に正直。実 LLM 応答ではなく、`resources/prompts/worker/web_companion_providerless.md` の文面を返す実装で、UI/API 側も limitation / diagnostic / `backend_providerless_boundary` として表示している。
|
||
- Companion Worker は backend 内部の embedded runtime 上に作られ、runtime/worker API から見える構成。
|
||
- Companion v0 に filesystem / shell / git / Ticket mutation authority を付与している箇所は見当たらない。workspace/mount refs なし、conversation-focused の内部 Worker として扱われている。
|
||
- Browser に provider credential、socket path、session path、runtime file path、direct runtime endpoint/token、local session file path を渡す新規漏洩は見当たらない。
|
||
- `/api/companion/status`、`/transcript`、`/messages`、`/cancel` と Web `/console` は status / transcript / send / cancelled/error/busy 系状態を typed projection として扱っている。
|
||
- Prompt prose は Rust hard-code ではなく resource boundary に置かれている。
|
||
- UI は full TUI parity、tool/file/diff viewer、thinking grouping、multi attach へ広がっておらず、MVP 範囲に収まっている。
|
||
- Backend の focused tests と、報告済みの `cargo test/check`、frontend `deno task check/build`、`git diff --check`、`nix build` はこの変更範囲には十分。
|
||
|
||
補足リスク:
|
||
- provider-less v0 では backend Worker transcript は主に user message 記録で、assistant limitation response は Companion projection 側に出る設計。現状は source/diagnostic 付きなので許容するが、実 LLM 接続時は Worker transcript との永続的一貫性を再検討した方がよい。
|
||
- busy reject は型として存在するが、将来の長時間 LLM 実行時には即時 reject/timeout 挙動を改めて検証する必要がある。
|
||
|
||
検証:
|
||
- read-only の静的確認と `git diff --check` 相当の確認。テスト/ビルドはファイル生成を避けるため再実行せず、報告内容と実装・テスト追加を照合した。
|
||
|
||
---
|
||
|
||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-26T08:08:06Z -->
|
||
|
||
## Implementation report
|
||
|
||
Integration / validation report:
|
||
|
||
Integration:
|
||
- Implementation branch `work/00001KVZ9JGK0-web-console-mvp` を orchestration branch に merge 済み。
|
||
- Merge commit: `bf834e83 merge: 00001KVZ9JGK0 web console mvp`
|
||
|
||
Included implementation commit:
|
||
- `f3ad9c96b3fd48b5afce2a46b9c46efc5dce16f6 feat: add workspace companion console MVP`
|
||
|
||
Validation in Orchestrator worktree:
|
||
- `cargo fmt --all --check`: success
|
||
- `cargo test -p yoi-workspace-server`: success(36 tests passed)
|
||
- `cargo check -p yoi`: success
|
||
- `cd web/workspace && deno task check`: success(0 errors / 0 warnings)
|
||
- `cd web/workspace && deno task build`: success
|
||
- `git diff --check`: success
|
||
- `nix build .#yoi --no-link`: success
|
||
|
||
Review:
|
||
- Reviewer approve 済み。provider-less boundary honesty、authority non-leak、prompt resource boundary、typed UI/API state、MVP scope に blocker なし。
|
||
|
||
Outcome:
|
||
- Acceptance criteria を満たしたため `done` へ進める。
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-26T08:08:16Z from: inprogress to: done reason: merged_reviewed_validated field: state -->
|
||
|
||
## State changed
|
||
|
||
Backend internal Companion Runtime / Web Console MVP の実装、review、merge、Orchestrator validation が完了した。
|
||
|
||
Done evidence:
|
||
- Merge commit: `bf834e83 merge: 00001KVZ9JGK0 web console mvp`
|
||
- Reviewer approve 済み。
|
||
- Orchestrator validation:
|
||
- `cargo fmt --all --check`: success
|
||
- `cargo test -p yoi-workspace-server`: success(36 tests passed)
|
||
- `cargo check -p yoi`: success
|
||
- `cd web/workspace && deno task check`: success
|
||
- `cd web/workspace && deno task build`: success
|
||
- `git diff --check`: success
|
||
- `nix build .#yoi --no-link`: success
|
||
|
||
Scope:
|
||
- Backend internal tools-less Companion Worker と provider-less Web Console MVP を追加。
|
||
- Full TUI parity / tool call UI / file/diff viewer / thinking grouping / multi Worker attach / real provider-backed Companion execution は Non-goals として未実装。
|
||
|
||
---
|
||
|
||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-26T08:09:07Z -->
|
||
|
||
## Implementation report
|
||
|
||
Cleanup report:
|
||
|
||
- Child Workers stopped one-by-one and scope reclaimed:
|
||
- `yoi-coder-00001KVZ9JGK0-web-console`
|
||
- `yoi-reviewer-00001KVZ9JGK0-web-console`
|
||
- Child implementation worktree removed:
|
||
- `/home/hare/Projects/yoi/.worktree/00001KVZ9JGK0-web-console-mvp`
|
||
- Child implementation branch removed:
|
||
- `work/00001KVZ9JGK0-web-console-mvp`
|
||
|
||
Operational note:
|
||
- StopPod was executed sequentially, not in parallel.
|
||
|
||
---
|
||
|
||
<!-- event: state_changed author: hare at: 2026-06-26T17:46:04Z from: done to: closed reason: closed field: state -->
|
||
|
||
## State changed
|
||
|
||
Ticket を closed にしました。
|
||
|
||
|
||
---
|
||
|
||
<!-- event: close author: hare at: 2026-06-26T17:46:04Z status: closed -->
|
||
|
||
## 完了
|
||
|
||
Completed, reviewed, validated, and merged into develop.
|
||
|
||
|
||
---
|