@vibesdotdev/security 0.0.0-stage → 1.0.0-rc.4

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 (342) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +109 -2
  3. package/dist/cli/index.d.ts +2 -0
  4. package/dist/cli/index.d.ts.map +1 -0
  5. package/dist/cli/index.js +2 -0
  6. package/dist/cli/index.js.map +1 -0
  7. package/dist/cli/plugin.d.ts +15 -0
  8. package/dist/cli/plugin.d.ts.map +1 -0
  9. package/dist/cli/plugin.js +25 -0
  10. package/dist/cli/plugin.js.map +1 -0
  11. package/dist/cli/read-lockfile.d.ts +4 -0
  12. package/dist/cli/read-lockfile.d.ts.map +1 -0
  13. package/dist/cli/read-lockfile.js +74 -0
  14. package/dist/cli/read-lockfile.js.map +1 -0
  15. package/dist/cli/report-output.d.ts +20 -0
  16. package/dist/cli/report-output.d.ts.map +1 -0
  17. package/dist/cli/report-output.js +27 -0
  18. package/dist/cli/report-output.js.map +1 -0
  19. package/dist/cli/shield.cli-group.descriptor.d.ts +9 -0
  20. package/dist/cli/shield.cli-group.descriptor.d.ts.map +1 -0
  21. package/dist/cli/shield.cli-group.descriptor.js +16 -0
  22. package/dist/cli/shield.cli-group.descriptor.js.map +1 -0
  23. package/dist/cli/shield.deps.cli-group.descriptor.d.ts +9 -0
  24. package/dist/cli/shield.deps.cli-group.descriptor.d.ts.map +1 -0
  25. package/dist/cli/shield.deps.cli-group.descriptor.js +17 -0
  26. package/dist/cli/shield.deps.cli-group.descriptor.js.map +1 -0
  27. package/dist/cli/shield.deps.gate.descriptor.d.ts +10 -0
  28. package/dist/cli/shield.deps.gate.descriptor.d.ts.map +1 -0
  29. package/dist/cli/shield.deps.gate.descriptor.js +25 -0
  30. package/dist/cli/shield.deps.gate.descriptor.js.map +1 -0
  31. package/dist/cli/shield.deps.gate.impl.consumer.d.ts +18 -0
  32. package/dist/cli/shield.deps.gate.impl.consumer.d.ts.map +1 -0
  33. package/dist/cli/shield.deps.gate.impl.consumer.js +42 -0
  34. package/dist/cli/shield.deps.gate.impl.consumer.js.map +1 -0
  35. package/dist/cli/shield.deps.scan.descriptor.d.ts +10 -0
  36. package/dist/cli/shield.deps.scan.descriptor.d.ts.map +1 -0
  37. package/dist/cli/shield.deps.scan.descriptor.js +25 -0
  38. package/dist/cli/shield.deps.scan.descriptor.js.map +1 -0
  39. package/dist/cli/shield.deps.scan.impl.consumer.d.ts +16 -0
  40. package/dist/cli/shield.deps.scan.impl.consumer.d.ts.map +1 -0
  41. package/dist/cli/shield.deps.scan.impl.consumer.js +35 -0
  42. package/dist/cli/shield.deps.scan.impl.consumer.js.map +1 -0
  43. package/dist/helpers/constant-time.d.ts +18 -0
  44. package/dist/helpers/constant-time.d.ts.map +1 -0
  45. package/dist/helpers/constant-time.js +49 -0
  46. package/dist/helpers/constant-time.js.map +1 -0
  47. package/dist/helpers/filename-sanitizer.d.ts +2 -0
  48. package/dist/helpers/filename-sanitizer.d.ts.map +1 -0
  49. package/dist/helpers/filename-sanitizer.js +18 -0
  50. package/dist/helpers/filename-sanitizer.js.map +1 -0
  51. package/dist/helpers/forwardable-auth-headers.d.ts +8 -0
  52. package/dist/helpers/forwardable-auth-headers.d.ts.map +1 -0
  53. package/dist/helpers/forwardable-auth-headers.js +44 -0
  54. package/dist/helpers/forwardable-auth-headers.js.map +1 -0
  55. package/dist/helpers/index.d.ts +7 -0
  56. package/dist/helpers/index.d.ts.map +1 -0
  57. package/dist/helpers/index.js +7 -0
  58. package/dist/helpers/index.js.map +1 -0
  59. package/dist/helpers/ip-range.d.ts +3 -0
  60. package/dist/helpers/ip-range.d.ts.map +1 -0
  61. package/dist/helpers/ip-range.js +55 -0
  62. package/dist/helpers/ip-range.js.map +1 -0
  63. package/dist/helpers/mime-classifier.d.ts +3 -0
  64. package/dist/helpers/mime-classifier.d.ts.map +1 -0
  65. package/dist/helpers/mime-classifier.js +29 -0
  66. package/dist/helpers/mime-classifier.js.map +1 -0
  67. package/dist/helpers/pattern-matcher.d.ts +13 -0
  68. package/dist/helpers/pattern-matcher.d.ts.map +1 -0
  69. package/dist/helpers/pattern-matcher.js +29 -0
  70. package/dist/helpers/pattern-matcher.js.map +1 -0
  71. package/dist/implementations/cli-types.d.ts +2 -0
  72. package/dist/implementations/cli-types.d.ts.map +1 -0
  73. package/dist/implementations/cli-types.js +2 -0
  74. package/dist/implementations/cli-types.js.map +1 -0
  75. package/dist/implementations/encryption.d.ts +21 -0
  76. package/dist/implementations/encryption.d.ts.map +1 -0
  77. package/dist/implementations/encryption.js +154 -0
  78. package/dist/implementations/encryption.js.map +1 -0
  79. package/dist/implementations/errors.d.ts +17 -0
  80. package/dist/implementations/errors.d.ts.map +1 -0
  81. package/dist/implementations/errors.js +23 -0
  82. package/dist/implementations/errors.js.map +1 -0
  83. package/dist/implementations/keys.d.ts +24 -0
  84. package/dist/implementations/keys.d.ts.map +1 -0
  85. package/dist/implementations/keys.js +114 -0
  86. package/dist/implementations/keys.js.map +1 -0
  87. package/dist/implementations/redaction-admission.d.ts +24 -0
  88. package/dist/implementations/redaction-admission.d.ts.map +1 -0
  89. package/dist/implementations/redaction-admission.js +44 -0
  90. package/dist/implementations/redaction-admission.js.map +1 -0
  91. package/dist/implementations/redaction.d.ts +32 -0
  92. package/dist/implementations/redaction.d.ts.map +1 -0
  93. package/dist/implementations/redaction.js +47 -0
  94. package/dist/implementations/redaction.js.map +1 -0
  95. package/dist/implementations/redactor.inprocess.impl.d.ts +30 -0
  96. package/dist/implementations/redactor.inprocess.impl.d.ts.map +1 -0
  97. package/dist/implementations/redactor.inprocess.impl.js +26 -0
  98. package/dist/implementations/redactor.inprocess.impl.js.map +1 -0
  99. package/dist/implementations/redactor.subprocess.impl.d.ts +25 -0
  100. package/dist/implementations/redactor.subprocess.impl.d.ts.map +1 -0
  101. package/dist/implementations/redactor.subprocess.impl.js +42 -0
  102. package/dist/implementations/redactor.subprocess.impl.js.map +1 -0
  103. package/dist/implementations/scanner.impl.d.ts +7 -0
  104. package/dist/implementations/scanner.impl.d.ts.map +1 -0
  105. package/dist/implementations/scanner.impl.js +166 -0
  106. package/dist/implementations/scanner.impl.js.map +1 -0
  107. package/dist/index.d.ts +18 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/index.js +11 -0
  110. package/dist/index.js.map +1 -0
  111. package/dist/kinds/auditor.kind.d.ts +31 -0
  112. package/dist/kinds/auditor.kind.d.ts.map +1 -0
  113. package/dist/kinds/auditor.kind.js +48 -0
  114. package/dist/kinds/auditor.kind.js.map +1 -0
  115. package/dist/kinds/dep-scanner.kind.d.ts +27 -0
  116. package/dist/kinds/dep-scanner.kind.d.ts.map +1 -0
  117. package/dist/kinds/dep-scanner.kind.js +29 -0
  118. package/dist/kinds/dep-scanner.kind.js.map +1 -0
  119. package/dist/kinds/freshness-policy.kind.d.ts +34 -0
  120. package/dist/kinds/freshness-policy.kind.d.ts.map +1 -0
  121. package/dist/kinds/freshness-policy.kind.js +47 -0
  122. package/dist/kinds/freshness-policy.kind.js.map +1 -0
  123. package/dist/kinds/index.d.ts +9 -0
  124. package/dist/kinds/index.d.ts.map +1 -0
  125. package/dist/kinds/index.js +9 -0
  126. package/dist/kinds/index.js.map +1 -0
  127. package/dist/kinds/ioc-feed.kind.d.ts +35 -0
  128. package/dist/kinds/ioc-feed.kind.d.ts.map +1 -0
  129. package/dist/kinds/ioc-feed.kind.js +36 -0
  130. package/dist/kinds/ioc-feed.kind.js.map +1 -0
  131. package/dist/kinds/policy.kind.d.ts +42 -0
  132. package/dist/kinds/policy.kind.d.ts.map +1 -0
  133. package/dist/kinds/policy.kind.js +23 -0
  134. package/dist/kinds/policy.kind.js.map +1 -0
  135. package/dist/kinds/redactor.kind.d.ts +30 -0
  136. package/dist/kinds/redactor.kind.d.ts.map +1 -0
  137. package/dist/kinds/redactor.kind.js +25 -0
  138. package/dist/kinds/redactor.kind.js.map +1 -0
  139. package/dist/kinds/scanner.kind.d.ts +35 -0
  140. package/dist/kinds/scanner.kind.d.ts.map +1 -0
  141. package/dist/kinds/scanner.kind.js +26 -0
  142. package/dist/kinds/scanner.kind.js.map +1 -0
  143. package/dist/schemas/AuditEvent.d.ts +30 -0
  144. package/dist/schemas/AuditEvent.d.ts.map +1 -0
  145. package/dist/schemas/AuditEvent.js +17 -0
  146. package/dist/schemas/AuditEvent.js.map +1 -0
  147. package/dist/schemas/RedactionRule.d.ts +16 -0
  148. package/dist/schemas/RedactionRule.d.ts.map +1 -0
  149. package/dist/schemas/RedactionRule.js +10 -0
  150. package/dist/schemas/RedactionRule.js.map +1 -0
  151. package/dist/schemas/SecurityPolicy.d.ts +21 -0
  152. package/dist/schemas/SecurityPolicy.d.ts.map +1 -0
  153. package/dist/schemas/SecurityPolicy.js +9 -0
  154. package/dist/schemas/SecurityPolicy.js.map +1 -0
  155. package/dist/schemas/ThreatReport.d.ts +25 -0
  156. package/dist/schemas/ThreatReport.d.ts.map +1 -0
  157. package/dist/schemas/ThreatReport.js +14 -0
  158. package/dist/schemas/ThreatReport.js.map +1 -0
  159. package/dist/schemas/contracts/auditor.d.ts +68 -0
  160. package/dist/schemas/contracts/auditor.d.ts.map +1 -0
  161. package/dist/schemas/contracts/auditor.js +13 -0
  162. package/dist/schemas/contracts/auditor.js.map +1 -0
  163. package/dist/schemas/contracts/card.d.ts +106 -0
  164. package/dist/schemas/contracts/card.d.ts.map +1 -0
  165. package/dist/schemas/contracts/card.js +73 -0
  166. package/dist/schemas/contracts/card.js.map +1 -0
  167. package/dist/schemas/contracts/dep-scanner.d.ts +91 -0
  168. package/dist/schemas/contracts/dep-scanner.d.ts.map +1 -0
  169. package/dist/schemas/contracts/dep-scanner.js +27 -0
  170. package/dist/schemas/contracts/dep-scanner.js.map +1 -0
  171. package/dist/schemas/contracts/freshness-policy.d.ts +99 -0
  172. package/dist/schemas/contracts/freshness-policy.d.ts.map +1 -0
  173. package/dist/schemas/contracts/freshness-policy.js +31 -0
  174. package/dist/schemas/contracts/freshness-policy.js.map +1 -0
  175. package/dist/schemas/contracts/ioc-feed.d.ts +85 -0
  176. package/dist/schemas/contracts/ioc-feed.d.ts.map +1 -0
  177. package/dist/schemas/contracts/ioc-feed.js +28 -0
  178. package/dist/schemas/contracts/ioc-feed.js.map +1 -0
  179. package/dist/schemas/contracts/misc.d.ts +11 -0
  180. package/dist/schemas/contracts/misc.d.ts.map +1 -0
  181. package/dist/schemas/contracts/misc.js +4 -0
  182. package/dist/schemas/contracts/misc.js.map +1 -0
  183. package/dist/schemas/contracts/policy.d.ts +93 -0
  184. package/dist/schemas/contracts/policy.d.ts.map +1 -0
  185. package/dist/schemas/contracts/policy.js +25 -0
  186. package/dist/schemas/contracts/policy.js.map +1 -0
  187. package/dist/schemas/contracts/redactor.d.ts +99 -0
  188. package/dist/schemas/contracts/redactor.d.ts.map +1 -0
  189. package/dist/schemas/contracts/redactor.js +34 -0
  190. package/dist/schemas/contracts/redactor.js.map +1 -0
  191. package/dist/schemas/contracts/scanner.d.ts +112 -0
  192. package/dist/schemas/contracts/scanner.d.ts.map +1 -0
  193. package/dist/schemas/contracts/scanner.js +40 -0
  194. package/dist/schemas/contracts/scanner.js.map +1 -0
  195. package/dist/schemas/contracts/widget.d.ts +19 -0
  196. package/dist/schemas/contracts/widget.d.ts.map +1 -0
  197. package/dist/schemas/contracts/widget.js +10 -0
  198. package/dist/schemas/contracts/widget.js.map +1 -0
  199. package/dist/schemas/encryption.d.ts +25 -0
  200. package/dist/schemas/encryption.d.ts.map +1 -0
  201. package/dist/schemas/encryption.js +35 -0
  202. package/dist/schemas/encryption.js.map +1 -0
  203. package/dist/schemas/index.d.ts +6 -0
  204. package/dist/schemas/index.d.ts.map +1 -0
  205. package/dist/schemas/index.js +6 -0
  206. package/dist/schemas/index.js.map +1 -0
  207. package/dist/schemas/policy.d.ts +2 -0
  208. package/dist/schemas/policy.d.ts.map +1 -0
  209. package/dist/schemas/policy.js +2 -0
  210. package/dist/schemas/policy.js.map +1 -0
  211. package/dist/schemas/redactor.d.ts +2 -0
  212. package/dist/schemas/redactor.d.ts.map +1 -0
  213. package/dist/schemas/redactor.js +2 -0
  214. package/dist/schemas/redactor.js.map +1 -0
  215. package/dist/schemas/report-event.d.ts +29 -0
  216. package/dist/schemas/report-event.d.ts.map +1 -0
  217. package/dist/schemas/report-event.js +19 -0
  218. package/dist/schemas/report-event.js.map +1 -0
  219. package/dist/schemas/scanner.d.ts +2 -0
  220. package/dist/schemas/scanner.d.ts.map +1 -0
  221. package/dist/schemas/scanner.js +2 -0
  222. package/dist/schemas/scanner.js.map +1 -0
  223. package/dist/security-client/index.d.ts +3 -0
  224. package/dist/security-client/index.d.ts.map +1 -0
  225. package/dist/security-client/index.js +2 -0
  226. package/dist/security-client/index.js.map +1 -0
  227. package/dist/security-client/security-client.d.ts +34 -0
  228. package/dist/security-client/security-client.d.ts.map +1 -0
  229. package/dist/security-client/security-client.js +54 -0
  230. package/dist/security-client/security-client.js.map +1 -0
  231. package/dist/security.consumer.plugin.d.ts +3 -0
  232. package/dist/security.consumer.plugin.d.ts.map +1 -0
  233. package/dist/security.consumer.plugin.js +28 -0
  234. package/dist/security.consumer.plugin.js.map +1 -0
  235. package/dist/security.plugin.d.ts +16 -0
  236. package/dist/security.plugin.d.ts.map +1 -0
  237. package/dist/security.plugin.js +78 -0
  238. package/dist/security.plugin.js.map +1 -0
  239. package/dist/svelte/index.d.ts +3 -0
  240. package/dist/svelte/index.d.ts.map +1 -0
  241. package/dist/svelte/index.js +2 -0
  242. package/dist/svelte/security-svelte.plugin.d.ts +3 -0
  243. package/dist/svelte/security-svelte.plugin.d.ts.map +1 -0
  244. package/dist/svelte/security-svelte.plugin.js +38 -0
  245. package/dist/svelte/styles.css +8 -0
  246. package/dist/svelte/tool-widgets/SecurityToolCard.svelte +140 -0
  247. package/dist/svelte/tool-widgets/SecurityToolCard.svelte.d.ts +5 -0
  248. package/dist/svelte/tool-widgets/SecurityToolCard.svelte.d.ts.map +1 -0
  249. package/dist/svelte/tool-widgets/index.d.ts +2 -0
  250. package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
  251. package/dist/svelte/tool-widgets/index.js +6 -0
  252. package/dist/tools/check-policy/check-policy.descriptor.d.ts +37 -0
  253. package/dist/tools/check-policy/check-policy.descriptor.d.ts.map +1 -0
  254. package/dist/tools/check-policy/check-policy.descriptor.js +21 -0
  255. package/dist/tools/check-policy/check-policy.descriptor.js.map +1 -0
  256. package/dist/tools/check-policy/check-policy.impl.consumer.d.ts +7 -0
  257. package/dist/tools/check-policy/check-policy.impl.consumer.d.ts.map +1 -0
  258. package/dist/tools/check-policy/check-policy.impl.consumer.js +21 -0
  259. package/dist/tools/check-policy/check-policy.impl.consumer.js.map +1 -0
  260. package/dist/tools/check-policy/index.d.ts +3 -0
  261. package/dist/tools/check-policy/index.d.ts.map +1 -0
  262. package/dist/tools/check-policy/index.js +2 -0
  263. package/dist/tools/check-policy/index.js.map +1 -0
  264. package/dist/tools/check-policy/schemas.d.ts +23 -0
  265. package/dist/tools/check-policy/schemas.d.ts.map +1 -0
  266. package/dist/tools/check-policy/schemas.js +13 -0
  267. package/dist/tools/check-policy/schemas.js.map +1 -0
  268. package/dist/tools/index.d.ts +10 -0
  269. package/dist/tools/index.d.ts.map +1 -0
  270. package/dist/tools/index.js +6 -0
  271. package/dist/tools/index.js.map +1 -0
  272. package/dist/tools/redact-output/index.d.ts +3 -0
  273. package/dist/tools/redact-output/index.d.ts.map +1 -0
  274. package/dist/tools/redact-output/index.js +2 -0
  275. package/dist/tools/redact-output/index.js.map +1 -0
  276. package/dist/tools/redact-output/redact-output.descriptor.d.ts +42 -0
  277. package/dist/tools/redact-output/redact-output.descriptor.d.ts.map +1 -0
  278. package/dist/tools/redact-output/redact-output.descriptor.js +21 -0
  279. package/dist/tools/redact-output/redact-output.descriptor.js.map +1 -0
  280. package/dist/tools/redact-output/redact-output.impl.consumer.d.ts +7 -0
  281. package/dist/tools/redact-output/redact-output.impl.consumer.d.ts.map +1 -0
  282. package/dist/tools/redact-output/redact-output.impl.consumer.js +18 -0
  283. package/dist/tools/redact-output/redact-output.impl.consumer.js.map +1 -0
  284. package/dist/tools/redact-output/schemas.d.ts +28 -0
  285. package/dist/tools/redact-output/schemas.d.ts.map +1 -0
  286. package/dist/tools/redact-output/schemas.js +13 -0
  287. package/dist/tools/redact-output/schemas.js.map +1 -0
  288. package/dist/tools/report-event/index.d.ts +3 -0
  289. package/dist/tools/report-event/index.d.ts.map +1 -0
  290. package/dist/tools/report-event/index.js +2 -0
  291. package/dist/tools/report-event/index.js.map +1 -0
  292. package/dist/tools/report-event/report-event.descriptor.d.ts +43 -0
  293. package/dist/tools/report-event/report-event.descriptor.d.ts.map +1 -0
  294. package/dist/tools/report-event/report-event.descriptor.js +21 -0
  295. package/dist/tools/report-event/report-event.descriptor.js.map +1 -0
  296. package/dist/tools/report-event/report-event.impl.consumer.d.ts +24 -0
  297. package/dist/tools/report-event/report-event.impl.consumer.d.ts.map +1 -0
  298. package/dist/tools/report-event/report-event.impl.consumer.js +61 -0
  299. package/dist/tools/report-event/report-event.impl.consumer.js.map +1 -0
  300. package/dist/tools/report-event/schemas.d.ts +2 -0
  301. package/dist/tools/report-event/schemas.d.ts.map +1 -0
  302. package/dist/tools/report-event/schemas.js +3 -0
  303. package/dist/tools/report-event/schemas.js.map +1 -0
  304. package/dist/tools/scan-input/index.d.ts +3 -0
  305. package/dist/tools/scan-input/index.d.ts.map +1 -0
  306. package/dist/tools/scan-input/index.js +2 -0
  307. package/dist/tools/scan-input/index.js.map +1 -0
  308. package/dist/tools/scan-input/scan-input.descriptor.d.ts +49 -0
  309. package/dist/tools/scan-input/scan-input.descriptor.d.ts.map +1 -0
  310. package/dist/tools/scan-input/scan-input.descriptor.js +21 -0
  311. package/dist/tools/scan-input/scan-input.descriptor.js.map +1 -0
  312. package/dist/tools/scan-input/scan-input.impl.consumer.d.ts +7 -0
  313. package/dist/tools/scan-input/scan-input.impl.consumer.d.ts.map +1 -0
  314. package/dist/tools/scan-input/scan-input.impl.consumer.js +22 -0
  315. package/dist/tools/scan-input/scan-input.impl.consumer.js.map +1 -0
  316. package/dist/tools/scan-input/schemas.d.ts +36 -0
  317. package/dist/tools/scan-input/schemas.d.ts.map +1 -0
  318. package/dist/tools/scan-input/schemas.js +15 -0
  319. package/dist/tools/scan-input/schemas.js.map +1 -0
  320. package/dist/tools/security-tool-card.d.ts +13 -0
  321. package/dist/tools/security-tool-card.d.ts.map +1 -0
  322. package/dist/tools/security-tool-card.js +171 -0
  323. package/dist/tools/security-tool-card.js.map +1 -0
  324. package/dist/tools/security.docs.descriptor.d.ts +17 -0
  325. package/dist/tools/security.docs.descriptor.d.ts.map +1 -0
  326. package/dist/tools/security.docs.descriptor.js +49 -0
  327. package/dist/tools/security.docs.descriptor.js.map +1 -0
  328. package/dist/tui/index.d.ts +2 -0
  329. package/dist/tui/index.d.ts.map +1 -0
  330. package/dist/tui/index.js +2 -0
  331. package/dist/tui/index.js.map +1 -0
  332. package/dist/tui/security-tui.plugin.d.ts +3 -0
  333. package/dist/tui/security-tui.plugin.d.ts.map +1 -0
  334. package/dist/tui/security-tui.plugin.js +31 -0
  335. package/dist/tui/security-tui.plugin.js.map +1 -0
  336. package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.d.ts +5 -0
  337. package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.d.ts.map +1 -0
  338. package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.js +37 -0
  339. package/dist/tui/tool-widgets/SecurityToolWidget.impl.consumer.js.map +1 -0
  340. package/docs/host-boundary.md +186 -0
  341. package/docs/scanner-work.md +29 -0
  342. package/package.json +245 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/tools/scan-input/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AACjJ,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,OAAO,EAAE,qBAAqB;SAC5B,QAAQ,CAAC,6BAA6B,CAAC;IACzC,OAAO,EAAE,8BAA8B,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,qBAAqB,GAAG,2BAA2B,CAAC,IAAI,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IACrG,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,2BAA2B,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC;QACzE,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAC,MAAM,CAAC,EAAC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,EAAC,CAAC,CAAC;KACpF,CAAC,CAAC;IACH,gBAAgB,EAAE,CAAC,CAAC,OAAO,EAAE;CAC7B,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type SecurityToolId, type PolicyDecision, type SecurityToolCardTone, type SecurityToolCardRow, type SecurityToolCardModel } from '../schemas/contracts/card.ts';
2
+ export { SECURITY_TOOL_IDS, type SecurityToolId, type PolicyDecision, type SecurityToolCardTone, type SecurityToolThreat, type SecurityToolCardRow, type SecurityToolCardModel } from '../schemas/contracts/card.ts';
3
+ export declare function isSecurityToolId(id: string): id is SecurityToolId;
4
+ export declare function securityToolIcon(toolId: string): string;
5
+ export declare function decisionTone(decision: PolicyDecision | null): SecurityToolCardTone;
6
+ export declare function securityToolCardModel(input: {
7
+ name: string;
8
+ input?: unknown;
9
+ output?: unknown;
10
+ error?: string;
11
+ }): SecurityToolCardModel;
12
+ export declare function securityToolCardRows(model: SecurityToolCardModel): SecurityToolCardRow[];
13
+ //# sourceMappingURL=security-tool-card.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-tool-card.d.ts","sourceRoot":"","sources":["../../src/tools/security-tool-card.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EACnE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EACpD,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAC9F,KAAK,kBAAkB,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAC7E,MAAM,8BAA8B,CAAC;AAyBtC,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,cAAc,CAEjE;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,GAAG,oBAAoB,CAKlF;AAeD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,qBAAqB,CAuDxB;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,GAAG,mBAAmB,EAAE,CAkBxF"}
@@ -0,0 +1,171 @@
1
+ import { SECURITY_TOOL_IDS, CardArgsSchema, CardOutputSchema, StringField } from "../schemas/contracts/card.js";
2
+ export { SECURITY_TOOL_IDS } from "../schemas/contracts/card.js";
3
+ const TOOL_ICONS = {
4
+ 'security.check-policy': 'lucide:shield-check',
5
+ 'security.scan-input': 'lucide:scan-search',
6
+ 'security.redact-output': 'lucide:eye-off',
7
+ 'security.report-event': 'lucide:clipboard-list',
8
+ };
9
+ const TOOL_TITLES = {
10
+ 'security.check-policy': 'Check policy',
11
+ 'security.scan-input': 'Scan input',
12
+ 'security.redact-output': 'Redact output',
13
+ 'security.report-event': 'Audit event',
14
+ };
15
+ const DECISION_LABELS = {
16
+ allow: 'Allowed',
17
+ deny: 'Denied',
18
+ review: 'Review',
19
+ };
20
+ const PREVIEW_LIMIT = 240;
21
+ export function isSecurityToolId(id) {
22
+ return SECURITY_TOOL_IDS.some((toolId) => toolId === id);
23
+ }
24
+ export function securityToolIcon(toolId) {
25
+ return isSecurityToolId(toolId) ? TOOL_ICONS[toolId] : 'lucide:shield';
26
+ }
27
+ export function decisionTone(decision) {
28
+ if (decision === 'allow')
29
+ return 'success';
30
+ if (decision === 'deny')
31
+ return 'danger';
32
+ if (decision === 'review')
33
+ return 'warning';
34
+ return 'default';
35
+ }
36
+ function availabilityFrom(output) {
37
+ if (!output)
38
+ return null;
39
+ if (output.engineAvailable !== undefined)
40
+ return output.engineAvailable;
41
+ if (output.scannerAvailable !== undefined)
42
+ return output.scannerAvailable;
43
+ if (output.redactorAvailable !== undefined)
44
+ return output.redactorAvailable;
45
+ return null;
46
+ }
47
+ function previewStr(text) {
48
+ if (!text)
49
+ return null;
50
+ return text.length > PREVIEW_LIMIT ? `${text.slice(0, PREVIEW_LIMIT)}…` : text;
51
+ }
52
+ export function securityToolCardModel(input) {
53
+ const args = CardArgsSchema.parse(input.input);
54
+ const output = CardOutputSchema.parse(input.output);
55
+ const event = args?.event;
56
+ const policyName = output?.policyId ?? args?.policyId ?? null;
57
+ const decision = output?.outcome ?? event?.outcome ?? null;
58
+ const eventType = event?.action ?? null;
59
+ const recorded = output?.recorded ?? null;
60
+ const eventId = output?.eventId ?? event?.id ?? null;
61
+ const actor = event?.actor ?? null;
62
+ const resource = event?.resource ?? null;
63
+ const reason = output?.reason ?? null;
64
+ const error = StringField.parse(input.error) ?? output?.error ?? null;
65
+ const available = availabilityFrom(output);
66
+ const threats = output?.threats ?? [];
67
+ const rawMatches = output?.matches;
68
+ const matchCount = rawMatches ? rawMatches.length : null;
69
+ const redactedPreview = previewStr(output?.redacted);
70
+ const title = titleFor({
71
+ toolId: input.name,
72
+ policyName,
73
+ decision,
74
+ eventType,
75
+ recorded,
76
+ threats,
77
+ matchCount,
78
+ });
79
+ return {
80
+ toolId: input.name,
81
+ title,
82
+ icon: securityToolIcon(input.name),
83
+ policyName,
84
+ decision,
85
+ decisionLabel: decision ? DECISION_LABELS[decision] : null,
86
+ eventType,
87
+ recorded,
88
+ eventId,
89
+ actor,
90
+ resource,
91
+ reason,
92
+ error,
93
+ available,
94
+ availabilityLabel: availabilityLabel(input.name, available),
95
+ threats,
96
+ matchCount,
97
+ redactedPreview,
98
+ defaultOpen: decision === 'deny' ||
99
+ decision === 'review' ||
100
+ recorded === false ||
101
+ threats.length > 0 ||
102
+ Boolean(error),
103
+ };
104
+ }
105
+ export function securityToolCardRows(model) {
106
+ const rows = [];
107
+ pushRow(rows, 'Policy', model.policyName);
108
+ pushRow(rows, 'Decision', model.decisionLabel, decisionTone(model.decision));
109
+ pushRow(rows, 'Event', model.eventType);
110
+ pushRow(rows, 'Actor', model.actor);
111
+ pushRow(rows, 'Resource', model.resource);
112
+ pushRow(rows, 'Event ID', model.eventId);
113
+ if (model.recorded !== null) {
114
+ pushRow(rows, 'Recorded', model.recorded ? 'yes' : 'no', model.recorded ? 'success' : 'danger');
115
+ }
116
+ pushRow(rows, 'Reason', model.reason);
117
+ pushRow(rows, 'Engine', model.availabilityLabel, 'muted');
118
+ if (model.matchCount !== null) {
119
+ pushRow(rows, 'Matches', String(model.matchCount));
120
+ }
121
+ pushRow(rows, 'Error', model.error, 'danger');
122
+ return rows;
123
+ }
124
+ function availabilityLabel(toolId, available) {
125
+ if (available === null)
126
+ return null;
127
+ if (toolId === 'security.check-policy') {
128
+ return available ? 'policy engine registered' : 'policy engine unavailable';
129
+ }
130
+ if (toolId === 'security.scan-input') {
131
+ return available ? 'scanner registered' : 'scanner unavailable';
132
+ }
133
+ if (toolId === 'security.redact-output') {
134
+ return available ? 'redactor registered' : 'redactor unavailable';
135
+ }
136
+ return available ? 'available' : 'unavailable';
137
+ }
138
+ function titleFor(input) {
139
+ if (input.toolId === 'security.check-policy') {
140
+ if (input.policyName && input.decision) {
141
+ return `${DECISION_LABELS[input.decision]} · ${input.policyName}`;
142
+ }
143
+ if (input.policyName)
144
+ return `Policy ${input.policyName}`;
145
+ }
146
+ if (input.toolId === 'security.report-event') {
147
+ if (input.eventType) {
148
+ return input.recorded === false ? `Event ${input.eventType} failed` : `Event ${input.eventType}`;
149
+ }
150
+ }
151
+ if (input.toolId === 'security.scan-input') {
152
+ if (input.threats.length === 0)
153
+ return 'No threats found';
154
+ return input.threats.length === 1 ? '1 threat found' : `${input.threats.length} threats found`;
155
+ }
156
+ if (input.toolId === 'security.redact-output') {
157
+ if (input.matchCount === 0)
158
+ return 'No redactions';
159
+ if (input.matchCount === 1)
160
+ return 'Redacted 1 match';
161
+ if (input.matchCount !== null)
162
+ return `Redacted ${input.matchCount} matches`;
163
+ }
164
+ return isSecurityToolId(input.toolId) ? TOOL_TITLES[input.toolId] : 'Security tool';
165
+ }
166
+ function pushRow(rows, label, value, tone = 'default') {
167
+ if (!value)
168
+ return;
169
+ rows.push({ label, value, tone });
170
+ }
171
+ //# sourceMappingURL=security-tool-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-tool-card.js","sourceRoot":"","sources":["../../src/tools/security-tool-card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,gBAAgB,EAAE,WAAW,EAGxE,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAEzB,MAAM,8BAA8B,CAAC;AAGtC,MAAM,UAAU,GAAG;IAClB,uBAAuB,EAAE,qBAAqB;IAC9C,qBAAqB,EAAE,oBAAoB;IAC3C,wBAAwB,EAAE,gBAAgB;IAC1C,uBAAuB,EAA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BAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,gBAAgB,CAAC;IAChG,CAAC;IACD,IAAI,KAAK,CAAC,MAAM,KAAK,wBAAwB,EAAE,CAAC;QAC/C,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC;YAAE,OAAO,eAAe,CAAC;QACnD,IAAI,KAAK,CAAC,UAAU,KAAK,CAAC;YAAE,OAAO,kBAAkB,CAAC;QACtD,IAAI,KAAK,CAAC,UAAU,KAAK,IAAI;YAAE,OAAO,YAAY,KAAK,CAAC,UAAU,UAAU,CAAC;IAC9E,CAAC;IACD,OAAO,gBAAgB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC;AACrF,CAAC;AAED,SAAS,OAAO,CACf,IAA2B,EAC3B,KAAa,EACb,KAAoB,EACpB,OAA6B,SAAS;IAEtC,IAAI,CAAC,KAAK;QAAE,OAAO;IACnB,IAAI,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,17 @@
1
+ declare const _default: {
2
+ kind: "docs/topic";
3
+ id: string;
4
+ title: string;
5
+ summary: string;
6
+ body: {
7
+ type: "markdown";
8
+ sourceType: "raw";
9
+ source: string;
10
+ };
11
+ tags: string[];
12
+ surfaces: ("cli" | "web" | "in-app")[];
13
+ hardware: ("consumer" | "cloud")[];
14
+ enabled: true;
15
+ };
16
+ export default _default;
17
+ //# sourceMappingURL=security.docs.descriptor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.docs.descriptor.d.ts","sourceRoot":"","sources":["../../src/tools/security.docs.descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAEA,wBA+CgC"}
@@ -0,0 +1,49 @@
1
+ export default {
2
+ kind: 'docs/topic',
3
+ id: 'security',
4
+ title: 'Security assessment',
5
+ summary: 'Runtime scanners, redactors, policy engines, audit sinks and compatibility encryption.',
6
+ body: {
7
+ type: 'markdown', sourceType: 'raw',
8
+ source: `# Security
9
+ Compose securityPlugin from @vibesdotdev/security/plugin for universal kinds and descriptors.
10
+ Consumer tool hosts also compose securityConsumerPlugin from @vibesdotdev/security/consumer.plugin and the Tools owner.
11
+ Shield CLI hosts also compose securityCliPlugin from @vibesdotdev/security/cli/plugin and the CLI owner.
12
+ Browser and cloud hosts use the universal slice; Svelte and TUI plugins provide result cards without execution loaders.
13
+ The package consumer workspace explicitly composes all five slices in its hand-owned vibes.config.ts.
14
+ Report-event schemas live in ./schemas/report-event; the existing tool schema module remains a compatible re-export.
15
+ Existing tools, CLI, kinds and schemas entrypoints remain supported. Built-in scanning and redaction load lazily.
16
+ Direct resolution selects one enabled scanner; security.scan-input aggregates all enabled scanners through resolveAll().
17
+ The runtime selects the redactor. Policies and audit sinks are composed by hosts.
18
+ The universal plugin registers runtime/client id security: activate with getVibesClient<SecurityClient>('security', runtime).
19
+ Use tryGetVibesClient for synchronous post-activation access; the kernel owns reuse and runtime isolation.
20
+ SecurityClient.emit(event) and queryAuditEvents(options = {}) resolve the selected enabled security/auditor on every call.
21
+ AuditEventSchema and AuditQueryOptionsSchema reject malformed arguments with ZodError before sink resolution.
22
+ No enabled auditor throws CapabilityError UNAVAILABLE/security-auditor-unavailable; loader and sink failures propagate.
23
+ Direct auditor calls share the sink; the client has no second audit store. Persistence belongs to the composed sink.
24
+ Direct built-in scans and tools validate the 262,144-unit content cap; supplied booleans alone override descriptor settings.
25
+ Built-in scans, descriptor-only defaults and scan-input tools share optional overrides: omission and undefined are allowed;
26
+ null, non-object options and mistyped known fields reject with ZodError.
27
+ Freshness rejects invalid timestamps before age or allowlist evaluation; Shield rejects invalid reports before stdout.
28
+ These boundary refusals are canonical ZodErrors, with no successful assessment.
29
+ Missing policies deny and report unavailable; implementation failures propagate.
30
+ Descriptor-only IOC sync, query and getStatus throw CapabilityError UNAVAILABLE with reason ioc-feed-unavailable.
31
+ Register an enabled IOC descriptor and implementation for real synchronization, query and status results.
32
+ Descriptor-only redactors validate original string content and optional RedactionRuleSchema rules before
33
+ returning unchanged content, empty matches and redactorAvailable:false. Omitted and undefined rules are valid;
34
+ null, non-array rules and malformed fields reject with ZodError. No patterns execute in this default.
35
+ Built-in content and rule-count execution limits do not apply to descriptor-only admission.
36
+ Built-in redaction uses original UTF-16 coordinates, literal replacements, earliest-start/caller-order overlap precedence,
37
+ and zero-width insertion. Cloud and browser runtimes redact in-process; consumer hardware runs regex work in a supervised runtime/execution Node child.
38
+ The dependency scanner reports unknown until a real implementation is composed.
39
+ Synchronous AES-256-GCM compatibility APIs retain raw and stored formats, explicit and persistent keys.
40
+ Their host migration is still open: synchronous crypto and key persistence currently use Node APIs.
41
+ INVALID_INPUT encryption-key-invalid and ciphertext-invalid refuse malformed data before decoding.
42
+ INVALID_INPUT redaction-pattern-invalid refuses invalid regex source; UNAVAILABLE redaction-budget-exceeded
43
+ means the call passed the candidate budget or execution deadline. Compose execution for consumer redaction and filesystem for Shield reads.
44
+ Run bun run check, bun run test and bun run build; source checks alone do not certify the host migration.`
45
+ },
46
+ tags: ['security'], surfaces: ['cli', 'web', 'in-app'],
47
+ hardware: ['consumer', 'cloud'], enabled: true
48
+ };
49
+ //# sourceMappingURL=security.docs.descriptor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security.docs.descriptor.js","sourceRoot":"","sources":["../../src/tools/security.docs.descriptor.ts"],"names":[],"mappings":"AAEA,eAAe;IACd,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,UAAU;IACd,KAAK,EAAE,qBAAqB;IAC5B,OAAO,EAAE,wFAAwF;IACjG,IAAI,EAAE;QACL,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK;QACnC,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0GAoCgG;KACxG;IACD,IAAI,EAAE,CAAC,UAAU,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC;IACtD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,EAAE,OAAO,EAAE,IAAI;CAChB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { securityTuiPlugin as default, securityTuiPlugin } from './security-tui.plugin.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { securityTuiPlugin as default, securityTuiPlugin } from "./security-tui.plugin.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const securityTuiPlugin: import("@vibesdotdev/kernel").RuntimePlugin;
2
+ export default securityTuiPlugin;
3
+ //# sourceMappingURL=security-tui.plugin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-tui.plugin.d.ts","sourceRoot":"","sources":["../../src/tui/security-tui.plugin.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,iBAAiB,6CAgB5B,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { createRuntimeImplementation, createRuntimePlugin, loader } from '@vibesdotdev/kernel';
2
+ import { SECURITY_TOOL_IDS } from "../tools/security-tool-card.js";
3
+ const widgets = SECURITY_TOOL_IDS.map((toolId) => ({
4
+ id: `${toolId}.tui-widget`,
5
+ kind: 'tools/ui',
6
+ name: `${toolId} TUI Widget`,
7
+ description: `Renders ${toolId} results (policy name, allow/deny, event type).`,
8
+ surfaces: ['tui'],
9
+ role: 'widget',
10
+ targetToolId: toolId,
11
+ targetId: toolId,
12
+ tags: ['security', 'tui'],
13
+ enabled: true
14
+ }));
15
+ export const securityTuiPlugin = createRuntimePlugin({
16
+ id: '@vibesdotdev/security/tui',
17
+ name: 'Security TUI',
18
+ description: 'Terminal tool-result cards for security agent tools.',
19
+ dependencies: ['tui'],
20
+ descriptors: widgets,
21
+ loaders: widgets.map((descriptor) => loader(descriptor.id, { kind: 'tools/ui' }, async () => {
22
+ const mod = await import("./tool-widgets/SecurityToolWidget.impl.consumer.js");
23
+ return createRuntimeImplementation({
24
+ kind: 'tools/ui',
25
+ id: descriptor.id,
26
+ implementation: { tui: { component: mod.default } }
27
+ });
28
+ }))
29
+ });
30
+ export default securityTuiPlugin;
31
+ //# sourceMappingURL=security-tui.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-tui.plugin.js","sourceRoot":"","sources":["../../src/tui/security-tui.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,mBAAmB,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,OAAO,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAClD,EAAE,EAAE,GAAG,MAAM,aAAa;IAC1B,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,GAAG,MAAM,aAAa;IAC5B,WAAW,EAAE,WAAW,MAAM,iDAAiD;IAC/E,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE,MAAM;IACpB,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC;IACzB,OAAO,EAAE,IAAI;CACH,CAAA,CAAC,CAAC;AAEb,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC;IACpD,EAAE,EAAE,2BAA2B;IAC/B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,sDAAsD;IACnE,YAAY,EAAE,CAAC,KAAK,CAAC;IACrB,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CACnC,MAAM,CAAC,UAAU,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,KAAK,IAAI,EAAE;QACtD,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,oDAAqD,CAAC,CAAC;QAChF,OAAO,2BAA2B,CAAC;YAClC,IAAI,EAAE,UAAU;YAChB,EAAE,EAAE,UAAU,CAAC,EAAE;YACjB,cAAc,EAAE,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,OAAO,EAAE,EAAE;SACnD,CAAC,CAAC;IACJ,CAAC,CAAC,CACF;CACD,CAAC,CAAC;AAEH,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { SecurityToolWidgetProps } from '../../schemas/contracts/widget.ts';
2
+ export type { SecurityToolValue, SecurityToolWidgetProps } from '../../schemas/contracts/widget.ts';
3
+ import { type ReactNode } from 'react';
4
+ export default function SecurityToolWidget(tool: SecurityToolWidgetProps): ReactNode;
5
+ //# sourceMappingURL=SecurityToolWidget.impl.consumer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecurityToolWidget.impl.consumer.d.ts","sourceRoot":"","sources":["../../../src/tui/tool-widgets/SecurityToolWidget.impl.consumer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACjF,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACpG,OAAO,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAgCjD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,IAAI,EAAE,uBAAuB,GAAG,SAAS,CAiDnF"}
@@ -0,0 +1,37 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { WidgetContainer, WidgetContent, WidgetHeader } from '@vibesdotdev/tui';
4
+ import { VStack } from '@vibesdotdev/tui/components/layout';
5
+ import { dsBase, dsColors, dsSpace } from '@vibesdotdev/tui/theme';
6
+ import { decisionTone, securityToolCardModel, securityToolCardRows } from "../../tools/security-tool-card.js";
7
+ const TONE_FG = {
8
+ default: dsBase.foreground,
9
+ success: dsColors.success.solid,
10
+ danger: dsColors.danger.solid,
11
+ warning: dsColors.warning.solid,
12
+ muted: dsBase.mutedForeground
13
+ };
14
+ function widgetStatus(status, hasError) {
15
+ if (status === 'failed' || hasError)
16
+ return 'error';
17
+ if (status === 'done')
18
+ return 'success';
19
+ if (status === 'awaiting_approval')
20
+ return 'warning';
21
+ if (status === 'pending')
22
+ return 'pending';
23
+ return 'running';
24
+ }
25
+ export default function SecurityToolWidget(tool) {
26
+ const model = securityToolCardModel({
27
+ name: tool.toolCall?.tool ?? '',
28
+ input: tool.args,
29
+ output: tool.output,
30
+ error: tool.error ?? undefined
31
+ });
32
+ const rows = securityToolCardRows(model);
33
+ const status = widgetStatus(tool.status, Boolean(tool.error));
34
+ const [collapsed, setCollapsed] = useState(false);
35
+ return (_jsxs(WidgetContainer, { status: status, marginTop: 1, children: [_jsx(WidgetHeader, { title: model.title, status: status, statusText: status === 'error' ? 'Failed' : 'Completed', isCollapsed: collapsed, onToggle: () => setCollapsed((v) => !v), showClose: false, bottomBorder: false, compact: true }), !collapsed && (_jsx(WidgetContent, { children: _jsxs(VStack, { gap: dsSpace.xs, children: [model.decisionLabel || model.eventType || model.policyName ? (_jsx("text", { style: { fg: TONE_FG[decisionTone(model.decision)] }, children: [model.decisionLabel, model.policyName, model.eventType].filter(Boolean).join(' · ') })) : null, rows.map((row) => (_jsxs("text", { style: { fg: TONE_FG[row.tone] }, children: [row.label, ": ", row.value] }, row.label))), model.threats.slice(0, 5).map((threat, index) => (_jsxs("text", { style: { fg: dsBase.foreground }, children: [threat.severity, " \u00B7 ", threat.kind.replaceAll('_', ' '), " \u2014 ", threat.description] }, `${threat.kind}-${index}`))), model.redactedPreview ? (_jsx("text", { style: { fg: dsBase.mutedForeground }, children: model.redactedPreview })) : null] }) }))] }));
36
+ }
37
+ //# sourceMappingURL=SecurityToolWidget.impl.consumer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SecurityToolWidget.impl.consumer.js","sourceRoot":"","sources":["../../../src/tui/tool-widgets/SecurityToolWidget.impl.consumer.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACjD,OAAO,EACN,eAAe,EACf,aAAa,EACb,YAAY,EAEZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,oCAAoC,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EACN,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EAEpB,MAAM,mCAAmC,CAAC;AAE3C,MAAM,OAAO,GAAG;IACf,OAAO,EAAE,MAAM,CAAC,UAAU;IAC1B,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK;IAC/B,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,KAAK;IAC7B,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,KAAK;IAC/B,KAAK,EAAE,MAAM,CAAC,eAAe;CACkB,CAAC;AAEjD,SAAS,YAAY,CAAC,MAAe,EAAE,QAAkB;IACxD,IAAI,MAAM,KAAK,QAAQ,IAAI,QAAQ;QAAE,OAAO,OAAO,CAAC;IACpD,IAAI,MAAM,KAAK,MAAM;QAAE,OAAO,SAAS,CAAC;IACxC,IAAI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acceptance of the host boundary.
4
+
5
+ Inspected public contracts:
6
+
7
+ | Owner export | Current contract | Missing capability |
8
+ | --- | --- | --- |
9
+ | @vibesdotdev/crypto/encryption | EncryptionImplementation.encrypt and decrypt return Promises (crypto/src/schemas/encryption.ts). IV length 16 and AAD are supported asynchronously. | Runtime-resolved synchronous AES-256-GCM seal/open, including authentication, 16-byte IV/tag and optional AAD. |
10
+ | @vibesdotdev/filesystem | getSynchronousReadPort exposes read-only namespace access. FileSystemHostSyncCalls has stat, lstat, realpath, directory entries, open/read/close (filesystem/src/schemas/host-adapter.ts). | Public runtime-resolved synchronous directory creation and exclusive key creation (wx, 0600), with errno-preserving read/write results and concurrent-winner reuse. |
11
+ | @vibesdotdev/host-node/filesystem | Host primitives implement that read port. Async file handles provide writes; no public synchronous write service is exported. | Host implementation of the preceding writable synchronous contract. |
12
+ | @vibesdotdev/kernel/credentials | Credential references resolve through runtime.resolveCredential and secrets/store. | A credential lookup cannot supply the encrypted store's own key without recursion; retain the separate asynchronous boundEncryptionKeyHex path. |
13
+
14
+ Once compatible owners exist, synchronous post-activation resolution must use
15
+ tryGetVibesClient from @vibesdotdev/kernel/client. It cannot make asynchronous
16
+ crypto or persistence synchronous.
17
+
18
+ Affected security callers: SecretEncryption byte/string/stored methods,
19
+ generateEncryptionKey, explicit-key encryptStringWithKey/decryptToStringWithKey,
20
+ readOrCreateKeyFile, resolveEncryptionKeyHex and resolveEncryptionKeyHexForBase.
21
+ The secrets encrypted-local backend calls the base-specific resolver and
22
+ explicit-key helpers from backends/encrypted-local/encrypted-local.impl.local.ts
23
+ (load/decrypt near line 145; save/encrypt near line 177). Those contracts must
24
+ continue working without resolving their own store credential.
25
+
26
+ Current implementation evidence: implementations/encryption.ts obtains Node
27
+ crypto synchronously through process.getBuiltinModule and caches runtime keys;
28
+ implementations/keys.ts obtains Node filesystem synchronously, creates keys
29
+ exclusively, reuses concurrent winners and refuses unreadable existing keys.
30
+ Replacing these with Promise-returning ports would break supported callers.
31
+ No such substitution is made in this repair. Universal import initialization
32
+ and reachable crypto-unavailable refusal are distinct from host-operation
33
+ migration. The owner prerequisites remain unresolved.
34
+
35
+ Historical package-check findings from earlier runs: workspace-rules reported
36
+ correct/host-apis-in-host-packages at encryption.ts:18; the declared oxlint
37
+ ratchet reported no-env-branch-in-isomorphic-code and no-runtime-typeof at
38
+ encryption.ts:23 and keys.ts:26. These results predate this repair and are not
39
+ current check results. They reflect the unresolved owner contracts above. No
40
+ check is weakened or suppressed.
41
+
42
+ ## Historical sibling composition failure
43
+
44
+ An earlier run failed because tui/src/schemas/widgets.ts imported the absent
45
+ ReadonlyJsonObjectSchema value from @vibesdotdev/kernel/schemas/json (TS2724).
46
+ The review at framework revision cf9fa626f240604c0ae40ba1344b2398b50cd508
47
+ observed JsonValueFromReaderSchema in the source and cited a receipt with
48
+ passing typecheck, 226 tests and build. That receipt predates the extended
49
+ extracted-widget probe; it does not prove extracted widget resolution.
50
+
51
+ The subsequent review at revision 570e6eb1f474772bf6b38d6d5fb9b7933aa8242c
52
+ reports passing typecheck and build, with 225 tests passing and one failing.
53
+ Source widget resolution passed; extracted widget resolution was attempted
54
+ and blocked before resolution by the LocalDB artifact described below.
55
+ The earlier TUI schema failure is historical. The synchronous host prerequisite
56
+ above remains unresolved regardless of these results.
57
+
58
+ ## Historical extracted surface composition receipt
59
+
60
+ A prior offline probe registered Kernel, Logging, Tools, TUI and Node test
61
+ plugins before attempting extracted widget resolution. Source TUI widget
62
+ resolution passed. The extracted composition was blocked before resolution:
63
+ LocalDB's emitted sqlite-driver.base.js imported @vibesdotdev/runtime, absent
64
+ from its declared installed closure. This remains a historical artifact
65
+ observation and an external LocalDB owner follow-up. The current in-process
66
+ packed.test.ts does not perform this probe or establish extracted resolution.
67
+
68
+ ## Historical verification: 2026-10-14
69
+
70
+ Framework HEAD was adb0749f4a8ee6fefc54596a2528a7ff38aad39c before these
71
+ commands and advanced in another lane during verification. The security
72
+ working-tree candidate plus the historical-evidence correction produced:
73
+
74
+ | Command | Observed result |
75
+ | --- | --- |
76
+ | `bun run --cwd repos/platform/framework/security check` | Exit 2: TUI terminal-output-redirect.ts:88 passes Uint8Array<ArrayBufferLike> to a writer accepting only string or Uint8Array<ArrayBuffer> (TS2345). Svelte check did not run after that failure. |
77
+ | `bun run --cwd repos/platform/framework/security test` | Exit 1: 225 pass, one packed surface-composition failure, 785 assertions across 28 files. |
78
+ | `bun run --cwd repos/platform/framework/security build` | Exit 0: emitted core and Svelte artifacts. |
79
+ | `workspace-rules check`, scoped to security | One host-boundary error at implementations/encryption.ts:18. |
80
+ | Declared `internal-oxlint-toolchain/ratchet.mjs`, from security | Exit 1: four findings at encryption.ts:23 and keys.ts:26, listed above. |
81
+
82
+ The packed test reached and passed its universal graph/crypto refusal, emitted
83
+ public imports, export-target/document inventory and strict public declaration
84
+ assertions before failing at the extracted surface composition. This does not
85
+ establish successful extracted widget resolution. Source widget resolution and
86
+ the other 225 tests passed.
87
+
88
+ The accepted scanner-admission task supplies a later authoritative receipt with
89
+ passing typecheck and build, and failed rules, lint and packed-artifact testing.
90
+ That receipt supersedes the TS2345 result above as current typecheck evidence;
91
+ it does not identify a candidate hash or exact command output. The TUI byte-view
92
+ failure above is historical, not an undifferentiated current blocker.
93
+ LocalDB's owner must still correct its emitted dependency closure as described
94
+ above. Neither owner is changed by this package-scoped task. The synchronous
95
+ crypto and writable-filesystem prerequisite remains blocking; a passing build
96
+ or typecheck does not close rules, lint or distributed composition acceptance.
97
+
98
+ ## Round-three scanner-admission receipt: 2026-10-14 (Phoenix)
99
+
100
+ The runtime tools observed framework HEAD
101
+ `de1e598d9e366679dd205af717595b6c43308106` before the direct checks.
102
+ The selected working-tree candidate contained 128 tracked or unignored files,
103
+ with SHA-256 `cd0d9f95f22fdd737322d4ba07bce4d00b32c8c9b4aef938ebe9b9544b69df22`.
104
+ The digest hashes sorted existing package paths, each followed by NUL, file
105
+ bytes and NUL; it precedes this verification-document append. It includes the
106
+ transferred correctness work and this scanner repair, and is not a commit id.
107
+
108
+ | Exact invocation | Observed result |
109
+ | --- | --- |
110
+ | `git {action:"commit",cwd:"repos/platform/framework",paths:["security"],message:commitMessage}` (exact message below) | Exit 1 at commit; no checkpoint created. The tool truncated stderr, so the specific hook diagnostic was not available. The installed pre-commit hook executes `vibes --finite dev check --staged`; it was not bypassed. |
111
+ | `workspace-rules {action:"check",paths:["repos/platform/framework/security"]}` | One error: correct/host-apis-in-host-packages, encryption.ts:18. |
112
+ | `node ../node_modules/@vibesdotdev/internal-oxlint-toolchain/ratchet.mjs`, cwd security | Exit 1: four findings at encryption.ts:23 and keys.ts:26, as listed above. |
113
+ | `bun run --cwd repos/platform/framework/security check` | Exit 2: eight TUI source diagnostics below. Svelte check did not run. |
114
+ | `bun run --cwd repos/platform/framework/security test` | Exit 1: 225 pass, one packed-test failure, 745 assertions across 28 files. All three admission tests passed, including built-in, descriptor-only default and public tool option boundaries. |
115
+ | `bun run --cwd repos/platform/framework/security build` | Exit 2: the same eight TUI diagnostics; core compilation prevented the Svelte packaging step. |
116
+
117
+ The commitMessage supplied to the runtime Git tool was:
118
+
119
+ ```text
120
+ fix(security): converge scanner options admission
121
+
122
+ Preserve and checkpoint the transferred security correctness work, including
123
+ schema ownership, runtime compositions, artifact isolation and host evidence.
124
+ Validate scanner overrides before defaulting; prove malformed and valid
125
+ options through the built-in scanner, descriptor-only kind and public tool.
126
+ Distinguish historical TUI failures from later passing typecheck evidence.
127
+ ```
128
+
129
+ The final scoped commit attempt after this documentation update also exited 1
130
+ at commit with the same truncated diagnostic. No hook was bypassed; the candidate
131
+ remains uncommitted, with package custody retained pending a checkpoint.
132
+
133
+ These round-three TUI findings differ from both historical TUI failures above.
134
+ The TUI owner must repair relocated imports in
135
+ `src/components/content/code/schemas/diffUtils.types.ts:13–14` (backend),
136
+ `src/components/content/schemas/identity/Badge.types.ts:2` and
137
+ `src/components/content/schemas/surfaces/Panel.types.ts:9–10` (theme), and
138
+ `src/shell/schemas/TuiAppShell.ts:9` (ErrorBoundary), plus restore the missing
139
+ `VirtualListContextValue` type at `src/components/data/VirtualList.tsx:147`
140
+ (TS2304), and correct the nullable value assignment at
141
+ `src/components/form/controls/SearchSelect.tsx:188` (TS2322). Six diagnostics are
142
+ TS2307, for eight diagnostics in total.
143
+
144
+ The offline packed test failed in its disposable staging build at these TUI
145
+ errors. Packing, extracted imports, declaration checks and extracted widget
146
+ resolution were not reached in this run. The earlier failed LocalDB emitted
147
+ composition receipt remains unresolved; it is not the demonstrated cause of
148
+ that staging-compilation failure and has no later passing receipt.
149
+ No artifact-isolation change or undeclared dependency was introduced.
150
+ Scanner behavior is observed through real owned compositions; complete package
151
+ typechecking, build, artifact acceptance and independent review remain open.
152
+ The synchronous crypto/write owner prerequisites remain blocking.
153
+
154
+ ## Completion verification: 2026-10-14 (Phoenix)
155
+
156
+ The complete staged package contained 128 files with no untracked files or
157
+ index/working-tree differences. Its staged patch SHA-256 was
158
+ `d8879895710fa42eac692475be377bb1ea9e598ed192db47d602dbeeb0153155`.
159
+ This identifies the observed staged patch, not a commit or a published artifact.
160
+ Only README, SPEC and this document were subsequently reconciled with these results.
161
+
162
+ | Exact invocation | Observed result |
163
+ | --- | --- |
164
+ | `bun run --cwd repos/platform/framework/security check` | Exit 0; TypeScript passed, Svelte reported zero errors and zero warnings. |
165
+ | `bun run --cwd repos/platform/framework/security build` | Exit 0; core and Svelte emitted. |
166
+ | `bun run --cwd repos/platform/framework/security test` | Exit 1; 225 pass, one fail, 829 assertions across 28 files. All three scanner/freshness admission tests passed. |
167
+ | `workspace-rules {action:"check",paths:["repos/platform/framework/security"]}` | One host-boundary error at encryption.ts:18. |
168
+ | `node ../node_modules/@vibesdotdev/internal-oxlint-toolchain/ratchet.mjs`, cwd security | Exit 1; the same four encryption.ts:23 / keys.ts:26 findings. |
169
+
170
+ This packed attempt completed the staging build, offline Bun pack, tar extraction,
171
+ universal graph/crypto refusal, emitted public imports, export/document inventory
172
+ and strict public declarations. Extracted surface composition then failed:
173
+ LocalDB's emitted sqlite-driver.base.js imports undeclared @vibesdotdev/runtime.
174
+ This is a new observation of that artifact failure; it does not change the
175
+ round-three failure's earlier stage or cause. Source surface tests passed.
176
+ The TUI diagnostics above belong to the supplied round-three receipt; this run's
177
+ source check/build passed against the live sibling composition.
178
+
179
+ That completion run's checkpoint attempts encountered a framework index lock
180
+ (Git exit 128) and a runtime Git-tool timeout after 65 seconds. These were not a
181
+ captured hook refusal. All required additions stayed staged, while its final
182
+ README, SPEC and receipt updates awaited staging. The captured Git error was:
183
+ Unable to create framework/.git/index.lock: File exists. This is historical
184
+ checkpoint evidence; no committed-artifact claim follows from those checks.
185
+ Crypto/filesystem host contracts and LocalDB's emitted closure remain owner
186
+ handoffs. Package acceptance and independent artifact review remain open.
@@ -0,0 +1,29 @@
1
+ # Built-in scanner work bound
2
+
3
+ The admitted input is at most 262,144 UTF-16 units. The fixed rule set makes
4
+ O(n) work in input length, with constants determined by the shipped rules;
5
+ this claim does not extend to arbitrary redactor patterns.
6
+
7
+ - Credential and password rules start with fixed literal prefixes. Their
8
+ whitespace runs cannot contain another prefix. Credential value characters
9
+ are disjoint from delimiters and quotes. Password values have no failing
10
+ suffix and consume the entire non-whitespace run on success.
11
+ - Provider and GitHub tokens have fixed prefixes and fixed-length bodies.
12
+ - SSN and passport rules have fixed maximum match lengths.
13
+ - Email attempts inspect at most 64 local-part and 126 domain units before
14
+ the final dot. The trailing alphabetic run has no failing suffix: successful
15
+ matches consume it. Failed starts therefore inspect a fixed-size window.
16
+ - Instruction overrides start with a fixed verb and consume disjoint whitespace
17
+ and modifier words. Modifiers cannot contain another starting verb. The
18
+ repeated alternatives have distinct words; whitespace cannot match a word.
19
+ Persona and system-prompt rules likewise alternate distinct fixed words
20
+ and whitespace, which cannot contain another start.
21
+ - Markup uses a fixed opening-prefix search followed by one terminator search.
22
+ A success advances past the terminator; a missing terminator ends that rule.
23
+ Neither case retries the same unterminated suffix.
24
+
25
+ Rules use fresh match state per call. Category order, non-overlapping matches
26
+ within each rule, rule identifiers and original UTF-16 spans are preserved.
27
+ The public runtime scan tests exercise long nonmatches, incomplete instruction
28
+ sequences, credential prefixes, unterminated markup, and nested opening markup.
29
+ The work argument comes from these traversals, not timing measurements.