Commit Graph

207 Commits

Author SHA1 Message Date
can1357 f11641d5a8 feat(coding-agent): enabled importing foreign sessions from claude and codex
- Implemented session stores and metadata converters to import Claude and Codex sessions into OMP.
- Added `--from-claude` and `--from-codex` CLI flags and `/resume` command arguments for foreign session resolution.
- Updated session selector components and controllers to support listing and picking external agent sessions.
- Added comprehensive unit tests and documentation covering foreign session import functionality.
2026-07-30 00:28:40 +02:00
can1357 cfd335d2b1 fix(tui): restored image attachments on /tree and esc-esc branch
- branch() and navigateTree() now return the selected user message's image
  parts (selectedImages/editorImages) alongside the text, extracted in marker
  order by #extractUserMessageImages.
- CustomEditor.setDraft() replaces the composer draft with text plus its
  pending images, so restored [Image #N] markers resolve on resubmit instead
  of degrading to literal text.
- Wired all six restore call sites (selector-controller, extension-ui-controller)
  through setDraft; updated rpc-subagents mocks for the new branch shape.
- Added offline regression tests for branch/navigateTree image restitution,
  multi-image marker order, and text-only prompts.
2026-07-28 00:57:34 +02:00
alexis@epsilver.xyz 3854c1c3b1 fix(coding-agent): address codex review on vision mode
- Reconcile inspect_image centrally from setModelWithProviderSessionReset
  so retry-fallback model changes (turn-recovery.ts) that bypass
  syncAfterModelChange cannot leave a stale tool set
- Apply persisted inspect_image.mode changes immediately from the
  settings selector via a new handleSettingChange branch
- Refresh the read tool's advertised description during reconciliation,
  before applyActiveToolsByName rebuilds the prompt, instead of only
  lazily on the next image read
- Fix the flat (quoted-dotted) enabled->mode migration to write the
  nested target form the resolver actually reads
- Add committed regression tests: tri-state x capability matrix,
  override precedence, and enabled->mode migration (nested, flat, and
  explicit-mode-wins)
2026-07-27 16:24:02 -04:00
can1357 60b0968e1f Merge PR #6484: fix(coding-agent): resume agent after /tree ask re-answer (@roboomp) 2026-07-26 15:41:31 +02:00
Paolo Mazzitti 81bc0d4368 fix(coding-agent): stop the live advisor runtime when /settings disables it
Disabling the Advisor from /settings persisted the setting but left the
live Advisor runtime running until the session restarted.
SelectorController.handleSettingChange had no case for "advisor.enabled",
unlike other session-managed toggles (autoCompact, steeringMode, ...), so
the change never reached session.setAdvisorEnabled — the same call /advisor
off already uses to stop the runtime immediately.
2026-07-26 12:25:19 +00:00
can1357 c9c0882724 feat(audio): replaced Chromium browser audio with native audio stack
- Switched from `miniaudio` to `maudio` Rust crate and added `AudioCapture` and `AudioPlayback` native classes.
- Removed browser-side audio infrastructure including Web Audio API, audio worklet processor, and WebRTC runtime.
- Migrated STT recorder and transcriber modules to use native `AudioCapture` with callback-based streaming.
- Replaced streaming audio player with native `AudioPlayback` that writes PCM directly without TypeScript intermediaries.
- Removed ffmpeg, wav, and platform-specific playback commands from the audio toolchain.
2026-07-24 08:54:16 +02:00
can1357 af9e8546a9 feat: implemented session account selection and pinning via slash command
- Add `pinSessionOAuthAccount` storage method and active account flag to the auth storage API.
- Introduce session account selector component, controller logic, and interactive mode delegation.
- Implement the `/session pin` builtin slash command with text listing and account pinning capabilities.
- Add unit tests covering session account selection, component navigation, and command handling.
2026-07-24 07:57:55 +02:00
roboomp 7dee729ef7 fix(coding-agent): defer /tree ask re-answer resume until after ui rebuild
Scheduling agent.continue() inside navigateTree started a post-prompt
task before the interactive /tree handler rebuilt its transcript, so a
fast provider's agent_start/turn_start could render against the stale
pre-rebuild UI and then be clobbered by renderInitialMessages.

navigateTree now reports the commit via askReanswerCommitted instead of
resuming, and SelectorController.showTreeSelector calls the new
AgentSession.resumeAfterAskReanswer() only after renderInitialMessages +
reloadTodos, so the resumed turn always renders against the rebuilt
transcript.

Addresses chatgpt-codex-connector review on #6484.
Fixes #6483
2026-07-24 05:27:00 +00:00
Joe Shull f4641c165e feat: allowlist xdev prompt docs 2026-07-24 02:23:22 +02:00
roboomp 5a1f227a6b fix(memory): synchronized live backend lifecycle
- Serialized backend transitions across runtime state, tools, and prompts.
- Rehydrated Mnemopi listeners after clear and enqueue maintenance.
- Made memory.backend the sole post-migration local runtime gate.

Fixes #5638
2026-07-23 19:52:09 +00:00
can1357 5b3275c7ae feat(coding-agent): introduced ordered provider priority lists for search and images
- Replaced single-provider preferences with ordered priority lists for web search and image generation.
- Added a `MultiSelectSubmenu` component supporting toggle and reordering interactions in settings.
- Implemented migration logic to convert legacy single-provider preferences into ordered priority lists.
- Updated setup wizard scenes, image generation fallback logic, and search provider chains to use priority lists.
2026-07-23 20:44:50 +02:00
can1357 878b8fd556 Merge PR #6029: feat(omp): configure web search provider order (@riverpilot)
# Conflicts:
#	packages/coding-agent/src/modes/controllers/selector-controller.ts
2026-07-23 20:18:08 +02:00
Mathews-Tom ab1d7db7d1 Merge remote-tracking branch 'upstream/main' into feat/tree-ask-reanswer
# Conflicts:
#	packages/coding-agent/src/modes/controllers/selector-controller.ts
2026-07-19 15:02:33 +05:30
Alexander Kirilin 735be36df6 feat(omp): configure web search provider order 2026-07-18 20:12:26 -04:00
can1357 f33465a977 feat(tui): added shift+enter summarize-and-switch to the session tree selector
- Shift+Enter on a tree entry forks with a branch summary directly, skipping
  the summary prompt and ignoring the branchSummary.enabled gate.
- Plain Enter keeps existing behavior: direct switch, with the summary prompt
  only for users who enabled branchSummary.enabled.
- Updated the selector help line and added controller-level regression tests.

Fixes #5152
2026-07-18 21:27:12 +02:00
can1357 157e940d5e Merge PR #5786: fix(auth): scoped post-login model refresh and stripped cache credentials (@roboomp)
# Conflicts:
#	packages/catalog/src/model-cache.ts
2026-07-18 20:14:11 +02:00
can1357 e38389a01e fix: match terminal.showImages schema path in settings side-effect switch
SettingsSelector dispatches schema settings by full path (terminal.showImages),
so the showImages case never fired from the /settings flow. Add the full-path
case label and cover both ids in the side-effect test.
2026-07-18 20:12:48 +02:00
Derek Zeng 9a452077b2 fix(coding-agent): clear inline images when disabled 2026-07-18 18:12:08 +08:00
Mathews-Tom 737dcb26d7 fix(coding-agent): reach ask re-answer flow from the active leaf in /tree
The interactive /tree selector's own no-op guard ("Selecting the current
leaf is a no-op") fired before ever reaching navigateTree()'s
allowAskReopen path added in 743c8ab7d, so that fix was unreachable from
the actual UI whenever the selected ask toolResult was already the
current leaf (interrupted right after answering, or navigated there by
another caller).

Let a current-leaf selection fall through to the reopen path when the
entry is an ask toolResult, mirroring the same targetIsAskResult check
navigateTree() uses.

Fixed in response to Codex review threads posted as PR review bodies
(not inline comments) on #5895 at 20:24:48Z and 21:54:30Z, which
predate 743c8ab7d and were never addressed.
2026-07-18 05:13:33 +05:30
Mathews-Tom 7bdbfad9f5 fix(tui): address ask re-answer review feedback on #5895
- Gate navigateTree()'s ask toolResult reopenAsk protocol behind a new
  allowAskReopen option, set only by the interactive /tree selector.
  Every other navigateTree() caller (extensions, hooks, ACP,
  session-extension actions) now falls through to the pre-#5642 plain
  leaf move instead of reporting a successful no-op navigation.
- Anchor the branch-summary entry collection on targetEntry.parentId
  for an ask re-answer completion so the replaced (abandoned) answer
  is included in the summary instead of silently dropped.
- #recoverAskReanswerQuestions now walks the ancestor chain past
  interleaved sibling toolResults to find the assistant entry that
  actually emitted the ask toolCall, instead of assuming it's the
  toolResult's direct parent.
- Replace the fabricated `as unknown as AgentToolContext` standalone
  tool context in SelectorController#reanswerAsk with
  AgentSession#buildAskReanswerContext(), a fully-typed context
  backed by real session state.
- #reanswerAsk now rejects a chatRedirect ("Chat about this") result
  instead of silently completing the navigation with it.
- Fix the CHANGELOG entry's external-contribution attribution format.
2026-07-18 00:07:18 +05:30
Mathews-Tom fcbcf73769 feat(tui): allow re-answering a past ask from the session tree
Selecting an ask toolResult in /tree previously just repositioned the
leaf onto the stale answer without re-running the interactive picker
(issue #5642). navigateTree() now detects an ask toolResult target and
returns { reopenAsk: { toolCallId, questions } } recovered from the
original toolCall's persisted arguments, instead of mutating anything.
The TUI's tree selector re-opens the ask picker via a standalone
AskTool.execute() call (reusing the live tool-execution UI context),
then calls navigateTree() again with { reanswerAskResult } to branch a
*new* sibling toolResult off the same ask toolCall -- the original
answer's branch stays fully reachable. Non-ask toolResults, and ask
toolResults whose original arguments can't be recovered (legacy/
corrupted sessions), keep the existing plain leaf-move behavior.

This implements direction 2 from the issue's maintainer triage
(re-answer as a new sibling branch), not direction 1 (resuming the
agent turn) or direction 3 (docs-only).
2026-07-17 23:29:35 +05:30
can1357 eac51b6a04 Merge: darkphilosophy/feat/advisor-per-agent-toggle
Brings the per-advisor toggle, status-line glyphs, quota display, and the
failing-advisor stall/abort fix (f4c8143) onto main's rewritten advisor
runtime. Conflict reconciliation kept main's architecture (fingerprint
prefix reconciliation, host-level onTurnError recovery + fallback chains,
terminal-failure classification) and ported the branch semantics onto it:

- #failing latch: waitForCatchup resolves immediately while an advisor is
  mid-failure; parked waiters wake the moment a turn fails, before any
  async hook or retry sleep.
- Turn-end render containment: a formatter bug restores the cursor/prefix/
  dedup snapshot and never propagates into the primary's turn-end callback
  (per-advisor try/catch boundary in AgentSession).
- Quota pause: when host recovery declines a usage-limit failure, the
  runtime latches quotaExhausted, requeues the batch, and notifies —
  cleared only by an explicit reset.
- Hard halt after a permanent rejection or three backlog-drop cycles.
- #recoverAdvisorTurn also marks usage limits for structural errors thrown
  before any assistant turn is recorded.
2026-07-17 07:37:29 +02:00
can1357 2a6d551063 revert(status-line): restored single-row status bar with priority drop
- Reverted PR #5751 (issue #5749): continuation rows wrapped the editor
  top border onto extra lines, which is unacceptable for the input frame.
- EditorTopBorder is back to a single content/width pair; narrow widths
  drop right segments, shrink the path, then drop left segments.
2026-07-17 05:49:13 +02:00
can1357 adb2a3c7e2 style: formatted files from owner-approved merges 2026-07-17 05:33:19 +02:00
can1357 8bdb69254b merge PR #5596 via eval/pr-5596: feat(coding-agent): support per-project model roles
Combined #5586's role-tag precedence with #5596's scope labels in the
selector status messages.
2026-07-17 05:23:49 +02:00
roboomp c654abc980 fix(auth): scoped post-login model refresh and stripped cache credentials
Native /login and /logout (plus setup-wizard sign-in and RPC login)
refreshed model discovery with the default all-provider
online-if-uncached strategy, which reused a fresh authoritative cache row
and never re-ran fetchDynamicModels with the just-persisted credential,
so newly authenticated models stayed unavailable in-session and stale
endpoint data survived a relogin. Each auth-completion path now awaits a
provider-scoped refreshProvider(providerId, "online").

Also fixed writeModelCache serializing credential-bearing request headers
(Authorization, X-Api-Key, api-key, cookie, proxy-authorization) into the
plaintext models.db; they are now stripped before persistence and
re-derived on load from AuthStorage / provider config.

Fixes #5780
2026-07-17 03:03:25 +00:00
DarkPhilosophy 1b4c292f8f Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle 2026-07-17 05:47:09 +03:00
can1357 f077d2c7b6 merge PR #5751 via eval/pr-5751: fix(status-line): wrapped overflow segments 2026-07-17 04:40:05 +02:00
can1357 daea3ab341 merge PR #5586 via eval/pr-5586: fix(tui): used role tag in model selector status messages 2026-07-17 04:37:08 +02:00
Gerben Meijer 1e083eb832 feat(coding-agent): support per-project model roles 2026-07-17 01:22:23 +04:00
roboomp 8ca790cb6f fix(status-line): wrapped overflow segments
Preserved configured segment priority by packing overflow into continuation rows.

Extended EditorTopBorder to render ordered rows inside the editor frame.

Fixes #5749
2026-07-16 20:19:54 +00:00
can1357 ebaed59dda fix(tui): preserve deferred alternate exit 2026-07-16 03:32:00 +02:00
can1357 2a05d36be5 merged PR #5476: fix(tui): prevent stale-buffer flicker 2026-07-16 03:32:00 +02:00
can1357 46f811bf86 merged PR #5484: fix(auth): mount login dialog input for paste-code fallback URL 2026-07-16 03:31:59 +02:00
can1357 3601692c8d merged PR #5515: fix(skills): reload runtime skill state 2026-07-16 03:31:59 +02:00
DarkPhilosophy 081ce322ef Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle 2026-07-16 02:30:12 +03:00
roboomp 344762eecc fix(tui): used role tag in model selector status messages
Model selector status messages (assign, clear, fallback-chain) interpolated
`roleInfo?.name ?? role`, showing the display name ("Fast"/"Thinking") instead
of the tag ("SMOL"/"SLOW"). Aligned them with the rest of the TUI
(model-browser.ts, model-hub.ts) which use `info.tag ?? info.name ?? role`.

Fixes #5585
2026-07-15 14:29:02 +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
DarkPhilosophy 0a9a5aa186 Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle
# Conflicts:
#	packages/coding-agent/src/advisor/runtime.ts
2026-07-15 03:32:11 +03:00
can1357 86e0fdf9c3 Merge PR #5492: fix(tui): hand editor tap state to agent hub on double-left open (@roboomp) 2026-07-14 23:11:10 +02:00
can1357 9837e1f88c Merge PR #5491: fix(models): preserve auto role thinking across restart (@roboomp) 2026-07-14 23:11:09 +02:00
roboomp 19674b8dfa fix(skills): reloaded runtime skill state
- Rediscovered enabled skills across TUI, ACP, and RPC plugin reloads.
- Rebuilt skill commands, system prompts, tool snapshots, and skill URL resolution.
- Hot-refreshed managed skills after manage_skill create, update, or delete.

Fixes #4996
2026-07-14 20:01:45 +00:00
roboomp 52f9e41304 fix(tui): hand editor tap state to agent hub on double-left open
The empty-editor left-left gesture opens the Agent Hub whenever persisted
or parked subagents exist (intended since f3e372e7b), but the hub's own
close detector starts fresh at 0 with no handoff from the editor's
double-tap detector. The two taps that opened the hub were consumed by the
editor, so a single subsequent left did nothing and the user had to press
left-left again to escape while input and hotkeys stayed disabled.

Thread an armCloseTap option from the gesture through showAgentHub to the
new AgentHubOverlayComponent.armCloseTap(), which seeds the table's
#lastLeftTap so one more left (within the tap window) dismisses the hub.

Fixes #4780
2026-07-14 19:07:04 +00:00
roboomp 06095c1031 fix(models): cleared stale thinking on auto role assignment
- Persisted an explicit inherit override when auto replaces a role's concrete reasoning level.
- Covered the Model Hub DEFAULT assignment flow with a regression test.

Fixes #5326
2026-07-14 19:04:12 +00:00
roboomp 4882c9b011 fix(auth): mount login dialog input for paste-code fallback URL
Paste-code OAuth providers (Codex, Anthropic, Gemini CLI, GitLab Duo,
Antigravity, Devin) need the user to paste the fallback redirect URL
when the loopback callback cannot complete (headless/remote/Windows).
The login dialog took focus and cleared the editor but only rendered the
auth URL plus a tip pointing at `/login <redirect URL>` — a command only
reachable through the now-hidden, unfocused editor. The dialog never
mounted an Input, so a pasted URL was silently dropped and login stalled.

Route onManualCodeInput through the focused dialog's showManualInput so
the paste lands in a visible, submittable field. Make showManualInput
idempotent so the OAuth callback retry loop reuses the mounted input
instead of stacking duplicate prompts.

Fixes #5339
2026-07-14 18:44:01 +00: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
can1357 a572448306 Merge PR #5297: fix(coding-agent): respect role thinking for temporary model picks (@roboomp)
# Conflicts:
#	packages/coding-agent/src/modes/controllers/selector-controller.ts
2026-07-14 18:47:28 +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
DarkPhilosophy fb971d2493 Merge remote-tracking branch 'can1357/main' into feat/advisor-per-agent-toggle 2026-07-14 03:45:44 +03:00
can1357 da24614d5a feat: added scrollback rebuild controls and prewalk status-line visibility
- Added `tui.scrollbackRebuild` configuration with interactive startup/controller wiring to apply `setScrollbackRebuild`.
- Exposed prewalk session state in `SegmentContext` and rendered a dedicated prewalk segment/icon in the status line.
- Added divergence-aware TUI full-paint logic that enables scrollback erase-and-replay rebuilds for non-multiplexer divergence cases.
- Updated rendering and streaming tests to verify rebuild behavior (`3J`) and eliminate stale marker expectations under drift scenarios.
2026-07-14 00:39:34 +02:00