@boldblackai/harness 1.9.10 → 1.9.11

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.
Files changed (2) hide show
  1. package/bin/harness.js +9 -2
  2. package/package.json +1 -1
package/bin/harness.js CHANGED
@@ -69,8 +69,15 @@ class AppleContainerRuntime {
69
69
  return "container";
70
70
  }
71
71
  pullArgs(image) {
72
- // apple/container nests pull under the `image` subgroup.
73
- return ["image", "pull", image];
72
+ // apple/container nests pull under the `image` subgroup. Pass
73
+ // --platform so the correct arch variant is pulled: without it (and
74
+ // without CONTAINER_DEFAULT_PLATFORM), `image pull` resolves the
75
+ // platform to nil and selects the first entry in the manifest list
76
+ // (linux/amd64), pulling the wrong arch on Apple Silicon. `container
77
+ // run` defaults to the host arch via its own path, so the image was
78
+ // being pulled twice — once wrong, once right.
79
+ const arch = process.arch === "arm64" ? "arm64" : "amd64";
80
+ return ["image", "pull", "--platform", `linux/${arch}`, image];
74
81
  }
75
82
  inspectImage(image) {
76
83
  let out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boldblackai/harness",
3
- "version": "1.9.10",
3
+ "version": "1.9.11",
4
4
  "description": "Portable environment for running coding agents in a container",
5
5
  "bin": {
6
6
  "harness": "bin/harness.js"