@oai404iao/pi-codex-runtime 0.1.0 → 0.2.0
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/README.md +3 -1
- package/config.schema.json +2 -101
- package/package.json +2 -2
- package/src/model-catalog/runtime.ts +6 -2
- package/src/settings.ts +26 -16
package/README.md
CHANGED
|
@@ -15,7 +15,9 @@ Configuration paths remain
|
|
|
15
15
|
This package ships the canonical schemas and default catalog, including the
|
|
16
16
|
`openai-codex/gpt-6-astra` Responses Lite profile. The global
|
|
17
17
|
`config.json.imageGeneration:false` setting gates image capability derivation
|
|
18
|
-
without replacing the selected model profile.
|
|
18
|
+
without replacing the selected model profile. Likewise,
|
|
19
|
+
`config.json.webSocketEnabled:false` forces SSE and disables WebSocket prewarm
|
|
20
|
+
without changing that profile.
|
|
19
21
|
`./subagent-inline` supplies the existing SDK identity integration.
|
|
20
22
|
`./internal/*` is implementation wiring, not a stable public API.
|
|
21
23
|
|
package/config.schema.json
CHANGED
|
@@ -27,23 +27,9 @@
|
|
|
27
27
|
"description": "Automatically activate enabled package tools on supported models.",
|
|
28
28
|
"default": true
|
|
29
29
|
},
|
|
30
|
-
"
|
|
30
|
+
"webSocketEnabled": {
|
|
31
31
|
"type": "boolean",
|
|
32
|
-
"description": "
|
|
33
|
-
"deprecated": true,
|
|
34
|
-
"default": true
|
|
35
|
-
},
|
|
36
|
-
"openaiTransport": {
|
|
37
|
-
"type": "string",
|
|
38
|
-
"description": "Deprecated compatibility override. Move per-model Responses transport to extension models.json.",
|
|
39
|
-
"deprecated": true,
|
|
40
|
-
"enum": ["sse", "websocket", "websocket-cached", "auto"],
|
|
41
|
-
"default": "sse"
|
|
42
|
-
},
|
|
43
|
-
"openaiWebSocketPrewarm": {
|
|
44
|
-
"type": "boolean",
|
|
45
|
-
"description": "Deprecated compatibility override. Move per-model one-shot session-startup WebSocket prewarm behavior to extension models.json.",
|
|
46
|
-
"deprecated": true,
|
|
32
|
+
"description": "Global Responses WebSocket master switch. false forces SSE and disables WebSocket prewarm for every model profile.",
|
|
47
33
|
"default": true
|
|
48
34
|
},
|
|
49
35
|
"fastMode": {
|
|
@@ -51,73 +37,11 @@
|
|
|
51
37
|
"description": "Global user toggle for the Fast service tier declared by the active model profile.",
|
|
52
38
|
"default": false
|
|
53
39
|
},
|
|
54
|
-
"compactionMode": {
|
|
55
|
-
"type": "string",
|
|
56
|
-
"description": "Deprecated compatibility override. Move per-model compaction behavior to extension models.json.",
|
|
57
|
-
"deprecated": true,
|
|
58
|
-
"enum": ["pi", "responses", "responses-compact"],
|
|
59
|
-
"default": "pi"
|
|
60
|
-
},
|
|
61
|
-
"requestProfile": {
|
|
62
|
-
"type": "object",
|
|
63
|
-
"description": "Deprecated compatibility override. Move Responses mode, reasoning summary, prompt placement, patch transport, and tool capabilities to extension models.json.",
|
|
64
|
-
"deprecated": true,
|
|
65
|
-
"default": {},
|
|
66
|
-
"additionalProperties": false,
|
|
67
|
-
"properties": {
|
|
68
|
-
"responsesMode": {
|
|
69
|
-
"type": "string",
|
|
70
|
-
"description": "Responses protocol mode. Lite requires an endpoint that implements the Codex Responses Lite contract.",
|
|
71
|
-
"enum": ["standard", "lite"],
|
|
72
|
-
"default": "standard"
|
|
73
|
-
},
|
|
74
|
-
"reasoningSummary": {
|
|
75
|
-
"type": "string",
|
|
76
|
-
"description": "Deprecated compatibility override for the reasoning summary mode. Move this to responses.reasoningSummary in the per-model catalog.",
|
|
77
|
-
"enum": ["auto", "concise", "detailed", "none"],
|
|
78
|
-
"default": "auto"
|
|
79
|
-
},
|
|
80
|
-
"systemPromptPlacement": {
|
|
81
|
-
"type": "string",
|
|
82
|
-
"description": "Where Standard Responses places Pi's system prompt. Responses Lite always uses a developer message.",
|
|
83
|
-
"enum": ["instructions", "developer"],
|
|
84
|
-
"default": "instructions"
|
|
85
|
-
},
|
|
86
|
-
"patchTransport": {
|
|
87
|
-
"type": "string",
|
|
88
|
-
"description": "Transport for apply_patch: a JSON function tool or the Codex freeform custom tool.",
|
|
89
|
-
"enum": ["function", "custom"],
|
|
90
|
-
"default": "function"
|
|
91
|
-
},
|
|
92
|
-
"supportsHostedTools": {
|
|
93
|
-
"type": "boolean",
|
|
94
|
-
"description": "Enable hosted-tool activation and request rewriting. Responses Lite always disables hosted tools.",
|
|
95
|
-
"default": true
|
|
96
|
-
},
|
|
97
|
-
"supportsParallelTools": {
|
|
98
|
-
"type": "boolean",
|
|
99
|
-
"description": "Enable parallel tool calls in provider requests. Responses Lite always disables parallel tools.",
|
|
100
|
-
"default": true
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
"apiKeyMode": {
|
|
105
|
-
"type": "boolean",
|
|
106
|
-
"description": "Deprecated compatibility override. Move the endpoint/auth shape to responses.endpoint in extension models.json.",
|
|
107
|
-
"deprecated": true,
|
|
108
|
-
"default": false
|
|
109
|
-
},
|
|
110
40
|
"imageGeneration": {
|
|
111
41
|
"type": "boolean",
|
|
112
42
|
"description": "Global image-generation master switch. false disables image tools, commands, presentation, hosted injection, standalone endpoints, and direct fallback without changing other model-profile behavior.",
|
|
113
43
|
"default": true
|
|
114
44
|
},
|
|
115
|
-
"webSearchEnabled": {
|
|
116
|
-
"type": "boolean",
|
|
117
|
-
"description": "Deprecated compatibility override. Move per-model web-search support to extension models.json.",
|
|
118
|
-
"deprecated": true,
|
|
119
|
-
"default": false
|
|
120
|
-
},
|
|
121
45
|
"imageOutputDir": {
|
|
122
46
|
"type": "string",
|
|
123
47
|
"description": "Directory for generated images. Relative paths resolve against the workspace root.",
|
|
@@ -136,34 +60,11 @@
|
|
|
136
60
|
"description": "Allow direct OpenAI Images API generation when native Codex generation is unavailable.",
|
|
137
61
|
"default": false
|
|
138
62
|
},
|
|
139
|
-
"viewImage": {
|
|
140
|
-
"type": "boolean",
|
|
141
|
-
"description": "Deprecated compatibility override. Move per-model view_image support to extension models.json.",
|
|
142
|
-
"deprecated": true,
|
|
143
|
-
"default": false
|
|
144
|
-
},
|
|
145
63
|
"viewImageWorkspaceOnly": {
|
|
146
64
|
"type": "boolean",
|
|
147
65
|
"description": "Reject view_image paths outside the active workspace.",
|
|
148
66
|
"default": false
|
|
149
67
|
},
|
|
150
|
-
"applyPatchEnabled": {
|
|
151
|
-
"type": "boolean",
|
|
152
|
-
"description": "Deprecated compatibility override. Move per-model apply_patch support to extension models.json.",
|
|
153
|
-
"deprecated": true,
|
|
154
|
-
"default": true
|
|
155
|
-
},
|
|
156
|
-
"additionalModelIds": {
|
|
157
|
-
"type": "array",
|
|
158
|
-
"description": "Deprecated compatibility allowlist. Add exact per-model entries to extension models.json instead.",
|
|
159
|
-
"deprecated": true,
|
|
160
|
-
"items": {
|
|
161
|
-
"type": "string",
|
|
162
|
-
"pattern": "^[^\\s/]+/\\S+$"
|
|
163
|
-
},
|
|
164
|
-
"uniqueItems": true,
|
|
165
|
-
"default": []
|
|
166
|
-
},
|
|
167
68
|
"deferApplyPatchRendering": {
|
|
168
69
|
"type": "boolean",
|
|
169
70
|
"description": "Use Pi's fallback tool renderer instead of the built-in streaming filesystem preview.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oai404iao/pi-codex-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Unpublished pi-codex-runtime workspace for the staged Codex split",
|
|
6
6
|
"type": "module",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"engines": {
|
|
65
65
|
"node": ">=22.19.0"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "61f1d82471fff63e3e9d5c0276b5e069c9fc8f1f"
|
|
68
68
|
}
|
|
@@ -96,8 +96,12 @@ export function loadModelSettings(
|
|
|
96
96
|
...baseSettings,
|
|
97
97
|
providerShimActive,
|
|
98
98
|
nativeProviderTools: providerShimActive && usesProviderToolRewrite,
|
|
99
|
-
openaiTransport:
|
|
100
|
-
|
|
99
|
+
openaiTransport: baseSettings.webSocketEnabled
|
|
100
|
+
? effective.responses.transport
|
|
101
|
+
: "sse",
|
|
102
|
+
openaiWebSocketPrewarm:
|
|
103
|
+
baseSettings.webSocketEnabled
|
|
104
|
+
&& effective.responses.websocketPrewarm,
|
|
101
105
|
compactionMode: providerShimActive ? effective.compaction : "pi",
|
|
102
106
|
requestProfile,
|
|
103
107
|
apiKeyMode: endpointUsesApiKey(effective.responses.endpoint, model),
|
package/src/settings.ts
CHANGED
|
@@ -6,50 +6,59 @@ import type { CodexRequestProfileOverride } from "./codex-request-profile.js";
|
|
|
6
6
|
export const PACKAGE_NAME = "pi-codex-minimal-tools";
|
|
7
7
|
export const CONFIG_FILE_NAME = "config.json";
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface CodexGlobalSettings {
|
|
10
10
|
enabled: boolean;
|
|
11
11
|
glyphStyle: "unicode" | "ascii";
|
|
12
12
|
autoEnable: boolean;
|
|
13
|
+
webSocketEnabled: boolean;
|
|
14
|
+
fastMode: boolean;
|
|
15
|
+
imageGeneration: boolean;
|
|
16
|
+
imageOutputDir: string;
|
|
17
|
+
imageModel: "gpt-image-2" | "gpt-image-1.5" | "gpt-image-1";
|
|
18
|
+
directImageApiFallback: boolean;
|
|
19
|
+
viewImageWorkspaceOnly: boolean;
|
|
20
|
+
deferApplyPatchRendering: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface CodexMinimalToolsSettings extends CodexGlobalSettings {
|
|
13
24
|
nativeProviderTools: boolean;
|
|
14
25
|
openaiTransport: "sse" | "websocket" | "websocket-cached" | "auto";
|
|
15
26
|
openaiWebSocketPrewarm: boolean;
|
|
16
|
-
fastMode: boolean;
|
|
17
27
|
compactionMode: "pi" | "responses" | "responses-compact";
|
|
18
28
|
requestProfile: CodexRequestProfileOverride;
|
|
19
29
|
apiKeyMode: boolean;
|
|
20
|
-
imageGeneration: boolean;
|
|
21
30
|
webSearchEnabled: boolean;
|
|
22
|
-
imageOutputDir: string;
|
|
23
|
-
imageModel: "gpt-image-2" | "gpt-image-1.5" | "gpt-image-1";
|
|
24
|
-
directImageApiFallback: boolean;
|
|
25
31
|
viewImage: boolean;
|
|
26
|
-
viewImageWorkspaceOnly: boolean;
|
|
27
32
|
applyPatchEnabled: boolean;
|
|
28
33
|
additionalModelIds: string[];
|
|
29
|
-
deferApplyPatchRendering: boolean;
|
|
30
34
|
}
|
|
31
35
|
|
|
32
|
-
export const
|
|
36
|
+
export const DEFAULT_GLOBAL_SETTINGS: Readonly<CodexGlobalSettings> = {
|
|
33
37
|
enabled: true,
|
|
34
38
|
glyphStyle: "unicode",
|
|
35
39
|
autoEnable: true,
|
|
40
|
+
webSocketEnabled: true,
|
|
41
|
+
fastMode: false,
|
|
42
|
+
imageGeneration: true,
|
|
43
|
+
imageOutputDir: ".pi/openai-codex-images",
|
|
44
|
+
imageModel: "gpt-image-2",
|
|
45
|
+
directImageApiFallback: false,
|
|
46
|
+
viewImageWorkspaceOnly: false,
|
|
47
|
+
deferApplyPatchRendering: false,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const DEFAULT_SETTINGS: CodexMinimalToolsSettings = {
|
|
51
|
+
...DEFAULT_GLOBAL_SETTINGS,
|
|
36
52
|
nativeProviderTools: true,
|
|
37
53
|
openaiTransport: "sse",
|
|
38
54
|
openaiWebSocketPrewarm: true,
|
|
39
|
-
fastMode: false,
|
|
40
55
|
compactionMode: "pi",
|
|
41
56
|
requestProfile: {},
|
|
42
57
|
apiKeyMode: false,
|
|
43
|
-
imageGeneration: true,
|
|
44
58
|
webSearchEnabled: false,
|
|
45
|
-
imageOutputDir: ".pi/openai-codex-images",
|
|
46
|
-
imageModel: "gpt-image-2",
|
|
47
|
-
directImageApiFallback: false,
|
|
48
59
|
viewImage: false,
|
|
49
|
-
viewImageWorkspaceOnly: false,
|
|
50
60
|
applyPatchEnabled: true,
|
|
51
61
|
additionalModelIds: [],
|
|
52
|
-
deferApplyPatchRendering: false,
|
|
53
62
|
};
|
|
54
63
|
|
|
55
64
|
type SettingsRecord = Record<string, unknown>;
|
|
@@ -188,6 +197,7 @@ export function loadSettings(_cwd?: string): CodexMinimalToolsSettings {
|
|
|
188
197
|
enabled: boolSetting(raw, "enabled"),
|
|
189
198
|
glyphStyle: glyphStyleSetting(raw),
|
|
190
199
|
autoEnable: boolSetting(raw, "autoEnable"),
|
|
200
|
+
webSocketEnabled: boolSetting(raw, "webSocketEnabled"),
|
|
191
201
|
nativeProviderTools: boolSetting(raw, "nativeProviderTools"),
|
|
192
202
|
openaiTransport: openaiTransportSetting(raw),
|
|
193
203
|
openaiWebSocketPrewarm: boolSetting(raw, "openaiWebSocketPrewarm"),
|