@tetsuo-ai/agenc 0.19.16 → 0.19.17
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/bin/agenc +1 -0
- package/generated/agenc-runtime-manifest-v2.json +79 -79
- package/lib/runtime-manager.mjs +48 -1
- package/package.json +1 -1
package/bin/agenc
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 2,
|
|
3
|
-
"runtimeVersion": "0.19.
|
|
3
|
+
"runtimeVersion": "0.19.17",
|
|
4
4
|
"releaseRepository": "tetsuo-ai/agenc-releases",
|
|
5
|
-
"releaseTag": "agenc-v0.19.
|
|
5
|
+
"releaseTag": "agenc-v0.19.17",
|
|
6
6
|
"build": {
|
|
7
|
-
"sourceCommit": "
|
|
8
|
-
"sourceRef": "refs/tags/agenc-v0.19.
|
|
9
|
-
"sourceDateEpoch":
|
|
10
|
-
"lockfileSha256": "
|
|
7
|
+
"sourceCommit": "bb42aee00886dcdce39efece8f384d8bb872ea8b",
|
|
8
|
+
"sourceRef": "refs/tags/agenc-v0.19.17",
|
|
9
|
+
"sourceDateEpoch": 1792783469,
|
|
10
|
+
"lockfileSha256": "6deff10e6417b6d0934c624b5c017422c4f5b38529d89d35ed93ab9feb3f62e9",
|
|
11
11
|
"nodeVersion": "v26.12.1",
|
|
12
12
|
"nodeMajor": 26,
|
|
13
13
|
"nodeModuleAbi": "147",
|
|
@@ -16,32 +16,32 @@
|
|
|
16
16
|
"artifactProfile": "release",
|
|
17
17
|
"releaseCandidate": {
|
|
18
18
|
"workflow": "release-runtime.yml",
|
|
19
|
-
"runId":
|
|
19
|
+
"runId": 40014783560,
|
|
20
20
|
"runAttempt": 1,
|
|
21
|
-
"runUrl": "https://github.com/tetsuo-ai/agenc-core/actions/runs/
|
|
21
|
+
"runUrl": "https://github.com/tetsuo-ai/agenc-core/actions/runs/40014783560",
|
|
22
22
|
"phase": "candidate",
|
|
23
23
|
"sourceRef": "refs/heads/main",
|
|
24
|
-
"evidenceSha256": "
|
|
24
|
+
"evidenceSha256": "c85715f650869d997a7f3558e2cefa067913a34ba4a7d5762aa797bbd1919ee3"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"artifacts": [
|
|
28
28
|
{
|
|
29
29
|
"platform": "darwin",
|
|
30
30
|
"arch": "arm64",
|
|
31
|
-
"runtimeVersion": "0.19.
|
|
31
|
+
"runtimeVersion": "0.19.17",
|
|
32
32
|
"nodeMajor": 26,
|
|
33
33
|
"nodeModuleAbi": "147",
|
|
34
34
|
"nodeApiVersion": "10",
|
|
35
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
36
|
-
"sha256": "
|
|
37
|
-
"bytes":
|
|
38
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
39
|
-
"attestationSha256": "
|
|
40
|
-
"attestationBytes":
|
|
41
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
42
|
-
"buildProvenanceSha256": "
|
|
43
|
-
"buildProvenanceBytes":
|
|
44
|
-
"metadataSha256": "
|
|
35
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-darwin-arm64-node26-abi147.tar.gz",
|
|
36
|
+
"sha256": "4b4ae5d0c95549444b7d11dea7d73985dc18491f4a676cd5eb81a68ec24b2a31",
|
|
37
|
+
"bytes": 113309295,
|
|
38
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-darwin-arm64-node26-abi147.tar.gz.sigstore.json",
|
|
39
|
+
"attestationSha256": "a7f817b157bf7271c7bde03f79f2f2c6bb2ec30b8ba2ebf0d5d4d28bc81e3be1",
|
|
40
|
+
"attestationBytes": 11411,
|
|
41
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-darwin-arm64-node26-abi147.tar.gz.build.sigstore.json",
|
|
42
|
+
"buildProvenanceSha256": "69b8fd6147ed7d1218bdd9dd922b4ab45b9732de1d3606e3bd68b44b92438c4f",
|
|
43
|
+
"buildProvenanceBytes": 11273,
|
|
44
|
+
"metadataSha256": "070aa45b1eda5cd869c2cb48995d287aa489c882fa0266f214b1bc34a67d6a63",
|
|
45
45
|
"nativeToolchain": {
|
|
46
46
|
"schemaVersion": 1,
|
|
47
47
|
"builder": "github-hosted:macos-15:macos15:20260907.0337.1:ARM64",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"xcode": "Xcode 16.4\nBuild version 16F6",
|
|
72
72
|
"sdk": "15.5"
|
|
73
73
|
},
|
|
74
|
-
"dependencyTreeSha256": "
|
|
74
|
+
"dependencyTreeSha256": "2181474c7ac5980be8f5de25ea0c42d43517a524cbbd5c29546e5a7cfc6338b6",
|
|
75
75
|
"dependencyPackages": 463,
|
|
76
76
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
77
77
|
"archiveValidation": {
|
|
78
78
|
"policy": "agenc-runtime-archive-v1",
|
|
79
|
-
"entries":
|
|
80
|
-
"uncompressedBytes":
|
|
79
|
+
"entries": 30308,
|
|
80
|
+
"uncompressedBytes": 443227136
|
|
81
81
|
},
|
|
82
82
|
"minimumMacosVersion": "13.5",
|
|
83
83
|
"bins": {
|
|
@@ -88,20 +88,20 @@
|
|
|
88
88
|
{
|
|
89
89
|
"platform": "darwin",
|
|
90
90
|
"arch": "x64",
|
|
91
|
-
"runtimeVersion": "0.19.
|
|
91
|
+
"runtimeVersion": "0.19.17",
|
|
92
92
|
"nodeMajor": 26,
|
|
93
93
|
"nodeModuleAbi": "147",
|
|
94
94
|
"nodeApiVersion": "10",
|
|
95
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
96
|
-
"sha256": "
|
|
97
|
-
"bytes":
|
|
98
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
99
|
-
"attestationSha256": "
|
|
100
|
-
"attestationBytes":
|
|
101
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
102
|
-
"buildProvenanceSha256": "
|
|
103
|
-
"buildProvenanceBytes":
|
|
104
|
-
"metadataSha256": "
|
|
95
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-darwin-x64-node26-abi147.tar.gz",
|
|
96
|
+
"sha256": "0d142a927c7d595efc084864b5eaf9cf63a35b5eb0d5fe7ddc1daa681a8c6fb1",
|
|
97
|
+
"bytes": 115208265,
|
|
98
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-darwin-x64-node26-abi147.tar.gz.sigstore.json",
|
|
99
|
+
"attestationSha256": "7216a17103d6a8958a5571fd6ce75295fcd7c9d9739456a2e6327cd0795a46a2",
|
|
100
|
+
"attestationBytes": 11403,
|
|
101
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-darwin-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
102
|
+
"buildProvenanceSha256": "e8cdfa44cc20f10440c1ac7f47c332d9c6e2bc22ed0e5ce5c82ee4aeedad2e24",
|
|
103
|
+
"buildProvenanceBytes": 11265,
|
|
104
|
+
"metadataSha256": "91b49ac087a7a83ae96f0b37fbc990b8aec65c7fa45964341b8fbb9904b33730",
|
|
105
105
|
"nativeToolchain": {
|
|
106
106
|
"schemaVersion": 1,
|
|
107
107
|
"builder": "github-hosted:macos-15-intel:macos15:20260824.0482.1:X64",
|
|
@@ -131,13 +131,13 @@
|
|
|
131
131
|
"xcode": "Xcode 16.4\nBuild version 16F6",
|
|
132
132
|
"sdk": "15.5"
|
|
133
133
|
},
|
|
134
|
-
"dependencyTreeSha256": "
|
|
134
|
+
"dependencyTreeSha256": "b4bc9dc77ccb9c8dee3e83aa232223ab5f5f29931de637e9b8f19823457fd5a6",
|
|
135
135
|
"dependencyPackages": 463,
|
|
136
136
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
137
137
|
"archiveValidation": {
|
|
138
138
|
"policy": "agenc-runtime-archive-v1",
|
|
139
|
-
"entries":
|
|
140
|
-
"uncompressedBytes":
|
|
139
|
+
"entries": 30308,
|
|
140
|
+
"uncompressedBytes": 448190464
|
|
141
141
|
},
|
|
142
142
|
"minimumMacosVersion": "13.5",
|
|
143
143
|
"bins": {
|
|
@@ -148,20 +148,20 @@
|
|
|
148
148
|
{
|
|
149
149
|
"platform": "linux",
|
|
150
150
|
"arch": "arm64",
|
|
151
|
-
"runtimeVersion": "0.19.
|
|
151
|
+
"runtimeVersion": "0.19.17",
|
|
152
152
|
"nodeMajor": 26,
|
|
153
153
|
"nodeModuleAbi": "147",
|
|
154
154
|
"nodeApiVersion": "10",
|
|
155
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
156
|
-
"sha256": "
|
|
157
|
-
"bytes":
|
|
158
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
159
|
-
"attestationSha256": "
|
|
160
|
-
"attestationBytes":
|
|
161
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
162
|
-
"buildProvenanceSha256": "
|
|
163
|
-
"buildProvenanceBytes":
|
|
164
|
-
"metadataSha256": "
|
|
155
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-linux-arm64-node26-abi147.tar.gz",
|
|
156
|
+
"sha256": "881edb6f45a80cce2cdbe3af37aee6df1ae9dde243a8bd6e0aafa459d6763fb2",
|
|
157
|
+
"bytes": 127556621,
|
|
158
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-linux-arm64-node26-abi147.tar.gz.sigstore.json",
|
|
159
|
+
"attestationSha256": "0649aeb4ec0e810419004746302d609b8291e1875bdd10af8fceeda4a30585eb",
|
|
160
|
+
"attestationBytes": 11317,
|
|
161
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-linux-arm64-node26-abi147.tar.gz.build.sigstore.json",
|
|
162
|
+
"buildProvenanceSha256": "2a02138f8ad0fbeca20bd333da65b363bd195e1a99eb3946b370e8984cdcfad5",
|
|
163
|
+
"buildProvenanceBytes": 11363,
|
|
164
|
+
"metadataSha256": "a720079ed2bdb940f9bb3a4f9fd477a6fdb07ba15f24d30bf6ca3ef8ae169a3d",
|
|
165
165
|
"nativeToolchain": {
|
|
166
166
|
"schemaVersion": 1,
|
|
167
167
|
"builder": "rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c+rpm-content-sha256:5829a1e40236ef0f7bc62ed3c6511bd3602a929e964cbb02cb3e0634df5a1c82",
|
|
@@ -203,13 +203,13 @@
|
|
|
203
203
|
"tar-1.30-11.el8_10"
|
|
204
204
|
]
|
|
205
205
|
},
|
|
206
|
-
"dependencyTreeSha256": "
|
|
206
|
+
"dependencyTreeSha256": "32a9955cde2fb87ce9f3525a9bb98ceab6af6f6265b839b3c1eb39ef44d2e9fd",
|
|
207
207
|
"dependencyPackages": 465,
|
|
208
208
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
209
209
|
"archiveValidation": {
|
|
210
210
|
"policy": "agenc-runtime-archive-v1",
|
|
211
|
-
"entries":
|
|
212
|
-
"uncompressedBytes":
|
|
211
|
+
"entries": 30335,
|
|
212
|
+
"uncompressedBytes": 467054080
|
|
213
213
|
},
|
|
214
214
|
"libcFamily": "glibc",
|
|
215
215
|
"minimumGlibcVersion": "2.28",
|
|
@@ -224,20 +224,20 @@
|
|
|
224
224
|
{
|
|
225
225
|
"platform": "linux",
|
|
226
226
|
"arch": "x64",
|
|
227
|
-
"runtimeVersion": "0.19.
|
|
227
|
+
"runtimeVersion": "0.19.17",
|
|
228
228
|
"nodeMajor": 26,
|
|
229
229
|
"nodeModuleAbi": "147",
|
|
230
230
|
"nodeApiVersion": "10",
|
|
231
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
232
|
-
"sha256": "
|
|
233
|
-
"bytes":
|
|
234
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
235
|
-
"attestationSha256": "
|
|
236
|
-
"attestationBytes":
|
|
237
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
238
|
-
"buildProvenanceSha256": "
|
|
239
|
-
"buildProvenanceBytes":
|
|
240
|
-
"metadataSha256": "
|
|
231
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-linux-x64-node26-abi147.tar.gz",
|
|
232
|
+
"sha256": "707cd54421c82437743020e4c82d63cbe0aa1ff348dd5f03bf629e8348718b1e",
|
|
233
|
+
"bytes": 127456709,
|
|
234
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-linux-x64-node26-abi147.tar.gz.sigstore.json",
|
|
235
|
+
"attestationSha256": "1fb81cf092345b5d56e73300c7e53fa5068a6865cf2f36b6e8edbf023965ef42",
|
|
236
|
+
"attestationBytes": 11415,
|
|
237
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-linux-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
238
|
+
"buildProvenanceSha256": "8a82d03730b997994510fb453213c6c2dd5b63657b1c95d15a88d6ea1e36961c",
|
|
239
|
+
"buildProvenanceBytes": 11214,
|
|
240
|
+
"metadataSha256": "7b59864be40d77ed93c79d1bfde957f2ee3ca6ec00fa5d8e7d77eb8b5006d756",
|
|
241
241
|
"nativeToolchain": {
|
|
242
242
|
"schemaVersion": 1,
|
|
243
243
|
"builder": "rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c+rpm-content-sha256:dd68b6a5168f632115be67586491fc7813f984ba80b56db539cc03b3c4bbd05f",
|
|
@@ -279,13 +279,13 @@
|
|
|
279
279
|
"tar-1.30-11.el8_10"
|
|
280
280
|
]
|
|
281
281
|
},
|
|
282
|
-
"dependencyTreeSha256": "
|
|
282
|
+
"dependencyTreeSha256": "06d4b2d657fefbf5096ba878be6e8eccb9657e9c20a21f9cbe9ccd35b0619ec0",
|
|
283
283
|
"dependencyPackages": 465,
|
|
284
284
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
285
285
|
"archiveValidation": {
|
|
286
286
|
"policy": "agenc-runtime-archive-v1",
|
|
287
|
-
"entries":
|
|
288
|
-
"uncompressedBytes":
|
|
287
|
+
"entries": 30335,
|
|
288
|
+
"uncompressedBytes": 468727808
|
|
289
289
|
},
|
|
290
290
|
"libcFamily": "glibc",
|
|
291
291
|
"minimumGlibcVersion": "2.28",
|
|
@@ -300,20 +300,20 @@
|
|
|
300
300
|
{
|
|
301
301
|
"platform": "win",
|
|
302
302
|
"arch": "x64",
|
|
303
|
-
"runtimeVersion": "0.19.
|
|
303
|
+
"runtimeVersion": "0.19.17",
|
|
304
304
|
"nodeMajor": 26,
|
|
305
305
|
"nodeModuleAbi": "147",
|
|
306
306
|
"nodeApiVersion": "10",
|
|
307
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
308
|
-
"sha256": "
|
|
309
|
-
"bytes":
|
|
310
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
311
|
-
"attestationSha256": "
|
|
312
|
-
"attestationBytes":
|
|
313
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.
|
|
314
|
-
"buildProvenanceSha256": "
|
|
315
|
-
"buildProvenanceBytes":
|
|
316
|
-
"metadataSha256": "
|
|
307
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-win-x64-node26-abi147.tar.gz",
|
|
308
|
+
"sha256": "91f65a09a2f7f352e5eac5fedf6aff9d1224f5a4ade7d97644fe402bdceeb956",
|
|
309
|
+
"bytes": 109408017,
|
|
310
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-win-x64-node26-abi147.tar.gz.sigstore.json",
|
|
311
|
+
"attestationSha256": "51ad031ed05024a190ca13b2e6f163ded966ee8e07ba1a647420ac637ea069da",
|
|
312
|
+
"attestationBytes": 11348,
|
|
313
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.17/agenc-runtime-0.19.17-win-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
314
|
+
"buildProvenanceSha256": "24b725667cf563f48051200eb17f10016ce40826e913fd7e9601e25d382deb24",
|
|
315
|
+
"buildProvenanceBytes": 11027,
|
|
316
|
+
"metadataSha256": "3ca67e6a614f10becc84a0b1ff32c6b5c8d21c56a4e6792e834bb20263bd67ed",
|
|
317
317
|
"nativeToolchain": {
|
|
318
318
|
"schemaVersion": 1,
|
|
319
319
|
"builder": "github-hosted:windows-2025-vs2026:win25-vs2026:20261021.278.1:X64",
|
|
@@ -355,13 +355,13 @@
|
|
|
355
355
|
"msvcCompilerSha256": "b0a1818ebae6da7f18230a84e76ce839212584ac4c2ab55b97a0d5268085da57",
|
|
356
356
|
"msvcLinkerSha256": "a8c42e25c91ca2453e1110540ac08f0fc12d7539454a11b9af8baeecb469837d"
|
|
357
357
|
},
|
|
358
|
-
"dependencyTreeSha256": "
|
|
358
|
+
"dependencyTreeSha256": "237cdcf4eef5dd28b27db559854f13367bef2d33dbb8f511b733a9137bde7a5b",
|
|
359
359
|
"dependencyPackages": 462,
|
|
360
360
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
361
361
|
"archiveValidation": {
|
|
362
362
|
"policy": "agenc-runtime-archive-v1",
|
|
363
|
-
"entries":
|
|
364
|
-
"uncompressedBytes":
|
|
363
|
+
"entries": 30350,
|
|
364
|
+
"uncompressedBytes": 405789696
|
|
365
365
|
},
|
|
366
366
|
"bins": {
|
|
367
367
|
"agenc": "node_modules/@tetsuo-ai/runtime/bin/agenc",
|
package/lib/runtime-manager.mjs
CHANGED
|
@@ -1419,7 +1419,7 @@ function extractTarGz(archive, destDir) {
|
|
|
1419
1419
|
// Ensure the runtime for `manifest.runtimeVersion` is present and return every
|
|
1420
1420
|
// path needed to launch it with the artifact's private Node. Idempotent: a
|
|
1421
1421
|
// verified existing install short-circuits the download.
|
|
1422
|
-
|
|
1422
|
+
async function ensureRuntimeInstalled({
|
|
1423
1423
|
env = process.env,
|
|
1424
1424
|
userHome = homedir(),
|
|
1425
1425
|
manifest = readManifest(),
|
|
@@ -1634,6 +1634,53 @@ export async function ensureRuntimeLaunch({
|
|
|
1634
1634
|
}
|
|
1635
1635
|
}
|
|
1636
1636
|
|
|
1637
|
+
// The npm launcher shares the standalone stable executable on macOS. Development
|
|
1638
|
+
// links bypass this manager and continue using their host Node.
|
|
1639
|
+
export async function ensureRuntimeLaunch(options = {}) {
|
|
1640
|
+
const manifest = options.manifest ?? readManifest();
|
|
1641
|
+
const artifact = selectArtifact(manifest, options.slug ?? platformSlug(), process.versions.modules,
|
|
1642
|
+
options.runtimeCompatibility ?? currentRuntimeCompatibility(),
|
|
1643
|
+
{ trustMode: options.manifestTrust ?? "official" });
|
|
1644
|
+
if (process.platform !== "darwin" || artifact.platform !== "darwin" ||
|
|
1645
|
+
manifest.runtimeVersion === FROZEN_LEGACY_RUNTIME_VERSION) {
|
|
1646
|
+
return ensureRuntimeInstalled({ ...options, manifest });
|
|
1647
|
+
}
|
|
1648
|
+
const home = canonicalizeAgenCHome(resolveAgenCHome(options.env ?? process.env, options.userHome ?? homedir()));
|
|
1649
|
+
const maintenance = await import("./runtime-maintenance.mjs");
|
|
1650
|
+
const stable = await import("./stable-node.mjs");
|
|
1651
|
+
const lease = await maintenance.beginRuntimeUpdate(home);
|
|
1652
|
+
let releaseActivation;
|
|
1653
|
+
let result;
|
|
1654
|
+
let activated = false;
|
|
1655
|
+
try {
|
|
1656
|
+
const launch = await ensureRuntimeInstalled({ ...options, manifest });
|
|
1657
|
+
releaseActivation = await acquireLocalSqliteLock(join(home, "runtime", ".activation-lock.sqlite"), {
|
|
1658
|
+
label: "npm Node activation", timeoutMs: 60_000,
|
|
1659
|
+
});
|
|
1660
|
+
if (existsSync(join(home, "runtime", ".activation-transaction.json"))) {
|
|
1661
|
+
throw new Error("standalone activation recovery pending; rerun the installer");
|
|
1662
|
+
}
|
|
1663
|
+
const nodeBin = stable.installStableNode(home, stable.describeStableNode(home, launch.nodeBin));
|
|
1664
|
+
activated = maintenance.recordRuntimeActivation(home, manifest.runtimeVersion);
|
|
1665
|
+
result = { ...launch, nodeBin };
|
|
1666
|
+
} finally {
|
|
1667
|
+
try { releaseActivation?.(); }
|
|
1668
|
+
finally { maintenance.endRuntimeUpdate(lease); }
|
|
1669
|
+
}
|
|
1670
|
+
if (activated) {
|
|
1671
|
+
// A cached launch does not prune. Only a completed version activation does.
|
|
1672
|
+
try {
|
|
1673
|
+
const pruning = await maintenance.pruneRuntimes(home);
|
|
1674
|
+
if (pruning.removed.length > 0) {
|
|
1675
|
+
(options.log ?? ((message) => process.stderr.write(message + "\n")))(
|
|
1676
|
+
`agenc: runtime cleanup freed ${pruning.freedBytes} bytes in ${pruning.removed.length} trees`,
|
|
1677
|
+
);
|
|
1678
|
+
}
|
|
1679
|
+
} catch { /* cleanup must not fail a verified launch */ }
|
|
1680
|
+
}
|
|
1681
|
+
return result;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1637
1684
|
// Backward-compatible install-only surface used by npm postinstall and callers
|
|
1638
1685
|
// that only need the runtime entrypoint.
|
|
1639
1686
|
export async function ensureRuntime(options) {
|