fullcourtdefense 2.0.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/README.md +233 -53
  2. package/dist/adapters.d.ts +11 -0
  3. package/dist/adapters.js +16 -0
  4. package/dist/anthropic.d.ts +32 -0
  5. package/dist/anthropic.js +67 -0
  6. package/dist/argsBounds.d.ts +38 -0
  7. package/dist/argsBounds.js +84 -0
  8. package/dist/autoInstrument.d.ts +24 -7
  9. package/dist/autoInstrument.js +148 -23
  10. package/dist/circuitBreaker.d.ts +17 -0
  11. package/dist/circuitBreaker.js +39 -0
  12. package/dist/cliMoved.d.ts +4 -0
  13. package/dist/cliMoved.js +20 -0
  14. package/dist/client.d.ts +185 -1
  15. package/dist/client.js +1094 -87
  16. package/dist/errors.d.ts +73 -0
  17. package/dist/errors.js +110 -0
  18. package/dist/failMode.d.ts +96 -0
  19. package/dist/failMode.js +180 -0
  20. package/dist/identity.d.ts +32 -0
  21. package/dist/identity.js +120 -0
  22. package/dist/index.d.ts +5 -2
  23. package/dist/index.js +9 -1
  24. package/dist/lambda.d.ts +101 -0
  25. package/dist/lambda.js +357 -0
  26. package/dist/localDecision.d.ts +100 -0
  27. package/dist/localDecision.js +246 -0
  28. package/dist/localGate.d.ts +44 -0
  29. package/dist/localGate.js +114 -0
  30. package/dist/localSafety.d.ts +48 -0
  31. package/dist/localSafety.js +220 -0
  32. package/dist/policy/acorn.js +6365 -0
  33. package/dist/policy/actionPolicyEngine.d.ts +427 -0
  34. package/dist/policy/actionPolicyEngine.js +6481 -0
  35. package/dist/policy/detectionData.d.ts +21 -0
  36. package/dist/policy/detectionData.js +71 -0
  37. package/dist/policy/detectorRuntime.d.ts +27 -0
  38. package/dist/policy/detectorRuntime.js +58 -0
  39. package/dist/policy/deterministicGuard.d.ts +406 -0
  40. package/dist/policy/deterministicGuard.js +6651 -0
  41. package/dist/protect.d.ts +48 -0
  42. package/dist/protect.js +223 -1
  43. package/dist/recordQueue.d.ts +53 -0
  44. package/dist/recordQueue.js +132 -0
  45. package/dist/recordSpool.d.ts +17 -0
  46. package/dist/recordSpool.js +137 -0
  47. package/dist/types.d.ts +167 -2
  48. package/lambda.js +6 -0
  49. package/package.json +31 -27
  50. package/dist/cli/actionPolicyEngine.d.ts +0 -146
  51. package/dist/cli/actionPolicyEngine.js +0 -754
  52. package/dist/cli/api.d.ts +0 -116
  53. package/dist/cli/api.js +0 -65
  54. package/dist/cli/appDetection.d.ts +0 -8
  55. package/dist/cli/appDetection.js +0 -107
  56. package/dist/cli/attack-corpus/context_escape/context-escape-newline.yaml +0 -23
  57. package/dist/cli/attack-corpus/context_escape/context-escape-unicode.yaml +0 -14
  58. package/dist/cli/attack-corpus/context_escape/delimiter-json.yaml +0 -14
  59. package/dist/cli/attack-corpus/context_escape/delimiter-markdown.yaml +0 -22
  60. package/dist/cli/attack-corpus/context_escape/delimiter-xml.yaml +0 -19
  61. package/dist/cli/attack-corpus/context_escape/html-injection.yaml +0 -14
  62. package/dist/cli/attack-corpus/context_escape/javascript-injection.yaml +0 -13
  63. package/dist/cli/attack-corpus/data_extraction/adv26-adversarial-function-hallucination.yaml +0 -20
  64. package/dist/cli/attack-corpus/data_extraction/adv26-cot-hijack-debug-trace.yaml +0 -20
  65. package/dist/cli/attack-corpus/data_extraction/adv26-cot-hijack-verification.yaml +0 -18
  66. package/dist/cli/attack-corpus/data_extraction/adv26-crossmodal-diff.yaml +0 -22
  67. package/dist/cli/attack-corpus/data_extraction/adv26-crossmodal-graphql.yaml +0 -34
  68. package/dist/cli/attack-corpus/data_extraction/adv26-crossmodal-regex.yaml +0 -19
  69. package/dist/cli/attack-corpus/data_extraction/adv26-crossmodal-sql-prose.yaml +0 -18
  70. package/dist/cli/attack-corpus/data_extraction/adv26-meta-confidence-calibration.yaml +0 -21
  71. package/dist/cli/attack-corpus/data_extraction/adv26-meta-instruction-count.yaml +0 -18
  72. package/dist/cli/attack-corpus/data_extraction/adv26-meta-output-format.yaml +0 -16
  73. package/dist/cli/attack-corpus/data_extraction/adv26-meta-summarize-yourself.yaml +0 -19
  74. package/dist/cli/attack-corpus/data_extraction/adv26-semantic-decomp-definition.yaml +0 -15
  75. package/dist/cli/attack-corpus/data_extraction/adv26-semantic-decomp-fill-blank.yaml +0 -19
  76. package/dist/cli/attack-corpus/data_extraction/adv26-semantic-decomp-negation.yaml +0 -14
  77. package/dist/cli/attack-corpus/data_extraction/cloud-provider-discovery.yaml +0 -11
  78. package/dist/cli/attack-corpus/data_extraction/config-file-request.yaml +0 -11
  79. package/dist/cli/attack-corpus/data_extraction/cve-2025-echoleak.yaml +0 -17
  80. package/dist/cli/attack-corpus/data_extraction/data-api-key.yaml +0 -11
  81. package/dist/cli/attack-corpus/data_extraction/data-architecture.yaml +0 -11
  82. package/dist/cli/attack-corpus/data_extraction/data-conversation-history.yaml +0 -10
  83. package/dist/cli/attack-corpus/data_extraction/data-credit-card.yaml +0 -15
  84. package/dist/cli/attack-corpus/data_extraction/data-customer-list.yaml +0 -11
  85. package/dist/cli/attack-corpus/data_extraction/data-database.yaml +0 -11
  86. package/dist/cli/attack-corpus/data_extraction/data-employees.yaml +0 -11
  87. package/dist/cli/attack-corpus/data_extraction/data-export.yaml +0 -11
  88. package/dist/cli/attack-corpus/data_extraction/data-inference-v1.yaml +0 -10
  89. package/dist/cli/attack-corpus/data_extraction/data-inference-v2.yaml +0 -10
  90. package/dist/cli/attack-corpus/data_extraction/data-logs.yaml +0 -10
  91. package/dist/cli/attack-corpus/data_extraction/data-model-info.yaml +0 -10
  92. package/dist/cli/attack-corpus/data_extraction/data-password.yaml +0 -11
  93. package/dist/cli/attack-corpus/data_extraction/data-ssn.yaml +0 -11
  94. package/dist/cli/attack-corpus/data_extraction/data-training.yaml +0 -10
  95. package/dist/cli/attack-corpus/data_extraction/dependency-enum.yaml +0 -11
  96. package/dist/cli/attack-corpus/data_extraction/dialogflow-fulfillment-leak.yaml +0 -11
  97. package/dist/cli/attack-corpus/data_extraction/dialogflow-intent-leak.yaml +0 -11
  98. package/dist/cli/attack-corpus/data_extraction/error-induced-leak.yaml +0 -17
  99. package/dist/cli/attack-corpus/data_extraction/error-message-leak.yaml +0 -12
  100. package/dist/cli/attack-corpus/data_extraction/infra-fingerprint.yaml +0 -16
  101. package/dist/cli/attack-corpus/data_extraction/make-scenario-leak.yaml +0 -11
  102. package/dist/cli/attack-corpus/data_extraction/n8n-execution-data.yaml +0 -11
  103. package/dist/cli/attack-corpus/data_extraction/n8n-node-enumeration.yaml +0 -11
  104. package/dist/cli/attack-corpus/data_extraction/n8n-workflow-disclosure.yaml +0 -15
  105. package/dist/cli/attack-corpus/data_extraction/prompt-extraction-v1.yaml +0 -10
  106. package/dist/cli/attack-corpus/data_extraction/prompt-extraction-v2.yaml +0 -11
  107. package/dist/cli/attack-corpus/data_extraction/prompt-extraction-v3.yaml +0 -10
  108. package/dist/cli/attack-corpus/data_extraction/prompt-leak-completion.yaml +0 -10
  109. package/dist/cli/attack-corpus/data_extraction/prompt-leak-indirect.yaml +0 -10
  110. package/dist/cli/attack-corpus/data_extraction/rasa-domain-leak.yaml +0 -11
  111. package/dist/cli/attack-corpus/data_extraction/system-prompt-section.yaml +0 -14
  112. package/dist/cli/attack-corpus/data_extraction/tech-architecture.yaml +0 -16
  113. package/dist/cli/attack-corpus/data_extraction/tool-api-key-exfil.yaml +0 -15
  114. package/dist/cli/attack-corpus/data_extraction/tool-email-exfil.yaml +0 -14
  115. package/dist/cli/attack-corpus/data_extraction/tool-env-extraction.yaml +0 -14
  116. package/dist/cli/attack-corpus/data_extraction/tool-file-read.yaml +0 -16
  117. package/dist/cli/attack-corpus/data_extraction/tool-nosql-injection.yaml +0 -11
  118. package/dist/cli/attack-corpus/data_extraction/tool-payment-manipulation.yaml +0 -11
  119. package/dist/cli/attack-corpus/data_extraction/tool-price-manipulation.yaml +0 -11
  120. package/dist/cli/attack-corpus/data_extraction/tool-session-hijack.yaml +0 -11
  121. package/dist/cli/attack-corpus/data_extraction/tool-sql-injection.yaml +0 -13
  122. package/dist/cli/attack-corpus/data_extraction/tool-webhook-hijack.yaml +0 -13
  123. package/dist/cli/attack-corpus/data_extraction/version-fingerprint.yaml +0 -16
  124. package/dist/cli/attack-corpus/data_extraction/webhook-secret-extraction.yaml +0 -11
  125. package/dist/cli/attack-corpus/data_extraction/webhook-url-enum.yaml +0 -11
  126. package/dist/cli/attack-corpus/data_extraction/workflow-instance-id.yaml +0 -11
  127. package/dist/cli/attack-corpus/data_extraction/workflow-state-leak.yaml +0 -16
  128. package/dist/cli/attack-corpus/data_extraction/zapier-zap-leak.yaml +0 -11
  129. package/dist/cli/attack-corpus/encoding_attack/adv26-adversarial-token-confusion.yaml +0 -13
  130. package/dist/cli/attack-corpus/encoding_attack/base64-decode-request.yaml +0 -14
  131. package/dist/cli/attack-corpus/encoding_attack/base64-injection-v1.yaml +0 -14
  132. package/dist/cli/attack-corpus/encoding_attack/flip-attack-v1.yaml +0 -14
  133. package/dist/cli/attack-corpus/encoding_attack/flip-attack-v2.yaml +0 -14
  134. package/dist/cli/attack-corpus/encoding_attack/token-smuggling.yaml +0 -10
  135. package/dist/cli/attack-corpus/encoding_attack/unicode-homoglyph.yaml +0 -15
  136. package/dist/cli/attack-corpus/encoding_attack/unicode-invisible.yaml +0 -15
  137. package/dist/cli/attack-corpus/encoding_attack/unicode-rtl.yaml +0 -11
  138. package/dist/cli/attack-corpus/encoding_bypass/adv26-compound-encoding-chain.yaml +0 -19
  139. package/dist/cli/attack-corpus/encoding_bypass/adv26-smuggle-acrostic.yaml +0 -26
  140. package/dist/cli/attack-corpus/encoding_bypass/adv26-smuggle-ascii-art.yaml +0 -25
  141. package/dist/cli/attack-corpus/encoding_bypass/adv26-smuggle-emoji-cipher.yaml +0 -22
  142. package/dist/cli/attack-corpus/encoding_bypass/adv26-smuggle-first-word.yaml +0 -15
  143. package/dist/cli/attack-corpus/encoding_bypass/adv26-smuggle-pig-latin.yaml +0 -15
  144. package/dist/cli/attack-corpus/encoding_bypass/encoding-base64-v1.yaml +0 -11
  145. package/dist/cli/attack-corpus/encoding_bypass/encoding-base64-v2.yaml +0 -15
  146. package/dist/cli/attack-corpus/encoding_bypass/encoding-hex-v1.yaml +0 -11
  147. package/dist/cli/attack-corpus/encoding_bypass/encoding-leetspeak-v1.yaml +0 -10
  148. package/dist/cli/attack-corpus/encoding_bypass/encoding-morse-v1.yaml +0 -11
  149. package/dist/cli/attack-corpus/encoding_bypass/encoding-reverse-v1.yaml +0 -11
  150. package/dist/cli/attack-corpus/encoding_bypass/encoding-rot13-v1.yaml +0 -11
  151. package/dist/cli/attack-corpus/encoding_bypass/unicode-tag-injection.yaml +0 -10
  152. package/dist/cli/attack-corpus/encoding_bypass/zero-width-injection.yaml +0 -10
  153. package/dist/cli/attack-corpus/exploitation/exploit-command-injection.yaml +0 -12
  154. package/dist/cli/attack-corpus/exploitation/exploit-path-traversal.yaml +0 -12
  155. package/dist/cli/attack-corpus/exploitation/exploit-sql-injection.yaml +0 -12
  156. package/dist/cli/attack-corpus/exploitation/exploit-sql-union.yaml +0 -12
  157. package/dist/cli/attack-corpus/exploitation/exploit-template-injection.yaml +0 -12
  158. package/dist/cli/attack-corpus/glitch_token/glitch-davidjl.yaml +0 -10
  159. package/dist/cli/attack-corpus/glitch_token/glitch-solidgoldmagikarp.yaml +0 -10
  160. package/dist/cli/attack-corpus/harmful_content/dna-deepfake-guidance.yaml +0 -14
  161. package/dist/cli/attack-corpus/harmful_content/dna-discrimination.yaml +0 -14
  162. package/dist/cli/attack-corpus/harmful_content/dna-information-hazard.yaml +0 -14
  163. package/dist/cli/attack-corpus/harmful_content/dna-malicious-use-phishing.yaml +0 -14
  164. package/dist/cli/attack-corpus/harmful_content/dna-malware-assistance.yaml +0 -16
  165. package/dist/cli/attack-corpus/harmful_content/dna-misinformation-health.yaml +0 -17
  166. package/dist/cli/attack-corpus/jailbreak/adv26-adversarial-few-shot-poison.yaml +0 -27
  167. package/dist/cli/attack-corpus/jailbreak/adv26-adversarial-prompt-refraction.yaml +0 -19
  168. package/dist/cli/attack-corpus/jailbreak/adv26-adversarial-response-prefill.yaml +0 -25
  169. package/dist/cli/attack-corpus/jailbreak/adv26-compound-authority-technical.yaml +0 -24
  170. package/dist/cli/attack-corpus/jailbreak/adv26-context-error-recovery.yaml +0 -19
  171. package/dist/cli/attack-corpus/jailbreak/adv26-context-token-budget.yaml +0 -19
  172. package/dist/cli/attack-corpus/jailbreak/adv26-cot-hijack-proof.yaml +0 -20
  173. package/dist/cli/attack-corpus/jailbreak/adv26-cot-hijack-reasoning.yaml +0 -19
  174. package/dist/cli/attack-corpus/jailbreak/adv26-meta-alignment-test.yaml +0 -22
  175. package/dist/cli/attack-corpus/jailbreak/adv26-persona-memory.yaml +0 -17
  176. package/dist/cli/attack-corpus/jailbreak/adv26-persona-mirror.yaml +0 -16
  177. package/dist/cli/attack-corpus/jailbreak/adv26-persona-split.yaml +0 -17
  178. package/dist/cli/attack-corpus/jailbreak/adv26-persona-timetravel.yaml +0 -15
  179. package/dist/cli/attack-corpus/jailbreak/dan-anti.yaml +0 -16
  180. package/dist/cli/attack-corpus/jailbreak/dan-dude.yaml +0 -16
  181. package/dist/cli/attack-corpus/jailbreak/dan-jailbreak-v1.yaml +0 -21
  182. package/dist/cli/attack-corpus/jailbreak/dan-jailbreak-v2.yaml +0 -19
  183. package/dist/cli/attack-corpus/jailbreak/dan-stan.yaml +0 -16
  184. package/dist/cli/attack-corpus/jailbreak/debug-mode-activation.yaml +0 -20
  185. package/dist/cli/attack-corpus/jailbreak/iris-self-jailbreak.yaml +0 -23
  186. package/dist/cli/attack-corpus/jailbreak/logic-trap-moral.yaml +0 -20
  187. package/dist/cli/attack-corpus/jailbreak/logic-trap-paradox.yaml +0 -17
  188. package/dist/cli/attack-corpus/jailbreak/policy-puppetry-json.yaml +0 -25
  189. package/dist/cli/attack-corpus/jailbreak/policy-puppetry-xml.yaml +0 -20
  190. package/dist/cli/attack-corpus/jailbreak/simulation-mode.yaml +0 -19
  191. package/dist/cli/attack-corpus/latent_injection/adv26-compound-trojan-doc.yaml +0 -26
  192. package/dist/cli/attack-corpus/latent_injection/latent-code-comment-injection.yaml +0 -18
  193. package/dist/cli/attack-corpus/latent_injection/latent-email-injection.yaml +0 -23
  194. package/dist/cli/attack-corpus/latent_injection/latent-report-injection.yaml +0 -21
  195. package/dist/cli/attack-corpus/latent_injection/latent-resume-injection.yaml +0 -23
  196. package/dist/cli/attack-corpus/latent_injection/latent-whois-snippet.yaml +0 -19
  197. package/dist/cli/attack-corpus/multi-turn/multiturn-context-confusion.yaml +0 -20
  198. package/dist/cli/attack-corpus/multi-turn/multiturn-emergency.yaml +0 -20
  199. package/dist/cli/attack-corpus/multi-turn/multiturn-employee-impersonation.yaml +0 -20
  200. package/dist/cli/attack-corpus/multi-turn/multiturn-example-injection.yaml +0 -20
  201. package/dist/cli/attack-corpus/multi-turn/multiturn-jailbreak-buildup.yaml +0 -20
  202. package/dist/cli/attack-corpus/multi-turn/multiturn-memory-manipulation.yaml +0 -20
  203. package/dist/cli/attack-corpus/multi-turn/multiturn-privilege-escalation.yaml +0 -23
  204. package/dist/cli/attack-corpus/multi-turn/multiturn-split-request.yaml +0 -20
  205. package/dist/cli/attack-corpus/multi-turn/multiturn-trust-building.yaml +0 -19
  206. package/dist/cli/attack-corpus/multilingual/multilingual-mixed.yaml +0 -10
  207. package/dist/cli/attack-corpus/multilingual/multilingual-spanish.yaml +0 -10
  208. package/dist/cli/attack-corpus/prompt_injection/adv26-context-fake-history.yaml +0 -16
  209. package/dist/cli/attack-corpus/prompt_injection/adv26-context-sandwich.yaml +0 -18
  210. package/dist/cli/attack-corpus/prompt_injection/adv26-context-system-message.yaml +0 -19
  211. package/dist/cli/attack-corpus/prompt_injection/adv26-crossmodal-yaml.yaml +0 -30
  212. package/dist/cli/attack-corpus/prompt_injection/adv26-semantic-decomp-stepwise.yaml +0 -16
  213. package/dist/cli/attack-corpus/prompt_injection/context-json-injection.yaml +0 -15
  214. package/dist/cli/attack-corpus/prompt_injection/context-markdown-injection.yaml +0 -26
  215. package/dist/cli/attack-corpus/prompt_injection/context-xml-injection.yaml +0 -19
  216. package/dist/cli/attack-corpus/prompt_injection/continuation-code.yaml +0 -16
  217. package/dist/cli/attack-corpus/prompt_injection/continuation-story.yaml +0 -10
  218. package/dist/cli/attack-corpus/prompt_injection/cve-2025-copilot.yaml +0 -17
  219. package/dist/cli/attack-corpus/prompt_injection/ignore-instructions-v1.yaml +0 -14
  220. package/dist/cli/attack-corpus/prompt_injection/ignore-instructions-v2.yaml +0 -16
  221. package/dist/cli/attack-corpus/prompt_injection/ignore-instructions-v3.yaml +0 -18
  222. package/dist/cli/attack-corpus/prompt_injection/indirect-file.yaml +0 -10
  223. package/dist/cli/attack-corpus/prompt_injection/indirect-url.yaml +0 -10
  224. package/dist/cli/attack-corpus/prompt_injection/instruction-hierarchy.yaml +0 -20
  225. package/dist/cli/attack-corpus/prompt_injection/multilang-chain.yaml +0 -16
  226. package/dist/cli/attack-corpus/prompt_injection/multilang-chinese.yaml +0 -10
  227. package/dist/cli/attack-corpus/prompt_injection/multilang-japanese.yaml +0 -11
  228. package/dist/cli/attack-corpus/prompt_injection/multilang-mixed.yaml +0 -10
  229. package/dist/cli/attack-corpus/prompt_injection/multilang-polish.yaml +0 -11
  230. package/dist/cli/attack-corpus/prompt_injection/multilang-spanish.yaml +0 -14
  231. package/dist/cli/attack-corpus/prompt_injection/nested-instruction.yaml +0 -22
  232. package/dist/cli/attack-corpus/prompt_injection/template-injection-v1.yaml +0 -14
  233. package/dist/cli/attack-corpus/prompt_injection/template-injection-v2.yaml +0 -10
  234. package/dist/cli/attack-corpus/prompt_injection/tool-file-write.yaml +0 -13
  235. package/dist/cli/attack-corpus/prompt_injection/tool-function-override.yaml +0 -13
  236. package/dist/cli/attack-corpus/prompt_injection/tool-log-injection.yaml +0 -13
  237. package/dist/cli/attack-corpus/prompt_injection/tool-orchestration-abuse.yaml +0 -14
  238. package/dist/cli/attack-corpus/prompt_injection/tool-session-fixation.yaml +0 -12
  239. package/dist/cli/attack-corpus/role_manipulation/role-reversal-v1.yaml +0 -20
  240. package/dist/cli/attack-corpus/role_manipulation/role-reversal-v2.yaml +0 -16
  241. package/dist/cli/attack-corpus/social_engineering/adv26-compound-compliance-trap.yaml +0 -23
  242. package/dist/cli/attack-corpus/social_engineering/adv26-compound-emotional-technical.yaml +0 -18
  243. package/dist/cli/attack-corpus/social_engineering/adv26-cot-hijack-socratic.yaml +0 -19
  244. package/dist/cli/attack-corpus/social_engineering/adv26-persona-dying.yaml +0 -15
  245. package/dist/cli/attack-corpus/social_engineering/adv26-reward-consensus.yaml +0 -17
  246. package/dist/cli/attack-corpus/social_engineering/adv26-reward-gradient.yaml +0 -21
  247. package/dist/cli/attack-corpus/social_engineering/adv26-reward-helpful-framing.yaml +0 -17
  248. package/dist/cli/attack-corpus/social_engineering/adv26-reward-praise-prime.yaml +0 -13
  249. package/dist/cli/attack-corpus/social_engineering/adv26-reward-punishment.yaml +0 -13
  250. package/dist/cli/attack-corpus/social_engineering/adv26-semantic-decomp-analogy.yaml +0 -16
  251. package/dist/cli/attack-corpus/social_engineering/emotional-authority.yaml +0 -14
  252. package/dist/cli/attack-corpus/social_engineering/emotional-urgency.yaml +0 -14
  253. package/dist/cli/attack-corpus/social_engineering/grandma-bedtime-v1.yaml +0 -21
  254. package/dist/cli/attack-corpus/social_engineering/grandma-bedtime-v2.yaml +0 -17
  255. package/dist/cli/attack-corpus/social_engineering/grandma-colorful-words.yaml +0 -14
  256. package/dist/cli/attack-corpus/social_engineering/hypothetical-fiction.yaml +0 -10
  257. package/dist/cli/attack-corpus/social_engineering/hypothetical-research.yaml +0 -10
  258. package/dist/cli/attack-corpus/social_engineering/hypothetical-training.yaml +0 -13
  259. package/dist/cli/attack-corpus/social_engineering/hypothetical-v1.yaml +0 -17
  260. package/dist/cli/attack-corpus/social_engineering/hypothetical-v2.yaml +0 -14
  261. package/dist/cli/attack-corpus/social_engineering/hypothetical-v3.yaml +0 -14
  262. package/dist/cli/attack-corpus/social_engineering/meta-explanation.yaml +0 -14
  263. package/dist/cli/attack-corpus/social_engineering/phrasing-comparative.yaml +0 -10
  264. package/dist/cli/attack-corpus/social_engineering/phrasing-educational.yaml +0 -14
  265. package/dist/cli/attack-corpus/social_engineering/phrasing-future-tense.yaml +0 -10
  266. package/dist/cli/attack-corpus/social_engineering/phrasing-past-tense.yaml +0 -10
  267. package/dist/cli/attack-corpus/social_engineering/phrasing-third-person.yaml +0 -10
  268. package/dist/cli/attack-corpus/social_engineering/privilege-escalation-v1.yaml +0 -14
  269. package/dist/cli/attack-corpus/social_engineering/privilege-escalation-v2.yaml +0 -14
  270. package/dist/cli/attack-corpus/social_engineering/recursive-explanation.yaml +0 -15
  271. package/dist/cli/attack-corpus/social_engineering/smuggle-academic-paper.yaml +0 -10
  272. package/dist/cli/attack-corpus/social_engineering/smuggle-function-masking.yaml +0 -19
  273. package/dist/cli/attack-corpus/social_engineering/smuggle-hypothetical-response.yaml +0 -10
  274. package/dist/cli/attack-corpus/social_engineering/smuggle-roleplay-interviewer.yaml +0 -12
  275. package/dist/cli/attack-corpus/social_engineering/smuggle-translation-mask.yaml +0 -12
  276. package/dist/cli/attack-corpus/social_engineering/tool-admin-impersonation.yaml +0 -16
  277. package/dist/cli/attack-corpus/social_engineering/tool-sudo-mode.yaml +0 -17
  278. package/dist/cli/attack-corpus/stress_test/context-window-overflow.yaml +0 -17
  279. package/dist/cli/attack-corpus/stress_test/extreme-payload-50k.yaml +0 -13
  280. package/dist/cli/attack-corpus/stress_test/large-payload-10k.yaml +0 -12
  281. package/dist/cli/attack-corpus/stress_test/large-payload-5k.yaml +0 -12
  282. package/dist/cli/attack-corpus/stress_test/long-prompt-exhaustion.yaml +0 -19
  283. package/dist/cli/attack-corpus/stress_test/stress-large-payload.yaml +0 -16
  284. package/dist/cli/attack-corpus/stress_test/stress-repetition.yaml +0 -14
  285. package/dist/cli/backupManifest.d.ts +0 -7
  286. package/dist/cli/backupManifest.js +0 -108
  287. package/dist/cli/commands/agentCi.d.ts +0 -15
  288. package/dist/cli/commands/agentCi.js +0 -418
  289. package/dist/cli/commands/approve.d.ts +0 -17
  290. package/dist/cli/commands/approve.js +0 -40
  291. package/dist/cli/commands/autoProtect.d.ts +0 -10
  292. package/dist/cli/commands/autoProtect.js +0 -154
  293. package/dist/cli/commands/ciProtect.d.ts +0 -44
  294. package/dist/cli/commands/ciProtect.js +0 -123
  295. package/dist/cli/commands/clipboardScan.d.ts +0 -2
  296. package/dist/cli/commands/clipboardScan.js +0 -51
  297. package/dist/cli/commands/cmdGuard.d.ts +0 -41
  298. package/dist/cli/commands/cmdGuard.js +0 -411
  299. package/dist/cli/commands/configure.d.ts +0 -10
  300. package/dist/cli/commands/configure.js +0 -131
  301. package/dist/cli/commands/credits.d.ts +0 -6
  302. package/dist/cli/commands/credits.js +0 -21
  303. package/dist/cli/commands/daemon.d.ts +0 -120
  304. package/dist/cli/commands/daemon.js +0 -2449
  305. package/dist/cli/commands/demoActions.d.ts +0 -117
  306. package/dist/cli/commands/demoActions.js +0 -450
  307. package/dist/cli/commands/desktopChatGuard.d.ts +0 -54
  308. package/dist/cli/commands/desktopChatGuard.js +0 -629
  309. package/dist/cli/commands/deterministicGuard.d.ts +0 -102
  310. package/dist/cli/commands/deterministicGuard.js +0 -1281
  311. package/dist/cli/commands/discover.d.ts +0 -92
  312. package/dist/cli/commands/discover.js +0 -1125
  313. package/dist/cli/commands/discoverAgentFiles.d.ts +0 -36
  314. package/dist/cli/commands/discoverAgentFiles.js +0 -345
  315. package/dist/cli/commands/discoverBlastRadius.d.ts +0 -36
  316. package/dist/cli/commands/discoverBlastRadius.js +0 -201
  317. package/dist/cli/commands/discoverPaths.d.ts +0 -83
  318. package/dist/cli/commands/discoverPaths.js +0 -537
  319. package/dist/cli/commands/discoverProxy.d.ts +0 -46
  320. package/dist/cli/commands/discoverProxy.js +0 -302
  321. package/dist/cli/commands/discoverSchedule.d.ts +0 -12
  322. package/dist/cli/commands/discoverSchedule.js +0 -209
  323. package/dist/cli/commands/discoverSecrets.d.ts +0 -41
  324. package/dist/cli/commands/discoverSecrets.js +0 -608
  325. package/dist/cli/commands/doctor.d.ts +0 -11
  326. package/dist/cli/commands/doctor.js +0 -297
  327. package/dist/cli/commands/ephemeralStack.d.ts +0 -82
  328. package/dist/cli/commands/ephemeralStack.js +0 -185
  329. package/dist/cli/commands/flushSpool.d.ts +0 -13
  330. package/dist/cli/commands/flushSpool.js +0 -28
  331. package/dist/cli/commands/hook.d.ts +0 -141
  332. package/dist/cli/commands/hook.js +0 -1679
  333. package/dist/cli/commands/init.d.ts +0 -1
  334. package/dist/cli/commands/init.js +0 -95
  335. package/dist/cli/commands/installAll.d.ts +0 -22
  336. package/dist/cli/commands/installAll.js +0 -186
  337. package/dist/cli/commands/installClaudeHook.d.ts +0 -39
  338. package/dist/cli/commands/installClaudeHook.js +0 -336
  339. package/dist/cli/commands/installCursorHook.d.ts +0 -33
  340. package/dist/cli/commands/installCursorHook.js +0 -380
  341. package/dist/cli/commands/knownMcpServers.d.ts +0 -8
  342. package/dist/cli/commands/knownMcpServers.js +0 -113
  343. package/dist/cli/commands/local-scan.d.ts +0 -44
  344. package/dist/cli/commands/local-scan.js +0 -3003
  345. package/dist/cli/commands/login.d.ts +0 -17
  346. package/dist/cli/commands/login.js +0 -75
  347. package/dist/cli/commands/mcpGateway.d.ts +0 -119
  348. package/dist/cli/commands/mcpGateway.js +0 -2987
  349. package/dist/cli/commands/onboard.d.ts +0 -41
  350. package/dist/cli/commands/onboard.js +0 -713
  351. package/dist/cli/commands/onboardingJournal.d.ts +0 -20
  352. package/dist/cli/commands/onboardingJournal.js +0 -104
  353. package/dist/cli/commands/posixShellGuard.d.ts +0 -26
  354. package/dist/cli/commands/posixShellGuard.js +0 -410
  355. package/dist/cli/commands/protectionRepair.d.ts +0 -14
  356. package/dist/cli/commands/protectionRepair.js +0 -24
  357. package/dist/cli/commands/restartNotice.d.ts +0 -2
  358. package/dist/cli/commands/restartNotice.js +0 -14
  359. package/dist/cli/commands/scan.d.ts +0 -48
  360. package/dist/cli/commands/scan.js +0 -134
  361. package/dist/cli/commands/shellGuard.d.ts +0 -96
  362. package/dist/cli/commands/shellGuard.js +0 -880
  363. package/dist/cli/commands/taintLedger.d.ts +0 -108
  364. package/dist/cli/commands/taintLedger.js +0 -587
  365. package/dist/cli/commands/uninstallAll.d.ts +0 -67
  366. package/dist/cli/commands/uninstallAll.js +0 -454
  367. package/dist/cli/commands/verifyRemoved.d.ts +0 -24
  368. package/dist/cli/commands/verifyRemoved.js +0 -294
  369. package/dist/cli/commands/watchdog.d.ts +0 -28
  370. package/dist/cli/commands/watchdog.js +0 -158
  371. package/dist/cli/commands/windowsAudit.d.ts +0 -92
  372. package/dist/cli/commands/windowsAudit.js +0 -479
  373. package/dist/cli/commands/workloadProtect.d.ts +0 -61
  374. package/dist/cli/commands/workloadProtect.js +0 -173
  375. package/dist/cli/config.d.ts +0 -130
  376. package/dist/cli/config.js +0 -583
  377. package/dist/cli/credentialStore.d.ts +0 -19
  378. package/dist/cli/credentialStore.js +0 -136
  379. package/dist/cli/daemonForensics.d.ts +0 -178
  380. package/dist/cli/daemonForensics.js +0 -318
  381. package/dist/cli/describeError.d.ts +0 -17
  382. package/dist/cli/describeError.js +0 -74
  383. package/dist/cli/devConfirm.d.ts +0 -78
  384. package/dist/cli/devConfirm.js +0 -241
  385. package/dist/cli/discoveryMarker.d.ts +0 -9
  386. package/dist/cli/discoveryMarker.js +0 -81
  387. package/dist/cli/distress.d.ts +0 -124
  388. package/dist/cli/distress.js +0 -245
  389. package/dist/cli/envDiagnostics.d.ts +0 -53
  390. package/dist/cli/envDiagnostics.js +0 -114
  391. package/dist/cli/honeypot.d.ts +0 -45
  392. package/dist/cli/honeypot.js +0 -190
  393. package/dist/cli/hookIo.d.ts +0 -43
  394. package/dist/cli/hookIo.js +0 -189
  395. package/dist/cli/hookSlim.d.ts +0 -32
  396. package/dist/cli/hookSlim.js +0 -142
  397. package/dist/cli/index.d.ts +0 -2
  398. package/dist/cli/index.js +0 -1141
  399. package/dist/cli/integrity.d.ts +0 -23
  400. package/dist/cli/integrity.js +0 -159
  401. package/dist/cli/localSafetySnapshot.d.ts +0 -49
  402. package/dist/cli/localSafetySnapshot.js +0 -254
  403. package/dist/cli/machineActionVerify.d.ts +0 -58
  404. package/dist/cli/machineActionVerify.js +0 -160
  405. package/dist/cli/machineIdentity.d.ts +0 -23
  406. package/dist/cli/machineIdentity.js +0 -235
  407. package/dist/cli/machineKeyFile.d.ts +0 -25
  408. package/dist/cli/machineKeyFile.js +0 -226
  409. package/dist/cli/notify.d.ts +0 -30
  410. package/dist/cli/notify.js +0 -139
  411. package/dist/cli/output.d.ts +0 -11
  412. package/dist/cli/output.js +0 -292
  413. package/dist/cli/perfSnapshot.d.ts +0 -113
  414. package/dist/cli/perfSnapshot.js +0 -274
  415. package/dist/cli/policyGateHealth.d.ts +0 -45
  416. package/dist/cli/policyGateHealth.js +0 -135
  417. package/dist/cli/pollLoop.d.ts +0 -78
  418. package/dist/cli/pollLoop.js +0 -160
  419. package/dist/cli/runtimeConfig.d.ts +0 -183
  420. package/dist/cli/runtimeConfig.js +0 -474
  421. package/dist/cli/securityAgents.d.ts +0 -26
  422. package/dist/cli/securityAgents.js +0 -65
  423. package/dist/cli/selfTest.d.ts +0 -48
  424. package/dist/cli/selfTest.js +0 -212
  425. package/dist/cli/selfUpdate.d.ts +0 -101
  426. package/dist/cli/selfUpdate.js +0 -515
  427. package/dist/cli/sessionLimits.d.ts +0 -76
  428. package/dist/cli/sessionLimits.js +0 -330
  429. package/dist/cli/telemetry.d.ts +0 -134
  430. package/dist/cli/telemetry.js +0 -433
  431. package/dist/cli/verdictIpc.d.ts +0 -30
  432. package/dist/cli/verdictIpc.js +0 -244
  433. package/dist/cli/verdictIpcClient.d.ts +0 -103
  434. package/dist/cli/verdictIpcClient.js +0 -251
  435. package/dist/cli/version.json +0 -3
  436. package/dist/cli/windowsTaskState.d.ts +0 -40
  437. package/dist/cli/windowsTaskState.js +0 -43
package/dist/client.d.ts CHANGED
@@ -1,5 +1,8 @@
1
1
  import { AgentRegistrationInput, AgentContextSecurityInput, AgentContextSecurityResult, AgentSecurityApiResult, AgentToolCallCheckResult, AgentToolCallInput, FullCourtDefenseConfig, FullCourtDefenseFeatures, McpScanResult, McpToolResult, ProtectMcpToolResponseOptions, ProtectOptions, RagScanResult, ScanMetadata, ScanResult, ShieldResult } from './types';
2
2
  import { _clearCircuitBreakers } from './circuitBreaker';
3
+ import { AnthropicToolHandler, AnthropicToolOptions, AnthropicToolResultBlock } from './anthropic';
4
+ import { type AgentIdSource } from './identity';
5
+ import { type SpooledRecord } from './recordSpool';
3
6
  export { _clearCircuitBreakers };
4
7
  /** Thrown when a text-scanning call is made while `features.textScan` is off. */
5
8
  export declare class TextScanDisabledError extends Error {
@@ -15,22 +18,80 @@ export interface GuardToolCallOptions {
15
18
  resultSummary?: (result: unknown) => string;
16
19
  /** Build the error thrown when the call is blocked or approval is denied. Default: plain `Error`. */
17
20
  onBlocked?: (reason: string) => Error;
21
+ /**
22
+ * Monitor mode records the call fire-and-forget. Set for short-lived hosts
23
+ * (AWS Lambda freezes the process when the handler returns) so the record
24
+ * finishes before the result is returned. It runs alongside the tool, not
25
+ * before it, and the extra wait after the tool is capped (RECORD_FLUSH_MAX_MS).
26
+ */
27
+ awaitRecord?: boolean;
18
28
  }
19
29
  /** Identity attached to every runtime action this client reports. */
20
30
  export interface RuntimeIdentity {
21
- agentId?: string;
31
+ /** Never empty: the configured / declared id, else a default from the service or process name. */
32
+ agentId: string;
33
+ /** Where `agentId` came from: `config` (constructor), `env` (FCD_AGENT_ID, ...) or `default` (derived). */
34
+ agentIdSource: AgentIdSource;
22
35
  agentInstanceId: string;
23
36
  environment?: string;
24
37
  }
25
38
  export declare class FullCourtDefense {
26
39
  private config;
27
40
  private failClosedOperations;
41
+ /** FCD_FAIL_MODE: what Block mode does while the API is unreachable (undefined = SDK 2.0 behaviour). */
42
+ private readonly failMode?;
43
+ /** FCD_MODE_AT_PROTECT: the shield's mode when Protect switched the agent on (cold start, API down). */
44
+ private readonly modeAtProtect?;
45
+ /** Calls decided without a check while the API was unreachable; sent (the alert) once it is back. */
46
+ private readonly skippedChecks;
47
+ private skippedFlush?;
48
+ /** Calls that ran before the first mode lookup answered; their record follows the answer (and survives an early exit). */
49
+ private readonly awaitingMode;
50
+ /** HTTP statuses (401 / 403 / 404 / 400) already reported on stderr by this client. */
51
+ private readonly reportedConfigErrors;
52
+ /** O4: a Monitor call ran with a refused key or shield and stderr said so (once, without onDegrade). */
53
+ private warnedMonitorConfigError;
28
54
  private onDegrade?;
55
+ /** Where Block-mode calls are decided (`local` = from the bundle, in this process). */
56
+ private readonly decisionMode;
57
+ /** Local decisions: until this time (ms epoch) a Block-mode call may wait for the first bundle; never after. */
58
+ private readonly coldStartDeadline;
59
+ /** Records of locally decided calls (and Monitor records in local mode), sent in background batches. */
60
+ private readonly records;
61
+ /** One warning when a Block-mode call ran before any policy bundle was available. */
62
+ private warnedNoBundle;
63
+ /** guardToolCall's calls: the local decision's record is handed back here and written after the tool ran. */
64
+ private readonly deferredLocalRecords;
29
65
  private breaker;
30
66
  private readonly _identity;
31
67
  private readonly _features;
32
68
  chat: ChatNamespace;
33
69
  constructor(config?: FullCourtDefenseConfig);
70
+ /**
71
+ * Local decisions: refresh the bundle every BUNDLE_REFRESH_MS in the background (stale-while-revalidate), one
72
+ * timer per shield, never keeping the process alive. A call never waits for it; a failed refresh keeps the
73
+ * last bundle (the policies a live answer gave) and the next tick tries again.
74
+ */
75
+ private _startBundleRefresh;
76
+ /**
77
+ * Wait (at most `timeoutMs`, default 3 s) for the shield's mode and policies, at START-UP, outside any tool call.
78
+ * Local decisions never wait inside a call: a call made before the first bundle arrives runs and is reported. An
79
+ * agent that must have its first call checked awaits this once after building the client (a Lambda handler during
80
+ * its init). Resolves true when the policies are here, false when FullCourtDefense did not answer in time. Never throws.
81
+ */
82
+ ready(timeoutMs?: number): Promise<boolean>;
83
+ /** The bundle for a local decision, or undefined (none yet, or the backend serves no policies to decide from). */
84
+ private _localBundle;
85
+ /** One queued record to the record endpoint (RecordQueue's sender). */
86
+ private _sendQueuedRecord;
87
+ /** Queue a record for the background batches; kept across the end of the process (exit flush, local spool). */
88
+ private _enqueueRecord;
89
+ /** Send the records an earlier process left in the local spool (once per shield per process, off the first tick). */
90
+ private _replaySpooledRecords;
91
+ /** @internal Calls held in memory, as request bodies for the local spool (called at exit). */
92
+ _takeUnsentForSpool(): SpooledRecord[];
93
+ /** @internal Send the calls spooled while the API was down and the queued records (called at `beforeExit`; the caller bounds the wait). */
94
+ _flushForExit(): Promise<void>;
34
95
  /** Identity recorded on every runtime action (agentId / agentInstanceId / environment). */
35
96
  get identity(): Readonly<RuntimeIdentity>;
36
97
  /** Effective feature flags. */
@@ -39,9 +100,21 @@ export declare class FullCourtDefense {
39
100
  /**
40
101
  * Merge client-level identity into a tool-call input. Call-level values win;
41
102
  * `agentName` falls back to `agentId` so callers never have to repeat it.
103
+ * `agentIdSource` says whether the id was configured, declared in the
104
+ * environment, or derived from the service / process name. A name passed in
105
+ * code (`agentName` or `agentId` on the call, or `protect(tool, { agentName })`)
106
+ * is declared: `config`, even when the client's own id was derived. Otherwise a
107
+ * shield with "Require agent identity" would refuse an agent named the
108
+ * documented way (review of #2730 / #2729).
42
109
  */
43
110
  private withIdentity;
44
111
  protect<T extends object>(target: T, options?: ProtectOptions): T;
112
+ /**
113
+ * Anthropic SDK tool use: run the `tool_use` blocks of one assistant message through the action gate and get the
114
+ * `tool_result` blocks to send back. A stopped call never runs; its block is an error block carrying the reason.
115
+ * const results = await fcd.anthropicToolResults(response.content, { read_customer, send_email });
116
+ */
117
+ anthropicToolResults(content: unknown, handlers: Record<string, AnthropicToolHandler>, options?: AnthropicToolOptions): Promise<AnthropicToolResultBlock[]>;
45
118
  /**
46
119
  * Decide whether a degraded call should fail CLOSED (block) instead of the
47
120
  * default fail-open allow. A per-call `failClosed` override wins; otherwise
@@ -49,6 +122,13 @@ export declare class FullCourtDefense {
49
122
  */
50
123
  private shouldFailClosed;
51
124
  private breakerState;
125
+ /**
126
+ * The tool-call check may go to the network only while the breaker is CLOSED. Otherwise it answers from the fail mode at
127
+ * once, and (at most every `probeIntervalMs`) a background probe of the API runs; nothing waits for it.
128
+ */
129
+ private _toolCheckAllowed;
130
+ /** The background probe: a mode lookup. Any HTTP answer means the API is back (a refused key is answered by the next check). */
131
+ private _probeApi;
52
132
  /** True when the breaker permits a real backend fetch (or there is no breaker). */
53
133
  private breakerAllows;
54
134
  private emitDegrade;
@@ -59,7 +139,49 @@ export declare class FullCourtDefense {
59
139
  * `'enforce'` — synchronous verdict path (block mode / unknown mode).
60
140
  */
61
141
  private _getEffectiveMode;
142
+ /**
143
+ * The mode a TOOL CALL runs under. Same as `_resolveMode`, except that a mode nobody could read (the API was down since
144
+ * this process started, no live answer, no FCD_MODE_AT_PROTECT) is Monitor, not Block: a Monitor agent never blocks, so a
145
+ * call that cannot know the mode runs, and is reported as unconfirmed once the API answers (owner decision 2026-10-27).
146
+ * A refused key or shield (HTTP 401 / 403 / 404) is not "unknown": it keeps its own rule.
147
+ */
148
+ private _resolveToolMode;
149
+ private _adjustToolMode;
150
+ /**
151
+ * May the FIRST call of this process run before the shield mode is known (B8)? Only when the mode recorded on the agent
152
+ * (FCD_MODE_AT_PROTECT, written by Protect) says Monitor: a Monitor agent never waits for FullCourtDefense. With a recorded
153
+ * Block, or no recorded mode, the first call waits for the lookup and the verdict (bounded by MODE_FETCH_TIMEOUT_MS): running
154
+ * the first call of a shield whose mode nobody has read could run it unchecked on a Block shield. The lookup starts when the
155
+ * client is built, so it is usually warm by the first call.
156
+ */
157
+ private _mayRunBeforeModeKnown;
158
+ /**
159
+ * `_getEffectiveMode`, plus whether a live answer confirmed the mode (false = recorded on the agent, or assumed).
160
+ * `noWaitWhenUnknown`: a first lookup still running is not waited for; the result says Monitor (unconfirmed) with
161
+ * `pending` resolving to what the lookup settles on.
162
+ */
163
+ private _resolveMode;
164
+ /** Start (or join) the first mode lookup of this process; the answer is applied to the cache exactly once. */
165
+ private _firstLookup;
166
+ /** What a finished mode lookup means: store it in the cache and say which mode the call that asked runs under. */
167
+ private _applyFetchedMode;
62
168
  private _fetchShieldMode;
169
+ /**
170
+ * Say once per status, on stderr, that the API refused this client's configuration
171
+ * (wrong key, unknown shield, refused request). Returns the error the caller throws.
172
+ */
173
+ private _reportConfigurationError;
174
+ /** The never-allowed rules from the last successful lookup (empty before the first one). */
175
+ private _failsafeRules;
176
+ /** The tool-call record that reports a call decided without a check (the alert). */
177
+ private _skippedCheckBody;
178
+ /** Hold a call decided without a check until the API answers; kept across an early exit (local spool). */
179
+ private _spoolCheck;
180
+ /**
181
+ * Send the calls decided without a check (FCD_FAIL_MODE) as tool-call records the server turns into
182
+ * a security alert. One in flight at a time; an entry that could not be sent goes back to the spool.
183
+ */
184
+ private _flushSkippedChecks;
63
185
  /**
64
186
  * Fire-and-forget event report (monitor mode). Never awaited on the caller's
65
187
  * hot path; every failure is swallowed — reporting must never affect the agent.
@@ -106,12 +228,74 @@ export declare class FullCourtDefense {
106
228
  registerAgent(input: AgentRegistrationInput): Promise<AgentSecurityApiResult>;
107
229
  recordToolCall(rawInput: AgentToolCallInput): Promise<AgentSecurityApiResult>;
108
230
  checkToolCall(rawInput: AgentToolCallInput): Promise<AgentSecurityApiResult<AgentToolCallCheckResult>>;
231
+ /**
232
+ * A Block-mode call decided in this process from the bundle, or undefined when the server decides it (server
233
+ * decision mode, a manager approval, a call the bundle cannot decide, a backend that serves no policies, a
234
+ * refused key). With no bundle at all (FullCourtDefense never reached since this agent started), the call is
235
+ * answered by the fail mode at once: it runs (only a never-allowed rule stops one), it is recorded, and one
236
+ * warning says so. Never a request, never a wait.
237
+ */
238
+ private _decideLocal;
239
+ /**
240
+ * The record of a locally decided call, for the existing record endpoint (`POST /runtime/tool-call`): what was
241
+ * decided and by which rule, the arguments as their summary (the server minimizes them as for every SDK record),
242
+ * the provider's tool-call id (one action = one record when a local AI gateway also saw it), and how the tool
243
+ * ended when it ran.
244
+ */
245
+ private _localRecordBody;
246
+ /**
247
+ * The record of a call that runs in Monitor (it never waits for it):
248
+ * - the API refused the key or shield (O4): the call runs; its report goes to the API anyway, where
249
+ * the refusal raises the shield's key alert (`tamper.agent_key_rejected`), and `onDegrade` says so;
250
+ * - a mode no live answer confirmed (cold start, API down): spooled, reported once the API answers;
251
+ * - otherwise the Monitor record, with a fact in place of arguments the API could not check.
252
+ * Resolves when the record was sent (or immediately when it was spooled); never rejects.
253
+ */
254
+ private _recordMonitorCall;
255
+ /** The Monitor record (`monitor_mode_async`), with a fact in place of arguments the API could not check. */
256
+ private _sendMonitorRecord;
257
+ /**
258
+ * The SDK's own definite answer for a call whose arguments the API could not check (nested deeper than
259
+ * 32 levels, more than 20,000 values, or not encodable as JSON): stopped, as the API answers the same
260
+ * call on a Block shield. Not an outage: no fail mode, no breaker failure, nothing spooled. A record
261
+ * with a fact instead of the arguments goes to the API in the background.
262
+ */
263
+ private _argsProblemVerdict;
264
+ /**
265
+ * A Monitor call made on a mode no live answer confirmed: the mode recorded on the agent
266
+ * (FCD_MODE_AT_PROTECT) during a cold start with the API down. It runs (Monitor never blocks),
267
+ * but it is never silent: spooled as `unconfirmed_monitor` and reported once the API answers,
268
+ * when the server alerts if the shield is in Block by then (the recorded mode was out of date).
269
+ * No record now: the API did not answer the mode lookup moments ago, so it would only wait.
270
+ */
271
+ private _spoolUnconfirmedMonitor;
272
+ /**
273
+ * FCD_FAIL_MODE (owner decision 2026-10-19): decide a Block-mode tool call the API could not
274
+ * check — never-allowed rules and the high-risk names stop it (tiered), or everything does
275
+ * (closed); the rest runs. Either way the call is spooled and alerted once the API is back.
276
+ */
277
+ private _degradeByFailMode;
109
278
  checkContext(input: AgentContextSecurityInput): Promise<AgentSecurityApiResult<AgentContextSecurityResult>>;
110
279
  guardToolCall<T>(rawInput: AgentToolCallInput, action: () => Promise<T>, options?: GuardToolCallOptions): Promise<T>;
280
+ /**
281
+ * Run (or stop) a call decided locally, and write its ONE record afterwards in the background: a stopped call
282
+ * at once, an allowed call with how it ended (`executed`, or `failed` with the error's type name only).
283
+ */
284
+ private _runLocallyDecided;
285
+ /**
286
+ * How an allowed call ended. When the check returned the gate record's `actionId` (backends with
287
+ * the G-11 outcome report), the outcome goes ON that record: no second record, and a failure
288
+ * carries its error type only. With an older backend, the 2.0 post-run record, except that a tool
289
+ * that failed is an allowed call that failed (decision `allow`, error type only), never a `block`
290
+ * carrying the tool's error text. Sent in the background; `awaitRecord` (Lambda) waits for it,
291
+ * capped like the monitor record.
292
+ */
293
+ private _reportOutcome;
111
294
  private _waitForApproval;
112
295
  private _getApprovalStatus;
113
296
  private _markApprovalExecuted;
114
297
  private _postAgentSecurity;
298
+ private _postEncoded;
115
299
  }
116
300
  declare class ChatNamespace {
117
301
  completions: Completions;