@standardagents/code 0.14.3-canary.6cc75f → 0.14.5-branch.9e48e914.ded17d
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 +6 -2
- package/lib/launcher.mjs +15 -18
- package/package.json +12 -8
package/lib/artifact.mjs
CHANGED
|
@@ -26,6 +26,9 @@ 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.
|
|
29
32
|
export const RUNNER_ASSET_NAMES = Object.freeze([
|
|
30
33
|
'index.mjs', 'worker.mjs', 'loader.mjs', 'sdk.mjs', 'runtime.json', 'THIRD-PARTY.txt',
|
|
31
34
|
])
|
|
@@ -129,8 +132,9 @@ export const WEB_ARTIFACT_OPTIONAL_FILES = Object.freeze([
|
|
|
129
132
|
export const WEB_ARTIFACT_DIRECTORIES = Object.freeze({ fonts: /\.ttf$/, licenses: /\.txt$/ })
|
|
130
133
|
export const WEB_ARTIFACT_FILE_NAME = /^[A-Za-z0-9][A-Za-z0-9._-]*$/
|
|
131
134
|
// The sample plugins' browser artifacts (packages/web/scripts/build-plugins.mjs),
|
|
132
|
-
// optional: the Worker runtime and index at plugins/,
|
|
133
|
-
//
|
|
135
|
+
// optional: the Worker runtime and index at plugins/, the reference glue at
|
|
136
|
+
// plugins/host/, jco's transpiler at plugins/jco/, and one directory per
|
|
137
|
+
// sample plugin id holding its manifest, component and world core module.
|
|
134
138
|
export const WEB_ARTIFACT_PLUGIN_FILES = Object.freeze([
|
|
135
139
|
'plugins/worker.js', 'plugins/runtime.js', 'plugins/samples.json',
|
|
136
140
|
])
|
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,
|
|
9
|
+
import { artifactPointer, installNativeArtifact, installedArtifact, packageMetadata } from './install.mjs'
|
|
10
10
|
|
|
11
11
|
const require = createRequire(import.meta.url)
|
|
12
12
|
const COMMANDS = new Set(['standard', 'standardd'])
|
|
@@ -60,6 +60,17 @@ 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
|
+
|
|
63
74
|
function resolvePackagedBinary(command, options) {
|
|
64
75
|
const platform = platformPackage(
|
|
65
76
|
options.platform,
|
|
@@ -99,9 +110,8 @@ export function spawnBinary(command, args, options = {}) {
|
|
|
99
110
|
}
|
|
100
111
|
|
|
101
112
|
// Install this platform's signed R2 archive when the package names one and
|
|
102
|
-
// has no binaries installed yet.
|
|
103
|
-
//
|
|
104
|
-
// downloads and verifies the native build here (#684).
|
|
113
|
+
// has no binaries installed yet. Package managers that skip install scripts
|
|
114
|
+
// (pnpm by default) reach this on the first launch instead of postinstall.
|
|
105
115
|
export async function ensureNativeBinaries(options = {}) {
|
|
106
116
|
if (options.environment?.STANDARD_CODE_BINARY_DIR ?? process.env.STANDARD_CODE_BINARY_DIR) return
|
|
107
117
|
const platform = platformPackage(options.platform, options.architecture, options.report)
|
|
@@ -114,20 +124,7 @@ export async function ensureNativeBinaries(options = {}) {
|
|
|
114
124
|
} catch {
|
|
115
125
|
// No npm platform package: download the archive.
|
|
116
126
|
}
|
|
117
|
-
|
|
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
|
-
}
|
|
127
|
+
await installNativeArtifact({ target: platform.rustTarget, root: options.packageRoot, fetchImplementation: options.fetchImplementation })
|
|
131
128
|
}
|
|
132
129
|
|
|
133
130
|
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.5-branch.9e48e914.ded17d",
|
|
4
4
|
"description": "Platform launcher for the Standard universal terminal network.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -21,20 +21,24 @@
|
|
|
21
21
|
},
|
|
22
22
|
"files": [
|
|
23
23
|
"bin",
|
|
24
|
-
"lib"
|
|
24
|
+
"lib",
|
|
25
|
+
"postinstall.mjs"
|
|
25
26
|
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"postinstall": "node postinstall.mjs"
|
|
29
|
+
},
|
|
26
30
|
"standardArtifacts": {
|
|
27
31
|
"schema": 1,
|
|
28
32
|
"targets": {
|
|
29
33
|
"aarch64-apple-darwin": {
|
|
30
|
-
"url": "https://builds.standardcode.ai/artifacts/0.14.
|
|
31
|
-
"sha256": "
|
|
32
|
-
"size":
|
|
34
|
+
"url": "https://builds.standardcode.ai/artifacts/0.14.5-branch.9e48e914.ded17d/aarch64-apple-darwin.tar.gz",
|
|
35
|
+
"sha256": "97319a7ce9afb9ee725dfabeb4f5ad3ab447f6fae4d6c5f34d3569e6980c915c",
|
|
36
|
+
"size": 26202924
|
|
33
37
|
},
|
|
34
38
|
"x86_64-unknown-linux-gnu": {
|
|
35
|
-
"url": "https://builds.standardcode.ai/artifacts/0.14.
|
|
36
|
-
"sha256": "
|
|
37
|
-
"size":
|
|
39
|
+
"url": "https://builds.standardcode.ai/artifacts/0.14.5-branch.9e48e914.ded17d/x86_64-unknown-linux-gnu.tar.gz",
|
|
40
|
+
"sha256": "696e7c000df3fda3092c8d1dbcb7a1a85f61f541ccd5cc3e3cfd380b66ca83c3",
|
|
41
|
+
"size": 35029154
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
},
|