@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk 0.1.17 → 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -2
- package/openclaw.plugin.json +6 -12
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -12,6 +12,11 @@ import {
|
|
|
12
12
|
buildCodexBridgeModelProviderId,
|
|
13
13
|
resolveExternalModelProvider
|
|
14
14
|
} from "./codex-model-provider.js";
|
|
15
|
+
import {
|
|
16
|
+
CODEX_APPROVAL_POLICY,
|
|
17
|
+
mapAccessModeToSandboxMode,
|
|
18
|
+
resolveCodexAccessMode
|
|
19
|
+
} from "./codex-access-mode.js";
|
|
15
20
|
import { buildCodexInputBuilder } from "./codex-input-builder.js";
|
|
16
21
|
import { ensureCodexOpenAiResponsesBridge } from "./codex-openai-responses-bridge.js";
|
|
17
22
|
import { resolveCodexResponsesApiSupport } from "./codex-responses-capability.js";
|
|
@@ -223,6 +228,7 @@ const plugin = {
|
|
|
223
228
|
config: nextConfig,
|
|
224
229
|
pluginConfig
|
|
225
230
|
});
|
|
231
|
+
const accessMode = resolveCodexAccessMode(pluginConfig);
|
|
226
232
|
const thinkingLevel = readThinkingLevel(runtimeParams.sessionMetadata.preferred_thinking) ?? readThinkingLevel(runtimeParams.sessionMetadata.thinking) ?? void 0;
|
|
227
233
|
return new CodexSdkNcpAgentRuntime({
|
|
228
234
|
sessionId: runtimeParams.sessionId,
|
|
@@ -245,14 +251,14 @@ const plugin = {
|
|
|
245
251
|
inputBuilder: buildCodexInputBuilder(executionOptions.workingDirectory),
|
|
246
252
|
threadOptions: {
|
|
247
253
|
model,
|
|
248
|
-
sandboxMode:
|
|
254
|
+
sandboxMode: mapAccessModeToSandboxMode(accessMode),
|
|
249
255
|
workingDirectory: executionOptions.workingDirectory,
|
|
250
256
|
skipGitRepoCheck: executionOptions.skipGitRepoCheck,
|
|
251
257
|
modelReasoningEffort: thinkingLevel,
|
|
252
258
|
networkAccessEnabled: readBoolean(pluginConfig.networkAccessEnabled),
|
|
253
259
|
webSearchMode: readString(pluginConfig.webSearchMode),
|
|
254
260
|
webSearchEnabled: readBoolean(pluginConfig.webSearchEnabled),
|
|
255
|
-
approvalPolicy:
|
|
261
|
+
approvalPolicy: CODEX_APPROVAL_POLICY,
|
|
256
262
|
additionalDirectories: readStringArray(pluginConfig.additionalDirectories)
|
|
257
263
|
}
|
|
258
264
|
});
|
package/openclaw.plugin.json
CHANGED
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
"workingDirectory": {
|
|
24
24
|
"type": "string"
|
|
25
25
|
},
|
|
26
|
-
"
|
|
26
|
+
"accessMode": {
|
|
27
27
|
"type": "string",
|
|
28
|
-
"enum": ["read-only", "workspace-write", "
|
|
28
|
+
"enum": ["read-only", "workspace-write", "full-access"],
|
|
29
|
+
"default": "full-access"
|
|
29
30
|
},
|
|
30
31
|
"skipGitRepoCheck": {
|
|
31
32
|
"type": "boolean"
|
|
@@ -40,10 +41,6 @@
|
|
|
40
41
|
"webSearchEnabled": {
|
|
41
42
|
"type": "boolean"
|
|
42
43
|
},
|
|
43
|
-
"approvalPolicy": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"enum": ["never", "on-request", "on-failure", "untrusted"]
|
|
46
|
-
},
|
|
47
44
|
"codexPathOverride": {
|
|
48
45
|
"type": "string"
|
|
49
46
|
},
|
|
@@ -86,12 +83,9 @@
|
|
|
86
83
|
"label": "Working Directory",
|
|
87
84
|
"advanced": true
|
|
88
85
|
},
|
|
89
|
-
"
|
|
90
|
-
"label": "
|
|
91
|
-
"
|
|
92
|
-
},
|
|
93
|
-
"approvalPolicy": {
|
|
94
|
-
"label": "Approval Policy",
|
|
86
|
+
"accessMode": {
|
|
87
|
+
"label": "Access Mode",
|
|
88
|
+
"help": "Product-facing permission model. Defaults to full-access; internally this is mapped to the Codex SDK sandbox/approval settings.",
|
|
95
89
|
"advanced": true
|
|
96
90
|
},
|
|
97
91
|
"networkAccessEnabled": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextclaw/nextclaw-ncp-runtime-plugin-codex-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NextClaw plugin that registers Codex SDK as an optional NCP runtime.",
|
|
6
6
|
"type": "module",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@nextclaw/core": "0.
|
|
24
|
+
"@nextclaw/core": "0.11.0",
|
|
25
25
|
"@nextclaw/nextclaw-ncp-runtime-codex-sdk": "0.1.3",
|
|
26
26
|
"@nextclaw/ncp-toolkit": "0.4.2",
|
|
27
27
|
"@nextclaw/ncp": "0.3.2"
|