@slopus/happy-agent-supervisor 0.0.13 → 0.0.16-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 +41 -0
- package/SHA256SUMS +1 -0
- package/package.json +18 -31
- package/vendor/aarch64-apple-darwin/bin/happy-agent-supervisor +0 -0
- package/dist/SupervisorPolicy.d.ts +0 -77
- package/dist/SupervisorPolicy.d.ts.map +0 -1
- package/dist/SupervisorPolicy.js +0 -61
- package/dist/SupervisorPolicy.js.map +0 -1
- package/dist/SupervisorServicePolicy.d.ts +0 -25
- package/dist/SupervisorServicePolicy.d.ts.map +0 -1
- package/dist/SupervisorServicePolicy.js +0 -24
- package/dist/SupervisorServicePolicy.js.map +0 -1
- package/dist/impl/resolveBinaryForTarget.d.ts +0 -3
- package/dist/impl/resolveBinaryForTarget.d.ts.map +0 -1
- package/dist/impl/resolveBinaryForTarget.js +0 -39
- package/dist/impl/resolveBinaryForTarget.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/platform.d.ts +0 -43
- package/dist/platform.d.ts.map +0 -1
- package/dist/platform.js +0 -46
- package/dist/platform.js.map +0 -1
- package/dist/resolveLinuxSupervisorBinary.d.ts +0 -3
- package/dist/resolveLinuxSupervisorBinary.d.ts.map +0 -1
- package/dist/resolveLinuxSupervisorBinary.js +0 -11
- package/dist/resolveLinuxSupervisorBinary.js.map +0 -1
- package/dist/resolveSupervisorBinary.d.ts +0 -2
- package/dist/resolveSupervisorBinary.d.ts.map +0 -1
- package/dist/resolveSupervisorBinary.js +0 -14
- package/dist/resolveSupervisorBinary.js.map +0 -1
package/README.md
CHANGED
|
@@ -149,6 +149,47 @@ step that would not apply — exits `125` with a message on stderr, which keeps
|
|
|
149
149
|
distinguishable from the workload's own status. Otherwise the workload's exit
|
|
150
150
|
status is reproduced as its own.
|
|
151
151
|
|
|
152
|
+
## TCP connections from the caller's network
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
happy-agent-supervisor --connect <host> <port>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
This mode is not a sandbox. It applies no policy, creates no namespace, and
|
|
159
|
+
changes no privilege: it is an ordinary unprivileged TCP client that keeps every
|
|
160
|
+
namespace, Seatbelt profile, and seccomp filter its caller already had. Started
|
|
161
|
+
by a restricted command, it has exactly that command's network. It exists so a
|
|
162
|
+
product can open a connection from inside a container with `docker exec`, using
|
|
163
|
+
the binary already mounted there, without assuming the image carries any network
|
|
164
|
+
tool. `--connect` stands alone; combining it with a policy or a command exits
|
|
165
|
+
`125`.
|
|
166
|
+
|
|
167
|
+
The host is resolved by the system resolver in the caller's own namespace —
|
|
168
|
+
inside a container, that container's `/etc/hosts`, DNS servers, and network
|
|
169
|
+
aliases — and is otherwise used exactly as given. IPv6 literals are written
|
|
170
|
+
without brackets. Each resolved address is tried in order.
|
|
171
|
+
|
|
172
|
+
Standard input and output carry frames: one type byte, a 32-bit big-endian
|
|
173
|
+
payload length, and at most 64 KiB of payload.
|
|
174
|
+
|
|
175
|
+
| Frame | Direction | Meaning |
|
|
176
|
+
| ----- | ---------------- | ----------------------------------------------------------------------- |
|
|
177
|
+
| `R` | helper to caller | Connected. Payload `happy-agent-connect/1`. Always the first frame. |
|
|
178
|
+
| `D` | both | Bytes on the connection; never empty. |
|
|
179
|
+
| `F` | both | Half-close: the sender sends nothing more. Empty payload. |
|
|
180
|
+
| `X` | helper to caller | Failed. Payload is a Node-style code, a space, and a message; exit `1`. |
|
|
181
|
+
|
|
182
|
+
Nothing is written before the connection is established, and the caller must
|
|
183
|
+
not send a frame before `R`. A remote half-close becomes `F` while the caller
|
|
184
|
+
may keep sending; a caller `F` shuts down the socket's write side while replies
|
|
185
|
+
keep arriving. The helper exits `0` once both directions have finished.
|
|
186
|
+
|
|
187
|
+
The end of standard input is an abort, not a half-close. Input is watched before
|
|
188
|
+
the name is resolved, so ending the transport stops the helper at once — while
|
|
189
|
+
it is still resolving or connecting, or after a remote end that ignores the
|
|
190
|
+
half-close — and closes the connection. A malformed frame, a frame before `R`,
|
|
191
|
+
or data after the caller's `F` exits `125`.
|
|
192
|
+
|
|
152
193
|
## Policy
|
|
153
194
|
|
|
154
195
|
The policy names match `ComputePermissions`:
|
package/SHA256SUMS
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f4fc19bb76904deb6edc4ff264a7fa9b54d7d3e53204dc6e4f49876b0298f365 vendor/aarch64-apple-darwin/bin/happy-agent-supervisor
|
package/package.json
CHANGED
|
@@ -1,46 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slopus/happy-agent-supervisor",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "Trusted native sandbox boundary for Happy agent workloads.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"sandbox",
|
|
7
|
-
"seatbelt",
|
|
8
|
-
"seccomp",
|
|
9
|
-
"supervisor"
|
|
10
|
-
],
|
|
3
|
+
"version": "0.0.16-darwin-arm64",
|
|
4
|
+
"description": "Trusted native sandbox boundary for Happy agent workloads. Native binary for darwin-arm64.",
|
|
11
5
|
"license": "MIT",
|
|
12
6
|
"repository": {
|
|
13
7
|
"type": "git",
|
|
14
8
|
"url": "git+https://github.com/slopus/happy-agent.git",
|
|
15
9
|
"directory": "packages/happy-agent-supervisor"
|
|
16
10
|
},
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=22.19.0"
|
|
13
|
+
},
|
|
14
|
+
"os": [
|
|
15
|
+
"darwin"
|
|
16
|
+
],
|
|
17
|
+
"cpu": [
|
|
18
|
+
"arm64"
|
|
19
|
+
],
|
|
20
|
+
"bin": {
|
|
21
|
+
"happy-agent-supervisor": "vendor/aarch64-apple-darwin/bin/happy-agent-supervisor"
|
|
22
|
+
},
|
|
17
23
|
"files": [
|
|
18
|
-
"
|
|
24
|
+
"vendor",
|
|
25
|
+
"SHA256SUMS",
|
|
19
26
|
"LICENSE",
|
|
20
27
|
"README.md"
|
|
21
28
|
],
|
|
22
|
-
"type": "module",
|
|
23
|
-
"exports": {
|
|
24
|
-
".": {
|
|
25
|
-
"types": "./dist/index.d.ts",
|
|
26
|
-
"import": "./dist/index.js",
|
|
27
|
-
"default": "./dist/index.js"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
29
|
"publishConfig": {
|
|
31
|
-
"access": "public"
|
|
32
|
-
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"@sinclair/typebox": "^0.34.49"
|
|
35
|
-
},
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=22.19.0"
|
|
38
|
-
},
|
|
39
|
-
"optionalDependencies": {
|
|
40
|
-
"@slopus/happy-agent-supervisor-win32-x64": "npm:@slopus/happy-agent-supervisor@0.0.13-win32-x64",
|
|
41
|
-
"@slopus/happy-agent-supervisor-darwin-arm64": "npm:@slopus/happy-agent-supervisor@0.0.13-darwin-arm64",
|
|
42
|
-
"@slopus/happy-agent-supervisor-darwin-x64": "npm:@slopus/happy-agent-supervisor@0.0.13-darwin-x64",
|
|
43
|
-
"@slopus/happy-agent-supervisor-linux-arm64": "npm:@slopus/happy-agent-supervisor@0.0.13-linux-arm64",
|
|
44
|
-
"@slopus/happy-agent-supervisor-linux-x64": "npm:@slopus/happy-agent-supervisor@0.0.13-linux-x64"
|
|
30
|
+
"access": "public",
|
|
31
|
+
"tag": "platform"
|
|
45
32
|
}
|
|
46
33
|
}
|
|
Binary file
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { type Static } from "@sinclair/typebox";
|
|
2
|
-
export declare const supervisorPermissionModeSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"read_only">, import("@sinclair/typebox").TLiteral<"workspace_write">, import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"full_access">]>;
|
|
3
|
-
export type SupervisorPermissionMode = Static<typeof supervisorPermissionModeSchema>;
|
|
4
|
-
export declare const supervisorProxyFrontEndSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"socks5">]>;
|
|
5
|
-
export type SupervisorProxyFrontEnd = Static<typeof supervisorProxyFrontEndSchema>;
|
|
6
|
-
/**
|
|
7
|
-
* The front-ends to expose inside the sandbox.
|
|
8
|
-
*
|
|
9
|
-
* The supervisor provides the proxy itself. It forks an egress process before the sandbox exists
|
|
10
|
-
* and joins the two with a socketpair, so nothing inside the sandbox reaches the proxy — or
|
|
11
|
-
* anything else — by address, and the caller supplies neither a descriptor nor a token. Which hosts
|
|
12
|
-
* that egress process may reach comes from `network.allowedHosts`.
|
|
13
|
-
*/
|
|
14
|
-
export declare const supervisorOutgoingProxySchema: import("@sinclair/typebox").TObject<{
|
|
15
|
-
frontEnds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"socks5">]>>;
|
|
16
|
-
}>;
|
|
17
|
-
export type SupervisorOutgoingProxy = Static<typeof supervisorOutgoingProxySchema>;
|
|
18
|
-
export declare const supervisorNetworkPolicySchema: import("@sinclair/typebox").TObject<{
|
|
19
|
-
egress: import("@sinclair/typebox").TBoolean;
|
|
20
|
-
allowedHosts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
21
|
-
localBinding: import("@sinclair/typebox").TBoolean;
|
|
22
|
-
outgoingProxy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
23
|
-
frontEnds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"socks5">]>>;
|
|
24
|
-
}>>;
|
|
25
|
-
}>;
|
|
26
|
-
export type SupervisorNetworkPolicy = Static<typeof supervisorNetworkPolicySchema>;
|
|
27
|
-
/**
|
|
28
|
-
* The native supervisor's input. Its names intentionally match ComputePermissions one-for-one.
|
|
29
|
-
*
|
|
30
|
-
* The working directory is the workspace root for `workspace_write` and `auto`; keeping it out of
|
|
31
|
-
* the document prevents two sources of truth for the process cwd. A non-empty `allowedHosts`
|
|
32
|
-
* requires `network.outgoingProxy`, because the host list is enforced in the egress process the
|
|
33
|
-
* proxy creates, and without a proxy there would be nothing enforcing it. Each entry names one host
|
|
34
|
-
* or one `*.suffix`; a bare `*` is refused, and open egress is expressed by configuring no proxy.
|
|
35
|
-
*/
|
|
36
|
-
export declare const supervisorPolicySchema: import("@sinclair/typebox").TObject<{
|
|
37
|
-
mode: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"read_only">, import("@sinclair/typebox").TLiteral<"workspace_write">, import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"full_access">]>;
|
|
38
|
-
allowedReadPaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
39
|
-
deniedReadPaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
40
|
-
allowedWritePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
41
|
-
deniedWritePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
42
|
-
/** Windows placeholder type for protected project files that may be absent. */
|
|
43
|
-
deniedWriteFilePaths: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
44
|
-
network: import("@sinclair/typebox").TObject<{
|
|
45
|
-
egress: import("@sinclair/typebox").TBoolean;
|
|
46
|
-
allowedHosts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
47
|
-
localBinding: import("@sinclair/typebox").TBoolean;
|
|
48
|
-
outgoingProxy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
49
|
-
frontEnds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"socks5">]>>;
|
|
50
|
-
}>>;
|
|
51
|
-
}>;
|
|
52
|
-
/** Mandatory service isolation; never interpreted as ordinary shell permissions. */
|
|
53
|
-
service: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
|
|
54
|
-
root: import("@sinclair/typebox").TString;
|
|
55
|
-
cwd: import("@sinclair/typebox").TString;
|
|
56
|
-
inputs: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
57
|
-
source: import("@sinclair/typebox").TString;
|
|
58
|
-
destination: import("@sinclair/typebox").TString;
|
|
59
|
-
}>>;
|
|
60
|
-
scratch: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
61
|
-
cgroupParent: import("@sinclair/typebox").TString;
|
|
62
|
-
executionId: import("@sinclair/typebox").TString;
|
|
63
|
-
controllerPid: import("@sinclair/typebox").TInteger;
|
|
64
|
-
bridgeSocket: import("@sinclair/typebox").TString;
|
|
65
|
-
bridgeToken: import("@sinclair/typebox").TString;
|
|
66
|
-
port: import("@sinclair/typebox").TInteger;
|
|
67
|
-
memoryMiB: import("@sinclair/typebox").TInteger;
|
|
68
|
-
processes: import("@sinclair/typebox").TInteger;
|
|
69
|
-
outbound: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
70
|
-
hostname: import("@sinclair/typebox").TString;
|
|
71
|
-
port: import("@sinclair/typebox").TInteger;
|
|
72
|
-
}>>;
|
|
73
|
-
}>>;
|
|
74
|
-
}>;
|
|
75
|
-
export type SupervisorPolicy = Static<typeof supervisorPolicySchema>;
|
|
76
|
-
export declare function parseSupervisorPolicy(value: unknown): SupervisorPolicy;
|
|
77
|
-
//# sourceMappingURL=SupervisorPolicy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SupervisorPolicy.d.ts","sourceRoot":"","sources":["../sources/SupervisorPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAItD,eAAO,MAAM,8BAA8B,qPAKzC,CAAC;AAEH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAErF,eAAO,MAAM,6BAA6B,oIAGxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEnF;;;;;;;GAOG;AACH,eAAO,MAAM,6BAA6B;;EAKzC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEnF,eAAO,MAAM,6BAA6B;;;;;;;EAQzC,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEnF;;;;;;;;GAQG;AACH,eAAO,MAAM,sBAAsB;;;;;;IAO3B,+EAA+E;;;;;;;;;;IAG/E,oFAAoF;;;;;;;;;;;;;;;;;;;;;;EAI3F,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAQtE"}
|
package/dist/SupervisorPolicy.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
import { Value } from "@sinclair/typebox/value";
|
|
3
|
-
import { supervisorServicePolicySchema } from "./SupervisorServicePolicy.js";
|
|
4
|
-
export const supervisorPermissionModeSchema = Type.Union([
|
|
5
|
-
Type.Literal("read_only"),
|
|
6
|
-
Type.Literal("workspace_write"),
|
|
7
|
-
Type.Literal("auto"),
|
|
8
|
-
Type.Literal("full_access"),
|
|
9
|
-
]);
|
|
10
|
-
export const supervisorProxyFrontEndSchema = Type.Union([
|
|
11
|
-
Type.Literal("http"),
|
|
12
|
-
Type.Literal("socks5"),
|
|
13
|
-
]);
|
|
14
|
-
/**
|
|
15
|
-
* The front-ends to expose inside the sandbox.
|
|
16
|
-
*
|
|
17
|
-
* The supervisor provides the proxy itself. It forks an egress process before the sandbox exists
|
|
18
|
-
* and joins the two with a socketpair, so nothing inside the sandbox reaches the proxy — or
|
|
19
|
-
* anything else — by address, and the caller supplies neither a descriptor nor a token. Which hosts
|
|
20
|
-
* that egress process may reach comes from `network.allowedHosts`.
|
|
21
|
-
*/
|
|
22
|
-
export const supervisorOutgoingProxySchema = Type.Object({
|
|
23
|
-
frontEnds: Type.Array(supervisorProxyFrontEndSchema, { minItems: 1 }),
|
|
24
|
-
}, { additionalProperties: false });
|
|
25
|
-
export const supervisorNetworkPolicySchema = Type.Object({
|
|
26
|
-
egress: Type.Boolean(),
|
|
27
|
-
allowedHosts: Type.Optional(Type.Array(Type.String())),
|
|
28
|
-
localBinding: Type.Boolean(),
|
|
29
|
-
outgoingProxy: Type.Optional(supervisorOutgoingProxySchema),
|
|
30
|
-
}, { additionalProperties: false });
|
|
31
|
-
/**
|
|
32
|
-
* The native supervisor's input. Its names intentionally match ComputePermissions one-for-one.
|
|
33
|
-
*
|
|
34
|
-
* The working directory is the workspace root for `workspace_write` and `auto`; keeping it out of
|
|
35
|
-
* the document prevents two sources of truth for the process cwd. A non-empty `allowedHosts`
|
|
36
|
-
* requires `network.outgoingProxy`, because the host list is enforced in the egress process the
|
|
37
|
-
* proxy creates, and without a proxy there would be nothing enforcing it. Each entry names one host
|
|
38
|
-
* or one `*.suffix`; a bare `*` is refused, and open egress is expressed by configuring no proxy.
|
|
39
|
-
*/
|
|
40
|
-
export const supervisorPolicySchema = Type.Object({
|
|
41
|
-
mode: supervisorPermissionModeSchema,
|
|
42
|
-
allowedReadPaths: Type.Optional(Type.Array(Type.String())),
|
|
43
|
-
deniedReadPaths: Type.Optional(Type.Array(Type.String())),
|
|
44
|
-
allowedWritePaths: Type.Optional(Type.Array(Type.String())),
|
|
45
|
-
deniedWritePaths: Type.Optional(Type.Array(Type.String())),
|
|
46
|
-
/** Windows placeholder type for protected project files that may be absent. */
|
|
47
|
-
deniedWriteFilePaths: Type.Optional(Type.Array(Type.String())),
|
|
48
|
-
network: supervisorNetworkPolicySchema,
|
|
49
|
-
/** Mandatory service isolation; never interpreted as ordinary shell permissions. */
|
|
50
|
-
service: Type.Optional(supervisorServicePolicySchema),
|
|
51
|
-
}, { additionalProperties: false });
|
|
52
|
-
export function parseSupervisorPolicy(value) {
|
|
53
|
-
if (!Value.Check(supervisorPolicySchema, value)) {
|
|
54
|
-
const details = [...Value.Errors(supervisorPolicySchema, value)]
|
|
55
|
-
.map((error) => `${error.path || "/"} ${error.message}`)
|
|
56
|
-
.join("; ");
|
|
57
|
-
throw new Error(`Invalid supervisor policy: ${details}`);
|
|
58
|
-
}
|
|
59
|
-
return Value.Parse(supervisorPolicySchema, value);
|
|
60
|
-
}
|
|
61
|
-
//# sourceMappingURL=SupervisorPolicy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SupervisorPolicy.js","sourceRoot":"","sources":["../sources/SupervisorPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,IAAI,CAAC,KAAK,CAAC;IACrD,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;IACzB,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAC/B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC;IACpB,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC;CAC9B,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,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AAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1D,+EAA+E;IAC/E,oBAAoB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9D,OAAO,EAAE,6BAA6B;IACtC,oFAAoF;IACpF,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,6BAA6B,CAAC;CACxD,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAClC,CAAC;AAIF,MAAM,UAAU,qBAAqB,CAAC,KAAc;IAChD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,OAAO,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;aAC3D,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,IAAI,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC;aACvD,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type Static } from "@sinclair/typebox";
|
|
2
|
-
/** Trusted controller input, never a model-facing policy or service resource. */
|
|
3
|
-
export declare const supervisorServicePolicySchema: import("@sinclair/typebox").TObject<{
|
|
4
|
-
root: import("@sinclair/typebox").TString;
|
|
5
|
-
cwd: import("@sinclair/typebox").TString;
|
|
6
|
-
inputs: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
7
|
-
source: import("@sinclair/typebox").TString;
|
|
8
|
-
destination: import("@sinclair/typebox").TString;
|
|
9
|
-
}>>;
|
|
10
|
-
scratch: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>;
|
|
11
|
-
cgroupParent: import("@sinclair/typebox").TString;
|
|
12
|
-
executionId: import("@sinclair/typebox").TString;
|
|
13
|
-
controllerPid: import("@sinclair/typebox").TInteger;
|
|
14
|
-
bridgeSocket: import("@sinclair/typebox").TString;
|
|
15
|
-
bridgeToken: import("@sinclair/typebox").TString;
|
|
16
|
-
port: import("@sinclair/typebox").TInteger;
|
|
17
|
-
memoryMiB: import("@sinclair/typebox").TInteger;
|
|
18
|
-
processes: import("@sinclair/typebox").TInteger;
|
|
19
|
-
outbound: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
20
|
-
hostname: import("@sinclair/typebox").TString;
|
|
21
|
-
port: import("@sinclair/typebox").TInteger;
|
|
22
|
-
}>>;
|
|
23
|
-
}>;
|
|
24
|
-
export type SupervisorServicePolicy = Static<typeof supervisorServicePolicySchema>;
|
|
25
|
-
//# sourceMappingURL=SupervisorServicePolicy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SupervisorServicePolicy.d.ts","sourceRoot":"","sources":["../sources/SupervisorServicePolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEtD,iFAAiF;AACjF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;EAmCzC,CAAC;AACF,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
/** Trusted controller input, never a model-facing policy or service resource. */
|
|
3
|
-
export const supervisorServicePolicySchema = Type.Object({
|
|
4
|
-
root: Type.String({ minLength: 2 }),
|
|
5
|
-
cwd: Type.String({ minLength: 1 }),
|
|
6
|
-
inputs: Type.Array(Type.Object({
|
|
7
|
-
source: Type.String({ minLength: 2 }),
|
|
8
|
-
destination: Type.String({ minLength: 1 }),
|
|
9
|
-
}, { additionalProperties: false }), { minItems: 1, maxItems: 128 }),
|
|
10
|
-
scratch: Type.Array(Type.String({ minLength: 1 }), { maxItems: 32 }),
|
|
11
|
-
cgroupParent: Type.String({ minLength: 2 }),
|
|
12
|
-
executionId: Type.String({ pattern: "^[a-z0-9]{16,64}$" }),
|
|
13
|
-
controllerPid: Type.Integer({ minimum: 2, maximum: 2147483647 }),
|
|
14
|
-
bridgeSocket: Type.String({ minLength: 2, maxLength: 100 }),
|
|
15
|
-
bridgeToken: Type.String({ pattern: "^[a-f0-9]{64}$" }),
|
|
16
|
-
port: Type.Integer({ minimum: 1024, maximum: 65535 }),
|
|
17
|
-
memoryMiB: Type.Integer({ minimum: 128, maximum: 1024 }),
|
|
18
|
-
processes: Type.Integer({ minimum: 1, maximum: 64 }),
|
|
19
|
-
outbound: Type.Array(Type.Object({
|
|
20
|
-
hostname: Type.String({ minLength: 1, maxLength: 253 }),
|
|
21
|
-
port: Type.Integer({ minimum: 1, maximum: 65535 }),
|
|
22
|
-
}, { additionalProperties: false }), { maxItems: 32 }),
|
|
23
|
-
}, { additionalProperties: false });
|
|
24
|
-
//# sourceMappingURL=SupervisorServicePolicy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SupervisorServicePolicy.js","sourceRoot":"","sources":["../sources/SupervisorServicePolicy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,mBAAmB,CAAC;AAEtD,iFAAiF;AACjF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM,CACpD;IACI,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACnC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAClC,MAAM,EAAE,IAAI,CAAC,KAAK,CACd,IAAI,CAAC,MAAM,CACP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M,CACP;QACI,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;QACvD,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;KACrD,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAClC,EACD,EAAE,QAAQ,EAAE,EAAE,EAAE,CACnB;CACJ,EACD,EAAE,oBAAoB,EAAE,KAAK,EAAE,CAClC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBinaryForTarget.d.ts","sourceRoot":"","sources":["../../sources/impl/resolveBinaryForTarget.ts"],"names":[],"mappings":"AAKA,OAAO,EAAoB,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAIpE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAwCpF"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { existsSync } from "node:fs";
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { fileURLToPath } from "node:url";
|
|
5
|
-
import { PLATFORM_TARGETS } from "../platform.js";
|
|
6
|
-
const require = createRequire(import.meta.url);
|
|
7
|
-
export function resolveBinaryForTarget(key, binaryPath) {
|
|
8
|
-
if (binaryPath !== undefined) {
|
|
9
|
-
const explicit = path.resolve(binaryPath);
|
|
10
|
-
if (!existsSync(explicit)) {
|
|
11
|
-
throw new Error(`Happy agent supervisor binary does not exist: ${explicit}`);
|
|
12
|
-
}
|
|
13
|
-
return explicit;
|
|
14
|
-
}
|
|
15
|
-
const platform = PLATFORM_TARGETS[key];
|
|
16
|
-
const executable = platform.os === "win32" ? "happy-agent-supervisor.exe" : "happy-agent-supervisor";
|
|
17
|
-
try {
|
|
18
|
-
const manifest = require.resolve(`${platform.alias}/package.json`);
|
|
19
|
-
const installed = path.join(path.dirname(manifest), "vendor", platform.target, "bin", executable);
|
|
20
|
-
if (existsSync(installed))
|
|
21
|
-
return installed;
|
|
22
|
-
}
|
|
23
|
-
catch {
|
|
24
|
-
// Fall through to repository-local native build locations.
|
|
25
|
-
}
|
|
26
|
-
const packageRoot = fileURLToPath(new URL("../../", import.meta.url));
|
|
27
|
-
const localCandidates = [
|
|
28
|
-
path.join(packageRoot, "native", "target", platform.target, "release", executable),
|
|
29
|
-
path.join(packageRoot, "native", "target", platform.target, "debug", executable),
|
|
30
|
-
path.join(packageRoot, "native", "target", "release", executable),
|
|
31
|
-
path.join(packageRoot, "native", "target", "debug", executable),
|
|
32
|
-
];
|
|
33
|
-
const local = localCandidates.find((candidate) => existsSync(candidate));
|
|
34
|
-
if (local !== undefined)
|
|
35
|
-
return local;
|
|
36
|
-
throw new Error(`The optional binary package ${platform.alias} is missing. Reinstall ` +
|
|
37
|
-
"@slopus/happy-agent-supervisor or build the matching native target.");
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=resolveBinaryForTarget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveBinaryForTarget.js","sourceRoot":"","sources":["../../sources/impl/resolveBinaryForTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,gBAAgB,CAAC;AAEpE,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAE/C,MAAM,UAAU,sBAAsB,CAAC,GAAgB,EAAE,UAAmB;IACxE,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAC3B,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AU,CAAC;QACjE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,CAAC;KAClE,CAAC;IACF,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IACzE,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC;IAEtC,MAAM,IAAI,KAAK,CACX,+BAA+B,QAAQ,CAAC,KAAK,yBAAyB;QAClE,qEAAqE,CAC5E,CAAC;AACN,CAAC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { parseSupervisorPolicy, supervisorNetworkPolicySchema, supervisorPermissionModeSchema, supervisorPolicySchema, type SupervisorNetworkPolicy, type SupervisorPermissionMode, type SupervisorPolicy, } from "./SupervisorPolicy.js";
|
|
2
|
-
export { linuxSupervisorArchitectureSchema, type LinuxSupervisorArchitecture } from "./platform.js";
|
|
3
|
-
export { resolveLinuxSupervisorBinary } from "./resolveLinuxSupervisorBinary.js";
|
|
4
|
-
export { resolveSupervisorBinary } from "./resolveSupervisorBinary.js";
|
|
5
|
-
export { supervisorServicePolicySchema, type SupervisorServicePolicy, } from "./SupervisorServicePolicy.js";
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,EACtB,KAAK,uBAAuB,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAE,KAAK,2BAA2B,EAAE,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACH,6BAA6B,EAC7B,KAAK,uBAAuB,GAC/B,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { parseSupervisorPolicy, supervisorNetworkPolicySchema, supervisorPermissionModeSchema, supervisorPolicySchema, } from "./SupervisorPolicy.js";
|
|
2
|
-
export { linuxSupervisorArchitectureSchema } from "./platform.js";
|
|
3
|
-
export { resolveLinuxSupervisorBinary } from "./resolveLinuxSupervisorBinary.js";
|
|
4
|
-
export { resolveSupervisorBinary } from "./resolveSupervisorBinary.js";
|
|
5
|
-
export { supervisorServicePolicySchema, } from "./SupervisorServicePolicy.js";
|
|
6
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,sBAAsB,GAIzB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iCAAiC,EAAoC,MAAM,eAAe,CAAC;AACpG,OAAO,EAAE,4BAA4B,EAAE,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EACH,6BAA6B,GAEhC,MAAM,8BAA8B,CAAC"}
|
package/dist/platform.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type Static } from "@sinclair/typebox";
|
|
2
|
-
export declare const PLATFORM_TARGETS: {
|
|
3
|
-
readonly "win32-x64": {
|
|
4
|
-
readonly alias: "@slopus/happy-agent-supervisor-win32-x64";
|
|
5
|
-
readonly arch: "x64";
|
|
6
|
-
readonly os: "win32";
|
|
7
|
-
readonly tag: "win32-x64";
|
|
8
|
-
readonly target: "x86_64-pc-windows-gnu";
|
|
9
|
-
};
|
|
10
|
-
readonly "darwin-arm64": {
|
|
11
|
-
readonly alias: "@slopus/happy-agent-supervisor-darwin-arm64";
|
|
12
|
-
readonly arch: "arm64";
|
|
13
|
-
readonly os: "darwin";
|
|
14
|
-
readonly tag: "darwin-arm64";
|
|
15
|
-
readonly target: "aarch64-apple-darwin";
|
|
16
|
-
};
|
|
17
|
-
readonly "darwin-x64": {
|
|
18
|
-
readonly alias: "@slopus/happy-agent-supervisor-darwin-x64";
|
|
19
|
-
readonly arch: "x64";
|
|
20
|
-
readonly os: "darwin";
|
|
21
|
-
readonly tag: "darwin-x64";
|
|
22
|
-
readonly target: "x86_64-apple-darwin";
|
|
23
|
-
};
|
|
24
|
-
readonly "linux-arm64": {
|
|
25
|
-
readonly alias: "@slopus/happy-agent-supervisor-linux-arm64";
|
|
26
|
-
readonly arch: "arm64";
|
|
27
|
-
readonly os: "linux";
|
|
28
|
-
readonly tag: "linux-arm64";
|
|
29
|
-
readonly target: "aarch64-unknown-linux-musl";
|
|
30
|
-
};
|
|
31
|
-
readonly "linux-x64": {
|
|
32
|
-
readonly alias: "@slopus/happy-agent-supervisor-linux-x64";
|
|
33
|
-
readonly arch: "x64";
|
|
34
|
-
readonly os: "linux";
|
|
35
|
-
readonly tag: "linux-x64";
|
|
36
|
-
readonly target: "x86_64-unknown-linux-musl";
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
export type PlatformKey = keyof typeof PLATFORM_TARGETS;
|
|
40
|
-
export declare const linuxSupervisorArchitectureSchema: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"amd64">, import("@sinclair/typebox").TLiteral<"x64">, import("@sinclair/typebox").TLiteral<"x86_64">, import("@sinclair/typebox").TLiteral<"arm64">, import("@sinclair/typebox").TLiteral<"aarch64">]>;
|
|
41
|
-
/** Architecture spellings used by OCI, Node.js, and Rust target triples. */
|
|
42
|
-
export type LinuxSupervisorArchitecture = Static<typeof linuxSupervisorArchitectureSchema>;
|
|
43
|
-
//# sourceMappingURL=platform.d.ts.map
|
package/dist/platform.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../sources/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,mBAAmB,CAAC;AAEtD,eAAO,MAAM,gBAAgB;aACzB,WAAW;iBACP,KAAK,EAAE,0CAA0C;iBACjD,IAAI,EAAE,KAAK;iBACX,EAAE,EAAE,OAAO;iBACX,GAAG,EAAE,WAAW;iBAChB,MAAM,EAAE,uBAAuB;;aAEnC,cAAc;iBACV,KAAK,EAAE,6CAA6C;iBACpD,IAAI,EAAE,OAAO;iBACb,EAAE,EAAE,QAAQ;iBACZ,GAAG,EAAE,cAAc;iBACnB,MAAM,EAAE,sBAAsB;;aAElC,YAAY;iBACR,KAAK,EAAE,2CAA2C;iBAClD,IAAI,EAAE,KAAK;iBACX,EAAE,EAAE,QAAQ;iBACZ,GAAG,EAAE,YAAY;iBACjB,MAAM,EAAE,qBAAqB;;aAEjC,aAAa;iBACT,KAAK,EAAE,4CAA4C;iBACnD,IAAI,EAAE,OAAO;iBACb,EAAE,EAAE,OAAO;iBACX,GAAG,EAAE,aAAa;iBAClB,MAAM,EAAE,4BAA4B;;aAExC,WAAW;iBACP,KAAK,EAAE,0CAA0C;iBACjD,IAAI,EAAE,KAAK;iBACX,EAAE,EAAE,OAAO;iBACX,GAAG,EAAE,WAAW;iBAChB,MAAM,EAAE,2BAA2B;;CAEjC,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,gBAAgB,CAAC;AAExD,eAAO,MAAM,iCAAiC,kRAM5C,CAAC;AAEH,4EAA4E;AAC5E,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,OAAO,iCAAiC,CAAC,CAAC"}
|
package/dist/platform.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { Type } from "@sinclair/typebox";
|
|
2
|
-
export const PLATFORM_TARGETS = {
|
|
3
|
-
"win32-x64": {
|
|
4
|
-
alias: "@slopus/happy-agent-supervisor-win32-x64",
|
|
5
|
-
arch: "x64",
|
|
6
|
-
os: "win32",
|
|
7
|
-
tag: "win32-x64",
|
|
8
|
-
target: "x86_64-pc-windows-gnu",
|
|
9
|
-
},
|
|
10
|
-
"darwin-arm64": {
|
|
11
|
-
alias: "@slopus/happy-agent-supervisor-darwin-arm64",
|
|
12
|
-
arch: "arm64",
|
|
13
|
-
os: "darwin",
|
|
14
|
-
tag: "darwin-arm64",
|
|
15
|
-
target: "aarch64-apple-darwin",
|
|
16
|
-
},
|
|
17
|
-
"darwin-x64": {
|
|
18
|
-
alias: "@slopus/happy-agent-supervisor-darwin-x64",
|
|
19
|
-
arch: "x64",
|
|
20
|
-
os: "darwin",
|
|
21
|
-
tag: "darwin-x64",
|
|
22
|
-
target: "x86_64-apple-darwin",
|
|
23
|
-
},
|
|
24
|
-
"linux-arm64": {
|
|
25
|
-
alias: "@slopus/happy-agent-supervisor-linux-arm64",
|
|
26
|
-
arch: "arm64",
|
|
27
|
-
os: "linux",
|
|
28
|
-
tag: "linux-arm64",
|
|
29
|
-
target: "aarch64-unknown-linux-musl",
|
|
30
|
-
},
|
|
31
|
-
"linux-x64": {
|
|
32
|
-
alias: "@slopus/happy-agent-supervisor-linux-x64",
|
|
33
|
-
arch: "x64",
|
|
34
|
-
os: "linux",
|
|
35
|
-
tag: "linux-x64",
|
|
36
|
-
target: "x86_64-unknown-linux-musl",
|
|
37
|
-
},
|
|
38
|
-
};
|
|
39
|
-
export const linuxSupervisorArchitectureSchema = Type.Union([
|
|
40
|
-
Type.Literal("amd64"),
|
|
41
|
-
Type.Literal("x64"),
|
|
42
|
-
Type.Literal("x86_64"),
|
|
43
|
-
Type.Literal("arm64"),
|
|
44
|
-
Type.Literal("aarch64"),
|
|
45
|
-
]);
|
|
46
|
-
//# sourceMappingURL=platform.js.map
|
package/dist/platform.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../sources/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,WAAW,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,uBAAuB;KAClC;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,6CAA6C;QACpD,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,QAAQ;QACZ,GAAG,EAAE,cAAc;QACnB,MAAM,EAAE,sBAAsB;KACjC;IACD,YAAY,EAAE;QACV,KAAK,EAAE,2CAA2C;QAClD,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,QAAQ;QACZ,GAAG,EAAE,YAAY;QACjB,MAAM,EAAE,qBAAqB;KAChC;IACD,aAAa,EAAE;QACX,KAAK,EAAE,4CAA4C;QACnD,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,aAAa;QAClB,MAAM,EAAE,4BAA4B;KACvC;IACD,WAAW,EAAE;QACT,KAAK,EAAE,0CAA0C;QACjD,IAAI,EAAE,KAAK;QACX,EAAE,EAAE,OAAO;QACX,GAAG,EAAE,WAAW;QAChB,MAAM,EAAE,2BAA2B;KACtC;CACK,CAAC;AAIX,MAAM,CAAC,MAAM,iCAAiC,GAAG,IAAI,CAAC,KAAK,CAAC;IACxD,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IACrB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IACnB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IACtB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;IACrB,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;CAC1B,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveLinuxSupervisorBinary.d.ts","sourceRoot":"","sources":["../sources/resolveLinuxSupervisorBinary.ts"],"names":[],"mappings":"AAEA,OAAO,EAEH,KAAK,2BAA2B,EAEnC,MAAM,eAAe,CAAC;AAGvB,wBAAgB,4BAA4B,CACxC,YAAY,EAAE,2BAA2B,EACzC,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,CAOR"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Value } from "@sinclair/typebox/value";
|
|
2
|
-
import { linuxSupervisorArchitectureSchema, } from "./platform.js";
|
|
3
|
-
import { resolveBinaryForTarget } from "./impl/resolveBinaryForTarget.js";
|
|
4
|
-
export function resolveLinuxSupervisorBinary(architecture, binaryPath) {
|
|
5
|
-
if (!Value.Check(linuxSupervisorArchitectureSchema, architecture)) {
|
|
6
|
-
throw new Error(`Unsupported Linux supervisor architecture: ${String(architecture)}.`);
|
|
7
|
-
}
|
|
8
|
-
const key = architecture === "arm64" || architecture === "aarch64" ? "linux-arm64" : "linux-x64";
|
|
9
|
-
return resolveBinaryForTarget(key, binaryPath);
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=resolveLinuxSupervisorBinary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveLinuxSupervisorBinary.js","sourceRoot":"","sources":["../sources/resolveLinuxSupervisorBinary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAEhD,OAAO,EACH,iCAAiC,GAGpC,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,UAAU,4BAA4B,CACxC,YAAyC,EACzC,UAAmB;IAEnB,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,iCAAiC,EAAE,YAAY,CAAC,EAAE,CAAC;QAChE,MAAM,IAAI,KAAK,CAAC,8CAA8C,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,GAAG,GACL,YAAY,KAAK,OAAO,IAAI,YAAY,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,WAAW,CAAC;IACzF,OAAO,sBAAsB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSupervisorBinary.d.ts","sourceRoot":"","sources":["../sources/resolveSupervisorBinary.ts"],"names":[],"mappings":"AAGA,wBAAgB,uBAAuB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAcnE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {} from "./platform.js";
|
|
2
|
-
import { resolveBinaryForTarget } from "./impl/resolveBinaryForTarget.js";
|
|
3
|
-
export function resolveSupervisorBinary(binaryPath) {
|
|
4
|
-
const key = `${process.platform}-${process.arch}`;
|
|
5
|
-
if (key !== "darwin-arm64" &&
|
|
6
|
-
key !== "darwin-x64" &&
|
|
7
|
-
key !== "linux-arm64" &&
|
|
8
|
-
key !== "linux-x64" &&
|
|
9
|
-
key !== "win32-x64") {
|
|
10
|
-
throw new Error(`The Happy agent supervisor does not support ${process.platform} ${process.arch}.`);
|
|
11
|
-
}
|
|
12
|
-
return resolveBinaryForTarget(key, binaryPath);
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=resolveSupervisorBinary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resolveSupervisorBinary.js","sourceRoot":"","sources":["../sources/resolveSupervisorBinary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAE1E,MAAM,UAAU,uBAAuB,CAAC,UAAmB;IACvD,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,EAAiB,CAAC;IACjE,IACI,GAAG,KAAK,cAAc;QACtB,GAAG,KAAK,YAAY;QACpB,GAAG,KAAK,aAAa;QACrB,GAAG,KAAK,WAAW;QACnB,GAAG,KAAK,WAAW,EACrB,CAAC;QACC,MAAM,IAAI,KAAK,CACX,+CAA+C,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,IAAI,GAAG,CACrF,CAAC;IACN,CAAC;IACD,OAAO,sBAAsB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC"}
|