@seqyuan/annodex 0.1.54 → 0.1.55
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +6 -6
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/required-server-files.js +1 -1
- package/.next/required-server-files.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/api/internal/runtime/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/docs/changelog.html +2 -2
- package/.next/server/app/docs/changelog.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/_full.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/_head.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/_index.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/docs/changelog/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/docs/changelog.segment.rsc +1 -1
- package/.next/server/app/docs/changelog.segments/docs.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +1 -1
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +1 -1
- package/.next/server/app/login.segments/_full.segment.rsc +1 -1
- package/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/server/app/login.segments/_index.segment.rsc +1 -1
- package/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/server/app/workspace/page.js +2 -2
- package/.next/server/app/workspace/page_client-reference-manifest.js +1 -1
- package/.next/server/app/workspace.html +1 -1
- package/.next/server/app/workspace.rsc +2 -2
- package/.next/server/app/workspace.segments/_full.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/_head.segment.rsc +1 -1
- package/.next/server/app/workspace.segments/_index.segment.rsc +1 -1
- package/.next/server/app/workspace.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/workspace.segments/workspace/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/workspace.segments/workspace.segment.rsc +1 -1
- package/.next/server/app-paths-manifest.json +6 -6
- package/.next/server/chunks/6983.js +3 -3
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/app/workspace/{page-cccacfa255ff7d01.js → page-249489e08420f59d.js} +2 -2
- package/lib/macos-codex-security.js +61 -1
- package/package.json +1 -1
- /package/.next/static/{CSz6uFOkLtpKpHvCD1S5n → vW2g3YlVaZErFy9-fsfCO}/_buildManifest.js +0 -0
- /package/.next/static/{CSz6uFOkLtpKpHvCD1S5n → vW2g3YlVaZErFy9-fsfCO}/_ssgManifest.js +0 -0
|
@@ -220,6 +220,51 @@ function looksLikeNativeCodexBinary(filePath) {
|
|
|
220
220
|
return base === "codex" || base === "codex.exe";
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
/** Given a codex executable path (may be a JS shim), find the real native binary. */
|
|
224
|
+
function resolveNativeBinaryFromShim(executablePath) {
|
|
225
|
+
if (!executablePath || !fs.existsSync(executablePath)) return null;
|
|
226
|
+
// If it's already a native binary (inside vendor/), return as-is
|
|
227
|
+
if (/vendor[/\\]/.test(executablePath)) return executablePath;
|
|
228
|
+
|
|
229
|
+
// Check if it's a JS shim (e.g. node_modules/.bin/codex)
|
|
230
|
+
try {
|
|
231
|
+
const content = fs.readFileSync(executablePath, "utf8").slice(0, 512);
|
|
232
|
+
if (content.includes("node") || content.includes("#!/")) {
|
|
233
|
+
// This is a shim/script — find the native binary nearby
|
|
234
|
+
const shimDir = path.dirname(executablePath);
|
|
235
|
+
const nodeModulesDir = path.join(shimDir, "..");
|
|
236
|
+
|
|
237
|
+
const platform = process.platform;
|
|
238
|
+
const arch = process.arch;
|
|
239
|
+
let pkgName;
|
|
240
|
+
let triple;
|
|
241
|
+
if (platform === "darwin") {
|
|
242
|
+
if (arch === "arm64") { pkgName = "codex-darwin-arm64"; triple = "aarch64-apple-darwin"; }
|
|
243
|
+
else if (arch === "x64") { pkgName = "codex-darwin-x64"; triple = "x86_64-apple-darwin"; }
|
|
244
|
+
else return null;
|
|
245
|
+
} else {
|
|
246
|
+
return null;
|
|
247
|
+
}
|
|
248
|
+
const binaryName = "codex";
|
|
249
|
+
|
|
250
|
+
const subPaths = [
|
|
251
|
+
path.join("vendor", triple, "bin", binaryName),
|
|
252
|
+
path.join("vendor", triple, "codex", binaryName),
|
|
253
|
+
];
|
|
254
|
+
for (const sub of subPaths) {
|
|
255
|
+
const candidate = path.join(nodeModulesDir, "@openai", pkgName, sub);
|
|
256
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
257
|
+
}
|
|
258
|
+
// Also try nested layout
|
|
259
|
+
for (const sub of subPaths) {
|
|
260
|
+
const candidate = path.join(nodeModulesDir, "@openai", "codex", "node_modules", "@openai", pkgName, sub);
|
|
261
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
} catch { /* ignore */ }
|
|
265
|
+
return executablePath;
|
|
266
|
+
}
|
|
267
|
+
|
|
223
268
|
function repairMacOSCodexPaths(binaryPaths, { force = false, mode = "doctor" } = {}) {
|
|
224
269
|
if (!isDarwin()) return [];
|
|
225
270
|
const seen = new Set();
|
|
@@ -273,8 +318,22 @@ function prepareMacOSCodexForSpawn(executablePath, cwd) {
|
|
|
273
318
|
if (!isDarwin()) return { quarantine: { cleared: 0, paths: [] }, repairs: [] };
|
|
274
319
|
|
|
275
320
|
const quarantine = { cleared: 0, paths: [], skipped: true };
|
|
321
|
+
if (!executablePath) return { quarantine, repairs: [] };
|
|
322
|
+
|
|
323
|
+
// If the resolved executable is a JS shim (e.g. node_modules/.bin/codex),
|
|
324
|
+
// find and repair the underlying native binary instead.
|
|
325
|
+
// Spawning the shim causes Node to exec the native binary as a grandchild,
|
|
326
|
+
// which macOS Gatekeeper may kill even after ad-hoc signing of the shim itself.
|
|
327
|
+
const resolvedNative = resolveNativeBinaryFromShim(executablePath);
|
|
328
|
+
if (resolvedNative && resolvedNative !== executablePath) {
|
|
329
|
+
console.log(
|
|
330
|
+
`[codex-server] Resolved native codex binary from shim: ${executablePath} -> ${resolvedNative}`,
|
|
331
|
+
);
|
|
332
|
+
prepareMacOSCodexForSpawn(resolvedNative, cwd);
|
|
333
|
+
return { quarantine, repairs: [], shimResolved: resolvedNative };
|
|
334
|
+
}
|
|
276
335
|
|
|
277
|
-
if (!
|
|
336
|
+
if (!looksLikeNativeCodexBinary(executablePath)) {
|
|
278
337
|
return { quarantine, repairs: [] };
|
|
279
338
|
}
|
|
280
339
|
if (isBinaryPrepared(executablePath) || preparingBinaries.has(executablePath)) {
|
|
@@ -312,5 +371,6 @@ module.exports = {
|
|
|
312
371
|
needsRevokedCertRepair,
|
|
313
372
|
clearMacOSQuarantine,
|
|
314
373
|
repairMacOSCodexPaths,
|
|
374
|
+
resolveNativeBinaryFromShim,
|
|
315
375
|
prepareMacOSCodexForSpawn,
|
|
316
376
|
};
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|