Commit graph

15237 commits

Author SHA1 Message Date
brooklyn!
dc3f61cb01
Merge pull request #57439 from NousResearch/bb/settings-autosave-audit
fix(desktop): autosave Mixture-of-Agents preset edits
2026-07-12 05:05:18 -05:00
Teknium
2b5d4ae916
fix(model): merge configured models into picker rows (#63055)
Preserve the root cause and precedence direction from #43538 while applying the merge before truncation and covering all declared model shapes.

Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>
2026-07-12 03:05:12 -07:00
teknium1
8c77206859 refactor(model): gate picker rows by runtime capability 2026-07-12 03:04:07 -07:00
teknium1
6503f36ab9 test(model): simplify routable picker invariants 2026-07-12 03:04:07 -07:00
Ahmett101
938c2622f6 fix(model_switch): filter /model picker for unregistered providers (#57503)
list_authenticated_providers() emits picker rows for every slug in
PROVIDER_TO_MODELS_DEV that has any credential env-var set. Several of
those slugs (notably 'mistral') have no PROVIDER_REGISTRY entry, so
resolve_provider() rejects them as 'Unknown provider' once the user
selects a model — leaving the picker showing rows that cannot actually
be selected.

Add a resolve-gate in section 1: if PROVIDER_REGISTRY.get(hermes_id)
is None, skip the slug. The picker now only lists providers that can
actually be switched to at runtime.

This automatically resolves the duplicate-Mistral dedup symptom too:
once the broken-from-models.dev row is filtered, the conflict between
PROVIDER_TO_MODELS_DEV['mistral'] and a custom_providers 'Mistral' row
is moot.

Composes with #50289 (which promotes mistral to first-class via the
provider-plugin path): when that lands, PROVIDER_REGISTRY gains a
'mistral' entry and the gate becomes a no-op for it. No conflict.

Tests (regression suite):
- tests/hermes_cli/test_model_switch_filter_unresolved.py (new, 4 tests):
  Picker excludes 'mistral' when MISTRAL_API_KEY is set; 'deepseek' and
  'xai' (PROVIDER_REGISTRY-backed) still appear; 'mistral' stays
  excluded when no key is set. Confirmed by reverting the fix and
  seeing the test fail with 'mistral leaked into /model picker'.

Cross-checked against the existing 51 test_model_switch_* and
test_custom_provider_* cases — 55/55 PASS, no regressions.
2026-07-12 03:04:07 -07:00
Brooklyn Nicholson
29c9dd99a4 fix(desktop): autosave Mixture-of-Agents preset edits
MoA was internally inconsistent: preset-level ops (set default / add /
delete) persisted on click, but reference-model and aggregator slot edits
sat behind a manual Save button. Debounce-persist slot/aggregator edits
like the rest of settings and drop the redundant button, so MoA is
uniformly autosave.
2026-07-12 06:03:25 -04:00
Teknium
4a4a0c2fc7
fix(auth): enforce credential pool provider boundaries (#63048)
Retain the provider-boundary core of #52799 while reusing the pool reload and handoff paths already landed in #53591 and #62417.

Co-authored-by: Flownium <157689911+itsflownium@users.noreply.github.com>
2026-07-12 03:00:53 -07:00
teknium1
51382ac244 fix(skills): bind bundles to exact files and origins 2026-07-12 02:59:27 -07:00
teknium1
c36f6b7259 fix(skills): install referenced bundle files with scan provenance 2026-07-12 02:59:27 -07:00
teknium1
1e75744b79 refactor(model): centralize picker credential availability 2026-07-12 02:59:14 -07:00
AIalliAI
3a67a7be55 fix(model-switch): don't treat an exhausted credential pool as authenticated
An aggregator whose pooled credentials are all exhausted/dead still counted as
an authenticated provider during no-provider /model resolution. It then won the
model-name match, was set as the sticky session provider, and poisoned every
later switch with "empty API key" errors while still routing through the dead
aggregator.

list_authenticated_providers now requires a pool to have at least one available
entry (has_available, not has_credentials / bare key presence) at all three
credential-pool gates. Simple token-style entries that don't parse into
exhaustion-tracked entries keep the prior behaviour, so providers whose creds
live only in the auth-store credential_pool still appear.

Fixes #45759
2026-07-12 02:59:14 -07:00
brooklyn!
fc232f8ce6
Merge pull request #63102 from NousResearch/bb/clarify-answer-visible
fix(desktop): keep answered clarify Q&A visible in the transcript
2026-07-12 04:39:46 -05:00
Brooklyn Nicholson
3e9aec9f94 test(desktop): satisfy ToolCallMessagePartProps in clarify tests
CI typecheck requires argsText, status, addResult, and resume on rendered
tool parts.
2026-07-12 05:36:23 -04:00
brooklyn!
40e9b893f7
Merge pull request #63103 from NousResearch/bb/desktop-docs-alignment
docs(desktop): judgment-first AGENTS guide + DESIGN/README alignment
2026-07-12 04:34:21 -05:00
Brooklyn Nicholson
8bea079e2e docs(desktop): add judgment-first AGENTS guide and align DESIGN/README
Capture durable Desktop engineering principles from recent sessions —
state by authority, workspace-switch shapes, resolver ladders, optimistic
UI — and point root AGENTS.md at the scoped guide with current filenames.
2026-07-12 05:31:54 -04:00
Brooklyn Nicholson
192ce05d05 test(desktop): cover settled clarify answer rendering 2026-07-12 05:29:08 -04:00
Brooklyn Nicholson
9e7fe2dd01 fix(desktop): keep answered clarify Q&A visible in the transcript
Answered clarifies were collapsing into a generic tool row, hiding the
choice. Settle into a Q&A panel instead, and route freeform input through
the shared Textarea chrome.
2026-07-12 05:29:08 -04:00
brooklyn!
b4829643d6
Merge pull request #63091 from NousResearch/bb/salvage-48591-workspace-binding
feat(sessions): CLI workspace filter + restore-cwd-on-resume (supersedes #48591)
2026-07-12 04:14:28 -05:00
Brooklyn Nicholson
33ab65a14f chore(attribution): map palmer@dugoutfantasy.com -> professorpalmer (#48591 salvage) 2026-07-12 05:08:13 -04:00
Brooklyn Nicholson
b5f0e451c1 feat(cli): restore cwd on resume (--no-restore-cwd)
Resuming a session cd's back into its recorded working directory, so it resumes
in the repo it belonged to. `--no-restore-cwd` opts out; skipped under
--worktree (that path owns its dir); best-effort — a missing dir warns and stays
put rather than failing the resume.

Co-authored-by: Cary Palmer <palmer@dugoutfantasy.com>
2026-07-12 05:08:13 -04:00
Brooklyn Nicholson
0c4aed2499 feat(cli): sessions list --workspace filter + Workspace column
`hermes sessions list --workspace <needle>` filters to one workspace (git repo
root or project dir, matched by path substring or basename) and adds a
Workspace column. The column only appears once at least one listed session
carries a workspace, so all-unbound listings render exactly as before.

Co-authored-by: Cary Palmer <palmer@dugoutfantasy.com>
2026-07-12 05:08:03 -04:00
Brooklyn Nicholson
602fe1c15d feat(sessions): workspace_key grouping helper + tests
A session's coarse workspace identity: its git repo root when known, else its
cwd (branch excluded, so switching branches doesn't fragment history). Pure
helper over fields sessions already record — no new columns, no git shelling.

Co-authored-by: Cary Palmer <palmer@dugoutfantasy.com>
2026-07-12 05:07:52 -04:00
brooklyn!
7c14d2a046
Merge pull request #63086 from NousResearch/bb/salvage-59241-workspace-status
feat(desktop): add workspace path status action (supersedes #59241)
2026-07-12 04:01:39 -05:00
Brooklyn Nicholson
e0a650fa7d refactor(desktop): text-only workspace status menu + attribution
Align the workspace status-bar dropdown with the rest of the status bar: drop
the per-item icons (they mixed lucide size-4 with a Codicon 1rem glyph and were
the only status-bar menu carrying item icons), leaving text-only items on the
shared DropdownMenuItem primitive with default typography. The status-bar
trigger keeps its FolderOpen glyph, consistent with sibling items.

Also map true@supersynergy.de → Supersynergy in AUTHOR_MAP.
2026-07-12 04:56:24 -04:00
Maxim M
5fc08c0e0d feat(desktop): add workspace path status action 2026-07-12 04:55:29 -04:00
brooklyn!
8895335453
Merge pull request #63077 from NousResearch/bb/salvage-61950-nongit-groups
fix(desktop): preserve legacy non-git workspace groups (supersedes #61950)
2026-07-12 03:51:48 -05:00
brooklyn!
59686df8fe
Merge pull request #63081 from NousResearch/bb/salvage-45744-workspace-target
fix(desktop): preserve sidebar workspace targets across new drafts (supersedes #45744)
2026-07-12 03:47:05 -05:00
Brooklyn Nicholson
f63535a347 chore(attribution): map esthon@gmail.com → esthonjr (#61950 salvage) 2026-07-12 04:45:56 -04:00
harjoth
a5c0715835 fix(desktop): preserve sidebar workspace targets across new drafts
Squashed salvage of #45744 (@harjothkhara), rebased onto current main and
resolved against #58241 (which swapped the new-session cwd fallback to the
project-aware resolveNewSessionCwd).

An explicitly clicked sidebar workspace stays authoritative until session.create:
a one-shot $newChatWorkspaceTarget (null → detached, string → that folder) plus a
generation counter so a stale async `config.get project` normalization can't
overwrite a newer draft target. The start-workspace-session action is extracted
out of desktop-controller.tsx into a testable workspace-session-target module.

Integrated with #58241: the no-explicit-target branch now falls through to the
project-aware resolveNewSessionCwd() instead of the old workspaceCwdForNewSession.

Co-authored-by: harjoth <harjoth.khara@gmail.com>
2026-07-12 04:43:43 -04:00
Brooklyn Nicholson
ceb179163d fix(desktop): mirror Windows path identity in live overlay + WSL spelling
Addresses @teknium1's review of #61950:

- The desktop live overlay (workspace-groups.ts) matched cwd membership
  case-sensitively, so a fresh mixed-case/separator Windows session missed
  its explicit/auto project until the next backend tree refresh. Mirror the
  backend identity (isWindowsPath/comparisonSegments/pathKey) in isPathUnder,
  liveSessionProjectId, and overlayRepoLanes lane matching. Comparison-only —
  emitted ids/labels keep their spelling. POSIX stays case-sensitive.
- Backend _is_windows_path missed root-relative `\wsl.localhost\...` (single
  leading backslash), leaving that historical spelling case-sensitive. Classify
  any backslash-rooted path as Windows.

Tests: WSL-spelling collapse + explicit-project precedence (project_tree),
Windows/WSL live-overlay membership + POSIX case-sensitivity (workspace-groups).
2026-07-12 04:33:05 -04:00
Esthon Jr
fff1769bd1 fix(desktop): preserve legacy non-git workspace groups 2026-07-12 04:30:37 -04:00
brooklyn!
095b9eed38
Merge pull request #58241 from tianma-if/codex/fix-desktop-project-session-cwd
fix(desktop): preserve project cwd for new sessions
2026-07-12 03:29:07 -05:00
brooklyn!
bdfc7c0b1e
Merge pull request #63030 from NousResearch/bb/desktop-boot-recovery-remote
fix(desktop): recover a failed gateway from the boot-failure screen
2026-07-12 03:10:56 -05:00
Brooklyn Nicholson
65712bf788 fix(desktop): clear the OAuth partition before remote sign-in
Sign out of the dedicated OAuth partition before opening the login window so a
stale gateway/identity-provider cookie can't silently bounce an expired session
straight back into failure. Relabel the action "Sign out & sign in" and spell
out the sign-out step in the hint.

Co-authored-by: Tony Antunez <57689194+smtony@users.noreply.github.com>
2026-07-12 04:08:29 -04:00
Brooklyn Nicholson
f3af066b85 fix(desktop): treat connected-but-expired remote sessions as reauth
Add isRemoteReauthError so an auth-shaped boot error counts as a remote-reauth
failure even when the session indicator still reads connected (a stale refresh
cookie / failed ws-ticket mint). Wire the boot error into the overlay's reauth
check so those sessions route to Sign in instead of the local-only recovery
buttons.

Co-authored-by: Tony Antunez <57689194+smtony@users.noreply.github.com>
2026-07-12 04:08:14 -04:00
Brooklyn Nicholson
c1c74d7518 fix(desktop): recover a failed gateway from the boot-failure screen
A remote/VPS backend that failed to boot trapped the user on the recovery
screen — Retry/Repair/Use-local only target the local backend, so the only fix
was hand-editing connection.json. Add an in-place "Gateway settings" view (the
real GatewaySettings panel embedded via `embedded`, lazy-loaded) reached from
the recovery card, and shape the recovery actions by failure kind: Sign in for a
lapsed remote session, Gateway settings for any other remote failure (Retry
drops to secondary; Repair is dropped — it can't revive a remote), Retry for a
local backend. Use-local is scoped to remote failures.
2026-07-12 04:07:41 -04:00
Brooklyn Nicholson
f8152d2323 feat(desktop): embeddable Gateway settings panel
Add an `embedded` flag to GatewaySettings (and a `bare` variant to
SettingsContent) that drops the page title/intro, Diagnostics row,
"Save for next restart", and the page gutters — so the same panel can be reused
inside a tighter surface without a second connection form to maintain. No change
to the standalone Settings → Gateway page (defaults off).
2026-07-12 04:05:52 -04:00
Brooklyn Nicholson
e1fa54d367 refactor(desktop): extract isRemoteConfig from the reauth predicate
Factor the "remote/cloud with a URL" check out of isRemoteReauthFailure into a
shared isRemoteConfig helper so the boot-failure overlay can tell any remote
failure apart from a local one.
2026-07-12 04:05:44 -04:00
brooklyn!
79c0806456
Merge pull request #63040 from NousResearch/bb/desktop-drop-dev-soft-switch
chore(desktop): drop the dev-only "soft switch" preview from gateway settings
2026-07-12 02:36:25 -05:00
Brooklyn Nicholson
302a0dade8 chore(desktop): drop the dev-only "soft switch" preview from gateway settings
Remove the DEV-gated "Dev · soft switch" ListRow and its previewGatewaySwitch
helper. It was a temporary review affordance for exercising the soft-switch
reconnect; dead-stripped from production, but it doesn't belong in the tree.
wipeSessionListsForGatewaySwitch (the real path) and $gatewaySwitching stay.
2026-07-12 03:34:57 -04:00
Teknium
7550c594ce
feat(reasoning): add max and ultra effort levels (#62650) 2026-07-12 00:26:49 -07:00
Teknium
62a76bd3d5
feat: make smart approvals the default (#62661) 2026-07-12 00:25:55 -07:00
brooklyn!
2043436af1
Merge pull request #63029 from NousResearch/bb/salvage-62022-tooltip
fix(desktop): stop empty mispositioned tooltip on terminal rail hover
2026-07-12 01:59:25 -05:00
Brooklyn Nicholson
be2b73e253 fix(desktop): stop empty mispositioned tooltip on terminal rail hover
A block-level label child (e.g. `flex`) collapses TooltipContent's inline
`box-decoration-clone` wrapper, so Radix measures a zero-size chip and parks
an empty black rectangle in the panel corner instead of by the trigger
(#62022). The terminal rail's hotkey labels and the preview row's two-line
label both hit this.

Harden the shared wrapper (`[&>*]:!inline-flex`) so any call site's direct
child renders inline-flex, add a reusable `TipHintLabel` for the common
text+hotkey label, and keep the preview row's label explicitly inline-flex.

Salvages #62139 (shared-component hardening + TipHintLabel) and #62073
(inline-flex call-site fixes + rail/preview coverage).

Co-authored-by: alelpoan <alelpoan@proton.me>
Co-authored-by: zapabob <1920071390@campus.ouj.ac.jp>
2026-07-12 02:53:03 -04:00
brooklyn!
0dd6ced0cd
Merge pull request #63023 from NousResearch/bb/salvage-61584-terminal
fix(desktop-terminal): fix idle prompt accumulation, double prompt, and cwd on relaunch
2026-07-12 01:51:37 -05:00
Brooklyn Nicholson
1a3b220651 fix(desktop-terminal): reopen terminal tabs in the last-used directory
A reopened tab restarted the shell in its original launch dir, so the fresh
prompt showed the wrong folder after a prior `cd` (the issue's "separate
thing" note). Track the shell's working directory and restart the PTY there.

Two independent signals feed a persisted per-tab restoreCwd:
- a main-side PTY cwd probe (shell-agnostic; /proc on Linux, lsof on macOS;
  Windows has no cheap per-process query so it falls back to the launch dir)
- cwd-reporting OSC sequences parsed in the renderer (OSC 7 file URIs, OSC 9;9
  ConEmu/Windows-Terminal paths) for shells configured to emit them

On relaunch the fresh shell boots in restoreCwd, falling back to the launch
cwd (then home) when it no longer exists.
2026-07-12 02:49:26 -04:00
Brooklyn Nicholson
817969f5a2 fix(desktop-terminal): trim trailing idle prompt on no-separator shells
cleanReviveSnapshot only dropped the trailing prompt when a blank separator
sat above it (starship add_newline), so shells that print the prompt with no
preceding blank line — default PowerShell (PS C:\..>), bash user@host:~$ —
kept the idle prompt in the saved buffer and showed a duplicate under the
fresh boot prompt on every relaunch of an *active* session.

An interactive shell always reprints its prompt after a command, so the tail
of an idle buffer is the prompt, never history. Drop the short block after a
blank separator when present, otherwise drop the trailing single-line prompt.
Command output is preserved; the fresh shell reprints the live prompt on boot.
2026-07-12 02:48:48 -04:00
Brooklyn Nicholson
164d9126cc fix(desktop-terminal): stop idle prompt accumulation across relaunches
An idle terminal tab (no command ever typed) grew one extra copy of the
shell's boot prompt on every close/reopen: persistSnapshot re-serialized a
buffer that was just the replayed old prompt plus the fresh shell's new
prompt, and cleanReviveSnapshot's blank-line trim can't strip prompts on
shells like default PowerShell that print no separator line.

Track real user input (keystrokes/paste, drag-and-drop paths, injected
commands) and, when a session had none, skip re-serializing. If the buffer
we loaded carried no real scrollback (empty or only a repeated prompt),
clear it so the next launch shows a single fresh prompt and any existing
accumulation heals; otherwise leave the prior snapshot untouched so real
history from an earlier active session survives an idle reopen.

Salvages #61584 (activity tracking) and #61577 (clearing content-free idle
buffers) into one path: it also heals already-polluted buffers, counts
drag-and-drop and injected input as activity, and never discards genuine
short command history (only empty/all-identical buffers are cleared).

Co-authored-by: alelpoan <alelpoan@proton.me>
Co-authored-by: liuhao1024 <sunsky.lau@gmail.com>
2026-07-12 02:48:48 -04:00
Adolanium
964ecef401
fix(tui): dispatch custom skill bundles as agent turns (#62859) 2026-07-12 02:34:12 -04:00
HexLab
f8054601a8
Merge pull request #62600 from HexLab98/fix/desktop-cron-no-agent-editor
fix(desktop): allow editing script-only (no_agent) cron jobs without a prompt
2026-07-12 02:32:29 -04:00