@askexenow/exe-os 0.9.384 → 0.9.389
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/deploy/compose/.env.askexe-control-plane.example +6 -0
- package/deploy/compose/.env.customer.example +1 -1
- package/deploy/compose/.env.example +1 -1
- package/deploy/compose/docker-compose.yml +16 -0
- package/deploy/compose/generate-env.ts +1 -1
- package/deploy/compose/sso-edge/sso-redirect.conf +18 -3
- package/deploy/stack-manifests/v0.9.json +1160 -1
- package/dist/.dist-verified.json +3 -3
- package/dist/{active-agent-F5V4E4UL.js → active-agent-RZ24KSJN.js} +8 -6
- package/dist/{active-agent-YTBB4ZQM.js → active-agent-YWSWPIEA.js} +8 -6
- package/dist/{agent-defs-generator-7TFISIJQ.js → agent-defs-generator-GY3UBREJ.js} +8 -6
- package/dist/{agent-heartbeat-CQPGJIFF.js → agent-heartbeat-GUVUUQVM.js} +1 -1
- package/dist/{agent-loop-EZ7LDAGD.js → agent-loop-HPNCH3HK.js} +1 -1
- package/dist/{agentic-ontology-XVTUVV7W.js → agentic-ontology-RHYNXEKE.js} +1 -1
- package/dist/{artifact-backup-TF6YWQT2.js → artifact-backup-HGUFSIJH.js} +19 -6
- package/dist/{backfill-metadata-J6MXIDCW.js → backfill-metadata-XLFASEOD.js} +11 -9
- package/dist/{backup-verify-6DVBQMDP.js → backup-verify-TUQEICWA.js} +1 -1
- package/dist/{behavior-injection-XDA7ZCYN.js → behavior-injection-GXO7ERGN.js} +14 -12
- package/dist/{behavior-promotion-4VLQ7LXK.js → behavior-promotion-V63WIZ4N.js} +13 -11
- package/dist/{behaviors-SCCZP7RZ.js → behaviors-RMLDPLOF.js} +18 -11
- package/dist/bin/agentic-ontology-backfill.js +12 -10
- package/dist/bin/agentic-reflection-backfill.js +13 -11
- package/dist/bin/agentic-semantic-label.js +12 -10
- package/dist/bin/backfill-conversations.js +11 -9
- package/dist/bin/backfill-responses.js +11 -9
- package/dist/bin/backfill-vectors.js +13 -11
- package/dist/bin/bulk-sync-postgres.js +20 -18
- package/dist/bin/cc-doctor.js +15 -13
- package/dist/bin/cleanup-stale-review-tasks.js +44 -32
- package/dist/bin/cli.js +109 -30
- package/dist/bin/customer-readiness.js +55 -25
- package/dist/bin/deferred-daemon-restart.js +111 -108
- package/dist/bin/exe-actions.js +7 -1
- package/dist/bin/exe-agent-config.js +8 -6
- package/dist/bin/exe-agent.js +18 -16
- package/dist/bin/exe-assign.js +13 -11
- package/dist/bin/exe-boot.js +49 -47
- package/dist/bin/exe-call.js +9 -7
- package/dist/bin/exe-cicd.js +19 -8
- package/dist/bin/exe-cloud.js +59 -25
- package/dist/bin/exe-config-dump.js +8 -6
- package/dist/bin/exe-dispatch.js +23 -21
- package/dist/bin/exe-doctor.js +11 -8
- package/dist/bin/exe-export-behaviors.js +16 -14
- package/dist/bin/exe-forget.js +14 -12
- package/dist/bin/exe-gateway.js +12 -10
- package/dist/bin/exe-grant.js +6 -6
- package/dist/bin/exe-healthcheck.js +15 -13
- package/dist/bin/exe-heartbeat.js +28 -26
- package/dist/bin/exe-kill.js +28 -26
- package/dist/bin/exe-launch-agent.js +35 -33
- package/dist/bin/exe-mcp.js +9 -7
- package/dist/bin/exe-memory-reads.js +11 -9
- package/dist/bin/exe-new-employee.js +13 -11
- package/dist/bin/exe-os-mcp-proxy.js +9 -7
- package/dist/bin/exe-pending-messages.js +23 -21
- package/dist/bin/exe-pending-notifications.js +22 -20
- package/dist/bin/exe-pending-reviews.js +23 -21
- package/dist/bin/exe-preflight.js +1 -1
- package/dist/bin/exe-rename.js +9 -7
- package/dist/bin/exe-review.js +59 -55
- package/dist/bin/exe-search-quality.js +16 -3
- package/dist/bin/exe-search.js +13 -11
- package/dist/bin/exe-session-cleanup.js +29 -27
- package/dist/bin/exe-settings.js +22 -20
- package/dist/bin/exe-start-codex.js +23 -21
- package/dist/bin/exe-start-opencode.js +21 -19
- package/dist/bin/exe-status.js +24 -22
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +8 -6
- package/dist/bin/exe-verify-running-images.js +644 -17
- package/dist/bin/git-sweep.js +24 -22
- package/dist/bin/graph-backfill.js +12 -10
- package/dist/bin/graph-export.js +12 -10
- package/dist/bin/hooks-cli.js +4 -4
- package/dist/bin/import-history.js +16 -14
- package/dist/bin/install.js +113 -110
- package/dist/bin/intercom-check.js +5 -5
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +8 -6
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/pre-build-guard.js +55 -16
- package/dist/bin/pre-publish.js +1 -1
- package/dist/bin/prune-orphan-chunks.js +154 -28
- package/dist/bin/reconcile-backlog.js +5 -3
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/repair-document-chunks.js +11 -9
- package/dist/bin/scan-tasks.js +23 -21
- package/dist/bin/setup.js +3 -3
- package/dist/bin/shard-migrate.js +12 -10
- package/dist/bin/stack-update.js +622 -43
- package/dist/bin/verify-stack.js +2 -2
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{boot-generation-Q7LGQ3AO.js → boot-generation-VCQXVYGT.js} +7 -5
- package/dist/{boot-review-sections-G5774FR5.js → boot-review-sections-3QO6Q7MP.js} +21 -19
- package/dist/{branch-hygiene-44WLSOZR.js → branch-hygiene-DDXXI6ZA.js} +59 -21
- package/dist/bug-landed-reconciler-TQVNOUCU.js +353 -0
- package/dist/build-manifest.json +1269 -1194
- package/dist/{capability-cards-I3RHCF4F.js → capability-cards-XPDLT6LU.js} +6 -4
- package/dist/{capacity-monitor-7I7GDONU.js → capacity-monitor-N3AW242L.js} +23 -21
- package/dist/{catchup-brief-3T5PARIR.js → catchup-brief-3PKX7FUP.js} +29 -27
- package/dist/{chunk-C5ISP5FO.js → chunk-2BKJAOO4.js} +11 -1
- package/dist/{chunk-JJTPPAZY.js → chunk-2CUQHG6H.js} +1609 -1356
- package/dist/{chunk-HU3VD4MQ.js → chunk-2Q2GGYBX.js} +1 -1
- package/dist/{chunk-CHIUS5QB.js → chunk-36LMIOVU.js} +9 -9
- package/dist/{chunk-46VSBDUW.js → chunk-3DCBDG4T.js} +2 -2
- package/dist/{chunk-W3KPQE7H.js → chunk-3GL3E4TD.js} +3 -3
- package/dist/{chunk-GL47M7NY.js → chunk-3UD3OF3X.js} +202 -117
- package/dist/{chunk-WNBZJSQT.js → chunk-3VW5ZP2F.js} +1 -1
- package/dist/{chunk-JDDM6C57.js → chunk-3X74IQBU.js} +1 -1
- package/dist/{chunk-NVFNADTX.js → chunk-3ZL4MDQ6.js} +18 -4
- package/dist/{chunk-R5E7WNAC.js → chunk-4ESNDGMB.js} +3 -3
- package/dist/{chunk-CYCIX7AW.js → chunk-4FLLIQRQ.js} +2 -2
- package/dist/{chunk-3RGTLZNO.js → chunk-4GAKF7KR.js} +99 -74
- package/dist/{chunk-RVO5O5SR.js → chunk-4S3A52AV.js} +38 -10
- package/dist/{chunk-7J2ZQ4XN.js → chunk-4VQ3QR6B.js} +29 -28
- package/dist/{chunk-MROSARM5.js → chunk-5BJBTFFQ.js} +7 -1
- package/dist/chunk-5LQZABW5.js +6 -0
- package/dist/chunk-5ONMHTNI.js +236 -0
- package/dist/{chunk-APL7HUE3.js → chunk-5QQJUO3F.js} +200 -31
- package/dist/{chunk-UOPCVFVR.js → chunk-5RK75SWH.js} +205 -278
- package/dist/{chunk-T5FEAQES.js → chunk-5TYJYGS5.js} +1 -1
- package/dist/{chunk-P3QQ52QK.js → chunk-5U6EOTZV.js} +3 -3
- package/dist/{chunk-ALRHGEAJ.js → chunk-637FL62O.js} +1 -1
- package/dist/{chunk-PUBA5B4M.js → chunk-6L4VIYLZ.js} +33 -19
- package/dist/{chunk-VF2KRROX.js → chunk-754P2UXM.js} +1 -1
- package/dist/{chunk-CM7N5MBY.js → chunk-7FZG7WP4.js} +5 -5
- package/dist/{chunk-NYLJQ2M2.js → chunk-7NEBFB3L.js} +4 -4
- package/dist/{chunk-E7C2WNR5.js → chunk-AEIOFFFX.js} +5 -5
- package/dist/{chunk-VOVFUKEB.js → chunk-AIB2EWO2.js} +5 -5
- package/dist/{chunk-EGOEB42T.js → chunk-AP2C4OGS.js} +3 -3
- package/dist/{chunk-MPZ2AVNS.js → chunk-ATNV3BVZ.js} +1 -1
- package/dist/{chunk-F4BBMIPG.js → chunk-B4XJQBQB.js} +2 -2
- package/dist/{chunk-BPVFZ6Q4.js → chunk-B5EGDNG6.js} +2 -2
- package/dist/{chunk-AGC2V7JS.js → chunk-B6CBN6EF.js} +1 -1
- package/dist/{chunk-KTKIFXIP.js → chunk-B7FDRN7G.js} +1 -1
- package/dist/{chunk-C5HUMAA7.js → chunk-B7WVYLAQ.js} +67 -15
- package/dist/chunk-BGVP5RMT.js +185 -0
- package/dist/{chunk-FVLNNNH6.js → chunk-BNI4LIU5.js} +35 -4
- package/dist/{chunk-P4XLIPB7.js → chunk-BU5JRLZT.js} +1 -1
- package/dist/{chunk-PHUHIVD5.js → chunk-C6U7XWOC.js} +34 -5
- package/dist/chunk-C7GHNJPW.js +8 -0
- package/dist/{chunk-4AR5XKCH.js → chunk-CL2MU3OX.js} +1 -1
- package/dist/{chunk-ZPP63JSQ.js → chunk-CL3AB7Z2.js} +1 -1
- package/dist/{chunk-FHIFTSPL.js → chunk-CP7XUSOF.js} +8 -3
- package/dist/{chunk-3OX34OC3.js → chunk-CUDNRHHT.js} +30 -10
- package/dist/chunk-CYUUNIEL.js +21 -0
- package/dist/{chunk-P2UY34XE.js → chunk-D4C57S2H.js} +5 -5
- package/dist/{chunk-XSUALA32.js → chunk-DDYFNBYV.js} +3 -3
- package/dist/{chunk-LSNBTGW4.js → chunk-DPYZW42H.js} +1 -1
- package/dist/{chunk-FMIYFHLE.js → chunk-E2PRXEZK.js} +9 -3
- package/dist/{chunk-L63V25HS.js → chunk-E54SPUYJ.js} +3 -3
- package/dist/{chunk-DMUOTCDN.js → chunk-E5CKRHIZ.js} +1 -1
- package/dist/{chunk-BV2IET6B.js → chunk-EVMOKRBC.js} +15 -2
- package/dist/{chunk-YLFCH3VA.js → chunk-FDWI3T6I.js} +133 -31
- package/dist/{chunk-PWC3C5ME.js → chunk-FNJTCJGY.js} +4 -4
- package/dist/{chunk-TNS63ATU.js → chunk-FWRPDSO3.js} +350 -50
- package/dist/{chunk-JA3Y5TV6.js → chunk-GDLB6BPM.js} +141 -74
- package/dist/{chunk-IGJMS7C5.js → chunk-GOVGG7HU.js} +2 -2
- package/dist/{chunk-MB47DRF5.js → chunk-GP7CTIUK.js} +2 -2
- package/dist/{chunk-L5EPGGDP.js → chunk-GWAN2BDB.js} +4 -4
- package/dist/{chunk-YRQ26MNP.js → chunk-H3YF7X4J.js} +12 -5
- package/dist/{chunk-VLBHZ6TF.js → chunk-H6PLIFUE.js} +2 -2
- package/dist/{chunk-GSLFH4AI.js → chunk-HRNM3N4Y.js} +6 -15
- package/dist/chunk-IG2ISRTF.js +48 -0
- package/dist/{chunk-MWEIBVBS.js → chunk-IJCWBYA5.js} +14 -1
- package/dist/{chunk-NKEFYE4R.js → chunk-IPTUKX3N.js} +1 -1
- package/dist/{chunk-RB3J2WYQ.js → chunk-IVE7H6KA.js} +1 -1
- package/dist/{chunk-HA63SH5W.js → chunk-IWY2OGQG.js} +1 -1
- package/dist/{chunk-BQEZPRUC.js → chunk-IZWMWJZT.js} +64 -46
- package/dist/{chunk-AHESD3KW.js → chunk-J4UVI652.js} +1 -1
- package/dist/{chunk-PLII76NJ.js → chunk-JBUCA4OX.js} +33 -6
- package/dist/{chunk-2PZTMSMG.js → chunk-JOF4HQDF.js} +5 -5
- package/dist/{chunk-OBBO6EJR.js → chunk-JQN3QGSF.js} +1 -1
- package/dist/{chunk-P4PIZOL2.js → chunk-JWYIH5DR.js} +3 -3
- package/dist/{chunk-3XY57PKT.js → chunk-KZLKE7I3.js} +210 -48
- package/dist/{chunk-DYVLEMKS.js → chunk-L3GXMYBK.js} +1 -1
- package/dist/{chunk-72V3S44T.js → chunk-LUA4SLJY.js} +46 -19
- package/dist/{chunk-ZT4LFTUJ.js → chunk-LW3JCBXP.js} +20 -3
- package/dist/{chunk-YLB365YX.js → chunk-M5XHN4OM.js} +3 -3
- package/dist/{chunk-VHHX4UCP.js → chunk-MDTWARSF.js} +22 -93
- package/dist/{chunk-JFJP6ATJ.js → chunk-MWKXQSF6.js} +3 -2
- package/dist/{chunk-VJEJ7JNB.js → chunk-N32DVIKY.js} +1 -1
- package/dist/{chunk-MUCNYSJP.js → chunk-NRLJOV7M.js} +32 -4
- package/dist/{chunk-PL4CFSQ7.js → chunk-NSXJOSH7.js} +1 -1
- package/dist/{chunk-NF5FOSLD.js → chunk-NVTG66CK.js} +1 -1
- package/dist/chunk-O45GBJEH.js +1500 -0
- package/dist/{chunk-4AAMFWJT.js → chunk-OHZSTZXN.js} +4 -2
- package/dist/chunk-OSIS7ZQW.js +344 -0
- package/dist/{chunk-E3ZM32LF.js → chunk-P22VFGFK.js} +14 -5
- package/dist/{chunk-KILR4FBR.js → chunk-PAFLR7WD.js} +3 -3
- package/dist/{chunk-R3CZWFFC.js → chunk-PEYQ6MWO.js} +15 -3
- package/dist/{chunk-RDWIKDMY.js → chunk-PZR54BEI.js} +8 -20
- package/dist/{chunk-2FKU4ZEO.js → chunk-QDBKMEYY.js} +9 -9
- package/dist/{chunk-7UHZBVP3.js → chunk-QDVLVLXP.js} +97 -31
- package/dist/{chunk-PRDDPQLC.js → chunk-QLXEQRHD.js} +5 -5
- package/dist/{chunk-MUAWCFW6.js → chunk-QNPDXV5V.js} +5 -2
- package/dist/{chunk-LR5O2XWZ.js → chunk-QUZYLDNJ.js} +5 -5
- package/dist/chunk-RBQUXHYK.js +48 -0
- package/dist/{chunk-3SUPEE6H.js → chunk-RDMBSHGG.js} +3 -3
- package/dist/{chunk-I5XIW2BP.js → chunk-RGUM474V.js} +7 -7
- package/dist/{chunk-OAFENIHN.js → chunk-RJ67XAJU.js} +76 -28
- package/dist/{chunk-LFUBEHFW.js → chunk-RT57D7C4.js} +39 -1
- package/dist/{chunk-MKM6D7JM.js → chunk-RWG7DLOG.js} +42 -5
- package/dist/{chunk-P3UX5EH4.js → chunk-RWKAHHIX.js} +3 -3
- package/dist/{chunk-XEBKIWI7.js → chunk-RYNT3HB7.js} +12 -12
- package/dist/{chunk-EUGEFBGV.js → chunk-S2V272KJ.js} +3 -3
- package/dist/{chunk-W6BZ4UGA.js → chunk-SGYEM2PD.js} +1 -1
- package/dist/{chunk-VROK4X2L.js → chunk-SJP57MQM.js} +1 -1
- package/dist/{chunk-5MVKTNZP.js → chunk-SL4JWAMQ.js} +54 -4
- package/dist/{chunk-MOANZQXF.js → chunk-SLMKLEU6.js} +1 -1
- package/dist/{chunk-RZN2LEAK.js → chunk-SQA7XCYI.js} +3 -3
- package/dist/{chunk-4YNA3CM6.js → chunk-SSFS4NCH.js} +262 -56
- package/dist/{chunk-6FIC57PH.js → chunk-T4P2G3PO.js} +1 -1
- package/dist/{chunk-5U2IJBFV.js → chunk-TA3B4N24.js} +1 -1
- package/dist/{chunk-ZOTTYCP5.js → chunk-TEWWBVQP.js} +40 -4
- package/dist/{chunk-SDYWZRPN.js → chunk-TLSFGXXE.js} +1 -1
- package/dist/{chunk-L3VUW5M4.js → chunk-TQS2YHLB.js} +1 -1
- package/dist/{chunk-KXYKSLW4.js → chunk-TU4M757W.js} +399 -116
- package/dist/{chunk-MC4IM2CC.js → chunk-TYD4F4XU.js} +6 -6
- package/dist/{chunk-TKS5GMYA.js → chunk-U44Y7RC7.js} +2 -0
- package/dist/{chunk-B7AMNZTC.js → chunk-UKBPEEEQ.js} +2 -2
- package/dist/{chunk-ZBPZDADW.js → chunk-UWVXQEQQ.js} +467 -78
- package/dist/{chunk-P2VVMGMI.js → chunk-V4WH3FV7.js} +35 -16
- package/dist/{worktree-ownership-guard-O6JQF2CL.js → chunk-V6F4I2XY.js} +13 -14
- package/dist/{chunk-JFTUAV4J.js → chunk-VBKUESIW.js} +1 -1
- package/dist/{chunk-AZSTIAVL.js → chunk-VBPYYJPC.js} +1 -1
- package/dist/{chunk-LKTN22L6.js → chunk-VIP4LKLO.js} +57 -24
- package/dist/{chunk-L5CGXEZC.js → chunk-WAAGVFFN.js} +63 -71
- package/dist/{chunk-D3LXVAIQ.js → chunk-WC7AE3PT.js} +244 -103
- package/dist/{chunk-EOTZSAQL.js → chunk-WUCUDHKR.js} +1 -1
- package/dist/{chunk-VF3BZOZK.js → chunk-X7HZHKY4.js} +50 -3
- package/dist/{chunk-LFBLQE2P.js → chunk-XCAKYVKI.js} +1 -1
- package/dist/{chunk-UXN4BICC.js → chunk-XMX5J52Z.js} +1 -1
- package/dist/{chunk-6YDY6ZTD.js → chunk-XTCXGWTV.js} +9 -4
- package/dist/{chunk-XUZK23V7.js → chunk-XW2FW6LS.js} +2 -2
- package/dist/{chunk-CH7BUBP3.js → chunk-XWVHUDEK.js} +5 -4
- package/dist/{chunk-S26CV7BE.js → chunk-YA5LK6KB.js} +45 -8
- package/dist/{chunk-ELCRJGCH.js → chunk-YMRQIENV.js} +2 -2
- package/dist/{chunk-QNZ4562V.js → chunk-Z3LXWCB7.js} +1 -1
- package/dist/{chunk-EYMFVITZ.js → chunk-Z7I6NQMA.js} +2 -2
- package/dist/{chunk-6BJCDWSM.js → chunk-ZB4FS2EG.js} +1 -1
- package/dist/{chunk-ZAEUEDTN.js → chunk-ZD6FZ3WL.js} +1 -1
- package/dist/{chunk-FEU6QEEL.js → chunk-ZM6EZAVY.js} +1 -0
- package/dist/{chunk-2KY7WZZF.js → chunk-ZPA4R2UI.js} +1 -1
- package/dist/chunk-ZPPPHVSU.js +285 -0
- package/dist/{chunk-ELEGH4DX.js → chunk-ZUGQPYUY.js} +51 -4
- package/dist/{chunk-UX2EO653.js → chunk-ZZWFZ46U.js} +66 -8
- package/dist/{cleanup-graph-garbage-VQAJ2RBT.js → cleanup-graph-garbage-HFUD5ZQT.js} +12 -10
- package/dist/{cloud-sync-command-J7NEFUY7.js → cloud-sync-command-3JHJJKPN.js} +25 -3
- package/dist/{cloud-sync-db-init-KWEMNMGA.js → cloud-sync-db-init-2LHIQOSF.js} +1 -1
- package/dist/{cloud-sync-shutdown-P63AUTUI.js → cloud-sync-shutdown-ZXAXA3Z7.js} +6 -4
- package/dist/{cloud-sync-state-QF3TMMJ4.js → cloud-sync-state-VSQFGPP6.js} +1 -1
- package/dist/{co-activation-7IHRPBZN.js → co-activation-NX4EH4AP.js} +6 -4
- package/dist/{co-occurrence-R5AG4OAU.js → co-occurrence-5LBYCW3U.js} +10 -8
- package/dist/{consent-passphrase-5ZBDJ5G7.js → consent-passphrase-65W3DJIJ.js} +2 -2
- package/dist/{content-extractor-ZLXC6GNR.js → content-extractor-OGXETBOX.js} +2 -2
- package/dist/{conversation-entity-extractor-7FRKLLBD.js → conversation-entity-extractor-FQCOAH4F.js} +5 -4
- package/dist/conversations-retention-XTBFJBUM.js +166 -0
- package/dist/{crdt-sync-IFRZOEIS.js → crdt-sync-7TDUBTLH.js} +4 -4
- package/dist/{crm-webhook-L2S63ASV.js → crm-webhook-776JTY55.js} +2 -2
- package/dist/{cto-delegation-gate-3WU7OHX7.js → cto-delegation-gate-ZNUWVYCN.js} +25 -23
- package/dist/{daemon-orchestration-3VQYKLOR.js → daemon-orchestration-76BOFDEP.js} +30 -24
- package/dist/{doc-graph-extractor-YIR5E7OF.js → doc-graph-extractor-F724KZJX.js} +10 -8
- package/dist/{documents-QEHPTYIY.js → documents-Q24V4GRD.js} +13 -11
- package/dist/{dreaming-LNFE7DTN.js → dreaming-IY6NQTSP.js} +27 -25
- package/dist/{employee-boot-brief-ZTXDYNWM.js → employee-boot-brief-CCTXO5DQ.js} +35 -29
- package/dist/{entity-boost-R5N6JWXD.js → entity-boost-XGOB7HDM.js} +1 -1
- package/dist/{exe-drift-WYSJVZFO.js → exe-drift-NEPXLNGP.js} +7 -5
- package/dist/{exe-export-GOLNAEAV.js → exe-export-ZHJQFKR2.js} +14 -12
- package/dist/{exe-import-U4BSI6OH.js → exe-import-7SVNI4FW.js} +14 -12
- package/dist/{exe-key-V42G3NGO.js → exe-key-QJKU56WZ.js} +119 -108
- package/dist/{exe-org-U4GLQ6OP.js → exe-org-SJXHLV6K.js} +76 -51
- package/dist/{exe-snapshot-U7ONBYNY.js → exe-snapshot-EFWPXTXE.js} +45 -36
- package/dist/{fast-db-init-W3NGKAEU.js → fast-db-init-BQZOQNT3.js} +1 -1
- package/dist/{founder-context-ZSIBRVDM.js → founder-context-KG2ZAOXY.js} +2 -2
- package/dist/{founder-monitor-envelope-L3IWZLFY.js → founder-monitor-envelope-NYB5LLU4.js} +4 -4
- package/dist/gateway/index.js +20 -18
- package/dist/{gateway-client-DJFCVIPT.js → gateway-client-ODMUXUL3.js} +1 -1
- package/dist/{git-staleness-OF24QXFZ.js → git-staleness-OPGEAJA7.js} +6 -4
- package/dist/{global-procedures-WSIOWO43.js → global-procedures-3KXY4LL6.js} +8 -6
- package/dist/{graph-auto-extract-IEVVN3L3.js → graph-auto-extract-I7H2F5NJ.js} +10 -8
- package/dist/{graph-query-JDZWAVCU.js → graph-query-E7JBSNY5.js} +1 -1
- package/dist/{graph-rag-BKAD2XQA.js → graph-rag-H24CMFP2.js} +5 -4
- package/dist/{hook-integrity-TPWDGX2M.js → hook-integrity-PGQ3OX4S.js} +1 -1
- package/dist/{hook-prefetch-FD6VGJJA.js → hook-prefetch-7AZJER6Z.js} +23 -21
- package/dist/hook-registration-liveness-NGQRFKAA.js +11 -0
- package/dist/hooks/bug-report-worker.js +26 -24
- package/dist/hooks/codex-stop-task-finalizer.js +28 -26
- package/dist/hooks/commit-complete.js +26 -24
- package/dist/hooks/error-recall.js +16 -14
- package/dist/hooks/exe-heartbeat-hook.js +9 -7
- package/dist/hooks/ingest-worker.js +12 -10
- package/dist/hooks/ingest.js +22 -17
- package/dist/hooks/instructions-loaded.js +11 -9
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +10 -8
- package/dist/hooks/post-compact.js +9 -7
- package/dist/hooks/post-tool-combined.js +14 -14
- package/dist/hooks/pre-compact.js +26 -24
- package/dist/hooks/pre-tool-use.js +2 -2
- package/dist/hooks/prompt-submit.js +47 -41
- package/dist/hooks/session-end.js +38 -42
- package/dist/hooks/session-start.js +26 -18
- package/dist/hooks/stop.js +29 -27
- package/dist/hooks/subagent-stop.js +29 -27
- package/dist/hooks/summary-worker.js +32 -30
- package/dist/index.js +37 -35
- package/dist/{installer-OTI5SA43.js → installer-2ZS3LHCU.js} +12 -9
- package/dist/{installer-NMOBSEZ2.js → installer-NH3A3HWC.js} +14 -9
- package/dist/{installer-SRJGE4GU.js → installer-UJ73PGRD.js} +21 -9
- package/dist/{intercom-queue-4FFXCBHO.js → intercom-queue-OE25GJF2.js} +21 -19
- package/dist/lib/agent-config.js +2 -2
- package/dist/lib/cloud-sync.js +24 -18
- package/dist/lib/consolidation.js +13 -11
- package/dist/lib/crypto.js +3 -3
- package/dist/lib/database.js +6 -4
- package/dist/lib/db-backup.js +1 -1
- package/dist/lib/db-write-worker-client.js +3 -1
- package/dist/lib/db-write-worker.js +65 -89
- package/dist/lib/db.js +6 -4
- package/dist/lib/delivery-truth.js +5 -1
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +2 -2
- package/dist/lib/employee-templates.js +9 -7
- package/dist/lib/employees.js +6 -4
- package/dist/lib/exe-daemon.js +425 -314
- package/dist/lib/file-grep.js +15 -21
- package/dist/lib/hybrid-search.js +19 -13
- package/dist/lib/identity-templates.js +1 -1
- package/dist/lib/identity.js +6 -4
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/license.js +22 -6
- package/dist/lib/messaging.js +22 -20
- package/dist/lib/post-tool-memory.js +10 -8
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +7 -5
- package/dist/lib/runtime-table.js +1 -1
- package/dist/lib/schedules.js +12 -10
- package/dist/lib/session-registry.js +8 -6
- package/dist/lib/skill-learning.js +13 -11
- package/dist/lib/status-brief.js +2 -2
- package/dist/lib/store.js +17 -9
- package/dist/lib/task-router.js +7 -5
- package/dist/lib/tasks.js +23 -21
- package/dist/lib/tmux-routing.js +21 -19
- package/dist/lib/tmux-status.js +4 -1
- package/dist/lib/token-spend.js +7 -5
- package/dist/lib/ws-client.js +1 -1
- package/dist/{license-gate-R4JWTWM4.js → license-gate-XQ2KN5I5.js} +3 -3
- package/dist/{license-recheck-3MBJ4IJX.js → license-recheck-IIBKR2V5.js} +1 -1
- package/dist/{license-sync-BVSG3WMW.js → license-sync-76JVI2M5.js} +151 -8
- package/dist/{local-secret-inventory-JWNBHZZ4.js → local-secret-inventory-MJT7NJLY.js} +2 -2
- package/dist/{mailbox-inbox-MTAT4MXX.js → mailbox-inbox-BPZP4GIZ.js} +1 -1
- package/dist/maintenance-worker-54VZTFIK.js +371 -0
- package/dist/mcp/register-tools.js +110 -107
- package/dist/mcp/server.js +113 -110
- package/dist/mcp/tools/complete-reminder.js +8 -6
- package/dist/mcp/tools/create-reminder.js +8 -6
- package/dist/mcp/tools/create-task.js +26 -24
- package/dist/mcp/tools/deactivate-behavior.js +15 -13
- package/dist/mcp/tools/list-reminders.js +8 -6
- package/dist/mcp/tools/list-tasks.js +26 -24
- package/dist/mcp/tools/send-message.js +25 -23
- package/dist/mcp/tools/update-task.js +24 -22
- package/dist/{mcp-child-registry-TIZERM7O.js → mcp-child-registry-5VUG5ATZ.js} +1 -1
- package/dist/{mcp-http-config-VUMSFWFH.js → mcp-http-config-SKXESWHA.js} +9 -7
- package/dist/{mcp-session-identity-DZHWEJRV.js → mcp-session-identity-HYMLJXXA.js} +21 -19
- package/dist/{memory-cards-JVXTMSAT.js → memory-cards-PAZDUQ3B.js} +16 -32
- package/dist/{memory-graph-extractor-PPBJMYFJ.js → memory-graph-extractor-BC6QKBY6.js} +11 -9
- package/dist/{memory-poisoning-defense-K5Q74XQ4.js → memory-poisoning-defense-BRGIHF6J.js} +9 -7
- package/dist/{memory-pressure-watchdog-YMJH5CSA.js → memory-pressure-watchdog-HR6TPOMT.js} +22 -20
- package/dist/{memory-reflection-7BZWIHRE.js → memory-reflection-LO7VFBL3.js} +38 -59
- package/dist/memory-write-repository-J25USX63.js +16 -0
- package/dist/{monitor-grants-Q7X3MYQP.js → monitor-grants-YQTO6NWR.js} +3 -3
- package/dist/{monitor-identity-ZQB4IXEE.js → monitor-identity-POVTG76Y.js} +2 -2
- package/dist/{notification-ledger-XRAXL5OI.js → notification-ledger-KLD6GZTG.js} +22 -20
- package/dist/{notifications-JE3PX55X.js → notifications-3R6HNHDR.js} +21 -19
- package/dist/{orchestration-events-JCQ5F5IJ.js → orchestration-events-CHY3GOJD.js} +7 -5
- package/dist/{orchestrator-X65INDTR.js → orchestrator-GAL3HOAD.js} +23 -21
- package/dist/{org-brief-session-3PQ22UIX.js → org-brief-session-LQ2DBYVF.js} +17 -15
- package/dist/{org-consent-policy-VGELJ7K7.js → org-consent-policy-KFUP7QPG.js} +5 -5
- package/dist/{org-join-6TO5ZYUZ.js → org-join-MXZCIQWX.js} +8 -8
- package/dist/{org-key-admin-XHYVRRAZ.js → org-key-admin-4UK6QUT7.js} +9 -9
- package/dist/{org-key-pin-TTTYGTQL.js → org-key-pin-ZOX4OM3O.js} +3 -3
- package/dist/{org-membership-Y7T2BS57.js → org-membership-D5TPN45F.js} +4 -4
- package/dist/{org-partner-config-OP4NEUNF.js → org-partner-config-3FXSYPQA.js} +7 -7
- package/dist/{org-partner-runtime-YNVUNT2R.js → org-partner-runtime-TH3LMPII.js} +20 -16
- package/dist/{org-row-visibility-JBBXNYXD.js → org-row-visibility-Y5R33C5U.js} +1 -1
- package/dist/{pipeline-router-EIBB7QNG.js → pipeline-router-E2JZLDK6.js} +7 -5
- package/dist/{plan-limits-MEWXYLEN.js → plan-limits-NYI6R4IK.js} +9 -7
- package/dist/{platform-procedures-Z7ZGBJWN.js → platform-procedures-RTD5E3BD.js} +5 -3
- package/dist/{pre-tool-use-impl-C6KJY22W.js → pre-tool-use-impl-LT4FRXBP.js} +127 -83
- package/dist/{project-boot-VEYFCCSL.js → project-boot-LIMXQKAF.js} +25 -17
- package/dist/{project-name-UYORSNGE.js → project-name-V62GWALX.js} +7 -5
- package/dist/{projection-worker-WYFDWS57.js → projection-worker-KLE3IZQ2.js} +5 -2
- package/dist/{prospective-memory-E6XBQFJA.js → prospective-memory-HRN7JFT2.js} +6 -4
- package/dist/{push-notifications-M7YU63FY.js → push-notifications-XC6EQEXF.js} +22 -20
- package/dist/{reproject-worktree-memories-B5XMGJSD.js → reproject-worktree-memories-4CAVZSFE.js} +21 -19
- package/dist/{reranker-SRA4BR7N.js → reranker-2RU6IIX2.js} +1 -1
- package/dist/{retrieval-health-P2JPZUPV.js → retrieval-health-4Q5TOV2S.js} +1 -1
- package/dist/{review-polling-KQPN7IQE.js → review-polling-WOWIMBCL.js} +22 -20
- package/dist/runtime/index.js +30 -28
- package/dist/{session-events-6LDDKKY3.js → session-events-OPMS2C5F.js} +22 -20
- package/dist/{session-kill-telemetry-5DSRGWCL.js → session-kill-telemetry-3GWATSIX.js} +22 -20
- package/dist/{session-scope-XG5R3P3D.js → session-scope-TIRGR4MH.js} +21 -19
- package/dist/{setup-wizard-7QFLZIKT.js → setup-wizard-B2JBVGNH.js} +3 -3
- package/dist/{shard-manager-HHHHV2KZ.js → shard-manager-C7LYX6E4.js} +5 -1
- package/dist/{skill-refinement-I5RMAHSC.js → skill-refinement-FWQFYNBI.js} +7 -5
- package/dist/skill-retrieval-PPLFC5RY.js +166 -0
- package/dist/skill-usage-NDB67PU2.js +25 -0
- package/dist/{stack-generate-manifest-AKMZ3AUX.js → stack-generate-manifest-AXI55MEQ.js} +6 -6
- package/dist/{stack-promote-34CE2HHF.js → stack-promote-6N23OGZY.js} +6 -6
- package/dist/stack-release-2CXFYVWM.js +2770 -0
- package/dist/{stack-update-ZQQ5YYPJ.js → stack-update-U53FBVCQ.js} +13 -5
- package/dist/{steward-gate-AQJ6KT2C.js → steward-gate-TUA3QCN7.js} +7 -5
- package/dist/{subagent-brief-injection-3GU7YAWY.js → subagent-brief-injection-N52RWYFZ.js} +34 -32
- package/dist/{subagent-spawn-ledger-52I66CLW.js → subagent-spawn-ledger-OI23OT4I.js} +1 -1
- package/dist/support-bug-actions-XWCJI6S5.js +30 -0
- package/dist/support-inbox-MMVTCXRX.js +77 -0
- package/dist/{support-outbox-KNI3FR3G.js → support-outbox-2TG2UV6J.js} +2 -2
- package/dist/{task-enforcement-CAA6D2MH.js → task-enforcement-JDMBAAOY.js} +22 -20
- package/dist/{task-request-inbox-QBZVU66E.js → task-request-inbox-PKJCYKJV.js} +9 -5
- package/dist/{task-scope-NHXB4ZRN.js → task-scope-32HQEV6W.js} +27 -19
- package/dist/{tasks-crud-JHSWL5NM.js → tasks-crud-CYKUKS3F.js} +21 -19
- package/dist/{tasks-notify-7PBE4U7T.js → tasks-notify-YND5MKWJ.js} +22 -20
- package/dist/{tasks-review-PPPVEE62.js → tasks-review-CG2A5GM3.js} +23 -19
- package/dist/{telemetry-upload-YU2VRNHX.js → telemetry-upload-WLUMEFAB.js} +11 -9
- package/dist/{token-budget-QCMWKG3K.js → token-budget-3YHAY5LL.js} +7 -5
- package/dist/{tool-capability-index-7AWQAJRP.js → tool-capability-index-2ADOWH43.js} +2 -2
- package/dist/{tool-gates-5Q3RSQEG.js → tool-gates-7ENOOYMR.js} +5 -3
- package/dist/{tool-gates-QD26D2NE.js → tool-gates-EKJTLVGN.js} +1 -1
- package/dist/{tool-telemetry-LTOIC64I.js → tool-telemetry-VUP7S6HC.js} +1 -1
- package/dist/tui/App.js +59 -35
- package/dist/{tui-data-NDBXD6U7.js → tui-data-BOQTOW2G.js} +25 -23
- package/dist/{update-support-BMJM4NG7.js → update-support-WT3S3AQ4.js} +21 -21
- package/dist/{whatsapp-QQLDAHUX.js → whatsapp-OZGIF2EM.js} +2 -2
- package/dist/{wiki-acl-W6WDCVCP.js → wiki-acl-LTEQJVDA.js} +1 -1
- package/dist/{work-claims-6DM32MGO.js → work-claims-CMV2GWIW.js} +8 -6
- package/dist/{work-state-heartbeat-HG7D4AWJ.js → work-state-heartbeat-S45TXK4M.js} +1 -1
- package/dist/{worker-gate-FTMW7GBB.js → worker-gate-7Z6NMM3G.js} +1 -1
- package/dist/{workflow-engine-ZWC6CCXE.js → workflow-engine-ZSQDXZQ7.js} +2 -2
- package/dist/{worktree-EMQCPGFE.js → worktree-NMWDVT6N.js} +8 -6
- package/dist/worktree-ownership-guard-ZVIWJAOP.js +35 -0
- package/dist/{worktree-sweep-XVUJZBXV.js → worktree-sweep-Q62ZIT3U.js} +9 -7
- package/package.json +14 -8
- package/release-notes.json +7 -41
- package/src/commands/exe/afk.md +6 -0
- package/src/commands/exe/call.md +6 -0
- package/src/commands/exe/employee-heartbeat.md +6 -0
- package/src/commands/exe/intercom.md +6 -0
- package/src/commands/exe/kill.md +6 -0
- package/src/commands/exe/launch.md +6 -0
- package/src/commands/exe/logs.md +1 -1
- package/src/commands/exe/sessions.md +6 -0
- package/src/commands/exe/setup.md +7 -3
- package/src/commands/exe/status.md +6 -0
- package/src/commands/exe-reference.md +25 -36
- package/src/commands/exe.md +19 -28
- package/stack.release.json +11 -11
- package/dist/chunk-3B6FLNLV.js +0 -30
- package/dist/chunk-FXU7JOXK.js +0 -6
- package/dist/chunk-QFAFKEB5.js +0 -820
- package/dist/conversations-retention-C4BLKFEL.js +0 -54
- package/dist/stack-release-5PGWV5D4.js +0 -1607
- package/dist/support-inbox-NY5TB3FN.js +0 -51
- /package/dist/{chunk-U2D6PJ5T.js → chunk-65G7ZTGE.js} +0 -0
- /package/dist/{chunk-DN3ZR3UE.js → chunk-CP7Z35MJ.js} +0 -0
- /package/dist/{chunk-XDVOGDBC.js → chunk-KBBWALJV.js} +0 -0
- /package/dist/{chunk-JRIH6I7D.js → chunk-LZXYPTY4.js} +0 -0
- /package/dist/{chunk-GIRD7O5X.js → chunk-MCWEW2SG.js} +0 -0
- /package/dist/{chunk-TKAU7IJ2.js → chunk-MQHUJLCA.js} +0 -0
- /package/dist/{chunk-M4XY4JRK.js → chunk-O53LTOXK.js} +0 -0
- /package/dist/{chunk-DZN7SDY2.js → chunk-OSVTH3SG.js} +0 -0
- /package/dist/{chunk-AJK2PVQW.js → chunk-QXXEXGX3.js} +0 -0
- /package/dist/{chunk-AWWDKF22.js → chunk-SFWNTO2F.js} +0 -0
- /package/dist/{chunk-2Q2CD6CD.js → chunk-WC5HF2FN.js} +0 -0
- /package/dist/{core-memory-O6D5UC3T.js → core-memory-MMMW3TF3.js} +0 -0
- /package/dist/{memory-isolation-EBFFC6HF.js → memory-isolation-67ACKQ2M.js} +0 -0
- /package/dist/{oauth-server-ZKBUHDFI.js → oauth-server-OILIKR7D.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/lib/secret-redaction.ts
|
|
2
|
-
import {
|
|
2
|
+
import { createHash } from "crypto";
|
|
3
|
+
import { wordlists } from "bip39";
|
|
3
4
|
var URL_CREDENTIAL_PATTERNS = /* @__PURE__ */ new Set(["url_credentials"]);
|
|
4
5
|
var SECRET_PATTERNS = [
|
|
5
6
|
// Any credentialed URL: scheme://user:pass@host. Generalized from the old
|
|
@@ -266,12 +267,59 @@ var SECRET_PATTERNS = [
|
|
|
266
267
|
];
|
|
267
268
|
var REDACTION_CLASS_NAMES = [...new Set(SECRET_PATTERNS.map((p) => p.name)), "recovery_phrase"];
|
|
268
269
|
var MNEMONIC_LENGTHS = [24, 21, 18, 15, 12];
|
|
269
|
-
var
|
|
270
|
+
var BIP39_ENGLISH = (() => {
|
|
271
|
+
const list = wordlists.english;
|
|
272
|
+
if (!Array.isArray(list) || list.length !== 2048) {
|
|
273
|
+
throw new Error(
|
|
274
|
+
"bip39 English wordlist is unavailable or not 2048 words \u2014 recovery-phrase redaction cannot run, and running without it would silently ship phrases unredacted."
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
return list;
|
|
278
|
+
})();
|
|
279
|
+
var BIP39_WORDS = new Set(BIP39_ENGLISH);
|
|
270
280
|
var WORD_TOKEN_RE = /\b[A-Za-z]{3,8}\b/g;
|
|
281
|
+
var BIP39_INDEX = new Map(
|
|
282
|
+
BIP39_ENGLISH.map((w, i) => [w, i])
|
|
283
|
+
);
|
|
284
|
+
var ENTROPY_BYTES_BY_LENGTH = new Map(
|
|
285
|
+
MNEMONIC_LENGTHS.map((len) => [len, len * 11 * 32 / 33 / 8])
|
|
286
|
+
);
|
|
287
|
+
function isValidMnemonicWindow(words) {
|
|
288
|
+
const entropyBytes = ENTROPY_BYTES_BY_LENGTH.get(words.length);
|
|
289
|
+
if (entropyBytes === void 0) return false;
|
|
290
|
+
const checksumBits = entropyBytes / 4;
|
|
291
|
+
const entropy = new Uint8Array(entropyBytes);
|
|
292
|
+
let acc = 0;
|
|
293
|
+
let accBits = 0;
|
|
294
|
+
let written = 0;
|
|
295
|
+
let checksum = -1;
|
|
296
|
+
for (const word of words) {
|
|
297
|
+
const index = BIP39_INDEX.get(word);
|
|
298
|
+
if (index === void 0) return false;
|
|
299
|
+
acc = acc << 11 | index;
|
|
300
|
+
accBits += 11;
|
|
301
|
+
while (accBits >= 8) {
|
|
302
|
+
const byte = acc >>> accBits - 8 & 255;
|
|
303
|
+
accBits -= 8;
|
|
304
|
+
acc &= (1 << accBits) - 1;
|
|
305
|
+
if (written < entropyBytes) entropy[written++] = byte;
|
|
306
|
+
else checksum = byte;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
if (accBits > 0) checksum = acc & (1 << accBits) - 1;
|
|
310
|
+
if (written !== entropyBytes || checksum < 0) return false;
|
|
311
|
+
const expected = createHash("sha256").update(entropy).digest()[0] >>> 8 - checksumBits;
|
|
312
|
+
return checksum === expected;
|
|
313
|
+
}
|
|
271
314
|
var SCANNING_PATTERNS = [
|
|
272
315
|
...SECRET_PATTERNS.map(({ name, pattern }) => ({ name, pattern })),
|
|
273
316
|
{ name: "recovery_phrase/word_token", pattern: WORD_TOKEN_RE }
|
|
274
317
|
];
|
|
318
|
+
function windowWords(segment, start, len) {
|
|
319
|
+
const out = new Array(len);
|
|
320
|
+
for (let k = 0; k < len; k++) out[k] = segment[start + k].lower;
|
|
321
|
+
return out;
|
|
322
|
+
}
|
|
275
323
|
function redactMnemonics(input) {
|
|
276
324
|
const tokens = [];
|
|
277
325
|
let m;
|
|
@@ -291,8 +339,7 @@ function redactMnemonics(input) {
|
|
|
291
339
|
let matchedLen = 0;
|
|
292
340
|
for (const len of MNEMONIC_LENGTHS) {
|
|
293
341
|
if (i + len > segment.length) continue;
|
|
294
|
-
|
|
295
|
-
if (validateMnemonic(phrase)) {
|
|
342
|
+
if (isValidMnemonicWindow(windowWords(segment, i, len))) {
|
|
296
343
|
matchedLen = len;
|
|
297
344
|
break;
|
|
298
345
|
}
|
|
@@ -6,14 +6,60 @@ import {
|
|
|
6
6
|
baseAgentName,
|
|
7
7
|
getEmployee,
|
|
8
8
|
loadEmployeesSync
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3UD3OF3X.js";
|
|
10
10
|
|
|
11
11
|
// src/lib/project-name.ts
|
|
12
12
|
import { execSync } from "child_process";
|
|
13
|
-
import { readdirSync, readFileSync } from "fs";
|
|
13
|
+
import { readdirSync, readFileSync, realpathSync, statSync } from "fs";
|
|
14
14
|
import path from "path";
|
|
15
15
|
var _cached = null;
|
|
16
16
|
var _cachedCwd = null;
|
|
17
|
+
function repoRootFromDisk(startDir) {
|
|
18
|
+
let dir;
|
|
19
|
+
try {
|
|
20
|
+
dir = realpathSync.native(startDir);
|
|
21
|
+
} catch {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
for (; ; ) {
|
|
25
|
+
const dotGit = path.join(dir, ".git");
|
|
26
|
+
let isDir = false;
|
|
27
|
+
let isFile = false;
|
|
28
|
+
try {
|
|
29
|
+
const st = statSync(dotGit);
|
|
30
|
+
isDir = st.isDirectory();
|
|
31
|
+
isFile = st.isFile();
|
|
32
|
+
} catch {
|
|
33
|
+
}
|
|
34
|
+
if (isDir) return dir;
|
|
35
|
+
if (isFile) {
|
|
36
|
+
try {
|
|
37
|
+
const m = /^gitdir:\s*(.+)$/m.exec(readFileSync(dotGit, "utf8"));
|
|
38
|
+
if (m) {
|
|
39
|
+
const target = m[1].trim();
|
|
40
|
+
const gitDir = realpathSync.native(path.isAbsolute(target) ? target : `${dir}/${target}`);
|
|
41
|
+
if (path.basename(path.dirname(gitDir)) === "worktrees") {
|
|
42
|
+
return path.dirname(path.dirname(path.dirname(gitDir)));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
} catch {
|
|
46
|
+
}
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
if (statSync(path.join(dir, "HEAD")).isFile() && statSync(path.join(dir, "objects")).isDirectory() && statSync(path.join(dir, "refs")).isDirectory()) return null;
|
|
51
|
+
} catch {
|
|
52
|
+
}
|
|
53
|
+
const parent = path.dirname(dir);
|
|
54
|
+
if (parent === dir) return null;
|
|
55
|
+
dir = parent;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
function isProbeExpiry(err) {
|
|
59
|
+
const e = err;
|
|
60
|
+
if (!e) return false;
|
|
61
|
+
return e.killed === true || e.signal === "SIGTERM" || e.code === "ETIMEDOUT";
|
|
62
|
+
}
|
|
17
63
|
function getProjectName(cwd) {
|
|
18
64
|
const override = process.env.EXE_PROJECT_NAME?.trim();
|
|
19
65
|
if (override) return override;
|
|
@@ -25,7 +71,16 @@ function getProjectName(cwd) {
|
|
|
25
71
|
}
|
|
26
72
|
}
|
|
27
73
|
const dir = cwd ?? process.cwd();
|
|
28
|
-
|
|
74
|
+
const gitOverrides = [process.env.GIT_DIR, process.env.GIT_COMMON_DIR, process.env.GIT_WORK_TREE];
|
|
75
|
+
const cacheKey = JSON.stringify([dir, ...gitOverrides]);
|
|
76
|
+
if (_cached && _cachedCwd === cacheKey) return _cached;
|
|
77
|
+
const fromDisk = gitOverrides.some(Boolean) ? null : repoRootFromDisk(dir);
|
|
78
|
+
if (fromDisk) {
|
|
79
|
+
_cached = path.basename(fromDisk);
|
|
80
|
+
_cachedCwd = cacheKey;
|
|
81
|
+
return _cached;
|
|
82
|
+
}
|
|
83
|
+
let probeExpired = false;
|
|
29
84
|
try {
|
|
30
85
|
let repoRoot;
|
|
31
86
|
try {
|
|
@@ -36,7 +91,8 @@ function getProjectName(cwd) {
|
|
|
36
91
|
stdio: ["pipe", "pipe", "pipe"]
|
|
37
92
|
}).trim();
|
|
38
93
|
repoRoot = path.dirname(gitCommonDir);
|
|
39
|
-
} catch {
|
|
94
|
+
} catch (first) {
|
|
95
|
+
if (isProbeExpiry(first)) probeExpired = true;
|
|
40
96
|
repoRoot = execSync("git rev-parse --show-toplevel", {
|
|
41
97
|
cwd: dir,
|
|
42
98
|
encoding: "utf8",
|
|
@@ -45,11 +101,13 @@ function getProjectName(cwd) {
|
|
|
45
101
|
}).trim();
|
|
46
102
|
}
|
|
47
103
|
_cached = path.basename(repoRoot);
|
|
48
|
-
_cachedCwd =
|
|
104
|
+
_cachedCwd = cacheKey;
|
|
49
105
|
return _cached;
|
|
50
|
-
} catch {
|
|
51
|
-
|
|
52
|
-
|
|
106
|
+
} catch (err) {
|
|
107
|
+
const guess = path.basename(dir);
|
|
108
|
+
if (probeExpired || isProbeExpiry(err)) return guess;
|
|
109
|
+
_cached = guess;
|
|
110
|
+
_cachedCwd = cacheKey;
|
|
53
111
|
return _cached;
|
|
54
112
|
}
|
|
55
113
|
}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import "./chunk-
|
|
2
|
+
import "./chunk-JWYIH5DR.js";
|
|
3
3
|
import {
|
|
4
4
|
isGarbageEntity
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3DCBDG4T.js";
|
|
6
6
|
import "./chunk-Z6BZQHP5.js";
|
|
7
7
|
import "./chunk-GUMRIUI5.js";
|
|
8
8
|
import "./chunk-VGMACSEV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SFWNTO2F.js";
|
|
10
10
|
import "./chunk-CHCA3ZM2.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-MDTWARSF.js";
|
|
12
12
|
import {
|
|
13
13
|
fastDbInit
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-KBBWALJV.js";
|
|
15
15
|
import "./chunk-5MOYSU5A.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-ZUGQPYUY.js";
|
|
17
17
|
import "./chunk-76CJBM36.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3UD3OF3X.js";
|
|
21
21
|
import "./chunk-BBMTVAE3.js";
|
|
22
22
|
import "./chunk-TKDITWDN.js";
|
|
23
23
|
import "./chunk-5YEUPUV4.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-LUA4SLJY.js";
|
|
25
|
+
import "./chunk-5ONMHTNI.js";
|
|
26
|
+
import "./chunk-RBQUXHYK.js";
|
|
25
27
|
import "./chunk-YYB5PMTK.js";
|
|
26
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-WAAGVFFN.js";
|
|
27
29
|
import "./chunk-QH5ZQ5SJ.js";
|
|
28
30
|
import "./chunk-ZQEJ4IX2.js";
|
|
29
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-C7GHNJPW.js";
|
|
30
32
|
import "./chunk-MMS2HBRT.js";
|
|
31
33
|
import "./chunk-RH4AH3YB.js";
|
|
32
34
|
import {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CLOUD_SYNC_EXIT_PARTIAL
|
|
3
|
+
} from "./chunk-5LQZABW5.js";
|
|
1
4
|
import "./chunk-MLKGABMK.js";
|
|
2
5
|
|
|
3
6
|
// src/bin/cloud-sync-command.ts
|
|
@@ -23,7 +26,7 @@ async function runCloudSyncCli() {
|
|
|
23
26
|
const { getMasterKey } = await import("./lib/keychain.js");
|
|
24
27
|
const { initSyncCrypto } = await import("./lib/crypto.js");
|
|
25
28
|
const { assertCloudSyncReachable, withTimeout } = await import("./bin/exe-cloud.js");
|
|
26
|
-
const { runCloudSyncShutdown } = await import("./cloud-sync-shutdown-
|
|
29
|
+
const { runCloudSyncShutdown } = await import("./cloud-sync-shutdown-ZXAXA3Z7.js");
|
|
27
30
|
const { disconnectClient } = await import("./lib/exe-daemon-client.js");
|
|
28
31
|
let shuttingDown = false;
|
|
29
32
|
const handleShutdown = (signal) => {
|
|
@@ -48,7 +51,7 @@ async function runCloudSyncCli() {
|
|
|
48
51
|
const { initPostgresOnlyDatabase } = await import("./lib/database.js");
|
|
49
52
|
await initPostgresOnlyDatabase();
|
|
50
53
|
} else {
|
|
51
|
-
const { initCloudSyncDatabase } = await import("./cloud-sync-db-init-
|
|
54
|
+
const { initCloudSyncDatabase } = await import("./cloud-sync-db-init-2LHIQOSF.js");
|
|
52
55
|
await initCloudSyncDatabase();
|
|
53
56
|
}
|
|
54
57
|
const masterKey = await getMasterKey();
|
|
@@ -59,9 +62,19 @@ async function runCloudSyncCli() {
|
|
|
59
62
|
exitCode = 1;
|
|
60
63
|
return;
|
|
61
64
|
}
|
|
65
|
+
if (!config.cloud.apiKey) {
|
|
66
|
+
console.error("Cloud sync is configured but its key is not verified yet \u2014 nothing to sync with.");
|
|
67
|
+
console.error("It activates automatically on the next successful license check.");
|
|
68
|
+
exitCode = 1;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
62
71
|
console.log("Syncing with Exe Cloud now... (Normally this runs automatically in the background.)");
|
|
63
72
|
const syncTimeoutMs = Number(process.env.EXE_CLOUD_SYNC_TIMEOUT_MS ?? 6e5);
|
|
64
|
-
const result = await withTimeout(
|
|
73
|
+
const result = await withTimeout(
|
|
74
|
+
cloudSync({ ...config.cloud, apiKey: config.cloud.apiKey }),
|
|
75
|
+
syncTimeoutMs,
|
|
76
|
+
"Cloud sync"
|
|
77
|
+
);
|
|
65
78
|
console.log("");
|
|
66
79
|
console.log(` Active memories: ${result.totalMemories} (\u2191 ${result.pushed} syncable rows pushed, \u2193 ${result.pulled} pulled)`);
|
|
67
80
|
console.log(` Behaviors: ${result.behaviors.pushed} total (\u2193 ${result.behaviors.pulled} pulled)`);
|
|
@@ -86,6 +99,14 @@ Run it again (or let the background sync continue) until it reports complete.`
|
|
|
86
99
|
The memory push failed (network error or version conflict). Run it again until it reports complete.\x1B[0m`
|
|
87
100
|
);
|
|
88
101
|
exitCode = 1;
|
|
102
|
+
} else if (result.pullIncomplete) {
|
|
103
|
+
console.log(
|
|
104
|
+
`
|
|
105
|
+
\x1B[33mSync PARTIAL \u2014 remote memory history was not read to the end, so the memory push was skipped. (${elapsedDisplay})
|
|
106
|
+
Why: ${result.pullPartialReason ?? "unknown"}
|
|
107
|
+
Run it again (Terminal \`exe-os cloud sync\`) until it reports complete.\x1B[0m`
|
|
108
|
+
);
|
|
109
|
+
exitCode = CLOUD_SYNC_EXIT_PARTIAL;
|
|
89
110
|
} else {
|
|
90
111
|
console.log(`
|
|
91
112
|
\x1B[32mSync complete.\x1B[0m (${elapsedDisplay})`);
|
|
@@ -109,5 +130,6 @@ The memory push failed (network error or version conflict). Run it again until i
|
|
|
109
130
|
}
|
|
110
131
|
}
|
|
111
132
|
export {
|
|
133
|
+
CLOUD_SYNC_EXIT_PARTIAL,
|
|
112
134
|
runCloudSyncCli
|
|
113
135
|
};
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
releaseDbLock
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3UD3OF3X.js";
|
|
4
4
|
import "./chunk-BBMTVAE3.js";
|
|
5
5
|
import "./chunk-TKDITWDN.js";
|
|
6
6
|
import "./chunk-5YEUPUV4.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-LUA4SLJY.js";
|
|
8
|
+
import "./chunk-5ONMHTNI.js";
|
|
9
|
+
import "./chunk-RBQUXHYK.js";
|
|
8
10
|
import "./chunk-YYB5PMTK.js";
|
|
9
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-WAAGVFFN.js";
|
|
10
12
|
import "./chunk-QH5ZQ5SJ.js";
|
|
11
13
|
import "./chunk-ZQEJ4IX2.js";
|
|
12
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-C7GHNJPW.js";
|
|
13
15
|
import "./chunk-MMS2HBRT.js";
|
|
14
16
|
import "./chunk-RH4AH3YB.js";
|
|
15
17
|
import "./chunk-HSGBZSCA.js";
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3UD3OF3X.js";
|
|
4
4
|
import "./chunk-BBMTVAE3.js";
|
|
5
5
|
import "./chunk-TKDITWDN.js";
|
|
6
6
|
import "./chunk-5YEUPUV4.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-LUA4SLJY.js";
|
|
8
|
+
import "./chunk-5ONMHTNI.js";
|
|
9
|
+
import "./chunk-RBQUXHYK.js";
|
|
8
10
|
import "./chunk-YYB5PMTK.js";
|
|
9
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-WAAGVFFN.js";
|
|
10
12
|
import "./chunk-QH5ZQ5SJ.js";
|
|
11
13
|
import "./chunk-ZQEJ4IX2.js";
|
|
12
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-C7GHNJPW.js";
|
|
13
15
|
import "./chunk-MMS2HBRT.js";
|
|
14
16
|
import "./chunk-RH4AH3YB.js";
|
|
15
17
|
import "./chunk-HSGBZSCA.js";
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
2
|
entityId,
|
|
3
3
|
normalizeEntityName
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3DCBDG4T.js";
|
|
5
5
|
import "./chunk-Z6BZQHP5.js";
|
|
6
6
|
import "./chunk-GUMRIUI5.js";
|
|
7
7
|
import "./chunk-VGMACSEV.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-SFWNTO2F.js";
|
|
9
9
|
import "./chunk-CHCA3ZM2.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-MDTWARSF.js";
|
|
11
11
|
import "./chunk-5MOYSU5A.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-ZUGQPYUY.js";
|
|
13
13
|
import "./chunk-76CJBM36.js";
|
|
14
14
|
import {
|
|
15
15
|
getClient
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3UD3OF3X.js";
|
|
17
17
|
import "./chunk-BBMTVAE3.js";
|
|
18
18
|
import "./chunk-TKDITWDN.js";
|
|
19
19
|
import "./chunk-5YEUPUV4.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-LUA4SLJY.js";
|
|
21
|
+
import "./chunk-5ONMHTNI.js";
|
|
22
|
+
import "./chunk-RBQUXHYK.js";
|
|
21
23
|
import "./chunk-YYB5PMTK.js";
|
|
22
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-WAAGVFFN.js";
|
|
23
25
|
import "./chunk-QH5ZQ5SJ.js";
|
|
24
26
|
import "./chunk-ZQEJ4IX2.js";
|
|
25
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-C7GHNJPW.js";
|
|
26
28
|
import "./chunk-MMS2HBRT.js";
|
|
27
29
|
import "./chunk-RH4AH3YB.js";
|
|
28
30
|
import "./chunk-HSGBZSCA.js";
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
consentPassphraseIsSet,
|
|
8
8
|
setConsentPassphrase,
|
|
9
9
|
verifyConsentPassphrase
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-T4P2G3PO.js";
|
|
11
|
+
import "./chunk-TA3B4N24.js";
|
|
12
12
|
import "./chunk-JKKZGDLP.js";
|
|
13
13
|
import "./chunk-MLKGABMK.js";
|
|
14
14
|
export {
|
package/dist/{conversation-entity-extractor-7FRKLLBD.js → conversation-entity-extractor-FQCOAH4F.js}
RENAMED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EXTRACT_TOOL
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3DCBDG4T.js";
|
|
4
4
|
import "./chunk-Z6BZQHP5.js";
|
|
5
5
|
import "./chunk-GUMRIUI5.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveAnthropicAuth
|
|
8
8
|
} from "./chunk-VGMACSEV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-SFWNTO2F.js";
|
|
10
10
|
import "./chunk-CHCA3ZM2.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-MDTWARSF.js";
|
|
12
12
|
import "./chunk-5MOYSU5A.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-ZUGQPYUY.js";
|
|
14
14
|
import "./chunk-76CJBM36.js";
|
|
15
|
+
import "./chunk-RBQUXHYK.js";
|
|
15
16
|
import "./chunk-MLKGABMK.js";
|
|
16
17
|
|
|
17
18
|
// src/lib/conversation-entity-extractor.ts
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import "./chunk-MLKGABMK.js";
|
|
2
|
+
|
|
3
|
+
// src/lib/conversations-retention.ts
|
|
4
|
+
var DEFAULT_CONVERSATIONS_RETENTION_DAYS = 90;
|
|
5
|
+
var DEFAULT_CONVERSATIONS_RETENTION_MODE = "archive";
|
|
6
|
+
function parseConversationsRetentionMode(raw) {
|
|
7
|
+
return String(raw ?? "").trim().toLowerCase() === "purge" ? "purge" : "archive";
|
|
8
|
+
}
|
|
9
|
+
function isMissingTableError(e, table) {
|
|
10
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
11
|
+
return new RegExp(`no such table:\\s*(?:main\\.|temp\\.)?${table}(?![\\w])`, "i").test(message);
|
|
12
|
+
}
|
|
13
|
+
async function columnsOf(client, table) {
|
|
14
|
+
const info = await client.execute(`PRAGMA table_info(${table})`);
|
|
15
|
+
return info.rows.map((r) => String(r.name));
|
|
16
|
+
}
|
|
17
|
+
async function ensureArchiveTable(client) {
|
|
18
|
+
await client.execute(
|
|
19
|
+
`CREATE TABLE IF NOT EXISTS conversations_archive AS
|
|
20
|
+
SELECT *, datetime('now') AS archived_at FROM conversations WHERE 0`
|
|
21
|
+
);
|
|
22
|
+
await client.execute(
|
|
23
|
+
`CREATE UNIQUE INDEX IF NOT EXISTS idx_conversations_archive_id
|
|
24
|
+
ON conversations_archive(id)`
|
|
25
|
+
);
|
|
26
|
+
await client.execute(
|
|
27
|
+
`CREATE INDEX IF NOT EXISTS idx_conversations_archive_archived_at
|
|
28
|
+
ON conversations_archive(archived_at)`
|
|
29
|
+
);
|
|
30
|
+
await client.execute(
|
|
31
|
+
`CREATE INDEX IF NOT EXISTS idx_conversations_archive_ingested_at
|
|
32
|
+
ON conversations_archive(ingested_at)`
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
async function sweepExpiredConversations(client, retentionDays = DEFAULT_CONVERSATIONS_RETENTION_DAYS, mode = DEFAULT_CONVERSATIONS_RETENTION_MODE) {
|
|
36
|
+
const days = Number.isFinite(retentionDays) && retentionDays > 0 ? Math.floor(retentionDays) : DEFAULT_CONVERSATIONS_RETENTION_DAYS;
|
|
37
|
+
const cutoff = `-${days} days`;
|
|
38
|
+
const BATCH_SIZE = 500;
|
|
39
|
+
const MAX_BATCHES = 200;
|
|
40
|
+
const result = { removed: 0, archived: 0, purged: 0, mode };
|
|
41
|
+
let copyCols = [];
|
|
42
|
+
if (mode === "archive") {
|
|
43
|
+
await ensureArchiveTable(client);
|
|
44
|
+
const liveCols = await columnsOf(client, "conversations");
|
|
45
|
+
const archiveCols = new Set(await columnsOf(client, "conversations_archive"));
|
|
46
|
+
copyCols = liveCols.filter((c) => archiveCols.has(c));
|
|
47
|
+
if (!copyCols.includes("id")) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
"conversations_archive is missing the id column \u2014 refusing to sweep (would delete unarchivable content)"
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
for (let i = 0; i < MAX_BATCHES; i++) {
|
|
54
|
+
const batch = await client.execute({
|
|
55
|
+
sql: `SELECT id FROM conversations
|
|
56
|
+
WHERE ingested_at < datetime('now', ?)
|
|
57
|
+
ORDER BY ingested_at
|
|
58
|
+
LIMIT ?`,
|
|
59
|
+
args: [cutoff, BATCH_SIZE]
|
|
60
|
+
});
|
|
61
|
+
const batchIds = batch.rows.map((r) => String(r.id));
|
|
62
|
+
if (batchIds.length === 0) break;
|
|
63
|
+
const placeholders = batchIds.map(() => "?").join(",");
|
|
64
|
+
if (mode === "archive") {
|
|
65
|
+
const cols = copyCols.join(", ");
|
|
66
|
+
await client.batch(
|
|
67
|
+
[
|
|
68
|
+
{
|
|
69
|
+
sql: `INSERT OR REPLACE INTO conversations_archive (${cols}, archived_at)
|
|
70
|
+
SELECT ${cols}, datetime('now') FROM conversations WHERE id IN (${placeholders})`,
|
|
71
|
+
args: batchIds
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
sql: `DELETE FROM conversations WHERE id IN (${placeholders})
|
|
75
|
+
AND id IN (SELECT id FROM conversations_archive)`,
|
|
76
|
+
args: batchIds
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"write"
|
|
80
|
+
);
|
|
81
|
+
const check = await client.execute({
|
|
82
|
+
sql: `SELECT COUNT(*) AS cnt FROM conversations_archive WHERE id IN (${placeholders})`,
|
|
83
|
+
args: batchIds
|
|
84
|
+
});
|
|
85
|
+
const archivedCount = Number(check.rows[0]?.cnt ?? 0);
|
|
86
|
+
if (archivedCount < batchIds.length) {
|
|
87
|
+
throw new Error(
|
|
88
|
+
`conversations archive incomplete (${archivedCount}/${batchIds.length}) \u2014 aborting sweep with content intact`
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
result.archived += batchIds.length;
|
|
92
|
+
} else {
|
|
93
|
+
await client.batch(
|
|
94
|
+
[
|
|
95
|
+
{
|
|
96
|
+
sql: `INSERT OR IGNORE INTO conversation_deletions (id, deleted_at)
|
|
97
|
+
SELECT id, datetime('now') FROM conversations WHERE id IN (${placeholders})`,
|
|
98
|
+
args: batchIds
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
sql: `DELETE FROM conversations WHERE id IN (${placeholders})`,
|
|
102
|
+
args: batchIds
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"write"
|
|
106
|
+
);
|
|
107
|
+
result.purged += batchIds.length;
|
|
108
|
+
}
|
|
109
|
+
result.removed += batchIds.length;
|
|
110
|
+
if (batchIds.length < BATCH_SIZE) break;
|
|
111
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
112
|
+
}
|
|
113
|
+
if (mode === "purge") {
|
|
114
|
+
for (let i = 0; i < MAX_BATCHES; i++) {
|
|
115
|
+
let batchIds;
|
|
116
|
+
try {
|
|
117
|
+
const batch = await client.execute({
|
|
118
|
+
sql: `SELECT id FROM conversations_archive
|
|
119
|
+
WHERE ingested_at < datetime('now', ?)
|
|
120
|
+
ORDER BY ingested_at
|
|
121
|
+
LIMIT ?`,
|
|
122
|
+
args: [cutoff, BATCH_SIZE]
|
|
123
|
+
});
|
|
124
|
+
batchIds = batch.rows.map((r) => String(r.id));
|
|
125
|
+
} catch (e) {
|
|
126
|
+
if (!isMissingTableError(e, "conversations_archive")) throw e;
|
|
127
|
+
break;
|
|
128
|
+
}
|
|
129
|
+
if (batchIds.length === 0) break;
|
|
130
|
+
const placeholders = batchIds.map(() => "?").join(",");
|
|
131
|
+
await client.batch(
|
|
132
|
+
[
|
|
133
|
+
{
|
|
134
|
+
sql: `INSERT OR IGNORE INTO conversation_deletions (id, deleted_at)
|
|
135
|
+
SELECT id, datetime('now') FROM conversations_archive WHERE id IN (${placeholders})`,
|
|
136
|
+
args: batchIds
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
sql: `DELETE FROM conversations_archive WHERE id IN (${placeholders})`,
|
|
140
|
+
args: batchIds
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"write"
|
|
144
|
+
);
|
|
145
|
+
result.purged += batchIds.length;
|
|
146
|
+
if (batchIds.length < BATCH_SIZE) break;
|
|
147
|
+
await new Promise((resolve) => setImmediate(resolve));
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
if (mode === "purge" && result.purged > 0) {
|
|
151
|
+
try {
|
|
152
|
+
await client.execute({
|
|
153
|
+
sql: "DELETE FROM sync_meta WHERE key = 'last_conversations_push_version'",
|
|
154
|
+
args: []
|
|
155
|
+
});
|
|
156
|
+
} catch {
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
return result;
|
|
160
|
+
}
|
|
161
|
+
export {
|
|
162
|
+
DEFAULT_CONVERSATIONS_RETENTION_DAYS,
|
|
163
|
+
DEFAULT_CONVERSATIONS_RETENTION_MODE,
|
|
164
|
+
parseConversationsRetentionMode,
|
|
165
|
+
sweepExpiredConversations
|
|
166
|
+
};
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
readAllBehaviors,
|
|
16
16
|
readAllMemories,
|
|
17
17
|
rebuildFromDb
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-SJP57MQM.js";
|
|
19
|
+
import "./chunk-CL3AB7Z2.js";
|
|
20
20
|
import "./chunk-TWMWHDOY.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-CL2MU3OX.js";
|
|
22
|
+
import "./chunk-TA3B4N24.js";
|
|
23
23
|
import "./chunk-JKKZGDLP.js";
|
|
24
24
|
import "./chunk-MLKGABMK.js";
|
|
25
25
|
export {
|