@just-every/code 0.2.163 → 0.2.165

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 CHANGED
@@ -217,6 +217,7 @@ model_reasoning_summary = "detailed"
217
217
  - `CODEX_HOME`: Override config directory location
218
218
  - `OPENAI_API_KEY`: Use API key instead of ChatGPT auth
219
219
  - `OPENAI_BASE_URL`: Use alternative API endpoints
220
+ - `OPENAI_WIRE_API`: Force the built-in OpenAI provider to use `chat` or `responses` wiring
220
221
 
221
222
   
222
223
  ## FAQ
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@just-every/code",
3
- "version": "0.2.163",
3
+ "version": "0.2.165",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lightweight coding agent that runs in your terminal - fork of OpenAI Codex",
6
6
  "bin": {
@@ -35,10 +35,10 @@
35
35
  "prettier": "^3.3.3"
36
36
  },
37
37
  "optionalDependencies": {
38
- "@just-every/code-darwin-arm64": "0.2.163",
39
- "@just-every/code-darwin-x64": "0.2.163",
40
- "@just-every/code-linux-x64-musl": "0.2.163",
41
- "@just-every/code-linux-arm64-musl": "0.2.163",
42
- "@just-every/code-win32-x64": "0.2.163"
38
+ "@just-every/code-darwin-arm64": "0.2.165",
39
+ "@just-every/code-darwin-x64": "0.2.165",
40
+ "@just-every/code-linux-x64-musl": "0.2.165",
41
+ "@just-every/code-linux-arm64-musl": "0.2.165",
42
+ "@just-every/code-win32-x64": "0.2.165"
43
43
  }
44
44
  }
package/postinstall.js CHANGED
@@ -54,6 +54,26 @@ function getCachedBinaryPath(version, targetTriple, isWindows) {
54
54
  return join(cacheDir, `code-${targetTriple}${ext}`);
55
55
  }
56
56
 
57
+ const CODE_SHIM_SIGNATURES = [
58
+ '@just-every/code',
59
+ 'bin/coder.js',
60
+ '$(dirname "$0")/coder',
61
+ '%~dp0coder'
62
+ ];
63
+
64
+ function shimContentsLookOurs(contents) {
65
+ return CODE_SHIM_SIGNATURES.some(sig => contents.includes(sig));
66
+ }
67
+
68
+ function looksLikeOurCodeShim(path) {
69
+ try {
70
+ const contents = readFileSync(path, 'utf8');
71
+ return shimContentsLookOurs(contents);
72
+ } catch {
73
+ return false;
74
+ }
75
+ }
76
+
57
77
  function isWSL() {
58
78
  if (platform() !== 'linux') return false;
59
79
  try {
@@ -285,7 +305,7 @@ async function main() {
285
305
  } catch {
286
306
  contents = '';
287
307
  }
288
- const looksLikeOurs = contents.includes('@just-every/code') || contents.includes('bin/coder.js');
308
+ const looksLikeOurs = shimContentsLookOurs(contents);
289
309
  if (!looksLikeOurs) {
290
310
  console.warn('[notice] Found an existing `code` on PATH at:');
291
311
  console.warn(` ${resolved}`);
@@ -647,7 +667,13 @@ async function main() {
647
667
  const ourShim = globalBin ? join(globalBin, isWindows ? 'code.cmd' : 'code') : '';
648
668
  const candidates = resolveAllOnPath();
649
669
  const others = candidates.filter(p => p && (!ourShim || p !== ourShim));
650
- const collision = others.length > 0;
670
+ const ourShimExists = ourShim && existsSync(ourShim);
671
+ const shimLooksOurs = ourShimExists && looksLikeOurCodeShim(ourShim);
672
+ const conflictPaths = [
673
+ ...others,
674
+ ...(ourShimExists && !shimLooksOurs ? [ourShim] : []),
675
+ ];
676
+ const collision = conflictPaths.length > 0;
651
677
 
652
678
  const ensureWrapper = (name, args) => {
653
679
  if (!globalBin) return;
@@ -674,13 +700,23 @@ async function main() {
674
700
 
675
701
  if (collision) {
676
702
  console.error('⚠ Detected existing `code` on PATH:');
677
- for (const p of others) console.error(` - ${p}`);
703
+ for (const p of conflictPaths) console.error(` - ${p}`);
678
704
  if (globalBin) {
679
705
  try {
680
- if (existsSync(ourShim)) {
681
- unlinkSync(ourShim);
682
- console.error(`✓ Skipped global 'code' shim (removed ${ourShim})`);
683
- skippedCmds.push({ name: 'code', reason: `existing: ${others[0]}` });
706
+ if (ourShimExists) {
707
+ if (shimLooksOurs && others.length > 0) {
708
+ unlinkSync(ourShim);
709
+ console.error(`✓ Removed global 'code' shim (ours) at ${ourShim}`);
710
+ const reason = others[0] || ourShim;
711
+ skippedCmds.push({ name: 'code', reason: `existing: ${reason}` });
712
+ } else if (!shimLooksOurs) {
713
+ console.error(`✓ Skipped global 'code' shim (different CLI at ${ourShim})`);
714
+ const reason = conflictPaths[0] || ourShim;
715
+ skippedCmds.push({ name: 'code', reason: `existing: ${reason}` });
716
+ }
717
+ } else {
718
+ const reason = conflictPaths[0] || 'another command on PATH';
719
+ skippedCmds.push({ name: 'code', reason: `existing: ${reason}` });
684
720
  }
685
721
  } catch (e) {
686
722
  console.error(`⚠ Could not remove npm shim '${ourShim}': ${e.message}`);