private-ai-proxy 0.1.5 → 0.1.6-darwin-arm64
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 +2 -29
- package/package.json +10 -22
- package/vendor/private-ai-proxy +0 -0
- package/vendor/private-ai-proxy-helper +0 -0
- package/vendor/private-ai-proxy-service +0 -0
- package/bin/private-ai-proxy.cjs +0 -66
package/README.md
CHANGED
|
@@ -1,30 +1,3 @@
|
|
|
1
|
-
# Private AI Proxy
|
|
1
|
+
# Private AI Proxy (darwin-arm64)
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
```
|
|
26
|
-
|
|
27
|
-
The CLI, service, and credential helper are distributed together so the local
|
|
28
|
-
service can start the matching binaries from the same installation.
|
|
29
|
-
|
|
30
|
-
Source and release notes: https://github.com/Dstack-TEE/private-ai-gateway
|
|
3
|
+
This package version contains the native darwin-arm64 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.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.6-darwin-arm64",
|
|
4
|
+
"description": "Native Private AI Proxy binaries for darwin-arm64",
|
|
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
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"
|
|
17
|
-
|
|
11
|
+
"os": [
|
|
12
|
+
"darwin"
|
|
13
|
+
],
|
|
14
|
+
"cpu": [
|
|
15
|
+
"arm64"
|
|
16
|
+
],
|
|
18
17
|
"files": [
|
|
19
|
-
"
|
|
18
|
+
"vendor"
|
|
20
19
|
],
|
|
21
|
-
"engines": {
|
|
22
|
-
"node": ">=18"
|
|
23
|
-
},
|
|
24
|
-
"optionalDependencies": {
|
|
25
|
-
"private-ai-proxy-darwin-arm64": "npm:private-ai-proxy@0.1.5-darwin-arm64",
|
|
26
|
-
"private-ai-proxy-darwin-x64": "npm:private-ai-proxy@0.1.5-darwin-x64",
|
|
27
|
-
"private-ai-proxy-linux-arm64": "npm:private-ai-proxy@0.1.5-linux-arm64",
|
|
28
|
-
"private-ai-proxy-linux-x64": "npm:private-ai-proxy@0.1.5-linux-x64",
|
|
29
|
-
"private-ai-proxy-win32-arm64": "npm:private-ai-proxy@0.1.5-win32-arm64",
|
|
30
|
-
"private-ai-proxy-win32-x64": "npm:private-ai-proxy@0.1.5-win32-x64"
|
|
31
|
-
},
|
|
32
20
|
"publishConfig": {
|
|
33
21
|
"access": "public"
|
|
34
22
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/private-ai-proxy.cjs
DELETED
|
@@ -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
|
-
}
|