@tetsuo-ai/agenc 0.16.1 → 0.19.0
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/generated/agenc-runtime-manifest-v2.json +104 -102
- package/generated/startup-preflight.mjs +1 -0
- package/lib/generated-wrapper.mjs +49 -12
- package/lib/home-authority.d.mts +26 -0
- package/lib/home-authority.mjs +64 -0
- package/lib/runtime-manager.mjs +161 -25
- package/lib/sqlite-lock.d.mts +4 -0
- package/lib/sqlite-lock.mjs +375 -38
- package/package.json +6 -3
- package/scripts/postinstall.mjs +23 -2
- package/src/launcher.mjs +163 -38
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 2,
|
|
3
|
-
"runtimeVersion": "0.
|
|
3
|
+
"runtimeVersion": "0.19.0",
|
|
4
4
|
"releaseRepository": "tetsuo-ai/agenc-releases",
|
|
5
|
-
"releaseTag": "agenc-v0.
|
|
5
|
+
"releaseTag": "agenc-v0.19.0",
|
|
6
6
|
"build": {
|
|
7
|
-
"sourceCommit": "
|
|
8
|
-
"sourceRef": "refs/tags/agenc-v0.
|
|
9
|
-
"sourceDateEpoch":
|
|
10
|
-
"lockfileSha256": "
|
|
7
|
+
"sourceCommit": "e41429da2a3dd464903cb90344be3ac0ab7ed76a",
|
|
8
|
+
"sourceRef": "refs/tags/agenc-v0.19.0",
|
|
9
|
+
"sourceDateEpoch": 1792007308,
|
|
10
|
+
"lockfileSha256": "7495769b4665b728658cae511ed8f33c2d90dd5f0e30ab511265440dc3c085c0",
|
|
11
11
|
"nodeVersion": "v26.5.0",
|
|
12
12
|
"nodeMajor": 26,
|
|
13
13
|
"nodeModuleAbi": "147",
|
|
@@ -16,43 +16,43 @@
|
|
|
16
16
|
"artifactProfile": "release",
|
|
17
17
|
"releaseCandidate": {
|
|
18
18
|
"workflow": "release-runtime.yml",
|
|
19
|
-
"runId":
|
|
19
|
+
"runId": 38631106918,
|
|
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/38631106918",
|
|
22
22
|
"phase": "candidate",
|
|
23
23
|
"sourceRef": "refs/heads/main",
|
|
24
|
-
"evidenceSha256": "
|
|
24
|
+
"evidenceSha256": "c778885434d070d2f9b1f1343d835ded980d55a36f11da933b41d60cf08745ba"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"artifacts": [
|
|
28
28
|
{
|
|
29
29
|
"platform": "darwin",
|
|
30
30
|
"arch": "arm64",
|
|
31
|
-
"runtimeVersion": "0.
|
|
31
|
+
"runtimeVersion": "0.19.0",
|
|
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.
|
|
36
|
-
"sha256": "
|
|
37
|
-
"bytes":
|
|
38
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
39
|
-
"attestationSha256": "
|
|
40
|
-
"attestationBytes":
|
|
41
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
42
|
-
"buildProvenanceSha256": "
|
|
43
|
-
"buildProvenanceBytes":
|
|
44
|
-
"metadataSha256": "
|
|
35
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-darwin-arm64-node26-abi147.tar.gz",
|
|
36
|
+
"sha256": "094ffa5cb95dde199d59ff5c759f5fe5a865dc7a19be51a8ee6c1fa74bcd503a",
|
|
37
|
+
"bytes": 111646152,
|
|
38
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-darwin-arm64-node26-abi147.tar.gz.sigstore.json",
|
|
39
|
+
"attestationSha256": "efeace7f7e19945d76c111a5ef754298d3a89623ee39c95d96c1f0d797cc60c2",
|
|
40
|
+
"attestationBytes": 11285,
|
|
41
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-darwin-arm64-node26-abi147.tar.gz.build.sigstore.json",
|
|
42
|
+
"buildProvenanceSha256": "fb82b120901b4f97458e92968d5bea942d150f74175860ee31a5d1004ae42f6c",
|
|
43
|
+
"buildProvenanceBytes": 10983,
|
|
44
|
+
"metadataSha256": "be9e1f36b88a4aa9b04d2789c44f29d7235dd613972d329c0036557ce30d7de6",
|
|
45
45
|
"nativeToolchain": {
|
|
46
46
|
"schemaVersion": 1,
|
|
47
|
-
"builder": "github-hosted:macos-15:macos15:
|
|
47
|
+
"builder": "github-hosted:macos-15:macos15:20260907.0337.1:ARM64",
|
|
48
48
|
"runnerLabel": "macos-15",
|
|
49
49
|
"runnerImage": "macos15",
|
|
50
|
-
"runnerImageVersion": "
|
|
50
|
+
"runnerImageVersion": "20260907.0337.1",
|
|
51
51
|
"runnerArch": "ARM64",
|
|
52
52
|
"cc": "Apple clang version 17.0.0 (clang-1700.0.13.5)",
|
|
53
53
|
"cxx": "Apple clang version 17.0.0 (clang-1700.0.13.5)",
|
|
54
54
|
"linker": "@(#)PROGRAM:ld PROJECT:ld-1167.5",
|
|
55
|
-
"python": "Python 3.14.
|
|
55
|
+
"python": "Python 3.14.7",
|
|
56
56
|
"make": "GNU Make 3.81",
|
|
57
57
|
"buildFlags": {
|
|
58
58
|
"CC": "/Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang",
|
|
@@ -71,13 +71,13 @@
|
|
|
71
71
|
"xcode": "Xcode 16.4\nBuild version 16F6",
|
|
72
72
|
"sdk": "15.5"
|
|
73
73
|
},
|
|
74
|
-
"dependencyTreeSha256": "
|
|
75
|
-
"dependencyPackages":
|
|
74
|
+
"dependencyTreeSha256": "f35d353ce32a28bf9fc90c52bcbcfe70fe00db5825de4497da1fa4312cde4215",
|
|
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": 30060,
|
|
80
|
+
"uncompressedBytes": 437545984
|
|
81
81
|
},
|
|
82
82
|
"minimumMacosVersion": "13.5",
|
|
83
83
|
"bins": {
|
|
@@ -88,31 +88,31 @@
|
|
|
88
88
|
{
|
|
89
89
|
"platform": "darwin",
|
|
90
90
|
"arch": "x64",
|
|
91
|
-
"runtimeVersion": "0.
|
|
91
|
+
"runtimeVersion": "0.19.0",
|
|
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.
|
|
96
|
-
"sha256": "
|
|
97
|
-
"bytes":
|
|
98
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
99
|
-
"attestationSha256": "
|
|
100
|
-
"attestationBytes":
|
|
101
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
102
|
-
"buildProvenanceSha256": "
|
|
103
|
-
"buildProvenanceBytes":
|
|
104
|
-
"metadataSha256": "
|
|
95
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-darwin-x64-node26-abi147.tar.gz",
|
|
96
|
+
"sha256": "8ae4044a38b28128dbadc61c112dcba346b91434c5bbe9e4c68ee6ac541b69fd",
|
|
97
|
+
"bytes": 113378567,
|
|
98
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-darwin-x64-node26-abi147.tar.gz.sigstore.json",
|
|
99
|
+
"attestationSha256": "636f9c263e6ceecb98fd3cda3cde084b0e56cf7f2d7c860eb40d1d9cf3e53ca1",
|
|
100
|
+
"attestationBytes": 11281,
|
|
101
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-darwin-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
102
|
+
"buildProvenanceSha256": "db8766c32daf3fa699032bbac409451a31dcb3f1113756de0b08aed59fbd5d64",
|
|
103
|
+
"buildProvenanceBytes": 11167,
|
|
104
|
+
"metadataSha256": "2221f71298bd82124c915354706758c6d1d8d9ee5de8e691cc6a900bcf3d6184",
|
|
105
105
|
"nativeToolchain": {
|
|
106
106
|
"schemaVersion": 1,
|
|
107
|
-
"builder": "github-hosted:macos-15-intel:macos15:
|
|
107
|
+
"builder": "github-hosted:macos-15-intel:macos15:20260824.0482.1:X64",
|
|
108
108
|
"runnerLabel": "macos-15-intel",
|
|
109
109
|
"runnerImage": "macos15",
|
|
110
|
-
"runnerImageVersion": "
|
|
110
|
+
"runnerImageVersion": "20260824.0482.1",
|
|
111
111
|
"runnerArch": "X64",
|
|
112
112
|
"cc": "Apple clang version 17.0.0 (clang-1700.0.13.5)",
|
|
113
113
|
"cxx": "Apple clang version 17.0.0 (clang-1700.0.13.5)",
|
|
114
114
|
"linker": "@(#)PROGRAM:ld PROJECT:ld-1167.5",
|
|
115
|
-
"python": "Python 3.14.
|
|
115
|
+
"python": "Python 3.14.7",
|
|
116
116
|
"make": "GNU Make 3.81",
|
|
117
117
|
"buildFlags": {
|
|
118
118
|
"CC": "/Applications/Xcode_16.4.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang",
|
|
@@ -131,13 +131,13 @@
|
|
|
131
131
|
"xcode": "Xcode 16.4\nBuild version 16F6",
|
|
132
132
|
"sdk": "15.5"
|
|
133
133
|
},
|
|
134
|
-
"dependencyTreeSha256": "
|
|
135
|
-
"dependencyPackages":
|
|
134
|
+
"dependencyTreeSha256": "8ddd86766e94776d9fdb256fd6ea6f8fc5057f948906d25a796af3dafff0cace",
|
|
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": 30060,
|
|
140
|
+
"uncompressedBytes": 441524736
|
|
141
141
|
},
|
|
142
142
|
"minimumMacosVersion": "13.5",
|
|
143
143
|
"bins": {
|
|
@@ -148,23 +148,23 @@
|
|
|
148
148
|
{
|
|
149
149
|
"platform": "linux",
|
|
150
150
|
"arch": "arm64",
|
|
151
|
-
"runtimeVersion": "0.
|
|
151
|
+
"runtimeVersion": "0.19.0",
|
|
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.
|
|
156
|
-
"sha256": "
|
|
157
|
-
"bytes":
|
|
158
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
159
|
-
"attestationSha256": "
|
|
160
|
-
"attestationBytes":
|
|
161
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
162
|
-
"buildProvenanceSha256": "
|
|
163
|
-
"buildProvenanceBytes":
|
|
164
|
-
"metadataSha256": "
|
|
155
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-linux-arm64-node26-abi147.tar.gz",
|
|
156
|
+
"sha256": "7028a07db10de395c6bc3f2fbe24103798e4cde25b2168bd8944840d6c91b019",
|
|
157
|
+
"bytes": 125838385,
|
|
158
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-linux-arm64-node26-abi147.tar.gz.sigstore.json",
|
|
159
|
+
"attestationSha256": "d25dbd7dbfd46fd57dd4cfbfc0be1268014a91f309224f509e97cef54f19418e",
|
|
160
|
+
"attestationBytes": 11344,
|
|
161
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-linux-arm64-node26-abi147.tar.gz.build.sigstore.json",
|
|
162
|
+
"buildProvenanceSha256": "bdc3389d91edff5a17fd37c33f0fa83a43ec8d8ecb296dc76fec7a492e206eed",
|
|
163
|
+
"buildProvenanceBytes": 11222,
|
|
164
|
+
"metadataSha256": "8d17e75b4a047bfa54810d988da8ac7234265eace6297c3584aa2026b919cfef",
|
|
165
165
|
"nativeToolchain": {
|
|
166
166
|
"schemaVersion": 1,
|
|
167
|
-
"builder": "rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c+rpm-content-sha256:
|
|
167
|
+
"builder": "rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c+rpm-content-sha256:5829a1e40236ef0f7bc62ed3c6511bd3602a929e964cbb02cb3e0634df5a1c82",
|
|
168
168
|
"runnerArch": "ARM64",
|
|
169
169
|
"cc": "gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-7)",
|
|
170
170
|
"cxx": "g++ (GCC) 12.2.1 20221121 (Red Hat 12.2.1-7)",
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"npmDistributionSha256": "b290bbb35b9e72c3ef84edbe041f28c4479c4d9ee79f555817b8caafe7ce4bba",
|
|
186
186
|
"rpmContentInventorySchemaVersion": 1,
|
|
187
187
|
"rpmContentInventoryFormat": "name|epoch|version|release|arch|sha256header|payloaddigest|payloaddigestalgo|rsaheader-pgpsig",
|
|
188
|
-
"rpmContentInventorySha256": "
|
|
188
|
+
"rpmContentInventorySha256": "5829a1e40236ef0f7bc62ed3c6511bd3602a929e964cbb02cb3e0634df5a1c82",
|
|
189
189
|
"rpmSigningKeyIds": [
|
|
190
190
|
"15af5dac6d745a60"
|
|
191
191
|
],
|
|
@@ -193,6 +193,7 @@
|
|
|
193
193
|
"gcc-toolset-12-binutils-2.38-17.el8",
|
|
194
194
|
"gcc-toolset-12-gcc-c++-12.2.1-7.8.el8_10",
|
|
195
195
|
"git-2.43.7-1.el8_10",
|
|
196
|
+
"glibc-static-2.28-251.el8_10.43",
|
|
196
197
|
"gzip-1.9-13.el8_5",
|
|
197
198
|
"kernel-headers-4.18.0-553.150.1.el8_10",
|
|
198
199
|
"libatomic-8.5.0-28.el8_10",
|
|
@@ -202,13 +203,13 @@
|
|
|
202
203
|
"tar-1.30-11.el8_10"
|
|
203
204
|
]
|
|
204
205
|
},
|
|
205
|
-
"dependencyTreeSha256": "
|
|
206
|
-
"dependencyPackages":
|
|
206
|
+
"dependencyTreeSha256": "6678dd9c58f79a8834781450519f847cb867529ed222c1f03e216f68e9344481",
|
|
207
|
+
"dependencyPackages": 465,
|
|
207
208
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
208
209
|
"archiveValidation": {
|
|
209
210
|
"policy": "agenc-runtime-archive-v1",
|
|
210
|
-
"entries":
|
|
211
|
-
"uncompressedBytes":
|
|
211
|
+
"entries": 30087,
|
|
212
|
+
"uncompressedBytes": 461389824
|
|
212
213
|
},
|
|
213
214
|
"libcFamily": "glibc",
|
|
214
215
|
"minimumGlibcVersion": "2.28",
|
|
@@ -223,23 +224,23 @@
|
|
|
223
224
|
{
|
|
224
225
|
"platform": "linux",
|
|
225
226
|
"arch": "x64",
|
|
226
|
-
"runtimeVersion": "0.
|
|
227
|
+
"runtimeVersion": "0.19.0",
|
|
227
228
|
"nodeMajor": 26,
|
|
228
229
|
"nodeModuleAbi": "147",
|
|
229
230
|
"nodeApiVersion": "10",
|
|
230
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
231
|
-
"sha256": "
|
|
232
|
-
"bytes":
|
|
233
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
234
|
-
"attestationSha256": "
|
|
235
|
-
"attestationBytes":
|
|
236
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
237
|
-
"buildProvenanceSha256": "
|
|
238
|
-
"buildProvenanceBytes":
|
|
239
|
-
"metadataSha256": "
|
|
231
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-linux-x64-node26-abi147.tar.gz",
|
|
232
|
+
"sha256": "2c954ae92023609000a54547340def2b3b090dbe923d5c43cce80442e8863719",
|
|
233
|
+
"bytes": 125577786,
|
|
234
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-linux-x64-node26-abi147.tar.gz.sigstore.json",
|
|
235
|
+
"attestationSha256": "68749ae7e11e8743110b7e618a615261db3f9956e2a93dd2b08c78d5422213d5",
|
|
236
|
+
"attestationBytes": 11371,
|
|
237
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-linux-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
238
|
+
"buildProvenanceSha256": "dc50b71f58b67c90732084a13ddaf8eb639fd8db83725cc41210cb9c4f30202f",
|
|
239
|
+
"buildProvenanceBytes": 11210,
|
|
240
|
+
"metadataSha256": "01d7595e3ac90382d884a4f9bbe5d1dfcf8c55634c8151c9559f56db3e578c48",
|
|
240
241
|
"nativeToolchain": {
|
|
241
242
|
"schemaVersion": 1,
|
|
242
|
-
"builder": "rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c+rpm-content-sha256:
|
|
243
|
+
"builder": "rockylinux@sha256:9794037624aaa6212aeada1d28861ef5e0a935adaf93e4ef79837119f2a2d04c+rpm-content-sha256:dd68b6a5168f632115be67586491fc7813f984ba80b56db539cc03b3c4bbd05f",
|
|
243
244
|
"runnerArch": "X64",
|
|
244
245
|
"cc": "gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-7)",
|
|
245
246
|
"cxx": "g++ (GCC) 12.2.1 20221121 (Red Hat 12.2.1-7)",
|
|
@@ -260,7 +261,7 @@
|
|
|
260
261
|
"npmDistributionSha256": "b290bbb35b9e72c3ef84edbe041f28c4479c4d9ee79f555817b8caafe7ce4bba",
|
|
261
262
|
"rpmContentInventorySchemaVersion": 1,
|
|
262
263
|
"rpmContentInventoryFormat": "name|epoch|version|release|arch|sha256header|payloaddigest|payloaddigestalgo|rsaheader-pgpsig",
|
|
263
|
-
"rpmContentInventorySha256": "
|
|
264
|
+
"rpmContentInventorySha256": "dd68b6a5168f632115be67586491fc7813f984ba80b56db539cc03b3c4bbd05f",
|
|
264
265
|
"rpmSigningKeyIds": [
|
|
265
266
|
"15af5dac6d745a60"
|
|
266
267
|
],
|
|
@@ -268,6 +269,7 @@
|
|
|
268
269
|
"gcc-toolset-12-binutils-2.38-17.el8",
|
|
269
270
|
"gcc-toolset-12-gcc-c++-12.2.1-7.8.el8_10",
|
|
270
271
|
"git-2.43.7-1.el8_10",
|
|
272
|
+
"glibc-static-2.28-251.el8_10.43",
|
|
271
273
|
"gzip-1.9-13.el8_5",
|
|
272
274
|
"kernel-headers-4.18.0-553.150.1.el8_10",
|
|
273
275
|
"libatomic-8.5.0-28.el8_10",
|
|
@@ -277,13 +279,13 @@
|
|
|
277
279
|
"tar-1.30-11.el8_10"
|
|
278
280
|
]
|
|
279
281
|
},
|
|
280
|
-
"dependencyTreeSha256": "
|
|
281
|
-
"dependencyPackages":
|
|
282
|
+
"dependencyTreeSha256": "54f69fbe7ff128ae3cd5fe8bf3cd5caf178c619773df90783d530fc3c5051b24",
|
|
283
|
+
"dependencyPackages": 465,
|
|
282
284
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
283
285
|
"archiveValidation": {
|
|
284
286
|
"policy": "agenc-runtime-archive-v1",
|
|
285
|
-
"entries":
|
|
286
|
-
"uncompressedBytes":
|
|
287
|
+
"entries": 30087,
|
|
288
|
+
"uncompressedBytes": 462776832
|
|
287
289
|
},
|
|
288
290
|
"libcFamily": "glibc",
|
|
289
291
|
"minimumGlibcVersion": "2.28",
|
|
@@ -298,29 +300,29 @@
|
|
|
298
300
|
{
|
|
299
301
|
"platform": "win",
|
|
300
302
|
"arch": "x64",
|
|
301
|
-
"runtimeVersion": "0.
|
|
303
|
+
"runtimeVersion": "0.19.0",
|
|
302
304
|
"nodeMajor": 26,
|
|
303
305
|
"nodeModuleAbi": "147",
|
|
304
306
|
"nodeApiVersion": "10",
|
|
305
|
-
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
306
|
-
"sha256": "
|
|
307
|
-
"bytes":
|
|
308
|
-
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
309
|
-
"attestationSha256": "
|
|
310
|
-
"attestationBytes":
|
|
311
|
-
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.
|
|
312
|
-
"buildProvenanceSha256": "
|
|
313
|
-
"buildProvenanceBytes":
|
|
314
|
-
"metadataSha256": "
|
|
307
|
+
"url": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-win-x64-node26-abi147.tar.gz",
|
|
308
|
+
"sha256": "a64ce50736b8734e19b6e0dc953d967f7843cc8008f98adba10de196b6cebbc6",
|
|
309
|
+
"bytes": 107688752,
|
|
310
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-win-x64-node26-abi147.tar.gz.sigstore.json",
|
|
311
|
+
"attestationSha256": "7ea5fc6efd3d0c6a5015c24b5d69b6d5682c3647e3ee7a115b26335a57ac99bf",
|
|
312
|
+
"attestationBytes": 11512,
|
|
313
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.0/agenc-runtime-0.19.0-win-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
314
|
+
"buildProvenanceSha256": "349675295ac798c04a651093d9a45eb638f54e99ec69d3fb604e1073f832c6cb",
|
|
315
|
+
"buildProvenanceBytes": 11031,
|
|
316
|
+
"metadataSha256": "94c980cca27687c100afa4e25f2a69b48358db2de949e17d094897bd477d4e9d",
|
|
315
317
|
"nativeToolchain": {
|
|
316
318
|
"schemaVersion": 1,
|
|
317
|
-
"builder": "github-hosted:windows-2025-vs2026:win25-vs2026:
|
|
319
|
+
"builder": "github-hosted:windows-2025-vs2026:win25-vs2026:20260925.250.1:X64",
|
|
318
320
|
"runnerLabel": "windows-2025-vs2026",
|
|
319
321
|
"runnerImage": "win25-vs2026",
|
|
320
|
-
"runnerImageVersion": "
|
|
322
|
+
"runnerImageVersion": "20260925.250.1",
|
|
321
323
|
"runnerArch": "X64",
|
|
322
|
-
"cc": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.
|
|
323
|
-
"cxx": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.
|
|
324
|
+
"cc": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64",
|
|
325
|
+
"cxx": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64",
|
|
324
326
|
"linker": "link: missing operand after '/?'",
|
|
325
327
|
"python": "Python 3.12.10",
|
|
326
328
|
"make": "GNU Make 4.4.1",
|
|
@@ -345,21 +347,21 @@
|
|
|
345
347
|
"nodeCommonGypiTransformation": "disable-debug-information-and-full-paths",
|
|
346
348
|
"npmDistributionFile": "npm-11.17.0.tgz",
|
|
347
349
|
"npmDistributionSha256": "b290bbb35b9e72c3ef84edbe041f28c4479c4d9ee79f555817b8caafe7ce4bba",
|
|
348
|
-
"visualStudioVersion": "18.
|
|
350
|
+
"visualStudioVersion": "18.10.12217.157",
|
|
349
351
|
"visualStudioInstallPath": "C:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise",
|
|
350
352
|
"msvcToolsVersion": "14.51.36231",
|
|
351
353
|
"windowsSdkVersion": "10.0.26100.0",
|
|
352
|
-
"compilerDetails": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.
|
|
353
|
-
"msvcCompilerSha256": "
|
|
354
|
-
"msvcLinkerSha256": "
|
|
354
|
+
"compilerDetails": "Microsoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64\nCopyright (C) Microsoft Corporation. All rights reserved.\nCompiler Passes:\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\cl.exe: Version 19.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\c1.dll: Version 19.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\c1xx.dll: Version 19.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\c2.dll: Version 19.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\c1xx.dll: Version 19.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\link.exe: Version 14.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\mspdb140.dll: Version 14.51.36260.0\nC:\\Program Files\\Microsoft Visual Studio\\18\\Enterprise\\VC\\Tools\\MSVC\\14.51.36231\\bin\\HostX64\\x64\\1033\\clui.dll: Version 19.51.36260.0\ncl : Command line error D8003 : missing source filename",
|
|
355
|
+
"msvcCompilerSha256": "b0a1818ebae6da7f18230a84e76ce839212584ac4c2ab55b97a0d5268085da57",
|
|
356
|
+
"msvcLinkerSha256": "a8c42e25c91ca2453e1110540ac08f0fc12d7539454a11b9af8baeecb469837d"
|
|
355
357
|
},
|
|
356
|
-
"dependencyTreeSha256": "
|
|
357
|
-
"dependencyPackages":
|
|
358
|
+
"dependencyTreeSha256": "a725b40327f6637ef3ff00c54e24f6574bde43d52cb1fca79d81d9713747e87d",
|
|
359
|
+
"dependencyPackages": 462,
|
|
358
360
|
"archiveFormat": "tar+gzip; portable; utf8-byte-order; normalized-mtime",
|
|
359
361
|
"archiveValidation": {
|
|
360
362
|
"policy": "agenc-runtime-archive-v1",
|
|
361
|
-
"entries":
|
|
362
|
-
"uncompressedBytes":
|
|
363
|
+
"entries": 30102,
|
|
364
|
+
"uncompressedBytes": 400118784
|
|
363
365
|
},
|
|
364
366
|
"bins": {
|
|
365
367
|
"agenc": "node_modules/@tetsuo-ai/runtime/bin/agenc",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var STARTUP_VALUE_OPTIONS=Object.freeze(["--resume","-r","--provider","--model","--profile","--config","--add-dir","--permission-mode","--output-format","--input-format","--image","--task-token-budget","--budget","--task-max-calls","--deadline","--deadline-reserve"]);var CLI_VALUE_OPTIONS=Object.freeze([...STARTUP_VALUE_OPTIONS,"--debug-file"]);function isCliValueOptionToken(arg){return CLI_VALUE_OPTIONS.includes(arg)}function tokenizeCliOptionRegion(argv,options={}){const additionalValueOptions=new Set(options.additionalValueOptions??[]);for(let index=0;index<argv.length;index+=1){const arg=argv[index];if(arg==="--"){return{optionArgs:argv.slice(0,index),promptArgs:argv.slice(index+1),endedBy:"delimiter"}}if(arg==="-"||!arg.startsWith("-")){return{optionArgs:argv.slice(0,index),promptArgs:argv.slice(index),endedBy:"positional"}}if(!arg.includes("=")&&(isCliValueOptionToken(arg)||additionalValueOptions.has(arg))){const next=argv[index+1];if(typeof next==="string"&&next!=="--"&&!next.startsWith("-")){index+=1}}}return{optionArgs:argv.slice(),promptArgs:[],endedBy:"end"}}var DANGEROUS_BYPASS_FLAG="--dangerously-bypass-approvals-and-sandbox";var AUTONOMOUS_FLAG="--autonomous";var BYPASS_APPROVALS_FLAG="--bypass-approvals";var RETIRED_STARTUP_FLAG_REPLACEMENTS=Object.freeze({"--yolo":DANGEROUS_BYPASS_FLAG,"--allow-dangerously-skip-permissions":DANGEROUS_BYPASS_FLAG,"--proactive":AUTONOMOUS_FLAG});function findRetiredStartupFlag(optionArgs){for(const arg of optionArgs){for(const[flag,replacement]of Object.entries(RETIRED_STARTUP_FLAG_REPLACEMENTS)){if(arg===flag||arg.startsWith(`${flag}=`)){return{flag,replacement}}}}return void 0}function retiredStartupFlagError(use){return`unknown option '${use.flag}'. Use '${use.replacement}' instead.`}var DeadlineFlagError=class extends Error{constructor(message){super(message);this.name="DeadlineFlagError"}};var RELATIVE_DEADLINE=/^\+(\d+(?:\.\d+)?)s?$/u;var ISO_DEADLINE=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?(?:Z|[+-]\d{2}:\d{2})$/u;function parseDeadlineFlag(value,nowMs){const trimmed=value.trim();const relative=RELATIVE_DEADLINE.exec(trimmed);let at;if(relative!==null){at=nowMs+Math.round(Number(relative[1])*1e3)}else if(ISO_DEADLINE.test(trimmed)){at=Date.parse(trimmed)}else{throw new DeadlineFlagError(`agenc --deadline expects +<seconds> or an ISO 8601 instant with a time zone (got '${value}')`)}if(!Number.isSafeInteger(at)||at<=nowMs){throw new DeadlineFlagError(`agenc --deadline '${value}' is not in the future`)}return at}function parseDeadlineReserveFlag(value){const seconds=Number(value.trim().replace(/s$/u,""));if(!Number.isFinite(seconds)||seconds<=0){throw new DeadlineFlagError(`agenc --deadline-reserve expects a positive number of seconds (got '${value}')`)}return Math.round(seconds*1e3)}function extractFlagValue(argv,flag){const{optionArgs}=tokenizeCliOptionRegion(argv,{additionalValueOptions:[flag]});const prefix=`${flag}=`;for(let i=0;i<optionArgs.length;i+=1){const arg=optionArgs[i];if(arg===flag){const next=optionArgs[i+1];if(typeof next!=="string"||next.startsWith("-"))return null;return next}if(arg.startsWith(prefix)){return arg.slice(prefix.length)}}return null}function extractFlagValues(argv,flag){const{optionArgs}=tokenizeCliOptionRegion(argv,{additionalValueOptions:[flag]});const out=[];const prefix=`${flag}=`;for(let i=0;i<optionArgs.length;i+=1){const arg=optionArgs[i];if(arg===flag){const next=optionArgs[i+1];if(typeof next==="string"&&!next.startsWith("-")){out.push(next);i+=1}continue}if(arg.startsWith(prefix)){out.push(arg.slice(prefix.length))}}return out}var ROUTING_BOOLEAN_FLAGS=Object.freeze(["--no-tui"]);var STARTUP_BOOLEAN_FLAGS=Object.freeze(["--help","-h","--version","--bare","--light","--full-durability","--continue","-c","-p","--print","--debug","-d","--debug-to-stderr","-d2e",AUTONOMOUS_FLAG,BYPASS_APPROVALS_FLAG,DANGEROUS_BYPASS_FLAG]);var STARTUP_VALUE_FLAGS=CLI_VALUE_OPTIONS;function shouldStripValueFlag(arg){return STARTUP_VALUE_FLAGS.some(flag=>arg===flag||arg.startsWith(`${flag}=`))}var RESUME_FLAGS=Object.freeze(["--resume","-r"]);function isResumeFlagToken(arg){return RESUME_FLAGS.some(flag=>arg===flag||arg.startsWith(`${flag}=`))}var STARTUP_SELECTION_VALUE_FLAGS=Object.freeze(["--provider","--model","--profile","--config","--add-dir","--image"]);var STARTUP_SELECTION_FLAG_USAGE=Object.freeze({"--provider":"agenc --provider requires a value (usage: agenc --provider <name>)","--model":"agenc --model requires a value (usage: agenc --model <id|provider:id>)","--profile":"agenc --profile requires a value (usage: agenc --profile <name>)","--config":"agenc --config requires a value (usage: agenc --config <path>)","--add-dir":"agenc --add-dir requires a value (usage: agenc --add-dir <path>)","--image":"agenc --image requires a value (usage: agenc --image <path|url>)"});var HEADLESS_FORMAT_VALUE_FLAGS=Object.freeze(["--output-format","--input-format","--deadline","--deadline-reserve"]);var HEADLESS_FORMAT_FLAG_USAGE=Object.freeze({"--output-format":"agenc --output-format requires a value (usage: agenc -p --output-format <text|json|stream-json>)","--input-format":"agenc --input-format requires a value (usage: agenc -p --input-format <stream-json>)","--deadline":"agenc --deadline requires a value (usage: agenc -p --deadline <+seconds|ISO-8601>)","--deadline-reserve":"agenc --deadline-reserve requires a value (usage: agenc -p --deadline <\u2026> --deadline-reserve <seconds>)"});function runDeadlineFlagError(optionArgs,headless){const deadline=extractFlagValue(optionArgs,"--deadline");const reserve=extractFlagValue(optionArgs,"--deadline-reserve");if(deadline===null&&reserve===null)return null;if(!headless){return"agenc --deadline applies to print mode (-p), piped stdin, --no-tui, and headless continue/resume"}if(deadline===null)return"agenc --deadline-reserve requires --deadline";try{parseDeadlineFlag(deadline,Date.now());if(reserve!==null)parseDeadlineReserveFlag(reserve)}catch(error){if(error instanceof DeadlineFlagError)return error.message;throw error}return null}function findMissingValueSelectionFlag(userArgv){for(let i=0;i<userArgv.length;i+=1){const arg=userArgv[i];for(const flag of STARTUP_SELECTION_VALUE_FLAGS){if(arg===`${flag}=`)return flag;if(arg===flag){const next=userArgv[i+1];if(typeof next!=="string"||next.startsWith("-"))return flag}}}return null}function findMissingHeadlessFormatValueFlag(userArgv){for(let i=0;i<userArgv.length;i+=1){const arg=userArgv[i];for(const flag of HEADLESS_FORMAT_VALUE_FLAGS){if(arg===`${flag}=`)return flag;if(arg===flag){const next=userArgv[i+1];if(typeof next!=="string"||next.startsWith("-"))return flag}}}return null}function shouldStripBooleanFlag(arg){return arg.startsWith("--debug=")||ROUTING_BOOLEAN_FLAGS.includes(arg)||STARTUP_BOOLEAN_FLAGS.includes(arg)}function stripRoutingFlags(argv){const{optionArgs,promptArgs}=tokenizeCliOptionRegion(argv);const out=[];for(let i=0;i<optionArgs.length;i+=1){const arg=optionArgs[i];if(shouldStripBooleanFlag(arg))continue;if(shouldStripValueFlag(arg)){if(arg.includes("="))continue;const next=optionArgs[i+1];if(typeof next==="string"&&!next.startsWith("-"))i+=1;continue}out.push(arg)}return[...out,...promptArgs]}function classifyCLI(opts){const userArgv=opts.argv.slice(2);const{optionArgs}=tokenizeCliOptionRegion(userArgv);const hasNoTuiFlag=optionArgs.includes("--no-tui");const hasPrintFlag=optionArgs.includes("-p")||optionArgs.includes("--print");const hasContinueFlag=optionArgs.includes("--continue")||optionArgs.includes("-c");const resumeId=extractFlagValue(optionArgs,"--resume")??extractFlagValue(optionArgs,"-r");const hasResumeFlag=optionArgs.some(isResumeFlagToken);const prompt=stripRoutingFlags(userArgv).join(" ").trim();const startupImages=extractFlagValues(optionArgs,"--image");const retiredStartupFlag=findRetiredStartupFlag(optionArgs);if(retiredStartupFlag!==void 0){return{kind:"errorAndExit",message:`agenc: ${retiredStartupFlagError(retiredStartupFlag)}`,exitCode:2}}for(let optionIndex=0;optionIndex<optionArgs.length;optionIndex+=1){const option=optionArgs[optionIndex];if(shouldStripBooleanFlag(option))continue;if(shouldStripValueFlag(option)){if(!option.includes("=")){const value=optionArgs[optionIndex+1];if(value!==void 0&&!value.startsWith("-"))optionIndex+=1}continue}return{kind:"errorAndExit",message:`agenc: unknown option '${option}'. Use '--' before literal prompt text that starts with '-'.`,exitCode:2}}if(hasResumeFlag&&(resumeId===null||resumeId.length===0)){return{kind:"errorAndExit",message:`agenc --resume requires a session id (usage: agenc --resume <session-id>)`,exitCode:2}}const missingSelectionFlag=findMissingValueSelectionFlag(optionArgs);if(missingSelectionFlag!==null){return{kind:"errorAndExit",message:STARTUP_SELECTION_FLAG_USAGE[missingSelectionFlag],exitCode:2}}const missingHeadlessFormatFlag=findMissingHeadlessFormatValueFlag(optionArgs);if(missingHeadlessFormatFlag!==null){return{kind:"errorAndExit",message:HEADLESS_FORMAT_FLAG_USAGE[missingHeadlessFormatFlag],exitCode:2}}const headless=hasPrintFlag||hasNoTuiFlag||!opts.isTTY;const deadlineError=runDeadlineFlagError(optionArgs,headless);if(deadlineError!==null){return{kind:"errorAndExit",message:deadlineError,exitCode:2}}if(resumeId!==null&&resumeId.length>0){if(headless){return{kind:"oneShotCLI",userMessage:prompt,...startupImages.length>0?{startupImages}:{},continueSession:{kind:"resume",sessionId:resumeId}}}return{kind:"resumeTUI",args:{resumeId}}}if(hasContinueFlag){if(headless){return{kind:"oneShotCLI",userMessage:prompt,...startupImages.length>0?{startupImages}:{},continueSession:{kind:"latest"}}}return{kind:"continueTUI",args:{}}}if(hasPrintFlag){return{kind:"oneShotCLI",userMessage:prompt,...startupImages.length>0?{startupImages}:{}}}if(!opts.isTTY){return{kind:"oneShotCLI",userMessage:prompt,...startupImages.length>0?{startupImages}:{}}}if(hasNoTuiFlag){return{kind:"oneShotCLI",userMessage:prompt,...startupImages.length>0?{startupImages}:{}}}if(opts.isStdoutTTY){const args={...prompt.length>0?{initialPrompt:prompt}:{},...startupImages.length>0?{startupImages}:{}};return{kind:"bootTUI",args}}return{kind:"oneShotCLI",userMessage:prompt,...startupImages.length>0?{startupImages}:{}}}function startupShortCircuitFlag(argv){const{optionArgs}=tokenizeCliOptionRegion(argv);if(optionArgs.includes("--help")||optionArgs.includes("-h"))return"help";if(optionArgs.includes("--version"))return"version";return null}function preflightStartupArguments(argv,terminal){if(startupShortCircuitFlag(argv)!==null)return null;const plan=classifyCLI({argv:["node","agenc",...argv],...terminal});return plan.kind==="errorAndExit"?plan:null}export{preflightStartupArguments,startupShortCircuitFlag};
|
|
@@ -90,18 +90,13 @@ export function renderGeneratedWrapperContent({
|
|
|
90
90
|
validateValues(kind, values);
|
|
91
91
|
const metadata = metadataFor(values);
|
|
92
92
|
if (kind === "cmd") {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
`if not defined AGENC_HOME set "AGENC_HOME=${batch(agencHome)}"`,
|
|
101
|
-
`set "PATH=${batch(nodeDir)};%PATH%"`,
|
|
102
|
-
`"${batch(nodeBin)}" "${batch(runtimeBin)}" %*`,
|
|
103
|
-
"",
|
|
104
|
-
].join("\r\n");
|
|
93
|
+
return renderCmdWrapper({
|
|
94
|
+
nodeBin,
|
|
95
|
+
runtimeBin,
|
|
96
|
+
agencHome,
|
|
97
|
+
metadata,
|
|
98
|
+
recordInstallPrefix: true,
|
|
99
|
+
});
|
|
105
100
|
}
|
|
106
101
|
const quote = (value) => `'${value.replaceAll("'", `'"'"'`)}'`;
|
|
107
102
|
const nodeDir = posix.dirname(nodeBin);
|
|
@@ -136,6 +131,43 @@ export function renderGeneratedWrapperContent({
|
|
|
136
131
|
].join("\n");
|
|
137
132
|
}
|
|
138
133
|
|
|
134
|
+
function renderCmdWrapper({
|
|
135
|
+
nodeBin,
|
|
136
|
+
runtimeBin,
|
|
137
|
+
agencHome,
|
|
138
|
+
metadata,
|
|
139
|
+
recordInstallPrefix,
|
|
140
|
+
}) {
|
|
141
|
+
const batch = (value) => value.replaceAll("%", "%%");
|
|
142
|
+
const nodeDir = win32.dirname(nodeBin);
|
|
143
|
+
const lines = [
|
|
144
|
+
"@echo off",
|
|
145
|
+
"setlocal DisableDelayedExpansion",
|
|
146
|
+
`rem ${CMD_WRAPPER_SIGNATURE} - rewritten on every install/upgrade.`,
|
|
147
|
+
`rem ${WRAPPER_METADATA_PREFIX} ${metadata}`,
|
|
148
|
+
`if not defined AGENC_HOME set "AGENC_HOME=${batch(agencHome)}"`,
|
|
149
|
+
];
|
|
150
|
+
if (recordInstallPrefix) {
|
|
151
|
+
lines.push(
|
|
152
|
+
'if not defined AGENC_INSTALL_PREFIX for %%I in ("%~dp0..") do set "AGENC_INSTALL_PREFIX=%%~fI"',
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
lines.push(
|
|
156
|
+
`set "PATH=${batch(nodeDir)};%PATH%"`,
|
|
157
|
+
`"${batch(nodeBin)}" "${batch(runtimeBin)}" %*`,
|
|
158
|
+
"",
|
|
159
|
+
);
|
|
160
|
+
return lines.join("\r\n");
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function renderHistoricalPrivateNodeCmdWrapper(values) {
|
|
164
|
+
return renderCmdWrapper({
|
|
165
|
+
...values,
|
|
166
|
+
metadata: metadataFor(values),
|
|
167
|
+
recordInstallPrefix: false,
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
139
171
|
// Releases 0.6.2 through 0.10.0 emitted this immutable metadata-v1 shape
|
|
140
172
|
// before standalone installs carried a private Node runtime. Keep the renderer
|
|
141
173
|
// private: it exists only so ownership can be proven by exact full-file
|
|
@@ -235,6 +267,11 @@ function parseModern(path, content) {
|
|
|
235
267
|
try {
|
|
236
268
|
const wrapper = { kind, path, ...values };
|
|
237
269
|
if (renderGeneratedWrapperContent(wrapper) === content) return wrapper;
|
|
270
|
+
if (
|
|
271
|
+
kind === "cmd" &&
|
|
272
|
+
values.nodeLibraryPath === undefined &&
|
|
273
|
+
renderHistoricalPrivateNodeCmdWrapper(values) === content
|
|
274
|
+
) return wrapper;
|
|
238
275
|
if (
|
|
239
276
|
values.nodeLibraryPath === undefined &&
|
|
240
277
|
renderPrePrivateNodeWrapperContent(wrapper) === content
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface AgenCHomeEnvironment {
|
|
2
|
+
readonly AGENC_HOME?: string;
|
|
3
|
+
readonly AGENC_CONFIG_DIR?: string;
|
|
4
|
+
readonly [key: string]: string | undefined;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const RETIRED_CONFIG_DIR_ENV: "AGENC_CONFIG_DIR";
|
|
8
|
+
|
|
9
|
+
export class RetiredConfigDirError extends Error {
|
|
10
|
+
readonly name: "RetiredConfigDirError";
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class InvalidHomePathError extends Error {
|
|
14
|
+
readonly name: "InvalidHomePathError";
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function assertNoRetiredConfigDir(
|
|
18
|
+
env?: AgenCHomeEnvironment,
|
|
19
|
+
): void;
|
|
20
|
+
|
|
21
|
+
export function canonicalizeAgenCHomePath(path: string): string;
|
|
22
|
+
|
|
23
|
+
export function resolveAgenCHome(
|
|
24
|
+
env?: AgenCHomeEnvironment,
|
|
25
|
+
userHome?: string,
|
|
26
|
+
): string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import { basename, dirname, isAbsolute, join } from "node:path";
|
|
4
|
+
|
|
5
|
+
export const RETIRED_CONFIG_DIR_ENV = "AGENC_CONFIG_DIR";
|
|
6
|
+
|
|
7
|
+
export class RetiredConfigDirError extends Error {
|
|
8
|
+
name = "RetiredConfigDirError";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class InvalidHomePathError extends Error {
|
|
12
|
+
name = "InvalidHomePathError";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function nonEmpty(value) {
|
|
16
|
+
const trimmed = value?.trim();
|
|
17
|
+
return trimmed && trimmed.length > 0 ? trimmed : undefined;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function assertNoRetiredConfigDir(env = process.env) {
|
|
21
|
+
if (env.AGENC_CONFIG_DIR === undefined) return;
|
|
22
|
+
const retired = nonEmpty(env.AGENC_CONFIG_DIR);
|
|
23
|
+
const replacement = retired === undefined
|
|
24
|
+
? "set AGENC_HOME to the intended absolute home directory"
|
|
25
|
+
: `set AGENC_HOME=${JSON.stringify(retired)}`;
|
|
26
|
+
throw new RetiredConfigDirError(
|
|
27
|
+
`AGENC_CONFIG_DIR is no longer a runtime configuration authority; ` +
|
|
28
|
+
`${replacement} and remove AGENC_CONFIG_DIR. ` +
|
|
29
|
+
`Only "agenc config migrate" may inspect this retired variable.`,
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function canonicalizeAgenCHomePath(path) {
|
|
34
|
+
const normalized = path.normalize("NFC");
|
|
35
|
+
if (!isAbsolute(normalized)) {
|
|
36
|
+
throw new InvalidHomePathError(
|
|
37
|
+
`AGENC_HOME must be an absolute path so daemon, lock, and secure-storage identity is stable: ${JSON.stringify(path)}`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
const missingComponents = [];
|
|
41
|
+
let existingAncestor = normalized;
|
|
42
|
+
while (!existsSync(existingAncestor)) {
|
|
43
|
+
const parent = dirname(existingAncestor);
|
|
44
|
+
if (parent === existingAncestor) {
|
|
45
|
+
throw new InvalidHomePathError(
|
|
46
|
+
`AGENC_HOME has no resolvable existing ancestor: ${JSON.stringify(path)}`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
missingComponents.unshift(basename(existingAncestor));
|
|
50
|
+
existingAncestor = parent;
|
|
51
|
+
}
|
|
52
|
+
if (!statSync(existingAncestor).isDirectory()) {
|
|
53
|
+
throw new InvalidHomePathError(
|
|
54
|
+
`AGENC_HOME must resolve beneath a directory: ${JSON.stringify(path)}`,
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
return join(realpathSync(existingAncestor), ...missingComponents).normalize("NFC");
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function resolveAgenCHome(env = process.env, userHome = homedir()) {
|
|
61
|
+
assertNoRetiredConfigDir(env);
|
|
62
|
+
const configured = nonEmpty(env.AGENC_HOME);
|
|
63
|
+
return canonicalizeAgenCHomePath(configured ?? join(userHome, ".agenc"));
|
|
64
|
+
}
|