@rivet-dev/agentos-sidecar 0.0.0-agentos-dylib-plugin.f065be7 → 0.0.0-chdir-fix.3d9feab

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,19 +1,19 @@
1
- # @rivet-dev/agent-os-sidecar
1
+ # @rivet-dev/agentos-sidecar
2
2
 
3
3
  Platform-specific resolver for the Agent OS native sidecar binary.
4
4
 
5
- The compiled `agent-os-sidecar` binary ships inside one of the
6
- `@rivet-dev/agent-os-sidecar-<platform>` packages, which this package declares as
5
+ The compiled `agentos-sidecar` binary ships inside one of the
6
+ `@rivet-dev/agentos-sidecar-<platform>` packages, which this package declares as
7
7
  optional dependencies. npm installs only the package matching the current
8
8
  `os`/`cpu`/`libc` at install time.
9
9
 
10
10
  ```js
11
- const { getSidecarPath } = require("@rivet-dev/agent-os-sidecar");
11
+ const { getSidecarPath } = require("@rivet-dev/agentos-sidecar");
12
12
 
13
13
  const binaryPath = getSidecarPath();
14
14
  ```
15
15
 
16
- Set `AGENT_OS_SIDECAR_BIN` to an absolute path to override resolution (useful
16
+ Set `AGENTOS_SIDECAR_BIN` to an absolute path to override resolution (useful
17
17
  for development or custom builds).
18
18
 
19
- Supported platforms: `linux-x64-gnu`, `linux-arm64-gnu`.
19
+ Supported platforms: `linux-x64-gnu`, `linux-arm64-gnu`, `darwin-arm64`, `darwin-x64`.
package/index.d.ts CHANGED
@@ -5,7 +5,8 @@
5
5
  * Resolution priority:
6
6
  * 1. `AGENTOS_SIDECAR_BIN` env var (absolute path override).
7
7
  * 2. A `agentos-sidecar` binary placed next to this package (dev builds).
8
- * 3. The platform-specific `@rivet-dev/agentos-sidecar-<platform>` package.
8
+ * 3. A cargo build output under the repo `target/{release,debug}/` (dev).
9
+ * 4. The platform-specific `@rivet-dev/agentos-sidecar-<platform>` package.
9
10
  *
10
11
  * @throws if the platform is unsupported or no binary can be found.
11
12
  */
package/index.js CHANGED
@@ -8,7 +8,8 @@
8
8
  // Resolution priority:
9
9
  // 1. `AGENTOS_SIDECAR_BIN` env var (absolute path override).
10
10
  // 2. A `agentos-sidecar` binary placed next to this package (dev builds).
11
- // 3. The platform-specific `@rivet-dev/agentos-sidecar-<platform>` package.
11
+ // 3. A cargo build output under the repo `target/{release,debug}/` (dev).
12
+ // 4. The platform-specific `@rivet-dev/agentos-sidecar-<platform>` package.
12
13
 
13
14
  const { existsSync } = require("node:fs");
14
15
  const { join, dirname } = require("node:path");
@@ -27,6 +28,10 @@ function getPlatformPackageName() {
27
28
  if (arch === "x64") return "@rivet-dev/agentos-sidecar-linux-x64-gnu";
28
29
  if (arch === "arm64") return "@rivet-dev/agentos-sidecar-linux-arm64-gnu";
29
30
  break;
31
+ case "darwin":
32
+ if (arch === "x64") return "@rivet-dev/agentos-sidecar-darwin-x64";
33
+ if (arch === "arm64") return "@rivet-dev/agentos-sidecar-darwin-arm64";
34
+ break;
30
35
  default:
31
36
  break;
32
37
  }
@@ -49,11 +54,18 @@ function getSidecarPath() {
49
54
  return localBinary;
50
55
  }
51
56
 
57
+ for (const profile of ["release", "debug"]) {
58
+ const candidate = join(__dirname, "..", "..", "target", profile, BINARY_NAME);
59
+ if (existsSync(candidate)) {
60
+ return candidate;
61
+ }
62
+ }
63
+
52
64
  const platformPkg = getPlatformPackageName();
53
65
  if (!platformPkg) {
54
66
  throw new Error(
55
67
  `@rivet-dev/agentos-sidecar: unsupported platform ${process.platform}/${process.arch}. ` +
56
- "The Agent OS sidecar currently supports linux x64 and arm64. " +
68
+ "The Agent OS sidecar currently supports linux and darwin on x64 and arm64. " +
57
69
  "Set AGENTOS_SIDECAR_BIN to a local agentos-sidecar binary to override.",
58
70
  );
59
71
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivet-dev/agentos-sidecar",
3
- "version": "0.0.0-agentos-dylib-plugin.f065be7",
3
+ "version": "0.0.0-chdir-fix.3d9feab",
4
4
  "description": "Platform-specific resolver for the Agent OS native sidecar binary",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -18,7 +18,15 @@
18
18
  "engines": {
19
19
  "node": ">=20"
20
20
  },
21
+ "scripts": {
22
+ "build": "node scripts/build.mjs",
23
+ "build:release": "node scripts/build.mjs --release",
24
+ "check-types": "exit 0"
25
+ },
21
26
  "optionalDependencies": {
22
- "@rivet-dev/agentos-sidecar-linux-x64-gnu": "0.0.0-agentos-dylib-plugin.f065be7"
27
+ "@rivet-dev/agentos-sidecar-darwin-arm64": "0.0.0-chdir-fix.3d9feab",
28
+ "@rivet-dev/agentos-sidecar-darwin-x64": "0.0.0-chdir-fix.3d9feab",
29
+ "@rivet-dev/agentos-sidecar-linux-arm64-gnu": "0.0.0-chdir-fix.3d9feab",
30
+ "@rivet-dev/agentos-sidecar-linux-x64-gnu": "0.0.0-chdir-fix.3d9feab"
23
31
  }
24
32
  }