@askexenow/exe-os 0.9.312 → 0.9.313
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-EWF2HJ3W.js} +6 -6
- package/dist/{active-agent-S5T2YMOR.js → active-agent-FFN5ARMC.js} +6 -6
- package/dist/{agentic-ontology-6KBAXLSJ.js → agentic-ontology-AAUATKUS.js} +1 -1
- package/dist/{backfill-metadata-FV7GX6AS.js → backfill-metadata-FBYFDOTH.js} +7 -7
- package/dist/{background-jobs-A2LV36UX.js → background-jobs-2QZ5IQKE.js} +5 -3
- package/dist/{behaviors-47CPEKJ7.js → behaviors-PQ77IPJR.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-2U3XWCDP.js} +5 -5
- package/dist/{capacity-monitor-BUKYPSWR.js → capacity-monitor-ZRLW7TVL.js} +16 -16
- package/dist/{catchup-brief-X5IVQAOH.js → catchup-brief-FSBZVYPL.js} +18 -18
- package/dist/{chunk-PMEOSD6S.js → chunk-24BUDF3J.js} +9 -6
- package/dist/{chunk-2NVEKSSP.js → chunk-2FULKRDO.js} +56 -38
- package/dist/{chunk-QB5JOGPK.js → chunk-2PI6JBJL.js} +5 -4
- package/dist/{chunk-MTIJ2NXY.js → chunk-2PWRUIKZ.js} +1 -1
- package/dist/{chunk-NIZQ3CIS.js → chunk-3AMGSCRH.js} +1 -1
- package/dist/{chunk-7ODTYODO.js → chunk-3LGID56M.js} +10 -7
- package/dist/{chunk-GSY6HL3T.js → chunk-4JI54RHR.js} +5 -5
- package/dist/{chunk-ISILDO7P.js → chunk-4THK7IA4.js} +1 -1
- package/dist/{chunk-IRIPGGGL.js → chunk-4UHQYBMQ.js} +1 -1
- package/dist/{chunk-HQODUV3G.js → chunk-552IGUBB.js} +2 -2
- package/dist/{chunk-IRHNV4GY.js → chunk-5KLQCGI5.js} +72 -18
- package/dist/{chunk-SOT23KWW.js → chunk-63UEWYM3.js} +4 -4
- package/dist/{chunk-QE7UVQDP.js → chunk-6PR2RAKM.js} +1 -1
- package/dist/{chunk-ZZXADKAP.js → chunk-6SPUK67A.js} +2 -2
- package/dist/{chunk-RVXWGPD3.js → chunk-75TM3APG.js} +29 -6
- package/dist/{chunk-IZPO6IOZ.js → chunk-7QSXARI3.js} +1 -1
- package/dist/{chunk-A2YZG4AD.js → chunk-AIUXE3ZJ.js} +6 -6
- package/dist/{chunk-U63BZI2B.js → chunk-AJERMFD6.js} +3 -3
- package/dist/{chunk-BUOMSIXH.js → chunk-BMNX3YWX.js} +2 -2
- package/dist/{chunk-YUBTHJVV.js → chunk-BRSMAFBN.js} +1 -1
- package/dist/{chunk-JZW5AOWI.js → chunk-BSPALHIR.js} +2 -2
- package/dist/{chunk-VDYUKTNS.js → chunk-CLAYNAXC.js} +4 -5
- package/dist/{chunk-J3QZPDNH.js → chunk-CNQ25C4C.js} +1 -1
- package/dist/{chunk-GWPICNSO.js → chunk-CSTL7BMK.js} +49 -4
- package/dist/{chunk-5DPE7B7K.js → chunk-CTYHSVHP.js} +1 -1
- package/dist/{chunk-EM4EYF3P.js → chunk-CVTWQZOR.js} +13 -5
- package/dist/{chunk-JNARUXDC.js → chunk-CW3FPWUW.js} +2 -2
- package/dist/{chunk-V42BSVX6.js → chunk-CWACO2D4.js} +51 -4
- package/dist/{chunk-RPBTYQKJ.js → chunk-CWUCD7C7.js} +1 -1
- package/dist/{chunk-DFUCFLZH.js → chunk-D4EMVYI7.js} +2 -2
- package/dist/{chunk-W2J2RF5N.js → chunk-DIHMGQGV.js} +3 -3
- package/dist/{chunk-YB7U4WTY.js → chunk-DJ4RG3RK.js} +2 -2
- package/dist/{chunk-KSMITUGY.js → chunk-DR7QPGX4.js} +3 -3
- package/dist/{chunk-QNXM2HXW.js → chunk-ELFFRVNL.js} +1 -1
- package/dist/{chunk-QEGXNJGR.js → chunk-EV2SMRLF.js} +4 -4
- package/dist/{chunk-VFSYVQX4.js → chunk-F3QMXKKJ.js} +8 -2
- package/dist/{chunk-NCC3F6GM.js → chunk-F5XPKUPK.js} +2 -2
- package/dist/{chunk-43R2GILO.js → chunk-FIBL4JRZ.js} +2 -2
- package/dist/{chunk-B2J3BBJC.js → chunk-FQH4R6UG.js} +2 -2
- package/dist/{chunk-AC6DKMVS.js → chunk-FSAKWKWU.js} +1 -1
- package/dist/{chunk-GL5NU6IK.js → chunk-FXS5OFGH.js} +1 -1
- package/dist/{chunk-K7KBAJQL.js → chunk-GHJRLETI.js} +10 -10
- package/dist/{chunk-VQRTO7IS.js → chunk-H73TUI4Y.js} +9 -2
- package/dist/{chunk-IIHE3FNC.js → chunk-HSXWUZOD.js} +3 -3
- package/dist/{chunk-JV225JBX.js → chunk-I6RHLHVW.js} +2 -2
- package/dist/{chunk-S6HVQF27.js → chunk-IEDCQRGG.js} +88 -4
- package/dist/{chunk-4Q5VNQTV.js → chunk-IFSOVXGN.js} +3 -3
- package/dist/{chunk-JMHKK7A5.js → chunk-ITVMRPCQ.js} +1 -1
- package/dist/{chunk-VT6P7FV4.js → chunk-IU44MPY3.js} +1 -1
- package/dist/{chunk-6OD2RVIA.js → chunk-IXTDBQYU.js} +273 -397
- package/dist/{chunk-2NGPZCWX.js → chunk-JB7QUK3D.js} +3 -3
- package/dist/{chunk-VT2B5BHM.js → chunk-JBSCL2XT.js} +2 -1
- package/dist/{chunk-MPX3TRMQ.js → chunk-JD5S5AAV.js} +1 -1
- package/dist/{chunk-XYG722JW.js → chunk-JIJKUZIO.js} +3 -3
- package/dist/{chunk-KMIAYKIH.js → chunk-K5C6LC2G.js} +159 -39
- package/dist/{chunk-DAOHCXM2.js → chunk-KH6BCYLC.js} +1 -1
- package/dist/{chunk-4L4R6AQJ.js → chunk-KMI4TUTW.js} +1 -1
- package/dist/{chunk-PHFPIUWU.js → chunk-KWOAM7TA.js} +3 -0
- package/dist/{chunk-RZJ6DXVE.js → chunk-L6QI2NNG.js} +1 -1
- package/dist/{chunk-HED6D5KR.js → chunk-MMNMQNLD.js} +43 -29
- package/dist/{chunk-KAVUTP5G.js → chunk-N3CRJ2VW.js} +3 -3
- package/dist/{chunk-OBJXZII2.js → chunk-N7LBAQGK.js} +3 -3
- package/dist/{chunk-LMX7UKGX.js → chunk-OUAGTQC4.js} +17 -11
- package/dist/{chunk-WZBUKC5N.js → chunk-OUJI2ZTY.js} +2 -2
- package/dist/{chunk-YUGLOZOR.js → chunk-OXTZEKVA.js} +1 -1
- package/dist/{chunk-OR3TAZL3.js → chunk-P4ULFI2N.js} +1 -1
- package/dist/{chunk-6LNSZADA.js → chunk-PVC4RNHQ.js} +50 -11
- package/dist/{chunk-FM7XZDZI.js → chunk-R2WP3XIN.js} +1 -1
- package/dist/{chunk-IBDPPBFK.js → chunk-R5IPZ5ZC.js} +1 -1
- package/dist/{chunk-7WDIGRSO.js → chunk-R5TZ2FC3.js} +1 -1
- package/dist/{chunk-2UVN2NBN.js → chunk-RICNNGYH.js} +3 -3
- package/dist/{chunk-WBJXJ2R4.js → chunk-RLBVY5FE.js} +17 -14
- package/dist/{chunk-XXJRZ75E.js → chunk-RV634O2W.js} +5 -2
- package/dist/{chunk-3KH6GXXX.js → chunk-RYPFOZQH.js} +2 -2
- package/dist/{chunk-DNFU56ZS.js → chunk-SB7W6XI4.js} +1 -1
- package/dist/{chunk-PPXQE7AS.js → chunk-SE6MLUOK.js} +33 -34
- package/dist/{chunk-65DBIEM2.js → chunk-SHIICYJW.js} +7 -1
- package/dist/{chunk-KPVVTHPK.js → chunk-SRMNWAHN.js} +15 -10
- package/dist/chunk-T2DJR7ND.js +367 -0
- package/dist/{chunk-Z6H6Y4BS.js → chunk-TA22MGGN.js} +1 -1
- package/dist/{chunk-ZOVHXTGC.js → chunk-TN7SC2ZQ.js} +1 -1
- package/dist/{chunk-XV5HRIXG.js → chunk-TRPGNCVB.js} +8 -8
- package/dist/{chunk-4BANMHJ5.js → chunk-UDZP2SHJ.js} +3 -3
- package/dist/{chunk-GMZMBLHT.js → chunk-UM6WUSQ7.js} +2 -2
- package/dist/{chunk-2EJ636HI.js → chunk-UST3MKK7.js} +1 -1
- package/dist/{chunk-RQ7OVXUZ.js → chunk-V2CZVZUO.js} +2 -2
- package/dist/{chunk-4RJJ5FJ2.js → chunk-V4UKBUUA.js} +1 -1
- package/dist/{chunk-EOS7VPVT.js → chunk-VA2MDALR.js} +8 -8
- package/dist/{chunk-SCYWCWKY.js → chunk-VG4ZH2Z3.js} +24 -10
- package/dist/{chunk-255DIG4B.js → chunk-VHLI6CTD.js} +1 -1
- package/dist/{chunk-DFIOOK5R.js → chunk-WCES22KG.js} +4 -3
- package/dist/{chunk-5A6KTWQL.js → chunk-WOTKNUKK.js} +126 -2
- package/dist/{chunk-62UZWGFX.js → chunk-WZZBGGSD.js} +63 -2
- package/dist/{chunk-ELXR65AN.js → chunk-X2FHTDIU.js} +6 -3
- package/dist/{chunk-V4BW5HFQ.js → chunk-X5I5QRC2.js} +3 -3
- package/dist/{chunk-X4AFBL4N.js → chunk-XCORXJ3M.js} +1 -1
- package/dist/{chunk-66JPZELX.js → chunk-Y5CNGG4F.js} +24 -16
- package/dist/{chunk-SPOXL7HF.js → chunk-YEWNIBNA.js} +9 -9
- package/dist/{chunk-WJ2PZGRV.js → chunk-ZAA344BL.js} +29 -2
- package/dist/{chunk-TN2YCFQE.js → chunk-ZGLJ2VD7.js} +5 -5
- package/dist/{co-activation-WN25AJOC.js → co-activation-RH46OQ3N.js} +5 -5
- package/dist/{co-occurrence-YP2Q3OEA.js → co-occurrence-MJWERUWY.js} +5 -5
- package/dist/{code-context-index-ZWONKBKX.js → code-context-index-WFUBYGQT.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-4R7SXTNB.js} +1 -1
- package/dist/{crm-webhook-DGPHULOO.js → crm-webhook-YDXX5FDK.js} +2 -2
- package/dist/{cto-delegation-gate-OF2A3TSS.js → cto-delegation-gate-ZJHLPK4Y.js} +14 -14
- package/dist/{daemon-auth-N6P2MZAV.js → daemon-auth-5FCYVQIZ.js} +3 -3
- package/dist/{daemon-orchestration-G4RRTPP7.js → daemon-orchestration-NBU5RZ2O.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-BTL2FBBL.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-ADYRG7DB.js} +5 -5
- package/dist/documents-VWPZTDFA.js +56 -0
- package/dist/{dreaming-Q4E3WBGY.js → dreaming-76WKGTL6.js} +15 -15
- package/dist/embeddings-config-FANLORDH.js +21 -0
- package/dist/{exe-drift-CI5R6GUT.js → exe-drift-T3IO2SPX.js} +6 -6
- package/dist/{exe-export-HQIQASIT.js → exe-export-6YEHSJMP.js} +9 -9
- package/dist/{exe-import-ULZK56WC.js → exe-import-3NERK63O.js} +9 -9
- package/dist/{exe-key-ILNSBGRN.js → exe-key-RCMBMLSQ.js} +8 -8
- package/dist/{exe-org-WQWQZRLR.js → exe-org-KCOOLUTW.js} +3 -3
- package/dist/{exe-snapshot-RUZTWZOF.js → exe-snapshot-JIY7MNRI.js} +18 -18
- package/dist/{fast-db-init-KNJRL7T3.js → fast-db-init-PVJ72264.js} +1 -1
- package/dist/{founder-context-QCTMEK66.js → founder-context-A4VUEKDH.js} +4 -4
- package/dist/gateway/index.js +17 -17
- package/dist/{git-staleness-KIA5YI4H.js → git-staleness-IOAHAGBI.js} +5 -5
- package/dist/{git-task-sweep-WH6QE7HL.js → git-task-sweep-IGM5RILF.js} +17 -15
- package/dist/{global-procedures-SYZZCGDS.js → global-procedures-VZL2X4RK.js} +6 -6
- package/dist/{graph-auto-extract-J2TIWZEE.js → graph-auto-extract-TIXRGBC5.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-PSDYMGN7.js → installer-D7D5O4KL.js} +10 -10
- package/dist/{installer-3NB3IBHF.js → installer-EQP2EMNZ.js} +10 -10
- package/dist/{installer-IIJFCTMH.js → installer-IWRYH55Z.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-PZOP7S2S.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-23DHJAU4.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-CNLMHSZC.js} +5 -5
- package/dist/{memory-graph-extractor-PM4Q2KJG.js → memory-graph-extractor-HIXP2BQS.js} +6 -6
- package/dist/{memory-poisoning-defense-ECXSX7HK.js → memory-poisoning-defense-YL53IBBF.js} +5 -5
- package/dist/{memory-queue-VAE6WMSS.js → memory-queue-3Q5P43AM.js} +3 -3
- package/dist/memory-queue-client-YP2QKX6J.js +16 -0
- package/dist/{memory-reflection-PXF6YFDU.js → memory-reflection-VHQRUZWK.js} +5 -5
- package/dist/{notifications-UP7WQGG4.js → notifications-Q5NEAP6K.js} +14 -14
- package/dist/{orchestration-events-PZLLPCKY.js → orchestration-events-7SNWRJYE.js} +6 -6
- package/dist/{orchestration-phase-SJOXDB7X.js → orchestration-phase-U45T4VG3.js} +3 -3
- package/dist/{orchestrator-PUT45J4O.js → orchestrator-XWLKNWUG.js} +16 -16
- package/dist/{pipeline-router-5CRWKESM.js → pipeline-router-5IBJBH7P.js} +6 -6
- package/dist/{plan-limits-SH2NDFNX.js → plan-limits-PBEZVHRQ.js} +8 -8
- package/dist/{preferences-YWBTKW3M.js → preferences-TYTGDXQZ.js} +2 -2
- package/dist/{project-boot-2TCPDZ4S.js → project-boot-OHEGJD2L.js} +2 -2
- package/dist/{projection-worker-HWY37MNC.js → projection-worker-HELRBNDR.js} +5 -5
- package/dist/{prospective-memory-FQSVMCGG.js → prospective-memory-N55XRGJP.js} +5 -5
- package/dist/{push-notifications-DK6XA5B3.js → push-notifications-PAFNP3EC.js} +3 -3
- package/dist/{reranker-AALRMGMM.js → reranker-MNJSTOPR.js} +3 -3
- package/dist/{retrieval-health-PNWJSJNG.js → retrieval-health-W4HNR3WX.js} +1 -1
- package/dist/{review-polling-65JZUE3T.js → review-polling-SRYZU2PI.js} +15 -15
- package/dist/runtime/index.js +22 -22
- package/dist/{session-events-EJ3OSAA6.js → session-events-L4DK5J6J.js} +15 -15
- package/dist/{session-kill-telemetry-3HGM7SNQ.js → session-kill-telemetry-U2YHKHCB.js} +15 -15
- package/dist/{session-scope-JGDYAMJO.js → session-scope-JTPHECAU.js} +14 -14
- package/dist/{setup-wizard-44LMFM2C.js → setup-wizard-IP5R66LR.js} +3 -3
- package/dist/{shard-manager-KUCJPLC6.js → shard-manager-RASGFMGS.js} +3 -3
- package/dist/{skill-refinement-DUOO6B7V.js → skill-refinement-VTYL4OMJ.js} +5 -5
- package/dist/{stack-release-XYMKU7NT.js → stack-release-TOCCJQOF.js} +244 -45
- package/dist/{stack-update-TUBZTY7Z.js → stack-update-MRNVHUZZ.js} +11 -5
- package/dist/{steward-gate-6NWRDLX2.js → steward-gate-JEVUDTBI.js} +6 -6
- package/dist/{task-enforcement-UOULTGFB.js → task-enforcement-VFSAAZUN.js} +14 -14
- package/dist/{task-scope-P5STKYAC.js → task-scope-P4VLIQNP.js} +14 -14
- package/dist/{tasks-crud-24HMTULR.js → tasks-crud-SC3ERIUR.js} +14 -14
- package/dist/{tasks-notify-LAIU7UUI.js → tasks-notify-WJYBUCIB.js} +15 -15
- package/dist/{tasks-review-AFJAU2DY.js → tasks-review-XPVPHCGD.js} +14 -14
- package/dist/{telemetry-upload-DWFGC2XJ.js → telemetry-upload-4QEYQROW.js} +10 -10
- package/dist/{token-budget-4RFZKWGH.js → token-budget-UBOP3HVE.js} +6 -6
- package/dist/{tool-capability-index-ZEXBWKUZ.js → tool-capability-index-SHYCBE2Z.js} +1 -1
- package/dist/{tool-telemetry-BS5JXM5M.js → tool-telemetry-CDNPES5B.js} +1 -1
- package/dist/tui/App.js +27 -27
- package/dist/{tui-data-UNO5B7PU.js → tui-data-HVYY7GRK.js} +14 -14
- package/dist/{worker-gate-C6CTTYMD.js → worker-gate-KQTODSUQ.js} +3 -3
- package/dist/{workflow-engine-4W2KYCDV.js → workflow-engine-OP2DQISD.js} +2 -2
- package/dist/{working-memory-FXHQCJJE.js → working-memory-PY4AG577.js} +22 -2
- package/dist/{worktree-2CXY6NEB.js → worktree-Z2G4CP4Z.js} +7 -7
- package/dist/{worktree-sweep-K3CJFSUL.js → worktree-sweep-LWSCAZW6.js} +8 -8
- package/package.json +2 -2
- package/release-notes.json +56 -113
- package/stack.release.json +7 -7
- package/dist/memory-queue-client-HLURQEV6.js +0 -16
- /package/dist/{chunk-J3SR5MGG.js → chunk-GIS4GBZE.js} +0 -0
- /package/dist/{chunk-AE74NOE6.js → chunk-NAPBIDGH.js} +0 -0
- /package/dist/{chunk-I3DPCSDG.js → chunk-OJS2H5HR.js} +0 -0
- /package/dist/{chunk-K4BKJJ4F.js → chunk-PCRRDXGL.js} +0 -0
- /package/dist/{chunk-MQCTK6EF.js → chunk-RRYJTPVW.js} +0 -0
- /package/dist/{chunk-2NS3QRMJ.js → chunk-ZIVUMDHA.js} +0 -0
- /package/dist/{core-memory-OC5ITKKV.js → core-memory-4JWCAGJI.js} +0 -0
- /package/dist/{entity-boost-NF3LE6OJ.js → entity-boost-AU342QRK.js} +0 -0
- /package/dist/{message-queue-client-4VDU6BZY.js → message-queue-client-IXYLJJVJ.js} +0 -0
- /package/dist/{oauth-server-EWUL7DMD.js → oauth-server-F4QWESK2.js} +0 -0
- /package/dist/{webhook-pipe-DHIGZHPW.js → webhook-pipe-S4CWK6H5.js} +0 -0
- /package/dist/{wiki-acl-CONNF6ES.js → wiki-acl-6GZHUA44.js} +0 -0
- /package/dist/{wiki-client-N6PT5P7W.js → wiki-client-CIJXRMKL.js} +0 -0
|
@@ -4,31 +4,31 @@ import {
|
|
|
4
4
|
} from "./chunk-HMP5VT6A.js";
|
|
5
5
|
import {
|
|
6
6
|
createTask
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VA2MDALR.js";
|
|
8
8
|
import {
|
|
9
9
|
getActiveAgent
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BMNX3YWX.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureEmployee,
|
|
13
13
|
logTaskDispatch,
|
|
14
14
|
resolveExeSession
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MMNMQNLD.js";
|
|
16
16
|
import {
|
|
17
17
|
recordOrchestrationEventBestEffort
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-P4ULFI2N.js";
|
|
19
19
|
import {
|
|
20
20
|
getAgentRuntime,
|
|
21
21
|
validateRuntimeModel
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-2PI6JBJL.js";
|
|
23
23
|
import {
|
|
24
24
|
getLicenseSync
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-JIJKUZIO.js";
|
|
26
26
|
import {
|
|
27
27
|
getAgentContext
|
|
28
28
|
} from "./chunk-GJV3WDWM.js";
|
|
29
29
|
import {
|
|
30
30
|
isCoordinatorName
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-VG4ZH2Z3.js";
|
|
32
32
|
|
|
33
33
|
// src/mcp/tools/create-task.ts
|
|
34
34
|
import { z } from "zod";
|
|
@@ -334,7 +334,7 @@ function registerCreateTask(server) {
|
|
|
334
334
|
session_scope: sessionScope,
|
|
335
335
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
336
336
|
}), "utf-8");
|
|
337
|
-
const { recordOrchestrationEventBestEffort: recordOE } = await import("./orchestration-events-
|
|
337
|
+
const { recordOrchestrationEventBestEffort: recordOE } = await import("./orchestration-events-7SNWRJYE.js");
|
|
338
338
|
recordOE({
|
|
339
339
|
eventType: "signal.created",
|
|
340
340
|
source: "create-task.mcp",
|
|
@@ -366,7 +366,7 @@ function registerCreateTask(server) {
|
|
|
366
366
|
let projectConflictOpts = {};
|
|
367
367
|
try {
|
|
368
368
|
const { getClient } = await import("./lib/database.js");
|
|
369
|
-
const { sessionScopeFilter } = await import("./task-scope-
|
|
369
|
+
const { sessionScopeFilter } = await import("./task-scope-P4VLIQNP.js");
|
|
370
370
|
const client = getClient();
|
|
371
371
|
const scope = sessionScopeFilter(task.sessionScope || callerRoot || exeSession || null);
|
|
372
372
|
const existing = await client.execute({
|
|
@@ -495,6 +495,11 @@ Dispatch failed: ${result.error ?? "unknown"}`;
|
|
|
495
495
|
error: result.error
|
|
496
496
|
});
|
|
497
497
|
} else {
|
|
498
|
+
const noSessionMsg = `Dispatch skipped: no coordinator session resolved (callerTmux="${callerTmux}", callerSource="${callerSource}"). Task ${task.id} created but agent ${assigned_to} was NOT spawned. Auto-wake will retry.`;
|
|
499
|
+
process.stderr.write(`[create_task] ${noSessionMsg}
|
|
500
|
+
`);
|
|
501
|
+
dispatchStatus = `
|
|
502
|
+
Dispatch deferred: no coordinator session \u2014 auto-wake will spawn ${assigned_to} when a coordinator is active`;
|
|
498
503
|
recordOrchestrationEventBestEffort({
|
|
499
504
|
eventType: "dispatch.failed",
|
|
500
505
|
source: "create-task.mcp",
|
|
@@ -505,7 +510,7 @@ Dispatch failed: ${result.error ?? "unknown"}`;
|
|
|
505
510
|
projectName: project_name,
|
|
506
511
|
runtime: dispatchRuntime,
|
|
507
512
|
errorCode: "no_exe_session",
|
|
508
|
-
payload: { priority }
|
|
513
|
+
payload: { priority, callerTmux, callerSource }
|
|
509
514
|
});
|
|
510
515
|
}
|
|
511
516
|
} catch (dispatchErr) {
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import {
|
|
2
|
+
embed
|
|
3
|
+
} from "./chunk-FIBL4JRZ.js";
|
|
4
|
+
import {
|
|
5
|
+
reserveVersions,
|
|
6
|
+
vectorToBlob
|
|
7
|
+
} from "./chunk-RLBVY5FE.js";
|
|
8
|
+
import {
|
|
9
|
+
getClient
|
|
10
|
+
} from "./chunk-VG4ZH2Z3.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-ADYRG7DB.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,10 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DiscordAdapter
|
|
3
|
+
} from "./chunk-N5RRQOAC.js";
|
|
4
|
+
import {
|
|
5
|
+
SlackAdapter
|
|
6
|
+
} from "./chunk-ORCCI2VV.js";
|
|
1
7
|
import {
|
|
2
8
|
IMessageAdapter
|
|
3
9
|
} from "./chunk-FLSASUV3.js";
|
|
4
10
|
import {
|
|
5
11
|
createCRMWebhookHandler,
|
|
6
12
|
parseTwentyWebhook
|
|
7
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-FSAKWKWU.js";
|
|
8
14
|
import {
|
|
9
15
|
WhatsAppAdapter
|
|
10
16
|
} from "./chunk-ECSNSHZ7.js";
|
|
@@ -14,12 +20,6 @@ import {
|
|
|
14
20
|
import {
|
|
15
21
|
TelegramAdapter
|
|
16
22
|
} from "./chunk-Q3V7K4ME.js";
|
|
17
|
-
import {
|
|
18
|
-
DiscordAdapter
|
|
19
|
-
} from "./chunk-N5RRQOAC.js";
|
|
20
|
-
import {
|
|
21
|
-
SlackAdapter
|
|
22
|
-
} from "./chunk-ORCCI2VV.js";
|
|
23
23
|
import {
|
|
24
24
|
BotRegistry,
|
|
25
25
|
BotRuntime,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
retryWithBackoff,
|
|
43
43
|
routeMessage,
|
|
44
44
|
validateGatewayConfig
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-RYPFOZQH.js";
|
|
46
46
|
import {
|
|
47
47
|
OllamaProvider
|
|
48
48
|
} from "./chunk-FWFFZGSC.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionScopeFilter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MMNMQNLD.js";
|
|
4
4
|
import {
|
|
5
5
|
getClient,
|
|
6
6
|
getIdentity
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VG4ZH2Z3.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-N55XRGJP.js");
|
|
647
647
|
const overdue = await getOverdueProspective(agentId);
|
|
648
648
|
overdueProspective = overdue.map((o) => ({
|
|
649
649
|
id: o.id,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EXE_AI_DIR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WCES22KG.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/worker-gate.ts
|
|
6
6
|
import { readdirSync, writeFileSync, unlinkSync, mkdirSync, existsSync, readFileSync } from "fs";
|
|
@@ -119,7 +119,7 @@ function releaseBackfillLock() {
|
|
|
119
119
|
}
|
|
120
120
|
async function getTaskAwareCapacity() {
|
|
121
121
|
const { getClient } = await import("./lib/database.js");
|
|
122
|
-
const { sessionScopeFilter } = await import("./task-scope-
|
|
122
|
+
const { sessionScopeFilter } = await import("./task-scope-P4VLIQNP.js");
|
|
123
123
|
const client = getClient();
|
|
124
124
|
const scope = sessionScopeFilter();
|
|
125
125
|
const result = await client.execute({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
EXE_AI_DIR
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WCES22KG.js";
|
|
4
4
|
import {
|
|
5
5
|
enforcePrivateFileSync,
|
|
6
6
|
ensurePrivateDirSync
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SHIICYJW.js";
|
|
8
8
|
|
|
9
9
|
// src/lib/daemon-auth.ts
|
|
10
10
|
import crypto from "crypto";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
dispatchTaskToEmployee,
|
|
3
3
|
markTaskNotificationsRead,
|
|
4
4
|
notifyTaskDone
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZGLJ2VD7.js";
|
|
6
6
|
import {
|
|
7
7
|
cleanupReviewFile,
|
|
8
8
|
createTaskCore,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
sessionScopeFilter,
|
|
12
12
|
updateTaskStatus,
|
|
13
13
|
writeNotification
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MMNMQNLD.js";
|
|
15
15
|
import {
|
|
16
16
|
orgBus
|
|
17
17
|
} from "./chunk-MP2AFCGL.js";
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
getClient,
|
|
20
20
|
getCoordinatorName,
|
|
21
21
|
isCoordinatorName
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-VG4ZH2Z3.js";
|
|
23
23
|
import {
|
|
24
24
|
EXE_AI_DIR
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-WCES22KG.js";
|
|
26
26
|
|
|
27
27
|
// src/lib/tasks.ts
|
|
28
28
|
import path2 from "path";
|
|
@@ -61,7 +61,7 @@ async function cascadeUnblock(taskId, baseDir, now) {
|
|
|
61
61
|
}
|
|
62
62
|
if (unblockedRows.rows.length > 0 && !process.env.VITEST) {
|
|
63
63
|
try {
|
|
64
|
-
const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-
|
|
64
|
+
const { dispatchTaskToEmployee: dispatchTaskToEmployee2 } = await import("./tasks-notify-WJYBUCIB.js");
|
|
65
65
|
const dispatched = /* @__PURE__ */ new Set();
|
|
66
66
|
for (const ur of unblockedRows.rows) {
|
|
67
67
|
const assignee = String(ur.assigned_to);
|
|
@@ -306,7 +306,7 @@ async function updateTask(input) {
|
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
308
|
try {
|
|
309
|
-
const { pushNotifyAsync } = await import("./push-notifications-
|
|
309
|
+
const { pushNotifyAsync } = await import("./push-notifications-PAFNP3EC.js");
|
|
310
310
|
pushNotifyAsync({
|
|
311
311
|
event: "review_ready",
|
|
312
312
|
title: `Review ready: ${taskTitle.slice(0, 50)}`,
|
|
@@ -318,7 +318,7 @@ async function updateTask(input) {
|
|
|
318
318
|
}
|
|
319
319
|
if (!isCoordinator && isCompletionReviewTransition) {
|
|
320
320
|
try {
|
|
321
|
-
const { pushNotifyAsync } = await import("./push-notifications-
|
|
321
|
+
const { pushNotifyAsync } = await import("./push-notifications-PAFNP3EC.js");
|
|
322
322
|
const event = input.status === "needs_review" ? "review_ready" : "task_complete";
|
|
323
323
|
pushNotifyAsync({
|
|
324
324
|
event,
|
|
@@ -333,7 +333,7 @@ async function updateTask(input) {
|
|
|
333
333
|
await markTaskNotificationsRead(taskFile);
|
|
334
334
|
if (isCompletionReviewTransition && !isCoordinator && row.reviewer) {
|
|
335
335
|
try {
|
|
336
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
336
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-Q5NEAP6K.js");
|
|
337
337
|
const reviewer = String(row.reviewer);
|
|
338
338
|
await writeNotification2({
|
|
339
339
|
agentId: reviewer,
|