@socketsecurity/lib 6.0.9 → 6.0.10

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.
Files changed (335) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +8 -9
  3. package/dist/abort/signal.d.ts +1 -1
  4. package/dist/abort/signal.js +1 -1
  5. package/dist/ai/agent-context.d.mts +1 -1
  6. package/dist/ai/agent-context.js +3 -2
  7. package/dist/ai/backends.d.mts +3 -3
  8. package/dist/ai/backends.js +2 -2
  9. package/dist/ai/billing-context.d.mts +74 -0
  10. package/dist/ai/billing-context.js +129 -0
  11. package/dist/ai/credentials.d.mts +39 -5
  12. package/dist/ai/credentials.js +61 -6
  13. package/dist/ai/discover.d.mts +4 -0
  14. package/dist/ai/discover.js +4 -0
  15. package/dist/ai/exec.d.mts +1 -1
  16. package/dist/ai/exec.js +1 -1
  17. package/dist/ai/http.d.mts +8 -8
  18. package/dist/ai/http.js +6 -6
  19. package/dist/ai/profiles.d.mts +9 -10
  20. package/dist/ai/profiles.js +0 -5
  21. package/dist/ai/role.d.mts +58 -0
  22. package/dist/ai/role.js +96 -0
  23. package/dist/ai/route-heuristic.d.mts +177 -0
  24. package/dist/ai/route-heuristic.js +194 -0
  25. package/dist/ai/route.d.mts +10 -9
  26. package/dist/ai/route.js +14 -13
  27. package/dist/ai/spawn.d.mts +2 -1
  28. package/dist/ai/spawn.js +25 -2
  29. package/dist/ai/subagent-status.d.mts +2 -0
  30. package/dist/ai/subagent-status.js +2 -0
  31. package/dist/ai/tier.d.mts +1 -1
  32. package/dist/ai/types.d.mts +9 -2
  33. package/dist/ai/worktree.d.mts +1 -1
  34. package/dist/ai/worktree.js +3 -2
  35. package/dist/argv/parse.d.ts +2 -0
  36. package/dist/argv/parse.js +2 -0
  37. package/dist/bin/_internal.d.ts +1 -1
  38. package/dist/bin/_internal.js +1 -1
  39. package/dist/bin/prim.cjs +446 -300
  40. package/dist/bin/shadow.js +2 -1
  41. package/dist/bin/which.d.ts +28 -3
  42. package/dist/bin/which.js +45 -3
  43. package/dist/cacache/_internal.d.ts +10 -2
  44. package/dist/cacache/_internal.js +6 -10
  45. package/dist/cache/ttl/_internal.d.ts +33 -0
  46. package/dist/cache/ttl/_internal.js +68 -0
  47. package/dist/cache/ttl/browser.d.ts +56 -0
  48. package/dist/cache/ttl/browser.js +257 -0
  49. package/dist/cache/ttl/store.js +10 -33
  50. package/dist/cache/ttl/types.d.ts +46 -3
  51. package/dist/checks/primordials-defaults.d.ts +5 -5
  52. package/dist/checks/primordials-defaults.js +5 -5
  53. package/dist/checks/primordials.d.ts +1 -1
  54. package/dist/checks/primordials.js +25 -17
  55. package/dist/cli/check-primordials.d.ts +6 -1
  56. package/dist/cli/check-primordials.js +14 -5
  57. package/dist/cli/check.js +1 -1
  58. package/dist/cli/socket-lib.d.ts +1 -1
  59. package/dist/cli/socket-lib.js +3 -3
  60. package/dist/colors/socket-palette.d.ts +1 -1
  61. package/dist/compression/brotli.d.ts +6 -2
  62. package/dist/compression/brotli.js +4 -0
  63. package/dist/compression/gzip.d.ts +6 -2
  64. package/dist/compression/gzip.js +6 -1
  65. package/dist/config/layers.d.ts +4 -4
  66. package/dist/config/layers.js +4 -4
  67. package/dist/constants/agents.d.ts +3 -0
  68. package/dist/constants/agents.js +3 -0
  69. package/dist/constants/node.d.ts +14 -0
  70. package/dist/constants/node.js +14 -0
  71. package/dist/constants/package-default-node-range.js +1 -5
  72. package/dist/constants/packages.d.ts +5 -0
  73. package/dist/constants/packages.js +5 -0
  74. package/dist/constants/platform.d.ts +1 -1
  75. package/dist/constants/platform.js +1 -1
  76. package/dist/constants/socket.js +1 -1
  77. package/dist/constants/typescript.d.ts +5 -0
  78. package/dist/constants/typescript.js +5 -0
  79. package/dist/debug/_internal.d.ts +22 -7
  80. package/dist/debug/_internal.js +33 -15
  81. package/dist/debug/namespace.js +11 -8
  82. package/dist/debug/output.d.ts +12 -1
  83. package/dist/debug/output.js +33 -16
  84. package/dist/dlx/binary-resolution.js +7 -4
  85. package/dist/eco/npm/npm/parse-lockfile.js +2 -1
  86. package/dist/eco/npm/vlt/exec.d.ts +1 -1
  87. package/dist/eco/npm/vlt/exec.js +1 -1
  88. package/dist/env/agents.d.ts +6 -0
  89. package/dist/env/agents.js +29 -0
  90. package/dist/env/flags.d.ts +12 -0
  91. package/dist/env/flags.js +23 -0
  92. package/dist/env/github-status.js +2 -2
  93. package/dist/env/providers.d.ts +6 -0
  94. package/dist/env/providers.js +23 -0
  95. package/dist/env/proxy.js +1 -1
  96. package/dist/env/rewire.d.ts +32 -0
  97. package/dist/env/rewire.js +55 -23
  98. package/dist/env/runtimes.d.ts +9 -0
  99. package/dist/env/runtimes.js +53 -0
  100. package/dist/env/socket-cli.d.ts +5 -2
  101. package/dist/env/socket-cli.js +6 -3
  102. package/dist/errors/predicates.d.ts +3 -2
  103. package/dist/errors/predicates.js +5 -3
  104. package/dist/errors/stack.js +2 -1
  105. package/dist/events/exit/_internal.d.ts +1 -23
  106. package/dist/external/@npmcli/package-json.js +179 -88
  107. package/dist/external/@npmcli/promise-spawn.js +2 -2
  108. package/dist/external/@sinclair/typebox/value.js +5 -4
  109. package/dist/external/@socketregistry/yocto-spinner.js +3 -3
  110. package/dist/external/adm-zip.d.ts +82 -0
  111. package/dist/external/adm-zip.js +2 -2
  112. package/dist/external/cacache.d.ts +87 -0
  113. package/dist/external/debug.d.ts +22 -0
  114. package/dist/external/debug.js +11 -4
  115. package/dist/external/del.d.ts +1 -0
  116. package/dist/external/external-pack.d.ts +12 -0
  117. package/dist/external/external-pack.js +41 -34
  118. package/dist/external/fast-glob.d.ts +8 -0
  119. package/dist/external/fast-sort.d.ts +1 -0
  120. package/dist/external/get-east-asian-width.d.ts +5 -0
  121. package/dist/external/get-east-asian-width.js +8 -1
  122. package/dist/external/has-flag.d.ts +1 -0
  123. package/dist/external/inquirer-pack.d.ts +18 -0
  124. package/dist/external/libnpmexec.d.ts +35 -0
  125. package/dist/external/libnpmpack.d.ts +1 -0
  126. package/dist/external/make-fetch-happen.d.ts +13 -0
  127. package/dist/external/normalize-package-data.d.ts +4 -0
  128. package/dist/external/npm-core.d.ts +14 -0
  129. package/dist/external/npm-pack.d.ts +24 -0
  130. package/dist/external/npm-pack.js +1551 -1867
  131. package/dist/external/npm-package-arg.d.ts +4 -0
  132. package/dist/external/p-map.js +8 -1
  133. package/dist/external/pacote.d.ts +15 -0
  134. package/dist/external/pico-pack.d.ts +16 -0
  135. package/dist/external/pico-pack.js +38 -23
  136. package/dist/external/picomatch.d.ts +96 -0
  137. package/dist/external/pony-cause.d.ts +14 -0
  138. package/dist/external/semver.d.ts +60 -0
  139. package/dist/external/semver.js +1459 -4
  140. package/dist/external/shell-quote.d.ts +51 -0
  141. package/dist/external/shell-quote.js +55 -15
  142. package/dist/external/signal-exit.d.ts +1 -0
  143. package/dist/external/spdx-correct.d.ts +4 -0
  144. package/dist/external/spdx-expression-parse.d.ts +4 -0
  145. package/dist/external/spdx-pack.d.ts +10 -0
  146. package/dist/external/std-env.d.ts +284 -0
  147. package/dist/external/std-env.js +323 -0
  148. package/dist/external/streaming-iterables.d.ts +11 -0
  149. package/dist/external/supports-color.d.ts +1 -0
  150. package/dist/external/tar-fs.d.ts +31 -0
  151. package/dist/external/validate-npm-package-name.d.ts +4 -0
  152. package/dist/external/which.d.ts +25 -0
  153. package/dist/external/which.js +2 -2
  154. package/dist/external/yargs-parser.d.ts +2 -0
  155. package/dist/external/yargs-parser.js +11 -3
  156. package/dist/external/yoctocolors-cjs.d.ts +51 -0
  157. package/dist/external-tools/bazel/asset-names.d.ts +1 -1
  158. package/dist/external-tools/bazel/from-download.d.ts +1 -1
  159. package/dist/external-tools/bazel/resolve.d.ts +3 -0
  160. package/dist/external-tools/bazel/resolve.js +3 -0
  161. package/dist/external-tools/cdxgen/asset-names.d.ts +5 -5
  162. package/dist/external-tools/cdxgen/asset-names.js +3 -3
  163. package/dist/external-tools/cdxgen/from-download.d.ts +2 -2
  164. package/dist/external-tools/cdxgen/from-download.js +1 -1
  165. package/dist/external-tools/cdxgen/resolve.d.ts +4 -1
  166. package/dist/external-tools/cdxgen/resolve.js +4 -1
  167. package/dist/external-tools/cdxgen/types.d.ts +1 -1
  168. package/dist/external-tools/from-download.d.ts +2 -2
  169. package/dist/external-tools/from-download.js +1 -1
  170. package/dist/external-tools/janus/asset-names.d.ts +4 -1
  171. package/dist/external-tools/janus/asset-names.js +3 -0
  172. package/dist/external-tools/janus/from-download.d.ts +3 -3
  173. package/dist/external-tools/janus/from-download.js +2 -2
  174. package/dist/external-tools/janus/resolve.d.ts +3 -0
  175. package/dist/external-tools/janus/resolve.js +3 -0
  176. package/dist/external-tools/jre/asset-names.d.ts +3 -1
  177. package/dist/external-tools/jre/asset-names.js +2 -0
  178. package/dist/external-tools/jre/from-download.d.ts +1 -1
  179. package/dist/external-tools/manifest.d.ts +5 -3
  180. package/dist/external-tools/manifest.js +4 -2
  181. package/dist/external-tools/opengrep/asset-names.d.ts +1 -1
  182. package/dist/external-tools/opengrep/resolve.d.ts +3 -0
  183. package/dist/external-tools/opengrep/resolve.js +3 -0
  184. package/dist/external-tools/python/asset-names.d.ts +3 -1
  185. package/dist/external-tools/python/asset-names.js +7 -3
  186. package/dist/external-tools/python/pin.js +3 -1
  187. package/dist/external-tools/python/resolve.d.ts +3 -0
  188. package/dist/external-tools/python/resolve.js +3 -0
  189. package/dist/external-tools/sbt/resolve.d.ts +3 -0
  190. package/dist/external-tools/sbt/resolve.js +3 -0
  191. package/dist/external-tools/skillspector/from-uv.d.ts +1 -1
  192. package/dist/external-tools/synp/resolve.d.ts +3 -0
  193. package/dist/external-tools/synp/resolve.js +3 -0
  194. package/dist/external-tools/trivy/asset-names.d.ts +1 -1
  195. package/dist/external-tools/trivy/resolve.d.ts +3 -0
  196. package/dist/external-tools/trivy/resolve.js +3 -0
  197. package/dist/external-tools/trufflehog/asset-names.d.ts +4 -1
  198. package/dist/external-tools/trufflehog/asset-names.js +3 -0
  199. package/dist/external-tools/trufflehog/from-download.d.ts +1 -1
  200. package/dist/external-tools/trufflehog/resolve.d.ts +3 -0
  201. package/dist/external-tools/trufflehog/resolve.js +3 -0
  202. package/dist/external-tools/uv/asset-names.d.ts +1 -1
  203. package/dist/external-tools/uv/resolve.d.ts +3 -0
  204. package/dist/external-tools/uv/resolve.js +3 -0
  205. package/dist/fleet/repo-config.d.ts +8 -6
  206. package/dist/fleet/repo-config.js +8 -6
  207. package/dist/fs/_internal.d.ts +1 -1
  208. package/dist/fs/_internal.js +1 -1
  209. package/dist/fs/access.d.ts +2 -0
  210. package/dist/fs/access.js +2 -0
  211. package/dist/fs/allowed-dirs-cache.js +5 -3
  212. package/dist/fs/find.js +1 -2
  213. package/dist/fs/inspect.d.ts +2 -2
  214. package/dist/fs/read-file.js +3 -4
  215. package/dist/fs/safe.js +1 -1
  216. package/dist/git/_internal.js +5 -1
  217. package/dist/github/commit.d.ts +92 -0
  218. package/dist/github/commit.js +113 -0
  219. package/dist/github/ghsa.js +1 -1
  220. package/dist/github/refs-graphql.js +1 -1
  221. package/dist/github/request.js +1 -1
  222. package/dist/github/token.d.ts +5 -2
  223. package/dist/github/token.js +6 -4
  224. package/dist/github/workflow-runs.d.ts +107 -0
  225. package/dist/github/workflow-runs.js +98 -0
  226. package/dist/http-request/_internal.d.ts +1 -1
  227. package/dist/http-request/browser.d.ts +6 -0
  228. package/dist/http-request/browser.js +3 -2
  229. package/dist/http-request/download.js +2 -0
  230. package/dist/http-request/headers.d.ts +1 -1
  231. package/dist/http-request/headers.js +1 -1
  232. package/dist/http-request/request-attempt.js +6 -3
  233. package/dist/http-request/request-types.d.ts +10 -1
  234. package/dist/http-request/request.js +2 -2
  235. package/dist/http-request/user-agent.d.ts +23 -2
  236. package/dist/http-request/user-agent.js +48 -6
  237. package/dist/integrity.d.ts +3 -1
  238. package/dist/integrity.js +3 -1
  239. package/dist/json/format.js +4 -1
  240. package/dist/logger/_internal.d.ts +13 -15
  241. package/dist/logger/_internal.js +21 -21
  242. package/dist/logger/colors.d.ts +9 -3
  243. package/dist/logger/colors.js +6 -13
  244. package/dist/logger/console-methods.js +2 -2
  245. package/dist/logger/console.d.ts +1 -0
  246. package/dist/logger/console.js +9 -9
  247. package/dist/logger/node.js +2 -1
  248. package/dist/native-messaging/install.js +1 -1
  249. package/dist/native-messaging/rate-limit.d.ts +4 -1
  250. package/dist/native-messaging/rate-limit.js +4 -1
  251. package/dist/node/events.d.ts +3 -0
  252. package/dist/node/events.js +3 -0
  253. package/dist/node/fs.d.ts +1 -1
  254. package/dist/node/timers-promises.d.ts +3 -0
  255. package/dist/node/timers-promises.js +3 -0
  256. package/dist/node/url.d.ts +3 -0
  257. package/dist/node/url.js +3 -0
  258. package/dist/npm/meta-cache.d.ts +183 -0
  259. package/dist/npm/meta-cache.js +318 -0
  260. package/dist/npm/meta-slice.d.ts +27 -0
  261. package/dist/npm/meta-slice.js +68 -0
  262. package/dist/npm/meta-types.d.ts +282 -0
  263. package/dist/npm/meta-types.js +2 -0
  264. package/dist/npm/meta.d.ts +125 -0
  265. package/dist/npm/meta.js +347 -0
  266. package/dist/npm/registry.d.ts +212 -0
  267. package/dist/npm/registry.js +284 -0
  268. package/dist/objects/getters.d.ts +1 -1
  269. package/dist/objects/getters.js +1 -1
  270. package/dist/packages/manifest.js +6 -7
  271. package/dist/packages/metadata-extensions.js +2 -4
  272. package/dist/packages/provenance.d.ts +8 -0
  273. package/dist/packages/provenance.js +8 -0
  274. package/dist/packages/tarball.js +1 -2
  275. package/dist/packages/validation.d.ts +0 -10
  276. package/dist/packages/validation.js +0 -14
  277. package/dist/paths/exts.d.ts +30 -0
  278. package/dist/paths/exts.js +30 -0
  279. package/dist/paths/filenames.d.ts +6 -0
  280. package/dist/paths/filenames.js +6 -0
  281. package/dist/paths/globs.d.ts +6 -0
  282. package/dist/paths/globs.js +6 -0
  283. package/dist/paths/resolve.js +19 -14
  284. package/dist/paths/socket.d.ts +8 -8
  285. package/dist/paths/socket.js +8 -8
  286. package/dist/perf/report.js +4 -2
  287. package/dist/pkg-ext/data.js +0 -2
  288. package/dist/primordials/globals.d.ts +1 -1
  289. package/dist/primordials/globals.js +1 -1
  290. package/dist/primordials/headers.d.ts +13 -1
  291. package/dist/primordials/headers.js +13 -1
  292. package/dist/primordials/process.d.ts +1 -1
  293. package/dist/primordials/process.js +1 -1
  294. package/dist/primordials/url.d.ts +18 -0
  295. package/dist/primordials/url.js +18 -0
  296. package/dist/process/spawn/child.js +3 -5
  297. package/dist/promises/_internal.d.ts +1 -1
  298. package/dist/promises/_internal.js +1 -2
  299. package/dist/promises/options.js +3 -3
  300. package/dist/releases/socket-btm-binary-naming.js +12 -1
  301. package/dist/secrets/_internal.d.ts +1 -1
  302. package/dist/secrets/_internal.js +1 -1
  303. package/dist/secrets/find.d.ts +2 -2
  304. package/dist/secrets/find.js +2 -2
  305. package/dist/secrets/keychain.d.ts +10 -1
  306. package/dist/secrets/keychain.js +10 -1
  307. package/dist/secrets/socket-api-token.d.ts +1 -1
  308. package/dist/secrets/socket-api-token.js +1 -1
  309. package/dist/secrets/types.d.ts +1 -1
  310. package/dist/smol/http.d.ts +2 -0
  311. package/dist/smol/http.js +2 -0
  312. package/dist/smol/https.d.ts +2 -0
  313. package/dist/smol/https.js +2 -0
  314. package/dist/sorts/_internal.d.ts +2 -3
  315. package/dist/sorts/_internal.js +1 -3
  316. package/dist/spinner/format.js +2 -4
  317. package/dist/stdio/footer.js +8 -7
  318. package/dist/stdio/prompts.d.ts +8 -15
  319. package/dist/stdio/prompts.js +18 -29
  320. package/dist/strings/predicates.d.ts +2 -2
  321. package/dist/strings/search.js +1 -1
  322. package/dist/strings/types.d.ts +4 -0
  323. package/dist/strings/width.d.ts +1 -0
  324. package/dist/strings/width.js +17 -8
  325. package/dist/themes/context.d.ts +13 -0
  326. package/dist/themes/context.js +23 -8
  327. package/dist/versions/_internal.d.ts +43 -13
  328. package/dist/versions/_internal.js +27 -15
  329. package/dist/versions/compare.d.ts +16 -10
  330. package/dist/versions/compare.js +36 -16
  331. package/dist/versions/parse.js +1 -1
  332. package/dist/versions/range.js +3 -2
  333. package/dist/words/pluralize.js +4 -1
  334. package/llms.txt +63 -750
  335. package/package.json +200 -35
@@ -20,7 +20,7 @@
20
20
  * `external-tools.json` (or wherever the pin lives).
21
21
  * - Subsequent calls with `integrity` set: downloads, verifies against the pin,
22
22
  * returns the same value. Customization:
23
- * - `downloader?` lets tests inject a fake fetch, and gives fleet consumers an
23
+ * - `downloader?` lets tests inject a fake fetch, and gives Socket consumers an
24
24
  * escape hatch for alternate cache backends, retry logic, or progress
25
25
  * reporters.
26
26
  */
@@ -112,7 +112,7 @@ export interface DownloadedArchive {
112
112
  * Optional downloader injection. Default: `dlx/binary-download.downloadBinary`.
113
113
  * Replace when: - Writing unit tests that need a fake fetch (no network). -
114
114
  * Wiring an alternate cache backend or progress reporter. - Adding
115
- * fleet-specific instrumentation (metrics, retry).
115
+ * tool-specific instrumentation (metrics, retry).
116
116
  */
117
117
  export type BinaryDownloader = typeof downloadBinary;
118
118
  export interface DownloadOptions {
@@ -29,7 +29,7 @@ let node_fs = require("node:fs");
29
29
  * `external-tools.json` (or wherever the pin lives).
30
30
  * - Subsequent calls with `integrity` set: downloads, verifies against the pin,
31
31
  * returns the same value. Customization:
32
- * - `downloader?` lets tests inject a fake fetch, and gives fleet consumers an
32
+ * - `downloader?` lets tests inject a fake fetch, and gives Socket consumers an
33
33
  * escape hatch for alternate cache backends, retry logic, or progress
34
34
  * reporters.
35
35
  */
@@ -21,6 +21,9 @@ export declare const JANUS_ASSET_MAP: Readonly<Record<string, JanusAssetEntry>>;
21
21
  * rather than letting the URL builder silently return undefined.
22
22
  */
23
23
  export declare const JANUS_SUPPORTED_PLATFORM_ARCHES: readonly string[];
24
+ /**
25
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
26
+ */
24
27
  export declare function getJanusAssetEntry(platformArch: string): JanusAssetEntry | undefined;
25
28
  export interface JanusDownloadOptions {
26
29
  /**
@@ -29,7 +32,7 @@ export interface JanusDownloadOptions {
29
32
  */
30
33
  version: string;
31
34
  /**
32
- * Fleet platform-arch token — looked up in `JANUS_ASSET_MAP`. Returns
35
+ * Socket platform-arch token — looked up in `JANUS_ASSET_MAP`. Returns
33
36
  * `undefined` for any platform-arch janus doesn't ship a build for.
34
37
  */
35
38
  platformArch: string;
@@ -27,6 +27,9 @@ const JANUS_ASSET_MAP = require_primordials_object.ObjectFreeze({
27
27
  * rather than letting the URL builder silently return undefined.
28
28
  */
29
29
  const JANUS_SUPPORTED_PLATFORM_ARCHES = require_primordials_object.ObjectFreeze(require_primordials_object.ObjectKeys(JANUS_ASSET_MAP));
30
+ /**
31
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
32
+ */
30
33
  function getJanusAssetEntry(platformArch) {
31
34
  return JANUS_ASSET_MAP[platformArch];
32
35
  }
@@ -4,8 +4,8 @@
4
4
  * archives containing a bare `janus` binary at the archive root (no nested
5
5
  * directory). Defaults install under the shared wheelhouse dir
6
6
  * (`~/.socket/_wheelhouse/janus/<version>/<platform-arch>/`) rather than the
7
- * per-process dlx cache, so multiple fleet consumers reuse the same extracted
8
- * binary.
7
+ * per-process dlx cache, so multiple Socket consumers reuse the same
8
+ * extracted binary.
9
9
  */
10
10
  import type { BinaryDownloader } from '../from-download';
11
11
  import type { HashSpec } from '../../integrity';
@@ -17,7 +17,7 @@ export interface JanusFromDownloadOptions {
17
17
  /**
18
18
  * Override the install directory. By default the binary lands in
19
19
  * `<getSocketWheelhouseDir()>/janus/<version>/<platformArch>/` — a shared
20
- * cross-fleet location so multiple Socket tools resolve the same binary
20
+ * shared location so multiple Socket tools resolve the same binary
21
21
  * without per-process duplication.
22
22
  */
23
23
  cacheDir?: string | undefined;
@@ -16,8 +16,8 @@ node_path = require_runtime.__toESM(node_path);
16
16
  * archives containing a bare `janus` binary at the archive root (no nested
17
17
  * directory). Defaults install under the shared wheelhouse dir
18
18
  * (`~/.socket/_wheelhouse/janus/<version>/<platform-arch>/`) rather than the
19
- * per-process dlx cache, so multiple fleet consumers reuse the same extracted
20
- * binary.
19
+ * per-process dlx cache, so multiple Socket consumers reuse the same
20
+ * extracted binary.
21
21
  */
22
22
  async function janusFromDownload(options) {
23
23
  const { cacheDir, downloader, integrity, platformArch, version } = {
@@ -24,5 +24,8 @@ export interface ResolveJanusOptions {
24
24
  }
25
25
  export declare function cacheKey(options: ResolveJanusOptions | undefined): string;
26
26
  export declare function doResolveJanus(options?: ResolveJanusOptions | undefined): Promise<ResolvedJanus | undefined>;
27
+ /**
28
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
29
+ */
27
30
  export declare function resetJanusResolution(): void;
28
31
  export declare function resolveJanus(options?: ResolveJanusOptions | undefined): Promise<ResolvedJanus | undefined>;
@@ -43,6 +43,9 @@ async function doResolveJanus(options) {
43
43
  if (options?.downloadIfMissing) return require_external_tools_janus_from_download.janusFromDownload(options.downloadIfMissing);
44
44
  }
45
45
  /* c8 ignore start - test-only escape hatch. */
46
+ /**
47
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
48
+ */
46
49
  function resetJanusResolution() {
47
50
  resolutionCache.clear();
48
51
  }
@@ -34,7 +34,7 @@ export interface AdoptiumDownloadOptions {
34
34
  */
35
35
  version: number;
36
36
  /**
37
- * Fleet platform-arch token — same vocabulary as `getPlatformArch` output.
37
+ * Socket platform-arch token — same vocabulary as `getPlatformArch` output.
38
38
  * Looked up in `ADOPTIUM_QUERY_MAP`; returns `undefined` when Adoptium
39
39
  * doesn't publish a build for that target (e.g. `win-arm64` for older
40
40
  * majors).
@@ -87,5 +87,7 @@ export declare function getAdoptiumDownloadUrl(options: AdoptiumDownloadOptions)
87
87
  /**
88
88
  * Returns the Adoptium query parameters for a given platform-arch, or
89
89
  * `undefined` if no Adoptium build exists for that target.
90
+ *
91
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
90
92
  */
91
93
  export declare function getAdoptiumQuery(platformArch: string): AdoptiumAssetQuery | undefined;
@@ -107,6 +107,8 @@ function getAdoptiumDownloadUrl(options) {
107
107
  /**
108
108
  * Returns the Adoptium query parameters for a given platform-arch, or
109
109
  * `undefined` if no Adoptium build exists for that target.
110
+ *
111
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
110
112
  */
111
113
  function getAdoptiumQuery(platformArch) {
112
114
  return ADOPTIUM_QUERY_MAP[platformArch];
@@ -26,7 +26,7 @@ export interface JreFromDownloadOptions {
26
26
  */
27
27
  version: number;
28
28
  /**
29
- * Fleet platform-arch token, e.g. `'darwin-arm64'`.
29
+ * Socket platform-arch token, e.g. `'darwin-arm64'`.
30
30
  */
31
31
  platformArch: string;
32
32
  /**
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @file Reader for `external-tools.json` — the fleet manifest describing
2
+ * @file Reader for `external-tools.json` — the Socket manifest describing
3
3
  * downloadable external binaries (sfw, zizmor, etc.) with pinned versions,
4
4
  * per-platform asset names, and integrity hashes. The manifest itself is
5
- * hand-maintained in each fleet repo's root (`<repo>/external-tools.json`)
5
+ * hand-maintained in each Socket repo's root (`<repo>/external-tools.json`)
6
6
  * and consumed by the setup-and-install GitHub action. This reader gives
7
7
  * in-process consumers (external- tools resolvers, ad-hoc scripts) the same
8
8
  * typed view without each one re-implementing the JSON-parse + shape check +
@@ -42,7 +42,7 @@ export interface ToolChecksum {
42
42
  integrity: string;
43
43
  }
44
44
  /**
45
- * A downloadable-binary tool entry. `platforms` is keyed by the fleet's
45
+ * A downloadable-binary tool entry. `platforms` is keyed by Socket's
46
46
  * platform-arch token (`darwin-arm64`, `linux-x64-musl`, `win-x64`, etc. — same
47
47
  * vocabulary as `getPlatformArch`).
48
48
  */
@@ -118,6 +118,8 @@ export declare function parseToolEntry(raw: unknown, toolName: string): Manifest
118
118
  * Throws on malformed JSON or invalid integrity strings; unknown-shape entries
119
119
  * (rust components, future variants) come back as `{kind: 'other', raw}` so
120
120
  * callers can handle them out-of-band without blocking the manifest read.
121
+ *
122
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
121
123
  */
122
124
  export declare function readExternalToolsManifest(filepath: string): Promise<Manifest>;
123
125
  export declare function tryParseFlavored(raw: Record<string, unknown>, toolName: string): FlavoredToolEntry | undefined;
@@ -10,10 +10,10 @@ const require_fs_read_json = require('../fs/read-json.js');
10
10
 
11
11
  //#region src/external-tools/manifest.ts
12
12
  /**
13
- * @file Reader for `external-tools.json` — the fleet manifest describing
13
+ * @file Reader for `external-tools.json` — the Socket manifest describing
14
14
  * downloadable external binaries (sfw, zizmor, etc.) with pinned versions,
15
15
  * per-platform asset names, and integrity hashes. The manifest itself is
16
- * hand-maintained in each fleet repo's root (`<repo>/external-tools.json`)
16
+ * hand-maintained in each Socket repo's root (`<repo>/external-tools.json`)
17
17
  * and consumed by the setup-and-install GitHub action. This reader gives
18
18
  * in-process consumers (external- tools resolvers, ad-hoc scripts) the same
19
19
  * typed view without each one re-implementing the JSON-parse + shape check +
@@ -103,6 +103,8 @@ function parseToolEntry(raw, toolName) {
103
103
  * Throws on malformed JSON or invalid integrity strings; unknown-shape entries
104
104
  * (rust components, future variants) come back as `{kind: 'other', raw}` so
105
105
  * callers can handle them out-of-band without blocking the manifest read.
106
+ *
107
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
106
108
  */
107
109
  async function readExternalToolsManifest(filepath) {
108
110
  const raw = await require_fs_read_json.readJson(filepath);
@@ -31,7 +31,7 @@ export interface OpengrepDownloadOptions {
31
31
  */
32
32
  version: string;
33
33
  /**
34
- * Fleet platform-arch token — looked up in `OPENGREP_ASSET_MAP`.
34
+ * Socket platform-arch token — looked up in `OPENGREP_ASSET_MAP`.
35
35
  */
36
36
  platformArch: string;
37
37
  }
@@ -22,5 +22,8 @@ export interface ResolveOpengrepOptions {
22
22
  }
23
23
  export declare function cacheKey(options: ResolveOpengrepOptions | undefined): string;
24
24
  export declare function doResolveOpengrep(options?: ResolveOpengrepOptions | undefined): Promise<ResolvedOpengrep | undefined>;
25
+ /**
26
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
27
+ */
25
28
  export declare function resetOpengrepResolution(): void;
26
29
  export declare function resolveOpengrep(options?: ResolveOpengrepOptions | undefined): Promise<ResolvedOpengrep | undefined>;
@@ -41,6 +41,9 @@ async function doResolveOpengrep(options) {
41
41
  if (options?.downloadIfMissing) return require_external_tools_opengrep_from_download.opengrepFromDownload(options.downloadIfMissing);
42
42
  }
43
43
  /* c8 ignore start - test-only escape hatch. */
44
+ /**
45
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
46
+ */
44
47
  function resetOpengrepResolution() {
45
48
  resolutionCache.clear();
46
49
  }
@@ -7,11 +7,13 @@
7
7
  * extracted one directory deep (`python/bin/python3`).
8
8
  */
9
9
  /**
10
- * Python-build-standalone default pin — the fleet-canonical CPython build,
10
+ * Python-build-standalone default pin — the Socket-canonical CPython build,
11
11
  * matching socket-cli's `bundle-tools.json`. Consumers that don't pass their
12
12
  * own pin resolve against this. Bump it like any dependency (soak-aware), in
13
13
  * lockstep with socket-cli (drift-watch). The `checksums` map is keyed by asset
14
14
  * filename so the download tier verifies the exact tarball per platform.
15
+ *
16
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
15
17
  */
16
18
  export declare const DEFAULT_PYTHON_PIN: Readonly<{
17
19
  __proto__: null;
@@ -40,11 +40,13 @@ const NODE_ARCH_TO_PY = require_primordials_object.ObjectFreeze({
40
40
  });
41
41
  const RELEASE_BASE = "https://github.com/astral-sh/python-build-standalone/releases/download";
42
42
  /**
43
- * Python-build-standalone default pin — the fleet-canonical CPython build,
43
+ * Python-build-standalone default pin — the Socket-canonical CPython build,
44
44
  * matching socket-cli's `bundle-tools.json`. Consumers that don't pass their
45
45
  * own pin resolve against this. Bump it like any dependency (soak-aware), in
46
46
  * lockstep with socket-cli (drift-watch). The `checksums` map is keyed by asset
47
47
  * filename so the download tier verifies the exact tarball per platform.
48
+ *
49
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
48
50
  */
49
51
  const DEFAULT_PYTHON_PIN = require_primordials_object.ObjectFreeze({
50
52
  __proto__: null,
@@ -99,9 +101,11 @@ function pythonAsset(options) {
99
101
  const arch = options.arch ?? getPythonArch();
100
102
  const triple = arch ? PLATFORM_TRIPLES[arch] : void 0;
101
103
  if (!triple) return;
104
+ const assetName = `cpython-${version}+${tag}-${triple}-install_only.tar.gz`;
105
+ const encodedVersion = `${version}%2B${tag}`;
102
106
  return {
103
- assetName: `cpython-${version}+${tag}-${triple}-install_only.tar.gz`,
104
- url: `${RELEASE_BASE}/${tag}/cpython-${`${version}%2B${tag}`}-${triple}-install_only.tar.gz`
107
+ assetName,
108
+ url: `${RELEASE_BASE}/${tag}/cpython-${encodedVersion}-${triple}-install_only.tar.gz`
105
109
  };
106
110
  }
107
111
 
@@ -118,7 +118,9 @@ async function resolvePipPackagePin(options) {
118
118
  const artifacts = [];
119
119
  const targetName = normalizeDistName(specDistName(spec));
120
120
  let top;
121
- for (const file of files.toSorted()) {
121
+ const sortedFiles = files.toSorted();
122
+ for (let i = 0, { length } = sortedFiles; i < length; i += 1) {
123
+ const file = sortedFiles[i];
122
124
  const hash = require_integrity.computeHashes(await node_fs.promises.readFile(node_path.default.join(scratch, file)));
123
125
  const parsed = parseArtifactFilename(file);
124
126
  if (!parsed) throw new PipPackagePinError(`resolvePipPackagePin: could not parse name/version from artifact ${file}`);
@@ -38,5 +38,8 @@ export interface ResolvePythonOptions {
38
38
  }
39
39
  export declare function cacheKey(options: ResolvePythonOptions | undefined): string;
40
40
  export declare function doResolvePython(options?: ResolvePythonOptions | undefined): Promise<ResolvedPython | undefined>;
41
+ /**
42
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
43
+ */
41
44
  export declare function resetPythonResolution(): void;
42
45
  export declare function resolvePython(options?: ResolvePythonOptions | undefined): Promise<ResolvedPython | undefined>;
@@ -45,6 +45,9 @@ async function doResolvePython(options) {
45
45
  if (dl) return require_external_tools_python_from_download.pythonFromDownload(dl);
46
46
  }
47
47
  /* c8 ignore start - test-only escape hatch. */
48
+ /**
49
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
50
+ */
48
51
  function resetPythonResolution() {
49
52
  resolutionCache.clear();
50
53
  }
@@ -27,5 +27,8 @@ export interface ResolveSbtOptions {
27
27
  }
28
28
  export declare function cacheKey(options: ResolveSbtOptions | undefined): string;
29
29
  export declare function doResolveSbt(options?: ResolveSbtOptions | undefined): Promise<ResolvedSbt | undefined>;
30
+ /**
31
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
32
+ */
30
33
  export declare function resetSbtResolution(): void;
31
34
  export declare function resolveSbt(options?: ResolveSbtOptions | undefined): Promise<ResolvedSbt | undefined>;
@@ -42,6 +42,9 @@ async function doResolveSbt(options) {
42
42
  if (fromPath) return fromPath;
43
43
  if (options?.downloadIfMissing) return require_external_tools_sbt_from_download.sbtFromDownload(options.downloadIfMissing);
44
44
  }
45
+ /**
46
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
47
+ */
45
48
  /* c8 ignore start - test-only escape hatch. */
46
49
  function resetSbtResolution() {
47
50
  resolutionCache.clear();
@@ -21,7 +21,7 @@ export interface SkillSpectorFromUvOptions {
21
21
  readonly uvBin: string;
22
22
  /**
23
23
  * Absolute path to the SkillSpector uv project dir (holds `pyproject.toml` +
24
- * `uv.lock`). The fleet ships this under
24
+ * `uv.lock`). Socket ships this under
25
25
  * `setup-security-tools/skillspector/`.
26
26
  */
27
27
  readonly projectDir: string;
@@ -17,5 +17,8 @@ export interface ResolveSynpOptions {
17
17
  }
18
18
  export declare function cacheKey(options: ResolveSynpOptions | undefined): string;
19
19
  export declare function doResolveSynp(options?: ResolveSynpOptions | undefined): Promise<ResolvedSynp | undefined>;
20
+ /**
21
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
22
+ */
20
23
  export declare function resetSynpResolution(): void;
21
24
  export declare function resolveSynp(options?: ResolveSynpOptions | undefined): Promise<ResolvedSynp | undefined>;
@@ -40,6 +40,9 @@ async function doResolveSynp(options) {
40
40
  if (fromPath) return fromPath;
41
41
  if (options?.downloadIfMissing) return require_external_tools_synp_from_download.synpFromDownload(options.downloadIfMissing);
42
42
  }
43
+ /**
44
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
45
+ */
43
46
  /* c8 ignore start - test-only escape hatch. */
44
47
  function resetSynpResolution() {
45
48
  resolutionCache.clear();
@@ -21,7 +21,7 @@ export interface TrivyDownloadOptions {
21
21
  */
22
22
  version: string;
23
23
  /**
24
- * Fleet platform-arch token — looked up in `TRIVY_ASSET_MAP`.
24
+ * Socket platform-arch token — looked up in `TRIVY_ASSET_MAP`.
25
25
  */
26
26
  platformArch: string;
27
27
  }
@@ -22,5 +22,8 @@ export interface ResolveTrivyOptions {
22
22
  }
23
23
  export declare function cacheKey(options: ResolveTrivyOptions | undefined): string;
24
24
  export declare function doResolveTrivy(options?: ResolveTrivyOptions | undefined): Promise<ResolvedTrivy | undefined>;
25
+ /**
26
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
27
+ */
25
28
  export declare function resetTrivyResolution(): void;
26
29
  export declare function resolveTrivy(options?: ResolveTrivyOptions | undefined): Promise<ResolvedTrivy | undefined>;
@@ -40,6 +40,9 @@ async function doResolveTrivy(options) {
40
40
  if (fromPath) return fromPath;
41
41
  if (options?.downloadIfMissing) return require_external_tools_trivy_from_download.trivyFromDownload(options.downloadIfMissing);
42
42
  }
43
+ /**
44
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
45
+ */
43
46
  /* c8 ignore start - test-only escape hatch. */
44
47
  function resetTrivyResolution() {
45
48
  resolutionCache.clear();
@@ -11,6 +11,9 @@ export interface TrufflehogAssetEntry {
11
11
  readonly suffix: string;
12
12
  }
13
13
  export declare const TRUFFLEHOG_ASSET_MAP: Readonly<Record<string, TrufflehogAssetEntry>>;
14
+ /**
15
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
16
+ */
14
17
  export declare function getTrufflehogAssetEntry(platformArch: string): TrufflehogAssetEntry | undefined;
15
18
  export interface TrufflehogDownloadOptions {
16
19
  /**
@@ -19,7 +22,7 @@ export interface TrufflehogDownloadOptions {
19
22
  */
20
23
  version: string;
21
24
  /**
22
- * Fleet platform-arch token — looked up in `TRUFFLEHOG_ASSET_MAP`. Returns
25
+ * Socket platform-arch token — looked up in `TRUFFLEHOG_ASSET_MAP`. Returns
23
26
  * `undefined` when no entry exists for the target.
24
27
  */
25
28
  platformArch: string;
@@ -37,6 +37,9 @@ const TRUFFLEHOG_ASSET_MAP = require_primordials_object.ObjectFreeze({
37
37
  suffix: "windows_amd64.tar.gz"
38
38
  })
39
39
  });
40
+ /**
41
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
42
+ */
40
43
  function getTrufflehogAssetEntry(platformArch) {
41
44
  return TRUFFLEHOG_ASSET_MAP[platformArch];
42
45
  }
@@ -16,7 +16,7 @@ export interface TrufflehogFromDownloadOptions {
16
16
  */
17
17
  version: string;
18
18
  /**
19
- * Fleet platform-arch token, e.g. `'darwin-arm64'`.
19
+ * Socket platform-arch token, e.g. `'darwin-arm64'`.
20
20
  */
21
21
  platformArch: string;
22
22
  /**
@@ -26,5 +26,8 @@ export interface ResolveTrufflehogOptions {
26
26
  }
27
27
  export declare function cacheKey(options: ResolveTrufflehogOptions | undefined): string;
28
28
  export declare function doResolveTrufflehog(options?: ResolveTrufflehogOptions | undefined): Promise<ResolvedTrufflehog | undefined>;
29
+ /**
30
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
31
+ */
29
32
  export declare function resetTrufflehogResolution(): void;
30
33
  export declare function resolveTrufflehog(options?: ResolveTrufflehogOptions | undefined): Promise<ResolvedTrufflehog | undefined>;
@@ -40,6 +40,9 @@ async function doResolveTrufflehog(options) {
40
40
  if (fromPath) return fromPath;
41
41
  if (options?.downloadIfMissing) return require_external_tools_trufflehog_from_download.trufflehogFromDownload(options.downloadIfMissing);
42
42
  }
43
+ /**
44
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
45
+ */
43
46
  /* c8 ignore start - test-only escape hatch. */
44
47
  function resetTrufflehogResolution() {
45
48
  resolutionCache.clear();
@@ -23,7 +23,7 @@ export interface UvDownloadOptions {
23
23
  */
24
24
  version: string;
25
25
  /**
26
- * Fleet platform-arch token — looked up in `UV_ASSET_MAP`.
26
+ * Socket platform-arch token — looked up in `UV_ASSET_MAP`.
27
27
  */
28
28
  platformArch: string;
29
29
  }
@@ -21,5 +21,8 @@ export interface ResolveUvOptions {
21
21
  }
22
22
  export declare function cacheKey(options: ResolveUvOptions | undefined): string;
23
23
  export declare function doResolveUv(options?: ResolveUvOptions | undefined): Promise<ResolvedUv | undefined>;
24
+ /**
25
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
26
+ */
24
27
  export declare function resetUvResolution(): void;
25
28
  export declare function resolveUv(options?: ResolveUvOptions | undefined): Promise<ResolvedUv | undefined>;
@@ -40,6 +40,9 @@ async function doResolveUv(options) {
40
40
  if (opts?.downloadIfMissing) return require_external_tools_uv_from_download.uvFromDownload(opts.downloadIfMissing);
41
41
  }
42
42
  /* c8 ignore start - test-only escape hatch. */
43
+ /**
44
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
45
+ */
43
46
  function resetUvResolution() {
44
47
  resolutionCache.clear();
45
48
  }
@@ -2,12 +2,12 @@
2
2
  * @file Fleet-convention config reader: a per-repo override (`.config/repo`)
3
3
  * layered over the cascaded fleet default (`.config/fleet`). A thin wrapper
4
4
  * over the generic `config/layers` reader that returns the named `{ fleet,
5
- * repo }` shape fleet callers use, plus the `{ fleet, repo }` array-merge
6
- * convenience. The generic, fleet-agnostic primitives (`readConfigLayers`,
7
- * `mergeConfigArray`) live in `config/layers`. Lives in the published lib
8
- * because it is the only import root the `.git-hooks/_shared` and
9
- * `.claude/hooks/_shared` trees (which do not cross-import) plus `.config/*`
10
- * can all reach.
5
+ * repo }` shape Socket callers use, plus the `{ fleet, repo }` array-merge
6
+ * convenience. The generic, convention-agnostic primitives
7
+ * (`readConfigLayers`, `mergeConfigArray`) live in `config/layers`. Lives in
8
+ * the published lib because it is the only import root the
9
+ * `.git-hooks/_shared` and `.claude/hooks/_shared` trees (which do not
10
+ * cross-import) plus `.config/*` can all reach.
11
11
  */
12
12
  export declare const FLEET_LAYER_DIRS: readonly string[];
13
13
  export interface RepoConfigTiers<T> {
@@ -28,6 +28,8 @@ export interface ResolveRepoConfigOptions {
28
28
  *
29
29
  * @returns Fleet entries followed by repo entries; `[]` when neither is an
30
30
  * array.
31
+ *
32
+ * @unused No internal or Socket consumers.
31
33
  */
32
34
  export declare function mergeRepoConfigArray<T extends Record<string, unknown>, K extends keyof T>(tiers: RepoConfigTiers<T>, key: K): Array<T[K] extends Array<infer E> ? E : never>;
33
35
  /**
@@ -8,12 +8,12 @@ const require_config_layers = require('../config/layers.js');
8
8
  * @file Fleet-convention config reader: a per-repo override (`.config/repo`)
9
9
  * layered over the cascaded fleet default (`.config/fleet`). A thin wrapper
10
10
  * over the generic `config/layers` reader that returns the named `{ fleet,
11
- * repo }` shape fleet callers use, plus the `{ fleet, repo }` array-merge
12
- * convenience. The generic, fleet-agnostic primitives (`readConfigLayers`,
13
- * `mergeConfigArray`) live in `config/layers`. Lives in the published lib
14
- * because it is the only import root the `.git-hooks/_shared` and
15
- * `.claude/hooks/_shared` trees (which do not cross-import) plus `.config/*`
16
- * can all reach.
11
+ * repo }` shape Socket callers use, plus the `{ fleet, repo }` array-merge
12
+ * convenience. The generic, convention-agnostic primitives
13
+ * (`readConfigLayers`, `mergeConfigArray`) live in `config/layers`. Lives in
14
+ * the published lib because it is the only import root the
15
+ * `.git-hooks/_shared` and `.claude/hooks/_shared` trees (which do not
16
+ * cross-import) plus `.config/*` can all reach.
17
17
  */
18
18
  const FLEET_LAYER_DIRS = [".config/fleet", ".config/repo"];
19
19
  /**
@@ -26,6 +26,8 @@ const FLEET_LAYER_DIRS = [".config/fleet", ".config/repo"];
26
26
  *
27
27
  * @returns Fleet entries followed by repo entries; `[]` when neither is an
28
28
  * array.
29
+ *
30
+ * @unused No internal or Socket consumers.
29
31
  */
30
32
  function mergeRepoConfigArray(tiers, key) {
31
33
  return require_config_layers.mergeConfigArray([tiers.fleet, tiers.repo], key);
@@ -2,7 +2,7 @@
2
2
  * @file Private state shared between `fs/safe` and `fs/path-cache`. The `_`
3
3
  * prefix keeps this module out of the generated package.json `exports` map
4
4
  * (the `dist/**\/_*` ignore pattern in
5
- * `scripts/post-build/make-package-exports.mts` filters it out), so it is not
5
+ * `scripts/fleet/make-package-exports.mts` filters it out), so it is not
6
6
  * part of the public surface — it exists only to give the two leaves above a
7
7
  * common owner for the allowed-directory cache. The cache is invalidated by
8
8
  * `invalidatePathCache()` in `fs/path-cache.ts` whenever paths are rewired in
@@ -9,7 +9,7 @@ const require_paths_socket = require('../paths/socket.js');
9
9
  * @file Private state shared between `fs/safe` and `fs/path-cache`. The `_`
10
10
  * prefix keeps this module out of the generated package.json `exports` map
11
11
  * (the `dist/**\/_*` ignore pattern in
12
- * `scripts/post-build/make-package-exports.mts` filters it out), so it is not
12
+ * `scripts/fleet/make-package-exports.mts` filters it out), so it is not
13
13
  * part of the public surface — it exists only to give the two leaves above a
14
14
  * common owner for the allowed-directory cache. The cache is invalidated by
15
15
  * `invalidatePathCache()` in `fs/path-cache.ts` whenever paths are rewired in
@@ -20,6 +20,8 @@ import type { PathLike } from 'node:fs';
20
20
  export declare function canAccess(path: PathLike, mode?: number | undefined): boolean;
21
21
  /**
22
22
  * Can the process execute `path`? (`X_OK`)
23
+ *
24
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
23
25
  */
24
26
  export declare function canExecute(path: PathLike): boolean;
25
27
  /**
package/dist/fs/access.js CHANGED
@@ -38,6 +38,8 @@ function canAccess(path, mode) {
38
38
  }
39
39
  /**
40
40
  * Can the process execute `path`? (`X_OK`)
41
+ *
42
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
41
43
  */
42
44
  function canExecute(path) {
43
45
  return canAccess(path, require_node_fs.getNodeFs().constants.X_OK);
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with rolldown */
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+ const require_paths_rewire = require('../paths/rewire.js');
5
+ const require_fs__internal = require('./_internal.js');
4
6
 
5
7
  //#region src/fs/allowed-dirs-cache.ts
6
8
  /**
@@ -34,7 +36,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
34
36
  * @internal Used for test rewiring
35
37
  */
36
38
  function invalidatePathCache() {
37
- clearAllowedDirectories();
39
+ require_fs__internal.clearAllowedDirectories();
38
40
  }
39
41
  /**
40
42
  * Register `invalidatePathCache` with the rewire module after the current
@@ -53,8 +55,8 @@ function invalidatePathCache() {
53
55
  */
54
56
  function registerInvalidationCallback(attempt = 0) {
55
57
  try {
56
- if (typeof registerCacheInvalidation === "function") {
57
- registerCacheInvalidation(invalidatePathCache);
58
+ if (typeof require_paths_rewire.registerCacheInvalidation === "function") {
59
+ require_paths_rewire.registerCacheInvalidation(invalidatePathCache);
58
60
  return;
59
61
  }
60
62
  } catch {}