private-ai-proxy 0.1.3 → 0.1.4-darwin-x64

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
@@ -1,25 +1,3 @@
1
- # Private AI Proxy
1
+ # Private AI Proxy (darwin-x64)
2
2
 
3
- Private AI Proxy runs AI coding agents through a local, user-owned gateway that verifies confidential-computing evidence before forwarding requests.
4
-
5
- ## Install
6
-
7
- ```sh
8
- npm install --global private-ai-proxy
9
- ```
10
-
11
- The package installs `private-ai-proxy` and the shorter aliases `pap` and `aci`. npm selects the native package for the current operating system and CPU architecture.
12
-
13
- Do not install with `--omit=optional`: the platform-specific executable is delivered as an optional dependency.
14
-
15
- ## Use
16
-
17
- ```sh
18
- private-ai-proxy --help
19
- private-ai-proxy service start
20
- private-ai-proxy service status
21
- ```
22
-
23
- The CLI, service, and credential helper are distributed together so the local service can start the matching binaries from the same installation.
24
-
25
- Source and release notes: https://github.com/Dstack-TEE/private-ai-gateway
3
+ This package version contains the native darwin-x64 binaries used by [private-ai-proxy](https://www.npmjs.com/package/private-ai-proxy).
package/package.json CHANGED
@@ -1,34 +1,22 @@
1
1
  {
2
2
  "name": "private-ai-proxy",
3
- "version": "0.1.3",
4
- "description": "Local verifying gateway for confidential AI inference",
3
+ "version": "0.1.4-darwin-x64",
4
+ "description": "Native Private AI Proxy binaries for darwin-x64",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/Dstack-TEE/private-ai-gateway.git",
9
- "directory": "apps/desktop/npm/private-ai-proxy"
8
+ "url": "git+https://github.com/Dstack-TEE/private-ai-gateway.git"
10
9
  },
11
10
  "homepage": "https://github.com/Dstack-TEE/private-ai-gateway#readme",
12
- "bugs": "https://github.com/Dstack-TEE/private-ai-gateway/issues",
13
- "bin": {
14
- "private-ai-proxy": "bin/private-ai-proxy.cjs",
15
- "pap": "bin/private-ai-proxy.cjs",
16
- "aci": "bin/private-ai-proxy.cjs"
17
- },
11
+ "os": [
12
+ "darwin"
13
+ ],
14
+ "cpu": [
15
+ "x64"
16
+ ],
18
17
  "files": [
19
- "bin"
18
+ "vendor"
20
19
  ],
21
- "engines": {
22
- "node": ">=18"
23
- },
24
- "optionalDependencies": {
25
- "private-ai-proxy-darwin-arm64": "npm:private-ai-proxy@0.1.3-darwin-arm64",
26
- "private-ai-proxy-darwin-x64": "npm:private-ai-proxy@0.1.3-darwin-x64",
27
- "private-ai-proxy-linux-arm64": "npm:private-ai-proxy@0.1.3-linux-arm64",
28
- "private-ai-proxy-linux-x64": "npm:private-ai-proxy@0.1.3-linux-x64",
29
- "private-ai-proxy-win32-arm64": "npm:private-ai-proxy@0.1.3-win32-arm64",
30
- "private-ai-proxy-win32-x64": "npm:private-ai-proxy@0.1.3-win32-x64"
31
- },
32
20
  "publishConfig": {
33
21
  "access": "public"
34
22
  }
Binary file
Binary file
Binary file
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- const { spawnSync } = require("node:child_process");
5
- const { accessSync, constants } = require("node:fs");
6
- const path = require("node:path");
7
-
8
- const packages = {
9
- "darwin-arm64": "private-ai-proxy-darwin-arm64",
10
- "darwin-x64": "private-ai-proxy-darwin-x64",
11
- "linux-arm64": "private-ai-proxy-linux-arm64",
12
- "linux-x64": "private-ai-proxy-linux-x64",
13
- "win32-arm64": "private-ai-proxy-win32-arm64",
14
- "win32-x64": "private-ai-proxy-win32-x64",
15
- };
16
-
17
- function fail(message) {
18
- console.error(`private-ai-proxy: ${message}`);
19
- process.exitCode = 1;
20
- }
21
-
22
- function main() {
23
- const target = `${process.platform}-${process.arch}`;
24
- const packageName = packages[target];
25
- if (!packageName) {
26
- fail(`unsupported platform ${target}; supported platforms are ${Object.keys(packages).join(", ")}`);
27
- return;
28
- }
29
-
30
- let packageManifest;
31
- try {
32
- packageManifest = require.resolve(`${packageName}/package.json`);
33
- } catch (error) {
34
- if (error?.code !== "MODULE_NOT_FOUND") throw error;
35
- fail(
36
- `the optional package ${packageName} is missing. Reinstall private-ai-proxy without --omit=optional.`,
37
- );
38
- return;
39
- }
40
-
41
- const extension = process.platform === "win32" ? ".exe" : "";
42
- const executable = path.join(path.dirname(packageManifest), "vendor", `private-ai-proxy${extension}`);
43
- try {
44
- accessSync(executable, process.platform === "win32" ? constants.F_OK : constants.X_OK);
45
- } catch {
46
- fail(`the native executable is missing or not executable in ${packageName}`);
47
- return;
48
- }
49
-
50
- const result = spawnSync(executable, process.argv.slice(2), {
51
- stdio: "inherit",
52
- windowsHide: false,
53
- });
54
- if (result.error) throw result.error;
55
- if (result.signal) {
56
- process.kill(process.pid, result.signal);
57
- return;
58
- }
59
- process.exitCode = result.status ?? 1;
60
- }
61
-
62
- try {
63
- main();
64
- } catch (error) {
65
- fail(error instanceof Error ? error.message : String(error));
66
- }