@askexenow/exe-os 0.9.142 → 0.9.144
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{active-agent-OTOFSYIV.js → active-agent-NVYSMA2V.js} +5 -5
- package/dist/{active-agent-PNV6PKJK.js → active-agent-Q3IKFOF6.js} +5 -5
- package/dist/{agentic-ontology-GYJZMRNB.js → agentic-ontology-Q3OVWKAK.js} +1 -1
- package/dist/{backfill-metadata-EDLDTB2G.js → backfill-metadata-GZIPWZAJ.js} +7 -9
- package/dist/{background-jobs-TBUOKMJR.js → background-jobs-LS6PTJKF.js} +3 -3
- package/dist/{behaviors-GE4RY2HA.js → behaviors-A4W3CBE5.js} +5 -5
- package/dist/bin/age-ontology-load.js +3 -3
- package/dist/bin/agentic-ontology-backfill.js +9 -9
- package/dist/bin/agentic-reflection-backfill.js +10 -10
- package/dist/bin/agentic-semantic-label.js +9 -9
- package/dist/bin/backfill-conversations.js +9 -9
- package/dist/bin/backfill-responses.js +9 -9
- package/dist/bin/backfill-vectors.js +11 -11
- package/dist/bin/bulk-sync-postgres.js +10 -10
- package/dist/bin/cc-doctor.js +4 -4
- package/dist/bin/cleanup-stale-review-tasks.js +11 -11
- package/dist/bin/cli.js +18 -18
- package/dist/bin/exe-agent-config.js +5 -5
- package/dist/bin/exe-agent.js +6 -6
- package/dist/bin/exe-assign.js +11 -11
- package/dist/bin/exe-boot.js +19 -19
- package/dist/bin/exe-call.js +6 -6
- package/dist/bin/exe-cloud.js +9 -9
- package/dist/bin/exe-dispatch.js +11 -11
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +10 -10
- package/dist/bin/exe-forget.js +9 -9
- package/dist/bin/exe-gateway.js +8 -8
- package/dist/bin/exe-healthcheck.js +4 -4
- package/dist/bin/exe-heartbeat.js +11 -11
- package/dist/bin/exe-kill.js +9 -9
- package/dist/bin/exe-launch-agent.js +29 -24
- package/dist/bin/exe-new-employee.js +9 -9
- package/dist/bin/exe-pending-messages.js +12 -12
- package/dist/bin/exe-pending-notifications.js +11 -11
- package/dist/bin/exe-pending-reviews.js +11 -11
- package/dist/bin/exe-rename.js +6 -6
- package/dist/bin/exe-review.js +14 -14
- package/dist/bin/exe-search.js +8 -8
- package/dist/bin/exe-session-cleanup.js +17 -17
- package/dist/bin/exe-settings.js +8 -8
- package/dist/bin/exe-start-codex.js +15 -15
- package/dist/bin/exe-start-opencode.js +11 -11
- package/dist/bin/exe-status.js +12 -12
- package/dist/bin/exe-support.js +4 -4
- package/dist/bin/exe-team.js +5 -5
- package/dist/bin/git-sweep.js +11 -11
- package/dist/bin/graph-backfill.js +9 -9
- package/dist/bin/graph-export.js +8 -8
- package/dist/bin/install.js +9 -9
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +5 -5
- package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
- package/dist/bin/scan-tasks.js +11 -11
- package/dist/bin/setup.js +4 -4
- package/dist/bin/shard-migrate.js +8 -8
- package/dist/bin/stack-update.js +3 -3
- package/dist/{branding-EKI27T6K.js → branding-ZOKU45NY.js} +2 -2
- package/dist/{capacity-monitor-D3RGDLMN.js → capacity-monitor-7VX6NW5J.js} +12 -12
- package/dist/{catchup-brief-LD2QLE2D.js → catchup-brief-HLGROPH6.js} +14 -14
- package/dist/{chunk-RZK7BZHP.js → chunk-2RCYI7O4.js} +1 -1
- package/dist/{chunk-UYNFWD54.js → chunk-37RJAKHZ.js} +3 -3
- package/dist/{chunk-SFURTBMT.js → chunk-3RT5V3M4.js} +1 -1
- package/dist/{chunk-CQX2WDI5.js → chunk-3XUWTXNC.js} +1 -1
- package/dist/{chunk-JSVRX6IW.js → chunk-47MZMRQZ.js} +7 -7
- package/dist/{chunk-OI3REUP5.js → chunk-4C3NEI64.js} +1 -1
- package/dist/{chunk-GOCW7Z6D.js → chunk-52LCN4JK.js} +1 -1
- package/dist/{chunk-5UCBVXKO.js → chunk-53JBNNU3.js} +1 -1
- package/dist/{chunk-6V6UTSOP.js → chunk-5JIVAJJU.js} +1 -1
- package/dist/{chunk-NMG76472.js → chunk-67WOKLTZ.js} +3 -3
- package/dist/{chunk-XRPIVNFS.js → chunk-76HPWZJC.js} +1 -1
- package/dist/{chunk-32Z4GK25.js → chunk-76R35J76.js} +6 -6
- package/dist/{chunk-DU4ZN7VF.js → chunk-7PJP3TZV.js} +1 -1
- package/dist/{chunk-LFVL3R6H.js → chunk-7YZJUTQ4.js} +2 -2
- package/dist/{chunk-GIGLGGYL.js → chunk-A46SAHYB.js} +1 -1
- package/dist/{chunk-GLVF7ENO.js → chunk-AFEXRICE.js} +1 -1
- package/dist/{chunk-25QUV6FU.js → chunk-AV4RLRM2.js} +64 -14
- package/dist/{chunk-4CBBN2XD.js → chunk-AV77PUPD.js} +122 -68
- package/dist/{chunk-EZUWMBWA.js → chunk-AYUYBWGD.js} +1 -1
- package/dist/{chunk-NFX6MDEO.js → chunk-BNH4LWKE.js} +1 -1
- package/dist/{chunk-CK5ZAMWX.js → chunk-C54PGWHV.js} +3 -3
- package/dist/{chunk-N5MH3CN2.js → chunk-CNNT4QSN.js} +3 -3
- package/dist/{chunk-4AZYVT6A.js → chunk-DSVN3QRR.js} +1 -1
- package/dist/{chunk-Q53ZYTIU.js → chunk-DUXNECD3.js} +2 -2
- package/dist/{chunk-MRX42FAS.js → chunk-EHF676BW.js} +3 -3
- package/dist/{chunk-TJI7DMBT.js → chunk-EOWQ6DMH.js} +7 -7
- package/dist/{chunk-7M3DNYMR.js → chunk-EVP2WD5S.js} +1 -1
- package/dist/{chunk-U3Q3WNGY.js → chunk-EYRQWVPQ.js} +2 -2
- package/dist/{chunk-2NWMGMNH.js → chunk-EZY3BNIW.js} +9 -9
- package/dist/{chunk-JAFHOB5P.js → chunk-FCNKI3SH.js} +1 -1
- package/dist/{chunk-EENNKZMN.js → chunk-GPCQRSAR.js} +2 -2
- package/dist/{chunk-NMT6QFEE.js → chunk-HHKKLWAI.js} +1 -1
- package/dist/{chunk-CBSUVFZ7.js → chunk-HLYXFVVT.js} +2 -2
- package/dist/{chunk-EAVACBVO.js → chunk-IUQL3KZV.js} +2 -2
- package/dist/{chunk-SDYBAMPW.js → chunk-KKYDUT2Z.js} +2 -2
- package/dist/{chunk-4GA5XZWY.js → chunk-KVM3XRPC.js} +2 -2
- package/dist/{chunk-KCLL5ECT.js → chunk-KX3KLDG7.js} +1 -1
- package/dist/{chunk-BSSSCUQJ.js → chunk-LT55GKEK.js} +3 -3
- package/dist/{chunk-DH6N5G4T.js → chunk-LXX2UDWL.js} +1 -1
- package/dist/{chunk-BI3GMMTP.js → chunk-MAA3266Q.js} +1 -1
- package/dist/{chunk-LR3QFARI.js → chunk-MI4RRRX5.js} +24 -15
- package/dist/{chunk-LCZRXRB7.js → chunk-NCVFW4JS.js} +2 -2
- package/dist/{chunk-UYFPFO6Q.js → chunk-OCYP6VU6.js} +6 -6
- package/dist/{chunk-DKWTDULH.js → chunk-PNLYLN6K.js} +2 -2
- package/dist/{chunk-VA42PIIY.js → chunk-QASVYG2B.js} +1 -1
- package/dist/{chunk-MQB2BE3I.js → chunk-QC34Z6ZI.js} +1 -1
- package/dist/{chunk-NWUWTV7B.js → chunk-QLQCSJC4.js} +1 -1
- package/dist/{chunk-F4OU2ETP.js → chunk-QUPRWJKI.js} +91 -39
- package/dist/{chunk-5PZ3HSGP.js → chunk-ROTT6N5K.js} +19 -40
- package/dist/{chunk-4YSDLTCT.js → chunk-SCP545OR.js} +4 -4
- package/dist/{chunk-U7M7ZURS.js → chunk-SI5TLMB6.js} +2 -2
- package/dist/{chunk-S3FDCJNF.js → chunk-SRQXDGUO.js} +6 -6
- package/dist/{chunk-4OHIVMHS.js → chunk-T2WBLUN7.js} +1 -1
- package/dist/{chunk-AJOZXJLJ.js → chunk-TBO4RYRU.js} +1 -1
- package/dist/{chunk-DUDPJVAC.js → chunk-TGR3H3DM.js} +3 -3
- package/dist/{chunk-UB7E2FEB.js → chunk-TLXIKKEG.js} +3 -3
- package/dist/{chunk-UKCSMGNM.js → chunk-UAAOJHVR.js} +2 -2
- package/dist/{chunk-AOJHEMHE.js → chunk-V3YNF3JK.js} +49 -62
- package/dist/{chunk-2OG5NAO2.js → chunk-V6O4GN5M.js} +1 -13
- package/dist/{chunk-FZ23OZL3.js → chunk-VAOAI6DS.js} +6 -0
- package/dist/{chunk-TSPBIMZV.js → chunk-VH2CK32C.js} +1 -1
- package/dist/{chunk-BKEJSHDE.js → chunk-VISRYICE.js} +1 -1
- package/dist/{chunk-SOHGHGWU.js → chunk-VTQRACP7.js} +2 -2
- package/dist/{chunk-E2KEN3PG.js → chunk-WDN5IY66.js} +1 -1
- package/dist/{chunk-55LEDLDE.js → chunk-WLW7QV2C.js} +3 -3
- package/dist/{chunk-P2YTTKPR.js → chunk-XCTQO7TN.js} +1 -1
- package/dist/{chunk-LGPTAJZC.js → chunk-XMAP37LE.js} +1 -1
- package/dist/{chunk-CHXX73NX.js → chunk-XSF6G7O2.js} +3 -3
- package/dist/{chunk-ITJMONDK.js → chunk-YEXCXJRS.js} +1 -1
- package/dist/{chunk-4JZNDVZH.js → chunk-YGHMRSH5.js} +4 -5
- package/dist/{chunk-7BPUBHGW.js → chunk-YPQMQWA2.js} +2 -2
- package/dist/{chunk-JMMY24KD.js → chunk-YRLMCI3J.js} +4 -4
- package/dist/{chunk-LD6WE7DK.js → chunk-YSRJHKHL.js} +2 -2
- package/dist/{chunk-6EZRMPDA.js → chunk-ZCYQZQTA.js} +1 -1
- package/dist/{chunk-LNX37VPO.js → chunk-ZK3WQY7Q.js} +2 -2
- package/dist/{code-context-index-XCX6HB3T.js → code-context-index-WCJ6RWCY.js} +5 -5
- package/dist/{conversation-entity-extractor-FJNOZ4DO.js → conversation-entity-extractor-7S4JFUOM.js} +1 -1
- package/dist/{conversation-wiki-populator-HAW3EQD5.js → conversation-wiki-populator-H6WM5SFU.js} +1 -1
- package/dist/{crdt-sync-WXVYQ5ZO.js → crdt-sync-WYAIMNUX.js} +1 -1
- package/dist/{crm-webhook-HGUHXI6W.js → crm-webhook-PIFEQH7A.js} +2 -2
- package/dist/{cto-delegation-gate-RJ5EVOY3.js → cto-delegation-gate-MKIVEDB4.js} +10 -10
- package/dist/{daemon-auth-VXM7MOF4.js → daemon-auth-5WZWXJWL.js} +3 -3
- package/dist/{daemon-orchestration-3E3BIK7E.js → daemon-orchestration-RZLIILS6.js} +14 -14
- package/dist/{db-backup-YHDR4SXR.js → db-backup-K2M7HENN.js} +3 -3
- package/dist/{exe-drift-DBY7PC3H.js → exe-drift-2LL7OCRF.js} +5 -5
- package/dist/{exe-export-FQPQCBDA.js → exe-export-TQZ6FVKC.js} +8 -8
- package/dist/{exe-import-7CML2REU.js → exe-import-PB3VIFF7.js} +8 -8
- package/dist/{exe-key-KNR4LT2L.js → exe-key-BZTGYI2O.js} +5 -5
- package/dist/{exe-org-QKK7M6FR.js → exe-org-7ZJNIBL2.js} +3 -3
- package/dist/{fast-db-init-ADRYLHUA.js → fast-db-init-TLDOE64G.js} +1 -1
- package/dist/gateway/index.js +9 -9
- package/dist/{gateway-client-CJNSI4GG.js → gateway-client-E4UWC45R.js} +1 -1
- package/dist/{git-staleness-OL7J5CXL.js → git-staleness-QXWQPH74.js} +4 -4
- package/dist/{git-task-sweep-O4OIPQB3.js → git-task-sweep-HELKXKNQ.js} +11 -11
- package/dist/{global-procedures-L7AN2A5W.js → global-procedures-4BN6BD4N.js} +5 -5
- package/dist/{graph-rag-V3JU7GYG.js → graph-rag-73U3RTBB.js} +1 -1
- package/dist/{hook-integrity-HESSTSAK.js → hook-integrity-LAWB6YQH.js} +1 -1
- package/dist/hooks/bug-report-worker.js +13 -13
- package/dist/hooks/codex-stop-task-finalizer.js +13 -13
- package/dist/hooks/commit-complete.js +13 -13
- package/dist/hooks/error-recall.js +9 -9
- package/dist/hooks/exe-heartbeat-hook.js +5 -5
- package/dist/hooks/ingest-worker.js +6 -6
- package/dist/hooks/ingest.js +13 -13
- package/dist/hooks/instructions-loaded.js +6 -6
- package/dist/hooks/notification.js +6 -6
- package/dist/hooks/post-compact.js +12 -12
- package/dist/hooks/post-tool-combined.js +5 -5
- package/dist/hooks/pre-compact.js +17 -17
- package/dist/hooks/pre-tool-use.js +16 -16
- package/dist/hooks/prompt-submit.js +48 -31
- package/dist/hooks/session-end.js +21 -21
- package/dist/hooks/session-start.js +8 -8
- package/dist/hooks/stop.js +39 -18
- package/dist/hooks/subagent-stop.js +12 -12
- package/dist/hooks/summary-worker.js +21 -21
- package/dist/index.js +18 -18
- package/dist/{installer-JF7ARD2O.js → installer-2O362XY7.js} +8 -8
- package/dist/{installer-4YA7JGL4.js → installer-BIDJSBAP.js} +8 -8
- package/dist/{installer-ZF7VAXAE.js → installer-OYGB6GAI.js} +8 -8
- package/dist/{key-backup-status-M4W77D3P.js → key-backup-status-2CMNBKEM.js} +2 -2
- package/dist/lib/agent-config.js +3 -3
- package/dist/lib/cloud-sync.js +7 -7
- package/dist/lib/config.js +2 -2
- package/dist/lib/consolidation.js +8 -8
- package/dist/lib/database.js +4 -4
- package/dist/lib/db-daemon-client.js +4 -4
- package/dist/lib/db.js +4 -4
- package/dist/lib/device-registry.js +2 -2
- package/dist/lib/embedder.js +5 -5
- package/dist/lib/employee-templates.js +6 -6
- package/dist/lib/employees.js +4 -4
- package/dist/lib/exe-daemon-client.js +4 -4
- package/dist/lib/exe-daemon.js +157 -84
- package/dist/lib/hybrid-search.js +8 -8
- package/dist/lib/identity.js +4 -4
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/license.js +3 -3
- package/dist/lib/messaging.js +11 -11
- package/dist/lib/reminders.js +5 -5
- package/dist/lib/schedules.js +8 -8
- package/dist/lib/skill-learning.js +6 -6
- package/dist/lib/store.js +7 -7
- package/dist/lib/task-router.js +5 -5
- package/dist/lib/tasks.js +12 -12
- package/dist/lib/tmux-routing.js +10 -10
- package/dist/lib/token-spend.js +5 -5
- package/dist/lib/ws-client.js +1 -1
- package/dist/{license-gate-P6NDW4Z3.js → license-gate-PAW5WWP6.js} +4 -4
- package/dist/mcp/register-tools.js +61 -61
- package/dist/mcp/server.js +64 -64
- package/dist/mcp/tools/complete-reminder.js +6 -6
- package/dist/mcp/tools/create-reminder.js +6 -6
- package/dist/mcp/tools/create-task.js +14 -14
- package/dist/mcp/tools/deactivate-behavior.js +7 -7
- package/dist/mcp/tools/list-reminders.js +6 -6
- package/dist/mcp/tools/list-tasks.js +14 -14
- package/dist/mcp/tools/send-message.js +13 -13
- package/dist/mcp/tools/update-task.js +13 -13
- package/dist/{mcp-http-config-TIY7CLWB.js → mcp-http-config-GLSLF2OL.js} +5 -5
- package/dist/{memory-cards-MQBULX5V.js → memory-cards-PCZ2KWMN.js} +4 -4
- package/dist/{memory-poisoning-defense-EHSL5PZW.js → memory-poisoning-defense-JY4NU3AY.js} +4 -4
- package/dist/{memory-queue-6YCGHJLQ.js → memory-queue-7N7ZEY2K.js} +3 -3
- package/dist/memory-queue-client-W63JO34U.js +14 -0
- package/dist/{memory-reflection-OTJBCQWK.js → memory-reflection-IVHZRUQQ.js} +4 -4
- package/dist/{notifications-APKWB63A.js → notifications-FCTKUQAU.js} +10 -10
- package/dist/oauth-server-S45RTRRF.js +437 -0
- package/dist/{orchestration-phase-365P32CD.js → orchestration-phase-NTQZNPAZ.js} +3 -3
- package/dist/{orchestrator-W62CLQLP.js → orchestrator-VQL47YQP.js} +12 -12
- package/dist/{plan-limits-BO2HMJ6S.js → plan-limits-TK4424RV.js} +6 -6
- package/dist/{preferences-M7KQYRR2.js → preferences-5YRRHGXS.js} +2 -2
- package/dist/{projection-worker-6TGUPMLY.js → projection-worker-YIJ7Q66A.js} +3 -3
- package/dist/{push-notifications-2SBCAIA2.js → push-notifications-66EQCPHZ.js} +3 -3
- package/dist/{reranker-LV5BQIF4.js → reranker-2BSQ2V5M.js} +3 -3
- package/dist/runtime/index.js +13 -13
- package/dist/{session-events-SR2WX2X4.js → session-events-JZPK3UUM.js} +11 -11
- package/dist/{session-kill-telemetry-N2IKZK33.js → session-kill-telemetry-2IB6IQSS.js} +5 -5
- package/dist/{session-scope-S5DODJU4.js → session-scope-QPBPO5XV.js} +11 -11
- package/dist/setup-wizard-UFLDL2QP.js +12 -0
- package/dist/{shard-manager-3MDFLDOZ.js → shard-manager-IIII7AAS.js} +3 -3
- package/dist/{task-enforcement-L7EGD6LJ.js → task-enforcement-VDCQ5H3H.js} +10 -10
- package/dist/{task-scope-QNRAYD7S.js → task-scope-YIPIPEVK.js} +10 -10
- package/dist/{tasks-crud-JHHIROCS.js → tasks-crud-E4B3ORQX.js} +10 -10
- package/dist/{tasks-review-TXMVOOFN.js → tasks-review-6Y7IB572.js} +10 -10
- package/dist/token-budget-VX5ZTLAG.js +85 -0
- package/dist/{tool-capability-index-7OF3LF4X.js → tool-capability-index-JBS2FDIG.js} +1 -1
- package/dist/{tool-telemetry-QPGPBV5R.js → tool-telemetry-ASYRVRIY.js} +1 -1
- package/dist/tui/App.js +36 -29
- package/dist/{tui-data-65WM7L5Q.js → tui-data-UHFRO64P.js} +10 -10
- package/dist/{worker-gate-WM2RGEZE.js → worker-gate-CVWHVSX3.js} +3 -3
- package/dist/{workflow-engine-PK2TC7UE.js → workflow-engine-2XZK77ZX.js} +2 -2
- package/dist/{worktree-XQM3YNKR.js → worktree-O2DKCB33.js} +1 -1
- package/package.json +1 -1
- package/release-notes.json +158 -154
- package/dist/memory-queue-client-SZZDOZXE.js +0 -14
- package/dist/setup-wizard-H4TZHU36.js +0 -12
- /package/dist/{chunk-JZB67O4M.js → chunk-5OANXJSV.js} +0 -0
- /package/dist/{chunk-267IKUT5.js → chunk-CO7XAJJ2.js} +0 -0
- /package/dist/{chunk-NGAZPQQY.js → chunk-E3ZIGQH4.js} +0 -0
- /package/dist/{chunk-HBV3HSER.js → chunk-GGFH5MTN.js} +0 -0
- /package/dist/{chunk-72O7CSKA.js → chunk-QBLI377G.js} +0 -0
- /package/dist/{chunk-7A2YCQNM.js → chunk-TDIUACZ6.js} +0 -0
- /package/dist/{chunk-NSA2JWNP.js → chunk-V2UBYCSC.js} +0 -0
- /package/dist/{chunk-XIIVMIS4.js → chunk-VKFBVBAN.js} +0 -0
- /package/dist/{core-memory-N74JWH4M.js → core-memory-N2SN7CF5.js} +0 -0
- /package/dist/{entity-boost-27ENEPYC.js → entity-boost-62SBVNCD.js} +0 -0
- /package/dist/{message-queue-client-2YTGEB5H.js → message-queue-client-3RWYNZIR.js} +0 -0
- /package/dist/{webhook-pipe-VOUF2Y43.js → webhook-pipe-B6Z2QMRY.js} +0 -0
- /package/dist/{wiki-acl-BIEVKTJC.js → wiki-acl-OSBQJD2E.js} +0 -0
- /package/dist/{wiki-client-NGWOSMCV.js → wiki-client-TDZ74RHN.js} +0 -0
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
connectEmbedDaemon,
|
|
9
9
|
embedBatchViaClient,
|
|
10
10
|
init_exe_daemon_client
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UAAOJHVR.js";
|
|
12
12
|
import {
|
|
13
13
|
EXE_AI_DIR,
|
|
14
14
|
init_config
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QASVYG2B.js";
|
|
16
16
|
|
|
17
17
|
// src/lib/code-context-index.ts
|
|
18
18
|
init_config();
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
buildRawVisibilityFilter,
|
|
4
4
|
buildWikiScopeFilter,
|
|
5
5
|
searchMemories
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MI4RRRX5.js";
|
|
7
7
|
import {
|
|
8
8
|
getClient,
|
|
9
9
|
init_database
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-WLW7QV2C.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/hybrid-search.ts
|
|
13
13
|
init_database();
|
|
@@ -80,7 +80,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
80
80
|
let rerankerAvailable = false;
|
|
81
81
|
if (process.env.EXE_IS_DAEMON === "1") {
|
|
82
82
|
try {
|
|
83
|
-
const { isRerankerAvailable } = await import("./reranker-
|
|
83
|
+
const { isRerankerAvailable } = await import("./reranker-2BSQ2V5M.js");
|
|
84
84
|
rerankerAvailable = isRerankerAvailable();
|
|
85
85
|
} catch {
|
|
86
86
|
}
|
|
@@ -120,7 +120,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
120
120
|
queryVector ? searchMemories(queryVector, agentId, fetchOptions) : Promise.resolve([]),
|
|
121
121
|
includeStructuredCards ? (async () => {
|
|
122
122
|
try {
|
|
123
|
-
const { searchMemoryCards } = await import("./memory-cards-
|
|
123
|
+
const { searchMemoryCards } = await import("./memory-cards-PCZ2KWMN.js");
|
|
124
124
|
return await searchMemoryCards(effectiveQuery, agentId, fetchOptions);
|
|
125
125
|
} catch {
|
|
126
126
|
return [];
|
|
@@ -129,7 +129,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
129
129
|
// Reflection insights: patterns, contradictions, summaries across sessions
|
|
130
130
|
includeStructuredCards ? (async () => {
|
|
131
131
|
try {
|
|
132
|
-
const { searchReflections } = await import("./memory-reflection-
|
|
132
|
+
const { searchReflections } = await import("./memory-reflection-IVHZRUQQ.js");
|
|
133
133
|
const insights = await searchReflections(effectiveQuery, agentId, 5);
|
|
134
134
|
return insights.map((ins) => ({
|
|
135
135
|
id: ins.id,
|
|
@@ -176,7 +176,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
176
176
|
let entityBoostRan = false;
|
|
177
177
|
if (merged.length > 0) {
|
|
178
178
|
try {
|
|
179
|
-
const { applyEntityBoost } = await import("./entity-boost-
|
|
179
|
+
const { applyEntityBoost } = await import("./entity-boost-62SBVNCD.js");
|
|
180
180
|
const boosted = await applyEntityBoost(merged, effectiveQuery, getClient());
|
|
181
181
|
merged = boosted.results;
|
|
182
182
|
graphContextMap = boosted.graphContext;
|
|
@@ -198,7 +198,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
198
198
|
try {
|
|
199
199
|
let rerankedRecords;
|
|
200
200
|
if (graphContextMap.size > 0) {
|
|
201
|
-
const { rerankWithContext } = await import("./reranker-
|
|
201
|
+
const { rerankWithContext } = await import("./reranker-2BSQ2V5M.js");
|
|
202
202
|
const candidates = merged.map((m) => ({
|
|
203
203
|
text: m.raw_text,
|
|
204
204
|
context: graphContextMap.get(m.id)
|
|
@@ -206,7 +206,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
206
206
|
const scored = await rerankWithContext(effectiveQuery, candidates, rerankReturnLimit);
|
|
207
207
|
rerankedRecords = scored.map((s) => merged[s.index]);
|
|
208
208
|
} else {
|
|
209
|
-
const { rerank } = await import("./reranker-
|
|
209
|
+
const { rerank } = await import("./reranker-2BSQ2V5M.js");
|
|
210
210
|
rerankedRecords = await rerank(effectiveQuery, merged, rerankReturnLimit);
|
|
211
211
|
}
|
|
212
212
|
if (rerankedRecords.length > 0) {
|
|
@@ -405,7 +405,7 @@ async function lightweightSearch(queryText, agentId, options) {
|
|
|
405
405
|
}
|
|
406
406
|
if (options?.includeStructuredCards !== true) return results;
|
|
407
407
|
try {
|
|
408
|
-
const { searchMemoryCards } = await import("./memory-cards-
|
|
408
|
+
const { searchMemoryCards } = await import("./memory-cards-PCZ2KWMN.js");
|
|
409
409
|
const cardResults = await searchMemoryCards(queryText, agentId, options);
|
|
410
410
|
if (cardResults.length > 0) {
|
|
411
411
|
return rrfMergeMulti([results, cardResults], limit, RRF_K, [1, 0.85]);
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
resolveExeSession,
|
|
7
7
|
sendIntercom,
|
|
8
8
|
strictSessionScopeFilter
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-V3YNF3JK.js";
|
|
10
10
|
import {
|
|
11
11
|
getClient,
|
|
12
12
|
init_database
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WLW7QV2C.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/messaging.ts
|
|
16
16
|
init_database();
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
getEmployee,
|
|
13
13
|
init_employees,
|
|
14
14
|
loadEmployeesSync
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WLW7QV2C.js";
|
|
16
16
|
import {
|
|
17
17
|
EXE_AI_DIR,
|
|
18
18
|
init_config
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-QASVYG2B.js";
|
|
20
20
|
|
|
21
21
|
// src/lib/active-agent.ts
|
|
22
22
|
init_config();
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
init_license,
|
|
3
3
|
loadLicense,
|
|
4
4
|
readCachedLicenseToken
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-AFEXRICE.js";
|
|
6
6
|
import {
|
|
7
7
|
EXE_AI_DIR,
|
|
8
8
|
init_config,
|
|
9
9
|
loadConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QASVYG2B.js";
|
|
11
11
|
|
|
12
12
|
// src/bin/exe-support.ts
|
|
13
13
|
init_config();
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EXE_AI_DIR,
|
|
3
3
|
init_config
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-QASVYG2B.js";
|
|
5
5
|
import {
|
|
6
6
|
enforcePrivateFileSync,
|
|
7
7
|
ensurePrivateDirSync,
|
|
8
8
|
init_secure_files
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VAOAI6DS.js";
|
|
10
10
|
import {
|
|
11
11
|
__esm
|
|
12
12
|
} from "./chunk-KFQGP6VL.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
enqueueMemory
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YEXCXJRS.js";
|
|
4
4
|
import {
|
|
5
5
|
init_exe_daemon_client,
|
|
6
6
|
isClientConnected,
|
|
7
7
|
sendDaemonRequest
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UAAOJHVR.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/memory-queue-client.ts
|
|
11
11
|
init_exe_daemon_client();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadPreferences
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4C3NEI64.js";
|
|
4
4
|
import {
|
|
5
5
|
buildClaudeHttpMcpEntry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FCNKI3SH.js";
|
|
7
7
|
import {
|
|
8
8
|
EXE_HOOKS,
|
|
9
9
|
isLegacyHomeDirHookCommand,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import {
|
|
13
13
|
ensureAllAgentSymlinks,
|
|
14
14
|
init_agent_symlinks
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7PJP3TZV.js";
|
|
16
16
|
import {
|
|
17
17
|
MCP_LEGACY_KEY,
|
|
18
18
|
MCP_PRIMARY_KEY,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
findScopedDuplicate,
|
|
3
3
|
governMemoryRecord,
|
|
4
4
|
schedulePostWriteMemoryHygiene
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E3ZIGQH4.js";
|
|
6
6
|
import {
|
|
7
7
|
init_state_bus,
|
|
8
8
|
orgBus
|
|
@@ -13,18 +13,18 @@ import {
|
|
|
13
13
|
getClient,
|
|
14
14
|
initTurso,
|
|
15
15
|
init_database
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WLW7QV2C.js";
|
|
17
17
|
import {
|
|
18
18
|
EMBEDDING_DIM,
|
|
19
19
|
init_memory
|
|
20
20
|
} from "./chunk-4NYQAS33.js";
|
|
21
21
|
import {
|
|
22
22
|
getMasterKey
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-YGHMRSH5.js";
|
|
24
24
|
import {
|
|
25
25
|
init_config,
|
|
26
26
|
loadConfig
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-QASVYG2B.js";
|
|
28
28
|
|
|
29
29
|
// src/lib/store.ts
|
|
30
30
|
init_memory();
|
|
@@ -114,7 +114,7 @@ async function initStore(options) {
|
|
|
114
114
|
if (!options?.lightweight) {
|
|
115
115
|
try {
|
|
116
116
|
if (process.env.EXE_DISABLE_SHARDING !== "1") {
|
|
117
|
-
const { initShardManager } = await import("./shard-manager-
|
|
117
|
+
const { initShardManager } = await import("./shard-manager-IIII7AAS.js");
|
|
118
118
|
initShardManager(hexKey);
|
|
119
119
|
}
|
|
120
120
|
} catch (e) {
|
|
@@ -127,7 +127,7 @@ async function initStore(options) {
|
|
|
127
127
|
);
|
|
128
128
|
_nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
|
|
129
129
|
try {
|
|
130
|
-
const { loadGlobalProcedures } = await import("./global-procedures-
|
|
130
|
+
const { loadGlobalProcedures } = await import("./global-procedures-4BN6BD4N.js");
|
|
131
131
|
await loadGlobalProcedures();
|
|
132
132
|
} catch (e) {
|
|
133
133
|
logStoreWarn("catch", e);
|
|
@@ -244,7 +244,7 @@ async function writeMemory(record) {
|
|
|
244
244
|
procedure_for: record.procedure_for ?? null
|
|
245
245
|
};
|
|
246
246
|
try {
|
|
247
|
-
const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-
|
|
247
|
+
const { checkMemoryPoisoning } = await import("./memory-poisoning-defense-JY4NU3AY.js");
|
|
248
248
|
const poisonResult = await checkMemoryPoisoning({
|
|
249
249
|
memoryId: dbRow.id,
|
|
250
250
|
vector: Array.isArray(dbRow.vector) ? dbRow.vector : void 0,
|
|
@@ -297,8 +297,6 @@ async function flushBatch() {
|
|
|
297
297
|
for (const row of batch) {
|
|
298
298
|
row.version = baseVersion++;
|
|
299
299
|
}
|
|
300
|
-
await client.execute("COMMIT");
|
|
301
|
-
_nextVersion = baseVersion;
|
|
302
300
|
const buildStmt = (row) => {
|
|
303
301
|
const hasVector = row.vector !== null;
|
|
304
302
|
const taskId = row.task_id ?? null;
|
|
@@ -405,17 +403,28 @@ async function flushBatch() {
|
|
|
405
403
|
args: hasVector ? [...baseArgs, vectorToBlob(row.vector), ...sharedArgs, ...metaArgs] : [...baseArgs, ...sharedArgs, ...metaArgs]
|
|
406
404
|
};
|
|
407
405
|
};
|
|
408
|
-
const globalClient = getClient();
|
|
409
406
|
const globalStmts = batch.map(buildStmt);
|
|
410
|
-
await globalClient.batch(globalStmts, "write");
|
|
411
407
|
try {
|
|
412
|
-
const
|
|
408
|
+
for (const stmt of globalStmts) {
|
|
409
|
+
await client.execute(stmt);
|
|
410
|
+
}
|
|
411
|
+
await client.execute("COMMIT");
|
|
412
|
+
} catch (txErr) {
|
|
413
|
+
try {
|
|
414
|
+
await client.execute("ROLLBACK");
|
|
415
|
+
} catch {
|
|
416
|
+
}
|
|
417
|
+
throw txErr;
|
|
418
|
+
}
|
|
419
|
+
_nextVersion = baseVersion;
|
|
420
|
+
try {
|
|
421
|
+
const { insertMemoryCardsForBatch } = await import("./memory-cards-PCZ2KWMN.js");
|
|
413
422
|
await insertMemoryCardsForBatch(batch);
|
|
414
423
|
} catch (e) {
|
|
415
424
|
logStoreWarn("catch", e);
|
|
416
425
|
}
|
|
417
426
|
try {
|
|
418
|
-
const { insertOntologyForBatch } = await import("./agentic-ontology-
|
|
427
|
+
const { insertOntologyForBatch } = await import("./agentic-ontology-Q3OVWKAK.js");
|
|
419
428
|
await insertOntologyForBatch(batch);
|
|
420
429
|
} catch (e) {
|
|
421
430
|
logStoreWarn("catch", e);
|
|
@@ -423,7 +432,7 @@ async function flushBatch() {
|
|
|
423
432
|
schedulePostWriteMemoryHygiene(batch.map((row) => row.id));
|
|
424
433
|
_pendingRecords.splice(0, batch.length);
|
|
425
434
|
try {
|
|
426
|
-
const { isShardingEnabled, getReadyShardClient } = await import("./shard-manager-
|
|
435
|
+
const { isShardingEnabled, getReadyShardClient } = await import("./shard-manager-IIII7AAS.js");
|
|
427
436
|
if (process.env.EXE_DISABLE_SHARDING !== "1" && isShardingEnabled()) {
|
|
428
437
|
const byProject = /* @__PURE__ */ new Map();
|
|
429
438
|
let skippedUnknown = 0;
|
|
@@ -494,7 +503,7 @@ function buildRawVisibilityFilter(options, columnPrefix) {
|
|
|
494
503
|
async function searchMemories(queryVector, agentId, options) {
|
|
495
504
|
let client;
|
|
496
505
|
try {
|
|
497
|
-
const { isShardingEnabled, shardExists, getReadyShardClient } = await import("./shard-manager-
|
|
506
|
+
const { isShardingEnabled, shardExists, getReadyShardClient } = await import("./shard-manager-IIII7AAS.js");
|
|
498
507
|
if (isShardingEnabled() && options?.projectName && shardExists(options.projectName)) {
|
|
499
508
|
client = await getReadyShardClient(options.projectName);
|
|
500
509
|
} else {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
readMcpHttpEvents,
|
|
3
3
|
summarizeMcpTransport
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HHKKLWAI.js";
|
|
5
5
|
import {
|
|
6
6
|
EXE_AI_DIR,
|
|
7
7
|
init_config
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-QASVYG2B.js";
|
|
9
9
|
import {
|
|
10
10
|
isMainModule
|
|
11
11
|
} from "./chunk-6Y4B3QF6.js";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getMasterKey,
|
|
3
3
|
setMasterKey
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YGHMRSH5.js";
|
|
5
5
|
import {
|
|
6
6
|
LEGACY_LANCE_PATH,
|
|
7
7
|
MODELS_DIR,
|
|
8
8
|
init_config,
|
|
9
9
|
loadConfig,
|
|
10
10
|
saveConfig
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-QASVYG2B.js";
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
14
|
} from "./chunk-KFQGP6VL.js";
|
|
@@ -337,7 +337,7 @@ async function runSetupWizard(opts = {}) {
|
|
|
337
337
|
"Setup cancelled: recovery phrase was not confirmed. Save the 24-word phrase before continuing \u2014 it is required to recover encrypted memories."
|
|
338
338
|
);
|
|
339
339
|
}
|
|
340
|
-
const { markKeyBackupConfirmed } = await import("./key-backup-status-
|
|
340
|
+
const { markKeyBackupConfirmed } = await import("./key-backup-status-2CMNBKEM.js");
|
|
341
341
|
markKeyBackupConfirmed("setup-wizard");
|
|
342
342
|
}
|
|
343
343
|
state.completedSteps.push(1);
|
|
@@ -485,7 +485,7 @@ async function runSetupWizard(opts = {}) {
|
|
|
485
485
|
if (cloudConfig) {
|
|
486
486
|
config.cloud = cloudConfig;
|
|
487
487
|
}
|
|
488
|
-
const { applyDefaultOrchestrationPhase } = await import("./orchestration-phase-
|
|
488
|
+
const { applyDefaultOrchestrationPhase } = await import("./orchestration-phase-NTQZNPAZ.js");
|
|
489
489
|
applyDefaultOrchestrationPhase(config);
|
|
490
490
|
await saveConfig(config);
|
|
491
491
|
log("");
|
|
@@ -511,7 +511,7 @@ async function runSetupWizard(opts = {}) {
|
|
|
511
511
|
log("Step 5 already complete \u2014 skipping.");
|
|
512
512
|
}
|
|
513
513
|
if (!state.completedSteps.includes(55)) {
|
|
514
|
-
const { savePreferences, loadPreferences: loadPrefs } = await import("./preferences-
|
|
514
|
+
const { savePreferences, loadPreferences: loadPrefs } = await import("./preferences-5YRRHGXS.js");
|
|
515
515
|
const existingPrefs = loadPrefs();
|
|
516
516
|
const prefs = { ...existingPrefs };
|
|
517
517
|
log("=== Config Defaults ===");
|
|
@@ -768,7 +768,7 @@ async function runSetupWizard(opts = {}) {
|
|
|
768
768
|
log(" Phase 3: Parallel org \u2014 specialists execute in parallel with reviews");
|
|
769
769
|
log("");
|
|
770
770
|
const unlockExecutives = (await ask(rl, "Unlock Phase 2 executives now? (y/N): ")).toLowerCase() === "y";
|
|
771
|
-
const { setOrchestrationPhase } = await import("./orchestration-phase-
|
|
771
|
+
const { setOrchestrationPhase } = await import("./orchestration-phase-NTQZNPAZ.js");
|
|
772
772
|
if (!unlockExecutives) {
|
|
773
773
|
await setOrchestrationPhase("phase_1_coo", "setup-wizard");
|
|
774
774
|
log("");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_task_scope,
|
|
3
3
|
sessionScopeFilter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V3YNF3JK.js";
|
|
5
5
|
|
|
6
6
|
// src/lib/git-task-sweep.ts
|
|
7
7
|
init_task_scope();
|
|
@@ -180,7 +180,7 @@ async function sweepTasks(projectName, options = {}) {
|
|
|
180
180
|
}
|
|
181
181
|
if (!dryRun) {
|
|
182
182
|
try {
|
|
183
|
-
const { updateTaskStatus } = await import("./tasks-crud-
|
|
183
|
+
const { updateTaskStatus } = await import("./tasks-crud-E4B3ORQX.js");
|
|
184
184
|
await updateTaskStatus({
|
|
185
185
|
taskId: task.id,
|
|
186
186
|
status: "needs_review",
|
|
@@ -9,6 +9,14 @@ import {
|
|
|
9
9
|
// src/lib/graph-rag.ts
|
|
10
10
|
import crypto from "crypto";
|
|
11
11
|
var AST_EXTRACTABLE_LANGUAGES = /* @__PURE__ */ new Set(["typescript", "javascript"]);
|
|
12
|
+
async function tableHasColumn(client, table, column) {
|
|
13
|
+
try {
|
|
14
|
+
const result = await client.execute(`PRAGMA table_info(${table})`);
|
|
15
|
+
return result.rows.some((row) => String(row.name) === column);
|
|
16
|
+
} catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
12
20
|
function normalizeEntityName(name) {
|
|
13
21
|
return name.replace(/\s*\([^)]*\)\s*/g, "").trim().toLowerCase();
|
|
14
22
|
}
|
|
@@ -353,6 +361,8 @@ async function extractFromMemory(content, agentId, model = "claude-haiku-4-5-202
|
|
|
353
361
|
async function storeExtraction(client, extraction, memoryId, timestamp) {
|
|
354
362
|
let entitiesStored = 0;
|
|
355
363
|
let relationshipsStored = 0;
|
|
364
|
+
const entitiesHaveParentType = await tableHasColumn(client, "entities", "parent_type");
|
|
365
|
+
const relationshipsHaveValidFrom = await tableHasColumn(client, "relationships", "valid_from");
|
|
356
366
|
for (const e of extraction.entities) {
|
|
357
367
|
const aliasTarget = await resolveAlias(client, e.name);
|
|
358
368
|
const id = aliasTarget ?? entityId(e.name, e.type);
|
|
@@ -380,23 +390,41 @@ async function storeExtraction(client, extraction, memoryId, timestamp) {
|
|
|
380
390
|
args: [timestamp, mergedPropsJson, aliasTarget]
|
|
381
391
|
});
|
|
382
392
|
} else {
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
393
|
+
if (entitiesHaveParentType) {
|
|
394
|
+
await client.execute({
|
|
395
|
+
sql: `INSERT INTO entities (id, name, type, parent_type, first_seen, last_seen, properties)
|
|
396
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)
|
|
397
|
+
ON CONFLICT(name, type) DO UPDATE SET last_seen = ?, properties = ?,
|
|
398
|
+
parent_type = COALESCE(excluded.parent_type, entities.parent_type)`,
|
|
399
|
+
args: [
|
|
400
|
+
id,
|
|
401
|
+
normalizedName,
|
|
402
|
+
resolved.type,
|
|
403
|
+
resolved.parentType ?? null,
|
|
404
|
+
timestamp,
|
|
405
|
+
timestamp,
|
|
406
|
+
mergedPropsJson,
|
|
407
|
+
timestamp,
|
|
408
|
+
mergedPropsJson
|
|
409
|
+
]
|
|
410
|
+
});
|
|
411
|
+
} else {
|
|
412
|
+
await client.execute({
|
|
413
|
+
sql: `INSERT INTO entities (id, name, type, first_seen, last_seen, properties)
|
|
414
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
415
|
+
ON CONFLICT(name, type) DO UPDATE SET last_seen = ?, properties = ?`,
|
|
416
|
+
args: [
|
|
417
|
+
id,
|
|
418
|
+
normalizedName,
|
|
419
|
+
resolved.type,
|
|
420
|
+
timestamp,
|
|
421
|
+
timestamp,
|
|
422
|
+
mergedPropsJson,
|
|
423
|
+
timestamp,
|
|
424
|
+
mergedPropsJson
|
|
425
|
+
]
|
|
426
|
+
});
|
|
427
|
+
}
|
|
400
428
|
}
|
|
401
429
|
await client.execute({
|
|
402
430
|
sql: `INSERT OR IGNORE INTO entity_memories (entity_id, memory_id)
|
|
@@ -439,28 +467,52 @@ async function storeExtraction(client, extraction, memoryId, timestamp) {
|
|
|
439
467
|
provenance: [...existingProvenance, relProps.provenance]
|
|
440
468
|
});
|
|
441
469
|
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
470
|
+
if (relationshipsHaveValidFrom) {
|
|
471
|
+
await client.execute({
|
|
472
|
+
sql: `INSERT INTO relationships (id, source_entity_id, target_entity_id, type, weight, timestamp, confidence, confidence_label, properties, valid_from)
|
|
473
|
+
VALUES (?, ?, ?, ?, 1.0, ?, ?, ?, ?, ?)
|
|
474
|
+
ON CONFLICT(source_entity_id, target_entity_id, type)
|
|
475
|
+
DO UPDATE SET weight = MIN(weight + 0.1, 2.0), timestamp = ?,
|
|
476
|
+
confidence = MAX(confidence, ?), confidence_label = ?, properties = ?`,
|
|
477
|
+
args: [
|
|
478
|
+
relId,
|
|
479
|
+
sourceId,
|
|
480
|
+
targetId,
|
|
481
|
+
r.relationship,
|
|
482
|
+
timestamp,
|
|
483
|
+
r.confidence,
|
|
484
|
+
r.confidenceLabel,
|
|
485
|
+
relPropsJson,
|
|
486
|
+
timestamp,
|
|
487
|
+
timestamp,
|
|
488
|
+
r.confidence,
|
|
489
|
+
r.confidenceLabel,
|
|
490
|
+
relPropsJson
|
|
491
|
+
]
|
|
492
|
+
});
|
|
493
|
+
} else {
|
|
494
|
+
await client.execute({
|
|
495
|
+
sql: `INSERT INTO relationships (id, source_entity_id, target_entity_id, type, weight, timestamp, confidence, confidence_label, properties)
|
|
496
|
+
VALUES (?, ?, ?, ?, 1.0, ?, ?, ?, ?)
|
|
497
|
+
ON CONFLICT(source_entity_id, target_entity_id, type)
|
|
498
|
+
DO UPDATE SET weight = MIN(weight + 0.1, 2.0), timestamp = ?,
|
|
499
|
+
confidence = MAX(confidence, ?), confidence_label = ?, properties = ?`,
|
|
500
|
+
args: [
|
|
501
|
+
relId,
|
|
502
|
+
sourceId,
|
|
503
|
+
targetId,
|
|
504
|
+
r.relationship,
|
|
505
|
+
timestamp,
|
|
506
|
+
r.confidence,
|
|
507
|
+
r.confidenceLabel,
|
|
508
|
+
relPropsJson,
|
|
509
|
+
timestamp,
|
|
510
|
+
r.confidence,
|
|
511
|
+
r.confidenceLabel,
|
|
512
|
+
relPropsJson
|
|
513
|
+
]
|
|
514
|
+
});
|
|
515
|
+
}
|
|
464
516
|
const existingRel = await client.execute({
|
|
465
517
|
sql: `SELECT id FROM relationships WHERE source_entity_id = ? AND target_entity_id = ? AND type = ?`,
|
|
466
518
|
args: [sourceId, targetId, r.relationship]
|