@askexenow/exe-os 0.9.134 → 0.9.136
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-5Z4ZFQZD.js → active-agent-DZXEPRY7.js} +3 -3
- package/dist/{active-agent-VCMF6TCC.js → active-agent-EFZ6YZIM.js} +3 -3
- package/dist/{agentic-ontology-F7DQUWYK.js → agentic-ontology-2TD5YS4O.js} +1 -1
- package/dist/{backfill-metadata-XXBEIM6J.js → backfill-metadata-5LNLRCA6.js} +6 -6
- package/dist/{background-jobs-ATB73RFI.js → background-jobs-6V4GQ5QT.js} +2 -2
- package/dist/{behaviors-WKTZOWL2.js → behaviors-PPFGGHYD.js} +5 -5
- package/dist/bin/age-ontology-load.js +2 -2
- package/dist/bin/agentic-ontology-backfill.js +8 -8
- package/dist/bin/agentic-reflection-backfill.js +9 -9
- package/dist/bin/agentic-semantic-label.js +8 -8
- package/dist/bin/backfill-conversations.js +8 -8
- package/dist/bin/backfill-responses.js +8 -8
- package/dist/bin/backfill-vectors.js +10 -10
- package/dist/bin/bulk-sync-postgres.js +9 -9
- package/dist/bin/cc-doctor.js +3 -3
- package/dist/bin/cleanup-stale-review-tasks.js +10 -10
- package/dist/bin/cli.js +15 -15
- package/dist/bin/customer-readiness.js +5 -0
- package/dist/bin/exe-agent-config.js +3 -3
- package/dist/bin/exe-agent.js +6 -6
- package/dist/bin/exe-assign.js +10 -10
- package/dist/bin/exe-boot.js +17 -17
- package/dist/bin/exe-call.js +6 -6
- package/dist/bin/exe-cloud.js +15 -8
- package/dist/bin/exe-dispatch.js +11 -11
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +9 -9
- package/dist/bin/exe-forget.js +8 -8
- package/dist/bin/exe-gateway.js +6 -6
- package/dist/bin/exe-healthcheck.js +3 -3
- package/dist/bin/exe-heartbeat.js +10 -10
- package/dist/bin/exe-kill.js +8 -8
- package/dist/bin/exe-launch-agent.js +13 -13
- package/dist/bin/exe-new-employee.js +13 -20
- package/dist/bin/exe-pending-messages.js +11 -11
- package/dist/bin/exe-pending-notifications.js +10 -10
- package/dist/bin/exe-pending-reviews.js +10 -10
- package/dist/bin/exe-rename.js +6 -6
- package/dist/bin/exe-review.js +7 -7
- package/dist/bin/exe-search.js +7 -7
- package/dist/bin/exe-session-cleanup.js +14 -14
- package/dist/bin/exe-settings.js +8 -8
- package/dist/bin/exe-start-codex.js +14 -14
- package/dist/bin/exe-start-opencode.js +10 -10
- package/dist/bin/exe-status.js +11 -11
- package/dist/bin/exe-support.js +3 -3
- package/dist/bin/exe-team.js +5 -5
- package/dist/bin/git-sweep.js +10 -10
- package/dist/bin/graph-backfill.js +7 -7
- package/dist/bin/graph-export.js +7 -7
- package/dist/bin/install.js +7 -7
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +4 -4
- package/dist/bin/postgres-agentic-semantic-backfill.js +3 -3
- package/dist/bin/scan-tasks.js +10 -10
- package/dist/bin/setup.js +2 -2
- package/dist/bin/shard-migrate.js +7 -7
- package/dist/bin/stack-update.js +2 -2
- package/dist/{capacity-monitor-SD7TFRI7.js → capacity-monitor-PFHHXTEN.js} +11 -11
- package/dist/{catchup-brief-ZZE67H6X.js → catchup-brief-Y75GOHWU.js} +12 -12
- package/dist/{chunk-7525VIRY.js → chunk-2CKP7O4F.js} +1 -1
- package/dist/{chunk-TCLLBHWX.js → chunk-2SXMWUOQ.js} +1 -1
- package/dist/{chunk-TGAZBOQV.js → chunk-37LVIZ3P.js} +2 -2
- package/dist/{chunk-SG3JQDRS.js → chunk-3BVZNKAZ.js} +5 -5
- package/dist/{chunk-K3ICF4GD.js → chunk-3UKHLUXH.js} +1 -1
- package/dist/{chunk-7K4OTYL4.js → chunk-4ADWX7S6.js} +9 -9
- package/dist/{chunk-UQFWCTKE.js → chunk-5DZTDWFU.js} +1 -1
- package/dist/{chunk-QOR7M5WH.js → chunk-5NLZS5KX.js} +3 -3
- package/dist/{chunk-UQQJV7DB.js → chunk-5XNCH6UM.js} +4 -4
- package/dist/{chunk-7CUQQAZH.js → chunk-6ZXIG7R6.js} +4 -4
- package/dist/{chunk-ZC37J6BF.js → chunk-A63V4QMR.js} +62 -62
- package/dist/{chunk-TOIDMYUI.js → chunk-ARQQ4T47.js} +1 -1
- package/dist/{chunk-JGHS2M7L.js → chunk-ARZWYVYC.js} +4 -4
- package/dist/{chunk-H3QAD2WH.js → chunk-AVUQCUZC.js} +1 -1
- package/dist/{chunk-2FBEH3A3.js → chunk-BI3COBMQ.js} +1 -1
- package/dist/{chunk-LSDG5VMO.js → chunk-BPLXSBNM.js} +1 -1
- package/dist/{chunk-J2Q3TSEM.js → chunk-CTEENZVZ.js} +7 -7
- package/dist/{chunk-5GTTS5HP.js → chunk-D7FYU6DX.js} +2 -2
- package/dist/{chunk-MFEYHPQD.js → chunk-DIQOUMHM.js} +2 -2
- package/dist/{chunk-5XDQJUZV.js → chunk-E2XB56OH.js} +2 -2
- package/dist/{chunk-B46U2TYB.js → chunk-FM4UBRBE.js} +7 -7
- package/dist/{chunk-WXRFX7C2.js → chunk-G2HJSPM4.js} +2 -2
- package/dist/{chunk-5B6EK7TA.js → chunk-GERMZD6I.js} +2 -2
- package/dist/{chunk-2HL4VLOK.js → chunk-GISRZK6K.js} +5 -5
- package/dist/{chunk-LPZ6UYNK.js → chunk-GU2Z6K2T.js} +2 -2
- package/dist/{chunk-6TNLZ3XL.js → chunk-IMZM3H6N.js} +4 -4
- package/dist/{chunk-JBDY3SWN.js → chunk-ISRQKXHM.js} +0 -2
- package/dist/{chunk-CGRQVRIF.js → chunk-IUKRBQ2B.js} +3 -3
- package/dist/{chunk-WIR7ISPK.js → chunk-J7LFCZMQ.js} +57 -16
- package/dist/{chunk-NALLK6IN.js → chunk-JXYZVTBX.js} +1 -1
- package/dist/{chunk-SC444GZ6.js → chunk-K7E72WGL.js} +1 -1
- package/dist/{chunk-SXMHIS42.js → chunk-KDM3GZ6T.js} +2 -2
- package/dist/{chunk-LNGM5OHX.js → chunk-KHUJEI3A.js} +2 -2
- package/dist/{chunk-RPH5MQWS.js → chunk-KQW5PWOA.js} +2 -2
- package/dist/{chunk-HV3NRFAG.js → chunk-KSFOG6FJ.js} +1 -1
- package/dist/{chunk-XCPOD4HP.js → chunk-KTS6MOE4.js} +1 -1
- package/dist/{chunk-OBFB27SZ.js → chunk-M6ODLM7X.js} +1 -1
- package/dist/{chunk-BYGGAO5Q.js → chunk-MPZRPM5X.js} +6 -6
- package/dist/{chunk-FNF6ASM2.js → chunk-NBJIGVPG.js} +97 -46
- package/dist/{chunk-JENH7FT4.js → chunk-NFRFF6QS.js} +1 -1
- package/dist/{chunk-CWNH6272.js → chunk-NHLW6DUE.js} +1 -1
- package/dist/{chunk-CVDBI4IN.js → chunk-NR3MPNTF.js} +4 -4
- package/dist/{chunk-BOKXKD3V.js → chunk-NSVI6RZ5.js} +1 -1
- package/dist/{chunk-PDQJA34K.js → chunk-O2ENLWKX.js} +1 -1
- package/dist/{chunk-BZKZSA4Z.js → chunk-OMHM3NGK.js} +1 -1
- package/dist/{chunk-RCLALZN6.js → chunk-P6CLMRWJ.js} +1 -1
- package/dist/{chunk-ZE46WYO3.js → chunk-PRRSSHU3.js} +1 -1
- package/dist/{chunk-G4F2EKRS.js → chunk-QCYYXXO5.js} +2 -2
- package/dist/{chunk-YJGCJFWK.js → chunk-QKBDAHFM.js} +1 -1
- package/dist/{chunk-F264RXCP.js → chunk-REFUKSCU.js} +2 -2
- package/dist/{chunk-DTERWF6K.js → chunk-S67DRFRK.js} +1 -1
- package/dist/{chunk-P4INSLEM.js → chunk-SF6H4ZME.js} +1 -1
- package/dist/{chunk-NOMUQ6C3.js → chunk-SJWW6GRT.js} +1 -1
- package/dist/{chunk-NC75HFMP.js → chunk-T65APBMF.js} +3 -3
- package/dist/{chunk-U2PFRUJW.js → chunk-TCOTFMDP.js} +2 -2
- package/dist/{chunk-PM23XC7F.js → chunk-TERS54YJ.js} +2 -2
- package/dist/{chunk-ZJYUR3HO.js → chunk-TXRDECEW.js} +4 -4
- package/dist/{chunk-EKJYATYD.js → chunk-UMLRHSAP.js} +1 -1
- package/dist/{chunk-ZXDB3XCV.js → chunk-UXGZ3V3U.js} +1 -1
- package/dist/{chunk-HWNRY6QJ.js → chunk-VAPODXIB.js} +2 -2
- package/dist/{chunk-32KXWG3Q.js → chunk-VIONSYFC.js} +1 -1
- package/dist/{chunk-UVBTYTNG.js → chunk-W7G2DOLC.js} +2 -2
- package/dist/{chunk-F53H7WLK.js → chunk-WQ6FW5JD.js} +1 -1
- package/dist/{chunk-HIDVVYWW.js → chunk-XDWCEQLH.js} +8 -8
- package/dist/{chunk-BFHUCGBO.js → chunk-XEZ64YCS.js} +2 -2
- package/dist/{chunk-ULNG2L4A.js → chunk-XK3P2PRN.js} +2 -2
- package/dist/{chunk-XJLGNOYT.js → chunk-YMMTBQQY.js} +4 -4
- package/dist/{chunk-PX3TSXNY.js → chunk-YTTVKPOQ.js} +1 -1
- package/dist/{chunk-N5V3PJUE.js → chunk-ZJ7N6BNZ.js} +2 -2
- package/dist/{chunk-DFQ3VHJQ.js → chunk-ZKYHW6KY.js} +1 -1
- package/dist/{chunk-NJ5FQH6Y.js → chunk-ZNWYU3VE.js} +4 -4
- package/dist/{code-context-index-RZOVUUQJ.js → code-context-index-I7JC7DPM.js} +4 -4
- package/dist/{conversation-wiki-populator-XVPHVT3R.js → conversation-wiki-populator-L24LNYDL.js} +1 -1
- package/dist/{crdt-sync-4K7EAN7H.js → crdt-sync-UUJDUXTJ.js} +1 -1
- package/dist/{crm-webhook-F2FP2XPU.js → crm-webhook-UXZORR4I.js} +2 -2
- package/dist/{cto-delegation-gate-LRAXRSDW.js → cto-delegation-gate-7MIMXB4T.js} +9 -9
- package/dist/{daemon-auth-STCSTDRT.js → daemon-auth-IFWQGMDT.js} +2 -2
- package/dist/{daemon-orchestration-R76H4QCE.js → daemon-orchestration-FIL7U2RV.js} +11 -11
- package/dist/{db-backup-X46NRH47.js → db-backup-RZA3JICI.js} +2 -2
- package/dist/{exe-drift-IKGS64KM.js → exe-drift-D7YCMMR3.js} +6 -6
- package/dist/{exe-export-3Z4ISZRQ.js → exe-export-YKP26EW6.js} +8 -8
- package/dist/{exe-import-I4C4ZFCX.js → exe-import-HSQORBEH.js} +8 -8
- package/dist/{exe-key-ADZ2AXQW.js → exe-key-QLXFQGNV.js} +4 -4
- package/dist/{exe-org-MHIWMBBQ.js → exe-org-F56R5P37.js} +2 -2
- package/dist/{fast-db-init-HT4JSB7L.js → fast-db-init-RFYRERZL.js} +1 -1
- package/dist/gateway/index.js +8 -8
- package/dist/{git-staleness-UWXPNRR4.js → git-staleness-2IBA7MM2.js} +4 -4
- package/dist/{git-task-sweep-2I2QZTM6.js → git-task-sweep-ZZQHHVXR.js} +10 -10
- package/dist/{global-procedures-XC3FSAHU.js → global-procedures-6B5JT3B5.js} +5 -5
- package/dist/hooks/bug-report-worker.js +13 -13
- package/dist/hooks/codex-stop-task-finalizer.js +13 -13
- package/dist/hooks/commit-complete.js +12 -12
- package/dist/hooks/error-recall.js +8 -8
- package/dist/hooks/exe-heartbeat-hook.js +3 -3
- package/dist/hooks/ingest-worker.js +5 -5
- package/dist/hooks/ingest.js +7 -7
- package/dist/hooks/instructions-loaded.js +7 -7
- package/dist/hooks/notification.js +4 -4
- package/dist/hooks/post-compact.js +11 -11
- package/dist/hooks/post-tool-combined.js +5 -5
- package/dist/hooks/pre-compact.js +16 -16
- package/dist/hooks/pre-tool-use.js +15 -15
- package/dist/hooks/prompt-submit.js +19 -19
- package/dist/hooks/session-end.js +20 -20
- package/dist/hooks/session-start.js +7 -7
- package/dist/hooks/stop.js +17 -17
- package/dist/hooks/subagent-stop.js +11 -11
- package/dist/hooks/summary-worker.js +19 -19
- package/dist/index.js +17 -17
- package/dist/{installer-4M35AQEU.js → installer-EIUTCCHV.js} +5 -5
- package/dist/{installer-U2JNFXOK.js → installer-GDMELU5L.js} +5 -5
- package/dist/{installer-LBYEM5CW.js → installer-WZEN2XJ7.js} +5 -5
- package/dist/{key-backup-status-TJA5I4HI.js → key-backup-status-NMUFOHXW.js} +1 -1
- package/dist/lib/agent-config.js +2 -2
- package/dist/lib/cloud-sync.js +11 -7
- package/dist/lib/config.js +1 -1
- package/dist/lib/consolidation.js +7 -7
- package/dist/lib/database.js +4 -4
- package/dist/lib/db-daemon-client.js +3 -3
- package/dist/lib/db.js +4 -4
- package/dist/lib/device-registry.js +1 -1
- package/dist/lib/embedder.js +4 -4
- package/dist/lib/employee-templates.js +6 -6
- package/dist/lib/employees.js +2 -2
- package/dist/lib/exe-daemon-client.js +3 -3
- package/dist/lib/exe-daemon.js +297 -50
- package/dist/lib/hybrid-search.js +7 -7
- package/dist/lib/identity.js +5 -5
- package/dist/lib/license.js +2 -2
- package/dist/lib/messaging.js +10 -10
- package/dist/lib/reminders.js +5 -5
- package/dist/lib/schedules.js +7 -7
- package/dist/lib/skill-learning.js +6 -6
- package/dist/lib/store.js +6 -6
- package/dist/lib/task-router.js +3 -3
- package/dist/lib/tasks.js +12 -12
- package/dist/lib/tmux-routing.js +9 -9
- package/dist/lib/token-spend.js +5 -5
- package/dist/{license-gate-MX5ZWMYM.js → license-gate-VMGC326L.js} +3 -3
- package/dist/mcp/register-tools.js +60 -60
- package/dist/mcp/server.js +61 -61
- package/dist/mcp/tools/complete-reminder.js +6 -6
- package/dist/mcp/tools/create-reminder.js +6 -6
- package/dist/mcp/tools/create-task.js +14 -14
- package/dist/mcp/tools/deactivate-behavior.js +7 -7
- package/dist/mcp/tools/list-reminders.js +6 -6
- package/dist/mcp/tools/list-tasks.js +14 -14
- package/dist/mcp/tools/send-message.js +12 -12
- package/dist/mcp/tools/update-task.js +13 -13
- package/dist/{mcp-http-config-N7T35WCM.js → mcp-http-config-WPF5MBSO.js} +3 -3
- package/dist/{memory-cards-5F4IQQYX.js → memory-cards-MA5SIQKN.js} +4 -4
- package/dist/{memory-queue-FOCGY2LO.js → memory-queue-QX6UY4BP.js} +2 -2
- package/dist/{memory-queue-client-OVO7YLJJ.js → memory-queue-client-AG2QB6PK.js} +5 -5
- package/dist/{memory-reflection-2XLGAFPO.js → memory-reflection-VHCEW3UN.js} +4 -4
- package/dist/{notifications-VBTAHI35.js → notifications-NY2OVCDV.js} +9 -9
- package/dist/{orchestration-phase-PEAJAA6F.js → orchestration-phase-YKDZDERC.js} +2 -2
- package/dist/{orchestrator-JKCBGSKL.js → orchestrator-ZVOTKKV6.js} +12 -12
- package/dist/{plan-limits-N5Q6M7TX.js → plan-limits-UQTXKXJQ.js} +6 -6
- package/dist/{projection-worker-2A3JQIU2.js → projection-worker-UL47LRTS.js} +2 -2
- package/dist/{reranker-DFEFSWBV.js → reranker-EEX3UEA2.js} +2 -2
- package/dist/runtime/index.js +13 -13
- package/dist/{session-events-JUCYTOFB.js → session-events-DU6PKAJN.js} +10 -10
- package/dist/{session-kill-telemetry-6Y4AKJEO.js → session-kill-telemetry-5XGSTQJS.js} +5 -5
- package/dist/{session-scope-XF5ZIUF4.js → session-scope-WJRSCUKP.js} +10 -10
- package/dist/{setup-wizard-TMXGF64O.js → setup-wizard-36V5GCGG.js} +2 -2
- package/dist/{shard-manager-V6J6QHZ5.js → shard-manager-4QLCI2RC.js} +2 -2
- package/dist/{task-scope-CULJLUKF.js → task-scope-7XCYEZAG.js} +9 -9
- package/dist/{tasks-crud-BLLW4V65.js → tasks-crud-DUNJJUV3.js} +10 -10
- package/dist/{tasks-review-BYV33QEA.js → tasks-review-BPSW2TBZ.js} +9 -9
- package/dist/{tool-capability-index-Z6JVOY52.js → tool-capability-index-XYEJ57EL.js} +1 -1
- package/dist/{tool-telemetry-QULJ7R5K.js → tool-telemetry-Q6ZSUTHS.js} +1 -1
- package/dist/tui/App.js +22 -22
- package/dist/{tui-data-UWRAVNRE.js → tui-data-GUMMW3IG.js} +9 -9
- package/dist/{worker-gate-XQGJMV7V.js → worker-gate-IHFHRPF5.js} +2 -2
- package/dist/{workflow-engine-R27UQ6UZ.js → workflow-engine-A6K4MHN3.js} +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-E4AZQH6U.js → chunk-4AZA3DZM.js} +0 -0
- /package/dist/{chunk-4B6D4WX7.js → chunk-7U65IF2W.js} +0 -0
- /package/dist/{chunk-75GJADBE.js → chunk-FR5FFQ6G.js} +0 -0
- /package/dist/{chunk-TGCOB7MO.js → chunk-ISPV5JR2.js} +0 -0
- /package/dist/{chunk-KAOD42BV.js → chunk-KI3UEJUR.js} +0 -0
- /package/dist/{chunk-GRD5UQXZ.js → chunk-M6FENV7U.js} +0 -0
- /package/dist/{chunk-R7NM4KAJ.js → chunk-RCKUCKED.js} +0 -0
- /package/dist/{wiki-acl-XI33GTP7.js → wiki-acl-QY5EXWEQ.js} +0 -0
- /package/dist/{wiki-client-BVPFZW5I.js → wiki-client-ZWA545PZ.js} +0 -0
package/dist/lib/exe-daemon.js
CHANGED
|
@@ -7,23 +7,23 @@ import {
|
|
|
7
7
|
getMcpToolFamily,
|
|
8
8
|
inferMcpRuntime,
|
|
9
9
|
recordMcpHttpEvent
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-OMHM3NGK.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureDaemonToken,
|
|
13
13
|
init_daemon_auth
|
|
14
|
-
} from "../chunk-
|
|
14
|
+
} from "../chunk-NHLW6DUE.js";
|
|
15
15
|
import {
|
|
16
16
|
findScopedDuplicate,
|
|
17
17
|
governMemoryRecord,
|
|
18
18
|
schedulePostWriteMemoryHygiene
|
|
19
|
-
} from "../chunk-
|
|
19
|
+
} from "../chunk-7U65IF2W.js";
|
|
20
20
|
import {
|
|
21
21
|
init_task_scope,
|
|
22
22
|
init_tmux_routing,
|
|
23
23
|
isExeSession,
|
|
24
24
|
strictSessionScopeFilter,
|
|
25
25
|
tmux_routing_exports
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-CTEENZVZ.js";
|
|
27
27
|
import {
|
|
28
28
|
init_intercom_queue,
|
|
29
29
|
intercom_queue_exports
|
|
@@ -38,35 +38,35 @@ import "../chunk-PJHHFJAN.js";
|
|
|
38
38
|
import {
|
|
39
39
|
agent_config_exports,
|
|
40
40
|
init_agent_config
|
|
41
|
-
} from "../chunk-
|
|
41
|
+
} from "../chunk-K7E72WGL.js";
|
|
42
42
|
import "../chunk-JT76KRZQ.js";
|
|
43
|
-
import "../chunk-
|
|
43
|
+
import "../chunk-ARZWYVYC.js";
|
|
44
44
|
import "../chunk-HP43GLZ6.js";
|
|
45
45
|
import "../chunk-ELE2C7L4.js";
|
|
46
46
|
import "../chunk-WZQ4CPRG.js";
|
|
47
|
-
import "../chunk-
|
|
47
|
+
import "../chunk-ZJ7N6BNZ.js";
|
|
48
48
|
import {
|
|
49
49
|
db_backup_exports,
|
|
50
50
|
init_db_backup
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-KSFOG6FJ.js";
|
|
52
52
|
import {
|
|
53
53
|
EMBEDDING_DIM,
|
|
54
54
|
init_memory
|
|
55
55
|
} from "../chunk-4NYQAS33.js";
|
|
56
|
-
import "../chunk-
|
|
56
|
+
import "../chunk-BPLXSBNM.js";
|
|
57
57
|
import "../chunk-6BFIFI5F.js";
|
|
58
58
|
import {
|
|
59
59
|
DEFAULT_COORDINATOR_TEMPLATE_NAME,
|
|
60
60
|
employees_exports,
|
|
61
61
|
getCoordinatorName,
|
|
62
62
|
init_employees
|
|
63
|
-
} from "../chunk-
|
|
64
|
-
import "../chunk-
|
|
63
|
+
} from "../chunk-ZKYHW6KY.js";
|
|
64
|
+
import "../chunk-UMLRHSAP.js";
|
|
65
65
|
import {
|
|
66
66
|
EXE_AI_DIR,
|
|
67
67
|
MODELS_DIR,
|
|
68
68
|
init_config
|
|
69
|
-
} from "../chunk-
|
|
69
|
+
} from "../chunk-ISRQKXHM.js";
|
|
70
70
|
import "../chunk-X2IMCCM5.js";
|
|
71
71
|
import {
|
|
72
72
|
__esm,
|
|
@@ -75,13 +75,183 @@ import {
|
|
|
75
75
|
__toCommonJS
|
|
76
76
|
} from "../chunk-KFQGP6VL.js";
|
|
77
77
|
|
|
78
|
+
// src/lib/process-monitor.ts
|
|
79
|
+
var process_monitor_exports = {};
|
|
80
|
+
__export(process_monitor_exports, {
|
|
81
|
+
_resetCpuAlertState: () => _resetCpuAlertState,
|
|
82
|
+
checkCpuAlert: () => checkCpuAlert,
|
|
83
|
+
checkHeapAlert: () => checkHeapAlert,
|
|
84
|
+
formatSnapshotSummary: () => formatSnapshotSummary,
|
|
85
|
+
getDaemonCpuPercent: () => getDaemonCpuPercent,
|
|
86
|
+
takeProcessSnapshot: () => takeProcessSnapshot
|
|
87
|
+
});
|
|
88
|
+
import { execSync } from "child_process";
|
|
89
|
+
function getDaemonCpuPercent() {
|
|
90
|
+
const now = Date.now();
|
|
91
|
+
const usage = process.cpuUsage(_lastCpuUsage ?? void 0);
|
|
92
|
+
if (_lastCpuTime === 0) {
|
|
93
|
+
_lastCpuUsage = process.cpuUsage();
|
|
94
|
+
_lastCpuTime = now;
|
|
95
|
+
return 0;
|
|
96
|
+
}
|
|
97
|
+
const elapsedMs = now - _lastCpuTime;
|
|
98
|
+
if (elapsedMs === 0) return 0;
|
|
99
|
+
const cpuMs = (usage.user + usage.system) / 1e3;
|
|
100
|
+
const percent = cpuMs / elapsedMs * 100;
|
|
101
|
+
_lastCpuUsage = process.cpuUsage();
|
|
102
|
+
_lastCpuTime = now;
|
|
103
|
+
return Math.round(percent * 10) / 10;
|
|
104
|
+
}
|
|
105
|
+
function getProcessStats(pid) {
|
|
106
|
+
try {
|
|
107
|
+
const output = execSync(
|
|
108
|
+
`ps -p ${pid} -o pid=,ppid=,%cpu=,rss=,vsz=,etime=,args= 2>/dev/null`,
|
|
109
|
+
{ encoding: "utf8", timeout: 3e3 }
|
|
110
|
+
).trim();
|
|
111
|
+
if (!output) return null;
|
|
112
|
+
return parseProcessLine(output);
|
|
113
|
+
} catch {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function getChildProcesses(parentPid) {
|
|
118
|
+
try {
|
|
119
|
+
const output = execSync(
|
|
120
|
+
`pgrep -P ${parentPid} 2>/dev/null || true`,
|
|
121
|
+
{ encoding: "utf8", timeout: 3e3 }
|
|
122
|
+
).trim();
|
|
123
|
+
if (!output) return [];
|
|
124
|
+
const childPids = output.split("\n").map(Number).filter(Boolean);
|
|
125
|
+
const children = [];
|
|
126
|
+
for (const pid of childPids) {
|
|
127
|
+
const stats = getProcessStats(pid);
|
|
128
|
+
if (stats) children.push(stats);
|
|
129
|
+
children.push(...getChildProcesses(pid));
|
|
130
|
+
}
|
|
131
|
+
return children;
|
|
132
|
+
} catch {
|
|
133
|
+
return [];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function getOrphanedProcesses() {
|
|
137
|
+
const EXE_PATTERNS = [
|
|
138
|
+
"exe-os/dist",
|
|
139
|
+
"exe-mem/dist",
|
|
140
|
+
"@askexenow/exe-os"
|
|
141
|
+
];
|
|
142
|
+
try {
|
|
143
|
+
const output = execSync(
|
|
144
|
+
"ps -eo pid,ppid,%cpu,rss,vsz,etime,args 2>/dev/null",
|
|
145
|
+
{ encoding: "utf8", timeout: 5e3 }
|
|
146
|
+
);
|
|
147
|
+
const orphans = [];
|
|
148
|
+
for (const line of output.split("\n").slice(1)) {
|
|
149
|
+
const stats = parseProcessLine(line.trim());
|
|
150
|
+
if (!stats) continue;
|
|
151
|
+
if (stats.ppid !== 1) continue;
|
|
152
|
+
if (stats.pid === process.pid) continue;
|
|
153
|
+
if (!EXE_PATTERNS.some((p) => stats.command.includes(p))) continue;
|
|
154
|
+
orphans.push(stats);
|
|
155
|
+
}
|
|
156
|
+
return orphans;
|
|
157
|
+
} catch {
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function parseProcessLine(line) {
|
|
162
|
+
const match = line.match(/^\s*(\d+)\s+(\d+)\s+([\d.]+)\s+(\d+)\s+(\d+)\s+([\d:-]+)\s+(.+)$/);
|
|
163
|
+
if (!match) return null;
|
|
164
|
+
return {
|
|
165
|
+
pid: parseInt(match[1], 10),
|
|
166
|
+
ppid: parseInt(match[2], 10),
|
|
167
|
+
cpu: parseFloat(match[3]),
|
|
168
|
+
mem: Math.round(parseInt(match[4], 10) / 1024),
|
|
169
|
+
// RSS KB → MB
|
|
170
|
+
rss: Math.round(parseInt(match[4], 10) / 1024),
|
|
171
|
+
vsz: Math.round(parseInt(match[5], 10) / 1024),
|
|
172
|
+
elapsed: match[6],
|
|
173
|
+
command: match[7].slice(0, 200)
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
function takeProcessSnapshot() {
|
|
177
|
+
const daemon = getProcessStats(process.pid);
|
|
178
|
+
const children = getChildProcesses(process.pid);
|
|
179
|
+
const orphans = getOrphanedProcesses();
|
|
180
|
+
const allProcs = [daemon, ...children].filter(Boolean);
|
|
181
|
+
const totalCpu = allProcs.reduce((sum, p) => sum + p.cpu, 0);
|
|
182
|
+
const totalMemMb = allProcs.reduce((sum, p) => sum + p.rss, 0);
|
|
183
|
+
return {
|
|
184
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
185
|
+
daemon,
|
|
186
|
+
children,
|
|
187
|
+
orphans,
|
|
188
|
+
totalCpu: Math.round(totalCpu * 10) / 10,
|
|
189
|
+
totalMemMb
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
function formatSnapshotSummary(snap) {
|
|
193
|
+
return {
|
|
194
|
+
daemonCpu: snap.daemon?.cpu ?? 0,
|
|
195
|
+
daemonRssMb: snap.daemon?.rss ?? 0,
|
|
196
|
+
childCount: snap.children.length,
|
|
197
|
+
childTotalCpu: Math.round(snap.children.reduce((s, c) => s + c.cpu, 0) * 10) / 10,
|
|
198
|
+
childTotalRssMb: snap.children.reduce((s, c) => s + c.rss, 0),
|
|
199
|
+
orphanCount: snap.orphans.length,
|
|
200
|
+
orphanPids: snap.orphans.map((o) => o.pid),
|
|
201
|
+
totalCpu: snap.totalCpu,
|
|
202
|
+
totalMemMb: snap.totalMemMb
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
function checkCpuAlert(cpuPercent) {
|
|
206
|
+
if (cpuPercent >= CPU_ALERT_THRESHOLD_PCT) {
|
|
207
|
+
_highCpuSamples++;
|
|
208
|
+
if (_highCpuSamples >= CPU_ALERT_SUSTAINED_SAMPLES) {
|
|
209
|
+
return `Daemon CPU sustained at ${cpuPercent}% for ${_highCpuSamples} samples`;
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
_highCpuSamples = 0;
|
|
213
|
+
}
|
|
214
|
+
return null;
|
|
215
|
+
}
|
|
216
|
+
function _resetCpuAlertState() {
|
|
217
|
+
_highCpuSamples = 0;
|
|
218
|
+
_highHeapSamples = 0;
|
|
219
|
+
}
|
|
220
|
+
function checkHeapAlert() {
|
|
221
|
+
const mem = process.memoryUsage();
|
|
222
|
+
const usedPct = mem.heapTotal > 0 ? mem.heapUsed / mem.heapTotal * 100 : 0;
|
|
223
|
+
if (usedPct >= HEAP_ALERT_THRESHOLD_PCT) {
|
|
224
|
+
_highHeapSamples++;
|
|
225
|
+
if (_highHeapSamples >= HEAP_ALERT_SUSTAINED_SAMPLES) {
|
|
226
|
+
return `V8 heap pressure: ${Math.round(usedPct)}% used (${Math.round(mem.heapUsed / 1024 / 1024)}MB / ${Math.round(mem.heapTotal / 1024 / 1024)}MB) for ${_highHeapSamples} samples \u2014 OOM risk`;
|
|
227
|
+
}
|
|
228
|
+
} else {
|
|
229
|
+
_highHeapSamples = 0;
|
|
230
|
+
}
|
|
231
|
+
return null;
|
|
232
|
+
}
|
|
233
|
+
var _lastCpuUsage, _lastCpuTime, CPU_ALERT_THRESHOLD_PCT, CPU_ALERT_SUSTAINED_SAMPLES, _highCpuSamples, HEAP_ALERT_THRESHOLD_PCT, HEAP_ALERT_SUSTAINED_SAMPLES, _highHeapSamples;
|
|
234
|
+
var init_process_monitor = __esm({
|
|
235
|
+
"src/lib/process-monitor.ts"() {
|
|
236
|
+
"use strict";
|
|
237
|
+
_lastCpuUsage = null;
|
|
238
|
+
_lastCpuTime = 0;
|
|
239
|
+
CPU_ALERT_THRESHOLD_PCT = 80;
|
|
240
|
+
CPU_ALERT_SUSTAINED_SAMPLES = 3;
|
|
241
|
+
_highCpuSamples = 0;
|
|
242
|
+
HEAP_ALERT_THRESHOLD_PCT = 80;
|
|
243
|
+
HEAP_ALERT_SUSTAINED_SAMPLES = 2;
|
|
244
|
+
_highHeapSamples = 0;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
|
|
78
248
|
// src/lib/review-polling.ts
|
|
79
249
|
var review_polling_exports = {};
|
|
80
250
|
__export(review_polling_exports, {
|
|
81
251
|
createRealDeps: () => createRealDeps,
|
|
82
252
|
pollPendingReviews: () => pollPendingReviews
|
|
83
253
|
});
|
|
84
|
-
import { execSync } from "child_process";
|
|
254
|
+
import { execSync as execSync2 } from "child_process";
|
|
85
255
|
async function pollPendingReviews(deps, _state) {
|
|
86
256
|
let sessions;
|
|
87
257
|
try {
|
|
@@ -192,7 +362,7 @@ async function pollPendingReviews(deps, _state) {
|
|
|
192
362
|
function createRealDeps(getClient) {
|
|
193
363
|
return {
|
|
194
364
|
listTmuxSessions: () => {
|
|
195
|
-
return
|
|
365
|
+
return execSync2("tmux list-sessions -F '#{session_name}' 2>/dev/null", {
|
|
196
366
|
encoding: "utf8",
|
|
197
367
|
timeout: 3e3
|
|
198
368
|
}).trim().split("\n").filter(Boolean);
|
|
@@ -228,7 +398,7 @@ function createRealDeps(getClient) {
|
|
|
228
398
|
return result.rows;
|
|
229
399
|
},
|
|
230
400
|
createReviewForOrphan: async (task) => {
|
|
231
|
-
const { createReviewForCompletedTask } = await import("../tasks-review-
|
|
401
|
+
const { createReviewForCompletedTask } = await import("../tasks-review-BPSW2TBZ.js");
|
|
232
402
|
const cwd = process.cwd();
|
|
233
403
|
await createReviewForCompletedTask(
|
|
234
404
|
task,
|
|
@@ -442,6 +612,22 @@ function logCrash(error, event = "crash") {
|
|
|
442
612
|
}
|
|
443
613
|
function logHeartbeat(data) {
|
|
444
614
|
const mem = process.memoryUsage();
|
|
615
|
+
let processData = {};
|
|
616
|
+
try {
|
|
617
|
+
const { getDaemonCpuPercent: getDaemonCpuPercent2, takeProcessSnapshot: takeProcessSnapshot2, formatSnapshotSummary: formatSnapshotSummary2, checkCpuAlert: checkCpuAlert2, checkHeapAlert: checkHeapAlert2 } = (init_process_monitor(), __toCommonJS(process_monitor_exports));
|
|
618
|
+
const cpuPct = getDaemonCpuPercent2();
|
|
619
|
+
const snapshot = takeProcessSnapshot2();
|
|
620
|
+
processData = formatSnapshotSummary2(snapshot);
|
|
621
|
+
const cpuAlertMsg = checkCpuAlert2(cpuPct);
|
|
622
|
+
if (cpuAlertMsg) {
|
|
623
|
+
logDaemonHealth({ event: "memory_pressure", pid: process.pid, message: cpuAlertMsg, data: processData });
|
|
624
|
+
}
|
|
625
|
+
const heapAlertMsg = checkHeapAlert2();
|
|
626
|
+
if (heapAlertMsg) {
|
|
627
|
+
logDaemonHealth({ event: "memory_pressure", pid: process.pid, message: heapAlertMsg, data: processData });
|
|
628
|
+
}
|
|
629
|
+
} catch {
|
|
630
|
+
}
|
|
445
631
|
logDaemonHealth({
|
|
446
632
|
event: "heartbeat",
|
|
447
633
|
pid: process.pid,
|
|
@@ -451,6 +637,7 @@ function logHeartbeat(data) {
|
|
|
451
637
|
heapUsed: `${Math.round(mem.heapUsed / 1024 / 1024)}MB`,
|
|
452
638
|
heapTotal: `${Math.round(mem.heapTotal / 1024 / 1024)}MB`,
|
|
453
639
|
uptimeSec: Math.round(process.uptime()),
|
|
640
|
+
...processData,
|
|
454
641
|
...data
|
|
455
642
|
}
|
|
456
643
|
});
|
|
@@ -628,7 +815,7 @@ async function shutdown() {
|
|
|
628
815
|
}
|
|
629
816
|
}
|
|
630
817
|
try {
|
|
631
|
-
const { createBackup } = await import("../db-backup-
|
|
818
|
+
const { createBackup } = await import("../db-backup-RZA3JICI.js");
|
|
632
819
|
const backupPath = createBackup("pre-restart");
|
|
633
820
|
if (backupPath) {
|
|
634
821
|
process.stderr.write(`[exed] Pre-restart backup: ${backupPath}
|
|
@@ -648,12 +835,12 @@ async function shutdown() {
|
|
|
648
835
|
`);
|
|
649
836
|
}
|
|
650
837
|
try {
|
|
651
|
-
const { stopProjectionWorker } = await import("../projection-worker-
|
|
838
|
+
const { stopProjectionWorker } = await import("../projection-worker-UL47LRTS.js");
|
|
652
839
|
stopProjectionWorker();
|
|
653
840
|
} catch {
|
|
654
841
|
}
|
|
655
842
|
try {
|
|
656
|
-
const { disposeShards } = await import("../shard-manager-
|
|
843
|
+
const { disposeShards } = await import("../shard-manager-4QLCI2RC.js");
|
|
657
844
|
disposeShards();
|
|
658
845
|
} catch {
|
|
659
846
|
}
|
|
@@ -723,7 +910,9 @@ async function handleHealthCheck(socket, requestId) {
|
|
|
723
910
|
try {
|
|
724
911
|
const testEmbed = await _context.getEmbeddingFor("health check");
|
|
725
912
|
testOk = Array.from(testEmbed.vector).length === EMBEDDING_DIM;
|
|
726
|
-
} catch {
|
|
913
|
+
} catch (e) {
|
|
914
|
+
process.stderr.write(`[exed] health check embed failed: ${e instanceof Error ? e.message : String(e)}
|
|
915
|
+
`);
|
|
727
916
|
testOk = false;
|
|
728
917
|
}
|
|
729
918
|
}
|
|
@@ -927,7 +1116,9 @@ async function _writeMemoryRecordInner(entry) {
|
|
|
927
1116
|
const { vectorToBlob } = await import("./store.js");
|
|
928
1117
|
vectorBlob = vectorToBlob(vector);
|
|
929
1118
|
}
|
|
930
|
-
} catch {
|
|
1119
|
+
} catch (e) {
|
|
1120
|
+
process.stderr.write(`[exed] embed failed for ingest (NULL vector, backfill later): ${e instanceof Error ? e.message : String(e)}
|
|
1121
|
+
`);
|
|
931
1122
|
}
|
|
932
1123
|
}
|
|
933
1124
|
const { getClient } = await import("./database.js");
|
|
@@ -989,7 +1180,7 @@ async function _writeMemoryRecordInner(entry) {
|
|
|
989
1180
|
const vRow = await client.execute({ sql: "SELECT version FROM memories WHERE id = ?", args: [id] });
|
|
990
1181
|
const version = Number(vRow.rows[0]?.version) || 0;
|
|
991
1182
|
try {
|
|
992
|
-
const { insertOntologyForMemory } = await import("../agentic-ontology-
|
|
1183
|
+
const { insertOntologyForMemory } = await import("../agentic-ontology-2TD5YS4O.js");
|
|
993
1184
|
await insertOntologyForMemory({
|
|
994
1185
|
id,
|
|
995
1186
|
agent_id: record.agent_id,
|
|
@@ -1004,7 +1195,9 @@ async function _writeMemoryRecordInner(entry) {
|
|
|
1004
1195
|
task_id: record.task_id ?? null,
|
|
1005
1196
|
trajectory: entry.trajectory ?? null
|
|
1006
1197
|
}, client);
|
|
1007
|
-
} catch {
|
|
1198
|
+
} catch (e) {
|
|
1199
|
+
process.stderr.write(`[exed] ontology extraction failed (non-blocking): ${e instanceof Error ? e.message : String(e)}
|
|
1200
|
+
`);
|
|
1008
1201
|
}
|
|
1009
1202
|
schedulePostWriteMemoryHygiene([id]);
|
|
1010
1203
|
return id;
|
|
@@ -1015,7 +1208,7 @@ function startMemoryQueueDrain() {
|
|
|
1015
1208
|
fired("memory_queue_drain");
|
|
1016
1209
|
if (!await ensureStoreForPolling()) return;
|
|
1017
1210
|
try {
|
|
1018
|
-
const { drainQueue } = await import("../memory-queue-
|
|
1211
|
+
const { drainQueue } = await import("../memory-queue-QX6UY4BP.js");
|
|
1019
1212
|
const entries = drainQueue();
|
|
1020
1213
|
if (entries.length === 0) return;
|
|
1021
1214
|
acted("memory_queue_drain");
|
|
@@ -1212,8 +1405,8 @@ async function resolveAndClaimPort() {
|
|
|
1212
1405
|
} catch {
|
|
1213
1406
|
}
|
|
1214
1407
|
try {
|
|
1215
|
-
const { execSync:
|
|
1216
|
-
const pids =
|
|
1408
|
+
const { execSync: execSync3 } = await import("child_process");
|
|
1409
|
+
const pids = execSync3(`lsof -ti :${targetPort} 2>/dev/null`, { encoding: "utf8" }).trim();
|
|
1217
1410
|
if (pids) {
|
|
1218
1411
|
process.stderr.write(`[exed] Port ${targetPort} held by PID(s) ${pids.replace(/\n/g, ",")} \u2014 killing
|
|
1219
1412
|
`);
|
|
@@ -1249,7 +1442,9 @@ async function startMcpHttpServer() {
|
|
|
1249
1442
|
sessionDetails.delete(sid);
|
|
1250
1443
|
try {
|
|
1251
1444
|
void transport.close();
|
|
1252
|
-
} catch {
|
|
1445
|
+
} catch (e) {
|
|
1446
|
+
process.stderr.write(`[exed] MCP transport close failed for ${sid}: ${e instanceof Error ? e.message : String(e)}
|
|
1447
|
+
`);
|
|
1253
1448
|
}
|
|
1254
1449
|
recordMcpHttpEvent({
|
|
1255
1450
|
level: reason === "session_expired" ? "warn" : "info",
|
|
@@ -1309,7 +1504,7 @@ async function startMcpHttpServer() {
|
|
|
1309
1504
|
return;
|
|
1310
1505
|
}
|
|
1311
1506
|
process.stderr.write("[exed] MCP HTTP: DB ready\n");
|
|
1312
|
-
const { initLicenseGate, getCachedLicenseGate } = await import("../license-gate-
|
|
1507
|
+
const { initLicenseGate, getCachedLicenseGate } = await import("../license-gate-VMGC326L.js");
|
|
1313
1508
|
const gateResult = await initLicenseGate();
|
|
1314
1509
|
if (!gateResult.hasKey) {
|
|
1315
1510
|
process.stderr.write(
|
|
@@ -1322,7 +1517,7 @@ async function startMcpHttpServer() {
|
|
|
1322
1517
|
);
|
|
1323
1518
|
}
|
|
1324
1519
|
Promise.all([
|
|
1325
|
-
import("../tool-capability-index-
|
|
1520
|
+
import("../tool-capability-index-XYEJ57EL.js"),
|
|
1326
1521
|
import("../tool-gates-5IWU2EVV.js")
|
|
1327
1522
|
]).then(async ([{ getToolCapabilityIndex }, { TOOL_CATEGORIES }]) => {
|
|
1328
1523
|
const gateState = getCachedLicenseGate();
|
|
@@ -1513,7 +1708,7 @@ async function startMcpHttpServer() {
|
|
|
1513
1708
|
};
|
|
1514
1709
|
const sessionMcp = new McpServer({ name: "exe-os", version: "1.3.0" });
|
|
1515
1710
|
const gateState = getCachedLicenseGate();
|
|
1516
|
-
const { wrapServerWithTelemetry } = await import("../tool-telemetry-
|
|
1711
|
+
const { wrapServerWithTelemetry } = await import("../tool-telemetry-Q6ZSUTHS.js");
|
|
1517
1712
|
const wrappedMcp = wrapServerWithTelemetry(sessionMcp);
|
|
1518
1713
|
registerAllTools(wrappedMcp, gateState.license, gateState.hasKey);
|
|
1519
1714
|
await sessionMcp.connect(transport);
|
|
@@ -1564,7 +1759,7 @@ async function startMcpHttpServer() {
|
|
|
1564
1759
|
};
|
|
1565
1760
|
const sessionMcp = new McpServer({ name: "exe-os", version: "1.3.0" });
|
|
1566
1761
|
const gateState = getCachedLicenseGate();
|
|
1567
|
-
const { wrapServerWithTelemetry } = await import("../tool-telemetry-
|
|
1762
|
+
const { wrapServerWithTelemetry } = await import("../tool-telemetry-Q6ZSUTHS.js");
|
|
1568
1763
|
const wrappedMcp = wrapServerWithTelemetry(sessionMcp);
|
|
1569
1764
|
registerAllTools(wrappedMcp, gateState.license, gateState.hasKey);
|
|
1570
1765
|
await sessionMcp.connect(transport);
|
|
@@ -1750,7 +1945,7 @@ function startSessionTTL() {
|
|
|
1750
1945
|
if (!await ensureStoreForPolling()) return;
|
|
1751
1946
|
try {
|
|
1752
1947
|
const { getClient } = await import("./database.js");
|
|
1753
|
-
const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-
|
|
1948
|
+
const { checkSessionTTL, createSessionTTLRealDeps } = await import("../daemon-orchestration-FIL7U2RV.js");
|
|
1754
1949
|
const deps = createSessionTTLRealDeps(getClient);
|
|
1755
1950
|
const killed = await checkSessionTTL(deps);
|
|
1756
1951
|
if (killed.length > 0) acted("session_ttl");
|
|
@@ -1774,7 +1969,7 @@ function startIdleKill() {
|
|
|
1774
1969
|
const { loadConfigSync } = await import("./config.js");
|
|
1775
1970
|
const cfg = loadConfigSync();
|
|
1776
1971
|
const { getClient } = await import("./database.js");
|
|
1777
|
-
const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-
|
|
1972
|
+
const { pollIdleKill, createIdleKillRealDeps } = await import("../daemon-orchestration-FIL7U2RV.js");
|
|
1778
1973
|
const deps = createIdleKillRealDeps(
|
|
1779
1974
|
getClient,
|
|
1780
1975
|
cfg.sessionLifecycle.idleKillIntercomAckWindowMs
|
|
@@ -1828,10 +2023,12 @@ function startConsolidation() {
|
|
|
1828
2023
|
try {
|
|
1829
2024
|
const { embed } = await import("./embedder.js");
|
|
1830
2025
|
embedFn = embed;
|
|
1831
|
-
} catch {
|
|
2026
|
+
} catch (e) {
|
|
2027
|
+
process.stderr.write(`[exed] embedder unavailable for consolidation (NULL vectors): ${e instanceof Error ? e.message : String(e)}
|
|
2028
|
+
`);
|
|
1832
2029
|
}
|
|
1833
2030
|
try {
|
|
1834
|
-
const { createBackup } = await import("../db-backup-
|
|
2031
|
+
const { createBackup } = await import("../db-backup-RZA3JICI.js");
|
|
1835
2032
|
createBackup("pre-consolidation");
|
|
1836
2033
|
} catch (e) {
|
|
1837
2034
|
process.stderr.write("[exe-daemon] pre-consolidation backup: " + (e instanceof Error ? e.message : String(e)) + "\n");
|
|
@@ -1865,9 +2062,27 @@ function startConsolidation() {
|
|
|
1865
2062
|
});
|
|
1866
2063
|
}
|
|
1867
2064
|
var CLOUD_SYNC_INTERVAL_MS = Number(process.env.EXE_CLOUD_SYNC_INTERVAL_MS) || 5 * 60 * 1e3;
|
|
2065
|
+
var CLOUD_SYNC_BACKOFF_BASE_MS = 5e3;
|
|
2066
|
+
var CLOUD_SYNC_BACKOFF_MAX_MS = 5 * 6e4;
|
|
2067
|
+
var CLOUD_SYNC_CIRCUIT_BREAK = 10;
|
|
2068
|
+
var _cloudSyncConsecutiveFailures = 0;
|
|
2069
|
+
var _cloudSyncBackoffMs = 0;
|
|
2070
|
+
var _cloudSyncPaused = false;
|
|
1868
2071
|
function startCloudSyncTimer() {
|
|
1869
2072
|
const tick = async () => {
|
|
1870
2073
|
fired("cloud_sync");
|
|
2074
|
+
if (_cloudSyncPaused) {
|
|
2075
|
+
if (_cloudSyncConsecutiveFailures > 0 && _cloudSyncConsecutiveFailures % 20 === 0) {
|
|
2076
|
+
process.stderr.write(`[exed] Cloud sync still paused after ${_cloudSyncConsecutiveFailures} failures. Server may be unreachable.
|
|
2077
|
+
`);
|
|
2078
|
+
}
|
|
2079
|
+
_cloudSyncConsecutiveFailures++;
|
|
2080
|
+
return;
|
|
2081
|
+
}
|
|
2082
|
+
if (_cloudSyncBackoffMs > 0) {
|
|
2083
|
+
_cloudSyncBackoffMs = Math.max(0, _cloudSyncBackoffMs - CLOUD_SYNC_INTERVAL_MS);
|
|
2084
|
+
return;
|
|
2085
|
+
}
|
|
1871
2086
|
try {
|
|
1872
2087
|
const { loadConfig } = await import("./config.js");
|
|
1873
2088
|
const config = await loadConfig();
|
|
@@ -1877,6 +2092,13 @@ function startCloudSyncTimer() {
|
|
|
1877
2092
|
apiKey: config.cloud.apiKey,
|
|
1878
2093
|
endpoint: config.cloud.endpoint
|
|
1879
2094
|
});
|
|
2095
|
+
if (_cloudSyncConsecutiveFailures > 0) {
|
|
2096
|
+
process.stderr.write(`[exed] Cloud sync recovered after ${_cloudSyncConsecutiveFailures} failures
|
|
2097
|
+
`);
|
|
2098
|
+
}
|
|
2099
|
+
_cloudSyncConsecutiveFailures = 0;
|
|
2100
|
+
_cloudSyncBackoffMs = 0;
|
|
2101
|
+
_cloudSyncPaused = false;
|
|
1880
2102
|
if (result.pushed > 0 || result.pulled > 0) {
|
|
1881
2103
|
acted("cloud_sync");
|
|
1882
2104
|
process.stderr.write(
|
|
@@ -1885,14 +2107,36 @@ function startCloudSyncTimer() {
|
|
|
1885
2107
|
);
|
|
1886
2108
|
}
|
|
1887
2109
|
} catch (err) {
|
|
1888
|
-
|
|
1889
|
-
|
|
2110
|
+
_cloudSyncConsecutiveFailures++;
|
|
2111
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
2112
|
+
_cloudSyncBackoffMs = Math.min(
|
|
2113
|
+
CLOUD_SYNC_BACKOFF_BASE_MS * Math.pow(2, _cloudSyncConsecutiveFailures - 1),
|
|
2114
|
+
CLOUD_SYNC_BACKOFF_MAX_MS
|
|
2115
|
+
);
|
|
2116
|
+
if (_cloudSyncConsecutiveFailures >= CLOUD_SYNC_CIRCUIT_BREAK) {
|
|
2117
|
+
_cloudSyncPaused = true;
|
|
2118
|
+
process.stderr.write(
|
|
2119
|
+
`[exed] Cloud sync PAUSED after ${CLOUD_SYNC_CIRCUIT_BREAK} consecutive failures. Last error: ${msg}. Will retry when daemon restarts or /exe-cloud sync is run manually.
|
|
2120
|
+
`
|
|
2121
|
+
);
|
|
2122
|
+
logDaemonHealth({
|
|
2123
|
+
event: "cloud_sync_fail",
|
|
2124
|
+
pid: process.pid,
|
|
2125
|
+
message: `Cloud sync circuit-breaker tripped after ${CLOUD_SYNC_CIRCUIT_BREAK} failures`,
|
|
2126
|
+
data: { consecutiveFailures: _cloudSyncConsecutiveFailures, lastError: msg }
|
|
2127
|
+
});
|
|
2128
|
+
} else {
|
|
2129
|
+
process.stderr.write(
|
|
2130
|
+
`[exed] Cloud sync error (${_cloudSyncConsecutiveFailures}/${CLOUD_SYNC_CIRCUIT_BREAK}, backoff ${Math.round(_cloudSyncBackoffMs / 1e3)}s): ${msg}
|
|
2131
|
+
`
|
|
2132
|
+
);
|
|
2133
|
+
}
|
|
1890
2134
|
}
|
|
1891
2135
|
};
|
|
1892
2136
|
const timer = setInterval(() => void tick(), CLOUD_SYNC_INTERVAL_MS);
|
|
1893
2137
|
timer.unref();
|
|
1894
2138
|
setTimeout(() => void tick(), 3e4);
|
|
1895
|
-
process.stderr.write(`[exed] Cloud sync timer started (every ${CLOUD_SYNC_INTERVAL_MS / 6e4}m)
|
|
2139
|
+
process.stderr.write(`[exed] Cloud sync timer started (every ${CLOUD_SYNC_INTERVAL_MS / 6e4}m, backoff on failure)
|
|
1896
2140
|
`);
|
|
1897
2141
|
}
|
|
1898
2142
|
var SKILL_SWEEP_INTERVAL_MS = 6 * 60 * 60 * 1e3;
|
|
@@ -2078,7 +2322,7 @@ function startReflectionSweep() {
|
|
|
2078
2322
|
for (const row of agents.rows) {
|
|
2079
2323
|
const agentId = row.agent_id;
|
|
2080
2324
|
try {
|
|
2081
|
-
const { runReflection } = await import("../memory-reflection-
|
|
2325
|
+
const { runReflection } = await import("../memory-reflection-VHCEW3UN.js");
|
|
2082
2326
|
const result = await runReflection(agentId);
|
|
2083
2327
|
totalInsights += result.contradictions + result.patterns + result.summaries;
|
|
2084
2328
|
} catch (e) {
|
|
@@ -2107,7 +2351,7 @@ function startReflectionSweep() {
|
|
|
2107
2351
|
if (memories > 100 && cards < memories * 0.1) {
|
|
2108
2352
|
process.stderr.write(`[exed] Memory cards sparse (${cards} cards / ${memories} memories) \u2014 running backfill...
|
|
2109
2353
|
`);
|
|
2110
|
-
const { insertMemoryCardsForBatch } = await import("../memory-cards-
|
|
2354
|
+
const { insertMemoryCardsForBatch } = await import("../memory-cards-MA5SIQKN.js");
|
|
2111
2355
|
const batchSize = 500;
|
|
2112
2356
|
let offset = 0;
|
|
2113
2357
|
let totalCards = 0;
|
|
@@ -2274,7 +2518,7 @@ function startOrphanReaper() {
|
|
|
2274
2518
|
const tick = async () => {
|
|
2275
2519
|
fired("orphan_reaper");
|
|
2276
2520
|
try {
|
|
2277
|
-
const { reapOrphanedMcpProcesses, createOrphanReaperRealDeps } = await import("../daemon-orchestration-
|
|
2521
|
+
const { reapOrphanedMcpProcesses, createOrphanReaperRealDeps } = await import("../daemon-orchestration-FIL7U2RV.js");
|
|
2278
2522
|
const deps = createOrphanReaperRealDeps();
|
|
2279
2523
|
const reaped = await reapOrphanedMcpProcesses(deps);
|
|
2280
2524
|
if (reaped.length > 0) acted("orphan_reaper");
|
|
@@ -2301,7 +2545,7 @@ function startAutoWake() {
|
|
|
2301
2545
|
if (!await ensureStoreForPolling()) return;
|
|
2302
2546
|
try {
|
|
2303
2547
|
const { getClient } = await import("./database.js");
|
|
2304
|
-
const { pollOrphanedTasks, createAutoWakeRealDeps } = await import("../daemon-orchestration-
|
|
2548
|
+
const { pollOrphanedTasks, createAutoWakeRealDeps } = await import("../daemon-orchestration-FIL7U2RV.js");
|
|
2305
2549
|
const deps = createAutoWakeRealDeps(getClient, process.cwd());
|
|
2306
2550
|
const woken = await pollOrphanedTasks(deps);
|
|
2307
2551
|
if (woken.length > 0) acted("auto_wake");
|
|
@@ -2326,7 +2570,7 @@ function startStuckTaskRelease() {
|
|
|
2326
2570
|
if (!await ensureStoreForPolling()) return;
|
|
2327
2571
|
try {
|
|
2328
2572
|
const { getClient } = await import("./database.js");
|
|
2329
|
-
const { releaseStuckTasks, createStuckTaskRealDeps } = await import("../daemon-orchestration-
|
|
2573
|
+
const { releaseStuckTasks, createStuckTaskRealDeps } = await import("../daemon-orchestration-FIL7U2RV.js");
|
|
2330
2574
|
const deps = createStuckTaskRealDeps(getClient);
|
|
2331
2575
|
const released = await releaseStuckTasks(deps);
|
|
2332
2576
|
if (released.length > 0) {
|
|
@@ -2359,7 +2603,7 @@ function startTaskEnforcementScanner() {
|
|
|
2359
2603
|
const { loadAgentConfig } = await import("./agent-config.js");
|
|
2360
2604
|
const { getClient } = await import("./database.js");
|
|
2361
2605
|
const { loadEmployeesSync } = await import("./employees.js");
|
|
2362
|
-
const { sessionScopeFilter } = await import("../task-scope-
|
|
2606
|
+
const { sessionScopeFilter } = await import("../task-scope-7XCYEZAG.js");
|
|
2363
2607
|
await runTaskEnforcementTick({
|
|
2364
2608
|
transport: getTransport(),
|
|
2365
2609
|
agentConfig: loadAgentConfig(),
|
|
@@ -2488,7 +2732,7 @@ function startBackgroundJobGuardrails() {
|
|
|
2488
2732
|
const tick = async () => {
|
|
2489
2733
|
fired("background_job_guardrails");
|
|
2490
2734
|
try {
|
|
2491
|
-
const { enforceBackgroundJobGuardrails } = await import("../background-jobs-
|
|
2735
|
+
const { enforceBackgroundJobGuardrails } = await import("../background-jobs-6V4GQ5QT.js");
|
|
2492
2736
|
const actions = enforceBackgroundJobGuardrails();
|
|
2493
2737
|
if (actions.length > 0) {
|
|
2494
2738
|
acted("background_job_guardrails");
|
|
@@ -2629,8 +2873,8 @@ function startAutoUpdateCheck() {
|
|
|
2629
2873
|
);
|
|
2630
2874
|
if (autoInstall) {
|
|
2631
2875
|
process.stderr.write("[exed] Auto-installing update...\n");
|
|
2632
|
-
const { execSync:
|
|
2633
|
-
|
|
2876
|
+
const { execSync: execSync3 } = await import("child_process");
|
|
2877
|
+
execSync3("npm install -g @askexenow/exe-os@latest", {
|
|
2634
2878
|
timeout: 12e4,
|
|
2635
2879
|
stdio: ["pipe", "pipe", "pipe"]
|
|
2636
2880
|
});
|
|
@@ -2677,8 +2921,11 @@ try {
|
|
|
2677
2921
|
);
|
|
2678
2922
|
process.exit(0);
|
|
2679
2923
|
}
|
|
2680
|
-
} catch {
|
|
2681
|
-
|
|
2924
|
+
} catch (e) {
|
|
2925
|
+
const msg = `PID file vanished during startup race: ${e instanceof Error ? e.message : String(e)}`;
|
|
2926
|
+
process.stderr.write(`[exed] ${msg}
|
|
2927
|
+
`);
|
|
2928
|
+
logDaemonHealth({ event: "singleton_conflict", pid: process.pid, message: msg });
|
|
2682
2929
|
process.exit(0);
|
|
2683
2930
|
}
|
|
2684
2931
|
process.env.EXE_IS_DAEMON = "1";
|
|
@@ -2732,10 +2979,10 @@ try {
|
|
|
2732
2979
|
message: "MCP HTTP server bound and ready",
|
|
2733
2980
|
data: { port: 48739 }
|
|
2734
2981
|
});
|
|
2735
|
-
const { startToolTelemetryFlush } = await import("../tool-telemetry-
|
|
2982
|
+
const { startToolTelemetryFlush } = await import("../tool-telemetry-Q6ZSUTHS.js");
|
|
2736
2983
|
startToolTelemetryFlush();
|
|
2737
2984
|
process.stderr.write("[exed] Tool telemetry started (flush every 5m)\n");
|
|
2738
|
-
const { startProjectionWorker } = await import("../projection-worker-
|
|
2985
|
+
const { startProjectionWorker } = await import("../projection-worker-UL47LRTS.js");
|
|
2739
2986
|
startProjectionWorker();
|
|
2740
2987
|
try {
|
|
2741
2988
|
const { loadConfig } = await import("./config.js");
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
recentRecords,
|
|
6
6
|
rrfMerge,
|
|
7
7
|
rrfMergeMulti
|
|
8
|
-
} from "../chunk-
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
8
|
+
} from "../chunk-XDWCEQLH.js";
|
|
9
|
+
import "../chunk-4ADWX7S6.js";
|
|
10
|
+
import "../chunk-7U65IF2W.js";
|
|
11
11
|
import "../chunk-WZQ4CPRG.js";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-ZJ7N6BNZ.js";
|
|
13
|
+
import "../chunk-KSFOG6FJ.js";
|
|
14
14
|
import "../chunk-4NYQAS33.js";
|
|
15
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-ZKYHW6KY.js";
|
|
16
16
|
import "../chunk-XUHFQHGZ.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-ISRQKXHM.js";
|
|
18
18
|
import "../chunk-X2IMCCM5.js";
|
|
19
19
|
import "../chunk-KFQGP6VL.js";
|
|
20
20
|
export {
|
package/dist/lib/identity.js
CHANGED
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
identityPath,
|
|
5
5
|
listIdentities,
|
|
6
6
|
updateIdentity
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
7
|
+
} from "../chunk-KHUJEI3A.js";
|
|
8
|
+
import "../chunk-ZJ7N6BNZ.js";
|
|
9
|
+
import "../chunk-KSFOG6FJ.js";
|
|
10
10
|
import "../chunk-4NYQAS33.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-ZKYHW6KY.js";
|
|
12
|
+
import "../chunk-ISRQKXHM.js";
|
|
13
13
|
import "../chunk-X2IMCCM5.js";
|
|
14
14
|
import "../chunk-KFQGP6VL.js";
|
|
15
15
|
export {
|