oonacode 0.3.347 → 0.3.348
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 +25 -12
- package/bin/oona.js +40 -28
- package/package.json +5 -4
- package/postinstall.mjs +41 -16
package/README.md
CHANGED
|
@@ -25,15 +25,20 @@ oona web # open the local web UI
|
|
|
25
25
|
|
|
26
26
|
## Platform packages
|
|
27
27
|
|
|
28
|
-
| Platform | Package
|
|
29
|
-
| ------------- |
|
|
30
|
-
| Windows x64 | `@oonacode/win32-x64`
|
|
31
|
-
| Windows arm64 | —
|
|
32
|
-
| Linux x64 | `@oonacode/linux-x64`
|
|
33
|
-
| Linux arm64 | —
|
|
34
|
-
| macOS
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
| Platform | Package | Status |
|
|
29
|
+
| ------------- | ------------------------ | ------------------------------------------------------- |
|
|
30
|
+
| Windows x64 | `@oonacode/win32-x64` | shipped |
|
|
31
|
+
| Windows arm64 | — | later (x64 build runs under emulation) |
|
|
32
|
+
| Linux x64 | `@oonacode/linux-x64` | shipped with every release that carries Linux |
|
|
33
|
+
| Linux arm64 | — | later |
|
|
34
|
+
| macOS arm64 | `@oonacode/darwin-arm64` | shipped with every release that carries macOS (since 2026-11-17) |
|
|
35
|
+
| macOS x64 | `@oonacode/darwin-x64` | shipped with every release that carries macOS (since 2026-11-17) |
|
|
36
|
+
|
|
37
|
+
The wrapper always names every platform: a release that builds only some of them (a macOS-only
|
|
38
|
+
or Linux-only release, or a Windows release without the others) names the rest at the newest
|
|
39
|
+
version already on npm (`stage-npm.mjs --carry`), so `npm i -g oonacode` keeps working everywhere.
|
|
40
|
+
|
|
41
|
+
Each platform package carries `oona.exe` (the single-binary host + CLI; `oona` on Linux and macOS), the local
|
|
37
42
|
web UI assets (`web-ui/`), the provider registry and native addons (`build/`, `prebuilds/`). The
|
|
38
43
|
pinned Claude Code engine sidecar, `oonaclaude.exe`, is in it only when the release bundled it;
|
|
39
44
|
otherwise the PC downloads it once into its own store on the first message (`docs/engine-once.md`).
|
|
@@ -44,18 +49,26 @@ it can never be confused with, or collide with, your own `claude` on PATH.
|
|
|
44
49
|
|
|
45
50
|
## How `oona` resolves the binary
|
|
46
51
|
|
|
47
|
-
`bin/oona.js` looks for, in order: `bin/oona.exe` (linked by postinstall) → `@oonacode
|
|
52
|
+
`bin/oona.js` looks for, in order: `bin/oona.exe` (`bin/oona` on Linux and macOS, linked by postinstall) → `@oonacode/<platform>-<arch>/oona[.exe]`
|
|
48
53
|
in place → the JS CLI `@oonacode/cli/dist/main.js` when that package is a dependency (developer
|
|
49
54
|
installs; slower start, needs an engine reachable via `OONACODE_CLAUDE_BIN`). The binary runs with
|
|
50
55
|
inherited stdio and its exit code is forwarded verbatim. If nothing is found it prints how to fix
|
|
51
|
-
it, including the
|
|
56
|
+
it, including the one-line installer for the platform:
|
|
52
57
|
|
|
53
58
|
```
|
|
54
|
-
irm https://oonacode.oonak.ai/install.ps1 | iex
|
|
59
|
+
irm https://oonacode.oonak.ai/install.ps1 | iex # Windows
|
|
60
|
+
curl -fsSL https://oonacode.oonak.ai/install.sh | bash # Linux, macOS
|
|
55
61
|
```
|
|
56
62
|
|
|
57
63
|
## Notes
|
|
58
64
|
|
|
65
|
+
- **macOS.** The packages carry the build the terminal installer puts on a Mac: ad-hoc signed
|
|
66
|
+
(no Apple Developer ID yet). npm downloads it with its own HTTP client, which sets no quarantine
|
|
67
|
+
attribute, so Gatekeeper never assesses it. npm installs the terminal half only; `oona update`
|
|
68
|
+
(the terminal installer) adds the background host's LaunchAgent and `OonaCode.app`. An Intel
|
|
69
|
+
(x64) Node on Apple Silicon installs the Intel build, which Rosetta 2 cannot run before macOS 15:
|
|
70
|
+
use a native arm64 Node there (the postinstall and the shim both say so).
|
|
71
|
+
|
|
59
72
|
- **pnpm / bun block lifecycle scripts by default.** Without the postinstall the wrapper still
|
|
60
73
|
works (it resolves the platform package in place); linking only removes one resolution step.
|
|
61
74
|
- Set `OONACODE_SKIP_POSTINSTALL=1` to skip the link step entirely.
|
package/bin/oona.js
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* The native binary is spawned with inherited stdio and its exit code is forwarded verbatim, so
|
|
16
16
|
* `oona -p ... --output-format json` works in pipes exactly like the bare executable.
|
|
17
17
|
*
|
|
18
|
-
* Windows
|
|
19
|
-
*
|
|
18
|
+
* Windows x64, Linux x64 and macOS (Apple Silicon and Intel, since 2026-11-17) are on npm; Windows
|
|
19
|
+
* and Linux arm64 builds are not published — see README.md.
|
|
20
20
|
*/
|
|
21
21
|
const fs = require('fs');
|
|
22
22
|
const path = require('path');
|
|
@@ -25,11 +25,14 @@ const { spawn } = require('child_process');
|
|
|
25
25
|
const PLATFORM_PACKAGES = {
|
|
26
26
|
'win32-x64': '@oonacode/win32-x64',
|
|
27
27
|
'linux-x64': '@oonacode/linux-x64',
|
|
28
|
+
// macOS: the payload of the release's darwin tarballs — the build install.sh puts on a Mac,
|
|
29
|
+
// ad-hoc signed (no Apple Developer ID yet). npm's own download sets no quarantine attribute, so
|
|
30
|
+
// Gatekeeper never assesses it, exactly as with `curl … | bash`.
|
|
31
|
+
'darwin-arm64': '@oonacode/darwin-arm64',
|
|
32
|
+
'darwin-x64': '@oonacode/darwin-x64',
|
|
28
33
|
// 'win32-arm64': 'oonacode-win32-arm64', // deferred
|
|
29
34
|
// 'linux-arm64': 'oonacode-linux-arm64', // deferred — install.sh refuses aarch64 for the
|
|
30
35
|
// same reason: nothing is published for it
|
|
31
|
-
// 'darwin-x64': 'oonacode-darwin-x64', // no npm package: macOS installs with install.sh
|
|
32
|
-
// 'darwin-arm64': 'oonacode-darwin-arm64', // not built yet
|
|
33
36
|
};
|
|
34
37
|
|
|
35
38
|
const IS_WIN = process.platform === 'win32';
|
|
@@ -41,33 +44,39 @@ const EXE_NAME = IS_WIN ? 'oona.exe' : 'oona';
|
|
|
41
44
|
const ENGINE_NAMES = IS_WIN ? ['oonaclaude.exe', 'claude.exe'] : ['oonaclaude', 'claude'];
|
|
42
45
|
const PLATFORM_KEY = `${process.platform}-${process.arch}`;
|
|
43
46
|
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
// The one-line installer for THIS platform: PowerShell on Windows, install.sh on Linux and macOS.
|
|
48
|
+
const ONE_LINER = IS_WIN
|
|
49
|
+
? 'irm https://oonacode.oonak.ai/install.ps1 | iex'
|
|
50
|
+
: 'curl -fsSL https://oonacode.oonak.ai/install.sh | bash';
|
|
51
|
+
|
|
52
|
+
const INSTALL_HINT = [
|
|
53
|
+
`oonacode: no native binary found for ${PLATFORM_KEY}.`,
|
|
54
|
+
'',
|
|
55
|
+
PLATFORM_PACKAGES[PLATFORM_KEY]
|
|
56
|
+
? ` The platform package "${PLATFORM_PACKAGES[PLATFORM_KEY]}" is missing or was installed without its postinstall step.`
|
|
57
|
+
: ` Prebuilt binaries for ${PLATFORM_KEY} are not published yet (Windows x64, Linux x64 and macOS are).`,
|
|
58
|
+
'',
|
|
59
|
+
' Fixes:',
|
|
60
|
+
' - npm: reinstall with optional dependencies enabled (do not use --no-optional / --omit=optional)',
|
|
61
|
+
' - pnpm: allow the trusted postinstall: pnpm approve-builds (or add "oonacode" to pnpm.onlyBuiltDependencies)',
|
|
62
|
+
' - bun: bun pm trust oonacode',
|
|
63
|
+
' - or install without npm:',
|
|
64
|
+
` ${ONE_LINER}`,
|
|
50
65
|
'',
|
|
51
66
|
].join('\n');
|
|
52
67
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
' - pnpm: allow the trusted postinstall: pnpm approve-builds (or add "oonacode" to pnpm.onlyBuiltDependencies)',
|
|
66
|
-
' - bun: bun pm trust oonacode',
|
|
67
|
-
' - or install without npm (recommended on Windows):',
|
|
68
|
-
' irm https://oonacode.oonak.ai/install.ps1 | iex',
|
|
69
|
-
'',
|
|
70
|
-
].join('\n');
|
|
68
|
+
// An Intel (x64) Node on an Apple Silicon Mac makes npm install the Intel build, and under Rosetta 2
|
|
69
|
+
// that build gets no AVX before macOS 15: it dies at its first instruction (SIGILL,
|
|
70
|
+
// docs/macos-port.md §13). Said when it happens, with the way out.
|
|
71
|
+
const ROSETTA_HINT = [
|
|
72
|
+
'',
|
|
73
|
+
'oonacode: the Intel build of OonaCode was stopped by an illegal instruction. On an Apple Silicon',
|
|
74
|
+
'Mac this is an Intel (x64) Node installing @oonacode/darwin-x64, which Rosetta 2 cannot run',
|
|
75
|
+
'before macOS 15. Reinstall with a native arm64 Node (`node -p process.arch` must say arm64), or',
|
|
76
|
+
'install without npm:',
|
|
77
|
+
' curl -fsSL https://oonacode.oonak.ai/install.sh | bash',
|
|
78
|
+
'',
|
|
79
|
+
].join('\n');
|
|
71
80
|
|
|
72
81
|
function exists(p) {
|
|
73
82
|
try {
|
|
@@ -194,6 +203,9 @@ function run() {
|
|
|
194
203
|
process.exit(1);
|
|
195
204
|
});
|
|
196
205
|
child.on('exit', (code, signal) => {
|
|
206
|
+
if (signal === 'SIGILL' && process.platform === 'darwin' && process.arch === 'x64') {
|
|
207
|
+
process.stderr.write(ROSETTA_HINT);
|
|
208
|
+
}
|
|
197
209
|
if (signal) {
|
|
198
210
|
// Mirror a signal death as the conventional 128+n exit code (130 for SIGINT).
|
|
199
211
|
const n = require('os').constants.signals[signal] || 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oonacode",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "OonaCode —
|
|
3
|
+
"version": "0.3.348",
|
|
4
|
+
"description": "OonaCode — multi-provider coding agent: the `oona` CLI, headless host service and local web UI. npm wrapper; the native binary is installed through the per-platform optional dependency.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"homepage": "https://oonacode.oonak.ai",
|
|
@@ -32,9 +32,10 @@
|
|
|
32
32
|
],
|
|
33
33
|
"scripts": {
|
|
34
34
|
"postinstall": "node postinstall.mjs",
|
|
35
|
-
"test": "node --test test/wrapper.test.js test/packaging-scripts.test.js test/uninstall-scripts.test.js test/release-feed.test.js test/manifests.test.js test/set-version.test.js test/npm-stage.test.js test/ship-plan.test.js test/ship-checks.test.js test/release-platforms.test.js"
|
|
35
|
+
"test": "node --test test/wrapper.test.js test/packaging-scripts.test.js test/uninstall-scripts.test.js test/release-feed.test.js test/manifests.test.js test/set-version.test.js test/npm-stage.test.js test/ship-plan.test.js test/ship-checks.test.js test/release-platforms.test.js test/homebrew.test.js"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"@oonacode/win32-x64": "0.3.
|
|
38
|
+
"@oonacode/win32-x64": "0.3.348",
|
|
39
|
+
"@oonacode/linux-x64": "0.3.332"
|
|
39
40
|
}
|
|
40
41
|
}
|
package/postinstall.mjs
CHANGED
|
@@ -10,9 +10,10 @@
|
|
|
10
10
|
*
|
|
11
11
|
* registry.json has to sit beside the LINKED binary, not only in the platform package: a compiled
|
|
12
12
|
* oona.exe finds the provider registry only as `<dir of the executable>/registry.json`
|
|
13
|
-
* (host-service provider-service.ts), and the host refuses to start without one. On Linux
|
|
14
|
-
* binaries also get their exec bit here — a package packed on Windows carries no POSIX mode, and
|
|
15
|
-
* an engine that cannot be spawned hangs the SDK instead of failing.
|
|
13
|
+
* (host-service provider-service.ts), and the host refuses to start without one. On Linux and macOS
|
|
14
|
+
* the binaries also get their exec bit here — a package packed on Windows carries no POSIX mode, and
|
|
15
|
+
* an engine that cannot be spawned hangs the SDK instead of failing. On macOS a hard link is the
|
|
16
|
+
* same file, so `oona`'s ad-hoc signature (the one Apple Silicon requires) comes with it unchanged.
|
|
16
17
|
*
|
|
17
18
|
* `oonaclaude(.exe)` is a byte-for-byte copy of the pinned, UNMODIFIED Claude Code binary from the
|
|
18
19
|
* Claude Agent SDK. OonaCode does not fork or patch it — the filename differs only so it can never be
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
* (the platform package there is a skeleton without binaries: the published copy is staged outside the
|
|
27
28
|
* repo by packaging/scripts/stage-npm.mjs).
|
|
28
29
|
*/
|
|
30
|
+
import { execFileSync } from 'node:child_process';
|
|
29
31
|
import { createRequire } from 'node:module';
|
|
30
32
|
import fs from 'node:fs';
|
|
31
33
|
import path from 'node:path';
|
|
@@ -40,6 +42,10 @@ const PLATFORM_PACKAGES = {
|
|
|
40
42
|
// it at runtime, but without an entry here the postinstall linked nothing, so a Linux install
|
|
41
43
|
// had to pay the resolve on every invocation instead of once.
|
|
42
44
|
'linux-x64': '@oonacode/linux-x64',
|
|
45
|
+
// macOS joined on 2026-11-17: the payload of the release's darwin tarballs (ad-hoc signed; npm's
|
|
46
|
+
// download is not quarantined, so Gatekeeper never assesses it — the terminal installer's reason).
|
|
47
|
+
'darwin-arm64': '@oonacode/darwin-arm64',
|
|
48
|
+
'darwin-x64': '@oonacode/darwin-x64',
|
|
43
49
|
};
|
|
44
50
|
const IS_WIN = process.platform === 'win32';
|
|
45
51
|
const EXE_NAME = IS_WIN ? 'oona.exe' : 'oona';
|
|
@@ -50,11 +56,34 @@ const LINKED_DIRS = ['web-ui', 'build', 'prebuilds', 'lib'];
|
|
|
50
56
|
const LINKED_FILES = ['registry.json'];
|
|
51
57
|
|
|
52
58
|
const log = (msg) => console.log(`[oonacode] ${msg}`);
|
|
59
|
+
const ONE_LINER = IS_WIN
|
|
60
|
+
? 'irm https://oonacode.oonak.ai/install.ps1 | iex'
|
|
61
|
+
: 'curl -fsSL https://oonacode.oonak.ai/install.sh | bash';
|
|
53
62
|
const INSTALL_HINT =
|
|
54
|
-
|
|
63
|
+
`Install the native build with: ${ONE_LINER}\n` +
|
|
55
64
|
'[oonacode] or re-run the install with optional dependencies + postinstall scripts enabled ' +
|
|
56
65
|
'(pnpm: `pnpm approve-builds`, bun: `bun pm trust oonacode`).';
|
|
57
66
|
|
|
67
|
+
/**
|
|
68
|
+
* True when this Node is an Intel build running under Rosetta 2 on Apple Silicon. npm then picks
|
|
69
|
+
* @oonacode/darwin-x64, which Rosetta 2 cannot run before macOS 15 (no AVX — docs/macos-port.md
|
|
70
|
+
* §13). Never throws: an unknown answer is "no".
|
|
71
|
+
*/
|
|
72
|
+
function underRosetta() {
|
|
73
|
+
if (process.platform !== 'darwin' || process.arch !== 'x64') return false;
|
|
74
|
+
try {
|
|
75
|
+
return (
|
|
76
|
+
execFileSync('/usr/sbin/sysctl', ['-in', 'sysctl.proc_translated'], {
|
|
77
|
+
encoding: 'utf8',
|
|
78
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
79
|
+
timeout: 3000,
|
|
80
|
+
}).trim() === '1'
|
|
81
|
+
);
|
|
82
|
+
} catch {
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
58
87
|
function insideMonorepo() {
|
|
59
88
|
const root = path.resolve(here, '..', '..', '..');
|
|
60
89
|
return (
|
|
@@ -102,21 +131,17 @@ function main() {
|
|
|
102
131
|
const key = `${process.platform}-${process.arch}`;
|
|
103
132
|
const pkgName = PLATFORM_PACKAGES[key];
|
|
104
133
|
if (!pkgName) {
|
|
105
|
-
|
|
106
|
-
// Built (packaging/mac-builder.sh) but not published: the macOS app is unsigned, and Apple
|
|
107
|
-
// signing is the owner's decision (2026-10-03). Never a failure: the hint is the answer.
|
|
108
|
-
log(
|
|
109
|
-
`OonaCode publishes no macOS build yet (${key}): it is not signed yet, so npm has nothing to install on a Mac.`,
|
|
110
|
-
);
|
|
111
|
-
log(
|
|
112
|
-
'a local build installs with: packaging/install.sh --archive oonacode-darwin-<arch>.tar.gz',
|
|
113
|
-
);
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
log(`no prebuilt binary is published for ${key} yet (Windows and Linux x64 first).`);
|
|
134
|
+
log(`no prebuilt binary is published for ${key} yet (Windows x64, Linux x64 and macOS are).`);
|
|
117
135
|
log(INSTALL_HINT);
|
|
118
136
|
return;
|
|
119
137
|
}
|
|
138
|
+
if (underRosetta()) {
|
|
139
|
+
// Never a failure (the Mac may be on macOS 15, where Rosetta 2 runs it); the warning is the
|
|
140
|
+
// whole answer if it is not.
|
|
141
|
+
log('warning: this is an Intel (x64) Node under Rosetta 2 on an Apple Silicon Mac, so npm');
|
|
142
|
+
log('installed the Intel build, which Rosetta 2 cannot run before macOS 15. A native arm64');
|
|
143
|
+
log('Node installs the Apple Silicon build; or install without npm: ' + ONE_LINER);
|
|
144
|
+
}
|
|
120
145
|
|
|
121
146
|
let pkgDir;
|
|
122
147
|
try {
|