@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,99 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const RedactionMatchSchema: z.ZodObject<{
3
+ pattern: z.ZodString;
4
+ index: z.ZodNumber;
5
+ length: z.ZodNumber;
6
+ replacement: z.ZodString;
7
+ }, z.core.$strip>;
8
+ export type RedactionMatch = z.infer<typeof RedactionMatchSchema>;
9
+ export declare const SecurityRedactorResultSchema: z.ZodObject<{
10
+ redacted: z.ZodString;
11
+ matches: z.ZodArray<z.ZodObject<{
12
+ pattern: z.ZodString;
13
+ index: z.ZodNumber;
14
+ length: z.ZodNumber;
15
+ replacement: z.ZodString;
16
+ }, z.core.$strip>>;
17
+ redactorAvailable: z.ZodDefault<z.ZodBoolean>;
18
+ }, z.core.$strip>;
19
+ export type SecurityRedactorResult = z.infer<typeof SecurityRedactorResultSchema>;
20
+ export declare const SecurityRedactorDescriptorSchema: z.ZodObject<{
21
+ id: z.ZodString;
22
+ kind: z.ZodLiteral<"security/redactor">;
23
+ name: z.ZodString;
24
+ description: z.ZodOptional<z.ZodString>;
25
+ enabled: z.ZodOptional<z.ZodBoolean>;
26
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
27
+ hardware: z.ZodOptional<z.ZodArray<z.ZodEnum<{
28
+ consumer: "consumer";
29
+ cloud: "cloud";
30
+ }>>>;
31
+ }, z.core.$strip>;
32
+ export type SecurityRedactorDescriptor = z.output<typeof SecurityRedactorDescriptorSchema>;
33
+ export type { RedactionRule } from '../RedactionRule.ts';
34
+ /** Admission only: optional rules preserve omission; matching budgets belong to implementations. */
35
+ export declare const SecurityRedactorArgumentsSchema: z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodObject<{
36
+ id: z.ZodString;
37
+ name: z.ZodString;
38
+ pattern: z.ZodString;
39
+ replacement: z.ZodString;
40
+ target: z.ZodEnum<{
41
+ metadata: "metadata";
42
+ content: "content";
43
+ header: "header";
44
+ }>;
45
+ enabled: z.ZodDefault<z.ZodBoolean>;
46
+ }, z.core.$strip>>>], null>;
47
+ export type SecurityRedactorArguments = z.input<typeof SecurityRedactorArgumentsSchema>;
48
+ export declare const SecurityRedactorServiceSchema: z.ZodObject<{
49
+ descriptor: z.ZodObject<{
50
+ id: z.ZodString;
51
+ kind: z.ZodLiteral<"security/redactor">;
52
+ name: z.ZodString;
53
+ description: z.ZodOptional<z.ZodString>;
54
+ enabled: z.ZodOptional<z.ZodBoolean>;
55
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
56
+ hardware: z.ZodOptional<z.ZodArray<z.ZodEnum<{
57
+ consumer: "consumer";
58
+ cloud: "cloud";
59
+ }>>>;
60
+ }, z.core.$strip>;
61
+ redact: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodObject<{
62
+ id: z.ZodString;
63
+ name: z.ZodString;
64
+ pattern: z.ZodString;
65
+ replacement: z.ZodString;
66
+ target: z.ZodEnum<{
67
+ metadata: "metadata";
68
+ content: "content";
69
+ header: "header";
70
+ }>;
71
+ enabled: z.ZodDefault<z.ZodBoolean>;
72
+ }, z.core.$strip>>>], null>, z.ZodPromise<z.ZodObject<{
73
+ redacted: z.ZodString;
74
+ matches: z.ZodArray<z.ZodObject<{
75
+ pattern: z.ZodString;
76
+ index: z.ZodNumber;
77
+ length: z.ZodNumber;
78
+ replacement: z.ZodString;
79
+ }, z.core.$strip>>;
80
+ redactorAvailable: z.ZodDefault<z.ZodBoolean>;
81
+ }, z.core.$strip>>>;
82
+ }, z.core.$strip>;
83
+ export type SecurityRedactorService = z.infer<typeof SecurityRedactorServiceSchema>;
84
+ export declare const BuiltinRedactionInputSchema: z.ZodObject<{
85
+ content: z.ZodString;
86
+ rules: z.ZodArray<z.ZodObject<{
87
+ id: z.ZodString;
88
+ name: z.ZodString;
89
+ pattern: z.ZodString;
90
+ replacement: z.ZodString;
91
+ target: z.ZodEnum<{
92
+ metadata: "metadata";
93
+ content: "content";
94
+ header: "header";
95
+ }>;
96
+ enabled: z.ZodDefault<z.ZodBoolean>;
97
+ }, z.core.$strip>>;
98
+ }, z.core.$strip>;
99
+ //# sourceMappingURL=redactor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redactor.d.ts","sourceRoot":"","sources":["../../../src/schemas/contracts/redactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,eAAO,MAAM,oBAAoB;;;;;iBAK/B,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,eAAO,MAAM,4BAA4B;;;;;;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,eAAO,MAAM,gCAAgC;;;;;;;;;;;iBAQ3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAC3F,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,oGAAoG;AACpG,eAAO,MAAM,+BAA+B;;;;;;;;;;;2BAAiE,CAAC;AAC9G,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAGpF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;iBAAqF,CAAC"}
@@ -0,0 +1,34 @@
1
+ import * as z from 'zod/v4';
2
+ export const RedactionMatchSchema = z.object({
3
+ pattern: z.string(),
4
+ index: z.number(),
5
+ length: z.number(),
6
+ replacement: z.string(),
7
+ });
8
+ export const SecurityRedactorResultSchema = z.object({
9
+ redacted: z.string(),
10
+ matches: z.array(RedactionMatchSchema),
11
+ redactorAvailable: z.boolean().default(true),
12
+ });
13
+ export const SecurityRedactorDescriptorSchema = z.object({
14
+ id: z.string(),
15
+ kind: z.literal('security/redactor'),
16
+ name: z.string(),
17
+ description: z.string().optional(),
18
+ enabled: z.boolean().optional(),
19
+ tags: z.array(z.string()).optional(),
20
+ hardware: z.array(z.enum(['consumer', 'cloud'])).optional(),
21
+ });
22
+ import { RedactionRuleSchema } from "../RedactionRule.js";
23
+ /** Admission only: optional rules preserve omission; matching budgets belong to implementations. */
24
+ export const SecurityRedactorArgumentsSchema = z.tuple([z.string(), z.array(RedactionRuleSchema).optional()]);
25
+ export const SecurityRedactorServiceSchema = z.object({
26
+ descriptor: SecurityRedactorDescriptorSchema,
27
+ redact: z.function({
28
+ input: SecurityRedactorArgumentsSchema,
29
+ output: z.promise(SecurityRedactorResultSchema),
30
+ }),
31
+ });
32
+ import { SecurityContentSchema } from "./scanner.js";
33
+ export const BuiltinRedactionInputSchema = z.object({ content: SecurityContentSchema, rules: z.array(RedactionRuleSchema).max(64) });
34
+ //# sourceMappingURL=redactor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redactor.js","sourceRoot":"","sources":["../../../src/schemas/contracts/redactor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CAC1B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC;IACtC,iBAAiB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CAC/C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC,MAAM,CAAC;IACrD,EAAE,EAAE,CAAC,CAAC,MAAM,EAA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od/v4';
2
+ /** Optional at call boundaries: omission is allowed; null and malformed fields reject. */
3
+ export declare const SecurityScannerOverridesSchema: z.ZodObject<{
4
+ detectSecrets: z.ZodOptional<z.ZodBoolean>;
5
+ detectPII: z.ZodOptional<z.ZodBoolean>;
6
+ detectPromptInjection: z.ZodOptional<z.ZodBoolean>;
7
+ }, z.core.$strip>;
8
+ export declare const SecurityScannerOptionsSchema: z.ZodObject<{
9
+ detectSecrets: z.ZodDefault<z.ZodBoolean>;
10
+ detectPII: z.ZodDefault<z.ZodBoolean>;
11
+ detectPromptInjection: z.ZodDefault<z.ZodBoolean>;
12
+ }, z.core.$strip>;
13
+ export type SecurityScannerOptions = z.infer<typeof SecurityScannerOptionsSchema>;
14
+ export declare const ThreatMatchSchema: z.ZodObject<{
15
+ pattern: z.ZodString;
16
+ index: z.ZodNumber;
17
+ length: z.ZodNumber;
18
+ }, z.core.$strip>;
19
+ export type ThreatMatch = z.infer<typeof ThreatMatchSchema>;
20
+ export declare const SecurityScannerResultSchema: z.ZodObject<{
21
+ threats: z.ZodArray<z.ZodObject<{
22
+ severity: z.ZodEnum<{
23
+ low: "low";
24
+ medium: "medium";
25
+ high: "high";
26
+ critical: "critical";
27
+ }>;
28
+ kind: z.ZodEnum<{
29
+ prompt_injection: "prompt_injection";
30
+ secret_leak: "secret_leak";
31
+ pii: "pii";
32
+ suspicious_payload: "suspicious_payload";
33
+ }>;
34
+ description: z.ZodString;
35
+ matches: z.ZodArray<z.ZodObject<{
36
+ pattern: z.ZodString;
37
+ index: z.ZodNumber;
38
+ length: z.ZodNumber;
39
+ }, z.core.$strip>>;
40
+ }, z.core.$strip>>;
41
+ scanAvailable: z.ZodDefault<z.ZodBoolean>;
42
+ }, z.core.$strip>;
43
+ export type SecurityScannerResult = z.infer<typeof SecurityScannerResultSchema>;
44
+ export declare const SecurityScannerDescriptorSchema: z.ZodObject<{
45
+ id: z.ZodString;
46
+ kind: z.ZodLiteral<"security/scanner">;
47
+ name: z.ZodString;
48
+ description: z.ZodOptional<z.ZodString>;
49
+ enabled: z.ZodOptional<z.ZodBoolean>;
50
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ hardware: z.ZodOptional<z.ZodArray<z.ZodEnum<{
52
+ consumer: "consumer";
53
+ cloud: "cloud";
54
+ }>>>;
55
+ options: z.ZodOptional<z.ZodObject<{
56
+ detectSecrets: z.ZodDefault<z.ZodBoolean>;
57
+ detectPII: z.ZodDefault<z.ZodBoolean>;
58
+ detectPromptInjection: z.ZodDefault<z.ZodBoolean>;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>;
61
+ export type SecurityScannerDescriptor = z.output<typeof SecurityScannerDescriptorSchema>;
62
+ export declare const MAX_SCANNABLE_CONTENT_LENGTH = 262144;
63
+ export declare const SecurityContentSchema: z.ZodString;
64
+ export declare const SecurityScannerServiceSchema: z.ZodObject<{
65
+ descriptor: z.ZodObject<{
66
+ id: z.ZodString;
67
+ kind: z.ZodLiteral<"security/scanner">;
68
+ name: z.ZodString;
69
+ description: z.ZodOptional<z.ZodString>;
70
+ enabled: z.ZodOptional<z.ZodBoolean>;
71
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
72
+ hardware: z.ZodOptional<z.ZodArray<z.ZodEnum<{
73
+ consumer: "consumer";
74
+ cloud: "cloud";
75
+ }>>>;
76
+ options: z.ZodOptional<z.ZodObject<{
77
+ detectSecrets: z.ZodDefault<z.ZodBoolean>;
78
+ detectPII: z.ZodDefault<z.ZodBoolean>;
79
+ detectPromptInjection: z.ZodDefault<z.ZodBoolean>;
80
+ }, z.core.$strip>>;
81
+ }, z.core.$strip>;
82
+ scan: z.ZodFunction<z.ZodTuple<readonly [z.ZodString, z.ZodOptional<z.ZodObject<{
83
+ detectSecrets: z.ZodOptional<z.ZodBoolean>;
84
+ detectPII: z.ZodOptional<z.ZodBoolean>;
85
+ detectPromptInjection: z.ZodOptional<z.ZodBoolean>;
86
+ }, z.core.$strip>>], null>, z.ZodPromise<z.ZodObject<{
87
+ threats: z.ZodArray<z.ZodObject<{
88
+ severity: z.ZodEnum<{
89
+ low: "low";
90
+ medium: "medium";
91
+ high: "high";
92
+ critical: "critical";
93
+ }>;
94
+ kind: z.ZodEnum<{
95
+ prompt_injection: "prompt_injection";
96
+ secret_leak: "secret_leak";
97
+ pii: "pii";
98
+ suspicious_payload: "suspicious_payload";
99
+ }>;
100
+ description: z.ZodString;
101
+ matches: z.ZodArray<z.ZodObject<{
102
+ pattern: z.ZodString;
103
+ index: z.ZodNumber;
104
+ length: z.ZodNumber;
105
+ }, z.core.$strip>>;
106
+ }, z.core.$strip>>;
107
+ scanAvailable: z.ZodDefault<z.ZodBoolean>;
108
+ }, z.core.$strip>>>;
109
+ }, z.core.$strip>;
110
+ export type SecurityScannerService = z.infer<typeof SecurityScannerServiceSchema>;
111
+ export type SecurityScannerOptionsInput = z.infer<typeof SecurityScannerOverridesSchema>;
112
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../../src/schemas/contracts/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,0FAA0F;AAC1F,eAAO,MAAM,8BAA8B;;;;iBAIzC,CAAC;AACH,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,eAAO,MAAM,iBAAiB;;;;iBAI5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC5D,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;iBAQtC,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;iBAS1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACzF,eAAO,MAAM,4BAA4B,SAAU,CAAC;AACpD,eAAO,MAAM,qBAAqB,aAA+C,CAAC;AAElF,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA6M,CAAC;AACvP,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
@@ -0,0 +1,40 @@
1
+ import * as z from 'zod/v4';
2
+ /** Optional at call boundaries: omission is allowed; null and malformed fields reject. */
3
+ export const SecurityScannerOverridesSchema = z.object({
4
+ detectSecrets: z.boolean().optional(),
5
+ detectPII: z.boolean().optional(),
6
+ detectPromptInjection: z.boolean().optional(),
7
+ });
8
+ export const SecurityScannerOptionsSchema = SecurityScannerOverridesSchema.extend({
9
+ detectSecrets: z.boolean().default(true),
10
+ detectPII: z.boolean().default(true),
11
+ detectPromptInjection: z.boolean().default(true),
12
+ });
13
+ export const ThreatMatchSchema = z.object({
14
+ pattern: z.string(),
15
+ index: z.number(),
16
+ length: z.number(),
17
+ });
18
+ export const SecurityScannerResultSchema = z.object({
19
+ threats: z.array(z.object({
20
+ severity: z.enum(['low', 'medium', 'high', 'critical']),
21
+ kind: z.enum(['prompt_injection', 'secret_leak', 'pii', 'suspicious_payload']),
22
+ description: z.string(),
23
+ matches: z.array(ThreatMatchSchema),
24
+ })),
25
+ scanAvailable: z.boolean().default(true),
26
+ });
27
+ export const SecurityScannerDescriptorSchema = z.object({
28
+ id: z.string(),
29
+ kind: z.literal('security/scanner'),
30
+ name: z.string(),
31
+ description: z.string().optional(),
32
+ enabled: z.boolean().optional(),
33
+ tags: z.array(z.string()).optional(),
34
+ hardware: z.array(z.enum(['consumer', 'cloud'])).optional(),
35
+ options: SecurityScannerOptionsSchema.optional(),
36
+ });
37
+ export const MAX_SCANNABLE_CONTENT_LENGTH = 262_144;
38
+ export const SecurityContentSchema = z.string().max(MAX_SCANNABLE_CONTENT_LENGTH);
39
+ export const SecurityScannerServiceSchema = z.object({ descriptor: SecurityScannerDescriptorSchema, scan: z.function({ input: [SecurityContentSchema, SecurityScannerOverridesSchema.optional()], output: z.promise(SecurityScannerResultSchema) }) });
40
+ //# sourceMappingURL=scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../../src/schemas/contracts/scanner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,0FAA0F;AAC1F,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACrC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IACjC,qBAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,8BAA8B,CAAC,MAAM,CAAC;IAC9E,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACxC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACpC,qBAAqB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;CACnD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE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4B,GAAG,OAAO,CAAC;AACpD,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;AAElF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,+BAA+B,EAAE,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC,qBAAqB,EAAE,8BAA8B,CAAC,QAAQ,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,2BAA2B,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const SecurityToolValueSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>, z.ZodArray<z.ZodUnknown>]>;
3
+ export type SecurityToolValue = z.infer<typeof SecurityToolValueSchema>;
4
+ export declare const SecurityToolWidgetPropsSchema: z.ZodObject<{
5
+ toolCall: z.ZodOptional<z.ZodObject<{
6
+ id: z.ZodOptional<z.ZodString>;
7
+ messageId: z.ZodOptional<z.ZodString>;
8
+ tool: z.ZodOptional<z.ZodString>;
9
+ events: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
10
+ startedAt: z.ZodOptional<z.ZodNumber>;
11
+ updatedAt: z.ZodOptional<z.ZodNumber>;
12
+ }, z.core.$strip>>;
13
+ status: z.ZodOptional<z.ZodString>;
14
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>, z.ZodArray<z.ZodUnknown>]>>>;
15
+ output: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>, z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodUndefined]>>, z.ZodArray<z.ZodUnknown>]>>>;
16
+ error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
17
+ }, z.core.$strip>;
18
+ export type SecurityToolWidgetProps = z.infer<typeof SecurityToolWidgetPropsSchema>;
19
+ //# sourceMappingURL=widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../../src/schemas/contracts/widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,uBAAuB,+PAA0F,CAAC;AAC/H,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;iBAKxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import * as z from 'zod/v4';
2
+ const PrimitiveSchema = z.union([z.string(), z.number(), z.boolean(), z.null(), z.undefined()]);
3
+ export const SecurityToolValueSchema = z.union([PrimitiveSchema, z.record(z.string(), PrimitiveSchema), z.array(z.unknown())]);
4
+ export const SecurityToolWidgetPropsSchema = z.object({
5
+ toolCall: z.object({ id: z.string().optional(), messageId: z.string().optional(), tool: z.string().optional(),
6
+ events: z.array(z.unknown()).optional(), startedAt: z.number().optional(), updatedAt: z.number().optional() }).optional(),
7
+ status: z.string().optional(), args: z.record(z.string(), SecurityToolValueSchema).optional(),
8
+ output: z.record(z.string(), SecurityToolValueSchema).optional(), error: z.string().nullable().optional()
9
+ });
10
+ //# sourceMappingURL=widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../src/schemas/contracts/widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;AAChG,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,eAAe,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;AAE/H,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,CAAC,MAAM,CAAC;IAClD,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACzG,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE;IAC7H,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC,QAAQ,EAAE;IAC7F,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,uBAAuB,CAAC,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC5G,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const EncryptionKeySchema: z.ZodString;
3
+ export declare const EncryptedSecretSchema: z.ZodObject<{
4
+ iv: z.ZodBase64;
5
+ tag: z.ZodBase64;
6
+ encrypted: z.ZodBase64;
7
+ }, z.core.$strip>;
8
+ export type EncryptedSecret = z.infer<typeof EncryptedSecretSchema>;
9
+ export declare const BinaryCiphertextSchema: z.ZodInstanceOf<Uint8Array<ArrayBuffer>>;
10
+ export declare const StoredCiphertextSchema: z.ZodString;
11
+ export declare function parseEncryptionKey(value: string): string;
12
+ export declare function parseCiphertext<T>(schema: z.ZodType<T>, value: unknown): T;
13
+ export type EncryptionKeyRuntime = Pick<import('@vibesdotdev/kernel').RuntimeRef, 'resolveCredential' | 'scope'> & NonNullable<Parameters<typeof import('@vibesdotdev/paths').getPathRoots>[0]>;
14
+ export declare const KeyFileSystemSchema: z.ZodObject<{
15
+ readFileSync: z.ZodFunction<z.ZodTuple<readonly [z.ZodString, z.ZodLiteral<"utf-8">], null>, z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>>;
16
+ writeFileSync: z.ZodFunction<z.ZodTuple<readonly [z.ZodString, z.ZodString, z.ZodObject<{
17
+ mode: z.ZodNumber;
18
+ flag: z.ZodLiteral<"wx">;
19
+ }, z.core.$strip>], null>, z.ZodVoid>;
20
+ mkdirSync: z.ZodFunction<z.ZodTuple<readonly [z.ZodString, z.ZodObject<{
21
+ recursive: z.ZodLiteral<true>;
22
+ }, z.core.$strip>], null>, z.ZodOptional<z.ZodString>>;
23
+ }, z.core.$strip>;
24
+ export type KeyFileSystem = z.infer<typeof KeyFileSystemSchema>;
25
+ //# sourceMappingURL=encryption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.d.ts","sourceRoot":"","sources":["../../src/schemas/encryption.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,mBAAmB,aAAiD,CAAC;AAElF,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACpE,eAAO,MAAM,sBAAsB,0CAAmE,CAAC;AACvG,eAAO,MAAM,sBAAsB,aAGjC,CAAC;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOxD;AACD,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAK1E;AACD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,OAAO,qBAAqB,EAAE,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,GAAG,WAAW,CAAC,UAAU,CAAC,cAAc,oBAAoB,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAChM,eAAO,MAAM,mBAAmB;;;;;;;;;iBAI9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { HexSchema, Base64Schema } from '@vibesdotdev/crypto/encoding';
2
+ import * as z from 'zod/v4';
3
+ import { CapabilityError } from '@vibesdotdev/kernel';
4
+ export const EncryptionKeySchema = HexSchema.refine(value => value.length === 64);
5
+ const BlockSchema = Base64Schema.refine(value => value.length === 24 && value.endsWith('=='));
6
+ export const EncryptedSecretSchema = z.object({
7
+ iv: BlockSchema,
8
+ tag: BlockSchema,
9
+ encrypted: Base64Schema
10
+ });
11
+ export const BinaryCiphertextSchema = z.instanceof(Uint8Array).refine(value => value.byteLength >= 32);
12
+ export const StoredCiphertextSchema = z.string().refine(value => {
13
+ const parts = value.split(':');
14
+ return parts.length === 3 && EncryptedSecretSchema.safeParse({ iv: parts[0], tag: parts[1], encrypted: parts[2] }).success;
15
+ });
16
+ export function parseEncryptionKey(value) {
17
+ const parsed = EncryptionKeySchema.safeParse(value);
18
+ if (parsed.success)
19
+ return parsed.data;
20
+ throw new CapabilityError('Encryption keys must contain exactly 32 hexadecimal bytes.', 'INVALID_INPUT', {
21
+ reason: 'encryption-key-invalid', retryable: false
22
+ });
23
+ }
24
+ export function parseCiphertext(schema, value) {
25
+ const parsed = schema.safeParse(value);
26
+ if (parsed.success)
27
+ return parsed.data;
28
+ throw new CapabilityError('Invalid encrypted data', 'INVALID_INPUT', { reason: 'ciphertext-invalid', retryable: false });
29
+ }
30
+ export const KeyFileSystemSchema = z.object({
31
+ readFileSync: z.function({ input: [z.string(), z.literal('utf-8')], output: z.union([z.string(), z.instanceof(Uint8Array)]) }),
32
+ writeFileSync: z.function({ input: [z.string(), z.string(), z.object({ mode: z.number(), flag: z.literal('wx') })], output: z.void() }),
33
+ mkdirSync: z.function({ input: [z.string(), z.object({ recursive: z.literal(true) })], output: z.string().optional() })
34
+ });
35
+ //# sourceMappingURL=encryption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encryption.js","sourceRoot":"","sources":["../../src/schemas/encryption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC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AC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC;CAC1H,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { ReportEventInputSchema, ReportEventOutputSchema, type ReportEventInput, type ReportEventOutput } from './report-event.ts';
2
+ export { SecurityPolicySchema, type SecurityPolicy } from './SecurityPolicy.ts';
3
+ export { ThreatReportSchema, type ThreatReport } from './ThreatReport.ts';
4
+ export { RedactionRuleSchema, type RedactionRule } from './RedactionRule.ts';
5
+ export { AuditEventSchema, AuditQueryOptionsSchema, type AuditEvent, type AuditQueryOptions } from './AuditEvent.ts';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,KAAK,gBAAgB,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACnI,OAAO,EAAE,oBAAoB,EAAE,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,KAAK,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { ReportEventInputSchema, ReportEventOutputSchema } from "./report-event.js";
2
+ export { SecurityPolicySchema } from "./SecurityPolicy.js";
3
+ export { ThreatReportSchema } from "./ThreatReport.js";
4
+ export { RedactionRuleSchema } from "./RedactionRule.js";
5
+ export { AuditEventSchema, AuditQueryOptionsSchema } from "./AuditEvent.js";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAiD,MAAM,mBAAmB,CAAC;AACnI,OAAO,EAAE,oBAAoB,EAAuB,MAAM,qBAAqB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAqB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAsB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAA2C,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './contracts/policy.ts';
2
+ //# sourceMappingURL=policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../src/schemas/policy.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./contracts/policy.js";
2
+ //# sourceMappingURL=policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/schemas/policy.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './contracts/redactor.ts';
2
+ //# sourceMappingURL=redactor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redactor.d.ts","sourceRoot":"","sources":["../../src/schemas/redactor.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./contracts/redactor.js";
2
+ //# sourceMappingURL=redactor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redactor.js","sourceRoot":"","sources":["../../src/schemas/redactor.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
@@ -0,0 +1,29 @@
1
+ import * as z from 'zod/v4';
2
+ export declare const ReportEventInputSchema: z.ZodObject<{
3
+ event: z.ZodObject<{
4
+ id: z.ZodString;
5
+ timestamp: z.ZodString;
6
+ actor: z.ZodString;
7
+ action: z.ZodString;
8
+ resource: z.ZodString;
9
+ outcome: z.ZodEnum<{
10
+ allow: "allow";
11
+ deny: "deny";
12
+ review: "review";
13
+ }>;
14
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
15
+ }, z.core.$strip>;
16
+ }, z.core.$strip>;
17
+ export type ReportEventInput = z.infer<typeof ReportEventInputSchema>;
18
+ export declare const ReportEventOutputSchema: z.ZodObject<{
19
+ recorded: z.ZodBoolean;
20
+ eventId: z.ZodString;
21
+ error: z.ZodOptional<z.ZodString>;
22
+ failure: z.ZodOptional<z.ZodObject<{
23
+ name: z.ZodString;
24
+ code: z.ZodOptional<z.ZodString>;
25
+ reason: z.ZodOptional<z.ZodString>;
26
+ }, z.core.$strip>>;
27
+ }, z.core.$strip>;
28
+ export type ReportEventOutput = z.infer<typeof ReportEventOutputSchema>;
29
+ //# sourceMappingURL=report-event.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-event.d.ts","sourceRoot":"","sources":["../../src/schemas/report-event.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;iBAEjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,uBAAuB;;;;;;;;;iBAYlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { AuditEventSchema } from "./AuditEvent.js";
2
+ import * as z from 'zod/v4';
3
+ export const ReportEventInputSchema = z.object({
4
+ event: AuditEventSchema.describe('Audit event to report'),
5
+ });
6
+ export const ReportEventOutputSchema = z.object({
7
+ recorded: z.boolean().describe('Whether the event was successfully recorded'),
8
+ eventId: z.string().describe('ID of the recorded event'),
9
+ error: z.string().optional().describe('Why recording failed: a fixed message naming the failure facts, never the raw error'),
10
+ failure: z
11
+ .object({
12
+ name: z.string().describe('The failure class name'),
13
+ code: z.string().optional().describe('An errno-shaped or CapabilityError code'),
14
+ reason: z.string().optional().describe('A CapabilityError reason'),
15
+ })
16
+ .optional()
17
+ .describe('Value-free facts of the failure when recording threw: no message, stack or cause'),
18
+ });
19
+ //# sourceMappingURL=report-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-event.js","sourceRoot":"","sources":["../../src/schemas/report-event.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,KAAK,EAAE,gBAAgB,CAAC,QAAQ,CAAC,uBAAuB,CAAC;CACzD,CAAC,CAAC;AAIH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/C,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;IAC7E,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IACxD,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,qFAAqF,CAAC;IAC5H,OAAO,EAAE,CAAC;SACR,MAAM,CAAC;QACP,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC;QACnD,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;QAC/E,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;KAClE,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CAAC,kFAAkF,CAAC;CAC9F,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './contracts/scanner.ts';
2
+ //# sourceMappingURL=scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.d.ts","sourceRoot":"","sources":["../../src/schemas/scanner.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./contracts/scanner.js";
2
+ //# sourceMappingURL=scanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanner.js","sourceRoot":"","sources":["../../src/schemas/scanner.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { SecurityClient, default } from './security-client.ts';
2
+ export type { AuditEvent, AuditQueryOptions } from '../kinds/auditor.kind.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/security-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/D,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { SecurityClient, default } from "./security-client.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/security-client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { type VibesRuntime } from '@vibesdotdev/kernel';
2
+ import { BaseRuntimeClient, type RuntimeClientDescriptor } from '@vibesdotdev/kernel/client';
3
+ import type { KindContext } from '@vibesdotdev/kernel';
4
+ import type { AuditEvent, AuditQueryOptions } from '../kinds/auditor.kind.ts';
5
+ /**
6
+ * The semantic security client: audit emission and querying through the
7
+ * runtime-selected `security/auditor`.
8
+ *
9
+ * The client owns no audit state and no second store — every operation
10
+ * resolves the selected auditor through `runtime.query('security/auditor')`,
11
+ * so descriptor selection, the in-memory default and composed sinks keep
12
+ * their existing ownership. Resolve it through the kernel client owner:
13
+ *
14
+ * ```ts
15
+ * import { getVibesClient } from '@vibesdotdev/kernel/client';
16
+ * const security = await getVibesClient<SecurityClient>('security', runtime);
17
+ * await security.emit(event);
18
+ * const events = await security.queryAuditEvents({ actor: 'agent' });
19
+ * ```
20
+ *
21
+ * Absence is a typed refusal, not a silent skip: when no auditor is
22
+ * registered, `emit` and `queryAuditEvents` fail with CapabilityError code
23
+ * `UNAVAILABLE` and reason `security-auditor-unavailable`.
24
+ */
25
+ export declare class SecurityClient extends BaseRuntimeClient {
26
+ constructor(descriptor?: RuntimeClientDescriptor, context?: KindContext, runtime?: VibesRuntime);
27
+ private auditor;
28
+ /** Record one audit event with the selected security/auditor. */
29
+ emit(event: AuditEvent): Promise<void>;
30
+ /** Query recorded audit events with the selected security/auditor. */
31
+ queryAuditEvents(options?: AuditQueryOptions): Promise<AuditEvent[]>;
32
+ }
33
+ export default SecurityClient;
34
+ //# sourceMappingURL=security-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"security-client.d.ts","sourceRoot":"","sources":["../../src/security-client/security-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC7F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAGX,UAAU,EACV,iBAAiB,EACjB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,cAAe,SAAQ,iBAAiB;gBAEnD,UAAU,GAAE,uBAAoE,EAChF,OAAO,CAAC,EAAE,WAAW,EACrB,OAAO,CAAC,EAAE,YAAY;YAKT,OAAO;IAerB,iEAAiE;IAC3D,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5C,sEAAsE;IAChE,gBAAgB,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;CAK9E;AAED,eAAe,cAAc,CAAC"}