@opensip-cli/core 0.1.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 (604) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +8 -0
  3. package/README.md +31 -0
  4. package/dist/__tests__/config-resolution.test.d.ts +2 -0
  5. package/dist/__tests__/config-resolution.test.d.ts.map +1 -0
  6. package/dist/__tests__/config-resolution.test.js +94 -0
  7. package/dist/__tests__/config-resolution.test.js.map +1 -0
  8. package/dist/__tests__/public-api.test.d.ts +16 -0
  9. package/dist/__tests__/public-api.test.d.ts.map +1 -0
  10. package/dist/__tests__/public-api.test.js +209 -0
  11. package/dist/__tests__/public-api.test.js.map +1 -0
  12. package/dist/__tests__/signal-batch.test.d.ts +2 -0
  13. package/dist/__tests__/signal-batch.test.d.ts.map +1 -0
  14. package/dist/__tests__/signal-batch.test.js +39 -0
  15. package/dist/__tests__/signal-batch.test.js.map +1 -0
  16. package/dist/__tests__/signal-sink.test.d.ts +2 -0
  17. package/dist/__tests__/signal-sink.test.d.ts.map +1 -0
  18. package/dist/__tests__/signal-sink.test.js +25 -0
  19. package/dist/__tests__/signal-sink.test.js.map +1 -0
  20. package/dist/__tests__/strip-utils.test.d.ts +2 -0
  21. package/dist/__tests__/strip-utils.test.d.ts.map +1 -0
  22. package/dist/__tests__/strip-utils.test.js +397 -0
  23. package/dist/__tests__/strip-utils.test.js.map +1 -0
  24. package/dist/__tests__/text-tree.test.d.ts +2 -0
  25. package/dist/__tests__/text-tree.test.d.ts.map +1 -0
  26. package/dist/__tests__/text-tree.test.js +31 -0
  27. package/dist/__tests__/text-tree.test.js.map +1 -0
  28. package/dist/baseline/__tests__/fingerprint-strategy.test.d.ts +2 -0
  29. package/dist/baseline/__tests__/fingerprint-strategy.test.d.ts.map +1 -0
  30. package/dist/baseline/__tests__/fingerprint-strategy.test.js +69 -0
  31. package/dist/baseline/__tests__/fingerprint-strategy.test.js.map +1 -0
  32. package/dist/baseline/fingerprint-strategy.d.ts +70 -0
  33. package/dist/baseline/fingerprint-strategy.d.ts.map +1 -0
  34. package/dist/baseline/fingerprint-strategy.js +90 -0
  35. package/dist/baseline/fingerprint-strategy.js.map +1 -0
  36. package/dist/config-resolution.d.ts +27 -0
  37. package/dist/config-resolution.d.ts.map +1 -0
  38. package/dist/config-resolution.js +92 -0
  39. package/dist/config-resolution.js.map +1 -0
  40. package/dist/index.d.ts +81 -0
  41. package/dist/index.d.ts.map +1 -0
  42. package/dist/index.js +165 -0
  43. package/dist/index.js.map +1 -0
  44. package/dist/languages/__tests__/content-filter-dispatch.test.d.ts +2 -0
  45. package/dist/languages/__tests__/content-filter-dispatch.test.d.ts.map +1 -0
  46. package/dist/languages/__tests__/content-filter-dispatch.test.js +87 -0
  47. package/dist/languages/__tests__/content-filter-dispatch.test.js.map +1 -0
  48. package/dist/languages/__tests__/non-code-formats.test.d.ts +2 -0
  49. package/dist/languages/__tests__/non-code-formats.test.d.ts.map +1 -0
  50. package/dist/languages/__tests__/non-code-formats.test.js +31 -0
  51. package/dist/languages/__tests__/non-code-formats.test.js.map +1 -0
  52. package/dist/languages/__tests__/parse-cache.test.d.ts +2 -0
  53. package/dist/languages/__tests__/parse-cache.test.d.ts.map +1 -0
  54. package/dist/languages/__tests__/parse-cache.test.js +228 -0
  55. package/dist/languages/__tests__/parse-cache.test.js.map +1 -0
  56. package/dist/languages/__tests__/registry.test.d.ts +2 -0
  57. package/dist/languages/__tests__/registry.test.d.ts.map +1 -0
  58. package/dist/languages/__tests__/registry.test.js +193 -0
  59. package/dist/languages/__tests__/registry.test.js.map +1 -0
  60. package/dist/languages/__tests__/workspace-unit-contract.test.d.ts +2 -0
  61. package/dist/languages/__tests__/workspace-unit-contract.test.d.ts.map +1 -0
  62. package/dist/languages/__tests__/workspace-unit-contract.test.js +66 -0
  63. package/dist/languages/__tests__/workspace-unit-contract.test.js.map +1 -0
  64. package/dist/languages/adapter.d.ts +66 -0
  65. package/dist/languages/adapter.d.ts.map +1 -0
  66. package/dist/languages/adapter.js +2 -0
  67. package/dist/languages/adapter.js.map +1 -0
  68. package/dist/languages/content-filter-dispatch.d.ts +36 -0
  69. package/dist/languages/content-filter-dispatch.d.ts.map +1 -0
  70. package/dist/languages/content-filter-dispatch.js +75 -0
  71. package/dist/languages/content-filter-dispatch.js.map +1 -0
  72. package/dist/languages/generic-types.d.ts +22 -0
  73. package/dist/languages/generic-types.d.ts.map +1 -0
  74. package/dist/languages/generic-types.js +3 -0
  75. package/dist/languages/generic-types.js.map +1 -0
  76. package/dist/languages/index.d.ts +12 -0
  77. package/dist/languages/index.d.ts.map +1 -0
  78. package/dist/languages/index.js +7 -0
  79. package/dist/languages/index.js.map +1 -0
  80. package/dist/languages/non-code-formats.d.ts +37 -0
  81. package/dist/languages/non-code-formats.d.ts.map +1 -0
  82. package/dist/languages/non-code-formats.js +45 -0
  83. package/dist/languages/non-code-formats.js.map +1 -0
  84. package/dist/languages/parse-cache-class.d.ts +69 -0
  85. package/dist/languages/parse-cache-class.d.ts.map +1 -0
  86. package/dist/languages/parse-cache-class.js +135 -0
  87. package/dist/languages/parse-cache-class.js.map +1 -0
  88. package/dist/languages/parse-cache.d.ts +54 -0
  89. package/dist/languages/parse-cache.d.ts.map +1 -0
  90. package/dist/languages/parse-cache.js +88 -0
  91. package/dist/languages/parse-cache.js.map +1 -0
  92. package/dist/languages/registry.d.ts +35 -0
  93. package/dist/languages/registry.d.ts.map +1 -0
  94. package/dist/languages/registry.js +123 -0
  95. package/dist/languages/registry.js.map +1 -0
  96. package/dist/languages/strip-scanners.d.ts +170 -0
  97. package/dist/languages/strip-scanners.d.ts.map +1 -0
  98. package/dist/languages/strip-scanners.js +233 -0
  99. package/dist/languages/strip-scanners.js.map +1 -0
  100. package/dist/languages/strip-utils.d.ts +66 -0
  101. package/dist/languages/strip-utils.d.ts.map +1 -0
  102. package/dist/languages/strip-utils.js +88 -0
  103. package/dist/languages/strip-utils.js.map +1 -0
  104. package/dist/languages/text-tree.d.ts +44 -0
  105. package/dist/languages/text-tree.d.ts.map +1 -0
  106. package/dist/languages/text-tree.js +34 -0
  107. package/dist/languages/text-tree.js.map +1 -0
  108. package/dist/languages/workspace-unit.d.ts +18 -0
  109. package/dist/languages/workspace-unit.d.ts.map +1 -0
  110. package/dist/languages/workspace-unit.js +2 -0
  111. package/dist/languages/workspace-unit.js.map +1 -0
  112. package/dist/lib/__tests__/config-version.test.d.ts +12 -0
  113. package/dist/lib/__tests__/config-version.test.d.ts.map +1 -0
  114. package/dist/lib/__tests__/config-version.test.js +92 -0
  115. package/dist/lib/__tests__/config-version.test.js.map +1 -0
  116. package/dist/lib/__tests__/diagnostics-bus.test.d.ts +7 -0
  117. package/dist/lib/__tests__/diagnostics-bus.test.d.ts.map +1 -0
  118. package/dist/lib/__tests__/diagnostics-bus.test.js +44 -0
  119. package/dist/lib/__tests__/diagnostics-bus.test.js.map +1 -0
  120. package/dist/lib/__tests__/env-registry.test.d.ts +7 -0
  121. package/dist/lib/__tests__/env-registry.test.d.ts.map +1 -0
  122. package/dist/lib/__tests__/env-registry.test.js +82 -0
  123. package/dist/lib/__tests__/env-registry.test.js.map +1 -0
  124. package/dist/lib/__tests__/errors.test.d.ts +2 -0
  125. package/dist/lib/__tests__/errors.test.d.ts.map +1 -0
  126. package/dist/lib/__tests__/errors.test.js +218 -0
  127. package/dist/lib/__tests__/errors.test.js.map +1 -0
  128. package/dist/lib/__tests__/format.test.d.ts +2 -0
  129. package/dist/lib/__tests__/format.test.d.ts.map +1 -0
  130. package/dist/lib/__tests__/format.test.js +23 -0
  131. package/dist/lib/__tests__/format.test.js.map +1 -0
  132. package/dist/lib/__tests__/ids.test.d.ts +2 -0
  133. package/dist/lib/__tests__/ids.test.d.ts.map +1 -0
  134. package/dist/lib/__tests__/ids.test.js +80 -0
  135. package/dist/lib/__tests__/ids.test.js.map +1 -0
  136. package/dist/lib/__tests__/logger.test.d.ts +2 -0
  137. package/dist/lib/__tests__/logger.test.d.ts.map +1 -0
  138. package/dist/lib/__tests__/logger.test.js +284 -0
  139. package/dist/lib/__tests__/logger.test.js.map +1 -0
  140. package/dist/lib/__tests__/package-version.test.d.ts +2 -0
  141. package/dist/lib/__tests__/package-version.test.d.ts.map +1 -0
  142. package/dist/lib/__tests__/package-version.test.js +47 -0
  143. package/dist/lib/__tests__/package-version.test.js.map +1 -0
  144. package/dist/lib/__tests__/paths.test.d.ts +5 -0
  145. package/dist/lib/__tests__/paths.test.d.ts.map +1 -0
  146. package/dist/lib/__tests__/paths.test.js +59 -0
  147. package/dist/lib/__tests__/paths.test.js.map +1 -0
  148. package/dist/lib/__tests__/payload-version.test.d.ts +2 -0
  149. package/dist/lib/__tests__/payload-version.test.d.ts.map +1 -0
  150. package/dist/lib/__tests__/payload-version.test.js +35 -0
  151. package/dist/lib/__tests__/payload-version.test.js.map +1 -0
  152. package/dist/lib/__tests__/phantom-detect.test.d.ts +10 -0
  153. package/dist/lib/__tests__/phantom-detect.test.d.ts.map +1 -0
  154. package/dist/lib/__tests__/phantom-detect.test.js +84 -0
  155. package/dist/lib/__tests__/phantom-detect.test.js.map +1 -0
  156. package/dist/lib/__tests__/project-context.test.d.ts +10 -0
  157. package/dist/lib/__tests__/project-context.test.d.ts.map +1 -0
  158. package/dist/lib/__tests__/project-context.test.js +240 -0
  159. package/dist/lib/__tests__/project-context.test.js.map +1 -0
  160. package/dist/lib/__tests__/registry.test.d.ts +2 -0
  161. package/dist/lib/__tests__/registry.test.d.ts.map +1 -0
  162. package/dist/lib/__tests__/registry.test.js +333 -0
  163. package/dist/lib/__tests__/registry.test.js.map +1 -0
  164. package/dist/lib/__tests__/retry.test.d.ts +2 -0
  165. package/dist/lib/__tests__/retry.test.d.ts.map +1 -0
  166. package/dist/lib/__tests__/retry.test.js +71 -0
  167. package/dist/lib/__tests__/retry.test.js.map +1 -0
  168. package/dist/lib/__tests__/run-diagnostics.test.d.ts +9 -0
  169. package/dist/lib/__tests__/run-diagnostics.test.d.ts.map +1 -0
  170. package/dist/lib/__tests__/run-diagnostics.test.js +61 -0
  171. package/dist/lib/__tests__/run-diagnostics.test.js.map +1 -0
  172. package/dist/lib/__tests__/run-scope.test.d.ts +2 -0
  173. package/dist/lib/__tests__/run-scope.test.d.ts.map +1 -0
  174. package/dist/lib/__tests__/run-scope.test.js +202 -0
  175. package/dist/lib/__tests__/run-scope.test.js.map +1 -0
  176. package/dist/lib/__tests__/run-timer.test.d.ts +2 -0
  177. package/dist/lib/__tests__/run-timer.test.d.ts.map +1 -0
  178. package/dist/lib/__tests__/run-timer.test.js +152 -0
  179. package/dist/lib/__tests__/run-timer.test.js.map +1 -0
  180. package/dist/lib/__tests__/severity-policy.test.d.ts +6 -0
  181. package/dist/lib/__tests__/severity-policy.test.d.ts.map +1 -0
  182. package/dist/lib/__tests__/severity-policy.test.js +47 -0
  183. package/dist/lib/__tests__/severity-policy.test.js.map +1 -0
  184. package/dist/lib/__tests__/telemetry.test.d.ts +2 -0
  185. package/dist/lib/__tests__/telemetry.test.d.ts.map +1 -0
  186. package/dist/lib/__tests__/telemetry.test.js +212 -0
  187. package/dist/lib/__tests__/telemetry.test.js.map +1 -0
  188. package/dist/lib/__tests__/verdict-policy.test.d.ts +7 -0
  189. package/dist/lib/__tests__/verdict-policy.test.d.ts.map +1 -0
  190. package/dist/lib/__tests__/verdict-policy.test.js +91 -0
  191. package/dist/lib/__tests__/verdict-policy.test.js.map +1 -0
  192. package/dist/lib/__tests__/yaml.test.d.ts +6 -0
  193. package/dist/lib/__tests__/yaml.test.d.ts.map +1 -0
  194. package/dist/lib/__tests__/yaml.test.js +79 -0
  195. package/dist/lib/__tests__/yaml.test.js.map +1 -0
  196. package/dist/lib/config-version.d.ts +49 -0
  197. package/dist/lib/config-version.d.ts.map +1 -0
  198. package/dist/lib/config-version.js +56 -0
  199. package/dist/lib/config-version.js.map +1 -0
  200. package/dist/lib/diagnostics-bus.d.ts +48 -0
  201. package/dist/lib/diagnostics-bus.d.ts.map +1 -0
  202. package/dist/lib/diagnostics-bus.js +74 -0
  203. package/dist/lib/diagnostics-bus.js.map +1 -0
  204. package/dist/lib/env-registry.d.ts +108 -0
  205. package/dist/lib/env-registry.d.ts.map +1 -0
  206. package/dist/lib/env-registry.js +92 -0
  207. package/dist/lib/env-registry.js.map +1 -0
  208. package/dist/lib/errors.d.ts +132 -0
  209. package/dist/lib/errors.d.ts.map +1 -0
  210. package/dist/lib/errors.js +160 -0
  211. package/dist/lib/errors.js.map +1 -0
  212. package/dist/lib/execution/__tests__/execution.test.d.ts +7 -0
  213. package/dist/lib/execution/__tests__/execution.test.d.ts.map +1 -0
  214. package/dist/lib/execution/__tests__/execution.test.js +254 -0
  215. package/dist/lib/execution/__tests__/execution.test.js.map +1 -0
  216. package/dist/lib/execution/index.d.ts +15 -0
  217. package/dist/lib/execution/index.d.ts.map +1 -0
  218. package/dist/lib/execution/index.js +10 -0
  219. package/dist/lib/execution/index.js.map +1 -0
  220. package/dist/lib/execution/options.d.ts +32 -0
  221. package/dist/lib/execution/options.d.ts.map +1 -0
  222. package/dist/lib/execution/options.js +15 -0
  223. package/dist/lib/execution/options.js.map +1 -0
  224. package/dist/lib/execution/pipeline.d.ts +36 -0
  225. package/dist/lib/execution/pipeline.d.ts.map +1 -0
  226. package/dist/lib/execution/pipeline.js +38 -0
  227. package/dist/lib/execution/pipeline.js.map +1 -0
  228. package/dist/lib/execution/retry.d.ts +38 -0
  229. package/dist/lib/execution/retry.d.ts.map +1 -0
  230. package/dist/lib/execution/retry.js +56 -0
  231. package/dist/lib/execution/retry.js.map +1 -0
  232. package/dist/lib/execution/run-with-timeout.d.ts +46 -0
  233. package/dist/lib/execution/run-with-timeout.d.ts.map +1 -0
  234. package/dist/lib/execution/run-with-timeout.js +86 -0
  235. package/dist/lib/execution/run-with-timeout.js.map +1 -0
  236. package/dist/lib/execution/schedule.d.ts +62 -0
  237. package/dist/lib/execution/schedule.d.ts.map +1 -0
  238. package/dist/lib/execution/schedule.js +130 -0
  239. package/dist/lib/execution/schedule.js.map +1 -0
  240. package/dist/lib/format.d.ts +17 -0
  241. package/dist/lib/format.d.ts.map +1 -0
  242. package/dist/lib/format.js +26 -0
  243. package/dist/lib/format.js.map +1 -0
  244. package/dist/lib/ids.d.ts +13 -0
  245. package/dist/lib/ids.d.ts.map +1 -0
  246. package/dist/lib/ids.js +48 -0
  247. package/dist/lib/ids.js.map +1 -0
  248. package/dist/lib/logger.d.ts +166 -0
  249. package/dist/lib/logger.d.ts.map +1 -0
  250. package/dist/lib/logger.js +283 -0
  251. package/dist/lib/logger.js.map +1 -0
  252. package/dist/lib/package-version.d.ts +17 -0
  253. package/dist/lib/package-version.d.ts.map +1 -0
  254. package/dist/lib/package-version.js +52 -0
  255. package/dist/lib/package-version.js.map +1 -0
  256. package/dist/lib/paths.d.ts +139 -0
  257. package/dist/lib/paths.d.ts.map +1 -0
  258. package/dist/lib/paths.js +105 -0
  259. package/dist/lib/paths.js.map +1 -0
  260. package/dist/lib/payload-version.d.ts +15 -0
  261. package/dist/lib/payload-version.d.ts.map +1 -0
  262. package/dist/lib/payload-version.js +24 -0
  263. package/dist/lib/payload-version.js.map +1 -0
  264. package/dist/lib/phantom-detect.d.ts +21 -0
  265. package/dist/lib/phantom-detect.d.ts.map +1 -0
  266. package/dist/lib/phantom-detect.js +76 -0
  267. package/dist/lib/phantom-detect.js.map +1 -0
  268. package/dist/lib/project-context.d.ts +66 -0
  269. package/dist/lib/project-context.d.ts.map +1 -0
  270. package/dist/lib/project-context.js +112 -0
  271. package/dist/lib/project-context.js.map +1 -0
  272. package/dist/lib/recipe-id.d.ts +13 -0
  273. package/dist/lib/recipe-id.d.ts.map +1 -0
  274. package/dist/lib/recipe-id.js +15 -0
  275. package/dist/lib/recipe-id.js.map +1 -0
  276. package/dist/lib/registry.d.ts +98 -0
  277. package/dist/lib/registry.d.ts.map +1 -0
  278. package/dist/lib/registry.js +152 -0
  279. package/dist/lib/registry.js.map +1 -0
  280. package/dist/lib/retry.d.ts +26 -0
  281. package/dist/lib/retry.d.ts.map +1 -0
  282. package/dist/lib/retry.js +48 -0
  283. package/dist/lib/retry.js.map +1 -0
  284. package/dist/lib/run-diagnostics.d.ts +64 -0
  285. package/dist/lib/run-diagnostics.d.ts.map +1 -0
  286. package/dist/lib/run-diagnostics.js +25 -0
  287. package/dist/lib/run-diagnostics.js.map +1 -0
  288. package/dist/lib/run-scope.d.ts +167 -0
  289. package/dist/lib/run-scope.d.ts.map +1 -0
  290. package/dist/lib/run-scope.js +176 -0
  291. package/dist/lib/run-scope.js.map +1 -0
  292. package/dist/lib/run-timer.d.ts +82 -0
  293. package/dist/lib/run-timer.d.ts.map +1 -0
  294. package/dist/lib/run-timer.js +79 -0
  295. package/dist/lib/run-timer.js.map +1 -0
  296. package/dist/lib/scope-types.d.ts +172 -0
  297. package/dist/lib/scope-types.d.ts.map +1 -0
  298. package/dist/lib/scope-types.js +27 -0
  299. package/dist/lib/scope-types.js.map +1 -0
  300. package/dist/lib/severity-policy.d.ts +38 -0
  301. package/dist/lib/severity-policy.d.ts.map +1 -0
  302. package/dist/lib/severity-policy.js +44 -0
  303. package/dist/lib/severity-policy.js.map +1 -0
  304. package/dist/lib/telemetry.d.ts +93 -0
  305. package/dist/lib/telemetry.d.ts.map +1 -0
  306. package/dist/lib/telemetry.js +144 -0
  307. package/dist/lib/telemetry.js.map +1 -0
  308. package/dist/lib/ui-context.d.ts +34 -0
  309. package/dist/lib/ui-context.d.ts.map +1 -0
  310. package/dist/lib/ui-context.js +16 -0
  311. package/dist/lib/ui-context.js.map +1 -0
  312. package/dist/lib/verdict-policy.d.ts +71 -0
  313. package/dist/lib/verdict-policy.d.ts.map +1 -0
  314. package/dist/lib/verdict-policy.js +82 -0
  315. package/dist/lib/verdict-policy.js.map +1 -0
  316. package/dist/lib/yaml.d.ts +74 -0
  317. package/dist/lib/yaml.d.ts.map +1 -0
  318. package/dist/lib/yaml.js +118 -0
  319. package/dist/lib/yaml.js.map +1 -0
  320. package/dist/plugins/__tests__/as-if-external.test.d.ts +18 -0
  321. package/dist/plugins/__tests__/as-if-external.test.d.ts.map +1 -0
  322. package/dist/plugins/__tests__/as-if-external.test.js +159 -0
  323. package/dist/plugins/__tests__/as-if-external.test.js.map +1 -0
  324. package/dist/plugins/__tests__/authored-tool-discovery.test.d.ts +8 -0
  325. package/dist/plugins/__tests__/authored-tool-discovery.test.d.ts.map +1 -0
  326. package/dist/plugins/__tests__/authored-tool-discovery.test.js +97 -0
  327. package/dist/plugins/__tests__/authored-tool-discovery.test.js.map +1 -0
  328. package/dist/plugins/__tests__/capability-discovery.test.d.ts +2 -0
  329. package/dist/plugins/__tests__/capability-discovery.test.d.ts.map +1 -0
  330. package/dist/plugins/__tests__/capability-discovery.test.js +349 -0
  331. package/dist/plugins/__tests__/capability-discovery.test.js.map +1 -0
  332. package/dist/plugins/__tests__/capability-from-manifest.test.d.ts +2 -0
  333. package/dist/plugins/__tests__/capability-from-manifest.test.d.ts.map +1 -0
  334. package/dist/plugins/__tests__/capability-from-manifest.test.js +172 -0
  335. package/dist/plugins/__tests__/capability-from-manifest.test.js.map +1 -0
  336. package/dist/plugins/__tests__/capability-loader.test.d.ts +2 -0
  337. package/dist/plugins/__tests__/capability-loader.test.d.ts.map +1 -0
  338. package/dist/plugins/__tests__/capability-loader.test.js +122 -0
  339. package/dist/plugins/__tests__/capability-loader.test.js.map +1 -0
  340. package/dist/plugins/__tests__/capability-registry.test.d.ts +2 -0
  341. package/dist/plugins/__tests__/capability-registry.test.d.ts.map +1 -0
  342. package/dist/plugins/__tests__/capability-registry.test.js +185 -0
  343. package/dist/plugins/__tests__/capability-registry.test.js.map +1 -0
  344. package/dist/plugins/__tests__/discover.test.d.ts +2 -0
  345. package/dist/plugins/__tests__/discover.test.d.ts.map +1 -0
  346. package/dist/plugins/__tests__/discover.test.js +311 -0
  347. package/dist/plugins/__tests__/discover.test.js.map +1 -0
  348. package/dist/plugins/__tests__/loader.test.d.ts +2 -0
  349. package/dist/plugins/__tests__/loader.test.d.ts.map +1 -0
  350. package/dist/plugins/__tests__/loader.test.js +191 -0
  351. package/dist/plugins/__tests__/loader.test.js.map +1 -0
  352. package/dist/plugins/__tests__/manifest-discovery.test.d.ts +2 -0
  353. package/dist/plugins/__tests__/manifest-discovery.test.d.ts.map +1 -0
  354. package/dist/plugins/__tests__/manifest-discovery.test.js +132 -0
  355. package/dist/plugins/__tests__/manifest-discovery.test.js.map +1 -0
  356. package/dist/plugins/__tests__/manifest-loader.test.d.ts +2 -0
  357. package/dist/plugins/__tests__/manifest-loader.test.d.ts.map +1 -0
  358. package/dist/plugins/__tests__/manifest-loader.test.js +434 -0
  359. package/dist/plugins/__tests__/manifest-loader.test.js.map +1 -0
  360. package/dist/plugins/__tests__/marker-discovery.test.d.ts +2 -0
  361. package/dist/plugins/__tests__/marker-discovery.test.d.ts.map +1 -0
  362. package/dist/plugins/__tests__/marker-discovery.test.js +164 -0
  363. package/dist/plugins/__tests__/marker-discovery.test.js.map +1 -0
  364. package/dist/plugins/__tests__/node-modules-walk.test.d.ts +2 -0
  365. package/dist/plugins/__tests__/node-modules-walk.test.d.ts.map +1 -0
  366. package/dist/plugins/__tests__/node-modules-walk.test.js +76 -0
  367. package/dist/plugins/__tests__/node-modules-walk.test.js.map +1 -0
  368. package/dist/plugins/__tests__/package-entry.test.d.ts +9 -0
  369. package/dist/plugins/__tests__/package-entry.test.d.ts.map +1 -0
  370. package/dist/plugins/__tests__/package-entry.test.js +117 -0
  371. package/dist/plugins/__tests__/package-entry.test.js.map +1 -0
  372. package/dist/plugins/__tests__/recipe-loader.test.d.ts +2 -0
  373. package/dist/plugins/__tests__/recipe-loader.test.d.ts.map +1 -0
  374. package/dist/plugins/__tests__/recipe-loader.test.js +130 -0
  375. package/dist/plugins/__tests__/recipe-loader.test.js.map +1 -0
  376. package/dist/plugins/__tests__/scope-validation.test.d.ts +2 -0
  377. package/dist/plugins/__tests__/scope-validation.test.d.ts.map +1 -0
  378. package/dist/plugins/__tests__/scope-validation.test.js +68 -0
  379. package/dist/plugins/__tests__/scope-validation.test.js.map +1 -0
  380. package/dist/plugins/__tests__/single-core-guard.test.d.ts +10 -0
  381. package/dist/plugins/__tests__/single-core-guard.test.d.ts.map +1 -0
  382. package/dist/plugins/__tests__/single-core-guard.test.js +89 -0
  383. package/dist/plugins/__tests__/single-core-guard.test.js.map +1 -0
  384. package/dist/plugins/__tests__/tool-package-discovery.test.d.ts +2 -0
  385. package/dist/plugins/__tests__/tool-package-discovery.test.d.ts.map +1 -0
  386. package/dist/plugins/__tests__/tool-package-discovery.test.js +215 -0
  387. package/dist/plugins/__tests__/tool-package-discovery.test.js.map +1 -0
  388. package/dist/plugins/authored-tool-discovery.d.ts +45 -0
  389. package/dist/plugins/authored-tool-discovery.d.ts.map +1 -0
  390. package/dist/plugins/authored-tool-discovery.js +61 -0
  391. package/dist/plugins/authored-tool-discovery.js.map +1 -0
  392. package/dist/plugins/capability-discovery.d.ts +80 -0
  393. package/dist/plugins/capability-discovery.d.ts.map +1 -0
  394. package/dist/plugins/capability-discovery.js +278 -0
  395. package/dist/plugins/capability-discovery.js.map +1 -0
  396. package/dist/plugins/capability-loader.d.ts +50 -0
  397. package/dist/plugins/capability-loader.d.ts.map +1 -0
  398. package/dist/plugins/capability-loader.js +85 -0
  399. package/dist/plugins/capability-loader.js.map +1 -0
  400. package/dist/plugins/capability-registry.d.ts +169 -0
  401. package/dist/plugins/capability-registry.d.ts.map +1 -0
  402. package/dist/plugins/capability-registry.js +319 -0
  403. package/dist/plugins/capability-registry.js.map +1 -0
  404. package/dist/plugins/discover.d.ts +64 -0
  405. package/dist/plugins/discover.d.ts.map +1 -0
  406. package/dist/plugins/discover.js +303 -0
  407. package/dist/plugins/discover.js.map +1 -0
  408. package/dist/plugins/index.d.ts +37 -0
  409. package/dist/plugins/index.d.ts.map +1 -0
  410. package/dist/plugins/index.js +40 -0
  411. package/dist/plugins/index.js.map +1 -0
  412. package/dist/plugins/json-guards.d.ts +11 -0
  413. package/dist/plugins/json-guards.d.ts.map +1 -0
  414. package/dist/plugins/json-guards.js +15 -0
  415. package/dist/plugins/json-guards.js.map +1 -0
  416. package/dist/plugins/loader.d.ts +67 -0
  417. package/dist/plugins/loader.d.ts.map +1 -0
  418. package/dist/plugins/loader.js +137 -0
  419. package/dist/plugins/loader.js.map +1 -0
  420. package/dist/plugins/manifest-discovery.d.ts +28 -0
  421. package/dist/plugins/manifest-discovery.d.ts.map +1 -0
  422. package/dist/plugins/manifest-discovery.js +103 -0
  423. package/dist/plugins/manifest-discovery.js.map +1 -0
  424. package/dist/plugins/manifest-loader.d.ts +120 -0
  425. package/dist/plugins/manifest-loader.d.ts.map +1 -0
  426. package/dist/plugins/manifest-loader.js +410 -0
  427. package/dist/plugins/manifest-loader.js.map +1 -0
  428. package/dist/plugins/marker-discovery.d.ts +115 -0
  429. package/dist/plugins/marker-discovery.d.ts.map +1 -0
  430. package/dist/plugins/marker-discovery.js +172 -0
  431. package/dist/plugins/marker-discovery.js.map +1 -0
  432. package/dist/plugins/node-modules-walk.d.ts +61 -0
  433. package/dist/plugins/node-modules-walk.d.ts.map +1 -0
  434. package/dist/plugins/node-modules-walk.js +99 -0
  435. package/dist/plugins/node-modules-walk.js.map +1 -0
  436. package/dist/plugins/package-entry.d.ts +38 -0
  437. package/dist/plugins/package-entry.d.ts.map +1 -0
  438. package/dist/plugins/package-entry.js +86 -0
  439. package/dist/plugins/package-entry.js.map +1 -0
  440. package/dist/plugins/recipe-loader.d.ts +63 -0
  441. package/dist/plugins/recipe-loader.d.ts.map +1 -0
  442. package/dist/plugins/recipe-loader.js +67 -0
  443. package/dist/plugins/recipe-loader.js.map +1 -0
  444. package/dist/plugins/scope-validation.d.ts +35 -0
  445. package/dist/plugins/scope-validation.d.ts.map +1 -0
  446. package/dist/plugins/scope-validation.js +55 -0
  447. package/dist/plugins/scope-validation.js.map +1 -0
  448. package/dist/plugins/single-core-guard.d.ts +28 -0
  449. package/dist/plugins/single-core-guard.d.ts.map +1 -0
  450. package/dist/plugins/single-core-guard.js +69 -0
  451. package/dist/plugins/single-core-guard.js.map +1 -0
  452. package/dist/plugins/tool-package-discovery.d.ts +93 -0
  453. package/dist/plugins/tool-package-discovery.d.ts.map +1 -0
  454. package/dist/plugins/tool-package-discovery.js +118 -0
  455. package/dist/plugins/tool-package-discovery.js.map +1 -0
  456. package/dist/plugins/types.d.ts +78 -0
  457. package/dist/plugins/types.d.ts.map +1 -0
  458. package/dist/plugins/types.js +15 -0
  459. package/dist/plugins/types.js.map +1 -0
  460. package/dist/recipes/__tests__/registry.test.d.ts +2 -0
  461. package/dist/recipes/__tests__/registry.test.d.ts.map +1 -0
  462. package/dist/recipes/__tests__/registry.test.js +170 -0
  463. package/dist/recipes/__tests__/registry.test.js.map +1 -0
  464. package/dist/recipes/__tests__/selector.test.d.ts +20 -0
  465. package/dist/recipes/__tests__/selector.test.d.ts.map +1 -0
  466. package/dist/recipes/__tests__/selector.test.js +173 -0
  467. package/dist/recipes/__tests__/selector.test.js.map +1 -0
  468. package/dist/recipes/__tests__/unit-config.test.d.ts +7 -0
  469. package/dist/recipes/__tests__/unit-config.test.d.ts.map +1 -0
  470. package/dist/recipes/__tests__/unit-config.test.js +52 -0
  471. package/dist/recipes/__tests__/unit-config.test.js.map +1 -0
  472. package/dist/recipes/registry.d.ts +105 -0
  473. package/dist/recipes/registry.d.ts.map +1 -0
  474. package/dist/recipes/registry.js +141 -0
  475. package/dist/recipes/registry.js.map +1 -0
  476. package/dist/recipes/selector.d.ts +112 -0
  477. package/dist/recipes/selector.d.ts.map +1 -0
  478. package/dist/recipes/selector.js +134 -0
  479. package/dist/recipes/selector.js.map +1 -0
  480. package/dist/recipes/unit-config.d.ts +63 -0
  481. package/dist/recipes/unit-config.d.ts.map +1 -0
  482. package/dist/recipes/unit-config.js +68 -0
  483. package/dist/recipes/unit-config.js.map +1 -0
  484. package/dist/runtime/__tests__/in-process-transport.test.d.ts +6 -0
  485. package/dist/runtime/__tests__/in-process-transport.test.d.ts.map +1 -0
  486. package/dist/runtime/__tests__/in-process-transport.test.js +73 -0
  487. package/dist/runtime/__tests__/in-process-transport.test.js.map +1 -0
  488. package/dist/runtime/__tests__/subprocess-transport.test.d.ts +11 -0
  489. package/dist/runtime/__tests__/subprocess-transport.test.d.ts.map +1 -0
  490. package/dist/runtime/__tests__/subprocess-transport.test.js +118 -0
  491. package/dist/runtime/__tests__/subprocess-transport.test.js.map +1 -0
  492. package/dist/runtime/in-process-transport.d.ts +20 -0
  493. package/dist/runtime/in-process-transport.d.ts.map +1 -0
  494. package/dist/runtime/in-process-transport.js +49 -0
  495. package/dist/runtime/in-process-transport.js.map +1 -0
  496. package/dist/runtime/progress-transport.d.ts +73 -0
  497. package/dist/runtime/progress-transport.d.ts.map +1 -0
  498. package/dist/runtime/progress-transport.js +17 -0
  499. package/dist/runtime/progress-transport.js.map +1 -0
  500. package/dist/runtime/subprocess-transport.d.ts +43 -0
  501. package/dist/runtime/subprocess-transport.d.ts.map +1 -0
  502. package/dist/runtime/subprocess-transport.js +134 -0
  503. package/dist/runtime/subprocess-transport.js.map +1 -0
  504. package/dist/signals/comment-openers.d.ts +29 -0
  505. package/dist/signals/comment-openers.d.ts.map +1 -0
  506. package/dist/signals/comment-openers.js +41 -0
  507. package/dist/signals/comment-openers.js.map +1 -0
  508. package/dist/signals/comment-openers.test.d.ts +7 -0
  509. package/dist/signals/comment-openers.test.d.ts.map +1 -0
  510. package/dist/signals/comment-openers.test.js +41 -0
  511. package/dist/signals/comment-openers.test.js.map +1 -0
  512. package/dist/signals/create-signal-from-violation.d.ts +29 -0
  513. package/dist/signals/create-signal-from-violation.d.ts.map +1 -0
  514. package/dist/signals/create-signal-from-violation.js +29 -0
  515. package/dist/signals/create-signal-from-violation.js.map +1 -0
  516. package/dist/signals/signal-sink.d.ts +49 -0
  517. package/dist/signals/signal-sink.d.ts.map +1 -0
  518. package/dist/signals/signal-sink.js +6 -0
  519. package/dist/signals/signal-sink.js.map +1 -0
  520. package/dist/signals/suppress.d.ts +102 -0
  521. package/dist/signals/suppress.d.ts.map +1 -0
  522. package/dist/signals/suppress.js +325 -0
  523. package/dist/signals/suppress.js.map +1 -0
  524. package/dist/signals/suppress.test.d.ts +2 -0
  525. package/dist/signals/suppress.test.d.ts.map +1 -0
  526. package/dist/signals/suppress.test.js +213 -0
  527. package/dist/signals/suppress.test.js.map +1 -0
  528. package/dist/tools/__tests__/command-spec.test.d.ts +2 -0
  529. package/dist/tools/__tests__/command-spec.test.d.ts.map +1 -0
  530. package/dist/tools/__tests__/command-spec.test.js +191 -0
  531. package/dist/tools/__tests__/command-spec.test.js.map +1 -0
  532. package/dist/tools/__tests__/compatibility.test.d.ts +5 -0
  533. package/dist/tools/__tests__/compatibility.test.d.ts.map +1 -0
  534. package/dist/tools/__tests__/compatibility.test.js +41 -0
  535. package/dist/tools/__tests__/compatibility.test.js.map +1 -0
  536. package/dist/tools/__tests__/ids.test.d.ts +5 -0
  537. package/dist/tools/__tests__/ids.test.d.ts.map +1 -0
  538. package/dist/tools/__tests__/ids.test.js +56 -0
  539. package/dist/tools/__tests__/ids.test.js.map +1 -0
  540. package/dist/tools/__tests__/manifest-assert.test.d.ts +5 -0
  541. package/dist/tools/__tests__/manifest-assert.test.d.ts.map +1 -0
  542. package/dist/tools/__tests__/manifest-assert.test.js +66 -0
  543. package/dist/tools/__tests__/manifest-assert.test.js.map +1 -0
  544. package/dist/tools/__tests__/registry.test.d.ts +2 -0
  545. package/dist/tools/__tests__/registry.test.d.ts.map +1 -0
  546. package/dist/tools/__tests__/registry.test.js +93 -0
  547. package/dist/tools/__tests__/registry.test.js.map +1 -0
  548. package/dist/tools/__tests__/types.test.d.ts +2 -0
  549. package/dist/tools/__tests__/types.test.d.ts.map +1 -0
  550. package/dist/tools/__tests__/types.test.js +51 -0
  551. package/dist/tools/__tests__/types.test.js.map +1 -0
  552. package/dist/tools/capability.d.ts +257 -0
  553. package/dist/tools/capability.d.ts.map +1 -0
  554. package/dist/tools/capability.js +46 -0
  555. package/dist/tools/capability.js.map +1 -0
  556. package/dist/tools/command-spec.d.ts +211 -0
  557. package/dist/tools/command-spec.d.ts.map +1 -0
  558. package/dist/tools/command-spec.js +110 -0
  559. package/dist/tools/command-spec.js.map +1 -0
  560. package/dist/tools/compatibility.d.ts +45 -0
  561. package/dist/tools/compatibility.d.ts.map +1 -0
  562. package/dist/tools/compatibility.js +49 -0
  563. package/dist/tools/compatibility.js.map +1 -0
  564. package/dist/tools/ids.d.ts +61 -0
  565. package/dist/tools/ids.d.ts.map +1 -0
  566. package/dist/tools/ids.js +61 -0
  567. package/dist/tools/ids.js.map +1 -0
  568. package/dist/tools/index.d.ts +22 -0
  569. package/dist/tools/index.d.ts.map +1 -0
  570. package/dist/tools/index.js +28 -0
  571. package/dist/tools/index.js.map +1 -0
  572. package/dist/tools/manifest-assert.d.ts +35 -0
  573. package/dist/tools/manifest-assert.d.ts.map +1 -0
  574. package/dist/tools/manifest-assert.js +67 -0
  575. package/dist/tools/manifest-assert.js.map +1 -0
  576. package/dist/tools/manifest.d.ts +178 -0
  577. package/dist/tools/manifest.d.ts.map +1 -0
  578. package/dist/tools/manifest.js +35 -0
  579. package/dist/tools/manifest.js.map +1 -0
  580. package/dist/tools/registry.d.ts +37 -0
  581. package/dist/tools/registry.d.ts.map +1 -0
  582. package/dist/tools/registry.js +49 -0
  583. package/dist/tools/registry.js.map +1 -0
  584. package/dist/tools/types.d.ts +1021 -0
  585. package/dist/tools/types.d.ts.map +1 -0
  586. package/dist/tools/types.js +77 -0
  587. package/dist/tools/types.js.map +1 -0
  588. package/dist/types/__tests__/signal.test.d.ts +2 -0
  589. package/dist/types/__tests__/signal.test.d.ts.map +1 -0
  590. package/dist/types/__tests__/signal.test.js +111 -0
  591. package/dist/types/__tests__/signal.test.js.map +1 -0
  592. package/dist/types/index.d.ts +5 -0
  593. package/dist/types/index.d.ts.map +1 -0
  594. package/dist/types/index.js +3 -0
  595. package/dist/types/index.js.map +1 -0
  596. package/dist/types/signal-batch.d.ts +56 -0
  597. package/dist/types/signal-batch.d.ts.map +1 -0
  598. package/dist/types/signal-batch.js +54 -0
  599. package/dist/types/signal-batch.js.map +1 -0
  600. package/dist/types/signal.d.ts +77 -0
  601. package/dist/types/signal.d.ts.map +1 -0
  602. package/dist/types/signal.js +42 -0
  603. package/dist/types/signal.js.map +1 -0
  604. package/package.json +57 -0
@@ -0,0 +1,70 @@
1
+ /**
2
+ * @fileoverview Fingerprint strategy — the host-owned baseline/ratchet plane's
3
+ * identity primitive (ADR-0036).
4
+ *
5
+ * A `FingerprintStrategy` maps a `Signal` to a stable string identity. Each tool
6
+ * MAY declare one via `Tool.fingerprintStrategy`; a tool that declares nothing
7
+ * inherits {@link defaultFingerprintStrategy}. The fingerprint is stamped onto
8
+ * `Signal.fingerprint` at envelope-construction time: `buildSignalEnvelope`
9
+ * (`@opensip-cli/contracts`) calls {@link stampFingerprints} with the tool's
10
+ * strategy (host default when none is passed), so every built envelope reaches
11
+ * the host seams already stamped. The plane itself NEVER re-fingerprints or
12
+ * re-derives the value (it treats it opaquely); the seam-side stamped-ness check
13
+ * (`requireStampedEntries`, cli baseline-seams) remains as defense in depth for
14
+ * envelopes assembled without the builder.
15
+ *
16
+ * This lives in `core` because `core` is the only layer every tool already
17
+ * imports and it owns `Signal`; the strategy is pure (no persistence), so it is
18
+ * kernel-safe.
19
+ */
20
+ import type { Signal } from '../types/signal.js';
21
+ /** Maps a {@link Signal} to its stable, opaque baseline identity (ADR-0036). */
22
+ export type FingerprintStrategy = (signal: Signal) => string;
23
+ /**
24
+ * The host default identity: `ruleId | filePath | line | column`.
25
+ *
26
+ * Verbatim shape from graph's `fingerprintSignal` so the host default and
27
+ * graph's byte-preserved strategy are textually identical. Deliberately excludes
28
+ * `message` — a fingerprint is an *identity*, and several rules embed run-varying
29
+ * counts in their message text, which would make the same logical finding
30
+ * fingerprint differently across runs (a spurious "resolved + new" flap).
31
+ *
32
+ * WARNING for tool authors: this strategy collides for any two findings that
33
+ * share ruleId+filePath but lack a stable line/col (e.g. synthetic whole-file
34
+ * nodes like `<module-init>`, or rules that intentionally report at file level
35
+ * with line/col omitted or zero). Tools that emit such findings MUST declare
36
+ * their own `Tool.fingerprintStrategy` (see helpers below or a content hash)
37
+ * or risk baseline ratchet flapping / lost distinct findings.
38
+ */
39
+ export declare const defaultFingerprintStrategy: FingerprintStrategy;
40
+ /**
41
+ * A stable identity for file-level or synthetic (no reliable line/col) findings.
42
+ * Differentiates by ruleId + filePath only. Suitable when the *rule* itself
43
+ * is the distinguishing fact and there is at most one such finding per
44
+ * (rule, file) in a run.
45
+ */
46
+ export declare const fileLevelFingerprintStrategy: FingerprintStrategy;
47
+ /**
48
+ * A content-aware fallback that incorporates a short hash of the message when
49
+ * line/col are absent. This reduces (but does not eliminate) collisions for
50
+ * rules that legitimately emit multiple file-level findings that differ only
51
+ * in the human message text.
52
+ *
53
+ * Tools that care about exact stability should prefer a strategy that hashes
54
+ * the parts of the Signal that are semantically part of "the same finding"
55
+ * (often ruleId + filePath + a normalized key extracted from the finding).
56
+ */
57
+ export declare const contentHashFallbackFingerprintStrategy: FingerprintStrategy;
58
+ /**
59
+ * Stamp `fingerprint` onto each signal using `strategy`, returning new signal
60
+ * objects (spread + override). Called by `buildSignalEnvelope` at
61
+ * envelope-construction time (ADR-0036), BEFORE the envelope reaches a host seam.
62
+ *
63
+ * **Idempotent**: a signal whose `fingerprint` is already a non-empty string is
64
+ * returned unchanged — and a fully pre-stamped array is returned by identity
65
+ * (no re-allocation). This is a safety net (it lets a tool stamp earlier still,
66
+ * e.g. at `createSignal`, without double-hashing), NOT a second stamping point —
67
+ * the host seams only ever READ `signal.fingerprint`.
68
+ */
69
+ export declare function stampFingerprints(signals: readonly Signal[], strategy: FingerprintStrategy): readonly Signal[];
70
+ //# sourceMappingURL=fingerprint-strategy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fingerprint-strategy.d.ts","sourceRoot":"","sources":["../../src/baseline/fingerprint-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,gFAAgF;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,0BAA0B,EAAE,mBACoC,CAAC;AAE9E;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B,EAAE,mBAAwD,CAAC;AAEpG;;;;;;;;;GASG;AACH,eAAO,MAAM,sCAAsC,EAAE,mBAkBpD,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,QAAQ,EAAE,mBAAmB,GAC5B,SAAS,MAAM,EAAE,CAKnB"}
@@ -0,0 +1,90 @@
1
+ /**
2
+ * @fileoverview Fingerprint strategy — the host-owned baseline/ratchet plane's
3
+ * identity primitive (ADR-0036).
4
+ *
5
+ * A `FingerprintStrategy` maps a `Signal` to a stable string identity. Each tool
6
+ * MAY declare one via `Tool.fingerprintStrategy`; a tool that declares nothing
7
+ * inherits {@link defaultFingerprintStrategy}. The fingerprint is stamped onto
8
+ * `Signal.fingerprint` at envelope-construction time: `buildSignalEnvelope`
9
+ * (`@opensip-cli/contracts`) calls {@link stampFingerprints} with the tool's
10
+ * strategy (host default when none is passed), so every built envelope reaches
11
+ * the host seams already stamped. The plane itself NEVER re-fingerprints or
12
+ * re-derives the value (it treats it opaquely); the seam-side stamped-ness check
13
+ * (`requireStampedEntries`, cli baseline-seams) remains as defense in depth for
14
+ * envelopes assembled without the builder.
15
+ *
16
+ * This lives in `core` because `core` is the only layer every tool already
17
+ * imports and it owns `Signal`; the strategy is pure (no persistence), so it is
18
+ * kernel-safe.
19
+ */
20
+ /**
21
+ * The host default identity: `ruleId | filePath | line | column`.
22
+ *
23
+ * Verbatim shape from graph's `fingerprintSignal` so the host default and
24
+ * graph's byte-preserved strategy are textually identical. Deliberately excludes
25
+ * `message` — a fingerprint is an *identity*, and several rules embed run-varying
26
+ * counts in their message text, which would make the same logical finding
27
+ * fingerprint differently across runs (a spurious "resolved + new" flap).
28
+ *
29
+ * WARNING for tool authors: this strategy collides for any two findings that
30
+ * share ruleId+filePath but lack a stable line/col (e.g. synthetic whole-file
31
+ * nodes like `<module-init>`, or rules that intentionally report at file level
32
+ * with line/col omitted or zero). Tools that emit such findings MUST declare
33
+ * their own `Tool.fingerprintStrategy` (see helpers below or a content hash)
34
+ * or risk baseline ratchet flapping / lost distinct findings.
35
+ */
36
+ export const defaultFingerprintStrategy = (s) => `${s.ruleId}|${s.filePath}|${String(s.line ?? 0)}|${String(s.column ?? 0)}`;
37
+ /**
38
+ * A stable identity for file-level or synthetic (no reliable line/col) findings.
39
+ * Differentiates by ruleId + filePath only. Suitable when the *rule* itself
40
+ * is the distinguishing fact and there is at most one such finding per
41
+ * (rule, file) in a run.
42
+ */
43
+ export const fileLevelFingerprintStrategy = (s) => `${s.ruleId}|${s.filePath}`;
44
+ /**
45
+ * A content-aware fallback that incorporates a short hash of the message when
46
+ * line/col are absent. This reduces (but does not eliminate) collisions for
47
+ * rules that legitimately emit multiple file-level findings that differ only
48
+ * in the human message text.
49
+ *
50
+ * Tools that care about exact stability should prefer a strategy that hashes
51
+ * the parts of the Signal that are semantically part of "the same finding"
52
+ * (often ruleId + filePath + a normalized key extracted from the finding).
53
+ */
54
+ export const contentHashFallbackFingerprintStrategy = (s) => {
55
+ // Very small stable hash of message (or empty) to disambiguate file-level variants.
56
+ const msg = s.message ?? '';
57
+ let h = 2_166_136_261;
58
+ for (let i = 0; i < msg.length; i++) {
59
+ const cp = msg.codePointAt(i) ?? 0;
60
+ h ^= cp & 0xff_ff;
61
+ h = Math.imul(h, 16_777_619);
62
+ if (cp > 0xff_ff)
63
+ i += 1;
64
+ }
65
+ const suffix = (h >>> 0).toString(16).padStart(8, '0');
66
+ const line = s.line ?? 0;
67
+ const col = s.column ?? 0;
68
+ // When we have real line/col prefer the default shape; otherwise use file+hash.
69
+ if (line || col) {
70
+ return defaultFingerprintStrategy(s);
71
+ }
72
+ return `${s.ruleId}|${s.filePath}|${suffix}`;
73
+ };
74
+ /**
75
+ * Stamp `fingerprint` onto each signal using `strategy`, returning new signal
76
+ * objects (spread + override). Called by `buildSignalEnvelope` at
77
+ * envelope-construction time (ADR-0036), BEFORE the envelope reaches a host seam.
78
+ *
79
+ * **Idempotent**: a signal whose `fingerprint` is already a non-empty string is
80
+ * returned unchanged — and a fully pre-stamped array is returned by identity
81
+ * (no re-allocation). This is a safety net (it lets a tool stamp earlier still,
82
+ * e.g. at `createSignal`, without double-hashing), NOT a second stamping point —
83
+ * the host seams only ever READ `signal.fingerprint`.
84
+ */
85
+ export function stampFingerprints(signals, strategy) {
86
+ if (signals.every((signal) => signal.fingerprint))
87
+ return signals;
88
+ return signals.map((signal) => signal.fingerprint ? signal : { ...signal, fingerprint: strategy(signal) });
89
+ }
90
+ //# sourceMappingURL=fingerprint-strategy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fingerprint-strategy.js","sourceRoot":"","sources":["../../src/baseline/fingerprint-strategy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAwB,CAAC,CAAC,EAAE,EAAE,CACnE,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,IAAI,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,EAAE,CAAC;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAwB,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC;AAEpG;;;;;;;;;GASG;AACH,MAAM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AC,CAAC,MAAM,EAAE,EAAE,CAC5B,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAC3E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @fileoverview Resolve the path to opensip-cli.config.yml.
3
+ *
4
+ * Resolution order (first match wins):
5
+ * 1. Explicit path — passed from --config CLI flag or programmatic caller.
6
+ * 2. package.json — `opensip-cli.configPath` field at <rootDir>/package.json.
7
+ * 3. Default — <rootDir>/opensip-cli.config.yml.
8
+ *
9
+ * Throws ValidationError if none of the above resolve to an existing file.
10
+ * This is intentional: running fitness checks with no config silently
11
+ * produces zero findings (file-based checks get zero files), which looks
12
+ * green but actually didn't run anything.
13
+ */
14
+ /** Canonical filename for the opensip-cli project config. */
15
+ export declare const PROJECT_CONFIG_FILENAME = "opensip-cli.config.yml";
16
+ /**
17
+ * Resolve the config file path for a given rootDir.
18
+ *
19
+ * @param rootDir - Absolute path to the project root.
20
+ * @param explicitPath - Optional path from `--config` CLI flag. May be
21
+ * absolute or relative to `rootDir`.
22
+ * @throws {ValidationError} When no config file exists at any resolved
23
+ * location. The error message enumerates every path attempted so
24
+ * operators can diagnose without re-running with --debug.
25
+ */
26
+ export declare function resolveProjectConfigPath(rootDir: string, explicitPath?: string): string;
27
+ //# sourceMappingURL=config-resolution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-resolution.d.ts","sourceRoot":"","sources":["../src/config-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,6DAA6D;AAC7D,eAAO,MAAM,uBAAuB,2BAA2B,CAAC;AAiChE;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,MAAM,CAwCvF"}
@@ -0,0 +1,92 @@
1
+ /**
2
+ * @fileoverview Resolve the path to opensip-cli.config.yml.
3
+ *
4
+ * Resolution order (first match wins):
5
+ * 1. Explicit path — passed from --config CLI flag or programmatic caller.
6
+ * 2. package.json — `opensip-cli.configPath` field at <rootDir>/package.json.
7
+ * 3. Default — <rootDir>/opensip-cli.config.yml.
8
+ *
9
+ * Throws ValidationError if none of the above resolve to an existing file.
10
+ * This is intentional: running fitness checks with no config silently
11
+ * produces zero findings (file-based checks get zero files), which looks
12
+ * green but actually didn't run anything.
13
+ */
14
+ import { existsSync, readFileSync } from 'node:fs';
15
+ import { isAbsolute, join, resolve } from 'node:path';
16
+ import { ValidationError } from './lib/errors.js';
17
+ /** Canonical filename for the opensip-cli project config. */
18
+ export const PROJECT_CONFIG_FILENAME = 'opensip-cli.config.yml';
19
+ /** Key read from package.json to locate a non-default config path. */
20
+ const PKG_JSON_POINTER_FIELD = 'opensip-cli';
21
+ const PKG_JSON_POINTER_SUBFIELD = 'configPath';
22
+ /** Read `configPath` from <rootDir>/package.json. Returns null when absent. */
23
+ function readConfigPathFromPackageJson(rootDir) {
24
+ const pkgPath = join(rootDir, 'package.json');
25
+ if (!existsSync(pkgPath))
26
+ return null;
27
+ let parsed;
28
+ try {
29
+ parsed = JSON.parse(readFileSync(pkgPath, 'utf8'));
30
+ }
31
+ catch {
32
+ // Malformed package.json is the user's problem to fix — don't
33
+ // silently mask it with a config-resolution error. The subsequent
34
+ // fall-through to the default path will succeed or fail as usual.
35
+ // @fitness-ignore-next-line error-handling-quality -- intentional swallow: malformed package.json surfaces via null return (see preceding comment).
36
+ return null;
37
+ }
38
+ if (typeof parsed !== 'object' || parsed === null)
39
+ return null;
40
+ const root = parsed;
41
+ const toolSection = root[PKG_JSON_POINTER_FIELD];
42
+ if (typeof toolSection !== 'object' || toolSection === null)
43
+ return null;
44
+ const section = toolSection;
45
+ const raw = section[PKG_JSON_POINTER_SUBFIELD];
46
+ if (typeof raw !== 'string' || raw.length === 0)
47
+ return null;
48
+ return raw;
49
+ }
50
+ /**
51
+ * Resolve the config file path for a given rootDir.
52
+ *
53
+ * @param rootDir - Absolute path to the project root.
54
+ * @param explicitPath - Optional path from `--config` CLI flag. May be
55
+ * absolute or relative to `rootDir`.
56
+ * @throws {ValidationError} When no config file exists at any resolved
57
+ * location. The error message enumerates every path attempted so
58
+ * operators can diagnose without re-running with --debug.
59
+ */
60
+ export function resolveProjectConfigPath(rootDir, explicitPath) {
61
+ const attempts = [];
62
+ // 1. --config flag (explicit)
63
+ if (explicitPath && explicitPath.length > 0) {
64
+ const resolved = isAbsolute(explicitPath) ? explicitPath : resolve(rootDir, explicitPath);
65
+ attempts.push(`--config ${resolved}`);
66
+ if (existsSync(resolved))
67
+ return resolved;
68
+ throw new ValidationError(`Config path from --config flag does not exist: ${resolved}`, {
69
+ operation: 'resolve',
70
+ loader: 'project-config',
71
+ });
72
+ }
73
+ // 2. package.json#opensip-cli.configPath
74
+ const pointerRaw = readConfigPathFromPackageJson(rootDir);
75
+ if (pointerRaw) {
76
+ const resolved = isAbsolute(pointerRaw) ? pointerRaw : resolve(rootDir, pointerRaw);
77
+ attempts.push(`package.json#${PKG_JSON_POINTER_FIELD}.${PKG_JSON_POINTER_SUBFIELD} → ${resolved}`);
78
+ if (existsSync(resolved))
79
+ return resolved;
80
+ throw new ValidationError(`package.json "${PKG_JSON_POINTER_FIELD}.${PKG_JSON_POINTER_SUBFIELD}" points to a file that does not exist: ${resolved}`, { operation: 'resolve', loader: 'project-config' });
81
+ }
82
+ // 3. Default: <rootDir>/opensip-cli.config.yml
83
+ const defaultPath = join(rootDir, PROJECT_CONFIG_FILENAME);
84
+ attempts.push(defaultPath);
85
+ if (existsSync(defaultPath))
86
+ return defaultPath;
87
+ throw new ValidationError(`No ${PROJECT_CONFIG_FILENAME} found. Checked:\n` +
88
+ attempts.map((a) => ` - ${a}`).join('\n') +
89
+ `\n\nRun 'opensip init' to scaffold one, or pass --config <path> ` +
90
+ `to point at an existing config.`, { operation: 'resolve', loader: 'project-config', code: 'ERRORS.CONFIG.NOT_FOUND' });
91
+ }
92
+ //# sourceMappingURL=config-resolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-resolution.js","sourceRoot":"","sources":["../src/config-resolution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,uBAAuB,GAAG,wBAAwB,CAAC;AAEhE,sEAAsE;AACtE,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAC7C,MAAM,yBAAyB,GAAG,YAAY,CAAC;AAE/C,+EAA+E;AAC/E,SAAS,6BAA6B,CAAC,OAAe;IACpD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IAC9C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,IAAI,CAAC;IAEtC,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;IACrD,CAAC;IAAC,MAAM,CAAC;QACP,8DAA8D;QAC9D,kEAAkE;QAClE,kEAAkE;QAClE,oJAAoJ;QACpJ,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/D,MAAM,IAAI,GAAG,MAAiC,CAAC;IAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACjD,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,WAAW,KAAK,IAAI;QAAE,OAAO,IAAI,CAA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Ae,CACvB,iBAAiB,sBAAsB,IAAI,yBAAyB,2CAA2C,QAAQ,EAAE,EACzH,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,CACnD,CAAC;IACJ,CAAC;IAED,+CAA+C;IAC/C,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC;IAC3D,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC3B,IAAI,UAAU,CAAC,WAAW,CAAC;QAAE,OAAO,WAAW,CAAC;IAEhD,MAAM,IAAI,eAAe,CACvB,MAAM,uBAAuB,oBAAoB;QAC/C,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC1C,kEAAkE;QAClE,iCAAiC,EACnC,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,yBAAyB,EAAE,CACpF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,81 @@
1
+ export type { Signal, SignalSeverity, SignalCategory, CreateSignalInput, FixHint, } from './types/signal.js';
2
+ export { createSignal, isErrorSeverity, isErrorSignal } from './types/signal.js';
3
+ export { SeverityPolicy } from './lib/severity-policy.js';
4
+ export type { AuthorSeverity } from './lib/severity-policy.js';
5
+ export { HOST_VERDICT_POLICY_FALLBACK, policyPasses, resolveVerdictPolicy, DEFAULT_FAIL_ON_DEGRADED, resolveFailOnDegraded, } from './lib/verdict-policy.js';
6
+ export type { VerdictPolicy } from './lib/verdict-policy.js';
7
+ export { contentHashFallbackFingerprintStrategy, defaultFingerprintStrategy, fileLevelFingerprintStrategy, stampFingerprints, } from './baseline/fingerprint-strategy.js';
8
+ export type { FingerprintStrategy } from './baseline/fingerprint-strategy.js';
9
+ export { createSignalFromViolation } from './signals/create-signal-from-violation.js';
10
+ export type { ViolationInput } from './signals/create-signal-from-violation.js';
11
+ export type { SignalBatch, RepoIdentity, BuildSignalBatchInput } from './types/signal-batch.js';
12
+ export { buildSignalBatch, MAX_SIGNALS_PER_BATCH } from './types/signal-batch.js';
13
+ export type { SignalSink, EmitResult } from './signals/signal-sink.js';
14
+ export { noopSignalSink } from './signals/signal-sink.js';
15
+ export { filterSignalsBySuppressions, scanSuppressionDirectives } from './signals/suppress.js';
16
+ export type { SuppressionKeywords, SuppressionLocation, SuppressionRequest, SuppressionMatch, SuppressionResult, SuppressionScan, } from './signals/suppress.js';
17
+ export { COMMENT_OPENERS, stripCommentOpener } from './signals/comment-openers.js';
18
+ export { createInProcessTransport } from './runtime/in-process-transport.js';
19
+ export { createSubprocessProgressRun, runOffThreadOrInProcess, } from './runtime/subprocess-transport.js';
20
+ export type { ProgressTransport, ProgressRun, ProgressJob, SubprocessJobDescriptor, WorkerMessage, } from './runtime/progress-transport.js';
21
+ export * from './languages/index.js';
22
+ export { PROJECT_CONFIG_FILENAME, resolveProjectConfigPath } from './config-resolution.js';
23
+ export { discoverPlugins, readProjectPluginsList, resolvePackageEntryPoint, discoverToolPackages, discoverToolPackagesFromAnchors, readToolPackageMetadata, discoverPackagesByMarker, discoverPackagesByDeclaredKind, discoverPackagesInNodeModules, isMarkerKind, readMarkerKind, readDeclaredKind, MARKER_KINDS, discoverScopedPackages, discoverCapabilityContributions, isRecord, isStringArray, hasPackageJson, resolvePackageDir, registerRecipesFromMod, loadPlugin, loadAllPlugins, resolveScopes, VALID_NPM_SCOPE_REGEX, loadToolManifest, admitTool, discoverAuthoredToolSidecars, registerCapabilityDomainsFromManifest, PROJECT_LOCAL_MANIFEST_FILE, CapabilityRegistry, createCapabilityRegistry, currentCapabilityRegistry, loadCapabilityDomain, } from './plugins/index.js';
24
+ export type { AdmissionResult, AuthoredToolCandidate, CapabilityRegistrar, LoadCapabilityDomainOptions, PluginLayout, DiscoveredPlugin, LoadedPlugin, PluginLoadResult, LangPluginExports, PluginExports, PackageEntryResolution, ToolPackageDiscoveryOptions, ToolDiscoverySource, DiscoveredToolPackage, ToolPackageMetadata, MarkerKind, MarkerDiscoveryOptions, DiscoveredMarkerPackage, DiscoveredDeclaredPackage, DiscoveredScopedPackage, DiscoverScopedPackagesOptions, CapabilityDiscoveryPreferences, RawCapabilityContribution, CapabilityDiscoveryDiagnostic, DiscoverCapabilityContributionsOptions, RegisterRecipesOptions, RegisterRecipesResult, RegisterCtx, RegisteredCounts, RegisterExportsFn, } from './plugins/index.js';
25
+ export { ToolRegistry, UnknownLiveViewError, TOOL_CONTRACT_VERSION } from './tools/index.js';
26
+ export type { Tool, ToolMetadata, ToolCommandDescriptor, ToolConfigContribution, ToolCliContext, GateCompareResult, SignalDeliveryResult, ScaffoldContext, ScaffoldFile, ToolPluginExports, ToolSessionRecord, ToolSessionReplayContribution, ToolExtensionPoints, LiveViewRenderer, LiveViewContext, ToolRunSessionInput, ToolSessionContribution, ToolRunCompletion, RecordedToolRunSession, ToolRunSessions, HostGovernance, HostAudit, HostEntitlements, } from './tools/index.js';
27
+ export { PLUGIN_API_VERSION } from './tools/index.js';
28
+ export type { RawToolPluginManifest, ToolPluginManifest, ToolCommandManifest, ToolProvenance, ToolSource, } from './tools/index.js';
29
+ export { defineCommand, COMMON_FLAG_KEYS, RAW_STREAM_REASONS } from './tools/index.js';
30
+ export type { CommandSpec, OptionSpec, ArgSpec, CommandHandler, CommandContext, CommandOutputMode, CommandScopeRequirement, CommonFlagKey, RawStreamReason, } from './tools/index.js';
31
+ export { isCapabilityValidator, isStructuralContributionSchema } from './tools/index.js';
32
+ export type { CapabilityDomainSpec, CapabilityContributionKind, CapabilityDiscoveryDescriptor, CapabilityDiscoveryMode, CapabilityCoContribution, CapabilityValidator, StructuralContributionSchema, ToolCapabilityDeclaration, } from './tools/index.js';
33
+ export { checkCompatibility } from './tools/index.js';
34
+ export type { CompatibilityVerdict } from './tools/index.js';
35
+ export { assertManifestMatchesTool } from './tools/index.js';
36
+ export { TOOL_LONG_IDS, TOOL_LONG_TO_SHORT, TOOL_SHORT_IDS, TOOL_SHORT_TO_LONG, isToolLongId, isToolShortId, } from './tools/index.js';
37
+ export type { ToolLongId, ToolShortId } from './tools/index.js';
38
+ export { RecipeRegistry } from './recipes/registry.js';
39
+ export type { RecipeBase, RecipeRegisterOptions, RecipeRegistryOptions, } from './recipes/registry.js';
40
+ export { resolveSelector } from './recipes/selector.js';
41
+ export type { RecipeSelector, ExplicitSelector, AllSelector, TagsSelector, PatternSelector, ResolveSelectorOptions, } from './recipes/selector.js';
42
+ export { getUnitConfig, setCurrentRecipeUnitConfig, clearCurrentRecipeUnitConfig, } from './recipes/unit-config.js';
43
+ export type { RecipeUnitConfigMap } from './recipes/unit-config.js';
44
+ export { Registry } from './lib/registry.js';
45
+ export type { DuplicatePolicy, Registerable, RegistryOptions, RegisterCallOptions, } from './lib/registry.js';
46
+ export { RunScope, runWithScope, runWithScopeSync, enterScope, currentScope, } from './lib/run-scope.js';
47
+ export type { RunScopeOptions } from './lib/run-scope.js';
48
+ export type { RecipeUnitConfigSlot, DataStoreThunk, ToolScope, ScopeContribution, ResolvedToolConfig, TargetResolver, TargetView, } from './lib/scope-types.js';
49
+ export { ToolError, ValidationError, NotFoundError, SystemError, TimeoutError, NetworkError, ConfigurationError, PluginIncompatibleError, UnknownCapabilityDomainError, CapabilitySchemaMismatchError, } from './lib/errors.js';
50
+ export { ok, err, tryCatchAsync, tryCatch } from './lib/errors.js';
51
+ export type { Result, ToolErrorCode, ToolErrorOptions } from './lib/errors.js';
52
+ export { logger, LoggerImpl, configureLogger } from './lib/logger.js';
53
+ export type { Logger, LogLevel, LoggerOptions, RunIdProvider } from './lib/logger.js';
54
+ export { getTracer, withSpan, withSpanAsync, currentTraceparent, getMeter, } from './lib/telemetry.js';
55
+ export type { Span, Attributes, Tracer } from '@opentelemetry/api';
56
+ export { EnvRegistry } from './lib/env-registry.js';
57
+ export type { EnvVarSpec, EnvDeprecation, EnvReadResult } from './lib/env-registry.js';
58
+ export { DiagnosticsBus } from './lib/diagnostics-bus.js';
59
+ export type { RunDiagnostics, DiagnosticEvent, DiagnosticPhase, DiagnosticLevel, } from './lib/run-diagnostics.js';
60
+ export { readYamlFile, readYamlFileOrThrow } from './lib/yaml.js';
61
+ export type { ReadYamlFileOrThrowOptions } from './lib/yaml.js';
62
+ export { generateId, generatePrefixedId, extractTimestamp, generateUUID } from './lib/ids.js';
63
+ export { extractPayloadVersion } from './lib/payload-version.js';
64
+ export { withRetry } from './lib/retry.js';
65
+ export type { RetryOptions } from './lib/retry.js';
66
+ export { scheduleUnits, yieldToEventLoop, runWithTimeout, runWithRetry, executePipeline, } from './lib/execution/index.js';
67
+ export type { ScheduleUnitsOptions, UnitRunOutcome, RunWithTimeoutOptions, PipelineRetryOptions, PipelineRetryOutcome, ExecutePipelineOptions, WorkflowExecutionOptions, WorkflowRetryOptions, } from './lib/execution/index.js';
68
+ export { deriveRecipeId } from './lib/recipe-id.js';
69
+ export { readPackageVersion } from './lib/package-version.js';
70
+ export { formatDuration } from './lib/format.js';
71
+ export { createRunTimer, createRunLifecycle } from './lib/run-timer.js';
72
+ export type { RunTimer, RunLifecycle, RunTimingSnapshot } from './lib/run-timer.js';
73
+ export { resolveProjectPaths, resolveUserPaths, isPathInside } from './lib/paths.js';
74
+ export type { ProjectPaths, UserPaths, PathDomain } from './lib/paths.js';
75
+ export { resolveProjectContext } from './lib/project-context.js';
76
+ export type { ProjectContext, ResolveProjectContextInput } from './lib/project-context.js';
77
+ export type { UiContext } from './lib/ui-context.js';
78
+ export { CLI_SUPPORTED_SCHEMA_VERSION, readConfigSchemaVersion, checkSchemaCompat, } from './lib/config-version.js';
79
+ export type { SchemaCompat } from './lib/config-version.js';
80
+ export { detectPhantomRuntimes } from './lib/phantom-detect.js';
81
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EACV,MAAM,EACN,cAAc,EACd,cAAc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AA0B,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAIpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK9D,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAOjD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAKpF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACrF,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAO1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,YAAY,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAK3F,YAAY,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKrD,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,165 @@
1
+ export { createSignal, isErrorSeverity, isErrorSignal } from './types/signal.js';
2
+ // Severity & Signal policy (north-star §5.9, launch). One home for
3
+ // author→wire severity mapping + the override clamp + the gate's error/warning
4
+ // predicate, plus the generic identity-stamping factory `createSignalFromViolation`
5
+ // (so tools stamp source/ruleId/severity instead of retyping them).
6
+ export { SeverityPolicy } from './lib/severity-policy.js';
7
+ // Host-owned findings verdict policy (ADR-0035): the reserved
8
+ // failOnErrors/failOnWarnings gate, its pure predicate, and the per-tool resolver.
9
+ export { HOST_VERDICT_POLICY_FALLBACK, policyPasses, resolveVerdictPolicy, DEFAULT_FAIL_ON_DEGRADED, resolveFailOnDegraded, } from './lib/verdict-policy.js';
10
+ // Host-owned baseline/ratchet plane (ADR-0036): the per-tool fingerprint
11
+ // strategy primitive, the host default identity, and the stamp helper.
12
+ export { contentHashFallbackFingerprintStrategy, defaultFingerprintStrategy, fileLevelFingerprintStrategy, stampFingerprints, } from './baseline/fingerprint-strategy.js';
13
+ export { createSignalFromViolation } from './signals/create-signal-from-violation.js';
14
+ export { buildSignalBatch, MAX_SIGNALS_PER_BATCH } from './types/signal-batch.js';
15
+ export { noopSignalSink } from './signals/signal-sink.js';
16
+ // Inline suppression primitive (ADR-0014) — shared `@x-ignore-*` machinery
17
+ export { filterSignalsBySuppressions, scanSuppressionDirectives } from './signals/suppress.js';
18
+ export { COMMENT_OPENERS, stripCommentOpener } from './signals/comment-openers.js';
19
+ // Runtime — live-run progress transport seam (ADR-0016). Generic over the event
20
+ // type so the kernel never names cli-ui's concrete ProgressEvent.
21
+ export { createInProcessTransport } from './runtime/in-process-transport.js';
22
+ export { createSubprocessProgressRun, runOffThreadOrInProcess, } from './runtime/subprocess-transport.js';
23
+ // Languages — cross-language adapter API
24
+ export * from './languages/index.js';
25
+ // Project config resolution
26
+ export { PROJECT_CONFIG_FILENAME, resolveProjectConfigPath } from './config-resolution.js';
27
+ // Plugins
28
+ export { discoverPlugins, readProjectPluginsList, resolvePackageEntryPoint, discoverToolPackages, discoverToolPackagesFromAnchors, readToolPackageMetadata, discoverPackagesByMarker, discoverPackagesByDeclaredKind, discoverPackagesInNodeModules, isMarkerKind, readMarkerKind, readDeclaredKind, MARKER_KINDS, discoverScopedPackages, discoverCapabilityContributions, isRecord, isStringArray, hasPackageJson, resolvePackageDir, registerRecipesFromMod, loadPlugin, loadAllPlugins, resolveScopes, VALID_NPM_SCOPE_REGEX, loadToolManifest, admitTool, discoverAuthoredToolSidecars, registerCapabilityDomainsFromManifest, PROJECT_LOCAL_MANIFEST_FILE, CapabilityRegistry, createCapabilityRegistry, currentCapabilityRegistry, loadCapabilityDomain, } from './plugins/index.js';
29
+ // Tools — kernel-level Tool plugin contract.
30
+ // (discoverToolPackages and friends live under plugins/ and are
31
+ // re-exported above; the Tool / Registry types are tool-shape, not
32
+ // plugin-discovery-shape, hence the separate barrel.)
33
+ export { ToolRegistry, UnknownLiveViewError, TOOL_CONTRACT_VERSION } from './tools/index.js';
34
+ // Static tool-plugin manifest + the plugin-API epoch + provenance types
35
+ // (launch raw-vs-admitted contract). Re-exported by @opensip-cli/
36
+ // contracts for the public surface.
37
+ export { PLUGIN_API_VERSION } from './tools/index.js';
38
+ // Command-plane types (launch, §5.4): the declarative CommandSpec a tool
39
+ // exports for the host to mount, plus the pure CommonFlagKey key type. The
40
+ // Commander-touching applyCommonFlags runtime stays in @opensip-cli/contracts,
41
+ // which re-exports CommonFlagKey from here. Re-exported by contracts.
42
+ export { defineCommand, COMMON_FLAG_KEYS, RAW_STREAM_REASONS } from './tools/index.js';
43
+ // Capability domain model (launch, §5.3): the data shape a tool
44
+ // uses to declare an extension point it owns. The scope-owned runtime
45
+ // registry is exported from ./plugins/index.js below. Re-exported by
46
+ // @opensip-cli/contracts for the public surface.
47
+ export { isCapabilityValidator, isStructuralContributionSchema } from './tools/index.js';
48
+ // The single pure compatibility gate shared by the bundled + external
49
+ // admission paths. Re-exported by @opensip-cli/contracts.
50
+ export { checkCompatibility } from './tools/index.js';
51
+ // Load-time manifest⇔Tool drift guard.
52
+ export { assertManifestMatchesTool } from './tools/index.js';
53
+ export { TOOL_LONG_IDS, TOOL_LONG_TO_SHORT, TOOL_SHORT_IDS, TOOL_SHORT_TO_LONG, isToolLongId, isToolShortId, } from './tools/index.js';
54
+ // Recipes — generic recipe registry shared by fitness + simulation.
55
+ export { RecipeRegistry } from './recipes/registry.js';
56
+ // Recipes — generic selector union + resolver (selection half of the
57
+ // substrate; execution stays tool-owned).
58
+ export { resolveSelector } from './recipes/selector.js';
59
+ // Recipes — per-unit config-override accessors + map type.
60
+ export { getUnitConfig, setCurrentRecipeUnitConfig, clearCurrentRecipeUnitConfig, } from './recipes/unit-config.js';
61
+ // Generic `Registry<T>` — the unified base for every registry in the
62
+ // workspace. Replaces the ten registry classes catalogued in the
63
+ // runscope+registry plan's Phase 0. See `lib/registry.ts` for the
64
+ // full design rationale + the closed `DuplicatePolicy` union.
65
+ //
66
+ // `Registerable` is the minimum shape every registry item must
67
+ // satisfy: `{ id, name, tags? }`. The historical `IdNameTagRegistry`
68
+ // has been deleted; consumers use `Registry<T>` directly with
69
+ // `duplicatePolicy: 'silent-skip'` + `nameCollisionMode: 'throw'`
70
+ // for the same dual-key semantics.
71
+ export { Registry } from './lib/registry.js';
72
+ // RunScope — per-invocation execution scope. Owns the lifecycle of
73
+ // every singleton the codebase previously hung on module-level state
74
+ // (logger, caches, registries, recipe-config slot, project context,
75
+ // datastore thunk). See `lib/run-scope.ts` for the AsyncLocalStorage
76
+ // seam and the two-copies-of-fitness hazard resolution.
77
+ export { RunScope, runWithScope, runWithScopeSync, enterScope, currentScope, } from './lib/run-scope.js';
78
+ // Lib — errors + Result pattern
79
+ export { ToolError, ValidationError, NotFoundError, SystemError, TimeoutError, NetworkError, ConfigurationError, PluginIncompatibleError, UnknownCapabilityDomainError, CapabilitySchemaMismatchError, } from './lib/errors.js';
80
+ export { ok, err, tryCatchAsync, tryCatch } from './lib/errors.js';
81
+ // Lib — logger.
82
+ //
83
+ // Production callers should import the typed `logger` singleton +
84
+ // helper functions; `LoggerImpl` is exported for tests (and tools
85
+ // that need an isolated logger) — advanced / discouraged for
86
+ // general use, see the file-level docstring on lib/logger.ts.
87
+ // `getRunId()` free function was removed in Item 2 — read
88
+ // `currentScope()?.runId` instead. The instance methods
89
+ // `LoggerImpl.{get,set}RunId` survive for isolated-instance test use.
90
+ export { logger, LoggerImpl, configureLogger } from './lib/logger.js';
91
+ // Lib — telemetry (tracing). The kernel sibling of `logger`: a thin seam over
92
+ // the OpenTelemetry *API* (`@opentelemetry/api`) only. No-op until an SDK
93
+ // registers a global provider at the application boundary (the CLI). Tools emit
94
+ // spans via `withSpan` and reach span types through this barrel so they never
95
+ // import `@opentelemetry/api` directly — the kernel is the single seam.
96
+ export { getTracer, withSpan, withSpanAsync, currentTraceparent, getMeter, } from './lib/telemetry.js';
97
+ // Lib — environment registry (north-star §5.12, launch). The kernel
98
+ // observability primitive that governs the env surface: a tool/host declares an
99
+ // `EnvVarSpec` (canonical name, aliases, coercion, default, docs, deprecation) and
100
+ // every env read flows through `EnvRegistry.get`. Reading `process.env` inside
101
+ // this primitive is the one sanctioned site; the `env-via-registry` guardrail
102
+ // fails CI on raw reads elsewhere. The immutable definition table lets a static
103
+ // instance serve the pre-scope readers (theme, graph heap-preflight).
104
+ export { EnvRegistry } from './lib/env-registry.js';
105
+ // Lib — run diagnostics (north-star §5.10, launch). The shared,
106
+ // JSON-emittable diagnostics vocabulary carried on a `CommandOutcome`, produced
107
+ // by the scope-owned `DiagnosticsBus`. Types DEFINED here (the bus that produces
108
+ // them is here; contracts re-exports the types for `CommandOutcome`).
109
+ export { DiagnosticsBus } from './lib/diagnostics-bus.js';
110
+ // Lib — permissive YAML reader (returns undefined on missing/malformed
111
+ // files). Used by plugin-discovery sites that need to peek at a single
112
+ // field of opensip-cli.config.yml without dragging in a Zod schema.
113
+ // Advanced / discouraged for general use — tools that need structured
114
+ // parse errors should use `readYamlFileOrThrow` instead, or build their
115
+ // own dedicated loader (see fitness's targets/loader.ts for a
116
+ // schema-validating example).
117
+ export { readYamlFile, readYamlFileOrThrow } from './lib/yaml.js';
118
+ // Lib — IDs
119
+ export { generateId, generatePrefixedId, extractTimestamp, generateUUID } from './lib/ids.js';
120
+ // Lib — payload version extraction (inner __version convention for
121
+ // tool-owned opaque session payloads and toolState). Pure function with
122
+ // no knowledge of any tool payload shape. Used by decode/hydrate/replay
123
+ // paths and by tools for their own state versioning.
124
+ export { extractPayloadVersion } from './lib/payload-version.js';
125
+ // Lib — retry
126
+ export { withRetry } from './lib/retry.js';
127
+ // Lib — execution substrate (north-star §5.8, launch). One bounded
128
+ // scheduler + per-unit timeout/retry that fit + sim recipes run on, so
129
+ // timeout/maxParallel/stopOnFirstFailure mean the same thing in every domain
130
+ // (and a declared `timeout` actually aborts — the §4.3 sim fix). Plus the shared
131
+ // `deriveRecipeId` (one `<prefix>_<name>` scheme across domains).
132
+ export { scheduleUnits, yieldToEventLoop, runWithTimeout, runWithRetry, executePipeline, } from './lib/execution/index.js';
133
+ export { deriveRecipeId } from './lib/recipe-id.js';
134
+ // Lib — package-version reader (used by first-party Tools to set
135
+ // metadata.version without duplicating the literal in source).
136
+ export { readPackageVersion } from './lib/package-version.js';
137
+ // Lib — shared presentation formatters (duration, …) used by more than one
138
+ // tool's CLI/report layer; centralized here since tools cannot depend on
139
+ // each other.
140
+ export { formatDuration } from './lib/format.js';
141
+ // Lib — host-owned run timer (host-owned-run-timing). The single
142
+ // RunTimer created by the CLI host at the command boundary; exposed to
143
+ // tools exclusively via ToolCliContext.runSession.timing (and via the
144
+ // optional LiveViewContext second arg to live renderers). Tools must
145
+ // not construct their own for StoredSession timing.
146
+ export { createRunTimer, createRunLifecycle } from './lib/run-timer.js';
147
+ // Lib — path resolver (project-local opensip-cli/.runtime, user-level
148
+ // ~/.opensip-cli/config.yml). Every consumer constructs paths through
149
+ // this module so a layout change is a single-file edit.
150
+ export { resolveProjectPaths, resolveUserPaths, isPathInside } from './lib/paths.js';
151
+ // Lib — project-context resolver. One-shot ancestor walk from cwd to
152
+ // the nearest opensip-cli.config.yml. Returns a ProjectContext that
153
+ // every downstream consumer (CLI bootstrap, tool action handlers,
154
+ // uninstall/init/dashboard) reads from instead of re-deriving cwd
155
+ // semantics.
156
+ export { resolveProjectContext } from './lib/project-context.js';
157
+ // Lib — config schemaVersion. Permissive top-level field reader +
158
+ // CLI/config compatibility classifier. Used by pre-action-hook for
159
+ // upgrade-mismatch detection.
160
+ export { CLI_SUPPORTED_SCHEMA_VERSION, readConfigSchemaVersion, checkSchemaCompat, } from './lib/config-version.js';
161
+ // Lib — phantom-dir detector. Warns about orphaned opensip-cli/
162
+ // subtrees left over from pre-discovery runs. Returns paths; callers
163
+ // surface them; never auto-deletes.
164
+ export { detectPhantomRuntimes } from './lib/phantom-detect.js';
165
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjF,mEAAmE;AACnE,+EAA+E;AAC/E,oFAAoF;AACpF,oEAAoE;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE1D,8DAA8D;AAC9D,mFAAmF;AACnF,OAAO,EACL,4BAA4B,EAC5B,YAAY,EACZ,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,yBAAyB,CAAC;AAEjC,yEAAyE;AACzE,uEAAuE;AACvE,OAAO,EACL,sCAAsC,EACtC,0BAA0B,EAC1B,4BAA4B,EAC5B,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAItF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGlF,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,2EAA2E;AAC3E,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAS/F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAEnF,gFAAgF;AAChF,kEAAkE;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,GACxB,MAAM,mCAAmC,CAAC;AAS3C,yCAAyC;AACzC,cAAc,sBAAsB,CAAC;AAErC,4BAA4B;AAC5B,OA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AC;AAEjD,iEAAiE;AACjE,uEAAuE;AACvE,sEAAsE;AACtE,qEAAqE;AACrE,oDAAoD;AACpD,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxE,sEAAsE;AACtE,sEAAsE;AACtE,wDAAwD;AACxD,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAGrF,qEAAqE;AACrE,oEAAoE;AACpE,kEAAkE;AAClE,kEAAkE;AAClE,aAAa;AACb,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAQjE,kEAAkE;AAClE,mEAAmE;AACnE,8BAA8B;AAC9B,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AAGjC,gEAAgE;AAChE,qEAAqE;AACrE,oCAAoC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=content-filter-dispatch.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"content-filter-dispatch.test.d.ts","sourceRoot":"","sources":["../../../src/languages/__tests__/content-filter-dispatch.test.ts"],"names":[],"mappings":""}