codo-ai 2.23.12 → 2.23.13

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
@@ -100,6 +100,8 @@ npx codo-ai
100
100
 
101
101
  Requirements: Node 18+ or Bun · macOS / Linux / Windows · any provider API key (Anthropic, OpenAI, NVIDIA free tier, Google, or OpenAI-compatible).
102
102
 
103
+ > No extra flags needed: the install works out of the box even when install scripts are blocked (`allowScripts` policies, `--ignore-scripts`), because the launcher resolves the prebuilt platform binary automatically on first run.
104
+
103
105
  > Migrating from `@codo-ai/cli`? That package is deprecated — `codo-ai` replaces it.
104
106
 
105
107
  ## Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codo-ai",
3
- "description": "The security-native AI coding agent. Six Sec-Test security personas, compliance-first /scraper, a business documents & research suite, and multi-agent Compose orchestration — spec-driven workflow engines in one terminal-first CLI.",
3
+ "description": "The security-native AI coding agent. Six Sec-Test security personas, compliance-first /scraper, a business documents & research suite, and multi-agent Compose orchestration - spec-driven workflow engines in one terminal-first CLI.",
4
4
  "keywords": [
5
5
  "ai",
6
6
  "coding-agent",
@@ -32,7 +32,7 @@
32
32
  "scripts": {
33
33
  "postinstall": "node ./postinstall.mjs"
34
34
  },
35
- "version": "2.23.12",
35
+ "version": "2.23.13",
36
36
  "license": "MIT",
37
37
  "os": [
38
38
  "darwin",
@@ -44,17 +44,17 @@
44
44
  "x64"
45
45
  ],
46
46
  "optionalDependencies": {
47
- "@codo-ai/codo-windows-x64-baseline": "2.23.12",
48
- "@codo-ai/codo-windows-x64": "2.23.12",
49
- "@codo-ai/codo-windows-arm64": "2.23.12",
50
- "@codo-ai/codo-linux-x64-musl": "2.23.12",
51
- "@codo-ai/codo-linux-x64-baseline-musl": "2.23.12",
52
- "@codo-ai/codo-linux-x64-baseline": "2.23.12",
53
- "@codo-ai/codo-linux-x64": "2.23.12",
54
- "@codo-ai/codo-linux-arm64-musl": "2.23.12",
55
- "@codo-ai/codo-linux-arm64": "2.23.12",
56
- "@codo-ai/codo-darwin-x64-baseline": "2.23.12",
57
- "@codo-ai/codo-darwin-x64": "2.23.12",
58
- "@codo-ai/codo-darwin-arm64": "2.23.12"
47
+ "@codo-ai/codo-windows-x64-baseline": "2.23.13",
48
+ "@codo-ai/codo-windows-x64": "2.23.13",
49
+ "@codo-ai/codo-windows-arm64": "2.23.13",
50
+ "@codo-ai/codo-linux-x64-musl": "2.23.13",
51
+ "@codo-ai/codo-linux-x64-baseline-musl": "2.23.13",
52
+ "@codo-ai/codo-linux-x64-baseline": "2.23.13",
53
+ "@codo-ai/codo-linux-x64": "2.23.13",
54
+ "@codo-ai/codo-linux-arm64-musl": "2.23.13",
55
+ "@codo-ai/codo-linux-arm64": "2.23.13",
56
+ "@codo-ai/codo-darwin-x64-baseline": "2.23.13",
57
+ "@codo-ai/codo-darwin-x64": "2.23.13",
58
+ "@codo-ai/codo-darwin-arm64": "2.23.13"
59
59
  }
60
- }
60
+ }
package/postinstall.mjs CHANGED
@@ -171,22 +171,39 @@ function copyBinary(source, target) {
171
171
  fs.chmodSync(target, 0o755)
172
172
  }
173
173
 
174
- function verifyBinary() {
175
- const result = childProcess.spawnSync(targetBinary, ["--version"], {
176
- encoding: "utf8",
177
- stdio: "ignore",
178
- windowsHide: true,
179
- })
180
- return result.status === 0
174
+ function verifyBinary(target = targetBinary) {
175
+ try {
176
+ const result = childProcess.spawnSync(target, ["--version"], {
177
+ encoding: "utf8",
178
+ stdio: "ignore",
179
+ windowsHide: true,
180
+ })
181
+ return result.status === 0
182
+ } catch {
183
+ return false
184
+ }
181
185
  }
182
186
 
183
187
  function main() {
188
+ // Fast path: npm installs optionalDependencies by default, so the platform
189
+ // binary is usually already on disk. The launcher resolves it at runtime,
190
+ // so there is nothing to copy — just validate it actually runs.
184
191
  for (const name of packageNames()) {
185
192
  try {
186
- copyBinary(resolveBinary(name), targetBinary)
187
- if (verifyBinary()) return
193
+ if (verifyBinary(resolveBinary(name))) return
188
194
  } catch {
195
+ // Package not installed; try the next candidate, then the fallback below.
196
+ }
197
+ }
198
+
199
+ // Fallback: the platform package is missing (isolated pnpm layouts,
200
+ // --no-optional installs). Fetch it into a temp dir and stage the binary
201
+ // next to the launcher, where the launcher looks for it.
202
+ for (const name of packageNames()) {
203
+ try {
189
204
  if (installPackage(name) && verifyBinary()) return
205
+ } catch {
206
+ // Try the next candidate.
190
207
  }
191
208
  }
192
209