Commit Graph

2523 Commits

Author SHA1 Message Date
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
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
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
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
03e17d19e9 test(plugins): avoid map spread in provider fixture 2026-04-29 14:55:25 +01:00
Peter Steinberger
3a875e7549 test: speed up provider plugin tests 2026-04-29 14:42:16 +01:00
Peter Steinberger
f0adbd48e8 refactor(discord): internalize discord client 2026-04-29 14:22:58 +01:00
Alex Knight
bbf985d50a feat(plugins): add SQLite plugin state store (#74190)
* feat(plugins): add experimental sqlite plugin state store
2026-04-29 23:02:14 +10:00
Ayaan Zaidi
9bf7b6bfca fix(auth): enable selected manifest provider plugins 2026-04-29 17:41:05 +05:30
Peter Steinberger
234cbf5f46 perf(plugins): memoize packaged runtime dist mirrors 2026-04-29 13:10:28 +01:00
Masato Hoshino
016f5ae862 test(plugins): cover dead-PID stale runtime-deps lock removal
Adds focused regression coverage for dead owner PID runtime-deps install locks so stale lock recovery remains PID-first and does not wait on age when the recorded owner process is gone.

Co-authored-by: masatohoshino <g515hoshino@gmail.com>
2026-04-29 12:51:14 +01:00
Max Caldar
4d73cd52dc fix(plugins): mirror core root-package deps used by core dist code (#74213)
Extend MIRRORED_CORE_RUNTIME_DEP_NAMES from ["semver", "tslog"] to
also include @agentclientprotocol/sdk, @lydell/node-pty, croner,
dotenv, jiti, json5, jszip, markdown-it, tar, and web-push.

These are all declared as direct dependencies in the openclaw root
package.json and imported by core source code (src/acp/*, src/cron/*,
src/config/*, src/infra/{archive,backup,dotenv,push-web}.ts,
src/markdown/ir.ts, src/plugin-sdk/root-alias.cjs,
src/plugins/jiti-loader-cache.ts, src/process/supervisor/adapters/pty.ts,
etc), but the existing collectMirroredPackageRuntimeDeps allowlist only
covered semver and tslog.

The dynamic collectRootDistMirroredRuntimeDeps scan does pick up
imports that have an extension package.json owner (for example
memory-core declares chokidar, matrix declares jiti and markdown-it).
For deps with no extension owner, or for setups where the owning
extension is not enabled, those imports never make it into the
runtime-deps mirror and Node fails to resolve them at runtime, e.g.:

    Cannot find package 'chokidar' imported from
    .../plugin-runtime-deps/openclaw-<ver>/dist/qmd-manager-...js

Also add a static drift guard test that walks src/ for value imports of
root-package runtime deps and fails when one is neither in
MIRRORED_CORE_RUNTIME_DEP_NAMES nor declared by any extension's
package.json (with an explicit allowlist for known-transitive or
build/type-only imports such as chalk, ipaddr.js, file-type,
proxy-agent, typescript, qrcode). The guard caught @lydell/node-pty
during this change.

Refs #74199.
2026-04-29 07:19:39 -04:00
Peter Steinberger
6b4873d0c1 ci: split plugin contract shards 2026-04-29 11:44:32 +01:00
Peter Steinberger
93d5cd1015 fix: honor configured xhigh thinking compat (#74273)
* fix: honor configured xhigh thinking compat

* test: update agent command model selection mock
2026-04-29 11:35:03 +01:00
Super Zheng
1c45592e62 perf(plugins): add O(1) fast-path for empty plugin loads 2026-04-29 03:04:21 -07:00
Super Zheng
d33c3f7da6 perf(catalog): cache manifest built-in model suppression resolver (#74236)
* perf(catalog): cache manifest built-in model suppression resolver

* fix(catalog): address PR review comments for manifest suppression resolver

* fix(catalog): preserve cached suppression semantics

---------

Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
2026-04-29 02:52:26 -07:00
Vincent Koc
412434a450 test(plugins): extend external install contract coverage 2026-04-29 02:48:58 -07:00
Vincent Koc
4b99724a9c test(plugins): isolate config alias scan regression 2026-04-29 02:29:03 -07:00
Vincent Koc
a3519e362f fix(plugins): reuse config alias scans 2026-04-29 02:29:02 -07:00
Vincent Koc
1d61862adb fix(gateway): yield after agent accepted ack 2026-04-29 02:29:02 -07:00
Vincent Koc
24adf2c8e6 fix(plugins): reject malformed channel registrations 2026-04-29 02:29:00 -07:00
Ayaan Zaidi
c211b41f17 perf(plugins): cache bundled alias lookup 2026-04-29 14:09:03 +05:30
Peter Steinberger
14e8a2d00b chore: remove unused internal dead code 2026-04-29 09:34:40 +01:00
Peter Steinberger
7877182b6f fix(gateway): defer missed cron agent startup work 2026-04-29 09:15:54 +01:00
Peter Steinberger
afc4f06ca3 fix(memory): isolate qmd boot refresh 2026-04-29 08:14:08 +01:00
brokemac79
20c7a98fb8 fix(plugins): keep provider discovery metadata-only
Fix startup and per-turn provider registry hot paths by keeping primary-model startup discovery on metadata-only provider entries and by keeping capability provider fallback loads scoped to manifest-derived owners, including explicit empty scopes when no bundled owner exists.

Evidence:
- Reproduces the reported code paths from #73729, #73835, and #73793: startup prewarm was able to enter provider/model discovery that loaded plugin runtime, and capability lookups could bypass active registry reuse or broaden fallback registry loads.
- Fix threads providerDiscoveryEntriesOnly through models-config planning into plugin discovery.
- Fix reuses active non-memory/non-speech capability providers even with explicit plugins.entries.
- Fix keeps fallback registry loads scoped with onlyPluginIds, including [] for no-owner media capability checks.
- Local targeted tests passed for gateway startup, models config, provider discovery, capability providers, and web provider runtimes.
- Testbox pnpm check:changed passed.
- Testbox pnpm build passed.
- GitHub CI required checks passed on e5e6fe1d52.

Fixes #73729.
Fixes #73835.
Fixes #73793.
Supersedes #73794.
2026-04-29 07:52:32 +01:00
Vincent Koc
1b25dcf57a docs(types): mark legacy hook surfaces deprecated 2026-04-28 23:31:32 -07:00
Vincent Koc
4eba70b532 docs(types): mark legacy aliases deprecated 2026-04-28 23:10:10 -07:00
Peter Steinberger
213f92a9ef test(ci): fix release validation regressions 2026-04-29 06:54:48 +01:00
Peter Steinberger
cfcb8f4eda test(ci): fix current validation shards 2026-04-29 06:49:05 +01:00
Peter Steinberger
358b4f24cd test: guard broad plugin resolver fixtures 2026-04-29 06:46:02 +01:00
Peter Steinberger
364c67bcb5 refactor(discord): share channel run queue 2026-04-29 06:21:09 +01:00
Vincent Koc
7c7561f5a3 fix(plugins): scope capability provider snapshots 2026-04-28 22:19:34 -07:00
Peter Steinberger
07631fb931 fix(discord): remove channel run timeouts 2026-04-29 06:07:12 +01:00
Peter Steinberger
52a7e2264c fix(plugins): cache runtime deps scans 2026-04-29 05:49:09 +01:00
Vincent Koc
d49ebe7bde fix(plugins): stage runtime deps for selected slots 2026-04-28 21:45:55 -07:00
Vincent Koc
9e34fb9feb fix(plugin-sdk): restore channel compatibility facades 2026-04-28 21:38:11 -07:00
Peter Steinberger
02c4249632 perf: speed contract test imports 2026-04-29 05:37:39 +01:00
Peter Steinberger
203213028e perf: speed plugin contract tests and fix ci 2026-04-29 05:20:08 +01:00
Vincent Koc
0382ac5f7d chore(plugins): track probe compat contracts 2026-04-28 21:12:07 -07:00
Vincent Koc
a2e077e468 chore(lint): fix changed gate drift 2026-04-28 21:10:24 -07:00
Peter Steinberger
e27fe55aa8 refactor: simplify plugin cache boundaries 2026-04-29 04:33:15 +01:00
Vincent Koc
5847c0ed58 test(plugins): expect fresh derived registries 2026-04-28 20:09:18 -07:00
Peter Steinberger
7a5b419843 refactor(plugins): simplify plugin cache boundaries 2026-04-29 03:52:22 +01:00
Vincent Koc
43da089790 fix(update): skip disabled plugins during post-update sync (#73970)
Co-authored-by: openclaw-clownfish[bot] <280122609+openclaw-clownfish[bot]@users.noreply.github.com>
2026-04-28 19:36:11 -07:00
Vincent Koc
fd2625a162 fix(plugins): resolve ClawHub tags in prerelease CI 2026-04-28 17:04:01 -07:00
Peter Steinberger
955b4df093 fix(ci): stabilize full release validation 2026-04-28 23:54:43 +01:00
Peter Steinberger
75df09b9ec perf(plugins): cache runtime mirror file decisions 2026-04-28 23:40:43 +01:00