merge: sync orchestration before queue 00001KVJABS1A
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: 'MCP: register server tools into ToolRegistry'
|
||||
state: 'inprogress'
|
||||
state: 'closed'
|
||||
created_at: '2026-06-20T05:30:04Z'
|
||||
updated_at: '2026-06-20T08:30:22Z'
|
||||
updated_at: '2026-06-20T08:46:32Z'
|
||||
assignee: null
|
||||
readiness: 'implementation_ready'
|
||||
risk_flags: ['mcp', 'tools-list', 'tool-registry', 'schema', 'untrusted-metadata']
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WS6` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `tools/list` protocol result/tool types と bounded pagination helper を `crates/mcp` に追加しました。
|
||||
- MCP stdio discovery feature module を `crates/pod` に追加しました。
|
||||
- Configured stdio server を initialize し、bounded `tools/list` を呼び、server-provided tool metadata を untrusted data として検証・正規化して ToolRegistry contribution path に登録します。
|
||||
- Tool names は server namespace を含む stable namespaced name(例: `Mcp_<server>_<tool>`)に正規化されます。
|
||||
- Invalid schema、duplicate/colliding normalized names は bounded diagnostics で fail-closed になります。Collision 時は該当 normalized identity は model-visible tool になりません。
|
||||
- Server metadata / annotations / instructions は Yoi instructions, scope, permissions, system/developer instructions を弱める authority として扱いません。
|
||||
- Registration は existing protocol-provider / ToolRegistry contribution path を通ります。
|
||||
- This Ticket は `tools/call` execution を実装していません。Registered discovery-only stub は explicit not-implemented error を返し、MCP `tools/call` は送信しません。
|
||||
- Resources/prompts/list_changed は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `66fa9d55 mcp: register stdio server tools`
|
||||
- `0080c5b3 mcp: reject colliding tool names`
|
||||
- `a1f904b8 merge: mcp tool registration`
|
||||
|
||||
Review:
|
||||
- r1 は duplicate/colliding normalized MCP tool names が diagnostic-only で fail-closed でないため `request_changes`。
|
||||
- Coder が collision handling を修正し、該当 identity が model-visible にならない test を追加。
|
||||
- r2 は `approve`。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp list_tools --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp --lib`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113089912`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-SnBew4.log`
|
||||
@@ -169,3 +169,235 @@ Review dispatch:
|
||||
- Reviewer is instructed not to edit source, commit, merge, close the Ticket, or use TicketReview directly; it will report verdict/evidence back to Orchestrator。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHR3WS6-r1 at: 2026-06-20T08:35:07Z status: request_changes -->
|
||||
|
||||
## Review: request changes
|
||||
|
||||
Verdict: `request_changes`
|
||||
|
||||
確認範囲:
|
||||
- Ticket contract / Orchestrator IntentPacket。
|
||||
- Diff: `a59e5c1e..66fa9d55`。
|
||||
- 主な対象: `crates/pod/src/feature/mcp.rs`, `crates/pod/src/controller.rs`, `crates/pod/src/feature.rs`, `crates/mcp/src/stdio.rs`, `crates/mcp/tests/stdio_lifecycle.rs`, `crates/mcp/tests/fixtures/mock_server.rs`, `crates/pod/Cargo.toml`, `Cargo.lock`, `package.nix`。
|
||||
- `tools/call`, resources/prompts registration, `list_changed`/`listChanged` handlingを確認。
|
||||
|
||||
Blocking issue:
|
||||
1. Duplicate/colliding MCP tool names が fail-closed で reject されていない。
|
||||
- Path: `crates/pod/src/feature/mcp.rs`
|
||||
- `normalize_listed_tools` は最初の normalized name を登録し、後続 duplicate は diagnostic を出して skip するだけ。
|
||||
- Test `duplicate_names_after_normalization_are_diagnostic_only` はこの挙動を期待している。
|
||||
- Ticket / IntentPacket は invalid schemas / duplicates / collisions を fail-closed with bounded diagnostics と要求している。
|
||||
- Server-controlled ordering で衝突する片方が model-visible tool として勝つため、normalized tool identity に対して fail-closed ではない。
|
||||
|
||||
Required fix:
|
||||
- Duplicate/colliding normalized names は、少なくとも該当 normalized identity の tool を model-visible にしないこと。
|
||||
- より安全には、その server contribution/tool set 全体を reject/diagnostic-only にすること。
|
||||
- Test を更新し、colliding normalized name が model-visible tool として登録されないことを確認する。
|
||||
|
||||
Non-blocking concerns / follow-ups:
|
||||
- Acceptance criteria の run-stable schema behavior について、active-run refresh/list_changed mutation は見当たらないが、明示テストはない。可能なら追加するとよい。
|
||||
- Secret-backed stdio env は integration path が `resolve_stdio_server(..., None)` のため bounded diagnostic で fail し、silent support claim はしていない。これは今回の deferral と整合。
|
||||
|
||||
Positive findings:
|
||||
- `tools/list` は initialize 後に `McpStdioClient::list_tools_bounded` 経由で呼ばれる。
|
||||
- Pagination / tool-count bounds がある。
|
||||
- `tools/call` execution path は追加されていない。model-visible stub は not-implemented error を返す。
|
||||
- Resources/prompts は登録されていない。
|
||||
- Registration は既存 `pod::feature` protocol-provider contribution path を通って Worker/ToolRegistry に入る。
|
||||
- Server `instructions`, annotations, `_meta`, output schema は authority として使われていない。
|
||||
- Lifecycle redaction/shutdown behavior は保持されている。
|
||||
- Nix/Cargo dependency updates は minimal/consistent。
|
||||
|
||||
Reviewer validation:
|
||||
- `cargo fmt --check`: passed。
|
||||
- `git diff --check a59e5c1e..HEAD`: passed。
|
||||
- `cargo test -p mcp list_tools --test stdio_lifecycle`: passed。
|
||||
- `cargo test -p pod feature::mcp --lib`: passed。
|
||||
- `cargo test -p mcp`: passed。
|
||||
- `cargo check -p pod -p mcp`: passed。
|
||||
- `nix build .#yoi --no-link`: passed。
|
||||
|
||||
Worktree status at review end: clean。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T08:40:48Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Coder r1-fix report received from `yoi-coder-00001KVHR3WS6`.
|
||||
|
||||
New fix commit:
|
||||
- `0080c5b3 mcp: reject colliding tool names`
|
||||
|
||||
Branch commits now:
|
||||
- `0080c5b3 mcp: reject colliding tool names`
|
||||
- `66fa9d55 mcp: register stdio server tools`
|
||||
|
||||
Fix summary:
|
||||
- Changed duplicate/collision handling in `crates/pod/src/feature/mcp.rs` to fail closed for the normalized tool identity。
|
||||
- Implementation now normalizes all valid candidate tools first, counts namespaced normalized names, emits bounded duplicate diagnostics, and registers only candidates whose normalized name appears exactly once。
|
||||
- Server-controlled ordering can no longer cause the first colliding definition to become model-visible。
|
||||
- Updated test to prove `Mcp_demo_search_files` is not model-visible when produced by two colliding MCP tool names, while unrelated valid `Mcp_demo_unique` still registers。
|
||||
|
||||
Coder validation reported as passing:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check a59e5c1e..HEAD`
|
||||
- `cargo test -p mcp list_tools --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp --lib`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Remaining deferrals unchanged:
|
||||
- MCP `tools/call` execution remains intentionally unimplemented。
|
||||
- Resources/prompts and `list_changed` handling remain out of scope。
|
||||
|
||||
Orchestrator evidence checked before r2 review:
|
||||
- Implementation worktree is clean。
|
||||
- HEAD is `0080c5b3`。
|
||||
- Fix diff from `66fa9d55..HEAD` touches only `crates/pod/src/feature/mcp.rs`, about 43 insertions / 17 deletions。
|
||||
- Overall `git diff --check a59e5c1e..HEAD` produced no diagnostics。
|
||||
|
||||
Next action:
|
||||
- Route back to Reviewer for r2 verification of duplicate/collision fail-closed behavior and final acceptance criteria。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHR3WS6-r1 at: 2026-06-20T08:44:25Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
Verdict: `approve`
|
||||
|
||||
確認範囲:
|
||||
- Ticket contract / Orchestrator IntentPacket。
|
||||
- Fix diff: `66fa9d55..0080c5b3`。
|
||||
- Overall diff: `a59e5c1e..0080c5b3`。
|
||||
- 主な対象: `crates/pod/src/feature/mcp.rs`、MCP registration boundaries、ToolRegistry contribution path、no `tools/call` / no resources/prompts、bounded `tools/list` pagination、metadata/schema/name normalization、discovery-only stub behavior、Cargo/Nix changes。
|
||||
|
||||
Previous blocker verification:
|
||||
- `normalize_listed_tools` は valid candidates を先に構築し、normalized namespaced name を count するようになった。
|
||||
- count > 1 の names には bounded duplicate diagnostic を出す。
|
||||
- 登録されるのは normalized name が exactly once の candidate のみ。
|
||||
- Updated test `duplicate_names_after_normalization_are_not_model_visible` は、`search-files` / `search files` の collision が `Mcp_demo_search_files` を model-visible にしないこと、および unrelated valid `Mcp_demo_unique` は register されることを確認している。
|
||||
- これにより duplicate/colliding MCP tool names が fail-closed になるという Ticket requirement を満たしている。
|
||||
|
||||
Blocking issues: none。
|
||||
|
||||
Non-blocking follow-up:
|
||||
- 複数 configured MCP servers 間の sanitized server namespace collision について、将来 explicit coverage を追加してもよいが、この Ticket の discovered-tool name collision acceptance path では blocker ではない。
|
||||
|
||||
Reviewer validation:
|
||||
- `cargo fmt --check`: passed。
|
||||
- `git diff --check a59e5c1e..HEAD`: passed。
|
||||
- `cargo test -p mcp list_tools --test stdio_lifecycle`: passed, 3 tests。
|
||||
- `cargo test -p pod feature::mcp --lib`: passed, 5 tests。
|
||||
- `cargo test -p mcp`: passed, 8 tests。
|
||||
- `cargo check -p pod -p mcp`: passed。
|
||||
- `nix build .#yoi --no-link`: passed。
|
||||
|
||||
Worktree status at review end: clean。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T08:46:04Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Merge and final validation report:
|
||||
|
||||
Merged implementation branch into Orchestrator branch:
|
||||
- Merge commit: `a1f904b8 merge: mcp tool registration`
|
||||
- Implementation commits included:
|
||||
- `66fa9d55 mcp: register stdio server tools`
|
||||
- `0080c5b3 mcp: reject colliding tool names`
|
||||
|
||||
Reviewer outcome:
|
||||
- r1 requested changes because duplicate/colliding normalized MCP tool names were diagnostic-only and allowed the first colliding definition to become model-visible。
|
||||
- Coder changed normalization to count all valid names first and register only identities that occur exactly once, plus updated tests。
|
||||
- r2 approved with no blocking issues。
|
||||
|
||||
Orchestrator validation after merge passed:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp list_tools --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp --lib`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
- `nix path-info -S .#yoi`: `113089912`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-SnBew4.log`
|
||||
|
||||
Final state:
|
||||
- Orchestrator worktree clean at `a1f904b8` after validation。
|
||||
- Implementation worktree remains available for cleanup after Ticket completion records are committed。
|
||||
- Dashboard/Console refactor is now running in parallel in separate child worktree and is unaffected by this merge。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T08:46:10Z from: inprogress to: done reason: merged_reviewed_validated field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Implementation was merged into Orchestrator branch at `a1f904b8`, r2 review approved, and final Orchestrator validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, focused `mcp` and `pod feature::mcp` tests, `cargo check -p pod -p mcp`, and `nix build .#yoi --no-link`.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: hare at: 2026-06-20T08:46:32Z from: done to: closed reason: closed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Ticket を closed にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-20T08:46:32Z status: closed -->
|
||||
|
||||
## 完了
|
||||
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WS6` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `tools/list` protocol result/tool types と bounded pagination helper を `crates/mcp` に追加しました。
|
||||
- MCP stdio discovery feature module を `crates/pod` に追加しました。
|
||||
- Configured stdio server を initialize し、bounded `tools/list` を呼び、server-provided tool metadata を untrusted data として検証・正規化して ToolRegistry contribution path に登録します。
|
||||
- Tool names は server namespace を含む stable namespaced name(例: `Mcp_<server>_<tool>`)に正規化されます。
|
||||
- Invalid schema、duplicate/colliding normalized names は bounded diagnostics で fail-closed になります。Collision 時は該当 normalized identity は model-visible tool になりません。
|
||||
- Server metadata / annotations / instructions は Yoi instructions, scope, permissions, system/developer instructions を弱める authority として扱いません。
|
||||
- Registration は existing protocol-provider / ToolRegistry contribution path を通ります。
|
||||
- This Ticket は `tools/call` execution を実装していません。Registered discovery-only stub は explicit not-implemented error を返し、MCP `tools/call` は送信しません。
|
||||
- Resources/prompts/list_changed は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `66fa9d55 mcp: register stdio server tools`
|
||||
- `0080c5b3 mcp: reject colliding tool names`
|
||||
- `a1f904b8 merge: mcp tool registration`
|
||||
|
||||
Review:
|
||||
- r1 は duplicate/colliding normalized MCP tool names が diagnostic-only で fail-closed でないため `request_changes`。
|
||||
- Coder が collision handling を修正し、該当 identity が model-visible にならない test を追加。
|
||||
- r2 は `approve`。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp list_tools --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp --lib`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113089912`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-SnBew4.log`
|
||||
|
||||
---
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
{"id":"orch-plan-20260620-060022-1","ticket_id":"00001KVHR3WSD","kind":"blocked_by","related_ticket":"00001KVHR3WS6","note":"tools/call execution requires registered MCP tools. `00001KVHR3WS6` is queued and depends on lifecycle; leave this Ticket queued until tool registration is closed.","author":"yoi-orchestrator","at":"2026-06-20T06:00:22Z"}
|
||||
{"id":"orch-plan-20260620-084746-2","ticket_id":"00001KVHR3WSD","kind":"accepted_plan","accepted_plan":{"summary":"Registered MCP tool invocationを existing ordinary Tool pathから MCP `tools/call` に接続する。PreToolCall/Tool permission denial は server request 前に適用し、normal result / MCP `isError` / JSON-RPC protocol error を区別し、content/structuredContent/_meta を boundedに Tool resultへ変換する。","branch":"impl/00001KVHR3WSD-mcp-tools-call","worktree":"/home/hare/Projects/yoi/.worktree/00001KVHR3WSD-mcp-tools-call","role_plan":"ユーザーが blocker のない作業の並列実行を許可したため、Dashboard/Console refactor と並行して MCP `tools/call` Ticket を専用 worktree `.worktree/00001KVHR3WSD-mcp-tools-call` で開始する。Coder は child worktree narrow write scopeで実装し、Reviewer は permission-before-call、ordinary Tool history path、bounded result serialization、no resources/prompts/list_changed scope creep を確認する。"},"author":"yoi-orchestrator","at":"2026-06-20T08:47:46Z"}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: 'MCP: execute tools/call through ordinary Tool path'
|
||||
state: 'queued'
|
||||
state: 'closed'
|
||||
created_at: '2026-06-20T05:30:04Z'
|
||||
updated_at: '2026-06-20T06:00:44Z'
|
||||
updated_at: '2026-06-20T09:18:51Z'
|
||||
assignee: null
|
||||
readiness: 'implementation_ready'
|
||||
risk_flags: ['mcp', 'tools-call', 'permission', 'history', 'bounded-output']
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WSD` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `tools/call` typed request/result/content types を追加しました。
|
||||
- `McpStdioClient::call_tool(...)` を追加しました。
|
||||
- MCP discovered tool の discovery-only stub を executable `McpStdioTool` に置き換えました。
|
||||
- Execution は configured stdio MCP server を spawn/initialize し、`tools/call` を送信して shutdown します。
|
||||
- Permission denial は ordinary Worker `PreToolCall` path により Tool execution 前に適用されるため、denied call は MCP server に送信されません。
|
||||
- Results は ordinary Tool result/history path を通ります。Hidden context injection はありません。
|
||||
- Normal MCP result、MCP `isError: true`、JSON-RPC protocol error を区別しました。
|
||||
- MCP content / structuredContent / `_meta` / rich output は untrusted data として bounded に serialization されます。
|
||||
- Image/audio data は raw payload を落とし、size metadata のみ残します。
|
||||
- Resources/read、prompts/get、list_changed、sampling、elicitation は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `9a245403 mcp: execute stdio tool calls`
|
||||
- `399a9d43 merge: mcp tools call`
|
||||
|
||||
Review:
|
||||
- r1 は `approve`。
|
||||
- Reviewer は permission-before-call、ordinary Tool result/history path、`isError` と protocol error の区別、bounded/untrusted result handling、out-of-scope surface が無いことを確認しました。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp`
|
||||
- `cargo check -p mcp -p pod`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113196368`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-lkjYsX.log`
|
||||
@@ -27,3 +27,288 @@ Next:
|
||||
- `00001KVHR3WS6` が closed になった後、改めて reroute する。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: decision author: yoi-orchestrator at: 2026-06-20T08:48:07Z -->
|
||||
|
||||
## Decision
|
||||
|
||||
Routing decision: implementation_ready_parallel
|
||||
|
||||
Reason:
|
||||
- User directive: 「blocker無いなら並列にやっちゃえよ」。この指示により、未解決 blocker がない Ticket は並列実装対象として扱う。
|
||||
- 前回は `00001KVHR3WS6` tool registration が未完了だったため blocked/queued hold としたが、現在 `00001KVHR3WS6` は closed。
|
||||
- Ticket body は MCP `tools/call` execution、permission-before-call、ordinary Tool result/history path、normal result / MCP `isError` / JSON-RPC protocol error の区別、bounded result serialization を実装可能な粒度で定義している。
|
||||
- 現在 inprogress は Dashboard/Console TUI refactor `00001KVHX0WBE` のみで、作業領域は TUI/CLI naming/module boundary。MCP `tools/call` 実装とは直接 conflict しないため、別 worktree / sibling Coder Pod で並列化できる。
|
||||
- Orchestrator worktree は clean、matching branch/worktree はなし。
|
||||
- Risk domain は mcp / tools-call / permission / history / bounded-output だが、Ticket は permission denied before server request、ordinary Tool result/history path、bounded output、untrusted content treatment を明示している。bounded context check 後も implementation 前に必要な追加 human decision は見つからなかった。
|
||||
|
||||
Evidence checked:
|
||||
- Ticket `00001KVHR3WSD` body / thread / relations / artifacts。
|
||||
- `TicketRelationQuery(00001KVHR3WSD)`: outgoing `depends_on 00001KVHR3WS6` is now closed。
|
||||
- `TicketOrchestrationPlanQuery(00001KVHR3WSD)`: previous `blocked_by 00001KVHR3WS6` is resolved; accepted plan recorded now。
|
||||
- Workspace state:
|
||||
- Orchestrator worktree clean at `381db88e`。
|
||||
- inprogress: `00001KVHX0WBE` only。
|
||||
- visible spawned child: Dashboard/Console Coder only。
|
||||
- no matching MCP tools-call branch/worktree。
|
||||
|
||||
IntentPacket:
|
||||
|
||||
Intent:
|
||||
- Route invocation of registered MCP-backed Yoi tools to MCP `tools/call` through ordinary Yoi Tool execution/result/history paths。
|
||||
- Enforce existing PreToolCall / Tool permission policy before any MCP server request is sent。
|
||||
|
||||
Binding decisions / invariants:
|
||||
- Permission denial must occur before sending `tools/call` to the MCP server。
|
||||
- MCP result content is untrusted and must not become hidden context injection。
|
||||
- Results must be recorded through ordinary Tool call/result history path。
|
||||
- Distinguish normal result, MCP `isError: true`, and JSON-RPC protocol error。
|
||||
- Serialize content blocks / structuredContent / `_meta` boundedly; oversize/rich results must be truncated or rejected by explicit policy。
|
||||
- Preserve lifecycle/registration redaction and bounds from previous MCP Tickets。
|
||||
- Do not implement resources/read, prompts/get, list_changed, sampling, or elicitation in this Ticket。
|
||||
|
||||
Requirements / acceptance criteria:
|
||||
- MCP mock tool returns normal result through ordinary Yoi Tool result。
|
||||
- MCP `isError: true` is represented distinctly from JSON-RPC protocol failure。
|
||||
- Permission denied call is not sent to MCP server。
|
||||
- Oversize/rich results are bounded/truncated or rejected according to explicit policy。
|
||||
- Tool history shows ordinary tool call/result, not hidden context injection。
|
||||
- Tests cover normal result, `isError`, protocol error, permission denial, and output bounds。
|
||||
|
||||
Escalate if:
|
||||
- Existing ToolRegistry contribution path cannot route invocation without broad provider-substrate redesign。
|
||||
- Permission-before-call cannot be represented without changing Tool policy architecture。
|
||||
- Result serialization requires product decisions beyond a safe bounded subset。
|
||||
|
||||
Next action:
|
||||
- Record `queued -> inprogress` and commit Ticket records before creating implementation worktree and spawning Coder。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T08:48:15Z from: queued to: inprogress reason: orchestrator_acceptance_parallel_mcp_tools_call field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
User explicitly authorized parallel implementation when no blocker exists. Ticket body/thread, relation metadata, closed MCP tool-registration dependency, Orchestrator worktree state, visible Pods, existing branch/worktree, and bounded MCP tools/call context were checked. Dependency `00001KVHR3WS6` is closed, no matching worktree/branch exists, and no missing planning decision was found. Accepting this queued Ticket for parallel implementation before worktree/Pod side effects.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T08:49:21Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Implementation orchestration start:
|
||||
- User explicitly authorized parallel work for Tickets without blockers。
|
||||
- Acceptance records were committed on Orchestrator branch: `92432ad7 ticket: accept mcp tools call`。
|
||||
- Created implementation worktree `/home/hare/Projects/yoi/.worktree/00001KVHR3WSD-mcp-tools-call` on branch `impl/00001KVHR3WSD-mcp-tools-call` at `92432ad7`。
|
||||
- Spawned Coder Pod `yoi-coder-00001KVHR3WSD` with write scope limited to the implementation worktree and read-only root scope only for runtime workspace identity。
|
||||
- Coder task explicitly forbids root/original workspace implementation, resources/prompts/list_changed scope creep, merge, Ticket close, and cleanup。
|
||||
|
||||
Next action:
|
||||
- Let MCP tools/call Coder proceed in parallel with Dashboard/Console Coder. Inspect implementation reports and route each to Reviewer when ready。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:08:42Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Coder implementation report received from `yoi-coder-00001KVHR3WSD`.
|
||||
|
||||
Implementation commit:
|
||||
- `9a245403 mcp: execute stdio tool calls`
|
||||
|
||||
Changed areas reported:
|
||||
- `crates/mcp/src/stdio.rs`:
|
||||
- Added typed `CallToolRequest`, `CallToolResult`, and `McpContentBlock`。
|
||||
- Added `McpStdioClient::call_tool(...)` for MCP `tools/call`。
|
||||
- `crates/pod/src/feature/mcp.rs`:
|
||||
- Replaced discovery-only MCP tool stub with executable `McpStdioTool`。
|
||||
- Execution spawns/initializes the configured stdio MCP server, sends `tools/call`, then shuts down。
|
||||
- Result serialization is deterministic/model-visible/untrusted and bounded: content block cap, text/string truncation, JSON depth/node caps, binary/rich image/audio data omitted with size metadata, final output byte cap。
|
||||
- MCP `isError: true` is represented as an MCP tool-level result distinct from JSON-RPC protocol errors。
|
||||
- `crates/mcp/tests/fixtures/mock_server.rs`:
|
||||
- Added mock modes for normal `tools/call`, MCP `isError`, JSON-RPC protocol error, and no-call assertion。
|
||||
- `crates/mcp/tests/stdio_lifecycle.rs`:
|
||||
- Added focused lifecycle/client tests for normal result, `isError`, protocol error, and permission-denial-style no-call。
|
||||
|
||||
Coder validation reported:
|
||||
- `cargo test -p mcp --test stdio_lifecycle`: passed, 12 tests。
|
||||
- `cargo test -p pod feature::mcp`: passed, 9 tests。
|
||||
- `cargo check -p mcp -p pod`: passed。
|
||||
- `cargo fmt --check`: passed。
|
||||
- `git diff --check`: passed。
|
||||
- `nix build .#yoi --no-link`: passed。
|
||||
|
||||
Known deferrals:
|
||||
- MCP resources/read, prompts/get, list_changed, sampling, and elicitation remain unimplemented as requested。
|
||||
- MCP `isError: true` is returned through ordinary `ToolOutput` with explicit `status: "mcp_is_error"` / `isError: true`; JSON-RPC failures remain `ToolError`s。
|
||||
|
||||
Orchestrator evidence checked before review dispatch:
|
||||
- Implementation worktree is clean。
|
||||
- HEAD is `9a245403`。
|
||||
- Diff from acceptance `92432ad7..HEAD` is one implementation commit touching 4 files, about 688 insertions / 11 deletions。
|
||||
- `git diff --check 92432ad7..HEAD` produced no diagnostics。
|
||||
|
||||
Next action:
|
||||
- Dispatch Reviewer for r1 review against Ticket requirements, with focus on permission-before-call, ordinary Tool result/history path, `isError` vs protocol error distinction, output bounds/untrusted content, no resources/prompts/list_changed scope creep, and test coverage。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: plan author: yoi-orchestrator at: 2026-06-20T09:09:50Z -->
|
||||
|
||||
## Plan
|
||||
|
||||
Review dispatch:
|
||||
- Spawned Reviewer Pod `yoi-reviewer-00001KVHR3WSD-r1` against implementation branch `impl/00001KVHR3WSD-mcp-tools-call`。
|
||||
- Review target commit: `9a245403 mcp: execute stdio tool calls`。
|
||||
- Review baseline: `92432ad7`。
|
||||
- Reviewer task focuses on permission-before-call, ordinary Tool result/history path, `isError` vs protocol error semantics, output bounds/untrusted content, lifecycle redaction/shutdown preservation, no resources/prompts/list_changed/sampling/elicitation scope creep, tests, and package validation。
|
||||
- Reviewer is instructed not to edit source, commit, merge, close the Ticket, or use TicketReview directly; it will report verdict/evidence back to Orchestrator。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHR3WSD-r1 at: 2026-06-20T09:16:53Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
Verdict: `approve`
|
||||
|
||||
確認範囲:
|
||||
- Ticket contract / Orchestrator IntentPacket。
|
||||
- Implementation diff: `92432ad7..9a245403`。
|
||||
- 主な対象: `crates/pod/src/feature/mcp.rs`, `crates/mcp/src/stdio.rs`, `crates/mcp/tests/stdio_lifecycle.rs`, `crates/mcp/tests/fixtures/mock_server.rs`。
|
||||
- Ordinary Worker/permission path: `crates/llm-worker/src/worker.rs`, `crates/pod/src/permission.rs`, `crates/pod/src/feature.rs`。
|
||||
- Out-of-scope MCP surfaces (`resources/read`, `prompts/get`, `list_changed`, sampling/elicitation) の追加有無。
|
||||
|
||||
Blocking issues: none。
|
||||
|
||||
Critical risk checks:
|
||||
- Permission denial occurs before `tools/call` can be sent:
|
||||
- MCP-discovered tools are ordinary `ToolDefinition`s wrapping `McpStdioTool`。
|
||||
- Protocol-provider contributions install through `register_tool_contribution`, not a private bypass。
|
||||
- Worker executes `pre_tool_call` first and only executes approved tools afterward。
|
||||
- Pod manifest permissions are `PreToolCall` hooks returning deny as synthetic results。
|
||||
- Result flow uses ordinary Tool result/history path:
|
||||
- `McpStdioTool::execute` returns `ToolOutput`。
|
||||
- Worker converts to `ToolResult` and commits through existing history append path。
|
||||
- No hidden context injection or out-of-band model context path found。
|
||||
- Normal MCP result / MCP `isError: true` / JSON-RPC protocol error are distinct:
|
||||
- `CallToolResult` carries `is_error` separately from JSON-RPC error。
|
||||
- MCP `isError: true` renders as model-visible untrusted data with `"status": "mcp_is_error"`。
|
||||
- JSON-RPC error becomes `ToolError::ExecutionFailed` with protocol error wording。
|
||||
- Output bounding/untrusted handling exists for content blocks, text/string caps, JSON depth/node caps, rich image/audio data omission, and final byte cap。
|
||||
- Result root is marked `untrusted_mcp_tools_call_result` and preserves server payload as data。
|
||||
- Existing lifecycle/redaction/shutdown behavior is preserved。
|
||||
- No resources/prompts/list_changed/sampling/elicitation scope creep found。
|
||||
|
||||
Non-blocking concerns / follow-ups:
|
||||
- MCP-specific permission-denial test is lifecycle no-call style, while actual Worker deny/no-execute behavior is covered by generic Worker synthetic-result test path. Code inspection confirms MCP tools use ordinary Worker path, so this is not blocking. Future MCP-specific Worker-level regression would make the invariant more direct。
|
||||
- Minor wording nit: successful `tools/call` with shutdown failure says “shutdown after tools/call failed”; functionally non-blocking。
|
||||
|
||||
Reviewer validation:
|
||||
- `git diff --check 92432ad7..HEAD`: passed。
|
||||
- `cargo fmt --check`: passed。
|
||||
- `cargo test -p mcp --test stdio_lifecycle`: passed, 12 tests。
|
||||
- `cargo test -p pod feature::mcp`: passed, 9 tests。
|
||||
- `cargo check -p mcp -p pod`: passed。
|
||||
- `nix build .#yoi --no-link` not run by Reviewer because diff has no Cargo/Nix/source-filter changes and focused Rust checks passed。
|
||||
|
||||
Worktree status at review end: clean。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:18:04Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Merge and final validation report:
|
||||
|
||||
Merged implementation branch into Orchestrator branch:
|
||||
- Merge commit: `399a9d43 merge: mcp tools call`
|
||||
- Implementation commit included:
|
||||
- `9a245403 mcp: execute stdio tool calls`
|
||||
|
||||
Reviewer outcome:
|
||||
- r1 approved with no blocking issues。
|
||||
- Reviewer confirmed permission-before-call through ordinary Worker PreToolCall path, ordinary Tool result/history path, distinct MCP `isError` vs JSON-RPC protocol error, bounded/untrusted result serialization, and no resources/prompts/list_changed/sampling/elicitation scope creep。
|
||||
|
||||
Orchestrator validation after merge passed:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp`
|
||||
- `cargo check -p mcp -p pod`
|
||||
- `nix build .#yoi --no-link`
|
||||
- `nix path-info -S .#yoi`: `113196368`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-lkjYsX.log`
|
||||
|
||||
Final state:
|
||||
- Orchestrator worktree clean at `399a9d43` after validation。
|
||||
- Implementation worktree remains available for cleanup after Ticket completion records are committed。
|
||||
- Dashboard/Console review remains active in parallel and is unaffected by this merge。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T09:18:12Z from: inprogress to: done reason: merged_reviewed_validated field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Implementation was merged into Orchestrator branch at `399a9d43`, review approved, and final Orchestrator validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p mcp --test stdio_lifecycle`, `cargo test -p pod feature::mcp`, `cargo check -p mcp -p pod`, and `nix build .#yoi --no-link`.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: hare at: 2026-06-20T09:18:51Z from: done to: closed reason: closed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Ticket を closed にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-20T09:18:51Z status: closed -->
|
||||
|
||||
## 完了
|
||||
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WSD` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `tools/call` typed request/result/content types を追加しました。
|
||||
- `McpStdioClient::call_tool(...)` を追加しました。
|
||||
- MCP discovered tool の discovery-only stub を executable `McpStdioTool` に置き換えました。
|
||||
- Execution は configured stdio MCP server を spawn/initialize し、`tools/call` を送信して shutdown します。
|
||||
- Permission denial は ordinary Worker `PreToolCall` path により Tool execution 前に適用されるため、denied call は MCP server に送信されません。
|
||||
- Results は ordinary Tool result/history path を通ります。Hidden context injection はありません。
|
||||
- Normal MCP result、MCP `isError: true`、JSON-RPC protocol error を区別しました。
|
||||
- MCP content / structuredContent / `_meta` / rich output は untrusted data として bounded に serialization されます。
|
||||
- Image/audio data は raw payload を落とし、size metadata のみ残します。
|
||||
- Resources/read、prompts/get、list_changed、sampling、elicitation は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `9a245403 mcp: execute stdio tool calls`
|
||||
- `399a9d43 merge: mcp tools call`
|
||||
|
||||
Review:
|
||||
- r1 は `approve`。
|
||||
- Reviewer は permission-before-call、ordinary Tool result/history path、`isError` と protocol error の区別、bounded/untrusted result handling、out-of-scope surface が無いことを確認しました。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp --test stdio_lifecycle`
|
||||
- `cargo test -p pod feature::mcp`
|
||||
- `cargo check -p mcp -p pod`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113196368`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-lkjYsX.log`
|
||||
|
||||
---
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
{"id":"orch-plan-20260620-060022-1","ticket_id":"00001KVHR3WSN","kind":"blocked_by","related_ticket":"00001KVHR3WRY","note":"Resources/prompts operations require initialized MCP stdio lifecycle. `00001KVHR3WRY` is queued and depends on `00001KVHR3WRF`; leave this Ticket queued until lifecycle is closed.","author":"yoi-orchestrator","at":"2026-06-20T06:00:22Z"}
|
||||
{"id":"orch-plan-20260620-093652-2","ticket_id":"00001KVHR3WSN","kind":"accepted_plan","accepted_plan":{"summary":"MCP resources/list, resources/read, prompts/list, prompts/get を explicit namespaced Yoi tool operationsとして exposeし、returned content/templatesを untrusted ordinary Tool result dataとして履歴に記録する。Hidden context injection を導入せず、result size/rich content/paginationを boundedに扱う。","branch":"impl/00001KVHR3WSN-mcp-resources-prompts-tools","worktree":"/home/hare/Projects/yoi/.worktree/00001KVHR3WSN-mcp-resources-prompts-tools","role_plan":"Orchestrator は acceptance records を commit 後、専用 implementation worktree `.worktree/00001KVHR3WSN-mcp-resources-prompts-tools` を作成し、Coder をその child worktree への narrow write scope で起動する。Coder 実装後、Reviewer が resources/prompts explicit tool operations、ordinary Tool result/history path、hidden context injection absence、untrusted/bounded content handling、pagination/bounds、no list_changed/sampling/elicitation scope creep を確認する。"},"author":"yoi-orchestrator","at":"2026-06-20T09:36:52Z"}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: 'MCP: expose resources and prompts as explicit tool operations'
|
||||
state: 'queued'
|
||||
state: 'closed'
|
||||
created_at: '2026-06-20T05:30:04Z'
|
||||
updated_at: '2026-06-20T06:00:44Z'
|
||||
updated_at: '2026-06-20T10:05:16Z'
|
||||
assignee: null
|
||||
readiness: 'implementation_ready'
|
||||
risk_flags: ['mcp', 'resources', 'prompts', 'prompt-context', 'history', 'untrusted-content']
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WSN` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `resources/list`, `resources/read`, `prompts/list`, `prompts/get` の typed protocol structs / helpers を追加しました。
|
||||
- Server capabilities に応じて explicit namespaced Yoi tools を登録します。
|
||||
- `Mcp_<server>_resources_list`
|
||||
- `Mcp_<server>_resources_read`
|
||||
- `Mcp_<server>_prompts_list`
|
||||
- `Mcp_<server>_prompts_get`
|
||||
- Resources/prompts operations は ordinary Tool path / `ToolOutput` を通って実行されます。
|
||||
- Returned resources / prompt templates / prompt messages は untrusted Tool result data として serialization され、hidden context injection はありません。
|
||||
- Result serialization は list items、resource contents、prompt messages、text fields、`_meta`、structured JSON depth/node count、rich blobs/images/audio、final output bytes を bounded に扱います。
|
||||
- Capability が advertise されていない operation は model-visible tool として expose されません。
|
||||
- `list_changed` refresh、sampling、elicitation は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `3a22360a mcp: expose resources prompts tools`
|
||||
- `4a4590f8 merge: mcp resources prompts tools`
|
||||
|
||||
Review:
|
||||
- r1 は `approve`。
|
||||
- Reviewer は explicit Tool operations、ordinary `ToolOutput` path、no hidden context injection、untrusted/bounded serialization、capability-gated registration、no sampling/elicitation/list_changed scope creep を確認しました。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --all --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p pod mcp::tests`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113403880`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-4oVSE2.log`
|
||||
@@ -27,3 +27,309 @@ Next:
|
||||
- `00001KVHR3WRY` が closed になった後、改めて reroute する。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: decision author: yoi-orchestrator at: 2026-06-20T09:37:14Z -->
|
||||
|
||||
## Decision
|
||||
|
||||
Routing decision: implementation_ready_parallel
|
||||
|
||||
Reason:
|
||||
- User directive: 「blocker無いなら並列にやっちゃえよ」。現在 inprogress は 0 件であり、依存 blocker も解消済みのため、この queued Ticket を開始する。
|
||||
- 前回は `00001KVHR3WRY` stdio lifecycle が未完了だったため blocked/queued hold としたが、現在 `00001KVHR3WRY` は closed。
|
||||
- Ticket body は resources/list, resources/read, prompts/list, prompts/get を explicit tool operations として exposeし、hidden context injection を禁止し、ordinary Tool result/history path・untrusted/bounded content handling・pagination/list bounds を明確にしている。
|
||||
- Orchestrator worktree は clean、matching branch/worktree はなし。
|
||||
- Risk domain は mcp / resources / prompts / prompt-context / history / untrusted-content だが、Ticket は explicit Tool operations、ordinary history、no hidden injection、bounded/rich content serialization を明示している。bounded context check 後も implementation 前に必要な追加 human decision は見つからなかった。
|
||||
|
||||
Evidence checked:
|
||||
- Ticket `00001KVHR3WSN` body / thread / relations / artifacts。
|
||||
- `TicketRelationQuery(00001KVHR3WSN)`: outgoing `depends_on 00001KVHR3WRY` is now closed。
|
||||
- `TicketOrchestrationPlanQuery(00001KVHR3WSN)`: previous `blocked_by 00001KVHR3WRY` is resolved; accepted plan recorded now。
|
||||
- Workspace state:
|
||||
- Orchestrator worktree clean at `6ac916c7`。
|
||||
- queued: `00001KVHR3WSN`, `00001KVHR3WSW`。
|
||||
- inprogress: 0。
|
||||
- spawned child implementation Pods: 0。
|
||||
- no matching MCP resources/prompts branch/worktree。
|
||||
|
||||
IntentPacket:
|
||||
|
||||
Intent:
|
||||
- Expose MCP resources/prompts as explicit namespaced Yoi tool operations: `resources/list`, `resources/read`, `prompts/list`, `prompts/get`。
|
||||
- Returned resources/prompt templates are untrusted Tool result data and must be recorded through ordinary Tool result/history paths。
|
||||
- Do not inject resource/prompt content directly into model context outside Tool history。
|
||||
|
||||
Binding decisions / invariants:
|
||||
- No hidden context injection path。
|
||||
- All returned content/templates are untrusted data。
|
||||
- Bound result sizes and rich/embedded content serialization。
|
||||
- Handle pagination/list bounds where applicable。
|
||||
- Diagnostics identify server/resource/prompt operation without leaking secrets。
|
||||
- Do not implement MCP tool execution itself beyond existing completed support。
|
||||
- Do not implement list_changed refresh, sampling, or elicitation in this Ticket。
|
||||
- Preserve prior MCP lifecycle/tool-call redaction/bounds/ordinary Tool path behavior。
|
||||
|
||||
Requirements / acceptance criteria:
|
||||
- `resources/list` and `resources/read` can be invoked as explicit tools。
|
||||
- `prompts/list` and `prompts/get` can be invoked as explicit tools。
|
||||
- Results are ordinary Tool results and history records。
|
||||
- No hidden context injection path is introduced。
|
||||
- Oversize/rich content is bounded。
|
||||
- Tests cover list/read/get happy paths, untrusted content, bounds, and no hidden injection。
|
||||
|
||||
Escalate if:
|
||||
- Existing ToolRegistry/provider path cannot represent resources/prompts operations without broad provider-substrate changes。
|
||||
- MCP prompt message/content serialization requires product decision beyond safe bounded Tool result data。
|
||||
- Hidden context injection would be needed to satisfy a feature expectation; that would violate Ticket intent and must stop。
|
||||
|
||||
Next action:
|
||||
- Record `queued -> inprogress` and commit Ticket records before creating implementation worktree and spawning Coder。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T09:37:22Z from: queued to: inprogress reason: orchestrator_acceptance_mcp_resources_prompts_tools field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
User explicitly authorized parallel implementation when no blocker exists. Ticket body/thread, relation metadata, closed MCP lifecycle dependency, Orchestrator worktree state, visible Pods, existing branch/worktree, and bounded MCP resources/prompts context were checked. Dependency `00001KVHR3WRY` is closed, no inprogress/capacity blocker exists, no matching worktree/branch exists, and no missing planning decision was found. Accepting this queued Ticket for implementation before worktree/Pod side effects.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:38:10Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Implementation orchestration start:
|
||||
- Acceptance records were committed on Orchestrator branch: `b2b4764f ticket: accept mcp resources prompts tools`。
|
||||
- Created implementation worktree `/home/hare/Projects/yoi/.worktree/00001KVHR3WSN-mcp-resources-prompts-tools` on branch `impl/00001KVHR3WSN-mcp-resources-prompts-tools` at `b2b4764f`。
|
||||
- Spawned Coder Pod `yoi-coder-00001KVHR3WSN` with write scope limited to the implementation worktree and read-only root scope only for runtime workspace identity。
|
||||
- Coder task explicitly forbids root/original workspace implementation, hidden context injection, list_changed/sampling/elicitation scope creep, merge, Ticket close, and cleanup。
|
||||
|
||||
Next action:
|
||||
- Wait for Coder implementation report, then inspect branch diff/validation evidence and route to Reviewer。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:57:12Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Coder implementation report received from `yoi-coder-00001KVHR3WSN`.
|
||||
|
||||
Implementation commit:
|
||||
- `3a22360a mcp: expose resources prompts tools`
|
||||
|
||||
Changed areas reported:
|
||||
- `crates/mcp/src/stdio.rs`:
|
||||
- Added typed MCP protocol structs/helpers for `resources/list`, `resources/read`, `prompts/list`, and `prompts/get`。
|
||||
- Added resource/prompt request/result models preserving untrusted server-owned fields as data。
|
||||
- `crates/pod/src/feature/mcp.rs`:
|
||||
- Registers explicit namespaced MCP operation tools when server capabilities advertise resources/prompts:
|
||||
- `Mcp_<server>_resources_list`
|
||||
- `Mcp_<server>_resources_read`
|
||||
- `Mcp_<server>_prompts_list`
|
||||
- `Mcp_<server>_prompts_get`
|
||||
- Executes these through ordinary `Tool` path using `ToolOutput`。
|
||||
- Serializes resource/prompt content as bounded untrusted JSON tool-result data。
|
||||
- Bounds list items, resource contents, prompt messages, text fields, JSON depth/node count, rich embedded blobs/images/audio, and total output bytes。
|
||||
- Preserves existing MCP `tools/call` behavior and redacted diagnostics。
|
||||
- Does not add hidden context injection; prompt/resource data is not appended as user/system messages。
|
||||
|
||||
Tests reported:
|
||||
- Operation tool naming/origin/schema。
|
||||
- Discovery registers resource/prompt operations without requiring `tools` capability。
|
||||
- `resources/list` and `resources/read` happy paths through ordinary tool output。
|
||||
- `prompts/list` and `prompts/get` happy paths through ordinary tool output。
|
||||
- Untrusted prompt/resource content remains data。
|
||||
- Rich/oversize resource/prompt content is bounded/omitted/truncated。
|
||||
|
||||
Coder validation reported:
|
||||
- `cargo test -p pod mcp::tests`: passed, 13 tests。
|
||||
- `cargo check -p pod -p mcp`: passed。
|
||||
- `cargo fmt --all --check`: passed。
|
||||
- `git diff --check`: passed。
|
||||
- `cargo test -p mcp`: passed, 12 stdio lifecycle tests。
|
||||
- `nix build .#yoi --no-link`: passed; dirty-tree warning expected because validation ran before commit。
|
||||
|
||||
Known deferrals / notes:
|
||||
- `list_changed` refresh remains deferred。
|
||||
- Sampling/elicitation not implemented。
|
||||
- MCP resources/prompts tools are registered from advertised server capabilities; unsupported capabilities are not exposed as model-visible tools。
|
||||
|
||||
Orchestrator evidence checked before review dispatch:
|
||||
- Implementation worktree is clean。
|
||||
- HEAD is `3a22360a`。
|
||||
- Diff from acceptance `b2b4764f..HEAD` is one implementation commit touching 2 files, about 1225 insertions / 36 deletions。
|
||||
- `git diff --check b2b4764f..HEAD` produced no diagnostics。
|
||||
|
||||
Next action:
|
||||
- Dispatch Reviewer for r1 review against Ticket requirements, with focus on explicit tool operations, ordinary Tool result/history path, no hidden context injection, untrusted/bounded content serialization, capability-gated registration, pagination/bounds, no list_changed/sampling/elicitation scope creep, and tests。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: plan author: yoi-orchestrator at: 2026-06-20T09:57:57Z -->
|
||||
|
||||
## Plan
|
||||
|
||||
Review dispatch:
|
||||
- Spawned Reviewer Pod `yoi-reviewer-00001KVHR3WSN-r1` against implementation branch `impl/00001KVHR3WSN-mcp-resources-prompts-tools`。
|
||||
- Review target commit: `3a22360a mcp: expose resources prompts tools`。
|
||||
- Review baseline: `b2b4764f`。
|
||||
- Reviewer task focuses on explicit tool operations, ordinary Tool result/history path, no hidden context injection, untrusted/bounded resource/prompt content serialization, capability-gated registration, pagination/bounds, diagnostics redaction, no list_changed/sampling/elicitation scope creep, tests, and package validation。
|
||||
- Reviewer is instructed not to edit source, commit, merge, close the Ticket, or use TicketReview directly; it will report verdict/evidence back to Orchestrator。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHR3WSN-r1 at: 2026-06-20T10:03:26Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
Verdict: `approve`
|
||||
|
||||
確認範囲:
|
||||
- Ticket contract / Orchestrator IntentPacket。
|
||||
- Implementation diff: `b2b4764f..3a22360a`。
|
||||
- 変更 source files:
|
||||
- `crates/mcp/src/stdio.rs`
|
||||
- `crates/pod/src/feature/mcp.rs`
|
||||
- Focus: explicit tool exposure、capability-gated registration、ordinary `ToolOutput` execution、untrusted/bounded serialization、pagination behavior、diagnostics、hidden context injection / sampling / elicitation / `list_changed` scope creep absence。
|
||||
|
||||
Blocking issues: none。
|
||||
|
||||
Approval evidence:
|
||||
- `crates/mcp/src/stdio.rs` に resources/prompts protocol structs and request helpers が追加されている。
|
||||
- `ListResourcesResult`, `ReadResourceRequest`, `ReadResourceResult`
|
||||
- `ListPromptsResult`, `GetPromptRequest`, `GetPromptResult`
|
||||
- `McpPromptMessage` and resource/prompt metadata fields。
|
||||
- `McpStdioClient` exposes explicit request methods only:
|
||||
- `list_resources_page` -> `resources/list`
|
||||
- `read_resource` -> `resources/read`
|
||||
- `list_prompts_page` -> `prompts/list`
|
||||
- `get_prompt` -> `prompts/get`
|
||||
- Registration is capability-gated:
|
||||
- `resources` capability registers only `Mcp_<server>_resources_list` and `Mcp_<server>_resources_read`。
|
||||
- `prompts` capability registers only `Mcp_<server>_prompts_list` and `Mcp_<server>_prompts_get`。
|
||||
- Existing `tools/list` discovery is also gated by advertised `tools` capability。
|
||||
- Resource/prompt operations are ordinary `Tool` implementations:
|
||||
- `McpStdioProviderOperationTool` implements `Tool::execute`。
|
||||
- Results are returned as `ToolOutput { summary, content }`。
|
||||
- No new `SystemItem`, hidden history append, hidden user/system message append, or direct context injection path found。
|
||||
- Returned content is serialized as JSON-ish untrusted data with explicit marker fields:
|
||||
- `untrusted_mcp_resources_list_result`
|
||||
- `untrusted_mcp_resources_read_result`
|
||||
- `untrusted_mcp_prompts_list_result`
|
||||
- `untrusted_mcp_prompts_get_result`
|
||||
- Bounds are applied to list items, resource content count, prompt message count, text fields, `_meta`, extra/structured JSON depth/node count, rich image/audio blob omitted-data markers, and final rendered content bytes。
|
||||
- Stdio reader remains fail-closed for unsupported server-to-client requests; no sampling, elicitation, or `list_changed` refresh was added。
|
||||
- Tests cover operation namespacing, capability-gated registration without `tools`, resource list/read happy paths, prompt list/get happy paths, untrusted/bounded output, and existing MCP tool execution result serialization/bounds。
|
||||
|
||||
Non-blocking follow-ups:
|
||||
- “no context injection” は operation tool path / `ToolOutput` content unit testsで確認されており、E2E history inspection ではない。E2E 未設計の現状では許容だが、将来 MCP/history integration test があるとよい。
|
||||
- Shutdown-warning text は result serialization 後に append される。`bounded_diagnostic` では bounded だが、厳密に post-append final content <= max result output bytes を要求するなら follow-up で final re-bound を追加してもよい。
|
||||
|
||||
Reviewer validation:
|
||||
- `git diff --check b2b4764f..HEAD`: passed。
|
||||
- `cargo fmt --all --check`: passed。
|
||||
- `cargo test -p pod mcp::tests`: passed, 13 tests。
|
||||
- `cargo test -p mcp`: passed, 12 tests。
|
||||
- `cargo check -p pod -p mcp`: passed。
|
||||
- `nix build .#yoi --no-link`: passed。
|
||||
|
||||
Worktree status at review end: clean。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T10:04:45Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Merge and final validation report:
|
||||
|
||||
Merged implementation branch into Orchestrator branch:
|
||||
- Merge commit: `4a4590f8 merge: mcp resources prompts tools`
|
||||
- Implementation commit included:
|
||||
- `3a22360a mcp: expose resources prompts tools`
|
||||
|
||||
Reviewer outcome:
|
||||
- r1 approved with no blocking issues。
|
||||
- Reviewer confirmed explicit resources/prompts tool operations, capability-gated registration, ordinary `ToolOutput` execution, no hidden context injection path, untrusted/bounded serialization, no sampling/elicitation/list_changed scope creep, and focused tests。
|
||||
|
||||
Orchestrator validation after merge passed:
|
||||
- `cargo fmt --all --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p pod mcp::tests`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
- `nix path-info -S .#yoi`: `113403880`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-4oVSE2.log`
|
||||
|
||||
Final state:
|
||||
- Orchestrator worktree clean at `4a4590f8` after validation。
|
||||
- Implementation worktree remains available for cleanup after Ticket completion records are committed。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T10:04:54Z from: inprogress to: done reason: merged_reviewed_validated field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Implementation was merged into Orchestrator branch at `4a4590f8`, review approved, and final Orchestrator validation passed: `cargo fmt --all --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p pod mcp::tests`, `cargo test -p mcp`, `cargo check -p pod -p mcp`, and `nix build .#yoi --no-link`.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: hare at: 2026-06-20T10:05:16Z from: done to: closed reason: closed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Ticket を closed にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-20T10:05:16Z status: closed -->
|
||||
|
||||
## 完了
|
||||
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WSN` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `resources/list`, `resources/read`, `prompts/list`, `prompts/get` の typed protocol structs / helpers を追加しました。
|
||||
- Server capabilities に応じて explicit namespaced Yoi tools を登録します。
|
||||
- `Mcp_<server>_resources_list`
|
||||
- `Mcp_<server>_resources_read`
|
||||
- `Mcp_<server>_prompts_list`
|
||||
- `Mcp_<server>_prompts_get`
|
||||
- Resources/prompts operations は ordinary Tool path / `ToolOutput` を通って実行されます。
|
||||
- Returned resources / prompt templates / prompt messages は untrusted Tool result data として serialization され、hidden context injection はありません。
|
||||
- Result serialization は list items、resource contents、prompt messages、text fields、`_meta`、structured JSON depth/node count、rich blobs/images/audio、final output bytes を bounded に扱います。
|
||||
- Capability が advertise されていない operation は model-visible tool として expose されません。
|
||||
- `list_changed` refresh、sampling、elicitation は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `3a22360a mcp: expose resources prompts tools`
|
||||
- `4a4590f8 merge: mcp resources prompts tools`
|
||||
|
||||
Review:
|
||||
- r1 は `approve`。
|
||||
- Reviewer は explicit Tool operations、ordinary `ToolOutput` path、no hidden context injection、untrusted/bounded serialization、capability-gated registration、no sampling/elicitation/list_changed scope creep を確認しました。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --all --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p pod mcp::tests`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check -p pod -p mcp`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113403880`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-4oVSE2.log`
|
||||
|
||||
---
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
{"id":"orch-plan-20260620-060022-1","ticket_id":"00001KVHR3WSW","kind":"blocked_by","related_ticket":"00001KVHR3WS6","note":"list_changed handling requires initial tools/list registration. `00001KVHR3WS6` is queued and depends on lifecycle; leave this Ticket queued until tool registration is closed.","author":"yoi-orchestrator","at":"2026-06-20T06:00:22Z"}
|
||||
{"id":"orch-plan-20260620-100629-2","ticket_id":"00001KVHR3WSW","kind":"accepted_plan","accepted_plan":{"summary":"MCP `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` を安全に扱う。Active run の model-visible schema/context を不意に変えず、safe boundary refresh / restart-required diagnostic / next-turn refresh など deterministic policyを実装し、silent staleを避ける。","branch":"impl/00001KVHR3WSW-mcp-list-changed","worktree":"/home/hare/Projects/yoi/.worktree/00001KVHR3WSW-mcp-list-changed","role_plan":"Orchestrator は acceptance records を commit 後、専用 implementation worktree `.worktree/00001KVHR3WSW-mcp-list-changed` を作成し、Coder をその child worktree への narrow write scope で起動する。Coder 実装後、Reviewer が current-run schema/history invariants、safe-boundary refresh policy、bounded diagnostics、tools/resources/prompts notifications、no hidden resource/prompt context injection を確認する。"},"author":"yoi-orchestrator","at":"2026-06-20T10:06:29Z"}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: 'MCP: handle list_changed notifications safely'
|
||||
state: 'queued'
|
||||
state: 'closed'
|
||||
created_at: '2026-06-20T05:30:04Z'
|
||||
updated_at: '2026-06-20T06:00:44Z'
|
||||
updated_at: '2026-06-20T10:32:59Z'
|
||||
assignee: null
|
||||
readiness: 'implementation_ready'
|
||||
risk_flags: ['mcp', 'notifications', 'tool-schema', 'prompt-cache', 'refresh']
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WSW` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` を bounded kind-only state として記録します。
|
||||
- Notification params は保存・render・behavior に使わず、hidden resource/prompt context injection を防止します。
|
||||
- Safe-boundary refresh 用の snapshot/clear API を追加しました。
|
||||
- Startup tool discovery では、registration 前に `tools/list_changed` が観測された場合のみ `tools/list` を最大 1 回 refresh します。
|
||||
- Refresh 後も変更が続く場合は bounded restart-required diagnostic を出し、active-run model-visible tool schema を post-registration mutation しません。
|
||||
- MCP tool/resource/prompt operations 中に list_changed が観測された場合、ordinary Tool output に bounded warning を明示的に返します。
|
||||
- Resource/prompt notifications は content fetch/injection を行わず、explicit list/read/get tools でのみ扱います。
|
||||
- Sampling / elicitation / remote transport は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `e33dee19 mcp: handle list changed notifications`
|
||||
- `ae5f3e42 merge: mcp list changed handling`
|
||||
|
||||
Review:
|
||||
- r1 は `approve`。
|
||||
- Reviewer は current-run schema/history invariants、safe-boundary refresh、restart-required fallback、notification params の非使用、no hidden injection、no sampling/elicitation/remote scope creep を確認しました。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --all --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp list_changed -- --nocapture`
|
||||
- `cargo test -p pod mcp::tests:: -- --nocapture`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check --workspace`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113428296`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-ddp5Ei.log`
|
||||
@@ -27,3 +27,283 @@ Next:
|
||||
- `00001KVHR3WS6` が closed になった後、改めて reroute する。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: decision author: yoi-orchestrator at: 2026-06-20T10:07:00Z -->
|
||||
|
||||
## Decision
|
||||
|
||||
Routing decision: implementation_ready
|
||||
|
||||
Reason:
|
||||
- User directive: 「blocker無いなら並列にやっちゃえよ」。現在 inprogress は 0 件であり、最後に残った queued Ticket の dependency blocker も解消済みのため開始する。
|
||||
- 前回は `00001KVHR3WS6` initial tools/list registration が未完了だったため blocked/queued hold としたが、現在 `00001KVHR3WS6` は closed。
|
||||
- Related resources/prompts operations Ticket `00001KVHR3WSN` も closed になっており、tools/resources/prompts list_changed をまとめて扱う context が揃っている。
|
||||
- Ticket body は `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` の handling、current run schema consistency、prompt-cache/history invariants、deterministic refresh/diagnostic behavior、unsafe refresh fallback を実装可能な粒度で定義している。
|
||||
- Orchestrator worktree は clean、matching branch/worktree はなし。
|
||||
- Risk domain は mcp / notifications / tool-schema / prompt-cache / refresh だが、Ticket は current run schema consistency、no hidden context mutation、bounded diagnostics を明示している。bounded context check 後も implementation 前に必要な追加 human decision は見つからなかった。
|
||||
|
||||
Evidence checked:
|
||||
- Ticket `00001KVHR3WSW` body / thread / relations / artifacts。
|
||||
- `TicketRelationQuery(00001KVHR3WSW)`: outgoing `depends_on 00001KVHR3WS6` is now closed。
|
||||
- `TicketOrchestrationPlanQuery(00001KVHR3WSW)`: previous `blocked_by 00001KVHR3WS6` is resolved; accepted plan recorded now。
|
||||
- Workspace state:
|
||||
- Orchestrator worktree clean at `b11f83c8`。
|
||||
- queued: this Ticket only。
|
||||
- inprogress: 0。
|
||||
- spawned child implementation Pods: 0。
|
||||
- no matching MCP list_changed branch/worktree。
|
||||
|
||||
IntentPacket:
|
||||
|
||||
Intent:
|
||||
- Handle MCP list_changed notifications without silently staying stale forever and without mutating active-run model-visible tool schema or prompt/context history invariants unsafely。
|
||||
- Implement a deterministic safe-boundary refresh / restart-required diagnostic / next-turn refresh policy that covers tools/resources/prompts list changes。
|
||||
|
||||
Binding decisions / invariants:
|
||||
- Do not mutate current LLM context with hidden resource/prompt content。
|
||||
- Do not unexpectedly mutate active run tool schema in a way that breaks request/history/prompt-cache invariants。
|
||||
- list_changed notifications are signals; they should produce bounded state/diagnostic and deterministic refresh behavior at safe boundaries。
|
||||
- Bounded diagnostics should identify server and list kind without leaking secrets。
|
||||
- Preserve existing explicit Tool operations for tools/resources/prompts。
|
||||
- Do not implement remote transports, sampling, or elicitation。
|
||||
|
||||
Requirements / acceptance criteria:
|
||||
- Handle `notifications/tools/list_changed`, `notifications/resources/list_changed`, and `notifications/prompts/list_changed`。
|
||||
- list_changed does not silently stale forever。
|
||||
- Current run tool schema consistency is not broken。
|
||||
- Refresh/diagnostic behavior is deterministic and documented。
|
||||
- Prompt-context/history invariants are preserved。
|
||||
- Tests cover tools/resources/prompts list_changed and unsafe refresh fallback。
|
||||
|
||||
Escalate if:
|
||||
- Safe refresh requires changing Worker history/model schema lifecycle beyond this Ticket。
|
||||
- Current provider/feature architecture cannot represent pending refresh diagnostics without broad redesign。
|
||||
- A live schema mutation would be required to satisfy the feature expectation; stop instead and record restart/next-turn policy。
|
||||
|
||||
Next action:
|
||||
- Record `queued -> inprogress` and commit Ticket records before creating implementation worktree and spawning Coder。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T10:07:07Z from: queued to: inprogress reason: orchestrator_acceptance_mcp_list_changed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
User explicitly authorized implementation when no blocker exists. Ticket body/thread, relation metadata, closed MCP tool-registration dependency, closed resources/prompts context, Orchestrator worktree state, visible Pods, existing branch/worktree, and bounded list_changed/schema/history context were checked. Dependency `00001KVHR3WS6` is closed, no inprogress/capacity blocker exists, no matching worktree/branch exists, and no missing planning decision was found. Accepting this queued Ticket for implementation before worktree/Pod side effects.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T10:08:05Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Implementation orchestration start:
|
||||
- Acceptance records were committed on Orchestrator branch: `d31b8907 ticket: accept mcp list changed handling`。
|
||||
- Created implementation worktree `/home/hare/Projects/yoi/.worktree/00001KVHR3WSW-mcp-list-changed` on branch `impl/00001KVHR3WSW-mcp-list-changed` at `d31b8907`。
|
||||
- Spawned Coder Pod `yoi-coder-00001KVHR3WSW` with write scope limited to the implementation worktree and read-only root scope only for runtime workspace identity。
|
||||
- Coder task explicitly forbids root/original workspace implementation, hidden context injection, unsafe active-run schema mutation, sampling/elicitation scope creep, merge, Ticket close, and cleanup。
|
||||
|
||||
Next action:
|
||||
- Wait for Coder implementation report, then inspect branch diff/validation evidence and route to Reviewer。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T10:26:13Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Coder implementation report received from `yoi-coder-00001KVHR3WSW`.
|
||||
|
||||
Implementation commit:
|
||||
- `e33dee19 mcp: handle list changed notifications`
|
||||
|
||||
Changed areas reported:
|
||||
- `crates/mcp/src/stdio.rs`:
|
||||
- Records bounded `notifications/tools/list_changed`, `notifications/resources/list_changed`, and `notifications/prompts/list_changed` state。
|
||||
- Ignores notification params entirely so notifications cannot inject prompt/resource content or hidden context。
|
||||
- Exposes snapshot/clear APIs for safe-boundary refresh decisions。
|
||||
- `crates/pod/src/feature/mcp.rs`:
|
||||
- During startup tool discovery, refreshes `tools/list` once if `tools/list_changed` is observed before registration。
|
||||
- If list changes continue during refresh, emits a restart-required diagnostic and does not mutate active-run tool schema after registration。
|
||||
- During MCP tool/resource/prompt operations, appends bounded warnings to explicit tool output when list_changed is observed。
|
||||
- Preserves explicit operations for `tools/call`, `resources/list/read`, and `prompts/list/get`; no notification-driven content injection。
|
||||
- Tests:
|
||||
- Added stdio notification state coverage for tools/resources/prompts。
|
||||
- Added provider/runtime tests for safe-boundary tool refresh, restart-required fallback, and resource/prompt warning behavior without leaking notification params。
|
||||
|
||||
Coder validation reported:
|
||||
- `cargo test -p mcp list_changed -- --nocapture`: passed。
|
||||
- `cargo test -p pod mcp::tests:: -- --nocapture`: passed。
|
||||
- `cargo check --workspace`: passed。
|
||||
- `cargo test -p mcp`: passed。
|
||||
- `cargo test -p pod mcp::tests::`: passed。
|
||||
- `cargo fmt --all -- --check`: passed。
|
||||
- `git diff --check`: passed。
|
||||
- `nix build .#yoi --no-link`: passed; dirty-tree warning expected before commit。
|
||||
|
||||
Known risks / deferrals:
|
||||
- Live mutation of already-presented model-visible MCP tool schemas is intentionally not implemented。
|
||||
- Continued `tools/list_changed` after one startup safe-boundary refresh produces bounded restart-required diagnostic。
|
||||
- Resource/prompt list refresh remains explicit via existing MCP list/read/get tools on later turns; notifications alone do not inject or fetch content。
|
||||
|
||||
Orchestrator evidence checked before review dispatch:
|
||||
- Implementation worktree is clean。
|
||||
- HEAD is `e33dee19`。
|
||||
- Diff from acceptance `d31b8907..HEAD` is one implementation commit touching 4 files, about 459 insertions / 9 deletions。
|
||||
- `git diff --check d31b8907..HEAD` produced no diagnostics。
|
||||
|
||||
Next action:
|
||||
- Dispatch Reviewer for r1 review against Ticket requirements, with focus on current-run schema/history invariants, safe-boundary refresh policy, bounded diagnostics, no hidden prompt/resource injection, tools/resources/prompts notification coverage, and tests。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: plan author: yoi-orchestrator at: 2026-06-20T10:26:52Z -->
|
||||
|
||||
## Plan
|
||||
|
||||
Review dispatch:
|
||||
- Spawned Reviewer Pod `yoi-reviewer-00001KVHR3WSW-r1` against implementation branch `impl/00001KVHR3WSW-mcp-list-changed`。
|
||||
- Review target commit: `e33dee19 mcp: handle list changed notifications`。
|
||||
- Review baseline: `d31b8907`。
|
||||
- Reviewer task focuses on current-run schema/history invariants, safe-boundary refresh policy, bounded diagnostics, no hidden prompt/resource injection, notification param handling, tools/resources/prompts coverage, no sampling/elicitation/remote scope creep, tests, and package validation。
|
||||
- Reviewer is instructed not to edit source, commit, merge, close the Ticket, or use TicketReview directly; it will report verdict/evidence back to Orchestrator。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHR3WSW-r1 at: 2026-06-20T10:31:26Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
Verdict: `approve`
|
||||
|
||||
確認範囲:
|
||||
- Ticket `00001KVHR3WSW` item/thread、Orchestrator IntentPacket、binding invariants。
|
||||
- Diff: `d31b8907..e33dee19`。
|
||||
- 主な対象:
|
||||
- `crates/mcp/src/stdio.rs`
|
||||
- `crates/mcp/tests/stdio_lifecycle.rs`
|
||||
- `crates/mcp/tests/fixtures/mock_server.rs`
|
||||
- `crates/pod/src/feature/mcp.rs`
|
||||
- Hidden context/history append、post-registration live ToolRegistry mutation、notification param usage/leakage、sampling/elicitation/remote transport scope creep の有無を確認。
|
||||
|
||||
Blocking issues: none。
|
||||
|
||||
Approval evidence:
|
||||
- `crates/mcp/src/stdio.rs` は `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` を bounded enum state としてのみ記録している。
|
||||
- Notification `params` は incoming message shape として deserialize されるが、保存・render・behavior には使われない。
|
||||
- Startup discovery は model-visible tool registration 前に `tools/list_changed` を検出した場合、`tools/list` refresh を最大 1 回だけ行う。
|
||||
- Refresh 後も changes が続く場合は restart-required diagnostic を出し、post-registration ToolRegistry/schema mutation は行わない。
|
||||
- Runtime MCP tool/resource/prompt operations は list-change notification を ordinary Tool output の bounded warning として明示的に返す。Hidden resource/prompt content injection はない。
|
||||
- Sampling / elicitation / remote transport scope creep はない。
|
||||
- Tests は kind-only notification state、safe-boundary tool refresh、continued-change restart diagnostic、resources/prompts warnings、malicious notification params が漏れないことを cover している。
|
||||
|
||||
Non-blocking follow-ups:
|
||||
- Runtime diagnostic wording に “restart the Pod or start a new run to rediscover tools” とある。MCP discovery が Pod-startup scoped であるなら、将来 “restart/reinitialize the Pod” のみに絞るとより明確。
|
||||
- Resources/prompts `list_changed` notifications observed during startup discovery は、explicit resource/prompt tool operations 中でない限り別途 surface されない。ただし resources/prompts lists は startup で cache されないため、この Ticket では blocking ではない。将来 persistent resource cache を持つなら明示 diagnostics が必要。
|
||||
|
||||
Reviewer validation:
|
||||
- `cargo fmt --all --check`: passed。
|
||||
- `git diff --check d31b8907..HEAD`: passed。
|
||||
- `cargo test -p mcp list_changed -- --nocapture`: passed。
|
||||
- `cargo test -p pod mcp::tests:: -- --nocapture`: passed, 16 tests。
|
||||
- `cargo test -p mcp`: passed, 13 tests。
|
||||
- `cargo check --workspace`: passed。
|
||||
- `nix build .#yoi --no-link`: not run by Reviewer。
|
||||
|
||||
Worktree status at review end: source tree clean; ignored `target/` only。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T10:32:28Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Merge and final validation report:
|
||||
|
||||
Merged implementation branch into Orchestrator branch:
|
||||
- Merge commit: `ae5f3e42 merge: mcp list changed handling`
|
||||
- Implementation commit included:
|
||||
- `e33dee19 mcp: handle list changed notifications`
|
||||
|
||||
Reviewer outcome:
|
||||
- r1 approved with no blocking issues。
|
||||
- Reviewer confirmed bounded kind-only list_changed state, ignored notification params, safe-boundary startup refresh, restart-required fallback, no post-registration live schema mutation, no hidden resource/prompt injection, no sampling/elicitation/remote scope creep, and focused tests。
|
||||
|
||||
Orchestrator validation after merge passed:
|
||||
- `cargo fmt --all --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp list_changed -- --nocapture`
|
||||
- `cargo test -p pod mcp::tests:: -- --nocapture`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check --workspace`
|
||||
- `nix build .#yoi --no-link`
|
||||
- `nix path-info -S .#yoi`: `113428296`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-ddp5Ei.log`
|
||||
|
||||
Final state:
|
||||
- Orchestrator worktree clean at `ae5f3e42` after validation。
|
||||
- Implementation worktree remains available for cleanup after Ticket completion records are committed。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T10:32:35Z from: inprogress to: done reason: merged_reviewed_validated field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Implementation was merged into Orchestrator branch at `ae5f3e42`, review approved, and final Orchestrator validation passed: `cargo fmt --all --check`, `git diff --check HEAD^1..HEAD`, focused `mcp` and `pod mcp::tests::` tests, `cargo check --workspace`, and `nix build .#yoi --no-link`.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: hare at: 2026-06-20T10:32:59Z from: done to: closed reason: closed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Ticket を closed にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-20T10:32:59Z status: closed -->
|
||||
|
||||
## 完了
|
||||
|
||||
## Resolution
|
||||
|
||||
`00001KVHR3WSW` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- MCP `notifications/tools/list_changed`, `notifications/resources/list_changed`, `notifications/prompts/list_changed` を bounded kind-only state として記録します。
|
||||
- Notification params は保存・render・behavior に使わず、hidden resource/prompt context injection を防止します。
|
||||
- Safe-boundary refresh 用の snapshot/clear API を追加しました。
|
||||
- Startup tool discovery では、registration 前に `tools/list_changed` が観測された場合のみ `tools/list` を最大 1 回 refresh します。
|
||||
- Refresh 後も変更が続く場合は bounded restart-required diagnostic を出し、active-run model-visible tool schema を post-registration mutation しません。
|
||||
- MCP tool/resource/prompt operations 中に list_changed が観測された場合、ordinary Tool output に bounded warning を明示的に返します。
|
||||
- Resource/prompt notifications は content fetch/injection を行わず、explicit list/read/get tools でのみ扱います。
|
||||
- Sampling / elicitation / remote transport は実装していません。
|
||||
|
||||
主な commit:
|
||||
- `e33dee19 mcp: handle list changed notifications`
|
||||
- `ae5f3e42 merge: mcp list changed handling`
|
||||
|
||||
Review:
|
||||
- r1 は `approve`。
|
||||
- Reviewer は current-run schema/history invariants、safe-boundary refresh、restart-required fallback、notification params の非使用、no hidden injection、no sampling/elicitation/remote scope creep を確認しました。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --all --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p mcp list_changed -- --nocapture`
|
||||
- `cargo test -p pod mcp::tests:: -- --nocapture`
|
||||
- `cargo test -p mcp`
|
||||
- `cargo check --workspace`
|
||||
- `nix build .#yoi --no-link`
|
||||
|
||||
Package impact:
|
||||
- `nix path-info -S .#yoi`: `113428296`
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-ddp5Ei.log`
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
{"id":"orch-plan-20260620-083118-1","ticket_id":"00001KVHX0WBE","kind":"waiting_capacity_note","note":"Panel Queue was accepted for routing review, but implementation is held because `00001KVHR3WS6` is currently inprogress with active Coder/Reviewer work. Leave this Dashboard/Console refactor Ticket queued; reroute when current implementation capacity is free.","author":"yoi-orchestrator","at":"2026-06-20T08:31:18Z"}
|
||||
{"id":"orch-plan-20260620-084158-2","ticket_id":"00001KVHX0WBE","kind":"accepted_plan","accepted_plan":{"summary":"`yoi panel` を Dashboard、単一Pod chat/client surfaceを Console、TUIをterminal UI implementation layerとして整理し、TUI module境界を Dashboard/Console 責務へ寄せる。主眼は naming/module-boundary/maintainability refactorであり、user-visible behavior変更や新alias追加は行わない。","branch":"impl/00001KVHX0WBE-dashboard-console-tui-boundary","worktree":"/home/hare/Projects/yoi/.worktree/00001KVHX0WBE-dashboard-console-tui-boundary","role_plan":"ユーザーが blocker のない作業の並列実行を明示許可したため、Orchestrator は MCP tool registration と並行して専用 implementation worktree `.worktree/00001KVHX0WBE-dashboard-console-tui-boundary` を作成し、Coder をその child worktree への narrow write scope で起動する。Coder 実装後、Reviewer が Dashboard/Console/TUI 呼称、`yoi panel` command維持、不要alias不追加、Console/Dashboard entrypoint分離、multi_pod巨大責務分割、既存挙動/テスト維持を確認する。"},"author":"yoi-orchestrator","at":"2026-06-20T08:41:58Z"}
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
title: 'Dashboard / Console 呼称導入と TUI モジュール境界整理'
|
||||
state: 'queued'
|
||||
state: 'closed'
|
||||
created_at: '2026-06-20T06:55:49Z'
|
||||
updated_at: '2026-06-20T08:30:58Z'
|
||||
updated_at: '2026-06-20T09:35:52Z'
|
||||
assignee: null
|
||||
readiness: 'implementation_ready'
|
||||
risk_flags: ['ux-naming', 'module-boundary', 'public-cli', 'test-coverage']
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
## Resolution
|
||||
|
||||
`00001KVHX0WBE` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- Dashboard / Console / TUI terminology を導入しました。
|
||||
- Dashboard: `yoi panel` workspace cockpit/action surface。
|
||||
- Console: single-Pod chat/client surface。
|
||||
- TUI: terminal UI implementation umbrella。
|
||||
- `yoi panel` command は維持しました。
|
||||
- `yoi dashboard` alias は追加していません。
|
||||
- `crates/tui/src/dashboard/` module boundary を追加しました。
|
||||
- `dashboard/mod.rs`
|
||||
- `dashboard/render.rs`
|
||||
- `dashboard/tests.rs`
|
||||
- `crates/tui/src/console/` を single-Pod Console boundary として追加しました。
|
||||
- `LaunchMode::Panel` は `dashboard::launch(...)` に routing され、Console/single-Pod entrypoint を経由しません。
|
||||
- 旧 `single_pod.rs` / `multi_pod.rs` module route は Dashboard/Console boundary に置換しました。
|
||||
- Help/docs/prompt wording を Dashboard / Console / TUI terminology に更新しました。
|
||||
- Reviewer r1 で見つかった Dashboard behavior regression を修正しました。
|
||||
- recoverable nested Console failure は `yoi panel` を終了せず Dashboard loop を継続します。
|
||||
- successful Console return は live `DashboardApp` を fresh `load_app(...)` で置換せず、selection/draft/notices/diagnostics/local state を保持します。
|
||||
- regression tests を追加しました。
|
||||
|
||||
主な commit:
|
||||
- `5415a947 tui: introduce dashboard console boundaries`
|
||||
- `135343a2 tui: preserve dashboard after console return`
|
||||
- `23ec2bbd merge: dashboard console tui refactor`
|
||||
|
||||
Review:
|
||||
- r1 は nested Console open 後の Dashboard state/loop preservation regression で `request_changes`。
|
||||
- Coder が `finish_nested_console_open(...)` と regression tests を追加。
|
||||
- r2 は `approve`。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p tui`
|
||||
- `cargo test -p yoi`
|
||||
- `cargo check --workspace --all-targets`
|
||||
- `cargo run -q -p yoi -- --help` targeted smoke。
|
||||
- `test ! -e crates/tui/src/single_pod.rs`
|
||||
- `test ! -e crates/tui/src/multi_pod.rs`
|
||||
- targeted grep confirmed no `yoi dashboard` alias and no old Panel-to-Console/single_pod route。
|
||||
|
||||
Nix validation:
|
||||
- Not run because this Ticket changed Rust/docs/prompt/module boundaries only and no package/source-filter/resource inclusion concern was found。
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-crXxMR.log`
|
||||
@@ -29,4 +29,424 @@ LocalTicketBackend によって作成されました。
|
||||
Ticket を `workspace-panel` が queued にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: decision author: yoi-orchestrator at: 2026-06-20T08:31:27Z -->
|
||||
|
||||
## Decision
|
||||
|
||||
Routing decision: waiting_capacity
|
||||
|
||||
Panel Queue により routing 対象として確認したが、現在 `00001KVHR3WS6` が `inprogress` で MCP tool registration の Coder/Reviewer 作業中のため、この Dashboard / Console refactor Ticket は実装開始せず queued のまま保持する。
|
||||
|
||||
Evidence:
|
||||
- Ticket body / relations を確認。未解決 blocker relation はない。
|
||||
- Orchestrator worktree は clean。
|
||||
- inprogress は `00001KVHR3WS6` のみ。
|
||||
- matching branch/worktree は存在しない。
|
||||
- 現在 active child Pods は `yoi-coder-00001KVHR3WS6` と `yoi-reviewer-00001KVHR3WS6-r1`。
|
||||
|
||||
Next:
|
||||
- 現在の `00001KVHR3WS6` 作業が完了して implementation capacity が空いた後、改めて reroute する。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: decision author: yoi-orchestrator at: 2026-06-20T08:42:24Z -->
|
||||
|
||||
## Decision
|
||||
|
||||
Routing decision: implementation_ready_parallel
|
||||
|
||||
Reason:
|
||||
- User directive: 「blocker無いなら並列にやっちゃえよ」。この指示により、未解決 blocker がない実装 Ticket は現在の MCP review loop と並行して開始する方針に更新した。
|
||||
- Ticket body は Dashboard / Console / TUI の呼称導入、`yoi panel` command維持、不要 alias 不追加、Dashboard / Console entrypoint 境界、`multi_pod.rs` の Dashboard module への移設・分割、docs/help/tests更新、validation を実装可能な粒度で定義している。
|
||||
- `TicketRelationQuery(00001KVHX0WBE)`: 未解決 blocker relation なし。
|
||||
- 現在 `00001KVHR3WS6` は inprogress だが domain は MCP tool registration であり、この Dashboard/Console TUI refactor と直接 conflict しない。別 worktree / branch / sibling Coder Pod で並列化できる。
|
||||
- Orchestrator worktree は clean、matching branch/worktree はなし。
|
||||
- Risk flags は ux-naming / module-boundary / public-cli / test-coverage だが stop gate ではなく reviewer focus。Ticket は `yoi panel` command維持、`yoi dashboard` 等の不要 alias 不追加、Dashboard は scheduler/backend ではない、挙動変更は目的にしない、tests維持を明示している。bounded context check 後も implementation 前に必要な追加 human decision は見つからなかった。
|
||||
|
||||
Evidence checked:
|
||||
- Ticket `00001KVHX0WBE` body / thread / artifacts。
|
||||
- Current workspace state:
|
||||
- Orchestrator worktree clean at `8ce4fcde`。
|
||||
- inprogress: `00001KVHR3WS6` only。
|
||||
- queued includes this Ticket and downstream MCP Tickets。
|
||||
- visible spawned children are MCP tool-registration coder/reviewer; no Dashboard/Console branch/worktree exists。
|
||||
|
||||
IntentPacket:
|
||||
|
||||
Intent:
|
||||
- Introduce user-facing terminology: Dashboard = `yoi panel`, Console = single-Pod chat/client surface, TUI = terminal UI implementation umbrella。
|
||||
- Refactor TUI module boundaries so Dashboard is not routed through Console/single-Pod module entrypoints, and `multi_pod.rs` responsibilities move toward a Dashboard module boundary。
|
||||
- Preserve behavior. The objective is naming / module boundary / maintainability refactor, not functional change。
|
||||
|
||||
Binding decisions / invariants:
|
||||
- Keep `yoi panel` command name。
|
||||
- Do not add `yoi dashboard` or other unnecessary compatibility aliases。
|
||||
- Dashboard is workspace-level cockpit/action surface, not scheduler/backend。
|
||||
- Console is single-Pod chat/client surface and is not a subordinate Dashboard mode。
|
||||
- TUI is implementation layer umbrella, not a replacement mode name。
|
||||
- Dashboard may open a Pod Console, but bridge should be narrow and readable。
|
||||
- Avoid behavior changes to Ticket authority, Pod lifecycle, Orchestrator handoff, Panel action model, input model, or rendering semantics unless explicitly required and reported。
|
||||
- Keep/port existing tests; exact string tests should be updated to Dashboard/Console terminology where appropriate。
|
||||
|
||||
Requirements / acceptance criteria:
|
||||
- `yoi panel` help/docs describe Dashboard。
|
||||
- Single Pod UI help/docs describe Console。
|
||||
- Dashboard entrypoint lives in Dashboard module side; `LaunchMode::Panel` does not flow through a Console module entrypoint like `single_pod::run_panel`。
|
||||
- Console module focuses on single-Pod chat/connect/spawn/resume。
|
||||
- `multi_pod.rs` giant file state is materially improved by moving/splitting responsibilities into Dashboard module boundaries。
|
||||
- Render/list/layout, action/lifecycle, diagnostics/e2e, tests boundaries are reviewer-readable。
|
||||
- Existing workspace panel/action model remains intact; `yoi panel` remains Ticket-centric workspace cockpit and not scheduler/backend。
|
||||
- Validation includes `cargo test -p tui`, `cargo test -p yoi`, `cargo check --workspace --all-targets`, `cargo fmt --check`, `git diff --check`, and targeted grep/help checks as needed。
|
||||
|
||||
Escalate if:
|
||||
- Dashboard/Console split is insufficient for a third user-facing surface。
|
||||
- `yoi panel` command rename or `yoi dashboard` alias seems necessary。
|
||||
- Module split requires behavior changes to Ticket state authority, Pod lifecycle, Orchestrator handoff, or user-visible behavior beyond naming/boundary。
|
||||
|
||||
Next action:
|
||||
- Record `queued -> inprogress` and commit Ticket records before creating implementation worktree and spawning Coder。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T08:42:30Z from: queued to: inprogress reason: orchestrator_acceptance_parallel_dashboard_console_tui_boundary field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
User explicitly authorized parallel implementation when no blocker exists. Ticket body/thread, relation metadata, prior waiting-capacity note, Orchestrator worktree state, visible Pods, existing branch/worktree, and bounded Dashboard/Console TUI context were checked. There is no unresolved blocking dependency, no matching worktree/branch, and no missing planning decision. Accepting this queued Ticket for parallel implementation before worktree/Pod side effects.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T08:43:53Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Implementation orchestration start:
|
||||
- User explicitly authorized parallel work for Tickets without blockers。
|
||||
- Acceptance records were committed on Orchestrator branch: `7e35721a ticket: accept dashboard console tui refactor`。
|
||||
- Created implementation worktree `/home/hare/Projects/yoi/.worktree/00001KVHX0WBE-dashboard-console-tui-boundary` on branch `impl/00001KVHX0WBE-dashboard-console-tui-boundary` at `7e35721a`。
|
||||
- Spawned Coder Pod `yoi-coder-00001KVHX0WBE` with write scope limited to the implementation worktree and read-only root scope only for runtime workspace identity。
|
||||
- Coder task explicitly forbids root/original workspace implementation, `yoi panel` rename/alias additions without escalation, behavior changes to Ticket/Pod/Panel authority, merge, Ticket close, and cleanup。
|
||||
|
||||
Next action:
|
||||
- Let Dashboard/Console Coder proceed in parallel with the MCP tool-registration review loop. Inspect implementation report and route to Reviewer when ready。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:13:21Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Coder implementation report received from `yoi-coder-00001KVHX0WBE`.
|
||||
|
||||
Implementation commit:
|
||||
- `5415a947 tui: introduce dashboard console boundaries`
|
||||
|
||||
Changed areas reported:
|
||||
- Introduced `crates/tui/src/dashboard/` as Dashboard boundary:
|
||||
- `mod.rs` for Dashboard state/action/lifecycle entrypoint。
|
||||
- `render.rs` for render/list/layout composition。
|
||||
- `tests.rs` for Dashboard-focused tests。
|
||||
- Introduced `crates/tui/src/console/` as the single-Pod Console boundary。
|
||||
- Updated `crates/tui/src/lib.rs` routing:
|
||||
- `LaunchMode::Panel => dashboard::launch(...)`。
|
||||
- Console launch modes route through `console::*`。
|
||||
- No `single_pod::run_panel` path remains。
|
||||
- Preserved `yoi panel` command name and did not add `yoi dashboard`。
|
||||
- Updated help/docs terminology: Dashboard = `yoi panel` workspace cockpit/action surface; Console = single-Pod chat/client surface; TUI = implementation umbrella。
|
||||
- Updated tests/help expectations and brittle profile-default assertions surfaced by validation。
|
||||
|
||||
Coder validation reported:
|
||||
- `cargo test -p tui`: passed。
|
||||
- `cargo test -p yoi`: passed。
|
||||
- `cargo check --workspace --all-targets`: passed。
|
||||
- `cargo fmt --check`: passed。
|
||||
- `git diff --check`: passed。
|
||||
- `git diff --cached --check`: passed。
|
||||
- Targeted help/grep checks for Dashboard/Console terminology and no `yoi dashboard` alias: passed。
|
||||
- `nix build .#yoi --no-link` not run because package/source filters were not changed。
|
||||
|
||||
Known risks / deferrals:
|
||||
- Internal `workspace_panel` naming remains in lower-level model types to avoid broad unrelated churn; user-facing docs/help and TUI entry/module boundaries now use Dashboard/Console terminology。
|
||||
|
||||
Orchestrator evidence checked before review dispatch:
|
||||
- Implementation worktree is clean。
|
||||
- HEAD is `5415a947`。
|
||||
- Diff from acceptance `7e35721a..HEAD` is one implementation commit touching 12 files with a large split/rename: `single_pod.rs -> console/mod.rs`, `multi_pod.rs -> dashboard/mod.rs`, new `dashboard/render.rs`, new `dashboard/tests.rs`, docs/help/prompt updates。
|
||||
- `git diff --check 7e35721a..HEAD` produced no diagnostics。
|
||||
|
||||
Next action:
|
||||
- Dispatch Reviewer for r1 review against Ticket requirements, with focus on behavior preservation, `yoi panel` command preservation/no alias, Dashboard/Console/TUI terminology, entrypoint/module boundary, large-file split quality, tests, and whether changed prompt/help wording is appropriate。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: plan author: yoi-orchestrator at: 2026-06-20T09:14:08Z -->
|
||||
|
||||
## Plan
|
||||
|
||||
Review dispatch:
|
||||
- Spawned Reviewer Pod `yoi-reviewer-00001KVHX0WBE-r1` against implementation branch `impl/00001KVHX0WBE-dashboard-console-tui-boundary`。
|
||||
- Review target commit: `5415a947 tui: introduce dashboard console boundaries`。
|
||||
- Review baseline: `7e35721a`。
|
||||
- Reviewer task focuses on behavior preservation, `yoi panel` command preservation / no `yoi dashboard` alias, Dashboard/Console/TUI terminology, entrypoint/module boundaries, large-file split quality, prompt/help/doc wording, tests, and package/source-filter impact。
|
||||
- Reviewer is instructed not to edit source, commit, merge, close the Ticket, or use TicketReview directly; it will report verdict/evidence back to Orchestrator。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHX0WBE-r1 at: 2026-06-20T09:22:25Z status: request_changes -->
|
||||
|
||||
## Review: request changes
|
||||
|
||||
Verdict: `request_changes`
|
||||
|
||||
確認範囲:
|
||||
- Ticket contract / Orchestrator IntentPacket。
|
||||
- Implementation diff: `7e35721a..5415a947`。
|
||||
- 主な対象: `crates/tui/src/lib.rs`, `crates/tui/src/dashboard/mod.rs`, `crates/tui/src/dashboard/render.rs`, `crates/tui/src/dashboard/tests.rs`, `crates/tui/src/console/mod.rs`, `crates/yoi/src/main.rs`, `crates/yoi/src/ticket_cli.rs`, `crates/tui/src/spawn.rs`, README / TUI README / development docs / prompt resource terminology changes。
|
||||
|
||||
Positive findings:
|
||||
- `yoi panel` remains the CLI command。
|
||||
- `yoi dashboard` alias は見つからない。
|
||||
- `LaunchMode::Panel` は Dashboard boundary を通るようになり、`single_pod::run_panel` path は見つからない。
|
||||
- `single_pod.rs` / `multi_pod.rs` は `console/` / `dashboard/` に置換されている。
|
||||
|
||||
Blocking issues:
|
||||
|
||||
1. Recoverable Dashboard open failures now exit `yoi panel`。
|
||||
- Path: `crates/tui/src/dashboard/mod.rs`。
|
||||
- Dashboard から Pod を開き、nested Console open が spawn failure/cancel など recoverable error を返すと、`app.finish_open(...)` 後に Dashboard fullscreen を抜けて function が `Ok(())` を返すように見える。
|
||||
- Baseline `single_pod::run_panel` では recoverable nested-open failures は既存 Panel/Dashboard state に折り返され、Panel loop は継続した。
|
||||
- Cancelled/failed Console open が workspace Dashboard を閉じるのは、Ticket の behavior preservation / Panel action model preservation 要件に反する。
|
||||
|
||||
2. Successful return from Console discards live Dashboard state。
|
||||
- Path: `crates/tui/src/dashboard/mod.rs`。
|
||||
- `console::run_pod_name_nested(...)` 成功後、`app.finish_open(...)` の後に `app = load_app(runtime_command.clone()).await?;` で fresh app に置き換えている。
|
||||
- これは baseline と `finish_open` の intent に反し、selection context、composer draft/target、notices、diagnostics、Dashboard-local UI state を失う可能性がある。
|
||||
- Ticket は boundary/terminology refactor であり、Dashboard state preservation は reviewer focus。Live `DashboardApp` を保持し、`finish_open(...)` + existing reload/reconcile mechanism を使うべき。
|
||||
|
||||
Required fix:
|
||||
- Successful nested Console return と recoverable nested Console failure の両方で、existing `DashboardApp` を保持して Dashboard loop を継続する。
|
||||
- `finish_open(...)` と既存 reload mechanism を使い、function return / fresh app replacement で Dashboard session state を捨てない。
|
||||
- Regression tests を追加または既存 tests を拡張し、nested open success/failure が Dashboard state/draft/selection/diagnostic を壊さず loop 継続することを可能な範囲で確認する。
|
||||
|
||||
Non-blocking concerns:
|
||||
- `dashboard/mod.rs` はまだ大きく、action/lifecycle/snapshot/model/diagnostics/E2E fixture helpers が混在している。追加分割は follow-up でもよいが、今回の blocker fix で触るなら改善可。
|
||||
- `console/mod.rs` に Dashboard/fullscreen helper concepts が少し残る。terminal-mode bridge として許容可能だが、Console focus は維持すること。
|
||||
- `workspace_panel` / `WorkspacePanel*` naming は internal model names と見えるため blocking ではない。
|
||||
|
||||
Reviewer validation:
|
||||
- `cargo fmt --check`: passed。
|
||||
- `git diff --check 7e35721a..HEAD`: passed。
|
||||
- `cargo test -p tui`: passed。
|
||||
- `cargo test -p yoi`: passed。
|
||||
- `cargo check --workspace --all-targets`: passed。
|
||||
- Targeted help/grep checks: no `yoi dashboard` alias or old `single_pod::run_panel` route found。
|
||||
- `nix build .#yoi --no-link` not run because no package/source-filter concern found。
|
||||
|
||||
Worktree status at review end: tracked source tree clean; ignored `target/` only。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:30:11Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Coder r1-fix report received from `yoi-coder-00001KVHX0WBE`.
|
||||
|
||||
New fix commit:
|
||||
- `135343a2 tui: preserve dashboard after console return`
|
||||
|
||||
Branch commits now:
|
||||
- `135343a2 tui: preserve dashboard after console return`
|
||||
- `5415a947 tui: introduce dashboard console boundaries`
|
||||
|
||||
Fix summary:
|
||||
- `crates/tui/src/dashboard/mod.rs`:
|
||||
- Added `finish_nested_console_open(...)` helper。
|
||||
- Successful nested Console return now calls `app.finish_open(...)` and continues the Dashboard loop with the same `DashboardApp`。
|
||||
- Recoverable nested Console failures now call `app.finish_open(...)` and continue the Dashboard loop instead of leaving fullscreen / exiting。
|
||||
- Non-recoverable errors still leave Dashboard fullscreen and bubble the error。
|
||||
- Removed fresh `load_app(...)` replacement after Console return, preserving selection, composer draft, diagnostics, notices, and other local Dashboard state。
|
||||
- `crates/tui/src/dashboard/tests.rs`:
|
||||
- Added regression coverage for nested Console success continuing without dropping Dashboard state。
|
||||
- Added regression coverage for recoverable nested Console failure continuing without dropping Dashboard state。
|
||||
- Added regression coverage for non-recoverable nested Console failure bubbling without incorrectly finishing/mutating Dashboard open state。
|
||||
|
||||
Coder validation reported as passing:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check`
|
||||
- `git diff --check 7e35721a..HEAD`
|
||||
- `cargo test -p tui`
|
||||
- `cargo test -p yoi`
|
||||
- `cargo check --workspace --all-targets`
|
||||
- Targeted grep/help checks for Dashboard/Console/TUI terminology, `LaunchMode::Panel => dashboard::launch(...)`, no `single_pod::run_panel`, and no `yoi dashboard` alias。
|
||||
|
||||
Orchestrator evidence checked before r2 review:
|
||||
- Implementation worktree is clean。
|
||||
- HEAD is `135343a2`。
|
||||
- Fix diff from `5415a947..HEAD` touches `crates/tui/src/dashboard/mod.rs` and `crates/tui/src/dashboard/tests.rs`, about 95 insertions / 15 deletions。
|
||||
- Overall `git diff --check 7e35721a..HEAD` produced no diagnostics。
|
||||
|
||||
Next action:
|
||||
- Route back to Reviewer for r2 verification of Dashboard state preservation and final acceptance criteria。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: yoi-reviewer-00001KVHX0WBE-r1 at: 2026-06-20T09:33:16Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
Verdict: `approve`
|
||||
|
||||
確認範囲:
|
||||
- Ticket contract / Orchestrator IntentPacket を再確認。
|
||||
- Fix diff: `5415a947..135343a2`。
|
||||
- Overall implementation diff: `7e35721a..135343a2`。
|
||||
- 主な対象: `crates/tui/src/dashboard/mod.rs`, `crates/tui/src/dashboard/tests.rs`, Dashboard/Console/TUI terminology, CLI help, `LaunchMode::Panel` routing, `yoi dashboard` alias absence, old `single_pod::run_panel` / `multi_pod` route absence, nested Console open 後の Dashboard state preservation。
|
||||
|
||||
Previous blockers verification:
|
||||
- Recoverable Dashboard open failures no longer exit `yoi panel`。
|
||||
- `finish_nested_console_open(...)` により recoverable errors は `app.finish_open(...)` 後に `Ok(())` を返し、Dashboard loop が継続する。
|
||||
- Non-recoverable errors のみ fullscreen を離れて bubble する。
|
||||
- Successful Console return no longer replaces live `DashboardApp`。
|
||||
- 以前の `app = load_app(runtime_command.clone()).await?` replacement は削除済み。
|
||||
- Success は `app.finish_open(...)` 後に同じ `DashboardApp` で継続する。
|
||||
- Regression tests は success / recoverable failure / non-recoverable failure を cover している。
|
||||
|
||||
Blocking issues: none。
|
||||
|
||||
Non-blocking concerns / follow-ups:
|
||||
- `dashboard/mod.rs` はまだ大きく複数責務を持つが、旧 `multi_pod.rs` / `single_pod.rs` boundary より materially better であり、この Ticket の acceptance では blocking ではない。
|
||||
- Package/source-filter/resource inclusion concern は見つからなかったため、Reviewer は Nix validation を実行していない。
|
||||
|
||||
Reviewer validation:
|
||||
- `cargo fmt --check`: passed。
|
||||
- `git diff --check 7e35721a..HEAD`: passed。
|
||||
- `cargo test -p tui`: passed, 362 tests and doc-tests。
|
||||
- `cargo test -p yoi`: passed, 66 tests。
|
||||
- `cargo check --workspace --all-targets`: passed。
|
||||
- Additional help/grep checks passed:
|
||||
- `yoi panel` help remains。
|
||||
- Console / Dashboard / TUI terminology appears as expected。
|
||||
- no `yoi dashboard` alias found。
|
||||
- old `single_pod.rs` / `multi_pod.rs` absent。
|
||||
- `LaunchMode::Panel => dashboard::launch(runtime_command).await` confirmed。
|
||||
|
||||
Worktree status at review end: tracked source tree clean; ignored `target/` only。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: yoi-orchestrator at: 2026-06-20T09:35:21Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Merge and final validation report:
|
||||
|
||||
Merged implementation branch into Orchestrator branch:
|
||||
- Merge commit: `23ec2bbd merge: dashboard console tui refactor`
|
||||
- Implementation commits included:
|
||||
- `5415a947 tui: introduce dashboard console boundaries`
|
||||
- `135343a2 tui: preserve dashboard after console return`
|
||||
|
||||
Reviewer outcome:
|
||||
- r1 requested changes because recoverable Dashboard open failures could exit `yoi panel` and successful Console return replaced live `DashboardApp` state。
|
||||
- Coder preserved existing `DashboardApp` across nested Console success/recoverable failure and added regression tests。
|
||||
- r2 approved with no blocking issues。
|
||||
|
||||
Orchestrator validation after merge passed:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p tui`
|
||||
- `cargo test -p yoi`
|
||||
- `cargo check --workspace --all-targets`
|
||||
- `cargo run -q -p yoi -- --help` targeted help smoke。
|
||||
- `test ! -e crates/tui/src/single_pod.rs`
|
||||
- `test ! -e crates/tui/src/multi_pod.rs`
|
||||
- targeted grep confirmed no `yoi dashboard` alias, no old `single_pod::run_panel` / `mod single_pod` / `mod multi_pod` / Panel-to-Console route, and expected Dashboard/Console launch terminology。
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-crXxMR.log`
|
||||
|
||||
Nix validation:
|
||||
- Not run for this Ticket because changes are Rust/docs/prompt/module-boundary only and no package/source-filter/resource inclusion concern was found。
|
||||
|
||||
Final state:
|
||||
- Orchestrator worktree clean at `23ec2bbd` after validation。
|
||||
- Implementation worktree remains available for cleanup after Ticket completion records are committed。
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: yoi-orchestrator at: 2026-06-20T09:35:30Z from: inprogress to: done reason: merged_reviewed_validated field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Implementation was merged into Orchestrator branch at `23ec2bbd`, r2 review approved, and final Orchestrator validation passed: `cargo fmt --check`, `git diff --check HEAD^1..HEAD`, `cargo test -p tui`, `cargo test -p yoi`, `cargo check --workspace --all-targets`, and targeted help/grep checks for Dashboard/Console terminology and no `yoi dashboard` alias.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: state_changed author: hare at: 2026-06-20T09:35:52Z from: done to: closed reason: closed field: state -->
|
||||
|
||||
## State changed
|
||||
|
||||
Ticket を closed にしました。
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-06-20T09:35:52Z status: closed -->
|
||||
|
||||
## 完了
|
||||
|
||||
## Resolution
|
||||
|
||||
`00001KVHX0WBE` を完了しました。
|
||||
|
||||
実装内容:
|
||||
- Dashboard / Console / TUI terminology を導入しました。
|
||||
- Dashboard: `yoi panel` workspace cockpit/action surface。
|
||||
- Console: single-Pod chat/client surface。
|
||||
- TUI: terminal UI implementation umbrella。
|
||||
- `yoi panel` command は維持しました。
|
||||
- `yoi dashboard` alias は追加していません。
|
||||
- `crates/tui/src/dashboard/` module boundary を追加しました。
|
||||
- `dashboard/mod.rs`
|
||||
- `dashboard/render.rs`
|
||||
- `dashboard/tests.rs`
|
||||
- `crates/tui/src/console/` を single-Pod Console boundary として追加しました。
|
||||
- `LaunchMode::Panel` は `dashboard::launch(...)` に routing され、Console/single-Pod entrypoint を経由しません。
|
||||
- 旧 `single_pod.rs` / `multi_pod.rs` module route は Dashboard/Console boundary に置換しました。
|
||||
- Help/docs/prompt wording を Dashboard / Console / TUI terminology に更新しました。
|
||||
- Reviewer r1 で見つかった Dashboard behavior regression を修正しました。
|
||||
- recoverable nested Console failure は `yoi panel` を終了せず Dashboard loop を継続します。
|
||||
- successful Console return は live `DashboardApp` を fresh `load_app(...)` で置換せず、selection/draft/notices/diagnostics/local state を保持します。
|
||||
- regression tests を追加しました。
|
||||
|
||||
主な commit:
|
||||
- `5415a947 tui: introduce dashboard console boundaries`
|
||||
- `135343a2 tui: preserve dashboard after console return`
|
||||
- `23ec2bbd merge: dashboard console tui refactor`
|
||||
|
||||
Review:
|
||||
- r1 は nested Console open 後の Dashboard state/loop preservation regression で `request_changes`。
|
||||
- Coder が `finish_nested_console_open(...)` と regression tests を追加。
|
||||
- r2 は `approve`。
|
||||
|
||||
最終 validation:
|
||||
- `cargo fmt --check`
|
||||
- `git diff --check HEAD^1..HEAD`
|
||||
- `cargo test -p tui`
|
||||
- `cargo test -p yoi`
|
||||
- `cargo check --workspace --all-targets`
|
||||
- `cargo run -q -p yoi -- --help` targeted smoke。
|
||||
- `test ! -e crates/tui/src/single_pod.rs`
|
||||
- `test ! -e crates/tui/src/multi_pod.rs`
|
||||
- targeted grep confirmed no `yoi dashboard` alias and no old Panel-to-Console/single_pod route。
|
||||
|
||||
Nix validation:
|
||||
- Not run because this Ticket changed Rust/docs/prompt/module boundaries only and no package/source-filter/resource inclusion concern was found。
|
||||
|
||||
Validation log:
|
||||
- `/run/user/1000/yoi/yoi-orchestrator/bash-output/bash-crXxMR.log`
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user