| ... | @@ -62,10 +62,15 @@ Cursor protocol decisions should be based on: | ... | @@ -62,10 +62,15 @@ Cursor protocol decisions should be based on: |
| 62 | - ACP docs | 62 | - ACP docs |
| 63 | - current local ACP probe output | 63 | - current local ACP probe output |
| 64 | | 64 | |
| 65 | Confirmed from probe: | 65 | Confirmed from current docs + probe: |
| 66 | | 66 | |
| 67 | - ACP session modes include `agent`, `plan`, and `ask` | 67 | - ACP session modes include `agent`, `plan`, and `ask` |
| 68 | - currently observed ACP updates do not include native structured plan updates or native structured question prompts comparable to Codex or Claude | 68 | - for product semantics, treat ACP mode as binary: `operatingMode: default | plan` |
| | 69 | - Cursor ACP extension methods include: |
| | 70 | - `cursor/ask_question` (multiple-choice question prompt) |
| | 71 | - `cursor/create_plan` (explicit plan approval request) |
| | 72 | - `cursor/update_todos` (todo-state updates that can drive plan-step UI) |
| | 73 | - probe streams still show standard chunk/update events and may not always emit extension methods in every run |
| 69 | | 74 | |
| 70 | --- | 75 | --- |
| 71 | | 76 | |
| ... | @@ -77,13 +82,10 @@ The implementation should separate three concepts that are currently easy to con | ... | @@ -77,13 +82,10 @@ The implementation should separate three concepts that are currently easy to con |
| 77 | | 82 | |
| 78 | This is the agent runtime mode. | 83 | This is the agent runtime mode. |
| 79 | | 84 | |
| 80 | Canonical operating modes: | 85 | Canonical operating mode: |
| 81 | | 86 | |
| 82 | - `default` | 87 | - `default` |
| 83 | - `plan` | 88 | - `plan` |
| 84 | - `ask` | | |
| 85 | - `execute` | | |
| 86 | - `unknown` | | |
| 87 | | 89 | |
| 88 | This should be represented at runtime independently of plan content or prompt cards. | 90 | This should be represented at runtime independently of plan content or prompt cards. |
| 89 | | 91 | |
| ... | @@ -188,7 +190,6 @@ Required additions: | ... | @@ -188,7 +190,6 @@ Required additions: |
| 188 | ```ts | 190 | ```ts |
| 189 | interface ProviderInteractiveCapabilities { | 191 | interface ProviderInteractiveCapabilities { |
| 190 | supportsPlanMode: boolean; | 192 | supportsPlanMode: boolean; |
| 191 | supportsAskMode: boolean; | | |
| 192 | supportsStructuredPlanUpdates: boolean; | 193 | supportsStructuredPlanUpdates: boolean; |
| 193 | supportsPlanTextStreaming: boolean; | 194 | supportsPlanTextStreaming: boolean; |
| 194 | supportsStructuredUserInput: boolean; | 195 | supportsStructuredUserInput: boolean; |
| ... | @@ -329,7 +330,6 @@ Implementation requirements: | ... | @@ -329,7 +330,6 @@ Implementation requirements: |
| 329 | | 330 | |
| 330 | 5. Publish capabilities: | 331 | 5. Publish capabilities: |
| 331 | - `supportsPlanMode = true` | 332 | - `supportsPlanMode = true` |
| 332 | - `supportsAskMode = false` unless Codex exposes a distinct ask mode separately | | |
| 333 | - `supportsStructuredPlanUpdates = true` | 333 | - `supportsStructuredPlanUpdates = true` |
| 334 | - `supportsPlanTextStreaming = true` | 334 | - `supportsPlanTextStreaming = true` |
| 335 | - `supportsStructuredUserInput = true` | 335 | - `supportsStructuredUserInput = true` |
| ... | @@ -384,7 +384,7 @@ Implementation requirements: | ... | @@ -384,7 +384,7 @@ Implementation requirements: |
| 384 | | 384 | |
| 385 | 1. Publish native operating mode: | 385 | 1. Publish native operating mode: |
| 386 | - `permissionMode: 'plan'` -> canonical mode `plan` | 386 | - `permissionMode: 'plan'` -> canonical mode `plan` |
| 387 | - if future values map cleanly, publish `ask` or `default` accordingly | 387 | - all other values -> canonical mode `default` |
| 388 | | 388 | |
| 389 | 2. Detect `AskUserQuestion` tool uses: | 389 | 2. Detect `AskUserQuestion` tool uses: |
| 390 | - inspect `tool_use` blocks in assistant messages / stream events | 390 | - inspect `tool_use` blocks in assistant messages / stream events |
| ... | @@ -418,7 +418,6 @@ Implementation requirements: | ... | @@ -418,7 +418,6 @@ Implementation requirements: |
| 418 | | 418 | |
| 419 | 7. Publish capabilities: | 419 | 7. Publish capabilities: |
| 420 | - `supportsPlanMode = true` | 420 | - `supportsPlanMode = true` |
| 421 | - `supportsAskMode = false` unless explicit Claude mode is observed | | |
| 422 | - `supportsStructuredPlanUpdates = partial/false initially` | 421 | - `supportsStructuredPlanUpdates = partial/false initially` |
| 423 | - `supportsPlanTextStreaming = partial` | 422 | - `supportsPlanTextStreaming = partial` |
| 424 | - `supportsStructuredUserInput = true` | 423 | - `supportsStructuredUserInput = true` |
| ... | @@ -448,13 +447,17 @@ Implementation default: | ... | @@ -448,13 +447,17 @@ Implementation default: |
| 448 | | 447 | |
| 449 | ### Summary | 448 | ### Summary |
| 450 | | 449 | |
| 451 | Cursor should initially ship with degraded plan-mode support: native mode awareness, but no claim of structured prompt cards or structured plan steps until protocol evidence exists. | 450 | Cursor should ship with binary plan-mode semantics (`default | plan`) and implement documented ACP extension methods when present. If extension methods are absent in a given session, it should degrade cleanly to mode + streamed assistant text. |
| 452 | | 451 | |
| 453 | ### Real native evidence | 452 | ### Real native evidence |
| 454 | | 453 | |
| 455 | From the ACP probe: | 454 | From the Cursor ACP docs + current probe: |
| 456 | | 455 | |
| 457 | - available modes include `agent`, `plan`, and `ask` | 456 | - available modes include `agent`, `plan`, and `ask` |
| | 457 | - Cursor ACP docs define extension methods: |
| | 458 | - `cursor/ask_question` |
| | 459 | - `cursor/create_plan` |
| | 460 | - `cursor/update_todos` |
| 458 | - observed updates include: | 461 | - observed updates include: |
| 459 | - `available_commands_update` | 462 | - `available_commands_update` |
| 460 | - `agent_thought_chunk` | 463 | - `agent_thought_chunk` |
| ... | @@ -464,11 +467,11 @@ From the ACP probe: | ... | @@ -464,11 +467,11 @@ From the ACP probe: |
| 464 | - observed request type: | 467 | - observed request type: |
| 465 | - `session/request_permission` | 468 | - `session/request_permission` |
| 466 | | 469 | |
| 467 | Not observed: | 470 | Current caveats: |
| 468 | | 471 | |
| 469 | - native structured plan update events | 472 | - no standard ACP event equivalent to Codex `turn/plan/updated` |
| 470 | - native plan text delta event distinct from normal message chunks | 473 | - no standard ACP event equivalent to Codex `item/plan/delta` |
| 471 | - native structured ask-user-question event | 474 | - extension-method payload shapes should be fixture-captured from live sessions before locking parser assumptions |
| 472 | | 475 | |
| 473 | ### Adapter implementation | 476 | ### Adapter implementation |
| 474 | | 477 | |
| ... | @@ -482,18 +485,18 @@ Implementation requirements: | ... | @@ -482,18 +485,18 @@ Implementation requirements: |
| 482 | | 485 | |
| 483 | 1. Publish native operating mode: | 486 | 1. Publish native operating mode: |
| 484 | - map ACP `plan` mode -> canonical `plan` | 487 | - map ACP `plan` mode -> canonical `plan` |
| 485 | - map ACP `ask` mode -> canonical `ask` | 488 | - map ACP `agent` and `ask` modes -> canonical `default` |
| 486 | - map ACP `agent` mode -> canonical `default` or `execute` depending product semantics | 489 | - preserve raw ACP mode in native metadata for debugging |
| 487 | | 490 | |
| 488 | 2. Do not claim unsupported structured capabilities: | 491 | 2. Implement documented Cursor extension methods: |
| 489 | - no native `turn.plan.updated` | 492 | - `cursor/ask_question` -> canonical `user-input.requested` |
| 490 | - no native `user-input.requested` | 493 | - `cursor/update_todos` -> canonical `turn.plan.updated` when payload is parseable into stable step ids/text/status |
| 491 | - no native `ExitPlanMode` equivalent confirmed | 494 | - `cursor/create_plan` -> canonical final-plan handoff / approval-request surface |
| 492 | | 495 | |
| 493 | 3. Use graceful fallback behavior: | 496 | 3. Use graceful fallback behavior: |
| 494 | - render plan mode as mode state + assistant text stream | 497 | - render plan mode as mode state + assistant text stream |
| 495 | - render ask mode as conversational mode + normal user composer | 498 | - if no `cursor/ask_question` event is emitted, fall back to normal conversational input |
| 496 | - do not render structured question cards for Cursor initially | 499 | - if no parseable `cursor/update_todos` event is emitted, fall back to text-only plan rendering |
| 497 | | 500 | |
| 498 | 4. Preserve room for future enrichment: | 501 | 4. Preserve room for future enrichment: |
| 499 | - keep raw ACP notifications available in native event logs | 502 | - keep raw ACP notifications available in native event logs |
| ... | @@ -501,18 +504,19 @@ Implementation requirements: | ... | @@ -501,18 +504,19 @@ Implementation requirements: |
| 501 | | 504 | |
| 502 | 5. Publish capabilities: | 505 | 5. Publish capabilities: |
| 503 | - `supportsPlanMode = true` | 506 | - `supportsPlanMode = true` |
| 504 | - `supportsAskMode = true` | 507 | - `supportsStructuredPlanUpdates = true` when `cursor/update_todos` is available, otherwise false |
| 505 | - `supportsStructuredPlanUpdates = false` | 508 | - `supportsPlanTextStreaming = false` initially (no distinct plan-text channel) |
| 506 | - `supportsPlanTextStreaming = false` initially | 509 | - `supportsStructuredUserInput = true` when `cursor/ask_question` is available, otherwise false |
| 507 | - `supportsStructuredUserInput = false` | | |
| 508 | - `supportsFreeformUserInput = false` via structured prompt path | 510 | - `supportsFreeformUserInput = false` via structured prompt path |
| 509 | - `supportsExitPlanMode = false` | 511 | - `supportsExitPlanMode = false` |
| 510 | | 512 | |
| 511 | ### Cursor-specific tests | 513 | ### Cursor-specific tests |
| 512 | | 514 | |
| 513 | - ACP mode metadata maps correctly into canonical mode | 515 | - ACP mode metadata maps to `plan` vs `default` correctly |
| | 516 | - `cursor/ask_question` maps into canonical structured prompt schema |
| | 517 | - `cursor/update_todos` maps into canonical structured plan state when parseable |
| | 518 | - `cursor/create_plan` maps into final-plan handoff / approval surface |
| 514 | - `agent_thought_chunk` and `agent_message_chunk` still render normally in plan mode | 519 | - `agent_thought_chunk` and `agent_message_chunk` still render normally in plan mode |
| 515 | - UI does not try to open structured prompt cards for Cursor | | |
| 516 | - fallback conversational flow remains functional | 520 | - fallback conversational flow remains functional |
| 517 | | 521 | |
| 518 | ### Cursor-specific follow-up probe work | 522 | ### Cursor-specific follow-up probe work |
| ... | @@ -520,9 +524,9 @@ Implementation requirements: | ... | @@ -520,9 +524,9 @@ Implementation requirements: |
| 520 | Add dedicated probes for: | 524 | Add dedicated probes for: |
| 521 | | 525 | |
| 522 | - mode-switching during an active session | 526 | - mode-switching during an active session |
| 523 | - ask-mode prompt behavior | 527 | - real payload shapes for `cursor/ask_question`, `cursor/create_plan`, and `cursor/update_todos` |
| 524 | - any request types besides `session/request_permission` | 528 | - any request types besides `session/request_permission` |
| 525 | - whether specific built-in skills or prompt styles trigger structured question surfaces | 529 | - whether extension methods are always emitted or only for specific prompt styles |
| 526 | | 530 | |
| 527 | --- | 531 | --- |
| 528 | | 532 | |
| ... | @@ -543,7 +547,7 @@ Render plan mode through a single UI model driven by canonical events and provid | ... | @@ -543,7 +547,7 @@ Render plan mode through a single UI model driven by canonical events and provid |
| 543 | | 547 | |
| 544 | ### Rendering rules | 548 | ### Rendering rules |
| 545 | | 549 | |
| 546 | 1. Show operating mode indicator whenever current mode is `plan` or `ask` | 550 | 1. Show operating mode indicator whenever current mode is `plan` |
| 547 | 2. Show structured question card only when a pending `user-input.requested` exists | 551 | 2. Show structured question card only when a pending `user-input.requested` exists |
| 548 | 3. Show structured plan step list when a current `turn.plan.updated` snapshot exists | 552 | 3. Show structured plan step list when a current `turn.plan.updated` snapshot exists |
| 549 | 4. Append `plan_text` streaming content beneath or alongside structured steps when both exist | 553 | 4. Append `plan_text` streaming content beneath or alongside structured steps when both exist |
| ... | @@ -631,7 +635,8 @@ Add coverage for: | ... | @@ -631,7 +635,8 @@ Add coverage for: |
| 631 | | 635 | |
| 632 | - Codex is the reference provider for full structured plan/question UX. | 636 | - Codex is the reference provider for full structured plan/question UX. |
| 633 | - Claude supports structured prompts via tool adaptation, but incremental structured plan updates are not assumed initially. | 637 | - Claude supports structured prompts via tool adaptation, but incremental structured plan updates are not assumed initially. |
| 634 | - Cursor supports plan and ask modes, but not structured prompt cards or structured plan step updates initially. | 638 | - Cursor transport exposes `agent|plan|ask`, but product semantics collapse this to `operatingMode: default | plan`. |
| | 639 | - Cursor structured prompts/plan steps are driven by ACP extension methods when present, with fallback when absent. |
| 635 | - Product/UI should degrade gracefully rather than invent unsupported provider behavior. | 640 | - Product/UI should degrade gracefully rather than invent unsupported provider behavior. |
| 636 | - Raw provider payloads should always be retained where feasible to support future adapter refinement. | 641 | - Raw provider payloads should always be retained where feasible to support future adapter refinement. |
| 637 | | 642 | |
| ... | @@ -643,6 +648,6 @@ Add coverage for: | ... | @@ -643,6 +648,6 @@ Add coverage for: |
| 643 | 2. Wire capabilities/mode through orchestration and web socket projections | 648 | 2. Wire capabilities/mode through orchestration and web socket projections |
| 644 | 3. Finish Codex end-to-end plan mode implementation first | 649 | 3. Finish Codex end-to-end plan mode implementation first |
| 645 | 4. Implement Claude `AskUserQuestion` and `ExitPlanMode` adapter mapping | 650 | 4. Implement Claude `AskUserQuestion` and `ExitPlanMode` adapter mapping |
| 646 | 5. Add Cursor degraded plan/ask mode support | 651 | 5. Add Cursor binary (`default|plan`) mode support + ACP extension-method mapping |
| 647 | 6. Build capability-driven frontend rendering and answer submission | 652 | 6. Build capability-driven frontend rendering and answer submission |
| 648 | 7. Add reconnect/history coverage and transcript/protocol fixtures | 653 | 7. Add reconnect/history coverage and transcript/protocol fixtures |