@oscharko-dev/keiko 0.3.14 → 0.3.16

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 (584) hide show
  1. package/dist/ui/csp-hashes.json +12 -12
  2. package/dist/ui/static/404.html +1 -1
  3. package/dist/ui/static/__next.__PAGE__.txt +2 -2
  4. package/dist/ui/static/__next._full.txt +3 -3
  5. package/dist/ui/static/__next._head.txt +1 -1
  6. package/dist/ui/static/__next._index.txt +1 -1
  7. package/dist/ui/static/__next._tree.txt +1 -1
  8. package/dist/ui/static/_next/static/chunks/06zt_mdjfd0l1.js +1 -0
  9. package/dist/ui/static/_next/static/chunks/0bhehe35iyqjr.js +1 -0
  10. package/dist/ui/static/_next/static/chunks/0ebqhb4-lqo3_.js +1 -0
  11. package/dist/ui/static/_next/static/chunks/0kllmzwq3m4t6.js +1 -0
  12. package/dist/ui/static/_next/static/chunks/0loqi-w3in9hh.js +7 -0
  13. package/dist/ui/static/_next/static/chunks/{2lz9ujlsm75kc.js → 0nthfqbd4m5rn.js} +1 -1
  14. package/dist/ui/static/_next/static/chunks/{0npbfd_er47xu.js → 0te_d7ls2ozkc.js} +1 -1
  15. package/dist/ui/static/_next/static/chunks/{167niw9we0b7n.js → 0u5u7e3fbq3rx.js} +1 -1
  16. package/dist/ui/static/_next/static/chunks/{2wbqxdm82mc6g.js → 0wxc3q97-jil3.js} +1 -1
  17. package/dist/ui/static/_next/static/chunks/{0kefabslo9zpa.js → 1-p5-rt-7uxi_.js} +1 -1
  18. package/dist/ui/static/_next/static/chunks/{1_m1z_f54hkji.js → 12te-wibzf1gs.js} +1 -1
  19. package/dist/ui/static/_next/static/chunks/{2uj0n49ihyt_7.js → 15sh7n1wjfckc.js} +1 -1
  20. package/dist/ui/static/_next/static/chunks/{1q2fca11xb2x0.js → 16gc6p4mobbkd.js} +1 -1
  21. package/dist/ui/static/_next/static/chunks/{0rvhrleg8f98b.js → 1749gpptuos4d.js} +1 -1
  22. package/dist/ui/static/_next/static/chunks/{3-4iik5ytvbed.js → 18o-euqluhpfn.js} +1 -1
  23. package/dist/ui/static/_next/static/chunks/1a35cd2uz40rm.js +1 -0
  24. package/dist/ui/static/_next/static/chunks/1fdowulgpx-tu.js +1 -0
  25. package/dist/ui/static/_next/static/chunks/{2jztaj4km0-p1.js → 1gg0sjnr8ce0_.js} +1 -1
  26. package/dist/ui/static/_next/static/chunks/1isat9t7mn8mx.js +1 -0
  27. package/dist/ui/static/_next/static/chunks/1nminehwt46sj.js +5 -0
  28. package/dist/ui/static/_next/static/chunks/1t1vm08xtco3a.js +1 -0
  29. package/dist/ui/static/_next/static/chunks/{40pywkvvth6qk.js → 1tu5p76jk6tu8.js} +1 -1
  30. package/dist/ui/static/_next/static/chunks/1upn5gu7c_j2v.js +1 -0
  31. package/dist/ui/static/_next/static/chunks/{0x8zukfn36b67.js → 1vq07gr__1fql.js} +1 -1
  32. package/dist/ui/static/_next/static/chunks/1wj5_uetggavn.js +1 -0
  33. package/dist/ui/static/_next/static/chunks/1xoioc6pnmeb3.js +1 -0
  34. package/dist/ui/static/_next/static/chunks/{339a2jjs3kjwj.js → 1xy001hdmhglo.js} +1 -1
  35. package/dist/ui/static/_next/static/chunks/{06zsbt3vzj_fx.js → 1za1-6o9oz1k5.js} +1 -1
  36. package/dist/ui/static/_next/static/chunks/{2skeghhuyv_c4.js → 299tu7y81dxk5.js} +1 -1
  37. package/dist/ui/static/_next/static/chunks/2d9gg91izncw0.js +1 -0
  38. package/dist/ui/static/_next/static/chunks/2evpuk4qo0lx3.js +1 -0
  39. package/dist/ui/static/_next/static/chunks/2fxkefwnb8y51.js +1 -0
  40. package/dist/ui/static/_next/static/chunks/{36z66lssar4oh.js → 2oqlt-9yz4qtf.js} +1 -1
  41. package/dist/ui/static/_next/static/chunks/2uu6q4bct_8uw.js +1 -0
  42. package/dist/ui/static/_next/static/chunks/2xi5lcexfddf9.js +1 -0
  43. package/dist/ui/static/_next/static/chunks/{1we__nb0syt11.js → 2y1e1t_x6totm.js} +1 -1
  44. package/dist/ui/static/_next/static/chunks/{001y_5k3kms8o.js → 339wsi27r9-nw.js} +1 -1
  45. package/dist/ui/static/_next/static/chunks/3b2-z8pj0i91u.js +1 -0
  46. package/dist/ui/static/_next/static/chunks/3ba_mrp8s5-2v.js +1 -0
  47. package/dist/ui/static/_next/static/chunks/{2bzjr2ai0a8hq.js → 3cuvu8nxos4fw.js} +1 -1
  48. package/dist/ui/static/_next/static/chunks/{43fq84z1snp1a.js → 3j-m1jy0sfg3x.js} +1 -1
  49. package/dist/ui/static/_next/static/chunks/3rqegw8x3e8l1.js +1 -0
  50. package/dist/ui/static/_next/static/chunks/{3mmcvq93ws1o_.js → 3yhyg862owqrl.js} +1 -1
  51. package/dist/ui/static/_not-found/__next._full.txt +1 -1
  52. package/dist/ui/static/_not-found/__next._head.txt +1 -1
  53. package/dist/ui/static/_not-found/__next._index.txt +1 -1
  54. package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
  55. package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
  56. package/dist/ui/static/_not-found/__next._tree.txt +1 -1
  57. package/dist/ui/static/_not-found.html +1 -1
  58. package/dist/ui/static/_not-found.txt +1 -1
  59. package/dist/ui/static/atlassian-connectors/__next._full.txt +5 -5
  60. package/dist/ui/static/atlassian-connectors/__next._head.txt +1 -1
  61. package/dist/ui/static/atlassian-connectors/__next._index.txt +1 -1
  62. package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
  63. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +2 -2
  64. package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.txt +2 -2
  65. package/dist/ui/static/atlassian-connectors.html +1 -1
  66. package/dist/ui/static/atlassian-connectors.txt +5 -5
  67. package/dist/ui/static/index.html +1 -1
  68. package/dist/ui/static/index.txt +3 -3
  69. package/dist/ui/static/launch/__next._full.txt +3 -3
  70. package/dist/ui/static/launch/__next._head.txt +1 -1
  71. package/dist/ui/static/launch/__next._index.txt +1 -1
  72. package/dist/ui/static/launch/__next._tree.txt +1 -1
  73. package/dist/ui/static/launch/__next.launch.__PAGE__.txt +2 -2
  74. package/dist/ui/static/launch/__next.launch.txt +1 -1
  75. package/dist/ui/static/launch.html +1 -1
  76. package/dist/ui/static/launch.txt +3 -3
  77. package/dist/ui/static/local-knowledge/__next._full.txt +3 -3
  78. package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
  79. package/dist/ui/static/local-knowledge/__next._index.txt +1 -1
  80. package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
  81. package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +2 -2
  82. package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
  83. package/dist/ui/static/local-knowledge/capsule/__next._full.txt +5 -5
  84. package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
  85. package/dist/ui/static/local-knowledge/capsule/__next._index.txt +1 -1
  86. package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
  87. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +2 -2
  88. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +2 -2
  89. package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
  90. package/dist/ui/static/local-knowledge/capsule.html +1 -1
  91. package/dist/ui/static/local-knowledge/capsule.txt +5 -5
  92. package/dist/ui/static/local-knowledge.html +1 -1
  93. package/dist/ui/static/local-knowledge.txt +3 -3
  94. package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts +31 -2
  95. package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts.map +1 -1
  96. package/node_modules/@oscharko-dev/keiko-cli/dist/audit.js +91 -13
  97. package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.d.ts +5 -1
  98. package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.d.ts.map +1 -1
  99. package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.js +134 -22
  100. package/node_modules/@oscharko-dev/keiko-cli/dist/repair.d.ts.map +1 -1
  101. package/node_modules/@oscharko-dev/keiko-cli/dist/repair.js +1 -0
  102. package/node_modules/@oscharko-dev/keiko-cli/dist/runner.d.ts.map +1 -1
  103. package/node_modules/@oscharko-dev/keiko-cli/dist/runner.js +4 -0
  104. package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts +1 -1
  105. package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts.map +1 -1
  106. package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.js +35 -14
  107. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts +46 -0
  108. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts.map +1 -0
  109. package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.js +373 -0
  110. package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts +91 -0
  111. package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts.map +1 -0
  112. package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.js +306 -0
  113. package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts +38 -0
  114. package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts.map +1 -0
  115. package/node_modules/@oscharko-dev/keiko-cli/dist/support.js +338 -0
  116. package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts +20 -2
  117. package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts.map +1 -1
  118. package/node_modules/@oscharko-dev/keiko-cli/dist/ui.js +279 -18
  119. package/node_modules/@oscharko-dev/keiko-cli/package.json +13 -13
  120. package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
  121. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +15 -0
  122. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -0
  123. package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +121 -0
  124. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +7 -2
  125. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
  126. package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +11 -2
  127. package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts +22 -0
  128. package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts.map +1 -0
  129. package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.js +46 -0
  130. package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.d.ts +40 -0
  131. package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.d.ts.map +1 -0
  132. package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.js +123 -0
  133. package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
  134. package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
  135. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
  136. package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
  137. package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
  138. package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
  139. package/node_modules/@oscharko-dev/keiko-harness/dist/adapters.d.ts +5 -5
  140. package/node_modules/@oscharko-dev/keiko-harness/dist/adapters.d.ts.map +1 -1
  141. package/node_modules/@oscharko-dev/keiko-harness/dist/adapters.js +3 -0
  142. package/node_modules/@oscharko-dev/keiko-harness/dist/ports.d.ts +3 -3
  143. package/node_modules/@oscharko-dev/keiko-harness/dist/ports.d.ts.map +1 -1
  144. package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
  145. package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
  146. package/node_modules/@oscharko-dev/keiko-harness/package.json +6 -6
  147. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.d.ts +2 -0
  148. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.d.ts.map +1 -1
  149. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.js +1 -0
  150. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts +2 -1
  151. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts.map +1 -1
  152. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.js +4 -1
  153. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts +1 -0
  154. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
  155. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +341 -62
  156. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.d.ts.map +1 -1
  157. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.js +601 -132
  158. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts +9 -0
  159. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts.map +1 -1
  160. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts +20 -0
  161. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts.map +1 -0
  162. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.js +155 -0
  163. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.d.ts +2 -0
  164. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.d.ts.map +1 -1
  165. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.js +1 -0
  166. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.d.ts +2 -0
  167. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.d.ts.map +1 -1
  168. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.js +1 -0
  169. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts +2 -0
  170. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts.map +1 -1
  171. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.js +33 -3
  172. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.d.ts +2 -0
  173. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.d.ts.map +1 -1
  174. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.js +25 -1
  175. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.d.ts +2 -0
  176. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.d.ts.map +1 -1
  177. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.js +21 -3
  178. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/vector-index.d.ts +3 -0
  179. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/vector-index.d.ts.map +1 -1
  180. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/vector-index.js +2 -0
  181. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts +4 -1
  182. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts.map +1 -1
  183. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.js +41 -6
  184. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts +13 -0
  185. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts.map +1 -1
  186. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.js +118 -3
  187. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
  188. package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
  189. package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
  190. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
  191. package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
  192. package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
  193. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
  194. package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
  195. package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
  196. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
  197. package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
  198. package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
  199. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
  200. package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
  201. package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
  202. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.d.ts +12 -0
  203. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.d.ts.map +1 -1
  204. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.js +32 -0
  205. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts +12 -2
  206. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts.map +1 -1
  207. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.js +171 -7
  208. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.d.ts +2 -0
  209. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.d.ts.map +1 -1
  210. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.js +17 -0
  211. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.d.ts +25 -1
  212. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.d.ts.map +1 -1
  213. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.js +56 -4
  214. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts +2 -1
  215. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts.map +1 -1
  216. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.js +15 -4
  217. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts +30 -0
  218. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts.map +1 -0
  219. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.js +139 -0
  220. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.d.ts +21 -1
  221. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.d.ts.map +1 -1
  222. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.js +37 -8
  223. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
  224. package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
  225. package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
  226. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +18 -2
  227. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
  228. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +216 -18
  229. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts +3 -0
  230. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
  231. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +188 -23
  232. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +4 -1
  233. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
  234. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +14 -0
  235. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts +27 -0
  236. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts.map +1 -0
  237. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.js +193 -0
  238. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
  239. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +1 -1
  240. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts +5 -0
  241. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
  242. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +286 -68
  243. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/replay.d.ts +15 -0
  244. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/replay.d.ts.map +1 -0
  245. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/replay.js +88 -0
  246. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +23 -5
  247. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
  248. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +160 -27
  249. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
  250. package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
  251. package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +3 -3
  252. package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
  253. package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
  254. package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
  255. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts +2 -1
  256. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
  257. package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +13 -1
  258. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +2 -0
  259. package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
  260. package/node_modules/@oscharko-dev/keiko-security/dist/index.js +1 -0
  261. package/node_modules/@oscharko-dev/keiko-security/dist/log-port.d.ts +20 -0
  262. package/node_modules/@oscharko-dev/keiko-security/dist/log-port.d.ts.map +1 -0
  263. package/node_modules/@oscharko-dev/keiko-security/dist/log-port.js +130 -0
  264. package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.d.ts +10 -0
  265. package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.d.ts.map +1 -1
  266. package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.js +43 -1
  267. package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.d.ts +22 -1
  268. package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.d.ts.map +1 -1
  269. package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.js +53 -10
  270. package/node_modules/@oscharko-dev/keiko-security/dist/sqlite-corruption.d.ts +3 -0
  271. package/node_modules/@oscharko-dev/keiko-security/dist/sqlite-corruption.d.ts.map +1 -1
  272. package/node_modules/@oscharko-dev/keiko-security/dist/sqlite-corruption.js +12 -3
  273. package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
  274. package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
  275. package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
  276. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialVault.d.ts +2 -0
  277. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialVault.d.ts.map +1 -1
  278. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialVault.js +1 -0
  279. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncRoutes.d.ts.map +1 -1
  280. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncRoutes.js +4 -3
  281. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncService.d.ts.map +1 -1
  282. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncService.js +4 -0
  283. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/wiring.d.ts +2 -0
  284. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/wiring.d.ts.map +1 -1
  285. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/wiring.js +1 -0
  286. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/writeActionRoutes.d.ts.map +1 -1
  287. package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/writeActionRoutes.js +4 -3
  288. package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts +5 -1
  289. package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts.map +1 -1
  290. package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.js +131 -3
  291. package/node_modules/@oscharko-dev/keiko-server/dist/browser.d.ts +1 -1
  292. package/node_modules/@oscharko-dev/keiko-server/dist/browser.d.ts.map +1 -1
  293. package/node_modules/@oscharko-dev/keiko-server/dist/browser.js +10 -3
  294. package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.d.ts.map +1 -1
  295. package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.js +9 -2
  296. package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.d.ts.map +1 -1
  297. package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.js +26 -12
  298. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts +15 -2
  299. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
  300. package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +122 -28
  301. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
  302. package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +50 -36
  303. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts +5 -0
  304. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts.map +1 -0
  305. package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.js +150 -0
  306. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codingContextRoutes.d.ts.map +1 -1
  307. package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codingContextRoutes.js +3 -1
  308. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
  309. package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +20 -6
  310. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
  311. package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +8 -6
  312. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-attachment-store.d.ts +9 -0
  313. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-attachment-store.d.ts.map +1 -1
  314. package/node_modules/@oscharko-dev/keiko-server/dist/conversation-attachment-store.js +2 -0
  315. package/node_modules/@oscharko-dev/keiko-server/dist/correlation.d.ts +1 -0
  316. package/node_modules/@oscharko-dev/keiko-server/dist/correlation.d.ts.map +1 -1
  317. package/node_modules/@oscharko-dev/keiko-server/dist/correlation.js +9 -0
  318. package/node_modules/@oscharko-dev/keiko-server/dist/credentialPersistence.d.ts +5 -0
  319. package/node_modules/@oscharko-dev/keiko-server/dist/credentialPersistence.d.ts.map +1 -1
  320. package/node_modules/@oscharko-dev/keiko-server/dist/credentialPersistence.js +19 -1
  321. package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.d.ts +9 -0
  322. package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.d.ts.map +1 -1
  323. package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.js +1 -0
  324. package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
  325. package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +32 -5
  326. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +15 -4
  327. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
  328. package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +288 -99
  329. package/node_modules/@oscharko-dev/keiko-server/dist/editor/completionRoutes.d.ts.map +1 -1
  330. package/node_modules/@oscharko-dev/keiko-server/dist/editor/completionRoutes.js +3 -2
  331. package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.d.ts +2 -0
  332. package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.d.ts.map +1 -1
  333. package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.js +1 -0
  334. package/node_modules/@oscharko-dev/keiko-server/dist/editor/inlineCompletionRoutes.d.ts.map +1 -1
  335. package/node_modules/@oscharko-dev/keiko-server/dist/editor/inlineCompletionRoutes.js +3 -2
  336. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.d.ts +2 -1
  337. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.d.ts.map +1 -1
  338. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.js +8 -4
  339. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.d.ts +9 -0
  340. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.d.ts.map +1 -1
  341. package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.js +2 -0
  342. package/node_modules/@oscharko-dev/keiko-server/dist/editor/patchApplyRoutes.d.ts.map +1 -1
  343. package/node_modules/@oscharko-dev/keiko-server/dist/editor/patchApplyRoutes.js +3 -1
  344. package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts.map +1 -1
  345. package/node_modules/@oscharko-dev/keiko-server/dist/files.js +24 -14
  346. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-error-diagnostic.d.ts +8 -0
  347. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-error-diagnostic.d.ts.map +1 -0
  348. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-error-diagnostic.js +26 -0
  349. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.d.ts.map +1 -1
  350. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.js +71 -11
  351. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
  352. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +7 -29
  353. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
  354. package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +36 -13
  355. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/mutationEvidenceLedger.d.ts.map +1 -1
  356. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/mutationEvidenceLedger.js +17 -3
  357. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.d.ts.map +1 -1
  358. package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.js +10 -3
  359. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts +2 -0
  360. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts.map +1 -1
  361. package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.js +20 -8
  362. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.d.ts +1 -1
  363. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.d.ts.map +1 -1
  364. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.js +2 -1
  365. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.js +1 -1
  366. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts +2 -1
  367. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
  368. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +3 -2
  369. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts +1 -1
  370. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts.map +1 -1
  371. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +2 -1
  372. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +1 -1
  373. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
  374. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +67 -43
  375. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.d.ts.map +1 -1
  376. package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.js +37 -0
  377. package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts +6 -1
  378. package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts.map +1 -1
  379. package/node_modules/@oscharko-dev/keiko-server/dist/index.js +38 -1
  380. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts +1 -1
  381. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
  382. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +22 -10
  383. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
  384. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +158 -36
  385. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation-store.d.ts.map +1 -1
  386. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation-store.js +9 -1
  387. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts.map +1 -1
  388. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.js +10 -5
  389. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-store-open.d.ts.map +1 -1
  390. package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-store-open.js +8 -2
  391. package/node_modules/@oscharko-dev/keiko-server/dist/localKnowledgeKeyProvider.d.ts +2 -0
  392. package/node_modules/@oscharko-dev/keiko-server/dist/localKnowledgeKeyProvider.d.ts.map +1 -1
  393. package/node_modules/@oscharko-dev/keiko-server/dist/localKnowledgeKeyProvider.js +1 -0
  394. package/node_modules/@oscharko-dev/keiko-server/dist/manual/manual-pod-service.d.ts.map +1 -1
  395. package/node_modules/@oscharko-dev/keiko-server/dist/manual/manual-pod-service.js +3 -0
  396. package/node_modules/@oscharko-dev/keiko-server/dist/memory-audit-handler.d.ts.map +1 -1
  397. package/node_modules/@oscharko-dev/keiko-server/dist/memory-audit-handler.js +13 -6
  398. package/node_modules/@oscharko-dev/keiko-server/dist/memory-conflict-advisory.d.ts.map +1 -1
  399. package/node_modules/@oscharko-dev/keiko-server/dist/memory-conflict-advisory.js +37 -23
  400. package/node_modules/@oscharko-dev/keiko-server/dist/memory-consolidation-handlers.d.ts.map +1 -1
  401. package/node_modules/@oscharko-dev/keiko-server/dist/memory-consolidation-handlers.js +10 -55
  402. package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.d.ts.map +1 -1
  403. package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.js +11 -56
  404. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
  405. package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +135 -36
  406. package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.d.ts.map +1 -1
  407. package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.js +32 -62
  408. package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.d.ts +3 -3
  409. package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.d.ts.map +1 -1
  410. package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.js +19 -11
  411. package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.d.ts.map +1 -1
  412. package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.js +40 -23
  413. package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.d.ts.map +1 -1
  414. package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.js +45 -27
  415. package/node_modules/@oscharko-dev/keiko-server/dist/observability/error-classification.d.ts +25 -0
  416. package/node_modules/@oscharko-dev/keiko-server/dist/observability/error-classification.d.ts.map +1 -0
  417. package/node_modules/@oscharko-dev/keiko-server/dist/observability/error-classification.js +115 -0
  418. package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts +3 -0
  419. package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts.map +1 -0
  420. package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.js +9 -0
  421. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.d.ts +13 -0
  422. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.d.ts.map +1 -0
  423. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.js +57 -0
  424. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts +22 -0
  425. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts.map +1 -0
  426. package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.js +698 -0
  427. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts +4 -0
  428. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts.map +1 -0
  429. package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.js +342 -0
  430. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts +58 -0
  431. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts.map +1 -0
  432. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.js +605 -0
  433. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts +37 -0
  434. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts.map +1 -0
  435. package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.js +199 -0
  436. package/node_modules/@oscharko-dev/keiko-server/dist/observability/stack-frames.d.ts +5 -0
  437. package/node_modules/@oscharko-dev/keiko-server/dist/observability/stack-frames.d.ts.map +1 -0
  438. package/node_modules/@oscharko-dev/keiko-server/dist/observability/stack-frames.js +261 -0
  439. package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts +11 -0
  440. package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts.map +1 -0
  441. package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.js +48 -0
  442. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.d.ts +1 -1
  443. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.d.ts.map +1 -1
  444. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.js +1 -1
  445. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotAdapter.d.ts.map +1 -1
  446. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotAdapter.js +3 -0
  447. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotOrchestration.d.ts.map +1 -1
  448. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotOrchestration.js +13 -3
  449. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts.map +1 -1
  450. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.js +13 -4
  451. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/generationPort.d.ts +1 -1
  452. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/generationPort.d.ts.map +1 -1
  453. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/generationPort.js +6 -5
  454. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/handoffRoutes.js +1 -1
  455. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.d.ts +1 -0
  456. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.d.ts.map +1 -1
  457. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.js +1 -0
  458. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.d.ts +2 -2
  459. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.d.ts.map +1 -1
  460. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.js +43 -67
  461. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.d.ts.map +1 -1
  462. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.js +10 -7
  463. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runExecution.d.ts.map +1 -1
  464. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runExecution.js +8 -8
  465. package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +1 -1
  466. package/node_modules/@oscharko-dev/keiko-server/dist/relationship-activity-broadcast.d.ts +1 -0
  467. package/node_modules/@oscharko-dev/keiko-server/dist/relationship-activity-broadcast.d.ts.map +1 -1
  468. package/node_modules/@oscharko-dev/keiko-server/dist/relationship-activity-broadcast.js +7 -5
  469. package/node_modules/@oscharko-dev/keiko-server/dist/relationship-handlers.d.ts.map +1 -1
  470. package/node_modules/@oscharko-dev/keiko-server/dist/relationship-handlers.js +39 -41
  471. package/node_modules/@oscharko-dev/keiko-server/dist/request-cancellation.d.ts +6 -0
  472. package/node_modules/@oscharko-dev/keiko-server/dist/request-cancellation.d.ts.map +1 -1
  473. package/node_modules/@oscharko-dev/keiko-server/dist/request-cancellation.js +18 -3
  474. package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
  475. package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +8 -3
  476. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts +2 -2
  477. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts.map +1 -1
  478. package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.js +34 -22
  479. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.d.ts.map +1 -1
  480. package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.js +10 -6
  481. package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts +11 -1
  482. package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts.map +1 -1
  483. package/node_modules/@oscharko-dev/keiko-server/dist/server.js +168 -32
  484. package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.d.ts +27 -2
  485. package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.d.ts.map +1 -1
  486. package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.js +110 -3
  487. package/node_modules/@oscharko-dev/keiko-server/dist/sse.d.ts +2 -1
  488. package/node_modules/@oscharko-dev/keiko-server/dist/sse.d.ts.map +1 -1
  489. package/node_modules/@oscharko-dev/keiko-server/dist/sse.js +13 -6
  490. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts +15 -1
  491. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
  492. package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +190 -2
  493. package/node_modules/@oscharko-dev/keiko-server/dist/store/index.d.ts +1 -1
  494. package/node_modules/@oscharko-dev/keiko-server/dist/store/index.d.ts.map +1 -1
  495. package/node_modules/@oscharko-dev/keiko-server/dist/store/index.js +1 -1
  496. package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.d.ts +29 -0
  497. package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.d.ts.map +1 -0
  498. package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.js +135 -0
  499. package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts.map +1 -1
  500. package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.js +7 -2
  501. package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.d.ts +1 -1
  502. package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.d.ts.map +1 -1
  503. package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.js +10 -3
  504. package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation-routes.d.ts.map +1 -1
  505. package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation-routes.js +3 -1
  506. package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation.d.ts +1 -1
  507. package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation.d.ts.map +1 -1
  508. package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation.js +27 -24
  509. package/node_modules/@oscharko-dev/keiko-server/dist/voice-handlers.d.ts.map +1 -1
  510. package/node_modules/@oscharko-dev/keiko-server/dist/voice-handlers.js +2 -1
  511. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.d.ts.map +1 -1
  512. package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.js +15 -6
  513. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts +2 -0
  514. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts.map +1 -1
  515. package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.js +14 -5
  516. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.d.ts +2 -0
  517. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.d.ts.map +1 -1
  518. package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.js +24 -11
  519. package/node_modules/@oscharko-dev/keiko-server/package.json +21 -21
  520. package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
  521. package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
  522. package/node_modules/@oscharko-dev/keiko-tools/package.json +5 -5
  523. package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
  524. package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
  525. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
  526. package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
  527. package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
  528. package/package.json +27 -25
  529. package/release-impact.catalog.json +121 -8
  530. package/vendor/oscharko-dev-keiko-cli-0.3.16.tgz +0 -0
  531. package/vendor/{oscharko-dev-keiko-connectors-0.3.14.tgz → oscharko-dev-keiko-connectors-0.3.16.tgz} +0 -0
  532. package/vendor/oscharko-dev-keiko-contracts-0.3.16.tgz +0 -0
  533. package/vendor/{oscharko-dev-keiko-evaluations-0.3.14.tgz → oscharko-dev-keiko-evaluations-0.3.16.tgz} +0 -0
  534. package/vendor/{oscharko-dev-keiko-evidence-0.3.14.tgz → oscharko-dev-keiko-evidence-0.3.16.tgz} +0 -0
  535. package/vendor/{oscharko-dev-keiko-git-0.3.14.tgz → oscharko-dev-keiko-git-0.3.16.tgz} +0 -0
  536. package/vendor/oscharko-dev-keiko-harness-0.3.16.tgz +0 -0
  537. package/vendor/oscharko-dev-keiko-local-knowledge-0.3.16.tgz +0 -0
  538. package/vendor/{oscharko-dev-keiko-memory-capture-0.3.14.tgz → oscharko-dev-keiko-memory-capture-0.3.16.tgz} +0 -0
  539. package/vendor/{oscharko-dev-keiko-memory-consolidation-0.3.14.tgz → oscharko-dev-keiko-memory-consolidation-0.3.16.tgz} +0 -0
  540. package/vendor/{oscharko-dev-keiko-memory-governance-0.3.14.tgz → oscharko-dev-keiko-memory-governance-0.3.16.tgz} +0 -0
  541. package/vendor/{oscharko-dev-keiko-memory-retrieval-0.3.14.tgz → oscharko-dev-keiko-memory-retrieval-0.3.16.tgz} +0 -0
  542. package/vendor/oscharko-dev-keiko-memory-vault-0.3.16.tgz +0 -0
  543. package/vendor/oscharko-dev-keiko-model-gateway-0.3.16.tgz +0 -0
  544. package/vendor/{oscharko-dev-keiko-quality-intelligence-0.3.14.tgz → oscharko-dev-keiko-quality-intelligence-0.3.16.tgz} +0 -0
  545. package/vendor/{oscharko-dev-keiko-sandbox-0.3.14.tgz → oscharko-dev-keiko-sandbox-0.3.16.tgz} +0 -0
  546. package/vendor/{oscharko-dev-keiko-sdk-0.3.14.tgz → oscharko-dev-keiko-sdk-0.3.16.tgz} +0 -0
  547. package/vendor/oscharko-dev-keiko-security-0.3.16.tgz +0 -0
  548. package/vendor/oscharko-dev-keiko-server-0.3.16.tgz +0 -0
  549. package/vendor/{oscharko-dev-keiko-tools-0.3.14.tgz → oscharko-dev-keiko-tools-0.3.16.tgz} +0 -0
  550. package/vendor/{oscharko-dev-keiko-verification-0.3.14.tgz → oscharko-dev-keiko-verification-0.3.16.tgz} +0 -0
  551. package/vendor/{oscharko-dev-keiko-workflows-0.3.14.tgz → oscharko-dev-keiko-workflows-0.3.16.tgz} +0 -0
  552. package/vendor/{oscharko-dev-keiko-workspace-0.3.14.tgz → oscharko-dev-keiko-workspace-0.3.16.tgz} +0 -0
  553. package/dist/ui/static/_next/static/chunks/03la2o0tcodk_.js +0 -1
  554. package/dist/ui/static/_next/static/chunks/089ft_ee-2y20.js +0 -1
  555. package/dist/ui/static/_next/static/chunks/09ifk61aybcwe.js +0 -1
  556. package/dist/ui/static/_next/static/chunks/0iwjev0wot4b0.js +0 -1
  557. package/dist/ui/static/_next/static/chunks/0lorosh9iyl5i.js +0 -7
  558. package/dist/ui/static/_next/static/chunks/0q76qswp80ci1.js +0 -1
  559. package/dist/ui/static/_next/static/chunks/130bqt0eb54h4.js +0 -1
  560. package/dist/ui/static/_next/static/chunks/1pcygmx7pvpwp.js +0 -4
  561. package/dist/ui/static/_next/static/chunks/1s1u4fx4mdurk.js +0 -1
  562. package/dist/ui/static/_next/static/chunks/1wnmpolx-w3e0.js +0 -1
  563. package/dist/ui/static/_next/static/chunks/23jcx3s74h89k.js +0 -1
  564. package/dist/ui/static/_next/static/chunks/26sy339azhbd8.js +0 -1
  565. package/dist/ui/static/_next/static/chunks/2c9gq9vpyd9sm.js +0 -1
  566. package/dist/ui/static/_next/static/chunks/2iqsdgq5z7zi-.js +0 -1
  567. package/dist/ui/static/_next/static/chunks/2iuxjus3qppec.js +0 -1
  568. package/dist/ui/static/_next/static/chunks/2t0ktf1dxwv0_.js +0 -1
  569. package/dist/ui/static/_next/static/chunks/2wvo7q19g065e.js +0 -1
  570. package/dist/ui/static/_next/static/chunks/2xgtm8mmbv8mx.js +0 -1
  571. package/dist/ui/static/_next/static/chunks/32h72gk6uqdr0.js +0 -1
  572. package/dist/ui/static/_next/static/chunks/3ljwwkelljh81.js +0 -1
  573. package/dist/ui/static/_next/static/chunks/3pukrjhzlxlur.js +0 -1
  574. package/vendor/oscharko-dev-keiko-cli-0.3.14.tgz +0 -0
  575. package/vendor/oscharko-dev-keiko-contracts-0.3.14.tgz +0 -0
  576. package/vendor/oscharko-dev-keiko-harness-0.3.14.tgz +0 -0
  577. package/vendor/oscharko-dev-keiko-local-knowledge-0.3.14.tgz +0 -0
  578. package/vendor/oscharko-dev-keiko-memory-vault-0.3.14.tgz +0 -0
  579. package/vendor/oscharko-dev-keiko-model-gateway-0.3.14.tgz +0 -0
  580. package/vendor/oscharko-dev-keiko-security-0.3.14.tgz +0 -0
  581. package/vendor/oscharko-dev-keiko-server-0.3.14.tgz +0 -0
  582. /package/dist/ui/static/_next/static/{y54UtqSyUZo4acoo_2Vb4 → nV-Flxo4itfIzasbhujy9}/_buildManifest.js +0 -0
  583. /package/dist/ui/static/_next/static/{y54UtqSyUZo4acoo_2Vb4 → nV-Flxo4itfIzasbhujy9}/_clientMiddlewareManifest.js +0 -0
  584. /package/dist/ui/static/_next/static/{y54UtqSyUZo4acoo_2Vb4 → nV-Flxo4itfIzasbhujy9}/_ssgManifest.js +0 -0
@@ -0,0 +1,698 @@
1
+ // The single redaction choke point for the server activity log.
2
+ //
3
+ // Every field a caller supplies through `ServerLogEvent.extra` passes through `redactLogFields`
4
+ // before it is serialised. The policy is STRUCTURAL, not advisory: a caller cannot opt out, and
5
+ // the guards do not depend on the caller naming its fields honestly.
6
+ //
7
+ // Four independent layers, each of which alone stops a body/prompt/secret:
8
+ //
9
+ // 1. Type allowlist — only strings, finite numbers, booleans, arrays and plain objects survive.
10
+ // Errors, Buffers, Maps, class instances, functions, symbols, bigints and null are dropped,
11
+ // so an `extra: { error }` or `extra: { buffer }` can never serialise its payload.
12
+ // 2. Field-name denylist — names that mean "content" or "credential" in this product
13
+ // (body, prompt, text, message, apiKey, token, authorization, email, …) are replaced with a
14
+ // marker. Names are normalised (lowercased, separators stripped) so `api_key`, `api-key` and
15
+ // `apiKey` are the same name. Neighbouring evidence fields that merely CONTAIN a denied word
16
+ // (`promptTokens`, `strategyKey`, `requestBytes`, `probeName`) keep working — the match is on
17
+ // the whole name, never a substring.
18
+ // 3. Value guards — a surviving string is refused if it is longer than a short cap, carries any
19
+ // control character or newline, leaves printable ASCII (document text in any script), reads
20
+ // as prose (more than a few spaces), looks like a credential (sk-…, Bearer …, JWT, AWS key,
21
+ // PEM, credentialed URL, `password=…`, opaque high-entropy token), carries a personal
22
+ // identifier (an email address, a phone number, a national id), or has the structure of a
23
+ // filesystem path. Long strings are REPLACED, never truncated: a truncated prompt is still a
24
+ // leaked prompt. The text-shape guard is the one that closes the hole a name-based rule
25
+ // cannot — a SHORT body fragment under an innocuous field name the caller invented.
26
+ // 4. Shape caps — bounded nesting depth, bounded array length and a bounded field count, so a
27
+ // deep or wide structure cannot be used to smuggle content past the other three layers.
28
+ //
29
+ // Hashed identifiers (documentIdHash, capsuleIdDigest, dbPathHash) are the evidence that REPLACES
30
+ // a raw value, so the opaque-token guard must not refuse them — refusing them would push callers
31
+ // back to logging the original. That now falls out of the guard's own rule rather than needing an
32
+ // exemption: a digest is written in one case of one alphabet, and the guard asks for the mixed
33
+ // lowercase/uppercase/digit alphabet a randomly generated credential has.
34
+ //
35
+ // An absolute path is not passed through under any exemption. A request path is reduced to its
36
+ // route TEMPLATE by `route-template.ts` — literal route segments survive, every other segment is
37
+ // digested — and everything else that starts at the filesystem root is refused.
38
+ //
39
+ // NAMED ESCAPE HATCHES: ONE VALUE-KEYED, THREE FIELD-NAME-KEYED (ADR-0173 D4, D11 g29)
40
+ //
41
+ // `path` above is a VALUE-shape escape hatch: `redactLogString` recognises a path-shaped STRING
42
+ // and hands it to `redactRoutePath`, whatever field it arrived under. `frames`, `causeChain` and
43
+ // `diagnosticSummary` each get a field-NAME-keyed hatch instead, because none of the three is
44
+ // something the generic value guards can admit unaided:
45
+ //
46
+ // * `frames` and `causeChain` are ARRAYS, and this module happens to know the exact
47
+ // machine-generated shape of their elements well enough to re-validate them structurally
48
+ // instead of dropping the whole array under the generic type/shape rules. `frames` (a
49
+ // `keikoStackFrames` reduction, ADR-0173 D3) is re-checked element-by-element against
50
+ // `stack-frames.ts`'s own `FRAME_SHAPE_PATTERN` and `PACKAGE_DIR_NAMES` — imported here exactly
51
+ // as that module's own header anticipates, so only ONE file states what a well-formed frame
52
+ // looks like. `causeChain` (a `contentFreeErrorClass` reduction) is re-checked against
53
+ // `DECLARED_ERROR_CLASS_SHAPE`, imported straight from the leaf `error-classification.ts`
54
+ // (ADR-0173 D11) rather than restated: that module imports nothing of its own, so importing
55
+ // from it here closes no cycle, and reusing its constant directly means there is still exactly
56
+ // one declaration of "what a code-declared error class name looks like" in the package, not a
57
+ // second copy for this guard to drift from.
58
+ // * `diagnosticSummary` is a SCALAR whose legitimate values are prose — a complete sentence —
59
+ // which the generic `hasProseShape` rule refuses regardless of field name. Lifting that one
60
+ // rule for that one name is safe because, unlike `frames`/`causeChain`, `diagnosticSummary` is
61
+ // never a directly caller-settable field on `ServerDiagnosticRecord`: `diagnosticActivityLogFields`
62
+ // (`diagnostics-log.ts`) is the ONLY place this key is ever computed, and it always derives the
63
+ // value through `allowlistedSummary`, which admits only an exact member of a fixed,
64
+ // code-declared vocabulary — never foreign text. Every OTHER guard (secret,
65
+ // personal-identifier, structured-payload, length, path) still applies at full strength.
66
+ //
67
+ // All three hatches share the fail-closed direction every other guard in this file takes: an
68
+ // element or value the reducer does not recognise is DROPPED outright, never echoed and never
69
+ // replaced with a marker in its place — a marker would still tell an adversary their forged element
70
+ // was seen.
71
+ //
72
+ // All three name-keyed guards fire ONLY at the top level of `extra` — `redactLogObject`'s own
73
+ // direct call from `redactLogFields` — never at any nested depth. The trust they extend is a
74
+ // promise this log's OWN producers make about their own top-level `frames`/`causeChain`/
75
+ // `diagnosticSummary` fields; the same field name nested inside some unrelated object merely
76
+ // happens to share it, carries no such promise, and takes the ordinary generic path instead.
77
+ import { DECLARED_ERROR_CLASS_SHAPE } from "./error-classification.js";
78
+ import { redactRoutePath } from "./route-template.js";
79
+ import { FRAME_SHAPE_PATTERN, PACKAGE_DIR_NAMES } from "./stack-frames.js";
80
+ // A log field value is an identifier, a code, a host or a status — never prose. 160 characters is
81
+ // far above every legitimate value in the instrumentation surface and far below any body.
82
+ export const MAX_LOG_STRING_LENGTH = 160;
83
+ // Log field values are identifiers, codes, hosts, reasons and statuses. None of them is prose, and
84
+ // none of them contains more than a stray space. Prose does. This is what stops a SHORT body or
85
+ // prompt fragment smuggled under an innocuous field name — the length cap alone would let it
86
+ // through, and no name-based rule can, since the caller picks the name.
87
+ export const MAX_LOG_STRING_WHITESPACE = 3;
88
+ // The upper bound of printable ASCII. A log field value is an identifier, a code, a host, an
89
+ // error kind or a status, and every one of those is written in ASCII. Document text is not.
90
+ const MAX_IDENTIFIER_CHAR_CODE = 0x7e;
91
+ // `extra` itself is depth 0. Its own values may nest three more levels, which covers the deepest
92
+ // existing producer (a diagnostic record carrying a nested counts object) and nothing beyond it.
93
+ export const MAX_LOG_FIELD_DEPTH = 3;
94
+ export const MAX_LOG_ARRAY_LENGTH = 16;
95
+ export const MAX_LOG_FIELD_COUNT = 48;
96
+ export const REDACTED_KEY = "[redacted:key]";
97
+ export const REDACTED_LENGTH = "[redacted:length]";
98
+ export const REDACTED_SHAPE = "[redacted:shape]";
99
+ export const REDACTED_SECRET = "[redacted:secret]";
100
+ export const REDACTED_PATH = "[redacted:path]";
101
+ export const REDACTED_PERSONAL = "[redacted:personal]";
102
+ export const DROPPED_DEPTH = "[dropped:depth]";
103
+ // Sibling of DROPPED_DEPTH: a bounded marker appended to a truncated array, so a reader can tell
104
+ // "this list really only had 16 entries" from "this list had more and the rest were dropped" —
105
+ // the same distinction DROPPED_DEPTH already draws for nesting.
106
+ export const DROPPED_LENGTH = "[dropped:length]";
107
+ // At most 8 (mirrors `keikoStackFrames`' own default cap) and 5 (mirrors `causeChain`'s own
108
+ // default `maxDepth`) elements survive the respective name-keyed guard, applied AFTER filtering out
109
+ // non-conforming elements — so a forged over-length array cannot push a real, well-formed element
110
+ // out of the result merely by padding the front with junk.
111
+ const MAX_GUARDED_FRAME_ELEMENTS = 8;
112
+ const MAX_GUARDED_CAUSE_CHAIN_ELEMENTS = 5;
113
+ // The identity of a log line: timestamp, severity, routing, and (v2) process/sequence identity. An
114
+ // `extra` field may never spoof one, because every operator query and every alert keys on them, and
115
+ // an agent reconstructing a run joins lines across a rotated file on exactly these fields. The
116
+ // remaining envelope fields (correlationId, durationMs, status, errorKind) are NOT reserved — an
117
+ // instrumentation site naturally carries `durationMs` or `httpStatus` in its field list, and
118
+ // dropping those would be a silent footgun. The formatter simply applies the envelope after `extra`,
119
+ // so the envelope wins when both are present and `extra` fills the gap when it is not.
120
+ const RESERVED_FIELD_NAMES = new Set([
121
+ "ts",
122
+ "level",
123
+ "category",
124
+ "op",
125
+ "schemaVersion",
126
+ "pid",
127
+ "instanceId",
128
+ "seq",
129
+ ]);
130
+ // Whole-name matches only, normalised to lowercase with `_` and `-` removed.
131
+ const DENIED_FIELD_NAMES = new Set([
132
+ // Content: anything that can carry a body, a prompt, model output or document text.
133
+ "answer",
134
+ "answers",
135
+ "args",
136
+ "argv",
137
+ "body",
138
+ "chunk",
139
+ "chunks",
140
+ "chunktext",
141
+ "comment",
142
+ "comments",
143
+ "completion",
144
+ "content",
145
+ "contents",
146
+ "data",
147
+ "description",
148
+ "doc",
149
+ "document",
150
+ "documents",
151
+ "documenttext",
152
+ "excerpt",
153
+ "input",
154
+ "inputs",
155
+ "message",
156
+ "messages",
157
+ "msg",
158
+ "note",
159
+ "notes",
160
+ "output",
161
+ "outputs",
162
+ "payload",
163
+ "preview",
164
+ "prompt",
165
+ "prompts",
166
+ "queries",
167
+ "query",
168
+ "querytext",
169
+ "raw",
170
+ "request",
171
+ "response",
172
+ "result",
173
+ "results",
174
+ "sample",
175
+ "snippet",
176
+ "snippets",
177
+ "sql",
178
+ "jql",
179
+ "summary",
180
+ "systemprompt",
181
+ "text",
182
+ "texts",
183
+ "title",
184
+ "userprompt",
185
+ "value",
186
+ "values",
187
+ // Diagnostics that carry a foreign error message or a process transcript.
188
+ "cause",
189
+ "err",
190
+ "error",
191
+ "exception",
192
+ "stack",
193
+ "stacktrace",
194
+ "stderr",
195
+ "stdout",
196
+ // Credentials and anything that authenticates.
197
+ "accesstoken",
198
+ "apikey",
199
+ "apikeys",
200
+ "auth",
201
+ "authheader",
202
+ "authorization",
203
+ "bearer",
204
+ "cert",
205
+ "certificate",
206
+ "cookie",
207
+ "cookies",
208
+ "credential",
209
+ "credentials",
210
+ "header",
211
+ "headers",
212
+ "idtoken",
213
+ "key",
214
+ "keys",
215
+ "passphrase",
216
+ "password",
217
+ "privatekey",
218
+ "publickey",
219
+ "pwd",
220
+ "salt",
221
+ "refreshtoken",
222
+ "secret",
223
+ "secrets",
224
+ "seed",
225
+ "sessiontoken",
226
+ "sig",
227
+ "signature",
228
+ "token",
229
+ "tokens",
230
+ // Filesystem and location strings, and process environment.
231
+ "absolutepath",
232
+ "connectionstring",
233
+ "cwd",
234
+ "dir",
235
+ "directory",
236
+ "dsn",
237
+ "endpointurl",
238
+ "env",
239
+ "environment",
240
+ "file",
241
+ "filename",
242
+ "filepath",
243
+ "files",
244
+ "homedir",
245
+ "href",
246
+ "location",
247
+ "uri",
248
+ "url",
249
+ "urls",
250
+ "workspacepath",
251
+ // Direct personal data.
252
+ "account",
253
+ "accountid",
254
+ "address",
255
+ "email",
256
+ "emails",
257
+ "familyname",
258
+ "fullname",
259
+ "givenname",
260
+ "mail",
261
+ "phone",
262
+ "phonenumber",
263
+ "ssn",
264
+ "user",
265
+ "userid",
266
+ "username",
267
+ "users",
268
+ ]);
269
+ // A field name is an identifier, not free text; anything else is dropped outright.
270
+ const FIELD_NAME_PATTERN = /^[A-Za-z_][A-Za-z0-9_.-]{0,63}$/;
271
+ const SECRET_PATTERNS = [
272
+ /^(?:sk|pk|rk|ak|sk-proj|sk-ant)-[a-z0-9_-]{8,}/i,
273
+ /^(?:ghp|gho|ghu|ghs|ghr|github_pat)_/,
274
+ /^xox[abprs]-/,
275
+ /^eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{4,}\./,
276
+ /^(?:bearer|basic|digest|token)\s+\S/i,
277
+ /AKIA[0-9A-Z]{16}/,
278
+ /-----BEGIN [A-Z ]*PRIVATE KEY-----/,
279
+ // A URL carrying userinfo credentials, e.g. https://user:pass@host/.
280
+ /^[a-z][a-z0-9+.-]*:\/\/[^/@\s:]+:[^/@\s]*@/i,
281
+ // A query string handing over a credential.
282
+ /[?&](?:api[_-]?key|access[_-]?token|token|secret|password|sig|signature)=/i,
283
+ // A credential written as `name=value` or `name: value` anywhere in the string.
284
+ /\b(?:api[_-]?key|access[_-]?token|token|secret|password|passwd|pwd|authorization)\s*[=:]\s*\S/i,
285
+ ];
286
+ // A serialised document announces itself in its first character. No log field value is ever a
287
+ // JSON object, a JSON array or a markup document, so this costs nothing legitimate and closes the
288
+ // compact-body route the prose guard cannot see (a minified JSON body has almost no spaces).
289
+ const STRUCTURED_PAYLOAD_PATTERN = /^\s*[[{<]/;
290
+ // A high-entropy credential and an ordinary long identifier are both long, and the rule this
291
+ // replaces could not tell them apart. It accepted any value that was 40+ characters drawn from
292
+ // `[A-Za-z0-9+/_=-]` — and `/` is in that alphabet, because base64 uses it. So EVERY request path
293
+ // of 40 characters or more, `/api/local-knowledge/capsules/cap-2f9c/sources/src-7c1a/root`
294
+ // included, was destroyed as `[redacted:secret]`, while a short customer-named route passed
295
+ // untouched: exactly backwards on both halves.
296
+ //
297
+ // The rule below describes what an opaque token IS, on two axes the old one conflated:
298
+ //
299
+ // * it is ONE UNBROKEN RUN, not a path. `/` and `.` end a run, so a path is measured segment by
300
+ // segment and no segment of a real route or a dotted identifier reaches the threshold.
301
+ // * it is HIGH ENTROPY. A randomly generated 40-character base64 token contains lowercase,
302
+ // uppercase and digits with overwhelming probability — missing any one class has probability
303
+ // below 1e-3 — while a hex digest, a padded placeholder, a repeated character and a long
304
+ // lowercase-and-hyphen slug each occupy a single case of a single alphabet.
305
+ //
306
+ // A run is scanned anywhere in the value, not just anchored at both ends, so a credential pasted
307
+ // into the middle of a longer field is caught where the anchored rule missed it.
308
+ export const OPAQUE_TOKEN_RUN_LENGTH = 40;
309
+ const OPAQUE_TOKEN_RUN_PATTERN = new RegExp(`[A-Za-z0-9+_=-]{${String(OPAQUE_TOKEN_RUN_LENGTH)},}`, "g");
310
+ const OPAQUE_TOKEN_ALPHABETS = [/[a-z]/, /[A-Z]/, /\d/];
311
+ // A personal identifier is not a credential and not prose, so neither of the guards above sees it:
312
+ // `contact: "jane.doe@example.com"` is short, space-free, ASCII and not credential-shaped. Only the
313
+ // field-name denylist stopped one, and a name-based rule is exactly what the value layer exists to
314
+ // backstop — the caller picks the name. These are the shapes that carry an identifiable person.
315
+ const PERSONAL_IDENTIFIER_PATTERNS = [
316
+ // An internationally formatted telephone number, ANYWHERE in the value. Anchoring this to the
317
+ // whole string let `tel:+14155550142` through: the digit run is far below the opaque-token
318
+ // length, so the secret guard does not see it either, and a phone number is exactly the kind of
319
+ // personal identifier this layer is the backstop for.
320
+ /(?:^|[^\d+])\+\d[\d ()./-]{6,}/,
321
+ // A national identification number written in the common grouped form (e.g. a US SSN).
322
+ /(?:^|[^\d-])\d{3}-\d{2}-\d{4}(?:[^\d-]|$)/,
323
+ ];
324
+ // PATH DETECTION IS STRUCTURAL, AND DEFAULTS TO REFUSING.
325
+ //
326
+ // It used to be an allowlist of first segments (`/Users`, `/home`, `/var`, …), which answered only
327
+ // the paths someone had thought of: `/Volumes/External/customer.db`, `/data/keiko/state`, and every
328
+ // RELATIVE path (`../../etc/passwd`, `packages/keiko-server/src/store.ts`) serialised verbatim. The
329
+ // rules below describe what a path IS instead, and an absolute value is refused unless it is
330
+ // recognisably a web route — unknown now fails closed rather than open.
331
+ const WINDOWS_PATH_PATTERN = /^(?:[A-Za-z]:[\\/]|\\\\)/;
332
+ const URI_SCHEME_PATTERN = /^[A-Za-z][A-Za-z0-9+.-]*:\/\//;
333
+ const HOME_PATH_PATTERN = /^~[/\\]/;
334
+ const FILE_URL_PATTERN = /^file:\/\//i;
335
+ // A backslash used as a separator between two segments; Windows paths that carry no drive letter.
336
+ const BACKSLASH_SEPARATOR_PATTERN = /^[^\\]+\\[^\\]/;
337
+ // An explicit relative marker, or a traversal segment anywhere in the value.
338
+ const RELATIVE_MARKER_PATTERN = /(?:^|[/\\])\.\.?(?:[/\\]|$)/;
339
+ // A separator whose final segment carries a file extension: `report.pdf`, `store.ts`,
340
+ // `index.sqlite3`. The extension must START with a letter so a versioned identifier that merely
341
+ // contains a dot (`openai/gpt-4.1`) is not mistaken for a file.
342
+ const EXTENSION_SEGMENT_PATTERN = /[/\\][^/\\]*\.[A-Za-z][A-Za-z0-9]{0,7}$/;
343
+ // A relative path of three or more segments. Two segments alone are left readable, because a media
344
+ // type (`text/plain`) and a namespaced identifier (`vendor/model`) have exactly that shape.
345
+ const DEEP_RELATIVE_PATH_PATTERN = /^[A-Za-z0-9._@-]+(?:\/[A-Za-z0-9._@-]+){2,}$/;
346
+ export function normalizeLogFieldName(name) {
347
+ return name.toLowerCase().replaceAll("_", "").replaceAll("-", "");
348
+ }
349
+ export function isDeniedLogFieldName(name) {
350
+ return DENIED_FIELD_NAMES.has(normalizeLogFieldName(name));
351
+ }
352
+ // Control characters are how a body announces itself: newlines, tabs, NUL. Latin prose announces
353
+ // itself with spaces. MOST OF THE WORLD'S PROSE ANNOUNCES ITSELF WITH NEITHER — Japanese, Chinese,
354
+ // Thai and Khmer separate nothing, and an HTML extractor routinely emits NBSP where a space
355
+ // belongs. Counting ASCII spaces therefore answered one script and passed a whole extracted
356
+ // document verbatim in every other, which is precisely the content this log must never carry.
357
+ //
358
+ // The guard is script-agnostic instead, and states the positive rule: a log field value is an
359
+ // ASCII identifier, code, host, error kind or status. A value that leaves printable ASCII is not
360
+ // one, whatever script it is written in; a value that stays inside it still gets the space budget,
361
+ // which is what catches short English body fragments. One bounded pass covers both, and it runs
362
+ // after the length cap so the scan is bounded by MAX_LOG_STRING_LENGTH.
363
+ function hasProseShape(value) {
364
+ let spaces = 0;
365
+ for (let index = 0; index < value.length; index += 1) {
366
+ const code = value.codePointAt(index) ?? 0;
367
+ if (code < 0x20 || code > MAX_IDENTIFIER_CHAR_CODE)
368
+ return true;
369
+ if (code === 0x20) {
370
+ spaces += 1;
371
+ if (spaces > MAX_LOG_STRING_WHITESPACE)
372
+ return true;
373
+ }
374
+ }
375
+ return false;
376
+ }
377
+ // A single run drawn from more than one alphabet. See OPAQUE_TOKEN_RUN_PATTERN for why both halves
378
+ // of this test are needed and what each one lets through on purpose.
379
+ function isHighEntropyRun(run) {
380
+ return OPAQUE_TOKEN_ALPHABETS.every((alphabet) => alphabet.test(run));
381
+ }
382
+ function hasOpaqueTokenRun(value) {
383
+ for (const match of value.matchAll(OPAQUE_TOKEN_RUN_PATTERN)) {
384
+ if (isHighEntropyRun(match[0]))
385
+ return true;
386
+ }
387
+ return false;
388
+ }
389
+ // Exported so the route-template reducer can refuse to digest a credential-shaped segment.
390
+ // A stable digest of a secret is worse than useless: it is an oracle that confirms a guess.
391
+ export function looksLikeSecret(value) {
392
+ if (SECRET_PATTERNS.some((pattern) => pattern.test(value)))
393
+ return true;
394
+ return hasOpaqueTokenRun(value);
395
+ }
396
+ // The email test is structural rather than a regular expression on purpose. Every regex form of
397
+ // it needs an unanchored run over a class that itself contains `.`, which the engine can match
398
+ // from many start positions — super-linear on adversarial input, in a guard whose whole job is to
399
+ // process values it does not trust. Scanning for `@` and validating its two sides is linear and
400
+ // has exactly one interpretation.
401
+ // Matches an email address anywhere in the value, with or without a `mailto:` scheme.
402
+ function containsEmailAddress(value) {
403
+ // EVERY `@`, not just the first. Checking only `indexOf("@")` fails OPEN: in
404
+ // `"x@ jane@example.com"` the first `@` has no valid domain, the guard returned false, and the
405
+ // real address behind it reached the log. A guard that gives up after one candidate is not a
406
+ // guard. The scan stays linear — each position is visited at most twice.
407
+ for (let at = value.indexOf("@"); at !== -1; at = value.indexOf("@", at + 1)) {
408
+ // A candidate with no local part or no domain is SKIPPED, never terminal: `"@@ a@b.co"` ends
409
+ // the scan at index 0 if the loop stops on the first unusable position.
410
+ if (at === 0 || at === value.length - 1)
411
+ continue;
412
+ if (isLocalPartChar(value.charAt(at - 1)) && hasDottedDomain(value, at + 1))
413
+ return true;
414
+ }
415
+ return false;
416
+ }
417
+ function isAsciiAlphanumeric(char) {
418
+ return ((char >= "0" && char <= "9") || (char >= "a" && char <= "z") || (char >= "A" && char <= "Z"));
419
+ }
420
+ const LOCAL_PART_EXTRA_CHARS = "._%+-";
421
+ function isLocalPartChar(char) {
422
+ return isAsciiAlphanumeric(char) || LOCAL_PART_EXTRA_CHARS.includes(char);
423
+ }
424
+ function isDomainLabelChar(char) {
425
+ return isAsciiAlphanumeric(char) || char === "-";
426
+ }
427
+ // A domain: at least one label character, then a dot, then at least one more label character.
428
+ function hasDottedDomain(value, start) {
429
+ let labelChars = 0;
430
+ let sawDot = false;
431
+ for (let index = start; index < value.length; index += 1) {
432
+ const char = value.charAt(index);
433
+ if (isDomainLabelChar(char)) {
434
+ labelChars += 1;
435
+ if (sawDot)
436
+ return true;
437
+ continue;
438
+ }
439
+ if (char !== "." || labelChars === 0)
440
+ return false;
441
+ sawDot = true;
442
+ }
443
+ return false;
444
+ }
445
+ function looksLikePersonalIdentifier(value) {
446
+ if (containsEmailAddress(value))
447
+ return true;
448
+ return PERSONAL_IDENTIFIER_PATTERNS.some((pattern) => pattern.test(value));
449
+ }
450
+ function hasPathPrefix(value) {
451
+ return (HOME_PATH_PATTERN.test(value) ||
452
+ WINDOWS_PATH_PATTERN.test(value) ||
453
+ FILE_URL_PATTERN.test(value));
454
+ }
455
+ function looksLikeFilesystemPath(value) {
456
+ if (hasPathPrefix(value))
457
+ return true;
458
+ // A URL is not a filesystem path. The endpoint reducers each package owns have already reduced
459
+ // the ones we log to scheme and host, and a credentialed one was refused by the secret guard two
460
+ // checks earlier — without this, a portless host (`https://api.openai.com`) would read as a file
461
+ // extension.
462
+ if (URI_SCHEME_PATTERN.test(value))
463
+ return false;
464
+ if (RELATIVE_MARKER_PATTERN.test(value) || BACKSLASH_SEPARATOR_PATTERN.test(value))
465
+ return true;
466
+ // No exemption for an absolute value any more. A request path is not returned to the caller here
467
+ // — `redactLogString` offers it to the route-template reducer, which keeps the declared literal
468
+ // segments and digests everything else. Whatever that reducer declines is refused as a path.
469
+ if (value.startsWith("/"))
470
+ return true;
471
+ return EXTENSION_SEGMENT_PATTERN.test(value) || DEEP_RELATIVE_PATH_PATTERN.test(value);
472
+ }
473
+ // The one place a string is judged. The length cap runs first so every later scan is bounded;
474
+ // the most specific verdict wins after that.
475
+ export function redactLogString(value) {
476
+ if (value.length > MAX_LOG_STRING_LENGTH)
477
+ return REDACTED_LENGTH;
478
+ if (looksLikeSecret(value))
479
+ return REDACTED_SECRET;
480
+ if (looksLikePersonalIdentifier(value))
481
+ return REDACTED_PERSONAL;
482
+ if (STRUCTURED_PAYLOAD_PATTERN.test(value))
483
+ return REDACTED_SHAPE;
484
+ if (hasProseShape(value))
485
+ return REDACTED_SHAPE;
486
+ // A path-shaped value gets exactly one chance to be something an operator may read: a request
487
+ // path this server actually serves, reduced to its route template. Anything the reducer declines
488
+ // — an unknown root, a traversal, a template that would not fit the string cap — is refused.
489
+ if (looksLikeFilesystemPath(value)) {
490
+ return redactRoutePath(value, MAX_LOG_STRING_LENGTH) ?? REDACTED_PATH;
491
+ }
492
+ return value;
493
+ }
494
+ function isPlainObject(value) {
495
+ const prototype = Object.getPrototypeOf(value);
496
+ return prototype === Object.prototype || prototype === null;
497
+ }
498
+ // Returns the sanitised value, or `undefined` when the value type is not on the allowlist and the
499
+ // field must be dropped entirely.
500
+ function redactLogValue(value, depth) {
501
+ if (typeof value === "string")
502
+ return redactLogString(value);
503
+ if (typeof value === "number")
504
+ return Number.isFinite(value) ? value : undefined;
505
+ if (typeof value === "boolean")
506
+ return value;
507
+ if (typeof value !== "object" || value === null)
508
+ return undefined;
509
+ if (depth <= 0)
510
+ return DROPPED_DEPTH;
511
+ if (Array.isArray(value))
512
+ return redactLogArray(value, depth - 1);
513
+ if (!isPlainObject(value))
514
+ return undefined;
515
+ return redactLogObject(value, depth - 1);
516
+ }
517
+ // The slice is the bound; the marker is evidence that the bound actually fired, so a reconstructing
518
+ // agent does not mistake a truncated list for a complete one that merely happened to be short.
519
+ //
520
+ // The marker CONSUMES A SLOT rather than riding along for free: when the input actually exceeds
521
+ // the cap, only `MAX_LOG_ARRAY_LENGTH - 1` real elements are kept, so the marker's own slot brings
522
+ // the output back to exactly `MAX_LOG_ARRAY_LENGTH` — never `MAX_LOG_ARRAY_LENGTH + 1`. An input at
523
+ // or under the cap is untouched and carries no marker, so the configured bound holds exactly in
524
+ // both directions instead of being a soft "roughly this many" guideline.
525
+ function redactLogArray(value, depth) {
526
+ const isTruncated = value.length > MAX_LOG_ARRAY_LENGTH;
527
+ const keepCount = isTruncated ? MAX_LOG_ARRAY_LENGTH - 1 : MAX_LOG_ARRAY_LENGTH;
528
+ const sanitized = [];
529
+ for (const element of value.slice(0, keepCount)) {
530
+ const redacted = redactLogValue(element, depth);
531
+ if (redacted !== undefined)
532
+ sanitized.push(redacted);
533
+ }
534
+ if (isTruncated)
535
+ sanitized.push(DROPPED_LENGTH);
536
+ return sanitized;
537
+ }
538
+ // Re-validates a `frames` element against the exact shape `stack-frames.ts` constructs, instead of
539
+ // trusting that only `keikoStackFrames` ever produced this array: defense-in-depth, not a shortcut
540
+ // that relies on the producer's own good behaviour. `FRAME_SHAPE_PATTERN` alone pins the SHAPE but
541
+ // not the package name it names — the pattern's own header says so — so a captured `pkg` (absent
542
+ // on the root-bin branch, where there is no package to check) is re-checked against
543
+ // `PACKAGE_DIR_NAMES` here.
544
+ //
545
+ // `FRAME_SHAPE_PATTERN`'s relative-part character class allows `.` and `/` (a real relative path
546
+ // needs both), so it cannot by itself reject a `..` traversal segment hiding inside an otherwise
547
+ // shape-conforming string — the same gap `looksLikeFilesystemPath` closes for a path VALUE with
548
+ // `RELATIVE_MARKER_PATTERN`. Reused here rather than restated, for the same reason: one
549
+ // declaration of "what a traversal segment looks like" in this file.
550
+ function isConformingFrame(value) {
551
+ if (typeof value !== "string")
552
+ return false;
553
+ if (RELATIVE_MARKER_PATTERN.test(value))
554
+ return false;
555
+ const match = FRAME_SHAPE_PATTERN.exec(value);
556
+ if (match === null)
557
+ return false;
558
+ const packageName = match.groups?.pkg;
559
+ return packageName === undefined || PACKAGE_DIR_NAMES.has(packageName);
560
+ }
561
+ // Drops every non-conforming element outright — never a marker in its place, the same fail-closed
562
+ // direction `redactRoutePath` and `stack-frames.ts` itself already take for a frame that cannot be
563
+ // safely reduced. See the "NAMED ESCAPE HATCHES" header comment for why this guard exists on
564
+ // top of the generic array/string path at all.
565
+ function redactKeikoFrames(value) {
566
+ return value.filter(isConformingFrame).slice(0, MAX_GUARDED_FRAME_ELEMENTS);
567
+ }
568
+ function isConformingCauseClass(value) {
569
+ return typeof value === "string" && DECLARED_ERROR_CLASS_SHAPE.test(value);
570
+ }
571
+ // Same fail-closed shape as `redactKeikoFrames`, for the sibling `causeChain` field.
572
+ function redactCauseChain(value) {
573
+ return value.filter(isConformingCauseClass).slice(0, MAX_GUARDED_CAUSE_CHAIN_ELEMENTS);
574
+ }
575
+ // The two ARRAY name-keyed guards apply only when this call is `redactLogObject`'s own direct call
576
+ // from `redactLogFields` (`depth === MAX_LOG_FIELD_DEPTH`) — never at any nested depth, where the
577
+ // recursive dispatch always passes a strictly smaller `depth`. Returns `undefined` when the name
578
+ // does not match either guarded field, so the caller falls through to the generic dispatch.
579
+ function redactGuardedArrayField(name, fieldValue, depth) {
580
+ if (depth !== MAX_LOG_FIELD_DEPTH || !Array.isArray(fieldValue))
581
+ return undefined;
582
+ if (name === "frames")
583
+ return redactKeikoFrames(fieldValue);
584
+ if (name === "causeChain")
585
+ return redactCauseChain(fieldValue);
586
+ return undefined;
587
+ }
588
+ // A THIRD, SCALAR name-keyed hatch, alongside the two array hatches above (ADR-0173 D11 g29):
589
+ // `diagnosticSummary` is the one field in this schema whose legitimate values ARE prose — a
590
+ // complete sentence — which `redactLogString`'s `hasProseShape` rule refuses regardless of field
591
+ // name. It is safe to lift that ONE rule for this ONE name because, unlike `frames`/`causeChain`,
592
+ // `diagnosticSummary` is never a directly caller-settable field on `ServerDiagnosticRecord` at all:
593
+ // `diagnosticActivityLogFields` (`diagnostics-log.ts`) is the ONLY place this key is ever computed,
594
+ // and it always derives the value through `allowlistedSummary`, which admits only an EXACT member
595
+ // of a fixed, code-declared vocabulary of complete sentences — never foreign error/provider/
596
+ // customer text. Every other guard (secret, personal-identifier, structured-payload, length, path)
597
+ // still applies at full strength below, so a future bug at that one call site is still caught by
598
+ // everything except the sentence shape itself.
599
+ function redactProseAllowedValue(value) {
600
+ if (value.length > MAX_LOG_STRING_LENGTH)
601
+ return REDACTED_LENGTH;
602
+ if (looksLikeSecret(value))
603
+ return REDACTED_SECRET;
604
+ if (looksLikePersonalIdentifier(value))
605
+ return REDACTED_PERSONAL;
606
+ if (STRUCTURED_PAYLOAD_PATTERN.test(value))
607
+ return REDACTED_SHAPE;
608
+ if (looksLikeFilesystemPath(value)) {
609
+ return redactRoutePath(value, MAX_LOG_STRING_LENGTH) ?? REDACTED_PATH;
610
+ }
611
+ return value;
612
+ }
613
+ // Mirrors `redactGuardedArrayField`'s depth/name gate for the scalar hatch. `undefined` means
614
+ // "not this field" (wrong depth, wrong name, or a non-string value under this name — which cannot
615
+ // happen through the one producer that ever sets it, but degrades to the generic path rather than
616
+ // asserting the impossible), so the caller falls through to the generic dispatch.
617
+ function redactGuardedScalarField(name, fieldValue, depth) {
618
+ if (depth !== MAX_LOG_FIELD_DEPTH || name !== "diagnosticSummary")
619
+ return undefined;
620
+ return typeof fieldValue === "string" ? redactProseAllowedValue(fieldValue) : undefined;
621
+ }
622
+ // Resolves what a single ACCEPTED field (past the count/reserved/name-shape gates already applied
623
+ // by the caller's loop) contributes to the sanitised object: the denylist marker, a guarded array
624
+ // or scalar result (the array form returns `undefined` when nothing in it survived, so the caller
625
+ // omits the field entirely rather than storing an empty array), or the generic recursive redaction.
626
+ // Split out of `redactLogObject` to keep that loop's own branching under the complexity budget.
627
+ function redactAcceptedField(name, fieldValue, depth) {
628
+ if (isDeniedLogFieldName(name))
629
+ return REDACTED_KEY;
630
+ const guardedArray = redactGuardedArrayField(name, fieldValue, depth);
631
+ if (guardedArray !== undefined)
632
+ return guardedArray.length > 0 ? guardedArray : undefined;
633
+ const guardedScalar = redactGuardedScalarField(name, fieldValue, depth);
634
+ if (guardedScalar !== undefined)
635
+ return guardedScalar;
636
+ return redactLogValue(fieldValue, depth);
637
+ }
638
+ // Split out of `redactLogObject` so each function stays under the complexity ceiling. Collects
639
+ // every field this object accepts (by name and by the field-count cap), WITHOUT yet deciding which
640
+ // of them make the final cut: that decision needs to know whether the cap fired, which is only
641
+ // known once a field beyond it is seen. Each accepted field is resolved through
642
+ // `redactAcceptedField` so the two array hatches and the scalar hatch apply here too, not only in
643
+ // a since-removed direct loop.
644
+ function collectAcceptedLogFields(value, depth, reserved) {
645
+ const entries = [];
646
+ for (const [name, fieldValue] of Object.entries(value)) {
647
+ // Ineligible names are filtered FIRST: the cap counts only fields that would actually be kept,
648
+ // so a reserved or pattern-invalid key sitting right at the boundary can never consume the last
649
+ // counted slot and falsely report a truncation that dropped a real, accepted field.
650
+ if (reserved?.has(name) === true)
651
+ continue;
652
+ if (!FIELD_NAME_PATTERN.test(name))
653
+ continue;
654
+ if (entries.length >= MAX_LOG_FIELD_COUNT)
655
+ return { entries, truncated: true };
656
+ entries.push([name, redactAcceptedField(name, fieldValue, depth)]);
657
+ }
658
+ return { entries, truncated: false };
659
+ }
660
+ function redactLogObject(value, depth, reserved) {
661
+ const { entries, truncated } = collectAcceptedLogFields(value, depth, reserved);
662
+ // The marker CONSUMES A SLOT: truncation keeps only `MAX_LOG_FIELD_COUNT - 1` accepted fields, so
663
+ // `_truncatedFieldCount` brings the key count back to exactly `MAX_LOG_FIELD_COUNT` — added AFTER
664
+ // the slice so it is never itself subject to the count it reports on.
665
+ const kept = truncated ? entries.slice(0, MAX_LOG_FIELD_COUNT - 1) : entries;
666
+ const sanitized = {};
667
+ for (const [name, redactedValue] of kept) {
668
+ if (redactedValue !== undefined)
669
+ sanitized[name] = redactedValue;
670
+ }
671
+ if (truncated)
672
+ sanitized._truncatedFieldCount = true;
673
+ return sanitized;
674
+ }
675
+ // Entry point. Anything that is not a plain object of fields yields no fields at all.
676
+ export function redactLogFields(extra) {
677
+ if (typeof extra !== "object" || extra === null)
678
+ return undefined;
679
+ if (Array.isArray(extra) || !isPlainObject(extra))
680
+ return undefined;
681
+ const sanitized = redactLogObject(extra, MAX_LOG_FIELD_DEPTH, RESERVED_FIELD_NAMES);
682
+ return Object.keys(sanitized).length === 0 ? undefined : sanitized;
683
+ }
684
+ // Envelope fields are narrow by type but still caller-supplied strings, so they take the same
685
+ // string guard. Used by the line formatter for `op`, `correlationId` and `errorKind`.
686
+ export function redactLogLabel(value) {
687
+ return redactLogString(value);
688
+ }
689
+ // A closed-vocabulary array field (e.g. `unsupportedReasons`) is meant to carry only the fixed set
690
+ // of reason codes a producer's own type declares — but the type is a compile-time promise, not a
691
+ // runtime one: nothing stops a future producer, or a bug in an existing one, from putting unbounded
692
+ // third-party text on the same field. This is the same "structural, not caller discipline" guard
693
+ // `KNOWN_CATEGORIES`/`readCategory()` already give categories, generalised to any closed-vocabulary
694
+ // string: a value the caller's own vocabulary recognises passes through, anything else collapses to
695
+ // the caller's fallback marker rather than reaching the log verbatim.
696
+ export function closeReasonVocabulary(vocab, value, fallback) {
697
+ return vocab.has(value) ? value : fallback;
698
+ }