omniharness-cli 0.1.16 → 0.1.17

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
@@ -7,12 +7,14 @@ learns from past outcomes — while OmniRoute stays responsible for routing mode
7
7
  requests to providers.
8
8
 
9
9
  This package is a thin wrapper around the self-contained OmniHarness binary;
10
- the `omniharness` command is the binary itself.
10
+ the `omniharness` command is installed by npm and forwards to the bundled binary.
11
11
 
12
12
  ## Install
13
13
 
14
14
  ```sh
15
15
  npm install -g omniharness-cli
16
+ # If PowerShell still cannot find it, open a new terminal so npm's global bin
17
+ # directory is reloaded into PATH.
16
18
  ```
17
19
 
18
20
  ## Quick start
package/cli.js ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ // omniharness-cli launcher: runs the platform-specific prebuilt binary.
3
+ // The binary is self-contained; this shim only locates and spawns it.
4
+ 'use strict';
5
+
6
+ const { spawnSync } = require('child_process');
7
+ const fs = require('fs');
8
+ const path = require('path');
9
+
10
+ const platform = process.platform;
11
+ const arch = process.arch;
12
+ const exe = platform === 'win32' ? 'omniharness.exe' : 'omniharness';
13
+ const binPath = path.join(__dirname, 'vendor', `${platform}-${arch}`, exe);
14
+
15
+ if (!fs.existsSync(binPath)) {
16
+ console.error(
17
+ `omniharness-cli: no prebuilt binary for ${platform}-${arch}.\n` +
18
+ 'This package ships binaries for the platforms listed in its package.json ' +
19
+ '"os"/"cpu" fields. Build one with scripts/release-npm.sh.'
20
+ );
21
+ process.exit(1);
22
+ }
23
+
24
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
25
+ if (result.error) {
26
+ console.error(`omniharness-cli: failed to launch ${binPath}: ${result.error.message}`);
27
+ process.exit(1);
28
+ }
29
+ process.exit(result.status === null ? 1 : result.status);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omniharness-cli",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "OmniHarness — local-first agent orchestration harness for OmniRoute.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -8,10 +8,11 @@
8
8
  "url": "https://github.com/mattycigemp-crypto/omniharness.git"
9
9
  },
10
10
  "bin": {
11
- "omniharness": "dist/cli.js"
11
+ "omniharness": "cli.js"
12
12
  },
13
13
  "files": [
14
- "dist/",
14
+ "cli.js",
15
+ "vendor/",
15
16
  "README.md"
16
17
  ],
17
18
  "scripts": {
Binary file