private-ai-proxy 0.1.7-beta.1-linux-x64 → 0.1.7-beta.1
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 +35 -2
- package/bin/private-ai-proxy.cjs +66 -0
- package/package.json +22 -10
- package/vendor/private-ai-proxy +0 -0
- package/vendor/private-ai-proxy-helper +0 -0
- package/vendor/private-ai-proxy-service +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
# Private AI Proxy
|
|
1
|
+
# Private AI Proxy
|
|
2
2
|
|
|
3
|
-
|
|
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 `pap` as the preferred command. `private-ai-proxy` is the
|
|
12
|
+
full-name alias and `aci` is the protocol-focused alias; all three run the same
|
|
13
|
+
CLI. npm selects the native package for the current operating system and CPU
|
|
14
|
+
architecture.
|
|
15
|
+
|
|
16
|
+
Do not install with `--omit=optional`: the platform-specific executable is
|
|
17
|
+
delivered as an optional dependency.
|
|
18
|
+
|
|
19
|
+
## Use
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
pap --help
|
|
23
|
+
pap service start
|
|
24
|
+
pap service status
|
|
25
|
+
pap app open --web
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The CLI, service, and credential helper are distributed together so the local
|
|
29
|
+
service can start the matching binaries from the same installation. The
|
|
30
|
+
service can also host the management UI on `127.0.0.1` (off by default): enable
|
|
31
|
+
it with `pap settings set webUi true`, then sign in with the one-time link from
|
|
32
|
+
`pap app open --web`. For another machine, prefer an SSH tunnel or Tailscale;
|
|
33
|
+
read [Remote Access](https://github.com/Dstack-TEE/private-ai-gateway/blob/main/apps/desktop/docs/cli.md#remote-access)
|
|
34
|
+
before listening on a LAN address over plain HTTP.
|
|
35
|
+
|
|
36
|
+
Source and release notes: https://github.com/Dstack-TEE/private-ai-gateway
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,22 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "private-ai-proxy",
|
|
3
|
-
"version": "0.1.7-beta.1
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.7-beta.1",
|
|
4
|
+
"description": "Local verifying gateway for confidential AI inference",
|
|
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"
|
|
8
|
+
"url": "git+https://github.com/Dstack-TEE/private-ai-gateway.git",
|
|
9
|
+
"directory": "apps/desktop/npm/private-ai-proxy"
|
|
9
10
|
},
|
|
10
11
|
"homepage": "https://github.com/Dstack-TEE/private-ai-gateway#readme",
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
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
|
+
},
|
|
17
18
|
"files": [
|
|
18
|
-
"
|
|
19
|
+
"bin"
|
|
19
20
|
],
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=18"
|
|
23
|
+
},
|
|
24
|
+
"optionalDependencies": {
|
|
25
|
+
"private-ai-proxy-darwin-arm64": "npm:private-ai-proxy@0.1.7-beta.1-darwin-arm64",
|
|
26
|
+
"private-ai-proxy-darwin-x64": "npm:private-ai-proxy@0.1.7-beta.1-darwin-x64",
|
|
27
|
+
"private-ai-proxy-linux-arm64": "npm:private-ai-proxy@0.1.7-beta.1-linux-arm64",
|
|
28
|
+
"private-ai-proxy-linux-x64": "npm:private-ai-proxy@0.1.7-beta.1-linux-x64",
|
|
29
|
+
"private-ai-proxy-win32-arm64": "npm:private-ai-proxy@0.1.7-beta.1-win32-arm64",
|
|
30
|
+
"private-ai-proxy-win32-x64": "npm:private-ai-proxy@0.1.7-beta.1-win32-x64"
|
|
31
|
+
},
|
|
20
32
|
"publishConfig": {
|
|
21
33
|
"access": "public"
|
|
22
34
|
}
|
package/vendor/private-ai-proxy
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|