Commit Graph

23315 Commits

Author SHA1 Message Date
Blasius Patrick
f5aebe42e1 fix(security): resolve model aliases before audit classification (#74532)
* fix(security): resolve model aliases before audit classification

Before classification, model strings are now resolved through the alias
index so that configured aliases (e.g. 'gpt-prev') are translated to
their canonical provider/key form (e.g. 'openai/gpt-5.4') before hygene
and tier checks run.

Fixes #74455.

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>

* fix(security): share audit model alias resolution

---------

Signed-off-by: Blasius Patrick <blasius.patrick@gmail.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 19:26:02 +01:00
Peter Steinberger
68912111cf fix(slack): avoid generic inline button prompt hint 2026-04-29 19:15:49 +01:00
Peter Steinberger
4bc79f9737 test: relax live web search timeouts 2026-04-29 19:14:15 +01:00
Vincent Koc
39ecedb300 test(gateway): complete reload model config fixture 2026-04-29 11:09:38 -07:00
Vincent Koc
b54c642bd6 test(infra): assert dotenv structured warning 2026-04-29 11:04:45 -07:00
Vincent Koc
edf579c406 test(gateway): align reload model visibility fixture 2026-04-29 11:04:45 -07:00
Peter Steinberger
db665a09cd fix(slack): expose fileId in message tool schema 2026-04-29 19:02:30 +01:00
Peter Steinberger
efefba2db1 refactor(plugins): split bundled runtime deps jiti aliases 2026-04-29 18:57:05 +01:00
Vincent Koc
139815d6a9 test(i18n): align locale registry expectations 2026-04-29 10:40:07 -07:00
Shakker
c85ff84334 test: type model picker env auth mock 2026-04-29 18:23:40 +01:00
Shakker
fba8af4d62 test: align model picker auth mock 2026-04-29 18:23:40 +01:00
Shakker
587ce45ec9 fix: preserve google vertex adc auth fallback 2026-04-29 18:23:40 +01:00
Shakker
1df1ee48c0 fix: keep model list synthetic auth refs exact 2026-04-29 18:23:39 +01:00
Shakker
fceaecd123 test: type model list auth snapshot mock 2026-04-29 18:23:39 +01:00
Shakker
69181342e1 fix: preserve manifest-backed model list auth 2026-04-29 18:23:39 +01:00
Shakker
be1037fd34 test: tighten model list auth fixtures 2026-04-29 18:23:39 +01:00
Shakker
87bd12b2d3 fix: include local model list auth markers 2026-04-29 18:23:39 +01:00
Shakker
b418c08a22 refactor: use auth index for model list rows 2026-04-29 18:23:39 +01:00
Shakker
a777b82da0 feat: add model list auth index 2026-04-29 18:23:39 +01:00
Peter Steinberger
a16f7fb6cd test(models): update auth profile mock 2026-04-29 18:05:34 +01:00
Peter Steinberger
8a06db084d fix(models): hide unauthenticated catalog entries 2026-04-29 18:05:34 +01:00
jindongfu
2bb16f771b fix(model-picker): hide models from providers without auth configured
Previously, models from unconfigured providers were shown with an
"auth missing" hint, flooding the picker with 900+ unusable entries.

Now addModelSelectOption early-returns when the provider has no auth,
so only usable models appear in /models and the web chat dropdown.

Fixes #74423
2026-04-29 18:05:34 +01:00
Simone
630629667c fix(markdown): preserve loose list paragraphs (#74474)
* fix(markdown): preserve loose list paragraphs

* fix(markdown): avoid loose nested list triples

* fix(markdown): keep tight list block spacing

* fix(markdown): scope loose list paragraphs

* docs(changelog): credit markdown list spacing fix

---------

Co-authored-by: Lucenx9 <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 17:56:51 +01:00
Sekhar Parida
3215ab6de5 infra: fix heartbeat directive preservation and global enablement (#74471)
* refactor(security): replace console.warn with structured logger in windows-acl

* infra: fix heartbeat directive preservation and global enablement

* logging: migrate dotenv and temp-download to subsystem logger

* logging: migrate command-auth, unhandled-rejections, and index to subsystem logger

* logging: migrate config defaults to subsystem logger

* fix(heartbeat): preserve heartbeat task context

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 17:49:41 +01:00
Peter Steinberger
c7aaa40848 perf(test): trim bundled runtime deps imports 2026-04-29 17:39:27 +01:00
Peter Steinberger
9d03cd15a9 refactor(plugins): split bundled runtime deps helpers 2026-04-29 17:32:14 +01:00
openclaw-clawsweeper[bot]
a512b5dde9 fix: The commit introduces imports from `src/channels/plugins/dm-acces 2026-04-29 17:31:11 +01:00
Vyctor Huggo Przozwski da Silva
df0074768c fix(exec): reject invalid host targets (#74468)
* fix(exec): reject invalid host targets

* docs(changelog): credit exec host validation contributor

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 17:25:45 +01:00
Agustin Rivera
9a0b43c47e feat(nvidia): add NVIDIA provider with onboarding flow (#71204)
* feat(nvidia): add NVIDIA provider with onboarding flow

Add the NVIDIA build.nvidia.com API as a bundled provider. Default model
is nvidia/nvidia/nemotron-3-super-120b-a12b: first segment is the provider
id, remaining "nvidia/nemotron-3-super-120b-a12b" is the literal upstream
model id (which happens to start with "nvidia/" because NVIDIA is also the
model maker).

Supporting core change: introduce a provider capability flag
nativeIdsIncludeProviderPrefix so providers whose native catalog ids
intentionally include their provider prefix (OpenRouter) opt into self-prefix
dedupe in modelKey, without hardcoding provider names in core. Providers
whose ids merely happen to start with their own name (NVIDIA) leave the flag
unset and get the full <provider>/<model-id> concatenation.

- extensions/nvidia/*: new plugin, catalog, onboarding, tests, docs
- extensions/openrouter/index.ts: declare nativeIdsIncludeProviderPrefix
- src/plugins/types.ts: add field to ProviderPlugin
- src/plugins/registry.ts: populate self-prefix set on registration
- src/agents/provider-self-prefix.ts: sync accessor used by modelKey
- src/agents/model-ref-shared.ts: modelKey consults the flag
- test updates for affected surfaces

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(model-picker): simplify literal-prefix display to label-only

* fix(model-picker): pass workspaceDir/env to allowlist literal-prefix resolution

* chore: untrack generated baseline JSON artifacts (gitignored)

* fix(nvidia): show literal model ref in picker and onboarding notes

* fix(nvidia): show hint whenever display label differs from stored config

* fix(nvidia): drop redundant hint from Keep current label

* fix(nvidia): restore literal double-prefix display labels

* fix(picker): handle literal-prefix fast path

* fix(picker): show literal keep label

* fix(docs): update nvidia provider docs

* fix(nvidia): update test helper imports

* fix(changelog): add nvidia provider entry

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 09:25:12 -07:00
edge_kase
2dadc82cf4 fix(sandbox): gracefully handle Docker daemon unavailability when sandbox mode is off (#73671)
Merged via squash.

Prepared head SHA: 378851cf40
Co-authored-by: kaseonedge <15183881+kaseonedge@users.noreply.github.com>
Co-authored-by: sallyom <11166065+sallyom@users.noreply.github.com>
Reviewed-by: @sallyom
2026-04-29 12:23:30 -04:00
Peter Steinberger
8cf724a381 fix(plugins): simplify bundled runtime deps staging
* fix(plugins): simplify bundled runtime deps staging

* refactor(plugins): declare bundled root runtime deps

* fix(plugins): isolate pnpm runtime dependency installs

* test(gateway): wait for deferred agent routing calls in server suite

* test(ci): follow extracted update-channel assertions

* fix(plugins): bypass pnpm age gate for bundled runtime deps

* test: drop stale rebase leftovers

* test: preserve mirrored root dependency drift guard

* test: stage mirrored deps in facade fixtures

* fix(plugin-sdk): expose provider setup metadata

* test(plugin-sdk): satisfy spread lint in facade deps fixture

* refactor(plugins): share bundled runtime deps install flow

* fix(plugins): finish runtime deps rebase cleanup

* fix(plugins): remove stale mirror import

* refactor(plugins): centralize bundled runtime root preparation

* fix(plugins): skip Windows pnpm cmd shims

* refactor(plugins): let package managers own runtime deps staging

* fix(plugins): validate staged runtime deps

* fix(plugins): preserve lazy runtime deps fallback
2026-04-29 17:04:56 +01:00
Cathryn Lavery
763a88083e fix(gateway): persist hidden lifecycle session keys (#74442)
* Prevent hidden channel lifecycle runs from staying stuck as running

Hidden channel-routed runs were dropping session keys on lifecycle events at
our shared agent-event bus. Gateway lifecycle persistence then had to rely on
run-context lookup surviving until the terminal event, which is unnecessarily
fragile for the exact sessions that are intentionally hidden from Control UI.

This keeps session keys on hidden lifecycle events only, preserving the existing
privacy boundary for assistant/tool traffic while making terminal session-state
persistence explicit and test-covered.

Constraint: Hidden channel runs must stay out of Control UI chat/tool streams
Rejected: Broaden sessionKey preservation to every hidden event | would expose more hidden traffic than needed
Confidence: medium
Scope-risk: narrow
Reversibility: clean
Directive: If hidden-run event redaction changes again, keep lifecycle persistence independent from ephemeral run-context lookup
Tested: pnpm exec oxfmt --check --threads=1 CHANGELOG.md src/infra/agent-events.ts src/infra/agent-events.test.ts; pnpm tsgo:core; pnpm tsgo:extensions; pnpm tsgo:core:test; pnpm tsgo:extensions:test; pnpm test src/infra/agent-events.test.ts; pnpm test src/gateway/server-chat.agent-events.test.ts; pnpm test src/gateway/session-lifecycle-state.test.ts; pnpm lint:extensions:bundled; codex exec review returned ship it
Not-tested: Live gateway reproduction against Knox's local stuck-session install

* Clarify hidden lifecycle redaction and cover context fallback

The follow-up review asked for two things: document why the separate error
stream stays redacted for hidden runs, and cover the registered-context fallback
branch for hidden lifecycle events when callers omit sessionKey.

Constraint: Hidden assistant/tool/error diagnostics must remain redacted from Control UI
Rejected: Preserve sessionKey on the generic error stream | terminal persistence already flows through lifecycle phase:error, so widening the visible identity surface is unnecessary
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep hidden-run identity exceptions tightly scoped to terminal lifecycle persistence unless a concrete downstream consumer requires more
Tested: pnpm exec oxfmt --write --threads=1 src/infra/agent-events.ts src/infra/agent-events.test.ts; pnpm test src/infra/agent-events.test.ts; pnpm test src/gateway/server-chat.agent-events.test.ts; pnpm test src/gateway/session-lifecycle-state.test.ts
Not-tested: Full repo gate rerun; previous branch-wide gates remain from the parent PR commit

* fix(gateway): keep hidden agent broadcasts redacted

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 17:03:10 +01:00
Peter Steinberger
58db3d2d22 perf(test): trim media runner import cost 2026-04-29 16:59:42 +01:00
Peter Steinberger
e8b82d1cf9 refactor(discord): split component auth helpers 2026-04-29 16:56:17 +01:00
Peter Steinberger
61d53f98d3 fix(cron): clean up timed out agent runs 2026-04-29 16:54:22 +01:00
Devin Robison
c1a42dce86 fix: enforce focus subagent scope (#73613)
* fix: enforce focus subagent scope

* docs: add changelog for focus scope fix
2026-04-29 09:54:09 -06:00
Peter Steinberger
8d63ddce69 fix: harden runtime deps lock owner identity 2026-04-29 16:54:05 +01:00
Jim Smith
2d885a2402 fix(plugins): disambiguate runtime-deps lock owners by process start-time
`shouldRemoveRuntimeDepsLock` previously trusted `isAlive(owner.pid)`
alone when deciding whether a lock could be reclaimed. That works fine
on a normal host: when the writer dies the PID is gone and `isAlive`
returns false. Inside Docker it does not — every Node gateway process
runs as PID 1 (or PID 7 with `init: true`) in its container PID
namespace, so a stale lock left behind by a previous incarnation looks
"alive" to the new one. The 5-minute lock-wait timeout then fires and
the supervisor restarts, and the cycle repeats indefinitely. Operators
have to manually remove `.openclaw-runtime-deps.lock` to recover.

This change records `pidStartTimeMs` alongside `pid` and `createdAtMs`
when the lock is acquired, and consults it in the staleness check.
When both sides have start-time evidence and they disagree, the lock
is treated as stale; otherwise the existing PID-alive-means-fresh
behavior is preserved exactly. The capture point uses
`Date.now() - process.uptime() * 1000` once at module load, and the
read side uses `/proc/<pid>/stat` field 22 on Linux (returning null
elsewhere so legacy semantics still apply on macOS/Windows hosts).

This is strictly additive on the wire format and the predicate:
existing lock files without `pidStartTimeMs` continue to take the same
code path they did before, and platforms that cannot resolve a live
PID's start-time fall back to the same legacy behavior.

Refs #74346.
2026-04-29 16:54:05 +01:00
Peter Steinberger
616f24fd49 refactor(gateway): consolidate lifecycle lazy boundary (#74105)
* refactor(gateway): consolidate lifecycle lazy boundary

* test(gateway): cover quoted lifecycle imports
2026-04-29 16:45:51 +01:00
Peter Steinberger
53e0874864 fix(models): satisfy params merge lint 2026-04-29 16:41:56 +01:00
Peter Steinberger
9fcae8458e fix: accept channel lastConnectedAt health snapshots 2026-04-29 16:35:37 +01:00
Peter Steinberger
e6d72548b7 refactor: add shared channel DM access helpers 2026-04-29 16:35:37 +01:00
Peter Steinberger
8c68e7535f refactor: centralize channel DM access resolution 2026-04-29 16:35:37 +01:00
Peter Steinberger
606c881d27 test: stabilize release live e2e probes 2026-04-29 16:32:05 +01:00
Peter Steinberger
46171d7848 fix(models): merge legacy openrouter params 2026-04-29 16:32:05 +01:00
Peter Steinberger
e49703def6 fix(channels): preserve account status generic 2026-04-29 16:30:03 +01:00
Peter Steinberger
4dd2768c4b fix(channels): improve health metadata and reply diagnostics 2026-04-29 16:27:24 +01:00
Peter Steinberger
8935dd154a refactor(discord): simplify gateway and component wiring 2026-04-29 16:14:55 +01:00
Peter Steinberger
b92d145252 fix(ci): repair discord route and health fixtures 2026-04-29 15:58:56 +01:00
Peter Steinberger
204ef7f1c4 fix(telegram): report webhook registration status 2026-04-29 15:40:44 +01:00