@standardagents/code 0.14.116-canary.2adc09 → 0.14.117-canary.936d78

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/lib/install.mjs +7 -1
  2. package/package.json +8 -7
package/lib/install.mjs CHANGED
@@ -76,7 +76,13 @@ export async function installNativeArtifact({ target, root = PACKAGE_ROOT, fetch
76
76
  const metadata = packageMetadata(root)
77
77
  const pointer = artifactPointer(metadata, target)
78
78
  if (!pointer) throw new Error(`This package carries no native archive for ${target}`)
79
- const response = await fetchImplementation(pointer.url)
79
+ // The URL was pinned by artifactPointer. Never follow a redirect carrying
80
+ // the account credential, and never send it to npm or a package-supplied host.
81
+ const token = process.env.STANDARD_RELEASE_TOKEN
82
+ const response = await fetchImplementation(pointer.url, {
83
+ redirect: 'manual',
84
+ ...(token ? { headers: { authorization: `Bearer ${token}` } } : {}),
85
+ })
80
86
  if (!response.ok) throw new Error(`Downloading the native archive failed with HTTP ${response.status}`)
81
87
  const bytes = await readBody(response, pointer.size, onProgress)
82
88
  if (bytes.length !== pointer.size || createHash('sha256').update(bytes).digest('hex') !== pointer.sha256) {
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@standardagents/code",
3
- "version": "0.14.116-canary.2adc09",
3
+ "standardRegistryReader": 1,
4
+ "version": "0.14.117-canary.936d78",
4
5
  "description": "Platform launcher for the Standard universal terminal network.",
5
6
  "type": "module",
6
7
  "license": "UNLICENSED",
@@ -27,14 +28,14 @@
27
28
  "schema": 1,
28
29
  "targets": {
29
30
  "aarch64-apple-darwin": {
30
- "url": "https://builds.standardcode.ai/artifacts/0.14.116-canary.2adc09/aarch64-apple-darwin.tar.gz",
31
- "sha256": "9f432a034a63a4dc523a75c2c93159eea38473c57efc6b2c29dac058adba1f8d",
32
- "size": 30819195
31
+ "url": "https://builds.standardcode.ai/artifacts/0.14.117-canary.936d78/aarch64-apple-darwin.tar.gz",
32
+ "sha256": "6b38a0e7c4fdacfd4b884645f8d2bca92a8f245d7acf24686ede975e877572b1",
33
+ "size": 30864464
33
34
  },
34
35
  "x86_64-unknown-linux-gnu": {
35
- "url": "https://builds.standardcode.ai/artifacts/0.14.116-canary.2adc09/x86_64-unknown-linux-gnu.tar.gz",
36
- "sha256": "b004ec023cabdb1157a7d2c94eab9de5aa46ffde9dea2dfe58c3f61fe04fe3ac",
37
- "size": 29844316
36
+ "url": "https://builds.standardcode.ai/artifacts/0.14.117-canary.936d78/x86_64-unknown-linux-gnu.tar.gz",
37
+ "sha256": "cb7ce8264d9d6ec4ffd727f528bb5e881e44e9d66e46c2d51e8231c91c27ab99",
38
+ "size": 29846181
38
39
  }
39
40
  }
40
41
  },