@kya-os/cli 2.0.0 → 2.0.2

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 (945) hide show
  1. package/README.md +167 -231
  2. package/bin/__tests__/kya-os-shim.e2e.test.js +160 -0
  3. package/bin/__tests__/resolve-binary.test.js +54 -0
  4. package/bin/dco.js +17 -0
  5. package/bin/kya-os.js +135 -0
  6. package/bin/resolve-binary.js +98 -0
  7. package/bin/run-compile.mjs +29 -0
  8. package/dist/sidecar/sidecar/src/conformance/pins.js +54 -0
  9. package/dist/sidecar/sidecar/src/conformance/pins.js.map +1 -0
  10. package/dist/sidecar/sidecar/src/conformance/reference/adapter-helpers.js +117 -0
  11. package/dist/sidecar/sidecar/src/conformance/reference/adapter-helpers.js.map +1 -0
  12. package/dist/sidecar/sidecar/src/conformance/reference/crypto-kit.js +101 -0
  13. package/dist/sidecar/sidecar/src/conformance/reference/crypto-kit.js.map +1 -0
  14. package/dist/sidecar/sidecar/src/conformance/reference/reference-adapter.js +326 -0
  15. package/dist/sidecar/sidecar/src/conformance/reference/reference-adapter.js.map +1 -0
  16. package/dist/sidecar/sidecar/src/conformance/reference/runner.js +126 -0
  17. package/dist/sidecar/sidecar/src/conformance/reference/runner.js.map +1 -0
  18. package/dist/sidecar/sidecar/src/conformance/reference/types.js +40 -0
  19. package/dist/sidecar/sidecar/src/conformance/reference/types.js.map +1 -0
  20. package/dist/sidecar/sidecar/src/daemon.js +151 -0
  21. package/dist/sidecar/sidecar/src/daemon.js.map +1 -0
  22. package/dist/sidecar/sidecar/src/framing.js +36 -0
  23. package/dist/sidecar/sidecar/src/framing.js.map +1 -0
  24. package/dist/sidecar/sidecar/src/identity-manager.js +73 -0
  25. package/dist/sidecar/sidecar/src/identity-manager.js.map +1 -0
  26. package/dist/sidecar/sidecar/src/index.js +80 -0
  27. package/dist/sidecar/sidecar/src/index.js.map +1 -0
  28. package/dist/sidecar/sidecar/src/ops/convert-to-ssh.js +11 -0
  29. package/dist/sidecar/sidecar/src/ops/convert-to-ssh.js.map +1 -0
  30. package/dist/sidecar/sidecar/src/ops/echo.js +5 -0
  31. package/dist/sidecar/sidecar/src/ops/echo.js.map +1 -0
  32. package/dist/sidecar/sidecar/src/ops/ensure-identity.js +36 -0
  33. package/dist/sidecar/sidecar/src/ops/ensure-identity.js.map +1 -0
  34. package/dist/sidecar/sidecar/src/ops/resolve-identity.js +233 -0
  35. package/dist/sidecar/sidecar/src/ops/resolve-identity.js.map +1 -0
  36. package/dist/sidecar/sidecar/src/ops/rotate-identity.js +37 -0
  37. package/dist/sidecar/sidecar/src/ops/rotate-identity.js.map +1 -0
  38. package/dist/sidecar/sidecar/src/ops/run-conformance.js +78 -0
  39. package/dist/sidecar/sidecar/src/ops/run-conformance.js.map +1 -0
  40. package/dist/sidecar/sidecar/src/ops/sign-with-ed25519-seed.js +12 -0
  41. package/dist/sidecar/sidecar/src/ops/sign-with-ed25519-seed.js.map +1 -0
  42. package/dist/sidecar/sidecar/src/ops/sign.js +24 -0
  43. package/dist/sidecar/sidecar/src/ops/sign.js.map +1 -0
  44. package/dist/sidecar/sidecar/src/ops/verify-audit-bundle.js +139 -0
  45. package/dist/sidecar/sidecar/src/ops/verify-audit-bundle.js.map +1 -0
  46. package/dist/sidecar/sidecar/src/ssh-key.js +297 -0
  47. package/dist/sidecar/sidecar/src/ssh-key.js.map +1 -0
  48. package/node_modules/@kya-os/contracts/dist/agent-deployment-utils.d.ts +62 -0
  49. package/node_modules/@kya-os/contracts/dist/agent-deployment-utils.js +92 -0
  50. package/node_modules/@kya-os/contracts/dist/agent-deployment.d.ts +723 -0
  51. package/node_modules/@kya-os/contracts/dist/agent-deployment.js +270 -0
  52. package/node_modules/@kya-os/contracts/dist/agentshield-api/admin-schemas.d.ts +49 -0
  53. package/node_modules/@kya-os/contracts/dist/agentshield-api/admin-schemas.js +30 -0
  54. package/node_modules/@kya-os/contracts/dist/agentshield-api/admin-types.d.ts +37 -0
  55. package/node_modules/@kya-os/contracts/dist/agentshield-api/admin-types.js +10 -0
  56. package/node_modules/@kya-os/contracts/dist/agentshield-api/endpoints.d.ts +53 -0
  57. package/node_modules/@kya-os/contracts/dist/agentshield-api/endpoints.js +49 -0
  58. package/node_modules/@kya-os/contracts/dist/agentshield-api/index.d.ts +15 -0
  59. package/node_modules/@kya-os/contracts/dist/agentshield-api/index.js +46 -0
  60. package/node_modules/@kya-os/contracts/dist/agentshield-api/schemas.d.ts +6583 -0
  61. package/node_modules/@kya-os/contracts/dist/agentshield-api/schemas.js +340 -0
  62. package/node_modules/@kya-os/contracts/dist/agentshield-api/types.d.ts +344 -0
  63. package/node_modules/@kya-os/contracts/dist/agentshield-api/types.js +26 -0
  64. package/node_modules/@kya-os/contracts/dist/attribution/index.d.ts +80 -0
  65. package/node_modules/@kya-os/contracts/dist/attribution/index.js +74 -0
  66. package/node_modules/@kya-os/contracts/dist/audit/index.d.ts +147 -0
  67. package/node_modules/@kya-os/contracts/dist/audit/index.js +51 -0
  68. package/node_modules/@kya-os/contracts/dist/cli-read/analyze.d.ts +162 -0
  69. package/node_modules/@kya-os/contracts/dist/cli-read/analyze.js +38 -0
  70. package/node_modules/@kya-os/contracts/dist/cli-read/common.d.ts +70 -0
  71. package/node_modules/@kya-os/contracts/dist/cli-read/common.js +55 -0
  72. package/node_modules/@kya-os/contracts/dist/cli-read/index.d.ts +5 -0
  73. package/node_modules/@kya-os/contracts/dist/cli-read/index.js +21 -0
  74. package/node_modules/@kya-os/contracts/dist/cli-read/monitor.d.ts +241 -0
  75. package/node_modules/@kya-os/contracts/dist/cli-read/monitor.js +70 -0
  76. package/node_modules/@kya-os/contracts/dist/cli-read/projects.d.ts +195 -0
  77. package/node_modules/@kya-os/contracts/dist/cli-read/projects.js +48 -0
  78. package/node_modules/@kya-os/contracts/dist/cli-read/settings.d.ts +274 -0
  79. package/node_modules/@kya-os/contracts/dist/cli-read/settings.js +56 -0
  80. package/node_modules/@kya-os/contracts/dist/cli.d.ts +542 -0
  81. package/node_modules/@kya-os/contracts/dist/cli.js +266 -0
  82. package/node_modules/@kya-os/contracts/dist/compute-binding.d.ts +48 -0
  83. package/node_modules/@kya-os/contracts/dist/compute-binding.js +42 -0
  84. package/node_modules/@kya-os/contracts/dist/compute.d.ts +474 -0
  85. package/node_modules/@kya-os/contracts/dist/compute.js +213 -0
  86. package/node_modules/@kya-os/contracts/dist/config/base.d.ts +76 -0
  87. package/node_modules/@kya-os/contracts/dist/config/base.js +11 -0
  88. package/node_modules/@kya-os/contracts/dist/config/builder.d.ts +33 -0
  89. package/node_modules/@kya-os/contracts/dist/config/builder.js +71 -0
  90. package/node_modules/@kya-os/contracts/dist/config/checkpoint-env.d.ts +25 -0
  91. package/node_modules/@kya-os/contracts/dist/config/checkpoint-env.js +38 -0
  92. package/node_modules/@kya-os/contracts/dist/config/client-messages.d.ts +216 -0
  93. package/node_modules/@kya-os/contracts/dist/config/client-messages.js +50 -0
  94. package/node_modules/@kya-os/contracts/dist/config/delegation-denial.d.ts +14 -0
  95. package/node_modules/@kya-os/contracts/dist/config/delegation-denial.js +30 -0
  96. package/node_modules/@kya-os/contracts/dist/config/delegation.d.ts +194 -0
  97. package/node_modules/@kya-os/contracts/dist/config/delegation.js +10 -0
  98. package/node_modules/@kya-os/contracts/dist/config/identity.d.ts +1164 -0
  99. package/node_modules/@kya-os/contracts/dist/config/identity.js +155 -0
  100. package/node_modules/@kya-os/contracts/dist/config/index.d.ts +45 -0
  101. package/node_modules/@kya-os/contracts/dist/config/index.js +41 -0
  102. package/node_modules/@kya-os/contracts/dist/config/proofing.d.ts +120 -0
  103. package/node_modules/@kya-os/contracts/dist/config/proofing.js +10 -0
  104. package/node_modules/@kya-os/contracts/dist/config/tool-context.d.ts +94 -0
  105. package/node_modules/@kya-os/contracts/dist/config/tool-context.js +13 -0
  106. package/node_modules/@kya-os/contracts/dist/config/tool-protection.d.ts +164 -0
  107. package/node_modules/@kya-os/contracts/dist/config/tool-protection.js +10 -0
  108. package/node_modules/@kya-os/contracts/dist/config/tool-refusal.d.ts +54 -0
  109. package/node_modules/@kya-os/contracts/dist/config/tool-refusal.js +82 -0
  110. package/node_modules/@kya-os/contracts/dist/consent/authorization-progress.d.ts +163 -0
  111. package/node_modules/@kya-os/contracts/dist/consent/authorization-progress.js +42 -0
  112. package/node_modules/@kya-os/contracts/dist/consent/index.d.ts +14 -0
  113. package/node_modules/@kya-os/contracts/dist/consent/index.js +94 -0
  114. package/node_modules/@kya-os/contracts/dist/consent/schemas.d.ts +965 -0
  115. package/node_modules/@kya-os/contracts/dist/consent/schemas.js +335 -0
  116. package/node_modules/@kya-os/contracts/dist/consent/types.d.ts +155 -0
  117. package/node_modules/@kya-os/contracts/dist/consent/types.js +10 -0
  118. package/node_modules/@kya-os/contracts/dist/dashboard-config/default-config.d.ts +49 -0
  119. package/node_modules/@kya-os/contracts/dist/dashboard-config/default-config.js +235 -0
  120. package/node_modules/@kya-os/contracts/dist/dashboard-config/index.d.ts +10 -0
  121. package/node_modules/@kya-os/contracts/dist/dashboard-config/index.js +37 -0
  122. package/node_modules/@kya-os/contracts/dist/dashboard-config/schemas.d.ts +13351 -0
  123. package/node_modules/@kya-os/contracts/dist/dashboard-config/schemas.js +267 -0
  124. package/node_modules/@kya-os/contracts/dist/dashboard-config/types.d.ts +359 -0
  125. package/node_modules/@kya-os/contracts/dist/dashboard-config/types.js +10 -0
  126. package/node_modules/@kya-os/contracts/dist/delegation/constraints.d.ts +1021 -0
  127. package/node_modules/@kya-os/contracts/dist/delegation/constraints.js +218 -0
  128. package/node_modules/@kya-os/contracts/dist/delegation/index.d.ts +7 -0
  129. package/node_modules/@kya-os/contracts/dist/delegation/index.js +23 -0
  130. package/node_modules/@kya-os/contracts/dist/delegation/schemas.d.ts +9302 -0
  131. package/node_modules/@kya-os/contracts/dist/delegation/schemas.js +585 -0
  132. package/node_modules/@kya-os/contracts/dist/deploy/index.d.ts +27 -0
  133. package/node_modules/@kya-os/contracts/dist/deploy/index.js +62 -0
  134. package/node_modules/@kya-os/contracts/dist/deploy/schemas.d.ts +1001 -0
  135. package/node_modules/@kya-os/contracts/dist/deploy/schemas.js +284 -0
  136. package/node_modules/@kya-os/contracts/dist/deploy/types.d.ts +256 -0
  137. package/node_modules/@kya-os/contracts/dist/deploy/types.js +10 -0
  138. package/node_modules/@kya-os/contracts/dist/did/index.d.ts +8 -0
  139. package/node_modules/@kya-os/contracts/dist/did/index.js +24 -0
  140. package/node_modules/@kya-os/contracts/dist/did/resolve-contract.d.ts +219 -0
  141. package/node_modules/@kya-os/contracts/dist/did/resolve-contract.js +31 -0
  142. package/node_modules/@kya-os/contracts/dist/did/schemas.d.ts +112 -0
  143. package/node_modules/@kya-os/contracts/dist/did/schemas.js +172 -0
  144. package/node_modules/@kya-os/contracts/dist/did/types.d.ts +163 -0
  145. package/node_modules/@kya-os/contracts/dist/did/types.js +70 -0
  146. package/node_modules/@kya-os/contracts/dist/env/constants.d.ts +57 -0
  147. package/node_modules/@kya-os/contracts/dist/env/constants.js +59 -0
  148. package/node_modules/@kya-os/contracts/dist/env/index.d.ts +4 -0
  149. package/node_modules/@kya-os/contracts/dist/env/index.js +20 -0
  150. package/node_modules/@kya-os/contracts/dist/fleet/index.d.ts +17 -0
  151. package/node_modules/@kya-os/contracts/dist/fleet/index.js +69 -0
  152. package/node_modules/@kya-os/contracts/dist/gateway/agents.d.ts +21 -0
  153. package/node_modules/@kya-os/contracts/dist/gateway/agents.js +12 -0
  154. package/node_modules/@kya-os/contracts/dist/gateway/cron.d.ts +33 -0
  155. package/node_modules/@kya-os/contracts/dist/gateway/cron.js +16 -0
  156. package/node_modules/@kya-os/contracts/dist/gateway/index.d.ts +20 -0
  157. package/node_modules/@kya-os/contracts/dist/gateway/index.js +37 -0
  158. package/node_modules/@kya-os/contracts/dist/gateway/sessions.d.ts +30 -0
  159. package/node_modules/@kya-os/contracts/dist/gateway/sessions.js +15 -0
  160. package/node_modules/@kya-os/contracts/dist/gateway/skills.d.ts +445 -0
  161. package/node_modules/@kya-os/contracts/dist/gateway/skills.js +47 -0
  162. package/node_modules/@kya-os/contracts/dist/gateway/usage.d.ts +43 -0
  163. package/node_modules/@kya-os/contracts/dist/gateway/usage.js +18 -0
  164. package/node_modules/@kya-os/contracts/dist/handshake/github-credential-anchor.d.ts +299 -0
  165. package/node_modules/@kya-os/contracts/dist/handshake/github-credential-anchor.js +200 -0
  166. package/node_modules/@kya-os/contracts/dist/handshake/index.d.ts +16 -0
  167. package/node_modules/@kya-os/contracts/dist/handshake/index.js +32 -0
  168. package/node_modules/@kya-os/contracts/dist/handshake/schemas.d.ts +557 -0
  169. package/node_modules/@kya-os/contracts/dist/handshake/schemas.js +282 -0
  170. package/node_modules/@kya-os/contracts/dist/handshake/verify.d.ts +36 -0
  171. package/node_modules/@kya-os/contracts/dist/handshake/verify.js +58 -0
  172. package/node_modules/@kya-os/contracts/dist/handshake.d.ts +12 -0
  173. package/node_modules/@kya-os/contracts/dist/handshake.js +28 -0
  174. package/node_modules/@kya-os/contracts/dist/identity/index.d.ts +10 -0
  175. package/node_modules/@kya-os/contracts/dist/identity/index.js +30 -0
  176. package/node_modules/@kya-os/contracts/dist/identity/schemas.d.ts +250 -0
  177. package/node_modules/@kya-os/contracts/dist/identity/schemas.js +115 -0
  178. package/node_modules/@kya-os/contracts/dist/index.d.ts +28 -0
  179. package/node_modules/@kya-os/contracts/dist/index.js +66 -0
  180. package/node_modules/@kya-os/contracts/dist/molti/admin-ws.d.ts +1871 -0
  181. package/node_modules/@kya-os/contracts/dist/molti/admin-ws.js +177 -0
  182. package/node_modules/@kya-os/contracts/dist/molti/index.d.ts +30 -0
  183. package/node_modules/@kya-os/contracts/dist/molti/index.js +86 -0
  184. package/node_modules/@kya-os/contracts/dist/molti/schemas.d.ts +837 -0
  185. package/node_modules/@kya-os/contracts/dist/molti/schemas.js +267 -0
  186. package/node_modules/@kya-os/contracts/dist/molti/types.d.ts +216 -0
  187. package/node_modules/@kya-os/contracts/dist/molti/types.js +25 -0
  188. package/node_modules/@kya-os/contracts/dist/pairing/index.d.ts +44 -0
  189. package/node_modules/@kya-os/contracts/dist/pairing/index.js +11 -0
  190. package/node_modules/@kya-os/contracts/dist/policy/index.d.ts +8 -0
  191. package/node_modules/@kya-os/contracts/dist/policy/index.js +41 -0
  192. package/node_modules/@kya-os/contracts/dist/policy/schemas.d.ts +3839 -0
  193. package/node_modules/@kya-os/contracts/dist/policy/schemas.js +424 -0
  194. package/node_modules/@kya-os/contracts/dist/proof/detached-proof.d.ts +476 -0
  195. package/node_modules/@kya-os/contracts/dist/proof/detached-proof.js +116 -0
  196. package/node_modules/@kya-os/contracts/dist/proof/index.d.ts +15 -0
  197. package/node_modules/@kya-os/contracts/dist/proof/index.js +32 -0
  198. package/node_modules/@kya-os/contracts/dist/proof/proof-record.d.ts +837 -0
  199. package/node_modules/@kya-os/contracts/dist/proof/proof-record.js +133 -0
  200. package/node_modules/@kya-os/contracts/dist/proof/signing-spec.d.ts +146 -0
  201. package/node_modules/@kya-os/contracts/dist/proof/signing-spec.js +122 -0
  202. package/node_modules/@kya-os/contracts/dist/proof.d.ts +12 -0
  203. package/node_modules/@kya-os/contracts/dist/proof.js +28 -0
  204. package/node_modules/@kya-os/contracts/dist/registry.d.ts +342 -0
  205. package/node_modules/@kya-os/contracts/dist/registry.js +118 -0
  206. package/node_modules/@kya-os/contracts/dist/reputation/api.d.ts +2866 -0
  207. package/node_modules/@kya-os/contracts/dist/reputation/api.js +397 -0
  208. package/node_modules/@kya-os/contracts/dist/reputation/constants.d.ts +242 -0
  209. package/node_modules/@kya-os/contracts/dist/reputation/constants.js +259 -0
  210. package/node_modules/@kya-os/contracts/dist/reputation/credentials.d.ts +1493 -0
  211. package/node_modules/@kya-os/contracts/dist/reputation/credentials.js +302 -0
  212. package/node_modules/@kya-os/contracts/dist/reputation/index.d.ts +21 -0
  213. package/node_modules/@kya-os/contracts/dist/reputation/index.js +42 -0
  214. package/node_modules/@kya-os/contracts/dist/reputation/interactions.d.ts +146 -0
  215. package/node_modules/@kya-os/contracts/dist/reputation/interactions.js +82 -0
  216. package/node_modules/@kya-os/contracts/dist/reputation/schemas.d.ts +1600 -0
  217. package/node_modules/@kya-os/contracts/dist/reputation/schemas.js +499 -0
  218. package/node_modules/@kya-os/contracts/dist/review/canonicalize.d.ts +87 -0
  219. package/node_modules/@kya-os/contracts/dist/review/canonicalize.js +122 -0
  220. package/node_modules/@kya-os/contracts/dist/review/fix-attestation.d.ts +151 -0
  221. package/node_modules/@kya-os/contracts/dist/review/fix-attestation.js +105 -0
  222. package/node_modules/@kya-os/contracts/dist/review/index.d.ts +9 -0
  223. package/node_modules/@kya-os/contracts/dist/review/index.js +25 -0
  224. package/node_modules/@kya-os/contracts/dist/review/registry.d.ts +349 -0
  225. package/node_modules/@kya-os/contracts/dist/review/registry.js +293 -0
  226. package/node_modules/@kya-os/contracts/dist/review/schemas.d.ts +249 -0
  227. package/node_modules/@kya-os/contracts/dist/review/schemas.js +102 -0
  228. package/node_modules/@kya-os/contracts/dist/review/verify.d.ts +72 -0
  229. package/node_modules/@kya-os/contracts/dist/review/verify.js +111 -0
  230. package/node_modules/@kya-os/contracts/dist/runtime/errors.d.ts +347 -0
  231. package/node_modules/@kya-os/contracts/dist/runtime/errors.js +119 -0
  232. package/node_modules/@kya-os/contracts/dist/runtime/headers.d.ts +87 -0
  233. package/node_modules/@kya-os/contracts/dist/runtime/headers.js +85 -0
  234. package/node_modules/@kya-os/contracts/dist/runtime/index.d.ts +5 -0
  235. package/node_modules/@kya-os/contracts/dist/runtime/index.js +21 -0
  236. package/node_modules/@kya-os/contracts/dist/skills/index.d.ts +8 -0
  237. package/node_modules/@kya-os/contracts/dist/skills/index.js +24 -0
  238. package/node_modules/@kya-os/contracts/dist/skills/schemas.d.ts +92 -0
  239. package/node_modules/@kya-os/contracts/dist/skills/schemas.js +82 -0
  240. package/node_modules/@kya-os/contracts/dist/test.d.ts +251 -0
  241. package/node_modules/@kya-os/contracts/dist/test.js +119 -0
  242. package/node_modules/@kya-os/contracts/dist/tlkrc/index.d.ts +4 -0
  243. package/node_modules/@kya-os/contracts/dist/tlkrc/index.js +20 -0
  244. package/node_modules/@kya-os/contracts/dist/tlkrc/rotation.d.ts +245 -0
  245. package/node_modules/@kya-os/contracts/dist/tlkrc/rotation.js +126 -0
  246. package/node_modules/@kya-os/contracts/dist/tool-protection/index.d.ts +1369 -0
  247. package/node_modules/@kya-os/contracts/dist/tool-protection/index.js +499 -0
  248. package/node_modules/@kya-os/contracts/dist/utils/validation.d.ts +30 -0
  249. package/node_modules/@kya-os/contracts/dist/utils/validation.js +69 -0
  250. package/node_modules/@kya-os/contracts/dist/vault/index.d.ts +9 -0
  251. package/node_modules/@kya-os/contracts/dist/vault/index.js +16 -0
  252. package/node_modules/@kya-os/contracts/dist/vault/schemas.d.ts +71 -0
  253. package/node_modules/@kya-os/contracts/dist/vault/schemas.js +52 -0
  254. package/node_modules/@kya-os/contracts/dist/vault/types.d.ts +15 -0
  255. package/node_modules/@kya-os/contracts/dist/vault/types.js +9 -0
  256. package/node_modules/@kya-os/contracts/dist/vc/index.d.ts +7 -0
  257. package/node_modules/@kya-os/contracts/dist/vc/index.js +23 -0
  258. package/node_modules/@kya-os/contracts/dist/vc/schemas.d.ts +2483 -0
  259. package/node_modules/@kya-os/contracts/dist/vc/schemas.js +224 -0
  260. package/node_modules/@kya-os/contracts/dist/vc/statuslist.d.ts +493 -0
  261. package/node_modules/@kya-os/contracts/dist/vc/statuslist.js +132 -0
  262. package/node_modules/@kya-os/contracts/dist/verifier/index.d.ts +8 -0
  263. package/node_modules/@kya-os/contracts/dist/verifier/index.js +24 -0
  264. package/node_modules/@kya-os/contracts/dist/verifier/schemas.d.ts +216 -0
  265. package/node_modules/@kya-os/contracts/dist/verifier/schemas.js +94 -0
  266. package/node_modules/@kya-os/contracts/dist/verifier.d.ts +11 -0
  267. package/node_modules/@kya-os/contracts/dist/verifier.js +27 -0
  268. package/node_modules/@kya-os/contracts/dist/well-known/index.d.ts +1013 -0
  269. package/node_modules/@kya-os/contracts/dist/well-known/index.js +302 -0
  270. package/node_modules/@kya-os/contracts/dist/workbench/a2a.d.ts +267 -0
  271. package/node_modules/@kya-os/contracts/dist/workbench/a2a.js +124 -0
  272. package/node_modules/@kya-os/contracts/dist/workbench/artifact-bindings.d.ts +1448 -0
  273. package/node_modules/@kya-os/contracts/dist/workbench/artifact-bindings.js +233 -0
  274. package/node_modules/@kya-os/contracts/dist/workbench/cache.d.ts +461 -0
  275. package/node_modules/@kya-os/contracts/dist/workbench/cache.js +165 -0
  276. package/node_modules/@kya-os/contracts/dist/workbench/economics.d.ts +1097 -0
  277. package/node_modules/@kya-os/contracts/dist/workbench/economics.js +87 -0
  278. package/node_modules/@kya-os/contracts/dist/workbench/execution.d.ts +594 -0
  279. package/node_modules/@kya-os/contracts/dist/workbench/execution.js +76 -0
  280. package/node_modules/@kya-os/contracts/dist/workbench/governed.d.ts +4323 -0
  281. package/node_modules/@kya-os/contracts/dist/workbench/governed.js +37 -0
  282. package/node_modules/@kya-os/contracts/dist/workbench/graph-interfaces.d.ts +1330 -0
  283. package/node_modules/@kya-os/contracts/dist/workbench/graph-interfaces.js +302 -0
  284. package/node_modules/@kya-os/contracts/dist/workbench/index.d.ts +17 -0
  285. package/node_modules/@kya-os/contracts/dist/workbench/index.js +33 -0
  286. package/node_modules/@kya-os/contracts/dist/workbench/lead-planner.d.ts +7603 -0
  287. package/node_modules/@kya-os/contracts/dist/workbench/lead-planner.js +20 -0
  288. package/node_modules/@kya-os/contracts/dist/workbench/linear-installation.d.ts +797 -0
  289. package/node_modules/@kya-os/contracts/dist/workbench/linear-installation.js +80 -0
  290. package/node_modules/@kya-os/contracts/dist/workbench/mailbox.d.ts +3245 -0
  291. package/node_modules/@kya-os/contracts/dist/workbench/mailbox.js +475 -0
  292. package/node_modules/@kya-os/contracts/dist/workbench/managed-worker.d.ts +199 -0
  293. package/node_modules/@kya-os/contracts/dist/workbench/managed-worker.js +49 -0
  294. package/node_modules/@kya-os/contracts/dist/workbench/review.d.ts +1585 -0
  295. package/node_modules/@kya-os/contracts/dist/workbench/review.js +84 -0
  296. package/node_modules/@kya-os/contracts/dist/workbench/routing.d.ts +1200 -0
  297. package/node_modules/@kya-os/contracts/dist/workbench/routing.js +93 -0
  298. package/node_modules/@kya-os/contracts/dist/workbench/task-status-projection.d.ts +190 -0
  299. package/node_modules/@kya-os/contracts/dist/workbench/task-status-projection.js +49 -0
  300. package/node_modules/@kya-os/contracts/dist/workbench/tracking.d.ts +3364 -0
  301. package/node_modules/@kya-os/contracts/dist/workbench/tracking.js +221 -0
  302. package/node_modules/@kya-os/contracts/dist/workbench/usage.d.ts +62 -0
  303. package/node_modules/@kya-os/contracts/dist/workbench/usage.js +57 -0
  304. package/node_modules/@kya-os/contracts/package.json +185 -0
  305. package/node_modules/@kya-os/contracts/parity-vectors/delegation-conformance.json +265 -0
  306. package/node_modules/@kya-os/contracts/parity-vectors/did-key.json +134 -0
  307. package/node_modules/@kya-os/contracts/parity-vectors/index.ts +253 -0
  308. package/node_modules/@kya-os/contracts/parity-vectors/scope-matching.json +330 -0
  309. package/node_modules/@kya-os/contracts/parity-vectors/vc-jwt.json +210 -0
  310. package/node_modules/@kya-os/contracts/parity-vectors/workbench/artifact-bindings.v1.json +1005 -0
  311. package/node_modules/@kya-os/contracts/parity-vectors/workbench/graph-interfaces.v1.json +1967 -0
  312. package/node_modules/@kya-os/contracts/parity-vectors/workbench/linear-installation.v1.json +75 -0
  313. package/node_modules/@kya-os/contracts/parity-vectors/workbench/task-status-projection.v1.json +591 -0
  314. package/node_modules/@kya-os/contracts/parity-vectors/workbench/tracker-document-upgrade.v1.json +516 -0
  315. package/node_modules/zod/LICENSE +21 -0
  316. package/node_modules/zod/README.md +208 -0
  317. package/node_modules/zod/dist/cjs/index.js +22 -0
  318. package/node_modules/zod/dist/cjs/package.json +3 -0
  319. package/node_modules/zod/dist/cjs/v3/ZodError.js +137 -0
  320. package/node_modules/zod/dist/cjs/v3/benchmarks/datetime.js +54 -0
  321. package/node_modules/zod/dist/cjs/v3/benchmarks/discriminatedUnion.js +79 -0
  322. package/node_modules/zod/dist/cjs/v3/benchmarks/index.js +59 -0
  323. package/node_modules/zod/dist/cjs/v3/benchmarks/ipv4.js +54 -0
  324. package/node_modules/zod/dist/cjs/v3/benchmarks/object.js +70 -0
  325. package/node_modules/zod/dist/cjs/v3/benchmarks/primitives.js +159 -0
  326. package/node_modules/zod/dist/cjs/v3/benchmarks/realworld.js +56 -0
  327. package/node_modules/zod/dist/cjs/v3/benchmarks/string.js +55 -0
  328. package/node_modules/zod/dist/cjs/v3/benchmarks/union.js +79 -0
  329. package/node_modules/zod/dist/cjs/v3/errors.js +17 -0
  330. package/node_modules/zod/dist/cjs/v3/external.js +22 -0
  331. package/node_modules/zod/dist/cjs/v3/helpers/enumUtil.js +2 -0
  332. package/node_modules/zod/dist/cjs/v3/helpers/errorUtil.js +9 -0
  333. package/node_modules/zod/dist/cjs/v3/helpers/parseUtil.js +124 -0
  334. package/node_modules/zod/dist/cjs/v3/helpers/partialUtil.js +2 -0
  335. package/node_modules/zod/dist/cjs/v3/helpers/typeAliases.js +2 -0
  336. package/node_modules/zod/dist/cjs/v3/helpers/util.js +137 -0
  337. package/node_modules/zod/dist/cjs/v3/index.js +33 -0
  338. package/node_modules/zod/dist/cjs/v3/locales/en.js +109 -0
  339. package/node_modules/zod/dist/cjs/v3/standard-schema.js +2 -0
  340. package/node_modules/zod/dist/cjs/v3/tests/Mocker.js +57 -0
  341. package/node_modules/zod/dist/cjs/v3/types.js +3773 -0
  342. package/node_modules/zod/dist/cjs/v4/classic/checks.js +32 -0
  343. package/node_modules/zod/dist/cjs/v4/classic/coerce.js +47 -0
  344. package/node_modules/zod/dist/cjs/v4/classic/compat.js +63 -0
  345. package/node_modules/zod/dist/cjs/v4/classic/errors.js +67 -0
  346. package/node_modules/zod/dist/cjs/v4/classic/external.js +69 -0
  347. package/node_modules/zod/dist/cjs/v4/classic/index.js +33 -0
  348. package/node_modules/zod/dist/cjs/v4/classic/iso.js +60 -0
  349. package/node_modules/zod/dist/cjs/v4/classic/parse.js +32 -0
  350. package/node_modules/zod/dist/cjs/v4/classic/schemas.js +1100 -0
  351. package/node_modules/zod/dist/cjs/v4/core/api.js +1021 -0
  352. package/node_modules/zod/dist/cjs/v4/core/checks.js +580 -0
  353. package/node_modules/zod/dist/cjs/v4/core/config.js +10 -0
  354. package/node_modules/zod/dist/cjs/v4/core/core.js +63 -0
  355. package/node_modules/zod/dist/cjs/v4/core/doc.js +39 -0
  356. package/node_modules/zod/dist/cjs/v4/core/errors.js +222 -0
  357. package/node_modules/zod/dist/cjs/v4/core/function.js +102 -0
  358. package/node_modules/zod/dist/cjs/v4/core/index.js +44 -0
  359. package/node_modules/zod/dist/cjs/v4/core/json-schema.js +2 -0
  360. package/node_modules/zod/dist/cjs/v4/core/parse.js +87 -0
  361. package/node_modules/zod/dist/cjs/v4/core/regexes.js +103 -0
  362. package/node_modules/zod/dist/cjs/v4/core/registries.js +47 -0
  363. package/node_modules/zod/dist/cjs/v4/core/schemas.js +1719 -0
  364. package/node_modules/zod/dist/cjs/v4/core/standard-schema.js +2 -0
  365. package/node_modules/zod/dist/cjs/v4/core/to-json-schema.js +833 -0
  366. package/node_modules/zod/dist/cjs/v4/core/util.js +537 -0
  367. package/node_modules/zod/dist/cjs/v4/core/versions.js +8 -0
  368. package/node_modules/zod/dist/cjs/v4/core/zsf.js +172 -0
  369. package/node_modules/zod/dist/cjs/v4/index.js +22 -0
  370. package/node_modules/zod/dist/cjs/v4/locales/ar.js +142 -0
  371. package/node_modules/zod/dist/cjs/v4/locales/az.js +141 -0
  372. package/node_modules/zod/dist/cjs/v4/locales/be.js +190 -0
  373. package/node_modules/zod/dist/cjs/v4/locales/ca.js +144 -0
  374. package/node_modules/zod/dist/cjs/v4/locales/cs.js +161 -0
  375. package/node_modules/zod/dist/cjs/v4/locales/de.js +142 -0
  376. package/node_modules/zod/dist/cjs/v4/locales/en.js +145 -0
  377. package/node_modules/zod/dist/cjs/v4/locales/es.js +143 -0
  378. package/node_modules/zod/dist/cjs/v4/locales/fa.js +148 -0
  379. package/node_modules/zod/dist/cjs/v4/locales/fi.js +148 -0
  380. package/node_modules/zod/dist/cjs/v4/locales/fr-CA.js +143 -0
  381. package/node_modules/zod/dist/cjs/v4/locales/fr.js +142 -0
  382. package/node_modules/zod/dist/cjs/v4/locales/he.js +143 -0
  383. package/node_modules/zod/dist/cjs/v4/locales/hu.js +143 -0
  384. package/node_modules/zod/dist/cjs/v4/locales/id.js +142 -0
  385. package/node_modules/zod/dist/cjs/v4/locales/index.js +82 -0
  386. package/node_modules/zod/dist/cjs/v4/locales/it.js +143 -0
  387. package/node_modules/zod/dist/cjs/v4/locales/ja.js +141 -0
  388. package/node_modules/zod/dist/cjs/v4/locales/kh.js +143 -0
  389. package/node_modules/zod/dist/cjs/v4/locales/ko.js +147 -0
  390. package/node_modules/zod/dist/cjs/v4/locales/mk.js +144 -0
  391. package/node_modules/zod/dist/cjs/v4/locales/ms.js +142 -0
  392. package/node_modules/zod/dist/cjs/v4/locales/nl.js +143 -0
  393. package/node_modules/zod/dist/cjs/v4/locales/no.js +142 -0
  394. package/node_modules/zod/dist/cjs/v4/locales/ota.js +143 -0
  395. package/node_modules/zod/dist/cjs/v4/locales/pl.js +143 -0
  396. package/node_modules/zod/dist/cjs/v4/locales/ps.js +148 -0
  397. package/node_modules/zod/dist/cjs/v4/locales/pt.js +142 -0
  398. package/node_modules/zod/dist/cjs/v4/locales/ru.js +190 -0
  399. package/node_modules/zod/dist/cjs/v4/locales/sl.js +143 -0
  400. package/node_modules/zod/dist/cjs/v4/locales/sv.js +144 -0
  401. package/node_modules/zod/dist/cjs/v4/locales/ta.js +143 -0
  402. package/node_modules/zod/dist/cjs/v4/locales/th.js +143 -0
  403. package/node_modules/zod/dist/cjs/v4/locales/tr.js +143 -0
  404. package/node_modules/zod/dist/cjs/v4/locales/ua.js +143 -0
  405. package/node_modules/zod/dist/cjs/v4/locales/ur.js +143 -0
  406. package/node_modules/zod/dist/cjs/v4/locales/vi.js +142 -0
  407. package/node_modules/zod/dist/cjs/v4/locales/zh-CN.js +142 -0
  408. package/node_modules/zod/dist/cjs/v4/locales/zh-TW.js +143 -0
  409. package/node_modules/zod/dist/cjs/v4/mini/checks.js +34 -0
  410. package/node_modules/zod/dist/cjs/v4/mini/coerce.js +47 -0
  411. package/node_modules/zod/dist/cjs/v4/mini/external.js +61 -0
  412. package/node_modules/zod/dist/cjs/v4/mini/index.js +32 -0
  413. package/node_modules/zod/dist/cjs/v4/mini/iso.js +60 -0
  414. package/node_modules/zod/dist/cjs/v4/mini/parse.js +8 -0
  415. package/node_modules/zod/dist/cjs/v4/mini/schemas.js +831 -0
  416. package/node_modules/zod/dist/esm/index.js +3 -0
  417. package/node_modules/zod/dist/esm/package.json +3 -0
  418. package/node_modules/zod/dist/esm/v3/ZodError.js +132 -0
  419. package/node_modules/zod/dist/esm/v3/benchmarks/datetime.js +49 -0
  420. package/node_modules/zod/dist/esm/v3/benchmarks/discriminatedUnion.js +74 -0
  421. package/node_modules/zod/dist/esm/v3/benchmarks/index.js +54 -0
  422. package/node_modules/zod/dist/esm/v3/benchmarks/ipv4.js +49 -0
  423. package/node_modules/zod/dist/esm/v3/benchmarks/object.js +65 -0
  424. package/node_modules/zod/dist/esm/v3/benchmarks/primitives.js +154 -0
  425. package/node_modules/zod/dist/esm/v3/benchmarks/realworld.js +51 -0
  426. package/node_modules/zod/dist/esm/v3/benchmarks/string.js +50 -0
  427. package/node_modules/zod/dist/esm/v3/benchmarks/union.js +74 -0
  428. package/node_modules/zod/dist/esm/v3/errors.js +9 -0
  429. package/node_modules/zod/dist/esm/v3/external.js +6 -0
  430. package/node_modules/zod/dist/esm/v3/helpers/enumUtil.js +1 -0
  431. package/node_modules/zod/dist/esm/v3/helpers/errorUtil.js +6 -0
  432. package/node_modules/zod/dist/esm/v3/helpers/parseUtil.js +109 -0
  433. package/node_modules/zod/dist/esm/v3/helpers/partialUtil.js +1 -0
  434. package/node_modules/zod/dist/esm/v3/helpers/typeAliases.js +1 -0
  435. package/node_modules/zod/dist/esm/v3/helpers/util.js +133 -0
  436. package/node_modules/zod/dist/esm/v3/index.js +4 -0
  437. package/node_modules/zod/dist/esm/v3/locales/en.js +107 -0
  438. package/node_modules/zod/dist/esm/v3/standard-schema.js +1 -0
  439. package/node_modules/zod/dist/esm/v3/tests/Mocker.js +53 -0
  440. package/node_modules/zod/dist/esm/v3/types.js +3691 -0
  441. package/node_modules/zod/dist/esm/v4/classic/checks.js +1 -0
  442. package/node_modules/zod/dist/esm/v4/classic/coerce.js +17 -0
  443. package/node_modules/zod/dist/esm/v4/classic/compat.js +33 -0
  444. package/node_modules/zod/dist/esm/v4/classic/errors.js +41 -0
  445. package/node_modules/zod/dist/esm/v4/classic/external.js +18 -0
  446. package/node_modules/zod/dist/esm/v4/classic/index.js +4 -0
  447. package/node_modules/zod/dist/esm/v4/classic/iso.js +30 -0
  448. package/node_modules/zod/dist/esm/v4/classic/parse.js +6 -0
  449. package/node_modules/zod/dist/esm/v4/classic/schemas.js +998 -0
  450. package/node_modules/zod/dist/esm/v4/core/api.js +889 -0
  451. package/node_modules/zod/dist/esm/v4/core/checks.js +554 -0
  452. package/node_modules/zod/dist/esm/v4/core/config.js +6 -0
  453. package/node_modules/zod/dist/esm/v4/core/core.js +57 -0
  454. package/node_modules/zod/dist/esm/v4/core/doc.js +35 -0
  455. package/node_modules/zod/dist/esm/v4/core/errors.js +191 -0
  456. package/node_modules/zod/dist/esm/v4/core/function.js +75 -0
  457. package/node_modules/zod/dist/esm/v4/core/index.js +15 -0
  458. package/node_modules/zod/dist/esm/v4/core/json-schema.js +1 -0
  459. package/node_modules/zod/dist/esm/v4/core/parse.js +57 -0
  460. package/node_modules/zod/dist/esm/v4/core/regexes.js +95 -0
  461. package/node_modules/zod/dist/esm/v4/core/registries.js +42 -0
  462. package/node_modules/zod/dist/esm/v4/core/schemas.js +1688 -0
  463. package/node_modules/zod/dist/esm/v4/core/standard-schema.js +1 -0
  464. package/node_modules/zod/dist/esm/v4/core/to-json-schema.js +828 -0
  465. package/node_modules/zod/dist/esm/v4/core/util.js +491 -0
  466. package/node_modules/zod/dist/esm/v4/core/versions.js +5 -0
  467. package/node_modules/zod/dist/esm/v4/core/zsf.js +171 -0
  468. package/node_modules/zod/dist/esm/v4/index.js +3 -0
  469. package/node_modules/zod/dist/esm/v4/locales/ar.js +116 -0
  470. package/node_modules/zod/dist/esm/v4/locales/az.js +115 -0
  471. package/node_modules/zod/dist/esm/v4/locales/be.js +164 -0
  472. package/node_modules/zod/dist/esm/v4/locales/ca.js +118 -0
  473. package/node_modules/zod/dist/esm/v4/locales/cs.js +135 -0
  474. package/node_modules/zod/dist/esm/v4/locales/de.js +116 -0
  475. package/node_modules/zod/dist/esm/v4/locales/en.js +117 -0
  476. package/node_modules/zod/dist/esm/v4/locales/es.js +117 -0
  477. package/node_modules/zod/dist/esm/v4/locales/fa.js +122 -0
  478. package/node_modules/zod/dist/esm/v4/locales/fi.js +122 -0
  479. package/node_modules/zod/dist/esm/v4/locales/fr-CA.js +117 -0
  480. package/node_modules/zod/dist/esm/v4/locales/fr.js +116 -0
  481. package/node_modules/zod/dist/esm/v4/locales/he.js +117 -0
  482. package/node_modules/zod/dist/esm/v4/locales/hu.js +117 -0
  483. package/node_modules/zod/dist/esm/v4/locales/id.js +116 -0
  484. package/node_modules/zod/dist/esm/v4/locales/index.js +38 -0
  485. package/node_modules/zod/dist/esm/v4/locales/it.js +117 -0
  486. package/node_modules/zod/dist/esm/v4/locales/ja.js +115 -0
  487. package/node_modules/zod/dist/esm/v4/locales/kh.js +117 -0
  488. package/node_modules/zod/dist/esm/v4/locales/ko.js +121 -0
  489. package/node_modules/zod/dist/esm/v4/locales/mk.js +118 -0
  490. package/node_modules/zod/dist/esm/v4/locales/ms.js +116 -0
  491. package/node_modules/zod/dist/esm/v4/locales/nl.js +117 -0
  492. package/node_modules/zod/dist/esm/v4/locales/no.js +116 -0
  493. package/node_modules/zod/dist/esm/v4/locales/ota.js +117 -0
  494. package/node_modules/zod/dist/esm/v4/locales/pl.js +117 -0
  495. package/node_modules/zod/dist/esm/v4/locales/ps.js +122 -0
  496. package/node_modules/zod/dist/esm/v4/locales/pt.js +116 -0
  497. package/node_modules/zod/dist/esm/v4/locales/ru.js +164 -0
  498. package/node_modules/zod/dist/esm/v4/locales/sl.js +117 -0
  499. package/node_modules/zod/dist/esm/v4/locales/sv.js +118 -0
  500. package/node_modules/zod/dist/esm/v4/locales/ta.js +117 -0
  501. package/node_modules/zod/dist/esm/v4/locales/th.js +117 -0
  502. package/node_modules/zod/dist/esm/v4/locales/tr.js +115 -0
  503. package/node_modules/zod/dist/esm/v4/locales/ua.js +117 -0
  504. package/node_modules/zod/dist/esm/v4/locales/ur.js +117 -0
  505. package/node_modules/zod/dist/esm/v4/locales/vi.js +116 -0
  506. package/node_modules/zod/dist/esm/v4/locales/zh-CN.js +116 -0
  507. package/node_modules/zod/dist/esm/v4/locales/zh-TW.js +117 -0
  508. package/node_modules/zod/dist/esm/v4/mini/checks.js +1 -0
  509. package/node_modules/zod/dist/esm/v4/mini/coerce.js +17 -0
  510. package/node_modules/zod/dist/esm/v4/mini/external.js +13 -0
  511. package/node_modules/zod/dist/esm/v4/mini/index.js +3 -0
  512. package/node_modules/zod/dist/esm/v4/mini/iso.js +30 -0
  513. package/node_modules/zod/dist/esm/v4/mini/parse.js +1 -0
  514. package/node_modules/zod/dist/esm/v4/mini/schemas.js +725 -0
  515. package/node_modules/zod/dist/types/index.d.ts +3 -0
  516. package/node_modules/zod/dist/types/package.json +3 -0
  517. package/node_modules/zod/dist/types/v3/ZodError.d.ts +164 -0
  518. package/node_modules/zod/dist/types/v3/benchmarks/datetime.d.ts +5 -0
  519. package/node_modules/zod/dist/types/v3/benchmarks/discriminatedUnion.d.ts +5 -0
  520. package/node_modules/zod/dist/types/v3/benchmarks/index.d.ts +1 -0
  521. package/node_modules/zod/dist/types/v3/benchmarks/ipv4.d.ts +5 -0
  522. package/node_modules/zod/dist/types/v3/benchmarks/object.d.ts +5 -0
  523. package/node_modules/zod/dist/types/v3/benchmarks/primitives.d.ts +5 -0
  524. package/node_modules/zod/dist/types/v3/benchmarks/realworld.d.ts +5 -0
  525. package/node_modules/zod/dist/types/v3/benchmarks/string.d.ts +5 -0
  526. package/node_modules/zod/dist/types/v3/benchmarks/union.d.ts +5 -0
  527. package/node_modules/zod/dist/types/v3/errors.d.ts +5 -0
  528. package/node_modules/zod/dist/types/v3/external.d.ts +6 -0
  529. package/node_modules/zod/dist/types/v3/helpers/enumUtil.d.ts +8 -0
  530. package/node_modules/zod/dist/types/v3/helpers/errorUtil.d.ts +9 -0
  531. package/node_modules/zod/dist/types/v3/helpers/parseUtil.d.ts +78 -0
  532. package/node_modules/zod/dist/types/v3/helpers/partialUtil.d.ts +8 -0
  533. package/node_modules/zod/dist/types/v3/helpers/typeAliases.d.ts +2 -0
  534. package/node_modules/zod/dist/types/v3/helpers/util.d.ts +85 -0
  535. package/node_modules/zod/dist/types/v3/index.d.ts +4 -0
  536. package/node_modules/zod/dist/types/v3/locales/en.d.ts +3 -0
  537. package/node_modules/zod/dist/types/v3/standard-schema.d.ts +102 -0
  538. package/node_modules/zod/dist/types/v3/tests/Mocker.d.ts +17 -0
  539. package/node_modules/zod/dist/types/v3/types.d.ts +1031 -0
  540. package/node_modules/zod/dist/types/v4/classic/checks.d.ts +1 -0
  541. package/node_modules/zod/dist/types/v4/classic/coerce.d.ts +17 -0
  542. package/node_modules/zod/dist/types/v4/classic/compat.d.ts +48 -0
  543. package/node_modules/zod/dist/types/v4/classic/errors.d.ts +30 -0
  544. package/node_modules/zod/dist/types/v4/classic/external.d.ts +13 -0
  545. package/node_modules/zod/dist/types/v4/classic/index.d.ts +4 -0
  546. package/node_modules/zod/dist/types/v4/classic/iso.d.ts +22 -0
  547. package/node_modules/zod/dist/types/v4/classic/parse.d.ts +23 -0
  548. package/node_modules/zod/dist/types/v4/classic/schemas.d.ts +624 -0
  549. package/node_modules/zod/dist/types/v4/core/api.d.ts +281 -0
  550. package/node_modules/zod/dist/types/v4/core/checks.d.ts +277 -0
  551. package/node_modules/zod/dist/types/v4/core/config.d.ts +9 -0
  552. package/node_modules/zod/dist/types/v4/core/core.d.ts +47 -0
  553. package/node_modules/zod/dist/types/v4/core/doc.d.ts +14 -0
  554. package/node_modules/zod/dist/types/v4/core/errors.d.ts +204 -0
  555. package/node_modules/zod/dist/types/v4/core/function.d.ts +52 -0
  556. package/node_modules/zod/dist/types/v4/core/index.d.ts +15 -0
  557. package/node_modules/zod/dist/types/v4/core/json-schema.d.ts +87 -0
  558. package/node_modules/zod/dist/types/v4/core/parse.d.ts +25 -0
  559. package/node_modules/zod/dist/types/v4/core/regexes.d.ts +62 -0
  560. package/node_modules/zod/dist/types/v4/core/registries.d.ts +39 -0
  561. package/node_modules/zod/dist/types/v4/core/schemas.d.ts +1005 -0
  562. package/node_modules/zod/dist/types/v4/core/standard-schema.d.ts +55 -0
  563. package/node_modules/zod/dist/types/v4/core/to-json-schema.d.ts +84 -0
  564. package/node_modules/zod/dist/types/v4/core/util.d.ts +183 -0
  565. package/node_modules/zod/dist/types/v4/core/versions.d.ts +5 -0
  566. package/node_modules/zod/dist/types/v4/core/zsf.d.ts +91 -0
  567. package/node_modules/zod/dist/types/v4/index.d.ts +3 -0
  568. package/node_modules/zod/dist/types/v4/locales/ar.d.ts +4 -0
  569. package/node_modules/zod/dist/types/v4/locales/az.d.ts +4 -0
  570. package/node_modules/zod/dist/types/v4/locales/be.d.ts +4 -0
  571. package/node_modules/zod/dist/types/v4/locales/ca.d.ts +4 -0
  572. package/node_modules/zod/dist/types/v4/locales/cs.d.ts +4 -0
  573. package/node_modules/zod/dist/types/v4/locales/de.d.ts +4 -0
  574. package/node_modules/zod/dist/types/v4/locales/en.d.ts +5 -0
  575. package/node_modules/zod/dist/types/v4/locales/es.d.ts +4 -0
  576. package/node_modules/zod/dist/types/v4/locales/fa.d.ts +4 -0
  577. package/node_modules/zod/dist/types/v4/locales/fi.d.ts +4 -0
  578. package/node_modules/zod/dist/types/v4/locales/fr-CA.d.ts +4 -0
  579. package/node_modules/zod/dist/types/v4/locales/fr.d.ts +4 -0
  580. package/node_modules/zod/dist/types/v4/locales/he.d.ts +4 -0
  581. package/node_modules/zod/dist/types/v4/locales/hu.d.ts +4 -0
  582. package/node_modules/zod/dist/types/v4/locales/id.d.ts +4 -0
  583. package/node_modules/zod/dist/types/v4/locales/index.d.ts +38 -0
  584. package/node_modules/zod/dist/types/v4/locales/it.d.ts +4 -0
  585. package/node_modules/zod/dist/types/v4/locales/ja.d.ts +4 -0
  586. package/node_modules/zod/dist/types/v4/locales/kh.d.ts +4 -0
  587. package/node_modules/zod/dist/types/v4/locales/ko.d.ts +4 -0
  588. package/node_modules/zod/dist/types/v4/locales/mk.d.ts +4 -0
  589. package/node_modules/zod/dist/types/v4/locales/ms.d.ts +4 -0
  590. package/node_modules/zod/dist/types/v4/locales/nl.d.ts +4 -0
  591. package/node_modules/zod/dist/types/v4/locales/no.d.ts +4 -0
  592. package/node_modules/zod/dist/types/v4/locales/ota.d.ts +4 -0
  593. package/node_modules/zod/dist/types/v4/locales/pl.d.ts +4 -0
  594. package/node_modules/zod/dist/types/v4/locales/ps.d.ts +4 -0
  595. package/node_modules/zod/dist/types/v4/locales/pt.d.ts +4 -0
  596. package/node_modules/zod/dist/types/v4/locales/ru.d.ts +4 -0
  597. package/node_modules/zod/dist/types/v4/locales/sl.d.ts +4 -0
  598. package/node_modules/zod/dist/types/v4/locales/sv.d.ts +4 -0
  599. package/node_modules/zod/dist/types/v4/locales/ta.d.ts +4 -0
  600. package/node_modules/zod/dist/types/v4/locales/th.d.ts +4 -0
  601. package/node_modules/zod/dist/types/v4/locales/tr.d.ts +5 -0
  602. package/node_modules/zod/dist/types/v4/locales/ua.d.ts +4 -0
  603. package/node_modules/zod/dist/types/v4/locales/ur.d.ts +4 -0
  604. package/node_modules/zod/dist/types/v4/locales/vi.d.ts +4 -0
  605. package/node_modules/zod/dist/types/v4/locales/zh-CN.d.ts +4 -0
  606. package/node_modules/zod/dist/types/v4/locales/zh-TW.d.ts +4 -0
  607. package/node_modules/zod/dist/types/v4/mini/checks.d.ts +1 -0
  608. package/node_modules/zod/dist/types/v4/mini/coerce.d.ts +7 -0
  609. package/node_modules/zod/dist/types/v4/mini/external.d.ts +11 -0
  610. package/node_modules/zod/dist/types/v4/mini/index.d.ts +3 -0
  611. package/node_modules/zod/dist/types/v4/mini/iso.d.ts +22 -0
  612. package/node_modules/zod/dist/types/v4/mini/parse.d.ts +1 -0
  613. package/node_modules/zod/dist/types/v4/mini/schemas.d.ts +351 -0
  614. package/node_modules/zod/package.json +120 -0
  615. package/node_modules/zod/v3/index.d.ts +3 -0
  616. package/node_modules/zod/v3/index.js +1 -0
  617. package/node_modules/zod/v4/core/index.d.ts +1 -0
  618. package/node_modules/zod/v4/core/index.js +1 -0
  619. package/node_modules/zod/v4/index.d.ts +3 -0
  620. package/node_modules/zod/v4/index.js +1 -0
  621. package/node_modules/zod/v4/locales/en.d.ts +2 -0
  622. package/node_modules/zod/v4/locales/en.js +2 -0
  623. package/node_modules/zod/v4/locales/index.d.ts +1 -0
  624. package/node_modules/zod/v4/locales/index.js +1 -0
  625. package/node_modules/zod/v4-mini/index.d.ts +1 -0
  626. package/node_modules/zod/v4-mini/index.js +1 -0
  627. package/package.json +31 -33
  628. package/skills/fix/INSTRUCTIONS.md +40 -0
  629. package/skills/fix/skill.json +8 -0
  630. package/skills/review/INSTRUCTIONS.md +49 -0
  631. package/skills/review/skill.json +8 -0
  632. package/dist/commands/build.d.ts +0 -5
  633. package/dist/commands/build.d.ts.map +0 -1
  634. package/dist/commands/build.js +0 -173
  635. package/dist/commands/build.js.map +0 -1
  636. package/dist/commands/check.d.ts +0 -6
  637. package/dist/commands/check.d.ts.map +0 -1
  638. package/dist/commands/check.js +0 -145
  639. package/dist/commands/check.js.map +0 -1
  640. package/dist/commands/checkpoint-init.d.ts +0 -32
  641. package/dist/commands/checkpoint-init.d.ts.map +0 -1
  642. package/dist/commands/checkpoint-init.js +0 -521
  643. package/dist/commands/checkpoint-init.js.map +0 -1
  644. package/dist/commands/claim.d.ts +0 -22
  645. package/dist/commands/claim.d.ts.map +0 -1
  646. package/dist/commands/claim.js +0 -315
  647. package/dist/commands/claim.js.map +0 -1
  648. package/dist/commands/dco.d.ts +0 -55
  649. package/dist/commands/dco.d.ts.map +0 -1
  650. package/dist/commands/dco.js +0 -280
  651. package/dist/commands/dco.js.map +0 -1
  652. package/dist/commands/demo.d.ts +0 -10
  653. package/dist/commands/demo.d.ts.map +0 -1
  654. package/dist/commands/demo.js +0 -584
  655. package/dist/commands/demo.js.map +0 -1
  656. package/dist/commands/dev.d.ts +0 -5
  657. package/dist/commands/dev.d.ts.map +0 -1
  658. package/dist/commands/dev.js +0 -77
  659. package/dist/commands/dev.js.map +0 -1
  660. package/dist/commands/doctor.d.ts +0 -11
  661. package/dist/commands/doctor.d.ts.map +0 -1
  662. package/dist/commands/doctor.js +0 -524
  663. package/dist/commands/doctor.js.map +0 -1
  664. package/dist/commands/env.d.ts +0 -2
  665. package/dist/commands/env.d.ts.map +0 -1
  666. package/dist/commands/env.js +0 -320
  667. package/dist/commands/env.js.map +0 -1
  668. package/dist/commands/identity.d.ts +0 -14
  669. package/dist/commands/identity.d.ts.map +0 -1
  670. package/dist/commands/identity.js +0 -204
  671. package/dist/commands/identity.js.map +0 -1
  672. package/dist/commands/init.d.ts +0 -21
  673. package/dist/commands/init.d.ts.map +0 -1
  674. package/dist/commands/init.js +0 -358
  675. package/dist/commands/init.js.map +0 -1
  676. package/dist/commands/receipts.d.ts +0 -22
  677. package/dist/commands/receipts.d.ts.map +0 -1
  678. package/dist/commands/receipts.js +0 -189
  679. package/dist/commands/receipts.js.map +0 -1
  680. package/dist/commands/register.d.ts +0 -34
  681. package/dist/commands/register.d.ts.map +0 -1
  682. package/dist/commands/register.js +0 -463
  683. package/dist/commands/register.js.map +0 -1
  684. package/dist/commands/rotate.d.ts +0 -13
  685. package/dist/commands/rotate.d.ts.map +0 -1
  686. package/dist/commands/rotate.js +0 -167
  687. package/dist/commands/rotate.js.map +0 -1
  688. package/dist/commands/start.d.ts +0 -5
  689. package/dist/commands/start.d.ts.map +0 -1
  690. package/dist/commands/start.js +0 -129
  691. package/dist/commands/start.js.map +0 -1
  692. package/dist/commands/status.d.ts +0 -9
  693. package/dist/commands/status.d.ts.map +0 -1
  694. package/dist/commands/status.js +0 -199
  695. package/dist/commands/status.js.map +0 -1
  696. package/dist/commands/verify.d.ts +0 -22
  697. package/dist/commands/verify.d.ts.map +0 -1
  698. package/dist/commands/verify.js +0 -491
  699. package/dist/commands/verify.js.map +0 -1
  700. package/dist/components/agent-avatar.d.ts +0 -87
  701. package/dist/components/agent-avatar.d.ts.map +0 -1
  702. package/dist/components/agent-avatar.js +0 -257
  703. package/dist/components/agent-avatar.js.map +0 -1
  704. package/dist/components/agent-card.d.ts +0 -14
  705. package/dist/components/agent-card.d.ts.map +0 -1
  706. package/dist/components/agent-card.js +0 -167
  707. package/dist/components/agent-card.js.map +0 -1
  708. package/dist/components/agent-table.d.ts +0 -31
  709. package/dist/components/agent-table.d.ts.map +0 -1
  710. package/dist/components/agent-table.js +0 -341
  711. package/dist/components/agent-table.js.map +0 -1
  712. package/dist/components/box.d.ts +0 -14
  713. package/dist/components/box.d.ts.map +0 -1
  714. package/dist/components/box.js +0 -222
  715. package/dist/components/box.js.map +0 -1
  716. package/dist/components/claim-experience.d.ts +0 -21
  717. package/dist/components/claim-experience.d.ts.map +0 -1
  718. package/dist/components/claim-experience.js +0 -138
  719. package/dist/components/claim-experience.js.map +0 -1
  720. package/dist/components/index.d.ts +0 -17
  721. package/dist/components/index.d.ts.map +0 -1
  722. package/dist/components/index.js +0 -18
  723. package/dist/components/index.js.map +0 -1
  724. package/dist/components/messages.d.ts +0 -62
  725. package/dist/components/messages.d.ts.map +0 -1
  726. package/dist/components/messages.js +0 -146
  727. package/dist/components/messages.js.map +0 -1
  728. package/dist/components/types.d.ts +0 -51
  729. package/dist/components/types.d.ts.map +0 -1
  730. package/dist/components/types.js +0 -5
  731. package/dist/components/types.js.map +0 -1
  732. package/dist/components/welcome.d.ts +0 -46
  733. package/dist/components/welcome.d.ts.map +0 -1
  734. package/dist/components/welcome.js +0 -182
  735. package/dist/components/welcome.js.map +0 -1
  736. package/dist/dco.d.ts +0 -4
  737. package/dist/dco.d.ts.map +0 -1
  738. package/dist/dco.js +0 -21
  739. package/dist/dco.js.map +0 -1
  740. package/dist/effects/animation-engine.d.ts +0 -173
  741. package/dist/effects/animation-engine.d.ts.map +0 -1
  742. package/dist/effects/animation-engine.js +0 -254
  743. package/dist/effects/animation-engine.js.map +0 -1
  744. package/dist/effects/cli-integration.d.ts +0 -86
  745. package/dist/effects/cli-integration.d.ts.map +0 -1
  746. package/dist/effects/cli-integration.js +0 -310
  747. package/dist/effects/cli-integration.js.map +0 -1
  748. package/dist/effects/config.d.ts +0 -95
  749. package/dist/effects/config.d.ts.map +0 -1
  750. package/dist/effects/config.js +0 -216
  751. package/dist/effects/config.js.map +0 -1
  752. package/dist/effects/effect-runner.d.ts +0 -69
  753. package/dist/effects/effect-runner.d.ts.map +0 -1
  754. package/dist/effects/effect-runner.js +0 -255
  755. package/dist/effects/effect-runner.js.map +0 -1
  756. package/dist/effects/gradient.d.ts +0 -131
  757. package/dist/effects/gradient.d.ts.map +0 -1
  758. package/dist/effects/gradient.js +0 -236
  759. package/dist/effects/gradient.js.map +0 -1
  760. package/dist/effects/implementations/beams.d.ts +0 -80
  761. package/dist/effects/implementations/beams.d.ts.map +0 -1
  762. package/dist/effects/implementations/beams.js +0 -221
  763. package/dist/effects/implementations/beams.js.map +0 -1
  764. package/dist/effects/implementations/blackhole.d.ts +0 -98
  765. package/dist/effects/implementations/blackhole.d.ts.map +0 -1
  766. package/dist/effects/implementations/blackhole.js +0 -421
  767. package/dist/effects/implementations/blackhole.js.map +0 -1
  768. package/dist/effects/implementations/burn.d.ts +0 -74
  769. package/dist/effects/implementations/burn.d.ts.map +0 -1
  770. package/dist/effects/implementations/burn.js +0 -234
  771. package/dist/effects/implementations/burn.js.map +0 -1
  772. package/dist/effects/implementations/decrypt.d.ts +0 -115
  773. package/dist/effects/implementations/decrypt.d.ts.map +0 -1
  774. package/dist/effects/implementations/decrypt.js +0 -394
  775. package/dist/effects/implementations/decrypt.js.map +0 -1
  776. package/dist/effects/implementations/waves.d.ts +0 -78
  777. package/dist/effects/implementations/waves.d.ts.map +0 -1
  778. package/dist/effects/implementations/waves.js +0 -278
  779. package/dist/effects/implementations/waves.js.map +0 -1
  780. package/dist/effects/index.d.ts +0 -34
  781. package/dist/effects/index.d.ts.map +0 -1
  782. package/dist/effects/index.js +0 -114
  783. package/dist/effects/index.js.map +0 -1
  784. package/dist/effects/motion-engine.d.ts +0 -168
  785. package/dist/effects/motion-engine.d.ts.map +0 -1
  786. package/dist/effects/motion-engine.js +0 -353
  787. package/dist/effects/motion-engine.js.map +0 -1
  788. package/dist/effects/safe-executor.d.ts +0 -55
  789. package/dist/effects/safe-executor.d.ts.map +0 -1
  790. package/dist/effects/safe-executor.js +0 -210
  791. package/dist/effects/safe-executor.js.map +0 -1
  792. package/dist/effects/types.d.ts +0 -199
  793. package/dist/effects/types.d.ts.map +0 -1
  794. package/dist/effects/types.js +0 -80
  795. package/dist/effects/types.js.map +0 -1
  796. package/dist/effects/utils.d.ts +0 -104
  797. package/dist/effects/utils.d.ts.map +0 -1
  798. package/dist/effects/utils.js +0 -280
  799. package/dist/effects/utils.js.map +0 -1
  800. package/dist/index.d.ts +0 -4
  801. package/dist/index.js +0 -213
  802. package/dist/utils/api-response.d.ts +0 -96
  803. package/dist/utils/api-response.d.ts.map +0 -1
  804. package/dist/utils/api-response.js +0 -86
  805. package/dist/utils/api-response.js.map +0 -1
  806. package/dist/utils/checkpoint-api.d.ts +0 -86
  807. package/dist/utils/checkpoint-api.d.ts.map +0 -1
  808. package/dist/utils/checkpoint-api.js +0 -196
  809. package/dist/utils/checkpoint-api.js.map +0 -1
  810. package/dist/utils/checkpoint-env.d.ts +0 -23
  811. package/dist/utils/checkpoint-env.d.ts.map +0 -1
  812. package/dist/utils/checkpoint-env.js +0 -59
  813. package/dist/utils/checkpoint-env.js.map +0 -1
  814. package/dist/utils/checkpoint-scaffold.d.ts +0 -61
  815. package/dist/utils/checkpoint-scaffold.d.ts.map +0 -1
  816. package/dist/utils/checkpoint-scaffold.js +0 -268
  817. package/dist/utils/checkpoint-scaffold.js.map +0 -1
  818. package/dist/utils/cli-kit/browser.d.ts +0 -24
  819. package/dist/utils/cli-kit/browser.d.ts.map +0 -1
  820. package/dist/utils/cli-kit/browser.js +0 -58
  821. package/dist/utils/cli-kit/browser.js.map +0 -1
  822. package/dist/utils/cli-kit/claim-polling.d.ts +0 -18
  823. package/dist/utils/cli-kit/claim-polling.d.ts.map +0 -1
  824. package/dist/utils/cli-kit/claim-polling.js +0 -90
  825. package/dist/utils/cli-kit/claim-polling.js.map +0 -1
  826. package/dist/utils/cli-kit/diagnostics.d.ts +0 -9
  827. package/dist/utils/cli-kit/diagnostics.d.ts.map +0 -1
  828. package/dist/utils/cli-kit/diagnostics.js +0 -11
  829. package/dist/utils/cli-kit/diagnostics.js.map +0 -1
  830. package/dist/utils/cli-kit/fs-safe.d.ts +0 -14
  831. package/dist/utils/cli-kit/fs-safe.d.ts.map +0 -1
  832. package/dist/utils/cli-kit/fs-safe.js +0 -20
  833. package/dist/utils/cli-kit/fs-safe.js.map +0 -1
  834. package/dist/utils/cli-kit/index.d.ts +0 -15
  835. package/dist/utils/cli-kit/index.d.ts.map +0 -1
  836. package/dist/utils/cli-kit/index.js +0 -10
  837. package/dist/utils/cli-kit/index.js.map +0 -1
  838. package/dist/utils/cli-kit/json-file.d.ts +0 -21
  839. package/dist/utils/cli-kit/json-file.d.ts.map +0 -1
  840. package/dist/utils/cli-kit/json-file.js +0 -51
  841. package/dist/utils/cli-kit/json-file.js.map +0 -1
  842. package/dist/utils/cli-kit/marker-block.d.ts +0 -26
  843. package/dist/utils/cli-kit/marker-block.d.ts.map +0 -1
  844. package/dist/utils/cli-kit/marker-block.js +0 -61
  845. package/dist/utils/cli-kit/marker-block.js.map +0 -1
  846. package/dist/utils/cli-kit/paths.d.ts +0 -15
  847. package/dist/utils/cli-kit/paths.d.ts.map +0 -1
  848. package/dist/utils/cli-kit/paths.js +0 -21
  849. package/dist/utils/cli-kit/paths.js.map +0 -1
  850. package/dist/utils/cli-kit/secure-storage.d.ts +0 -14
  851. package/dist/utils/cli-kit/secure-storage.d.ts.map +0 -1
  852. package/dist/utils/cli-kit/secure-storage.js +0 -20
  853. package/dist/utils/cli-kit/secure-storage.js.map +0 -1
  854. package/dist/utils/cli-kit/step-report.d.ts +0 -16
  855. package/dist/utils/cli-kit/step-report.d.ts.map +0 -1
  856. package/dist/utils/cli-kit/step-report.js +0 -36
  857. package/dist/utils/cli-kit/step-report.js.map +0 -1
  858. package/dist/utils/dco/agent-metadata.d.ts +0 -24
  859. package/dist/utils/dco/agent-metadata.d.ts.map +0 -1
  860. package/dist/utils/dco/agent-metadata.js +0 -46
  861. package/dist/utils/dco/agent-metadata.js.map +0 -1
  862. package/dist/utils/dco/claude-config.d.ts +0 -55
  863. package/dist/utils/dco/claude-config.d.ts.map +0 -1
  864. package/dist/utils/dco/claude-config.js +0 -66
  865. package/dist/utils/dco/claude-config.js.map +0 -1
  866. package/dist/utils/dco/dispatch.d.ts +0 -59
  867. package/dist/utils/dco/dispatch.d.ts.map +0 -1
  868. package/dist/utils/dco/dispatch.js +0 -332
  869. package/dist/utils/dco/dispatch.js.map +0 -1
  870. package/dist/utils/dco/git-config.d.ts +0 -47
  871. package/dist/utils/dco/git-config.d.ts.map +0 -1
  872. package/dist/utils/dco/git-config.js +0 -161
  873. package/dist/utils/dco/git-config.js.map +0 -1
  874. package/dist/utils/dco/github.d.ts +0 -57
  875. package/dist/utils/dco/github.d.ts.map +0 -1
  876. package/dist/utils/dco/github.js +0 -165
  877. package/dist/utils/dco/github.js.map +0 -1
  878. package/dist/utils/dco/paths.d.ts +0 -9
  879. package/dist/utils/dco/paths.d.ts.map +0 -1
  880. package/dist/utils/dco/paths.js +0 -18
  881. package/dist/utils/dco/paths.js.map +0 -1
  882. package/dist/utils/dco/render.d.ts +0 -4
  883. package/dist/utils/dco/render.d.ts.map +0 -1
  884. package/dist/utils/dco/render.js +0 -35
  885. package/dist/utils/dco/render.js.map +0 -1
  886. package/dist/utils/dco/resolve-agent.d.ts +0 -54
  887. package/dist/utils/dco/resolve-agent.d.ts.map +0 -1
  888. package/dist/utils/dco/resolve-agent.js +0 -164
  889. package/dist/utils/dco/resolve-agent.js.map +0 -1
  890. package/dist/utils/dco/setup.d.ts +0 -50
  891. package/dist/utils/dco/setup.d.ts.map +0 -1
  892. package/dist/utils/dco/setup.js +0 -842
  893. package/dist/utils/dco/setup.js.map +0 -1
  894. package/dist/utils/dco/ssh-key.d.ts +0 -56
  895. package/dist/utils/dco/ssh-key.d.ts.map +0 -1
  896. package/dist/utils/dco/ssh-key.js +0 -197
  897. package/dist/utils/dco/ssh-key.js.map +0 -1
  898. package/dist/utils/dco/status.d.ts +0 -12
  899. package/dist/utils/dco/status.d.ts.map +0 -1
  900. package/dist/utils/dco/status.js +0 -238
  901. package/dist/utils/dco/status.js.map +0 -1
  902. package/dist/utils/dco/verify.d.ts +0 -114
  903. package/dist/utils/dco/verify.d.ts.map +0 -1
  904. package/dist/utils/dco/verify.js +0 -383
  905. package/dist/utils/dco/verify.js.map +0 -1
  906. package/dist/utils/env-manager.d.ts +0 -122
  907. package/dist/utils/env-manager.d.ts.map +0 -1
  908. package/dist/utils/env-manager.js +0 -514
  909. package/dist/utils/env-manager.js.map +0 -1
  910. package/dist/utils/gitignore.d.ts +0 -17
  911. package/dist/utils/gitignore.d.ts.map +0 -1
  912. package/dist/utils/gitignore.js +0 -40
  913. package/dist/utils/gitignore.js.map +0 -1
  914. package/dist/utils/identity-heal.d.ts +0 -16
  915. package/dist/utils/identity-heal.d.ts.map +0 -1
  916. package/dist/utils/identity-heal.js +0 -37
  917. package/dist/utils/identity-heal.js.map +0 -1
  918. package/dist/utils/identity-manager.d.ts +0 -41
  919. package/dist/utils/identity-manager.d.ts.map +0 -1
  920. package/dist/utils/identity-manager.js +0 -159
  921. package/dist/utils/identity-manager.js.map +0 -1
  922. package/dist/utils/kta-api.d.ts +0 -103
  923. package/dist/utils/kta-api.d.ts.map +0 -1
  924. package/dist/utils/kta-api.js +0 -149
  925. package/dist/utils/kta-api.js.map +0 -1
  926. package/dist/utils/platform-detector.d.ts +0 -54
  927. package/dist/utils/platform-detector.d.ts.map +0 -1
  928. package/dist/utils/platform-detector.js +0 -197
  929. package/dist/utils/platform-detector.js.map +0 -1
  930. package/dist/utils/poll.d.ts +0 -50
  931. package/dist/utils/poll.d.ts.map +0 -1
  932. package/dist/utils/poll.js +0 -73
  933. package/dist/utils/poll.js.map +0 -1
  934. package/dist/utils/prompts.d.ts +0 -24
  935. package/dist/utils/prompts.d.ts.map +0 -1
  936. package/dist/utils/prompts.js +0 -160
  937. package/dist/utils/prompts.js.map +0 -1
  938. package/dist/utils/screen-manager.d.ts +0 -10
  939. package/dist/utils/screen-manager.d.ts.map +0 -1
  940. package/dist/utils/screen-manager.js +0 -54
  941. package/dist/utils/screen-manager.js.map +0 -1
  942. package/dist/utils/time.d.ts +0 -19
  943. package/dist/utils/time.d.ts.map +0 -1
  944. package/dist/utils/time.js +0 -30
  945. package/dist/utils/time.js.map +0 -1
@@ -0,0 +1,3839 @@
1
+ /**
2
+ * Policy Configuration Schemas
3
+ *
4
+ * Zod schemas for agent detection policy configuration.
5
+ * These schemas define how MCP-I servers and AgentShield enforce
6
+ * access control based on detected agent characteristics.
7
+ *
8
+ * @module @kya-os/contracts/policy
9
+ */
10
+ import { z } from 'zod';
11
+ /**
12
+ * Available enforcement actions
13
+ *
14
+ * - `allow` - Allow the request to proceed
15
+ * - `block` - Block the request (return 403)
16
+ * - `redirect` - Redirect to a configured URL
17
+ * - `challenge` - Present a challenge (CAPTCHA, proof-of-work, etc.)
18
+ * - `log` - Allow but log for monitoring
19
+ */
20
+ export declare const EnforcementActionSchema: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
21
+ export type EnforcementAction = z.infer<typeof EnforcementActionSchema>;
22
+ /**
23
+ * Threshold-based enforcement settings
24
+ *
25
+ * These thresholds determine automatic enforcement based on
26
+ * detection confidence and reputation scores.
27
+ */
28
+ export declare const ThresholdConfigSchema: z.ZodObject<{
29
+ /**
30
+ * Detection confidence threshold (0-100)
31
+ * Agents detected with confidence >= this value trigger the configured action
32
+ * @default 80
33
+ */
34
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
35
+ /**
36
+ * Action to take when confidence threshold is exceeded
37
+ * @default 'block'
38
+ */
39
+ confidenceAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
40
+ /**
41
+ * Minimum reputation score (0-100) required to allow access
42
+ * Agents with reputation < this value may be blocked/challenged
43
+ * Set to 0 to disable reputation-based enforcement
44
+ * @default 0
45
+ */
46
+ minReputationScore: z.ZodDefault<z.ZodNumber>;
47
+ /**
48
+ * Action to take when reputation is below threshold
49
+ * @default 'challenge'
50
+ */
51
+ lowReputationAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
52
+ /**
53
+ * High reputation score threshold (0-100)
54
+ * Agents with reputation >= this value are trusted and bypass other checks
55
+ * @default 90
56
+ */
57
+ trustedReputationThreshold: z.ZodDefault<z.ZodNumber>;
58
+ /**
59
+ * Whether cryptographically signed requests (MCP-I verified) bypass thresholds
60
+ * @default true
61
+ */
62
+ trustSignedRequests: z.ZodDefault<z.ZodBoolean>;
63
+ }, "strip", z.ZodTypeAny, {
64
+ confidenceThreshold: number;
65
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
66
+ minReputationScore: number;
67
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
68
+ trustedReputationThreshold: number;
69
+ trustSignedRequests: boolean;
70
+ }, {
71
+ confidenceThreshold?: number | undefined;
72
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
73
+ minReputationScore?: number | undefined;
74
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
75
+ trustedReputationThreshold?: number | undefined;
76
+ trustSignedRequests?: boolean | undefined;
77
+ }>;
78
+ export type ThresholdConfig = z.infer<typeof ThresholdConfigSchema>;
79
+ /**
80
+ * Entry in the deny list for blocking specific agents
81
+ *
82
+ * At least one identifier must be provided: clientDid, agentDid, or clientName
83
+ */
84
+ export declare const DenyListEntrySchema: z.ZodEffects<z.ZodObject<{
85
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
86
+ clientDid: z.ZodOptional<z.ZodString>;
87
+ /** Agent DID from MCP-I identity */
88
+ agentDid: z.ZodOptional<z.ZodString>;
89
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
90
+ clientName: z.ZodOptional<z.ZodString>;
91
+ /** Agent type to block (e.g., "ai_agent", "bot", "scraper") */
92
+ agentType: z.ZodOptional<z.ZodString>;
93
+ /** Reason for denial (shown to user/logged) */
94
+ reason: z.ZodOptional<z.ZodString>;
95
+ /** ISO 8601 timestamp when entry was added */
96
+ blockedAt: z.ZodOptional<z.ZodString>;
97
+ /** Who added this entry (user ID or "system") */
98
+ addedBy: z.ZodOptional<z.ZodString>;
99
+ /** Whether this entry is currently active */
100
+ active: z.ZodDefault<z.ZodBoolean>;
101
+ /** Optional expiration date for temporary blocks */
102
+ expiresAt: z.ZodOptional<z.ZodString>;
103
+ }, "strip", z.ZodTypeAny, {
104
+ active: boolean;
105
+ agentDid?: string | undefined;
106
+ clientDid?: string | undefined;
107
+ expiresAt?: string | undefined;
108
+ reason?: string | undefined;
109
+ clientName?: string | undefined;
110
+ agentType?: string | undefined;
111
+ blockedAt?: string | undefined;
112
+ addedBy?: string | undefined;
113
+ }, {
114
+ agentDid?: string | undefined;
115
+ clientDid?: string | undefined;
116
+ expiresAt?: string | undefined;
117
+ reason?: string | undefined;
118
+ active?: boolean | undefined;
119
+ clientName?: string | undefined;
120
+ agentType?: string | undefined;
121
+ blockedAt?: string | undefined;
122
+ addedBy?: string | undefined;
123
+ }>, {
124
+ active: boolean;
125
+ agentDid?: string | undefined;
126
+ clientDid?: string | undefined;
127
+ expiresAt?: string | undefined;
128
+ reason?: string | undefined;
129
+ clientName?: string | undefined;
130
+ agentType?: string | undefined;
131
+ blockedAt?: string | undefined;
132
+ addedBy?: string | undefined;
133
+ }, {
134
+ agentDid?: string | undefined;
135
+ clientDid?: string | undefined;
136
+ expiresAt?: string | undefined;
137
+ reason?: string | undefined;
138
+ active?: boolean | undefined;
139
+ clientName?: string | undefined;
140
+ agentType?: string | undefined;
141
+ blockedAt?: string | undefined;
142
+ addedBy?: string | undefined;
143
+ }>;
144
+ export type DenyListEntry = z.infer<typeof DenyListEntrySchema>;
145
+ /**
146
+ * Entry in the allow list for exempting specific agents from all checks
147
+ *
148
+ * At least one identifier must be provided: clientDid, agentDid, clientName, or agentType
149
+ */
150
+ export declare const AllowListEntrySchema: z.ZodEffects<z.ZodObject<{
151
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
152
+ clientDid: z.ZodOptional<z.ZodString>;
153
+ /** Agent DID from MCP-I identity */
154
+ agentDid: z.ZodOptional<z.ZodString>;
155
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
156
+ clientName: z.ZodOptional<z.ZodString>;
157
+ /** Agent type to allow (e.g., "ai_agent", "verified_bot") */
158
+ agentType: z.ZodOptional<z.ZodString>;
159
+ /** Reason for allowing (documentation) */
160
+ reason: z.ZodOptional<z.ZodString>;
161
+ /** ISO 8601 timestamp when entry was added */
162
+ addedAt: z.ZodOptional<z.ZodString>;
163
+ /** Who added this entry */
164
+ addedBy: z.ZodOptional<z.ZodString>;
165
+ }, "strip", z.ZodTypeAny, {
166
+ agentDid?: string | undefined;
167
+ clientDid?: string | undefined;
168
+ reason?: string | undefined;
169
+ clientName?: string | undefined;
170
+ agentType?: string | undefined;
171
+ addedBy?: string | undefined;
172
+ addedAt?: string | undefined;
173
+ }, {
174
+ agentDid?: string | undefined;
175
+ clientDid?: string | undefined;
176
+ reason?: string | undefined;
177
+ clientName?: string | undefined;
178
+ agentType?: string | undefined;
179
+ addedBy?: string | undefined;
180
+ addedAt?: string | undefined;
181
+ }>, {
182
+ agentDid?: string | undefined;
183
+ clientDid?: string | undefined;
184
+ reason?: string | undefined;
185
+ clientName?: string | undefined;
186
+ agentType?: string | undefined;
187
+ addedBy?: string | undefined;
188
+ addedAt?: string | undefined;
189
+ }, {
190
+ agentDid?: string | undefined;
191
+ clientDid?: string | undefined;
192
+ reason?: string | undefined;
193
+ clientName?: string | undefined;
194
+ agentType?: string | undefined;
195
+ addedBy?: string | undefined;
196
+ addedAt?: string | undefined;
197
+ }>;
198
+ export type AllowListEntry = z.infer<typeof AllowListEntrySchema>;
199
+ /**
200
+ * Condition for matching requests in a policy rule
201
+ */
202
+ export declare const PolicyConditionSchema: z.ZodObject<{
203
+ /** Field to match against */
204
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
205
+ /** Comparison operator */
206
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
207
+ /** Value to compare against */
208
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
209
+ /** Whether this condition is case-insensitive (for string comparisons) */
210
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
211
+ }, "strip", z.ZodTypeAny, {
212
+ value: string | number | boolean | string[];
213
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
214
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
215
+ caseInsensitive?: boolean | undefined;
216
+ }, {
217
+ value: string | number | boolean | string[];
218
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
219
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
220
+ caseInsensitive?: boolean | undefined;
221
+ }>;
222
+ export type PolicyCondition = z.infer<typeof PolicyConditionSchema>;
223
+ /**
224
+ * A single policy rule that maps conditions to an action
225
+ */
226
+ export declare const PolicyRuleSchema: z.ZodEffects<z.ZodObject<{
227
+ /** Unique identifier for this rule */
228
+ id: z.ZodString;
229
+ /** Human-readable name */
230
+ name: z.ZodString;
231
+ /** Description of what this rule does */
232
+ description: z.ZodOptional<z.ZodString>;
233
+ /** Priority (lower = higher priority, evaluated first) */
234
+ priority: z.ZodDefault<z.ZodNumber>;
235
+ /**
236
+ * Conditions that must ALL match for this rule to apply (AND logic)
237
+ * For OR logic, create multiple rules with same action
238
+ */
239
+ conditions: z.ZodArray<z.ZodObject<{
240
+ /** Field to match against */
241
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
242
+ /** Comparison operator */
243
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
244
+ /** Value to compare against */
245
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
246
+ /** Whether this condition is case-insensitive (for string comparisons) */
247
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
248
+ }, "strip", z.ZodTypeAny, {
249
+ value: string | number | boolean | string[];
250
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
251
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
252
+ caseInsensitive?: boolean | undefined;
253
+ }, {
254
+ value: string | number | boolean | string[];
255
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
256
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
257
+ caseInsensitive?: boolean | undefined;
258
+ }>, "many">;
259
+ /** Action to take when conditions match */
260
+ action: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
261
+ /** Redirect URL (required if action is 'redirect') */
262
+ redirectUrl: z.ZodOptional<z.ZodString>;
263
+ /** Custom message to show/log */
264
+ message: z.ZodOptional<z.ZodString>;
265
+ /** Whether this rule is currently active */
266
+ enabled: z.ZodDefault<z.ZodBoolean>;
267
+ /** Metadata for auditing */
268
+ metadata: z.ZodOptional<z.ZodObject<{
269
+ createdAt: z.ZodOptional<z.ZodString>;
270
+ updatedAt: z.ZodOptional<z.ZodString>;
271
+ createdBy: z.ZodOptional<z.ZodString>;
272
+ }, "strip", z.ZodTypeAny, {
273
+ createdAt?: string | undefined;
274
+ updatedAt?: string | undefined;
275
+ createdBy?: string | undefined;
276
+ }, {
277
+ createdAt?: string | undefined;
278
+ updatedAt?: string | undefined;
279
+ createdBy?: string | undefined;
280
+ }>>;
281
+ }, "strip", z.ZodTypeAny, {
282
+ name: string;
283
+ id: string;
284
+ enabled: boolean;
285
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
286
+ priority: number;
287
+ conditions: {
288
+ value: string | number | boolean | string[];
289
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
290
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
291
+ caseInsensitive?: boolean | undefined;
292
+ }[];
293
+ message?: string | undefined;
294
+ metadata?: {
295
+ createdAt?: string | undefined;
296
+ updatedAt?: string | undefined;
297
+ createdBy?: string | undefined;
298
+ } | undefined;
299
+ description?: string | undefined;
300
+ redirectUrl?: string | undefined;
301
+ }, {
302
+ name: string;
303
+ id: string;
304
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
305
+ conditions: {
306
+ value: string | number | boolean | string[];
307
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
308
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
309
+ caseInsensitive?: boolean | undefined;
310
+ }[];
311
+ message?: string | undefined;
312
+ metadata?: {
313
+ createdAt?: string | undefined;
314
+ updatedAt?: string | undefined;
315
+ createdBy?: string | undefined;
316
+ } | undefined;
317
+ enabled?: boolean | undefined;
318
+ description?: string | undefined;
319
+ priority?: number | undefined;
320
+ redirectUrl?: string | undefined;
321
+ }>, {
322
+ name: string;
323
+ id: string;
324
+ enabled: boolean;
325
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
326
+ priority: number;
327
+ conditions: {
328
+ value: string | number | boolean | string[];
329
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
330
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
331
+ caseInsensitive?: boolean | undefined;
332
+ }[];
333
+ message?: string | undefined;
334
+ metadata?: {
335
+ createdAt?: string | undefined;
336
+ updatedAt?: string | undefined;
337
+ createdBy?: string | undefined;
338
+ } | undefined;
339
+ description?: string | undefined;
340
+ redirectUrl?: string | undefined;
341
+ }, {
342
+ name: string;
343
+ id: string;
344
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
345
+ conditions: {
346
+ value: string | number | boolean | string[];
347
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
348
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
349
+ caseInsensitive?: boolean | undefined;
350
+ }[];
351
+ message?: string | undefined;
352
+ metadata?: {
353
+ createdAt?: string | undefined;
354
+ updatedAt?: string | undefined;
355
+ createdBy?: string | undefined;
356
+ } | undefined;
357
+ enabled?: boolean | undefined;
358
+ description?: string | undefined;
359
+ priority?: number | undefined;
360
+ redirectUrl?: string | undefined;
361
+ }>;
362
+ export type PolicyRule = z.infer<typeof PolicyRuleSchema>;
363
+ /**
364
+ * Complete policy configuration for a project
365
+ *
366
+ * Policy evaluation order:
367
+ * 1. Allow list (exempt agents, always allowed)
368
+ * 2. Deny list (blocked agents, always blocked)
369
+ * 3. Threshold checks (confidence, reputation)
370
+ * 4. Custom rules (evaluated by priority, first match wins)
371
+ * 5. Default action (if no rules match)
372
+ */
373
+ export declare const PolicyConfigSchema: z.ZodEffects<z.ZodObject<{
374
+ /** Schema version for migrations */
375
+ version: z.ZodDefault<z.ZodString>;
376
+ /** Whether policy enforcement is enabled */
377
+ enabled: z.ZodDefault<z.ZodBoolean>;
378
+ /** Default action when no rules match */
379
+ defaultAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
380
+ /** Default redirect URL for redirect actions */
381
+ redirectUrl: z.ZodOptional<z.ZodString>;
382
+ /** Threshold-based enforcement settings */
383
+ thresholds: z.ZodDefault<z.ZodObject<{
384
+ /**
385
+ * Detection confidence threshold (0-100)
386
+ * Agents detected with confidence >= this value trigger the configured action
387
+ * @default 80
388
+ */
389
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
390
+ /**
391
+ * Action to take when confidence threshold is exceeded
392
+ * @default 'block'
393
+ */
394
+ confidenceAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
395
+ /**
396
+ * Minimum reputation score (0-100) required to allow access
397
+ * Agents with reputation < this value may be blocked/challenged
398
+ * Set to 0 to disable reputation-based enforcement
399
+ * @default 0
400
+ */
401
+ minReputationScore: z.ZodDefault<z.ZodNumber>;
402
+ /**
403
+ * Action to take when reputation is below threshold
404
+ * @default 'challenge'
405
+ */
406
+ lowReputationAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
407
+ /**
408
+ * High reputation score threshold (0-100)
409
+ * Agents with reputation >= this value are trusted and bypass other checks
410
+ * @default 90
411
+ */
412
+ trustedReputationThreshold: z.ZodDefault<z.ZodNumber>;
413
+ /**
414
+ * Whether cryptographically signed requests (MCP-I verified) bypass thresholds
415
+ * @default true
416
+ */
417
+ trustSignedRequests: z.ZodDefault<z.ZodBoolean>;
418
+ }, "strip", z.ZodTypeAny, {
419
+ confidenceThreshold: number;
420
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
421
+ minReputationScore: number;
422
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
423
+ trustedReputationThreshold: number;
424
+ trustSignedRequests: boolean;
425
+ }, {
426
+ confidenceThreshold?: number | undefined;
427
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
428
+ minReputationScore?: number | undefined;
429
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
430
+ trustedReputationThreshold?: number | undefined;
431
+ trustSignedRequests?: boolean | undefined;
432
+ }>>;
433
+ /** Deny list entries (checked after allow list, before rules) */
434
+ denyList: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
435
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
436
+ clientDid: z.ZodOptional<z.ZodString>;
437
+ /** Agent DID from MCP-I identity */
438
+ agentDid: z.ZodOptional<z.ZodString>;
439
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
440
+ clientName: z.ZodOptional<z.ZodString>;
441
+ /** Agent type to block (e.g., "ai_agent", "bot", "scraper") */
442
+ agentType: z.ZodOptional<z.ZodString>;
443
+ /** Reason for denial (shown to user/logged) */
444
+ reason: z.ZodOptional<z.ZodString>;
445
+ /** ISO 8601 timestamp when entry was added */
446
+ blockedAt: z.ZodOptional<z.ZodString>;
447
+ /** Who added this entry (user ID or "system") */
448
+ addedBy: z.ZodOptional<z.ZodString>;
449
+ /** Whether this entry is currently active */
450
+ active: z.ZodDefault<z.ZodBoolean>;
451
+ /** Optional expiration date for temporary blocks */
452
+ expiresAt: z.ZodOptional<z.ZodString>;
453
+ }, "strip", z.ZodTypeAny, {
454
+ active: boolean;
455
+ agentDid?: string | undefined;
456
+ clientDid?: string | undefined;
457
+ expiresAt?: string | undefined;
458
+ reason?: string | undefined;
459
+ clientName?: string | undefined;
460
+ agentType?: string | undefined;
461
+ blockedAt?: string | undefined;
462
+ addedBy?: string | undefined;
463
+ }, {
464
+ agentDid?: string | undefined;
465
+ clientDid?: string | undefined;
466
+ expiresAt?: string | undefined;
467
+ reason?: string | undefined;
468
+ active?: boolean | undefined;
469
+ clientName?: string | undefined;
470
+ agentType?: string | undefined;
471
+ blockedAt?: string | undefined;
472
+ addedBy?: string | undefined;
473
+ }>, {
474
+ active: boolean;
475
+ agentDid?: string | undefined;
476
+ clientDid?: string | undefined;
477
+ expiresAt?: string | undefined;
478
+ reason?: string | undefined;
479
+ clientName?: string | undefined;
480
+ agentType?: string | undefined;
481
+ blockedAt?: string | undefined;
482
+ addedBy?: string | undefined;
483
+ }, {
484
+ agentDid?: string | undefined;
485
+ clientDid?: string | undefined;
486
+ expiresAt?: string | undefined;
487
+ reason?: string | undefined;
488
+ active?: boolean | undefined;
489
+ clientName?: string | undefined;
490
+ agentType?: string | undefined;
491
+ blockedAt?: string | undefined;
492
+ addedBy?: string | undefined;
493
+ }>, "many">>;
494
+ /** Allow list entries (exempt from all checks) */
495
+ allowList: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
496
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
497
+ clientDid: z.ZodOptional<z.ZodString>;
498
+ /** Agent DID from MCP-I identity */
499
+ agentDid: z.ZodOptional<z.ZodString>;
500
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
501
+ clientName: z.ZodOptional<z.ZodString>;
502
+ /** Agent type to allow (e.g., "ai_agent", "verified_bot") */
503
+ agentType: z.ZodOptional<z.ZodString>;
504
+ /** Reason for allowing (documentation) */
505
+ reason: z.ZodOptional<z.ZodString>;
506
+ /** ISO 8601 timestamp when entry was added */
507
+ addedAt: z.ZodOptional<z.ZodString>;
508
+ /** Who added this entry */
509
+ addedBy: z.ZodOptional<z.ZodString>;
510
+ }, "strip", z.ZodTypeAny, {
511
+ agentDid?: string | undefined;
512
+ clientDid?: string | undefined;
513
+ reason?: string | undefined;
514
+ clientName?: string | undefined;
515
+ agentType?: string | undefined;
516
+ addedBy?: string | undefined;
517
+ addedAt?: string | undefined;
518
+ }, {
519
+ agentDid?: string | undefined;
520
+ clientDid?: string | undefined;
521
+ reason?: string | undefined;
522
+ clientName?: string | undefined;
523
+ agentType?: string | undefined;
524
+ addedBy?: string | undefined;
525
+ addedAt?: string | undefined;
526
+ }>, {
527
+ agentDid?: string | undefined;
528
+ clientDid?: string | undefined;
529
+ reason?: string | undefined;
530
+ clientName?: string | undefined;
531
+ agentType?: string | undefined;
532
+ addedBy?: string | undefined;
533
+ addedAt?: string | undefined;
534
+ }, {
535
+ agentDid?: string | undefined;
536
+ clientDid?: string | undefined;
537
+ reason?: string | undefined;
538
+ clientName?: string | undefined;
539
+ agentType?: string | undefined;
540
+ addedBy?: string | undefined;
541
+ addedAt?: string | undefined;
542
+ }>, "many">>;
543
+ /** Custom policy rules (evaluated by priority after threshold checks) */
544
+ rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
545
+ /** Unique identifier for this rule */
546
+ id: z.ZodString;
547
+ /** Human-readable name */
548
+ name: z.ZodString;
549
+ /** Description of what this rule does */
550
+ description: z.ZodOptional<z.ZodString>;
551
+ /** Priority (lower = higher priority, evaluated first) */
552
+ priority: z.ZodDefault<z.ZodNumber>;
553
+ /**
554
+ * Conditions that must ALL match for this rule to apply (AND logic)
555
+ * For OR logic, create multiple rules with same action
556
+ */
557
+ conditions: z.ZodArray<z.ZodObject<{
558
+ /** Field to match against */
559
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
560
+ /** Comparison operator */
561
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
562
+ /** Value to compare against */
563
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
564
+ /** Whether this condition is case-insensitive (for string comparisons) */
565
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
566
+ }, "strip", z.ZodTypeAny, {
567
+ value: string | number | boolean | string[];
568
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
569
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
570
+ caseInsensitive?: boolean | undefined;
571
+ }, {
572
+ value: string | number | boolean | string[];
573
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
574
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
575
+ caseInsensitive?: boolean | undefined;
576
+ }>, "many">;
577
+ /** Action to take when conditions match */
578
+ action: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
579
+ /** Redirect URL (required if action is 'redirect') */
580
+ redirectUrl: z.ZodOptional<z.ZodString>;
581
+ /** Custom message to show/log */
582
+ message: z.ZodOptional<z.ZodString>;
583
+ /** Whether this rule is currently active */
584
+ enabled: z.ZodDefault<z.ZodBoolean>;
585
+ /** Metadata for auditing */
586
+ metadata: z.ZodOptional<z.ZodObject<{
587
+ createdAt: z.ZodOptional<z.ZodString>;
588
+ updatedAt: z.ZodOptional<z.ZodString>;
589
+ createdBy: z.ZodOptional<z.ZodString>;
590
+ }, "strip", z.ZodTypeAny, {
591
+ createdAt?: string | undefined;
592
+ updatedAt?: string | undefined;
593
+ createdBy?: string | undefined;
594
+ }, {
595
+ createdAt?: string | undefined;
596
+ updatedAt?: string | undefined;
597
+ createdBy?: string | undefined;
598
+ }>>;
599
+ }, "strip", z.ZodTypeAny, {
600
+ name: string;
601
+ id: string;
602
+ enabled: boolean;
603
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
604
+ priority: number;
605
+ conditions: {
606
+ value: string | number | boolean | string[];
607
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
608
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
609
+ caseInsensitive?: boolean | undefined;
610
+ }[];
611
+ message?: string | undefined;
612
+ metadata?: {
613
+ createdAt?: string | undefined;
614
+ updatedAt?: string | undefined;
615
+ createdBy?: string | undefined;
616
+ } | undefined;
617
+ description?: string | undefined;
618
+ redirectUrl?: string | undefined;
619
+ }, {
620
+ name: string;
621
+ id: string;
622
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
623
+ conditions: {
624
+ value: string | number | boolean | string[];
625
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
626
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
627
+ caseInsensitive?: boolean | undefined;
628
+ }[];
629
+ message?: string | undefined;
630
+ metadata?: {
631
+ createdAt?: string | undefined;
632
+ updatedAt?: string | undefined;
633
+ createdBy?: string | undefined;
634
+ } | undefined;
635
+ enabled?: boolean | undefined;
636
+ description?: string | undefined;
637
+ priority?: number | undefined;
638
+ redirectUrl?: string | undefined;
639
+ }>, {
640
+ name: string;
641
+ id: string;
642
+ enabled: boolean;
643
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
644
+ priority: number;
645
+ conditions: {
646
+ value: string | number | boolean | string[];
647
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
648
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
649
+ caseInsensitive?: boolean | undefined;
650
+ }[];
651
+ message?: string | undefined;
652
+ metadata?: {
653
+ createdAt?: string | undefined;
654
+ updatedAt?: string | undefined;
655
+ createdBy?: string | undefined;
656
+ } | undefined;
657
+ description?: string | undefined;
658
+ redirectUrl?: string | undefined;
659
+ }, {
660
+ name: string;
661
+ id: string;
662
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
663
+ conditions: {
664
+ value: string | number | boolean | string[];
665
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
666
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
667
+ caseInsensitive?: boolean | undefined;
668
+ }[];
669
+ message?: string | undefined;
670
+ metadata?: {
671
+ createdAt?: string | undefined;
672
+ updatedAt?: string | undefined;
673
+ createdBy?: string | undefined;
674
+ } | undefined;
675
+ enabled?: boolean | undefined;
676
+ description?: string | undefined;
677
+ priority?: number | undefined;
678
+ redirectUrl?: string | undefined;
679
+ }>, "many">>;
680
+ /** Paths to exclude from policy enforcement (glob patterns supported) */
681
+ excludedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
682
+ /** Paths to include (if set, only these paths are enforced) */
683
+ includedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
684
+ /** Metadata for the policy configuration */
685
+ metadata: z.ZodOptional<z.ZodObject<{
686
+ lastUpdated: z.ZodOptional<z.ZodString>;
687
+ updatedBy: z.ZodOptional<z.ZodString>;
688
+ policyId: z.ZodOptional<z.ZodString>;
689
+ }, "strip", z.ZodTypeAny, {
690
+ lastUpdated?: string | undefined;
691
+ updatedBy?: string | undefined;
692
+ policyId?: string | undefined;
693
+ }, {
694
+ lastUpdated?: string | undefined;
695
+ updatedBy?: string | undefined;
696
+ policyId?: string | undefined;
697
+ }>>;
698
+ }, "strip", z.ZodTypeAny, {
699
+ version: string;
700
+ enabled: boolean;
701
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
702
+ thresholds: {
703
+ confidenceThreshold: number;
704
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
705
+ minReputationScore: number;
706
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
707
+ trustedReputationThreshold: number;
708
+ trustSignedRequests: boolean;
709
+ };
710
+ denyList: {
711
+ active: boolean;
712
+ agentDid?: string | undefined;
713
+ clientDid?: string | undefined;
714
+ expiresAt?: string | undefined;
715
+ reason?: string | undefined;
716
+ clientName?: string | undefined;
717
+ agentType?: string | undefined;
718
+ blockedAt?: string | undefined;
719
+ addedBy?: string | undefined;
720
+ }[];
721
+ allowList: {
722
+ agentDid?: string | undefined;
723
+ clientDid?: string | undefined;
724
+ reason?: string | undefined;
725
+ clientName?: string | undefined;
726
+ agentType?: string | undefined;
727
+ addedBy?: string | undefined;
728
+ addedAt?: string | undefined;
729
+ }[];
730
+ rules: {
731
+ name: string;
732
+ id: string;
733
+ enabled: boolean;
734
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
735
+ priority: number;
736
+ conditions: {
737
+ value: string | number | boolean | string[];
738
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
739
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
740
+ caseInsensitive?: boolean | undefined;
741
+ }[];
742
+ message?: string | undefined;
743
+ metadata?: {
744
+ createdAt?: string | undefined;
745
+ updatedAt?: string | undefined;
746
+ createdBy?: string | undefined;
747
+ } | undefined;
748
+ description?: string | undefined;
749
+ redirectUrl?: string | undefined;
750
+ }[];
751
+ excludedPaths: string[];
752
+ metadata?: {
753
+ lastUpdated?: string | undefined;
754
+ updatedBy?: string | undefined;
755
+ policyId?: string | undefined;
756
+ } | undefined;
757
+ redirectUrl?: string | undefined;
758
+ includedPaths?: string[] | undefined;
759
+ }, {
760
+ metadata?: {
761
+ lastUpdated?: string | undefined;
762
+ updatedBy?: string | undefined;
763
+ policyId?: string | undefined;
764
+ } | undefined;
765
+ version?: string | undefined;
766
+ enabled?: boolean | undefined;
767
+ redirectUrl?: string | undefined;
768
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
769
+ thresholds?: {
770
+ confidenceThreshold?: number | undefined;
771
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
772
+ minReputationScore?: number | undefined;
773
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
774
+ trustedReputationThreshold?: number | undefined;
775
+ trustSignedRequests?: boolean | undefined;
776
+ } | undefined;
777
+ denyList?: {
778
+ agentDid?: string | undefined;
779
+ clientDid?: string | undefined;
780
+ expiresAt?: string | undefined;
781
+ reason?: string | undefined;
782
+ active?: boolean | undefined;
783
+ clientName?: string | undefined;
784
+ agentType?: string | undefined;
785
+ blockedAt?: string | undefined;
786
+ addedBy?: string | undefined;
787
+ }[] | undefined;
788
+ allowList?: {
789
+ agentDid?: string | undefined;
790
+ clientDid?: string | undefined;
791
+ reason?: string | undefined;
792
+ clientName?: string | undefined;
793
+ agentType?: string | undefined;
794
+ addedBy?: string | undefined;
795
+ addedAt?: string | undefined;
796
+ }[] | undefined;
797
+ rules?: {
798
+ name: string;
799
+ id: string;
800
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
801
+ conditions: {
802
+ value: string | number | boolean | string[];
803
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
804
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
805
+ caseInsensitive?: boolean | undefined;
806
+ }[];
807
+ message?: string | undefined;
808
+ metadata?: {
809
+ createdAt?: string | undefined;
810
+ updatedAt?: string | undefined;
811
+ createdBy?: string | undefined;
812
+ } | undefined;
813
+ enabled?: boolean | undefined;
814
+ description?: string | undefined;
815
+ priority?: number | undefined;
816
+ redirectUrl?: string | undefined;
817
+ }[] | undefined;
818
+ excludedPaths?: string[] | undefined;
819
+ includedPaths?: string[] | undefined;
820
+ }>, {
821
+ version: string;
822
+ enabled: boolean;
823
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
824
+ thresholds: {
825
+ confidenceThreshold: number;
826
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
827
+ minReputationScore: number;
828
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
829
+ trustedReputationThreshold: number;
830
+ trustSignedRequests: boolean;
831
+ };
832
+ denyList: {
833
+ active: boolean;
834
+ agentDid?: string | undefined;
835
+ clientDid?: string | undefined;
836
+ expiresAt?: string | undefined;
837
+ reason?: string | undefined;
838
+ clientName?: string | undefined;
839
+ agentType?: string | undefined;
840
+ blockedAt?: string | undefined;
841
+ addedBy?: string | undefined;
842
+ }[];
843
+ allowList: {
844
+ agentDid?: string | undefined;
845
+ clientDid?: string | undefined;
846
+ reason?: string | undefined;
847
+ clientName?: string | undefined;
848
+ agentType?: string | undefined;
849
+ addedBy?: string | undefined;
850
+ addedAt?: string | undefined;
851
+ }[];
852
+ rules: {
853
+ name: string;
854
+ id: string;
855
+ enabled: boolean;
856
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
857
+ priority: number;
858
+ conditions: {
859
+ value: string | number | boolean | string[];
860
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
861
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
862
+ caseInsensitive?: boolean | undefined;
863
+ }[];
864
+ message?: string | undefined;
865
+ metadata?: {
866
+ createdAt?: string | undefined;
867
+ updatedAt?: string | undefined;
868
+ createdBy?: string | undefined;
869
+ } | undefined;
870
+ description?: string | undefined;
871
+ redirectUrl?: string | undefined;
872
+ }[];
873
+ excludedPaths: string[];
874
+ metadata?: {
875
+ lastUpdated?: string | undefined;
876
+ updatedBy?: string | undefined;
877
+ policyId?: string | undefined;
878
+ } | undefined;
879
+ redirectUrl?: string | undefined;
880
+ includedPaths?: string[] | undefined;
881
+ }, {
882
+ metadata?: {
883
+ lastUpdated?: string | undefined;
884
+ updatedBy?: string | undefined;
885
+ policyId?: string | undefined;
886
+ } | undefined;
887
+ version?: string | undefined;
888
+ enabled?: boolean | undefined;
889
+ redirectUrl?: string | undefined;
890
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
891
+ thresholds?: {
892
+ confidenceThreshold?: number | undefined;
893
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
894
+ minReputationScore?: number | undefined;
895
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
896
+ trustedReputationThreshold?: number | undefined;
897
+ trustSignedRequests?: boolean | undefined;
898
+ } | undefined;
899
+ denyList?: {
900
+ agentDid?: string | undefined;
901
+ clientDid?: string | undefined;
902
+ expiresAt?: string | undefined;
903
+ reason?: string | undefined;
904
+ active?: boolean | undefined;
905
+ clientName?: string | undefined;
906
+ agentType?: string | undefined;
907
+ blockedAt?: string | undefined;
908
+ addedBy?: string | undefined;
909
+ }[] | undefined;
910
+ allowList?: {
911
+ agentDid?: string | undefined;
912
+ clientDid?: string | undefined;
913
+ reason?: string | undefined;
914
+ clientName?: string | undefined;
915
+ agentType?: string | undefined;
916
+ addedBy?: string | undefined;
917
+ addedAt?: string | undefined;
918
+ }[] | undefined;
919
+ rules?: {
920
+ name: string;
921
+ id: string;
922
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
923
+ conditions: {
924
+ value: string | number | boolean | string[];
925
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
926
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
927
+ caseInsensitive?: boolean | undefined;
928
+ }[];
929
+ message?: string | undefined;
930
+ metadata?: {
931
+ createdAt?: string | undefined;
932
+ updatedAt?: string | undefined;
933
+ createdBy?: string | undefined;
934
+ } | undefined;
935
+ enabled?: boolean | undefined;
936
+ description?: string | undefined;
937
+ priority?: number | undefined;
938
+ redirectUrl?: string | undefined;
939
+ }[] | undefined;
940
+ excludedPaths?: string[] | undefined;
941
+ includedPaths?: string[] | undefined;
942
+ }>;
943
+ /** Partial policy config for updates (refinements applied after merge) */
944
+ export declare const PolicyConfigPartialSchema: z.ZodObject<{
945
+ version: z.ZodOptional<z.ZodDefault<z.ZodString>>;
946
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
947
+ defaultAction: z.ZodOptional<z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>>;
948
+ redirectUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
949
+ thresholds: z.ZodOptional<z.ZodDefault<z.ZodObject<{
950
+ /**
951
+ * Detection confidence threshold (0-100)
952
+ * Agents detected with confidence >= this value trigger the configured action
953
+ * @default 80
954
+ */
955
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
956
+ /**
957
+ * Action to take when confidence threshold is exceeded
958
+ * @default 'block'
959
+ */
960
+ confidenceAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
961
+ /**
962
+ * Minimum reputation score (0-100) required to allow access
963
+ * Agents with reputation < this value may be blocked/challenged
964
+ * Set to 0 to disable reputation-based enforcement
965
+ * @default 0
966
+ */
967
+ minReputationScore: z.ZodDefault<z.ZodNumber>;
968
+ /**
969
+ * Action to take when reputation is below threshold
970
+ * @default 'challenge'
971
+ */
972
+ lowReputationAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
973
+ /**
974
+ * High reputation score threshold (0-100)
975
+ * Agents with reputation >= this value are trusted and bypass other checks
976
+ * @default 90
977
+ */
978
+ trustedReputationThreshold: z.ZodDefault<z.ZodNumber>;
979
+ /**
980
+ * Whether cryptographically signed requests (MCP-I verified) bypass thresholds
981
+ * @default true
982
+ */
983
+ trustSignedRequests: z.ZodDefault<z.ZodBoolean>;
984
+ }, "strip", z.ZodTypeAny, {
985
+ confidenceThreshold: number;
986
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
987
+ minReputationScore: number;
988
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
989
+ trustedReputationThreshold: number;
990
+ trustSignedRequests: boolean;
991
+ }, {
992
+ confidenceThreshold?: number | undefined;
993
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
994
+ minReputationScore?: number | undefined;
995
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
996
+ trustedReputationThreshold?: number | undefined;
997
+ trustSignedRequests?: boolean | undefined;
998
+ }>>>;
999
+ denyList: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1000
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
1001
+ clientDid: z.ZodOptional<z.ZodString>;
1002
+ /** Agent DID from MCP-I identity */
1003
+ agentDid: z.ZodOptional<z.ZodString>;
1004
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
1005
+ clientName: z.ZodOptional<z.ZodString>;
1006
+ /** Agent type to block (e.g., "ai_agent", "bot", "scraper") */
1007
+ agentType: z.ZodOptional<z.ZodString>;
1008
+ /** Reason for denial (shown to user/logged) */
1009
+ reason: z.ZodOptional<z.ZodString>;
1010
+ /** ISO 8601 timestamp when entry was added */
1011
+ blockedAt: z.ZodOptional<z.ZodString>;
1012
+ /** Who added this entry (user ID or "system") */
1013
+ addedBy: z.ZodOptional<z.ZodString>;
1014
+ /** Whether this entry is currently active */
1015
+ active: z.ZodDefault<z.ZodBoolean>;
1016
+ /** Optional expiration date for temporary blocks */
1017
+ expiresAt: z.ZodOptional<z.ZodString>;
1018
+ }, "strip", z.ZodTypeAny, {
1019
+ active: boolean;
1020
+ agentDid?: string | undefined;
1021
+ clientDid?: string | undefined;
1022
+ expiresAt?: string | undefined;
1023
+ reason?: string | undefined;
1024
+ clientName?: string | undefined;
1025
+ agentType?: string | undefined;
1026
+ blockedAt?: string | undefined;
1027
+ addedBy?: string | undefined;
1028
+ }, {
1029
+ agentDid?: string | undefined;
1030
+ clientDid?: string | undefined;
1031
+ expiresAt?: string | undefined;
1032
+ reason?: string | undefined;
1033
+ active?: boolean | undefined;
1034
+ clientName?: string | undefined;
1035
+ agentType?: string | undefined;
1036
+ blockedAt?: string | undefined;
1037
+ addedBy?: string | undefined;
1038
+ }>, {
1039
+ active: boolean;
1040
+ agentDid?: string | undefined;
1041
+ clientDid?: string | undefined;
1042
+ expiresAt?: string | undefined;
1043
+ reason?: string | undefined;
1044
+ clientName?: string | undefined;
1045
+ agentType?: string | undefined;
1046
+ blockedAt?: string | undefined;
1047
+ addedBy?: string | undefined;
1048
+ }, {
1049
+ agentDid?: string | undefined;
1050
+ clientDid?: string | undefined;
1051
+ expiresAt?: string | undefined;
1052
+ reason?: string | undefined;
1053
+ active?: boolean | undefined;
1054
+ clientName?: string | undefined;
1055
+ agentType?: string | undefined;
1056
+ blockedAt?: string | undefined;
1057
+ addedBy?: string | undefined;
1058
+ }>, "many">>>;
1059
+ allowList: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1060
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
1061
+ clientDid: z.ZodOptional<z.ZodString>;
1062
+ /** Agent DID from MCP-I identity */
1063
+ agentDid: z.ZodOptional<z.ZodString>;
1064
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
1065
+ clientName: z.ZodOptional<z.ZodString>;
1066
+ /** Agent type to allow (e.g., "ai_agent", "verified_bot") */
1067
+ agentType: z.ZodOptional<z.ZodString>;
1068
+ /** Reason for allowing (documentation) */
1069
+ reason: z.ZodOptional<z.ZodString>;
1070
+ /** ISO 8601 timestamp when entry was added */
1071
+ addedAt: z.ZodOptional<z.ZodString>;
1072
+ /** Who added this entry */
1073
+ addedBy: z.ZodOptional<z.ZodString>;
1074
+ }, "strip", z.ZodTypeAny, {
1075
+ agentDid?: string | undefined;
1076
+ clientDid?: string | undefined;
1077
+ reason?: string | undefined;
1078
+ clientName?: string | undefined;
1079
+ agentType?: string | undefined;
1080
+ addedBy?: string | undefined;
1081
+ addedAt?: string | undefined;
1082
+ }, {
1083
+ agentDid?: string | undefined;
1084
+ clientDid?: string | undefined;
1085
+ reason?: string | undefined;
1086
+ clientName?: string | undefined;
1087
+ agentType?: string | undefined;
1088
+ addedBy?: string | undefined;
1089
+ addedAt?: string | undefined;
1090
+ }>, {
1091
+ agentDid?: string | undefined;
1092
+ clientDid?: string | undefined;
1093
+ reason?: string | undefined;
1094
+ clientName?: string | undefined;
1095
+ agentType?: string | undefined;
1096
+ addedBy?: string | undefined;
1097
+ addedAt?: string | undefined;
1098
+ }, {
1099
+ agentDid?: string | undefined;
1100
+ clientDid?: string | undefined;
1101
+ reason?: string | undefined;
1102
+ clientName?: string | undefined;
1103
+ agentType?: string | undefined;
1104
+ addedBy?: string | undefined;
1105
+ addedAt?: string | undefined;
1106
+ }>, "many">>>;
1107
+ rules: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1108
+ /** Unique identifier for this rule */
1109
+ id: z.ZodString;
1110
+ /** Human-readable name */
1111
+ name: z.ZodString;
1112
+ /** Description of what this rule does */
1113
+ description: z.ZodOptional<z.ZodString>;
1114
+ /** Priority (lower = higher priority, evaluated first) */
1115
+ priority: z.ZodDefault<z.ZodNumber>;
1116
+ /**
1117
+ * Conditions that must ALL match for this rule to apply (AND logic)
1118
+ * For OR logic, create multiple rules with same action
1119
+ */
1120
+ conditions: z.ZodArray<z.ZodObject<{
1121
+ /** Field to match against */
1122
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
1123
+ /** Comparison operator */
1124
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
1125
+ /** Value to compare against */
1126
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
1127
+ /** Whether this condition is case-insensitive (for string comparisons) */
1128
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
1129
+ }, "strip", z.ZodTypeAny, {
1130
+ value: string | number | boolean | string[];
1131
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1132
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1133
+ caseInsensitive?: boolean | undefined;
1134
+ }, {
1135
+ value: string | number | boolean | string[];
1136
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1137
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1138
+ caseInsensitive?: boolean | undefined;
1139
+ }>, "many">;
1140
+ /** Action to take when conditions match */
1141
+ action: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
1142
+ /** Redirect URL (required if action is 'redirect') */
1143
+ redirectUrl: z.ZodOptional<z.ZodString>;
1144
+ /** Custom message to show/log */
1145
+ message: z.ZodOptional<z.ZodString>;
1146
+ /** Whether this rule is currently active */
1147
+ enabled: z.ZodDefault<z.ZodBoolean>;
1148
+ /** Metadata for auditing */
1149
+ metadata: z.ZodOptional<z.ZodObject<{
1150
+ createdAt: z.ZodOptional<z.ZodString>;
1151
+ updatedAt: z.ZodOptional<z.ZodString>;
1152
+ createdBy: z.ZodOptional<z.ZodString>;
1153
+ }, "strip", z.ZodTypeAny, {
1154
+ createdAt?: string | undefined;
1155
+ updatedAt?: string | undefined;
1156
+ createdBy?: string | undefined;
1157
+ }, {
1158
+ createdAt?: string | undefined;
1159
+ updatedAt?: string | undefined;
1160
+ createdBy?: string | undefined;
1161
+ }>>;
1162
+ }, "strip", z.ZodTypeAny, {
1163
+ name: string;
1164
+ id: string;
1165
+ enabled: boolean;
1166
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1167
+ priority: number;
1168
+ conditions: {
1169
+ value: string | number | boolean | string[];
1170
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1171
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1172
+ caseInsensitive?: boolean | undefined;
1173
+ }[];
1174
+ message?: string | undefined;
1175
+ metadata?: {
1176
+ createdAt?: string | undefined;
1177
+ updatedAt?: string | undefined;
1178
+ createdBy?: string | undefined;
1179
+ } | undefined;
1180
+ description?: string | undefined;
1181
+ redirectUrl?: string | undefined;
1182
+ }, {
1183
+ name: string;
1184
+ id: string;
1185
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1186
+ conditions: {
1187
+ value: string | number | boolean | string[];
1188
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1189
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1190
+ caseInsensitive?: boolean | undefined;
1191
+ }[];
1192
+ message?: string | undefined;
1193
+ metadata?: {
1194
+ createdAt?: string | undefined;
1195
+ updatedAt?: string | undefined;
1196
+ createdBy?: string | undefined;
1197
+ } | undefined;
1198
+ enabled?: boolean | undefined;
1199
+ description?: string | undefined;
1200
+ priority?: number | undefined;
1201
+ redirectUrl?: string | undefined;
1202
+ }>, {
1203
+ name: string;
1204
+ id: string;
1205
+ enabled: boolean;
1206
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1207
+ priority: number;
1208
+ conditions: {
1209
+ value: string | number | boolean | string[];
1210
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1211
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1212
+ caseInsensitive?: boolean | undefined;
1213
+ }[];
1214
+ message?: string | undefined;
1215
+ metadata?: {
1216
+ createdAt?: string | undefined;
1217
+ updatedAt?: string | undefined;
1218
+ createdBy?: string | undefined;
1219
+ } | undefined;
1220
+ description?: string | undefined;
1221
+ redirectUrl?: string | undefined;
1222
+ }, {
1223
+ name: string;
1224
+ id: string;
1225
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1226
+ conditions: {
1227
+ value: string | number | boolean | string[];
1228
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1229
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1230
+ caseInsensitive?: boolean | undefined;
1231
+ }[];
1232
+ message?: string | undefined;
1233
+ metadata?: {
1234
+ createdAt?: string | undefined;
1235
+ updatedAt?: string | undefined;
1236
+ createdBy?: string | undefined;
1237
+ } | undefined;
1238
+ enabled?: boolean | undefined;
1239
+ description?: string | undefined;
1240
+ priority?: number | undefined;
1241
+ redirectUrl?: string | undefined;
1242
+ }>, "many">>>;
1243
+ excludedPaths: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
1244
+ includedPaths: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
1245
+ metadata: z.ZodOptional<z.ZodOptional<z.ZodObject<{
1246
+ lastUpdated: z.ZodOptional<z.ZodString>;
1247
+ updatedBy: z.ZodOptional<z.ZodString>;
1248
+ policyId: z.ZodOptional<z.ZodString>;
1249
+ }, "strip", z.ZodTypeAny, {
1250
+ lastUpdated?: string | undefined;
1251
+ updatedBy?: string | undefined;
1252
+ policyId?: string | undefined;
1253
+ }, {
1254
+ lastUpdated?: string | undefined;
1255
+ updatedBy?: string | undefined;
1256
+ policyId?: string | undefined;
1257
+ }>>>;
1258
+ }, "strip", z.ZodTypeAny, {
1259
+ metadata?: {
1260
+ lastUpdated?: string | undefined;
1261
+ updatedBy?: string | undefined;
1262
+ policyId?: string | undefined;
1263
+ } | undefined;
1264
+ version?: string | undefined;
1265
+ enabled?: boolean | undefined;
1266
+ redirectUrl?: string | undefined;
1267
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1268
+ thresholds?: {
1269
+ confidenceThreshold: number;
1270
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
1271
+ minReputationScore: number;
1272
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
1273
+ trustedReputationThreshold: number;
1274
+ trustSignedRequests: boolean;
1275
+ } | undefined;
1276
+ denyList?: {
1277
+ active: boolean;
1278
+ agentDid?: string | undefined;
1279
+ clientDid?: string | undefined;
1280
+ expiresAt?: string | undefined;
1281
+ reason?: string | undefined;
1282
+ clientName?: string | undefined;
1283
+ agentType?: string | undefined;
1284
+ blockedAt?: string | undefined;
1285
+ addedBy?: string | undefined;
1286
+ }[] | undefined;
1287
+ allowList?: {
1288
+ agentDid?: string | undefined;
1289
+ clientDid?: string | undefined;
1290
+ reason?: string | undefined;
1291
+ clientName?: string | undefined;
1292
+ agentType?: string | undefined;
1293
+ addedBy?: string | undefined;
1294
+ addedAt?: string | undefined;
1295
+ }[] | undefined;
1296
+ rules?: {
1297
+ name: string;
1298
+ id: string;
1299
+ enabled: boolean;
1300
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1301
+ priority: number;
1302
+ conditions: {
1303
+ value: string | number | boolean | string[];
1304
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1305
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1306
+ caseInsensitive?: boolean | undefined;
1307
+ }[];
1308
+ message?: string | undefined;
1309
+ metadata?: {
1310
+ createdAt?: string | undefined;
1311
+ updatedAt?: string | undefined;
1312
+ createdBy?: string | undefined;
1313
+ } | undefined;
1314
+ description?: string | undefined;
1315
+ redirectUrl?: string | undefined;
1316
+ }[] | undefined;
1317
+ excludedPaths?: string[] | undefined;
1318
+ includedPaths?: string[] | undefined;
1319
+ }, {
1320
+ metadata?: {
1321
+ lastUpdated?: string | undefined;
1322
+ updatedBy?: string | undefined;
1323
+ policyId?: string | undefined;
1324
+ } | undefined;
1325
+ version?: string | undefined;
1326
+ enabled?: boolean | undefined;
1327
+ redirectUrl?: string | undefined;
1328
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1329
+ thresholds?: {
1330
+ confidenceThreshold?: number | undefined;
1331
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1332
+ minReputationScore?: number | undefined;
1333
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1334
+ trustedReputationThreshold?: number | undefined;
1335
+ trustSignedRequests?: boolean | undefined;
1336
+ } | undefined;
1337
+ denyList?: {
1338
+ agentDid?: string | undefined;
1339
+ clientDid?: string | undefined;
1340
+ expiresAt?: string | undefined;
1341
+ reason?: string | undefined;
1342
+ active?: boolean | undefined;
1343
+ clientName?: string | undefined;
1344
+ agentType?: string | undefined;
1345
+ blockedAt?: string | undefined;
1346
+ addedBy?: string | undefined;
1347
+ }[] | undefined;
1348
+ allowList?: {
1349
+ agentDid?: string | undefined;
1350
+ clientDid?: string | undefined;
1351
+ reason?: string | undefined;
1352
+ clientName?: string | undefined;
1353
+ agentType?: string | undefined;
1354
+ addedBy?: string | undefined;
1355
+ addedAt?: string | undefined;
1356
+ }[] | undefined;
1357
+ rules?: {
1358
+ name: string;
1359
+ id: string;
1360
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1361
+ conditions: {
1362
+ value: string | number | boolean | string[];
1363
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1364
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1365
+ caseInsensitive?: boolean | undefined;
1366
+ }[];
1367
+ message?: string | undefined;
1368
+ metadata?: {
1369
+ createdAt?: string | undefined;
1370
+ updatedAt?: string | undefined;
1371
+ createdBy?: string | undefined;
1372
+ } | undefined;
1373
+ enabled?: boolean | undefined;
1374
+ description?: string | undefined;
1375
+ priority?: number | undefined;
1376
+ redirectUrl?: string | undefined;
1377
+ }[] | undefined;
1378
+ excludedPaths?: string[] | undefined;
1379
+ includedPaths?: string[] | undefined;
1380
+ }>;
1381
+ export type PolicyConfig = z.infer<typeof PolicyConfigSchema>;
1382
+ export type PolicyConfigPartial = z.infer<typeof PolicyConfigPartialSchema>;
1383
+ /**
1384
+ * Request to get policy configuration
1385
+ */
1386
+ export declare const GetPolicyRequestSchema: z.ZodObject<{
1387
+ projectId: z.ZodString;
1388
+ }, "strip", z.ZodTypeAny, {
1389
+ projectId: string;
1390
+ }, {
1391
+ projectId: string;
1392
+ }>;
1393
+ export type GetPolicyRequest = z.infer<typeof GetPolicyRequestSchema>;
1394
+ /**
1395
+ * Response with policy configuration
1396
+ */
1397
+ export declare const GetPolicyResponseSchema: z.ZodObject<{
1398
+ success: z.ZodBoolean;
1399
+ data: z.ZodObject<{
1400
+ policy: z.ZodEffects<z.ZodObject<{
1401
+ /** Schema version for migrations */
1402
+ version: z.ZodDefault<z.ZodString>;
1403
+ /** Whether policy enforcement is enabled */
1404
+ enabled: z.ZodDefault<z.ZodBoolean>;
1405
+ /** Default action when no rules match */
1406
+ defaultAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
1407
+ /** Default redirect URL for redirect actions */
1408
+ redirectUrl: z.ZodOptional<z.ZodString>;
1409
+ /** Threshold-based enforcement settings */
1410
+ thresholds: z.ZodDefault<z.ZodObject<{
1411
+ /**
1412
+ * Detection confidence threshold (0-100)
1413
+ * Agents detected with confidence >= this value trigger the configured action
1414
+ * @default 80
1415
+ */
1416
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
1417
+ /**
1418
+ * Action to take when confidence threshold is exceeded
1419
+ * @default 'block'
1420
+ */
1421
+ confidenceAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
1422
+ /**
1423
+ * Minimum reputation score (0-100) required to allow access
1424
+ * Agents with reputation < this value may be blocked/challenged
1425
+ * Set to 0 to disable reputation-based enforcement
1426
+ * @default 0
1427
+ */
1428
+ minReputationScore: z.ZodDefault<z.ZodNumber>;
1429
+ /**
1430
+ * Action to take when reputation is below threshold
1431
+ * @default 'challenge'
1432
+ */
1433
+ lowReputationAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
1434
+ /**
1435
+ * High reputation score threshold (0-100)
1436
+ * Agents with reputation >= this value are trusted and bypass other checks
1437
+ * @default 90
1438
+ */
1439
+ trustedReputationThreshold: z.ZodDefault<z.ZodNumber>;
1440
+ /**
1441
+ * Whether cryptographically signed requests (MCP-I verified) bypass thresholds
1442
+ * @default true
1443
+ */
1444
+ trustSignedRequests: z.ZodDefault<z.ZodBoolean>;
1445
+ }, "strip", z.ZodTypeAny, {
1446
+ confidenceThreshold: number;
1447
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
1448
+ minReputationScore: number;
1449
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
1450
+ trustedReputationThreshold: number;
1451
+ trustSignedRequests: boolean;
1452
+ }, {
1453
+ confidenceThreshold?: number | undefined;
1454
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1455
+ minReputationScore?: number | undefined;
1456
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1457
+ trustedReputationThreshold?: number | undefined;
1458
+ trustSignedRequests?: boolean | undefined;
1459
+ }>>;
1460
+ /** Deny list entries (checked after allow list, before rules) */
1461
+ denyList: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1462
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
1463
+ clientDid: z.ZodOptional<z.ZodString>;
1464
+ /** Agent DID from MCP-I identity */
1465
+ agentDid: z.ZodOptional<z.ZodString>;
1466
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
1467
+ clientName: z.ZodOptional<z.ZodString>;
1468
+ /** Agent type to block (e.g., "ai_agent", "bot", "scraper") */
1469
+ agentType: z.ZodOptional<z.ZodString>;
1470
+ /** Reason for denial (shown to user/logged) */
1471
+ reason: z.ZodOptional<z.ZodString>;
1472
+ /** ISO 8601 timestamp when entry was added */
1473
+ blockedAt: z.ZodOptional<z.ZodString>;
1474
+ /** Who added this entry (user ID or "system") */
1475
+ addedBy: z.ZodOptional<z.ZodString>;
1476
+ /** Whether this entry is currently active */
1477
+ active: z.ZodDefault<z.ZodBoolean>;
1478
+ /** Optional expiration date for temporary blocks */
1479
+ expiresAt: z.ZodOptional<z.ZodString>;
1480
+ }, "strip", z.ZodTypeAny, {
1481
+ active: boolean;
1482
+ agentDid?: string | undefined;
1483
+ clientDid?: string | undefined;
1484
+ expiresAt?: string | undefined;
1485
+ reason?: string | undefined;
1486
+ clientName?: string | undefined;
1487
+ agentType?: string | undefined;
1488
+ blockedAt?: string | undefined;
1489
+ addedBy?: string | undefined;
1490
+ }, {
1491
+ agentDid?: string | undefined;
1492
+ clientDid?: string | undefined;
1493
+ expiresAt?: string | undefined;
1494
+ reason?: string | undefined;
1495
+ active?: boolean | undefined;
1496
+ clientName?: string | undefined;
1497
+ agentType?: string | undefined;
1498
+ blockedAt?: string | undefined;
1499
+ addedBy?: string | undefined;
1500
+ }>, {
1501
+ active: boolean;
1502
+ agentDid?: string | undefined;
1503
+ clientDid?: string | undefined;
1504
+ expiresAt?: string | undefined;
1505
+ reason?: string | undefined;
1506
+ clientName?: string | undefined;
1507
+ agentType?: string | undefined;
1508
+ blockedAt?: string | undefined;
1509
+ addedBy?: string | undefined;
1510
+ }, {
1511
+ agentDid?: string | undefined;
1512
+ clientDid?: string | undefined;
1513
+ expiresAt?: string | undefined;
1514
+ reason?: string | undefined;
1515
+ active?: boolean | undefined;
1516
+ clientName?: string | undefined;
1517
+ agentType?: string | undefined;
1518
+ blockedAt?: string | undefined;
1519
+ addedBy?: string | undefined;
1520
+ }>, "many">>;
1521
+ /** Allow list entries (exempt from all checks) */
1522
+ allowList: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1523
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
1524
+ clientDid: z.ZodOptional<z.ZodString>;
1525
+ /** Agent DID from MCP-I identity */
1526
+ agentDid: z.ZodOptional<z.ZodString>;
1527
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
1528
+ clientName: z.ZodOptional<z.ZodString>;
1529
+ /** Agent type to allow (e.g., "ai_agent", "verified_bot") */
1530
+ agentType: z.ZodOptional<z.ZodString>;
1531
+ /** Reason for allowing (documentation) */
1532
+ reason: z.ZodOptional<z.ZodString>;
1533
+ /** ISO 8601 timestamp when entry was added */
1534
+ addedAt: z.ZodOptional<z.ZodString>;
1535
+ /** Who added this entry */
1536
+ addedBy: z.ZodOptional<z.ZodString>;
1537
+ }, "strip", z.ZodTypeAny, {
1538
+ agentDid?: string | undefined;
1539
+ clientDid?: string | undefined;
1540
+ reason?: string | undefined;
1541
+ clientName?: string | undefined;
1542
+ agentType?: string | undefined;
1543
+ addedBy?: string | undefined;
1544
+ addedAt?: string | undefined;
1545
+ }, {
1546
+ agentDid?: string | undefined;
1547
+ clientDid?: string | undefined;
1548
+ reason?: string | undefined;
1549
+ clientName?: string | undefined;
1550
+ agentType?: string | undefined;
1551
+ addedBy?: string | undefined;
1552
+ addedAt?: string | undefined;
1553
+ }>, {
1554
+ agentDid?: string | undefined;
1555
+ clientDid?: string | undefined;
1556
+ reason?: string | undefined;
1557
+ clientName?: string | undefined;
1558
+ agentType?: string | undefined;
1559
+ addedBy?: string | undefined;
1560
+ addedAt?: string | undefined;
1561
+ }, {
1562
+ agentDid?: string | undefined;
1563
+ clientDid?: string | undefined;
1564
+ reason?: string | undefined;
1565
+ clientName?: string | undefined;
1566
+ agentType?: string | undefined;
1567
+ addedBy?: string | undefined;
1568
+ addedAt?: string | undefined;
1569
+ }>, "many">>;
1570
+ /** Custom policy rules (evaluated by priority after threshold checks) */
1571
+ rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
1572
+ /** Unique identifier for this rule */
1573
+ id: z.ZodString;
1574
+ /** Human-readable name */
1575
+ name: z.ZodString;
1576
+ /** Description of what this rule does */
1577
+ description: z.ZodOptional<z.ZodString>;
1578
+ /** Priority (lower = higher priority, evaluated first) */
1579
+ priority: z.ZodDefault<z.ZodNumber>;
1580
+ /**
1581
+ * Conditions that must ALL match for this rule to apply (AND logic)
1582
+ * For OR logic, create multiple rules with same action
1583
+ */
1584
+ conditions: z.ZodArray<z.ZodObject<{
1585
+ /** Field to match against */
1586
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
1587
+ /** Comparison operator */
1588
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
1589
+ /** Value to compare against */
1590
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
1591
+ /** Whether this condition is case-insensitive (for string comparisons) */
1592
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
1593
+ }, "strip", z.ZodTypeAny, {
1594
+ value: string | number | boolean | string[];
1595
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1596
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1597
+ caseInsensitive?: boolean | undefined;
1598
+ }, {
1599
+ value: string | number | boolean | string[];
1600
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1601
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1602
+ caseInsensitive?: boolean | undefined;
1603
+ }>, "many">;
1604
+ /** Action to take when conditions match */
1605
+ action: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
1606
+ /** Redirect URL (required if action is 'redirect') */
1607
+ redirectUrl: z.ZodOptional<z.ZodString>;
1608
+ /** Custom message to show/log */
1609
+ message: z.ZodOptional<z.ZodString>;
1610
+ /** Whether this rule is currently active */
1611
+ enabled: z.ZodDefault<z.ZodBoolean>;
1612
+ /** Metadata for auditing */
1613
+ metadata: z.ZodOptional<z.ZodObject<{
1614
+ createdAt: z.ZodOptional<z.ZodString>;
1615
+ updatedAt: z.ZodOptional<z.ZodString>;
1616
+ createdBy: z.ZodOptional<z.ZodString>;
1617
+ }, "strip", z.ZodTypeAny, {
1618
+ createdAt?: string | undefined;
1619
+ updatedAt?: string | undefined;
1620
+ createdBy?: string | undefined;
1621
+ }, {
1622
+ createdAt?: string | undefined;
1623
+ updatedAt?: string | undefined;
1624
+ createdBy?: string | undefined;
1625
+ }>>;
1626
+ }, "strip", z.ZodTypeAny, {
1627
+ name: string;
1628
+ id: string;
1629
+ enabled: boolean;
1630
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1631
+ priority: number;
1632
+ conditions: {
1633
+ value: string | number | boolean | string[];
1634
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1635
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1636
+ caseInsensitive?: boolean | undefined;
1637
+ }[];
1638
+ message?: string | undefined;
1639
+ metadata?: {
1640
+ createdAt?: string | undefined;
1641
+ updatedAt?: string | undefined;
1642
+ createdBy?: string | undefined;
1643
+ } | undefined;
1644
+ description?: string | undefined;
1645
+ redirectUrl?: string | undefined;
1646
+ }, {
1647
+ name: string;
1648
+ id: string;
1649
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1650
+ conditions: {
1651
+ value: string | number | boolean | string[];
1652
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1653
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1654
+ caseInsensitive?: boolean | undefined;
1655
+ }[];
1656
+ message?: string | undefined;
1657
+ metadata?: {
1658
+ createdAt?: string | undefined;
1659
+ updatedAt?: string | undefined;
1660
+ createdBy?: string | undefined;
1661
+ } | undefined;
1662
+ enabled?: boolean | undefined;
1663
+ description?: string | undefined;
1664
+ priority?: number | undefined;
1665
+ redirectUrl?: string | undefined;
1666
+ }>, {
1667
+ name: string;
1668
+ id: string;
1669
+ enabled: boolean;
1670
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1671
+ priority: number;
1672
+ conditions: {
1673
+ value: string | number | boolean | string[];
1674
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1675
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1676
+ caseInsensitive?: boolean | undefined;
1677
+ }[];
1678
+ message?: string | undefined;
1679
+ metadata?: {
1680
+ createdAt?: string | undefined;
1681
+ updatedAt?: string | undefined;
1682
+ createdBy?: string | undefined;
1683
+ } | undefined;
1684
+ description?: string | undefined;
1685
+ redirectUrl?: string | undefined;
1686
+ }, {
1687
+ name: string;
1688
+ id: string;
1689
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1690
+ conditions: {
1691
+ value: string | number | boolean | string[];
1692
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1693
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1694
+ caseInsensitive?: boolean | undefined;
1695
+ }[];
1696
+ message?: string | undefined;
1697
+ metadata?: {
1698
+ createdAt?: string | undefined;
1699
+ updatedAt?: string | undefined;
1700
+ createdBy?: string | undefined;
1701
+ } | undefined;
1702
+ enabled?: boolean | undefined;
1703
+ description?: string | undefined;
1704
+ priority?: number | undefined;
1705
+ redirectUrl?: string | undefined;
1706
+ }>, "many">>;
1707
+ /** Paths to exclude from policy enforcement (glob patterns supported) */
1708
+ excludedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1709
+ /** Paths to include (if set, only these paths are enforced) */
1710
+ includedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1711
+ /** Metadata for the policy configuration */
1712
+ metadata: z.ZodOptional<z.ZodObject<{
1713
+ lastUpdated: z.ZodOptional<z.ZodString>;
1714
+ updatedBy: z.ZodOptional<z.ZodString>;
1715
+ policyId: z.ZodOptional<z.ZodString>;
1716
+ }, "strip", z.ZodTypeAny, {
1717
+ lastUpdated?: string | undefined;
1718
+ updatedBy?: string | undefined;
1719
+ policyId?: string | undefined;
1720
+ }, {
1721
+ lastUpdated?: string | undefined;
1722
+ updatedBy?: string | undefined;
1723
+ policyId?: string | undefined;
1724
+ }>>;
1725
+ }, "strip", z.ZodTypeAny, {
1726
+ version: string;
1727
+ enabled: boolean;
1728
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
1729
+ thresholds: {
1730
+ confidenceThreshold: number;
1731
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
1732
+ minReputationScore: number;
1733
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
1734
+ trustedReputationThreshold: number;
1735
+ trustSignedRequests: boolean;
1736
+ };
1737
+ denyList: {
1738
+ active: boolean;
1739
+ agentDid?: string | undefined;
1740
+ clientDid?: string | undefined;
1741
+ expiresAt?: string | undefined;
1742
+ reason?: string | undefined;
1743
+ clientName?: string | undefined;
1744
+ agentType?: string | undefined;
1745
+ blockedAt?: string | undefined;
1746
+ addedBy?: string | undefined;
1747
+ }[];
1748
+ allowList: {
1749
+ agentDid?: string | undefined;
1750
+ clientDid?: string | undefined;
1751
+ reason?: string | undefined;
1752
+ clientName?: string | undefined;
1753
+ agentType?: string | undefined;
1754
+ addedBy?: string | undefined;
1755
+ addedAt?: string | undefined;
1756
+ }[];
1757
+ rules: {
1758
+ name: string;
1759
+ id: string;
1760
+ enabled: boolean;
1761
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1762
+ priority: number;
1763
+ conditions: {
1764
+ value: string | number | boolean | string[];
1765
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1766
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1767
+ caseInsensitive?: boolean | undefined;
1768
+ }[];
1769
+ message?: string | undefined;
1770
+ metadata?: {
1771
+ createdAt?: string | undefined;
1772
+ updatedAt?: string | undefined;
1773
+ createdBy?: string | undefined;
1774
+ } | undefined;
1775
+ description?: string | undefined;
1776
+ redirectUrl?: string | undefined;
1777
+ }[];
1778
+ excludedPaths: string[];
1779
+ metadata?: {
1780
+ lastUpdated?: string | undefined;
1781
+ updatedBy?: string | undefined;
1782
+ policyId?: string | undefined;
1783
+ } | undefined;
1784
+ redirectUrl?: string | undefined;
1785
+ includedPaths?: string[] | undefined;
1786
+ }, {
1787
+ metadata?: {
1788
+ lastUpdated?: string | undefined;
1789
+ updatedBy?: string | undefined;
1790
+ policyId?: string | undefined;
1791
+ } | undefined;
1792
+ version?: string | undefined;
1793
+ enabled?: boolean | undefined;
1794
+ redirectUrl?: string | undefined;
1795
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1796
+ thresholds?: {
1797
+ confidenceThreshold?: number | undefined;
1798
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1799
+ minReputationScore?: number | undefined;
1800
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1801
+ trustedReputationThreshold?: number | undefined;
1802
+ trustSignedRequests?: boolean | undefined;
1803
+ } | undefined;
1804
+ denyList?: {
1805
+ agentDid?: string | undefined;
1806
+ clientDid?: string | undefined;
1807
+ expiresAt?: string | undefined;
1808
+ reason?: string | undefined;
1809
+ active?: boolean | undefined;
1810
+ clientName?: string | undefined;
1811
+ agentType?: string | undefined;
1812
+ blockedAt?: string | undefined;
1813
+ addedBy?: string | undefined;
1814
+ }[] | undefined;
1815
+ allowList?: {
1816
+ agentDid?: string | undefined;
1817
+ clientDid?: string | undefined;
1818
+ reason?: string | undefined;
1819
+ clientName?: string | undefined;
1820
+ agentType?: string | undefined;
1821
+ addedBy?: string | undefined;
1822
+ addedAt?: string | undefined;
1823
+ }[] | undefined;
1824
+ rules?: {
1825
+ name: string;
1826
+ id: string;
1827
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1828
+ conditions: {
1829
+ value: string | number | boolean | string[];
1830
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1831
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1832
+ caseInsensitive?: boolean | undefined;
1833
+ }[];
1834
+ message?: string | undefined;
1835
+ metadata?: {
1836
+ createdAt?: string | undefined;
1837
+ updatedAt?: string | undefined;
1838
+ createdBy?: string | undefined;
1839
+ } | undefined;
1840
+ enabled?: boolean | undefined;
1841
+ description?: string | undefined;
1842
+ priority?: number | undefined;
1843
+ redirectUrl?: string | undefined;
1844
+ }[] | undefined;
1845
+ excludedPaths?: string[] | undefined;
1846
+ includedPaths?: string[] | undefined;
1847
+ }>, {
1848
+ version: string;
1849
+ enabled: boolean;
1850
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
1851
+ thresholds: {
1852
+ confidenceThreshold: number;
1853
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
1854
+ minReputationScore: number;
1855
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
1856
+ trustedReputationThreshold: number;
1857
+ trustSignedRequests: boolean;
1858
+ };
1859
+ denyList: {
1860
+ active: boolean;
1861
+ agentDid?: string | undefined;
1862
+ clientDid?: string | undefined;
1863
+ expiresAt?: string | undefined;
1864
+ reason?: string | undefined;
1865
+ clientName?: string | undefined;
1866
+ agentType?: string | undefined;
1867
+ blockedAt?: string | undefined;
1868
+ addedBy?: string | undefined;
1869
+ }[];
1870
+ allowList: {
1871
+ agentDid?: string | undefined;
1872
+ clientDid?: string | undefined;
1873
+ reason?: string | undefined;
1874
+ clientName?: string | undefined;
1875
+ agentType?: string | undefined;
1876
+ addedBy?: string | undefined;
1877
+ addedAt?: string | undefined;
1878
+ }[];
1879
+ rules: {
1880
+ name: string;
1881
+ id: string;
1882
+ enabled: boolean;
1883
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1884
+ priority: number;
1885
+ conditions: {
1886
+ value: string | number | boolean | string[];
1887
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1888
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1889
+ caseInsensitive?: boolean | undefined;
1890
+ }[];
1891
+ message?: string | undefined;
1892
+ metadata?: {
1893
+ createdAt?: string | undefined;
1894
+ updatedAt?: string | undefined;
1895
+ createdBy?: string | undefined;
1896
+ } | undefined;
1897
+ description?: string | undefined;
1898
+ redirectUrl?: string | undefined;
1899
+ }[];
1900
+ excludedPaths: string[];
1901
+ metadata?: {
1902
+ lastUpdated?: string | undefined;
1903
+ updatedBy?: string | undefined;
1904
+ policyId?: string | undefined;
1905
+ } | undefined;
1906
+ redirectUrl?: string | undefined;
1907
+ includedPaths?: string[] | undefined;
1908
+ }, {
1909
+ metadata?: {
1910
+ lastUpdated?: string | undefined;
1911
+ updatedBy?: string | undefined;
1912
+ policyId?: string | undefined;
1913
+ } | undefined;
1914
+ version?: string | undefined;
1915
+ enabled?: boolean | undefined;
1916
+ redirectUrl?: string | undefined;
1917
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1918
+ thresholds?: {
1919
+ confidenceThreshold?: number | undefined;
1920
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1921
+ minReputationScore?: number | undefined;
1922
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
1923
+ trustedReputationThreshold?: number | undefined;
1924
+ trustSignedRequests?: boolean | undefined;
1925
+ } | undefined;
1926
+ denyList?: {
1927
+ agentDid?: string | undefined;
1928
+ clientDid?: string | undefined;
1929
+ expiresAt?: string | undefined;
1930
+ reason?: string | undefined;
1931
+ active?: boolean | undefined;
1932
+ clientName?: string | undefined;
1933
+ agentType?: string | undefined;
1934
+ blockedAt?: string | undefined;
1935
+ addedBy?: string | undefined;
1936
+ }[] | undefined;
1937
+ allowList?: {
1938
+ agentDid?: string | undefined;
1939
+ clientDid?: string | undefined;
1940
+ reason?: string | undefined;
1941
+ clientName?: string | undefined;
1942
+ agentType?: string | undefined;
1943
+ addedBy?: string | undefined;
1944
+ addedAt?: string | undefined;
1945
+ }[] | undefined;
1946
+ rules?: {
1947
+ name: string;
1948
+ id: string;
1949
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
1950
+ conditions: {
1951
+ value: string | number | boolean | string[];
1952
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
1953
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
1954
+ caseInsensitive?: boolean | undefined;
1955
+ }[];
1956
+ message?: string | undefined;
1957
+ metadata?: {
1958
+ createdAt?: string | undefined;
1959
+ updatedAt?: string | undefined;
1960
+ createdBy?: string | undefined;
1961
+ } | undefined;
1962
+ enabled?: boolean | undefined;
1963
+ description?: string | undefined;
1964
+ priority?: number | undefined;
1965
+ redirectUrl?: string | undefined;
1966
+ }[] | undefined;
1967
+ excludedPaths?: string[] | undefined;
1968
+ includedPaths?: string[] | undefined;
1969
+ }>;
1970
+ }, "strip", z.ZodTypeAny, {
1971
+ policy: {
1972
+ version: string;
1973
+ enabled: boolean;
1974
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
1975
+ thresholds: {
1976
+ confidenceThreshold: number;
1977
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
1978
+ minReputationScore: number;
1979
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
1980
+ trustedReputationThreshold: number;
1981
+ trustSignedRequests: boolean;
1982
+ };
1983
+ denyList: {
1984
+ active: boolean;
1985
+ agentDid?: string | undefined;
1986
+ clientDid?: string | undefined;
1987
+ expiresAt?: string | undefined;
1988
+ reason?: string | undefined;
1989
+ clientName?: string | undefined;
1990
+ agentType?: string | undefined;
1991
+ blockedAt?: string | undefined;
1992
+ addedBy?: string | undefined;
1993
+ }[];
1994
+ allowList: {
1995
+ agentDid?: string | undefined;
1996
+ clientDid?: string | undefined;
1997
+ reason?: string | undefined;
1998
+ clientName?: string | undefined;
1999
+ agentType?: string | undefined;
2000
+ addedBy?: string | undefined;
2001
+ addedAt?: string | undefined;
2002
+ }[];
2003
+ rules: {
2004
+ name: string;
2005
+ id: string;
2006
+ enabled: boolean;
2007
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2008
+ priority: number;
2009
+ conditions: {
2010
+ value: string | number | boolean | string[];
2011
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2012
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2013
+ caseInsensitive?: boolean | undefined;
2014
+ }[];
2015
+ message?: string | undefined;
2016
+ metadata?: {
2017
+ createdAt?: string | undefined;
2018
+ updatedAt?: string | undefined;
2019
+ createdBy?: string | undefined;
2020
+ } | undefined;
2021
+ description?: string | undefined;
2022
+ redirectUrl?: string | undefined;
2023
+ }[];
2024
+ excludedPaths: string[];
2025
+ metadata?: {
2026
+ lastUpdated?: string | undefined;
2027
+ updatedBy?: string | undefined;
2028
+ policyId?: string | undefined;
2029
+ } | undefined;
2030
+ redirectUrl?: string | undefined;
2031
+ includedPaths?: string[] | undefined;
2032
+ };
2033
+ }, {
2034
+ policy: {
2035
+ metadata?: {
2036
+ lastUpdated?: string | undefined;
2037
+ updatedBy?: string | undefined;
2038
+ policyId?: string | undefined;
2039
+ } | undefined;
2040
+ version?: string | undefined;
2041
+ enabled?: boolean | undefined;
2042
+ redirectUrl?: string | undefined;
2043
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2044
+ thresholds?: {
2045
+ confidenceThreshold?: number | undefined;
2046
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2047
+ minReputationScore?: number | undefined;
2048
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2049
+ trustedReputationThreshold?: number | undefined;
2050
+ trustSignedRequests?: boolean | undefined;
2051
+ } | undefined;
2052
+ denyList?: {
2053
+ agentDid?: string | undefined;
2054
+ clientDid?: string | undefined;
2055
+ expiresAt?: string | undefined;
2056
+ reason?: string | undefined;
2057
+ active?: boolean | undefined;
2058
+ clientName?: string | undefined;
2059
+ agentType?: string | undefined;
2060
+ blockedAt?: string | undefined;
2061
+ addedBy?: string | undefined;
2062
+ }[] | undefined;
2063
+ allowList?: {
2064
+ agentDid?: string | undefined;
2065
+ clientDid?: string | undefined;
2066
+ reason?: string | undefined;
2067
+ clientName?: string | undefined;
2068
+ agentType?: string | undefined;
2069
+ addedBy?: string | undefined;
2070
+ addedAt?: string | undefined;
2071
+ }[] | undefined;
2072
+ rules?: {
2073
+ name: string;
2074
+ id: string;
2075
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2076
+ conditions: {
2077
+ value: string | number | boolean | string[];
2078
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2079
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2080
+ caseInsensitive?: boolean | undefined;
2081
+ }[];
2082
+ message?: string | undefined;
2083
+ metadata?: {
2084
+ createdAt?: string | undefined;
2085
+ updatedAt?: string | undefined;
2086
+ createdBy?: string | undefined;
2087
+ } | undefined;
2088
+ enabled?: boolean | undefined;
2089
+ description?: string | undefined;
2090
+ priority?: number | undefined;
2091
+ redirectUrl?: string | undefined;
2092
+ }[] | undefined;
2093
+ excludedPaths?: string[] | undefined;
2094
+ includedPaths?: string[] | undefined;
2095
+ };
2096
+ }>;
2097
+ metadata: z.ZodOptional<z.ZodObject<{
2098
+ requestId: z.ZodOptional<z.ZodString>;
2099
+ timestamp: z.ZodOptional<z.ZodString>;
2100
+ cachedUntil: z.ZodOptional<z.ZodString>;
2101
+ }, "strip", z.ZodTypeAny, {
2102
+ timestamp?: string | undefined;
2103
+ requestId?: string | undefined;
2104
+ cachedUntil?: string | undefined;
2105
+ }, {
2106
+ timestamp?: string | undefined;
2107
+ requestId?: string | undefined;
2108
+ cachedUntil?: string | undefined;
2109
+ }>>;
2110
+ }, "strip", z.ZodTypeAny, {
2111
+ success: boolean;
2112
+ data: {
2113
+ policy: {
2114
+ version: string;
2115
+ enabled: boolean;
2116
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
2117
+ thresholds: {
2118
+ confidenceThreshold: number;
2119
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
2120
+ minReputationScore: number;
2121
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
2122
+ trustedReputationThreshold: number;
2123
+ trustSignedRequests: boolean;
2124
+ };
2125
+ denyList: {
2126
+ active: boolean;
2127
+ agentDid?: string | undefined;
2128
+ clientDid?: string | undefined;
2129
+ expiresAt?: string | undefined;
2130
+ reason?: string | undefined;
2131
+ clientName?: string | undefined;
2132
+ agentType?: string | undefined;
2133
+ blockedAt?: string | undefined;
2134
+ addedBy?: string | undefined;
2135
+ }[];
2136
+ allowList: {
2137
+ agentDid?: string | undefined;
2138
+ clientDid?: string | undefined;
2139
+ reason?: string | undefined;
2140
+ clientName?: string | undefined;
2141
+ agentType?: string | undefined;
2142
+ addedBy?: string | undefined;
2143
+ addedAt?: string | undefined;
2144
+ }[];
2145
+ rules: {
2146
+ name: string;
2147
+ id: string;
2148
+ enabled: boolean;
2149
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2150
+ priority: number;
2151
+ conditions: {
2152
+ value: string | number | boolean | string[];
2153
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2154
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2155
+ caseInsensitive?: boolean | undefined;
2156
+ }[];
2157
+ message?: string | undefined;
2158
+ metadata?: {
2159
+ createdAt?: string | undefined;
2160
+ updatedAt?: string | undefined;
2161
+ createdBy?: string | undefined;
2162
+ } | undefined;
2163
+ description?: string | undefined;
2164
+ redirectUrl?: string | undefined;
2165
+ }[];
2166
+ excludedPaths: string[];
2167
+ metadata?: {
2168
+ lastUpdated?: string | undefined;
2169
+ updatedBy?: string | undefined;
2170
+ policyId?: string | undefined;
2171
+ } | undefined;
2172
+ redirectUrl?: string | undefined;
2173
+ includedPaths?: string[] | undefined;
2174
+ };
2175
+ };
2176
+ metadata?: {
2177
+ timestamp?: string | undefined;
2178
+ requestId?: string | undefined;
2179
+ cachedUntil?: string | undefined;
2180
+ } | undefined;
2181
+ }, {
2182
+ success: boolean;
2183
+ data: {
2184
+ policy: {
2185
+ metadata?: {
2186
+ lastUpdated?: string | undefined;
2187
+ updatedBy?: string | undefined;
2188
+ policyId?: string | undefined;
2189
+ } | undefined;
2190
+ version?: string | undefined;
2191
+ enabled?: boolean | undefined;
2192
+ redirectUrl?: string | undefined;
2193
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2194
+ thresholds?: {
2195
+ confidenceThreshold?: number | undefined;
2196
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2197
+ minReputationScore?: number | undefined;
2198
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2199
+ trustedReputationThreshold?: number | undefined;
2200
+ trustSignedRequests?: boolean | undefined;
2201
+ } | undefined;
2202
+ denyList?: {
2203
+ agentDid?: string | undefined;
2204
+ clientDid?: string | undefined;
2205
+ expiresAt?: string | undefined;
2206
+ reason?: string | undefined;
2207
+ active?: boolean | undefined;
2208
+ clientName?: string | undefined;
2209
+ agentType?: string | undefined;
2210
+ blockedAt?: string | undefined;
2211
+ addedBy?: string | undefined;
2212
+ }[] | undefined;
2213
+ allowList?: {
2214
+ agentDid?: string | undefined;
2215
+ clientDid?: string | undefined;
2216
+ reason?: string | undefined;
2217
+ clientName?: string | undefined;
2218
+ agentType?: string | undefined;
2219
+ addedBy?: string | undefined;
2220
+ addedAt?: string | undefined;
2221
+ }[] | undefined;
2222
+ rules?: {
2223
+ name: string;
2224
+ id: string;
2225
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2226
+ conditions: {
2227
+ value: string | number | boolean | string[];
2228
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2229
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2230
+ caseInsensitive?: boolean | undefined;
2231
+ }[];
2232
+ message?: string | undefined;
2233
+ metadata?: {
2234
+ createdAt?: string | undefined;
2235
+ updatedAt?: string | undefined;
2236
+ createdBy?: string | undefined;
2237
+ } | undefined;
2238
+ enabled?: boolean | undefined;
2239
+ description?: string | undefined;
2240
+ priority?: number | undefined;
2241
+ redirectUrl?: string | undefined;
2242
+ }[] | undefined;
2243
+ excludedPaths?: string[] | undefined;
2244
+ includedPaths?: string[] | undefined;
2245
+ };
2246
+ };
2247
+ metadata?: {
2248
+ timestamp?: string | undefined;
2249
+ requestId?: string | undefined;
2250
+ cachedUntil?: string | undefined;
2251
+ } | undefined;
2252
+ }>;
2253
+ export type GetPolicyResponse = z.infer<typeof GetPolicyResponseSchema>;
2254
+ /**
2255
+ * Request to update policy configuration
2256
+ */
2257
+ export declare const UpdatePolicyRequestSchema: z.ZodObject<{
2258
+ projectId: z.ZodString;
2259
+ policy: z.ZodObject<{
2260
+ version: z.ZodOptional<z.ZodDefault<z.ZodString>>;
2261
+ enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
2262
+ defaultAction: z.ZodOptional<z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>>;
2263
+ redirectUrl: z.ZodOptional<z.ZodOptional<z.ZodString>>;
2264
+ thresholds: z.ZodOptional<z.ZodDefault<z.ZodObject<{
2265
+ /**
2266
+ * Detection confidence threshold (0-100)
2267
+ * Agents detected with confidence >= this value trigger the configured action
2268
+ * @default 80
2269
+ */
2270
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
2271
+ /**
2272
+ * Action to take when confidence threshold is exceeded
2273
+ * @default 'block'
2274
+ */
2275
+ confidenceAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
2276
+ /**
2277
+ * Minimum reputation score (0-100) required to allow access
2278
+ * Agents with reputation < this value may be blocked/challenged
2279
+ * Set to 0 to disable reputation-based enforcement
2280
+ * @default 0
2281
+ */
2282
+ minReputationScore: z.ZodDefault<z.ZodNumber>;
2283
+ /**
2284
+ * Action to take when reputation is below threshold
2285
+ * @default 'challenge'
2286
+ */
2287
+ lowReputationAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
2288
+ /**
2289
+ * High reputation score threshold (0-100)
2290
+ * Agents with reputation >= this value are trusted and bypass other checks
2291
+ * @default 90
2292
+ */
2293
+ trustedReputationThreshold: z.ZodDefault<z.ZodNumber>;
2294
+ /**
2295
+ * Whether cryptographically signed requests (MCP-I verified) bypass thresholds
2296
+ * @default true
2297
+ */
2298
+ trustSignedRequests: z.ZodDefault<z.ZodBoolean>;
2299
+ }, "strip", z.ZodTypeAny, {
2300
+ confidenceThreshold: number;
2301
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
2302
+ minReputationScore: number;
2303
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
2304
+ trustedReputationThreshold: number;
2305
+ trustSignedRequests: boolean;
2306
+ }, {
2307
+ confidenceThreshold?: number | undefined;
2308
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2309
+ minReputationScore?: number | undefined;
2310
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2311
+ trustedReputationThreshold?: number | undefined;
2312
+ trustSignedRequests?: boolean | undefined;
2313
+ }>>>;
2314
+ denyList: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
2315
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
2316
+ clientDid: z.ZodOptional<z.ZodString>;
2317
+ /** Agent DID from MCP-I identity */
2318
+ agentDid: z.ZodOptional<z.ZodString>;
2319
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
2320
+ clientName: z.ZodOptional<z.ZodString>;
2321
+ /** Agent type to block (e.g., "ai_agent", "bot", "scraper") */
2322
+ agentType: z.ZodOptional<z.ZodString>;
2323
+ /** Reason for denial (shown to user/logged) */
2324
+ reason: z.ZodOptional<z.ZodString>;
2325
+ /** ISO 8601 timestamp when entry was added */
2326
+ blockedAt: z.ZodOptional<z.ZodString>;
2327
+ /** Who added this entry (user ID or "system") */
2328
+ addedBy: z.ZodOptional<z.ZodString>;
2329
+ /** Whether this entry is currently active */
2330
+ active: z.ZodDefault<z.ZodBoolean>;
2331
+ /** Optional expiration date for temporary blocks */
2332
+ expiresAt: z.ZodOptional<z.ZodString>;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ active: boolean;
2335
+ agentDid?: string | undefined;
2336
+ clientDid?: string | undefined;
2337
+ expiresAt?: string | undefined;
2338
+ reason?: string | undefined;
2339
+ clientName?: string | undefined;
2340
+ agentType?: string | undefined;
2341
+ blockedAt?: string | undefined;
2342
+ addedBy?: string | undefined;
2343
+ }, {
2344
+ agentDid?: string | undefined;
2345
+ clientDid?: string | undefined;
2346
+ expiresAt?: string | undefined;
2347
+ reason?: string | undefined;
2348
+ active?: boolean | undefined;
2349
+ clientName?: string | undefined;
2350
+ agentType?: string | undefined;
2351
+ blockedAt?: string | undefined;
2352
+ addedBy?: string | undefined;
2353
+ }>, {
2354
+ active: boolean;
2355
+ agentDid?: string | undefined;
2356
+ clientDid?: string | undefined;
2357
+ expiresAt?: string | undefined;
2358
+ reason?: string | undefined;
2359
+ clientName?: string | undefined;
2360
+ agentType?: string | undefined;
2361
+ blockedAt?: string | undefined;
2362
+ addedBy?: string | undefined;
2363
+ }, {
2364
+ agentDid?: string | undefined;
2365
+ clientDid?: string | undefined;
2366
+ expiresAt?: string | undefined;
2367
+ reason?: string | undefined;
2368
+ active?: boolean | undefined;
2369
+ clientName?: string | undefined;
2370
+ agentType?: string | undefined;
2371
+ blockedAt?: string | undefined;
2372
+ addedBy?: string | undefined;
2373
+ }>, "many">>>;
2374
+ allowList: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
2375
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
2376
+ clientDid: z.ZodOptional<z.ZodString>;
2377
+ /** Agent DID from MCP-I identity */
2378
+ agentDid: z.ZodOptional<z.ZodString>;
2379
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
2380
+ clientName: z.ZodOptional<z.ZodString>;
2381
+ /** Agent type to allow (e.g., "ai_agent", "verified_bot") */
2382
+ agentType: z.ZodOptional<z.ZodString>;
2383
+ /** Reason for allowing (documentation) */
2384
+ reason: z.ZodOptional<z.ZodString>;
2385
+ /** ISO 8601 timestamp when entry was added */
2386
+ addedAt: z.ZodOptional<z.ZodString>;
2387
+ /** Who added this entry */
2388
+ addedBy: z.ZodOptional<z.ZodString>;
2389
+ }, "strip", z.ZodTypeAny, {
2390
+ agentDid?: string | undefined;
2391
+ clientDid?: string | undefined;
2392
+ reason?: string | undefined;
2393
+ clientName?: string | undefined;
2394
+ agentType?: string | undefined;
2395
+ addedBy?: string | undefined;
2396
+ addedAt?: string | undefined;
2397
+ }, {
2398
+ agentDid?: string | undefined;
2399
+ clientDid?: string | undefined;
2400
+ reason?: string | undefined;
2401
+ clientName?: string | undefined;
2402
+ agentType?: string | undefined;
2403
+ addedBy?: string | undefined;
2404
+ addedAt?: string | undefined;
2405
+ }>, {
2406
+ agentDid?: string | undefined;
2407
+ clientDid?: string | undefined;
2408
+ reason?: string | undefined;
2409
+ clientName?: string | undefined;
2410
+ agentType?: string | undefined;
2411
+ addedBy?: string | undefined;
2412
+ addedAt?: string | undefined;
2413
+ }, {
2414
+ agentDid?: string | undefined;
2415
+ clientDid?: string | undefined;
2416
+ reason?: string | undefined;
2417
+ clientName?: string | undefined;
2418
+ agentType?: string | undefined;
2419
+ addedBy?: string | undefined;
2420
+ addedAt?: string | undefined;
2421
+ }>, "many">>>;
2422
+ rules: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
2423
+ /** Unique identifier for this rule */
2424
+ id: z.ZodString;
2425
+ /** Human-readable name */
2426
+ name: z.ZodString;
2427
+ /** Description of what this rule does */
2428
+ description: z.ZodOptional<z.ZodString>;
2429
+ /** Priority (lower = higher priority, evaluated first) */
2430
+ priority: z.ZodDefault<z.ZodNumber>;
2431
+ /**
2432
+ * Conditions that must ALL match for this rule to apply (AND logic)
2433
+ * For OR logic, create multiple rules with same action
2434
+ */
2435
+ conditions: z.ZodArray<z.ZodObject<{
2436
+ /** Field to match against */
2437
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
2438
+ /** Comparison operator */
2439
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
2440
+ /** Value to compare against */
2441
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
2442
+ /** Whether this condition is case-insensitive (for string comparisons) */
2443
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
2444
+ }, "strip", z.ZodTypeAny, {
2445
+ value: string | number | boolean | string[];
2446
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2447
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2448
+ caseInsensitive?: boolean | undefined;
2449
+ }, {
2450
+ value: string | number | boolean | string[];
2451
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2452
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2453
+ caseInsensitive?: boolean | undefined;
2454
+ }>, "many">;
2455
+ /** Action to take when conditions match */
2456
+ action: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
2457
+ /** Redirect URL (required if action is 'redirect') */
2458
+ redirectUrl: z.ZodOptional<z.ZodString>;
2459
+ /** Custom message to show/log */
2460
+ message: z.ZodOptional<z.ZodString>;
2461
+ /** Whether this rule is currently active */
2462
+ enabled: z.ZodDefault<z.ZodBoolean>;
2463
+ /** Metadata for auditing */
2464
+ metadata: z.ZodOptional<z.ZodObject<{
2465
+ createdAt: z.ZodOptional<z.ZodString>;
2466
+ updatedAt: z.ZodOptional<z.ZodString>;
2467
+ createdBy: z.ZodOptional<z.ZodString>;
2468
+ }, "strip", z.ZodTypeAny, {
2469
+ createdAt?: string | undefined;
2470
+ updatedAt?: string | undefined;
2471
+ createdBy?: string | undefined;
2472
+ }, {
2473
+ createdAt?: string | undefined;
2474
+ updatedAt?: string | undefined;
2475
+ createdBy?: string | undefined;
2476
+ }>>;
2477
+ }, "strip", z.ZodTypeAny, {
2478
+ name: string;
2479
+ id: string;
2480
+ enabled: boolean;
2481
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2482
+ priority: number;
2483
+ conditions: {
2484
+ value: string | number | boolean | string[];
2485
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2486
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2487
+ caseInsensitive?: boolean | undefined;
2488
+ }[];
2489
+ message?: string | undefined;
2490
+ metadata?: {
2491
+ createdAt?: string | undefined;
2492
+ updatedAt?: string | undefined;
2493
+ createdBy?: string | undefined;
2494
+ } | undefined;
2495
+ description?: string | undefined;
2496
+ redirectUrl?: string | undefined;
2497
+ }, {
2498
+ name: string;
2499
+ id: string;
2500
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2501
+ conditions: {
2502
+ value: string | number | boolean | string[];
2503
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2504
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2505
+ caseInsensitive?: boolean | undefined;
2506
+ }[];
2507
+ message?: string | undefined;
2508
+ metadata?: {
2509
+ createdAt?: string | undefined;
2510
+ updatedAt?: string | undefined;
2511
+ createdBy?: string | undefined;
2512
+ } | undefined;
2513
+ enabled?: boolean | undefined;
2514
+ description?: string | undefined;
2515
+ priority?: number | undefined;
2516
+ redirectUrl?: string | undefined;
2517
+ }>, {
2518
+ name: string;
2519
+ id: string;
2520
+ enabled: boolean;
2521
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2522
+ priority: number;
2523
+ conditions: {
2524
+ value: string | number | boolean | string[];
2525
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2526
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2527
+ caseInsensitive?: boolean | undefined;
2528
+ }[];
2529
+ message?: string | undefined;
2530
+ metadata?: {
2531
+ createdAt?: string | undefined;
2532
+ updatedAt?: string | undefined;
2533
+ createdBy?: string | undefined;
2534
+ } | undefined;
2535
+ description?: string | undefined;
2536
+ redirectUrl?: string | undefined;
2537
+ }, {
2538
+ name: string;
2539
+ id: string;
2540
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2541
+ conditions: {
2542
+ value: string | number | boolean | string[];
2543
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2544
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2545
+ caseInsensitive?: boolean | undefined;
2546
+ }[];
2547
+ message?: string | undefined;
2548
+ metadata?: {
2549
+ createdAt?: string | undefined;
2550
+ updatedAt?: string | undefined;
2551
+ createdBy?: string | undefined;
2552
+ } | undefined;
2553
+ enabled?: boolean | undefined;
2554
+ description?: string | undefined;
2555
+ priority?: number | undefined;
2556
+ redirectUrl?: string | undefined;
2557
+ }>, "many">>>;
2558
+ excludedPaths: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
2559
+ includedPaths: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
2560
+ metadata: z.ZodOptional<z.ZodOptional<z.ZodObject<{
2561
+ lastUpdated: z.ZodOptional<z.ZodString>;
2562
+ updatedBy: z.ZodOptional<z.ZodString>;
2563
+ policyId: z.ZodOptional<z.ZodString>;
2564
+ }, "strip", z.ZodTypeAny, {
2565
+ lastUpdated?: string | undefined;
2566
+ updatedBy?: string | undefined;
2567
+ policyId?: string | undefined;
2568
+ }, {
2569
+ lastUpdated?: string | undefined;
2570
+ updatedBy?: string | undefined;
2571
+ policyId?: string | undefined;
2572
+ }>>>;
2573
+ }, "strip", z.ZodTypeAny, {
2574
+ metadata?: {
2575
+ lastUpdated?: string | undefined;
2576
+ updatedBy?: string | undefined;
2577
+ policyId?: string | undefined;
2578
+ } | undefined;
2579
+ version?: string | undefined;
2580
+ enabled?: boolean | undefined;
2581
+ redirectUrl?: string | undefined;
2582
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2583
+ thresholds?: {
2584
+ confidenceThreshold: number;
2585
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
2586
+ minReputationScore: number;
2587
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
2588
+ trustedReputationThreshold: number;
2589
+ trustSignedRequests: boolean;
2590
+ } | undefined;
2591
+ denyList?: {
2592
+ active: boolean;
2593
+ agentDid?: string | undefined;
2594
+ clientDid?: string | undefined;
2595
+ expiresAt?: string | undefined;
2596
+ reason?: string | undefined;
2597
+ clientName?: string | undefined;
2598
+ agentType?: string | undefined;
2599
+ blockedAt?: string | undefined;
2600
+ addedBy?: string | undefined;
2601
+ }[] | undefined;
2602
+ allowList?: {
2603
+ agentDid?: string | undefined;
2604
+ clientDid?: string | undefined;
2605
+ reason?: string | undefined;
2606
+ clientName?: string | undefined;
2607
+ agentType?: string | undefined;
2608
+ addedBy?: string | undefined;
2609
+ addedAt?: string | undefined;
2610
+ }[] | undefined;
2611
+ rules?: {
2612
+ name: string;
2613
+ id: string;
2614
+ enabled: boolean;
2615
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2616
+ priority: number;
2617
+ conditions: {
2618
+ value: string | number | boolean | string[];
2619
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2620
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2621
+ caseInsensitive?: boolean | undefined;
2622
+ }[];
2623
+ message?: string | undefined;
2624
+ metadata?: {
2625
+ createdAt?: string | undefined;
2626
+ updatedAt?: string | undefined;
2627
+ createdBy?: string | undefined;
2628
+ } | undefined;
2629
+ description?: string | undefined;
2630
+ redirectUrl?: string | undefined;
2631
+ }[] | undefined;
2632
+ excludedPaths?: string[] | undefined;
2633
+ includedPaths?: string[] | undefined;
2634
+ }, {
2635
+ metadata?: {
2636
+ lastUpdated?: string | undefined;
2637
+ updatedBy?: string | undefined;
2638
+ policyId?: string | undefined;
2639
+ } | undefined;
2640
+ version?: string | undefined;
2641
+ enabled?: boolean | undefined;
2642
+ redirectUrl?: string | undefined;
2643
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2644
+ thresholds?: {
2645
+ confidenceThreshold?: number | undefined;
2646
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2647
+ minReputationScore?: number | undefined;
2648
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2649
+ trustedReputationThreshold?: number | undefined;
2650
+ trustSignedRequests?: boolean | undefined;
2651
+ } | undefined;
2652
+ denyList?: {
2653
+ agentDid?: string | undefined;
2654
+ clientDid?: string | undefined;
2655
+ expiresAt?: string | undefined;
2656
+ reason?: string | undefined;
2657
+ active?: boolean | undefined;
2658
+ clientName?: string | undefined;
2659
+ agentType?: string | undefined;
2660
+ blockedAt?: string | undefined;
2661
+ addedBy?: string | undefined;
2662
+ }[] | undefined;
2663
+ allowList?: {
2664
+ agentDid?: string | undefined;
2665
+ clientDid?: string | undefined;
2666
+ reason?: string | undefined;
2667
+ clientName?: string | undefined;
2668
+ agentType?: string | undefined;
2669
+ addedBy?: string | undefined;
2670
+ addedAt?: string | undefined;
2671
+ }[] | undefined;
2672
+ rules?: {
2673
+ name: string;
2674
+ id: string;
2675
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2676
+ conditions: {
2677
+ value: string | number | boolean | string[];
2678
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2679
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2680
+ caseInsensitive?: boolean | undefined;
2681
+ }[];
2682
+ message?: string | undefined;
2683
+ metadata?: {
2684
+ createdAt?: string | undefined;
2685
+ updatedAt?: string | undefined;
2686
+ createdBy?: string | undefined;
2687
+ } | undefined;
2688
+ enabled?: boolean | undefined;
2689
+ description?: string | undefined;
2690
+ priority?: number | undefined;
2691
+ redirectUrl?: string | undefined;
2692
+ }[] | undefined;
2693
+ excludedPaths?: string[] | undefined;
2694
+ includedPaths?: string[] | undefined;
2695
+ }>;
2696
+ }, "strip", z.ZodTypeAny, {
2697
+ projectId: string;
2698
+ policy: {
2699
+ metadata?: {
2700
+ lastUpdated?: string | undefined;
2701
+ updatedBy?: string | undefined;
2702
+ policyId?: string | undefined;
2703
+ } | undefined;
2704
+ version?: string | undefined;
2705
+ enabled?: boolean | undefined;
2706
+ redirectUrl?: string | undefined;
2707
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2708
+ thresholds?: {
2709
+ confidenceThreshold: number;
2710
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
2711
+ minReputationScore: number;
2712
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
2713
+ trustedReputationThreshold: number;
2714
+ trustSignedRequests: boolean;
2715
+ } | undefined;
2716
+ denyList?: {
2717
+ active: boolean;
2718
+ agentDid?: string | undefined;
2719
+ clientDid?: string | undefined;
2720
+ expiresAt?: string | undefined;
2721
+ reason?: string | undefined;
2722
+ clientName?: string | undefined;
2723
+ agentType?: string | undefined;
2724
+ blockedAt?: string | undefined;
2725
+ addedBy?: string | undefined;
2726
+ }[] | undefined;
2727
+ allowList?: {
2728
+ agentDid?: string | undefined;
2729
+ clientDid?: string | undefined;
2730
+ reason?: string | undefined;
2731
+ clientName?: string | undefined;
2732
+ agentType?: string | undefined;
2733
+ addedBy?: string | undefined;
2734
+ addedAt?: string | undefined;
2735
+ }[] | undefined;
2736
+ rules?: {
2737
+ name: string;
2738
+ id: string;
2739
+ enabled: boolean;
2740
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2741
+ priority: number;
2742
+ conditions: {
2743
+ value: string | number | boolean | string[];
2744
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2745
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2746
+ caseInsensitive?: boolean | undefined;
2747
+ }[];
2748
+ message?: string | undefined;
2749
+ metadata?: {
2750
+ createdAt?: string | undefined;
2751
+ updatedAt?: string | undefined;
2752
+ createdBy?: string | undefined;
2753
+ } | undefined;
2754
+ description?: string | undefined;
2755
+ redirectUrl?: string | undefined;
2756
+ }[] | undefined;
2757
+ excludedPaths?: string[] | undefined;
2758
+ includedPaths?: string[] | undefined;
2759
+ };
2760
+ }, {
2761
+ projectId: string;
2762
+ policy: {
2763
+ metadata?: {
2764
+ lastUpdated?: string | undefined;
2765
+ updatedBy?: string | undefined;
2766
+ policyId?: string | undefined;
2767
+ } | undefined;
2768
+ version?: string | undefined;
2769
+ enabled?: boolean | undefined;
2770
+ redirectUrl?: string | undefined;
2771
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2772
+ thresholds?: {
2773
+ confidenceThreshold?: number | undefined;
2774
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2775
+ minReputationScore?: number | undefined;
2776
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2777
+ trustedReputationThreshold?: number | undefined;
2778
+ trustSignedRequests?: boolean | undefined;
2779
+ } | undefined;
2780
+ denyList?: {
2781
+ agentDid?: string | undefined;
2782
+ clientDid?: string | undefined;
2783
+ expiresAt?: string | undefined;
2784
+ reason?: string | undefined;
2785
+ active?: boolean | undefined;
2786
+ clientName?: string | undefined;
2787
+ agentType?: string | undefined;
2788
+ blockedAt?: string | undefined;
2789
+ addedBy?: string | undefined;
2790
+ }[] | undefined;
2791
+ allowList?: {
2792
+ agentDid?: string | undefined;
2793
+ clientDid?: string | undefined;
2794
+ reason?: string | undefined;
2795
+ clientName?: string | undefined;
2796
+ agentType?: string | undefined;
2797
+ addedBy?: string | undefined;
2798
+ addedAt?: string | undefined;
2799
+ }[] | undefined;
2800
+ rules?: {
2801
+ name: string;
2802
+ id: string;
2803
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
2804
+ conditions: {
2805
+ value: string | number | boolean | string[];
2806
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
2807
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
2808
+ caseInsensitive?: boolean | undefined;
2809
+ }[];
2810
+ message?: string | undefined;
2811
+ metadata?: {
2812
+ createdAt?: string | undefined;
2813
+ updatedAt?: string | undefined;
2814
+ createdBy?: string | undefined;
2815
+ } | undefined;
2816
+ enabled?: boolean | undefined;
2817
+ description?: string | undefined;
2818
+ priority?: number | undefined;
2819
+ redirectUrl?: string | undefined;
2820
+ }[] | undefined;
2821
+ excludedPaths?: string[] | undefined;
2822
+ includedPaths?: string[] | undefined;
2823
+ };
2824
+ }>;
2825
+ export type UpdatePolicyRequest = z.infer<typeof UpdatePolicyRequestSchema>;
2826
+ /**
2827
+ * Response after updating policy
2828
+ */
2829
+ export declare const UpdatePolicyResponseSchema: z.ZodObject<{
2830
+ success: z.ZodBoolean;
2831
+ data: z.ZodObject<{
2832
+ policy: z.ZodEffects<z.ZodObject<{
2833
+ /** Schema version for migrations */
2834
+ version: z.ZodDefault<z.ZodString>;
2835
+ /** Whether policy enforcement is enabled */
2836
+ enabled: z.ZodDefault<z.ZodBoolean>;
2837
+ /** Default action when no rules match */
2838
+ defaultAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
2839
+ /** Default redirect URL for redirect actions */
2840
+ redirectUrl: z.ZodOptional<z.ZodString>;
2841
+ /** Threshold-based enforcement settings */
2842
+ thresholds: z.ZodDefault<z.ZodObject<{
2843
+ /**
2844
+ * Detection confidence threshold (0-100)
2845
+ * Agents detected with confidence >= this value trigger the configured action
2846
+ * @default 80
2847
+ */
2848
+ confidenceThreshold: z.ZodDefault<z.ZodNumber>;
2849
+ /**
2850
+ * Action to take when confidence threshold is exceeded
2851
+ * @default 'block'
2852
+ */
2853
+ confidenceAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
2854
+ /**
2855
+ * Minimum reputation score (0-100) required to allow access
2856
+ * Agents with reputation < this value may be blocked/challenged
2857
+ * Set to 0 to disable reputation-based enforcement
2858
+ * @default 0
2859
+ */
2860
+ minReputationScore: z.ZodDefault<z.ZodNumber>;
2861
+ /**
2862
+ * Action to take when reputation is below threshold
2863
+ * @default 'challenge'
2864
+ */
2865
+ lowReputationAction: z.ZodDefault<z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>>;
2866
+ /**
2867
+ * High reputation score threshold (0-100)
2868
+ * Agents with reputation >= this value are trusted and bypass other checks
2869
+ * @default 90
2870
+ */
2871
+ trustedReputationThreshold: z.ZodDefault<z.ZodNumber>;
2872
+ /**
2873
+ * Whether cryptographically signed requests (MCP-I verified) bypass thresholds
2874
+ * @default true
2875
+ */
2876
+ trustSignedRequests: z.ZodDefault<z.ZodBoolean>;
2877
+ }, "strip", z.ZodTypeAny, {
2878
+ confidenceThreshold: number;
2879
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
2880
+ minReputationScore: number;
2881
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
2882
+ trustedReputationThreshold: number;
2883
+ trustSignedRequests: boolean;
2884
+ }, {
2885
+ confidenceThreshold?: number | undefined;
2886
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2887
+ minReputationScore?: number | undefined;
2888
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
2889
+ trustedReputationThreshold?: number | undefined;
2890
+ trustSignedRequests?: boolean | undefined;
2891
+ }>>;
2892
+ /** Deny list entries (checked after allow list, before rules) */
2893
+ denyList: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
2894
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
2895
+ clientDid: z.ZodOptional<z.ZodString>;
2896
+ /** Agent DID from MCP-I identity */
2897
+ agentDid: z.ZodOptional<z.ZodString>;
2898
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
2899
+ clientName: z.ZodOptional<z.ZodString>;
2900
+ /** Agent type to block (e.g., "ai_agent", "bot", "scraper") */
2901
+ agentType: z.ZodOptional<z.ZodString>;
2902
+ /** Reason for denial (shown to user/logged) */
2903
+ reason: z.ZodOptional<z.ZodString>;
2904
+ /** ISO 8601 timestamp when entry was added */
2905
+ blockedAt: z.ZodOptional<z.ZodString>;
2906
+ /** Who added this entry (user ID or "system") */
2907
+ addedBy: z.ZodOptional<z.ZodString>;
2908
+ /** Whether this entry is currently active */
2909
+ active: z.ZodDefault<z.ZodBoolean>;
2910
+ /** Optional expiration date for temporary blocks */
2911
+ expiresAt: z.ZodOptional<z.ZodString>;
2912
+ }, "strip", z.ZodTypeAny, {
2913
+ active: boolean;
2914
+ agentDid?: string | undefined;
2915
+ clientDid?: string | undefined;
2916
+ expiresAt?: string | undefined;
2917
+ reason?: string | undefined;
2918
+ clientName?: string | undefined;
2919
+ agentType?: string | undefined;
2920
+ blockedAt?: string | undefined;
2921
+ addedBy?: string | undefined;
2922
+ }, {
2923
+ agentDid?: string | undefined;
2924
+ clientDid?: string | undefined;
2925
+ expiresAt?: string | undefined;
2926
+ reason?: string | undefined;
2927
+ active?: boolean | undefined;
2928
+ clientName?: string | undefined;
2929
+ agentType?: string | undefined;
2930
+ blockedAt?: string | undefined;
2931
+ addedBy?: string | undefined;
2932
+ }>, {
2933
+ active: boolean;
2934
+ agentDid?: string | undefined;
2935
+ clientDid?: string | undefined;
2936
+ expiresAt?: string | undefined;
2937
+ reason?: string | undefined;
2938
+ clientName?: string | undefined;
2939
+ agentType?: string | undefined;
2940
+ blockedAt?: string | undefined;
2941
+ addedBy?: string | undefined;
2942
+ }, {
2943
+ agentDid?: string | undefined;
2944
+ clientDid?: string | undefined;
2945
+ expiresAt?: string | undefined;
2946
+ reason?: string | undefined;
2947
+ active?: boolean | undefined;
2948
+ clientName?: string | undefined;
2949
+ agentType?: string | undefined;
2950
+ blockedAt?: string | undefined;
2951
+ addedBy?: string | undefined;
2952
+ }>, "many">>;
2953
+ /** Allow list entries (exempt from all checks) */
2954
+ allowList: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
2955
+ /** MCP-I client DID (e.g., "did:key:z6Mk...") */
2956
+ clientDid: z.ZodOptional<z.ZodString>;
2957
+ /** Agent DID from MCP-I identity */
2958
+ agentDid: z.ZodOptional<z.ZodString>;
2959
+ /** Human-readable client name (e.g., "Perplexity", "ChatGPT") */
2960
+ clientName: z.ZodOptional<z.ZodString>;
2961
+ /** Agent type to allow (e.g., "ai_agent", "verified_bot") */
2962
+ agentType: z.ZodOptional<z.ZodString>;
2963
+ /** Reason for allowing (documentation) */
2964
+ reason: z.ZodOptional<z.ZodString>;
2965
+ /** ISO 8601 timestamp when entry was added */
2966
+ addedAt: z.ZodOptional<z.ZodString>;
2967
+ /** Who added this entry */
2968
+ addedBy: z.ZodOptional<z.ZodString>;
2969
+ }, "strip", z.ZodTypeAny, {
2970
+ agentDid?: string | undefined;
2971
+ clientDid?: string | undefined;
2972
+ reason?: string | undefined;
2973
+ clientName?: string | undefined;
2974
+ agentType?: string | undefined;
2975
+ addedBy?: string | undefined;
2976
+ addedAt?: string | undefined;
2977
+ }, {
2978
+ agentDid?: string | undefined;
2979
+ clientDid?: string | undefined;
2980
+ reason?: string | undefined;
2981
+ clientName?: string | undefined;
2982
+ agentType?: string | undefined;
2983
+ addedBy?: string | undefined;
2984
+ addedAt?: string | undefined;
2985
+ }>, {
2986
+ agentDid?: string | undefined;
2987
+ clientDid?: string | undefined;
2988
+ reason?: string | undefined;
2989
+ clientName?: string | undefined;
2990
+ agentType?: string | undefined;
2991
+ addedBy?: string | undefined;
2992
+ addedAt?: string | undefined;
2993
+ }, {
2994
+ agentDid?: string | undefined;
2995
+ clientDid?: string | undefined;
2996
+ reason?: string | undefined;
2997
+ clientName?: string | undefined;
2998
+ agentType?: string | undefined;
2999
+ addedBy?: string | undefined;
3000
+ addedAt?: string | undefined;
3001
+ }>, "many">>;
3002
+ /** Custom policy rules (evaluated by priority after threshold checks) */
3003
+ rules: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
3004
+ /** Unique identifier for this rule */
3005
+ id: z.ZodString;
3006
+ /** Human-readable name */
3007
+ name: z.ZodString;
3008
+ /** Description of what this rule does */
3009
+ description: z.ZodOptional<z.ZodString>;
3010
+ /** Priority (lower = higher priority, evaluated first) */
3011
+ priority: z.ZodDefault<z.ZodNumber>;
3012
+ /**
3013
+ * Conditions that must ALL match for this rule to apply (AND logic)
3014
+ * For OR logic, create multiple rules with same action
3015
+ */
3016
+ conditions: z.ZodArray<z.ZodObject<{
3017
+ /** Field to match against */
3018
+ field: z.ZodEnum<["agentType", "agentName", "agentVendor", "clientDid", "agentDid", "confidence", "reputationScore", "riskLevel", "path", "method", "origin", "userAgent", "signatureVerified", "isAuthenticated", "hasValidDelegation"]>;
3019
+ /** Comparison operator */
3020
+ operator: z.ZodEnum<["equals", "notEquals", "contains", "notContains", "startsWith", "endsWith", "greaterThan", "lessThan", "greaterThanOrEquals", "lessThanOrEquals", "matches", "in", "notIn"]>;
3021
+ /** Value to compare against */
3022
+ value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>;
3023
+ /** Whether this condition is case-insensitive (for string comparisons) */
3024
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
3025
+ }, "strip", z.ZodTypeAny, {
3026
+ value: string | number | boolean | string[];
3027
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3028
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3029
+ caseInsensitive?: boolean | undefined;
3030
+ }, {
3031
+ value: string | number | boolean | string[];
3032
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3033
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3034
+ caseInsensitive?: boolean | undefined;
3035
+ }>, "many">;
3036
+ /** Action to take when conditions match */
3037
+ action: z.ZodEnum<["allow", "block", "redirect", "challenge", "log"]>;
3038
+ /** Redirect URL (required if action is 'redirect') */
3039
+ redirectUrl: z.ZodOptional<z.ZodString>;
3040
+ /** Custom message to show/log */
3041
+ message: z.ZodOptional<z.ZodString>;
3042
+ /** Whether this rule is currently active */
3043
+ enabled: z.ZodDefault<z.ZodBoolean>;
3044
+ /** Metadata for auditing */
3045
+ metadata: z.ZodOptional<z.ZodObject<{
3046
+ createdAt: z.ZodOptional<z.ZodString>;
3047
+ updatedAt: z.ZodOptional<z.ZodString>;
3048
+ createdBy: z.ZodOptional<z.ZodString>;
3049
+ }, "strip", z.ZodTypeAny, {
3050
+ createdAt?: string | undefined;
3051
+ updatedAt?: string | undefined;
3052
+ createdBy?: string | undefined;
3053
+ }, {
3054
+ createdAt?: string | undefined;
3055
+ updatedAt?: string | undefined;
3056
+ createdBy?: string | undefined;
3057
+ }>>;
3058
+ }, "strip", z.ZodTypeAny, {
3059
+ name: string;
3060
+ id: string;
3061
+ enabled: boolean;
3062
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3063
+ priority: number;
3064
+ conditions: {
3065
+ value: string | number | boolean | string[];
3066
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3067
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3068
+ caseInsensitive?: boolean | undefined;
3069
+ }[];
3070
+ message?: string | undefined;
3071
+ metadata?: {
3072
+ createdAt?: string | undefined;
3073
+ updatedAt?: string | undefined;
3074
+ createdBy?: string | undefined;
3075
+ } | undefined;
3076
+ description?: string | undefined;
3077
+ redirectUrl?: string | undefined;
3078
+ }, {
3079
+ name: string;
3080
+ id: string;
3081
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3082
+ conditions: {
3083
+ value: string | number | boolean | string[];
3084
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3085
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3086
+ caseInsensitive?: boolean | undefined;
3087
+ }[];
3088
+ message?: string | undefined;
3089
+ metadata?: {
3090
+ createdAt?: string | undefined;
3091
+ updatedAt?: string | undefined;
3092
+ createdBy?: string | undefined;
3093
+ } | undefined;
3094
+ enabled?: boolean | undefined;
3095
+ description?: string | undefined;
3096
+ priority?: number | undefined;
3097
+ redirectUrl?: string | undefined;
3098
+ }>, {
3099
+ name: string;
3100
+ id: string;
3101
+ enabled: boolean;
3102
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3103
+ priority: number;
3104
+ conditions: {
3105
+ value: string | number | boolean | string[];
3106
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3107
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3108
+ caseInsensitive?: boolean | undefined;
3109
+ }[];
3110
+ message?: string | undefined;
3111
+ metadata?: {
3112
+ createdAt?: string | undefined;
3113
+ updatedAt?: string | undefined;
3114
+ createdBy?: string | undefined;
3115
+ } | undefined;
3116
+ description?: string | undefined;
3117
+ redirectUrl?: string | undefined;
3118
+ }, {
3119
+ name: string;
3120
+ id: string;
3121
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3122
+ conditions: {
3123
+ value: string | number | boolean | string[];
3124
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3125
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3126
+ caseInsensitive?: boolean | undefined;
3127
+ }[];
3128
+ message?: string | undefined;
3129
+ metadata?: {
3130
+ createdAt?: string | undefined;
3131
+ updatedAt?: string | undefined;
3132
+ createdBy?: string | undefined;
3133
+ } | undefined;
3134
+ enabled?: boolean | undefined;
3135
+ description?: string | undefined;
3136
+ priority?: number | undefined;
3137
+ redirectUrl?: string | undefined;
3138
+ }>, "many">>;
3139
+ /** Paths to exclude from policy enforcement (glob patterns supported) */
3140
+ excludedPaths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3141
+ /** Paths to include (if set, only these paths are enforced) */
3142
+ includedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3143
+ /** Metadata for the policy configuration */
3144
+ metadata: z.ZodOptional<z.ZodObject<{
3145
+ lastUpdated: z.ZodOptional<z.ZodString>;
3146
+ updatedBy: z.ZodOptional<z.ZodString>;
3147
+ policyId: z.ZodOptional<z.ZodString>;
3148
+ }, "strip", z.ZodTypeAny, {
3149
+ lastUpdated?: string | undefined;
3150
+ updatedBy?: string | undefined;
3151
+ policyId?: string | undefined;
3152
+ }, {
3153
+ lastUpdated?: string | undefined;
3154
+ updatedBy?: string | undefined;
3155
+ policyId?: string | undefined;
3156
+ }>>;
3157
+ }, "strip", z.ZodTypeAny, {
3158
+ version: string;
3159
+ enabled: boolean;
3160
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
3161
+ thresholds: {
3162
+ confidenceThreshold: number;
3163
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
3164
+ minReputationScore: number;
3165
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
3166
+ trustedReputationThreshold: number;
3167
+ trustSignedRequests: boolean;
3168
+ };
3169
+ denyList: {
3170
+ active: boolean;
3171
+ agentDid?: string | undefined;
3172
+ clientDid?: string | undefined;
3173
+ expiresAt?: string | undefined;
3174
+ reason?: string | undefined;
3175
+ clientName?: string | undefined;
3176
+ agentType?: string | undefined;
3177
+ blockedAt?: string | undefined;
3178
+ addedBy?: string | undefined;
3179
+ }[];
3180
+ allowList: {
3181
+ agentDid?: string | undefined;
3182
+ clientDid?: string | undefined;
3183
+ reason?: string | undefined;
3184
+ clientName?: string | undefined;
3185
+ agentType?: string | undefined;
3186
+ addedBy?: string | undefined;
3187
+ addedAt?: string | undefined;
3188
+ }[];
3189
+ rules: {
3190
+ name: string;
3191
+ id: string;
3192
+ enabled: boolean;
3193
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3194
+ priority: number;
3195
+ conditions: {
3196
+ value: string | number | boolean | string[];
3197
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3198
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3199
+ caseInsensitive?: boolean | undefined;
3200
+ }[];
3201
+ message?: string | undefined;
3202
+ metadata?: {
3203
+ createdAt?: string | undefined;
3204
+ updatedAt?: string | undefined;
3205
+ createdBy?: string | undefined;
3206
+ } | undefined;
3207
+ description?: string | undefined;
3208
+ redirectUrl?: string | undefined;
3209
+ }[];
3210
+ excludedPaths: string[];
3211
+ metadata?: {
3212
+ lastUpdated?: string | undefined;
3213
+ updatedBy?: string | undefined;
3214
+ policyId?: string | undefined;
3215
+ } | undefined;
3216
+ redirectUrl?: string | undefined;
3217
+ includedPaths?: string[] | undefined;
3218
+ }, {
3219
+ metadata?: {
3220
+ lastUpdated?: string | undefined;
3221
+ updatedBy?: string | undefined;
3222
+ policyId?: string | undefined;
3223
+ } | undefined;
3224
+ version?: string | undefined;
3225
+ enabled?: boolean | undefined;
3226
+ redirectUrl?: string | undefined;
3227
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3228
+ thresholds?: {
3229
+ confidenceThreshold?: number | undefined;
3230
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3231
+ minReputationScore?: number | undefined;
3232
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3233
+ trustedReputationThreshold?: number | undefined;
3234
+ trustSignedRequests?: boolean | undefined;
3235
+ } | undefined;
3236
+ denyList?: {
3237
+ agentDid?: string | undefined;
3238
+ clientDid?: string | undefined;
3239
+ expiresAt?: string | undefined;
3240
+ reason?: string | undefined;
3241
+ active?: boolean | undefined;
3242
+ clientName?: string | undefined;
3243
+ agentType?: string | undefined;
3244
+ blockedAt?: string | undefined;
3245
+ addedBy?: string | undefined;
3246
+ }[] | undefined;
3247
+ allowList?: {
3248
+ agentDid?: string | undefined;
3249
+ clientDid?: string | undefined;
3250
+ reason?: string | undefined;
3251
+ clientName?: string | undefined;
3252
+ agentType?: string | undefined;
3253
+ addedBy?: string | undefined;
3254
+ addedAt?: string | undefined;
3255
+ }[] | undefined;
3256
+ rules?: {
3257
+ name: string;
3258
+ id: string;
3259
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3260
+ conditions: {
3261
+ value: string | number | boolean | string[];
3262
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3263
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3264
+ caseInsensitive?: boolean | undefined;
3265
+ }[];
3266
+ message?: string | undefined;
3267
+ metadata?: {
3268
+ createdAt?: string | undefined;
3269
+ updatedAt?: string | undefined;
3270
+ createdBy?: string | undefined;
3271
+ } | undefined;
3272
+ enabled?: boolean | undefined;
3273
+ description?: string | undefined;
3274
+ priority?: number | undefined;
3275
+ redirectUrl?: string | undefined;
3276
+ }[] | undefined;
3277
+ excludedPaths?: string[] | undefined;
3278
+ includedPaths?: string[] | undefined;
3279
+ }>, {
3280
+ version: string;
3281
+ enabled: boolean;
3282
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
3283
+ thresholds: {
3284
+ confidenceThreshold: number;
3285
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
3286
+ minReputationScore: number;
3287
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
3288
+ trustedReputationThreshold: number;
3289
+ trustSignedRequests: boolean;
3290
+ };
3291
+ denyList: {
3292
+ active: boolean;
3293
+ agentDid?: string | undefined;
3294
+ clientDid?: string | undefined;
3295
+ expiresAt?: string | undefined;
3296
+ reason?: string | undefined;
3297
+ clientName?: string | undefined;
3298
+ agentType?: string | undefined;
3299
+ blockedAt?: string | undefined;
3300
+ addedBy?: string | undefined;
3301
+ }[];
3302
+ allowList: {
3303
+ agentDid?: string | undefined;
3304
+ clientDid?: string | undefined;
3305
+ reason?: string | undefined;
3306
+ clientName?: string | undefined;
3307
+ agentType?: string | undefined;
3308
+ addedBy?: string | undefined;
3309
+ addedAt?: string | undefined;
3310
+ }[];
3311
+ rules: {
3312
+ name: string;
3313
+ id: string;
3314
+ enabled: boolean;
3315
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3316
+ priority: number;
3317
+ conditions: {
3318
+ value: string | number | boolean | string[];
3319
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3320
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3321
+ caseInsensitive?: boolean | undefined;
3322
+ }[];
3323
+ message?: string | undefined;
3324
+ metadata?: {
3325
+ createdAt?: string | undefined;
3326
+ updatedAt?: string | undefined;
3327
+ createdBy?: string | undefined;
3328
+ } | undefined;
3329
+ description?: string | undefined;
3330
+ redirectUrl?: string | undefined;
3331
+ }[];
3332
+ excludedPaths: string[];
3333
+ metadata?: {
3334
+ lastUpdated?: string | undefined;
3335
+ updatedBy?: string | undefined;
3336
+ policyId?: string | undefined;
3337
+ } | undefined;
3338
+ redirectUrl?: string | undefined;
3339
+ includedPaths?: string[] | undefined;
3340
+ }, {
3341
+ metadata?: {
3342
+ lastUpdated?: string | undefined;
3343
+ updatedBy?: string | undefined;
3344
+ policyId?: string | undefined;
3345
+ } | undefined;
3346
+ version?: string | undefined;
3347
+ enabled?: boolean | undefined;
3348
+ redirectUrl?: string | undefined;
3349
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3350
+ thresholds?: {
3351
+ confidenceThreshold?: number | undefined;
3352
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3353
+ minReputationScore?: number | undefined;
3354
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3355
+ trustedReputationThreshold?: number | undefined;
3356
+ trustSignedRequests?: boolean | undefined;
3357
+ } | undefined;
3358
+ denyList?: {
3359
+ agentDid?: string | undefined;
3360
+ clientDid?: string | undefined;
3361
+ expiresAt?: string | undefined;
3362
+ reason?: string | undefined;
3363
+ active?: boolean | undefined;
3364
+ clientName?: string | undefined;
3365
+ agentType?: string | undefined;
3366
+ blockedAt?: string | undefined;
3367
+ addedBy?: string | undefined;
3368
+ }[] | undefined;
3369
+ allowList?: {
3370
+ agentDid?: string | undefined;
3371
+ clientDid?: string | undefined;
3372
+ reason?: string | undefined;
3373
+ clientName?: string | undefined;
3374
+ agentType?: string | undefined;
3375
+ addedBy?: string | undefined;
3376
+ addedAt?: string | undefined;
3377
+ }[] | undefined;
3378
+ rules?: {
3379
+ name: string;
3380
+ id: string;
3381
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3382
+ conditions: {
3383
+ value: string | number | boolean | string[];
3384
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3385
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3386
+ caseInsensitive?: boolean | undefined;
3387
+ }[];
3388
+ message?: string | undefined;
3389
+ metadata?: {
3390
+ createdAt?: string | undefined;
3391
+ updatedAt?: string | undefined;
3392
+ createdBy?: string | undefined;
3393
+ } | undefined;
3394
+ enabled?: boolean | undefined;
3395
+ description?: string | undefined;
3396
+ priority?: number | undefined;
3397
+ redirectUrl?: string | undefined;
3398
+ }[] | undefined;
3399
+ excludedPaths?: string[] | undefined;
3400
+ includedPaths?: string[] | undefined;
3401
+ }>;
3402
+ changes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3403
+ }, "strip", z.ZodTypeAny, {
3404
+ policy: {
3405
+ version: string;
3406
+ enabled: boolean;
3407
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
3408
+ thresholds: {
3409
+ confidenceThreshold: number;
3410
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
3411
+ minReputationScore: number;
3412
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
3413
+ trustedReputationThreshold: number;
3414
+ trustSignedRequests: boolean;
3415
+ };
3416
+ denyList: {
3417
+ active: boolean;
3418
+ agentDid?: string | undefined;
3419
+ clientDid?: string | undefined;
3420
+ expiresAt?: string | undefined;
3421
+ reason?: string | undefined;
3422
+ clientName?: string | undefined;
3423
+ agentType?: string | undefined;
3424
+ blockedAt?: string | undefined;
3425
+ addedBy?: string | undefined;
3426
+ }[];
3427
+ allowList: {
3428
+ agentDid?: string | undefined;
3429
+ clientDid?: string | undefined;
3430
+ reason?: string | undefined;
3431
+ clientName?: string | undefined;
3432
+ agentType?: string | undefined;
3433
+ addedBy?: string | undefined;
3434
+ addedAt?: string | undefined;
3435
+ }[];
3436
+ rules: {
3437
+ name: string;
3438
+ id: string;
3439
+ enabled: boolean;
3440
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3441
+ priority: number;
3442
+ conditions: {
3443
+ value: string | number | boolean | string[];
3444
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3445
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3446
+ caseInsensitive?: boolean | undefined;
3447
+ }[];
3448
+ message?: string | undefined;
3449
+ metadata?: {
3450
+ createdAt?: string | undefined;
3451
+ updatedAt?: string | undefined;
3452
+ createdBy?: string | undefined;
3453
+ } | undefined;
3454
+ description?: string | undefined;
3455
+ redirectUrl?: string | undefined;
3456
+ }[];
3457
+ excludedPaths: string[];
3458
+ metadata?: {
3459
+ lastUpdated?: string | undefined;
3460
+ updatedBy?: string | undefined;
3461
+ policyId?: string | undefined;
3462
+ } | undefined;
3463
+ redirectUrl?: string | undefined;
3464
+ includedPaths?: string[] | undefined;
3465
+ };
3466
+ changes?: string[] | undefined;
3467
+ }, {
3468
+ policy: {
3469
+ metadata?: {
3470
+ lastUpdated?: string | undefined;
3471
+ updatedBy?: string | undefined;
3472
+ policyId?: string | undefined;
3473
+ } | undefined;
3474
+ version?: string | undefined;
3475
+ enabled?: boolean | undefined;
3476
+ redirectUrl?: string | undefined;
3477
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3478
+ thresholds?: {
3479
+ confidenceThreshold?: number | undefined;
3480
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3481
+ minReputationScore?: number | undefined;
3482
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3483
+ trustedReputationThreshold?: number | undefined;
3484
+ trustSignedRequests?: boolean | undefined;
3485
+ } | undefined;
3486
+ denyList?: {
3487
+ agentDid?: string | undefined;
3488
+ clientDid?: string | undefined;
3489
+ expiresAt?: string | undefined;
3490
+ reason?: string | undefined;
3491
+ active?: boolean | undefined;
3492
+ clientName?: string | undefined;
3493
+ agentType?: string | undefined;
3494
+ blockedAt?: string | undefined;
3495
+ addedBy?: string | undefined;
3496
+ }[] | undefined;
3497
+ allowList?: {
3498
+ agentDid?: string | undefined;
3499
+ clientDid?: string | undefined;
3500
+ reason?: string | undefined;
3501
+ clientName?: string | undefined;
3502
+ agentType?: string | undefined;
3503
+ addedBy?: string | undefined;
3504
+ addedAt?: string | undefined;
3505
+ }[] | undefined;
3506
+ rules?: {
3507
+ name: string;
3508
+ id: string;
3509
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3510
+ conditions: {
3511
+ value: string | number | boolean | string[];
3512
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3513
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3514
+ caseInsensitive?: boolean | undefined;
3515
+ }[];
3516
+ message?: string | undefined;
3517
+ metadata?: {
3518
+ createdAt?: string | undefined;
3519
+ updatedAt?: string | undefined;
3520
+ createdBy?: string | undefined;
3521
+ } | undefined;
3522
+ enabled?: boolean | undefined;
3523
+ description?: string | undefined;
3524
+ priority?: number | undefined;
3525
+ redirectUrl?: string | undefined;
3526
+ }[] | undefined;
3527
+ excludedPaths?: string[] | undefined;
3528
+ includedPaths?: string[] | undefined;
3529
+ };
3530
+ changes?: string[] | undefined;
3531
+ }>;
3532
+ metadata: z.ZodOptional<z.ZodObject<{
3533
+ requestId: z.ZodOptional<z.ZodString>;
3534
+ timestamp: z.ZodOptional<z.ZodString>;
3535
+ }, "strip", z.ZodTypeAny, {
3536
+ timestamp?: string | undefined;
3537
+ requestId?: string | undefined;
3538
+ }, {
3539
+ timestamp?: string | undefined;
3540
+ requestId?: string | undefined;
3541
+ }>>;
3542
+ }, "strip", z.ZodTypeAny, {
3543
+ success: boolean;
3544
+ data: {
3545
+ policy: {
3546
+ version: string;
3547
+ enabled: boolean;
3548
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
3549
+ thresholds: {
3550
+ confidenceThreshold: number;
3551
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
3552
+ minReputationScore: number;
3553
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
3554
+ trustedReputationThreshold: number;
3555
+ trustSignedRequests: boolean;
3556
+ };
3557
+ denyList: {
3558
+ active: boolean;
3559
+ agentDid?: string | undefined;
3560
+ clientDid?: string | undefined;
3561
+ expiresAt?: string | undefined;
3562
+ reason?: string | undefined;
3563
+ clientName?: string | undefined;
3564
+ agentType?: string | undefined;
3565
+ blockedAt?: string | undefined;
3566
+ addedBy?: string | undefined;
3567
+ }[];
3568
+ allowList: {
3569
+ agentDid?: string | undefined;
3570
+ clientDid?: string | undefined;
3571
+ reason?: string | undefined;
3572
+ clientName?: string | undefined;
3573
+ agentType?: string | undefined;
3574
+ addedBy?: string | undefined;
3575
+ addedAt?: string | undefined;
3576
+ }[];
3577
+ rules: {
3578
+ name: string;
3579
+ id: string;
3580
+ enabled: boolean;
3581
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3582
+ priority: number;
3583
+ conditions: {
3584
+ value: string | number | boolean | string[];
3585
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3586
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3587
+ caseInsensitive?: boolean | undefined;
3588
+ }[];
3589
+ message?: string | undefined;
3590
+ metadata?: {
3591
+ createdAt?: string | undefined;
3592
+ updatedAt?: string | undefined;
3593
+ createdBy?: string | undefined;
3594
+ } | undefined;
3595
+ description?: string | undefined;
3596
+ redirectUrl?: string | undefined;
3597
+ }[];
3598
+ excludedPaths: string[];
3599
+ metadata?: {
3600
+ lastUpdated?: string | undefined;
3601
+ updatedBy?: string | undefined;
3602
+ policyId?: string | undefined;
3603
+ } | undefined;
3604
+ redirectUrl?: string | undefined;
3605
+ includedPaths?: string[] | undefined;
3606
+ };
3607
+ changes?: string[] | undefined;
3608
+ };
3609
+ metadata?: {
3610
+ timestamp?: string | undefined;
3611
+ requestId?: string | undefined;
3612
+ } | undefined;
3613
+ }, {
3614
+ success: boolean;
3615
+ data: {
3616
+ policy: {
3617
+ metadata?: {
3618
+ lastUpdated?: string | undefined;
3619
+ updatedBy?: string | undefined;
3620
+ policyId?: string | undefined;
3621
+ } | undefined;
3622
+ version?: string | undefined;
3623
+ enabled?: boolean | undefined;
3624
+ redirectUrl?: string | undefined;
3625
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3626
+ thresholds?: {
3627
+ confidenceThreshold?: number | undefined;
3628
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3629
+ minReputationScore?: number | undefined;
3630
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3631
+ trustedReputationThreshold?: number | undefined;
3632
+ trustSignedRequests?: boolean | undefined;
3633
+ } | undefined;
3634
+ denyList?: {
3635
+ agentDid?: string | undefined;
3636
+ clientDid?: string | undefined;
3637
+ expiresAt?: string | undefined;
3638
+ reason?: string | undefined;
3639
+ active?: boolean | undefined;
3640
+ clientName?: string | undefined;
3641
+ agentType?: string | undefined;
3642
+ blockedAt?: string | undefined;
3643
+ addedBy?: string | undefined;
3644
+ }[] | undefined;
3645
+ allowList?: {
3646
+ agentDid?: string | undefined;
3647
+ clientDid?: string | undefined;
3648
+ reason?: string | undefined;
3649
+ clientName?: string | undefined;
3650
+ agentType?: string | undefined;
3651
+ addedBy?: string | undefined;
3652
+ addedAt?: string | undefined;
3653
+ }[] | undefined;
3654
+ rules?: {
3655
+ name: string;
3656
+ id: string;
3657
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3658
+ conditions: {
3659
+ value: string | number | boolean | string[];
3660
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3661
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3662
+ caseInsensitive?: boolean | undefined;
3663
+ }[];
3664
+ message?: string | undefined;
3665
+ metadata?: {
3666
+ createdAt?: string | undefined;
3667
+ updatedAt?: string | undefined;
3668
+ createdBy?: string | undefined;
3669
+ } | undefined;
3670
+ enabled?: boolean | undefined;
3671
+ description?: string | undefined;
3672
+ priority?: number | undefined;
3673
+ redirectUrl?: string | undefined;
3674
+ }[] | undefined;
3675
+ excludedPaths?: string[] | undefined;
3676
+ includedPaths?: string[] | undefined;
3677
+ };
3678
+ changes?: string[] | undefined;
3679
+ };
3680
+ metadata?: {
3681
+ timestamp?: string | undefined;
3682
+ requestId?: string | undefined;
3683
+ } | undefined;
3684
+ }>;
3685
+ export type UpdatePolicyResponse = z.infer<typeof UpdatePolicyResponseSchema>;
3686
+ /**
3687
+ * Validate a policy configuration
3688
+ */
3689
+ export declare function validatePolicyConfig(data: unknown): PolicyConfig;
3690
+ /**
3691
+ * Safely validate a policy configuration (returns result object)
3692
+ */
3693
+ export declare function safeParsePolicyConfig(data: unknown): z.SafeParseReturnType<{
3694
+ metadata?: {
3695
+ lastUpdated?: string | undefined;
3696
+ updatedBy?: string | undefined;
3697
+ policyId?: string | undefined;
3698
+ } | undefined;
3699
+ version?: string | undefined;
3700
+ enabled?: boolean | undefined;
3701
+ redirectUrl?: string | undefined;
3702
+ defaultAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3703
+ thresholds?: {
3704
+ confidenceThreshold?: number | undefined;
3705
+ confidenceAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3706
+ minReputationScore?: number | undefined;
3707
+ lowReputationAction?: "challenge" | "allow" | "block" | "redirect" | "log" | undefined;
3708
+ trustedReputationThreshold?: number | undefined;
3709
+ trustSignedRequests?: boolean | undefined;
3710
+ } | undefined;
3711
+ denyList?: {
3712
+ agentDid?: string | undefined;
3713
+ clientDid?: string | undefined;
3714
+ expiresAt?: string | undefined;
3715
+ reason?: string | undefined;
3716
+ active?: boolean | undefined;
3717
+ clientName?: string | undefined;
3718
+ agentType?: string | undefined;
3719
+ blockedAt?: string | undefined;
3720
+ addedBy?: string | undefined;
3721
+ }[] | undefined;
3722
+ allowList?: {
3723
+ agentDid?: string | undefined;
3724
+ clientDid?: string | undefined;
3725
+ reason?: string | undefined;
3726
+ clientName?: string | undefined;
3727
+ agentType?: string | undefined;
3728
+ addedBy?: string | undefined;
3729
+ addedAt?: string | undefined;
3730
+ }[] | undefined;
3731
+ rules?: {
3732
+ name: string;
3733
+ id: string;
3734
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3735
+ conditions: {
3736
+ value: string | number | boolean | string[];
3737
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3738
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3739
+ caseInsensitive?: boolean | undefined;
3740
+ }[];
3741
+ message?: string | undefined;
3742
+ metadata?: {
3743
+ createdAt?: string | undefined;
3744
+ updatedAt?: string | undefined;
3745
+ createdBy?: string | undefined;
3746
+ } | undefined;
3747
+ enabled?: boolean | undefined;
3748
+ description?: string | undefined;
3749
+ priority?: number | undefined;
3750
+ redirectUrl?: string | undefined;
3751
+ }[] | undefined;
3752
+ excludedPaths?: string[] | undefined;
3753
+ includedPaths?: string[] | undefined;
3754
+ }, {
3755
+ version: string;
3756
+ enabled: boolean;
3757
+ defaultAction: "challenge" | "allow" | "block" | "redirect" | "log";
3758
+ thresholds: {
3759
+ confidenceThreshold: number;
3760
+ confidenceAction: "challenge" | "allow" | "block" | "redirect" | "log";
3761
+ minReputationScore: number;
3762
+ lowReputationAction: "challenge" | "allow" | "block" | "redirect" | "log";
3763
+ trustedReputationThreshold: number;
3764
+ trustSignedRequests: boolean;
3765
+ };
3766
+ denyList: {
3767
+ active: boolean;
3768
+ agentDid?: string | undefined;
3769
+ clientDid?: string | undefined;
3770
+ expiresAt?: string | undefined;
3771
+ reason?: string | undefined;
3772
+ clientName?: string | undefined;
3773
+ agentType?: string | undefined;
3774
+ blockedAt?: string | undefined;
3775
+ addedBy?: string | undefined;
3776
+ }[];
3777
+ allowList: {
3778
+ agentDid?: string | undefined;
3779
+ clientDid?: string | undefined;
3780
+ reason?: string | undefined;
3781
+ clientName?: string | undefined;
3782
+ agentType?: string | undefined;
3783
+ addedBy?: string | undefined;
3784
+ addedAt?: string | undefined;
3785
+ }[];
3786
+ rules: {
3787
+ name: string;
3788
+ id: string;
3789
+ enabled: boolean;
3790
+ action: "challenge" | "allow" | "block" | "redirect" | "log";
3791
+ priority: number;
3792
+ conditions: {
3793
+ value: string | number | boolean | string[];
3794
+ field: "path" | "agentDid" | "clientDid" | "method" | "confidence" | "agentType" | "agentName" | "agentVendor" | "reputationScore" | "riskLevel" | "origin" | "userAgent" | "signatureVerified" | "isAuthenticated" | "hasValidDelegation";
3795
+ operator: "equals" | "notEquals" | "contains" | "notContains" | "startsWith" | "endsWith" | "greaterThan" | "lessThan" | "greaterThanOrEquals" | "lessThanOrEquals" | "matches" | "in" | "notIn";
3796
+ caseInsensitive?: boolean | undefined;
3797
+ }[];
3798
+ message?: string | undefined;
3799
+ metadata?: {
3800
+ createdAt?: string | undefined;
3801
+ updatedAt?: string | undefined;
3802
+ createdBy?: string | undefined;
3803
+ } | undefined;
3804
+ description?: string | undefined;
3805
+ redirectUrl?: string | undefined;
3806
+ }[];
3807
+ excludedPaths: string[];
3808
+ metadata?: {
3809
+ lastUpdated?: string | undefined;
3810
+ updatedBy?: string | undefined;
3811
+ policyId?: string | undefined;
3812
+ } | undefined;
3813
+ redirectUrl?: string | undefined;
3814
+ includedPaths?: string[] | undefined;
3815
+ }>;
3816
+ /**
3817
+ * Validate a deny list entry
3818
+ */
3819
+ export declare function validateDenyListEntry(data: unknown): DenyListEntry;
3820
+ /**
3821
+ * Validate a policy rule
3822
+ */
3823
+ export declare function validatePolicyRule(data: unknown): PolicyRule;
3824
+ /**
3825
+ * Default policy configuration for new projects
3826
+ */
3827
+ export declare const DEFAULT_POLICY_CONFIG: PolicyConfig;
3828
+ /**
3829
+ * Example: Block high-confidence AI agents
3830
+ */
3831
+ export declare const EXAMPLE_BLOCK_AI_AGENTS: PolicyRule;
3832
+ /**
3833
+ * Example: Allow verified ChatGPT
3834
+ */
3835
+ export declare const EXAMPLE_ALLOW_CHATGPT: AllowListEntry;
3836
+ /**
3837
+ * Example: Challenge low-reputation agents
3838
+ */
3839
+ export declare const EXAMPLE_CHALLENGE_LOW_REP: PolicyRule;