@socketsecurity/lib 6.0.8 → 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 (396) hide show
  1. package/CHANGELOG.md +28 -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 +31 -17
  26. package/dist/ai/route.js +35 -19
  27. package/dist/ai/spawn.d.mts +34 -1
  28. package/dist/ai/spawn.js +115 -3
  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 +19 -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 +19253 -13937
  40. package/dist/bin/resolve.js +1 -1
  41. package/dist/bin/shadow.js +2 -1
  42. package/dist/bin/which.d.ts +28 -3
  43. package/dist/bin/which.js +45 -3
  44. package/dist/cacache/_internal.d.ts +10 -2
  45. package/dist/cacache/_internal.js +6 -10
  46. package/dist/cache/ttl/_internal.d.ts +33 -0
  47. package/dist/cache/ttl/_internal.js +68 -0
  48. package/dist/cache/ttl/browser.d.ts +56 -0
  49. package/dist/cache/ttl/browser.js +257 -0
  50. package/dist/cache/ttl/store.js +11 -34
  51. package/dist/cache/ttl/types.d.ts +46 -3
  52. package/dist/checks/primordials-defaults.d.ts +5 -5
  53. package/dist/checks/primordials-defaults.js +5 -5
  54. package/dist/checks/primordials.d.ts +1 -1
  55. package/dist/checks/primordials.js +25 -17
  56. package/dist/cli/check-primordials.d.ts +6 -1
  57. package/dist/cli/check-primordials.js +14 -5
  58. package/dist/cli/check.js +1 -1
  59. package/dist/cli/socket-lib.d.ts +1 -1
  60. package/dist/cli/socket-lib.js +3 -3
  61. package/dist/colors/socket-palette.d.ts +1 -1
  62. package/dist/compression/brotli.d.ts +6 -2
  63. package/dist/compression/brotli.js +5 -1
  64. package/dist/compression/gzip.d.ts +6 -2
  65. package/dist/compression/gzip.js +7 -2
  66. package/dist/config/layers.d.ts +53 -0
  67. package/dist/config/layers.js +83 -0
  68. package/dist/constants/agents.d.ts +3 -0
  69. package/dist/constants/agents.js +3 -0
  70. package/dist/constants/node.d.ts +14 -0
  71. package/dist/constants/node.js +14 -0
  72. package/dist/constants/package-default-node-range.js +1 -5
  73. package/dist/constants/packages.d.ts +5 -0
  74. package/dist/constants/packages.js +5 -0
  75. package/dist/constants/platform.d.ts +1 -1
  76. package/dist/constants/platform.js +1 -1
  77. package/dist/constants/socket.js +1 -1
  78. package/dist/constants/typescript.d.ts +5 -0
  79. package/dist/constants/typescript.js +5 -0
  80. package/dist/debug/_internal.d.ts +22 -7
  81. package/dist/debug/_internal.js +33 -15
  82. package/dist/debug/caller-info.js +1 -1
  83. package/dist/debug/namespace.js +11 -8
  84. package/dist/debug/output.d.ts +12 -1
  85. package/dist/debug/output.js +33 -16
  86. package/dist/dlx/binary-cache.js +1 -1
  87. package/dist/dlx/binary-resolution.js +8 -5
  88. package/dist/dlx/firewall.js +1 -1
  89. package/dist/dlx/lockfile.js +1 -1
  90. package/dist/eco/npm/npm/parse-lockfile.js +3 -2
  91. package/dist/eco/npm/vlt/exec.d.ts +1 -1
  92. package/dist/eco/npm/vlt/exec.js +1 -1
  93. package/dist/eco/npm/yarnpkg/yarn/parse-lockfile.js +1 -1
  94. package/dist/env/agents.d.ts +6 -0
  95. package/dist/env/agents.js +29 -0
  96. package/dist/env/flags.d.ts +12 -0
  97. package/dist/env/flags.js +23 -0
  98. package/dist/env/github-status.js +2 -2
  99. package/dist/env/providers.d.ts +6 -0
  100. package/dist/env/providers.js +23 -0
  101. package/dist/env/proxy.js +1 -1
  102. package/dist/env/rewire.d.ts +37 -3
  103. package/dist/env/rewire.js +60 -29
  104. package/dist/env/runtimes.d.ts +9 -0
  105. package/dist/env/runtimes.js +53 -0
  106. package/dist/env/socket-cli.d.ts +5 -2
  107. package/dist/env/socket-cli.js +6 -3
  108. package/dist/env/xdg.d.ts +17 -0
  109. package/dist/env/xdg.js +21 -1
  110. package/dist/errors/predicates.d.ts +3 -2
  111. package/dist/errors/predicates.js +5 -3
  112. package/dist/events/exit/_internal.d.ts +1 -23
  113. package/dist/external/@npmcli/package-json.js +3570 -4905
  114. package/dist/external/@npmcli/promise-spawn.js +2 -2
  115. package/dist/external/@sinclair/typebox/value.js +5 -4
  116. package/dist/external/@socketregistry/yocto-spinner.js +3 -3
  117. package/dist/external/@yarnpkg/extensions.js +1 -1
  118. package/dist/external/adm-zip.d.ts +82 -0
  119. package/dist/external/adm-zip.js +2 -2
  120. package/dist/external/cacache.d.ts +87 -0
  121. package/dist/external/debug.d.ts +22 -0
  122. package/dist/external/debug.js +11 -4
  123. package/dist/external/del.d.ts +1 -0
  124. package/dist/external/external-pack.d.ts +12 -0
  125. package/dist/external/external-pack.js +42 -35
  126. package/dist/external/fast-glob.d.ts +8 -0
  127. package/dist/external/fast-sort.d.ts +1 -0
  128. package/dist/external/get-east-asian-width.d.ts +5 -0
  129. package/dist/external/get-east-asian-width.js +8 -1
  130. package/dist/external/has-flag.d.ts +1 -0
  131. package/dist/external/inquirer-pack.d.ts +18 -0
  132. package/dist/external/libnpmexec.d.ts +35 -0
  133. package/dist/external/libnpmpack.d.ts +1 -0
  134. package/dist/external/make-fetch-happen.d.ts +13 -0
  135. package/dist/external/normalize-package-data.d.ts +4 -0
  136. package/dist/external/npm-core.d.ts +14 -0
  137. package/dist/external/npm-pack.d.ts +24 -0
  138. package/dist/external/npm-pack.js +28934 -31885
  139. package/dist/external/npm-package-arg.d.ts +4 -0
  140. package/dist/external/p-map.js +8 -1
  141. package/dist/external/pacote.d.ts +15 -0
  142. package/dist/external/pico-pack.d.ts +16 -0
  143. package/dist/external/pico-pack.js +38 -23
  144. package/dist/external/picomatch.d.ts +96 -0
  145. package/dist/external/pony-cause.d.ts +14 -0
  146. package/dist/external/semver.d.ts +60 -0
  147. package/dist/external/semver.js +1459 -4
  148. package/dist/external/shell-quote.d.ts +51 -0
  149. package/dist/external/shell-quote.js +55 -15
  150. package/dist/external/signal-exit.d.ts +1 -0
  151. package/dist/external/spdx-correct.d.ts +4 -0
  152. package/dist/external/spdx-expression-parse.d.ts +4 -0
  153. package/dist/external/spdx-pack.d.ts +10 -0
  154. package/dist/external/std-env.d.ts +284 -0
  155. package/dist/external/std-env.js +323 -0
  156. package/dist/external/streaming-iterables.d.ts +11 -0
  157. package/dist/external/supports-color.d.ts +1 -0
  158. package/dist/external/tar-fs.d.ts +31 -0
  159. package/dist/external/tar-fs.js +63 -16
  160. package/dist/external/validate-npm-package-name.d.ts +4 -0
  161. package/dist/external/which.d.ts +25 -0
  162. package/dist/external/which.js +2 -2
  163. package/dist/external/yargs-parser.d.ts +2 -0
  164. package/dist/external/yargs-parser.js +11 -3
  165. package/dist/external/yoctocolors-cjs.d.ts +51 -0
  166. package/dist/external-tools/bazel/asset-names.d.ts +1 -1
  167. package/dist/external-tools/bazel/from-download.d.ts +1 -1
  168. package/dist/external-tools/bazel/resolve.d.ts +3 -0
  169. package/dist/external-tools/bazel/resolve.js +3 -0
  170. package/dist/external-tools/cdxgen/asset-names.d.ts +5 -5
  171. package/dist/external-tools/cdxgen/asset-names.js +3 -3
  172. package/dist/external-tools/cdxgen/from-download.d.ts +2 -2
  173. package/dist/external-tools/cdxgen/from-download.js +1 -1
  174. package/dist/external-tools/cdxgen/resolve.d.ts +4 -1
  175. package/dist/external-tools/cdxgen/resolve.js +4 -1
  176. package/dist/external-tools/cdxgen/types.d.ts +1 -1
  177. package/dist/external-tools/from-download.d.ts +2 -2
  178. package/dist/external-tools/from-download.js +1 -1
  179. package/dist/external-tools/janus/asset-names.d.ts +4 -1
  180. package/dist/external-tools/janus/asset-names.js +3 -0
  181. package/dist/external-tools/janus/from-download.d.ts +3 -3
  182. package/dist/external-tools/janus/from-download.js +2 -2
  183. package/dist/external-tools/janus/resolve.d.ts +3 -0
  184. package/dist/external-tools/janus/resolve.js +3 -0
  185. package/dist/external-tools/jre/asset-names.d.ts +3 -1
  186. package/dist/external-tools/jre/asset-names.js +2 -0
  187. package/dist/external-tools/jre/detect-platform-arch.js +1 -1
  188. package/dist/external-tools/jre/from-download.d.ts +1 -1
  189. package/dist/external-tools/manifest.d.ts +5 -3
  190. package/dist/external-tools/manifest.js +5 -3
  191. package/dist/external-tools/opengrep/asset-names.d.ts +1 -1
  192. package/dist/external-tools/opengrep/resolve.d.ts +3 -0
  193. package/dist/external-tools/opengrep/resolve.js +3 -0
  194. package/dist/external-tools/python/asset-names.d.ts +3 -1
  195. package/dist/external-tools/python/asset-names.js +8 -4
  196. package/dist/external-tools/python/pin.js +3 -1
  197. package/dist/external-tools/python/resolve.d.ts +3 -0
  198. package/dist/external-tools/python/resolve.js +3 -0
  199. package/dist/external-tools/python/uv-install.d.ts +89 -0
  200. package/dist/external-tools/python/uv-install.js +165 -0
  201. package/dist/external-tools/sbt/resolve.d.ts +3 -0
  202. package/dist/external-tools/sbt/resolve.js +3 -0
  203. package/dist/external-tools/skillspector/from-uv.d.ts +30 -0
  204. package/dist/external-tools/skillspector/from-uv.js +56 -0
  205. package/dist/external-tools/skillspector/resolve.d.ts +18 -3
  206. package/dist/external-tools/skillspector/resolve.js +21 -8
  207. package/dist/external-tools/skillspector/types.d.ts +3 -1
  208. package/dist/external-tools/synp/resolve.d.ts +3 -0
  209. package/dist/external-tools/synp/resolve.js +3 -0
  210. package/dist/external-tools/trivy/asset-names.d.ts +1 -1
  211. package/dist/external-tools/trivy/resolve.d.ts +3 -0
  212. package/dist/external-tools/trivy/resolve.js +3 -0
  213. package/dist/external-tools/trufflehog/asset-names.d.ts +4 -1
  214. package/dist/external-tools/trufflehog/asset-names.js +3 -0
  215. package/dist/external-tools/trufflehog/from-download.d.ts +1 -1
  216. package/dist/external-tools/trufflehog/resolve.d.ts +3 -0
  217. package/dist/external-tools/trufflehog/resolve.js +3 -0
  218. package/dist/external-tools/uv/asset-names.d.ts +36 -0
  219. package/dist/external-tools/uv/asset-names.js +73 -0
  220. package/dist/external-tools/uv/from-download.d.ts +17 -0
  221. package/dist/external-tools/uv/from-download.js +50 -0
  222. package/dist/external-tools/uv/from-path.d.ts +5 -0
  223. package/dist/external-tools/uv/from-path.js +22 -0
  224. package/dist/external-tools/uv/from-vfs.d.ts +7 -0
  225. package/dist/external-tools/uv/from-vfs.js +26 -0
  226. package/dist/external-tools/uv/resolve.d.ts +28 -0
  227. package/dist/external-tools/uv/resolve.js +64 -0
  228. package/dist/external-tools/uv/types.d.ts +24 -0
  229. package/dist/external-tools/uv/types.js +2 -0
  230. package/dist/fleet/repo-config.d.ts +55 -0
  231. package/dist/fleet/repo-config.js +81 -0
  232. package/dist/fs/_internal.d.ts +1 -1
  233. package/dist/fs/_internal.js +1 -1
  234. package/dist/fs/access.d.ts +2 -0
  235. package/dist/fs/access.js +2 -0
  236. package/dist/fs/copy.d.ts +88 -0
  237. package/dist/fs/copy.js +89 -0
  238. package/dist/fs/find.js +1 -2
  239. package/dist/fs/inspect.d.ts +2 -2
  240. package/dist/fs/read-file.js +3 -4
  241. package/dist/fs/safe.js +2 -2
  242. package/dist/git/_internal.js +7 -3
  243. package/dist/github/commit.d.ts +92 -0
  244. package/dist/github/commit.js +113 -0
  245. package/dist/github/ghsa.js +1 -1
  246. package/dist/github/refs-graphql.js +1 -1
  247. package/dist/github/refs.js +10 -15
  248. package/dist/github/request.js +1 -1
  249. package/dist/github/token.d.ts +5 -2
  250. package/dist/github/token.js +6 -4
  251. package/dist/github/workflow-runs.d.ts +107 -0
  252. package/dist/github/workflow-runs.js +98 -0
  253. package/dist/globs/_internal.js +1 -1
  254. package/dist/http-request/_internal.d.ts +1 -1
  255. package/dist/http-request/browser.d.ts +6 -0
  256. package/dist/http-request/browser.js +4 -3
  257. package/dist/http-request/checksum-file.js +1 -1
  258. package/dist/http-request/download.js +2 -0
  259. package/dist/http-request/headers.d.ts +1 -1
  260. package/dist/http-request/headers.js +2 -2
  261. package/dist/http-request/request-attempt.js +6 -3
  262. package/dist/http-request/request-types.d.ts +10 -1
  263. package/dist/http-request/request.js +2 -2
  264. package/dist/http-request/user-agent.d.ts +23 -2
  265. package/dist/http-request/user-agent.js +48 -6
  266. package/dist/integrity.d.ts +127 -78
  267. package/dist/integrity.js +170 -84
  268. package/dist/json/format.js +4 -1
  269. package/dist/logger/_internal.d.ts +13 -15
  270. package/dist/logger/_internal.js +21 -21
  271. package/dist/logger/colors.d.ts +10 -5
  272. package/dist/logger/colors.js +7 -14
  273. package/dist/logger/console-methods.js +2 -2
  274. package/dist/logger/console.d.ts +1 -0
  275. package/dist/logger/console.js +9 -9
  276. package/dist/logger/node.js +2 -1
  277. package/dist/logger/symbols-builder.js +7 -8
  278. package/dist/logger/symbols.js +8 -8
  279. package/dist/native-messaging/install.js +1 -1
  280. package/dist/native-messaging/rate-limit.d.ts +4 -1
  281. package/dist/native-messaging/rate-limit.js +4 -1
  282. package/dist/node/events.d.ts +3 -0
  283. package/dist/node/events.js +3 -0
  284. package/dist/node/fs.d.ts +1 -1
  285. package/dist/node/module.d.ts +73 -2
  286. package/dist/node/module.js +97 -12
  287. package/dist/node/timers-promises.d.ts +3 -0
  288. package/dist/node/timers-promises.js +3 -0
  289. package/dist/node/url.d.ts +3 -0
  290. package/dist/node/url.js +3 -0
  291. package/dist/npm/meta-cache.d.ts +183 -0
  292. package/dist/npm/meta-cache.js +318 -0
  293. package/dist/npm/meta-slice.d.ts +27 -0
  294. package/dist/npm/meta-slice.js +68 -0
  295. package/dist/npm/meta-types.d.ts +282 -0
  296. package/dist/npm/meta-types.js +2 -0
  297. package/dist/npm/meta.d.ts +125 -0
  298. package/dist/npm/meta.js +347 -0
  299. package/dist/npm/registry.d.ts +212 -0
  300. package/dist/npm/registry.js +284 -0
  301. package/dist/objects/getters.d.ts +1 -1
  302. package/dist/objects/getters.js +1 -1
  303. package/dist/objects/predicates.js +1 -1
  304. package/dist/packages/exports.js +2 -2
  305. package/dist/packages/isolation.js +1 -1
  306. package/dist/packages/manifest.d.ts +29 -0
  307. package/dist/packages/manifest.js +44 -9
  308. package/dist/packages/metadata-extensions.js +2 -4
  309. package/dist/packages/normalize.js +1 -1
  310. package/dist/packages/provenance.d.ts +8 -0
  311. package/dist/packages/provenance.js +10 -2
  312. package/dist/packages/specs.js +1 -1
  313. package/dist/packages/tarball.js +1 -2
  314. package/dist/packages/validation.d.ts +0 -10
  315. package/dist/packages/validation.js +0 -14
  316. package/dist/paths/_internal.d.ts +1 -7
  317. package/dist/paths/_internal.js +9 -15
  318. package/dist/paths/conversion.js +1 -1
  319. package/dist/paths/exts.d.ts +30 -0
  320. package/dist/paths/exts.js +30 -0
  321. package/dist/paths/filenames.d.ts +6 -0
  322. package/dist/paths/filenames.js +6 -0
  323. package/dist/paths/globs.d.ts +6 -0
  324. package/dist/paths/globs.js +6 -0
  325. package/dist/paths/normalize.js +1 -1
  326. package/dist/paths/predicates.js +2 -1
  327. package/dist/paths/resolve.js +19 -14
  328. package/dist/paths/socket.d.ts +81 -30
  329. package/dist/paths/socket.js +102 -28
  330. package/dist/perf/metrics.js +1 -1
  331. package/dist/perf/report.js +5 -3
  332. package/dist/pkg-ext/data.js +0 -2
  333. package/dist/primordials/globals.d.ts +1 -1
  334. package/dist/primordials/globals.js +1 -1
  335. package/dist/primordials/headers.d.ts +13 -1
  336. package/dist/primordials/headers.js +13 -1
  337. package/dist/primordials/process.d.ts +1 -1
  338. package/dist/primordials/process.js +1 -1
  339. package/dist/primordials/url.d.ts +18 -0
  340. package/dist/primordials/url.js +18 -0
  341. package/dist/process/spawn/child.js +3 -5
  342. package/dist/promises/_internal.d.ts +1 -1
  343. package/dist/promises/_internal.js +1 -2
  344. package/dist/promises/options.js +3 -3
  345. package/dist/regexps/spec.js +1 -1
  346. package/dist/releases/socket-btm-binary-naming.js +12 -1
  347. package/dist/schema/validate.js +1 -1
  348. package/dist/secrets/_internal.d.ts +1 -1
  349. package/dist/secrets/_internal.js +1 -1
  350. package/dist/secrets/broker.d.ts +35 -0
  351. package/dist/secrets/broker.js +72 -0
  352. package/dist/secrets/find.d.ts +8 -6
  353. package/dist/secrets/find.js +17 -3
  354. package/dist/secrets/keychain.d.ts +10 -1
  355. package/dist/secrets/keychain.js +10 -1
  356. package/dist/secrets/rc.js +1 -1
  357. package/dist/secrets/socket-api-token.d.ts +1 -1
  358. package/dist/secrets/socket-api-token.js +1 -1
  359. package/dist/secrets/types.d.ts +1 -1
  360. package/dist/smol/detect.js +1 -1
  361. package/dist/smol/http.d.ts +2 -0
  362. package/dist/smol/http.js +3 -1
  363. package/dist/smol/https.d.ts +2 -0
  364. package/dist/smol/https.js +3 -1
  365. package/dist/smol/manifest.js +1 -1
  366. package/dist/smol/path.js +1 -1
  367. package/dist/smol/primordial.js +1 -1
  368. package/dist/smol/purl.js +1 -1
  369. package/dist/smol/versions.js +1 -1
  370. package/dist/smol/vfs.js +1 -1
  371. package/dist/sorts/_internal.d.ts +2 -4
  372. package/dist/sorts/_internal.js +1 -7
  373. package/dist/sorts/semver.js +2 -2
  374. package/dist/spinner/create-spinner-class.js +1 -1
  375. package/dist/spinner/format.js +2 -4
  376. package/dist/stdio/footer.js +8 -7
  377. package/dist/stdio/progress.js +1 -1
  378. package/dist/stdio/prompts.d.ts +8 -23
  379. package/dist/stdio/prompts.js +28 -52
  380. package/dist/strings/format.js +1 -1
  381. package/dist/strings/predicates.d.ts +2 -2
  382. package/dist/strings/search.js +2 -2
  383. package/dist/strings/types.d.ts +4 -0
  384. package/dist/strings/width.d.ts +1 -0
  385. package/dist/strings/width.js +17 -8
  386. package/dist/themes/context.d.ts +18 -3
  387. package/dist/themes/context.js +28 -14
  388. package/dist/versions/_internal.d.ts +43 -13
  389. package/dist/versions/_internal.js +27 -15
  390. package/dist/versions/compare.d.ts +16 -10
  391. package/dist/versions/compare.js +36 -16
  392. package/dist/versions/parse.js +1 -1
  393. package/dist/versions/range.js +3 -2
  394. package/dist/words/pluralize.js +4 -1
  395. package/llms.txt +63 -0
  396. package/package.json +271 -40
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ /* Socket Lib - Built with rolldown */
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+ const require_runtime = require('../_virtual/_rolldown/runtime.js');
5
+ const require_paths_socket = require('../paths/socket.js');
6
+ let node_fs = require("node:fs");
7
+ let node_net = require("node:net");
8
+ node_net = require_runtime.__toESM(node_net);
9
+
10
+ //#region src/secrets/broker.ts
11
+ /**
12
+ * @file Proteus broker client. Asks the running proteus credential daemon for a
13
+ * secret over its local Unix socket (Windows named pipe later), so a
14
+ * biometric-gated read happens inside the daemon and the value is vended to
15
+ * this process in memory rather than sitting in an env var. This is the layer
16
+ * `ai/credentials.mts` documents as slotting between the env check and the
17
+ * keychain read in `secrets/find.ts` `resolve()`.
18
+ * The broker is OPTIONAL and self-gating: when the daemon isn't running (no
19
+ * socket file), `requestFromBroker` returns `undefined` immediately and the
20
+ * caller falls through to the keychain. It never throws — a broker miss is a
21
+ * fall-through, not an error. The daemon binary itself is built by socket-btm
22
+ * (`packages/proteus-builder`); download-and-start is a later layer, so today
23
+ * this only talks to an already-running daemon.
24
+ */
25
+ const PROTEUS_SOCKET_NAME = "proteus";
26
+ const BROKER_TIMEOUT_MS = 1e3;
27
+ /**
28
+ * Ask the proteus daemon for a credential. Returns the value on success, or
29
+ * `undefined` when the daemon isn't running, doesn't hold it, or the biometric
30
+ * prompt was declined. Never throws: a miss falls through to the next resolver
31
+ * layer (the keychain).
32
+ */
33
+ async function requestFromBroker({ account, service }) {
34
+ const socketPath = require_paths_socket.getRuntimeSocketPath(PROTEUS_SOCKET_NAME);
35
+ if (!(0, node_fs.existsSync)(socketPath)) return;
36
+ return await new Promise((resolvePromise) => {
37
+ const conn = node_net.default.connect(socketPath);
38
+ let buffer = "";
39
+ let settled = false;
40
+ function settle(value) {
41
+ if (settled) return;
42
+ settled = true;
43
+ conn.destroy();
44
+ resolvePromise(value);
45
+ }
46
+ conn.setTimeout(BROKER_TIMEOUT_MS);
47
+ conn.on("timeout", () => settle(void 0));
48
+ conn.on("error", () => settle(void 0));
49
+ conn.on("connect", () => {
50
+ const payload = JSON.stringify({
51
+ account,
52
+ op: "get",
53
+ service
54
+ });
55
+ conn.write(`${payload}\n`);
56
+ });
57
+ conn.on("data", (chunk) => {
58
+ buffer += String(chunk);
59
+ const newlineAt = buffer.indexOf("\n");
60
+ if (newlineAt === -1) return;
61
+ try {
62
+ const parsed = JSON.parse(buffer.slice(0, newlineAt));
63
+ settle(parsed.ok && typeof parsed.value === "string" ? parsed.value : void 0);
64
+ } catch {
65
+ settle(void 0);
66
+ }
67
+ });
68
+ });
69
+ }
70
+
71
+ //#endregion
72
+ exports.requestFromBroker = requestFromBroker;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @file Resolve a secret from the canonical fleet precedence order: process env
2
+ * @file Resolve a secret from the canonical Socket precedence order: process env
3
3
  * → OS keychain. Returns the value + the source it came from so the caller
4
4
  * can log which slot won. Why a helper instead of inlining: every consumer of
5
- * the fleet's Socket API token does the same dance — check
5
+ * the Socket API token does the same dance — check
6
6
  * `process.env.SOCKET_API_TOKEN`, fall back to a legacy env-var alias, fall
7
7
  * back to `readSecret({...})` from the keychain. Tools drift on the exact
8
8
  * order and on which aliases they consider. This helper centralizes the
@@ -51,10 +51,11 @@ export interface ResolveResult {
51
51
  value: string;
52
52
  /**
53
53
  * Where the value came from: 'env' — `process.env[<account>]` had a non-empty
54
- * value. 'keychain' — env-var was empty/missing; the value was read from the
55
- * OS credential store under the matching account.
54
+ * value. 'broker' — the proteus daemon vended it after a biometric unlock.
55
+ * 'keychain' env-var was empty and no broker was running; the value was
56
+ * read from the OS credential store under the matching account.
56
57
  */
57
- source: 'env' | 'keychain';
58
+ source: 'broker' | 'env' | 'keychain';
58
59
  /**
59
60
  * Which account in `accounts` was the actual hit.
60
61
  */
@@ -74,6 +75,7 @@ export declare function readEnv(name: string): string | undefined;
74
75
  export declare function resolve(options: ResolveOptions): Promise<ResolveResult | undefined>;
75
76
  /**
76
77
  * Sync variant for non-async callers (hook initializers, schema validators that
77
- * run before any `await` machinery exists).
78
+ * run before any `await` machinery exists). Has no proteus broker tier — the
79
+ * broker socket round-trip is async — so this path is env → keychain only.
78
80
  */
79
81
  export declare function resolveSync(options: ResolveOptions): ResolveResult | undefined;
@@ -1,14 +1,15 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with rolldown */
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+ const require_secrets_broker = require('./broker.js');
4
5
  const require_secrets_keychain = require('./keychain.js');
5
6
 
6
7
  //#region src/secrets/find.ts
7
8
  /**
8
- * @file Resolve a secret from the canonical fleet precedence order: process env
9
+ * @file Resolve a secret from the canonical Socket precedence order: process env
9
10
  * → OS keychain. Returns the value + the source it came from so the caller
10
11
  * can log which slot won. Why a helper instead of inlining: every consumer of
11
- * the fleet's Socket API token does the same dance — check
12
+ * the Socket API token does the same dance — check
12
13
  * `process.env.SOCKET_API_TOKEN`, fall back to a legacy env-var alias, fall
13
14
  * back to `readSecret({...})` from the keychain. Tools drift on the exact
14
15
  * order and on which aliases they consider. This helper centralizes the
@@ -57,6 +58,18 @@ async function resolve(options) {
57
58
  };
58
59
  }
59
60
  if (allowEnvOnly) return;
61
+ for (let i = 0, { length } = accounts; i < length; i += 1) {
62
+ const account = accounts[i];
63
+ const fromBroker = await require_secrets_broker.requestFromBroker({
64
+ account,
65
+ service
66
+ });
67
+ if (fromBroker) return {
68
+ value: fromBroker,
69
+ source: "broker",
70
+ account
71
+ };
72
+ }
60
73
  for (let i = 0, { length } = accounts; i < length; i += 1) {
61
74
  const account = accounts[i];
62
75
  const fromKeychain = await require_secrets_keychain.readSecret({
@@ -72,7 +85,8 @@ async function resolve(options) {
72
85
  }
73
86
  /**
74
87
  * Sync variant for non-async callers (hook initializers, schema validators that
75
- * run before any `await` machinery exists).
88
+ * run before any `await` machinery exists). Has no proteus broker tier — the
89
+ * broker socket round-trip is async — so this path is env → keychain only.
76
90
  */
77
91
  function resolveSync(options) {
78
92
  const { accounts, allowEnvOnly, service } = {
@@ -42,6 +42,9 @@ export interface DeleteFromSlotsOptions {
42
42
  accounts: readonly string[];
43
43
  }
44
44
  export declare function deleteSecretFromSlots({ service, accounts, }: DeleteFromSlotsOptions): Promise<SecretDeleteResult[]>;
45
+ /**
46
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
47
+ */
45
48
  export declare function deleteSecretFromSlotsSync({ service, accounts, }: DeleteFromSlotsOptions): SecretDeleteResult[];
46
49
  export declare function deleteSecretSync({ service, account, }: DeleteOptions): 'removed' | 'absent';
47
50
  export type { BackendAvailability, SecretDeleteResult, SecretWriteResult, } from './types';
@@ -50,7 +53,7 @@ export type Platform = 'darwin' | 'linux' | 'win32' | 'other';
50
53
  /**
51
54
  * Resolve the current OS to one of our four backend categories.
52
55
  *
53
- * Exported only because the fleet's `export-top-level-functions` lint rule
56
+ * Exported only because Socket's `export-top-level-functions` lint rule
54
57
  * requires top-level functions to be exported for testability. Not part of the
55
58
  * public `secrets/keychain` API surface — consumers should call `readSecret` /
56
59
  * `writeSecret` / `getBackendAvailability` instead, which handle the dispatch
@@ -90,6 +93,9 @@ export declare function readSecretFromSlots({ service, accounts, }: ReadFromSlot
90
93
  value: string;
91
94
  account: string;
92
95
  } | undefined>;
96
+ /**
97
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
98
+ */
93
99
  export declare function readSecretFromSlotsSync({ service, accounts, }: ReadFromSlotsOptions): {
94
100
  value: string;
95
101
  account: string;
@@ -135,4 +141,7 @@ export interface WriteToSlotsOptions {
135
141
  * the next successful write cleans up).
136
142
  */
137
143
  export declare function writeSecretToSlots({ service, accounts, value, label, }: WriteToSlotsOptions): Promise<SecretWriteResult[]>;
144
+ /**
145
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
146
+ */
138
147
  export declare function writeSecretToSlotsSync({ service, accounts, value, label, }: WriteToSlotsOptions): SecretWriteResult[];
@@ -77,6 +77,9 @@ async function deleteSecretFromSlots({ service, accounts }) {
77
77
  }
78
78
  return results;
79
79
  }
80
+ /**
81
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
82
+ */
80
83
  function deleteSecretFromSlotsSync({ service, accounts }) {
81
84
  const results = [];
82
85
  for (const account of accounts) {
@@ -111,7 +114,7 @@ function deleteSecretSync({ service, account }) {
111
114
  /**
112
115
  * Resolve the current OS to one of our four backend categories.
113
116
  *
114
- * Exported only because the fleet's `export-top-level-functions` lint rule
117
+ * Exported only because Socket's `export-top-level-functions` lint rule
115
118
  * requires top-level functions to be exported for testability. Not part of the
116
119
  * public `secrets/keychain` API surface — consumers should call `readSecret` /
117
120
  * `writeSecret` / `getBackendAvailability` instead, which handle the dispatch
@@ -190,6 +193,9 @@ async function readSecretFromSlots({ service, accounts }) {
190
193
  };
191
194
  }
192
195
  }
196
+ /**
197
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
198
+ */
193
199
  function readSecretFromSlotsSync({ service, accounts }) {
194
200
  for (const account of accounts) {
195
201
  const value = readSecretSync({
@@ -302,6 +308,9 @@ async function writeSecretToSlots({ service, accounts, value, label }) {
302
308
  }
303
309
  return results;
304
310
  }
311
+ /**
312
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
313
+ */
305
314
  function writeSecretToSlotsSync({ service, accounts, value, label }) {
306
315
  const results = [];
307
316
  for (const account of accounts) {
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_runtime = require('../_virtual/_rolldown/runtime.js');
5
5
  const require_primordials_object = require('../primordials/object.js');
6
- const require_env_home = require('../env/home.js');
7
6
  const require_primordials_string = require('../primordials/string.js');
7
+ const require_env_home = require('../env/home.js');
8
8
  const require_primordials_regexp = require('../primordials/regexp.js');
9
9
  let node_fs = require("node:fs");
10
10
  let node_process = require("node:process");
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @file Convenience helper for reading the Socket API token from the canonical
3
- * env → keychain precedence order. Centralizes two constants every fleet
3
+ * env → keychain precedence order. Centralizes two constants every Socket
4
4
  * consumer would otherwise hard-code: the keychain service name
5
5
  * (`socketsecurity`) and the env-var + account fallback list
6
6
  * (`SOCKET_API_TOKEN` canonical, `SOCKET_API_KEY` legacy alias). Consumers
@@ -6,7 +6,7 @@ const require_secrets_find = require('./find.js');
6
6
  //#region src/secrets/socket-api-token.ts
7
7
  /**
8
8
  * @file Convenience helper for reading the Socket API token from the canonical
9
- * env → keychain precedence order. Centralizes two constants every fleet
9
+ * env → keychain precedence order. Centralizes two constants every Socket
10
10
  * consumer would otherwise hard-code: the keychain service name
11
11
  * (`socketsecurity`) and the env-var + account fallback list
12
12
  * (`SOCKET_API_TOKEN` canonical, `SOCKET_API_KEY` legacy alias). Consumers
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @file Public type surface for `secrets/*`. Secrets in the fleet are stored
2
+ * @file Public type surface for `secrets/*`. Secrets in Socket tools are stored
3
3
  * under the OS's native credential store keyed by `{ service, account }`:
4
4
  *
5
5
  * - macOS: Keychain generic-password items (service = `-s`, account = `-a`
@@ -43,7 +43,7 @@ function getSmolUtil() {
43
43
  if (!smolUtilProbed) {
44
44
  smolUtilProbed = true;
45
45
  /* c8 ignore start - smol Node binary only. */
46
- if (require_node_module.isNodeBuiltin("node:smol-util")) smolUtilCache = require("node:smol-util");
46
+ if (require_node_module.isNodeBuiltin("node:smol-util")) smolUtilCache = require_node_module.requireBuiltin("node:smol-util");
47
47
  }
48
48
  return smolUtilCache;
49
49
  }
@@ -56,5 +56,7 @@ export interface SmolHttpBinding {
56
56
  /**
57
57
  * Returns `node:smol-http` when running on the smol Node binary, otherwise
58
58
  * `undefined`. Result is cached across calls.
59
+ *
60
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
59
61
  */
60
62
  export declare function getSmolHttp(): SmolHttpBinding | undefined;
package/dist/smol/http.js CHANGED
@@ -23,12 +23,14 @@ let smolHttpProbed = false;
23
23
  /**
24
24
  * Returns `node:smol-http` when running on the smol Node binary, otherwise
25
25
  * `undefined`. Result is cached across calls.
26
+ *
27
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
26
28
  */
27
29
  function getSmolHttp() {
28
30
  if (!smolHttpProbed) {
29
31
  smolHttpProbed = true;
30
32
  /* c8 ignore start - smol Node binary only. */
31
- if (require_node_module.isNodeBuiltin("node:smol-http")) smolHttpBinding = require("node:smol-http");
33
+ if (require_node_module.isNodeBuiltin("node:smol-http")) smolHttpBinding = require_node_module.requireBuiltin("node:smol-http");
32
34
  }
33
35
  return smolHttpBinding;
34
36
  }
@@ -55,5 +55,7 @@ export interface SmolHttpsBinding {
55
55
  /**
56
56
  * Returns `node:smol-https` when running on the smol Node binary, otherwise
57
57
  * `undefined`. Result is cached across calls.
58
+ *
59
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
58
60
  */
59
61
  export declare function getSmolHttps(): SmolHttpsBinding | undefined;
@@ -21,12 +21,14 @@ let smolHttpsProbed = false;
21
21
  /**
22
22
  * Returns `node:smol-https` when running on the smol Node binary, otherwise
23
23
  * `undefined`. Result is cached across calls.
24
+ *
25
+ * @unused No internal or Socket consumers (exercised only by its unit tests).
24
26
  */
25
27
  function getSmolHttps() {
26
28
  if (!smolHttpsProbed) {
27
29
  smolHttpsProbed = true;
28
30
  /* c8 ignore start - smol Node binary only. */
29
- if (require_node_module.isNodeBuiltin("node:smol-https")) smolHttps = require("node:smol-https");
31
+ if (require_node_module.isNodeBuiltin("node:smol-https")) smolHttps = require_node_module.requireBuiltin("node:smol-https");
30
32
  }
31
33
  return smolHttps;
32
34
  }
@@ -28,7 +28,7 @@ function getSmolManifest() {
28
28
  if (!smolManifestProbed) {
29
29
  smolManifestProbed = true;
30
30
  /* c8 ignore start - smol Node binary only. */
31
- if (require_node_module.isNodeBuiltin("node:smol-manifest")) cachedSmolManifest = require("node:smol-manifest");
31
+ if (require_node_module.isNodeBuiltin("node:smol-manifest")) cachedSmolManifest = require_node_module.requireBuiltin("node:smol-manifest");
32
32
  }
33
33
  return cachedSmolManifest;
34
34
  }
package/dist/smol/path.js CHANGED
@@ -28,7 +28,7 @@ function getSmolPath() {
28
28
  if (!smolPathProbed) {
29
29
  smolPathProbed = true;
30
30
  /* c8 ignore start - smol Node binary only. */
31
- if (require_node_module.isNodeBuiltin("node:smol-path")) smolPathCache = require("node:smol-path");
31
+ if (require_node_module.isNodeBuiltin("node:smol-path")) smolPathCache = require_node_module.requireBuiltin("node:smol-path");
32
32
  }
33
33
  return smolPathCache;
34
34
  }
@@ -30,7 +30,7 @@ function getSmolPrimordial() {
30
30
  if (!smolPrimordialProbed) {
31
31
  smolPrimordialProbed = true;
32
32
  /* c8 ignore start - smol Node binary only. */
33
- if (require_node_module.isNodeBuiltin("node:smol-primordial")) smolPrimordial = require("node:smol-primordial");
33
+ if (require_node_module.isNodeBuiltin("node:smol-primordial")) smolPrimordial = require_node_module.requireBuiltin("node:smol-primordial");
34
34
  }
35
35
  return smolPrimordial;
36
36
  }
package/dist/smol/purl.js CHANGED
@@ -29,7 +29,7 @@ function getSmolPurl() {
29
29
  if (!smolPurlProbed) {
30
30
  smolPurlProbed = true;
31
31
  /* c8 ignore start - smol Node binary only. */
32
- if (require_node_module.isNodeBuiltin("node:smol-purl")) smolPurl = require("node:smol-purl");
32
+ if (require_node_module.isNodeBuiltin("node:smol-purl")) smolPurl = require_node_module.requireBuiltin("node:smol-purl");
33
33
  }
34
34
  return smolPurl;
35
35
  }
@@ -26,7 +26,7 @@ function getSmolVersions() {
26
26
  if (!smolVersionsProbed) {
27
27
  smolVersionsProbed = true;
28
28
  /* c8 ignore start - smol Node binary only. */
29
- if (require_node_module.isNodeBuiltin("node:smol-versions")) smolVersions = require("node:smol-versions");
29
+ if (require_node_module.isNodeBuiltin("node:smol-versions")) smolVersions = require_node_module.requireBuiltin("node:smol-versions");
30
30
  }
31
31
  return smolVersions;
32
32
  }
package/dist/smol/vfs.js CHANGED
@@ -41,7 +41,7 @@ function getSmolVfs() {
41
41
  if (!smolVfsProbed) {
42
42
  smolVfsProbed = true;
43
43
  /* c8 ignore start - smol Node binary only. */
44
- if (require_node_module.isNodeBuiltin("node:smol-vfs")) cachedSmolVfs = require("node:smol-vfs").getSmolVfs();
44
+ if (require_node_module.isNodeBuiltin("node:smol-vfs")) cachedSmolVfs = require_node_module.requireBuiltin("node:smol-vfs").getSmolVfs();
45
45
  }
46
46
  return cachedSmolVfs;
47
47
  }
@@ -3,7 +3,5 @@
3
3
  * fast-sort + semver, and the cached Intl.Collator instances. Used by the
4
4
  * locale / natural / semver comparison entrypoints.
5
5
  */
6
- import type * as fastSortType from '../external/fast-sort';
7
- import type * as semverType from '../external/semver';
8
- export declare function getFastSort(): typeof fastSortType;
9
- export declare function getSemver(): typeof semverType;
6
+ import type { default as FastSort } from '../external/fast-sort';
7
+ export declare function getFastSort(): typeof FastSort;
@@ -4,16 +4,10 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
5
  //#region src/sorts/_internal.ts
6
6
  let fastSort;
7
- let semver;
8
7
  function getFastSort() {
9
8
  if (fastSort === void 0) fastSort = /*@__PURE__*/ require("../external/fast-sort.js");
10
9
  return fastSort;
11
10
  }
12
- function getSemver() {
13
- if (semver === void 0) semver = /*@__PURE__*/ require("../external/semver.js");
14
- return semver;
15
- }
16
11
 
17
12
  //#endregion
18
- exports.getFastSort = getFastSort;
19
- exports.getSemver = getSemver;
13
+ exports.getFastSort = getFastSort;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with rolldown */
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_sorts__internal = require('./_internal.js');
4
+ const require_versions__internal = require('../versions/_internal.js');
5
5
 
6
6
  //#region src/sorts/semver.ts
7
7
  /**
@@ -20,7 +20,7 @@ const require_sorts__internal = require('./_internal.js');
20
20
  */
21
21
  function compareSemver(a, b) {
22
22
  /* c8 ignore start */
23
- const semver = require_sorts__internal.getSemver();
23
+ const semver = require_versions__internal.getSemver();
24
24
  const validA = semver.valid(a);
25
25
  /* c8 ignore stop */
26
26
  const validB = semver.valid(b);
@@ -1,8 +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_primordials_math = require('../primordials/math.js');
5
4
  const require_primordials_object = require('../primordials/object.js');
5
+ const require_primordials_math = require('../primordials/math.js');
6
6
  const require_primordials_array = require('../primordials/array.js');
7
7
  const require_process_abort = require('../process/abort.js');
8
8
  const require_logger_symbols = require('../logger/symbols.js');
@@ -1,10 +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_runtime = require('../_virtual/_rolldown/runtime.js');
5
4
  const require_primordials_math = require('../primordials/math.js');
6
- let src_external_yoctocolors_cjs = require("../external/yoctocolors-cjs");
7
- src_external_yoctocolors_cjs = require_runtime.__toESM(src_external_yoctocolors_cjs);
5
+ const require_logger_colors = require('../logger/colors.js');
8
6
 
9
7
  //#region src/spinner/format.ts
10
8
  /**
@@ -86,7 +84,7 @@ function renderProgressBar(percentage, width = 20) {
86
84
  const filled = require_primordials_math.MathMax(0, Math.min(width, Math.round(percentage / 100 * width)));
87
85
  const empty = require_primordials_math.MathMax(0, width - filled);
88
86
  const bar = "█".repeat(filled) + "░".repeat(empty);
89
- return src_external_yoctocolors_cjs.default.cyan(bar);
87
+ return require_logger_colors.getYoctocolors().cyan(bar);
90
88
  }
91
89
 
92
90
  //#endregion
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
2
  /* Socket Lib - Built with rolldown */
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
- const require_runtime = require('../_virtual/_rolldown/runtime.js');
5
4
  const require_primordials_array = require('../primordials/array.js');
6
5
  const require_primordials_date = require('../primordials/date.js');
7
6
  const require_logger_symbols = require('../logger/symbols.js');
8
7
  const require_strings_format = require('../strings/format.js');
9
8
  const require_logger_default = require('../logger/default.js');
10
- let src_external_yoctocolors_cjs = require("../external/yoctocolors-cjs");
11
- src_external_yoctocolors_cjs = require_runtime.__toESM(src_external_yoctocolors_cjs);
12
9
 
13
10
  //#region src/stdio/footer.ts
14
11
  /**
@@ -44,16 +41,17 @@ function createFooter(message, options) {
44
41
  __proto__: null,
45
42
  ...options
46
43
  };
44
+ const colors = require("../external/yoctocolors-cjs");
47
45
  const border = require_strings_format.repeatString(borderChar, width);
48
46
  const lines = [];
49
- if (message) require_primordials_array.ArrayPrototypePush(lines, (color && src_external_yoctocolors_cjs.default[color] ? src_external_yoctocolors_cjs.default[color] : (s) => s)(message));
47
+ if (message) require_primordials_array.ArrayPrototypePush(lines, (color && colors[color] ? colors[color] : (s) => s)(message));
50
48
  if (showTimestamp) {
51
49
  const timestamp = new require_primordials_date.DateCtor().toISOString();
52
- require_primordials_array.ArrayPrototypePush(lines, src_external_yoctocolors_cjs.default.gray(`Completed at: ${timestamp}`));
50
+ require_primordials_array.ArrayPrototypePush(lines, colors.gray(`Completed at: ${timestamp}`));
53
51
  }
54
52
  if (showDuration && startTime) {
55
53
  const seconds = ((require_primordials_date.DateNow() - startTime) / 1e3).toFixed(2);
56
- require_primordials_array.ArrayPrototypePush(lines, src_external_yoctocolors_cjs.default.gray(`Duration: ${seconds}s`));
54
+ require_primordials_array.ArrayPrototypePush(lines, colors.gray(`Duration: ${seconds}s`));
57
55
  }
58
56
  require_primordials_array.ArrayPrototypePush(lines, border);
59
57
  return lines.join("\n");
@@ -114,7 +112,10 @@ function createSummaryFooter(stats, options) {
114
112
  function printFooter(message) {
115
113
  const border = require_strings_format.repeatString("─", 55);
116
114
  logger.log(border);
117
- if (message) logger.log(src_external_yoctocolors_cjs.default.green(message));
115
+ if (message) {
116
+ const colors = require("../external/yoctocolors-cjs");
117
+ logger.log(colors.green(message));
118
+ }
118
119
  }
119
120
 
120
121
  //#endregion
@@ -2,9 +2,9 @@
2
2
  /* Socket Lib - Built with rolldown */
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
  const require_runtime = require('../_virtual/_rolldown/runtime.js');
5
- const require_primordials_math = require('../primordials/math.js');
6
5
  const require_primordials_object = require('../primordials/object.js');
7
6
  const require_primordials_string = require('../primordials/string.js');
7
+ const require_primordials_math = require('../primordials/math.js');
8
8
  const require_primordials_date = require('../primordials/date.js');
9
9
  const require_ansi_strip = require('../ansi/strip.js');
10
10
  const require_strings_format = require('../strings/format.js');
@@ -2,18 +2,10 @@
2
2
  * @file User prompt utilities for interactive scripts. Provides inquirer.js
3
3
  * integration with spinner support, context handling, and theming.
4
4
  */
5
- import checkboxRaw from '../external/@inquirer/checkbox';
6
- import confirmRaw from '../external/@inquirer/confirm';
7
- import inputRaw from '../external/@inquirer/input';
8
- import passwordRaw from '../external/@inquirer/password';
9
- import type { ColorValue } from '../colors/types';
10
5
  import type { Remap } from '../objects/types';
11
6
  import type { SpinnerInstance } from '../spinner/types';
12
7
  import type { ThemeName } from '../themes/themes';
13
8
  import type { Theme } from '../themes/types';
14
- declare const searchRaw: any;
15
- declare const selectRaw: any;
16
- declare const ActualSeparator: any;
17
9
  /**
18
10
  * Choice option for select and search prompts.
19
11
  *
@@ -94,13 +86,6 @@ export declare class SeparatorType {
94
86
  constructor(separator?: string);
95
87
  }
96
88
  export type Separator = SeparatorType;
97
- /**
98
- * Apply a color to text using yoctocolors. Handles both named colors and RGB
99
- * tuples.
100
- *
101
- * @private
102
- */
103
- export declare function applyColor(text: string, color: ColorValue): string;
104
89
  /**
105
90
  * Convert Socket theme to @inquirer theme format. Maps our theme colors to
106
91
  * inquirer's style functions. Handles theme names, Theme objects, and passes
@@ -143,7 +128,7 @@ export declare function createInquirerTheme(theme: Theme | ThemeName | unknown):
143
128
  *
144
129
  * @returns Separator instance
145
130
  */
146
- export declare function createSeparator(text?: string): InstanceType<typeof ActualSeparator>;
131
+ export declare function createSeparator(text?: string): Separator;
147
132
  /**
148
133
  * Check if value is a Socket Theme object.
149
134
  *
@@ -191,7 +176,7 @@ export declare function wrapPrompt<T = unknown>(inquirerPrompt: (...args: unknow
191
176
  * ],
192
177
  * })
193
178
  */
194
- export declare const checkbox: typeof checkboxRaw;
179
+ export declare const checkbox: (...args: unknown[]) => Promise<unknown>;
195
180
  /**
196
181
  * Prompt for a yes/no confirmation. Wrapped with spinner handling and abort
197
182
  * signal support.
@@ -200,7 +185,7 @@ export declare const checkbox: typeof checkboxRaw;
200
185
  * const answer = await confirm({ message: 'Continue?' })
201
186
  * if (answer) { // user confirmed }
202
187
  */
203
- export declare const confirm: typeof confirmRaw;
188
+ export declare const confirm: (...args: unknown[]) => Promise<unknown>;
204
189
  /**
205
190
  * Prompt for text input. Wrapped with spinner handling and abort signal
206
191
  * support. Result is automatically trimmed.
@@ -208,7 +193,7 @@ export declare const confirm: typeof confirmRaw;
208
193
  * @example
209
194
  * const name = await input({ message: 'Enter your name:' })
210
195
  */
211
- export declare const input: typeof inputRaw;
196
+ export declare const input: (...args: unknown[]) => Promise<unknown>;
212
197
  /**
213
198
  * Prompt for password input (hidden characters). Wrapped with spinner handling
214
199
  * and abort signal support.
@@ -216,7 +201,7 @@ export declare const input: typeof inputRaw;
216
201
  * @example
217
202
  * const token = await password({ message: 'Enter API token:' })
218
203
  */
219
- export declare const password: typeof passwordRaw;
204
+ export declare const password: (...args: unknown[]) => Promise<unknown>;
220
205
  /**
221
206
  * Prompt with searchable/filterable choices. Wrapped with spinner handling and
222
207
  * abort signal support.
@@ -227,7 +212,7 @@ export declare const password: typeof passwordRaw;
227
212
  * source: async input => fetchPackages(input),
228
213
  * })
229
214
  */
230
- export declare const search: typeof searchRaw;
215
+ export declare const search: (...args: unknown[]) => Promise<unknown>;
231
216
  /**
232
217
  * Prompt to select from a list of choices. Wrapped with spinner handling and
233
218
  * abort signal support.
@@ -241,5 +226,5 @@ export declare const search: typeof searchRaw;
241
226
  * ],
242
227
  * })
243
228
  */
244
- export declare const select: typeof selectRaw;
245
- export { ActualSeparator as Separator };
229
+ export declare const select: (...args: unknown[]) => Promise<unknown>;
230
+ export declare const Separator: typeof SeparatorType;