@keydris/cli 0.1.0-next.2 → 0.1.6

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.
Files changed (3) hide show
  1. package/README.md +20 -20
  2. package/bin/keydris.js +76 -76
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -1,20 +1,20 @@
1
- # @keydris/cli
2
-
3
- npm distribution for the native Keydris CLI.
4
-
5
- ```bash
6
- npm install --global @keydris/cli
7
- keydris init
8
- ```
9
-
10
- The JavaScript package is a launcher. npm installs the matching native Keydris
11
- binary for the current operating system and architecture as an optional
12
- dependency. The complete proxy, identity, Claude Code, and OpenAI Codex
13
- implementation remains in the native binary.
14
-
15
- Do not install with `--omit=optional`; that omits the platform binary. A global
16
- installation is recommended when using the long-running `keydris proxy`.
17
-
18
- This package performs no privileged work during installation. Trust-store
19
- changes happen only when explicitly requested through
20
- `keydris init --trust-store`.
1
+ # @keydris/cli
2
+
3
+ npm distribution for the native Keydris CLI.
4
+
5
+ ```bash
6
+ npm install --global @keydris/cli
7
+ keydris init
8
+ ```
9
+
10
+ The JavaScript package is a launcher. npm installs the matching native Keydris
11
+ binary for the current operating system and architecture as an optional
12
+ dependency. The complete proxy, identity, Claude Code, and OpenAI Codex
13
+ implementation remains in the native binary.
14
+
15
+ Do not install with `--omit=optional`; that omits the platform binary. A global
16
+ installation is recommended when using the long-running `keydris proxy`.
17
+
18
+ This package performs no privileged work during installation. Trust-store
19
+ changes happen only when explicitly requested through
20
+ `keydris init --trust-store`.
package/bin/keydris.js CHANGED
@@ -1,76 +1,76 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawnSync } from "node:child_process";
4
- import { chmodSync } from "node:fs";
5
- import { createRequire } from "node:module";
6
-
7
- const require = createRequire(import.meta.url);
8
-
9
- const nativePackages = new Map([
10
- ["win32-x64", "@keydris/cli-win32-x64"],
11
- ["win32-arm64", "@keydris/cli-win32-arm64"],
12
- ["darwin-x64", "@keydris/cli-darwin-x64"],
13
- ["darwin-arm64", "@keydris/cli-darwin-arm64"],
14
- ["linux-x64", "@keydris/cli-linux-x64"],
15
- ["linux-arm64", "@keydris/cli-linux-arm64"]
16
- ]);
17
-
18
- const target = `${process.platform}-${process.arch}`;
19
- const nativePackage = nativePackages.get(target);
20
-
21
- if (!nativePackage) {
22
- console.error(
23
- `keydris: unsupported platform ${process.platform}/${process.arch}`
24
- );
25
- process.exit(1);
26
- }
27
-
28
- let executable;
29
- try {
30
- executable = require.resolve(nativePackage);
31
- } catch {
32
- console.error(`keydris: native package ${nativePackage} is unavailable.`);
33
- console.error(
34
- "Reinstall @keydris/cli without --omit=optional, then try again."
35
- );
36
- process.exit(1);
37
- }
38
-
39
- function launch() {
40
- return spawnSync(executable, process.argv.slice(2), {
41
- stdio: "inherit",
42
- windowsHide: false,
43
- env: {
44
- ...process.env,
45
- KEYDRIS_DISTRIBUTION: "npm"
46
- }
47
- });
48
- }
49
-
50
- let result = launch();
51
- if (process.platform !== "win32" && result.error?.code === "EACCES") {
52
- try {
53
- chmodSync(executable, 0o755);
54
- result = launch();
55
- } catch (error) {
56
- console.error(
57
- `keydris: native binary is not executable and its permissions could not be repaired: ${error.message}`
58
- );
59
- process.exit(1);
60
- }
61
- }
62
-
63
- if (result.error) {
64
- console.error(`keydris: failed to launch native binary: ${result.error.message}`);
65
- process.exit(1);
66
- }
67
-
68
- if (result.signal) {
69
- try {
70
- process.kill(process.pid, result.signal);
71
- } catch {
72
- process.exit(1);
73
- }
74
- } else {
75
- process.exit(result.status ?? 1);
76
- }
1
+ #!/usr/bin/env node
2
+
3
+ import { spawnSync } from "node:child_process";
4
+ import { chmodSync } from "node:fs";
5
+ import { createRequire } from "node:module";
6
+
7
+ const require = createRequire(import.meta.url);
8
+
9
+ const nativePackages = new Map([
10
+ ["win32-x64", "@keydris/cli-win32-x64"],
11
+ ["win32-arm64", "@keydris/cli-win32-arm64"],
12
+ ["darwin-x64", "@keydris/cli-darwin-x64"],
13
+ ["darwin-arm64", "@keydris/cli-darwin-arm64"],
14
+ ["linux-x64", "@keydris/cli-linux-x64"],
15
+ ["linux-arm64", "@keydris/cli-linux-arm64"]
16
+ ]);
17
+
18
+ const target = `${process.platform}-${process.arch}`;
19
+ const nativePackage = nativePackages.get(target);
20
+
21
+ if (!nativePackage) {
22
+ console.error(
23
+ `keydris: unsupported platform ${process.platform}/${process.arch}`
24
+ );
25
+ process.exit(1);
26
+ }
27
+
28
+ let executable;
29
+ try {
30
+ executable = require.resolve(nativePackage);
31
+ } catch {
32
+ console.error(`keydris: native package ${nativePackage} is unavailable.`);
33
+ console.error(
34
+ "Reinstall @keydris/cli without --omit=optional, then try again."
35
+ );
36
+ process.exit(1);
37
+ }
38
+
39
+ function launch() {
40
+ return spawnSync(executable, process.argv.slice(2), {
41
+ stdio: "inherit",
42
+ windowsHide: false,
43
+ env: {
44
+ ...process.env,
45
+ KEYDRIS_DISTRIBUTION: "npm"
46
+ }
47
+ });
48
+ }
49
+
50
+ let result = launch();
51
+ if (process.platform !== "win32" && result.error?.code === "EACCES") {
52
+ try {
53
+ chmodSync(executable, 0o755);
54
+ result = launch();
55
+ } catch (error) {
56
+ console.error(
57
+ `keydris: native binary is not executable and its permissions could not be repaired: ${error.message}`
58
+ );
59
+ process.exit(1);
60
+ }
61
+ }
62
+
63
+ if (result.error) {
64
+ console.error(`keydris: failed to launch native binary: ${result.error.message}`);
65
+ process.exit(1);
66
+ }
67
+
68
+ if (result.signal) {
69
+ try {
70
+ process.kill(process.pid, result.signal);
71
+ } catch {
72
+ process.exit(1);
73
+ }
74
+ } else {
75
+ process.exit(result.status ?? 1);
76
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keydris/cli",
3
- "version": "0.1.0-next.2",
3
+ "version": "0.1.6",
4
4
  "description": "Governed, per-session identity and brokered egress for AI agents",
5
5
  "type": "module",
6
6
  "bin": {
@@ -17,12 +17,12 @@
17
17
  "prepublishOnly": "node ../../scripts/prepublish-check.mjs"
18
18
  },
19
19
  "optionalDependencies": {
20
- "@keydris/cli-win32-x64": "0.1.0-next.2",
21
- "@keydris/cli-win32-arm64": "0.1.0-next.2",
22
- "@keydris/cli-darwin-x64": "0.1.0-next.2",
23
- "@keydris/cli-darwin-arm64": "0.1.0-next.2",
24
- "@keydris/cli-linux-x64": "0.1.0-next.2",
25
- "@keydris/cli-linux-arm64": "0.1.0-next.2"
20
+ "@keydris/cli-win32-x64": "0.1.6",
21
+ "@keydris/cli-win32-arm64": "0.1.6",
22
+ "@keydris/cli-darwin-x64": "0.1.6",
23
+ "@keydris/cli-darwin-arm64": "0.1.6",
24
+ "@keydris/cli-linux-x64": "0.1.6",
25
+ "@keydris/cli-linux-arm64": "0.1.6"
26
26
  },
27
27
  "keywords": [
28
28
  "ai",