@akasecurity/cli 0.9.7 → 0.9.9

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 (211) hide show
  1. package/README.md +5 -1
  2. package/dist/cli.js +11106 -3012
  3. package/extension/manifest.json +1 -1
  4. package/native-host/host.js +16353 -8612
  5. package/native-host/scan-worker.js +7894 -2434
  6. package/native-host/sync.js +24842 -0
  7. package/package.json +10 -8
  8. package/web-ui/package.json +4 -3
  9. package/web-ui/packages/dashboard-ui/package.json +6 -5
  10. package/web-ui/packages/detections/package.json +2 -2
  11. package/web-ui/packages/local-ops/package.json +2 -2
  12. package/web-ui/packages/persistence/package.json +2 -2
  13. package/web-ui/packages/plugin-sdk/package.json +3 -3
  14. package/web-ui/packages/schema/package.json +5 -4
  15. package/web-ui/packages/ui-kit/package.json +2 -2
  16. package/web-ui/rules/core-code-context/localhost-ref.json +2 -2
  17. package/web-ui/web-ui/.next/BUILD_ID +1 -1
  18. package/web-ui/web-ui/.next/app-build-manifest.json +249 -249
  19. package/web-ui/web-ui/.next/app-path-routes-manifest.json +4 -4
  20. package/web-ui/web-ui/.next/build-manifest.json +14 -14
  21. package/web-ui/web-ui/.next/prerender-manifest.json +3 -3
  22. package/web-ui/web-ui/.next/required-server-files.json +3 -2
  23. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
  24. package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
  25. package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
  26. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
  27. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
  28. package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
  29. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
  30. package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
  31. package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
  32. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
  33. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
  34. package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
  35. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +2 -2
  36. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
  37. package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
  38. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +2 -2
  39. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
  40. package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
  41. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
  42. package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
  43. package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
  44. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
  45. package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
  46. package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
  47. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
  48. package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
  49. package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
  50. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +3 -3
  51. package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
  52. package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
  53. package/web-ui/web-ui/.next/server/app/(app)/security/page.js +2 -2
  54. package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
  55. package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
  56. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
  57. package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
  58. package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
  59. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
  60. package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
  61. package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
  62. package/web-ui/web-ui/.next/server/app/(app)/vault/page.js +2 -2
  63. package/web-ui/web-ui/.next/server/app/(app)/vault/page.js.nft.json +1 -1
  64. package/web-ui/web-ui/.next/server/app/(app)/vault/page_client-reference-manifest.js +1 -1
  65. package/web-ui/web-ui/.next/server/app/_not-found/page.js +2 -2
  66. package/web-ui/web-ui/.next/server/app/_not-found/page.js.nft.json +1 -1
  67. package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  68. package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
  69. package/web-ui/web-ui/.next/server/app/_not-found.rsc +10 -10
  70. package/web-ui/web-ui/.next/server/app/icon.svg/route.js +1 -1
  71. package/web-ui/web-ui/.next/server/app/icon.svg/route.js.nft.json +1 -1
  72. package/web-ui/web-ui/.next/server/app/index.html +1 -1
  73. package/web-ui/web-ui/.next/server/app/index.rsc +10 -10
  74. package/web-ui/web-ui/.next/server/app/page.js +2 -2
  75. package/web-ui/web-ui/.next/server/app/page.js.nft.json +1 -1
  76. package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
  77. package/web-ui/web-ui/.next/server/app-paths-manifest.json +4 -4
  78. package/web-ui/web-ui/.next/server/chunks/19.js +22 -0
  79. package/web-ui/web-ui/.next/server/chunks/237.js +884 -0
  80. package/web-ui/web-ui/.next/server/chunks/318.js +6 -0
  81. package/web-ui/web-ui/.next/server/chunks/475.js +1 -0
  82. package/web-ui/web-ui/.next/server/chunks/585.js +12 -0
  83. package/web-ui/web-ui/.next/server/chunks/589.js +99 -0
  84. package/web-ui/web-ui/.next/server/chunks/67.js +6 -0
  85. package/web-ui/web-ui/.next/server/chunks/7.js +1 -0
  86. package/web-ui/web-ui/.next/server/chunks/743.js +11 -0
  87. package/web-ui/web-ui/.next/server/chunks/793.js +893 -0
  88. package/web-ui/web-ui/.next/server/chunks/83.js +1 -0
  89. package/web-ui/web-ui/.next/server/chunks/935.js +61 -0
  90. package/web-ui/web-ui/.next/server/functions-config-manifest.json +5 -5
  91. package/web-ui/web-ui/.next/server/middleware-build-manifest.js +1 -1
  92. package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
  93. package/web-ui/web-ui/.next/server/middleware.js +2 -2
  94. package/web-ui/web-ui/.next/server/pages/404.html +1 -1
  95. package/web-ui/web-ui/.next/server/pages/500.html +1 -1
  96. package/web-ui/web-ui/.next/server/pages/_app.js +1 -1
  97. package/web-ui/web-ui/.next/server/pages/_app.js.nft.json +1 -1
  98. package/web-ui/web-ui/.next/server/pages/_document.js +1 -1
  99. package/web-ui/web-ui/.next/server/pages/_document.js.nft.json +1 -1
  100. package/web-ui/web-ui/.next/server/pages/_error.js +9 -9
  101. package/web-ui/web-ui/.next/server/pages/_error.js.nft.json +1 -1
  102. package/web-ui/web-ui/.next/server/pages-manifest.json +1 -1
  103. package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
  104. package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
  105. package/web-ui/web-ui/.next/static/{YqH1rSLTmXzavf3MtB9ZX → MbmJUh_qusg2UF-ZJLjuR}/_buildManifest.js +1 -1
  106. package/web-ui/web-ui/.next/static/chunks/288-2743815300ed0872.js +1 -0
  107. package/web-ui/web-ui/.next/static/chunks/399-6887e92996f64590.js +1 -0
  108. package/web-ui/web-ui/.next/static/chunks/526-026c69b926a17dbb.js +50 -0
  109. package/web-ui/web-ui/.next/static/chunks/52b9c8c1-87132a73d61bdb69.js +1 -0
  110. package/web-ui/web-ui/.next/static/chunks/563-a96f29a2819589cb.js +1 -0
  111. package/web-ui/web-ui/.next/static/chunks/907-b6ee7720ac5bf516.js +1 -0
  112. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-5ae897a85d4509ca.js +1 -0
  113. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-0f1263f7b62606c9.js +1 -0
  114. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-5ae897a85d4509ca.js +1 -0
  115. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-39fd8cad4b6b709f.js +1 -0
  116. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-5ae897a85d4509ca.js +1 -0
  117. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-b8386e543b783552.js +1 -0
  118. package/web-ui/web-ui/.next/static/chunks/app/(app)/error-14165283b00c8626.js +1 -0
  119. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-5ae897a85d4509ca.js +1 -0
  120. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-62c9e95207311f3d.js +1 -0
  121. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-5ae897a85d4509ca.js +1 -0
  122. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-5ae897a85d4509ca.js +1 -0
  123. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-9792760d5acc2de1.js +1 -0
  124. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-807c39bb900256bd.js +1 -0
  125. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-5ae897a85d4509ca.js +1 -0
  126. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-e3a531d9590a623b.js +1 -0
  127. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-5ae897a85d4509ca.js +1 -0
  128. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-11d47cdf3619126f.js +1 -0
  129. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-83072d434c6b6b0e.js +1 -0
  130. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-5ae897a85d4509ca.js +1 -0
  131. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-15e6d747c4e794c7.js +1 -0
  132. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-5ae897a85d4509ca.js +1 -0
  133. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-b390a81c67dd6d32.js +1 -0
  134. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-5ae897a85d4509ca.js +1 -0
  135. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-07913f82a7e29f67.js +1 -0
  136. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-5ae897a85d4509ca.js +1 -0
  137. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-0898d0d22c14bb45.js +1 -0
  138. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-5ae897a85d4509ca.js +1 -0
  139. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-ad9483e25680d8b4.js +1 -0
  140. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-5ae897a85d4509ca.js +1 -0
  141. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-04450aa587f0d5ef.js +1 -0
  142. package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-a0f1d816312dcb9c.js +1 -0
  143. package/web-ui/web-ui/.next/static/chunks/app/layout-d6718b04dff0ca9c.js +1 -0
  144. package/web-ui/web-ui/.next/static/chunks/app/page-9f976e619a11c1dd.js +1 -0
  145. package/web-ui/web-ui/.next/static/chunks/{framework-ad79db97790c5c58.js → framework-78529e4152d251a3.js} +1 -1
  146. package/web-ui/web-ui/.next/static/chunks/main-aef82d1ebf75b725.js +1 -0
  147. package/web-ui/web-ui/.next/static/chunks/main-app-ecdeb13a427413ee.js +1 -0
  148. package/web-ui/web-ui/.next/static/chunks/pages/_app-cb7c9f431bf725f7.js +1 -0
  149. package/web-ui/web-ui/.next/static/chunks/pages/_error-fae7cf4a2cfcee1b.js +1 -0
  150. package/web-ui/web-ui/.next/static/chunks/{webpack-1b293f289da20845.js → webpack-f10501a57c4d919d.js} +1 -1
  151. package/web-ui/web-ui/.next/static/css/81a7ed955b02c959.css +2 -0
  152. package/web-ui/web-ui/dist/scan-worker.js +7894 -2434
  153. package/web-ui/web-ui/package.json +6 -5
  154. package/web-ui/web-ui/server.js +1 -1
  155. package/web-ui/web-ui/.next/server/chunks/129.js +0 -783
  156. package/web-ui/web-ui/.next/server/chunks/214.js +0 -73
  157. package/web-ui/web-ui/.next/server/chunks/258.js +0 -1
  158. package/web-ui/web-ui/.next/server/chunks/261.js +0 -22
  159. package/web-ui/web-ui/.next/server/chunks/271.js +0 -6
  160. package/web-ui/web-ui/.next/server/chunks/326.js +0 -12
  161. package/web-ui/web-ui/.next/server/chunks/477.js +0 -791
  162. package/web-ui/web-ui/.next/server/chunks/523.js +0 -1
  163. package/web-ui/web-ui/.next/server/chunks/68.js +0 -123
  164. package/web-ui/web-ui/.next/server/chunks/803.js +0 -6
  165. package/web-ui/web-ui/.next/server/chunks/853.js +0 -11
  166. package/web-ui/web-ui/.next/server/chunks/967.js +0 -1
  167. package/web-ui/web-ui/.next/static/chunks/180-0ab5475b6174d4b3.js +0 -1
  168. package/web-ui/web-ui/.next/static/chunks/202-12a474de79b2ad1c.js +0 -1
  169. package/web-ui/web-ui/.next/static/chunks/392-0af97129ba2175ca.js +0 -1
  170. package/web-ui/web-ui/.next/static/chunks/39f60ebf-2d09993ae96ffb2f.js +0 -1
  171. package/web-ui/web-ui/.next/static/chunks/622-e65110f232ad3136.js +0 -62
  172. package/web-ui/web-ui/.next/static/chunks/699-3a550a0d6101e35c.js +0 -1
  173. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-6dba555198465a8f.js +0 -1
  174. package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-2011aeec5114533f.js +0 -1
  175. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-6dba555198465a8f.js +0 -1
  176. package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-e8fbf441cdc78d7e.js +0 -1
  177. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-6dba555198465a8f.js +0 -1
  178. package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-0cf86550a9f22cf8.js +0 -1
  179. package/web-ui/web-ui/.next/static/chunks/app/(app)/error-b23da3100319d95d.js +0 -1
  180. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-6dba555198465a8f.js +0 -1
  181. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-3b57fa7a28949fdf.js +0 -1
  182. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-6dba555198465a8f.js +0 -1
  183. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-6dba555198465a8f.js +0 -1
  184. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-5524f6b8dd008924.js +0 -1
  185. package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-5fcea0008a2c0bfc.js +0 -1
  186. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-6dba555198465a8f.js +0 -1
  187. package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-5e9249b49d619cf7.js +0 -1
  188. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-6dba555198465a8f.js +0 -1
  189. package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-b1676f9a9b4673f1.js +0 -1
  190. package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-bf74f5338553e0b3.js +0 -1
  191. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-6dba555198465a8f.js +0 -1
  192. package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-5bdaaab9140bb24a.js +0 -1
  193. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-6dba555198465a8f.js +0 -1
  194. package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-3560c03478bda4c7.js +0 -1
  195. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-6dba555198465a8f.js +0 -1
  196. package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-d9a6be4fb74dd62b.js +0 -1
  197. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-6dba555198465a8f.js +0 -1
  198. package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-bc4551c2cd096584.js +0 -1
  199. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-6dba555198465a8f.js +0 -1
  200. package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-d0b9a88e5cff5d9b.js +0 -1
  201. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-6dba555198465a8f.js +0 -1
  202. package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-de6afbc0036fcb0d.js +0 -1
  203. package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-70d570cb7ebebf40.js +0 -1
  204. package/web-ui/web-ui/.next/static/chunks/app/layout-0c542f2984281272.js +0 -1
  205. package/web-ui/web-ui/.next/static/chunks/app/page-3fecd9ee711fb63b.js +0 -1
  206. package/web-ui/web-ui/.next/static/chunks/main-62317e1f0973aad9.js +0 -1
  207. package/web-ui/web-ui/.next/static/chunks/main-app-54d1703ac3de3a4b.js +0 -1
  208. package/web-ui/web-ui/.next/static/chunks/pages/_app-58f8bdc469e1bada.js +0 -1
  209. package/web-ui/web-ui/.next/static/chunks/pages/_error-bfbac2b89a182714.js +0 -1
  210. package/web-ui/web-ui/.next/static/css/3be78f90024fcfd7.css +0 -2
  211. /package/web-ui/web-ui/.next/static/{YqH1rSLTmXzavf3MtB9ZX → MbmJUh_qusg2UF-ZJLjuR}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";exports.id=523,exports.ids=[523],exports.modules={32389:(a,b,c)=>{c.d(b,{db:()=>f});var d=c(32713);let e=globalThis;function f(){if(e.__akaDb)return e.__akaDb;let a=(0,d.Ji)((0,d.KS)());return a.purgeSampleData(),e.__akaDb=a,a}},40139:(a,b,c)=>{c.d(b,{Zs:()=>t,cm:()=>s,h2:()=>u,h6:()=>w,oP:()=>v});var d=c(91873);c(429);var e=c(48161),f=c(76258),g=c(5477),h=c(74504),i=c(23326),j=c(52522),k=c(20021);let l="Could not read the local store (~/.aka/data/aka.db).";function m(a){return null===a.field?"The request did not arrive in the expected shape — reload the page and try again.":a.wrongType?`The '${a.field}' field did not arrive as text — reload the page and try again.`:`The '${a.field}' field was not in the expected form — reload the page and try again.`}let n=`${l} The fingerprint key cannot be minted until it is readable, because a key that reused a stored version would produce grants that never match.`;function o(a){let b=a?.code;return"floor-unreadable"===b?n:"string"==typeof b?"Could not access the exception key file — check the permissions on ~/.aka/data. Do not delete exception.key to work around this; that invalidates every existing grant.":"The exception key file is corrupt. Delete ~/.aka/data/exception.key to mint a new key (this invalidates existing grants)."}function p(){try{return(0,e.userInfo)().username}catch{return"unknown"}}function q(a){try{return(0,h.N6N)(a)}catch(a){return{error:a instanceof Error?a.message:"invalid scope"}}}function r(a){return(0,j.db)().exceptions.create(a).then(()=>((0,i.revalidatePath)("/exceptions"),{ok:!0})).catch(a=>a instanceof g.qA?{ok:!1,error:"An active exception for this value already exists — revoke it first."}:{ok:!1,error:"Could not create the exception."})}async function s(a){let b,c,d=(0,h.K7s)(h.QcD,a);if(!d.ok)return{ok:!1,error:m(d)};let e=d.data,f=e.reason.trim();if(""===f)return{ok:!1,error:"A reason is required — it is the audit trail."};let i=q(e.scope);if("error"in i)return{ok:!1,error:i.error};try{b=(await (0,j.db)().exceptions.recentBlocked(g.WR)).find(a=>a.reference===e.reference)}catch{return{ok:!1,error:l}}if(!b)return{ok:!1,error:"That blocked detection has expired from the ledger — trigger it again."};try{c=(0,g.y9)((0,g.KS)())}catch(a){return{ok:!1,error:o(a)}}return(0,g.Dg)(c,b.keyVersion)?"permanent"===i.scope&&e.confirmation!==b.maskedValue?{ok:!1,error:"Permanent grants require retyping the masked value exactly as shown."}:r({ruleId:b.ruleId,category:b.category,valueFingerprint:b.valueFingerprint,keyVersion:b.keyVersion,maskedValue:b.maskedValue,...i,justification:f,conditions:null,createdBy:p(),createdVia:"web-approve"}):{ok:!1,error:null===c?"The exception key file is missing, so the fingerprint recorded for this detection can no longer be matched. Trigger the detection again.":`That detection was blocked under fingerprint key v${String(b.keyVersion)}; the key is now v${String(c.version)}, so a grant from it could never match. Trigger the detection again.`}}async function t(a){let b,c,d=(0,h.K7s)(h.Nh0,a);if(!d.ok)return{ok:!1,error:m(d)};let e=d.data,i=e.reason.trim();if(""===i)return{ok:!1,error:"A reason is required — it is the audit trail."};let k=q(e.scope);if("error"in k)return{ok:!1,error:k.error};if(""===e.value)return{ok:!1,error:"No value supplied — nothing to except."};if("permanent"===k.scope&&e.confirmation!==e.value)return{ok:!1,error:"Permanent grants require retyping the value exactly."};try{({rules:b}=(0,j.db)().installedPacks.installedRuleset())}catch{return{ok:!1,error:l}}let n=b.find(a=>a.id===e.ruleId);if(!n)return{ok:!1,error:`Unknown or disabled rule '${e.ruleId}'.`};let s=(0,f.SQ)(e.value,b).filter(a=>a.ruleId===e.ruleId);if(0===s.length)return{ok:!1,error:`The value does not match rule ${e.ruleId} — a grant for it would never apply.`};let t=[...new Set(s.map(a=>a.rawMatch))],u=t[0];if(t.length>1||void 0===u)return{ok:!1,error:`The input contains ${String(t.length)} distinct values matching ${e.ruleId} — supply exactly one.`};try{c=(0,g.Rd)((0,g.KS)())}catch(a){return{ok:!1,error:o(a)}}let v={valueFingerprint:(0,g._2)(c,u),keyVersion:c.version,maskedValue:(0,f.sE)(u)};return r({ruleId:n.id,category:n.category,...v,...k,justification:i,conditions:null,createdBy:p(),createdVia:"web-add"})}async function u(a){let b,c,d=(0,h.K7s)(h.agn,a);if(!d.ok)return{ok:!1,error:m(d)};let e=d.data,f=e.justification.trim();if(""===f)return{ok:!1,error:"A justification is required — it is the audit trail."};let k=q(e.scope);if("error"in k)return{ok:!1,error:k.error};let l=h.jUf.safeParse(e.pointer.trim());if(!l.success)return{ok:!1,error:"Not a vault pointer — paste the full [[aka:...]] token."};try{let a=new g.Pi({repo:(0,j.db)().secretVault,keys:(0,g.Ru)((0,g.xR)().vaultKeyCustody,(0,g.Wo)()),isConsented:()=>(0,h.hds)((0,g.xR)().vaultConsent)});b=await a.resolvePointerIdentity(l.data),c=null===b?null:await a.describePointer(l.data)}catch{b=null,c=null}if(null===b)return{ok:!1,error:"The pointer could not be resolved — it is not one this machine issued, or its entry was purged."};let n=c?.category??function(a){let b=a.slice(6).split(":")[0]??"",c=h.gbA.safeParse(b);return c.success?c.data:null}(l.data);if(null===n)return{ok:!1,error:"Not a vault pointer — paste the full [[aka:...]] token."};if("permanent"===k.scope){if(null===c)return{ok:!1,error:"A permanent reveal needs the value preview to confirm against — use a time-limited scope."};if(e.confirmation!==c.maskedMatch)return{ok:!1,error:`A permanent reveal must be confirmed by retyping the masked value (${c.maskedMatch}).`}}try{let a=await (0,j.db)().exceptions.create({ruleId:b.ruleId,category:n,valueFingerprint:b.valueFingerprint,keyVersion:b.fingerprintKeyVersion,maskedValue:c?.maskedMatch??"\xb7\xb7\xb7",capability:"reveal_to_model",...k,justification:f,conditions:null,createdBy:"dashboard",createdVia:"web-approve"});return(0,i.revalidatePath)("/exceptions"),{ok:!0,grantIdPrefix:a.id.slice(0,8)}}catch(a){if(a instanceof g.qA)return{ok:!1,error:"An active exception for this value already exists — revoke it first."};return{ok:!1,error:"Could not create the reveal grant."}}}async function v(a,b){let c,d=(0,h.K7s)(h.eYL,{id:a,reason:b});if(!d.ok)return{ok:!1,error:m(d)};let e=d.data,f=e.reason.trim();try{c=await (0,j.db)().exceptions.revoke(e.id,p(),""===f?void 0:f)}catch{return{ok:!1,error:l}}return c?((0,i.revalidatePath)("/exceptions"),(0,i.revalidatePath)(`/exceptions/${e.id}`),{ok:!0}):{ok:!1,error:"No active exception with that id."}}async function w(a){let b,c=(0,h.K7s)(h.JJC,{confirmation:a});if(!c.ok)return{ok:!1,error:m(c)};if("rotate"!==c.data.confirmation)return{ok:!1,error:'Type "rotate" to confirm.'};try{b=(0,g.v5)((0,g.KS)())}catch(a){return{ok:!1,error:`Could not rotate the fingerprint key. ${o(a)}`}}try{let a=new g.Pi({repo:(0,j.db)().secretVault,keys:(0,g.Ru)((0,g.xR)().vaultKeyCustody,(0,g.Wo)()),isConsented:()=>(0,h.hds)((0,g.xR)().vaultConsent)});await a.refreshFingerprints(b)}catch{}return(0,i.revalidatePath)("/exceptions"),{ok:!0}}(0,k.D)([s,t,u,v,w]),(0,d.A)(s,"406a65b910ab98e84986e1786ce892777e0e44d186",null),(0,d.A)(t,"40fe99c0c9b0136bb46acbe784f17a30450a1db8bd",null),(0,d.A)(u,"40762771ed3b208bc2e1ae4b2da80ba1a7da8d5a5a",null),(0,d.A)(v,"60da2232f294a0d2356b135de28a3ac31a89becaa9",null),(0,d.A)(w,"40ebe5047afa9b49f33a884b4e0cb2d0db381fdca9",null)},52522:(a,b,c)=>{c.d(b,{db:()=>f});var d=c(5477);let e=globalThis;function f(){if(e.__akaDb)return e.__akaDb;let a=(0,d.Ji)((0,d.KS)());return a.purgeSampleData(),e.__akaDb=a,a}}};