@tetsuo-ai/agenc 0.19.20 → 0.19.22
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/README.md +5 -1
- package/bin/agenc +5 -1
- package/generated/agenc-runtime-manifest-v2.json +79 -79
- package/lib/sqlite-lock.mjs +62 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
# AgenC Core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Our goal is to multiply model capability per dollar of inference. AgenC is an
|
|
4
|
+
open source framework that improves how any model plans, uses tools and checks
|
|
5
|
+
its work.
|
|
6
|
+
|
|
7
|
+
AgenC Core is a coding agent for your terminal. It works with any model
|
|
4
8
|
provider: 25 are built in, including OpenAI, Anthropic, xAI Grok, Gemini,
|
|
5
9
|
DeepSeek, Venice and local models through Ollama or LM Studio.
|
|
6
10
|
|
package/bin/agenc
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { main } from "../src/launcher.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// Darwin process-list readers can mistake environ for argv after a title write.
|
|
5
|
+
// Only use native titles on platforms with a separate, verified command line.
|
|
6
|
+
if (process.platform === "linux" || process.platform === "win32") {
|
|
7
|
+
try { process.title = "agenc-launcher"; } catch { /* platform may not support it */ }
|
|
8
|
+
}
|
|
5
9
|
process.exitCode = await main();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifestVersion": 2,
|
|
3
|
-
"runtimeVersion": "0.19.
|
|
3
|
+
"runtimeVersion": "0.19.22",
|
|
4
4
|
"releaseRepository": "tetsuo-ai/agenc-releases",
|
|
5
|
-
"releaseTag": "agenc-v0.19.
|
|
5
|
+
"releaseTag": "agenc-v0.19.22",
|
|
6
6
|
"build": {
|
|
7
|
-
"sourceCommit": "
|
|
8
|
-
"sourceRef": "refs/tags/agenc-v0.19.
|
|
9
|
-
"sourceDateEpoch":
|
|
10
|
-
"lockfileSha256": "
|
|
7
|
+
"sourceCommit": "ad27955d0181450d96b340acfb2cab5f59cd8cba",
|
|
8
|
+
"sourceRef": "refs/tags/agenc-v0.19.22",
|
|
9
|
+
"sourceDateEpoch": 1793257413,
|
|
10
|
+
"lockfileSha256": "dfc8de897b1aae13ddcef8b9a5f1c437e5c461656b0cf8f1f70c335875a5c0d2",
|
|
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": 40836784875,
|
|
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/40836784875",
|
|
22
22
|
"phase": "candidate",
|
|
23
23
|
"sourceRef": "refs/heads/main",
|
|
24
|
-
"evidenceSha256": "
|
|
24
|
+
"evidenceSha256": "236f26161bae711ffc6e016212172d325438eed37f81042dc436b92160ab11c8"
|
|
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.22",
|
|
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.22/agenc-runtime-0.19.22-darwin-arm64-node26-abi147.tar.gz",
|
|
36
|
+
"sha256": "e06bc160e86e02dcbd652a0ed3dc31a90c7f71f47009db61f34081070a817851",
|
|
37
|
+
"bytes": 113379661,
|
|
38
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-darwin-arm64-node26-abi147.tar.gz.sigstore.json",
|
|
39
|
+
"attestationSha256": "eb5e940d438423d9188b338448c3f9f1652b4dda5d5e4c167d481c66a6d2d61b",
|
|
40
|
+
"attestationBytes": 11270,
|
|
41
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-darwin-arm64-node26-abi147.tar.gz.build.sigstore.json",
|
|
42
|
+
"buildProvenanceSha256": "5b95cd0fc59238df35fdc5d2cfa4cb40b7109ae6bdac4f4ef4c551add98a7445",
|
|
43
|
+
"buildProvenanceBytes": 11128,
|
|
44
|
+
"metadataSha256": "71c483732710045e28ed64007daa5f3021566ea0ef936b8f94149f41062f9326",
|
|
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": "2a36ad1a6c62bd9531cdf75d29abda26ea255052262b5a974d0d35c30b37aa7a",
|
|
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": 30324,
|
|
80
|
+
"uncompressedBytes": 443478528
|
|
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.22",
|
|
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.22/agenc-runtime-0.19.22-darwin-x64-node26-abi147.tar.gz",
|
|
96
|
+
"sha256": "aeccb1d653d575ae70244473efe069ccfa8ef54890f6a25e8a5fb42724b97305",
|
|
97
|
+
"bytes": 115279524,
|
|
98
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-darwin-x64-node26-abi147.tar.gz.sigstore.json",
|
|
99
|
+
"attestationSha256": "24c280a0f358f951e96c552cb003787babac57854bff3425525c087c1126cfea",
|
|
100
|
+
"attestationBytes": 11462,
|
|
101
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-darwin-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
102
|
+
"buildProvenanceSha256": "461500f2c2c9076b331c2cddefad5c46bb73d078477a994e9e8fdc658be02079",
|
|
103
|
+
"buildProvenanceBytes": 11120,
|
|
104
|
+
"metadataSha256": "0e920d2ef365512a9d55f88f15b81a8391fcfc35524987b84d140005efc701f0",
|
|
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": "25634d95ded182234a93bc1bb61d29543799c33f3826eeae21083d8ba9205c7d",
|
|
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": 30324,
|
|
140
|
+
"uncompressedBytes": 448441856
|
|
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.22",
|
|
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.22/agenc-runtime-0.19.22-linux-arm64-node26-abi147.tar.gz",
|
|
156
|
+
"sha256": "bc21aac5fd2755e8e332811765fa32a04219ab471e7b48d9cc9004883fdf500c",
|
|
157
|
+
"bytes": 127631256,
|
|
158
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-linux-arm64-node26-abi147.tar.gz.sigstore.json",
|
|
159
|
+
"attestationSha256": "6d02777ebd793faa247f3f6194c2f1ff3a6315db1f6f8899dfe9948dad165cd1",
|
|
160
|
+
"attestationBytes": 11317,
|
|
161
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-linux-arm64-node26-abi147.tar.gz.build.sigstore.json",
|
|
162
|
+
"buildProvenanceSha256": "7cd1e645c22458948d9c5c1d6122ea05988339f4f57d8a8ee332aa0cdc10123b",
|
|
163
|
+
"buildProvenanceBytes": 11218,
|
|
164
|
+
"metadataSha256": "286d87faad6f04ac965f53be8ce4c361a101ecb33721c078d11bbf69c77b065d",
|
|
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": "ab1d309786a7de7c60f65857ced4c43cb659f983ed3eca88ebb402d0b6f9a565",
|
|
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": 30351,
|
|
212
|
+
"uncompressedBytes": 467305472
|
|
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.22",
|
|
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.22/agenc-runtime-0.19.22-linux-x64-node26-abi147.tar.gz",
|
|
232
|
+
"sha256": "953a48c38bd3fb88239f78c2e0806539ca9b5486743a3f190d067050764d16c6",
|
|
233
|
+
"bytes": 127522252,
|
|
234
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-linux-x64-node26-abi147.tar.gz.sigstore.json",
|
|
235
|
+
"attestationSha256": "c4e8a1c02e5bb325f6bbf249d48b2180a236c5664088831751603ca14eadd904",
|
|
236
|
+
"attestationBytes": 11270,
|
|
237
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-linux-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
238
|
+
"buildProvenanceSha256": "bd2131f53b254dba6f40a0f4fd7e20a2d148059025dd3e9521944f5c575f2d58",
|
|
239
|
+
"buildProvenanceBytes": 11167,
|
|
240
|
+
"metadataSha256": "70aec588af847a54f4c2019a6d1512f9cfb7d79c2ebe18d74c9ae0387813ca8b",
|
|
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": "ecbe1183d5514a52a05a972acca779cb2112b6df6507d661661dfbafc5699878",
|
|
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": 30351,
|
|
288
|
+
"uncompressedBytes": 468979200
|
|
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.22",
|
|
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.22/agenc-runtime-0.19.22-win-x64-node26-abi147.tar.gz",
|
|
308
|
+
"sha256": "99d0768455c368511d10da2cc882393641279c7bb1183e32c69068b37366fd0e",
|
|
309
|
+
"bytes": 109480381,
|
|
310
|
+
"attestationUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-win-x64-node26-abi147.tar.gz.sigstore.json",
|
|
311
|
+
"attestationSha256": "9c135903887a4c357ae589d86732cdaa3358c1204f4c6146700e6ff2ac688175",
|
|
312
|
+
"attestationBytes": 11164,
|
|
313
|
+
"buildProvenanceUrl": "https://github.com/tetsuo-ai/agenc-releases/releases/download/agenc-v0.19.22/agenc-runtime-0.19.22-win-x64-node26-abi147.tar.gz.build.sigstore.json",
|
|
314
|
+
"buildProvenanceSha256": "0b7797c9b133f85562b5d9b15fec9c00388cf48538c70608462371503f1c91d6",
|
|
315
|
+
"buildProvenanceBytes": 10972,
|
|
316
|
+
"metadataSha256": "e3925c43bad368c4b808dd364e4b5a3a45283ef81022b9f0d7d20a7d3e9b5a51",
|
|
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": "56ddd4e094d77c924de0a4109c54e14e6c61d344fe5af3fb44c49f38c57dd6dc",
|
|
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": 30366,
|
|
364
|
+
"uncompressedBytes": 406041088
|
|
365
365
|
},
|
|
366
366
|
"bins": {
|
|
367
367
|
"agenc": "node_modules/@tetsuo-ai/runtime/bin/agenc",
|
package/lib/sqlite-lock.mjs
CHANGED
|
@@ -40,6 +40,7 @@ const REGISTRY_VERSION = 1;
|
|
|
40
40
|
const REGISTRY_SYMBOL = Symbol.for("@tetsuo-ai/agenc.sqlite-lock-registry");
|
|
41
41
|
const MAX_BUSY_RETRY_MS = 50;
|
|
42
42
|
const MAX_TIMER_DELAY_MS = 2_147_483_647;
|
|
43
|
+
const DARWIN_FILESYSTEM_PROBE_TIMEOUT_MS = 2_000;
|
|
43
44
|
const UNSUPPORTED_FILE_ID_64 = 0xffff_ffff_ffff_ffffn;
|
|
44
45
|
const WINDOWS_PATH_TRANSPORT_MAX_CHARS = 16_384;
|
|
45
46
|
const WINDOWS_PATH_TRANSPORT_MAX_ENTRIES = 128;
|
|
@@ -338,10 +339,7 @@ function execFileUtf8(file, args, options, context, path) {
|
|
|
338
339
|
{ ...options, encoding: "utf8" },
|
|
339
340
|
(error, stdout, stderr) => {
|
|
340
341
|
if (deadlineTimer !== undefined) clearTimeout(deadlineTimer);
|
|
341
|
-
if (expired)
|
|
342
|
-
rejectRun(timeoutError(context, path, error ?? undefined));
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
342
|
+
if (expired) return;
|
|
345
343
|
if (error !== null) {
|
|
346
344
|
Object.assign(error, { stdout, stderr });
|
|
347
345
|
rejectRun(error);
|
|
@@ -354,7 +352,15 @@ function execFileUtf8(file, args, options, context, path) {
|
|
|
354
352
|
const remaining = remainingMilliseconds(context);
|
|
355
353
|
if (remaining <= 0) {
|
|
356
354
|
expired = true;
|
|
357
|
-
|
|
355
|
+
// A helper stuck in kernel I/O may never exit, even after SIGKILL.
|
|
356
|
+
// Settle at our deadline and release every event-loop reference rather
|
|
357
|
+
// than waiting for execFile's exit/stdio-close callback.
|
|
358
|
+
rejectRun(timeoutError(context, path));
|
|
359
|
+
child.kill("SIGKILL");
|
|
360
|
+
child.stdin?.destroy();
|
|
361
|
+
child.stdout?.destroy();
|
|
362
|
+
child.stderr?.destroy();
|
|
363
|
+
child.unref();
|
|
358
364
|
return;
|
|
359
365
|
}
|
|
360
366
|
deadlineTimer = setTimeout(
|
|
@@ -694,6 +700,13 @@ async function assertWindowsPathSecurity(entries, context) {
|
|
|
694
700
|
throwIfExpired(context, displayPath);
|
|
695
701
|
}
|
|
696
702
|
|
|
703
|
+
function unsupportedLockFilesystem(parent, filesystemType, cause) {
|
|
704
|
+
return new Error(
|
|
705
|
+
`agenc: non-local or unknown lock filesystem is unsupported (${filesystemType ?? "unknown"}): ${parent}`,
|
|
706
|
+
cause === undefined ? undefined : { cause },
|
|
707
|
+
);
|
|
708
|
+
}
|
|
709
|
+
|
|
697
710
|
async function assertLocalFilesystem(parent, context) {
|
|
698
711
|
throwIfExpired(context, parent);
|
|
699
712
|
let filesystemType;
|
|
@@ -716,26 +729,53 @@ async function assertLocalFilesystem(parent, context) {
|
|
|
716
729
|
}
|
|
717
730
|
}
|
|
718
731
|
} else if (process.platform === "darwin") {
|
|
719
|
-
|
|
732
|
+
const probeStartedAt = performance.now();
|
|
733
|
+
const probeDeadline = Math.min(
|
|
734
|
+
context.deadline,
|
|
735
|
+
probeStartedAt + DARWIN_FILESYSTEM_PROBE_TIMEOUT_MS,
|
|
736
|
+
);
|
|
737
|
+
const probeContext = {
|
|
738
|
+
...context,
|
|
739
|
+
deadline: probeDeadline,
|
|
740
|
+
timeoutMs: Math.min(
|
|
741
|
+
DARWIN_FILESYSTEM_PROBE_TIMEOUT_MS,
|
|
742
|
+
Math.max(1, Math.ceil(probeDeadline - probeStartedAt)),
|
|
743
|
+
),
|
|
744
|
+
label: `${context.label} (macOS lock filesystem probe via /bin/df)`,
|
|
745
|
+
};
|
|
746
|
+
let result;
|
|
720
747
|
try {
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
748
|
+
// With an existing directory operand, df calls statfs on that path.
|
|
749
|
+
// -T filters f_fstypename against our exact allowlist, including on
|
|
750
|
+
// supported macOS versions that cannot print the type with df -Y.
|
|
751
|
+
// Never use a bare mount/df or df -l: unrelated filesystems may be stuck.
|
|
752
|
+
result = await execFileUtf8(
|
|
753
|
+
"/bin/df",
|
|
754
|
+
["-P", "-T", [...LOCAL_FILESYSTEM_TYPES].join(","), parent],
|
|
755
|
+
{ env: { LC_ALL: "C" }, maxBuffer: 64 * 1024 },
|
|
756
|
+
probeContext,
|
|
757
|
+
parent,
|
|
758
|
+
);
|
|
725
759
|
} catch (error) {
|
|
726
|
-
|
|
760
|
+
const normalized = normalizeTimedCommandError(error, probeContext, parent);
|
|
761
|
+
if (normalized instanceof LocalSqliteLockTimeoutError) throw normalized;
|
|
762
|
+
throw unsupportedLockFilesystem(parent, undefined, normalized);
|
|
727
763
|
}
|
|
728
|
-
throwIfExpired(
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
764
|
+
throwIfExpired(probeContext, parent);
|
|
765
|
+
const lines = result.stdout.split("\n");
|
|
766
|
+
if (lines.at(-1) === "") lines.pop();
|
|
767
|
+
const row = lines[1]?.match(/^.+[\t ]+\d+[\t ]+\d+[\t ]+-?\d+[\t ]+\d+%[\t ]+(\/.*)$/u);
|
|
768
|
+
// The type was checked by df on the operand itself. Do not infer it from
|
|
769
|
+
// the printed mount point: APFS firmlinks can map /Users to the Data volume
|
|
770
|
+
// mounted at /System/Volumes/Data without changing realpath(/Users/...).
|
|
771
|
+
if (
|
|
772
|
+
result.stderr !== "" || lines.length !== 2 ||
|
|
773
|
+
!/^Filesystem[\t ]+512-blocks[\t ]+Used[\t ]+Avail(?:able)?[\t ]+Capacity[\t ]+Mounted on$/u.test(lines[0]) ||
|
|
774
|
+
row == null
|
|
775
|
+
) {
|
|
776
|
+
throw unsupportedLockFilesystem(parent);
|
|
738
777
|
}
|
|
778
|
+
return;
|
|
739
779
|
} else if (process.platform === "win32") {
|
|
740
780
|
await assertWindowsPathSecurity([{ path: parent, role: "leafDirectory" }], context);
|
|
741
781
|
return;
|
|
@@ -745,9 +785,7 @@ async function assertLocalFilesystem(parent, context) {
|
|
|
745
785
|
);
|
|
746
786
|
}
|
|
747
787
|
if (filesystemType === undefined || !LOCAL_FILESYSTEM_TYPES.has(filesystemType)) {
|
|
748
|
-
throw
|
|
749
|
-
`agenc: non-local or unknown lock filesystem is unsupported (${filesystemType ?? "unknown"}): ${parent}`,
|
|
750
|
-
);
|
|
788
|
+
throw unsupportedLockFilesystem(parent, filesystemType);
|
|
751
789
|
}
|
|
752
790
|
}
|
|
753
791
|
|