Commit Graph

548 Commits

Author SHA1 Message Date
Wolfgang Schoenberger a0cb946057 fix(rpc): preserve v2 snapshot semantics 2026-07-22 19:00:48 -07:00
Wolfgang Schoenberger ce8c9dc75f feat(rpc): page stable message histories 2026-07-22 18:38:03 -07:00
Wolfgang Schoenberger 2a6bcc7984 feat(rpc): add negotiated lossless output framing 2026-07-22 18:38:02 -07:00
can1357 b6e68fd243 fix(coding-agent): updated mentions of explore -> scout 2026-07-23 00:12:07 +02:00
can1357 d3bc8d19d1 Merge PR #6223: docs: correct /advisor as session-scoped, not persisted (@roboomp) 2026-07-22 21:13:23 +02:00
roboomp 2fcef1390e docs: corrected /advisor as session-scoped, not persisted
The advisor-watchdog.md slash-command table described /advisor,
/advisor on, and /advisor off as toggling the persisted advisor.enabled
setting. Commit 3c5e32f21b made the toggle session-local: setAdvisorEnabled
mutates only the in-memory #advisorEnabled field and writes nothing to
config.yml. Corrected the three rows to describe the session-scoped
override.

Fixes #6128
2026-07-21 21:20:34 +00:00
Will 2a0d819e7c fix(ai): scope OpenAI Codex credential identity by ChatGPT workspace
One ChatGPT email can hold several workspaces (a personal Plus/Pro plan
plus Team/Enterprise seats), each with its own workspace-scoped OAuth
token and independent limit pools. Codex credentials were deduped by
bare email, so logging into the second workspace silently replaced the
first, and usage reports from the two pools merged into one row.

- capture the workspace (chatgpt_account_id) as orgId at login, with
  the plan type as its display label; token refreshes never rewrite it
- key openai-codex credential identity as email + org via the existing
  org-scoped machinery; legacy email-keyed rows are claimed in place by
  the first workspace-scoped login, and workspace-less credentials
  never clobber workspace-scoped rows
- exclude the org-mirroring account base from same-org row claims so
  two members of one workspace (shared chatgpt_account_id) keep
  separate rows
- partition usage-report dedupe by workspace and require every shared
  identity dimension to agree when reconciling codex usage blocks

Fixes the openai-codex half of #2966 (anthropic half shipped in #5170);
also covers the #633 scenario.
2026-07-19 22:45:16 -04:00
can1357 c6602de1cf Merge PR #5687: feat(config): add PI_CONFIG_FILES settings overlay env var (@roboomp) 2026-07-18 20:12:48 +02:00
can1357 17212e22e3 Merge PR #5779: fix(tui): prevent vibe_wait TV-wall scrollback stacking (@roboomp) 2026-07-18 20:12:47 +02:00
can1357 f560db8cfe Merge PR #5810: fix(lsp): raise timeout ceiling to 300 seconds (@roboomp) 2026-07-18 20:12:46 +02:00
can1357 ea147d9d05 Merge PR #5915: docs(advisor): clarify concern delivery after a self-ended yield (@roboomp) 2026-07-18 19:57:43 +02:00
can1357 822e461b5a Merge PR #5942: fix(coding-agent): drain advisor reviews in print mode (@paralin)
# Conflicts:
#	packages/coding-agent/test/print-mode-working-indicator.test.ts
#	packages/coding-agent/test/silent-abort-print-mode.test.ts
2026-07-18 19:43:17 +02:00
roboomp 61fdd4dfbc fix(coding-agent): enabled js-debug child sessions
Added TCP server transport for vscode-js-debug and recursively handled startDebugging requests, breakpoint synchronization, active child routing, and tree cleanup.

Fixes #5984
2026-07-18 11:56:42 +00:00
Christian Stewart c8f1972c8c fix(coding-agent): drain advisor reviews in print mode 2026-07-18 01:51:00 -07:00
roboomp 1da8471bef docs(advisor): distinguished immune-turn asides from preserved cards
The normal-yield conclusion claimed a blocked steer is always preserved as a card. During the advisor.immuneTurns cooldown, resolveAdvisorDeliveryChannel returns aside and the note rides the YieldQueue to the next step boundary, not a card. Qualified the conclusion to separate the card cases from the aside downgrade.
2026-07-17 21:59:05 +00:00
roboomp 42810e14cb docs(advisor): documented plan and ACP delivery constraints
Clarified that plan mode preserves every would-be advisor steer, including live-streaming notes, because only user-driven turns converge on ask/resolve.

Documented that ACP bridges deferring agent-initiated turns preserve idle advice unless the bridge allows those turns, while advice can still steer an already-streaming turn.

Updated the severity table and changelog to make all delivery statements conditional on these session and client constraints.
2026-07-17 21:56:27 +00:00
roboomp 546549938c docs(advisor): clarified concern delivery after a self-ended yield
The severity table listed `concern` as unconditionally interrupting and the
prose claimed a normal yield can always steer/resume the agent. Neither holds
once the primary ends with a terminal text answer and no queued work: per #4840
`resolveAdvisorDeliveryChannel` preserves a late `concern` as a passive card
rather than waking the agent to restate completion, while a `blocker` still
steers a triggered turn (#5628).

Documented the streaming-vs-idle split and the terminal-answer carve-out so the
observed idle delivery reads as intended behavior.

Fixes #5913
2026-07-17 21:52:05 +00:00
roboomp 6558b5ec05 feat(config): added PI_CONFIG_FILES settings overlay env var
Loaded a platform-delimited (: on Unix, ; on Windows) path-list of settings overlays from PI_CONFIG_FILES before explicit --config overlays, so wrapper-based setups can inject settings without argv surgery.

Dropped the earlier global --config extraction as too risky; --config remains a launch/acp/models flag as before.

Fixes #5685
2026-07-17 10:35:19 +00:00
roboomp bdd7647bd9 docs(lsp): documented 300 second timeout ceiling
Aligned the LSP tool input table and limits section with the raised 5–300 second clamp.

Fixes #5804
2026-07-17 07:46:59 +00:00
roboomp 63cac8dfd5 fix(catalog): warned on LiteLLM metadata fallback
Logged one actionable warning per LiteLLM management base when rich metadata discovery fails, while keeping missing 404 routes silent.

Documented metadata-route permissions and covered forbidden versus absent endpoints.

Fixes #5801
2026-07-17 07:38:06 +00:00
can1357 1b267ad3fe fix(tui): restored alt-screen borrow for resize drag frames
- v17.0.1 (#5476) rewrote the normal buffer in place per SIGWINCH, so
  the terminal's own width reflow pushed wrapped fragments into native
  scrollback mid-drag and resize smoothness collapsed.
- Throwaway drag frames paint on the alternate screen again; the settle
  full paint fuses the buffer exit ahead of its destructive repaint.
- Kept the #5319 fixes: deferred overlay alt-exit fusing, confirmed-only
  DECRPM 2026 handling, and Warp's in-place resize path.
2026-07-17 05:49:22 +02:00
can1357 19f40f0b5d merge PR #5591 via eval/pr-5591: docs: documented magic keywords 2026-07-17 05:22:09 +02:00
roboomp 3c94ae4bbb fix(tui): prevented vibe wall scrollback duplication
Added an opt-in viewport-pinned live-region policy and propagated it through transcript composition for in-flight vibe_wait TV walls.

Pinned mutable wall frames now repaint virtually until finalization, while append-only live regions retain their existing frozen-snapshot behavior.

Fixes #5777
2026-07-17 02:22:47 +00:00
roboomp 8a61515819 fix(extensions): isolated self-scheduled callbacks from killing the session
Extension-scheduled setInterval/setTimeout/detached callbacks ran outside
the handler-dispatch try/catch, so a throw surfaced as a process-level
uncaughtException and the global postmortem handler tore down the whole
session instead of isolating the misbehaving extension.

- Added ManagedTimers backing sanctioned ctx.setInterval/setTimeout/clearTimer:
  callbacks run with handler-dispatch isolation (throw/rejection logged and
  routed through onError), handles are unref'd, and all are cleared on
  session_shutdown.
- Wired the helpers into ExtensionRunner.createContext and the runner-less
  command-context fallback; onSession now inherits the runner context.
- Documented in-process no-isolation behavior and the managed timers in
  docs/extensions.md and docs/skills/authoring-extensions.md.

Fixes #5664
2026-07-16 07:17:10 +00:00
can1357 0533ec005f merged PR #5462: fix(coding-agent): resolve agent:// slash form for nested subagent output
# Conflicts:
#	packages/coding-agent/src/prompts/system/system-prompt.md
2026-07-16 03:41:51 +02:00
can1357 2a05d36be5 merged PR #5476: fix(tui): prevent stale-buffer flicker 2026-07-16 03:32:00 +02:00
can1357 9afedb591e feat(coding-agent): added opt-in task prewalk and tightened --tools and xdev behavior
- Added a `task.prewalk` option (default `false`), removed default task `prewalk` flags, and updated prewalk resolution so bunded generic task execution only prewalks when explicitly enabled.
- Enforced strict `--tools` validation in CLI parsing, making unknown tool names fail fast with `CliUsageError` instead of being silently filtered.
- Migrated legacy discovery settings (`tools.discoveryMode`, `tools.essentialOverride`, MCP discovery keys) into updated `tools.xdev` handling with preserved explicit override behavior.
- Hardened xdev/ACP execution flow by capping `docsAll` payloads with overflow listing and remapping `xd://` dispatches/approval gating for correct execute/read behavior and reduced duplicate prompts.
2026-07-15 18:39:36 +02:00
roboomp a68ad9125e docs: documented magic keywords
Added a discoverable reference for magic keyword behavior, matching rules, and configuration.

Fixes #5590
2026-07-15 15:16:20 +00:00
can1357 5ff277349c refactor(coding-agent): consolidated tool surface onto xd:// devices and hub
- Added the `xd://` virtual device protocol (`internal-urls/xd-protocol.ts`, `tools/xdev.ts`): tools declaring `loadMode: "discoverable"` are unmounted from the request tools array and driven via `read xd://` (list/docs+schema) and `write xd://<tool>` (execute), gated by the `tools.xdev` setting (default on) and inlined into the system prompt.
- Merged the `irc`, `job`, and `launch` tools into a single `hub` tool (`tools/hub/`, `async/job-manager.ts`): messaging keeps `send`/`inbox`/`list`, job control maps to `wait`/`cancel`/`jobs`, process supervision keeps `start`/`logs`/`stop`/`restart`/`describe` with `ps`, and the unified `wait` races background jobs against peer messages; SDK `IrcTool`/`JobTool`/`LaunchTool` are replaced by `HubTool`.
- Removed the hidden `resolve` tool in favor of the `xd://resolve`/`xd://reject`/`xd://propose` resolution devices, auto-including `write` whenever a deferrable tool or plan mode is present.
- Removed the BM25 tool-discovery system: the `search_tool_bm25` tool, the `tool-discovery` module, the `tools.discoveryMode`/`mcp.discoveryMode`/`mcp.discoveryDefaultServers`/`tools.essentialOverride` settings, per-tool MCP selection, and the `mcp_tool_selection` message type.
- Unified tool presentation on `ToolLoadMode` (`essential`|`discoverable`), replacing the custom-tool `xdev?: boolean` opt-out; custom, extension, MCP, RPC host, image-generation, and TTS tools now default to `discoverable`, and added a `satisfies` predicate to `SoftToolRequirement`.
- Removed the standalone `ssh` command tool and `ssh/ssh-executor` (the `ssh://` read/write/search protocol stays), and made `--tools` address hidden built-ins.
- Updated collab-web to render `xd://` dispatches and `hub` op families, dropped the `search_tool_bm25`/`ssh`/`report-finding` renderers, refreshed tool docs and prompts, and migrated the affected tests and changelogs.
2026-07-15 15:16:29 +02:00
can1357 404ebb0fb0 Merge remote-tracking branch 'origin/farm/ae7a5593/ttsr-inline-regex-flags-and-scope-quoting' 2026-07-15 09:54:46 +02:00
roboomp 09fa0fcb62 docs(ttsr): clarified scope frontmatter forms
Documented both accepted scope encodings: a comma-separated YAML scalar and a YAML sequence. Added prose, thinking, block-list, and tool/path examples, plus an explicit warning that adjacent quoted scalars are invalid YAML. Updated malformed-frontmatter fallback semantics to match the fix in PR #5489.

Fixes #4796
2026-07-15 06:39:11 +00:00
can1357 c32ea55ba3 fix(coding-agent): kept todo active for prewalk subagents and fixed prewalk gate deadlock
- Updated prewalk gating in `AgentSession` to key the todo gate on active tools instead of registry presence, so deactivated todo tools no longer block prewalk handoff.
- Changed subprocess tool filtering so `todo` is stripped for normal subagents but retained when prewalk is armed, and propagated the prewalk state through tool-session setup.
- Added regression tests for restricted active-tool slates and prewalk/non-prewalk subagent tool propagation to verify todo is handled correctly in each case.
2026-07-15 05:45:59 +02:00
can1357 425e583ae0 feat(coding-agent): added support for task-agent field and model resolution
- Added schema and type updates for task-agent fields and model resolver settings.
- Extended discovery helper logic to carry resolved task-agent metadata through execution setup.
- Updated task/agent registration and execution paths to use the new capability/field data.
- Expanded test coverage for agent-field parsing, model resolution, and executor prewalk behavior.
2026-07-15 00:50:55 +02:00
roboomp 68f84d7c20 fix(tui): prevented stale-buffer flicker
- Kept fullscreen replacement overlays mounted through asynchronous transcript rebuilds.
- Fused alternate-screen exit with destructive repaint and removed resize-time buffer switches.
- Preserved statically detected synchronized output when DECRQM probing is inconclusive.

Fixes #5319
2026-07-14 18:23:45 +00:00
roboomp 8c6b2fb450 fix(coding-agent): resolved agent:// slash form for nested subagent output
The agent:// path segment was always treated as a jq JSON-extraction key
against <parent>.md, so agent://Parent/Child loaded Parent.md and applied
.Child instead of resolving the nested child capsule Parent.Child.md. A
precise-planner reading its own scout child therefore got Not found.

The slash is now a hierarchy separator first: agent://Parent/Child resolves
Parent.Child.md (subagent children are allocated as dot-qualified ids). It
falls back to JSON extraction only when no nested output matches the path;
the ?q= query form is always extraction.

Fixes #5238
2026-07-14 17:52:04 +00:00
can1357 6624b97e3d docs(coding-agent): describe lazy web search fallbacks 2026-07-14 18:39:53 +02:00
can1357 f786fe4a6f Merge PR #5147: fix(coding-agent): support models.yaml custom config (@roboomp) 2026-07-14 18:39:26 +02:00
can1357 7f9a2777f9 Merge PR #5170: fix(ai): scope Anthropic credential identity by organization, not just email (@chan1103) 2026-07-14 18:29:14 +02:00
can1357 f9f6ed9e8d feat(coding-agent): replaced legacy pi/ role alias prefix with
- Replaced legacy `pi/` role alias prefix with canonical `@` syntax across model resolution, documentation, and tests.
- Added support for bare `*` default alias and multiple alias prefix detection with custom role resolution in `resolveConfiguredRolePattern()`.
- Enhanced thinking suffix parsing to accept unambiguous abbreviations (minimum 2 characters) for effort and level selectors.
- Extended `resolveCliModel()` and `filterAvailableModelsByEnabledPatterns()` to accept settings parameter for role alias resolution from `--model` flag.
2026-07-13 23:26:33 +02:00
can1357 f83e409218 feat(coding-agent): added toggle for launch tool
- Added a configuration setting `launch.enabled` to control the availability of the project-scoped launch tool.
- Integrated the setting into the bash tool and tool registry to conditionally enable or disable the launch functionality.
- Updated documentation and settings schema to include the new toggle.
2026-07-13 04:22:28 +02:00
can1357 4cfec93458 feat(coding-agent/launch): introduced persistent project service tool
- Introduced a project-scoped `launch` tool to orchestrate long-running services, debuggers, and watchers with persistent execution capabilities.
- Implemented a robust daemon broker with Unix/Windows IPC transport that manages process lifecycles, readiness monitoring, and automatic log rotation.
- Added detached process support to ensure services persist independently of the main application lifecycle, including recovery and cleanup mechanisms.
- Updated the `bash` interceptor to prioritize the new `launch` tool for background processes and provided comprehensive documentation for lifecycle and signal handling.
2026-07-13 04:21:55 +02:00
can1357 54bafa1cce feat(coding-agent): implemented interactive fallback chain configuration
- Implemented model-specific keys and provider wildcards for `retry.fallbackChains` with updated resolution logic.
- Added interactive fallback chain management in the model roles UI, including support for reordering and editing.
- Improved fallback chain specificity rules and added comprehensive validation with startup warnings.
- Fixed mouse interaction alignment and hover state coordinate mapping in the roles view.
2026-07-11 22:03:35 +02:00
can1357 172691f6ec feat: removed redundant pre-execution bash command fixup logic
- Removed the bash command fixup system and associated logic from both the Rust and TypeScript components.
- Deleted the redundant fixup module and its exported implementations.
- Updated technical documentation and configuration settings to reflect the removal of pre-execution bash command rewriting.
2026-07-11 18:28:32 +02:00
can1357 408a92d91a feat(coding-agent): enabled asynchronous background task execution
- Enabled granular task execution by allowing batches to interleave blocking items with non-blocking async background spawns.
- Updated task orchestration to support simultaneous inline result collection and persistent background job tracking.
- Improved agent visibility in the job tool by reporting running subagents even when not explicitly linked to a backing job ID.
- Enhanced terminal state handling to prevent premature tool block closures while async background operations remain active.
2026-07-11 16:17:03 +02:00
chan1103 044d722a36 fix(ai): scope Anthropic credential identity by organization
One Anthropic account email can hold multiple organizations (a Team seat
plus a personal Max plan), each with its own org-scoped OAuth token and
independent 5h/7d limit pools. Credentials were deduped by bare email, so
logging in with the second subscription silently replaced the first, and
usage reports from the two pools merged into one row with mixed numbers.

- capture organization uuid/name at login (token exchange response, with
  a claude_cli/bootstrap fallback); token refreshes never rewrite it
- key anthropic credential identity as email + org; a legacy email-keyed
  row is claimed in place by the first org-scoped login with the same
  email, and org-less credentials never clobber org-scoped rows
- partition usage-report dedupe and the per-credential usage cache by
  org so the two subscriptions' limit pools stay distinct for rotation
- show the organization in omp usage (redaction-safe) and name the
  stored account/org in the login success message
2026-07-11 22:49:12 +09:00
can1357 cb2153e9a5 feat(coding-agent-task): implemented agent-centric flat task structure
- Renamed task wire fields, replacing `assignment` and `description` with `task` and `name` while removing `role` references.
- Implemented automated task UI label generation using a tiny model to replace manual role descriptions.
- Updated task execution and rendering logic to support per-item agent resolution and dynamic badge display.
- Migrated schemas, prompts, and test suites to enforce the new flat task structure and agent-centric policy.
2026-07-11 13:44:04 +02:00
roboomp cbe0832246 docs(coding-agent): corrected context promotion docs
Aligned the context promotion documentation with the explicit contextPromotionTarget runtime behavior and the false default in settings-schema.

Fixes #5163
2026-07-11 07:30:43 +00:00
can1357 ea632a518b feat(coding-agent): expanded search capabilities and scraping reliability
- Added six new search providers (Bing, Yahoo, Ecosia, Startpage, Mojeek, and Public) to expand coverage and parallel search capabilities.
- Implemented a unified `browserFetch` utility with headless-browser fallback and randomized Chrome profiles to improve scrape reliability.
- Integrated automated bot-defense mechanisms including CAPTCHA detection, ALTCHA proof-of-work, and homepage-token flows.
- Fixed hanging search CLI commands by ensuring proper closure of AuthStorage connections.
2026-07-11 07:33:22 +02:00
roboomp 2d4d445f95 fix(coding-agent): supported models yaml config
Loaded default custom model configuration from models.yaml when models.yml is absent while preserving yml precedence over yaml and legacy json migration.

Fixes #5145
2026-07-11 03:52:45 +00:00
can1357 2f97b7fe4b feat(coding-agent): removed plan subagent
- Removed the `plan` agent definition and associated prompt file from bundled agents.
- Updated documentation to reflect the removal of `plan` from available subagents.
- Cleaned up related tests to remove references to the deprecated agent.
2026-07-11 05:47:54 +02:00