@standardagents/code 0.14.8-branch.9e48e914.60c0d9 → 0.14.10-canary.7a7f80
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/lib/artifact.mjs +2 -6
- package/lib/launcher.mjs +18 -15
- package/package.json +8 -12
package/lib/artifact.mjs
CHANGED
|
@@ -26,9 +26,6 @@ export const BUNDLE_ARTIFACT_FILES = Object.freeze([
|
|
|
26
26
|
'licenses/THIRD-PARTY.txt',
|
|
27
27
|
])
|
|
28
28
|
|
|
29
|
-
// The Node plugin runner that native releases from before plugin runtime v2
|
|
30
|
-
// bundled. Builds no longer produce it; installed launchers keep verifying
|
|
31
|
-
// the releases that carry it, which carry either all of these files or none.
|
|
32
29
|
export const RUNNER_ASSET_NAMES = Object.freeze([
|
|
33
30
|
'index.mjs', 'worker.mjs', 'loader.mjs', 'sdk.mjs', 'runtime.json', 'THIRD-PARTY.txt',
|
|
34
31
|
])
|
|
@@ -132,9 +129,8 @@ export const WEB_ARTIFACT_OPTIONAL_FILES = Object.freeze([
|
|
|
132
129
|
export const WEB_ARTIFACT_DIRECTORIES = Object.freeze({ fonts: /\.ttf$/, licenses: /\.txt$/ })
|
|
133
130
|
export const WEB_ARTIFACT_FILE_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/
|
|
134
131
|
// The sample plugins' browser artifacts (packages/web/scripts/build-plugins.mjs),
|
|
135
|
-
// optional: the Worker runtime and index at plugins/,
|
|
136
|
-
//
|
|
137
|
-
// sample plugin id holding its manifest, component and world core module.
|
|
132
|
+
// optional: the Worker runtime and index at plugins/, and one directory per
|
|
133
|
+
// plugin id holding its manifest, component, transpiled glue and core modules.
|
|
138
134
|
export const WEB_ARTIFACT_PLUGIN_FILES = Object.freeze([
|
|
139
135
|
'plugins/worker.js', 'plugins/runtime.js', 'plugins/samples.json',
|
|
140
136
|
])
|
package/lib/launcher.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import process from 'node:process'
|
|
|
6
6
|
|
|
7
7
|
import { platformPackage } from './platform.mjs'
|
|
8
8
|
import { artifactBinaryPath, requireCompatibleGlibc, verifyNativeArtifact } from './artifact.mjs'
|
|
9
|
-
import { artifactPointer, installNativeArtifact, installedArtifact, packageMetadata } from './install.mjs'
|
|
9
|
+
import { artifactPointer, installNativeArtifact, installedArtifact, nativeDirectory, packageMetadata } from './install.mjs'
|
|
10
10
|
|
|
11
11
|
const require = createRequire(import.meta.url)
|
|
12
12
|
const COMMANDS = new Set(['standard', 'standardd'])
|
|
@@ -60,17 +60,6 @@ export function stableBinary(command, options = {}) {
|
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
// The executable this npm package itself carries, never the daemon's
|
|
64
|
-
// native-releases slot behind the stable link. Postinstall marks only this
|
|
65
|
-
// one executable: a slot's files are verified as release state, and a chmod
|
|
66
|
-
// through the stable link would loosen the running release's executables.
|
|
67
|
-
export function packagedBinary(command, options = {}) {
|
|
68
|
-
if (!COMMANDS.has(command)) {
|
|
69
|
-
throw new Error(`Unknown Standard executable: ${command}`)
|
|
70
|
-
}
|
|
71
|
-
return resolvePackagedBinary(command, options)
|
|
72
|
-
}
|
|
73
|
-
|
|
74
63
|
function resolvePackagedBinary(command, options) {
|
|
75
64
|
const platform = platformPackage(
|
|
76
65
|
options.platform,
|
|
@@ -110,8 +99,9 @@ export function spawnBinary(command, args, options = {}) {
|
|
|
110
99
|
}
|
|
111
100
|
|
|
112
101
|
// Install this platform's signed R2 archive when the package names one and
|
|
113
|
-
// has no binaries installed yet.
|
|
114
|
-
//
|
|
102
|
+
// has no binaries installed yet. The package has no install script, so npm
|
|
103
|
+
// and pnpm install it without an allow-scripts prompt, and the first launch
|
|
104
|
+
// downloads and verifies the native build here (#684).
|
|
115
105
|
export async function ensureNativeBinaries(options = {}) {
|
|
116
106
|
if (options.environment?.STANDARD_CODE_BINARY_DIR ?? process.env.STANDARD_CODE_BINARY_DIR) return
|
|
117
107
|
const platform = platformPackage(options.platform, options.architecture, options.report)
|
|
@@ -124,7 +114,20 @@ export async function ensureNativeBinaries(options = {}) {
|
|
|
124
114
|
} catch {
|
|
125
115
|
// No npm platform package: download the archive.
|
|
126
116
|
}
|
|
127
|
-
|
|
117
|
+
const log = options.log ?? (message => console.error(message))
|
|
118
|
+
log(`standard: installing the native build for ${platform.rustTarget} (first launch)`)
|
|
119
|
+
try {
|
|
120
|
+
await installNativeArtifact({ target: platform.rustTarget, root: options.packageRoot, fetchImplementation: options.fetchImplementation })
|
|
121
|
+
} catch (error) {
|
|
122
|
+
if (error?.code === 'EACCES' || error?.code === 'EPERM') {
|
|
123
|
+
throw new Error(
|
|
124
|
+
`cannot write the native build under ${nativeDirectory(platform.rustTarget, options.packageRoot)}. `
|
|
125
|
+
+ 'The package belongs to another user (for example an npm install run with sudo); '
|
|
126
|
+
+ 'reinstall @standardagents/code with an npm prefix you own.',
|
|
127
|
+
)
|
|
128
|
+
}
|
|
129
|
+
throw error
|
|
130
|
+
}
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
export async function main(command) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standardagents/code",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.10-canary.7a7f80",
|
|
4
4
|
"description": "Platform launcher for the Standard universal terminal network.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -21,24 +21,20 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"bin",
|
|
24
|
-
"lib"
|
|
25
|
-
"postinstall.mjs"
|
|
24
|
+
"lib"
|
|
26
25
|
],
|
|
27
|
-
"scripts": {
|
|
28
|
-
"postinstall": "node postinstall.mjs"
|
|
29
|
-
},
|
|
30
26
|
"standardArtifacts": {
|
|
31
27
|
"schema": 1,
|
|
32
28
|
"targets": {
|
|
33
29
|
"aarch64-apple-darwin": {
|
|
34
|
-
"url": "https://builds.standardcode.ai/artifacts/0.14.
|
|
35
|
-
"sha256": "
|
|
36
|
-
"size":
|
|
30
|
+
"url": "https://builds.standardcode.ai/artifacts/0.14.10-canary.7a7f80/aarch64-apple-darwin.tar.gz",
|
|
31
|
+
"sha256": "d19dade69f67bfb037ac616b09e25d9d201e245aade9a9eaa4175093505bc1ce",
|
|
32
|
+
"size": 22934134
|
|
37
33
|
},
|
|
38
34
|
"x86_64-unknown-linux-gnu": {
|
|
39
|
-
"url": "https://builds.standardcode.ai/artifacts/0.14.
|
|
40
|
-
"sha256": "
|
|
41
|
-
"size":
|
|
35
|
+
"url": "https://builds.standardcode.ai/artifacts/0.14.10-canary.7a7f80/x86_64-unknown-linux-gnu.tar.gz",
|
|
36
|
+
"sha256": "4573d250d68117f7237f5c73ce71c343c6189a90a01b64715f8263ee550ec592",
|
|
37
|
+
"size": 28561215
|
|
42
38
|
}
|
|
43
39
|
}
|
|
44
40
|
},
|