@askexenow/exe-os 0.9.145 → 0.9.147
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{active-agent-HUDSZRUG.js → active-agent-KMQCNXXD.js} +6 -6
- package/dist/{active-agent-GJOJUEMF.js → active-agent-NCZCDDZ2.js} +6 -6
- package/dist/{agent-context-HH7TL5ZP.js → agent-context-AZTTMUHP.js} +1 -1
- package/dist/agent-heartbeat-I5UPGXAU.js +60 -0
- package/dist/{agent-loop-OCJFYO72.js → agent-loop-NUIWAL3Z.js} +1 -1
- package/dist/{agentic-ontology-5PGUVMDP.js → agentic-ontology-SQR74CO7.js} +2 -2
- package/dist/{asana-BSDR6NW4.js → asana-MRQ2OQMJ.js} +1 -1
- package/dist/assets/wezterm.lua +68 -0
- package/dist/{backfill-metadata-ZDJ5B37R.js → backfill-metadata-KMDWLDXU.js} +7 -7
- package/dist/{background-jobs-4N4JSZVZ.js → background-jobs-IUB22CRF.js} +4 -4
- package/dist/{bash-X54PZMOG.js → bash-HOHKSOU3.js} +1 -1
- package/dist/{behaviors-TXLHEM5J.js → behaviors-4U2N5L4E.js} +6 -6
- package/dist/bin/age-ontology-load.js +4 -4
- package/dist/bin/agentic-ontology-backfill.js +9 -9
- package/dist/bin/agentic-reflection-backfill.js +10 -10
- package/dist/bin/agentic-semantic-label.js +9 -9
- package/dist/bin/backfill-conversations.js +9 -9
- package/dist/bin/backfill-responses.js +9 -9
- package/dist/bin/backfill-vectors.js +12 -14
- package/dist/bin/bulk-sync-postgres.js +10 -10
- package/dist/bin/cc-doctor.js +5 -5
- package/dist/bin/cleanup-stale-review-tasks.js +12 -11
- package/dist/bin/cli.js +19 -19
- package/dist/bin/customer-readiness.js +47 -0
- package/dist/bin/exe-agent-config.js +6 -6
- package/dist/bin/exe-agent.js +8 -8
- package/dist/bin/exe-assign.js +11 -11
- package/dist/bin/exe-boot.js +39 -32
- package/dist/bin/exe-call.js +9 -11
- package/dist/bin/exe-cloud.js +10 -12
- package/dist/bin/exe-dispatch.js +12 -11
- package/dist/bin/exe-doctor.js +2 -2
- package/dist/bin/exe-export-behaviors.js +10 -10
- package/dist/bin/exe-forget.js +9 -9
- package/dist/bin/exe-gateway.js +18 -18
- package/dist/bin/exe-healthcheck.js +5 -5
- package/dist/bin/exe-heartbeat.js +19 -14
- package/dist/bin/exe-kill.js +9 -9
- package/dist/bin/exe-launch-agent.js +16 -18
- package/dist/bin/exe-new-employee.js +11 -11
- package/dist/bin/exe-pending-messages.js +13 -12
- package/dist/bin/exe-pending-notifications.js +12 -11
- package/dist/bin/exe-pending-reviews.js +20 -13
- package/dist/bin/exe-rename.js +9 -11
- package/dist/bin/exe-review.js +14 -13
- package/dist/bin/exe-search.js +8 -10
- package/dist/bin/exe-session-cleanup.js +19 -19
- package/dist/bin/exe-settings.js +11 -13
- package/dist/bin/exe-start-codex.js +15 -15
- package/dist/bin/exe-start-opencode.js +11 -11
- package/dist/bin/exe-status.js +13 -12
- package/dist/bin/exe-support.js +5 -5
- package/dist/bin/exe-team.js +6 -6
- package/dist/bin/git-sweep.js +12 -11
- package/dist/bin/graph-backfill.js +10 -10
- package/dist/bin/graph-export.js +8 -8
- package/dist/bin/graph-layer-benchmark.js +1 -1
- package/dist/bin/install.js +38 -12
- package/dist/bin/intercom-check.js +14 -8
- package/dist/bin/list-providers.js +1 -1
- package/dist/bin/postgres-agentic-reflection-backfill.js +6 -6
- package/dist/bin/postgres-agentic-semantic-backfill.js +5 -5
- package/dist/bin/pre-publish.js +2 -2
- package/dist/bin/registry-proxy.js +1 -1
- package/dist/bin/scan-tasks.js +48 -49
- package/dist/bin/setup.js +6 -5
- package/dist/bin/shard-migrate.js +8 -8
- package/dist/bin/stack-update.js +66 -10
- package/dist/bin/update.js +1 -1
- package/dist/{branding-52J2ILJX.js → branding-EHDA3CCK.js} +4 -6
- package/dist/{capacity-monitor-HWN2JX5W.js → capacity-monitor-Q5M5SVRC.js} +13 -12
- package/dist/{catchup-brief-UERCIVM5.js → catchup-brief-IPNSW7RQ.js} +14 -13
- package/dist/{chunk-GK5VMHSN.js → chunk-26UVGP3I.js} +1 -1
- package/dist/{chunk-CDDRSIGK.js → chunk-2BPO7VQF.js} +80 -70
- package/dist/{chunk-7PTII6F4.js → chunk-2OATM2JZ.js} +1 -1
- package/dist/{chunk-AJ2XDY27.js → chunk-3FIWKONP.js} +10 -12
- package/dist/{chunk-53VUIKOE.js → chunk-3MLGUSKS.js} +1 -1
- package/dist/{chunk-OYCQ6PFC.js → chunk-4EINMZNO.js} +6 -6
- package/dist/{chunk-JUITBJ7J.js → chunk-4GLEFA2X.js} +1 -1
- package/dist/{chunk-BY4OTURZ.js → chunk-4MN44ORL.js} +1 -1
- package/dist/{chunk-MUVPQCQA.js → chunk-6HFZ2KUC.js} +1 -3
- package/dist/{chunk-F7JVVLGH.js → chunk-6YUACQQA.js} +2 -4
- package/dist/{chunk-UVH6FA5E.js → chunk-7B5DQGXG.js} +1 -1
- package/dist/{chunk-XEA6DSLR.js → chunk-AERGE6GC.js} +4 -6
- package/dist/{chunk-NQAZ2CP7.js → chunk-AGFWOII2.js} +11 -11
- package/dist/{chunk-RWJY7KMP.js → chunk-ARGBV4PP.js} +46 -13
- package/dist/{chunk-VRD452MQ.js → chunk-B4HAUSVQ.js} +2 -2
- package/dist/{chunk-VX4X2O6J.js → chunk-CGQ5PWS3.js} +6 -6
- package/dist/{chunk-RNN4MZDN.js → chunk-DBXKWFTK.js} +3 -3
- package/dist/{chunk-Y2VVTK2E.js → chunk-DTLASDQM.js} +1 -1
- package/dist/{chunk-K3PSCQLK.js → chunk-DW6P7UVY.js} +4 -6
- package/dist/{chunk-B6Q6WAD7.js → chunk-EHNSK2Y4.js} +1 -1
- package/dist/{chunk-7PEYIW53.js → chunk-EHXOWGQG.js} +2 -2
- package/dist/{chunk-6BUUY7FG.js → chunk-EOO32RJZ.js} +2 -4
- package/dist/{chunk-MFGARIVE.js → chunk-EYQIEK5M.js} +2 -4
- package/dist/{chunk-NT6R4ATM.js → chunk-FG4Z2XFU.js} +1 -1
- package/dist/{chunk-32LFUJVG.js → chunk-FNMNKYVH.js} +221 -110
- package/dist/{chunk-CWPE6QVM.js → chunk-GNHN5HRQ.js} +2 -4
- package/dist/{chunk-WLEVAIL5.js → chunk-GP6G6EQI.js} +1 -1
- package/dist/{chunk-KLRP6ZG3.js → chunk-HHMHL4FB.js} +251 -96
- package/dist/{chunk-O7YD7JYE.js → chunk-I7AW4237.js} +18 -4
- package/dist/{chunk-TFZZL3QF.js → chunk-ICKEGWWP.js} +2 -4
- package/dist/{chunk-SR6D65DA.js → chunk-IFACD7E6.js} +3 -3
- package/dist/{chunk-I4WAKJ6W.js → chunk-J4RAXKTC.js} +3 -3
- package/dist/{chunk-65UQ7H5U.js → chunk-JF3Q5YKI.js} +4 -6
- package/dist/{chunk-RWURKLS3.js → chunk-JH7Z2AZ7.js} +1 -1
- package/dist/{chunk-5WTYETQO.js → chunk-K4KAPZC7.js} +4 -8
- package/dist/{chunk-G3VR3MJI.js → chunk-KIUU4PNX.js} +4 -8
- package/dist/{chunk-4F56OUR7.js → chunk-LC53LVOT.js} +2 -2
- package/dist/{chunk-W7NQE65M.js → chunk-LJML7HT2.js} +1 -1
- package/dist/{chunk-V4O2APMI.js → chunk-LL5EY6OQ.js} +1 -1
- package/dist/{chunk-DCJ42FEN.js → chunk-LWJ4AMMY.js} +2 -4
- package/dist/{chunk-GCMT6RWI.js → chunk-LYH5HE24.js} +3 -14
- package/dist/{chunk-63UVIM7S.js → chunk-MBA4NNTS.js} +2 -4
- package/dist/{chunk-7KR5PV4P.js → chunk-MKPSMRVX.js} +1 -1
- package/dist/{chunk-C4EVFN7J.js → chunk-MKUVEDUE.js} +2 -2
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-MLXJ5EZG.js +90 -0
- package/dist/{chunk-BXCJOACQ.js → chunk-NFHFNPTN.js} +3 -5
- package/dist/{chunk-2R3N4DQY.js → chunk-NJKERRSG.js} +3 -3
- package/dist/{chunk-I5VJNTDL.js → chunk-NNT2ZNMC.js} +5 -7
- package/dist/{chunk-O7CTVDC3.js → chunk-ODEGQCWW.js} +8 -8
- package/dist/{chunk-H4YONWQX.js → chunk-ONMRBKAX.js} +229 -108
- package/dist/{chunk-NE6RPW5C.js → chunk-PMWDO5FR.js} +1 -1
- package/dist/{chunk-IPSFAUK5.js → chunk-QB66MH2V.js} +4 -4
- package/dist/{chunk-XAHIVBTU.js → chunk-QHQJ7DLL.js} +6 -6
- package/dist/{chunk-NA3MXUU6.js → chunk-TH6HTK2L.js} +17 -15
- package/dist/{chunk-H4KUTL2T.js → chunk-TKEDF7KV.js} +1 -1
- package/dist/{chunk-KHV55ME4.js → chunk-TOWAZ5IV.js} +95 -118
- package/dist/{chunk-IBVB2NGY.js → chunk-TOXHEZN5.js} +47 -4
- package/dist/{chunk-H6OEU54G.js → chunk-UJMDHPIN.js} +91 -39
- package/dist/{chunk-UWBU44UP.js → chunk-UPL5FEZY.js} +1 -1
- package/dist/{chunk-ER3UJ2VL.js → chunk-UPMKSFBU.js} +2 -2
- package/dist/{chunk-X7DJ2QZW.js → chunk-V4MKR32F.js} +4 -6
- package/dist/{chunk-HV75RBMK.js → chunk-VB23RNNI.js} +1 -1
- package/dist/{chunk-56T5TMNK.js → chunk-VK2AWQ6D.js} +2 -2
- package/dist/{chunk-UXDQ4ERA.js → chunk-VNTDQUOG.js} +21 -18
- package/dist/{chunk-KQTGSD23.js → chunk-VYVESELG.js} +13 -9
- package/dist/{chunk-S465RWY7.js → chunk-W6SKR3HZ.js} +3 -5
- package/dist/{chunk-CQCURHDV.js → chunk-X2XE65WV.js} +12 -10
- package/dist/{chunk-XQ2ZBOAD.js → chunk-XK7VZFCC.js} +22 -9
- package/dist/{chunk-5F3EXHT7.js → chunk-XMRDT4PB.js} +2 -4
- package/dist/{chunk-MPXPPKJ4.js → chunk-XWQKCCCO.js} +3 -3
- package/dist/{chunk-7APRWURX.js → chunk-Y6TS42WD.js} +10 -12
- package/dist/{chunk-WTJS6PCC.js → chunk-YOG7TWMO.js} +1 -1
- package/dist/{chunk-QSSABSCM.js → chunk-YPSN64BU.js} +6 -6
- package/dist/{chunk-WJW564IP.js → chunk-ZBA74MMX.js} +2 -2
- package/dist/{chunk-VXQDZH5T.js → chunk-ZMJHXDZR.js} +3 -3
- package/dist/{chunk-BHV7PX5V.js → chunk-ZUAXTH6Z.js} +2 -2
- package/dist/{chunk-K6MMN6AW.js → chunk-ZZLTJXKR.js} +3 -5
- package/dist/{code-context-index-SRTAWCZQ.js → code-context-index-I5A7I4JQ.js} +7 -7
- package/dist/{content-extractor-H4IPL533.js → content-extractor-M7ISRONU.js} +1 -1
- package/dist/{conversation-entity-extractor-IZ3ECP4A.js → conversation-entity-extractor-EYSI4DKM.js} +3 -3
- package/dist/{conversation-wiki-populator-K4BQXHHO.js → conversation-wiki-populator-RSJ44BRO.js} +2 -2
- package/dist/{core-memory-JZ34WT5R.js → core-memory-C3JLISAU.js} +1 -1
- package/dist/{crdt-sync-4TOVD4QN.js → crdt-sync-XMC6LT2Q.js} +2 -2
- package/dist/{crm-bridge-27QVOWPI.js → crm-bridge-4QZRMOF7.js} +1 -1
- package/dist/{crm-webhook-77XHBWL7.js → crm-webhook-QMHD5YYQ.js} +3 -3
- package/dist/{cto-delegation-gate-AWENA4VT.js → cto-delegation-gate-BTZWAA4E.js} +11 -10
- package/dist/{daemon-auth-Z7O3LO23.js → daemon-auth-F47P6HTC.js} +4 -4
- package/dist/{daemon-orchestration-BG4NPWOK.js → daemon-orchestration-HFODCB52.js} +14 -13
- package/dist/{daemon-protocol-N7MOJ4U3.js → daemon-protocol-XW2OLNBS.js} +1 -1
- package/dist/{db-backup-E34JMBZD.js → db-backup-W56YOLMC.js} +4 -4
- package/dist/{devtools-ZL5NCINM.js → devtools-5PEATRYE.js} +1 -1
- package/dist/{discord-QOFQKX6S.js → discord-LMZKIYWB.js} +1 -1
- package/dist/dispatch-ack-JYCKAWKZ.js +13 -0
- package/dist/{email-NY5HB4WA.js → email-UENAIKRN.js} +1 -1
- package/dist/{entity-boost-V6KSRGG4.js → entity-boost-LIBVNNXO.js} +2 -2
- package/dist/{exe-drift-YFWCC26O.js → exe-drift-SED6KQTZ.js} +6 -6
- package/dist/{exe-export-YRACBEUY.js → exe-export-ADSWDE5U.js} +9 -9
- package/dist/{exe-import-DY57L2OI.js → exe-import-WFLNGJZP.js} +9 -9
- package/dist/{exe-key-U2JJH4MO.js → exe-key-4L32R46F.js} +5 -7
- package/dist/{exe-org-45OTYZZJ.js → exe-org-OOO7KJVZ.js} +4 -4
- package/dist/{factory-2PB537KA.js → factory-CTFAGZUA.js} +1 -1
- package/dist/fast-db-init-HVAVS35N.js +7 -0
- package/dist/{file-edit-GSXUFUDC.js → file-edit-AZAJPCA3.js} +1 -1
- package/dist/{file-read-Z3F3PUCK.js → file-read-VACF23NC.js} +1 -1
- package/dist/{file-write-X77JXZ2C.js → file-write-B2RPT5U7.js} +1 -1
- package/dist/gateway/index.js +10 -10
- package/dist/{gateway-client-IPKKEYKY.js → gateway-client-5EUMMEZZ.js} +2 -2
- package/dist/{git-staleness-I662R7RL.js → git-staleness-BY4ZK6MW.js} +5 -5
- package/dist/{git-task-sweep-XWFCP2HA.js → git-task-sweep-RSRASAHB.js} +12 -11
- package/dist/{glob-2PWAXTZ2.js → glob-7PWH7WKL.js} +1 -1
- package/dist/{global-procedures-IEIJBCAH.js → global-procedures-EKYSVONR.js} +7 -7
- package/dist/graph-auto-extract-HWZ5GVXZ.js +161 -0
- package/dist/{graph-query-NCDYOT4Y.js → graph-query-SE6T5XC4.js} +1 -1
- package/dist/{graph-rag-2YLGRBW5.js → graph-rag-G3EG5Q6L.js} +3 -3
- package/dist/{grep-GTV6WAZ4.js → grep-HWIDXHRC.js} +1 -1
- package/dist/{hook-integrity-LLPJPAXW.js → hook-integrity-PR4BPZBT.js} +2 -2
- package/dist/hooks/bug-report-worker.js +13 -12
- package/dist/hooks/codex-stop-task-finalizer.js +16 -13
- package/dist/hooks/commit-complete.js +14 -13
- package/dist/hooks/error-recall.js +9 -12
- package/dist/hooks/exe-heartbeat-hook.js +6 -6
- package/dist/hooks/ingest-worker.js +9 -9
- package/dist/hooks/ingest.js +16 -19
- package/dist/hooks/instructions-loaded.js +7 -7
- package/dist/hooks/notification.js +12 -10
- package/dist/hooks/post-compact.js +13 -12
- package/dist/hooks/post-tool-combined.js +6 -6
- package/dist/hooks/pre-compact.js +18 -17
- package/dist/hooks/pre-tool-use.js +19 -20
- package/dist/hooks/prompt-submit.js +78 -39
- package/dist/hooks/session-end.js +22 -21
- package/dist/hooks/session-start.js +31 -25
- package/dist/hooks/stop.js +20 -22
- package/dist/hooks/subagent-stop.js +13 -12
- package/dist/hooks/summary-worker.js +21 -20
- package/dist/{hooks-UK2AYRCA.js → hooks-LDCFYHDF.js} +1 -1
- package/dist/{imessage-LINH4V4D.js → imessage-6UOZB5VN.js} +1 -1
- package/dist/index.js +19 -18
- package/dist/{installer-PB63JTTG.js → installer-RLKOACKG.js} +9 -9
- package/dist/{installer-SSR2OOLO.js → installer-W4NY3OBF.js} +13 -11
- package/dist/{installer-ZONYB3XK.js → installer-X5FEYJIA.js} +9 -9
- package/dist/{intercom-queue-MMZT2MA2.js → intercom-queue-K3DVKSPJ.js} +1 -1
- package/dist/{key-backup-status-4WKIQOAS.js → key-backup-status-ORNMJEEA.js} +4 -6
- package/dist/lib/agent-config.js +4 -4
- package/dist/lib/cloud-sync.js +8 -8
- package/dist/lib/cloudflare-dns.js +1 -1
- package/dist/lib/config.js +3 -5
- package/dist/lib/consolidation.js +8 -8
- package/dist/lib/crypto.js +1 -1
- package/dist/lib/database.js +5 -5
- package/dist/lib/db-daemon-client.js +5 -5
- package/dist/lib/db.js +5 -5
- package/dist/lib/device-registry.js +4 -6
- package/dist/lib/embedder.js +6 -6
- package/dist/lib/employee-templates.js +8 -8
- package/dist/lib/employees.js +7 -5
- package/dist/lib/error-detector.js +1 -1
- package/dist/lib/exe-daemon-client.js +5 -5
- package/dist/lib/exe-daemon.js +143 -52
- package/dist/lib/file-grep.js +1 -1
- package/dist/lib/hybrid-search.js +8 -8
- package/dist/lib/identity-templates.js +1 -1
- package/dist/lib/identity.js +5 -5
- package/dist/lib/keychain.js +1 -1
- package/dist/lib/license.js +4 -4
- package/dist/lib/messaging.js +12 -11
- package/dist/lib/post-tool-memory.js +3 -3
- package/dist/lib/registry-proxy.js +1 -1
- package/dist/lib/reminders.js +6 -6
- package/dist/lib/runtime-table.js +1 -1
- package/dist/lib/schedules.js +8 -8
- package/dist/lib/session-registry.js +1 -1
- package/dist/lib/session-wrappers.js +1 -1
- package/dist/lib/skill-learning.js +7 -7
- package/dist/lib/status-brief.js +1 -1
- package/dist/lib/store.js +7 -7
- package/dist/lib/task-router.js +6 -6
- package/dist/lib/tasks.js +14 -11
- package/dist/lib/tmux-routing.js +11 -10
- package/dist/lib/tmux-status.js +1 -1
- package/dist/lib/tmux-transport.js +1 -1
- package/dist/lib/token-spend.js +6 -6
- package/dist/lib/transport.js +1 -1
- package/dist/lib/ws-auth.js +1 -1
- package/dist/lib/ws-client.js +2 -2
- package/dist/license-gate-J5YN264E.js +14 -0
- package/dist/mcp/register-tools.js +63 -62
- package/dist/mcp/server.js +65 -64
- 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 +15 -13
- package/dist/mcp/tools/deactivate-behavior.js +8 -8
- package/dist/mcp/tools/list-reminders.js +7 -7
- package/dist/mcp/tools/list-tasks.js +14 -14
- package/dist/mcp/tools/send-message.js +14 -13
- package/dist/mcp/tools/update-task.js +13 -12
- package/dist/{mcp-diagnostics-CWMVPHVC.js → mcp-diagnostics-TSBY62UQ.js} +1 -1
- package/dist/{mcp-disconnect-tracker-RM3GEERR.js → mcp-disconnect-tracker-MB23DRS6.js} +1 -1
- package/dist/{mcp-http-config-PDGSOYNQ.js → mcp-http-config-6YLW4PFG.js} +6 -6
- package/dist/{memory-cards-OLE6MGO7.js → memory-cards-UAQCO4QR.js} +5 -5
- package/dist/{memory-poisoning-defense-OOHJIXIX.js → memory-poisoning-defense-VWITZ4WO.js} +5 -7
- package/dist/{memory-queue-TGWXMENR.js → memory-queue-NYIGZNCG.js} +4 -4
- package/dist/memory-queue-client-YJOLYALV.js +15 -0
- package/dist/{memory-reflection-Z7CT6JLY.js → memory-reflection-JQC4ZSUD.js} +5 -5
- package/dist/{message-queue-client-TWIA2GIH.js → message-queue-client-NTLKYGVO.js} +1 -1
- package/dist/{notifications-SREXGSAQ.js → notifications-YDOKTVCH.js} +11 -10
- package/dist/{oauth-server-NSWGKLLA.js → oauth-server-TOWAZR4K.js} +1 -1
- package/dist/{orchestration-phase-WLQMEP4M.js → orchestration-phase-FXKZYK6R.js} +4 -4
- package/dist/{orchestrator-CHQURQSC.js → orchestrator-BZ2D6ZM6.js} +13 -12
- package/dist/{permission-presets-3XKJNM6N.js → permission-presets-E3DZK46K.js} +1 -1
- package/dist/{permissions-EZH3ULLD.js → permissions-6MCWUDCD.js} +1 -1
- package/dist/{pg-ssl-4ZNXKUNH.js → pg-ssl-7JXQFL4I.js} +1 -1
- package/dist/{plan-limits-7L75PB33.js → plan-limits-KUTODKG6.js} +7 -7
- package/dist/{preferences-K2GKUQSJ.js → preferences-ERXO6SMJ.js} +3 -3
- package/dist/{project-name-OBIDABHE.js → project-name-EWG5KAZP.js} +1 -1
- package/dist/{projection-worker-HSGE44JA.js → projection-worker-UY7R2EQJ.js} +85 -8
- package/dist/{push-notifications-EOTMKJ6B.js → push-notifications-KDYFOJRI.js} +4 -4
- package/dist/{reranker-ME4CK2ZQ.js → reranker-OMADCS3D.js} +4 -4
- package/dist/{review-gate-M3U2YAW6.js → review-gate-IUNS6GQU.js} +1 -1
- package/dist/{review-polling-DQCN4TNM.js → review-polling-DORNZ2KI.js} +12 -11
- package/dist/runtime/index.js +14 -13
- package/dist/{self-query-router-TRPHL54X.js → self-query-router-37VB3PKQ.js} +1 -1
- package/dist/{session-events-ZZBFYL5Z.js → session-events-5WR5RVDK.js} +12 -12
- package/dist/{session-kill-telemetry-MUFET632.js → session-kill-telemetry-DHSQV2CI.js} +6 -6
- package/dist/{session-scope-QUUDZM2L.js → session-scope-D4Q62ZOZ.js} +13 -13
- package/dist/setup-wizard-QVNTI3T4.js +12 -0
- package/dist/{shard-manager-VYMJM7NR.js → shard-manager-SP4YL5JQ.js} +4 -4
- package/dist/{signal-C263RUND.js → signal-7UIRTYGZ.js} +1 -1
- package/dist/{slack-N7PL6QMX.js → slack-GCOYBZUK.js} +1 -1
- package/dist/{task-enforcement-WJ3S6JTL.js → task-enforcement-OYCQXBBC.js} +11 -10
- package/dist/{task-scanner-YHWRG4ZJ.js → task-scanner-QEM5CO2Y.js} +1 -1
- package/dist/{task-scope-V2CTRHG7.js → task-scope-WWRNU2LU.js} +11 -10
- package/dist/{tasks-crud-W2XPUGKK.js → tasks-crud-75AUVZPO.js} +13 -10
- package/dist/{tasks-review-BR2SBSYG.js → tasks-review-UMZN5ZPQ.js} +11 -10
- package/dist/{telegram-B54FFOXD.js → telegram-RGVD4LUY.js} +1 -1
- package/dist/{telemetry-7IQCPV4Q.js → telemetry-43X3GT3R.js} +1 -1
- package/dist/{token-budget-H2XSWO4D.js → token-budget-62TYDIMI.js} +5 -5
- package/dist/{tool-capability-index-5X2CCGIK.js → tool-capability-index-OBZXORBP.js} +2 -2
- package/dist/{tool-gates-SGFMDREY.js → tool-gates-3IC7DK4R.js} +1 -1
- package/dist/{tool-gates-3DNTD7G3.js → tool-gates-GXSYBVK4.js} +1 -1
- package/dist/{tool-registry-2VUAZXTW.js → tool-registry-5XN3FUYL.js} +1 -1
- package/dist/{tool-telemetry-NVPSPRYP.js → tool-telemetry-JL6NY3KP.js} +2 -2
- package/dist/tui/App.js +44 -43
- package/dist/{tui-data-QN4O565C.js → tui-data-C5I2YU4C.js} +11 -10
- package/dist/{update-check-ERUKV2G6.js → update-check-MKHO7H6B.js} +1 -1
- package/dist/{webhook-L5FGAUPJ.js → webhook-LCW7UP4L.js} +1 -1
- package/dist/{webhook-pipe-B7GJCJAI.js → webhook-pipe-PJOFVBD3.js} +1 -1
- package/dist/{whatsapp-7FK2PRWO.js → whatsapp-SILL4V64.js} +1 -1
- package/dist/{whatsapp-accounts-VIHRSLGB.js → whatsapp-accounts-BWRZUY23.js} +1 -1
- package/dist/{wiki-acl-R4IIHICT.js → wiki-acl-5EC5VNYG.js} +1 -1
- package/dist/{wiki-client-EUDJA7O2.js → wiki-client-MMVRPTPK.js} +1 -1
- package/dist/{worker-gate-3KDXLIJC.js → worker-gate-Q5Y6B5N7.js} +4 -4
- package/dist/{workflow-engine-GISKRYSO.js → workflow-engine-KAKVU7NC.js} +3 -3
- package/dist/{worktree-B3FHAHEM.js → worktree-OMPQEJH7.js} +1 -1
- package/package.json +2 -2
- package/release-notes.json +126 -126
- package/src/commands/exe/setup.md +1 -1
- package/dist/chunk-PNKVD2UK.js +0 -26
- package/dist/fast-db-init-67TQTHWT.js +0 -7
- package/dist/license-gate-JY2KFIKO.js +0 -14
- package/dist/memory-queue-client-RZP5F4EA.js +0 -15
- package/dist/setup-wizard-NXWCEK63.js +0 -12
- package/dist/{chunk-D5MPHVWH.js → chunk-524VLFFY.js} +0 -0
- package/dist/{chunk-HIQ5RDA7.js → chunk-A3A2E42I.js} +0 -0
- package/dist/{chunk-APRP5D27.js → chunk-H6ADW3YC.js} +0 -0
- package/dist/{chunk-AAVODJ4F.js → chunk-J2OPV5FE.js} +0 -0
- package/dist/{chunk-DBLBWWFS.js → chunk-S6DA6UKC.js} +3 -3
- /package/dist/{chunk-F3ULERRZ.js → chunk-TSCZMB3P.js} +0 -0
- /package/dist/{chunk-2HV2EQW2.js → chunk-WRU72I4S.js} +0 -0
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
enforcePrivateFileSync,
|
|
3
|
-
ensurePrivateDirSync
|
|
4
|
-
|
|
5
|
-
} from "./chunk-GCMT6RWI.js";
|
|
3
|
+
ensurePrivateDirSync
|
|
4
|
+
} from "./chunk-LYH5HE24.js";
|
|
6
5
|
|
|
7
6
|
// src/lib/preferences.ts
|
|
8
|
-
init_secure_files();
|
|
9
7
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
10
8
|
import path from "path";
|
|
11
9
|
import os from "os";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
listWorkflowDefinitions,
|
|
3
3
|
runWorkflow,
|
|
4
4
|
startWorkflow
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LL5EY6OQ.js";
|
|
6
6
|
import {
|
|
7
7
|
initCRMBridge
|
|
8
8
|
} from "./chunk-GCNWCYJI.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-MP2AFCGL.js";
|
|
12
12
|
import {
|
|
13
13
|
getClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TH6HTK2L.js";
|
|
15
15
|
|
|
16
16
|
// src/gateway/router.ts
|
|
17
17
|
function matchesPlatform(msgPlatform, matchPlatform) {
|
|
@@ -214,6 +214,172 @@ function buildDegradationMessage() {
|
|
|
214
214
|
return "I'm having trouble right now. Let me get a human to help you.";
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
+
// src/gateway/types.ts
|
|
218
|
+
var FULL_ACCESS = {
|
|
219
|
+
canRead: true,
|
|
220
|
+
canWrite: true,
|
|
221
|
+
canExecute: true
|
|
222
|
+
};
|
|
223
|
+
var READ_ONLY = {
|
|
224
|
+
canRead: true,
|
|
225
|
+
canWrite: false,
|
|
226
|
+
canExecute: false
|
|
227
|
+
};
|
|
228
|
+
var READ_TOOLS = [
|
|
229
|
+
"ask_team_memory",
|
|
230
|
+
"recall_my_memory",
|
|
231
|
+
"list_tasks",
|
|
232
|
+
"get_session_context",
|
|
233
|
+
"get_memory_by_id",
|
|
234
|
+
"list_reminders",
|
|
235
|
+
"query_conversations"
|
|
236
|
+
];
|
|
237
|
+
var WRITE_TOOLS = [
|
|
238
|
+
"create_task",
|
|
239
|
+
"update_task",
|
|
240
|
+
"send_message",
|
|
241
|
+
"store_memory",
|
|
242
|
+
"store_behavior",
|
|
243
|
+
"create_reminder",
|
|
244
|
+
"complete_reminder"
|
|
245
|
+
];
|
|
246
|
+
var EXECUTE_TOOLS = ["close_task"];
|
|
247
|
+
|
|
248
|
+
// src/gateway/permission-guard.ts
|
|
249
|
+
var TOOL_CLASSIFICATION = /* @__PURE__ */ new Map();
|
|
250
|
+
for (const tool of READ_TOOLS) TOOL_CLASSIFICATION.set(tool, "canRead");
|
|
251
|
+
for (const tool of WRITE_TOOLS) TOOL_CLASSIFICATION.set(tool, "canWrite");
|
|
252
|
+
for (const tool of EXECUTE_TOOLS) TOOL_CLASSIFICATION.set(tool, "canExecute");
|
|
253
|
+
function classifyTool(toolName) {
|
|
254
|
+
return TOOL_CLASSIFICATION.get(toolName) ?? null;
|
|
255
|
+
}
|
|
256
|
+
function checkToolPermission(toolName, permissions) {
|
|
257
|
+
const classification = classifyTool(toolName);
|
|
258
|
+
if (!classification) {
|
|
259
|
+
return {
|
|
260
|
+
allowed: false,
|
|
261
|
+
tool: toolName,
|
|
262
|
+
requiredPermission: "canExecute",
|
|
263
|
+
reason: `Unknown tool "${toolName}" is not in the allowed tool list`
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
const allowed = permissions[classification];
|
|
267
|
+
return {
|
|
268
|
+
allowed,
|
|
269
|
+
tool: toolName,
|
|
270
|
+
requiredPermission: classification,
|
|
271
|
+
reason: allowed ? void 0 : `Tool "${toolName}" requires ${classification} permission, which is not granted on this channel`
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function guardToolUseBlocks(blocks, permissions) {
|
|
275
|
+
const allowed = [];
|
|
276
|
+
const blocked = [];
|
|
277
|
+
for (const block of blocks) {
|
|
278
|
+
const result = checkToolPermission(block.name, permissions);
|
|
279
|
+
if (result.allowed) {
|
|
280
|
+
allowed.push(block);
|
|
281
|
+
} else {
|
|
282
|
+
blocked.push({ block, check: result });
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return { allowed, blocked };
|
|
286
|
+
}
|
|
287
|
+
function checkSenderAllowlist(senderId, config) {
|
|
288
|
+
if (!config || config.allowlist.length === 0) {
|
|
289
|
+
return { allowed: true, mode: "none" };
|
|
290
|
+
}
|
|
291
|
+
const normalizedSender = senderId.trim().toLowerCase();
|
|
292
|
+
const isAllowed = config.allowlist.some(
|
|
293
|
+
(id) => id.trim().toLowerCase() === normalizedSender
|
|
294
|
+
);
|
|
295
|
+
if (isAllowed) {
|
|
296
|
+
return { allowed: true, mode: config.allowlist_mode };
|
|
297
|
+
}
|
|
298
|
+
if (config.allowlist_mode === "log") {
|
|
299
|
+
console.warn(
|
|
300
|
+
`[sender-allowlist] Unknown sender "${senderId}" \u2014 logging (mode=log)`
|
|
301
|
+
);
|
|
302
|
+
return { allowed: true, mode: "log", reason: "Unknown sender (logged)" };
|
|
303
|
+
}
|
|
304
|
+
return {
|
|
305
|
+
allowed: false,
|
|
306
|
+
mode: "strict",
|
|
307
|
+
reason: config.reject_message ?? "This service is not available to you."
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
var BOUNDARY_MARKER = "--- EXTERNAL USER MESSAGE (untrusted input) ---";
|
|
311
|
+
var INJECTION_PATTERNS = [
|
|
312
|
+
/ignore\s+(all\s+)?previous\s+instructions/gi,
|
|
313
|
+
/ignore\s+(all\s+)?prior\s+instructions/gi,
|
|
314
|
+
/you\s+are\s+now\b/gi,
|
|
315
|
+
/^system\s*:/gim,
|
|
316
|
+
/^ADMIN\s*:/gim,
|
|
317
|
+
/^DEVELOPER\s*:/gim,
|
|
318
|
+
/^ASSISTANT\s*:/gim,
|
|
319
|
+
/^HUMAN\s*:/gim,
|
|
320
|
+
/\bdo\s+not\s+follow\s+(your|the)\s+(rules|instructions|guidelines)\b/gi,
|
|
321
|
+
/\boverride\s+(your|all|the)\s+(rules|instructions|constraints)\b/gi,
|
|
322
|
+
/\bforget\s+(your|all|previous)\s+(rules|instructions|context)\b/gi,
|
|
323
|
+
/\bnew\s+instructions?\s*:/gi,
|
|
324
|
+
/\<\/?system\>/gi,
|
|
325
|
+
/\[\s*SYSTEM\s*\]/gi
|
|
326
|
+
];
|
|
327
|
+
function sanitizeInboundMessage(text) {
|
|
328
|
+
let sanitized = text;
|
|
329
|
+
for (const pattern of INJECTION_PATTERNS) {
|
|
330
|
+
pattern.lastIndex = 0;
|
|
331
|
+
sanitized = sanitized.replace(pattern, "[FILTERED]");
|
|
332
|
+
}
|
|
333
|
+
return `${BOUNDARY_MARKER}
|
|
334
|
+
${sanitized}`;
|
|
335
|
+
}
|
|
336
|
+
var OutboundRateLimiter = class {
|
|
337
|
+
contacts = /* @__PURE__ */ new Map();
|
|
338
|
+
maxPerMinute;
|
|
339
|
+
constructor(maxPerMinute = 5) {
|
|
340
|
+
this.maxPerMinute = maxPerMinute;
|
|
341
|
+
}
|
|
342
|
+
/**
|
|
343
|
+
* Check if an outbound message to this contact is allowed.
|
|
344
|
+
* Returns true if under the rate limit.
|
|
345
|
+
*/
|
|
346
|
+
check(contactId) {
|
|
347
|
+
const now = Date.now();
|
|
348
|
+
const windowMs = 6e4;
|
|
349
|
+
let entry = this.contacts.get(contactId);
|
|
350
|
+
if (!entry) {
|
|
351
|
+
entry = { timestamps: [] };
|
|
352
|
+
this.contacts.set(contactId, entry);
|
|
353
|
+
}
|
|
354
|
+
entry.timestamps = entry.timestamps.filter((t) => now - t < windowMs);
|
|
355
|
+
if (entry.timestamps.length >= this.maxPerMinute) {
|
|
356
|
+
return { allowed: false, remaining: 0 };
|
|
357
|
+
}
|
|
358
|
+
entry.timestamps.push(now);
|
|
359
|
+
return {
|
|
360
|
+
allowed: true,
|
|
361
|
+
remaining: this.maxPerMinute - entry.timestamps.length
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
/** Reset limiter state (for testing) */
|
|
365
|
+
reset() {
|
|
366
|
+
this.contacts.clear();
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
function buildPermissionContext(platform, permissions) {
|
|
370
|
+
if (permissions.canRead && permissions.canWrite && permissions.canExecute) {
|
|
371
|
+
return `[FULL ACCESS \u2014 you can read, write, and execute via ${platform}]`;
|
|
372
|
+
}
|
|
373
|
+
if (permissions.canRead && !permissions.canWrite && !permissions.canExecute) {
|
|
374
|
+
return `[READ-ONLY \u2014 this ${platform} channel cannot create tasks, send messages, or execute commands. Tell the founder to use Signal for commands.]`;
|
|
375
|
+
}
|
|
376
|
+
const parts = [];
|
|
377
|
+
if (permissions.canRead) parts.push("read");
|
|
378
|
+
if (permissions.canWrite) parts.push("write");
|
|
379
|
+
if (permissions.canExecute) parts.push("execute");
|
|
380
|
+
return `[${platform.toUpperCase()} \u2014 allowed: ${parts.join(", ")}]`;
|
|
381
|
+
}
|
|
382
|
+
|
|
217
383
|
// src/lib/pipeline-router.ts
|
|
218
384
|
import crypto from "crypto";
|
|
219
385
|
async function sinkConversationStore(msg, agentResponse, agentName) {
|
|
@@ -294,7 +460,7 @@ async function sinkMemory(msg, agentResponse, agentName) {
|
|
|
294
460
|
}
|
|
295
461
|
async function sinkCRM(msg, agentResponse, agentName) {
|
|
296
462
|
try {
|
|
297
|
-
const { isCRMBridgeEnabled, pushConversationToCRM, pushInboundMessageToCRM } = await import("./crm-bridge-
|
|
463
|
+
const { isCRMBridgeEnabled, pushConversationToCRM, pushInboundMessageToCRM } = await import("./crm-bridge-4QZRMOF7.js");
|
|
298
464
|
if (!isCRMBridgeEnabled()) return false;
|
|
299
465
|
if (agentResponse) {
|
|
300
466
|
await pushConversationToCRM({
|
|
@@ -328,12 +494,12 @@ async function sinkCRM(msg, agentResponse, agentName) {
|
|
|
328
494
|
}
|
|
329
495
|
async function sinkWiki(msg, agentResponse) {
|
|
330
496
|
try {
|
|
331
|
-
const { createWikiClient } = await import("./wiki-client-
|
|
497
|
+
const { createWikiClient } = await import("./wiki-client-MMVRPTPK.js");
|
|
332
498
|
const client = await createWikiClient();
|
|
333
499
|
if (!client) return false;
|
|
334
500
|
const content = msg.text ?? "";
|
|
335
501
|
if (content.length < 50) return false;
|
|
336
|
-
const { chatInWorkspace } = await import("./wiki-client-
|
|
502
|
+
const { chatInWorkspace } = await import("./wiki-client-MMVRPTPK.js");
|
|
337
503
|
const ingestText = [
|
|
338
504
|
`[${msg.platform}] Message from ${msg.senderName ?? msg.senderId} (${msg.timestamp}):`,
|
|
339
505
|
content,
|
|
@@ -352,8 +518,8 @@ Agent response: ${agentResponse}` : ""
|
|
|
352
518
|
}
|
|
353
519
|
async function sinkEntityExtraction(msg, agentResponse, agentName) {
|
|
354
520
|
try {
|
|
355
|
-
const { extractFromConversation } = await import("./conversation-entity-extractor-
|
|
356
|
-
const { storeExtraction } = await import("./graph-rag-
|
|
521
|
+
const { extractFromConversation } = await import("./conversation-entity-extractor-EYSI4DKM.js");
|
|
522
|
+
const { storeExtraction } = await import("./graph-rag-G3EG5Q6L.js");
|
|
357
523
|
if ((msg.text?.length ?? 0) < 20) return false;
|
|
358
524
|
if (msg.isHistorical) return false;
|
|
359
525
|
const extraction = await extractFromConversation(msg, agentResponse, agentName);
|
|
@@ -361,7 +527,7 @@ async function sinkEntityExtraction(msg, agentResponse, agentName) {
|
|
|
361
527
|
const client = getClient();
|
|
362
528
|
const memoryId = `conv:${msg.messageId}`;
|
|
363
529
|
await storeExtraction(client, extraction, memoryId, msg.timestamp);
|
|
364
|
-
import("./conversation-wiki-populator-
|
|
530
|
+
import("./conversation-wiki-populator-RSJ44BRO.js").then(
|
|
365
531
|
({ populateWikiFromExtraction }) => populateWikiFromExtraction(extraction, msg, agentResponse, agentName)
|
|
366
532
|
).catch((err) => {
|
|
367
533
|
process.stderr.write(
|
|
@@ -598,6 +764,9 @@ var Gateway = class {
|
|
|
598
764
|
failover;
|
|
599
765
|
customerStore;
|
|
600
766
|
startedAt = 0;
|
|
767
|
+
outboundLimiters = /* @__PURE__ */ new Map();
|
|
768
|
+
/** Queued outbound messages awaiting coordinator approval (Tier 3) */
|
|
769
|
+
outboundQueue = [];
|
|
601
770
|
constructor(options) {
|
|
602
771
|
this.config = options.config;
|
|
603
772
|
this.platformConfigs = options.platformConfigs;
|
|
@@ -660,6 +829,22 @@ var Gateway = class {
|
|
|
660
829
|
return;
|
|
661
830
|
}
|
|
662
831
|
}
|
|
832
|
+
const platformConfig = this.platformConfigs.get(msg.platform);
|
|
833
|
+
const senderCheck = checkSenderAllowlist(
|
|
834
|
+
msg.senderId,
|
|
835
|
+
platformConfig?.senderAllowlist
|
|
836
|
+
);
|
|
837
|
+
if (!senderCheck.allowed) {
|
|
838
|
+
console.warn(
|
|
839
|
+
`[gateway] Sender rejected by allowlist: ${msg.senderId} on ${msg.platform}`
|
|
840
|
+
);
|
|
841
|
+
const adapter2 = this.adapters.get(msg.platform);
|
|
842
|
+
if (adapter2 && senderCheck.reason) {
|
|
843
|
+
await adapter2.sendText(msg.channelId, senderCheck.reason);
|
|
844
|
+
}
|
|
845
|
+
return;
|
|
846
|
+
}
|
|
847
|
+
msg.text = sanitizeInboundMessage(msg.text);
|
|
663
848
|
this.customerStore?.resolve(msg.platform, msg.senderId);
|
|
664
849
|
uploadMediaAttachments(msg).catch((err) => {
|
|
665
850
|
console.error("[gateway] Media R2 upload error:", err);
|
|
@@ -727,9 +912,35 @@ var Gateway = class {
|
|
|
727
912
|
true
|
|
728
913
|
);
|
|
729
914
|
this.alertMonitor?.recordEvent(latencyMs, true);
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
915
|
+
const outboundConfig = platformConfig?.outboundConfirm;
|
|
916
|
+
if (outboundConfig?.enabled) {
|
|
917
|
+
this.outboundQueue.push({
|
|
918
|
+
platform: msg.platform,
|
|
919
|
+
channelId: msg.channelId,
|
|
920
|
+
text: response,
|
|
921
|
+
replyToMessageId: msg.messageId,
|
|
922
|
+
queuedAt: Date.now()
|
|
923
|
+
});
|
|
924
|
+
console.log(
|
|
925
|
+
`[gateway] Outbound queued for approval (${this.outboundQueue.length} pending): ${msg.platform}/${msg.channelId}`
|
|
926
|
+
);
|
|
927
|
+
} else {
|
|
928
|
+
let limiter = this.outboundLimiters.get(msg.platform);
|
|
929
|
+
if (!limiter) {
|
|
930
|
+
const maxPerMin = outboundConfig?.rate_limit_per_minute ?? 5;
|
|
931
|
+
limiter = new OutboundRateLimiter(maxPerMin);
|
|
932
|
+
this.outboundLimiters.set(msg.platform, limiter);
|
|
933
|
+
}
|
|
934
|
+
const rateCheck = limiter.check(msg.senderId);
|
|
935
|
+
if (!rateCheck.allowed) {
|
|
936
|
+
console.warn(
|
|
937
|
+
`[gateway] Outbound rate-limited for ${msg.senderId} on ${msg.platform}`
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
await adapter.sendText(msg.channelId, response, {
|
|
941
|
+
replyToMessageId: msg.messageId
|
|
942
|
+
});
|
|
943
|
+
}
|
|
733
944
|
ingest(msg, response, route.employee).catch((err) => {
|
|
734
945
|
console.error("[gateway] Pipeline conversation ingest error:", err);
|
|
735
946
|
});
|
|
@@ -752,6 +963,34 @@ var Gateway = class {
|
|
|
752
963
|
);
|
|
753
964
|
}
|
|
754
965
|
}
|
|
966
|
+
/** Get pending outbound messages awaiting approval (Tier 3) */
|
|
967
|
+
getOutboundQueue() {
|
|
968
|
+
return this.outboundQueue.map((item, index) => ({
|
|
969
|
+
platform: item.platform,
|
|
970
|
+
channelId: item.channelId,
|
|
971
|
+
text: item.text,
|
|
972
|
+
queuedAt: item.queuedAt,
|
|
973
|
+
index
|
|
974
|
+
}));
|
|
975
|
+
}
|
|
976
|
+
/** Approve and send a queued outbound message (Tier 3) */
|
|
977
|
+
async approveOutbound(index) {
|
|
978
|
+
if (index < 0 || index >= this.outboundQueue.length) return false;
|
|
979
|
+
const item = this.outboundQueue[index];
|
|
980
|
+
const adapter = this.adapters.get(item.platform);
|
|
981
|
+
if (!adapter) return false;
|
|
982
|
+
await adapter.sendText(item.channelId, item.text, {
|
|
983
|
+
replyToMessageId: item.replyToMessageId
|
|
984
|
+
});
|
|
985
|
+
this.outboundQueue.splice(index, 1);
|
|
986
|
+
return true;
|
|
987
|
+
}
|
|
988
|
+
/** Reject a queued outbound message (Tier 3) */
|
|
989
|
+
rejectOutbound(index) {
|
|
990
|
+
if (index < 0 || index >= this.outboundQueue.length) return false;
|
|
991
|
+
this.outboundQueue.splice(index, 1);
|
|
992
|
+
return true;
|
|
993
|
+
}
|
|
755
994
|
/** Health check all adapters + provider health */
|
|
756
995
|
async healthCheck() {
|
|
757
996
|
const adapterHealth = /* @__PURE__ */ new Map();
|
|
@@ -769,90 +1008,6 @@ var Gateway = class {
|
|
|
769
1008
|
}
|
|
770
1009
|
};
|
|
771
1010
|
|
|
772
|
-
// src/gateway/types.ts
|
|
773
|
-
var FULL_ACCESS = {
|
|
774
|
-
canRead: true,
|
|
775
|
-
canWrite: true,
|
|
776
|
-
canExecute: true
|
|
777
|
-
};
|
|
778
|
-
var READ_ONLY = {
|
|
779
|
-
canRead: true,
|
|
780
|
-
canWrite: false,
|
|
781
|
-
canExecute: false
|
|
782
|
-
};
|
|
783
|
-
var READ_TOOLS = [
|
|
784
|
-
"ask_team_memory",
|
|
785
|
-
"recall_my_memory",
|
|
786
|
-
"list_tasks",
|
|
787
|
-
"get_session_context",
|
|
788
|
-
"get_memory_by_id",
|
|
789
|
-
"list_reminders",
|
|
790
|
-
"query_conversations"
|
|
791
|
-
];
|
|
792
|
-
var WRITE_TOOLS = [
|
|
793
|
-
"create_task",
|
|
794
|
-
"update_task",
|
|
795
|
-
"send_message",
|
|
796
|
-
"store_memory",
|
|
797
|
-
"store_behavior",
|
|
798
|
-
"create_reminder",
|
|
799
|
-
"complete_reminder"
|
|
800
|
-
];
|
|
801
|
-
var EXECUTE_TOOLS = ["close_task"];
|
|
802
|
-
|
|
803
|
-
// src/gateway/permission-guard.ts
|
|
804
|
-
var TOOL_CLASSIFICATION = /* @__PURE__ */ new Map();
|
|
805
|
-
for (const tool of READ_TOOLS) TOOL_CLASSIFICATION.set(tool, "canRead");
|
|
806
|
-
for (const tool of WRITE_TOOLS) TOOL_CLASSIFICATION.set(tool, "canWrite");
|
|
807
|
-
for (const tool of EXECUTE_TOOLS) TOOL_CLASSIFICATION.set(tool, "canExecute");
|
|
808
|
-
function classifyTool(toolName) {
|
|
809
|
-
return TOOL_CLASSIFICATION.get(toolName) ?? null;
|
|
810
|
-
}
|
|
811
|
-
function checkToolPermission(toolName, permissions) {
|
|
812
|
-
const classification = classifyTool(toolName);
|
|
813
|
-
if (!classification) {
|
|
814
|
-
return {
|
|
815
|
-
allowed: false,
|
|
816
|
-
tool: toolName,
|
|
817
|
-
requiredPermission: "canExecute",
|
|
818
|
-
reason: `Unknown tool "${toolName}" is not in the allowed tool list`
|
|
819
|
-
};
|
|
820
|
-
}
|
|
821
|
-
const allowed = permissions[classification];
|
|
822
|
-
return {
|
|
823
|
-
allowed,
|
|
824
|
-
tool: toolName,
|
|
825
|
-
requiredPermission: classification,
|
|
826
|
-
reason: allowed ? void 0 : `Tool "${toolName}" requires ${classification} permission, which is not granted on this channel`
|
|
827
|
-
};
|
|
828
|
-
}
|
|
829
|
-
function guardToolUseBlocks(blocks, permissions) {
|
|
830
|
-
const allowed = [];
|
|
831
|
-
const blocked = [];
|
|
832
|
-
for (const block of blocks) {
|
|
833
|
-
const result = checkToolPermission(block.name, permissions);
|
|
834
|
-
if (result.allowed) {
|
|
835
|
-
allowed.push(block);
|
|
836
|
-
} else {
|
|
837
|
-
blocked.push({ block, check: result });
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
return { allowed, blocked };
|
|
841
|
-
}
|
|
842
|
-
function buildPermissionContext(platform, permissions) {
|
|
843
|
-
if (permissions.canRead && permissions.canWrite && permissions.canExecute) {
|
|
844
|
-
return `[FULL ACCESS \u2014 you can read, write, and execute via ${platform}]`;
|
|
845
|
-
}
|
|
846
|
-
if (permissions.canRead && !permissions.canWrite && !permissions.canExecute) {
|
|
847
|
-
return `[READ-ONLY \u2014 this ${platform} channel cannot create tasks, send messages, or execute commands. Tell the founder to use Signal for commands.]`;
|
|
848
|
-
}
|
|
849
|
-
const parts = [];
|
|
850
|
-
if (permissions.canRead) parts.push("read");
|
|
851
|
-
if (permissions.canWrite) parts.push("write");
|
|
852
|
-
if (permissions.canExecute) parts.push("execute");
|
|
853
|
-
return `[${platform.toUpperCase()} \u2014 allowed: ${parts.join(", ")}]`;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
1011
|
// src/gateway/bot-errors.ts
|
|
857
1012
|
var FatalBotError = class extends Error {
|
|
858
1013
|
constructor(message, cause) {
|
|
@@ -1367,7 +1522,6 @@ export {
|
|
|
1367
1522
|
validateGatewayConfig,
|
|
1368
1523
|
retryWithBackoff,
|
|
1369
1524
|
CircuitBreaker,
|
|
1370
|
-
Gateway,
|
|
1371
1525
|
FULL_ACCESS,
|
|
1372
1526
|
READ_ONLY,
|
|
1373
1527
|
READ_TOOLS,
|
|
@@ -1376,6 +1530,7 @@ export {
|
|
|
1376
1530
|
checkToolPermission,
|
|
1377
1531
|
guardToolUseBlocks,
|
|
1378
1532
|
buildPermissionContext,
|
|
1533
|
+
Gateway,
|
|
1379
1534
|
FatalBotError,
|
|
1380
1535
|
RecoverableBotError,
|
|
1381
1536
|
MaxStepsError,
|
|
@@ -138,6 +138,10 @@ function chunkTypeScriptLike(source, fileName) {
|
|
|
138
138
|
chunks.sort((a, b) => a.startLine - b.startLine);
|
|
139
139
|
return chunks.length > 0 ? chunks : chunkByWindows(source, 80);
|
|
140
140
|
}
|
|
141
|
+
function indentLevel(line) {
|
|
142
|
+
const match = line.match(/^(\s*)/);
|
|
143
|
+
return match ? match[1].length : 0;
|
|
144
|
+
}
|
|
141
145
|
function chunkGenericSource(source, _fileName, language) {
|
|
142
146
|
const lines = source.split("\n");
|
|
143
147
|
if (source.trim().length === 0) return [];
|
|
@@ -148,6 +152,7 @@ function chunkGenericSource(source, _fileName, language) {
|
|
|
148
152
|
{ kind: "class", regex: /^\s*class\s+([A-Za-z_][\w]*)\b/, name: (m) => m[1] },
|
|
149
153
|
{ kind: "function", regex: /^\s*(?:pub\s+)?fn\s+([A-Za-z_][\w]*)\s*[<(]/, name: (m) => m[1] },
|
|
150
154
|
{ kind: "class", regex: /^\s*(?:pub\s+)?(?:struct|enum|trait)\s+([A-Za-z_][\w]*)\b/, name: (m) => m[1] },
|
|
155
|
+
{ kind: "class", regex: /^\s*(?:pub\s+)?impl(?:<[^>]+>)?\s+([A-Za-z_][\w]*(?:<[^>]+>)?)\b/, name: (m) => m[1] },
|
|
151
156
|
{ kind: "function", regex: /^\s*func\s+(?:\([^)]*\)\s*)?([A-Za-z_][\w]*)\s*\(/, name: (m) => m[1] },
|
|
152
157
|
{ kind: "function", regex: /^\s*(?:public|private|protected|static|final|suspend|fun|override|open|internal|export|async|func|function|subroutine)\s+.*?([A-Za-z_][\w]*)\s*\(/, name: (m) => m[1] },
|
|
153
158
|
{ kind: "function", regex: /^\s*function\s+([A-Za-z_][\w]*)\s*\(/, name: (m) => m[1] },
|
|
@@ -160,15 +165,24 @@ function chunkGenericSource(source, _fileName, language) {
|
|
|
160
165
|
for (const pattern of patterns) {
|
|
161
166
|
const match = line.match(pattern.regex);
|
|
162
167
|
if (match) {
|
|
163
|
-
starts.push({ line: i + 1, kind: pattern.kind, name: pattern.name(match) });
|
|
168
|
+
starts.push({ line: i + 1, kind: pattern.kind, name: pattern.name(match), indent: indentLevel(line) });
|
|
164
169
|
break;
|
|
165
170
|
}
|
|
166
171
|
}
|
|
167
172
|
}
|
|
168
173
|
if (starts.length === 0) return chunkByWindows(source, 80);
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
174
|
+
const isPython = language === "python";
|
|
175
|
+
const isRust = language === "rust";
|
|
176
|
+
let topLevelStarts;
|
|
177
|
+
if (isPython || isRust) {
|
|
178
|
+
topLevelStarts = starts.filter((s) => s.indent === 0);
|
|
179
|
+
if (topLevelStarts.length === 0) topLevelStarts = starts;
|
|
180
|
+
} else {
|
|
181
|
+
topLevelStarts = starts;
|
|
182
|
+
}
|
|
183
|
+
for (let i = 0; i < topLevelStarts.length; i++) {
|
|
184
|
+
const start = topLevelStarts[i];
|
|
185
|
+
const next = topLevelStarts[i + 1]?.line ?? lines.length + 1;
|
|
172
186
|
const endLine = Math.max(start.line, next - 1);
|
|
173
187
|
chunks.push({
|
|
174
188
|
kind: start.kind,
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EXE_AI_DIR
|
|
3
|
-
|
|
4
|
-
} from "./chunk-KHV55ME4.js";
|
|
2
|
+
EXE_AI_DIR
|
|
3
|
+
} from "./chunk-TOWAZ5IV.js";
|
|
5
4
|
|
|
6
5
|
// src/lib/shard-manager.ts
|
|
7
|
-
init_config();
|
|
8
6
|
import path from "path";
|
|
9
7
|
import { existsSync, mkdirSync, readdirSync, renameSync, statSync } from "fs";
|
|
10
8
|
import { createClient } from "@libsql/client";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deactivateBehavior
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ARGBV4PP.js";
|
|
4
4
|
import {
|
|
5
5
|
getActiveAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NFHFNPTN.js";
|
|
7
7
|
import {
|
|
8
8
|
canCoordinate,
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TH6HTK2L.js";
|
|
11
11
|
|
|
12
12
|
// src/mcp/tools/deactivate-behavior.ts
|
|
13
13
|
import { z } from "zod";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PMWDO5FR.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter,
|
|
6
6
|
verifyPaneAtCapacity,
|
|
7
7
|
writeNotification
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ONMRBKAX.js";
|
|
9
9
|
import {
|
|
10
10
|
listSessions
|
|
11
11
|
} from "./chunk-64WZEXXA.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
import {
|
|
16
16
|
getClient,
|
|
17
17
|
isCoordinatorName
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-TH6HTK2L.js";
|
|
19
19
|
|
|
20
20
|
// src/lib/capacity-monitor.ts
|
|
21
21
|
var CAPACITY_PATTERNS = [
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PLATFORM_PROCEDURE_TITLES
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-XWQKCCCO.js";
|
|
4
4
|
import {
|
|
5
5
|
getClient,
|
|
6
6
|
getIdentity,
|
|
7
7
|
listIdentities,
|
|
8
8
|
updateIdentity
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TH6HTK2L.js";
|
|
10
10
|
import {
|
|
11
|
-
atomicWriteJsonSync
|
|
12
|
-
|
|
13
|
-
} from "./chunk-GCMT6RWI.js";
|
|
11
|
+
atomicWriteJsonSync
|
|
12
|
+
} from "./chunk-LYH5HE24.js";
|
|
14
13
|
|
|
15
14
|
// src/lib/orchestration-package.ts
|
|
16
|
-
init_secure_files();
|
|
17
15
|
import { randomUUID } from "crypto";
|
|
18
16
|
import { copyFileSync, existsSync, mkdirSync, readFileSync } from "fs";
|
|
19
17
|
import os from "os";
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EXE_AI_DIR
|
|
3
|
-
|
|
4
|
-
} from "./chunk-KHV55ME4.js";
|
|
2
|
+
EXE_AI_DIR
|
|
3
|
+
} from "./chunk-TOWAZ5IV.js";
|
|
5
4
|
import {
|
|
6
5
|
enforcePrivateFileSync,
|
|
7
|
-
ensurePrivateDirSync
|
|
8
|
-
|
|
9
|
-
} from "./chunk-GCMT6RWI.js";
|
|
6
|
+
ensurePrivateDirSync
|
|
7
|
+
} from "./chunk-LYH5HE24.js";
|
|
10
8
|
|
|
11
9
|
// src/lib/daemon-auth.ts
|
|
12
|
-
init_config();
|
|
13
|
-
init_secure_files();
|
|
14
10
|
import crypto from "crypto";
|
|
15
11
|
import path from "path";
|
|
16
12
|
import { existsSync, readFileSync, writeFileSync } from "fs";
|
|
@@ -3,20 +3,16 @@ import {
|
|
|
3
3
|
RUNTIME_TABLE
|
|
4
4
|
} from "./chunk-NGP6LSV2.js";
|
|
5
5
|
import {
|
|
6
|
-
EXE_AI_DIR
|
|
7
|
-
|
|
8
|
-
} from "./chunk-KHV55ME4.js";
|
|
6
|
+
EXE_AI_DIR
|
|
7
|
+
} from "./chunk-TOWAZ5IV.js";
|
|
9
8
|
import {
|
|
10
9
|
atomicWriteJsonSync,
|
|
11
|
-
ensurePrivateDirSync
|
|
12
|
-
|
|
13
|
-
} from "./chunk-GCMT6RWI.js";
|
|
10
|
+
ensurePrivateDirSync
|
|
11
|
+
} from "./chunk-LYH5HE24.js";
|
|
14
12
|
|
|
15
13
|
// src/lib/agent-config.ts
|
|
16
|
-
init_config();
|
|
17
14
|
import { readFileSync, existsSync } from "fs";
|
|
18
15
|
import path from "path";
|
|
19
|
-
init_secure_files();
|
|
20
16
|
var AGENT_CONFIG_PATH = path.join(EXE_AI_DIR, "agent-config.json");
|
|
21
17
|
var KNOWN_RUNTIMES = {
|
|
22
18
|
claude: ["claude-opus-4.6", "claude-opus-4", "claude-sonnet-4.6", "claude-sonnet-4", "claude-haiku-4.5"],
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
resolveExeSession,
|
|
5
5
|
sendIntercom,
|
|
6
6
|
strictSessionScopeFilter
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ONMRBKAX.js";
|
|
8
8
|
import {
|
|
9
9
|
getClient
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-TH6HTK2L.js";
|
|
11
11
|
|
|
12
12
|
// src/lib/messaging.ts
|
|
13
13
|
import crypto from "crypto";
|