Skip to content

feat(core,cli): M3c-rest — AskUserQuestion + ExitPlanMode tools#23

Merged
oratis merged 1 commit into
mainfrom
feat/ask-user-exit-plan
May 28, 2026
Merged

feat(core,cli): M3c-rest — AskUserQuestion + ExitPlanMode tools#23
oratis merged 1 commit into
mainfrom
feat/ask-user-exit-plan

Conversation

@oratis

@oratis oratis commented May 28, 2026

Copy link
Copy Markdown
Owner

AskUserQuestion delegates to ToolContext.askUser (REPL wires a numbered prompt; headless errors). ExitPlanMode flips modeSignal.exitPlanMode; REPL flips ctx.mode plan→default. Tests 387→396.

Two agent-control tools added to BUILTIN_TOOLS.

  · packages/core/src/tools/ask-user.ts — host delegates via
    ToolContext.askUser callback; returns error in headless. Caps options at 4
    and surfaces host errors as tool errors.
  · packages/core/src/tools/exit-plan.ts — flips ToolContext.modeSignal.
    exitPlanMode = true so the agent loop owner can switch mode plan →
    default after the turn.
  · packages/core/src/types.ts — ToolContext gains askUser? and modeSignal?
    optional fields.
  · packages/core/src/agent.ts — RunAgentOptions.askUser pass-through;
    RunAgentResult.modeSignal exposed so callers can act on ExitPlanMode.
  · apps/cli/src/repl.ts — REPL askUser callback: prints question + numbered
    options + reads either a number or free text (returned as "Other: ...").
    Also flips ctx.mode from 'plan' to 'default' when result.modeSignal
    .exitPlanMode is set.

Tests: +9 (5 ask-user + 3 exit-plan + still 1 reminder cleanup).
Total: 387 → 396 passing (cli 47 unchanged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@oratis oratis merged commit 6a58ffd into main May 28, 2026
1 of 2 checks passed
@oratis oratis deleted the feat/ask-user-exit-plan branch May 28, 2026 05:48
oratis added a commit that referenced this pull request May 28, 2026
Updates to reflect PRs #23-#33. Major milestones now ≥100% except:
  · M6 Mac client: 25% (skeleton only; Electron/Vite/Tailwind dep install
    + dmg + signing is the remaining single-piece work)
  · M7 file panel: 15% (depends on M6-rest)
  · M8: 75% (vim/keybindings/headless/worktree/launchd ✅; voice waiting)
  · M9: 65% (CI matrix + dependabot ✅; mac build step waits on M6)

Honest remaining estimate: 3-4 weeks single-engineer-focused for v1 ship,
or 2 weeks with 2-3 engineers parallel. M6 Electron is the constraint.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant