@askexenow/exe-os 0.9.312 → 0.9.314
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 +1 -1
- package/deploy/compose/.env.customer.example +11 -7
- package/deploy/compose/.env.default +4 -4
- package/deploy/compose/.env.example +7 -7
- package/deploy/compose/docker-compose.yml +43 -19
- package/deploy/compose/gateway.json +2 -2
- package/deploy/compose/init-db.sql +6 -20
- package/deploy/compose/setup.sh +74 -132
- package/deploy/compose/status.sh +5 -0
- package/deploy/stack-manifests/v0.9.json +21 -0
- package/dist/{active-agent-ORX47ZKW.js → active-agent-BZ4JD2YU.js} +6 -6
- package/dist/{active-agent-S5T2YMOR.js → active-agent-WFNMZBPP.js} +6 -6
- package/dist/{agentic-ontology-6KBAXLSJ.js → agentic-ontology-KUDXQQKL.js} +1 -1
- package/dist/{backfill-metadata-FV7GX6AS.js → backfill-metadata-BXG7KFWS.js} +7 -7
- package/dist/{background-jobs-A2LV36UX.js → background-jobs-2QZ5IQKE.js} +5 -3
- package/dist/{behaviors-47CPEKJ7.js → behaviors-YDAHG2LN.js} +8 -8
- 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 +10 -10
- package/dist/bin/backfill-responses.js +10 -10
- package/dist/bin/backfill-vectors.js +13 -13
- package/dist/bin/bulk-sync-postgres.js +16 -16
- package/dist/bin/cc-doctor.js +9 -9
- package/dist/bin/cleanup-stale-review-tasks.js +15 -15
- package/dist/bin/cli.js +21 -21
- package/dist/bin/deferred-daemon-restart.js +1 -1
- package/dist/bin/exe-agent-config.js +6 -6
- package/dist/bin/exe-agent.js +14 -14
- package/dist/bin/exe-assign.js +12 -12
- package/dist/bin/exe-boot.js +78 -57
- package/dist/bin/exe-call.js +7 -7
- package/dist/bin/exe-cloud.js +17 -17
- package/dist/bin/exe-config-dump.js +7 -7
- package/dist/bin/exe-dispatch.js +15 -15
- package/dist/bin/exe-doctor.js +11 -2
- package/dist/bin/exe-export-behaviors.js +10 -10
- package/dist/bin/exe-forget.js +9 -9
- package/dist/bin/exe-gateway.js +10 -10
- package/dist/bin/exe-healthcheck.js +9 -9
- package/dist/bin/exe-heartbeat.js +15 -15
- package/dist/bin/exe-kill.js +18 -18
- package/dist/bin/exe-launch-agent.js +30 -28
- package/dist/bin/exe-new-employee.js +36 -15
- package/dist/bin/exe-pending-messages.js +16 -16
- package/dist/bin/exe-pending-notifications.js +15 -15
- package/dist/bin/exe-pending-reviews.js +15 -15
- package/dist/bin/exe-preflight.js +1 -1
- package/dist/bin/exe-rename.js +19 -29
- package/dist/bin/exe-review.js +17 -17
- package/dist/bin/exe-search.js +8 -8
- package/dist/bin/exe-session-cleanup.js +41 -20
- package/dist/bin/exe-settings.js +18 -18
- package/dist/bin/exe-start-codex.js +15 -15
- package/dist/bin/exe-start-opencode.js +11 -11
- package/dist/bin/exe-status.js +16 -16
- package/dist/bin/exe-support.js +5 -5
- package/dist/bin/exe-team.js +6 -6
- package/dist/bin/exe-watchdog.js +32 -3
- package/dist/bin/git-sweep.js +16 -16
- package/dist/bin/graph-backfill.js +8 -8
- package/dist/bin/graph-export.js +8 -8
- package/dist/bin/import-history.js +10 -10
- package/dist/bin/install-launchd.js +2 -2
- package/dist/bin/install.js +15 -15
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +7 -7
- package/dist/bin/postgres-agentic-reflection-backfill.js +5 -5
- package/dist/bin/postgres-agentic-semantic-backfill.js +4 -4
- package/dist/bin/pre-build-guard.js +12 -1
- package/dist/bin/scan-tasks.js +15 -15
- package/dist/bin/setup.js +3 -3
- package/dist/bin/shard-migrate.js +8 -8
- package/dist/bin/stack-update.js +8 -8
- package/dist/bin/verify-stack.js +3 -1
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{branding-SC4BOPUY.js → branding-EDUC7TUP.js} +2 -2
- package/dist/{browser-session-store-DV5TDXXD.js → browser-session-store-CXQMOSEC.js} +1 -1
- package/dist/{capability-cards-WQVY7WSS.js → capability-cards-3ILRKPQE.js} +5 -5
- package/dist/{capacity-monitor-BUKYPSWR.js → capacity-monitor-4K2OX2CS.js} +16 -16
- package/dist/{catchup-brief-X5IVQAOH.js → catchup-brief-5QIYT2IV.js} +18 -18
- package/dist/{chunk-QB5JOGPK.js → chunk-2PI6JBJL.js} +5 -4
- package/dist/{chunk-PPXQE7AS.js → chunk-2TJPU7ZV.js} +33 -34
- package/dist/{chunk-7ODTYODO.js → chunk-3LGID56M.js} +10 -7
- package/dist/chunk-3VVOHFAM.js +367 -0
- package/dist/{chunk-KSMITUGY.js → chunk-4CVHT2O5.js} +3 -3
- package/dist/{chunk-YUBTHJVV.js → chunk-4LTLAVOW.js} +1 -1
- package/dist/{chunk-J3QZPDNH.js → chunk-4YS2MDBF.js} +1 -1
- package/dist/{chunk-IRHNV4GY.js → chunk-5KLQCGI5.js} +72 -18
- package/dist/{chunk-JMHKK7A5.js → chunk-5WFX4JKF.js} +1 -1
- package/dist/{chunk-4BANMHJ5.js → chunk-63PNRWLU.js} +3 -3
- package/dist/{chunk-6OD2RVIA.js → chunk-6DWKMQBX.js} +273 -397
- package/dist/{chunk-OR3TAZL3.js → chunk-6FKWKNTV.js} +1 -1
- package/dist/{chunk-JZW5AOWI.js → chunk-6J7M7RZE.js} +2 -2
- package/dist/{chunk-FM7XZDZI.js → chunk-6W5I6KFG.js} +1 -1
- package/dist/{chunk-VFSYVQX4.js → chunk-ACFSE5ZV.js} +8 -2
- package/dist/{chunk-2UVN2NBN.js → chunk-ACZOMBRN.js} +3 -3
- package/dist/{chunk-EOS7VPVT.js → chunk-AHIUTOZS.js} +8 -8
- package/dist/{chunk-XYG722JW.js → chunk-AJYTLDMN.js} +3 -3
- package/dist/{chunk-QE7UVQDP.js → chunk-AK5MFSYL.js} +1 -1
- package/dist/{chunk-5DPE7B7K.js → chunk-ARUJYYDX.js} +1 -1
- package/dist/{chunk-7WDIGRSO.js → chunk-ATKTT5L2.js} +1 -1
- package/dist/{chunk-JV225JBX.js → chunk-AU6N56DM.js} +2 -2
- package/dist/{chunk-KMIAYKIH.js → chunk-B6VVBLPS.js} +159 -39
- package/dist/{chunk-WBJXJ2R4.js → chunk-BBLO7IAR.js} +17 -14
- package/dist/{chunk-4L4R6AQJ.js → chunk-BTBE6FT4.js} +1 -1
- package/dist/{chunk-255DIG4B.js → chunk-BXTYHCB6.js} +1 -1
- package/dist/{chunk-OBJXZII2.js → chunk-CILCGLSN.js} +3 -3
- package/dist/{chunk-VDYUKTNS.js → chunk-CLAYNAXC.js} +4 -5
- package/dist/{chunk-SOT23KWW.js → chunk-CO4247VK.js} +4 -4
- package/dist/{chunk-EM4EYF3P.js → chunk-CVTWQZOR.js} +13 -5
- package/dist/{chunk-PMEOSD6S.js → chunk-D4DF4XVJ.js} +9 -6
- package/dist/{chunk-ISILDO7P.js → chunk-DXLENVRL.js} +1 -1
- package/dist/{chunk-ZZXADKAP.js → chunk-E7QPRJYM.js} +2 -2
- package/dist/{chunk-NIZQ3CIS.js → chunk-F347GH2N.js} +1 -1
- package/dist/{chunk-XV5HRIXG.js → chunk-FGH3ZLRU.js} +8 -8
- package/dist/{chunk-BUOMSIXH.js → chunk-FPQUU3DI.js} +2 -2
- package/dist/{chunk-GL5NU6IK.js → chunk-FXS5OFGH.js} +1 -1
- package/dist/{chunk-NCC3F6GM.js → chunk-G76KKLCO.js} +2 -2
- package/dist/{chunk-WJ2PZGRV.js → chunk-GDAHXYNV.js} +29 -2
- package/dist/{chunk-A2YZG4AD.js → chunk-GDOLQO6I.js} +6 -6
- package/dist/{chunk-62UZWGFX.js → chunk-GLFXHDKI.js} +63 -2
- package/dist/{chunk-K7KBAJQL.js → chunk-GQORAQQ2.js} +10 -10
- package/dist/{chunk-JNARUXDC.js → chunk-GS67TVCP.js} +2 -2
- package/dist/{chunk-YB7U4WTY.js → chunk-GSGHENLJ.js} +2 -2
- package/dist/{chunk-VQRTO7IS.js → chunk-H73TUI4Y.js} +9 -2
- package/dist/{chunk-GSY6HL3T.js → chunk-HAOBFWP3.js} +5 -5
- package/dist/{chunk-Z6H6Y4BS.js → chunk-HCQSI7V2.js} +1 -1
- package/dist/{chunk-2EJ636HI.js → chunk-HEIZVOB2.js} +1 -1
- package/dist/{chunk-HED6D5KR.js → chunk-HEXJWMFX.js} +43 -29
- package/dist/{chunk-RPBTYQKJ.js → chunk-HLEKFO3H.js} +1 -1
- package/dist/{chunk-KAVUTP5G.js → chunk-I7WBZ7XF.js} +3 -3
- package/dist/{chunk-S6HVQF27.js → chunk-IEDCQRGG.js} +88 -4
- package/dist/{chunk-VT2B5BHM.js → chunk-JBSCL2XT.js} +2 -1
- package/dist/{chunk-MPX3TRMQ.js → chunk-JD5S5AAV.js} +1 -1
- package/dist/{chunk-66JPZELX.js → chunk-JNGMXR4J.js} +24 -16
- package/dist/{chunk-HQODUV3G.js → chunk-JS3LSUPY.js} +2 -2
- package/dist/{chunk-IRIPGGGL.js → chunk-JZPPU4WV.js} +1 -1
- package/dist/{chunk-DAOHCXM2.js → chunk-KH6BCYLC.js} +1 -1
- package/dist/{chunk-QNXM2HXW.js → chunk-KM2HODV6.js} +1 -1
- package/dist/{chunk-SCYWCWKY.js → chunk-KWFWIJCI.js} +24 -10
- package/dist/{chunk-PHFPIUWU.js → chunk-KWOAM7TA.js} +3 -0
- package/dist/{chunk-DFUCFLZH.js → chunk-LQR4XOX6.js} +2 -2
- package/dist/{chunk-V4BW5HFQ.js → chunk-LYKTZK2G.js} +3 -3
- package/dist/{chunk-ZOVHXTGC.js → chunk-MBMOMBNV.js} +1 -1
- package/dist/{chunk-SPOXL7HF.js → chunk-NAA5SHAL.js} +9 -9
- package/dist/{chunk-6LNSZADA.js → chunk-NNXYKCWS.js} +67 -12
- package/dist/{chunk-V42BSVX6.js → chunk-NOQKGHZ2.js} +51 -4
- package/dist/{chunk-4Q5VNQTV.js → chunk-NWYFJJ6O.js} +3 -3
- package/dist/{chunk-YUGLOZOR.js → chunk-OXTZEKVA.js} +1 -1
- package/dist/{chunk-U63BZI2B.js → chunk-PHUF32XF.js} +3 -3
- package/dist/{chunk-RZJ6DXVE.js → chunk-QM7U5YKL.js} +1 -1
- package/dist/{chunk-GWPICNSO.js → chunk-QQ425N26.js} +49 -4
- package/dist/{chunk-IBDPPBFK.js → chunk-R5IPZ5ZC.js} +1 -1
- package/dist/{chunk-DNFU56ZS.js → chunk-REQZMGAZ.js} +1 -1
- package/dist/{chunk-2NVEKSSP.js → chunk-ROGF2PD6.js} +56 -38
- package/dist/{chunk-XXJRZ75E.js → chunk-RV634O2W.js} +5 -2
- package/dist/{chunk-IZPO6IOZ.js → chunk-S2Z4I4BU.js} +1 -1
- package/dist/{chunk-X4AFBL4N.js → chunk-S4SRMTOS.js} +1 -1
- package/dist/{chunk-65DBIEM2.js → chunk-SHIICYJW.js} +7 -1
- package/dist/{chunk-QEGXNJGR.js → chunk-SHTLLQPQ.js} +4 -4
- package/dist/{chunk-MTIJ2NXY.js → chunk-T7QDO35P.js} +1 -1
- package/dist/{chunk-RVXWGPD3.js → chunk-TY4RTYW6.js} +29 -6
- package/dist/{chunk-3KH6GXXX.js → chunk-U25GXRSV.js} +2 -2
- package/dist/{chunk-RQ7OVXUZ.js → chunk-V2CZVZUO.js} +2 -2
- package/dist/{chunk-4RJJ5FJ2.js → chunk-V4UKBUUA.js} +1 -1
- package/dist/{chunk-LMX7UKGX.js → chunk-VCQNLOC5.js} +17 -11
- package/dist/{chunk-B2J3BBJC.js → chunk-VDWBNXKZ.js} +2 -2
- package/dist/{chunk-IIHE3FNC.js → chunk-WA4GIWMZ.js} +3 -3
- package/dist/{chunk-DFIOOK5R.js → chunk-WCES22KG.js} +4 -3
- package/dist/{chunk-TN2YCFQE.js → chunk-WNSWJVOA.js} +5 -5
- package/dist/{chunk-5A6KTWQL.js → chunk-WOTKNUKK.js} +126 -2
- package/dist/{chunk-WZBUKC5N.js → chunk-WW3RLMTF.js} +2 -2
- package/dist/{chunk-W2J2RF5N.js → chunk-WXADTTWU.js} +3 -3
- package/dist/{chunk-ELXR65AN.js → chunk-X2FHTDIU.js} +6 -3
- package/dist/{chunk-43R2GILO.js → chunk-XI7MFALI.js} +2 -2
- package/dist/{chunk-AC6DKMVS.js → chunk-YAMG7DHQ.js} +1 -1
- package/dist/{chunk-2NGPZCWX.js → chunk-YCRXNN3V.js} +3 -3
- package/dist/{chunk-GMZMBLHT.js → chunk-YROMP5O3.js} +2 -2
- package/dist/{chunk-VT6P7FV4.js → chunk-YUDT2O5K.js} +1 -1
- package/dist/{chunk-KPVVTHPK.js → chunk-ZOZMKPW6.js} +15 -10
- package/dist/{co-activation-WN25AJOC.js → co-activation-TVNH23OE.js} +5 -5
- package/dist/{co-occurrence-YP2Q3OEA.js → co-occurrence-CNOOF4KC.js} +5 -5
- package/dist/{code-context-index-ZWONKBKX.js → code-context-index-7RQ4MLL2.js} +6 -6
- package/dist/{content-extractor-EYRVGD6O.js → content-extractor-RHITF2KM.js} +1 -1
- package/dist/{conversation-wiki-populator-XFUC7S5P.js → conversation-wiki-populator-SK233TL4.js} +1 -1
- package/dist/{crdt-sync-ZFIFL2QM.js → crdt-sync-XXO4GRSB.js} +1 -1
- package/dist/{crm-webhook-DGPHULOO.js → crm-webhook-CU4NHOSU.js} +2 -2
- package/dist/{cto-delegation-gate-OF2A3TSS.js → cto-delegation-gate-LE4EIVDK.js} +14 -14
- package/dist/{daemon-auth-N6P2MZAV.js → daemon-auth-5FCYVQIZ.js} +3 -3
- package/dist/{daemon-orchestration-G4RRTPP7.js → daemon-orchestration-JSYP6J6E.js} +18 -18
- package/dist/{daemon-ready-signal-3L2MJT7C.js → daemon-ready-signal-KXLL6ZFL.js} +1 -1
- package/dist/{db-backup-EORG4LBO.js → db-backup-UX7V6UZ6.js} +9 -3
- package/dist/{db-restore-events-3R7G4FP4.js → db-restore-events-3A57GMLW.js} +2 -2
- package/dist/{doc-graph-extractor-APZS3DFD.js → doc-graph-extractor-2SRTBTCN.js} +5 -5
- package/dist/documents-MICRVJHZ.js +56 -0
- package/dist/{dreaming-Q4E3WBGY.js → dreaming-FDO67PDP.js} +15 -15
- package/dist/embeddings-config-FANLORDH.js +21 -0
- package/dist/{exe-drift-CI5R6GUT.js → exe-drift-D7QM62BY.js} +6 -6
- package/dist/{exe-export-HQIQASIT.js → exe-export-ER75IIZJ.js} +9 -9
- package/dist/{exe-import-ULZK56WC.js → exe-import-QPGYFNFA.js} +9 -9
- package/dist/{exe-key-ILNSBGRN.js → exe-key-4GXR2IZA.js} +8 -8
- package/dist/{exe-org-WQWQZRLR.js → exe-org-KCOOLUTW.js} +3 -3
- package/dist/{exe-snapshot-RUZTWZOF.js → exe-snapshot-MJVI36KB.js} +18 -18
- package/dist/{fast-db-init-KNJRL7T3.js → fast-db-init-FC5O6LS7.js} +1 -1
- package/dist/{founder-context-QCTMEK66.js → founder-context-5LP7LGOM.js} +4 -4
- package/dist/gateway/index.js +17 -17
- package/dist/{git-staleness-KIA5YI4H.js → git-staleness-BK46WKVL.js} +5 -5
- package/dist/{git-task-sweep-WH6QE7HL.js → git-task-sweep-LGPACXMG.js} +17 -15
- package/dist/{global-procedures-SYZZCGDS.js → global-procedures-I5Q323ZZ.js} +6 -6
- package/dist/{graph-auto-extract-J2TIWZEE.js → graph-auto-extract-IA7T775I.js} +5 -5
- package/dist/{hook-integrity-I6PWJQER.js → hook-integrity-XNPNCMAS.js} +1 -1
- package/dist/hooks/bug-report-worker.js +47 -17
- package/dist/hooks/codex-stop-task-finalizer.js +47 -17
- package/dist/hooks/commit-complete.js +18 -18
- package/dist/hooks/error-recall.js +11 -11
- package/dist/hooks/exe-heartbeat-hook.js +7 -7
- package/dist/hooks/ingest-worker.js +39 -9
- package/dist/hooks/ingest.js +17 -17
- package/dist/hooks/instructions-loaded.js +8 -8
- package/dist/hooks/manifest.json +20 -20
- package/dist/hooks/notification.js +8 -8
- package/dist/hooks/post-compact.js +17 -17
- package/dist/hooks/post-tool-combined.js +60 -7
- package/dist/hooks/pre-compact.js +23 -23
- package/dist/hooks/pre-tool-use.js +64 -34
- package/dist/hooks/prompt-submit.js +40 -32
- package/dist/hooks/session-end.js +29 -29
- package/dist/hooks/session-start.js +17 -17
- package/dist/hooks/stop.js +24 -24
- package/dist/hooks/subagent-stop.js +17 -17
- package/dist/hooks/summary-worker.js +55 -25
- package/dist/index.js +27 -27
- package/dist/{installer-3NB3IBHF.js → installer-2GKUCQ3K.js} +10 -10
- package/dist/{installer-IIJFCTMH.js → installer-E26MJH5Y.js} +10 -10
- package/dist/{installer-PSDYMGN7.js → installer-T4LWZXM2.js} +10 -10
- package/dist/{key-backup-status-FNSN3NXH.js → key-backup-status-ZNGDSPLT.js} +2 -2
- package/dist/lib/agent-config.js +3 -3
- package/dist/lib/cloud-sync.js +16 -16
- package/dist/lib/config.js +2 -2
- package/dist/lib/consolidation.js +8 -8
- package/dist/lib/database.js +7 -5
- package/dist/lib/db-daemon-client.js +6 -6
- package/dist/lib/db.js +7 -5
- package/dist/lib/device-registry.js +3 -3
- package/dist/lib/embed-worker.js +2 -2
- package/dist/lib/embedder.js +6 -6
- package/dist/lib/employee-templates.js +7 -7
- package/dist/lib/employees.js +5 -5
- package/dist/lib/exe-daemon-client.js +5 -5
- package/dist/lib/exe-daemon.js +449 -89
- package/dist/lib/hybrid-search.js +8 -8
- package/dist/lib/identity.js +5 -5
- package/dist/lib/license.js +4 -4
- package/dist/lib/messaging.js +15 -15
- package/dist/lib/post-tool-memory.js +2 -2
- package/dist/lib/reminders.js +6 -6
- package/dist/lib/schedules.js +8 -8
- package/dist/lib/session-registry.js +9 -7
- package/dist/lib/session-wrappers.js +1 -1
- package/dist/lib/skill-learning.js +9 -9
- package/dist/lib/store.js +7 -7
- package/dist/lib/task-router.js +6 -6
- package/dist/lib/tasks.js +16 -16
- package/dist/lib/tmux-routing.js +14 -14
- package/dist/lib/token-spend.js +6 -6
- package/dist/{license-gate-7SDHCJUO.js → license-gate-XP5CXPPD.js} +5 -5
- package/dist/mcp/register-tools.js +73 -72
- package/dist/mcp/server.js +74 -73
- package/dist/mcp/tools/complete-reminder.js +7 -7
- package/dist/mcp/tools/create-reminder.js +7 -7
- package/dist/mcp/tools/create-task.js +18 -18
- package/dist/mcp/tools/deactivate-behavior.js +10 -10
- package/dist/mcp/tools/list-reminders.js +7 -7
- package/dist/mcp/tools/list-tasks.js +18 -18
- package/dist/mcp/tools/send-message.js +17 -17
- package/dist/mcp/tools/update-task.js +17 -17
- package/dist/{mcp-http-config-QSOVFXHW.js → mcp-http-config-ONEMD72I.js} +7 -7
- package/dist/{mcp-port-config-AWWRZA22.js → mcp-port-config-FFAMMLLE.js} +2 -1
- package/dist/{memory-cards-II67WFL2.js → memory-cards-DNUKSSAL.js} +5 -5
- package/dist/{memory-graph-extractor-PM4Q2KJG.js → memory-graph-extractor-WFPYEFZQ.js} +6 -6
- package/dist/{memory-poisoning-defense-ECXSX7HK.js → memory-poisoning-defense-O7JIJX4S.js} +5 -5
- package/dist/{memory-queue-VAE6WMSS.js → memory-queue-3Q5P43AM.js} +3 -3
- package/dist/memory-queue-client-YYUUX4H6.js +16 -0
- package/dist/{memory-reflection-PXF6YFDU.js → memory-reflection-NKH3Y4BD.js} +5 -5
- package/dist/{notifications-UP7WQGG4.js → notifications-745BUZDE.js} +14 -14
- package/dist/{orchestration-events-PZLLPCKY.js → orchestration-events-TA4C54NO.js} +6 -6
- package/dist/{orchestration-phase-SJOXDB7X.js → orchestration-phase-U45T4VG3.js} +3 -3
- package/dist/{orchestrator-PUT45J4O.js → orchestrator-2TDCJ2J7.js} +16 -16
- package/dist/{pipeline-router-5CRWKESM.js → pipeline-router-NSEFTV72.js} +6 -6
- package/dist/{plan-limits-SH2NDFNX.js → plan-limits-MGOHQWBB.js} +8 -8
- package/dist/{preferences-YWBTKW3M.js → preferences-TYTGDXQZ.js} +2 -2
- package/dist/{project-boot-2TCPDZ4S.js → project-boot-UAW3NRQF.js} +2 -2
- package/dist/{projection-worker-HWY37MNC.js → projection-worker-APOY7HML.js} +5 -5
- package/dist/{prospective-memory-FQSVMCGG.js → prospective-memory-YHUWPNOO.js} +5 -5
- package/dist/{push-notifications-DK6XA5B3.js → push-notifications-PAFNP3EC.js} +3 -3
- package/dist/{reranker-AALRMGMM.js → reranker-YM3446PK.js} +3 -3
- package/dist/{retrieval-health-PNWJSJNG.js → retrieval-health-BH2RJG5C.js} +1 -1
- package/dist/{review-polling-65JZUE3T.js → review-polling-XHJR5QXY.js} +15 -15
- package/dist/runtime/index.js +22 -22
- package/dist/{session-events-EJ3OSAA6.js → session-events-U42CSAEX.js} +15 -15
- package/dist/{session-kill-telemetry-3HGM7SNQ.js → session-kill-telemetry-UFZ7NPXG.js} +15 -15
- package/dist/{session-scope-JGDYAMJO.js → session-scope-HNXLG56Y.js} +14 -14
- package/dist/{setup-wizard-44LMFM2C.js → setup-wizard-GXDNABWB.js} +3 -3
- package/dist/{shard-manager-KUCJPLC6.js → shard-manager-RASGFMGS.js} +3 -3
- package/dist/{skill-refinement-DUOO6B7V.js → skill-refinement-JZJ5TASV.js} +5 -5
- package/dist/{stack-release-XYMKU7NT.js → stack-release-TOCCJQOF.js} +244 -45
- package/dist/{stack-update-TUBZTY7Z.js → stack-update-K6X7ZMQE.js} +11 -5
- package/dist/{steward-gate-6NWRDLX2.js → steward-gate-5PKWKGCY.js} +6 -6
- package/dist/{task-enforcement-UOULTGFB.js → task-enforcement-QBOMJKNP.js} +14 -14
- package/dist/{task-scope-P5STKYAC.js → task-scope-FA2XRKHG.js} +14 -14
- package/dist/{tasks-crud-24HMTULR.js → tasks-crud-Q3DKZMU4.js} +14 -14
- package/dist/{tasks-notify-LAIU7UUI.js → tasks-notify-UIPEFCI4.js} +15 -15
- package/dist/{tasks-review-AFJAU2DY.js → tasks-review-ZPWWHTUV.js} +14 -14
- package/dist/{telemetry-upload-DWFGC2XJ.js → telemetry-upload-FW2HN7C7.js} +10 -10
- package/dist/{token-budget-4RFZKWGH.js → token-budget-HFQQSV46.js} +6 -6
- package/dist/{tool-capability-index-ZEXBWKUZ.js → tool-capability-index-PK4A2BMA.js} +1 -1
- package/dist/{tool-telemetry-BS5JXM5M.js → tool-telemetry-BP6PQRKE.js} +1 -1
- package/dist/tui/App.js +27 -27
- package/dist/{tui-data-UNO5B7PU.js → tui-data-PQOKT5N4.js} +14 -14
- package/dist/{worker-gate-C6CTTYMD.js → worker-gate-MLBXTRBD.js} +3 -3
- package/dist/{workflow-engine-4W2KYCDV.js → workflow-engine-VKNRQT3O.js} +2 -2
- package/dist/{working-memory-FXHQCJJE.js → working-memory-PY4AG577.js} +22 -2
- package/dist/{worktree-2CXY6NEB.js → worktree-BPHTRV5V.js} +7 -7
- package/dist/{worktree-sweep-K3CJFSUL.js → worktree-sweep-MLCBJZSK.js} +8 -8
- package/package.json +2 -2
- package/release-notes.json +69 -200
- package/stack.release.json +7 -7
- package/dist/memory-queue-client-HLURQEV6.js +0 -16
- /package/dist/{chunk-I3DPCSDG.js → chunk-22LALKS6.js} +0 -0
- /package/dist/{chunk-J3SR5MGG.js → chunk-2QUTPKH7.js} +0 -0
- /package/dist/{chunk-2NS3QRMJ.js → chunk-4NJZJJ5J.js} +0 -0
- /package/dist/{chunk-AE74NOE6.js → chunk-6NVZI5LP.js} +0 -0
- /package/dist/{chunk-K4BKJJ4F.js → chunk-SOCPFERN.js} +0 -0
- /package/dist/{chunk-MQCTK6EF.js → chunk-UPSG6BNC.js} +0 -0
- /package/dist/{core-memory-OC5ITKKV.js → core-memory-3ARYHKZM.js} +0 -0
- /package/dist/{entity-boost-NF3LE6OJ.js → entity-boost-DL2ZSN7S.js} +0 -0
- /package/dist/{message-queue-client-4VDU6BZY.js → message-queue-client-CVHQXJLM.js} +0 -0
- /package/dist/{oauth-server-EWUL7DMD.js → oauth-server-CZHVC5S3.js} +0 -0
- /package/dist/{webhook-pipe-DHIGZHPW.js → webhook-pipe-S4CWK6H5.js} +0 -0
- /package/dist/{wiki-acl-CONNF6ES.js → wiki-acl-SYDZJOJD.js} +0 -0
- /package/dist/{wiki-client-N6PT5P7W.js → wiki-client-CIJXRMKL.js} +0 -0
|
@@ -11,7 +11,7 @@ var REQUIRED_INFRA = {
|
|
|
11
11
|
var FORBIDDEN_HOST_SUBSTRINGS = ["askexe.com", "askexenow.com"];
|
|
12
12
|
var CLIENT_FACING_HOST_FIELDS = ["healthHost", "healthUrl"];
|
|
13
13
|
var BYOK_ENFORCEMENT_VARS = ["EXE_ALLOW_DIRECT_PROVIDER_KEYS", "EXE_BILLING_MODE"];
|
|
14
|
-
var
|
|
14
|
+
var BYOK_ALIAS_VARS = ["BYOK_ENABLED"];
|
|
15
15
|
function resolveDefaultManifest() {
|
|
16
16
|
let dir = path.dirname(new URL(import.meta.url).pathname);
|
|
17
17
|
for (let i = 0; i < 6; i++) {
|
|
@@ -56,11 +56,15 @@ function resolveStack(manifest, requested) {
|
|
|
56
56
|
const entry = manifest.stacks[version];
|
|
57
57
|
return { version, services: entry?.services ?? {} };
|
|
58
58
|
}
|
|
59
|
+
function isAskExeImage(image) {
|
|
60
|
+
return image.startsWith("ghcr.io/askexe/") || image.startsWith("update.askexe.com/askexe/");
|
|
61
|
+
}
|
|
59
62
|
function checkDigestPinning(services) {
|
|
60
63
|
const bug = "ee16e7ef (digest-pinning)";
|
|
61
64
|
const offenders = [];
|
|
62
65
|
for (const [name, svc] of Object.entries(services)) {
|
|
63
66
|
if (!svc.image) continue;
|
|
67
|
+
if (!isAskExeImage(svc.image)) continue;
|
|
64
68
|
const { hasDigest } = parseImageRef(svc.image);
|
|
65
69
|
if (!hasDigest) offenders.push(`${name}=${svc.image}`);
|
|
66
70
|
}
|
|
@@ -154,14 +158,13 @@ function checkEnvContract(env, compose) {
|
|
|
154
158
|
for (const m of compose.text.matchAll(/\$\{?([A-Z][A-Z0-9_]+)/g)) declared.add(m[1]);
|
|
155
159
|
}
|
|
156
160
|
const missingEnforcement = BYOK_ENFORCEMENT_VARS.filter((v) => !declared.has(v));
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
161
|
+
const aliasDeclared = BYOK_ALIAS_VARS.filter((v) => declared.has(v));
|
|
162
|
+
if (aliasDeclared.length > 0) {
|
|
159
163
|
return {
|
|
160
164
|
check: "env-contract",
|
|
161
|
-
status: "
|
|
165
|
+
status: "pass",
|
|
162
166
|
bug,
|
|
163
|
-
|
|
164
|
-
message: `BYOK env-contract mismatch \u2014 customer surface exposes ${exposedLegacy.join("/")} but billing enforcement reads ${BYOK_ENFORCEMENT_VARS.join("+")} (absent). BYOK can bypass billing.`
|
|
167
|
+
message: `BYOK enforcement satisfied via alias (${aliasDeclared.join(", ")} \u2192 byok + allow-direct-keys)`
|
|
165
168
|
};
|
|
166
169
|
}
|
|
167
170
|
if (missingEnforcement.length > 0) {
|
|
@@ -170,7 +173,7 @@ function checkEnvContract(env, compose) {
|
|
|
170
173
|
status: "warn",
|
|
171
174
|
bug,
|
|
172
175
|
offenders: missingEnforcement.map((v) => `missing ${v}`),
|
|
173
|
-
message: `billing enforcement vars not declared: ${missingEnforcement.join(", ")}`
|
|
176
|
+
message: `billing enforcement vars not declared: ${missingEnforcement.join(", ")} (and no ${BYOK_ALIAS_VARS.join("/")} alias) \u2014 defaults to metered`
|
|
174
177
|
};
|
|
175
178
|
}
|
|
176
179
|
return { check: "env-contract", status: "pass", bug, message: `BYOK enforcement vars present (${BYOK_ENFORCEMENT_VARS.join(", ")})` };
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import {
|
|
2
|
+
embed
|
|
3
|
+
} from "./chunk-XI7MFALI.js";
|
|
4
|
+
import {
|
|
5
|
+
reserveVersions,
|
|
6
|
+
vectorToBlob
|
|
7
|
+
} from "./chunk-BBLO7IAR.js";
|
|
8
|
+
import {
|
|
9
|
+
getClient
|
|
10
|
+
} from "./chunk-KWFWIJCI.js";
|
|
11
|
+
|
|
12
|
+
// src/lib/documents.ts
|
|
13
|
+
import crypto from "crypto";
|
|
14
|
+
var WIKI_AGENT_ID = "wiki";
|
|
15
|
+
var WIKI_AGENT_ROLE = "Knowledge";
|
|
16
|
+
var WIKI_TOOL_NAME = "ingest_document";
|
|
17
|
+
var DEFAULT_CHUNK_IMPORTANCE = 5;
|
|
18
|
+
var DEFAULT_CHUNK_CONFIDENCE = 0.7;
|
|
19
|
+
var DEFAULT_CHUNK_STATUS = "active";
|
|
20
|
+
var DEFAULT_SOURCE_TYPE = "upload";
|
|
21
|
+
function deriveMemorySourceType(mime, filename) {
|
|
22
|
+
const m = mime?.toLowerCase() ?? "";
|
|
23
|
+
if (m.startsWith("image/")) return "image";
|
|
24
|
+
if (m.startsWith("audio/")) return "audio";
|
|
25
|
+
if (m.startsWith("video/")) return "video";
|
|
26
|
+
if (m === "application/pdf") return "pdf";
|
|
27
|
+
if (m.startsWith("text/")) return "text";
|
|
28
|
+
const ext = filename.split(".").pop()?.toLowerCase() ?? "";
|
|
29
|
+
if (["pdf"].includes(ext)) return "pdf";
|
|
30
|
+
if (["png", "jpg", "jpeg", "gif", "webp", "svg", "bmp"].includes(ext)) return "image";
|
|
31
|
+
if (["mp3", "wav", "ogg", "flac", "aac", "m4a"].includes(ext)) return "audio";
|
|
32
|
+
if (["mp4", "webm", "mov", "avi", "mkv"].includes(ext)) return "video";
|
|
33
|
+
if (["txt", "md", "csv", "tsv", "log"].includes(ext)) return "text";
|
|
34
|
+
return "document";
|
|
35
|
+
}
|
|
36
|
+
function rowToWorkspace(row) {
|
|
37
|
+
return {
|
|
38
|
+
id: String(row.id),
|
|
39
|
+
slug: String(row.slug),
|
|
40
|
+
name: String(row.name),
|
|
41
|
+
owner_agent_id: row.owner_agent_id == null ? null : String(row.owner_agent_id),
|
|
42
|
+
created_at: String(row.created_at),
|
|
43
|
+
metadata: row.metadata == null ? null : String(row.metadata)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function rowToDocument(row) {
|
|
47
|
+
return {
|
|
48
|
+
id: String(row.id),
|
|
49
|
+
workspace_id: String(row.workspace_id),
|
|
50
|
+
filename: String(row.filename),
|
|
51
|
+
mime: row.mime == null ? null : String(row.mime),
|
|
52
|
+
source_type: row.source_type == null ? null : String(row.source_type),
|
|
53
|
+
user_id: row.user_id == null ? null : String(row.user_id),
|
|
54
|
+
uploaded_at: String(row.uploaded_at),
|
|
55
|
+
metadata: row.metadata == null ? null : String(row.metadata)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
async function resolveWorkspace(slug_or_id, name) {
|
|
59
|
+
const client = getClient();
|
|
60
|
+
const existing = await client.execute({
|
|
61
|
+
sql: "SELECT * FROM workspaces WHERE id = ? OR slug = ? LIMIT 1",
|
|
62
|
+
args: [slug_or_id, slug_or_id]
|
|
63
|
+
});
|
|
64
|
+
if (existing.rows.length > 0) {
|
|
65
|
+
return rowToWorkspace(existing.rows[0]);
|
|
66
|
+
}
|
|
67
|
+
const id = crypto.randomUUID();
|
|
68
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
69
|
+
const resolvedName = name ?? slug_or_id;
|
|
70
|
+
await client.execute({
|
|
71
|
+
sql: `INSERT INTO workspaces (id, slug, name, created_at) VALUES (?, ?, ?, ?)`,
|
|
72
|
+
args: [id, slug_or_id, resolvedName, now]
|
|
73
|
+
});
|
|
74
|
+
return {
|
|
75
|
+
id,
|
|
76
|
+
slug: slug_or_id,
|
|
77
|
+
name: resolvedName,
|
|
78
|
+
owner_agent_id: null,
|
|
79
|
+
created_at: now,
|
|
80
|
+
metadata: null
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
async function listWorkspaces(limit = 50) {
|
|
84
|
+
const client = getClient();
|
|
85
|
+
const result = await client.execute({
|
|
86
|
+
sql: "SELECT * FROM workspaces ORDER BY created_at DESC LIMIT ?",
|
|
87
|
+
args: [limit]
|
|
88
|
+
});
|
|
89
|
+
return result.rows.map((row) => rowToWorkspace(row));
|
|
90
|
+
}
|
|
91
|
+
async function resolveDefaultWorkspaceId(cwd) {
|
|
92
|
+
const client = getClient();
|
|
93
|
+
let projectName;
|
|
94
|
+
try {
|
|
95
|
+
const { getProjectName } = await import("./project-name-EWG5KAZP.js");
|
|
96
|
+
projectName = getProjectName(cwd);
|
|
97
|
+
} catch {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
if (!projectName) return null;
|
|
101
|
+
const match = await client.execute({
|
|
102
|
+
sql: "SELECT id FROM workspaces WHERE slug = ? OR name = ? ORDER BY created_at DESC LIMIT 1",
|
|
103
|
+
args: [projectName, projectName]
|
|
104
|
+
});
|
|
105
|
+
if (match.rows.length > 0) return String(match.rows[0].id);
|
|
106
|
+
const all = await client.execute("SELECT id FROM workspaces LIMIT 2");
|
|
107
|
+
if (all.rows.length === 1) return String(all.rows[0].id);
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
async function createDocument(input) {
|
|
111
|
+
const client = getClient();
|
|
112
|
+
const id = crypto.randomUUID();
|
|
113
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
114
|
+
const metadata = input.metadata != null ? JSON.stringify(input.metadata) : null;
|
|
115
|
+
await client.execute({
|
|
116
|
+
sql: `INSERT INTO documents (id, workspace_id, filename, mime, source_type, user_id, uploaded_at, metadata)
|
|
117
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
118
|
+
args: [
|
|
119
|
+
id,
|
|
120
|
+
input.workspace_id,
|
|
121
|
+
input.filename,
|
|
122
|
+
input.mime ?? null,
|
|
123
|
+
input.source_type ?? null,
|
|
124
|
+
input.user_id ?? null,
|
|
125
|
+
now,
|
|
126
|
+
metadata
|
|
127
|
+
]
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
id,
|
|
131
|
+
workspace_id: input.workspace_id,
|
|
132
|
+
filename: input.filename,
|
|
133
|
+
mime: input.mime ?? null,
|
|
134
|
+
source_type: input.source_type ?? null,
|
|
135
|
+
user_id: input.user_id ?? null,
|
|
136
|
+
uploaded_at: now,
|
|
137
|
+
metadata
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
async function embedTexts(texts) {
|
|
141
|
+
const BATCH_SIZE = 50;
|
|
142
|
+
const results = [];
|
|
143
|
+
for (let i = 0; i < texts.length; i += BATCH_SIZE) {
|
|
144
|
+
const batch = texts.slice(i, i + BATCH_SIZE);
|
|
145
|
+
const settled = await Promise.allSettled(
|
|
146
|
+
batch.map((text) => embed(text))
|
|
147
|
+
);
|
|
148
|
+
results.push(
|
|
149
|
+
...settled.map(
|
|
150
|
+
(result) => result.status === "fulfilled" ? result.value : null
|
|
151
|
+
)
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
return results;
|
|
155
|
+
}
|
|
156
|
+
function buildContextualPrefix(filename, chunks) {
|
|
157
|
+
const docSummary = chunks.map((c) => c.text).join(" ").slice(0, 200);
|
|
158
|
+
return chunks.map(
|
|
159
|
+
(chunk) => `[Document: ${filename}] ${docSummary}
|
|
160
|
+
---
|
|
161
|
+
${chunk.text}`
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
function buildChunkStatement(input) {
|
|
165
|
+
const hasVector = input.vector !== null;
|
|
166
|
+
const charOffset = input.chunk.char_offset ?? null;
|
|
167
|
+
const pageNumber = input.chunk.page_number ?? null;
|
|
168
|
+
const sql = hasVector ? `INSERT INTO memories
|
|
169
|
+
(id, agent_id, agent_role, session_id, timestamp, tool_name, project_name,
|
|
170
|
+
has_error, raw_text, vector, version, importance, status, confidence,
|
|
171
|
+
last_accessed, workspace_id, document_id, user_id, char_offset, page_number,
|
|
172
|
+
source_path, source_type, session_scope)
|
|
173
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, vector32(?), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` : `INSERT INTO memories
|
|
174
|
+
(id, agent_id, agent_role, session_id, timestamp, tool_name, project_name,
|
|
175
|
+
has_error, raw_text, vector, version, importance, status, confidence,
|
|
176
|
+
last_accessed, workspace_id, document_id, user_id, char_offset, page_number,
|
|
177
|
+
source_path, source_type, session_scope)
|
|
178
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`;
|
|
179
|
+
const prefix = [
|
|
180
|
+
input.chunkId,
|
|
181
|
+
WIKI_AGENT_ID,
|
|
182
|
+
WIKI_AGENT_ROLE,
|
|
183
|
+
input.documentId,
|
|
184
|
+
input.uploadedAt,
|
|
185
|
+
WIKI_TOOL_NAME,
|
|
186
|
+
input.workspace.slug,
|
|
187
|
+
0,
|
|
188
|
+
input.chunk.text
|
|
189
|
+
];
|
|
190
|
+
const suffix = [
|
|
191
|
+
input.version,
|
|
192
|
+
DEFAULT_CHUNK_IMPORTANCE,
|
|
193
|
+
DEFAULT_CHUNK_STATUS,
|
|
194
|
+
DEFAULT_CHUNK_CONFIDENCE,
|
|
195
|
+
input.uploadedAt,
|
|
196
|
+
input.workspace.id,
|
|
197
|
+
input.documentId,
|
|
198
|
+
input.userId,
|
|
199
|
+
charOffset,
|
|
200
|
+
pageNumber,
|
|
201
|
+
input.sourcePath,
|
|
202
|
+
input.sourceType,
|
|
203
|
+
input.sessionScope
|
|
204
|
+
];
|
|
205
|
+
const args = hasVector ? [...prefix, vectorToBlob(input.vector), ...suffix] : [...prefix, ...suffix];
|
|
206
|
+
return { sql, args };
|
|
207
|
+
}
|
|
208
|
+
async function ingestDocument(input) {
|
|
209
|
+
if (input.chunks.length === 0) {
|
|
210
|
+
throw new Error("ingestDocument: chunks array must not be empty");
|
|
211
|
+
}
|
|
212
|
+
const workspace = await resolveWorkspace(input.workspace_id);
|
|
213
|
+
const fullText = input.chunks.map((c) => c.text).join(" ");
|
|
214
|
+
const summary = fullText.slice(0, 200).trim();
|
|
215
|
+
const contextPrefix = `[Document: ${input.filename}] ${summary}
|
|
216
|
+
---
|
|
217
|
+
`;
|
|
218
|
+
const enrichedChunks = input.chunks.map((chunk) => ({
|
|
219
|
+
...chunk,
|
|
220
|
+
text: `${contextPrefix}${chunk.text}`
|
|
221
|
+
}));
|
|
222
|
+
const vectors = await embedTexts(enrichedChunks.map((c) => c.text));
|
|
223
|
+
const client = getClient();
|
|
224
|
+
const documentId = crypto.randomUUID();
|
|
225
|
+
const uploadedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
226
|
+
const mime = input.mime ?? null;
|
|
227
|
+
const sourceType = input.source_type ?? DEFAULT_SOURCE_TYPE;
|
|
228
|
+
const userId = input.user_id ?? null;
|
|
229
|
+
const documentMetadata = input.document_metadata != null ? JSON.stringify(input.document_metadata) : null;
|
|
230
|
+
const chunkIds = input.chunks.map(() => crypto.randomUUID());
|
|
231
|
+
const versions = await reserveVersions(input.chunks.length);
|
|
232
|
+
const documentStmt = {
|
|
233
|
+
sql: `INSERT INTO documents
|
|
234
|
+
(id, workspace_id, filename, mime, source_type, user_id, uploaded_at, metadata)
|
|
235
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
236
|
+
args: [
|
|
237
|
+
documentId,
|
|
238
|
+
workspace.id,
|
|
239
|
+
input.filename,
|
|
240
|
+
mime,
|
|
241
|
+
sourceType,
|
|
242
|
+
userId,
|
|
243
|
+
uploadedAt,
|
|
244
|
+
documentMetadata
|
|
245
|
+
]
|
|
246
|
+
};
|
|
247
|
+
const memorySourceType = deriveMemorySourceType(input.mime, input.filename);
|
|
248
|
+
const memorySourcePath = input.filename;
|
|
249
|
+
let docSessionScope = null;
|
|
250
|
+
try {
|
|
251
|
+
const { resolveExeSession } = await import("./lib/tmux-routing.js");
|
|
252
|
+
docSessionScope = resolveExeSession() ?? null;
|
|
253
|
+
} catch {
|
|
254
|
+
}
|
|
255
|
+
const chunkStmts = enrichedChunks.map(
|
|
256
|
+
(chunk, index) => buildChunkStatement({
|
|
257
|
+
chunkId: chunkIds[index],
|
|
258
|
+
version: versions[index],
|
|
259
|
+
chunk,
|
|
260
|
+
vector: vectors[index],
|
|
261
|
+
documentId,
|
|
262
|
+
workspace,
|
|
263
|
+
userId,
|
|
264
|
+
uploadedAt,
|
|
265
|
+
sourcePath: memorySourcePath,
|
|
266
|
+
sourceType: memorySourceType,
|
|
267
|
+
sessionScope: docSessionScope
|
|
268
|
+
})
|
|
269
|
+
);
|
|
270
|
+
await client.batch([documentStmt, ...chunkStmts], "write");
|
|
271
|
+
const embedded = vectors.filter((v) => v !== null).length;
|
|
272
|
+
const originalTexts = input.chunks.map((c) => c.text);
|
|
273
|
+
import("./doc-graph-extractor-2SRTBTCN.js").then(
|
|
274
|
+
({ extractAndStoreDocumentGraph }) => extractAndStoreDocumentGraph(documentId, originalTexts)
|
|
275
|
+
).catch((err) => {
|
|
276
|
+
process.stderr.write(
|
|
277
|
+
`[documents] Graph extraction failed for ${documentId}: ${err instanceof Error ? err.message : String(err)}
|
|
278
|
+
`
|
|
279
|
+
);
|
|
280
|
+
});
|
|
281
|
+
return {
|
|
282
|
+
document_id: documentId,
|
|
283
|
+
chunk_ids: chunkIds,
|
|
284
|
+
embedded,
|
|
285
|
+
pending_backfill: input.chunks.length - embedded
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
var DEFAULT_LIST_LIMIT = 50;
|
|
289
|
+
var MIN_IMPORTANCE = 1;
|
|
290
|
+
var MAX_IMPORTANCE = 10;
|
|
291
|
+
async function getDocument(id) {
|
|
292
|
+
const client = getClient();
|
|
293
|
+
const result = await client.execute({
|
|
294
|
+
sql: "SELECT * FROM documents WHERE id = ?",
|
|
295
|
+
args: [id]
|
|
296
|
+
});
|
|
297
|
+
if (result.rows.length === 0) return null;
|
|
298
|
+
return rowToDocument(result.rows[0]);
|
|
299
|
+
}
|
|
300
|
+
async function listDocumentsByWorkspace(workspace_id, limit = DEFAULT_LIST_LIMIT, offset = 0) {
|
|
301
|
+
const client = getClient();
|
|
302
|
+
const result = await client.execute({
|
|
303
|
+
sql: `SELECT d.*, COUNT(m.id) AS chunk_count
|
|
304
|
+
FROM documents d
|
|
305
|
+
LEFT JOIN memories m ON m.document_id = d.id
|
|
306
|
+
WHERE d.workspace_id = ?
|
|
307
|
+
GROUP BY d.id
|
|
308
|
+
ORDER BY d.uploaded_at DESC
|
|
309
|
+
LIMIT ? OFFSET ?`,
|
|
310
|
+
args: [workspace_id, limit, offset]
|
|
311
|
+
});
|
|
312
|
+
return result.rows.map((row) => {
|
|
313
|
+
const r = row;
|
|
314
|
+
return {
|
|
315
|
+
...rowToDocument(r),
|
|
316
|
+
chunk_count: Number(r.chunk_count) || 0
|
|
317
|
+
};
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
async function deleteDocumentAndChunks(id) {
|
|
321
|
+
const client = getClient();
|
|
322
|
+
const countResult = await client.execute({
|
|
323
|
+
sql: "SELECT COUNT(*) AS cnt FROM memories WHERE document_id = ? AND COALESCE(status, 'active') = 'active'",
|
|
324
|
+
args: [id]
|
|
325
|
+
});
|
|
326
|
+
const deletedChunks = Number(countResult.rows[0]?.cnt) || 0;
|
|
327
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
328
|
+
await client.batch(
|
|
329
|
+
[
|
|
330
|
+
{ sql: "UPDATE memories SET status = 'deleted', deleted_at = ? WHERE document_id = ? AND COALESCE(status, 'active') = 'active'", args: [now, id] },
|
|
331
|
+
{ sql: "DELETE FROM documents WHERE id = ?", args: [id] }
|
|
332
|
+
],
|
|
333
|
+
"write"
|
|
334
|
+
);
|
|
335
|
+
return { deletedChunks, deletedVectors: deletedChunks };
|
|
336
|
+
}
|
|
337
|
+
async function updateChunksImportance(document_id, importance) {
|
|
338
|
+
if (!Number.isInteger(importance) || importance < MIN_IMPORTANCE || importance > MAX_IMPORTANCE) {
|
|
339
|
+
throw new Error(
|
|
340
|
+
`importance must be an integer between ${MIN_IMPORTANCE} and ${MAX_IMPORTANCE} (got ${importance})`
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
const client = getClient();
|
|
344
|
+
const result = await client.execute({
|
|
345
|
+
sql: "UPDATE memories SET importance = ? WHERE document_id = ?",
|
|
346
|
+
args: [importance, document_id]
|
|
347
|
+
});
|
|
348
|
+
return Number(result.rowsAffected) || 0;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
export {
|
|
352
|
+
rowToWorkspace,
|
|
353
|
+
rowToDocument,
|
|
354
|
+
resolveWorkspace,
|
|
355
|
+
listWorkspaces,
|
|
356
|
+
resolveDefaultWorkspaceId,
|
|
357
|
+
createDocument,
|
|
358
|
+
buildContextualPrefix,
|
|
359
|
+
ingestDocument,
|
|
360
|
+
DEFAULT_LIST_LIMIT,
|
|
361
|
+
MIN_IMPORTANCE,
|
|
362
|
+
MAX_IMPORTANCE,
|
|
363
|
+
getDocument,
|
|
364
|
+
listDocumentsByWorkspace,
|
|
365
|
+
deleteDocumentAndChunks,
|
|
366
|
+
updateChunksImportance
|
|
367
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateTask
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AHIUTOZS.js";
|
|
4
4
|
import {
|
|
5
5
|
TASK_ALREADY_CLAIMED_PREFIX
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HEXJWMFX.js";
|
|
7
7
|
|
|
8
8
|
// src/mcp/tools/update-task.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -40,7 +40,7 @@ function registerUpdateTask(server) {
|
|
|
40
40
|
let callerAgentId;
|
|
41
41
|
let callerSession;
|
|
42
42
|
try {
|
|
43
|
-
const { getActiveAgent: getAgent } = await import("./active-agent-
|
|
43
|
+
const { getActiveAgent: getAgent } = await import("./active-agent-WFNMZBPP.js");
|
|
44
44
|
callerAgentId = getAgent().agentId;
|
|
45
45
|
const { getAgentContext } = await import("./agent-context-AZTTMUHP.js");
|
|
46
46
|
callerSession = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || void 0;
|
|
@@ -87,7 +87,7 @@ async function getRetrievalHealth() {
|
|
|
87
87
|
const coveragePct = totalMemories > 0 ? Math.round(memoriesWithVectors / totalMemories * 100) : null;
|
|
88
88
|
let dbRestore = { hasEvents: false, count: 0, last: null, quarantineFiles: 0 };
|
|
89
89
|
try {
|
|
90
|
-
const { getDbRestoreHealth } = await import("./db-restore-events-
|
|
90
|
+
const { getDbRestoreHealth } = await import("./db-restore-events-3A57GMLW.js");
|
|
91
91
|
dbRestore = getDbRestoreHealth();
|
|
92
92
|
} catch {
|
|
93
93
|
}
|
|
@@ -24,6 +24,38 @@ var FRONTEND_URLS = {
|
|
|
24
24
|
"exe-monitor-hub": "http://127.0.0.1:8090"
|
|
25
25
|
};
|
|
26
26
|
var GOTRUE_TOKEN_URL = "http://127.0.0.1:9999/token?grant_type=password";
|
|
27
|
+
function parseComposeServiceNames(composeFile) {
|
|
28
|
+
const names = /* @__PURE__ */ new Set();
|
|
29
|
+
if (!existsSync(composeFile)) return names;
|
|
30
|
+
let raw;
|
|
31
|
+
try {
|
|
32
|
+
raw = readFileSync(composeFile, "utf8");
|
|
33
|
+
} catch {
|
|
34
|
+
return names;
|
|
35
|
+
}
|
|
36
|
+
let inServices = false;
|
|
37
|
+
for (const line of raw.split(/\r?\n/)) {
|
|
38
|
+
if (!line.trim() || line.trim().startsWith("#")) continue;
|
|
39
|
+
const indent = line.length - line.trimStart().length;
|
|
40
|
+
const trimmed = line.trim();
|
|
41
|
+
if (indent === 0) {
|
|
42
|
+
inServices = /^services:\s*$/.test(trimmed);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (inServices && indent === 2 && /^[a-zA-Z0-9_-]+:\s*$/.test(trimmed)) {
|
|
46
|
+
names.add(trimmed.replace(/:.*$/, ""));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return names;
|
|
50
|
+
}
|
|
51
|
+
function filterToDeployed(map, deployed) {
|
|
52
|
+
if (deployed.size === 0) return map;
|
|
53
|
+
const out = {};
|
|
54
|
+
for (const [name, val] of Object.entries(map)) {
|
|
55
|
+
if (deployed.has(name)) out[name] = val;
|
|
56
|
+
}
|
|
57
|
+
return out;
|
|
58
|
+
}
|
|
27
59
|
function loadEnvFile(envPath) {
|
|
28
60
|
if (!existsSync(envPath)) return {};
|
|
29
61
|
const raw = readFileSync(envPath, "utf8");
|
|
@@ -137,10 +169,14 @@ async function checkContainersHealthy(composeFile) {
|
|
|
137
169
|
return { check, status: "fail", message: err instanceof Error ? err.message : String(err) };
|
|
138
170
|
}
|
|
139
171
|
}
|
|
140
|
-
async function checkServiceUrls() {
|
|
172
|
+
async function checkServiceUrls(deployed) {
|
|
141
173
|
const check = "All service URLs respond 200";
|
|
174
|
+
const urls = filterToDeployed(SERVICE_URLS, deployed);
|
|
175
|
+
if (Object.keys(urls).length === 0) {
|
|
176
|
+
return { check, status: "skip", message: "No HTTP services deployed in this selection" };
|
|
177
|
+
}
|
|
142
178
|
const failures = [];
|
|
143
|
-
for (const [service, url] of Object.entries(
|
|
179
|
+
for (const [service, url] of Object.entries(urls)) {
|
|
144
180
|
try {
|
|
145
181
|
const res = await httpGet(url, CHECK_TIMEOUT_MS);
|
|
146
182
|
if (res.status !== 200) {
|
|
@@ -153,10 +189,13 @@ async function checkServiceUrls() {
|
|
|
153
189
|
if (failures.length > 0) {
|
|
154
190
|
return { check, status: "fail", message: failures.join("; ") };
|
|
155
191
|
}
|
|
156
|
-
return { check, status: "pass", message: `${Object.keys(
|
|
192
|
+
return { check, status: "pass", message: `${Object.keys(urls).length} services responding` };
|
|
157
193
|
}
|
|
158
|
-
async function checkGoTrueLogin(env) {
|
|
194
|
+
async function checkGoTrueLogin(env, deployed) {
|
|
159
195
|
const check = "GoTrue login works";
|
|
196
|
+
if (deployed.size > 0 && !deployed.has("gotrue")) {
|
|
197
|
+
return { result: { check, status: "skip", message: "gotrue not deployed in this selection" } };
|
|
198
|
+
}
|
|
160
199
|
const email = env.GOTRUE_TEST_EMAIL || process.env.GOTRUE_TEST_EMAIL;
|
|
161
200
|
const password = env.GOTRUE_TEST_PASSWORD || process.env.GOTRUE_TEST_PASSWORD;
|
|
162
201
|
if (!email || !password) {
|
|
@@ -178,8 +217,11 @@ async function checkGoTrueLogin(env) {
|
|
|
178
217
|
return { result: { check, status: "fail", message: err instanceof Error ? err.message : String(err) } };
|
|
179
218
|
}
|
|
180
219
|
}
|
|
181
|
-
async function checkWhatsAppConnected() {
|
|
220
|
+
async function checkWhatsAppConnected(deployed) {
|
|
182
221
|
const check = "WhatsApp still connected";
|
|
222
|
+
if (deployed.size > 0 && !deployed.has("exe-gateway")) {
|
|
223
|
+
return { check, status: "skip", message: "exe-gateway not deployed in this selection" };
|
|
224
|
+
}
|
|
183
225
|
try {
|
|
184
226
|
const res = await httpGet(SERVICE_URLS["exe-gateway"], CHECK_TIMEOUT_MS);
|
|
185
227
|
if (res.status !== 200) {
|
|
@@ -205,10 +247,14 @@ async function checkWhatsAppConnected() {
|
|
|
205
247
|
return { check, status: "fail", message: err instanceof Error ? err.message : String(err) };
|
|
206
248
|
}
|
|
207
249
|
}
|
|
208
|
-
async function checkFrontendsLoad() {
|
|
250
|
+
async function checkFrontendsLoad(deployed) {
|
|
209
251
|
const check = "Each frontend loads";
|
|
252
|
+
const urls = filterToDeployed(FRONTEND_URLS, deployed);
|
|
253
|
+
if (Object.keys(urls).length === 0) {
|
|
254
|
+
return { check, status: "skip", message: "No frontends deployed in this selection" };
|
|
255
|
+
}
|
|
210
256
|
const failures = [];
|
|
211
|
-
for (const [service, url] of Object.entries(
|
|
257
|
+
for (const [service, url] of Object.entries(urls)) {
|
|
212
258
|
try {
|
|
213
259
|
const res = await httpGet(url, CHECK_TIMEOUT_MS);
|
|
214
260
|
if (!res.contentType.includes("text/html")) {
|
|
@@ -223,10 +269,13 @@ async function checkFrontendsLoad() {
|
|
|
223
269
|
if (failures.length > 0) {
|
|
224
270
|
return { check, status: "fail", message: failures.join("; ") };
|
|
225
271
|
}
|
|
226
|
-
return { check, status: "pass", message: `${Object.keys(
|
|
272
|
+
return { check, status: "pass", message: `${Object.keys(urls).length} frontends serving HTML` };
|
|
227
273
|
}
|
|
228
|
-
async function checkMonitorMetrics() {
|
|
274
|
+
async function checkMonitorMetrics(deployed) {
|
|
229
275
|
const check = "Monitor reports metrics";
|
|
276
|
+
if (deployed.size > 0 && !deployed.has("exe-monitor-hub")) {
|
|
277
|
+
return { check, status: "skip", message: "exe-monitor-hub not deployed in this selection" };
|
|
278
|
+
}
|
|
230
279
|
try {
|
|
231
280
|
const res = await httpGet(SERVICE_URLS["exe-monitor-hub"], CHECK_TIMEOUT_MS);
|
|
232
281
|
if (res.status !== 200) {
|
|
@@ -264,15 +313,18 @@ async function checkRawPipeline(env) {
|
|
|
264
313
|
return { check, status: "fail", message: msg.slice(0, 200) };
|
|
265
314
|
}
|
|
266
315
|
}
|
|
267
|
-
async function checkCrossServiceAuth(jwt) {
|
|
316
|
+
async function checkCrossServiceAuth(jwt, deployed) {
|
|
268
317
|
const check = "Cross-service auth";
|
|
269
318
|
if (!jwt) {
|
|
270
319
|
return { check, status: "skip", message: "No GoTrue JWT available (check 3 skipped or failed)" };
|
|
271
320
|
}
|
|
272
|
-
const targets = {
|
|
321
|
+
const targets = filterToDeployed({
|
|
273
322
|
"exe-wiki": "http://127.0.0.1:3001/api/ping",
|
|
274
323
|
"exe-crm": "http://127.0.0.1:3000/healthz"
|
|
275
|
-
};
|
|
324
|
+
}, deployed);
|
|
325
|
+
if (Object.keys(targets).length === 0) {
|
|
326
|
+
return { check, status: "skip", message: "No JWT-consuming services (wiki/CRM) deployed in this selection" };
|
|
327
|
+
}
|
|
276
328
|
const failures = [];
|
|
277
329
|
for (const [service, url] of Object.entries(targets)) {
|
|
278
330
|
try {
|
|
@@ -295,6 +347,7 @@ async function runVerifyStack(options) {
|
|
|
295
347
|
const totalTimeout = options?.timeoutMs ?? TOTAL_TIMEOUT_MS;
|
|
296
348
|
const env = loadEnvFile(envFile);
|
|
297
349
|
const results = [];
|
|
350
|
+
const deployed = parseComposeServiceNames(composeFile);
|
|
298
351
|
const deadline = Date.now() + totalTimeout;
|
|
299
352
|
const addResult = (r) => {
|
|
300
353
|
results.push(r);
|
|
@@ -304,20 +357,20 @@ async function runVerifyStack(options) {
|
|
|
304
357
|
};
|
|
305
358
|
addResult(await checkContainersHealthy(composeFile));
|
|
306
359
|
if (Date.now() > deadline) return summarize(results);
|
|
307
|
-
addResult(await checkServiceUrls());
|
|
360
|
+
addResult(await checkServiceUrls(deployed));
|
|
308
361
|
if (Date.now() > deadline) return summarize(results);
|
|
309
|
-
const goTrueResult = await checkGoTrueLogin(env);
|
|
362
|
+
const goTrueResult = await checkGoTrueLogin(env, deployed);
|
|
310
363
|
addResult(goTrueResult.result);
|
|
311
364
|
if (Date.now() > deadline) return summarize(results);
|
|
312
|
-
addResult(await checkWhatsAppConnected());
|
|
365
|
+
addResult(await checkWhatsAppConnected(deployed));
|
|
313
366
|
if (Date.now() > deadline) return summarize(results);
|
|
314
|
-
addResult(await checkFrontendsLoad());
|
|
367
|
+
addResult(await checkFrontendsLoad(deployed));
|
|
315
368
|
if (Date.now() > deadline) return summarize(results);
|
|
316
|
-
addResult(await checkMonitorMetrics());
|
|
369
|
+
addResult(await checkMonitorMetrics(deployed));
|
|
317
370
|
if (Date.now() > deadline) return summarize(results);
|
|
318
371
|
addResult(await checkRawPipeline(env));
|
|
319
372
|
if (Date.now() > deadline) return summarize(results);
|
|
320
|
-
addResult(await checkCrossServiceAuth(goTrueResult.jwt));
|
|
373
|
+
addResult(await checkCrossServiceAuth(goTrueResult.jwt, deployed));
|
|
321
374
|
return summarize(results);
|
|
322
375
|
}
|
|
323
376
|
function summarize(results) {
|
|
@@ -384,5 +437,6 @@ if (isMainModule(import.meta.url) && process.argv[1]?.includes("verify-stack"))
|
|
|
384
437
|
}
|
|
385
438
|
|
|
386
439
|
export {
|
|
440
|
+
parseComposeServiceNames,
|
|
387
441
|
runVerifyStack
|
|
388
442
|
};
|
|
@@ -212,7 +212,7 @@ async function main(args) {
|
|
|
212
212
|
console.log("[health-gate] Starting rollback...");
|
|
213
213
|
restorePreDeployBackup();
|
|
214
214
|
try {
|
|
215
|
-
const { rollbackStackUpdate, defaultStackPaths } = await import("./stack-update-
|
|
215
|
+
const { rollbackStackUpdate, defaultStackPaths } = await import("./stack-update-K6X7ZMQE.js");
|
|
216
216
|
const paths = defaultStackPaths();
|
|
217
217
|
await rollbackStackUpdate({
|
|
218
218
|
manifestRef: paths.manifestRef,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionScopeFilter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HEXJWMFX.js";
|
|
4
4
|
import {
|
|
5
5
|
getClient,
|
|
6
6
|
getIdentity
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KWFWIJCI.js";
|
|
8
8
|
import {
|
|
9
9
|
getEmotionalBaseline
|
|
10
10
|
} from "./chunk-PNQDP3OA.js";
|
|
@@ -643,7 +643,7 @@ var DreamingEngine = class {
|
|
|
643
643
|
}
|
|
644
644
|
let overdueProspective = [];
|
|
645
645
|
try {
|
|
646
|
-
const { getOverdueProspective, completeProspective } = await import("./prospective-memory-
|
|
646
|
+
const { getOverdueProspective, completeProspective } = await import("./prospective-memory-YHUWPNOO.js");
|
|
647
647
|
const overdue = await getOverdueProspective(agentId);
|
|
648
648
|
overdueProspective = overdue.map((o) => ({
|
|
649
649
|
id: o.id,
|