@oscharko-dev/keiko 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -7
- package/dist/cli/index.js +10 -4
- package/dist/ui/csp-hashes.json +30 -29
- package/dist/ui/static/404.html +1 -1
- package/dist/ui/static/__next.__PAGE__.txt +4 -4
- package/dist/ui/static/__next._full.txt +19 -19
- package/dist/ui/static/__next._head.txt +4 -4
- package/dist/ui/static/__next._index.txt +3 -3
- package/dist/ui/static/__next._tree.txt +1 -1
- package/dist/ui/static/_next/static/chunks/001y_5k3kms8o.js +1 -0
- package/dist/ui/static/_next/static/chunks/{4317umws__hmj.js → 00zm-r2g0_b9j.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{09pgtzr4yizla.js → 029ag5kk3qzqz.js} +1 -1
- package/dist/ui/static/_next/static/chunks/03la2o0tcodk_.js +1 -0
- package/dist/ui/static/_next/static/chunks/061l2tjhvak63.js +1 -0
- package/dist/ui/static/_next/static/chunks/{449ci1ueqdahs.js → 06zsbt3vzj_fx.js} +1 -1
- package/dist/ui/static/_next/static/chunks/08ix9sw49a3s7.js +1 -0
- package/dist/ui/static/_next/static/chunks/0_5ojk3x0nmvf.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bkqjvlqfy-i-.js +1 -0
- package/dist/ui/static/_next/static/chunks/0bl1mme-qzrda.js +31 -0
- package/dist/ui/static/_next/static/chunks/{0pyk8uw68u1db.js → 0d5rtaf3-jc-x.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0fpr2r2_nczyy.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2zj720348l34o.js → 0h_tff7u-hdy5.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2ie-82h35jico.js → 0iwjev0wot4b0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0jkjwkp7yyerd.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0lcapyuu22ziq.js → 0kefabslo9zpa.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0lorosh9iyl5i.js +7 -0
- package/dist/ui/static/_next/static/chunks/{2jzef8u5q9r0m.css → 0lq5h3hs45ybr.css} +1 -1
- package/dist/ui/static/_next/static/chunks/0mbdm3_1syk7-.js +671 -0
- package/dist/ui/static/_next/static/chunks/0ncsz59mr16k6.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3m0leeddxg_ou.js → 0npbfd_er47xu.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0ovebg0sbcqct.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0595k6itt07st.js → 0p-l881rgdntp.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0pokgm9i-0aci.js +5 -0
- package/dist/ui/static/_next/static/chunks/0q76qswp80ci1.js +1 -0
- package/dist/ui/static/_next/static/chunks/{19y5gbz8g8-od.js → 0qr6p-voaulgg.js} +1 -1
- package/dist/ui/static/_next/static/chunks/0qt-dbb3fu7d6.js +1 -0
- package/dist/ui/static/_next/static/chunks/0rvhrleg8f98b.js +1 -0
- package/dist/ui/static/_next/static/chunks/0sk5tc44kursq.js +1 -0
- package/dist/ui/static/_next/static/chunks/0t9_8sma6j36t.js +1 -0
- package/dist/ui/static/_next/static/chunks/0umcj95dn7ptb.js +1 -0
- package/dist/ui/static/_next/static/chunks/0w6kppo4hx2wx.js +1 -0
- package/dist/ui/static/_next/static/chunks/0wm2mowlft-21.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2s9o-6elv8cqm.js → 0x8zukfn36b67.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1_w-vzdkz71mg.js → 0xforn75_caf8.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1ks3vs573f08y.js → 0y2vxtg9s2ms7.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{3xh59hes8mxaq.js → 1-_ws-k6ii-u7.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1ugrbpx-8i8_-.js → 10fnijtc2ve7n.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1rl096xiys626.js → 130bqt0eb54h4.js} +1 -1
- package/dist/ui/static/_next/static/chunks/167niw9we0b7n.js +3 -0
- package/dist/ui/static/_next/static/chunks/185eyrqw4q4-b.js +1 -0
- package/dist/ui/static/_next/static/chunks/18nld0020_k_2.css +26 -0
- package/dist/ui/static/_next/static/chunks/{31-c9i6rok5ce.js → 19-144qxnc3dt.js} +1 -1
- package/dist/ui/static/_next/static/chunks/19mkgmeonvdwl.css +1 -0
- package/dist/ui/static/_next/static/chunks/{2m8gr4lszkhce.js → 1_5p_b24x82ue.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1_m1z_f54hkji.js +1 -0
- package/dist/ui/static/_next/static/chunks/1_x579f2fgjyr.js +36 -0
- package/dist/ui/static/_next/static/chunks/{06hz_2ymx-v7x.js → 1e9go819dwl2g.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1f1-u5hkc6llj.js +3 -0
- package/dist/ui/static/_next/static/chunks/{3c85inofrb99h.js → 1gsdksaj9tpxw.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1ryxoi_5b87ss.js → 1k514j5xqr4a5.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1kfsvai94yvr2.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3ikgvfgh2w2mv.js → 1lbyv-xdlpc1s.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1pcygmx7pvpwp.js +4 -0
- package/dist/ui/static/_next/static/chunks/1q2fca11xb2x0.js +1 -0
- package/dist/ui/static/_next/static/chunks/1q2pujkdoaygu.js +1 -0
- package/dist/ui/static/_next/static/chunks/{365mfitd6-tsy.js → 1qio8iqevt0mg.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1jzsog_s8q5--.js → 1qq0-jz7okiak.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1s-tre_k9nvh3.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2ysww-2-ly2hz.js → 1tboih_yy-gam.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1g9ftam8b7m8q.js → 1trm69m9zxly_.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{23r846kjk_g27.js → 1ujr-gcsprdi6.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1vw7oo5hltkzg.js +36 -0
- package/dist/ui/static/_next/static/chunks/1wbjjizxxtm91.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1-mujq7w0i23-.js → 1we__nb0syt11.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2jp2t-efv_3jr.js → 1wnmpolx-w3e0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{43a4q4k97-l0b.js → 1xbtkxhlm_87c.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1xd9hnodm91uz.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3zzs5c1i3iw5a.js → 1z-ibg411d9td.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{18mnhuqcsx67k.js → 1z4z5mknakdfz.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0i37w6dtch5bm.js → 1zak9rzannwqm.js} +1 -1
- package/dist/ui/static/_next/static/chunks/1ziptu5xlzq_p.js +1 -0
- package/dist/ui/static/_next/static/chunks/2-r8sb_gq-pjv.css +56 -0
- package/dist/ui/static/_next/static/chunks/22y_u0gxf9d5n.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2mj_k6lo48e_4.js → 23jcx3s74h89k.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2b7g5wrm7slyv.js +1 -0
- package/dist/ui/static/_next/static/chunks/2bpupnd-k7bgu.js +1 -0
- package/dist/ui/static/_next/static/chunks/2bzjr2ai0a8hq.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1b6xzm028-kyj.js → 2fykee5aqor5r.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2heet3koz738i.js +1 -0
- package/dist/ui/static/_next/static/chunks/2jztaj4km0-p1.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2oq63qa63h2vi.js → 2k5ajtzjwtqw4.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2kfijzy7n8vkc.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1oggol0dv60u8.js → 2ksqufkg3ptp1.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2lz9ujlsm75kc.js +3 -0
- package/dist/ui/static/_next/static/chunks/{42pa0jsejdzvj.js → 2m6mk3n8m89m1.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2og8tovhr_ul2.js +1 -0
- package/dist/ui/static/_next/static/chunks/{17xrkyvb15oqg.js → 2ohow-fui5d_w.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{0a-k0zahq5e-b.js → 2pdaxsbcizhb2.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2qhtb4qq3arii.js +1 -0
- package/dist/ui/static/_next/static/chunks/2r_lex4m5unw5.js +3 -0
- package/dist/ui/static/_next/static/chunks/2rcawuh-77fnp.js +1 -0
- package/dist/ui/static/_next/static/chunks/2sji-23jqwpol.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1-bj30_vct6t6.js → 2skeghhuyv_c4.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2skldj66o6hgd.js +1 -0
- package/dist/ui/static/_next/static/chunks/2sok5p1s-oeoh.js +1 -0
- package/dist/ui/static/_next/static/chunks/{3l_1uvcq2uu44.js → 2tic-7414nl3n.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{1ygw6j3-uqyll.js → 2uj0n49ihyt_7.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2v57ez84fyqdr.js +1 -0
- package/dist/ui/static/_next/static/chunks/{042uqofn51-mo.js → 2wbqxdm82mc6g.js} +1 -1
- package/dist/ui/static/_next/static/chunks/2wvo7q19g065e.js +1 -0
- package/dist/ui/static/_next/static/chunks/{1joh44ap0ix0z.js → 2xw26ge230zsn.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3-4iik5ytvbed.js +1 -0
- package/dist/ui/static/_next/static/chunks/{20wltp0vh9qwq.js → 31k_k1uyhhyih.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{01aqisryb3c4m.js → 32h72gk6uqdr0.js} +1 -1
- package/dist/ui/static/_next/static/chunks/339a2jjs3kjwj.js +1 -0
- package/dist/ui/static/_next/static/chunks/{33bdm8rgis2ox.js → 33_a8ewd8j8xb.js} +1 -1
- package/dist/ui/static/_next/static/chunks/345a6tv8_0k1u.js +1 -0
- package/dist/ui/static/_next/static/chunks/345p2uyqgwab5.js +1 -0
- package/dist/ui/static/_next/static/chunks/34crxlu0mduz2.js +1 -0
- package/dist/ui/static/_next/static/chunks/{403o25d1h_c-n.js → 34pkz__etpyvn.js} +1 -1
- package/dist/ui/static/_next/static/chunks/36z66lssar4oh.js +1 -0
- package/dist/ui/static/_next/static/chunks/37o_qtojqw2tk.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2znlk2xegoo_p.js → 37uao88rpil-c.js} +1 -1
- package/dist/ui/static/_next/static/chunks/38sqgc2x6sy79.js +1 -0
- package/dist/ui/static/_next/static/chunks/{30mi1hu89vr4g.js → 39_d659jzpyac.js} +2 -2
- package/dist/ui/static/_next/static/chunks/{3lyr2438wknjt.js → 3b8aa258v8vuj.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3crihqn12pq8i.js +1 -0
- package/dist/ui/static/_next/static/chunks/{27z2c_nzw587_.js → 3dswsbkpqx__o.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3ebeyvnqq2bdi.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2ogcpvvi1awe5.js → 3eh49k6u0wd-3.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3iknk12w5bn7i.js +1 -0
- package/dist/ui/static/_next/static/chunks/3k1qups9-2-7-.js +1 -0
- package/dist/ui/static/_next/static/chunks/3ljwwkelljh81.js +1 -0
- package/dist/ui/static/_next/static/chunks/3mmcvq93ws1o_.js +1 -0
- package/dist/ui/static/_next/static/chunks/3mw_ni1a9rykb.js +1 -0
- package/dist/ui/static/_next/static/chunks/3nzj1g_suy_cs.js +2 -0
- package/dist/ui/static/_next/static/chunks/3oa2i9lthuh-5.js +1 -0
- package/dist/ui/static/_next/static/chunks/3oqygeiv31fa7.js +1 -0
- package/dist/ui/static/_next/static/chunks/3p83_dt4-z7q2.js +1 -0
- package/dist/ui/static/_next/static/chunks/3r74c2jeognx2.js +1 -0
- package/dist/ui/static/_next/static/chunks/{0x2gf21uv1pj1.js → 3rqmix6jm42pr.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3sqcpw2s98u9p.js +1 -0
- package/dist/ui/static/_next/static/chunks/3tftoas-byv_b.js +2 -0
- package/dist/ui/static/_next/static/chunks/3vggbbz9o3q7f.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2eq68l6cyekre.js → 3vi-he34fb-7y.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{08vwq6vznx42b.js → 3x3b-gvp9xf_6.js} +1 -1
- package/dist/ui/static/_next/static/chunks/3yr-z6gpzz6nk.js +1 -0
- package/dist/ui/static/_next/static/chunks/3yu-e53axqbxi.js +1 -0
- package/dist/ui/static/_next/static/chunks/3zn27dbqgst19.js +1 -0
- package/dist/ui/static/_next/static/chunks/400spz4roxxtb.js +1 -0
- package/dist/ui/static/_next/static/chunks/{2b4syz43o07f9.js → 40pywkvvth6qk.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{29d1969dncoef.js → 41wdo-5wjtn9-.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{2byizfjlm6rnl.js → 43fq84z1snp1a.js} +1 -1
- package/dist/ui/static/_next/static/chunks/{turbopack-2qt5y6q3hlqi4.js → turbopack-03e4qy-mxrrts.js} +1 -1
- package/dist/ui/static/_next/static/chunks/turbopack-0ew-e2vnq_phu.js +1 -0
- package/dist/ui/static/_next/static/media/codicon.2b_iqd4rvjgu4.ttf +0 -0
- package/dist/ui/static/_next/static/media/editor.worker.1duyl2hr9iop5.js +1 -0
- package/dist/ui/static/_next/static/media/editorWebWorkerMain.15kgt-h8_tuhi.js +1 -0
- package/dist/ui/static/_not-found/__next._full.txt +19 -14
- package/dist/ui/static/_not-found/__next._head.txt +4 -4
- package/dist/ui/static/_not-found/__next._index.txt +3 -3
- package/dist/ui/static/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/ui/static/_not-found/__next._not-found.txt +3 -3
- 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 +19 -14
- package/dist/ui/static/atlassian-connectors/__next._full.txt +22 -18
- package/dist/ui/static/atlassian-connectors/__next._head.txt +4 -4
- package/dist/ui/static/atlassian-connectors/__next._index.txt +3 -3
- package/dist/ui/static/atlassian-connectors/__next._tree.txt +2 -2
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.__PAGE__.txt +4 -4
- package/dist/ui/static/atlassian-connectors/__next.atlassian-connectors.txt +4 -4
- package/dist/ui/static/atlassian-connectors.html +1 -1
- package/dist/ui/static/atlassian-connectors.txt +22 -18
- package/dist/ui/static/index.html +1 -1
- package/dist/ui/static/index.txt +19 -19
- package/dist/ui/static/launch/__next._full.txt +23 -23
- package/dist/ui/static/launch/__next._head.txt +4 -4
- package/dist/ui/static/launch/__next._index.txt +3 -3
- package/dist/ui/static/launch/__next._tree.txt +1 -1
- package/dist/ui/static/launch/__next.launch.__PAGE__.txt +4 -4
- package/dist/ui/static/launch/__next.launch.txt +3 -3
- package/dist/ui/static/launch.html +1 -1
- package/dist/ui/static/launch.txt +23 -23
- package/dist/ui/static/local-knowledge/__next._full.txt +18 -19
- package/dist/ui/static/local-knowledge/__next._head.txt +4 -4
- package/dist/ui/static/local-knowledge/__next._index.txt +3 -3
- package/dist/ui/static/local-knowledge/__next._tree.txt +1 -1
- package/dist/ui/static/local-knowledge/__next.local-knowledge.__PAGE__.txt +4 -4
- package/dist/ui/static/local-knowledge/__next.local-knowledge.txt +3 -3
- package/dist/ui/static/local-knowledge/capsule/__next._full.txt +21 -20
- package/dist/ui/static/local-knowledge/capsule/__next._head.txt +4 -4
- package/dist/ui/static/local-knowledge/capsule/__next._index.txt +3 -3
- 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 +3 -3
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.capsule.txt +4 -4
- package/dist/ui/static/local-knowledge/capsule/__next.local-knowledge.txt +3 -3
- package/dist/ui/static/local-knowledge/capsule.html +1 -1
- package/dist/ui/static/local-knowledge/capsule.txt +21 -20
- package/dist/ui/static/local-knowledge.html +1 -1
- package/dist/ui/static/local-knowledge.txt +18 -19
- package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts +32 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/audit.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/audit.js +193 -0
- package/node_modules/@oscharko-dev/keiko-cli/dist/repair.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-cli/dist/repair.js +26 -15
- 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/package.json +13 -13
- package/node_modules/@oscharko-dev/keiko-connectors/package.json +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/atlassian-connectors-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/atlassian-connectors-validation.js +26 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/atlassian-connectors.d.ts +5 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/atlassian-connectors.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/atlassian-connectors.js +115 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bff-wire.js +6 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bug-investigation-events.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/bug-investigation-events.js +5 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-acceptance.js +207 -44
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-auxiliary.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-auxiliary.js +92 -44
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-governance.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-governance.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-governance.js +205 -63
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-pollution-test-support.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-pollution-test-support.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-pollution-test-support.js +39 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-run-control.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/code-task-run-control.js +117 -54
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-context.d.ts +28 -8
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-context.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-context.js +134 -18
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-codex-auth.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-codex-auth.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-codex-auth.js +42 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-evidence.js +88 -12
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-questions.d.ts +9 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-questions.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime-questions.js +16 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-runtime.js +13 -14
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench-validation.js +6 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/coding-workbench.js +5 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/command-runner.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/command-runner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/command-runner.js +67 -7
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/connected-context.js +22 -40
- package/node_modules/@oscharko-dev/keiko-contracts/dist/container-runtime.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/container-runtime.js +15 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering-compaction-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering-compaction-validation.js +34 -11
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-engineering.js +14 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-observations-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/context-observations-validation.js +13 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/debug/debug-lifecycle.d.ts +22 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/debug/debug-lifecycle.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/debug/debug-lifecycle.js +123 -61
- package/node_modules/@oscharko-dev/keiko-contracts/dist/deep-freeze.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/deep-freeze.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/deep-freeze.js +40 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/discussion-intelligence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/discussion-intelligence.js +54 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent-governance.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent-governance.js +36 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent-verification.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent-verification.js +55 -20
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-agent.js +47 -14
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-completion.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-completion.js +5 -54
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-hot-exit.d.ts +13 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-hot-exit.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-hot-exit.js +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-inline-completion.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-inline-completion.js +6 -54
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-language-mode-map.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-language-mode-map.js +10 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-layout.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-layout.js +57 -16
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-m7.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-m7.js +11 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-test-generation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/editor-test-generation.js +7 -49
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway-setup-audit.d.ts +35 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway-setup-audit.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway-setup-audit.js +98 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/gateway.js +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-history.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-history.js +105 -14
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-merge.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-merge.js +40 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-pull-request.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-pull-request.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-pull-request.js +60 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository-agent.d.ts +13 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository-agent.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository-agent.js +64 -19
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository-summary.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository-summary.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository-summary.js +65 -14
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-repository.js +157 -26
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-sync.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/git-sync.js +40 -8
- package/node_modules/@oscharko-dev/keiko-contracts/dist/html-manual-job.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/html-manual-job.js +4 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/html-manual-source.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/html-manual-source.js +10 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts +16 -13
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/index.js +17 -10
- package/node_modules/@oscharko-dev/keiko-contracts/dist/language-service.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/language-service.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/language-service.js +44 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-embedding-profiles.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-embedding-profiles.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-embedding-profiles.js +48 -11
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-schema-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-schema-validation.js +33 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-schema.d.ts +2 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-schema.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/local-knowledge-schema.js +61 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/memory-internal.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/memory-internal.js +34 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-analyzer.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-analyzer.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-analyzer.js +9 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-grounding.d.ts +7 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-grounding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-grounding.js +13 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-ranking-fixture.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-ranking-fixture.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-ranking-fixture.js +114 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-validation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/prompt-enhancer-validation.js +7 -39
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.d.ts +46 -12
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/bffWire.js +34 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/coverageMap.d.ts +12 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/coverageMap.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/coverageMap.js +3 -2
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/exportBundle.d.ts +8 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/exportBundle.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/exportBundle.js +23 -8
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/ids.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/ids.js +10 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.d.ts +6 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/index.js +3 -3
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/runPlanAndEvents.d.ts +25 -5
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/runPlanAndEvents.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/runPlanAndEvents.js +21 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/sourceEnvelope.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/sourceEnvelope.js +6 -18
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/testQualityRubric.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/testQualityRubric.js +17 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/validationFinding.d.ts +3 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/qualityIntelligence/validationFinding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/retrieval-context.d.ts +26 -11
- package/node_modules/@oscharko-dev/keiko-contracts/dist/retrieval-context.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/retrieval-context.js +61 -17
- package/node_modules/@oscharko-dev/keiko-contracts/dist/runtime-capabilities.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/runtime-capabilities.js +12 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/text-safety.d.ts +10 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/text-safety.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/text-safety.js +30 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/tools.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/tools.js +8 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/update-remediation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/update-remediation.js +3 -6
- package/node_modules/@oscharko-dev/keiko-contracts/dist/update-session.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/update-session.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/update-session.js +5 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts +6 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/verification.js +19 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/voice-protocol.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/voice-protocol.js +339 -10
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-contract-primitives.d.ts +3 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-contract-primitives.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-contract-primitives.js +26 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-descriptors.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-descriptors.js +20 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-manifest.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-manifest.js +4 -15
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-profile.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-profile.js +3 -14
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-search.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-search.js +21 -4
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-trust.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-trust.js +6 -9
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-ui.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-ui.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace-ui.js +7 -0
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-contracts/dist/workspace.js +6 -6
- 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/dist/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/index.js +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/resolve.d.ts +11 -0
- package/node_modules/@oscharko-dev/keiko-git/dist/resolve.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-git/dist/resolve.js +11 -1
- package/node_modules/@oscharko-dev/keiko-git/package.json +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/indexing/embedding-batcher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/indexing/embedding-batcher.js +22 -9
- 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 +15 -6
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/index.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/index.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-local-knowledge/dist/retrieval/index.js +3 -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 +6 -2
- 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 +94 -8
- 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/salience.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/salience.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-memory-capture/dist/salience.js +32 -8
- 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/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/embedding.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/embedding.js +24 -7
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/http.d.ts +3 -3
- 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 +192 -48
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/openai-embedding-adapter.d.ts +3 -1
- 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 +3 -3
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/promptEnhancer/generator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/promptEnhancer/generator.js +45 -4
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-model-gateway/dist/types.d.ts.map +1 -1
- 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/dist/generation/prompt.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-quality-intelligence/dist/generation/prompt.js +10 -1
- 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/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/actionActivity.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/actionActivity.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/actionActivity.js +13 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/actionApprovals.d.ts +10 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/actionApprovals.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/actionApprovals.js +55 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/httpPort.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/atlassian/httpPort.js +85 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/browser.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/browser.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/browser.js +33 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/chat-handlers.d.ts +11 -0
- 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 +150 -53
- 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 +70 -15
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-codex-subscription.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-codex-subscription.js +12 -12
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOperationCoordinator.js +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/codingRuntimeOrchestrator.js +11 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/launchFailure.js +40 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/productionOpenCodeBackend.js +5 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/researchEgressPort.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/coding-runtime/researchEgressPort.js +21 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.d.ts +17 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/conversation-readiness-admission.js +62 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/deps.js +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts +2 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/diagnostics-log.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/codingContextEvidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/codingContextEvidence.js +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/contextRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/contextRoutes.js +1 -14
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/breakpointStore.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/breakpointStore.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/breakpointStore.js +157 -20
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapDebugRoutes.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapDebugRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapDebugRoutes.js +218 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapEventBridge.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapEventBridge.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapEventBridge.js +9 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapEvidenceProjector.js +4 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapNodeCapsuleLauncher.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapNodeCapsuleLauncher.js +3 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapRestartThrottle.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/dapRestartThrottle.js +10 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugIdentityDigest.d.ts +46 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugIdentityDigest.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugIdentityDigest.js +46 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchCatalog.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchCatalog.js +3 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchContext.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchContext.js +2 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchPlan.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/dap/debugLaunchPlan.js +5 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitRoutes.d.ts +12 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitRoutes.js +25 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/hotExitStore.d.ts +5 -6
- 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 +62 -14
- 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 +11 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/localHistory/localHistoryStore.d.ts +1 -1
- 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 +9 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/hostLanguageOperation.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/hostLanguageOperation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/hostLanguageOperation.js +42 -6
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/lspRestartThrottle.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/lsp/lspRestartThrottle.js +14 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/rollingWindowThrottle.d.ts +14 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/rollingWindowThrottle.d.ts.map +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/rollingWindowThrottle.js +52 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/snippets/workspaceSnippetsRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/snippets/workspaceSnippetsRoutes.js +23 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/snippets/workspaceSnippetsService.d.ts +8 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/snippets/workspaceSnippetsService.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/editor/snippets/workspaceSnippetsService.js +9 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts +15 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/files.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/files.js +150 -19
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-readiness.d.ts +3 -1
- 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 +46 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/gateway-setup.d.ts +2 -0
- 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 +151 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/agentOperationsRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/agentOperationsRoutes.js +7 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncExecution.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitDelivery/syncExecution.js +2 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryReads.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryReads.js +14 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRepositoryRoutes.js +70 -18
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/gitRoutes.js +7 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-judge.d.ts +2 -0
- 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 +21 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-entailment-stage.js +29 -13
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-faithfulness.js +8 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-git-history-evidence.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-git-history-evidence.js +30 -15
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-orchestrator.js +5 -7
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-hybrid.d.ts +10 -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 +44 -18
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa-multi-source.d.ts +3 -0
- 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 +3 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/grounded-qa.d.ts +5 -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 +78 -34
- package/node_modules/@oscharko-dev/keiko-server/dist/local-knowledge-grounded-qa.d.ts +2 -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 +24 -11
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-audit-event-builders.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/memory-audit-event-builders.js +14 -0
- 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 +30 -8
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/figmaSnapshotAdapter.d.ts +1 -0
- 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 +23 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/runRoutes.js +15 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/uiRoutes.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/qualityIntelligence/uiRoutes.js +8 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/read-handlers.js +7 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/retrieval/contextAssembly.d.ts +3 -3
- package/node_modules/@oscharko-dev/keiko-server/dist/retrieval/contextAssembly.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/retrieval/contextAssembly.js +26 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/runtime/containerEngineDetector.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/runtime/containerEngineDetector.js +13 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/runtime/containerRunner.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/runtime/containerRunner.js +2 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/sink.d.ts +4 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/sink.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/sink.js +33 -5
- package/node_modules/@oscharko-dev/keiko-server/dist/sse-write.d.ts +12 -0
- 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 +23 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/sse.d.ts +12 -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 +17 -5
- 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 +4 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/store/messages.js +27 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/store/types.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/mutex.d.ts +1 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/mutex.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/task-workspace/mutex.js +52 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/terminal-routes.d.ts +4 -0
- 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 +32 -10
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-activation.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/update-portable-activation.js +19 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-live-dictation.d.ts +2 -0
- 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 +41 -0
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-recap.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-recap.js +10 -2
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-speech-text.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-server/dist/voice-speech-text.js +6 -4
- 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/dist/qualityIntelligence/descriptors.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/descriptors.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/descriptors.js +2 -0
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/modelRoutedTestDesign.d.ts.map +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/modelRoutedTestDesign.js +25 -4
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/runtimeCommon.d.ts +1 -1
- package/node_modules/@oscharko-dev/keiko-workflows/dist/qualityIntelligence/runtimeCommon.d.ts.map +1 -1
- 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 +50 -34
- package/release-impact.catalog.json +109 -2
- package/scripts/lib/local-state-audit.mjs +1567 -0
- package/vendor/oscharko-dev-keiko-cli-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-connectors-0.3.7.tgz → oscharko-dev-keiko-connectors-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-contracts-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-evaluations-0.3.7.tgz → oscharko-dev-keiko-evaluations-0.3.9.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-evidence-0.3.7.tgz → oscharko-dev-keiko-evidence-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-git-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-harness-0.3.7.tgz → oscharko-dev-keiko-harness-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-0.3.9.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-capture-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-consolidation-0.3.7.tgz → oscharko-dev-keiko-memory-consolidation-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-memory-governance-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-memory-retrieval-0.3.7.tgz → oscharko-dev-keiko-memory-retrieval-0.3.9.tgz} +0 -0
- package/vendor/{oscharko-dev-keiko-memory-vault-0.3.7.tgz → oscharko-dev-keiko-memory-vault-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-0.3.9.tgz +0 -0
- package/vendor/oscharko-dev-keiko-quality-intelligence-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-sandbox-0.3.7.tgz → oscharko-dev-keiko-sandbox-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-sdk-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-security-0.3.7.tgz → oscharko-dev-keiko-security-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-server-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-tools-0.3.7.tgz → oscharko-dev-keiko-tools-0.3.9.tgz} +0 -0
- package/vendor/oscharko-dev-keiko-verification-0.3.9.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workflows-0.3.9.tgz +0 -0
- package/vendor/{oscharko-dev-keiko-workspace-0.3.7.tgz → oscharko-dev-keiko-workspace-0.3.9.tgz} +0 -0
- package/dist/ui/static/_next/static/chunks/0-05n62h_e100.js +0 -1
- package/dist/ui/static/_next/static/chunks/072-2579z6esy.js +0 -1
- package/dist/ui/static/_next/static/chunks/0_ygj8uudbj2y.js +0 -1
- package/dist/ui/static/_next/static/chunks/0a_8zl9hunczd.js +0 -1
- package/dist/ui/static/_next/static/chunks/0f4_esobq66cq.js +0 -1
- package/dist/ui/static/_next/static/chunks/0g98pmhu4bu6s.js +0 -1
- package/dist/ui/static/_next/static/chunks/0gt4pijn-qh_q.js +0 -1
- package/dist/ui/static/_next/static/chunks/0jst54ax08p94.js +0 -1
- package/dist/ui/static/_next/static/chunks/0m2g5mxpxz5bf.css +0 -1
- package/dist/ui/static/_next/static/chunks/0mbyfrqejx152.js +0 -1
- package/dist/ui/static/_next/static/chunks/0n73dz2_v1il1.js +0 -2
- package/dist/ui/static/_next/static/chunks/0olk34_52eimu.js +0 -4
- package/dist/ui/static/_next/static/chunks/0om3sddwv4d30.js +0 -1
- package/dist/ui/static/_next/static/chunks/0q9yi-06adiez.js +0 -1
- package/dist/ui/static/_next/static/chunks/0qw-nt797ee-z.js +0 -3
- package/dist/ui/static/_next/static/chunks/0r1eh0425nsf8.js +0 -1
- package/dist/ui/static/_next/static/chunks/0sau-kpqcr6ls.js +0 -3
- package/dist/ui/static/_next/static/chunks/0t4-g19c1a3h8.js +0 -1
- package/dist/ui/static/_next/static/chunks/0uama4u8z0bu5.js +0 -1
- package/dist/ui/static/_next/static/chunks/0v0vrvwtrfjy7.js +0 -10
- package/dist/ui/static/_next/static/chunks/0wtozr0ryr9pn.js +0 -1
- package/dist/ui/static/_next/static/chunks/0yh2vbki0atqg.js +0 -5
- package/dist/ui/static/_next/static/chunks/0zmkduzodjk36.js +0 -1
- package/dist/ui/static/_next/static/chunks/10a-n00q4-18u.js +0 -1
- package/dist/ui/static/_next/static/chunks/10oufba3tpp4h.js +0 -2
- package/dist/ui/static/_next/static/chunks/12_3sgxxezr-u.js +0 -1
- package/dist/ui/static/_next/static/chunks/1486bw4298izr.js +0 -1
- package/dist/ui/static/_next/static/chunks/161oih6575vax.js +0 -1
- package/dist/ui/static/_next/static/chunks/16oae0jpzu876.js +0 -1
- package/dist/ui/static/_next/static/chunks/19i0ueyur1qep.css +0 -1
- package/dist/ui/static/_next/static/chunks/1_aiwavt3hd8k.js +0 -1
- package/dist/ui/static/_next/static/chunks/1bs77sia5w7qk.js +0 -1
- package/dist/ui/static/_next/static/chunks/1e8-9frgtsqo3.js +0 -1
- package/dist/ui/static/_next/static/chunks/1ebbhglm8u6wa.js +0 -1
- package/dist/ui/static/_next/static/chunks/1jijz05px7-lz.js +0 -1
- package/dist/ui/static/_next/static/chunks/1kc3h08l8ua8m.js +0 -1
- package/dist/ui/static/_next/static/chunks/1oi1p51juc9xn.js +0 -3
- package/dist/ui/static/_next/static/chunks/1oxrzt1mb-1zv.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pbb-w6yzsqia.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pgi8ycef_dxe.js +0 -1
- package/dist/ui/static/_next/static/chunks/1pxydolx3s42k.js +0 -1
- package/dist/ui/static/_next/static/chunks/1qlzx0yicfamw.js +0 -1
- package/dist/ui/static/_next/static/chunks/1wpnow7q49ktz.js +0 -1
- package/dist/ui/static/_next/static/chunks/1x1yfevmu5rb2.js +0 -1
- package/dist/ui/static/_next/static/chunks/2-b6jdgodq1kh.js +0 -1
- package/dist/ui/static/_next/static/chunks/2-qg17hb7df4k.js +0 -1
- package/dist/ui/static/_next/static/chunks/23ut_7ax3uii7.js +0 -1
- package/dist/ui/static/_next/static/chunks/2aj0m0lp3zaso.js +0 -1
- package/dist/ui/static/_next/static/chunks/2avqijhiozxde.js +0 -1
- package/dist/ui/static/_next/static/chunks/2ggu9ejltk_wv.js +0 -1
- package/dist/ui/static/_next/static/chunks/2itpaofmx-5qd.js +0 -1
- package/dist/ui/static/_next/static/chunks/2tklwylfuzj8q.js +0 -678
- package/dist/ui/static/_next/static/chunks/2txt__ug8dhbb.js +0 -1
- package/dist/ui/static/_next/static/chunks/2w-cgivetskox.js +0 -1
- package/dist/ui/static/_next/static/chunks/2ylv-ouugih4q.js +0 -1
- package/dist/ui/static/_next/static/chunks/2yzdky0_krng3.js +0 -1
- package/dist/ui/static/_next/static/chunks/2z-1kr3t7oz_j.js +0 -1
- package/dist/ui/static/_next/static/chunks/300o3l_x8h84o.css +0 -82
- package/dist/ui/static/_next/static/chunks/322u3mphznh3f.js +0 -7
- package/dist/ui/static/_next/static/chunks/32xxcc0-dxg__.js +0 -1
- package/dist/ui/static/_next/static/chunks/363s4z-3xnrc_.js +0 -1
- package/dist/ui/static/_next/static/chunks/3dm6ckxkcp5ad.js +0 -1
- package/dist/ui/static/_next/static/chunks/3i3abbgb7r5-a.js +0 -1
- package/dist/ui/static/_next/static/chunks/3iqdtn774dkb0.js +0 -1
- package/dist/ui/static/_next/static/chunks/3j8hjhng8phct.js +0 -1
- package/dist/ui/static/_next/static/chunks/3jgj4pzeph44x.js +0 -1
- package/dist/ui/static/_next/static/chunks/3nof1kn5xoy5o.js +0 -31
- package/dist/ui/static/_next/static/chunks/3oxzdyihs15qu.js +0 -1
- package/dist/ui/static/_next/static/chunks/3q4fif5454qnc.js +0 -1
- package/dist/ui/static/_next/static/chunks/3re_vio6foa5t.js +0 -1
- package/dist/ui/static/_next/static/chunks/3s4w0yl_p2lcg.css +0 -11
- package/dist/ui/static/_next/static/chunks/40zvqgo8jkl9z.css +0 -7
- package/dist/ui/static/_next/static/chunks/41w7e2gcotf3t.js +0 -1
- package/dist/ui/static/_next/static/chunks/42-o6_5plhavh.js +0 -1
- package/dist/ui/static/_next/static/chunks/42oe013n65ybj.js +0 -1
- package/dist/ui/static/_next/static/chunks/433avjncznzz7.js +0 -1
- package/dist/ui/static/_next/static/chunks/4362k2xz2_u1p.js +0 -3
- package/dist/ui/static/_next/static/chunks/439h-eq49jhtm.js +0 -1
- package/dist/ui/static/_next/static/chunks/turbopack-0t75c6mqgusos.js +0 -1
- package/dist/ui/static/_next/static/media/codicon.3bppog5b8ye-1.ttf +0 -0
- package/dist/ui/static/_next/static/media/editor.worker.2da6bfstu5_et.js +0 -1
- package/vendor/oscharko-dev-keiko-cli-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-contracts-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-git-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-local-knowledge-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-capture-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-memory-governance-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-model-gateway-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-quality-intelligence-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-sdk-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-server-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-verification-0.3.7.tgz +0 -0
- package/vendor/oscharko-dev-keiko-workflows-0.3.7.tgz +0 -0
- /package/dist/ui/static/_next/static/{z0448V-Ggq1QWtly0uA5r → OQjH4YxsBFEgdy9rVbrsH}/_buildManifest.js +0 -0
- /package/dist/ui/static/_next/static/{z0448V-Ggq1QWtly0uA5r → OQjH4YxsBFEgdy9rVbrsH}/_clientMiddlewareManifest.js +0 -0
- /package/dist/ui/static/_next/static/{z0448V-Ggq1QWtly0uA5r → OQjH4YxsBFEgdy9rVbrsH}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,1567 @@
|
|
|
1
|
+
// Deterministic, read-only auditor for a local Keiko `.keiko` runtime-state tree (Issue #1325,
|
|
2
|
+
// Epic #1319). It proves, against the implemented local-at-rest contract
|
|
3
|
+
// (docs/local-runtime-state-contract.md), that:
|
|
4
|
+
// - the gateway config holds secret REFERENCES, not secret values (no plaintext credentials);
|
|
5
|
+
// - Keiko-owned files and directories carry owner-only POSIX modes (0o600 / 0o700);
|
|
6
|
+
// - the Memory Vault and Local Knowledge stores seal reconstructive content at rest;
|
|
7
|
+
// - Evidence / Quality-Intelligence artifacts are owner-only, redacted, and integrity-checked
|
|
8
|
+
// where this dependency-light auditor can recompute the product hash.
|
|
9
|
+
//
|
|
10
|
+
// The auditor is intentionally DEPENDENCY-LIGHT: it imports only Node built-ins, so a maintainer can
|
|
11
|
+
// run it against a real `.keiko` directory WITHOUT building the workspace. It NEVER mutates the tree
|
|
12
|
+
// (SQLite stores open read-only) and NEVER decrypts content — every encryption check is satisfied by
|
|
13
|
+
// the on-disk sealed markers the product itself writes, so no vault key is required. The filename
|
|
14
|
+
// constants below are duplicated from
|
|
15
|
+
// `packages/keiko-cli/src/state-paths.ts` ON PURPOSE: a script takes no package-graph edge, and
|
|
16
|
+
// each constant cites its source of truth so drift stays auditable.
|
|
17
|
+
|
|
18
|
+
import { Buffer } from "node:buffer";
|
|
19
|
+
import { createHash } from "node:crypto";
|
|
20
|
+
import { existsSync, lstatSync, readFileSync, readdirSync, statSync } from "node:fs";
|
|
21
|
+
import { join, relative } from "node:path";
|
|
22
|
+
import { DatabaseSync } from "node:sqlite";
|
|
23
|
+
import { URL } from "node:url";
|
|
24
|
+
|
|
25
|
+
// ── On-disk layout (source of truth: packages/keiko-cli/src/state-paths.ts) ────────────────
|
|
26
|
+
const GATEWAY_CONFIG = "keiko.config.json";
|
|
27
|
+
const UI_SUBDIR = "ui";
|
|
28
|
+
const CREDENTIALS_SUBDIR = "credentials";
|
|
29
|
+
const PROVIDER_VAULT = "provider-credentials.vault";
|
|
30
|
+
const ATLASSIAN_VAULT = "atlassian-connector-credentials.vault";
|
|
31
|
+
const ATLASSIAN_KEYFILE = "atlassian-connector-credentials-vault.key";
|
|
32
|
+
const ATLASSIAN_METADATA = "atlassian-connector-credentials.metadata.json";
|
|
33
|
+
const PROVIDER_SECRET_REF_PREFIX = "cred:";
|
|
34
|
+
const RERANKER_SECRET_REF = "model-gateway:reranker";
|
|
35
|
+
const MEMORY_SUBDIR = "memory";
|
|
36
|
+
const MEMORY_DB = "keiko-memory.db";
|
|
37
|
+
const LOCAL_KNOWLEDGE_SUBDIR = "local-knowledge";
|
|
38
|
+
const CAPSULES_DB = "capsules.db";
|
|
39
|
+
const EVIDENCE_SUBDIR = "evidence";
|
|
40
|
+
const TOOL_RESULTS_SUBDIR = "tool-results";
|
|
41
|
+
const TOOL_RESULT_ARTIFACT_SUFFIX = ".tool-result.txt";
|
|
42
|
+
const UPDATE_SUBDIR = "updates";
|
|
43
|
+
const QI_SUBDIR = "qi";
|
|
44
|
+
const QI_RETENTION_AUDIT_FILE = "retention-deletion-audit.jsonl";
|
|
45
|
+
const QI_QUARANTINED_MANIFEST_MARKER = ".qi.json.corrupt.";
|
|
46
|
+
const FIGMA_SUBDIR = "figma";
|
|
47
|
+
const FIGMA_VAULT = "figma-token.vault";
|
|
48
|
+
const PE_SUBDIR = "pe";
|
|
49
|
+
const FIGMA_SNAPSHOT_SUBDIR = "figma-snapshots";
|
|
50
|
+
// Retired surface: releases before issue #2670 persisted the structural code-intelligence index as
|
|
51
|
+
// plaintext JSON under this subdirectory. The index is in-process only now, so anything found here
|
|
52
|
+
// is a leftover cleartext projection of the workspace (paths, symbol and DTO field names, endpoint
|
|
53
|
+
// routes) and is reported as residue to be deleted. The auditor never deletes it itself.
|
|
54
|
+
const RETIRED_CODE_INTELLIGENCE_SUBDIR = "code-intelligence";
|
|
55
|
+
const EDITOR_HOT_EXIT_SUBDIR = "editor-hot-exit";
|
|
56
|
+
const EDITOR_HOT_EXIT_VAULT = "snapshots.vault";
|
|
57
|
+
const EDITOR_HOT_EXIT_KEYFILE = "editor-hot-exit-vault.key";
|
|
58
|
+
const LOCAL_SECRET_VAULT_VERSION = 1;
|
|
59
|
+
const HOT_EXIT_REF_PATTERN = /^hot-exit:[a-f0-9]{64}$/u;
|
|
60
|
+
const ATLASSIAN_SCHEMA_VERSION = "1";
|
|
61
|
+
const ATLASSIAN_AUTH_REF_PATTERN = /^atlassian-cred:[A-Za-z0-9_-]{22}$/u;
|
|
62
|
+
// Dependency-light mirrors of the leaf contract in
|
|
63
|
+
// packages/keiko-contracts/src/atlassian-connectors.ts. The audit intentionally runs without a
|
|
64
|
+
// workspace build; parity tests bind these values and validators back to the canonical exports.
|
|
65
|
+
const ATLASSIAN_CONNECTOR_PROVIDERS = Object.freeze(["confluence", "jira"]);
|
|
66
|
+
const ATLASSIAN_CONNECTOR_PROVIDER_SET = new Set(ATLASSIAN_CONNECTOR_PROVIDERS);
|
|
67
|
+
const ATLASSIAN_METADATA_KEYS = new Set([
|
|
68
|
+
"schemaVersion",
|
|
69
|
+
"authRef",
|
|
70
|
+
"provider",
|
|
71
|
+
"displayName",
|
|
72
|
+
"baseUrl",
|
|
73
|
+
"authScheme",
|
|
74
|
+
"createdAt",
|
|
75
|
+
]);
|
|
76
|
+
const ATLASSIAN_POSIX_ABSOLUTE_PATH_PATTERN =
|
|
77
|
+
/(^|[^A-Za-z0-9._~:/-])\/(?!\/)(?=[^\n\r"'\x60<>]*\/)[^\n\r"'\x60<>]+/u;
|
|
78
|
+
const ATLASSIAN_WINDOWS_DRIVE_ABSOLUTE_PATH_PATTERN =
|
|
79
|
+
/(^|[^A-Za-z0-9._~:/-])[A-Za-z]:[\\/](?=[^\n\r"'\x60<>]*[\\/])[^\n\r"'\x60<>]+/u;
|
|
80
|
+
const ATLASSIAN_WINDOWS_UNC_ABSOLUTE_PATH_PATTERN =
|
|
81
|
+
/(^|[^A-Za-z0-9._~:/-])(?:\\\\|\/\/)(?=[^\n\r"'\x60<>]*[\\/])[^\n\r"'\x60<>]+/u;
|
|
82
|
+
const ATLASSIAN_DIRECT_ROLE_MARKER_PATTERN = /^[ \t\f\v]*(?:user|assistant|system)[ \t\f\v]*:/iu;
|
|
83
|
+
const ATLASSIAN_NAMED_ROLE_MARKER_PATTERN =
|
|
84
|
+
/^[ \t\f\v]*role[ \t\f\v]*:[ \t\f\v]*(?:user|assistant|system)(?:\W|$)/iu;
|
|
85
|
+
|
|
86
|
+
// ── Sealed-envelope markers (source of truth: packages/keiko-security/src/secretbox.ts) ─────
|
|
87
|
+
const SEALED_STRING_PREFIX = "kv1."; // AES-256-GCM string envelope
|
|
88
|
+
const SEALED_BINARY_VERSION = 0x01; // AES-256-GCM binary (BLOB) envelope first byte
|
|
89
|
+
|
|
90
|
+
// Local Knowledge content-encryption markers (source of truth:
|
|
91
|
+
// packages/keiko-local-knowledge/src/store-content-encryption.ts).
|
|
92
|
+
const LK_ENC_MARKER_KEY = "content_encryption";
|
|
93
|
+
const LK_ENC_MARKER_VALUE = "aes-256-gcm/v1";
|
|
94
|
+
const LK_ENC_PROBE_KEY = "content_encryption_probe";
|
|
95
|
+
const LK_ENC_SCOPE_KEY = "content_encryption_scope";
|
|
96
|
+
const LK_ENC_SCOPE_VALUE = "reconstructive-columns/v3";
|
|
97
|
+
|
|
98
|
+
// Secret SHAPES and key/value assignments that must never appear in cleartext in a redacted
|
|
99
|
+
// artifact. These mirror packages/keiko-security/src/redaction.ts. Value-assignment checks explicitly
|
|
100
|
+
// allow the product placeholder so correctly redacted `"token": "[REDACTED]"` artifacts pass.
|
|
101
|
+
const REDACTED_PLACEHOLDER = "[REDACTED]";
|
|
102
|
+
const SECRET_SHAPE_PATTERNS = [
|
|
103
|
+
{ label: "OpenAI-style API key", re: /\bsk-[A-Za-z0-9_-]{16,}/g },
|
|
104
|
+
{ label: "GitHub token", re: /\bgh[pousr]_[A-Za-z0-9]{20,}/g },
|
|
105
|
+
{ label: "GitHub fine-grained token", re: /\bgithub_pat_\w{20,}/g },
|
|
106
|
+
{ label: "AWS access key id", re: /\bAKIA[0-9A-Z]{16}\b/g },
|
|
107
|
+
{ label: "Slack token", re: /\bxox[baprs]-[A-Za-z0-9-]{10,}/g },
|
|
108
|
+
{ label: "Google API key", re: /\bAIza[0-9A-Za-z_-]{20,}/g },
|
|
109
|
+
{ label: "Stripe key", re: /\b[rs]k_(?:live|test)_[A-Za-z0-9]{16,}/g },
|
|
110
|
+
{ label: "Figma token", re: /\bfigd_[A-Za-z0-9_-]{16,}/g },
|
|
111
|
+
{ label: "Bearer token", re: /\bBearer\s+[\w.\-+/=]+/gi },
|
|
112
|
+
{ label: "Basic auth token", re: /\bBasic\s+[\w.\-+/=]+/gi },
|
|
113
|
+
{ label: "PEM private key", re: /-----BEGIN [A-Z ]*PRIVATE KEY-----/g },
|
|
114
|
+
{ label: "URL credentials", re: /\b[a-z][a-z0-9+.-]*:\/\/[^\s:@/]+:[^\s:@/]+@/gi },
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
const SECRET_VALUE_PATTERNS = [
|
|
118
|
+
{ label: "x-api-key header", res: [/\b(x-api-key\s*:\s*)["']?([^\s"'`,;}]+)/gi] },
|
|
119
|
+
{
|
|
120
|
+
label: "api key assignment",
|
|
121
|
+
res: [/\b(api[_-]?key\s*[=:]\s*)["']?([^\s"'`,;&}]+)/gi],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
label: "secret key assignment",
|
|
125
|
+
res: [
|
|
126
|
+
/\b(passwd|password|api_?token|token|secret_key|secret|client_secret)(["']?\s*[:=]\s*["']?)([^\s"'`,;&}]+)/gi,
|
|
127
|
+
/\b(refresh_token|access_token|id_token|private_key|aws_secret_access_key)(["']?\s*[:=]\s*["']?)([^\s"'`,;&}]+)/gi,
|
|
128
|
+
/\b(secret_access_key|sas_token|jwt_secret|db_password|connection_?string|credential)(["']?\s*[:=]\s*["']?)([^\s"'`,;&}]+)/gi,
|
|
129
|
+
],
|
|
130
|
+
valueGroup: 3,
|
|
131
|
+
},
|
|
132
|
+
];
|
|
133
|
+
|
|
134
|
+
// A regular file is "sensitive" (must be owner-only) when it is a Keiko-owned runtime artifact.
|
|
135
|
+
// Anything else under the tree (e.g. an unrelated customer file a maintainer dropped in) is only
|
|
136
|
+
// reported as informational, never a failure — the auditor must not punish files it does not own.
|
|
137
|
+
const SENSITIVE_FILE_NAMES = new Set([GATEWAY_CONFIG, "ui.pid", "ui.log", "launcher-state.json"]);
|
|
138
|
+
const SENSITIVE_TOP_DIRS = new Set([
|
|
139
|
+
CREDENTIALS_SUBDIR,
|
|
140
|
+
MEMORY_SUBDIR,
|
|
141
|
+
LOCAL_KNOWLEDGE_SUBDIR,
|
|
142
|
+
EVIDENCE_SUBDIR,
|
|
143
|
+
UPDATE_SUBDIR,
|
|
144
|
+
EDITOR_HOT_EXIT_SUBDIR,
|
|
145
|
+
]);
|
|
146
|
+
|
|
147
|
+
function isSensitiveFile(relPath, name) {
|
|
148
|
+
if (SENSITIVE_FILE_NAMES.has(name)) return true;
|
|
149
|
+
if (name.endsWith(".vault") || name.endsWith(".key")) return true;
|
|
150
|
+
if (/\.db($|-wal|-shm|\.corrupt\.)/.test(name)) return true;
|
|
151
|
+
return SENSITIVE_TOP_DIRS.has(relPath.split("/")[0]);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function looseMode(absPath) {
|
|
155
|
+
// True when any group/other permission bit is set — i.e. not owner-only.
|
|
156
|
+
return (statSync(absPath).mode & 0o077) !== 0;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function firstSymlinkInPath(stateDir, relPath) {
|
|
160
|
+
let current = stateDir;
|
|
161
|
+
for (const part of relPath.split("/").filter(Boolean)) {
|
|
162
|
+
current = join(current, part);
|
|
163
|
+
const stat = lstatSync(current, { throwIfNoEntry: false });
|
|
164
|
+
if (stat === undefined) return undefined;
|
|
165
|
+
if (stat.isSymbolicLink()) return current;
|
|
166
|
+
}
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function symlinkFinding(stateDir, absPath) {
|
|
171
|
+
return `${relative(stateDir, absPath)} is a symbolic link (refusing to read Keiko-owned artifact)`;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function octal(absPath) {
|
|
175
|
+
return `0o${(statSync(absPath).mode & 0o777).toString(8)}`;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function looseModeFromStat(stat) {
|
|
179
|
+
return (stat.mode & 0o077) !== 0;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function octalFromStat(stat) {
|
|
183
|
+
return `0o${(stat.mode & 0o777).toString(8)}`;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
function pass(id, title, findings = []) {
|
|
187
|
+
return { id, title, status: "pass", findings };
|
|
188
|
+
}
|
|
189
|
+
function fail(id, title, findings) {
|
|
190
|
+
return { id, title, status: "fail", findings };
|
|
191
|
+
}
|
|
192
|
+
function skip(id, title, reason) {
|
|
193
|
+
return { id, title, status: "skip", findings: [reason] };
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// Opens a SQLite database strictly read-only so the audit never mutates a store or creates a WAL
|
|
197
|
+
// sidecar. Returns undefined if the file cannot be opened as a database.
|
|
198
|
+
function openReadOnly(dbPath) {
|
|
199
|
+
try {
|
|
200
|
+
return new DatabaseSync(dbPath, { readOnly: true });
|
|
201
|
+
} catch {
|
|
202
|
+
return undefined;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function tableExists(db, name) {
|
|
207
|
+
const row = db
|
|
208
|
+
.prepare("SELECT name FROM sqlite_master WHERE type = 'table' AND name = ?")
|
|
209
|
+
.get(name);
|
|
210
|
+
return row !== undefined;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function quoteIdent(identifier) {
|
|
214
|
+
if (!/^[A-Za-z_]\w*$/.test(identifier)) {
|
|
215
|
+
throw new Error(`unsupported SQLite identifier: ${identifier}`);
|
|
216
|
+
}
|
|
217
|
+
return `"${identifier}"`;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function columnExists(db, table, column) {
|
|
221
|
+
if (!tableExists(db, table)) return false;
|
|
222
|
+
return db
|
|
223
|
+
.prepare(`PRAGMA table_info(${quoteIdent(table)})`)
|
|
224
|
+
.all()
|
|
225
|
+
.some((row) => row.name === column);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ── Class 1: no plaintext credentials ──────────────────────────────────────────────────────
|
|
229
|
+
function readJsonFile(path) {
|
|
230
|
+
try {
|
|
231
|
+
return JSON.parse(readFileSync(path, "utf8"));
|
|
232
|
+
} catch {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
// Mirrors keiko-server's hasPlaintextGatewayCredentials: any provider/reranker carrying a plaintext
|
|
238
|
+
// apiKey, or a figma block carrying a plaintext accessToken, is an unmigrated/leaked credential.
|
|
239
|
+
// eslint-disable-next-line complexity -- mirrors the product credential leak predicate across provider, figma, and reranker config.
|
|
240
|
+
function hasPlaintextCredentials(config) {
|
|
241
|
+
if (typeof config !== "object" || config === null) return false;
|
|
242
|
+
const providers = Array.isArray(config.providers) ? config.providers : [];
|
|
243
|
+
const providerLeak = providers.some(
|
|
244
|
+
(p) =>
|
|
245
|
+
typeof p === "object" && p !== null && typeof p.apiKey === "string" && p.apiKey.length > 0,
|
|
246
|
+
);
|
|
247
|
+
const figma = config.figma;
|
|
248
|
+
const figmaLeak =
|
|
249
|
+
typeof figma === "object" &&
|
|
250
|
+
figma !== null &&
|
|
251
|
+
typeof figma.accessToken === "string" &&
|
|
252
|
+
figma.accessToken.trim().length > 0;
|
|
253
|
+
const reranker = config.reranker;
|
|
254
|
+
const rerankerLeak =
|
|
255
|
+
typeof reranker === "object" &&
|
|
256
|
+
reranker !== null &&
|
|
257
|
+
typeof reranker.apiKey === "string" &&
|
|
258
|
+
reranker.apiKey.length > 0;
|
|
259
|
+
return providerLeak || figmaLeak || rerankerLeak;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
function credentialLocations(stateDir) {
|
|
263
|
+
return [
|
|
264
|
+
{
|
|
265
|
+
configPath: join(stateDir, GATEWAY_CONFIG),
|
|
266
|
+
configRel: GATEWAY_CONFIG,
|
|
267
|
+
credentialsRel: CREDENTIALS_SUBDIR,
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
configPath: join(stateDir, UI_SUBDIR, GATEWAY_CONFIG),
|
|
271
|
+
configRel: `${UI_SUBDIR}/${GATEWAY_CONFIG}`,
|
|
272
|
+
credentialsRel: `${UI_SUBDIR}/${CREDENTIALS_SUBDIR}`,
|
|
273
|
+
},
|
|
274
|
+
];
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function existsWithoutFollowing(path) {
|
|
278
|
+
return lstatSync(path, { throwIfNoEntry: false }) !== undefined;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
function locationIsPresent(stateDir, location) {
|
|
282
|
+
return (
|
|
283
|
+
existsWithoutFollowing(location.configPath) ||
|
|
284
|
+
existsWithoutFollowing(join(stateDir, location.credentialsRel))
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function auditCredentialConfig(stateDir, location, findings) {
|
|
289
|
+
if (!existsWithoutFollowing(location.configPath)) return [];
|
|
290
|
+
const configSymlink = firstSymlinkInPath(stateDir, location.configRel);
|
|
291
|
+
if (configSymlink !== undefined) {
|
|
292
|
+
findings.push(symlinkFinding(stateDir, configSymlink));
|
|
293
|
+
return [];
|
|
294
|
+
}
|
|
295
|
+
const config = readJsonFile(location.configPath);
|
|
296
|
+
if (config === undefined) {
|
|
297
|
+
findings.push(`${location.configRel} is not valid JSON`);
|
|
298
|
+
return [];
|
|
299
|
+
}
|
|
300
|
+
if (hasPlaintextCredentials(config)) {
|
|
301
|
+
findings.push(
|
|
302
|
+
`${location.configRel} contains a plaintext apiKey/accessToken (must be a secret reference)`,
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
const { refs, findings: refFindings } = collectCredentialRefs(config);
|
|
306
|
+
findings.push(...refFindings);
|
|
307
|
+
return refs;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
function auditCredentialLocation(stateDir, location, findings) {
|
|
311
|
+
const refs = auditCredentialConfig(stateDir, location, findings);
|
|
312
|
+
const credentialsSymlink = firstSymlinkInPath(stateDir, location.credentialsRel);
|
|
313
|
+
if (credentialsSymlink !== undefined) {
|
|
314
|
+
findings.push(symlinkFinding(stateDir, credentialsSymlink));
|
|
315
|
+
return refs.length;
|
|
316
|
+
}
|
|
317
|
+
const vaultRel = `${location.credentialsRel}/${PROVIDER_VAULT}`;
|
|
318
|
+
auditProviderVaultPath(stateDir, join(stateDir, vaultRel), vaultRel, refs, findings);
|
|
319
|
+
auditAtlassianCredentialFiles(stateDir, location.credentialsRel, findings);
|
|
320
|
+
return refs.length;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function auditCredentials(stateDir) {
|
|
324
|
+
const id = "credentials";
|
|
325
|
+
const title = "No plaintext credentials";
|
|
326
|
+
const locations = credentialLocations(stateDir).filter((location) =>
|
|
327
|
+
locationIsPresent(stateDir, location),
|
|
328
|
+
);
|
|
329
|
+
if (locations.length === 0) return skip(id, title, "no credential state present");
|
|
330
|
+
const findings = [];
|
|
331
|
+
const refCount = locations.reduce(
|
|
332
|
+
(count, location) => count + auditCredentialLocation(stateDir, location, findings),
|
|
333
|
+
0,
|
|
334
|
+
);
|
|
335
|
+
if (findings.length > 0) return fail(id, title, findings);
|
|
336
|
+
return pass(id, title, [
|
|
337
|
+
refCount > 0
|
|
338
|
+
? `config exposes ${refCount} secret reference(s); credential vaults are sealed`
|
|
339
|
+
: "config carries no credential material",
|
|
340
|
+
]);
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
function collectCredentialRefs(config) {
|
|
344
|
+
const refs = [];
|
|
345
|
+
const findings = [];
|
|
346
|
+
const providers = Array.isArray(config.providers) ? config.providers : [];
|
|
347
|
+
providers.forEach((provider, index) => {
|
|
348
|
+
if (typeof provider !== "object" || provider === null) return;
|
|
349
|
+
if (!Object.hasOwn(provider, "apiKeySecretRef")) return;
|
|
350
|
+
collectOneProviderCredentialRef(provider, index, refs, findings);
|
|
351
|
+
});
|
|
352
|
+
collectRerankerCredentialRef(config, refs, findings);
|
|
353
|
+
return { refs, findings };
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
function collectOneProviderCredentialRef(provider, index, refs, findings) {
|
|
357
|
+
const label = `credential reference #${index + 1}`;
|
|
358
|
+
const ref = provider.apiKeySecretRef;
|
|
359
|
+
if (typeof ref !== "string" || ref.length === 0) {
|
|
360
|
+
findings.push(`${label} is not a non-empty provider credential reference`);
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
const modelId = provider.modelId;
|
|
364
|
+
if (typeof modelId !== "string" || modelId.length === 0) {
|
|
365
|
+
findings.push(`${label} cannot be validated because provider modelId is missing`);
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
368
|
+
if (ref !== `${PROVIDER_SECRET_REF_PREFIX}${modelId}`) {
|
|
369
|
+
findings.push(`${label} does not match the provider credential reference scheme`);
|
|
370
|
+
return;
|
|
371
|
+
}
|
|
372
|
+
refs.push(ref);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
function collectRerankerCredentialRef(config, refs, findings) {
|
|
376
|
+
const reranker = config.reranker;
|
|
377
|
+
if (typeof reranker !== "object" || reranker === null) return;
|
|
378
|
+
if (!Object.hasOwn(reranker, "apiKeySecretRef")) return;
|
|
379
|
+
const ref = reranker.apiKeySecretRef;
|
|
380
|
+
if (typeof ref !== "string" || ref.length === 0) {
|
|
381
|
+
findings.push("reranker credential reference is not a non-empty string");
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
if (ref !== RERANKER_SECRET_REF) {
|
|
385
|
+
findings.push("reranker credential reference does not match the reranker reference scheme");
|
|
386
|
+
return;
|
|
387
|
+
}
|
|
388
|
+
refs.push(ref);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function auditProviderVaultPath(stateDir, vaultPath, vaultRel, refs, findings) {
|
|
392
|
+
if (!existsSync(vaultPath)) {
|
|
393
|
+
if (refs.length > 0) {
|
|
394
|
+
findings.push(
|
|
395
|
+
`config references ${refs.length} sealed credential(s) but ${vaultRel} is missing`,
|
|
396
|
+
);
|
|
397
|
+
}
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
const vaultSymlink = firstSymlinkInPath(stateDir, vaultRel);
|
|
401
|
+
if (vaultSymlink !== undefined) {
|
|
402
|
+
findings.push(symlinkFinding(stateDir, vaultSymlink));
|
|
403
|
+
return;
|
|
404
|
+
}
|
|
405
|
+
findings.push(...validateProviderVault(vaultPath, vaultRel, refs));
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function validateProviderVault(vaultPath, vaultRel, refs) {
|
|
409
|
+
const vault = readJsonFile(vaultPath);
|
|
410
|
+
if (vault === undefined) {
|
|
411
|
+
return [`${vaultRel} is not valid JSON`];
|
|
412
|
+
}
|
|
413
|
+
if (typeof vault !== "object" || vault === null || Array.isArray(vault)) {
|
|
414
|
+
return [`${vaultRel} is not an object`];
|
|
415
|
+
}
|
|
416
|
+
if (vault.version !== LOCAL_SECRET_VAULT_VERSION) {
|
|
417
|
+
return [`${vaultRel} has an unsupported schema version`];
|
|
418
|
+
}
|
|
419
|
+
const entries = vault.entries;
|
|
420
|
+
if (typeof entries !== "object" || entries === null || Array.isArray(entries)) {
|
|
421
|
+
return [`${vaultRel} is missing an entries object`];
|
|
422
|
+
}
|
|
423
|
+
return validateProviderVaultEntries(entries, refs);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
function checkPrivateCredentialFile(stateDir, rel, findings) {
|
|
427
|
+
const path = join(stateDir, rel);
|
|
428
|
+
if (!existsWithoutFollowing(path)) return false;
|
|
429
|
+
const symlink = firstSymlinkInPath(stateDir, rel);
|
|
430
|
+
if (symlink !== undefined) {
|
|
431
|
+
findings.push(symlinkFinding(stateDir, symlink));
|
|
432
|
+
return false;
|
|
433
|
+
}
|
|
434
|
+
const stat = lstatSync(path);
|
|
435
|
+
if (!stat.isFile()) {
|
|
436
|
+
findings.push(`${rel} is not a regular file`);
|
|
437
|
+
return false;
|
|
438
|
+
}
|
|
439
|
+
if (process.platform !== "win32" && looseModeFromStat(stat)) {
|
|
440
|
+
findings.push(`${rel} is ${octalFromStat(stat)} (expected 0o600)`);
|
|
441
|
+
}
|
|
442
|
+
return true;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
function objectRecord(value) {
|
|
446
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return undefined;
|
|
447
|
+
return value;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
function atlassianMetadataEntries(value) {
|
|
451
|
+
const metadata = objectRecord(value);
|
|
452
|
+
if (metadata?.version !== 1) return undefined;
|
|
453
|
+
return objectRecord(metadata.credentials);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
function isBidiOrZeroWidthCodePoint(codePoint) {
|
|
457
|
+
return (
|
|
458
|
+
codePoint === 0x061c ||
|
|
459
|
+
(codePoint >= 0x200b && codePoint <= 0x200f) ||
|
|
460
|
+
(codePoint >= 0x202a && codePoint <= 0x202e) ||
|
|
461
|
+
(codePoint >= 0x2060 && codePoint <= 0x206f) ||
|
|
462
|
+
codePoint === 0xfeff
|
|
463
|
+
);
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
function isUnsafeControlCodePoint(codePoint) {
|
|
467
|
+
if (codePoint === 0x09 || codePoint === 0x0a || codePoint === 0x0d) return false;
|
|
468
|
+
return codePoint <= 0x1f || (codePoint >= 0x7f && codePoint <= 0x9f);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function hasUnsafeFormatCharacter(value) {
|
|
472
|
+
for (const character of value) {
|
|
473
|
+
const codePoint = character.codePointAt(0) ?? 0;
|
|
474
|
+
if (isBidiOrZeroWidthCodePoint(codePoint) || isUnsafeControlCodePoint(codePoint)) return true;
|
|
475
|
+
}
|
|
476
|
+
return false;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function hasAtlassianDisplayMarker(value) {
|
|
480
|
+
return value.includes("@") || value.includes("?") || value.includes("#") || value.includes("://");
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function containsAtlassianAbsolutePath(value) {
|
|
484
|
+
return (
|
|
485
|
+
ATLASSIAN_POSIX_ABSOLUTE_PATH_PATTERN.test(value) ||
|
|
486
|
+
ATLASSIAN_WINDOWS_DRIVE_ABSOLUTE_PATH_PATTERN.test(value) ||
|
|
487
|
+
ATLASSIAN_WINDOWS_UNC_ABSOLUTE_PATH_PATTERN.test(value)
|
|
488
|
+
);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
function containsAtlassianPseudoRoleMarker(value) {
|
|
492
|
+
return value
|
|
493
|
+
.split(/\r\n?|\n/u)
|
|
494
|
+
.some(
|
|
495
|
+
(line) =>
|
|
496
|
+
ATLASSIAN_DIRECT_ROLE_MARKER_PATTERN.test(line) ||
|
|
497
|
+
ATLASSIAN_NAMED_ROLE_MARKER_PATTERN.test(line),
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
function safeAtlassianDisplayName(value) {
|
|
502
|
+
return (
|
|
503
|
+
typeof value === "string" &&
|
|
504
|
+
value.length > 0 &&
|
|
505
|
+
value.length <= 100 &&
|
|
506
|
+
value.trim() === value &&
|
|
507
|
+
!hasUnsafeFormatCharacter(value) &&
|
|
508
|
+
!containsAtlassianAbsolutePath(value) &&
|
|
509
|
+
!containsAtlassianPseudoRoleMarker(value) &&
|
|
510
|
+
!hasAtlassianDisplayMarker(value)
|
|
511
|
+
);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
function isAtlassianConnectorProvider(value) {
|
|
515
|
+
return ATLASSIAN_CONNECTOR_PROVIDER_SET.has(value);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
function safeParsedAtlassianBaseUrl(url, source) {
|
|
519
|
+
return (
|
|
520
|
+
url.protocol === "https:" &&
|
|
521
|
+
url.username.length === 0 &&
|
|
522
|
+
url.password.length === 0 &&
|
|
523
|
+
url.search.length === 0 &&
|
|
524
|
+
url.hash.length === 0 &&
|
|
525
|
+
!source.includes("@") &&
|
|
526
|
+
!source.includes("?") &&
|
|
527
|
+
!source.includes("#")
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
function safeAtlassianBaseUrl(value) {
|
|
532
|
+
if (typeof value !== "string" || value.length === 0 || value.length > 2048 || /\s/u.test(value)) {
|
|
533
|
+
return false;
|
|
534
|
+
}
|
|
535
|
+
try {
|
|
536
|
+
const url = new URL(value);
|
|
537
|
+
return safeParsedAtlassianBaseUrl(url, value);
|
|
538
|
+
} catch {
|
|
539
|
+
return false;
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
function hasCompleteAtlassianMetadataKeys(record) {
|
|
544
|
+
const keys = Object.keys(record);
|
|
545
|
+
return (
|
|
546
|
+
keys.length === ATLASSIAN_METADATA_KEYS.size &&
|
|
547
|
+
keys.every((key) => ATLASSIAN_METADATA_KEYS.has(key))
|
|
548
|
+
);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
function hasValidAtlassianMetadataIdentity(reference, record) {
|
|
552
|
+
return (
|
|
553
|
+
ATLASSIAN_AUTH_REF_PATTERN.test(reference) &&
|
|
554
|
+
record.schemaVersion === ATLASSIAN_SCHEMA_VERSION &&
|
|
555
|
+
record.authRef === reference &&
|
|
556
|
+
isAtlassianConnectorProvider(record.provider)
|
|
557
|
+
);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
function hasValidAtlassianMetadataDetails(record) {
|
|
561
|
+
return (
|
|
562
|
+
safeAtlassianDisplayName(record.displayName) &&
|
|
563
|
+
safeAtlassianBaseUrl(record.baseUrl) &&
|
|
564
|
+
record.authScheme === "basic-api-token"
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
function validAtlassianCreatedAt(value) {
|
|
569
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
function validAtlassianMetadataEntry(reference, entry) {
|
|
573
|
+
const record = objectRecord(entry);
|
|
574
|
+
return (
|
|
575
|
+
record !== undefined &&
|
|
576
|
+
hasCompleteAtlassianMetadataKeys(record) &&
|
|
577
|
+
hasValidAtlassianMetadataIdentity(reference, record) &&
|
|
578
|
+
hasValidAtlassianMetadataDetails(record) &&
|
|
579
|
+
validAtlassianCreatedAt(record.createdAt)
|
|
580
|
+
);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
function readAtlassianMetadataRefs(stateDir, metadataRel, findings) {
|
|
584
|
+
const metadataPath = join(stateDir, metadataRel);
|
|
585
|
+
if (!checkPrivateCredentialFile(stateDir, metadataRel, findings)) return [];
|
|
586
|
+
const entries = atlassianMetadataEntries(readJsonFile(metadataPath));
|
|
587
|
+
if (entries === undefined) {
|
|
588
|
+
findings.push("Atlassian credential metadata is not a supported JSON envelope");
|
|
589
|
+
return [];
|
|
590
|
+
}
|
|
591
|
+
const refs = [];
|
|
592
|
+
for (const [reference, entry] of Object.entries(entries)) {
|
|
593
|
+
if (!validAtlassianMetadataEntry(reference, entry)) {
|
|
594
|
+
findings.push("Atlassian credential metadata contains a malformed reference");
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
refs.push(reference);
|
|
598
|
+
}
|
|
599
|
+
return refs;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
function atlassianVaultEntries(value) {
|
|
603
|
+
const vault = objectRecord(value);
|
|
604
|
+
if (vault?.version !== LOCAL_SECRET_VAULT_VERSION) return undefined;
|
|
605
|
+
return objectRecord(vault.entries);
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
function readAtlassianVaultRefs(stateDir, vaultRel, findings) {
|
|
609
|
+
const vaultPath = join(stateDir, vaultRel);
|
|
610
|
+
if (!checkPrivateCredentialFile(stateDir, vaultRel, findings)) return [];
|
|
611
|
+
const vault = readJsonFile(vaultPath);
|
|
612
|
+
if (vault === undefined) {
|
|
613
|
+
findings.push("Atlassian credential vault is not valid JSON");
|
|
614
|
+
return [];
|
|
615
|
+
}
|
|
616
|
+
const entries = atlassianVaultEntries(vault);
|
|
617
|
+
if (entries === undefined) {
|
|
618
|
+
findings.push("Atlassian credential vault has an unsupported schema");
|
|
619
|
+
return [];
|
|
620
|
+
}
|
|
621
|
+
const refs = [];
|
|
622
|
+
for (const [index, [reference, value]] of Object.entries(entries).entries()) {
|
|
623
|
+
const finding = sealedEntryFinding(`Atlassian vault entry #${index + 1}`, value);
|
|
624
|
+
if (finding !== undefined) findings.push(finding);
|
|
625
|
+
refs.push(reference);
|
|
626
|
+
}
|
|
627
|
+
return refs;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
function checkAtlassianKeyfile(stateDir, keyfileRel, findings) {
|
|
631
|
+
const keyfilePath = join(stateDir, keyfileRel);
|
|
632
|
+
if (!checkPrivateCredentialFile(stateDir, keyfileRel, findings)) return;
|
|
633
|
+
if (!isBase64Key(readFileSync(keyfilePath, "utf8"))) {
|
|
634
|
+
findings.push("Atlassian credential keyfile is not a base64-encoded 32-byte key");
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
function countReferenceMismatch(left, right) {
|
|
639
|
+
const rightSet = new Set(right);
|
|
640
|
+
return left.filter((reference) => !rightSet.has(reference)).length;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
function auditAtlassianCredentialFiles(stateDir, credentialsRel, findings) {
|
|
644
|
+
const vaultRel = `${credentialsRel}/${ATLASSIAN_VAULT}`;
|
|
645
|
+
const keyfileRel = `${credentialsRel}/${ATLASSIAN_KEYFILE}`;
|
|
646
|
+
const metadataRel = `${credentialsRel}/${ATLASSIAN_METADATA}`;
|
|
647
|
+
const present = [vaultRel, keyfileRel, metadataRel].map((rel) =>
|
|
648
|
+
existsWithoutFollowing(join(stateDir, rel)),
|
|
649
|
+
);
|
|
650
|
+
if (!present.some(Boolean)) return;
|
|
651
|
+
const metadataRefs = readAtlassianMetadataRefs(stateDir, metadataRel, findings);
|
|
652
|
+
const vaultRefs = readAtlassianVaultRefs(stateDir, vaultRel, findings);
|
|
653
|
+
checkAtlassianKeyfile(stateDir, keyfileRel, findings);
|
|
654
|
+
const mismatches =
|
|
655
|
+
countReferenceMismatch(metadataRefs, vaultRefs) +
|
|
656
|
+
countReferenceMismatch(vaultRefs, metadataRefs);
|
|
657
|
+
if (mismatches > 0) {
|
|
658
|
+
findings.push(`${mismatches} Atlassian credential reference(s) are orphaned`);
|
|
659
|
+
}
|
|
660
|
+
if (present[1] && !present[0]) findings.push("Atlassian credential keyfile has no vault");
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
function sealedEntryFinding(label, value) {
|
|
664
|
+
return typeof value === "string" && value.startsWith(SEALED_STRING_PREFIX)
|
|
665
|
+
? undefined
|
|
666
|
+
: `${label} is not sealed as a kv1. envelope`;
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
function validateProviderVaultEntries(entries, refs) {
|
|
670
|
+
const findings = [];
|
|
671
|
+
for (const [index, ref] of refs.entries()) {
|
|
672
|
+
const label = `credential reference #${index + 1}`;
|
|
673
|
+
if (!Object.hasOwn(entries, ref)) {
|
|
674
|
+
findings.push(`${label} is missing from the provider vault`);
|
|
675
|
+
continue;
|
|
676
|
+
}
|
|
677
|
+
const finding = sealedEntryFinding(label, entries[ref]);
|
|
678
|
+
if (finding !== undefined) findings.push(finding);
|
|
679
|
+
}
|
|
680
|
+
for (const [index, [, value]] of Object.entries(entries).entries()) {
|
|
681
|
+
const finding = sealedEntryFinding(`provider vault entry #${index + 1}`, value);
|
|
682
|
+
if (finding !== undefined) findings.push(finding);
|
|
683
|
+
}
|
|
684
|
+
return findings;
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
// ── Class 2: encrypted editor hot-exit recovery snapshots ───────────────────────────────────
|
|
688
|
+
function isBase64Key(value) {
|
|
689
|
+
try {
|
|
690
|
+
return Buffer.from(value.trim(), "base64").length === 32;
|
|
691
|
+
} catch {
|
|
692
|
+
return false;
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// eslint-disable-next-line complexity -- hot-exit vault audit keeps schema, sealed-entry, and plaintext-field checks together.
|
|
697
|
+
function validateHotExitVault(stateDir, vaultPath) {
|
|
698
|
+
const rel = relative(stateDir, vaultPath);
|
|
699
|
+
const raw = readFileSync(vaultPath, "utf8");
|
|
700
|
+
const vault = readJsonFile(vaultPath);
|
|
701
|
+
if (vault === undefined) return [`${rel} is not valid JSON`];
|
|
702
|
+
if (typeof vault !== "object" || vault === null || Array.isArray(vault)) {
|
|
703
|
+
return [`${rel} is not an object`];
|
|
704
|
+
}
|
|
705
|
+
if (vault.version !== LOCAL_SECRET_VAULT_VERSION) {
|
|
706
|
+
return [`${rel} has an unsupported schema version`];
|
|
707
|
+
}
|
|
708
|
+
const entries = vault.entries;
|
|
709
|
+
if (typeof entries !== "object" || entries === null || Array.isArray(entries)) {
|
|
710
|
+
return [`${rel} is missing an entries object`];
|
|
711
|
+
}
|
|
712
|
+
const findings = [];
|
|
713
|
+
for (const [ref, value] of Object.entries(entries)) {
|
|
714
|
+
if (!HOT_EXIT_REF_PATTERN.test(ref)) {
|
|
715
|
+
findings.push(`${rel} contains a non-hot-exit snapshot reference`);
|
|
716
|
+
}
|
|
717
|
+
const sealedFinding = sealedEntryFinding(`${rel} entry ${ref}`, value);
|
|
718
|
+
if (sealedFinding !== undefined) findings.push(sealedFinding);
|
|
719
|
+
}
|
|
720
|
+
if (
|
|
721
|
+
/\b(?:workspaceRoot|relativePath|contentHash|savedContentHash|paneId|windowId)\b/u.test(raw)
|
|
722
|
+
) {
|
|
723
|
+
findings.push(`${rel} contains plaintext hot-exit snapshot fields`);
|
|
724
|
+
}
|
|
725
|
+
return findings;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
function checkHotExitKeyfile(stateDir, findings) {
|
|
729
|
+
const rel = `${EDITOR_HOT_EXIT_SUBDIR}/${EDITOR_HOT_EXIT_KEYFILE}`;
|
|
730
|
+
const keyfile = join(stateDir, rel);
|
|
731
|
+
if (!existsSync(keyfile)) return;
|
|
732
|
+
const symlink = firstSymlinkInPath(stateDir, rel);
|
|
733
|
+
if (symlink !== undefined) {
|
|
734
|
+
findings.push(symlinkFinding(stateDir, symlink));
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
const stat = lstatSync(keyfile);
|
|
738
|
+
if (!stat.isFile()) {
|
|
739
|
+
findings.push(`${rel} is not a regular file`);
|
|
740
|
+
return;
|
|
741
|
+
}
|
|
742
|
+
if (process.platform !== "win32" && looseModeFromStat(stat)) {
|
|
743
|
+
findings.push(`${rel} is ${octalFromStat(stat)} (expected 0o600)`);
|
|
744
|
+
}
|
|
745
|
+
if (!isBase64Key(readFileSync(keyfile, "utf8"))) {
|
|
746
|
+
findings.push(`${rel} is not a base64-encoded 32-byte hot-exit vault key`);
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
// eslint-disable-next-line complexity -- hot-exit audit must handle absent, partial, symlinked, and sealed vault states distinctly.
|
|
751
|
+
function auditEditorHotExit(stateDir) {
|
|
752
|
+
const id = "editor-hot-exit";
|
|
753
|
+
const title = "Encrypted editor hot-exit recovery snapshots";
|
|
754
|
+
const dirRel = EDITOR_HOT_EXIT_SUBDIR;
|
|
755
|
+
const vaultRel = `${EDITOR_HOT_EXIT_SUBDIR}/${EDITOR_HOT_EXIT_VAULT}`;
|
|
756
|
+
const dir = join(stateDir, dirRel);
|
|
757
|
+
const vaultPath = join(stateDir, vaultRel);
|
|
758
|
+
if (!existsSync(dir)) return skip(id, title, "no editor hot-exit recovery store present");
|
|
759
|
+
const dirSymlink = firstSymlinkInPath(stateDir, dirRel);
|
|
760
|
+
if (dirSymlink !== undefined) return fail(id, title, [symlinkFinding(stateDir, dirSymlink)]);
|
|
761
|
+
if (
|
|
762
|
+
!existsSync(vaultPath) &&
|
|
763
|
+
!existsSync(join(stateDir, EDITOR_HOT_EXIT_SUBDIR, EDITOR_HOT_EXIT_KEYFILE))
|
|
764
|
+
) {
|
|
765
|
+
return skip(id, title, "editor hot-exit directory is present but has no recovery vault");
|
|
766
|
+
}
|
|
767
|
+
const findings = [];
|
|
768
|
+
const vaultSymlink = firstSymlinkInPath(stateDir, vaultRel);
|
|
769
|
+
if (vaultSymlink !== undefined) {
|
|
770
|
+
findings.push(symlinkFinding(stateDir, vaultSymlink));
|
|
771
|
+
} else if (existsSync(vaultPath)) {
|
|
772
|
+
if (!checkArtifactProtection(stateDir, vaultPath, findings)) {
|
|
773
|
+
// Protection errors are already recorded; avoid parsing non-regular files.
|
|
774
|
+
} else {
|
|
775
|
+
findings.push(...validateHotExitVault(stateDir, vaultPath));
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
checkHotExitKeyfile(stateDir, findings);
|
|
779
|
+
if (findings.length > 0) return fail(id, title, findings);
|
|
780
|
+
if (!existsSync(vaultPath)) {
|
|
781
|
+
return pass(id, title, ["hot-exit key material is owner-only; no recovery snapshots present"]);
|
|
782
|
+
}
|
|
783
|
+
const vault = readJsonFile(vaultPath);
|
|
784
|
+
const entries =
|
|
785
|
+
typeof vault === "object" &&
|
|
786
|
+
vault !== null &&
|
|
787
|
+
typeof vault.entries === "object" &&
|
|
788
|
+
vault.entries !== null
|
|
789
|
+
? Object.keys(vault.entries).length
|
|
790
|
+
: 0;
|
|
791
|
+
return pass(id, title, [
|
|
792
|
+
`${entries} editor recovery snapshot(s) are stored only as sealed hot-exit vault entries`,
|
|
793
|
+
]);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// ── Class 3: private file modes ──────────────────────────────────────────────────────────────
|
|
797
|
+
function walk(absDir, relDir, onFile, onDir) {
|
|
798
|
+
for (const name of readdirSync(absDir)) {
|
|
799
|
+
const abs = join(absDir, name);
|
|
800
|
+
const rel = relDir === "" ? name : `${relDir}/${name}`;
|
|
801
|
+
const stat = lstatSync(abs);
|
|
802
|
+
if (stat.isSymbolicLink()) continue; // never follow a symlink
|
|
803
|
+
if (stat.isDirectory()) {
|
|
804
|
+
onDir(abs, rel);
|
|
805
|
+
walk(abs, rel, onFile, onDir);
|
|
806
|
+
} else if (stat.isFile()) {
|
|
807
|
+
onFile(abs, rel, name);
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
function auditFileModes(stateDir) {
|
|
813
|
+
const id = "file-modes";
|
|
814
|
+
const title = "Private file and directory modes";
|
|
815
|
+
if (process.platform === "win32") {
|
|
816
|
+
return skip(id, title, "POSIX mode check not applicable on Windows (NTFS ACLs govern access)");
|
|
817
|
+
}
|
|
818
|
+
const failures = [];
|
|
819
|
+
const notes = [];
|
|
820
|
+
if (looseMode(stateDir)) failures.push(`state directory is ${octal(stateDir)} (expected 0o700)`);
|
|
821
|
+
walk(
|
|
822
|
+
stateDir,
|
|
823
|
+
"",
|
|
824
|
+
(abs, rel, name) => {
|
|
825
|
+
if (!looseMode(abs)) return;
|
|
826
|
+
if (isSensitiveFile(rel, name)) failures.push(`${rel} is ${octal(abs)} (expected 0o600)`);
|
|
827
|
+
else notes.push(`${rel} is ${octal(abs)} (non-Keiko file; informational)`);
|
|
828
|
+
},
|
|
829
|
+
(abs, rel) => {
|
|
830
|
+
if (looseMode(abs)) failures.push(`${rel}/ is ${octal(abs)} (expected 0o700)`);
|
|
831
|
+
},
|
|
832
|
+
);
|
|
833
|
+
if (failures.length > 0) return fail(id, title, [...failures, ...notes]);
|
|
834
|
+
return pass(id, title, [
|
|
835
|
+
"all Keiko-owned files and directories are owner-only (0o600 / 0o700)",
|
|
836
|
+
...notes,
|
|
837
|
+
]);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
// ── Class 4: encrypted Memory Vault content ──────────────────────────────────────────────────
|
|
841
|
+
const MEMORY_TEXT_TARGETS = [
|
|
842
|
+
{ table: "memories", column: "body" },
|
|
843
|
+
{ table: "memories", column: "payload_json" },
|
|
844
|
+
{ table: "memories", column: "tags_json" },
|
|
845
|
+
{ table: "memories", column: "capture_rationale" },
|
|
846
|
+
{ table: "memories", column: "stale_reason" },
|
|
847
|
+
{ table: "memory_edges", column: "provenance_summary" },
|
|
848
|
+
{ table: "memory_tombstones", column: "reason" },
|
|
849
|
+
];
|
|
850
|
+
|
|
851
|
+
function sampleColumnSealed(db, table, column) {
|
|
852
|
+
// Returns { rows, sealed } for a TEXT content column: sealed is true only when EVERY non-null
|
|
853
|
+
// sampled value is a kv1. envelope. An empty table yields rows: 0 (nothing to contradict).
|
|
854
|
+
if (!columnExists(db, table, column)) return { rows: 0, sealed: true };
|
|
855
|
+
const values = db
|
|
856
|
+
.prepare(
|
|
857
|
+
`SELECT ${quoteIdent(column)} AS v FROM ${quoteIdent(table)} WHERE ${quoteIdent(column)} IS NOT NULL`,
|
|
858
|
+
)
|
|
859
|
+
.all();
|
|
860
|
+
const sealed = values.every(
|
|
861
|
+
(r) => typeof r.v === "string" && r.v.startsWith(SEALED_STRING_PREFIX),
|
|
862
|
+
);
|
|
863
|
+
return { rows: values.length, sealed };
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
function blobColumnSealed(db, table, column) {
|
|
867
|
+
if (!columnExists(db, table, column)) return { rows: 0, sealed: true };
|
|
868
|
+
const values = db
|
|
869
|
+
.prepare(
|
|
870
|
+
`SELECT ${quoteIdent(column)} AS v FROM ${quoteIdent(table)} WHERE ${quoteIdent(column)} IS NOT NULL`,
|
|
871
|
+
)
|
|
872
|
+
.all();
|
|
873
|
+
const sealed = values.every(
|
|
874
|
+
(r) => r.v != null && r.v.length > 0 && r.v[0] === SEALED_BINARY_VERSION,
|
|
875
|
+
);
|
|
876
|
+
return { rows: values.length, sealed };
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
function auditMemoryEncryption(stateDir) {
|
|
880
|
+
const id = "memory-encryption";
|
|
881
|
+
const title = "Encrypted Memory Vault content";
|
|
882
|
+
const dbPath = join(stateDir, MEMORY_SUBDIR, MEMORY_DB);
|
|
883
|
+
if (!existsSync(dbPath)) return skip(id, title, "no memory vault present");
|
|
884
|
+
const db = openReadOnly(dbPath);
|
|
885
|
+
if (db === undefined) return fail(id, title, ["memory vault is present but could not be opened"]);
|
|
886
|
+
try {
|
|
887
|
+
const findings = [];
|
|
888
|
+
let contentRows = 0;
|
|
889
|
+
for (const { table, column } of MEMORY_TEXT_TARGETS) {
|
|
890
|
+
const { rows, sealed } = sampleColumnSealed(db, table, column);
|
|
891
|
+
contentRows += rows;
|
|
892
|
+
if (!sealed)
|
|
893
|
+
findings.push(`${table}.${column} contains cleartext content (expected kv1. envelopes)`);
|
|
894
|
+
}
|
|
895
|
+
const vec = blobColumnSealed(db, "memory_embeddings", "vector");
|
|
896
|
+
if (!vec.sealed)
|
|
897
|
+
findings.push(
|
|
898
|
+
"memory_embeddings.vector contains a cleartext embedding (expected a sealed binary envelope)",
|
|
899
|
+
);
|
|
900
|
+
if (findings.length > 0) return fail(id, title, findings);
|
|
901
|
+
if (contentRows === 0 && vec.rows === 0) {
|
|
902
|
+
return skip(id, title, "memory vault present but holds no content rows to verify");
|
|
903
|
+
}
|
|
904
|
+
return pass(id, title, [
|
|
905
|
+
`${contentRows} memory text value(s) across ${MEMORY_TEXT_TARGETS.length} audited column(s) and ${vec.rows} embedding(s) are sealed at rest`,
|
|
906
|
+
]);
|
|
907
|
+
} finally {
|
|
908
|
+
db.close();
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
// ── Class 5: encrypted Local Knowledge content ───────────────────────────────────────────────
|
|
913
|
+
const LOCAL_KNOWLEDGE_TEXT_TARGETS = [
|
|
914
|
+
{ table: "document_texts", column: "normalized_text" },
|
|
915
|
+
{ table: "document_text_windows", column: "normalized_text" },
|
|
916
|
+
{ table: "sections", column: "section_path_json" },
|
|
917
|
+
{ table: "parsed_units", column: "section_path_json" },
|
|
918
|
+
{ table: "parsed_units", column: "heading_path_json" },
|
|
919
|
+
{ table: "parsed_units", column: "anchor_id" },
|
|
920
|
+
];
|
|
921
|
+
|
|
922
|
+
function listKnowledgeDbs(stateDir) {
|
|
923
|
+
const root = join(stateDir, LOCAL_KNOWLEDGE_SUBDIR);
|
|
924
|
+
if (!existsSync(root)) return [];
|
|
925
|
+
const dbs = [];
|
|
926
|
+
for (const ns of readdirSync(root)) {
|
|
927
|
+
const candidate = join(root, ns, CAPSULES_DB);
|
|
928
|
+
if (existsSync(candidate) && lstatSync(candidate).isFile()) {
|
|
929
|
+
dbs.push({ namespace: ns, dbPath: candidate });
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
return dbs;
|
|
933
|
+
}
|
|
934
|
+
|
|
935
|
+
function readSchemaMeta(db, key) {
|
|
936
|
+
if (!tableExists(db, "schema_meta")) return undefined;
|
|
937
|
+
const row = db.prepare("SELECT value FROM schema_meta WHERE key = ?").get(key);
|
|
938
|
+
return row === undefined ? undefined : row.value;
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
function auditOneKnowledgeStore(namespace, dbPath) {
|
|
942
|
+
const db = openReadOnly(dbPath);
|
|
943
|
+
if (db === undefined) return [`${namespace}: store could not be opened`];
|
|
944
|
+
try {
|
|
945
|
+
const findings = [];
|
|
946
|
+
if (readSchemaMeta(db, LK_ENC_MARKER_KEY) !== LK_ENC_MARKER_VALUE) {
|
|
947
|
+
findings.push(
|
|
948
|
+
`${namespace}: store is not marked encrypted (missing ${LK_ENC_MARKER_KEY}=${LK_ENC_MARKER_VALUE})`,
|
|
949
|
+
);
|
|
950
|
+
}
|
|
951
|
+
const probe = readSchemaMeta(db, LK_ENC_PROBE_KEY);
|
|
952
|
+
if (typeof probe !== "string" || !probe.startsWith(SEALED_STRING_PREFIX)) {
|
|
953
|
+
findings.push(`${namespace}: key-verification probe is missing or not sealed`);
|
|
954
|
+
}
|
|
955
|
+
if (readSchemaMeta(db, LK_ENC_SCOPE_KEY) !== LK_ENC_SCOPE_VALUE) {
|
|
956
|
+
findings.push(
|
|
957
|
+
`${namespace}: encryption scope marker is missing or unsupported (expected ${LK_ENC_SCOPE_KEY}=${LK_ENC_SCOPE_VALUE})`,
|
|
958
|
+
);
|
|
959
|
+
}
|
|
960
|
+
for (const { table, column } of LOCAL_KNOWLEDGE_TEXT_TARGETS) {
|
|
961
|
+
const text = sampleColumnSealed(db, table, column);
|
|
962
|
+
if (!text.sealed) findings.push(`${namespace}: ${table}.${column} contains cleartext`);
|
|
963
|
+
}
|
|
964
|
+
const vec = blobColumnSealed(db, "vectors", "embedding");
|
|
965
|
+
if (!vec.sealed) findings.push(`${namespace}: vectors.embedding contains a cleartext vector`);
|
|
966
|
+
findings.push(...auditKnowledgeLexicalProjection(db, namespace));
|
|
967
|
+
return findings;
|
|
968
|
+
} finally {
|
|
969
|
+
db.close();
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
function auditKnowledgeLexicalProjection(db, namespace) {
|
|
974
|
+
if (!tableExists(db, "chunk_lexical_index")) return [];
|
|
975
|
+
const findings = [];
|
|
976
|
+
const columns = ["text", "exact_text"].filter((column) =>
|
|
977
|
+
columnExists(db, "chunk_lexical_index", column),
|
|
978
|
+
);
|
|
979
|
+
if (columns.length === 0) return findings;
|
|
980
|
+
const rows = db
|
|
981
|
+
.prepare(
|
|
982
|
+
`SELECT ${columns.map((column) => quoteIdent(column)).join(", ")} FROM chunk_lexical_index`,
|
|
983
|
+
)
|
|
984
|
+
.all();
|
|
985
|
+
for (const column of columns) {
|
|
986
|
+
const secretLabels = new Set();
|
|
987
|
+
for (const row of rows) {
|
|
988
|
+
const value = row[column];
|
|
989
|
+
if (typeof value !== "string" || value.length === 0) continue;
|
|
990
|
+
for (const label of scanForSecretFindings(value)) secretLabels.add(label);
|
|
991
|
+
}
|
|
992
|
+
if (secretLabels.size > 0) {
|
|
993
|
+
findings.push(
|
|
994
|
+
`${namespace}: chunk_lexical_index.${column} contains unredacted secret material (${[
|
|
995
|
+
...secretLabels,
|
|
996
|
+
].join(", ")})`,
|
|
997
|
+
);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
return findings;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
function auditKnowledgeEncryption(stateDir) {
|
|
1004
|
+
const id = "local-knowledge-encryption";
|
|
1005
|
+
const title = "Encrypted Local Knowledge content";
|
|
1006
|
+
const stores = listKnowledgeDbs(stateDir);
|
|
1007
|
+
if (stores.length === 0) return skip(id, title, "no Local Knowledge store present");
|
|
1008
|
+
const findings = stores.flatMap((s) => auditOneKnowledgeStore(s.namespace, s.dbPath));
|
|
1009
|
+
if (findings.length > 0) return fail(id, title, findings);
|
|
1010
|
+
return pass(id, title, [
|
|
1011
|
+
`${stores.length} Local Knowledge store(s) seal configured content columns at rest (marker + sealed key probe + scope verified); plaintext lexical FTS projection remains reconstructive residual data and was scanned for secret-shaped material`,
|
|
1012
|
+
]);
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
// ── Class 6: protected Evidence / Quality-Intelligence artifacts ──────────────────────────────
|
|
1016
|
+
const TRAILING_PLACEHOLDER_PUNCTUATION = new Set([".", ",", ";", ")", "}"]);
|
|
1017
|
+
|
|
1018
|
+
// Strips trailing punctuation one character at a time instead of via `/[.,;)}]+$/` (SonarCloud
|
|
1019
|
+
// S8786): that pattern is unanchored at the start, so on a long run of matching characters that
|
|
1020
|
+
// never reaches the true end of the string (e.g. a secret value followed by other content), the
|
|
1021
|
+
// engine backtracks the run one character at a time from every position within it, giving O(n²)
|
|
1022
|
+
// work. A manual scan from the end can't backtrack at all and is O(n).
|
|
1023
|
+
function stripTrailingPlaceholderPunctuation(value) {
|
|
1024
|
+
let end = value.length;
|
|
1025
|
+
while (end > 0 && TRAILING_PLACEHOLDER_PUNCTUATION.has(value[end - 1])) end--;
|
|
1026
|
+
return value.slice(0, end);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
function isPlaceholderSafe(value) {
|
|
1030
|
+
const trimmed = stripTrailingPlaceholderPunctuation(value.trim());
|
|
1031
|
+
return trimmed === REDACTED_PLACEHOLDER || /^(?:true|false|null|\d+)$/iu.test(trimmed);
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
function scanForSecretFindings(text) {
|
|
1035
|
+
const findings = [];
|
|
1036
|
+
for (const { label, re } of SECRET_SHAPE_PATTERNS) {
|
|
1037
|
+
re.lastIndex = 0;
|
|
1038
|
+
if (re.test(text)) findings.push(label);
|
|
1039
|
+
}
|
|
1040
|
+
for (const pattern of SECRET_VALUE_PATTERNS) {
|
|
1041
|
+
for (const re of pattern.res) {
|
|
1042
|
+
re.lastIndex = 0;
|
|
1043
|
+
for (const match of text.matchAll(re)) {
|
|
1044
|
+
const value = match[pattern.valueGroup ?? 2];
|
|
1045
|
+
if (typeof value === "string" && !isPlaceholderSafe(value)) findings.push(pattern.label);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
return [...new Set(findings)];
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
function isTextArtifact(path) {
|
|
1053
|
+
return /\.(?:json|jsonl|txt|vault)$/u.test(path) || path.includes(QI_QUARANTINED_MANIFEST_MARKER);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
function scanForSecrets(path) {
|
|
1057
|
+
const text = readFileSync(path, "utf8");
|
|
1058
|
+
return scanForSecretFindings(text);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
function collectArtifacts(stateDir) {
|
|
1062
|
+
const evidenceDir = join(stateDir, EVIDENCE_SUBDIR);
|
|
1063
|
+
const artifacts = {
|
|
1064
|
+
evidence: [],
|
|
1065
|
+
toolResults: [],
|
|
1066
|
+
qi: [],
|
|
1067
|
+
qiQuarantined: [],
|
|
1068
|
+
qiRetentionAudit: [],
|
|
1069
|
+
candidates: [],
|
|
1070
|
+
qiCompanions: [],
|
|
1071
|
+
pe: [],
|
|
1072
|
+
figmaSnapshots: [],
|
|
1073
|
+
figmaManagement: [],
|
|
1074
|
+
figmaSideFiles: [],
|
|
1075
|
+
figmaVault: undefined,
|
|
1076
|
+
symlinks: [],
|
|
1077
|
+
};
|
|
1078
|
+
if (!existsSync(evidenceDir)) return artifacts;
|
|
1079
|
+
const evidenceSymlink = firstSymlinkInPath(stateDir, EVIDENCE_SUBDIR);
|
|
1080
|
+
if (evidenceSymlink !== undefined) {
|
|
1081
|
+
artifacts.symlinks.push(evidenceSymlink);
|
|
1082
|
+
return artifacts;
|
|
1083
|
+
}
|
|
1084
|
+
collectEvidenceTree(evidenceDir, EVIDENCE_SUBDIR, artifacts);
|
|
1085
|
+
collectKnownSubtree(
|
|
1086
|
+
join(evidenceDir, TOOL_RESULTS_SUBDIR),
|
|
1087
|
+
`${EVIDENCE_SUBDIR}/${TOOL_RESULTS_SUBDIR}`,
|
|
1088
|
+
artifacts,
|
|
1089
|
+
collectToolResultTree,
|
|
1090
|
+
);
|
|
1091
|
+
collectKnownSubtree(
|
|
1092
|
+
join(evidenceDir, PE_SUBDIR),
|
|
1093
|
+
`${EVIDENCE_SUBDIR}/${PE_SUBDIR}`,
|
|
1094
|
+
artifacts,
|
|
1095
|
+
collectPeTree,
|
|
1096
|
+
);
|
|
1097
|
+
collectKnownSubtree(
|
|
1098
|
+
join(evidenceDir, QI_SUBDIR),
|
|
1099
|
+
`${EVIDENCE_SUBDIR}/${QI_SUBDIR}`,
|
|
1100
|
+
artifacts,
|
|
1101
|
+
collectQiTree,
|
|
1102
|
+
);
|
|
1103
|
+
collectFigmaVault(stateDir, artifacts);
|
|
1104
|
+
return artifacts;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
function collectFigmaVault(stateDir, artifacts) {
|
|
1108
|
+
const figmaVaultRel = `${EVIDENCE_SUBDIR}/${FIGMA_SUBDIR}/${FIGMA_VAULT}`;
|
|
1109
|
+
const figmaVault = join(stateDir, figmaVaultRel);
|
|
1110
|
+
const symlink = firstSymlinkInPath(stateDir, figmaVaultRel);
|
|
1111
|
+
if (symlink !== undefined) {
|
|
1112
|
+
artifacts.symlinks.push(symlink);
|
|
1113
|
+
} else if (existsSync(figmaVault)) {
|
|
1114
|
+
artifacts.figmaVault = figmaVault;
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
|
|
1118
|
+
function collectKnownSubtree(abs, rel, artifacts, collector) {
|
|
1119
|
+
if (!existsSync(abs)) return;
|
|
1120
|
+
const stat = lstatSync(abs);
|
|
1121
|
+
if (stat.isSymbolicLink()) {
|
|
1122
|
+
artifacts.symlinks.push(abs);
|
|
1123
|
+
return;
|
|
1124
|
+
}
|
|
1125
|
+
if (stat.isDirectory()) collector(abs, rel, artifacts);
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
function collectEvidenceTree(dir, relDir, artifacts) {
|
|
1129
|
+
for (const name of readdirSync(dir)) {
|
|
1130
|
+
const abs = join(dir, name);
|
|
1131
|
+
const stat = lstatSync(abs);
|
|
1132
|
+
if (stat.isSymbolicLink()) {
|
|
1133
|
+
artifacts.symlinks.push(abs);
|
|
1134
|
+
continue;
|
|
1135
|
+
}
|
|
1136
|
+
if (stat.isDirectory()) continue;
|
|
1137
|
+
if (
|
|
1138
|
+
stat.isFile() &&
|
|
1139
|
+
relDir === EVIDENCE_SUBDIR &&
|
|
1140
|
+
name.endsWith(".json") &&
|
|
1141
|
+
!name.endsWith(".lock")
|
|
1142
|
+
) {
|
|
1143
|
+
artifacts.evidence.push(abs);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
function collectPeTree(dir, relDir, artifacts) {
|
|
1149
|
+
for (const name of readdirSync(dir)) {
|
|
1150
|
+
const abs = join(dir, name);
|
|
1151
|
+
const stat = lstatSync(abs);
|
|
1152
|
+
if (stat.isSymbolicLink()) {
|
|
1153
|
+
artifacts.symlinks.push(abs);
|
|
1154
|
+
continue;
|
|
1155
|
+
}
|
|
1156
|
+
if (stat.isFile() && name.endsWith(".pe.json")) artifacts.pe.push(abs);
|
|
1157
|
+
else if (stat.isDirectory()) collectPeTree(abs, `${relDir}/${name}`, artifacts);
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
function collectToolResultTree(dir, relDir, artifacts) {
|
|
1162
|
+
for (const name of readdirSync(dir)) {
|
|
1163
|
+
const abs = join(dir, name);
|
|
1164
|
+
const stat = lstatSync(abs);
|
|
1165
|
+
if (stat.isSymbolicLink()) {
|
|
1166
|
+
artifacts.symlinks.push(abs);
|
|
1167
|
+
continue;
|
|
1168
|
+
}
|
|
1169
|
+
if (stat.isDirectory()) collectToolResultTree(abs, `${relDir}/${name}`, artifacts);
|
|
1170
|
+
else if (stat.isFile() && name.endsWith(TOOL_RESULT_ARTIFACT_SUFFIX)) {
|
|
1171
|
+
artifacts.toolResults.push(abs);
|
|
1172
|
+
}
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
function collectQiTree(dir, relDir, artifacts) {
|
|
1177
|
+
for (const name of readdirSync(dir)) {
|
|
1178
|
+
const abs = join(dir, name);
|
|
1179
|
+
const stat = lstatSync(abs);
|
|
1180
|
+
if (stat.isSymbolicLink()) {
|
|
1181
|
+
artifacts.symlinks.push(abs);
|
|
1182
|
+
continue;
|
|
1183
|
+
}
|
|
1184
|
+
if (stat.isDirectory()) collectQiDirectory(name, abs, relDir, artifacts);
|
|
1185
|
+
else if (stat.isFile()) collectQiFile(name, abs, artifacts);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
function collectQiDirectory(name, abs, relDir, artifacts) {
|
|
1190
|
+
if (name === FIGMA_SNAPSHOT_SUBDIR || relDir.includes(`/${FIGMA_SNAPSHOT_SUBDIR}`)) {
|
|
1191
|
+
collectFigmaSideFiles(abs, `${relDir}/${name}`, artifacts);
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
function collectQiFile(name, abs, artifacts) {
|
|
1196
|
+
if (name.endsWith(".figma-snapshot.management.json")) artifacts.figmaManagement.push(abs);
|
|
1197
|
+
else if (name.endsWith(".figma-snapshot.json")) artifacts.figmaSnapshots.push(abs);
|
|
1198
|
+
else if (name.includes(QI_QUARANTINED_MANIFEST_MARKER)) artifacts.qiQuarantined.push(abs);
|
|
1199
|
+
else if (name === QI_RETENTION_AUDIT_FILE) artifacts.qiRetentionAudit.push(abs);
|
|
1200
|
+
else if (name.endsWith(".qi.json")) artifacts.qi.push(abs);
|
|
1201
|
+
else if (name.endsWith(".candidates.json")) artifacts.candidates.push(abs);
|
|
1202
|
+
else if (name.endsWith(".json")) artifacts.qiCompanions.push(abs);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
function collectFigmaSideFiles(dir, relDir, artifacts) {
|
|
1206
|
+
for (const name of readdirSync(dir)) {
|
|
1207
|
+
const abs = join(dir, name);
|
|
1208
|
+
const stat = lstatSync(abs);
|
|
1209
|
+
if (stat.isSymbolicLink()) {
|
|
1210
|
+
artifacts.symlinks.push(abs);
|
|
1211
|
+
continue;
|
|
1212
|
+
}
|
|
1213
|
+
if (stat.isDirectory()) collectFigmaSideFiles(abs, `${relDir}/${name}`, artifacts);
|
|
1214
|
+
else if (stat.isFile()) artifacts.figmaSideFiles.push(abs);
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
function checkArtifactProtection(stateDir, path, findings) {
|
|
1219
|
+
const rel = relative(stateDir, path);
|
|
1220
|
+
const stat = lstatSync(path);
|
|
1221
|
+
if (stat.isSymbolicLink()) {
|
|
1222
|
+
findings.push(`${rel} is a symbolic link (refusing to read Keiko-owned artifact)`);
|
|
1223
|
+
return false;
|
|
1224
|
+
}
|
|
1225
|
+
if (!stat.isFile()) {
|
|
1226
|
+
findings.push(`${rel} is not a regular file`);
|
|
1227
|
+
return false;
|
|
1228
|
+
}
|
|
1229
|
+
if (process.platform !== "win32" && looseModeFromStat(stat)) {
|
|
1230
|
+
findings.push(`${rel} is ${octalFromStat(stat)} (expected 0o600)`);
|
|
1231
|
+
}
|
|
1232
|
+
if (isTextArtifact(path)) {
|
|
1233
|
+
const leaks = scanForSecrets(path);
|
|
1234
|
+
if (leaks.length > 0)
|
|
1235
|
+
findings.push(`${rel} contains unredacted secret material (${leaks.join(", ")})`);
|
|
1236
|
+
}
|
|
1237
|
+
return true;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
function sha256OfJson(value) {
|
|
1241
|
+
return createHash("sha256").update(JSON.stringify(value)).digest("hex");
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
function sha256OfBytes(value) {
|
|
1245
|
+
return createHash("sha256").update(value).digest("hex");
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
function canonical(value) {
|
|
1249
|
+
if (value === undefined) return "null";
|
|
1250
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
1251
|
+
if (Array.isArray(value)) return `[${value.map(canonical).join(",")}]`;
|
|
1252
|
+
const entries = Object.keys(value)
|
|
1253
|
+
.sort((left, right) => left.localeCompare(right))
|
|
1254
|
+
.map((key) => `${JSON.stringify(key)}:${canonical(value[key])}`);
|
|
1255
|
+
return `{${entries.join(",")}}`;
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1258
|
+
function sha256OfCanonicalJson(value) {
|
|
1259
|
+
return createHash("sha256").update(canonical(value), "utf8").digest("hex");
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
function checkQiTamperEvidence(stateDir, qiPaths, findings) {
|
|
1263
|
+
for (const path of qiPaths) {
|
|
1264
|
+
findings.push(...qiIntegrityFindings(stateDir, path));
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
function qiIntegrityFindings(stateDir, path) {
|
|
1269
|
+
const manifest = readJsonFile(path);
|
|
1270
|
+
const rel = relative(stateDir, path);
|
|
1271
|
+
if (manifest === undefined) return [`${rel} is not valid JSON`];
|
|
1272
|
+
if (typeof manifest.integrityHashes !== "object" || manifest.integrityHashes === null) {
|
|
1273
|
+
return [`${rel} is missing integrity hashes`];
|
|
1274
|
+
}
|
|
1275
|
+
return [...requiredQiHashFindings(rel, manifest), ...optionalQiHashFindings(rel, manifest)];
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
function requiredQiHashFindings(rel, manifest) {
|
|
1279
|
+
return ["findings", "exports", "evidenceRefs"].flatMap((field) => {
|
|
1280
|
+
const expected = sha256OfJson(Array.isArray(manifest[field]) ? manifest[field] : []);
|
|
1281
|
+
return manifest.integrityHashes[field] === expected
|
|
1282
|
+
? []
|
|
1283
|
+
: [`${rel} integrity hash mismatch for ${field}`];
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
function optionalQiHashFindings(rel, manifest) {
|
|
1288
|
+
return ["atomFingerprints", "coverageMatrix", "sourceFingerprints"].flatMap((field) => {
|
|
1289
|
+
if (manifest[field] === undefined) return [];
|
|
1290
|
+
const expected = sha256OfJson(manifest[field]);
|
|
1291
|
+
return manifest.integrityHashes[field] === expected
|
|
1292
|
+
? []
|
|
1293
|
+
: [`${rel} integrity hash mismatch for ${field}`];
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
function checkPromptEnhancementIntegrity(stateDir, pePaths, findings) {
|
|
1298
|
+
for (const path of pePaths) {
|
|
1299
|
+
const manifest = readJsonFile(path);
|
|
1300
|
+
const rel = relative(stateDir, path);
|
|
1301
|
+
if (manifest === undefined) {
|
|
1302
|
+
findings.push(`${rel} is not valid JSON`);
|
|
1303
|
+
continue;
|
|
1304
|
+
}
|
|
1305
|
+
if (typeof manifest.integrityHashes !== "object" || manifest.integrityHashes === null) {
|
|
1306
|
+
findings.push(`${rel} is missing integrity hashes`);
|
|
1307
|
+
continue;
|
|
1308
|
+
}
|
|
1309
|
+
const record = { ...manifest };
|
|
1310
|
+
delete record.integrityHashes;
|
|
1311
|
+
const expected = {
|
|
1312
|
+
enhancedOutput: sha256OfJson({
|
|
1313
|
+
enhancedPromptId: manifest.enhancedPromptId,
|
|
1314
|
+
enhancedPromptTextRedacted: manifest.enhancedPromptTextRedacted,
|
|
1315
|
+
}),
|
|
1316
|
+
appliedRules: sha256OfJson({
|
|
1317
|
+
appliedSafetyRules: manifest.appliedSafetyRules,
|
|
1318
|
+
appliedGroundingDirectives: manifest.appliedGroundingDirectives,
|
|
1319
|
+
assumptions: manifest.assumptions,
|
|
1320
|
+
}),
|
|
1321
|
+
candidateScores: sha256OfJson(manifest.candidateScores),
|
|
1322
|
+
candidateRejections: sha256OfJson(manifest.candidateRejections),
|
|
1323
|
+
record: sha256OfJson(record),
|
|
1324
|
+
};
|
|
1325
|
+
for (const [field, hash] of Object.entries(expected)) {
|
|
1326
|
+
if (manifest.integrityHashes[field] !== hash) {
|
|
1327
|
+
findings.push(`${rel} integrity hash mismatch for ${field}`);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
function isSafeRelativePath(value) {
|
|
1334
|
+
return (
|
|
1335
|
+
typeof value === "string" &&
|
|
1336
|
+
value.length > 0 &&
|
|
1337
|
+
!value.startsWith("/") &&
|
|
1338
|
+
!value.split(/[\\/]/u).includes("..")
|
|
1339
|
+
);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
function checkFigmaSnapshotIntegrity(stateDir, snapshotPaths, findings) {
|
|
1343
|
+
for (const path of snapshotPaths) {
|
|
1344
|
+
findings.push(...figmaSnapshotFindings(stateDir, path));
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
function figmaSnapshotFindings(stateDir, path) {
|
|
1349
|
+
const rel = relative(stateDir, path);
|
|
1350
|
+
const manifest = readJsonFile(path);
|
|
1351
|
+
if (manifest === undefined) return [`${rel} is not valid JSON`];
|
|
1352
|
+
const runId = typeof manifest.runId === "string" ? manifest.runId : undefined;
|
|
1353
|
+
if (runId === undefined) return [`${rel} is missing runId`];
|
|
1354
|
+
return [
|
|
1355
|
+
...figmaSnapshotMetadataFindings(rel, manifest),
|
|
1356
|
+
...figmaScreenFindings(stateDir, rel, runId, manifest.screens),
|
|
1357
|
+
...figmaArtifactHashFindings(rel, manifest),
|
|
1358
|
+
];
|
|
1359
|
+
}
|
|
1360
|
+
|
|
1361
|
+
function figmaSnapshotMetadataFindings(rel, manifest) {
|
|
1362
|
+
return typeof manifest.integrityHash === "string" && manifest.integrityHash.length > 0
|
|
1363
|
+
? []
|
|
1364
|
+
: [`${rel} is missing snapshot integrity metadata`];
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
function figmaScreenFindings(stateDir, rel, runId, screens) {
|
|
1368
|
+
if (!Array.isArray(screens)) return [];
|
|
1369
|
+
return screens.flatMap((screen) =>
|
|
1370
|
+
typeof screen === "object" && screen !== null
|
|
1371
|
+
? oneFigmaScreenFindings(stateDir, rel, runId, screen)
|
|
1372
|
+
: [],
|
|
1373
|
+
);
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
function oneFigmaScreenFindings(stateDir, rel, runId, screen) {
|
|
1377
|
+
const findings = [];
|
|
1378
|
+
if (typeof screen.integrityHash !== "string" || screen.integrityHash.length === 0) {
|
|
1379
|
+
findings.push(`${rel} screen ${String(screen.screenId ?? "?")} is missing integrity metadata`);
|
|
1380
|
+
}
|
|
1381
|
+
if (typeof screen.image === "object" && screen.image !== null) {
|
|
1382
|
+
findings.push(...figmaImageFindings(stateDir, rel, runId, screen));
|
|
1383
|
+
}
|
|
1384
|
+
return findings;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
function figmaImageFindings(stateDir, rel, runId, screen) {
|
|
1388
|
+
const image = screen.image;
|
|
1389
|
+
const imageRelativePath = image.relativePath ?? image.path;
|
|
1390
|
+
if (!isSafeRelativePath(imageRelativePath)) {
|
|
1391
|
+
return [`${rel} screen ${String(screen.screenId ?? "?")} has an unsafe image side-file path`];
|
|
1392
|
+
}
|
|
1393
|
+
const imageRelPath = `${EVIDENCE_SUBDIR}/${QI_SUBDIR}/${FIGMA_SNAPSHOT_SUBDIR}/${runId}/${imageRelativePath}`;
|
|
1394
|
+
const symlink = firstSymlinkInPath(stateDir, imageRelPath);
|
|
1395
|
+
if (symlink !== undefined) return [symlinkFinding(stateDir, symlink)];
|
|
1396
|
+
const imagePath = join(stateDir, imageRelPath);
|
|
1397
|
+
return imageFileFindings(stateDir, imagePath, image);
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
function imageFileFindings(stateDir, imagePath, image) {
|
|
1401
|
+
const rel = relative(stateDir, imagePath);
|
|
1402
|
+
const stat = lstatSync(imagePath, { throwIfNoEntry: false });
|
|
1403
|
+
if (stat === undefined) return [`${rel} is missing`];
|
|
1404
|
+
if (stat.isSymbolicLink()) {
|
|
1405
|
+
return [symlinkFinding(stateDir, imagePath)];
|
|
1406
|
+
}
|
|
1407
|
+
if (!stat.isFile()) return [`${rel} is not a regular file`];
|
|
1408
|
+
const bytes = readFileSync(imagePath);
|
|
1409
|
+
return [
|
|
1410
|
+
...(typeof image.byteLength === "number" && bytes.byteLength !== image.byteLength
|
|
1411
|
+
? [`${rel} byteLength does not match snapshot metadata`]
|
|
1412
|
+
: []),
|
|
1413
|
+
...(typeof image.sha256 === "string" && sha256OfBytes(bytes) !== image.sha256
|
|
1414
|
+
? [`${rel} sha256 does not match snapshot metadata`]
|
|
1415
|
+
: []),
|
|
1416
|
+
];
|
|
1417
|
+
}
|
|
1418
|
+
|
|
1419
|
+
function figmaArtifactHashFindings(rel, manifest) {
|
|
1420
|
+
const artifactHashes =
|
|
1421
|
+
typeof manifest.artifactHashes === "object" && manifest.artifactHashes !== null
|
|
1422
|
+
? manifest.artifactHashes
|
|
1423
|
+
: {};
|
|
1424
|
+
return ["links", "tokens", "metrics"].flatMap((field) =>
|
|
1425
|
+
figmaOneArtifactHashFindings(rel, manifest, artifactHashes, field),
|
|
1426
|
+
);
|
|
1427
|
+
}
|
|
1428
|
+
|
|
1429
|
+
function figmaOneArtifactHashFindings(rel, manifest, artifactHashes, field) {
|
|
1430
|
+
if (manifest[field] === undefined) return [];
|
|
1431
|
+
if (artifactHashes[field] === undefined) {
|
|
1432
|
+
return [`${rel} ${field} artifact is present without its artifact hash`];
|
|
1433
|
+
}
|
|
1434
|
+
return artifactHashes[field] === sha256OfCanonicalJson(manifest[field])
|
|
1435
|
+
? []
|
|
1436
|
+
: [`${rel} ${field} artifact hash mismatch`];
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
function checkFigmaVault(stateDir, figmaVault, findings) {
|
|
1440
|
+
const rel = relative(stateDir, figmaVault);
|
|
1441
|
+
const stat = lstatSync(figmaVault);
|
|
1442
|
+
if (stat.isSymbolicLink()) {
|
|
1443
|
+
findings.push(`${rel} is a symbolic link (refusing to read Keiko-owned artifact)`);
|
|
1444
|
+
return;
|
|
1445
|
+
}
|
|
1446
|
+
if (process.platform !== "win32" && looseModeFromStat(stat)) {
|
|
1447
|
+
findings.push(`${rel} is ${octalFromStat(stat)} (expected 0o600)`);
|
|
1448
|
+
}
|
|
1449
|
+
if (!readFileSync(figmaVault, "utf8").trim().startsWith(SEALED_STRING_PREFIX)) {
|
|
1450
|
+
findings.push(`${rel} is not a sealed Figma token envelope`);
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
function auditEvidence(stateDir) {
|
|
1455
|
+
const id = "evidence-qi";
|
|
1456
|
+
const title = "Protected Evidence / Quality-Intelligence artifacts";
|
|
1457
|
+
const a = collectArtifacts(stateDir);
|
|
1458
|
+
const total =
|
|
1459
|
+
a.evidence.length +
|
|
1460
|
+
a.toolResults.length +
|
|
1461
|
+
a.qi.length +
|
|
1462
|
+
a.qiQuarantined.length +
|
|
1463
|
+
a.qiRetentionAudit.length +
|
|
1464
|
+
a.candidates.length +
|
|
1465
|
+
a.qiCompanions.length +
|
|
1466
|
+
a.pe.length +
|
|
1467
|
+
a.figmaSnapshots.length +
|
|
1468
|
+
a.figmaManagement.length +
|
|
1469
|
+
a.figmaSideFiles.length +
|
|
1470
|
+
a.symlinks.length +
|
|
1471
|
+
(a.figmaVault ? 1 : 0);
|
|
1472
|
+
if (total === 0) return skip(id, title, "no Evidence / QI artifacts present");
|
|
1473
|
+
const findings = [];
|
|
1474
|
+
for (const path of a.symlinks) {
|
|
1475
|
+
findings.push(
|
|
1476
|
+
`${relative(stateDir, path)} is a symbolic link (refusing to read Keiko-owned artifact)`,
|
|
1477
|
+
);
|
|
1478
|
+
}
|
|
1479
|
+
for (const path of [
|
|
1480
|
+
...a.evidence,
|
|
1481
|
+
...a.toolResults,
|
|
1482
|
+
...a.qi,
|
|
1483
|
+
...a.qiQuarantined,
|
|
1484
|
+
...a.qiRetentionAudit,
|
|
1485
|
+
...a.candidates,
|
|
1486
|
+
...a.qiCompanions,
|
|
1487
|
+
...a.pe,
|
|
1488
|
+
...a.figmaSnapshots,
|
|
1489
|
+
...a.figmaManagement,
|
|
1490
|
+
...a.figmaSideFiles,
|
|
1491
|
+
]) {
|
|
1492
|
+
checkArtifactProtection(stateDir, path, findings);
|
|
1493
|
+
}
|
|
1494
|
+
checkQiTamperEvidence(stateDir, a.qi, findings);
|
|
1495
|
+
checkPromptEnhancementIntegrity(stateDir, a.pe, findings);
|
|
1496
|
+
checkFigmaSnapshotIntegrity(stateDir, a.figmaSnapshots, findings);
|
|
1497
|
+
if (a.figmaVault) checkFigmaVault(stateDir, a.figmaVault, findings);
|
|
1498
|
+
if (findings.length > 0) return fail(id, title, findings);
|
|
1499
|
+
return pass(id, title, [
|
|
1500
|
+
`${a.evidence.length} evidence manifest(s), ${a.toolResults.length} tool-result artifact(s), ${a.qi.length} QI manifest(s), ${a.qiQuarantined.length} quarantined QI manifest(s), ${a.qiRetentionAudit.length} QI retention audit file(s), ${a.candidates.length} candidate artifact(s), ${a.pe.length} PE manifest(s), ${a.figmaSnapshots.length} Figma snapshot record(s), ${a.figmaSideFiles.length} Figma side-file(s)` +
|
|
1501
|
+
`${a.figmaVault ? ", 1 sealed Figma token vault" : ""} are owner-only and redacted where text-bearing; QI/PE hashes and Figma image side-file hashes were verified`,
|
|
1502
|
+
]);
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
function collectRuntimeIntegrityResidue(stateDir) {
|
|
1506
|
+
const findings = [];
|
|
1507
|
+
walk(
|
|
1508
|
+
stateDir,
|
|
1509
|
+
"",
|
|
1510
|
+
(_abs, rel, name) => {
|
|
1511
|
+
if (/\.db(?:-wal|-shm)?\.corrupt\./u.test(name)) {
|
|
1512
|
+
findings.push(`${rel} is an unresolved quarantined SQLite artifact`);
|
|
1513
|
+
}
|
|
1514
|
+
if (name.endsWith(".diagnostic.json") && /\.db(?:-wal|-shm)?\.corrupt\./u.test(name)) {
|
|
1515
|
+
findings.push(`${rel} is a SQLite quarantine diagnostic record`);
|
|
1516
|
+
}
|
|
1517
|
+
if (name.includes(QI_QUARANTINED_MANIFEST_MARKER)) {
|
|
1518
|
+
findings.push(`${rel} is an unresolved quarantined QI manifest`);
|
|
1519
|
+
}
|
|
1520
|
+
if (rel.startsWith(`${RETIRED_CODE_INTELLIGENCE_SUBDIR}/`)) {
|
|
1521
|
+
findings.push(
|
|
1522
|
+
`${rel} is a retired plaintext code-intelligence index artifact (delete it; the index is in-process only)`,
|
|
1523
|
+
);
|
|
1524
|
+
}
|
|
1525
|
+
},
|
|
1526
|
+
() => undefined,
|
|
1527
|
+
);
|
|
1528
|
+
return findings;
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
function auditRuntimeIntegrity(stateDir) {
|
|
1532
|
+
const id = "runtime-integrity";
|
|
1533
|
+
const title = "Runtime store integrity residue";
|
|
1534
|
+
const findings = collectRuntimeIntegrityResidue(stateDir);
|
|
1535
|
+
if (findings.length > 0) return fail(id, title, findings);
|
|
1536
|
+
return pass(id, title, ["no unresolved DB or QI quarantine artifacts were found"]);
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
// Runs every confidentiality-class check over `stateDir`. The overall result is ok unless a class
|
|
1540
|
+
// fails; a skipped class (an absent store) never fails the audit.
|
|
1541
|
+
export function auditLocalState(stateDir) {
|
|
1542
|
+
if (!existsSync(stateDir) || !lstatSync(stateDir).isDirectory()) {
|
|
1543
|
+
return {
|
|
1544
|
+
ok: false,
|
|
1545
|
+
stateDir,
|
|
1546
|
+
classes: [fail("state-directory", "State directory", [`not a directory: ${stateDir}`])],
|
|
1547
|
+
};
|
|
1548
|
+
}
|
|
1549
|
+
const classes = [
|
|
1550
|
+
auditCredentials(stateDir),
|
|
1551
|
+
auditFileModes(stateDir),
|
|
1552
|
+
auditEditorHotExit(stateDir),
|
|
1553
|
+
auditMemoryEncryption(stateDir),
|
|
1554
|
+
auditKnowledgeEncryption(stateDir),
|
|
1555
|
+
auditEvidence(stateDir),
|
|
1556
|
+
auditRuntimeIntegrity(stateDir),
|
|
1557
|
+
];
|
|
1558
|
+
return { ok: classes.every((c) => c.status !== "fail"), stateDir, classes };
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
// Exported solely for direct, fast regression and canonical-parity tests — not part of the
|
|
1562
|
+
// module's operational surface.
|
|
1563
|
+
export const _testables = Object.freeze({
|
|
1564
|
+
isAtlassianConnectorProvider,
|
|
1565
|
+
isPlaceholderSafe,
|
|
1566
|
+
safeAtlassianDisplayName,
|
|
1567
|
+
});
|