@standardagents/code 0.14.1-issue.613.b9157a → 0.14.1-issue.613.b9157a-linux-x64-gnu

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/platform.mjs DELETED
@@ -1,50 +0,0 @@
1
- const PLATFORMS = new Map([
2
- ['darwin:arm64', {
3
- packageName: '@standardagents/code-darwin-arm64',
4
- rustTarget: 'aarch64-apple-darwin',
5
- }],
6
- ['darwin:x64', {
7
- packageName: '@standardagents/code-darwin-x64',
8
- rustTarget: 'x86_64-apple-darwin',
9
- }],
10
- ['linux:arm64', {
11
- packageName: '@standardagents/code-linux-arm64-gnu',
12
- rustTarget: 'aarch64-unknown-linux-gnu',
13
- }],
14
- ['linux:x64', {
15
- packageName: '@standardagents/code-linux-x64-gnu',
16
- rustTarget: 'x86_64-unknown-linux-gnu',
17
- }],
18
- ])
19
-
20
- export function platformPackage(
21
- platform = process.platform,
22
- architecture = process.arch,
23
- report = process.report,
24
- ) {
25
- const entry = PLATFORMS.get(`${platform}:${architecture}`)
26
- if (!entry) {
27
- throw new Error(
28
- `Standard does not yet provide binaries for ${platform}/${architecture}; `
29
- + 'Phase 0 supports macOS and glibc Linux on arm64/x64.',
30
- )
31
- }
32
- if (platform === 'linux' && !isGlibc(report)) {
33
- throw new Error(
34
- 'Standard Phase 0 Linux packages require glibc; a musl build is not published yet.',
35
- )
36
- }
37
- return entry
38
- }
39
-
40
- export function supportedPlatforms() {
41
- return [...PLATFORMS.values()].map((entry) => ({ ...entry }))
42
- }
43
-
44
- function isGlibc(report) {
45
- try {
46
- return Boolean(report?.getReport()?.header?.glibcVersionRuntime)
47
- } catch {
48
- return false
49
- }
50
- }
package/postinstall.mjs DELETED
@@ -1,12 +0,0 @@
1
- import { chmodSync } from 'node:fs'
2
-
3
- import { resolveBinary } from './lib/launcher.mjs'
4
-
5
- for (const command of ['standard', 'standardd']) {
6
- try {
7
- chmodSync(resolveBinary(command), 0o755)
8
- } catch (error) {
9
- const detail = error instanceof Error ? error.message : String(error)
10
- console.warn(`@standardagents/code: ${detail}`)
11
- }
12
- }