





















@@ -563,9 +563,11 @@ openclaw migrate apply codex --yes
563563```
564564565565The Codex migration provider copies skills into the current OpenClaw agent
566-workspace. Codex native plugins, hooks, and config files are reported or archived
567-for manual review instead of being activated automatically, because they can
568-execute commands, expose MCP servers, or carry credentials.
566+workspace. For source-installed `openai-curated` Codex plugins, migration also
567+calls Codex app-server `plugin/install` and records explicit native plugin
568+config under `plugins.entries.codex.config.codexPlugins`. Codex config files,
569+hooks, and cached plugin bundles that are not source-installed curated plugins
570+remain report-only manual-review items.
569571570572Auth is selected in this order:
571573@@ -629,6 +631,7 @@ Supported top-level Codex plugin fields:
629631| `codexDynamicToolsProfile` | `"native-first"` | Use `"openclaw-compat"` to expose the full OpenClaw dynamic tool set to Codex app-server. |
630632| `codexDynamicToolsLoading` | `"searchable"` | Use `"direct"` to put OpenClaw dynamic tools directly in the initial Codex tool context. |
631633| `codexDynamicToolsExclude` | `[]` | Additional OpenClaw dynamic tool names to omit from Codex app-server turns. |
634+| `codexPlugins` | disabled | Native Codex plugin/app support for migrated source-installed curated plugins. |
632635633636Supported `appServer` fields:
634637@@ -684,6 +687,106 @@ Environment overrides remain available for local testing:
684687preferred for repeatable deployments because it keeps the plugin behavior in the
685688same reviewed file as the rest of the Codex harness setup.
686689690+## Native Codex plugins
691+692+Native Codex plugin support uses Codex app-server's own app and plugin
693+capabilities in the same Codex thread as the OpenClaw harness turn. OpenClaw
694+does not translate Codex plugins into synthetic `codex_plugin_*` OpenClaw
695+dynamic tools. That keeps plugin calls in the native Codex transcript and avoids
696+starting a second ephemeral Codex thread for each plugin invocation.
697+698+Codex plugins only work when the selected OpenClaw agent runtime is the native
699+Codex harness. The `codexPlugins` config has no effect on Pi runs, normal
700+OpenAI provider runs, ACP conversation bindings, or other harnesses, because
701+those paths do not create Codex app-server threads with native `apps` config.
702+703+V1 support is intentionally narrow:
704+705+- Only `openai-curated` plugins that were already installed in the source Codex
706+ app-server inventory are migration-eligible.
707+- Migration writes explicit plugin identities with `marketplaceName` and
708+`pluginName`; it does not write local `marketplacePath` cache paths.
709+- `codexPlugins.enabled` is the global enablement switch. There is no
710+`plugins["*"]` wildcard and no config key that grants arbitrary install
711+ authority.
712+- Unsupported marketplaces, cached plugin bundles, hooks, and Codex config files
713+ are preserved in the migration report for manual review.
714+715+Example migrated config:
716+717+```json5
718+{
719+ plugins: {
720+ entries: {
721+ codex: {
722+ enabled: true,
723+ config: {
724+ codexPlugins: {
725+ enabled: true,
726+ allow_destructive_actions: false,
727+ plugins: {
728+"google-calendar": {
729+ enabled: true,
730+ marketplaceName: "openai-curated",
731+ pluginName: "google-calendar",
732+ },
733+ },
734+ },
735+ },
736+ },
737+ },
738+ },
739+}
740+```
741+742+Thread app config is computed when OpenClaw establishes a Codex harness session
743+or replaces a stale Codex thread binding. It is not recomputed on every turn.
744+After changing `codexPlugins`, use `/new`, `/reset`, or restart the gateway so
745+future Codex harness sessions start with the updated app set.
746+747+OpenClaw reads Codex app inventory through app-server `app/list`, caches it for
748+one hour, and refreshes stale or missing entries asynchronously. A plugin app is
749+exposed only when OpenClaw can map it back to the migrated plugin through stable
750+ownership: an exact app id from plugin detail, a known MCP server name, or
751+unique stable metadata. Display-name-only or ambiguous ownership is excluded
752+until the next inventory refresh proves ownership.
753+754+Plugin-owned app tools use Codex's native app configuration. OpenClaw injects a
755+restrictive `config.apps` patch for the Codex thread: `_default` is disabled and
756+only apps owned by enabled migrated plugins are enabled. OpenClaw sets
757+app-level `destructive_enabled` from the effective global/per-plugin
758+`allow_destructive_actions` policy and lets Codex enforce destructive tool
759+metadata from its native app tool annotations. Plugin apps are emitted with
760+`open_world_enabled: true`; OpenClaw does not expose a separate plugin
761+open-world policy knob. OpenClaw does not maintain per-plugin destructive
762+tool-name deny lists. Tool approval mode is prompted by default for plugin
763+apps, because OpenClaw does not have an interactive app-elicitation UI in this
764+same-thread path.
765+766+Destructive plugin elicitations fail closed by default:
767+768+- Global `allow_destructive_actions` defaults to `false`.
769+- Per-plugin `allow_destructive_actions` overrides the global policy for that
770+ plugin.
771+- When policy is `false`, OpenClaw returns a deterministic decline.
772+- When policy is `true`, OpenClaw auto-accepts only safe schemas it can map to
773+ an approval response, such as a boolean approve field.
774+- Missing plugin identity, ambiguous ownership, a missing turn id, a wrong turn
775+ id, or an unsafe elicitation schema declines instead of prompting.
776+777+Common diagnostics:
778+779+- `auth_required`: migration installed the plugin but one of its apps still
780+ needs authentication. The explicit plugin entry is written disabled until you
781+ reauthorize and enable it.
782+- `marketplace_missing` or `plugin_missing`: the target Codex app-server cannot
783+ see the expected `openai-curated` marketplace or plugin.
784+- `app_inventory_missing` or `app_inventory_stale`: app readiness came from an
785+ empty or stale cache; OpenClaw schedules an async refresh and excludes plugin
786+ apps until ownership/readiness is known.
787+- `app_ownership_ambiguous`: app inventory only matched by display name, so the
788+ app is not exposed to the Codex thread.
789+687790## Computer use
688791689792Computer Use is covered in its own setup guide:
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。