@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.
- package/dist/ui/csp-hashes.json +12 -12
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +2 -2
- package/dist/ui/static/__next._full.txt +3 -3
- package/dist/ui/static/__next._head.txt +1 -1
- package/dist/ui/static/__next._index.txt +1 -1
- package/dist/ui/static/__next._tree.txt +1 -1
- package/dist/ui/static/_next/static/chunks/06zt_mdjfd0l1.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bhehe35iyqjr.js +1 -0
- package/dist/ui/static/_next/static/chunks/0ebqhb4-lqo3_.js +1 -0
- package/dist/ui/static/_next/static/chunks/0kllmzwq3m4t6.js +1 -0
- package/dist/ui/static/_next/static/chunks/0loqi-w3in9hh.js +7 -0
- package/dist/ui/static/_next/static/chunks/{2lz9ujlsm75kc.js → 0nthfqbd4m5rn.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0npbfd_er47xu.js → 0te_d7ls2ozkc.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{167niw9we0b7n.js → 0u5u7e3fbq3rx.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2wbqxdm82mc6g.js → 0wxc3q97-jil3.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0kefabslo9zpa.js → 1-p5-rt-7uxi_.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1_m1z_f54hkji.js → 12te-wibzf1gs.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2uj0n49ihyt_7.js → 15sh7n1wjfckc.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1q2fca11xb2x0.js → 16gc6p4mobbkd.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0rvhrleg8f98b.js → 1749gpptuos4d.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3-4iik5ytvbed.js → 18o-euqluhpfn.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1a35cd2uz40rm.js +1 -0
- package/dist/ui/static/_next/static/chunks/1fdowulgpx-tu.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2jztaj4km0-p1.js → 1gg0sjnr8ce0_.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1isat9t7mn8mx.js +1 -0
- package/dist/ui/static/_next/static/chunks/1nminehwt46sj.js +5 -0
- package/dist/ui/static/_next/static/chunks/1t1vm08xtco3a.js +1 -0
- package/dist/ui/static/_next/static/chunks/{40pywkvvth6qk.js → 1tu5p76jk6tu8.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1upn5gu7c_j2v.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0x8zukfn36b67.js → 1vq07gr__1fql.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1wj5_uetggavn.js +1 -0
- package/dist/ui/static/_next/static/chunks/1xoioc6pnmeb3.js +1 -0
- package/dist/ui/static/_next/static/chunks/{339a2jjs3kjwj.js → 1xy001hdmhglo.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{06zsbt3vzj_fx.js → 1za1-6o9oz1k5.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2skeghhuyv_c4.js → 299tu7y81dxk5.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2d9gg91izncw0.js +1 -0
- package/dist/ui/static/_next/static/chunks/2evpuk4qo0lx3.js +1 -0
- package/dist/ui/static/_next/static/chunks/2fxkefwnb8y51.js +1 -0
- package/dist/ui/static/_next/static/chunks/{36z66lssar4oh.js → 2oqlt-9yz4qtf.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2uu6q4bct_8uw.js +1 -0
- package/dist/ui/static/_next/static/chunks/2xi5lcexfddf9.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1we__nb0syt11.js → 2y1e1t_x6totm.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{001y_5k3kms8o.js → 339wsi27r9-nw.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3b2-z8pj0i91u.js +1 -0
- package/dist/ui/static/_next/static/chunks/3ba_mrp8s5-2v.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2bzjr2ai0a8hq.js → 3cuvu8nxos4fw.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{43fq84z1snp1a.js → 3j-m1jy0sfg3x.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3rqegw8x3e8l1.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3mmcvq93ws1o_.js → 3yhyg862owqrl.js} +1 -1
- package/dist/ui/static/_not-found/__next._full.txt +1 -1
- package/dist/ui/static/_not-found/__next._head.txt +1 -1
- package/dist/ui/static/_not-found/__next._index.txt +1 -1
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/ui/static/_not-found/__next._not-found.txt +1 -1
- package/dist/ui/static/_not-found/__next._tree.txt +1 -1
- package/dist/ui/static/_not-found.html +1 -1
- package/dist/ui/static/_not-found.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._full.txt +5 -5
- package/dist/ui/static/atlassian-connectors/__next._head.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._index.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +1 -1
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +2 -2
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.txt +2 -2
- package/dist/ui/static/atlassian-connectors.html +1 -1
- package/dist/ui/static/atlassian-connectors.txt +5 -5
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +3 -3
- package/dist/ui/static/launch/__next._full.txt +3 -3
- package/dist/ui/static/launch/__next._head.txt +1 -1
- package/dist/ui/static/launch/__next._index.txt +1 -1
- package/dist/ui/static/launch/__next._tree.txt +1 -1
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +2 -2
- package/dist/ui/static/launch/__next.launch.txt +1 -1
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +3 -3
- package/dist/ui/static/local-knowledge/__next._full.txt +3 -3
- package/dist/ui/static/local-knowledge/__next._head.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._index.txt +1 -1
- package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +2 -2
- package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +5 -5
- package/dist/ui/static/local-knowledge/capsule/__next._head.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._index.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.__PAGE__.txt +2 -2
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +2 -2
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +1 -1
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +5 -5
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +3 -3
- package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts +31 -2
- package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/audit.js +91 -13
- package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/process-guards.js +134 -22
- package/node_modules/@oscharko-dev/keiko-cli/dist/repair.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/repair.js +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/runner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/runner.js +4 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/state-paths.js +35 -14
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts +46 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-analyze.js +373 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts +91 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support-export.js +306 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts +38 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/support.js +338 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts +20 -2
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/ui.js +279 -18
- package/node_modules/@oscharko-dev/keiko-cli/package.json +13 -13
- package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/diagnostics.js +121 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +7 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +11 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts +22 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/observability.js +46 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.d.ts +40 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/store-fingerprint.js +123 -0
- package/node_modules/@oscharko-dev/keiko-contracts/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-evaluations/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-evidence/package.json +4 -4
- package/node_modules/@oscharko-dev/keiko-git/package.json +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/adapters.d.ts +5 -5
- package/node_modules/@oscharko-dev/keiko-harness/dist/adapters.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/adapters.js +3 -0
- package/node_modules/@oscharko-dev/keiko-harness/dist/ports.d.ts +3 -3
- package/node_modules/@oscharko-dev/keiko-harness/dist/ports.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-harness/package.json +6 -6
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/connector-pod.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/index.js +4 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +341 -62
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/orchestrator.js +601 -132
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts +20 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/knowledge-log.js +155 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod-refresh.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/manual-pod.js +1 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/repository-pod.js +33 -3
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/local-vector-index-port.js +25 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/usearch-ann-index.js +21 -3
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/vector-index.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/vector-index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/vector-index.js +2 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store-content-encryption.js +41 -6
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/store.js +118 -3
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-consolidation/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-governance/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-retrieval/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/cipher.js +32 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts +12 -2
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/db.js +171 -7
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/index.js +17 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.d.ts +25 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/migrate-encrypt.js +56 -4
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/schema.js +15 -4
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts +30 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault-log.js +139 -0
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.d.ts +21 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/vault.js +37 -8
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-vault/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts +18 -2
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/gateway.js +216 -18
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.js +188 -23
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/index.js +14 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts +27 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/observability.js +193 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-adapter.js +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.js +286 -68
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/replay.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/replay.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/replay.js +88 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts +23 -5
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/resilience.js +160 -27
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-sandbox/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-sdk/package.json +9 -9
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/errors/gateway.js +13 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/index.js +1 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/log-port.d.ts +20 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/log-port.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/log-port.js +130 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/macos-keychain.js +43 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.d.ts +22 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/secret-vault.js +53 -10
- package/node_modules/@oscharko-dev/keiko-security/dist/sqlite-corruption.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-security/dist/sqlite-corruption.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/sqlite-corruption.js +12 -3
- package/node_modules/@oscharko-dev/keiko-security/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-security/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-security/package.json +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialVault.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialVault.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/credentialVault.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncRoutes.js +4 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/syncService.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/wiring.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/wiring.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/wiring.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/writeActionRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/writeActionRoutes.js +4 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/bounded-request-body.js +131 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/browser.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/browser.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/browser.js +10 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-evidence.js +9 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-compaction-model-summary.js +26 -12
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts +15 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.js +122 -28
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-stream-handlers.js +50 -36
- package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/client-diagnostics-routes.js +150 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codingContextRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-context/codingContextRoutes.js +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/opencodeRuntimeComposition.js +20 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-sidecar-gateway.js +8 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-attachment-store.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-attachment-store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-attachment-store.js +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/correlation.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/correlation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/correlation.js +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialPersistence.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialPersistence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialPersistence.js +19 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/credentialVault.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +32 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +15 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.js +288 -99
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/completionRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/completionRoutes.js +3 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/inlineCompletionRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/inlineCompletionRoutes.js +3 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryCapture.js +8 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.js +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/patchApplyRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/patchApplyRoutes.js +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/files.js +24 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-error-diagnostic.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-error-diagnostic.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-error-diagnostic.js +26 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-instance-cache.js +71 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.js +7 -29
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.js +36 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/mutationEvidenceLedger.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/mutationEvidenceLedger.js +17 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncEvidence.js +10 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.js +20 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.js +3 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.js +67 -43
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-rerank-facade.js +37 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts +6 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/index.js +38 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.js +22 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-handlers.js +158 -36
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation-store.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation-store.js +9 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-remediation.js +10 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-store-open.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-store-open.js +8 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/localKnowledgeKeyProvider.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/localKnowledgeKeyProvider.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/localKnowledgeKeyProvider.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/manual/manual-pod-service.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/manual/manual-pod-service.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-audit-handler.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-audit-handler.js +13 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conflict-advisory.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conflict-advisory.js +37 -23
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-consolidation-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-consolidation-handlers.js +10 -55
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-conv-handlers.js +11 -56
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-embedding.js +135 -36
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-handlers.js +32 -62
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.d.ts +3 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-maintenance-handlers.js +19 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-retrieval-signals.js +40 -23
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-salience.js +45 -27
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/error-classification.d.ts +25 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/error-classification.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/error-classification.js +115 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/index.js +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-level.js +57 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts +22 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/log-redaction.js +698 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/route-template.js +342 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts +58 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-log.js +605 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts +37 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/server-logger.js +199 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/stack-frames.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/stack-frames.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/observability/stack-frames.js +261 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/process-log-sink.js +48 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figma/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotAdapter.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotAdapter.js +3 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotOrchestration.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotOrchestration.js +13 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotRoutes.js +13 -4
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/generationPort.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/generationPort.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/generationPort.js +6 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/handoffRoutes.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/judgePort.js +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/modelPolicyRoutes.js +43 -67
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/reCheckRoutes.js +10 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runExecution.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runExecution.js +8 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/relationship-activity-broadcast.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/relationship-activity-broadcast.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/relationship-activity-broadcast.js +7 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/relationship-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/relationship-handlers.js +39 -41
- package/node_modules/@oscharko-dev/keiko-server/dist/request-cancellation.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/request-cancellation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/request-cancellation.js +18 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/routes.js +8 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/run-engine.js +34 -22
- package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/run-handlers.js +10 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts +11 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/server.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/server.js +168 -32
- package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.d.ts +27 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.js +110 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/sse.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/sse.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/sse.js +13 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts +15 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/db.js +190 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/store/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.d.ts +29 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store-fingerprints.js +135 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store-handlers.js +7 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.js +10 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation-routes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation-routes.js +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-remediation.js +27 -24
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-handlers.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.js +15 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-realtime.js +14 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/workspace-index-provider.js +24 -11
- package/node_modules/@oscharko-dev/keiko-server/package.json +21 -21
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-tools/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-verification/package.json +5 -5
- package/node_modules/@oscharko-dev/keiko-workflows/package.json +10 -10
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/dist/version.js +1 -1
- package/node_modules/@oscharko-dev/keiko-workspace/package.json +3 -3
- package/package.json +27 -25
- package/release-impact.catalog.json +121 -8
- package/vendor/oscharko-dev-keiko-cli-0.3.16.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-0.3.14.tgz → oscharko-dev-keiko-connectors-0.3.16.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-0.3.16.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-0.3.14.tgz → oscharko-dev-keiko-evaluations-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evidence-0.3.14.tgz → oscharko-dev-keiko-evidence-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-git-0.3.14.tgz → oscharko-dev-keiko-git-0.3.16.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-harness-0.3.16.tgz +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-0.3.16.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-capture-0.3.14.tgz → oscharko-dev-keiko-memory-capture-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-consolidation-0.3.14.tgz → oscharko-dev-keiko-memory-consolidation-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-governance-0.3.14.tgz → oscharko-dev-keiko-memory-governance-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-0.3.14.tgz → oscharko-dev-keiko-memory-retrieval-0.3.16.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-memory-vault-0.3.16.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-0.3.16.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-quality-intelligence-0.3.14.tgz → oscharko-dev-keiko-quality-intelligence-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sandbox-0.3.14.tgz → oscharko-dev-keiko-sandbox-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-sdk-0.3.14.tgz → oscharko-dev-keiko-sdk-0.3.16.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-security-0.3.16.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-0.3.16.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-tools-0.3.14.tgz → oscharko-dev-keiko-tools-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-verification-0.3.14.tgz → oscharko-dev-keiko-verification-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workflows-0.3.14.tgz → oscharko-dev-keiko-workflows-0.3.16.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-workspace-0.3.14.tgz → oscharko-dev-keiko-workspace-0.3.16.tgz} +0 -0
- package/dist/ui/static/_next/static/chunks/03la2o0tcodk_.js +0 -1
- package/dist/ui/static/_next/static/chunks/089ft_ee-2y20.js +0 -1
- package/dist/ui/static/_next/static/chunks/09ifk61aybcwe.js +0 -1
- package/dist/ui/static/_next/static/chunks/0iwjev0wot4b0.js +0 -1
- package/dist/ui/static/_next/static/chunks/0lorosh9iyl5i.js +0 -7
- package/dist/ui/static/_next/static/chunks/0q76qswp80ci1.js +0 -1
- package/dist/ui/static/_next/static/chunks/130bqt0eb54h4.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pcygmx7pvpwp.js +0 -4
- package/dist/ui/static/_next/static/chunks/1s1u4fx4mdurk.js +0 -1
- package/dist/ui/static/_next/static/chunks/1wnmpolx-w3e0.js +0 -1
- package/dist/ui/static/_next/static/chunks/23jcx3s74h89k.js +0 -1
- package/dist/ui/static/_next/static/chunks/26sy339azhbd8.js +0 -1
- package/dist/ui/static/_next/static/chunks/2c9gq9vpyd9sm.js +0 -1
- package/dist/ui/static/_next/static/chunks/2iqsdgq5z7zi-.js +0 -1
- package/dist/ui/static/_next/static/chunks/2iuxjus3qppec.js +0 -1
- package/dist/ui/static/_next/static/chunks/2t0ktf1dxwv0_.js +0 -1
- package/dist/ui/static/_next/static/chunks/2wvo7q19g065e.js +0 -1
- package/dist/ui/static/_next/static/chunks/2xgtm8mmbv8mx.js +0 -1
- package/dist/ui/static/_next/static/chunks/32h72gk6uqdr0.js +0 -1
- package/dist/ui/static/_next/static/chunks/3ljwwkelljh81.js +0 -1
- package/dist/ui/static/_next/static/chunks/3pukrjhzlxlur.js +0 -1
- package/vendor/oscharko-dev-keiko-cli-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-contracts-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-harness-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-vault-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-security-0.3.14.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-0.3.14.tgz +0 -0
- /package/dist/ui/static/_next/static/{y54UtqSyUZo4acoo_2Vb4 → nV-Flxo4itfIzasbhujy9}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{y54UtqSyUZo4acoo_2Vb4 → nV-Flxo4itfIzasbhujy9}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{y54UtqSyUZo4acoo_2Vb4 → nV-Flxo4itfIzasbhujy9}/_ssgManifest.js +0 -0
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
// handleFileExtracted) so chunk-and-embed re-runs even for unchanged file hashes.
|
|
25
25
|
// Recovery mode (partial vector coverage, non-force): re-embeds using existing chunks
|
|
26
26
|
// only — the chunker runs with force=false so it reuses the already-correct chunk rows.
|
|
27
|
-
import { randomUUID } from "node:crypto";
|
|
27
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
28
28
|
import { checkpointCompatibility, DEFAULT_LARGE_DOCUMENT_RESOURCE_POLICY, LARGE_DOCUMENT_DIAGNOSTIC_CODES, largeDocumentPolicyFingerprint, } from "@oscharko-dev/keiko-contracts";
|
|
29
29
|
import { assertCompatibleEmbeddingIdentity, verifyEmbeddingCapability, } from "@oscharko-dev/keiko-model-gateway";
|
|
30
30
|
import { chunkDocument } from "../chunking/chunker-runner.js";
|
|
@@ -40,7 +40,8 @@ import { BoundedIndexingCancelledError, BoundedIndexingPolicyError, chunkDocumen
|
|
|
40
40
|
import { resolveCapsuleModelUsePolicy } from "../model-use-policy.js";
|
|
41
41
|
import { selectExtractionCheckpoint, upsertExtractionCheckpoint } from "./checkpoint-persist.js";
|
|
42
42
|
import { finalizeJobRow, isJobCancellationRequested, insertJobRow, updateJobCounters, } from "./job-persist.js";
|
|
43
|
-
import { embedChunkBatch } from "./embedding-batcher.js";
|
|
43
|
+
import { embedChunkBatch, embeddingEndpointHost } from "./embedding-batcher.js";
|
|
44
|
+
import { emitKnowledgeLogEvent, knowledgeErrorKind, startKnowledgeLogTimer, } from "../knowledge-log.js";
|
|
44
45
|
import { countVectorsForCapsule, countVectorsForDocument, deleteVectorsForDocument, invalidateVectorIndexStateForCapsules, selectChunksForDocument, } from "./vector-persist.js";
|
|
45
46
|
import { countLexicalRowsForDocument, deleteLexicalRowsForDocument, replaceLexicalRowsForDocument, } from "./lexical-index-persist.js";
|
|
46
47
|
import { DEFAULT_INDEXING_BATCH_SIZE, DEFAULT_INDEXING_CONCURRENCY, IndexingError, } from "./types.js";
|
|
@@ -141,6 +142,88 @@ function emitProgress(options, event) {
|
|
|
141
142
|
// intentionally swallowed — progress sinks must not affect run correctness
|
|
142
143
|
}
|
|
143
144
|
}
|
|
145
|
+
// ─── Activity log ─────────────────────────────────────────────────────────────
|
|
146
|
+
// WHY THESE LINES EXIST ON TOP OF THE EVENT STREAM
|
|
147
|
+
//
|
|
148
|
+
// `IndexingEvent` reports STATE, and only to a consumer that is actively driving the async
|
|
149
|
+
// iterator. The field incident this instrumentation was written for is a run that produced no
|
|
150
|
+
// state change at all — "0 of 1 documents, 0 of 36 vectors" for six minutes, then an operator
|
|
151
|
+
// cancellation. There was nothing to report, so nothing was reported, and four releases went by
|
|
152
|
+
// guessing. These lines are the run's SPINE: one per lifecycle transition, at `info`, so an
|
|
153
|
+
// operator who opens `server.log` at the default level sees which step a stuck run reached and
|
|
154
|
+
// never started the next one — without attaching a consumer to anything.
|
|
155
|
+
//
|
|
156
|
+
// CORRELATION. Concurrency is up to 4, so several documents and several embedding flushes are in
|
|
157
|
+
// flight at once and a line without an owner cannot be attributed to the work that produced it.
|
|
158
|
+
// Every line carries the run's `IndexingLogContext`: the job uuid verbatim in `correlationId`,
|
|
159
|
+
// and the capsule (always) and document (where known) as DIGESTS — see the type's own note for
|
|
160
|
+
// why the raw ids are not writable.
|
|
161
|
+
const LOG_DIGEST_LENGTH = 16;
|
|
162
|
+
// A truncated sha-256. 16 hex characters is 64 bits: collision-free across every capsule and
|
|
163
|
+
// document a single log file can hold, short enough to read at the start of a line, and — being
|
|
164
|
+
// a one-way digest of the whole value — carries nothing back about the name it stands for.
|
|
165
|
+
function logDigest(value) {
|
|
166
|
+
return createHash("sha256").update(value).digest("hex").slice(0, LOG_DIGEST_LENGTH);
|
|
167
|
+
}
|
|
168
|
+
// `scheme://host` for the configured embedding gateway, omitted when the endpoint does not
|
|
169
|
+
// parse. Never the path or the query — see `embeddingEndpointHost`.
|
|
170
|
+
function endpointHostExtra(state) {
|
|
171
|
+
const host = embeddingEndpointHost(state.options.embeddingAdapter.endpoint);
|
|
172
|
+
return host === undefined ? {} : { endpointHost: host };
|
|
173
|
+
}
|
|
174
|
+
// The run's chunker profile, resolved through the exact same two calls the pipeline itself
|
|
175
|
+
// takes to decide chunk boundaries (`chunkingOptionsForState` + `resolveChunkingOptions`) — no
|
|
176
|
+
// new computation, just surfacing values the run already derives. `IndexingOptions.chunkingOptions`
|
|
177
|
+
// is operator-overridable, so without this an operator-supplied budget was invisible on the one
|
|
178
|
+
// line that states the run's shape.
|
|
179
|
+
function chunkerConfigExtra(state) {
|
|
180
|
+
const resolved = resolveChunkingOptions(chunkingOptionsForState(state));
|
|
181
|
+
return {
|
|
182
|
+
minChunkTokens: resolved.minTokens,
|
|
183
|
+
maxChunkTokens: resolved.maxTokens,
|
|
184
|
+
overlapTokens: resolved.overlapTokens,
|
|
185
|
+
tokenizerKind: resolved.tokenizer.kind,
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
function documentLogContext(state, documentId) {
|
|
189
|
+
return { ...state.logContext, documentIdDigest: logDigest(String(documentId)) };
|
|
190
|
+
}
|
|
191
|
+
// Routed through `emitKnowledgeLogEvent` for the same reason `emitProgress` above wraps the
|
|
192
|
+
// progress callback: the sink is caller-supplied code, and a run's correctness may not depend on
|
|
193
|
+
// it. Without the guard a throwing sink would abort whichever step happened to be logging —
|
|
194
|
+
// mid-document, inside a retry ladder, or in the failure path that is about to report the real
|
|
195
|
+
// cause — and a logging defect would be indistinguishable from an indexing failure. The seam also
|
|
196
|
+
// keeps a broken sink from going unnoticed; see `knowledge-log.ts`.
|
|
197
|
+
function writeKnowledgeLog(state, context, event) {
|
|
198
|
+
emitKnowledgeLogEvent(state.options.logSink, {
|
|
199
|
+
...event,
|
|
200
|
+
correlationId: context.jobId,
|
|
201
|
+
extra: {
|
|
202
|
+
capsuleIdDigest: context.capsuleIdDigest,
|
|
203
|
+
...(context.documentIdDigest !== undefined
|
|
204
|
+
? { documentIdDigest: context.documentIdDigest }
|
|
205
|
+
: {}),
|
|
206
|
+
...event.extra,
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
// Job-scoped lifecycle line.
|
|
211
|
+
function logIndexing(state, event) {
|
|
212
|
+
writeKnowledgeLog(state, state.logContext, { ...event, category: "indexing" });
|
|
213
|
+
}
|
|
214
|
+
// Job-scoped line about the embedding gateway rather than the corpus. The category has to match
|
|
215
|
+
// the op prefix: an `embedding.*` op filed under `indexing` is invisible to the grep an operator
|
|
216
|
+
// runs when the gateway is the suspect.
|
|
217
|
+
function logEmbeddingRun(state, event) {
|
|
218
|
+
writeKnowledgeLog(state, state.logContext, { ...event, category: "embedding" });
|
|
219
|
+
}
|
|
220
|
+
// Document-scoped lifecycle line — same shape, plus the document digest.
|
|
221
|
+
function logDocument(state, documentId, event) {
|
|
222
|
+
writeKnowledgeLog(state, documentLogContext(state, documentId), {
|
|
223
|
+
...event,
|
|
224
|
+
category: "indexing",
|
|
225
|
+
});
|
|
226
|
+
}
|
|
144
227
|
function clearDocumentArtifacts(state, documentId, options) {
|
|
145
228
|
deleteVectorsForDocument(state.options.store._internal.db, state.capsule.id, documentId);
|
|
146
229
|
if (options.deleteChunks) {
|
|
@@ -177,12 +260,7 @@ function eligibleForRestoreSnapshot(db, capsuleId, documentId) {
|
|
|
177
260
|
return false;
|
|
178
261
|
return countVectorsForDocument(db, capsuleId, documentId) > 0;
|
|
179
262
|
}
|
|
180
|
-
function captureRestoreSnapshotIfEligible(state,
|
|
181
|
-
const documentId = documentIdFor({
|
|
182
|
-
capsuleId: state.capsule.id,
|
|
183
|
-
sourceId: source.id,
|
|
184
|
-
relativePath,
|
|
185
|
-
});
|
|
263
|
+
function captureRestoreSnapshotIfEligible(state, documentId) {
|
|
186
264
|
const db = state.options.store._internal.db;
|
|
187
265
|
if (!eligibleForRestoreSnapshot(db, state.capsule.id, documentId))
|
|
188
266
|
return;
|
|
@@ -510,7 +588,20 @@ async function prepareChunksToEmbedSafely(state, documentId, sourceText) {
|
|
|
510
588
|
try {
|
|
511
589
|
return await prepareChunksToEmbed(state, documentId, sourceText);
|
|
512
590
|
}
|
|
513
|
-
catch {
|
|
591
|
+
catch (cause) {
|
|
592
|
+
// The caller converts `null` into a CONTEXTUAL_RETRIEVAL_FAILED document error, which tells
|
|
593
|
+
// an operator that a document failed but not which stage threw. The error KIND is the one
|
|
594
|
+
// fact that separates a chat-gateway outage from a chunker defect, and it is lost here
|
|
595
|
+
// unless this line records it. The message is never read — it can carry document text, and
|
|
596
|
+
// neither is the raw document id, which IS the document's relative path (`doc:<capsule>:
|
|
597
|
+
// <source>:<relativePath>`): the digest correlates it to every other line of this document's
|
|
598
|
+
// work without writing a customer file name into the log.
|
|
599
|
+
logDocument(state, documentId, {
|
|
600
|
+
level: "warn",
|
|
601
|
+
op: "indexing.chunking.failed",
|
|
602
|
+
errorKind: knowledgeErrorKind(cause),
|
|
603
|
+
extra: { sourceTextLength: sourceText.length, lane: "standard" },
|
|
604
|
+
});
|
|
514
605
|
return null;
|
|
515
606
|
}
|
|
516
607
|
}
|
|
@@ -520,7 +611,7 @@ function lastChunkIdOfBatch(vectors) {
|
|
|
520
611
|
const last = vectors.at(-1);
|
|
521
612
|
return last === undefined ? null : last.chunkId;
|
|
522
613
|
}
|
|
523
|
-
async function embedOneChunkBatch(state, batch) {
|
|
614
|
+
async function embedOneChunkBatch(state, documentId, batch) {
|
|
524
615
|
return embedChunkBatch(batch, {
|
|
525
616
|
adapter: state.options.embeddingAdapter,
|
|
526
617
|
store: state.options.store,
|
|
@@ -531,16 +622,22 @@ async function embedOneChunkBatch(state, batch) {
|
|
|
531
622
|
now: state.now,
|
|
532
623
|
idSource: state.idSource,
|
|
533
624
|
tokenizer: state.tokenizer,
|
|
625
|
+
// The batcher's lines are the ones an operator reads during a stall, and with concurrency 4
|
|
626
|
+
// they interleave across documents — so they carry the same correlation context as the
|
|
627
|
+
// orchestrator's own, down to the document.
|
|
628
|
+
...(state.options.logSink !== undefined
|
|
629
|
+
? { logSink: state.options.logSink, logContext: documentLogContext(state, documentId) }
|
|
630
|
+
: {}),
|
|
534
631
|
});
|
|
535
632
|
}
|
|
536
|
-
async function embedChunkBatches(state, batches) {
|
|
633
|
+
async function embedChunkBatches(state, documentId, batches) {
|
|
537
634
|
const errors = [];
|
|
538
635
|
let vectorCount = 0;
|
|
539
636
|
let lastChunkId = null;
|
|
540
637
|
for (const batch of batches) {
|
|
541
638
|
if (cancellationRequested(state))
|
|
542
639
|
break;
|
|
543
|
-
const result = await embedOneChunkBatch(state, batch);
|
|
640
|
+
const result = await embedOneChunkBatch(state, documentId, batch);
|
|
544
641
|
vectorCount += result.vectors.length;
|
|
545
642
|
errors.push(...result.errors);
|
|
546
643
|
const batchLastChunkId = lastChunkIdOfBatch(result.vectors);
|
|
@@ -570,70 +667,111 @@ async function embedDocumentChunks(state, documentId, source, relativePath) {
|
|
|
570
667
|
return { vectorCount: 0, errors: [], lastChunkId: null };
|
|
571
668
|
}
|
|
572
669
|
const batches = sliceIntoBatches(chunks, state.batchSize);
|
|
573
|
-
|
|
670
|
+
// The flush plan for this document: how many chunks became how many batches at which cap. It
|
|
671
|
+
// is the last line before the first outbound call, so a run that stalls in embedding stops
|
|
672
|
+
// exactly here — with the count of work it was about to issue.
|
|
673
|
+
logDocument(state, documentId, {
|
|
674
|
+
level: "info",
|
|
675
|
+
op: "indexing.document.embedding-started",
|
|
676
|
+
extra: { chunkCount: chunks.length, batchCount: batches.length, batchSize: state.batchSize },
|
|
677
|
+
});
|
|
678
|
+
return embedChunkBatches(state, documentId, batches);
|
|
574
679
|
}
|
|
575
680
|
// ─── Document handlers ────────────────────────────────────────────────────────
|
|
576
681
|
function handleExtractionSkipped(state, result) {
|
|
577
682
|
state.skippedDocuments += 1;
|
|
683
|
+
const documentId = result.outcome.kind === "skipped" ? result.outcome.document.id : "";
|
|
684
|
+
logDocument(state, documentId, {
|
|
685
|
+
level: "info",
|
|
686
|
+
op: "indexing.document.skipped",
|
|
687
|
+
extra: { reason: "unchanged", skippedDocuments: state.skippedDocuments },
|
|
688
|
+
});
|
|
578
689
|
return {
|
|
579
690
|
kind: "document-skipped",
|
|
580
691
|
jobId: state.jobId,
|
|
581
692
|
capsuleId: state.capsule.id,
|
|
582
693
|
sourceId: result.sourceId,
|
|
583
|
-
documentId
|
|
694
|
+
documentId,
|
|
584
695
|
reason: "unchanged",
|
|
585
696
|
};
|
|
586
697
|
}
|
|
587
698
|
// GRD-010: transient IO failure codes that must NOT destroy a previously-good index on an
|
|
588
699
|
// incremental refresh. Mirrors the gate in discovery/extract.ts buildFailureResult.
|
|
589
700
|
const TRANSIENT_DISCOVERY_CODES = new Set(["READ_FAILED", "STAT_FAILED"]);
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
701
|
+
// The extraction lane does NOT reach `appendDocumentFailure` (see the note there), so until this
|
|
702
|
+
// line existed a READ_FAILED, a STAT_FAILED, a PATH_ESCAPE or any parse failure produced a
|
|
703
|
+
// `DISCOVERY_FAILED:<code>` event for a consumer driving the iterator and nothing at all in the
|
|
704
|
+
// file an operator opens. `errorKind` carries the discovery code — the part that says WHY, and
|
|
705
|
+
// the part that decides the repair: an unreadable mount, an unstattable entry and a parser that
|
|
706
|
+
// rejected the bytes are three different problems. The message is never written; it quotes the
|
|
707
|
+
// path, or the fragment of content that failed to parse.
|
|
708
|
+
function logExtractionFailed(state, documentId, discoveryCode) {
|
|
709
|
+
logDocument(state, documentId, {
|
|
710
|
+
level: "warn",
|
|
711
|
+
op: "indexing.document.extraction-failed",
|
|
712
|
+
errorKind: discoveryCode,
|
|
713
|
+
extra: { failedDocuments: state.failedDocuments },
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
// The GRD-010 downgrade, made visible. A transient re-read failure on a document whose previous
|
|
717
|
+
// chunks survived is reported to the consumer as `document-skipped` with reason "unchanged" —
|
|
718
|
+
// byte-identical to what a genuinely unchanged document produces. The flattening is deliberate
|
|
719
|
+
// (the retrievable content really did survive), but it hides that this document was NOT
|
|
720
|
+
// refreshed this run, which is exactly the state behind "the pod keeps answering from the old
|
|
721
|
+
// version of the file". At `warn`, with the discovery code that caused the downgrade.
|
|
722
|
+
function transientRereadSkip(state, result, documentId, discoveryCode, preservedChunkCount) {
|
|
723
|
+
state.skippedDocuments += 1;
|
|
724
|
+
logDocument(state, documentId, {
|
|
725
|
+
level: "warn",
|
|
726
|
+
op: "indexing.document.skipped",
|
|
727
|
+
errorKind: discoveryCode,
|
|
728
|
+
extra: {
|
|
729
|
+
reason: "transient-read-failure",
|
|
730
|
+
preservedChunkCount,
|
|
731
|
+
skippedDocuments: state.skippedDocuments,
|
|
732
|
+
},
|
|
733
|
+
});
|
|
734
|
+
return {
|
|
735
|
+
kind: "document-skipped",
|
|
736
|
+
jobId: state.jobId,
|
|
737
|
+
capsuleId: state.capsule.id,
|
|
738
|
+
sourceId: result.sourceId,
|
|
739
|
+
documentId,
|
|
740
|
+
reason: "unchanged",
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
function failExtractedDocument(state, result, documentId, discoveryCode, message) {
|
|
625
744
|
state.failedDocuments += 1;
|
|
626
|
-
|
|
745
|
+
logExtractionFailed(state, documentId, discoveryCode);
|
|
746
|
+
clearDocumentArtifacts(state, documentId, { deleteChunks: true });
|
|
747
|
+
markDocumentFailed(state, documentId);
|
|
748
|
+
const error = { code: `DISCOVERY_FAILED:${discoveryCode}`, message };
|
|
627
749
|
state.lastError = error;
|
|
628
750
|
return {
|
|
629
751
|
kind: "document-failed",
|
|
630
752
|
jobId: state.jobId,
|
|
631
753
|
capsuleId: state.capsule.id,
|
|
632
754
|
sourceId: result.sourceId,
|
|
755
|
+
documentId,
|
|
633
756
|
relativePath: result.relativePath,
|
|
634
757
|
error,
|
|
635
758
|
};
|
|
636
759
|
}
|
|
760
|
+
function handleExtractionFailed(state, result, outcome) {
|
|
761
|
+
const documentId = outcome.document.id;
|
|
762
|
+
const errCode = outcome.error.code;
|
|
763
|
+
// GRD-010: a transient re-read failure on a document that still has a prior good index
|
|
764
|
+
// (extract.ts preserved its chunks/vectors) is reported as a non-destructive skip, NOT a
|
|
765
|
+
// failure — the retrievable content survives until a successful re-extraction. The chunk
|
|
766
|
+
// count is only read for a transient code, exactly as before.
|
|
767
|
+
const preservedChunks = TRANSIENT_DISCOVERY_CODES.has(errCode)
|
|
768
|
+
? countChunksForDocument(state.options.store._internal.db, state.capsule.id, documentId)
|
|
769
|
+
: 0;
|
|
770
|
+
if (preservedChunks > 0) {
|
|
771
|
+
return transientRereadSkip(state, result, documentId, errCode, preservedChunks);
|
|
772
|
+
}
|
|
773
|
+
return failExtractedDocument(state, result, documentId, errCode, outcome.error.message);
|
|
774
|
+
}
|
|
637
775
|
function resolveChunkCount(state, documentId, skippedExisting, freshChunkIds) {
|
|
638
776
|
if (!skippedExisting)
|
|
639
777
|
return freshChunkIds.length;
|
|
@@ -677,6 +815,19 @@ function chunkPersistedDocument(state, result) {
|
|
|
677
815
|
};
|
|
678
816
|
}
|
|
679
817
|
function chunkedDocumentEvents(state, sourceId, documentId, relativePath, chunkCount) {
|
|
818
|
+
// The per-document half of the spine. `chunkCount` is the denominator of the "0 of 36 vectors"
|
|
819
|
+
// the operator sees: with this line an operator can say the chunker produced 36 and embedding
|
|
820
|
+
// never returned, which is a different bug from the chunker producing nothing. The relative
|
|
821
|
+
// path is deliberately absent — it is a customer file name; the document digest identifies it.
|
|
822
|
+
logDocument(state, documentId, {
|
|
823
|
+
level: "info",
|
|
824
|
+
op: "indexing.document.extracted",
|
|
825
|
+
});
|
|
826
|
+
logDocument(state, documentId, {
|
|
827
|
+
level: "info",
|
|
828
|
+
op: "indexing.document.chunked",
|
|
829
|
+
extra: { chunkCount },
|
|
830
|
+
});
|
|
680
831
|
return [
|
|
681
832
|
{
|
|
682
833
|
kind: "document-extracted",
|
|
@@ -759,32 +910,25 @@ function tryChunkDocument(state, result, documentId) {
|
|
|
759
910
|
try {
|
|
760
911
|
return { chunked: chunkPersistedDocument(state, result) };
|
|
761
912
|
}
|
|
762
|
-
catch {
|
|
913
|
+
catch (cause) {
|
|
763
914
|
if (cancellationRequested(state)) {
|
|
764
915
|
clearDocumentArtifacts(state, documentId, { deleteChunks: true });
|
|
765
916
|
return { events: [] };
|
|
766
917
|
}
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
sourceId: result.sourceId,
|
|
782
|
-
documentId,
|
|
783
|
-
relativePath: result.relativePath,
|
|
784
|
-
error,
|
|
785
|
-
},
|
|
786
|
-
],
|
|
787
|
-
};
|
|
918
|
+
// Same class as the contextual lane above and the bounded lane below: the document error is
|
|
919
|
+
// flattened to CHUNKING_FAILED, so the real cause exists nowhere else. One shared op name
|
|
920
|
+
// across all three lanes, distinguished by `lane`, so an operator greps once.
|
|
921
|
+
logDocument(state, documentId, {
|
|
922
|
+
level: "warn",
|
|
923
|
+
op: "indexing.chunking.failed",
|
|
924
|
+
errorKind: knowledgeErrorKind(cause),
|
|
925
|
+
extra: { lane: "standard-chunker" },
|
|
926
|
+
});
|
|
927
|
+
// Routed through the shared failure sink rather than a hand-built copy of it: this branch
|
|
928
|
+
// used to duplicate the counter bump, the artifact cleanup, the status write and the event,
|
|
929
|
+
// which is how it ended up as the one document failure with no `indexing.document.failed`
|
|
930
|
+
// line. One owner, one shape, every lane.
|
|
931
|
+
return appendDocumentFailure(state, [], result.sourceId, documentId, result.relativePath, { code: "CHUNKING_FAILED", message: "document chunking failed" }, { deleteChunks: true });
|
|
788
932
|
}
|
|
789
933
|
}
|
|
790
934
|
function appendDocumentFailure(state, events, sourceId, documentId, relativePath, error, options) {
|
|
@@ -792,6 +936,22 @@ function appendDocumentFailure(state, events, sourceId, documentId, relativePath
|
|
|
792
936
|
clearDocumentArtifacts(state, documentId, options);
|
|
793
937
|
markDocumentFailed(state, documentId);
|
|
794
938
|
state.lastError = error;
|
|
939
|
+
// Every POST-EXTRACTION lane funnels through here — standard, bounded, identity gate and
|
|
940
|
+
// chunker alike — so this is the single site that records their failures. It is NOT every
|
|
941
|
+
// failing lane: a document that never got past discovery/extraction fails inside
|
|
942
|
+
// `handleExtractionFailed`, which owns its own `indexing.document.extraction-failed` line for
|
|
943
|
+
// exactly that reason. Claiming otherwise here is what left that lane silent through four
|
|
944
|
+
// releases of field guesswork. The error CODE is written, never the message: a document
|
|
945
|
+
// error's message can quote the content that failed to parse.
|
|
946
|
+
logDocument(state, documentId, {
|
|
947
|
+
level: "warn",
|
|
948
|
+
op: "indexing.document.failed",
|
|
949
|
+
errorKind: error.code,
|
|
950
|
+
extra: {
|
|
951
|
+
transient: error.transient === true,
|
|
952
|
+
consecutiveTransientEmbedFailures: state.consecutiveTransientEmbedFailures,
|
|
953
|
+
},
|
|
954
|
+
});
|
|
795
955
|
events.push({
|
|
796
956
|
kind: "document-failed",
|
|
797
957
|
jobId: state.jobId,
|
|
@@ -808,6 +968,15 @@ function completeEmbeddedDocument(state, events, sourceId, documentId, embedResu
|
|
|
808
968
|
state.vectorsPersisted += embedResult.vectorCount;
|
|
809
969
|
if (embedResult.lastChunkId !== null)
|
|
810
970
|
state.lastResumeToken = embedResult.lastChunkId;
|
|
971
|
+
logDocument(state, documentId, {
|
|
972
|
+
level: "info",
|
|
973
|
+
op: "indexing.document.embedded",
|
|
974
|
+
extra: {
|
|
975
|
+
vectorCount: embedResult.vectorCount,
|
|
976
|
+
vectorsPersistedSoFar: state.vectorsPersisted,
|
|
977
|
+
processedDocuments: state.processedDocuments,
|
|
978
|
+
},
|
|
979
|
+
});
|
|
811
980
|
events.push({
|
|
812
981
|
kind: "document-embedded",
|
|
813
982
|
jobId: state.jobId,
|
|
@@ -984,8 +1153,27 @@ function prepareBoundedChunks(state, result, documentId, checkpoint, fingerprint
|
|
|
984
1153
|
}
|
|
985
1154
|
return countChunksForDocument(db, state.capsule.id, documentId);
|
|
986
1155
|
}
|
|
1156
|
+
// The bounded large-document lane had the same hole the standard lane did: every non-policy cause
|
|
1157
|
+
// is relabelled `CHUNKING_FAILED` with a fixed message, so an out-of-memory page window, a corrupt
|
|
1158
|
+
// checkpoint and a real chunker defect are indistinguishable downstream. It gets the identical
|
|
1159
|
+
// line, under the identical op name, tagged with its lane — including the cancellation branch,
|
|
1160
|
+
// which otherwise returns zero events and leaves an operator with a document that simply stopped
|
|
1161
|
+
// existing in the run.
|
|
1162
|
+
function logBoundedChunkFailure(state, documentId, cause) {
|
|
1163
|
+
logDocument(state, documentId, {
|
|
1164
|
+
level: "warn",
|
|
1165
|
+
op: "indexing.chunking.failed",
|
|
1166
|
+
errorKind: knowledgeErrorKind(cause),
|
|
1167
|
+
extra: {
|
|
1168
|
+
lane: "bounded",
|
|
1169
|
+
cancelled: cause instanceof BoundedIndexingCancelledError || cancellationRequested(state),
|
|
1170
|
+
policyRejection: cause instanceof BoundedIndexingPolicyError,
|
|
1171
|
+
},
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
987
1174
|
function boundedChunkPreparationFailure(state, result, documentId, checkpoint, fingerprint, cause) {
|
|
988
1175
|
const db = state.options.store._internal.db;
|
|
1176
|
+
logBoundedChunkFailure(state, documentId, cause);
|
|
989
1177
|
if (cause instanceof BoundedIndexingCancelledError || cancellationRequested(state)) {
|
|
990
1178
|
updateDocumentStatusRow(db, state.capsule.id, documentId, "pending");
|
|
991
1179
|
writeBoundedCheckpoint({
|
|
@@ -1107,6 +1295,21 @@ async function* handleBoundedDocument(state, result, documentId, checkpoint) {
|
|
|
1107
1295
|
function* handleUnsupportedDocument(state, result, documentId) {
|
|
1108
1296
|
clearDocumentArtifacts(state, documentId, { deleteChunks: true });
|
|
1109
1297
|
state.skippedDocuments += 1;
|
|
1298
|
+
// This pair — extracted, then immediately skipped — is a whole document that will never
|
|
1299
|
+
// produce a vector, and it wrote nothing. An operator reading "0 of 1 documents" against a
|
|
1300
|
+
// scanned PDF or an image saw a run that looked identical to one wedged in the gateway. The
|
|
1301
|
+
// `extracted` line keeps this lane countable next to the chunked lane's own; `documentStatus`
|
|
1302
|
+
// is the closed enum the extractor assigned, never a file name.
|
|
1303
|
+
logDocument(state, documentId, { level: "info", op: "indexing.document.extracted" });
|
|
1304
|
+
logDocument(state, documentId, {
|
|
1305
|
+
level: "info",
|
|
1306
|
+
op: "indexing.document.skipped",
|
|
1307
|
+
extra: {
|
|
1308
|
+
reason: "unsupported",
|
|
1309
|
+
documentStatus: result.outcome.document.status,
|
|
1310
|
+
skippedDocuments: state.skippedDocuments,
|
|
1311
|
+
},
|
|
1312
|
+
});
|
|
1110
1313
|
yield {
|
|
1111
1314
|
kind: "document-extracted",
|
|
1112
1315
|
jobId: state.jobId,
|
|
@@ -1169,8 +1372,8 @@ async function* handlePersistedDocument(state, result) {
|
|
|
1169
1372
|
function* handleExtractionSkippedEvents(state, result) {
|
|
1170
1373
|
yield handleExtractionSkipped(state, result);
|
|
1171
1374
|
}
|
|
1172
|
-
function* handleExtractionFailedEvents(state, result) {
|
|
1173
|
-
yield handleExtractionFailed(state, result);
|
|
1375
|
+
function* handleExtractionFailedEvents(state, result, outcome) {
|
|
1376
|
+
yield handleExtractionFailed(state, result, outcome);
|
|
1174
1377
|
}
|
|
1175
1378
|
// Routes a file-extracted event: force-skipped docs are re-shaped to persisted so the
|
|
1176
1379
|
// standard chunk-and-embed pipeline runs on them.
|
|
@@ -1198,7 +1401,7 @@ async function* handleFileExtracted(state, result) {
|
|
|
1198
1401
|
return;
|
|
1199
1402
|
}
|
|
1200
1403
|
if (result.outcome.kind === "failed") {
|
|
1201
|
-
yield* handleExtractionFailedEvents(state, result);
|
|
1404
|
+
yield* handleExtractionFailedEvents(state, result, result.outcome);
|
|
1202
1405
|
return;
|
|
1203
1406
|
}
|
|
1204
1407
|
yield* handlePersistedDocument(state, result);
|
|
@@ -1206,7 +1409,13 @@ async function* handleFileExtracted(state, result) {
|
|
|
1206
1409
|
async function* handleDiscoveryEvent(state, source, evt) {
|
|
1207
1410
|
if (evt.kind === "file-discovered") {
|
|
1208
1411
|
state.totalDocuments += 1;
|
|
1209
|
-
|
|
1412
|
+
const documentId = documentIdFor({
|
|
1413
|
+
capsuleId: state.capsule.id,
|
|
1414
|
+
sourceId: source.id,
|
|
1415
|
+
relativePath: evt.relativePath,
|
|
1416
|
+
});
|
|
1417
|
+
captureRestoreSnapshotIfEligible(state, documentId);
|
|
1418
|
+
logDocumentExtractionStarted(state, documentId, evt.sizeBytes);
|
|
1210
1419
|
yield {
|
|
1211
1420
|
kind: "document-discovered",
|
|
1212
1421
|
jobId: state.jobId,
|
|
@@ -1218,24 +1427,7 @@ async function* handleDiscoveryEvent(state, source, evt) {
|
|
|
1218
1427
|
return;
|
|
1219
1428
|
}
|
|
1220
1429
|
if (evt.kind === "scope-error") {
|
|
1221
|
-
state
|
|
1222
|
-
state.discoveryFailedDocuments += 1;
|
|
1223
|
-
if (evt.error.code === "LIMIT_REACHED") {
|
|
1224
|
-
persistDiscoveryLimitWarning(state);
|
|
1225
|
-
}
|
|
1226
|
-
const err = {
|
|
1227
|
-
code: `DISCOVERY_FAILED:${evt.error.code}`,
|
|
1228
|
-
message: evt.error.message,
|
|
1229
|
-
};
|
|
1230
|
-
state.lastError = err;
|
|
1231
|
-
yield {
|
|
1232
|
-
kind: "document-failed",
|
|
1233
|
-
jobId: state.jobId,
|
|
1234
|
-
capsuleId: state.capsule.id,
|
|
1235
|
-
sourceId: source.id,
|
|
1236
|
-
...(evt.error.relativePath !== undefined ? { relativePath: evt.error.relativePath } : {}),
|
|
1237
|
-
error: err,
|
|
1238
|
-
};
|
|
1430
|
+
yield scopeErrorEvent(state, source, evt.error);
|
|
1239
1431
|
return;
|
|
1240
1432
|
}
|
|
1241
1433
|
if (evt.kind === "cancelled" || evt.kind === "completed") {
|
|
@@ -1249,6 +1441,70 @@ async function* handleDiscoveryEvent(state, source, evt) {
|
|
|
1249
1441
|
// reach that function — discard is a no-op if it already ran.
|
|
1250
1442
|
discardRestoreSnapshot(state, evt.result.outcome.document.id);
|
|
1251
1443
|
}
|
|
1444
|
+
// The discovery lane's progress tick AND the extraction-start marker, deliberately one line.
|
|
1445
|
+
// `discoverAndExtract` yields `file-discovered` and only THEN awaits that file's extraction, so
|
|
1446
|
+
// the instant this runs is both "the walk found another file" and "extraction of that file is
|
|
1447
|
+
// about to begin" — two lines here would carry the same timestamp and the same facts.
|
|
1448
|
+
//
|
|
1449
|
+
// It closes both halves of the field incident's silent middle. Between
|
|
1450
|
+
// `indexing.source.started` and `indexing.source.completed` a slow walk now advances a visible
|
|
1451
|
+
// counter instead of showing nothing, and a document that hangs mid-extraction leaves this line
|
|
1452
|
+
// with no `indexing.document.extracted` partner — which is what separates "the walk never
|
|
1453
|
+
// reached it" from "extraction started and never returned".
|
|
1454
|
+
//
|
|
1455
|
+
// `discoveredCount` is the running job-wide total: the "1" in "0 of 1 documents". The relative
|
|
1456
|
+
// path is a customer file name and is never written — the document digest carries identity, and
|
|
1457
|
+
// it is the same digest every later line for this document uses, so one grep follows the
|
|
1458
|
+
// document from here to its terminal line.
|
|
1459
|
+
function logDocumentExtractionStarted(state, documentId, sizeBytes) {
|
|
1460
|
+
logDocument(state, documentId, {
|
|
1461
|
+
level: "info",
|
|
1462
|
+
op: "indexing.document.extraction-started",
|
|
1463
|
+
extra: { discoveredCount: state.totalDocuments, sizeBytes },
|
|
1464
|
+
});
|
|
1465
|
+
}
|
|
1466
|
+
// Every walk-level rejection an operator can act on: a PATH_ESCAPE containment refusal, an
|
|
1467
|
+
// unreadable or unstattable directory, an invalid scope, and the LIMIT_REACHED truncation
|
|
1468
|
+
// frames. Each of them bumped two counters and produced a `document-failed` event that only a
|
|
1469
|
+
// consumer driving the iterator ever saw. `errorKind` is the discovery code; the message is
|
|
1470
|
+
// never written because a walk error's message quotes the path that produced it. Note that a
|
|
1471
|
+
// deny-list match is dropped inside the walk without an error at all and cannot reach here.
|
|
1472
|
+
function logDiscoveryScopeError(state, error) {
|
|
1473
|
+
logIndexing(state, {
|
|
1474
|
+
level: "warn",
|
|
1475
|
+
op: "indexing.discovery.scope-error",
|
|
1476
|
+
errorKind: error.code,
|
|
1477
|
+
extra: {
|
|
1478
|
+
scopedToFile: error.relativePath !== undefined,
|
|
1479
|
+
discoveryFailedDocuments: state.discoveryFailedDocuments,
|
|
1480
|
+
},
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
// Returns the event rather than yielding it, so the caller keeps its `yield` direct. Delegating
|
|
1484
|
+
// with `yield*` from an async generator to a sync one routes every value through
|
|
1485
|
+
// AsyncFromSyncIterator and inserts extra microtask ticks between producing this event and the
|
|
1486
|
+
// cancellation re-check that follows it — a timing change this instrumentation must not make.
|
|
1487
|
+
function scopeErrorEvent(state, source, error) {
|
|
1488
|
+
state.failedDocuments += 1;
|
|
1489
|
+
state.discoveryFailedDocuments += 1;
|
|
1490
|
+
logDiscoveryScopeError(state, error);
|
|
1491
|
+
if (error.code === "LIMIT_REACHED") {
|
|
1492
|
+
persistDiscoveryLimitWarning(state);
|
|
1493
|
+
}
|
|
1494
|
+
const err = {
|
|
1495
|
+
code: `DISCOVERY_FAILED:${error.code}`,
|
|
1496
|
+
message: error.message,
|
|
1497
|
+
};
|
|
1498
|
+
state.lastError = err;
|
|
1499
|
+
return {
|
|
1500
|
+
kind: "document-failed",
|
|
1501
|
+
jobId: state.jobId,
|
|
1502
|
+
capsuleId: state.capsule.id,
|
|
1503
|
+
sourceId: source.id,
|
|
1504
|
+
...(error.relativePath !== undefined ? { relativePath: error.relativePath } : {}),
|
|
1505
|
+
error: err,
|
|
1506
|
+
};
|
|
1507
|
+
}
|
|
1252
1508
|
function shouldStopAfterEvent(event) {
|
|
1253
1509
|
return event.kind === "document-failed" && event.error.code === "INCOMPATIBLE_EMBEDDING_IDENTITY";
|
|
1254
1510
|
}
|
|
@@ -1263,8 +1519,8 @@ async function* streamDiscoveryEvent(state, source, evt) {
|
|
|
1263
1519
|
return false;
|
|
1264
1520
|
}
|
|
1265
1521
|
// ─── Per-source pipeline ──────────────────────────────────────────────────────
|
|
1266
|
-
|
|
1267
|
-
|
|
1522
|
+
function discoveryStreamFor(state, source) {
|
|
1523
|
+
return discoverAndExtract({
|
|
1268
1524
|
fs: state.options.workspaceFs,
|
|
1269
1525
|
store: state.options.store,
|
|
1270
1526
|
parserRegistry: state.options.parserRegistry,
|
|
@@ -1280,12 +1536,46 @@ async function* runOneSource(state, source) {
|
|
|
1280
1536
|
largeDocumentJobId: state.jobId,
|
|
1281
1537
|
chunkingStrategyVersion: chunkingStrategyKey(chunkingOptionsForState(state)),
|
|
1282
1538
|
}, sourceDiscoveryParams(state, source));
|
|
1539
|
+
}
|
|
1540
|
+
// Paired with `indexing.source.completed`. A walk that never returns — an unreachable network
|
|
1541
|
+
// mount, a directory tree that does not terminate — leaves this line with no partner, which is
|
|
1542
|
+
// the ONLY evidence that a run stalled in discovery rather than in embedding. The source id is
|
|
1543
|
+
// digested for the same reason the capsule id is: it is caller-supplied.
|
|
1544
|
+
function logSourceStarted(state, source, sourceDigest) {
|
|
1545
|
+
logIndexing(state, {
|
|
1546
|
+
level: "info",
|
|
1547
|
+
op: "indexing.source.started",
|
|
1548
|
+
extra: { sourceIdDigest: sourceDigest, scopeKind: source.scope.kind },
|
|
1549
|
+
});
|
|
1550
|
+
}
|
|
1551
|
+
// The discovered count is the number the field incident's operator was staring at ("0 of 1
|
|
1552
|
+
// documents"): it is what the walk actually found, as opposed to what got indexed.
|
|
1553
|
+
function logSourceCompleted(state, progress, counts) {
|
|
1554
|
+
logIndexing(state, {
|
|
1555
|
+
level: "info",
|
|
1556
|
+
op: "indexing.source.completed",
|
|
1557
|
+
durationMs: counts.durationMs,
|
|
1558
|
+
extra: {
|
|
1559
|
+
sourceIdDigest: counts.sourceDigest,
|
|
1560
|
+
discoveredCount: progress.discoveredPaths.size,
|
|
1561
|
+
failedCount: counts.failedCount,
|
|
1562
|
+
walkCompleted: progress.completed,
|
|
1563
|
+
cancelled: progress.cancelled,
|
|
1564
|
+
sawScopeError: progress.sawScopeError,
|
|
1565
|
+
},
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
async function* runOneSource(state, source) {
|
|
1569
|
+
const stream = discoveryStreamFor(state, source);
|
|
1283
1570
|
const progress = {
|
|
1284
1571
|
cancelled: false,
|
|
1285
1572
|
sawScopeError: false,
|
|
1286
1573
|
completed: false,
|
|
1287
1574
|
discoveredPaths: new Set(),
|
|
1288
1575
|
};
|
|
1576
|
+
const sourceDigest = logDigest(String(source.id));
|
|
1577
|
+
const sourceElapsed = startKnowledgeLogTimer();
|
|
1578
|
+
logSourceStarted(state, source, sourceDigest);
|
|
1289
1579
|
// Snapshot the job-wide failure counter before this source's documents are processed so
|
|
1290
1580
|
// finalizeSourceRun can tell whether ANY document belonging to THIS source failed during this
|
|
1291
1581
|
// run, without conflating it with failures from other sources in the same multi-source job.
|
|
@@ -1307,7 +1597,13 @@ async function* runOneSource(state, source) {
|
|
|
1307
1597
|
break;
|
|
1308
1598
|
}
|
|
1309
1599
|
}
|
|
1310
|
-
|
|
1600
|
+
const failedCount = state.failedDocuments - failedDocumentsBefore;
|
|
1601
|
+
logSourceCompleted(state, progress, {
|
|
1602
|
+
sourceDigest,
|
|
1603
|
+
failedCount,
|
|
1604
|
+
durationMs: sourceElapsed(),
|
|
1605
|
+
});
|
|
1606
|
+
finalizeSourceRun(state, source, progress, failedCount);
|
|
1311
1607
|
}
|
|
1312
1608
|
function sourceDiscoveryParams(state, source) {
|
|
1313
1609
|
return {
|
|
@@ -1377,6 +1673,8 @@ function buildInitialState(options, capsule, sources, jobId, startedAt, tokenize
|
|
|
1377
1673
|
jobId,
|
|
1378
1674
|
capsule,
|
|
1379
1675
|
options,
|
|
1676
|
+
logContext: { jobId, capsuleIdDigest: logDigest(String(capsule.id)) },
|
|
1677
|
+
elapsed: startKnowledgeLogTimer(),
|
|
1380
1678
|
batchSize: clampBatchSize(options.batchSize),
|
|
1381
1679
|
concurrency: clampConcurrency(options.concurrency),
|
|
1382
1680
|
now: options.now ?? options.store._internal.now,
|
|
@@ -1480,37 +1778,101 @@ function cacheSuccessfulEmbeddingPreflight(cache, options, result, expiresAt) {
|
|
|
1480
1778
|
for (const key of keys)
|
|
1481
1779
|
cache.set(key, { result, expiresAt });
|
|
1482
1780
|
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
const
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1781
|
+
// Provider and model id are gateway configuration, not customer data, and they are the pair that
|
|
1782
|
+
// makes a preflight failure actionable. The endpoint is reduced to `scheme://host`.
|
|
1783
|
+
function preflightProbeExtra(adapter, options) {
|
|
1784
|
+
const host = embeddingEndpointHost(adapter.endpoint);
|
|
1785
|
+
return {
|
|
1786
|
+
provider: options.provider,
|
|
1787
|
+
modelId: options.modelId,
|
|
1788
|
+
...(options.expectedDimensions !== undefined
|
|
1789
|
+
? { expectedDimensions: options.expectedDimensions }
|
|
1790
|
+
: {}),
|
|
1791
|
+
fingerprinted: options.includeSpaceFingerprint === true,
|
|
1792
|
+
...(host === undefined ? {} : { endpointHost: host }),
|
|
1793
|
+
};
|
|
1794
|
+
}
|
|
1795
|
+
async function probeEmbeddingCapability(adapter, options, log) {
|
|
1796
|
+
const probe = preflightProbeExtra(adapter, options);
|
|
1797
|
+
log({ level: "info", op: "embedding.preflight.started", extra: { ...probe, cached: false } });
|
|
1798
|
+
const elapsed = startKnowledgeLogTimer();
|
|
1491
1799
|
const result = await verifyEmbeddingCapability(adapter, options);
|
|
1492
|
-
|
|
1800
|
+
const durationMs = elapsed();
|
|
1801
|
+
if (!result.ok) {
|
|
1802
|
+
log({
|
|
1803
|
+
level: "error",
|
|
1804
|
+
op: "embedding.preflight.failed",
|
|
1805
|
+
errorKind: result.reason,
|
|
1806
|
+
durationMs,
|
|
1807
|
+
extra: probe,
|
|
1808
|
+
});
|
|
1809
|
+
return result;
|
|
1810
|
+
}
|
|
1811
|
+
log({
|
|
1812
|
+
level: "info",
|
|
1813
|
+
op: "embedding.preflight.completed",
|
|
1814
|
+
durationMs,
|
|
1815
|
+
extra: { ...probe, observedDimensions: result.identity.vectorDimensions },
|
|
1816
|
+
});
|
|
1817
|
+
return result;
|
|
1818
|
+
}
|
|
1819
|
+
async function verifyEmbeddingPreflightCapability(adapter, options, cacheScope, now, log) {
|
|
1820
|
+
const cache = cacheScope === undefined ? undefined : embeddingPreflightCacheFor(cacheScope);
|
|
1821
|
+
const cached = cache?.get(embeddingPreflightCacheKey(options));
|
|
1822
|
+
if (cached !== undefined && cached.expiresAt > now()) {
|
|
1823
|
+
log({
|
|
1824
|
+
level: "info",
|
|
1825
|
+
op: "embedding.preflight.cache-hit",
|
|
1826
|
+
extra: { ...preflightProbeExtra(adapter, options), cached: true },
|
|
1827
|
+
});
|
|
1828
|
+
return cached.result;
|
|
1829
|
+
}
|
|
1830
|
+
const result = await probeEmbeddingCapability(adapter, options, log);
|
|
1831
|
+
if (cache === undefined || !result.ok)
|
|
1493
1832
|
return result;
|
|
1494
1833
|
cacheSuccessfulEmbeddingPreflight(cache, options, result, now() + EMBEDDING_PREFLIGHT_TTL_MS);
|
|
1495
1834
|
return result;
|
|
1496
1835
|
}
|
|
1836
|
+
// The preflight ANSWERED and the gateway's identity was still refused. This is the one outcome
|
|
1837
|
+
// an operator most often mistakes for an outage, so it gets its own line carrying both
|
|
1838
|
+
// dimensions — the whole diagnosis, and none of the safe message's prose.
|
|
1839
|
+
function logPreflightIdentityRejected(state, observed) {
|
|
1840
|
+
logEmbeddingRun(state, {
|
|
1841
|
+
level: "error",
|
|
1842
|
+
op: "embedding.preflight.identity-rejected",
|
|
1843
|
+
errorKind: "INCOMPATIBLE_EMBEDDING_IDENTITY",
|
|
1844
|
+
extra: {
|
|
1845
|
+
pinnedDimensions: state.capsule.embeddingModelIdentity.vectorDimensions,
|
|
1846
|
+
observedDimensions: observed.vectorDimensions,
|
|
1847
|
+
},
|
|
1848
|
+
});
|
|
1849
|
+
}
|
|
1850
|
+
function adoptPreflightIdentity(state, identity, op) {
|
|
1851
|
+
state.capsule = updateCapsuleEmbeddingModelIdentity(state.options.store, state.capsule.id, identity);
|
|
1852
|
+
logEmbeddingRun(state, {
|
|
1853
|
+
level: "info",
|
|
1854
|
+
op,
|
|
1855
|
+
extra: { observedDimensions: identity.vectorDimensions, provider: identity.provider },
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
function embeddingPreflightSuccess(state, result) {
|
|
1859
|
+
if (hasProvisionalIdentity(state)) {
|
|
1860
|
+
adoptPreflightIdentity(state, result.identity, "embedding.preflight.identity-adopted");
|
|
1861
|
+
return undefined;
|
|
1862
|
+
}
|
|
1863
|
+
const compatibility = assertCompatibleEmbeddingIdentity(state.capsule.embeddingModelIdentity, result.identity);
|
|
1864
|
+
if (!compatibility.ok) {
|
|
1865
|
+
logPreflightIdentityRejected(state, result.identity);
|
|
1866
|
+
return { code: "INCOMPATIBLE_EMBEDDING_IDENTITY", message: compatibility.safeMessage };
|
|
1867
|
+
}
|
|
1868
|
+
if (embeddingIdentityChanged(state.capsule.embeddingModelIdentity, compatibility.identity)) {
|
|
1869
|
+
adoptPreflightIdentity(state, compatibility.identity, "embedding.preflight.identity-refreshed");
|
|
1870
|
+
}
|
|
1871
|
+
return undefined;
|
|
1872
|
+
}
|
|
1497
1873
|
function embeddingPreflightFailure(state, result) {
|
|
1498
1874
|
if (result.ok) {
|
|
1499
|
-
|
|
1500
|
-
state.capsule = updateCapsuleEmbeddingModelIdentity(state.options.store, state.capsule.id, result.identity);
|
|
1501
|
-
return undefined;
|
|
1502
|
-
}
|
|
1503
|
-
const compatibility = assertCompatibleEmbeddingIdentity(state.capsule.embeddingModelIdentity, result.identity);
|
|
1504
|
-
if (!compatibility.ok) {
|
|
1505
|
-
return {
|
|
1506
|
-
code: "INCOMPATIBLE_EMBEDDING_IDENTITY",
|
|
1507
|
-
message: compatibility.safeMessage,
|
|
1508
|
-
};
|
|
1509
|
-
}
|
|
1510
|
-
if (embeddingIdentityChanged(state.capsule.embeddingModelIdentity, compatibility.identity)) {
|
|
1511
|
-
state.capsule = updateCapsuleEmbeddingModelIdentity(state.options.store, state.capsule.id, compatibility.identity);
|
|
1512
|
-
}
|
|
1513
|
-
return undefined;
|
|
1875
|
+
return embeddingPreflightSuccess(state, result);
|
|
1514
1876
|
}
|
|
1515
1877
|
return {
|
|
1516
1878
|
code: result.reason === "dimension-mismatch"
|
|
@@ -1530,20 +1892,36 @@ function embeddingIdentityChanged(stored, current) {
|
|
|
1530
1892
|
stored.embeddingSpaceFingerprint !== current.embeddingSpaceFingerprint ||
|
|
1531
1893
|
stored.dimensionsParam !== current.dimensionsParam);
|
|
1532
1894
|
}
|
|
1895
|
+
// A THROWN preflight is the worst case for an operator: the adapter did not answer with a
|
|
1896
|
+
// classified failure, it blew up, and the run ends with a generic EMBEDDING_ADAPTER_FAILED whose
|
|
1897
|
+
// message says nothing about the cause. The kind — never the message, which carries the endpoint
|
|
1898
|
+
// and often the response body — is the whole difference between a DNS failure and a TLS refusal.
|
|
1899
|
+
function preflightThrowFailure(state, log, cause) {
|
|
1900
|
+
const cancelled = cancellationRequested(state) || (cause instanceof DOMException && cause.name === "AbortError");
|
|
1901
|
+
log({
|
|
1902
|
+
level: cancelled ? "warn" : "error",
|
|
1903
|
+
op: "embedding.preflight.failed",
|
|
1904
|
+
errorKind: cancelled ? "CANCELLED" : knowledgeErrorKind(cause),
|
|
1905
|
+
extra: { threw: true, ...endpointHostExtra(state) },
|
|
1906
|
+
});
|
|
1907
|
+
if (cancelled) {
|
|
1908
|
+
return { code: "CANCELLED", message: "indexing aborted via AbortSignal" };
|
|
1909
|
+
}
|
|
1910
|
+
return {
|
|
1911
|
+
code: "EMBEDDING_ADAPTER_FAILED",
|
|
1912
|
+
message: "embedding capability preflight failed before indexing started",
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1533
1915
|
async function verifyEmbeddingPreflight(state) {
|
|
1916
|
+
const log = (event) => {
|
|
1917
|
+
logEmbeddingRun(state, event);
|
|
1918
|
+
};
|
|
1534
1919
|
try {
|
|
1535
|
-
const result = await verifyEmbeddingPreflightCapability(state.options.embeddingAdapter, embeddingPreflightOptions(state), state.options.embeddingPreflightCacheScope, state.now);
|
|
1920
|
+
const result = await verifyEmbeddingPreflightCapability(state.options.embeddingAdapter, embeddingPreflightOptions(state), state.options.embeddingPreflightCacheScope, state.now, log);
|
|
1536
1921
|
return embeddingPreflightFailure(state, result);
|
|
1537
1922
|
}
|
|
1538
1923
|
catch (cause) {
|
|
1539
|
-
|
|
1540
|
-
(cause instanceof DOMException && cause.name === "AbortError")) {
|
|
1541
|
-
return { code: "CANCELLED", message: "indexing aborted via AbortSignal" };
|
|
1542
|
-
}
|
|
1543
|
-
return {
|
|
1544
|
-
code: "EMBEDDING_ADAPTER_FAILED",
|
|
1545
|
-
message: "embedding capability preflight failed before indexing started",
|
|
1546
|
-
};
|
|
1924
|
+
return preflightThrowFailure(state, log, cause);
|
|
1547
1925
|
}
|
|
1548
1926
|
}
|
|
1549
1927
|
function modelUsePolicyPreflightFailure(capsule, options) {
|
|
@@ -1583,6 +1961,22 @@ function persistDiscoveryLimitWarning(state) {
|
|
|
1583
1961
|
if (state.discoveryLimitWarningPersisted)
|
|
1584
1962
|
return;
|
|
1585
1963
|
state.discoveryLimitWarningPersisted = true;
|
|
1964
|
+
// Truncation is the one discovery outcome where the run SUCCEEDS and the corpus is still
|
|
1965
|
+
// incomplete, so the operator has no failing signal to chase — they only notice later, when a
|
|
1966
|
+
// grounded answer is missing a document nobody knows was never indexed. The capsule diagnostic
|
|
1967
|
+
// below reaches the health surface; this line puts the same fact, plus the two caps that
|
|
1968
|
+
// produced it, in the file. Written once per run behind the guard above, because LIMIT_REACHED
|
|
1969
|
+
// surfaces once per ancestor frame.
|
|
1970
|
+
const discovery = resolvedDiscoveryOptions(state);
|
|
1971
|
+
logIndexing(state, {
|
|
1972
|
+
level: "warn",
|
|
1973
|
+
op: "indexing.discovery.limit-reached",
|
|
1974
|
+
extra: {
|
|
1975
|
+
discoveredCount: state.totalDocuments,
|
|
1976
|
+
maxFiles: discovery.maxFiles,
|
|
1977
|
+
maxDepth: discovery.maxDepth,
|
|
1978
|
+
},
|
|
1979
|
+
});
|
|
1586
1980
|
try {
|
|
1587
1981
|
insertDiagnosticRow(state.options.store._internal.db, {
|
|
1588
1982
|
id: state.idSource(),
|
|
@@ -1644,6 +2038,23 @@ function emitJobStarted(state, sources) {
|
|
|
1644
2038
|
jobId: state.jobId,
|
|
1645
2039
|
occurredAt: state.startedAt,
|
|
1646
2040
|
});
|
|
2041
|
+
// The first line of the run's spine, and the only place the run's shape is stated: how many
|
|
2042
|
+
// sources it will walk, and the two caps that decide the whole request profile. Everything
|
|
2043
|
+
// downstream is read against these numbers.
|
|
2044
|
+
logIndexing(state, {
|
|
2045
|
+
level: "info",
|
|
2046
|
+
op: "indexing.job.started",
|
|
2047
|
+
extra: {
|
|
2048
|
+
sourceCount: sources.length,
|
|
2049
|
+
batchSize: state.batchSize,
|
|
2050
|
+
concurrency: state.concurrency,
|
|
2051
|
+
force: state.options.force === true,
|
|
2052
|
+
resume: state.options.resume === true,
|
|
2053
|
+
contextualRetrieval: state.options.contextualRetrieval?.enabled === true,
|
|
2054
|
+
...chunkerConfigExtra(state),
|
|
2055
|
+
...endpointHostExtra(state),
|
|
2056
|
+
},
|
|
2057
|
+
});
|
|
1647
2058
|
return emit(state, event);
|
|
1648
2059
|
}
|
|
1649
2060
|
async function resolveIndexingTokenizer(options) {
|
|
@@ -1668,13 +2079,40 @@ async function* runSourcesWithProgress(state, sources) {
|
|
|
1668
2079
|
}
|
|
1669
2080
|
return identityFailure;
|
|
1670
2081
|
}
|
|
2082
|
+
// The run's prologue — capsule resolution, source resolution, the tokenizer load and the
|
|
2083
|
+
// started-job write — all happens BEFORE `indexing.job.started` can be emitted, and every one of
|
|
2084
|
+
// those steps can throw or hang: a missing capsule, a source filter matching nothing, a
|
|
2085
|
+
// tokenizer read off disk, a locked database. Until this line existed, a job that died or wedged
|
|
2086
|
+
// in its prologue produced exactly what a job that was never launched produces — nothing — and
|
|
2087
|
+
// no operator could tell the two apart. It is written before the first of those steps runs, and
|
|
2088
|
+
// it is the only line that cannot use `RunState`, because no state exists yet.
|
|
2089
|
+
//
|
|
2090
|
+
// The capsule id is caller-supplied, so it is digested here by the same function the rest of the
|
|
2091
|
+
// run uses: the prologue line and every later line share one correlation key.
|
|
2092
|
+
function logJobReceived(options, jobId) {
|
|
2093
|
+
emitKnowledgeLogEvent(options.logSink, {
|
|
2094
|
+
level: "info",
|
|
2095
|
+
category: "indexing",
|
|
2096
|
+
op: "indexing.job.received",
|
|
2097
|
+
correlationId: jobId,
|
|
2098
|
+
extra: {
|
|
2099
|
+
capsuleIdDigest: logDigest(String(options.capsuleId)),
|
|
2100
|
+
sourceIdFilterCount: options.sourceIds?.length ?? 0,
|
|
2101
|
+
force: options.force === true,
|
|
2102
|
+
resume: options.resume === true,
|
|
2103
|
+
},
|
|
2104
|
+
});
|
|
2105
|
+
}
|
|
1671
2106
|
// ─── Public entrypoint ────────────────────────────────────────────────────────
|
|
1672
2107
|
export async function* runIndexingJob(options) {
|
|
2108
|
+
// The job id is minted first so the prologue line can carry the correlation key every later
|
|
2109
|
+
// line uses. `idSource` is called exactly once here, as before.
|
|
2110
|
+
const idSource = options.idSource ?? (() => randomUUID());
|
|
2111
|
+
const jobId = idSource();
|
|
2112
|
+
logJobReceived(options, jobId);
|
|
1673
2113
|
const capsule = resolveCapsule(options);
|
|
1674
2114
|
const sources = resolveSources(options, capsule);
|
|
1675
2115
|
const startedAt = (options.now ?? options.store._internal.now)();
|
|
1676
|
-
const idSource = options.idSource ?? (() => randomUUID());
|
|
1677
|
-
const jobId = idSource();
|
|
1678
2116
|
const policyFailure = modelUsePolicyPreflightFailure(capsule, options);
|
|
1679
2117
|
const tokenizer = policyFailure === undefined
|
|
1680
2118
|
? await resolveIndexingTokenizer(options)
|
|
@@ -1806,6 +2244,36 @@ function resolveJobStatus(state, fatalFailure) {
|
|
|
1806
2244
|
}
|
|
1807
2245
|
return "succeeded";
|
|
1808
2246
|
}
|
|
2247
|
+
// The closing line of the run's spine, and the one an operator reads first. It restates every
|
|
2248
|
+
// counter the UI shows next to the terminal status and the total wall time, so "cancelled after
|
|
2249
|
+
// six minutes with zero vectors" is a single greppable line rather than an inference across the
|
|
2250
|
+
// whole file. `warn` for a cancellation and `error` for a failure: a run that did not succeed
|
|
2251
|
+
// must be visible at a level an operator filters TO, not one they filter out.
|
|
2252
|
+
const JOB_FINISH_LEVELS = {
|
|
2253
|
+
succeeded: "info",
|
|
2254
|
+
cancelled: "warn",
|
|
2255
|
+
failed: "error",
|
|
2256
|
+
};
|
|
2257
|
+
function logJobFinished(state, result) {
|
|
2258
|
+
logIndexing(state, {
|
|
2259
|
+
level: JOB_FINISH_LEVELS[result.status],
|
|
2260
|
+
op: "indexing.job.finished",
|
|
2261
|
+
durationMs: state.elapsed(),
|
|
2262
|
+
...(state.lastError !== undefined ? { errorKind: state.lastError.code } : {}),
|
|
2263
|
+
extra: {
|
|
2264
|
+
// NOT `status`. The sink flattens `extra` onto the same record as the envelope, whose
|
|
2265
|
+
// `status` field is the numeric HTTP status every operator query and dashboard filter
|
|
2266
|
+
// reads. A run's terminal state written under that name puts the string "succeeded" where
|
|
2267
|
+
// a number belongs and silently poisons those queries for every other line's `status`.
|
|
2268
|
+
jobStatus: result.status,
|
|
2269
|
+
totalDocuments: result.totalDocuments,
|
|
2270
|
+
processedDocuments: result.processedDocuments,
|
|
2271
|
+
failedDocuments: result.failedDocuments,
|
|
2272
|
+
skippedDocuments: result.skippedDocuments,
|
|
2273
|
+
vectorsPersisted: result.vectorsPersisted,
|
|
2274
|
+
},
|
|
2275
|
+
});
|
|
2276
|
+
}
|
|
1809
2277
|
function* finalize(state, fatalFailure) {
|
|
1810
2278
|
const finishedAt = state.now();
|
|
1811
2279
|
const status = resolveJobStatus(state, fatalFailure);
|
|
@@ -1823,6 +2291,7 @@ function* finalize(state, fatalFailure) {
|
|
|
1823
2291
|
// informational only — see the started block for the rationale
|
|
1824
2292
|
}
|
|
1825
2293
|
const result = buildResult(state, status, finishedAt);
|
|
2294
|
+
logJobFinished(state, result);
|
|
1826
2295
|
if (status === "cancelled") {
|
|
1827
2296
|
yield emit(state, { kind: "job-cancelled", jobId: state.jobId, result });
|
|
1828
2297
|
return;
|