codex-copilot-dx 0.6.6 → 0.6.8
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 +38 -14
- package/bin/cli.mjs +16 -3
- package/package.json +1 -1
- package/src/cli-auth.mjs +99 -3
- package/src/cli-models.mjs +60 -5
- package/src/cli-options.mjs +43 -16
- package/src/cli-table.mjs +114 -0
- package/src/config.mjs +18 -0
- package/src/pm-studio-asar.mjs +100 -1
- package/src/pm-studio-setup.mjs +302 -25
- package/src/pm-studio-status.mjs +81 -23
- package/src/usage.mjs +104 -9
package/src/config.mjs
CHANGED
|
@@ -6,6 +6,20 @@ import { atomicWriteFileIfChangedSync } from "./atomic-file.mjs";
|
|
|
6
6
|
import { adapterBaseUrl } from "./running-adapter.mjs";
|
|
7
7
|
|
|
8
8
|
const CONFIG_PATH = path.join(os.homedir(), ".codex", "config.toml");
|
|
9
|
+
const MODEL_CONTEXT_WINDOW = 1_000_000;
|
|
10
|
+
const MODEL_AUTO_COMPACT_TOKEN_LIMIT = 900_000;
|
|
11
|
+
|
|
12
|
+
function setTopLevelTomlDefault(lines, key, value) {
|
|
13
|
+
let end = lines.findIndex((line) => /^\s*\[[^\]]+\]\s*$/.test(line));
|
|
14
|
+
if (end === -1) end = lines.length;
|
|
15
|
+
|
|
16
|
+
const keyRe = new RegExp(`^\\s*${key}\\s*=`);
|
|
17
|
+
if (lines.slice(0, end).some((line) => keyRe.test(line))) return false;
|
|
18
|
+
|
|
19
|
+
while (end > 0 && lines[end - 1].trim() === "") end--;
|
|
20
|
+
lines.splice(end, 0, `${key} = ${value}`);
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
9
23
|
|
|
10
24
|
function setTomlKey(lines, sectionName, key, value) {
|
|
11
25
|
const sectionLine = `[${sectionName}]`;
|
|
@@ -52,6 +66,8 @@ export function computeUpdatedCodexConfig(content, adapterPort = 2026, adapterHo
|
|
|
52
66
|
changed = true;
|
|
53
67
|
}
|
|
54
68
|
|
|
69
|
+
changed = setTopLevelTomlDefault(lines, "model_context_window", MODEL_CONTEXT_WINDOW) || changed;
|
|
70
|
+
changed = setTopLevelTomlDefault(lines, "model_auto_compact_token_limit", MODEL_AUTO_COMPACT_TOKEN_LIMIT) || changed;
|
|
55
71
|
changed = setTomlKey(lines, "shell_environment_policy.set", "ANTHROPIC_AUTH_TOKEN", "dummy") || changed;
|
|
56
72
|
changed = setTomlKey(lines, "shell_environment_policy.set", "ANTHROPIC_BASE_URL", anthropicBaseUrl) || changed;
|
|
57
73
|
changed = setTomlKey(lines, "shell_environment_policy.set", "OPENAI_BASE_URL", baseUrl) || changed;
|
|
@@ -64,6 +80,8 @@ function initialCodexConfig(adapterPort, adapterHost) {
|
|
|
64
80
|
const anthropicBaseUrl = adapterBaseUrl(adapterHost, adapterPort);
|
|
65
81
|
const baseUrl = `${anthropicBaseUrl}/v1`;
|
|
66
82
|
return `openai_base_url = "${baseUrl}"
|
|
83
|
+
model_context_window = ${MODEL_CONTEXT_WINDOW}
|
|
84
|
+
model_auto_compact_token_limit = ${MODEL_AUTO_COMPACT_TOKEN_LIMIT}
|
|
67
85
|
|
|
68
86
|
[shell_environment_policy]
|
|
69
87
|
inherit = "core"
|
package/src/pm-studio-asar.mjs
CHANGED
|
@@ -67,7 +67,106 @@ export const PM_STUDIO_2_9_7_RECIPE = Object.freeze({
|
|
|
67
67
|
]),
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
export const
|
|
70
|
+
export const PM_STUDIO_2_9_10_RECIPE = Object.freeze({
|
|
71
|
+
id: "pm-studio-2.9.10-build-2.9.10",
|
|
72
|
+
version: "2.9.10",
|
|
73
|
+
build: "2.9.10",
|
|
74
|
+
bundleIdentifier: "com.pm-studio.app",
|
|
75
|
+
sourceTeamIdentifier: "HL75GKK4W4",
|
|
76
|
+
sourceArtifact: Object.freeze({
|
|
77
|
+
releaseUrl: "https://github.com/gim-home/max-studio/releases/tag/v2.9.10",
|
|
78
|
+
asset: "PM-Studio-2.9.10-mac-arm64.zip",
|
|
79
|
+
sha256: "85654e6ed173ce2565b5ef3694137de2c5f92eba1b749316c9e5b63181ccc3b0",
|
|
80
|
+
}),
|
|
81
|
+
sourceBundleContent: Object.freeze({
|
|
82
|
+
scheme: "ccdx-bundle-content-v2",
|
|
83
|
+
sha256: "478ca7f1f0826b07b7706fd1f410dee01b6dbaae21c40c63ecbdc0942eab63d9",
|
|
84
|
+
entryCount: 1_521,
|
|
85
|
+
regularFileCount: 1_013,
|
|
86
|
+
regularBytes: 494_995_602,
|
|
87
|
+
symlinkCount: 14,
|
|
88
|
+
xattrCount: 735,
|
|
89
|
+
ignoredXattrs: Object.freeze([
|
|
90
|
+
"com.apple.macl",
|
|
91
|
+
"com.apple.provenance",
|
|
92
|
+
"com.apple.quarantine",
|
|
93
|
+
]),
|
|
94
|
+
}),
|
|
95
|
+
sourceCodeSignature: Object.freeze({
|
|
96
|
+
identifier: "com.pm-studio.app",
|
|
97
|
+
teamIdentifier: "HL75GKK4W4",
|
|
98
|
+
flags: "0x10000(runtime)",
|
|
99
|
+
runtimeVersion: "26.0.0",
|
|
100
|
+
cdHashFull: "86a4d64946123d21d20918041e88f58e8c497ce1a1f75a9f9d8cd592ce86e158",
|
|
101
|
+
notarizationTicket: "stapled",
|
|
102
|
+
}),
|
|
103
|
+
patchedSigningMetadata: Object.freeze({
|
|
104
|
+
identifier: "com.pm-studio.app",
|
|
105
|
+
flags: "0x10002(adhoc,runtime)",
|
|
106
|
+
runtime_version: "26.0.0",
|
|
107
|
+
entitlements_sha256: "9d4ccbda4fe0c81a70df3db93b3e61fe0500f67f14cdcbee4dea230e6512d05c",
|
|
108
|
+
}),
|
|
109
|
+
executable: "PM Studio",
|
|
110
|
+
sourceExecutableSha256: "a38f2054abb9770ba35d054d447be0de8e7c9d4fed6b37486bf15cf28de1e122",
|
|
111
|
+
electronFrameworkPath: "Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework",
|
|
112
|
+
sourceElectronFrameworkSha256: "a562a31f8f8d14440974466e5e611b19d93705dcf3ca2f57647578ffc002f5b4",
|
|
113
|
+
embeddedAsarIntegrity: "absent",
|
|
114
|
+
asarPath: "Contents/Resources/app.asar",
|
|
115
|
+
infoPlistPath: "Contents/Info.plist",
|
|
116
|
+
integrityKey: "ElectronAsarIntegrity.Resources/app.asar",
|
|
117
|
+
dataOffset: 3_833_292,
|
|
118
|
+
sourceAsarSha256: "d243860770e8b1d8044213924f9704d1fc52f900d6c33461eff6358962330b78",
|
|
119
|
+
sourceHeaderSha256: "5fc77d5b61e9647fba10fd2bd5752d0889c14da5a00b21d31bc48fdcccf74a69",
|
|
120
|
+
patchedAsarSha256: "49f72d999a6085102341c2d551577e164db6f22e4707d2112efa3fd280e7315e",
|
|
121
|
+
patchedHeaderSha256: "b264ece5b8e469cd3885a7a91f904f1902e1991f214ecbf228dfe91059ac7008",
|
|
122
|
+
sourceSentinel: PM_STUDIO_ORIGIN,
|
|
123
|
+
patchedSentinel: CCDX_PM_STUDIO_ORIGIN,
|
|
124
|
+
targets: Object.freeze([
|
|
125
|
+
Object.freeze({
|
|
126
|
+
path: "dist/main/main.js",
|
|
127
|
+
offset: 101_622_115,
|
|
128
|
+
size: 10_150_157,
|
|
129
|
+
sentinelOffset: 1_241_344,
|
|
130
|
+
absoluteSentinelOffset: 106_696_751,
|
|
131
|
+
sentinelCount: 1,
|
|
132
|
+
blockSize: 4_194_304,
|
|
133
|
+
sourceSha256: "03607bb1edc068396b99f02b9c9e0d8e10388fb658afc112e06e875c123dbc27",
|
|
134
|
+
patchedSha256: "e400300575e2d1c5ad089613f14e138612114547ff5060e94cb81e8de587a75a",
|
|
135
|
+
sourceBlocks: Object.freeze([
|
|
136
|
+
"3910a9bc5459f493956aafee7b3644e8d242027758f0dcdea97d7c10a324c6bf",
|
|
137
|
+
"49fa64c68425d35b1baff0d5745d856d377e014a7a7829322cd1b39aade9532e",
|
|
138
|
+
"bd7cc14a1d2e02abe66c0ec6fc4e97b263cfc1f67c4ae39e956c06d3bcc2fe67",
|
|
139
|
+
]),
|
|
140
|
+
patchedBlocks: Object.freeze([
|
|
141
|
+
"74022f5ad06c7879b37875efe0a090b23ccfbcf269afd26b10b77690413dca63",
|
|
142
|
+
"49fa64c68425d35b1baff0d5745d856d377e014a7a7829322cd1b39aade9532e",
|
|
143
|
+
"bd7cc14a1d2e02abe66c0ec6fc4e97b263cfc1f67c4ae39e956c06d3bcc2fe67",
|
|
144
|
+
]),
|
|
145
|
+
}),
|
|
146
|
+
Object.freeze({
|
|
147
|
+
path: "dist/renderer/js/main.5ad30c24.js",
|
|
148
|
+
offset: 137_266_992,
|
|
149
|
+
size: 2_520_547,
|
|
150
|
+
sentinelOffset: 528_919,
|
|
151
|
+
absoluteSentinelOffset: 141_629_203,
|
|
152
|
+
sentinelCount: 1,
|
|
153
|
+
blockSize: 4_194_304,
|
|
154
|
+
sourceSha256: "3d123f7a3eb91777f723fe2c4d412677e6722b6348373e4b4bfda41dda8b60ad",
|
|
155
|
+
patchedSha256: "dc4a9d550f4beb3a2cd7ad0fa6fc82286106762bdf789189d8f88abd0a90f619",
|
|
156
|
+
sourceBlocks: Object.freeze([
|
|
157
|
+
"3d123f7a3eb91777f723fe2c4d412677e6722b6348373e4b4bfda41dda8b60ad",
|
|
158
|
+
]),
|
|
159
|
+
patchedBlocks: Object.freeze([
|
|
160
|
+
"dc4a9d550f4beb3a2cd7ad0fa6fc82286106762bdf789189d8f88abd0a90f619",
|
|
161
|
+
]),
|
|
162
|
+
}),
|
|
163
|
+
]),
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
export const PM_STUDIO_RECIPES = Object.freeze([
|
|
167
|
+
PM_STUDIO_2_9_7_RECIPE,
|
|
168
|
+
PM_STUDIO_2_9_10_RECIPE,
|
|
169
|
+
]);
|
|
71
170
|
|
|
72
171
|
export function sha256Hex(value) {
|
|
73
172
|
return createHash("sha256").update(value).digest("hex");
|