xcoder-dna 0.0.0-stage → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (390) hide show
  1. package/LICENSE +66 -0
  2. package/README.md +87 -2
  3. package/dist/agents/ai-chat-debate.d.ts +36 -0
  4. package/dist/agents/ai-chat-debate.js +300 -0
  5. package/dist/agents/ai-chat-report-writer.d.ts +7 -0
  6. package/dist/agents/ai-chat-report-writer.js +100 -0
  7. package/dist/agents/duplicate-detector.d.ts +41 -0
  8. package/dist/agents/duplicate-detector.js +65 -0
  9. package/dist/agents/genesis-agent.d.ts +61 -0
  10. package/dist/agents/genesis-agent.js +340 -0
  11. package/dist/agents/samurai-agent.d.ts +53 -0
  12. package/dist/agents/samurai-agent.js +279 -0
  13. package/dist/agents/sub-agent.d.ts +56 -0
  14. package/dist/agents/sub-agent.js +353 -0
  15. package/dist/backlog/backlog-requirement-validator.d.ts +10 -0
  16. package/dist/backlog/backlog-requirement-validator.js +60 -0
  17. package/dist/backlog/backlog-store.d.ts +29 -0
  18. package/dist/backlog/backlog-store.js +148 -0
  19. package/dist/backlog/po-agent.d.ts +16 -0
  20. package/dist/backlog/po-agent.js +121 -0
  21. package/dist/backlog/types.d.ts +25 -0
  22. package/dist/backlog/types.js +4 -0
  23. package/dist/bench/run.d.ts +11 -0
  24. package/dist/bench/run.js +185 -0
  25. package/dist/bench/types.d.ts +50 -0
  26. package/dist/bench/types.js +1 -0
  27. package/dist/cli/swarm.d.ts +10 -0
  28. package/dist/cli/swarm.js +100 -0
  29. package/dist/cli/task.d.ts +14 -0
  30. package/dist/cli/task.js +121 -0
  31. package/dist/cli/wbc-arg.d.ts +6 -0
  32. package/dist/cli/wbc-arg.js +40 -0
  33. package/dist/cli/wbc.d.ts +45 -0
  34. package/dist/cli/wbc.js +98 -0
  35. package/dist/commands/license.d.ts +9 -0
  36. package/dist/commands/license.js +140 -0
  37. package/dist/commands/release.d.ts +44 -0
  38. package/dist/commands/release.js +180 -0
  39. package/dist/commands/test.d.ts +50 -0
  40. package/dist/commands/test.js +385 -0
  41. package/dist/config/loadConfig.d.ts +82 -0
  42. package/dist/config/loadConfig.js +240 -0
  43. package/dist/config/secure-mode.d.ts +29 -0
  44. package/dist/config/secure-mode.js +63 -0
  45. package/dist/config/user-config.d.ts +39 -0
  46. package/dist/config/user-config.js +202 -0
  47. package/dist/engine/reasoning-engine.d.ts +21 -0
  48. package/dist/engine/reasoning-engine.js +59 -0
  49. package/dist/events/bus.d.ts +22 -0
  50. package/dist/events/bus.js +18 -0
  51. package/dist/index.d.ts +79 -0
  52. package/dist/index.js +77 -0
  53. package/dist/indexing/ignoreRules.d.ts +1 -0
  54. package/dist/indexing/ignoreRules.js +53 -0
  55. package/dist/instance-swarm/instance-swarm-orchestrator.d.ts +57 -0
  56. package/dist/instance-swarm/instance-swarm-orchestrator.js +204 -0
  57. package/dist/instance-swarm/protocol-name-resolver.d.ts +23 -0
  58. package/dist/instance-swarm/protocol-name-resolver.js +64 -0
  59. package/dist/license/gate.d.ts +31 -0
  60. package/dist/license/gate.js +188 -0
  61. package/dist/license/http-client.d.ts +43 -0
  62. package/dist/license/http-client.js +195 -0
  63. package/dist/license/manager.d.ts +39 -0
  64. package/dist/license/manager.js +175 -0
  65. package/dist/license/receipt.d.ts +27 -0
  66. package/dist/license/receipt.js +108 -0
  67. package/dist/license/state-codec.d.ts +72 -0
  68. package/dist/license/state-codec.js +218 -0
  69. package/dist/license/state-paths.d.ts +17 -0
  70. package/dist/license/state-paths.js +64 -0
  71. package/dist/license/store.d.ts +44 -0
  72. package/dist/license/store.js +223 -0
  73. package/dist/license/trust-anchor.d.ts +24 -0
  74. package/dist/license/trust-anchor.js +74 -0
  75. package/dist/license/types.d.ts +34 -0
  76. package/dist/license/types.js +19 -0
  77. package/dist/llm/budget.d.ts +23 -0
  78. package/dist/llm/budget.js +58 -0
  79. package/dist/llm/client.d.ts +53 -0
  80. package/dist/llm/client.js +122 -0
  81. package/dist/llm/factory.d.ts +14 -0
  82. package/dist/llm/factory.js +32 -0
  83. package/dist/orchestrator/defect-logger.d.ts +31 -0
  84. package/dist/orchestrator/defect-logger.js +101 -0
  85. package/dist/orchestrator/defect-manager.d.ts +118 -0
  86. package/dist/orchestrator/defect-manager.js +338 -0
  87. package/dist/orchestrator/defect-migration.d.ts +14 -0
  88. package/dist/orchestrator/defect-migration.js +174 -0
  89. package/dist/orchestrator/defect-store.d.ts +48 -0
  90. package/dist/orchestrator/defect-store.js +76 -0
  91. package/dist/orchestrator/healing.d.ts +14 -0
  92. package/dist/orchestrator/healing.js +11 -0
  93. package/dist/orchestrator/interactive-steering.d.ts +64 -0
  94. package/dist/orchestrator/interactive-steering.js +107 -0
  95. package/dist/orchestrator/interrupt-handler.d.ts +30 -0
  96. package/dist/orchestrator/interrupt-handler.js +70 -0
  97. package/dist/orchestrator/lesson-manager.d.ts +25 -0
  98. package/dist/orchestrator/lesson-manager.js +122 -0
  99. package/dist/orchestrator/progress-summary.d.ts +15 -0
  100. package/dist/orchestrator/progress-summary.js +106 -0
  101. package/dist/orchestrator/reasoning-score.d.ts +49 -0
  102. package/dist/orchestrator/reasoning-score.js +117 -0
  103. package/dist/orchestrator/swarm.d.ts +36 -0
  104. package/dist/orchestrator/swarm.js +77 -0
  105. package/dist/orchestrator/task-factory.d.ts +15 -0
  106. package/dist/orchestrator/task-factory.js +176 -0
  107. package/dist/orchestrator/validation-gate.d.ts +23 -0
  108. package/dist/orchestrator/validation-gate.js +155 -0
  109. package/dist/protocol/react-contract.d.ts +136 -0
  110. package/dist/protocol/react-contract.js +698 -0
  111. package/dist/protocol/wks-protocol-manager.d.ts +22 -0
  112. package/dist/protocol/wks-protocol-manager.js +72 -0
  113. package/dist/sdlc-runtime/conversation-runner.d.ts +8 -0
  114. package/dist/sdlc-runtime/conversation-runner.js +64 -0
  115. package/dist/sdlc-runtime/dag-utils.d.ts +15 -0
  116. package/dist/sdlc-runtime/dag-utils.js +67 -0
  117. package/dist/sdlc-runtime/defect-integration.d.ts +7 -0
  118. package/dist/sdlc-runtime/defect-integration.js +99 -0
  119. package/dist/sdlc-runtime/execution-loop.d.ts +38 -0
  120. package/dist/sdlc-runtime/execution-loop.js +274 -0
  121. package/dist/sdlc-runtime/lesson-recorder.d.ts +9 -0
  122. package/dist/sdlc-runtime/lesson-recorder.js +27 -0
  123. package/dist/sdlc-runtime/plan-initializer.d.ts +47 -0
  124. package/dist/sdlc-runtime/plan-initializer.js +135 -0
  125. package/dist/sdlc-runtime/progress-persister.d.ts +10 -0
  126. package/dist/sdlc-runtime/progress-persister.js +34 -0
  127. package/dist/sdlc-runtime/protocol-loader.d.ts +10 -0
  128. package/dist/sdlc-runtime/protocol-loader.js +21 -0
  129. package/dist/sdlc-runtime/reporting.d.ts +24 -0
  130. package/dist/sdlc-runtime/reporting.js +68 -0
  131. package/dist/sdlc-runtime/sdlc-orchestrator.d.ts +59 -0
  132. package/dist/sdlc-runtime/sdlc-orchestrator.js +170 -0
  133. package/dist/sdlc-runtime/sdlc-skill.d.ts +44 -0
  134. package/dist/sdlc-runtime/sdlc-skill.js +148 -0
  135. package/dist/sdlc-runtime/steering-handler.d.ts +14 -0
  136. package/dist/sdlc-runtime/steering-handler.js +51 -0
  137. package/dist/sdlc-runtime/trace-recorder.d.ts +10 -0
  138. package/dist/sdlc-runtime/trace-recorder.js +7 -0
  139. package/dist/security/index.d.ts +16 -0
  140. package/dist/security/index.js +12 -0
  141. package/dist/security/input-screen.d.ts +30 -0
  142. package/dist/security/input-screen.js +75 -0
  143. package/dist/security/tool-call-guard.d.ts +16 -0
  144. package/dist/security/tool-call-guard.js +163 -0
  145. package/dist/security/untrusted-content.d.ts +34 -0
  146. package/dist/security/untrusted-content.js +63 -0
  147. package/dist/skills/advanced-dfir/SKILL.md +85 -0
  148. package/dist/skills/advanced-pentest-lab/SKILL.md +88 -0
  149. package/dist/skills/analyst/SKILL.md +55 -0
  150. package/dist/skills/architect/SKILL.md +54 -0
  151. package/dist/skills/aws/SKILL.md +92 -0
  152. package/dist/skills/azure/SKILL.md +90 -0
  153. package/dist/skills/bylaw-context.d.ts +45 -0
  154. package/dist/skills/bylaw-context.js +61 -0
  155. package/dist/skills/bylaw-review.d.ts +20 -0
  156. package/dist/skills/bylaw-review.js +101 -0
  157. package/dist/skills/conversation/SKILL.md +29 -0
  158. package/dist/skills/design-patterns/SKILL.md +190 -0
  159. package/dist/skills/devops/SKILL.md +55 -0
  160. package/dist/skills/directives.d.ts +20 -0
  161. package/dist/skills/directives.js +313 -0
  162. package/dist/skills/docker/SKILL.md +76 -0
  163. package/dist/skills/docker-expert/SKILL.md +56 -0
  164. package/dist/skills/enterprise-systems-analyst/SKILL.md +83 -0
  165. package/dist/skills/enterprise-systems-analyst/references/crm.md +41 -0
  166. package/dist/skills/enterprise-systems-analyst/references/erp.md +40 -0
  167. package/dist/skills/enterprise-systems-analyst/references/financial-systems.md +35 -0
  168. package/dist/skills/enterprise-systems-analyst/references/hcm.md +38 -0
  169. package/dist/skills/enterprise-systems-analyst/references/mrp.md +37 -0
  170. package/dist/skills/enterprise-systems-analyst/references/scm.md +32 -0
  171. package/dist/skills/ethical-hacking-methodology/SKILL.md +119 -0
  172. package/dist/skills/externalSkillLoader.d.ts +25 -0
  173. package/dist/skills/externalSkillLoader.js +65 -0
  174. package/dist/skills/externalSkillRegistry.d.ts +33 -0
  175. package/dist/skills/externalSkillRegistry.js +94 -0
  176. package/dist/skills/filesystem-management/SKILL.md +61 -0
  177. package/dist/skills/first-run-seed.d.ts +26 -0
  178. package/dist/skills/first-run-seed.js +75 -0
  179. package/dist/skills/git-vcs/SKILL.md +84 -0
  180. package/dist/skills/kafka/SKILL.md +89 -0
  181. package/dist/skills/kubernetes/SKILL.md +93 -0
  182. package/dist/skills/kubernetes-expert/SKILL.md +54 -0
  183. package/dist/skills/openshift/SKILL.md +93 -0
  184. package/dist/skills/pentester/SKILL.md +59 -0
  185. package/dist/skills/performance-tester/SKILL.md +57 -0
  186. package/dist/skills/playwright-ui-tester/SKILL.md +67 -0
  187. package/dist/skills/programmer/SKILL.md +58 -0
  188. package/dist/skills/project-scaffolding/SKILL.md +133 -0
  189. package/dist/skills/qa-engineer/SKILL.md +91 -0
  190. package/dist/skills/rca/SKILL.md +58 -0
  191. package/dist/skills/redhat/SKILL.md +92 -0
  192. package/dist/skills/rosa/SKILL.md +80 -0
  193. package/dist/skills/scrum-framework/SKILL.md +74 -0
  194. package/dist/skills/scrum-framework/references/artifacts_and_quality.md +79 -0
  195. package/dist/skills/scrum-framework/references/roles_and_events.md +105 -0
  196. package/dist/skills/scrum-master-agent/SKILL.md +74 -0
  197. package/dist/skills/scrum-master-agent/references/behaviors.md +56 -0
  198. package/dist/skills/sdlc-skill.d.ts +1 -0
  199. package/dist/skills/sdlc-skill.js +4 -0
  200. package/dist/skills/secops/SKILL.md +52 -0
  201. package/dist/skills/secure-architect.bylaws.d.ts +68 -0
  202. package/dist/skills/secure-architect.bylaws.js +525 -0
  203. package/dist/skills/seed-skills.d.ts +48 -0
  204. package/dist/skills/seed-skills.js +213 -0
  205. package/dist/skills/skill-authoring/SKILL.md +123 -0
  206. package/dist/skills/skill-header.d.ts +51 -0
  207. package/dist/skills/skill-header.js +163 -0
  208. package/dist/skills/skill-path-guard.d.ts +41 -0
  209. package/dist/skills/skill-path-guard.js +95 -0
  210. package/dist/skills/skillRouter.d.ts +51 -0
  211. package/dist/skills/skillRouter.js +90 -0
  212. package/dist/skills/skills-root.d.ts +64 -0
  213. package/dist/skills/skills-root.js +168 -0
  214. package/dist/skills/software-architect/SKILL.md +77 -0
  215. package/dist/skills/software-engineer/SKILL.md +74 -0
  216. package/dist/skills/solid-principles/SKILL.md +94 -0
  217. package/dist/skills/task-planning/SKILL.md +115 -0
  218. package/dist/skills/tester/SKILL.md +54 -0
  219. package/dist/skills/ubuntu/SKILL.md +87 -0
  220. package/dist/skills/ui-ux-design/SKILL.md +114 -0
  221. package/dist/skills/workspace-context/SKILL.md +103 -0
  222. package/dist/sprint/controller.d.ts +37 -0
  223. package/dist/sprint/controller.js +220 -0
  224. package/dist/sprint/dag-builder.d.ts +14 -0
  225. package/dist/sprint/dag-builder.js +105 -0
  226. package/dist/sprint/reporter.d.ts +11 -0
  227. package/dist/sprint/reporter.js +97 -0
  228. package/dist/sprint/state-store.d.ts +10 -0
  229. package/dist/sprint/state-store.js +71 -0
  230. package/dist/sprint/types.d.ts +24 -0
  231. package/dist/sprint/types.js +4 -0
  232. package/dist/store/file-version-store.d.ts +24 -0
  233. package/dist/store/file-version-store.js +73 -0
  234. package/dist/store/task-store.d.ts +90 -0
  235. package/dist/store/task-store.js +166 -0
  236. package/dist/task-ingest/architect-detailer.d.ts +43 -0
  237. package/dist/task-ingest/architect-detailer.js +141 -0
  238. package/dist/task-ingest/detail-schema.d.ts +9 -0
  239. package/dist/task-ingest/detail-schema.js +195 -0
  240. package/dist/task-ingest/detailed-run.d.ts +36 -0
  241. package/dist/task-ingest/detailed-run.js +108 -0
  242. package/dist/task-ingest/extract-id.d.ts +9 -0
  243. package/dist/task-ingest/extract-id.js +24 -0
  244. package/dist/task-ingest/index.d.ts +23 -0
  245. package/dist/task-ingest/index.js +14 -0
  246. package/dist/task-ingest/ingest.d.ts +45 -0
  247. package/dist/task-ingest/ingest.js +163 -0
  248. package/dist/task-ingest/list-ingested.d.ts +13 -0
  249. package/dist/task-ingest/list-ingested.js +30 -0
  250. package/dist/task-ingest/pending-filter.d.ts +30 -0
  251. package/dist/task-ingest/pending-filter.js +59 -0
  252. package/dist/task-ingest/scanner.d.ts +56 -0
  253. package/dist/task-ingest/scanner.js +216 -0
  254. package/dist/task-ingest/source-reader.d.ts +25 -0
  255. package/dist/task-ingest/source-reader.js +93 -0
  256. package/dist/task-ingest/spec-builder.d.ts +34 -0
  257. package/dist/task-ingest/spec-builder.js +89 -0
  258. package/dist/task-ingest/wbs-extract.d.ts +50 -0
  259. package/dist/task-ingest/wbs-extract.js +226 -0
  260. package/dist/task-ingest/wbs-parser.d.ts +36 -0
  261. package/dist/task-ingest/wbs-parser.js +170 -0
  262. package/dist/tools/apiTestTool.d.ts +37 -0
  263. package/dist/tools/apiTestTool.js +128 -0
  264. package/dist/tools/ast-tools.d.ts +183 -0
  265. package/dist/tools/ast-tools.js +853 -0
  266. package/dist/tools/browse-tool.d.ts +105 -0
  267. package/dist/tools/browse-tool.js +394 -0
  268. package/dist/tools/credential.d.ts +17 -0
  269. package/dist/tools/credential.js +32 -0
  270. package/dist/tools/dependency-graph.d.ts +23 -0
  271. package/dist/tools/dependency-graph.js +164 -0
  272. package/dist/tools/edit-tool.d.ts +34 -0
  273. package/dist/tools/edit-tool.js +95 -0
  274. package/dist/tools/file-header-manager.d.ts +27 -0
  275. package/dist/tools/file-header-manager.js +153 -0
  276. package/dist/tools/fs-tools.d.ts +154 -0
  277. package/dist/tools/fs-tools.js +337 -0
  278. package/dist/tools/git-tools.d.ts +79 -0
  279. package/dist/tools/git-tools.js +348 -0
  280. package/dist/tools/github-tool.d.ts +48 -0
  281. package/dist/tools/github-tool.js +147 -0
  282. package/dist/tools/globTool.d.ts +20 -0
  283. package/dist/tools/globTool.js +34 -0
  284. package/dist/tools/grepTool.d.ts +19 -0
  285. package/dist/tools/grepTool.js +44 -0
  286. package/dist/tools/index-freshness.d.ts +58 -0
  287. package/dist/tools/index-freshness.js +190 -0
  288. package/dist/tools/index-glob.d.ts +48 -0
  289. package/dist/tools/index-glob.js +175 -0
  290. package/dist/tools/load-skill-tool.d.ts +15 -0
  291. package/dist/tools/load-skill-tool.js +114 -0
  292. package/dist/tools/patch-tools.d.ts +58 -0
  293. package/dist/tools/patch-tools.js +153 -0
  294. package/dist/tools/playwright-tool.d.ts +66 -0
  295. package/dist/tools/playwright-tool.js +121 -0
  296. package/dist/tools/project-detect.d.ts +20 -0
  297. package/dist/tools/project-detect.js +87 -0
  298. package/dist/tools/prompt-guidance.d.ts +22 -0
  299. package/dist/tools/prompt-guidance.js +23 -0
  300. package/dist/tools/scheduleTool.d.ts +19 -0
  301. package/dist/tools/scheduleTool.js +181 -0
  302. package/dist/tools/search-tools.d.ts +27 -0
  303. package/dist/tools/search-tools.js +78 -0
  304. package/dist/tools/sed-tool.d.ts +66 -0
  305. package/dist/tools/sed-tool.js +402 -0
  306. package/dist/tools/shell-result.d.ts +11 -0
  307. package/dist/tools/shell-result.js +1 -0
  308. package/dist/tools/shell-tool.d.ts +45 -0
  309. package/dist/tools/shell-tool.js +141 -0
  310. package/dist/tools/siteCrawlerTool.d.ts +32 -0
  311. package/dist/tools/siteCrawlerTool.js +205 -0
  312. package/dist/tools/tool-registry.d.ts +67 -0
  313. package/dist/tools/tool-registry.js +596 -0
  314. package/dist/tools/validate-tool.d.ts +23 -0
  315. package/dist/tools/validate-tool.js +201 -0
  316. package/dist/tools/workspace-index.d.ts +46 -0
  317. package/dist/tools/workspace-index.js +173 -0
  318. package/dist/types.d.ts +222 -0
  319. package/dist/types.js +7 -0
  320. package/dist/updater/index.d.ts +14 -0
  321. package/dist/updater/index.js +120 -0
  322. package/dist/util/banner.d.ts +25 -0
  323. package/dist/util/banner.js +140 -0
  324. package/dist/util/command-suggester.d.ts +6 -0
  325. package/dist/util/command-suggester.js +25 -0
  326. package/dist/util/confirm-interrupt.d.ts +10 -0
  327. package/dist/util/confirm-interrupt.js +31 -0
  328. package/dist/util/continue-trigger.d.ts +11 -0
  329. package/dist/util/continue-trigger.js +20 -0
  330. package/dist/util/env-info.d.ts +18 -0
  331. package/dist/util/env-info.js +37 -0
  332. package/dist/util/file-access-log.d.ts +35 -0
  333. package/dist/util/file-access-log.js +140 -0
  334. package/dist/util/footer-manager.d.ts +124 -0
  335. package/dist/util/footer-manager.js +195 -0
  336. package/dist/util/footer-renderer.d.ts +67 -0
  337. package/dist/util/footer-renderer.js +319 -0
  338. package/dist/util/footer-state.d.ts +34 -0
  339. package/dist/util/footer-state.js +18 -0
  340. package/dist/util/footer-text.d.ts +51 -0
  341. package/dist/util/footer-text.js +74 -0
  342. package/dist/util/ids.d.ts +1 -0
  343. package/dist/util/ids.js +4 -0
  344. package/dist/util/levenshtein.d.ts +6 -0
  345. package/dist/util/levenshtein.js +34 -0
  346. package/dist/util/logger.d.ts +10 -0
  347. package/dist/util/logger.js +41 -0
  348. package/dist/util/logs.d.ts +26 -0
  349. package/dist/util/logs.js +88 -0
  350. package/dist/util/output-handler.d.ts +89 -0
  351. package/dist/util/output-handler.js +193 -0
  352. package/dist/util/output-interceptor.d.ts +18 -0
  353. package/dist/util/output-interceptor.js +49 -0
  354. package/dist/util/output-paths.d.ts +43 -0
  355. package/dist/util/output-paths.js +121 -0
  356. package/dist/util/package-json.d.ts +6 -0
  357. package/dist/util/package-json.js +36 -0
  358. package/dist/util/process-kill.d.ts +27 -0
  359. package/dist/util/process-kill.js +148 -0
  360. package/dist/util/protocol-error-logger.d.ts +33 -0
  361. package/dist/util/protocol-error-logger.js +73 -0
  362. package/dist/util/redact.d.ts +25 -0
  363. package/dist/util/redact.js +103 -0
  364. package/dist/util/scroll-region-guard.d.ts +33 -0
  365. package/dist/util/scroll-region-guard.js +63 -0
  366. package/dist/util/spinner.d.ts +15 -0
  367. package/dist/util/spinner.js +49 -0
  368. package/dist/util/terminal-output.d.ts +34 -0
  369. package/dist/util/terminal-output.js +1 -0
  370. package/dist/util/terminal-silent.d.ts +6 -0
  371. package/dist/util/terminal-silent.js +20 -0
  372. package/dist/util/terminal.d.ts +56 -0
  373. package/dist/util/terminal.js +124 -0
  374. package/dist/util/text-sanitize.d.ts +8 -0
  375. package/dist/util/text-sanitize.js +45 -0
  376. package/dist/util/thinking-spinner.d.ts +27 -0
  377. package/dist/util/thinking-spinner.js +189 -0
  378. package/dist/util/tool-error-logger.d.ts +33 -0
  379. package/dist/util/tool-error-logger.js +77 -0
  380. package/dist/util/tty.d.ts +13 -0
  381. package/dist/util/tty.js +16 -0
  382. package/dist/util/xcoder-paths.d.ts +56 -0
  383. package/dist/util/xcoder-paths.js +63 -0
  384. package/dist/version.d.ts +2 -0
  385. package/dist/version.js +4 -0
  386. package/dist/worker-agent/to-subtask-node.d.ts +35 -0
  387. package/dist/worker-agent/to-subtask-node.js +41 -0
  388. package/dist/worker-agent/worker-orchestrator.d.ts +104 -0
  389. package/dist/worker-agent/worker-orchestrator.js +201 -0
  390. package/package.json +39 -4
@@ -0,0 +1,108 @@
1
+ // xcoder:version 1 | xcoder:task task-1d9460 | xcoder:updated 2026-10-25T17:01:39.466Z | xcoder:subtask code-st-4b0403
2
+ // Pure offline receipt verification.
3
+ //
4
+ // No network, no filesystem, no `process`, no hidden Date.now(): the clock is
5
+ // injected so the gate, the manager and the tests all agree on "now".
6
+ //
7
+ // Receipt format: `<base64url(claims JSON)>.<base64url(ed25519 signature)>`
8
+ // where the signature is over the ASCII bytes of segment 0, exactly as
9
+ // transmitted. Verification order is deliberate: the signature is checked
10
+ // before any claim is interpreted, so attacker-chosen claims are never
11
+ // treated as authority.
12
+ import { createPublicKey, verify as cryptoVerify } from "node:crypto";
13
+ import { z } from "zod";
14
+ import { RECEIPT_TTL_MS } from "./trust-anchor.js";
15
+ /** Receipts larger than this are rejected before any decoding work. */
16
+ const MAX_RECEIPT_BYTES = 8 * 1024;
17
+ /** Default tolerance for clock drift when checking `issuedAt`. */
18
+ const DEFAULT_CLOCK_SKEW_MS = 60_000;
19
+ const LicenseClaimsSchema = z.strictObject({
20
+ iss: z.string().min(1).max(512),
21
+ aud: z.string().min(1).max(256),
22
+ licenseId: z.string().min(1).max(256),
23
+ activationId: z.string().min(1).max(256),
24
+ plan: z.string().min(1).max(64),
25
+ issuedAt: z.string().min(1).max(64),
26
+ expiresAt: z.string().min(1).max(64),
27
+ refreshBy: z.string().min(1).max(64),
28
+ });
29
+ /**
30
+ * Single source of truth for the offline window: a receipt is usable until
31
+ * whichever comes first, its subscription expiry or its refresh deadline.
32
+ */
33
+ export function validUntilMs(claims) {
34
+ return Math.min(Date.parse(claims.expiresAt), Date.parse(claims.refreshBy));
35
+ }
36
+ function normalizePem(pem) {
37
+ return pem.replace(/\r\n/g, "\n").trim();
38
+ }
39
+ /**
40
+ * Verify a signed receipt against a pinned key.
41
+ *
42
+ * Pure and total: returns a typed result for every input, including garbage.
43
+ */
44
+ export function verifyReceipt(rawReceipt, ctx) {
45
+ // 0. The caller may only ever verify with the pinned key.
46
+ if (ctx.pinnedPublicKeyPem !== undefined && normalizePem(ctx.publicKeyPem) !== normalizePem(ctx.pinnedPublicKeyPem)) {
47
+ return { ok: false, reason: "untrusted-key", detail: "verification key is not the pinned key" };
48
+ }
49
+ // 1. Shape: exactly two segments, bounded size.
50
+ if (typeof rawReceipt !== "string")
51
+ return { ok: false, reason: "malformed-receipt" };
52
+ if (Buffer.byteLength(rawReceipt, "utf8") > MAX_RECEIPT_BYTES) {
53
+ return { ok: false, reason: "malformed-receipt", detail: "receipt exceeds 8 KiB" };
54
+ }
55
+ const segments = rawReceipt.split(".");
56
+ if (segments.length !== 2 || segments[0].length === 0 || segments[1].length === 0) {
57
+ return { ok: false, reason: "malformed-receipt", detail: "expected two segments" };
58
+ }
59
+ const [payloadSegment, signatureSegment] = segments;
60
+ // 2. Decode + schema-validate the claims (still untrusted at this point).
61
+ let claims;
62
+ try {
63
+ const json = Buffer.from(payloadSegment, "base64url").toString("utf8");
64
+ claims = LicenseClaimsSchema.parse(JSON.parse(json));
65
+ }
66
+ catch {
67
+ return { ok: false, reason: "malformed-receipt" };
68
+ }
69
+ // 3. Signature over the transmitted segment bytes.
70
+ try {
71
+ const key = createPublicKey(ctx.publicKeyPem);
72
+ const signature = Buffer.from(signatureSegment, "base64url");
73
+ const signed = Buffer.from(payloadSegment, "utf8");
74
+ if (!cryptoVerify(null, signed, key, signature)) {
75
+ return { ok: false, reason: "bad-signature" };
76
+ }
77
+ }
78
+ catch {
79
+ return { ok: false, reason: "bad-signature" };
80
+ }
81
+ // ── Everything below runs only on a receipt whose signature verified. ──
82
+ // 4. Timestamps must be parseable before they are compared.
83
+ const issuedAt = Date.parse(claims.issuedAt);
84
+ const expiresAt = Date.parse(claims.expiresAt);
85
+ const refreshBy = Date.parse(claims.refreshBy);
86
+ if (Number.isNaN(issuedAt) || Number.isNaN(expiresAt) || Number.isNaN(refreshBy)) {
87
+ return { ok: false, reason: "malformed-receipt", detail: "unparseable timestamp" };
88
+ }
89
+ // 5. Defence in depth against a compromised or misconfigured issuer: a
90
+ // receipt can never claim a longer offline window than the TTL allows.
91
+ if (refreshBy > Math.min(expiresAt, issuedAt + RECEIPT_TTL_MS)) {
92
+ return { ok: false, reason: "malformed-receipt", detail: "refreshBy exceeds the maximum window" };
93
+ }
94
+ // 6. Issuer / audience pinning.
95
+ if (claims.iss !== ctx.issuer)
96
+ return { ok: false, reason: "wrong-issuer" };
97
+ if (claims.aud !== ctx.audience)
98
+ return { ok: false, reason: "wrong-audience" };
99
+ // 7. Validity window, in order of user-actionability.
100
+ const skew = ctx.clockSkewMs ?? DEFAULT_CLOCK_SKEW_MS;
101
+ if (ctx.now + skew < issuedAt)
102
+ return { ok: false, reason: "not-yet-valid" };
103
+ if (ctx.now >= expiresAt)
104
+ return { ok: false, reason: "expired" };
105
+ if (ctx.now >= refreshBy)
106
+ return { ok: false, reason: "refresh-overdue" };
107
+ return { ok: true, claims };
108
+ }
@@ -0,0 +1,72 @@
1
+ export type StateCandidateKind = 'override' | 'canonical' | 'legacy-host';
2
+ export interface SharedActivationRecord {
3
+ version: 1;
4
+ installationId: string;
5
+ activationId: string;
6
+ licenseId: string;
7
+ plan: string;
8
+ receipt: string;
9
+ expiresAt: string;
10
+ refreshBy: string;
11
+ savedAt: string;
12
+ lastSeenAt?: string;
13
+ lastRefreshAttemptAt?: string;
14
+ }
15
+ /** The parts of a store that exist before a receipt does. */
16
+ export interface IncompleteState {
17
+ version: 1;
18
+ installationId: string;
19
+ lastSeenAt?: string;
20
+ lastRefreshAttemptAt?: string;
21
+ }
22
+ /** A pre-unification record: identity plus a receipt, no activation fields. */
23
+ export interface HostLegacyState extends IncompleteState {
24
+ receipt: string;
25
+ }
26
+ export type DecodeFailure = 'absent' | 'incomplete' | 'host-legacy' | 'corrupt' | 'unsafe-file' | 'schema';
27
+ export type DecodeResult = {
28
+ ok: true;
29
+ record: SharedActivationRecord;
30
+ } | {
31
+ ok: false;
32
+ reason: 'incomplete';
33
+ partial: IncompleteState;
34
+ } | {
35
+ ok: false;
36
+ reason: 'host-legacy';
37
+ partial: HostLegacyState;
38
+ } | {
39
+ ok: false;
40
+ reason: Exclude<DecodeFailure, 'incomplete' | 'host-legacy'>;
41
+ };
42
+ /** The verified claims a record is projected from. */
43
+ export interface VerifiedClaimsShape {
44
+ licenseId: string;
45
+ activationId: string;
46
+ plan: string;
47
+ expiresAt: string;
48
+ refreshBy: string;
49
+ }
50
+ /** What can legitimately sit at the shared path. */
51
+ export type PersistedState = SharedActivationRecord | IncompleteState;
52
+ /**
53
+ * Read + validate one state file. Never throws.
54
+ *
55
+ * Symlinks and non-regular files are refused BEFORE reading: the receipt store
56
+ * is the local trust boundary, so following a link out of it is not supported.
57
+ */
58
+ export declare function decodeStateFile(file: string): DecodeResult;
59
+ /**
60
+ * Project VERIFIED claims into the shared record.
61
+ *
62
+ * The only trusted source of expiresAt/refreshBy/plan/ids is the receipt that
63
+ * just verified; prior contributes bookkeeping and is deliberately unable to
64
+ * override validity fields.
65
+ */
66
+ export declare function recordFromClaims(claims: VerifiedClaimsShape, prior?: Partial<SharedActivationRecord>): SharedActivationRecord;
67
+ /**
68
+ * Atomic replace: write a temp file in the target directory, then rename.
69
+ * Mode 0600 inside a 0700 directory; on Windows the ACLs govern access and the
70
+ * chmod calls are best-effort.
71
+ */
72
+ export declare function writeStateFile(file: string, record: PersistedState): void;
@@ -0,0 +1,218 @@
1
+ // xcoder:version 1 | xcoder:task task-689517 | xcoder:updated 2026-11-01T08:20:37.423Z | xcoder:subtask code-st-828150
2
+ // C2 — StateCodec (v1 tree).
3
+ //
4
+ // One JSON object, readable by ALL THREE xcoder readers with no change to any
5
+ // of them: v3 host, ronin, and v1. SharedActivationRecord is the union
6
+ // (superset) of every reader required subset, and every reader tolerates
7
+ // unknown keys, so one file satisfies all of them.
8
+ //
9
+ // Invariants:
10
+ // 1. DECODE NEVER THROWS. Every failure is a typed reason, so the gate keeps
11
+ // its fail-closed contract instead of surfacing fs errors as crashes.
12
+ // 2. VALIDITY COMES FROM THE RECEIPT. expiresAt/refreshBy/plan/ids are
13
+ // projected from VERIFIED claims (recordFromClaims), never trusted from
14
+ // the file, so hand-editing a record cannot widen its own window.
15
+ //
16
+ // Contains no secrets: the serial key is never written, only the signed public
17
+ // receipt.
18
+ import fs from 'node:fs';
19
+ import path from 'node:path';
20
+ import { randomUUID } from 'node:crypto';
21
+ /** Files above this are refused unread: a state file is a few KiB. */
22
+ const MAX_STATE_BYTES = 64 * 1024;
23
+ const DIR_MODE = 0o700;
24
+ const FILE_MODE = 0o600;
25
+ function isRecord(value) {
26
+ return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
27
+ }
28
+ function asString(value) {
29
+ return typeof value === 'string' && value.length > 0 ? value : null;
30
+ }
31
+ function isUuid(value) {
32
+ return (typeof value === 'string' &&
33
+ /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(value));
34
+ }
35
+ /** Optional ISO field: absent is fine, present-but-garbage is dropped. */
36
+ function optionalIso(value) {
37
+ const text = asString(value);
38
+ if (!text)
39
+ return undefined;
40
+ return Number.isFinite(Date.parse(text)) ? text : undefined;
41
+ }
42
+ /**
43
+ * Machine id for a record written before the shared schema existed. v1 and
44
+ * ronin kept installationId in installation.json next to the activation file;
45
+ * reading it (never writing it) lets those machines keep their seat.
46
+ */
47
+ function legacyInstallationId(activationFile) {
48
+ try {
49
+ const sibling = path.join(path.dirname(activationFile), 'installation.json');
50
+ const stat = fs.lstatSync(sibling);
51
+ if (stat.isSymbolicLink() || !stat.isFile() || stat.size > MAX_STATE_BYTES)
52
+ return null;
53
+ const parsed = JSON.parse(fs.readFileSync(sibling, 'utf8'));
54
+ return isRecord(parsed) && isUuid(parsed.installationId) ? parsed.installationId : null;
55
+ }
56
+ catch {
57
+ return null;
58
+ }
59
+ }
60
+ function bookkeeping(parsed, into) {
61
+ const seen = optionalIso(parsed.lastSeenAt);
62
+ if (seen)
63
+ into.lastSeenAt = seen;
64
+ const attempted = optionalIso(parsed.lastRefreshAttemptAt);
65
+ if (attempted)
66
+ into.lastRefreshAttemptAt = attempted;
67
+ return into;
68
+ }
69
+ /**
70
+ * Read + validate one state file. Never throws.
71
+ *
72
+ * Symlinks and non-regular files are refused BEFORE reading: the receipt store
73
+ * is the local trust boundary, so following a link out of it is not supported.
74
+ */
75
+ export function decodeStateFile(file) {
76
+ let stat;
77
+ try {
78
+ stat = fs.lstatSync(file);
79
+ }
80
+ catch {
81
+ return { ok: false, reason: 'absent' };
82
+ }
83
+ if (stat.isSymbolicLink() || !stat.isFile())
84
+ return { ok: false, reason: 'unsafe-file' };
85
+ if (stat.size > MAX_STATE_BYTES)
86
+ return { ok: false, reason: 'corrupt' };
87
+ let parsed;
88
+ try {
89
+ parsed = JSON.parse(fs.readFileSync(file, 'utf8'));
90
+ }
91
+ catch {
92
+ return { ok: false, reason: 'corrupt' };
93
+ }
94
+ if (!isRecord(parsed))
95
+ return { ok: false, reason: 'corrupt' };
96
+ // Machine identity first: it decides whether a receipt-less file is
97
+ // not-activated-yet (a valid bootstrap) or an unsupported shape.
98
+ const hasHostIdentity = parsed.version === 1 && isUuid(parsed.installationId);
99
+ let installationId;
100
+ if (hasHostIdentity) {
101
+ installationId = parsed.installationId;
102
+ }
103
+ else if (parsed.version === undefined) {
104
+ const legacy = legacyInstallationId(file);
105
+ if (!legacy)
106
+ return { ok: false, reason: 'schema' };
107
+ installationId = legacy;
108
+ }
109
+ else {
110
+ return { ok: false, reason: 'schema' };
111
+ }
112
+ const receipt = asString(parsed.receipt);
113
+ if (receipt === null) {
114
+ if (!hasHostIdentity)
115
+ return { ok: false, reason: 'schema' };
116
+ return { ok: false, reason: 'incomplete', partial: bookkeeping(parsed, { version: 1, installationId }) };
117
+ }
118
+ const activationId = asString(parsed.activationId);
119
+ const licenseId = asString(parsed.licenseId);
120
+ const plan = asString(parsed.plan);
121
+ const expiresAt = asString(parsed.expiresAt);
122
+ const refreshBy = asString(parsed.refreshBy);
123
+ const savedAt = asString(parsed.savedAt);
124
+ if (!activationId || !licenseId || !plan || !expiresAt || !refreshBy || !savedAt) {
125
+ // Not corrupt: the pre-unification record, which never carried these
126
+ // fields. Its validity is projected from the receipt by the reader.
127
+ if (hasHostIdentity) {
128
+ return {
129
+ ok: false,
130
+ reason: 'host-legacy',
131
+ partial: bookkeeping(parsed, { version: 1, installationId, receipt }),
132
+ };
133
+ }
134
+ return { ok: false, reason: 'schema' };
135
+ }
136
+ if (!Number.isFinite(Date.parse(expiresAt)) || !Number.isFinite(Date.parse(refreshBy))) {
137
+ return { ok: false, reason: 'schema' };
138
+ }
139
+ return {
140
+ ok: true,
141
+ record: bookkeeping(parsed, {
142
+ version: 1,
143
+ installationId,
144
+ activationId,
145
+ licenseId,
146
+ plan,
147
+ receipt,
148
+ expiresAt,
149
+ refreshBy,
150
+ savedAt,
151
+ }),
152
+ };
153
+ }
154
+ /**
155
+ * Project VERIFIED claims into the shared record.
156
+ *
157
+ * The only trusted source of expiresAt/refreshBy/plan/ids is the receipt that
158
+ * just verified; prior contributes bookkeeping and is deliberately unable to
159
+ * override validity fields.
160
+ */
161
+ export function recordFromClaims(claims, prior) {
162
+ const record = {
163
+ version: 1,
164
+ installationId: isUuid(prior?.installationId) ? prior.installationId : randomUUID(),
165
+ activationId: claims.activationId,
166
+ licenseId: claims.licenseId,
167
+ plan: claims.plan,
168
+ receipt: prior?.receipt ?? '',
169
+ expiresAt: claims.expiresAt,
170
+ refreshBy: claims.refreshBy,
171
+ // Bookkeeping only — never a validity input.
172
+ savedAt: optionalIso(prior?.savedAt) ?? new Date().toISOString(),
173
+ };
174
+ if (prior?.lastSeenAt)
175
+ record.lastSeenAt = prior.lastSeenAt;
176
+ if (prior?.lastRefreshAttemptAt)
177
+ record.lastRefreshAttemptAt = prior.lastRefreshAttemptAt;
178
+ return record;
179
+ }
180
+ /**
181
+ * Atomic replace: write a temp file in the target directory, then rename.
182
+ * Mode 0600 inside a 0700 directory; on Windows the ACLs govern access and the
183
+ * chmod calls are best-effort.
184
+ */
185
+ export function writeStateFile(file, record) {
186
+ const dir = path.dirname(file);
187
+ fs.mkdirSync(dir, { recursive: true, mode: DIR_MODE });
188
+ const temp = `${file}.${process.pid}.${randomUUID()}.tmp`;
189
+ try {
190
+ fs.writeFileSync(temp, `${JSON.stringify(record, null, 2)}\n`, {
191
+ encoding: 'utf8',
192
+ flag: 'wx',
193
+ mode: FILE_MODE,
194
+ });
195
+ try {
196
+ fs.chmodSync(temp, FILE_MODE);
197
+ }
198
+ catch {
199
+ /* Windows ACLs govern file access. */
200
+ }
201
+ fs.renameSync(temp, file);
202
+ try {
203
+ fs.chmodSync(file, FILE_MODE);
204
+ }
205
+ catch {
206
+ /* Windows ACLs govern file access. */
207
+ }
208
+ }
209
+ catch (error) {
210
+ try {
211
+ fs.rmSync(temp, { force: true });
212
+ }
213
+ catch {
214
+ /* keep the original error */
215
+ }
216
+ throw error;
217
+ }
218
+ }
@@ -0,0 +1,17 @@
1
+ export type StateCandidateKind = 'override' | 'canonical' | 'legacy-host';
2
+ export interface StateCandidate {
3
+ path: string;
4
+ kind: StateCandidateKind;
5
+ }
6
+ /** The one shared store every xcoder binary writes. */
7
+ export declare function canonicalStatePath(): string;
8
+ /**
9
+ * Discovery order for activation state. The env map is injectable so tests
10
+ * (and the parity harness) never have to mutate process.env.
11
+ */
12
+ export declare function resolveStateCandidates(env?: NodeJS.ProcessEnv): StateCandidate[];
13
+ /**
14
+ * The file this tree writes. Override when set (so an explicit target stays
15
+ * explicit), otherwise the canonical shared store.
16
+ */
17
+ export declare function primaryStatePath(env?: NodeJS.ProcessEnv): string;
@@ -0,0 +1,64 @@
1
+ // xcoder:version 1 | xcoder:task task-689517 | xcoder:updated 2026-11-01T08:20:11.715Z | xcoder:subtask code-st-828150
2
+ // C1 — SharedStateResolver (v1 tree).
3
+ //
4
+ // Owns WHERE an activation may be found. Pure path algebra: no I/O, no fs, no
5
+ // mkdir. The host and ronin trees carry byte-identical copies of this module;
6
+ // the three are duplicated (not shared) because the layering guard forbids
7
+ // cross-tree imports, and scripts/license-state-parity.test.mjs turns any drift
8
+ // into a red test.
9
+ //
10
+ // Why v1 must use the same list: v1 shipped with its OWN activation.json plus
11
+ // its own (wrong) API base URL, so a key activated by v3 was invisible here and
12
+ // a key activated here was invisible to v3. Sharing the discovery order is what
13
+ // makes ONE activation cover every binary on the machine.
14
+ //
15
+ // Order:
16
+ // 1. $XCODER_LICENSE_FILE -> override
17
+ // 2. <homedir>/.xcoder/license/activation.json -> canonical
18
+ // 3. <dirname($XCODER_CONFIG_FILE or ~/.xcoder/config.json)>/license.json
19
+ // -> legacy-host
20
+ //
21
+ // The override SHORT-CIRCUITS the list on purpose. It is the documented
22
+ // point-this-binary-somewhere-else switch, so it must not fall back to the real
23
+ // user store: an explicit override that silently read the ambient activation
24
+ // would make every fixture-based test depend on the developer home directory,
25
+ // and would make setting the override a lie.
26
+ import os from 'node:os';
27
+ import path from 'node:path';
28
+ /** The one shared store every xcoder binary writes. */
29
+ export function canonicalStatePath() {
30
+ return path.join(os.homedir(), '.xcoder', 'license', 'activation.json');
31
+ }
32
+ /**
33
+ * Discovery order for activation state. The env map is injectable so tests
34
+ * (and the parity harness) never have to mutate process.env.
35
+ */
36
+ export function resolveStateCandidates(env = process.env) {
37
+ const override = (env.XCODER_LICENSE_FILE ?? '').trim();
38
+ if (override)
39
+ return [{ path: path.resolve(override), kind: 'override' }];
40
+ // Mirrors userConfigPath() without importing it, so candidate discovery
41
+ // stays env-pure and identical in every tree.
42
+ const configPath = (env.XCODER_CONFIG_FILE ?? '').trim() || path.join(os.homedir(), '.xcoder', 'config.json');
43
+ const legacyHost = path.join(path.dirname(configPath), 'license.json');
44
+ const ordered = [
45
+ { path: canonicalStatePath(), kind: 'canonical' },
46
+ { path: legacyHost, kind: 'legacy-host' },
47
+ ];
48
+ // The default config path makes candidate 3 collide with candidate 2.
49
+ const seen = new Set();
50
+ return ordered.filter((candidate) => {
51
+ const key = path.resolve(candidate.path).toLowerCase();
52
+ if (seen.has(key))
53
+ return false;
54
+ seen.add(key);
55
+ return true;
56
+ });
57
+ }
58
+ /**
59
+ * The file this tree writes. Override when set (so an explicit target stays
60
+ * explicit), otherwise the canonical shared store.
61
+ */
62
+ export function primaryStatePath(env = process.env) {
63
+ return resolveStateCandidates(env)[0].path;
64
+ }
@@ -0,0 +1,44 @@
1
+ export interface InstallationRecord {
2
+ installationId: string;
3
+ createdAt: string;
4
+ }
5
+ export interface ActivationRecord {
6
+ activationId: string;
7
+ licenseId: string;
8
+ plan: string;
9
+ /** The signed receipt; contains no serial key. */
10
+ receipt: string;
11
+ expiresAt: string;
12
+ refreshBy: string;
13
+ savedAt: string;
14
+ }
15
+ export interface LicenseStore {
16
+ readonly dir: string;
17
+ readInstallation(): InstallationRecord | null;
18
+ /** Creates the UUID exactly once, atomically; concurrent callers agree. */
19
+ ensureInstallation(): InstallationRecord;
20
+ readActivation(): ActivationRecord | null;
21
+ writeActivation(rec: ActivationRecord): void;
22
+ clearActivation(): void;
23
+ }
24
+ export declare function defaultLicenseDir(): string;
25
+ /**
26
+ * Every FILE an activation may be stored in, highest priority first.
27
+ *
28
+ * Candidates are files, not directories: $XCODER_LICENSE_FILE names an
29
+ * arbitrary file and the legacy host store is license.json. Collapsing them to
30
+ * their parent directory and re-appending a hard-coded activation.json silently
31
+ * ignored both, which is exactly the v1-asks-for-a-key bug that this sharing
32
+ * work exists to fix. Reads, writes and clears all use this one list.
33
+ */
34
+ export declare function resolveCandidateFiles(env?: NodeJS.ProcessEnv): string[];
35
+ /**
36
+ * Directories of the candidate files, highest priority first.
37
+ *
38
+ * Kept for callers that reason about the installation sidecar next to the
39
+ * activation; activation I/O must use resolveCandidateFiles().
40
+ */
41
+ export declare function resolveCandidateDirs(env?: NodeJS.ProcessEnv): string[];
42
+ export declare function createLicenseStore(opts?: {
43
+ dir?: string;
44
+ }): LicenseStore;