Skip to content

Commit 3595795

Browse files
committed
Revert "fix(codex): accept first-party OpenAI plugin marketplaces"
This reverts commit 4f3d8a5.
1 parent a0717ef commit 3595795

22 files changed

Lines changed: 101 additions & 471 deletions

docs/cli/migrate.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,6 @@ Target-side auth-required installs are reported on the affected plugin item with
218218
Their explicit config entries are written disabled until you reauthorize and
219219
enable them. Other install failures are item-scoped `error` results.
220220

221-
The native Codex plugin config also accepts first-party `openai-bundled` and
222-
`openai-primary-runtime` marketplace identities, but migration does not
223-
auto-discover or install them from source state.
224-
225-
OpenAI-side app/plugin availability still comes from the signed-in Codex
226-
account and workspace app controls. See
227-
[Using Codex with your ChatGPT plan](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan)
228-
for OpenAI's account and workspace-control overview, then use
229-
[Native Codex plugins](/plugins/codex-native-plugins#manual-first-party-marketplace-entries)
230-
for manual first-party marketplace entries.
231-
232221
If Codex app-server plugin inventory is unavailable during planning, migration
233222
falls back to cached bundle advisory items instead of failing the whole
234223
migration.

docs/gateway/configuration-reference.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,7 @@ conversation bindings, or any non-Codex harness.
316316
migrated plugin entry when global `codexPlugins.enabled` is also true.
317317
Default: `true` for explicit entries.
318318
- `plugins.entries.codex.config.codexPlugins.plugins.<key>.marketplaceName`:
319-
stable marketplace identity. V1 supports `"openai-curated"`,
320-
`"openai-bundled"`, and `"openai-primary-runtime"`. See
321-
[Native Codex plugins](/plugins/codex-native-plugins#manual-first-party-marketplace-entries)
322-
for manual bundled and primary-runtime examples.
319+
stable marketplace identity. V1 only supports `"openai-curated"`.
323320
- `plugins.entries.codex.config.codexPlugins.plugins.<key>.pluginName`: stable
324321
Codex plugin identity from migration, for example `"google-calendar"`.
325322
- `plugins.entries.codex.config.codexPlugins.plugins.<key>.allow_destructive_actions`:

docs/plugins/codex-harness-reference.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ All Codex harness settings live under `plugins.entries.codex.config`.
3838

3939
Supported top-level fields:
4040

41-
| Field | Default | Meaning |
42-
| -------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
43-
| `discovery` | enabled | Model discovery settings for Codex app-server `model/list`. |
44-
| `appServer` | managed stdio app-server | Transport, command, auth, approval, sandbox, and timeout settings. |
45-
| `codexDynamicToolsLoading` | `"searchable"` | Use `"direct"` to put OpenClaw dynamic tools directly in the initial Codex tool context. |
46-
| `codexDynamicToolsExclude` | `[]` | Additional OpenClaw dynamic tool names to omit from Codex app-server turns. |
47-
| `codexPlugins` | disabled | Native Codex plugin/app support for configured first-party Codex plugins. See [Native Codex plugins](/plugins/codex-native-plugins). |
48-
| `computerUse` | disabled | Codex Computer Use setup. See [Codex Computer Use](/plugins/codex-computer-use). |
41+
| Field | Default | Meaning |
42+
| -------------------------- | ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------- |
43+
| `discovery` | enabled | Model discovery settings for Codex app-server `model/list`. |
44+
| `appServer` | managed stdio app-server | Transport, command, auth, approval, sandbox, and timeout settings. |
45+
| `codexDynamicToolsLoading` | `"searchable"` | Use `"direct"` to put OpenClaw dynamic tools directly in the initial Codex tool context. |
46+
| `codexDynamicToolsExclude` | `[]` | Additional OpenClaw dynamic tool names to omit from Codex app-server turns. |
47+
| `codexPlugins` | disabled | Native Codex plugin/app support for migrated source-installed curated plugins. See [Native Codex plugins](/plugins/codex-native-plugins). |
48+
| `computerUse` | disabled | Codex Computer Use setup. See [Codex Computer Use](/plugins/codex-computer-use). |
4949

5050
## App-server transport
5151

docs/plugins/codex-harness.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ Supported top-level Codex plugin fields:
526526
| -------------------------- | -------------- | ---------------------------------------------------------------------------------------- |
527527
| `codexDynamicToolsLoading` | `"searchable"` | Use `"direct"` to put OpenClaw dynamic tools directly in the initial Codex tool context. |
528528
| `codexDynamicToolsExclude` | `[]` | Additional OpenClaw dynamic tool names to omit from Codex app-server turns. |
529-
| `codexPlugins` | disabled | Native Codex plugin/app support for configured first-party Codex plugins. |
529+
| `codexPlugins` | disabled | Native Codex plugin/app support for migrated source-installed curated plugins. |
530530

531531
Supported `appServer` fields:
532532

docs/plugins/codex-native-plugins.md

Lines changed: 9 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ summary: "Configure migrated native Codex plugins for Codex-mode OpenClaw agents
33
title: "Native Codex plugins"
44
read_when:
55
- You want Codex-mode OpenClaw agents to use native Codex plugins
6-
- You are configuring first-party Codex plugin marketplaces
6+
- You are migrating source-installed openai-curated Codex plugins
77
- You are troubleshooting codexPlugins, app inventory, destructive actions, or plugin app diagnostics
88
---
99

@@ -22,9 +22,7 @@ Use this page after the base [Codex harness](/plugins/codex-harness) is working.
2222
- The selected OpenClaw agent runtime must be the native Codex harness.
2323
- `plugins.entries.codex.enabled` must be true.
2424
- `plugins.entries.codex.config.codexPlugins.enabled` must be true.
25-
- V1 supports first-party Codex plugin marketplaces: `openai-curated`,
26-
`openai-bundled`, and `openai-primary-runtime`.
27-
- Migration only auto-discovers `openai-curated` plugins that it observed as
25+
- V1 supports only `openai-curated` plugins that migration observed as
2826
source-installed in the source Codex home.
2927
- The target Codex app-server must be able to see the expected marketplace,
3028
plugin, and app inventory.
@@ -58,11 +56,9 @@ Apply the migration when the plan looks right:
5856
openclaw migrate apply codex --yes
5957
```
6058

61-
Migration writes explicit `codexPlugins` entries for eligible curated plugins
62-
and calls Codex app-server `plugin/install` for selected plugins. Explicit
63-
config may also reference Codex's bundled and primary-runtime first-party
64-
marketplaces when the target app-server inventory exposes those plugin apps. A
65-
typical migrated config looks like this:
59+
Migration writes explicit `codexPlugins` entries for eligible plugins and calls
60+
Codex app-server `plugin/install` for selected plugins. A typical migrated
61+
config looks like this:
6662

6763
```json5
6864
{
@@ -93,49 +89,6 @@ After changing `codexPlugins`, new Codex conversations pick up the updated app
9389
set automatically. Use `/new` or `/reset` to refresh the current conversation.
9490
A gateway restart is not required for plugin enable or disable changes.
9591

96-
## Manual first-party marketplace entries
97-
98-
Migration writes `openai-curated` entries for eligible source-installed plugins.
99-
For first-party plugins that live in Codex's bundled or primary-runtime
100-
marketplaces, add explicit entries after confirming the target Codex app-server
101-
inventory exposes that marketplace and plugin.
102-
103-
Use the same config shape for every first-party marketplace:
104-
105-
```json5
106-
{
107-
plugins: {
108-
entries: {
109-
codex: {
110-
enabled: true,
111-
config: {
112-
codexPlugins: {
113-
enabled: true,
114-
plugins: {
115-
chrome: {
116-
enabled: true,
117-
marketplaceName: "openai-bundled",
118-
pluginName: "chrome",
119-
},
120-
documents: {
121-
enabled: true,
122-
marketplaceName: "openai-primary-runtime",
123-
pluginName: "documents",
124-
},
125-
},
126-
},
127-
},
128-
},
129-
},
130-
},
131-
}
132-
```
133-
134-
The key under `plugins` is OpenClaw's local config key. `pluginName` and
135-
`marketplaceName` must match the Codex app-server inventory exactly. If the
136-
plugin is not listed in `/codex plugins list` or Codex app diagnostics, OpenClaw
137-
keeps the entry configured but cannot expose its apps to Codex turns.
138-
13992
## Manage plugins from chat
14093

14194
Use `/codex plugins` when you want to inspect or change configured native Codex
@@ -197,10 +150,8 @@ up the updated app set.
197150

198151
V1 is intentionally narrow:
199152

200-
- Runtime config accepts `openai-curated`, `openai-bundled`, and
201-
`openai-primary-runtime` plugin identities.
202153
- Only `openai-curated` plugins that were already installed in the source Codex
203-
app-server inventory are migration-eligible for automatic migration.
154+
app-server inventory are migration-eligible.
204155
- App-backed source plugins must pass the migration-time subscription gate.
205156
`--verify-plugin-apps` adds the source app-inventory gate. Subscription-gated
206157
accounts plus, in verification mode, inaccessible, disabled, missing source
@@ -213,9 +164,7 @@ V1 is intentionally narrow:
213164
- There is no `plugins["*"]` wildcard and no config key that grants arbitrary
214165
install authority.
215166
- Unsupported marketplaces, cached plugin bundles, hooks, and Codex config files
216-
are preserved in the migration report for manual review. Bundled and
217-
primary-runtime first-party plugins can still be added manually through
218-
explicit `codexPlugins` config.
167+
are preserved in the migration report for manual review.
219168

220169
## App inventory and ownership
221170

@@ -303,10 +252,8 @@ app-server auth or rerun with `--verify-plugin-apps` if you want source app
303252
inventory to decide eligibility when account lookup fails.
304253

305254
**`marketplace_missing` or `plugin_missing`:** the target Codex app-server
306-
cannot see the expected first-party marketplace or plugin. Rerun migration
307-
against the target runtime, inspect Codex app-server plugin status, or confirm
308-
the explicit `marketplaceName` is one of `openai-curated`, `openai-bundled`, or
309-
`openai-primary-runtime`.
255+
cannot see the expected `openai-curated` marketplace or plugin. Rerun migration
256+
against the target runtime or inspect Codex app-server plugin status.
310257

311258
**`app_inventory_missing` or `app_inventory_stale`:** app readiness came from an
312259
empty or stale cache. OpenClaw schedules an async refresh and excludes plugin

extensions/codex/openclaw.plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
},
115115
"marketplaceName": {
116116
"type": "string",
117-
"enum": ["openai-curated", "openai-bundled", "openai-primary-runtime"]
117+
"enum": ["openai-curated"]
118118
},
119119
"pluginName": {
120120
"type": "string"

extensions/codex/src/app-server/config.test.ts

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -653,59 +653,6 @@ allowed_sandbox_modes = ["read-only", "workspace-write"]
653653
expect(resolveCodexPluginsPolicy(config).pluginPolicies).toStrictEqual([]);
654654
});
655655

656-
it("accepts native plugin identities from every first-party OpenAI marketplace", () => {
657-
// OpenAI ships first-party Codex plugins across three marketplaces: the local
658-
// openai-bundled marketplace shipped with Codex.app (chrome, browser, computer-use,
659-
// latex-tectonic), the remote openai-curated marketplace, and the
660-
// openai-primary-runtime marketplace owned by the Codex primary runtime
661-
// (documents, spreadsheets, presentations). All three should resolve.
662-
const config = readCodexPluginConfig({
663-
codexPlugins: {
664-
enabled: true,
665-
plugins: {
666-
chrome: {
667-
marketplaceName: "openai-bundled",
668-
pluginName: "chrome",
669-
},
670-
"google-calendar": {
671-
marketplaceName: "openai-curated",
672-
pluginName: "google-calendar",
673-
},
674-
documents: {
675-
marketplaceName: "openai-primary-runtime",
676-
pluginName: "documents",
677-
},
678-
},
679-
},
680-
});
681-
682-
expect(config.codexPlugins?.enabled).toBe(true);
683-
const policy = resolveCodexPluginsPolicy(config);
684-
expect(policy.pluginPolicies).toEqual([
685-
{
686-
configKey: "chrome",
687-
marketplaceName: "openai-bundled",
688-
pluginName: "chrome",
689-
enabled: true,
690-
allowDestructiveActions: true,
691-
},
692-
{
693-
configKey: "documents",
694-
marketplaceName: "openai-primary-runtime",
695-
pluginName: "documents",
696-
enabled: true,
697-
allowDestructiveActions: true,
698-
},
699-
{
700-
configKey: "google-calendar",
701-
marketplaceName: "openai-curated",
702-
pluginName: "google-calendar",
703-
enabled: true,
704-
allowDestructiveActions: true,
705-
},
706-
]);
707-
});
708-
709656
it("treats configured and environment commands as explicit overrides", () => {
710657
expectFields(
711658
resolveRuntimeForTest({

extensions/codex/src/app-server/config.ts

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -60,30 +60,7 @@ type CodexAppServerCommandSource = "managed" | "resolved-managed" | "config" | "
6060
export type CodexDynamicToolsLoading = "searchable" | "direct";
6161
export type CodexPluginDestructivePolicy = boolean;
6262

63-
// OpenAI ships first-party Codex plugins across three marketplaces:
64-
// - openai-curated: remote curated marketplace, fetched via `codex plugin marketplace add`
65-
// - openai-bundled: local marketplace that ships with Codex.app and the Codex CLI
66-
// (browser, chrome, computer-use, latex-tectonic)
67-
// - openai-primary-runtime: marketplace owned by the Codex primary runtime
68-
// (documents, spreadsheets, presentations)
69-
// All three are owned by OpenAI. Allow activating plugins from any of them.
70-
export const CODEX_PLUGINS_MARKETPLACE_NAMES = [
71-
"openai-curated",
72-
"openai-bundled",
73-
"openai-primary-runtime",
74-
] as const;
75-
export type CodexPluginsMarketplaceName = (typeof CODEX_PLUGINS_MARKETPLACE_NAMES)[number];
76-
77-
// Back-compat constant for callers that still reference the curated marketplace by name.
78-
export const CODEX_PLUGINS_MARKETPLACE_NAME: CodexPluginsMarketplaceName = "openai-curated";
79-
80-
export function isCodexPluginsMarketplaceName(
81-
name: string | undefined,
82-
): name is CodexPluginsMarketplaceName {
83-
return (
84-
name !== undefined && (CODEX_PLUGINS_MARKETPLACE_NAMES as readonly string[]).includes(name)
85-
);
86-
}
63+
export const CODEX_PLUGINS_MARKETPLACE_NAME = "openai-curated";
8764

8865
export type CodexComputerUseConfig = {
8966
enabled?: boolean;
@@ -126,7 +103,7 @@ export type CodexAppServerExperimentalConfig = {
126103

127104
export type ResolvedCodexPluginPolicy = {
128105
configKey: string;
129-
marketplaceName: CodexPluginsMarketplaceName;
106+
marketplaceName: typeof CODEX_PLUGINS_MARKETPLACE_NAME;
130107
pluginName: string;
131108
enabled: boolean;
132109
allowDestructiveActions: CodexPluginDestructivePolicy;
@@ -278,7 +255,7 @@ const codexAppServerExperimentalSchema = z
278255
const codexPluginEntryConfigSchema = z
279256
.object({
280257
enabled: z.boolean().optional(),
281-
marketplaceName: z.enum(CODEX_PLUGINS_MARKETPLACE_NAMES).optional(),
258+
marketplaceName: z.literal(CODEX_PLUGINS_MARKETPLACE_NAME).optional(),
282259
pluginName: z.string().trim().min(1).optional(),
283260
allow_destructive_actions: z.boolean().optional(),
284261
})
@@ -388,13 +365,13 @@ export function resolveCodexPluginsPolicy(pluginConfig?: unknown): ResolvedCodex
388365
const allowDestructiveActions = config?.allow_destructive_actions ?? true;
389366
const pluginPolicies = Object.entries(config?.plugins ?? {})
390367
.flatMap(([configKey, entry]): ResolvedCodexPluginPolicy[] => {
391-
if (!isCodexPluginsMarketplaceName(entry.marketplaceName) || !entry.pluginName) {
368+
if (entry.marketplaceName !== CODEX_PLUGINS_MARKETPLACE_NAME || !entry.pluginName) {
392369
return [];
393370
}
394371
return [
395372
{
396373
configKey,
397-
marketplaceName: entry.marketplaceName,
374+
marketplaceName: CODEX_PLUGINS_MARKETPLACE_NAME,
398375
pluginName: entry.pluginName,
399376
enabled: enabled && entry.enabled !== false,
400377
allowDestructiveActions: entry.allow_destructive_actions ?? allowDestructiveActions,

0 commit comments

Comments
 (0)