Commit Graph

3322 Commits

Author SHA1 Message Date
Sarah Fortune
48529f1a96 feat(onboard): offer codex migration after harness install (#81192)
Add a post-install seam so the wizard can prompt the user to import their
existing Codex CLI state (skills, archived config/hooks, advisory cached
plugins) through the existing `openclaw migrate codex` flow once the
harness plugin is in place. Fires on both fresh installs and repair runs;
the user can decline at any time.

Trigger sites, both routing through one helper:

- src/plugins/provider-auth-choice.ts: after
  `ensureCodexRuntimePluginForModelSelection` reports `installed: true`,
  dynamically import `offerPostInstallMigrations` and call it before the
  wizard moves on.
- src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.ts:
  same call shape with `nonInteractive: true`, so the helper emits a hint
  line only and never mutates state.

Helper (src/wizard/setup.post-install-migration.ts) is generic, not
Codex-hardcoded — it resolves migration providers via the manifest
`migrationProviders` contract, filters to providers owned by plugins the
caller flags as installed in this onboarding step, runs `provider.detect`,
and on TTY hands accepted runs to `migrateDefaultCommand`. All detect,
prompt, and migrate failures are swallowed so onboarding never aborts on
this optional offer.

Also harden the Codex app-server subprocess lifecycle now that `detect()`
runs from a hotter onboarding path: isolate the plugin-install
`plugin/read` call (extensions/codex/src/migration/apply.ts) and have the
isolated request wait for child exit with a SIGKILL fallback
(extensions/codex/src/app-server/request.ts) so parents are not held open
by an orphaned codex binary.

Tests:

- src/wizard/setup.post-install-migration.test.ts (new, 10 cases)
- src/commands/onboard-non-interactive/local/auth-choice.plugin-providers.test.ts
  extended with hint-call assertions and a not-required-no-offer case.
2026-05-12 16:51:27 -07:00
Peter Steinberger
3eaefda824 test: dedupe runtime llm mock reads 2026-05-12 22:57:53 +01:00
Peter Steinberger
d42b3c2b4a test: dedupe web fetch provider mock reads 2026-05-12 22:56:41 +01:00
Peter Steinberger
c9d7ba8690 test: dedupe wired hook error mock reads 2026-05-12 22:55:08 +01:00
Peter Steinberger
65c5c3faf8 test: dedupe git install mock reads 2026-05-12 22:50:20 +01:00
Peter Steinberger
cf1987bbe9 test: dedupe plugin install mock reads 2026-05-12 22:48:58 +01:00
Peter Steinberger
6bd565d9f2 test: dedupe provider runtime mock reads 2026-05-12 22:46:49 +01:00
Shakker
c80152eadd test: canonicalise plugin discovery paths 2026-05-12 21:52:03 +01:00
Shakker
9456cc850a test: signal plugin warning text 2026-05-12 21:48:49 +01:00
Shakker
b7afe26a54 test: surface plugin registry diagnostics 2026-05-12 21:18:39 +01:00
Kevin Lin
9ff5250792 fix(codex): gate migration on app readiness (#80815)
* fix(codex): gate migration on app readiness

* fix(codex): preserve source auth during migration

* fix(codex): isolate migration source app probes

* docs(codex): align migration readiness reasons

* docs(codex): remove stale auth-required source reason

* fix(codex): narrow native auth profile resolver input

* fix: clarify codex migration subscription gating

* refactor: simplify codex migration subscription gate

* fix: make codex app verification optional

* docs: clarify codex app inventory cache

* test: avoid map spread in migration test
2026-05-12 13:01:22 -07:00
Peter Steinberger
d548adb610 test: tighten channel catalog mock assertions 2026-05-12 19:08:47 +01:00
Peter Steinberger
c2bbb73e18 test: dedupe setup registry mock reads 2026-05-12 18:53:38 +01:00
Pavan Kumar Gondhi
a5dce367ce fix: scan plugin runtime entries during install [AI] (#80998)
* fix: scan plugin runtime entries during install

* addressing review-skill

* addressing claude review

* docs: add changelog entry for PR merge
2026-05-12 20:28:40 +05:30
Super Zheng
4223dd2886 fix: enable native require fast path on Windows for plugin-sdk root alias (#80878)
Merged via squash.

Prepared head SHA: 87446445b6
Co-authored-by: medns <1575008+medns@users.noreply.github.com>
Co-authored-by: odysseus0 <8635094+odysseus0@users.noreply.github.com>
Reviewed-by: @odysseus0
2026-05-12 04:43:55 -07:00
Peter Steinberger
04a868b98d fix: skip metadata for build-excluded bundled plugins
Fix bundled plugin metadata copying to follow the build-entry set, so build-excluded plugins like QQ Bot do not leave stale dist metadata advertising missing runtime files.

Verification:
- pnpm test src/plugins/copy-bundled-plugin-metadata.test.ts test/scripts/bundled-plugin-build-entries.test.ts
- git diff --check
- pnpm openclaw gateway status --deep
- CI run 25718250461
- CodeQL run 25718250402
- CodeQL Critical Quality run 25718250418
- Real behavior proof run 25718290985
2026-05-12 07:51:11 +01:00
Alex Naidis
a290cd633f fix(doctor): repair managed plugin peer links
Repair managed npm plugin OpenClaw peer links across doctor, install, and update flows.

- relink `peerDependencies.openclaw` packages under managed npm roots during doctor repair
- make read-only doctor preview broken peer links with a `doctor --fix` hint
- reject target plugin installs when their own peer link cannot be repaired, without blocking unrelated installs for stale sibling packages
- preserve update warning behavior for unrepairable package-local `node_modules`

Verification:
- `pnpm test src/plugins/plugin-peer-link.test.ts src/plugins/install.test.ts src/plugins/install.npm-spec.test.ts src/plugins/update.test.ts src/commands/doctor-plugin-registry.test.ts src/commands/doctor/repair-sequencing.test.ts -- --reporter=verbose`
- `pnpm exec oxfmt --check --threads=1 ...`
- `git diff --check`
- Crabbox/Testbox `tbx_01krde1jx199rnpm2rv1rdcj76`: focused tests + `pnpm check:changed`, exit 0
- Real CLI proof in PR body: read-only `openclaw doctor` warning plus `openclaw doctor --fix` symlink repair

Thanks @TheCrazyLex.
2026-05-12 07:49:08 +01:00
Peter Steinberger
7411396dbc test: guard tts contract mock calls 2026-05-12 07:14:25 +01:00
Peter Steinberger
f71aa4504a test: guard scheduled turn mock calls 2026-05-12 07:11:58 +01:00
Peter Steinberger
525e0267b1 test: guard session attachment mock calls 2026-05-12 07:09:31 +01:00
Kaspre
5375281974 fix(plugins): load untracked TS source plugins 2026-05-12 07:08:38 +01:00
Peter Steinberger
f285e53d5b test: guard runtime index mock calls 2026-05-12 07:06:58 +01:00
Peter Steinberger
6bdfb39937 test: guard runtime llm mock calls 2026-05-12 07:05:44 +01:00
Peter Steinberger
cccbfbf85c test: guard metadata registry mock calls 2026-05-12 07:04:36 +01:00
Peter Steinberger
e00f7dc0bf test: guard marketplace mock calls 2026-05-12 07:03:32 +01:00
Peter Steinberger
5b1d1eac12 test: guard wired hook mock calls 2026-05-12 07:02:19 +01:00
Peter Steinberger
469da5b111 test: guard install path mock calls 2026-05-12 07:01:15 +01:00
Peter Steinberger
18ead60fc1 test: guard web fetch provider mock calls 2026-05-12 07:00:06 +01:00
Peter Steinberger
433634066c test: guard plugin install mock calls 2026-05-12 06:57:58 +01:00
Peter Steinberger
0c2068fddb test: guard provider runtime mock calls 2026-05-12 06:56:44 +01:00
Peter Steinberger
0eb50f9f8d test: guard module loader cache mock calls 2026-05-12 06:52:40 +01:00
Peter Steinberger
7b71987627 test: guard git install mock calls 2026-05-12 06:51:09 +01:00
Peter Steinberger
0543448df8 test: guard channel catalog mock calls 2026-05-12 06:49:41 +01:00
Peter Steinberger
0eceaefda9 test: guard setup registry mock calls 2026-05-12 06:47:54 +01:00
Peter Steinberger
5aede953ad test: guard channel send and stat overloads 2026-05-12 06:37:52 +01:00
Peter Steinberger
29d478f866 test: guard plugin hooks mock call 2026-05-12 05:44:37 +01:00
Peter Steinberger
92a4bb6c33 test: guard plugin lifecycle mock calls 2026-05-12 05:43:04 +01:00
Peter Steinberger
ed6db3cd23 test: guard plugin services mock call 2026-05-12 05:41:21 +01:00
Peter Steinberger
10d590a666 test: guard optional tool mock calls 2026-05-12 05:26:27 +01:00
Peter Steinberger
a786d8dfcb test: guard inbound claim logger mock calls 2026-05-12 05:20:50 +01:00
Peter Steinberger
35174ea046 test: guard plugin doctor jiti mock call 2026-05-12 05:10:19 +01:00
Peter Steinberger
352a394bcc test: guard plugin cleanup timeout mock call 2026-05-12 04:35:10 +01:00
Peter Steinberger
9433f7984b test: guard plugin uninstall mock call 2026-05-12 04:17:16 +01:00
Peter Steinberger
daeced9f94 test: reuse plugin cli mock call helper 2026-05-12 04:07:24 +01:00
Peter Steinberger
4c8d01e2a7 test: guard wired hook mock call 2026-05-12 03:38:01 +01:00
Sarah Fortune
26b2c47feb feat(onboarding): featured provider tier in interactive picker (#80798)
* temp

* fix pnpm lock conflict

* fix(onboarding): clear oxlint findings in auth-choice-prompt
2026-05-11 17:09:32 -07:00
pashpashpash
3b44dfc367 Make OpenAI auth login use ChatGPT by default (#80790)
* fix(openai): default provider login to ChatGPT auth

* fix(openai): align auth login metadata and fast tests

* fix(openai): prefer setup auth providers for login

* fix(openai): reject unknown explicit auth methods

* fix(line): keep channel entry imports scoped
2026-05-12 08:17:14 +09:00
Shakker
b4cb08c71a test: require actionable compat text 2026-05-11 23:45:19 +01:00
Shakker
a1fe0bd91b test: require single plugin tool load 2026-05-11 23:40:51 +01:00
Shakker
376f93b62b test: match plugin registry inventory 2026-05-11 23:39:34 +01:00