@slopus/happy-agent-supervisor 0.0.2 → 0.0.3-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 CHANGED
@@ -7,7 +7,7 @@ an argument vector; it applies the operating system's own isolation and then
7
7
 
8
8
  ```text
9
9
  caller
10
- │ policy JSON on fd or file
10
+ │ policy JSON argument or trusted file
11
11
  │ argv after --
12
12
 
13
13
  supervisor
@@ -68,7 +68,7 @@ package explicitly and read its path from your build script:
68
68
 
69
69
  ```sh
70
70
  # The binary you want to copy into a linux/amd64 image.
71
- npm install --no-save @slopus/happy-agent-supervisor@0.0.2-linux-x64
71
+ npm install --no-save @slopus/happy-agent-supervisor@0.0.3-linux-x64
72
72
  ```
73
73
 
74
74
  Or ask your package manager for every variant at once, which is what a release
@@ -76,8 +76,8 @@ pipeline usually wants:
76
76
 
77
77
  ```sh
78
78
  npm install --force \
79
- @slopus/happy-agent-supervisor@0.0.2-linux-x64 \
80
- @slopus/happy-agent-supervisor@0.0.2-linux-arm64
79
+ @slopus/happy-agent-supervisor@0.0.3-linux-x64 \
80
+ @slopus/happy-agent-supervisor@0.0.3-linux-arm64
81
81
  ```
82
82
 
83
83
  Then point the container at it:
@@ -104,13 +104,9 @@ const policy = parseSupervisorPolicy({
104
104
 
105
105
  const child = spawn(
106
106
  resolveSupervisorBinary(),
107
- ["--policy-fd", "3", "--", "/usr/bin/env", "node", "build.mjs"],
108
- {
109
- cwd: "/work/project",
110
- stdio: ["inherit", "inherit", "inherit", "pipe"],
111
- },
107
+ ["--policy", JSON.stringify(policy), "--", "/usr/bin/env", "node", "build.mjs"],
108
+ { cwd: "/work/project", stdio: "inherit" },
112
109
  );
113
- child.stdio[3].end(JSON.stringify(policy));
114
110
  ```
115
111
 
116
112
  `parseSupervisorPolicy(value)` validates against the TypeBox schema and throws a
@@ -126,17 +122,17 @@ not installed. If neither is present they throw, naming the package to reinstall
126
122
 
127
123
  ## Command line
128
124
 
129
- Policy stays out of argv, and the command is always an argument vector:
125
+ Policy and command are ordinary arguments, matching Codex's direct `sandbox-exec -p` invocation:
130
126
 
131
127
  ```sh
132
- happy-agent-supervisor --policy-fd 3 -- /bin/sh -c 'printf "%s\n" "$VALUE"'
128
+ happy-agent-supervisor --policy '{"mode":"workspace_write","network":{"egress":false,"localBinding":false}}' -- /bin/sh -c 'printf "%s\n" "$VALUE"'
133
129
  happy-agent-supervisor --policy-file /trusted/policy.json -- /usr/bin/env
134
130
  ```
135
131
 
136
- Exactly one of `--policy-fd` and `--policy-file` is required, and everything
137
- after `--` is the target command. The supervisor consumes the policy descriptor;
138
- descriptors `0`, `1`, and `2` are rejected. Policy files are read and closed
139
- before sandbox setup. Policy JSON is limited to 1 MiB and rejects unknown fields.
132
+ Exactly one of `--policy` and `--policy-file` is required, and everything after `--` is the target
133
+ command. Policy files are read and closed before sandbox setup. Policy JSON is limited to 1 MiB and
134
+ rejects unknown fields. The direct form creates no inherited descriptor beyond ordinary stdin,
135
+ stdout, and stderr.
140
136
  A supervisor-level failure — a bad argument, an invalid policy, an enforcement
141
137
  step that would not apply — exits `125` with a message on stderr, which keeps it
142
138
  distinguishable from the workload's own status. Otherwise the workload's exit
package/SHA256SUMS ADDED
@@ -0,0 +1 @@
1
+ 7632a60e11718a54b1aaef404f994a6e97603ca766d0170d698b14b045c3d129 vendor/aarch64-apple-darwin/bin/happy-agent-supervisor
package/package.json CHANGED
@@ -1,45 +1,33 @@
1
1
  {
2
2
  "name": "@slopus/happy-agent-supervisor",
3
- "version": "0.0.2",
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.3-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/rig.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
- "dist",
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-darwin-arm64": "npm:@slopus/happy-agent-supervisor@0.0.2-darwin-arm64",
41
- "@slopus/happy-agent-supervisor-darwin-x64": "npm:@slopus/happy-agent-supervisor@0.0.2-darwin-x64",
42
- "@slopus/happy-agent-supervisor-linux-arm64": "npm:@slopus/happy-agent-supervisor@0.0.2-linux-arm64",
43
- "@slopus/happy-agent-supervisor-linux-x64": "npm:@slopus/happy-agent-supervisor@0.0.2-linux-x64"
30
+ "access": "public",
31
+ "tag": "platform"
44
32
  }
45
33
  }
@@ -1,53 +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
- network: import("@sinclair/typebox").TObject<{
43
- egress: import("@sinclair/typebox").TBoolean;
44
- allowedHosts: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
45
- localBinding: import("@sinclair/typebox").TBoolean;
46
- outgoingProxy: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
47
- frontEnds: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"http">, import("@sinclair/typebox").TLiteral<"socks5">]>>;
48
- }>>;
49
- }>;
50
- }>;
51
- export type SupervisorPolicy = Static<typeof supervisorPolicySchema>;
52
- export declare function parseSupervisorPolicy(value: unknown): SupervisorPolicy;
53
- //# 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;AAGtD,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;;;;;;;;;;;;;;EAUlC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAQtE"}
@@ -1,56 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { Value } from "@sinclair/typebox/value";
3
- export const supervisorPermissionModeSchema = Type.Union([
4
- Type.Literal("read_only"),
5
- Type.Literal("workspace_write"),
6
- Type.Literal("auto"),
7
- Type.Literal("full_access"),
8
- ]);
9
- export const supervisorProxyFrontEndSchema = Type.Union([
10
- Type.Literal("http"),
11
- Type.Literal("socks5"),
12
- ]);
13
- /**
14
- * The front-ends to expose inside the sandbox.
15
- *
16
- * The supervisor provides the proxy itself. It forks an egress process before the sandbox exists
17
- * and joins the two with a socketpair, so nothing inside the sandbox reaches the proxy — or
18
- * anything else — by address, and the caller supplies neither a descriptor nor a token. Which hosts
19
- * that egress process may reach comes from `network.allowedHosts`.
20
- */
21
- export const supervisorOutgoingProxySchema = Type.Object({
22
- frontEnds: Type.Array(supervisorProxyFrontEndSchema, { minItems: 1 }),
23
- }, { additionalProperties: false });
24
- export const supervisorNetworkPolicySchema = Type.Object({
25
- egress: Type.Boolean(),
26
- allowedHosts: Type.Optional(Type.Array(Type.String())),
27
- localBinding: Type.Boolean(),
28
- outgoingProxy: Type.Optional(supervisorOutgoingProxySchema),
29
- }, { additionalProperties: false });
30
- /**
31
- * The native supervisor's input. Its names intentionally match ComputePermissions one-for-one.
32
- *
33
- * The working directory is the workspace root for `workspace_write` and `auto`; keeping it out of
34
- * the document prevents two sources of truth for the process cwd. A non-empty `allowedHosts`
35
- * requires `network.outgoingProxy`, because the host list is enforced in the egress process the
36
- * proxy creates, and without a proxy there would be nothing enforcing it. Each entry names one host
37
- * or one `*.suffix`; a bare `*` is refused, and open egress is expressed by configuring no proxy.
38
- */
39
- export const supervisorPolicySchema = Type.Object({
40
- mode: supervisorPermissionModeSchema,
41
- allowedReadPaths: Type.Optional(Type.Array(Type.String())),
42
- deniedReadPaths: Type.Optional(Type.Array(Type.String())),
43
- allowedWritePaths: Type.Optional(Type.Array(Type.String())),
44
- deniedWritePaths: Type.Optional(Type.Array(Type.String())),
45
- network: supervisorNetworkPolicySchema,
46
- }, { additionalProperties: false });
47
- export function parseSupervisorPolicy(value) {
48
- if (!Value.Check(supervisorPolicySchema, value)) {
49
- const details = [...Value.Errors(supervisorPolicySchema, value)]
50
- .map((error) => `${error.path || "/"} ${error.message}`)
51
- .join("; ");
52
- throw new Error(`Invalid supervisor policy: ${details}`);
53
- }
54
- return Value.Parse(supervisorPolicySchema, value);
55
- }
56
- //# 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;AAEhD,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,OA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AAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3D,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IAC1D,OAAO,EAAE,6BAA6B;CACzC,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,3 +0,0 @@
1
- import { type PlatformKey } from "../platform.js";
2
- export declare function resolveBinaryForTarget(key: PlatformKey, binaryPath?: string): string;
3
- //# sourceMappingURL=resolveBinaryForTarget.d.ts.map
@@ -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;AAKpE,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAsCpF"}
@@ -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
- const executable = "happy-agent-supervisor";
8
- export function resolveBinaryForTarget(key, binaryPath) {
9
- if (binaryPath !== undefined) {
10
- const explicit = path.resolve(binaryPath);
11
- if (!existsSync(explicit)) {
12
- throw new Error(`Happy agent supervisor binary does not exist: ${explicit}`);
13
- }
14
- return explicit;
15
- }
16
- const platform = PLATFORM_TARGETS[key];
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,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WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,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,5 +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
- //# sourceMappingURL=index.d.ts.map
@@ -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"}
package/dist/index.js DELETED
@@ -1,5 +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
- //# 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"}
@@ -1,36 +0,0 @@
1
- import { type Static } from "@sinclair/typebox";
2
- export declare const PLATFORM_TARGETS: {
3
- readonly "darwin-arm64": {
4
- readonly alias: "@slopus/happy-agent-supervisor-darwin-arm64";
5
- readonly arch: "arm64";
6
- readonly os: "darwin";
7
- readonly tag: "darwin-arm64";
8
- readonly target: "aarch64-apple-darwin";
9
- };
10
- readonly "darwin-x64": {
11
- readonly alias: "@slopus/happy-agent-supervisor-darwin-x64";
12
- readonly arch: "x64";
13
- readonly os: "darwin";
14
- readonly tag: "darwin-x64";
15
- readonly target: "x86_64-apple-darwin";
16
- };
17
- readonly "linux-arm64": {
18
- readonly alias: "@slopus/happy-agent-supervisor-linux-arm64";
19
- readonly arch: "arm64";
20
- readonly os: "linux";
21
- readonly tag: "linux-arm64";
22
- readonly target: "aarch64-unknown-linux-musl";
23
- };
24
- readonly "linux-x64": {
25
- readonly alias: "@slopus/happy-agent-supervisor-linux-x64";
26
- readonly arch: "x64";
27
- readonly os: "linux";
28
- readonly tag: "linux-x64";
29
- readonly target: "x86_64-unknown-linux-musl";
30
- };
31
- };
32
- export type PlatformKey = keyof typeof PLATFORM_TARGETS;
33
- 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">]>;
34
- /** Architecture spellings used by OCI, Node.js, and Rust target triples. */
35
- export type LinuxSupervisorArchitecture = Static<typeof linuxSupervisorArchitectureSchema>;
36
- //# sourceMappingURL=platform.d.ts.map
@@ -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,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,39 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- export const PLATFORM_TARGETS = {
3
- "darwin-arm64": {
4
- alias: "@slopus/happy-agent-supervisor-darwin-arm64",
5
- arch: "arm64",
6
- os: "darwin",
7
- tag: "darwin-arm64",
8
- target: "aarch64-apple-darwin",
9
- },
10
- "darwin-x64": {
11
- alias: "@slopus/happy-agent-supervisor-darwin-x64",
12
- arch: "x64",
13
- os: "darwin",
14
- tag: "darwin-x64",
15
- target: "x86_64-apple-darwin",
16
- },
17
- "linux-arm64": {
18
- alias: "@slopus/happy-agent-supervisor-linux-arm64",
19
- arch: "arm64",
20
- os: "linux",
21
- tag: "linux-arm64",
22
- target: "aarch64-unknown-linux-musl",
23
- },
24
- "linux-x64": {
25
- alias: "@slopus/happy-agent-supervisor-linux-x64",
26
- arch: "x64",
27
- os: "linux",
28
- tag: "linux-x64",
29
- target: "x86_64-unknown-linux-musl",
30
- },
31
- };
32
- export const linuxSupervisorArchitectureSchema = Type.Union([
33
- Type.Literal("amd64"),
34
- Type.Literal("x64"),
35
- Type.Literal("x86_64"),
36
- Type.Literal("arm64"),
37
- Type.Literal("aarch64"),
38
- ]);
39
- //# sourceMappingURL=platform.js.map
@@ -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,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,3 +0,0 @@
1
- import { type LinuxSupervisorArchitecture } from "./platform.js";
2
- export declare function resolveLinuxSupervisorBinary(architecture: LinuxSupervisorArchitecture, binaryPath?: string): string;
3
- //# sourceMappingURL=resolveLinuxSupervisorBinary.d.ts.map
@@ -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,2 +0,0 @@
1
- export declare function resolveSupervisorBinary(binaryPath?: string): string;
2
- //# sourceMappingURL=resolveSupervisorBinary.d.ts.map
@@ -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,CAanE"}
@@ -1,13 +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
- throw new Error(`The Happy agent supervisor does not support ${process.platform} ${process.arch}.`);
10
- }
11
- return resolveBinaryForTarget(key, binaryPath);
12
- }
13
- //# 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,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"}