diff --git a/.yoi/tickets/00001KVZG9BMS/item.md b/.yoi/tickets/00001KVZG9BMS/item.md index 0ce3e66c..4bf55808 100644 --- a/.yoi/tickets/00001KVZG9BMS/item.md +++ b/.yoi/tickets/00001KVZG9BMS/item.md @@ -1,8 +1,8 @@ --- title: 'pod crateをworker crateへ改名する' -state: 'done' +state: 'closed' created_at: '2026-06-25T13:42:37Z' -updated_at: '2026-06-25T16:19:23Z' +updated_at: '2026-06-25T19:40:49Z' assignee: null queued_by: 'workspace-panel' queued_at: '2026-06-25T14:13:35Z' diff --git a/.yoi/tickets/00001KVZG9BMS/resolution.md b/.yoi/tickets/00001KVZG9BMS/resolution.md new file mode 100644 index 00000000..11992b67 --- /dev/null +++ b/.yoi/tickets/00001KVZG9BMS/resolution.md @@ -0,0 +1,3 @@ +Ticket `00001KVZG9BMS` (`pod crateをworker crateへ改名する`) はすでに `state: done` に到達していたため、workspace Dashboard から close しました。 + +この Close action によって、実装作業、state 変更、Orchestrator/Companion launch、worker invocation は開始されていません。 diff --git a/.yoi/tickets/00001KVZG9BMS/thread.md b/.yoi/tickets/00001KVZG9BMS/thread.md index b747a60a..1062b35f 100644 --- a/.yoi/tickets/00001KVZG9BMS/thread.md +++ b/.yoi/tickets/00001KVZG9BMS/thread.md @@ -744,4 +744,44 @@ Escalate if: 補足: - この state change は close ではなく `done` 記録。必要なら別途 close / cleanup を扱う。 +--- + + + +## State changed + +Ticket を closed にしました。 + + +--- + + + +## 完了 + +Ticket `00001KVZG9BMS` (`pod crateをworker crateへ改名する`) はすでに `state: done` に到達していたため、workspace Dashboard から close しました。 + +この Close action によって、実装作業、state 変更、Orchestrator/Companion launch、worker invocation は開始されていません。 + + +--- + + + +## Decision + +Decision update: the pod -> worker rename must include a repository-wide audit of user/model-visible wording, not only Rust crate/type names. + +Scope to check and update where the meaning is the new execution-unit Worker rather than intentionally legacy/internal compatibility: +- prompt resources under `resources/prompts`; +- TUI / Panel / Workspace UI labels and help text; +- CLI command/help/output strings; +- docs that describe current architecture or current user-facing behavior; +- tests/assertions tied to current prompt/UI/CLI text; +- README files for active crates; +- protocol/event names where they are active public API and not legacy compatibility. + +Allowed remaining `pod` wording must be explicitly intentional legacy/internal context, such as historical reports, old compatibility notes, or on-disk/socket/session compatibility details that are being kept temporarily. The implementation should provide grep evidence for remaining active `pod`/`Pod` references and categorize them as replaced, legacy/internal, or historical. + + --- diff --git a/.yoi/tickets/00001KW04A8K6/artifacts/.gitkeep b/.yoi/tickets/00001KW04A8K6/artifacts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/.yoi/tickets/00001KW04A8K6/artifacts/relations.json b/.yoi/tickets/00001KW04A8K6/artifacts/relations.json new file mode 100644 index 00000000..bfe530d3 --- /dev/null +++ b/.yoi/tickets/00001KW04A8K6/artifacts/relations.json @@ -0,0 +1,45 @@ +{ + "version": 1, + "relations": [ + { + "ticket_id": "00001KW04A8K6", + "kind": "depends_on", + "target": "00001KVZKSTJT", + "note": "TUI output observation depends on Runtime WebSocket event streams or their Backend proxy.", + "author": "yoi ticket", + "at": "2026-06-25T19:33:49Z" + }, + { + "ticket_id": "00001KW04A8K6", + "kind": "depends_on", + "target": "00001KVZKSV6C", + "note": "TUI Runtime connection should build on the Backend RuntimeRegistry foundation.", + "author": "yoi ticket", + "at": "2026-06-25T19:33:49Z" + }, + { + "ticket_id": "00001KW04A8K6", + "kind": "depends_on", + "target": "00001KVZSGT0Q", + "note": "TUI needs Backend routing to embedded worker-runtime for backend-internal Workers.", + "author": "yoi ticket", + "at": "2026-06-25T19:33:49Z" + }, + { + "ticket_id": "00001KW04A8K6", + "kind": "depends_on", + "target": "00001KVZSGT14", + "note": "TUI needs Backend routing/proxying to remote Runtime processes for remote Workers.", + "author": "yoi ticket", + "at": "2026-06-25T19:33:49Z" + }, + { + "ticket_id": "00001KW04A8K6", + "kind": "related", + "target": "00001KVZKSTE2", + "note": "Runtime REST command server provides the remote command path that Backend proxies for TUI input.", + "author": "yoi ticket", + "at": "2026-06-25T19:33:49Z" + } + ] +} diff --git a/.yoi/tickets/00001KW04A8K6/item.md b/.yoi/tickets/00001KW04A8K6/item.md new file mode 100644 index 00000000..89a9d0e0 --- /dev/null +++ b/.yoi/tickets/00001KW04A8K6/item.md @@ -0,0 +1,100 @@ +--- +title: 'TUIをRuntime API/WebSocket接続へ移行する' +state: 'ready' +created_at: '2026-06-25T19:32:38Z' +updated_at: '2026-06-25T19:56:23Z' +assignee: null +--- + +## 背景 + +現在の TUI は旧 Pod / Worker process の Unix socket に直接 attach し、connect-time `Snapshot`、`Append`、`Status` などの protocol event を読んで Console 表示を構築している。一方、Worker/Runtime 移行後は、Worker は Runtime 内の実行単位であり、Runtime は REST command API と WebSocket observation stream を公開する。Backend は RuntimeRegistry を通じて embedded / remote / compatibility runtime を束ね、Browser や将来の TUI は Runtime endpoint / socket path / session path を直接 authority として扱わない方向にする。 + +この Ticket では、Runtime API / WebSocket observation がある程度整った後、TUI の接続 backend を旧 Pod socket 直結から Runtime API / Backend proxy / WebSocket stream に移行する。既存 TUI の Console rendering / composer / status UI は活かしつつ、入力送信と出力購読の transport を Runtime model に合わせる。 + +## 目的 + +- TUI が旧 Pod socket path を直接 authority としない接続経路へ移行する。 +- TUI が `runtime_id + worker_id` を対象 identity として扱える。 +- TUI の input は Runtime command API 経由で送る。 +- TUI の output / status / transcript update は Runtime WebSocket observation stream 由来の event projection で受ける。 +- 旧 Pod attach path は移行期間の compatibility / debug path として扱い、正規 path ではなくす。 + +## 要件 + +### Connection model + +- TUI は Runtime / Worker target を `runtime_id + worker_id` で指定できる。 +- TUI は Backend RuntimeRegistry / Runtime routing / Runtime endpoint credential 管理を内部実装しない。 +- TUI は Browser と同じく、原則として Backend API に接続する client として振る舞う。 +- Backend が RuntimeRegistry / policy / visibility / audit / runtime routing を担う。 + - TUI -> Backend -> embedded Runtime direct call。 + - TUI -> Backend -> remote Runtime REST/WS client。 + - TUI -> Backend -> local compatibility adapter。 +- TUI が remote Runtime endpoint / credential / raw socket path / raw session path を直接受け取らない。 +- Local-only debug mode として direct Runtime endpoint / legacy socket attach を残す場合は、明示的な debug/compat mode とする。 + +### Input path + +- Composer input は Runtime command API へ送る。 +- v0 input は user message を最小単位とする。 +- Busy / rejected / worker not found / runtime unavailable / provider error を TUI の status/error 表示に map する。 +- 既存 `UserMessage` acceptance evidence 相当を、Runtime command accepted / run started event に置き換える。 + +### Output / observation path + +- TUI は Runtime WebSocket event stream または Backend-proxied observation stream を購読する。 +- Runtime event を TUI Console model へ変換する adapter を実装する。 +- 少なくとも以下を扱う。 + - worker snapshot / initial transcript projection。 + - user input accepted / transcript append。 + - assistant text delta / final。 + - reasoning / thinking visibility policy に基づく event。 + - tool call lifecycle。 + - run started / completed / errored。 + - usage。 + - status / diagnostics。 +- Event cursor / reconnect / replay / duplicate event handling を TUI 側で扱う。 +- Raw provider trace / raw full session log は TUI event path の authority にしない。 + +### Existing TUI modelとの関係 + +- 既存 TUI の rendering component、composer、scrollback、status/actionbar 表示は可能な限り維持する。 +- 旧 Pod protocol event から直接 UI block を作る path と、新 Runtime event から UI block を作る path を分ける。 +- 旧 `Event::Snapshot` / `Event::Append` / `Event::Status` と Runtime event の対応を明示する。 +- 連続 Thinking block grouping、in-flight snapshot、tool call rendering など既存 UI semantics が regress しないようにする。 + +### Compatibility / migration + +- 移行途中で HEAD の `cargo run --bin yoi -- panel` / TUI が旧 Pod list 取得に失敗する可能性は許容するが、最終的には RuntimeRegistry / Worker projection を正とする。 +- 旧 Pod socket attach は完全互換を目標にしない。 +- ただし dogfooding に必要な範囲で、legacy local Worker compatibility adapter 経由の attach/read はできるようにする。 +- Compatibility path を残す場合も、新規設計の正規 API と混同しない naming / CLI flag / diagnostics にする。 + +## Non-goals + +- `worker-runtime` core crate の作成。 +- Runtime REST command server の作成。 +- Runtime WebSocket event stream server の作成。 +- Backend RuntimeRegistry の embedded / remote 接続実装。 +- Web Console UI の完成。 +- 旧 Pod socket protocol の完全互換維持。 +- Raw session storage migration。 +- Full multi-user auth / permission model。 + +## 受け入れ条件 + +- TUI が `runtime_id + worker_id` を対象として接続できる。 +- TUI が Backend API client として実装され、Backend RuntimeRegistry / Runtime routing / Runtime endpoint credential 管理を内部実装していない。 +- TUI input が Backend/Runtime command API 経由で Worker に届く。 +- TUI が Runtime WebSocket observation stream または Backend-proxied stream から Worker output/status events を受け取る。 +- Runtime events が既存 TUI Console model に変換され、user message / assistant output / status / error が表示される。 +- Initial transcript / snapshot 相当の表示ができる。 +- Reconnect / cursor resume / duplicate event の基本動作が実装されている、または明確な typed diagnostic になる。 +- Browser/remote Runtime credential/socket/session path を TUI が authority として扱わない。 +- 旧 Pod socket attach path は正規 path ではなく compatibility/debug path として分離されている。 +- Focused TUI tests or adapter tests が追加されている。 +- `cargo test -p tui` または該当 TUI crate test が通る。 +- `cargo check -p yoi` が通る。 +- `git diff --check` が通る。 +- `nix build .#yoi --no-link` が通る。 diff --git a/.yoi/tickets/00001KW04A8K6/thread.md b/.yoi/tickets/00001KW04A8K6/thread.md new file mode 100644 index 00000000..9cbb8ba5 --- /dev/null +++ b/.yoi/tickets/00001KW04A8K6/thread.md @@ -0,0 +1,24 @@ + + +## 作成 + +LocalTicketBackend によって作成されました。 + +--- + + + +## Intake summary + +Marked ready by `yoi ticket state`. + +--- + + + +## State changed + +Marked ready by `yoi ticket state`. + + +--- diff --git a/devshell.nix b/devshell.nix index ae06238c..2fb51c8d 100644 --- a/devshell.nix +++ b/devshell.nix @@ -13,9 +13,9 @@ pkgs.mkShell { ]; shellHook = '' if repo_root="$(git rev-parse --show-toplevel 2>/dev/null)"; then - export YOI_POD_RUNTIME_COMMAND="$repo_root/target/debug/yoi" + # export YOI_POD_RUNTIME_COMMAND="$repo_root/target/debug/yoi" else - export YOI_POD_RUNTIME_COMMAND="$PWD/target/debug/yoi" + # export YOI_POD_RUNTIME_COMMAND="$PWD/target/debug/yoi" fi echo "dev-shell-loaded" echo "YOI_POD_RUNTIME_COMMAND=$YOI_POD_RUNTIME_COMMAND"