@askexenow/exe-os 0.9.136 → 0.9.138
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/{agentic-ontology-2TD5YS4O.js → agentic-ontology-TU2FNTHI.js} +1 -1
- package/dist/{backfill-metadata-5LNLRCA6.js → backfill-metadata-LVUAD6WY.js} +3 -3
- package/dist/{behaviors-PPFGGHYD.js → behaviors-V3O5YYUK.js} +2 -2
- package/dist/bin/agentic-ontology-backfill.js +4 -4
- package/dist/bin/agentic-reflection-backfill.js +5 -5
- package/dist/bin/agentic-semantic-label.js +4 -4
- package/dist/bin/backfill-conversations.js +3 -3
- package/dist/bin/backfill-responses.js +3 -3
- package/dist/bin/backfill-vectors.js +3 -3
- package/dist/bin/bulk-sync-postgres.js +5 -5
- package/dist/bin/cleanup-stale-review-tasks.js +5 -4
- package/dist/bin/cli.js +54 -11
- package/dist/bin/exe-agent.js +10 -10
- package/dist/bin/exe-assign.js +3 -3
- package/dist/bin/exe-boot.js +10 -9
- package/dist/bin/exe-call.js +3 -3
- package/dist/bin/exe-cloud.js +3 -3
- package/dist/bin/exe-dispatch.js +6 -5
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +6 -6
- package/dist/bin/exe-forget.js +5 -5
- package/dist/bin/exe-gateway.js +3 -3
- package/dist/bin/exe-heartbeat.js +5 -4
- package/dist/bin/exe-kill.js +5 -5
- package/dist/bin/exe-launch-agent.js +48 -14
- package/dist/bin/exe-new-employee.js +5 -5
- package/dist/bin/exe-pending-messages.js +6 -5
- package/dist/bin/exe-pending-notifications.js +5 -4
- package/dist/bin/exe-pending-reviews.js +5 -4
- package/dist/bin/exe-rename.js +3 -3
- package/dist/bin/exe-review.js +4 -4
- package/dist/bin/exe-search.js +4 -4
- package/dist/bin/exe-session-cleanup.js +9 -8
- package/dist/bin/exe-settings.js +3 -3
- package/dist/bin/exe-start-codex.js +7 -7
- package/dist/bin/exe-start-opencode.js +6 -6
- package/dist/bin/exe-status.js +6 -6
- package/dist/bin/exe-team.js +2 -2
- package/dist/bin/git-sweep.js +5 -4
- package/dist/bin/graph-backfill.js +3 -3
- package/dist/bin/graph-export.js +4 -4
- package/dist/bin/install.js +3 -3
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/scan-tasks.js +10 -9
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +3 -3
- package/dist/branding-JEE7MJF2.js +99 -0
- package/dist/{capacity-monitor-PFHHXTEN.js → capacity-monitor-56DTRWOS.js} +6 -5
- package/dist/{catchup-brief-Y75GOHWU.js → catchup-brief-6GRGQ2EK.js} +7 -6
- package/dist/{chunk-ZJ7N6BNZ.js → chunk-2G6QGXVX.js} +21 -0
- package/dist/{chunk-S67DRFRK.js → chunk-2ISCJ5PQ.js} +1 -1
- package/dist/{chunk-5NLZS5KX.js → chunk-5QCIPC7Z.js} +2 -2
- package/dist/{chunk-VIONSYFC.js → chunk-7FYOTSJP.js} +1 -1
- package/dist/{chunk-3BVZNKAZ.js → chunk-7GOVGBBM.js} +3 -3
- package/dist/{chunk-T65APBMF.js → chunk-7TW5HR4E.js} +39 -21
- package/dist/{chunk-YMMTBQQY.js → chunk-7V3BJHG6.js} +2 -2
- package/dist/{chunk-DIQOUMHM.js → chunk-ABIGFAFY.js} +1 -1
- package/dist/{chunk-MPZRPM5X.js → chunk-AHQDWRSM.js} +1 -1
- package/dist/{chunk-KHUJEI3A.js → chunk-BOPKW4AV.js} +1 -1
- package/dist/{chunk-3UKHLUXH.js → chunk-BQ5YXRBI.js} +1 -1
- package/dist/{chunk-TXRDECEW.js → chunk-BUHXM7ZL.js} +3 -3
- package/dist/{chunk-5DZTDWFU.js → chunk-BYNEC472.js} +1 -1
- package/dist/{chunk-X3KJ3TT7.js → chunk-E6ORBQHP.js} +1 -0
- package/dist/{chunk-XDWCEQLH.js → chunk-EBMHOMN2.js} +6 -6
- package/dist/{chunk-GISRZK6K.js → chunk-EZ2TJX6O.js} +19 -3
- package/dist/{chunk-ZNWYU3VE.js → chunk-EZTYTAVU.js} +8 -8
- package/dist/{chunk-E2XB56OH.js → chunk-F63ZHBZY.js} +1 -1
- package/dist/{chunk-CTEENZVZ.js → chunk-FQZY4M45.js} +20 -3
- package/dist/{chunk-ARZWYVYC.js → chunk-GRLQJ27R.js} +1 -1
- package/dist/{chunk-D7FYU6DX.js → chunk-I2LCIAUC.js} +2 -2
- package/dist/{chunk-UXGZ3V3U.js → chunk-ITMXM6GF.js} +1 -1
- package/dist/{chunk-FM4UBRBE.js → chunk-JN2RIMLI.js} +3 -3
- package/dist/{chunk-ARQQ4T47.js → chunk-K7W7UJ6Z.js} +1 -1
- package/dist/{chunk-NBJIGVPG.js → chunk-LEVPSCVX.js} +43 -7
- package/dist/{chunk-AVUQCUZC.js → chunk-LPIY2AUD.js} +1 -1
- package/dist/{chunk-GU2Z6K2T.js → chunk-MQNM4FW4.js} +3 -2
- package/dist/{chunk-O2ENLWKX.js → chunk-MSFSQSJO.js} +1 -1
- package/dist/{chunk-NSVI6RZ5.js → chunk-N2ZX27ID.js} +1 -1
- package/dist/{chunk-5DHM77JE.js → chunk-NBYMO4RZ.js} +2 -0
- package/dist/{chunk-A63V4QMR.js → chunk-NFMNO3XE.js} +732 -544
- package/dist/{chunk-4ADWX7S6.js → chunk-OVFU26ZD.js} +5 -5
- package/dist/{chunk-5XNCH6UM.js → chunk-OZ4SN7ZF.js} +1 -1
- package/dist/{chunk-REFUKSCU.js → chunk-PB5RHF74.js} +2 -2
- package/dist/{chunk-QKBDAHFM.js → chunk-PFGFOALA.js} +1 -1
- package/dist/chunk-PKPW2W33.js +134 -0
- package/dist/{chunk-IMZM3H6N.js → chunk-R3IILARI.js} +2 -2
- package/dist/{chunk-VAPODXIB.js → chunk-T5A4EGUG.js} +1 -1
- package/dist/{chunk-TERS54YJ.js → chunk-TIJYLKNW.js} +1 -1
- package/dist/{chunk-WQ6FW5JD.js → chunk-TRLP7FHS.js} +1 -1
- package/dist/{chunk-IUKRBQ2B.js → chunk-TT3ND3MM.js} +2 -2
- package/dist/{chunk-NR3MPNTF.js → chunk-UT3OZWST.js} +8 -8
- package/dist/{chunk-XK3P2PRN.js → chunk-VGOFRIAI.js} +2 -2
- package/dist/{chunk-NFRFF6QS.js → chunk-VOA7GHIO.js} +1 -1
- package/dist/{chunk-J7LFCZMQ.js → chunk-WTPYZG4I.js} +65 -15
- package/dist/{chunk-G2HJSPM4.js → chunk-Z36IJ3XX.js} +2 -2
- package/dist/{chunk-W7G2DOLC.js → chunk-ZKOQD4FT.js} +5 -5
- package/dist/core-memory-DUENM2P6.js +79 -0
- package/dist/{crdt-sync-UUJDUXTJ.js → crdt-sync-SENINDKP.js} +1 -1
- package/dist/{crm-webhook-UXZORR4I.js → crm-webhook-JIXOP3UR.js} +2 -2
- package/dist/{cto-delegation-gate-7MIMXB4T.js → cto-delegation-gate-5ETBWFAI.js} +4 -3
- package/dist/{daemon-orchestration-FIL7U2RV.js → daemon-orchestration-6UNZTZHX.js} +10 -6
- package/dist/{entity-boost-CSKKVLPV.js → entity-boost-CZZVTBSY.js} +79 -0
- package/dist/{exe-drift-D7YCMMR3.js → exe-drift-WLMWMSOM.js} +3 -3
- package/dist/{exe-export-YKP26EW6.js → exe-export-3RQMZAR3.js} +5 -5
- package/dist/{exe-import-HSQORBEH.js → exe-import-URXIQGOM.js} +5 -5
- package/dist/{exe-key-QLXFQGNV.js → exe-key-47ZUWMGT.js} +1 -1
- package/dist/{fast-db-init-RFYRERZL.js → fast-db-init-Z67ITX23.js} +1 -1
- package/dist/gateway/index.js +8 -8
- package/dist/{gateway-client-APTYJNCL.js → gateway-client-VFKE2WJX.js} +1 -1
- package/dist/{git-staleness-2IBA7MM2.js → git-staleness-PP7MPTZS.js} +1 -1
- package/dist/{git-task-sweep-ZZQHHVXR.js → git-task-sweep-TMVL5UUD.js} +5 -4
- package/dist/{global-procedures-6B5JT3B5.js → global-procedures-OQFOUA5G.js} +2 -2
- package/dist/hooks/bug-report-worker.js +8 -7
- package/dist/hooks/codex-stop-task-finalizer.js +8 -7
- package/dist/hooks/commit-complete.js +7 -6
- package/dist/hooks/error-recall.js +4 -4
- package/dist/hooks/ingest.js +2 -2
- package/dist/hooks/instructions-loaded.js +3 -3
- package/dist/hooks/notification.js +1 -1
- package/dist/hooks/post-compact.js +5 -4
- package/dist/hooks/post-tool-combined.js +3 -3
- package/dist/hooks/pre-compact.js +6 -5
- package/dist/hooks/pre-tool-use.js +9 -8
- package/dist/hooks/prompt-submit.js +12 -11
- package/dist/hooks/session-end.js +10 -9
- package/dist/hooks/session-start.js +4 -4
- package/dist/hooks/stop.js +8 -7
- package/dist/hooks/subagent-stop.js +5 -4
- package/dist/hooks/summary-worker.js +8 -7
- package/dist/index.js +13 -12
- package/dist/{installer-GDMELU5L.js → installer-RVGGMXQU.js} +4 -4
- package/dist/{installer-EIUTCCHV.js → installer-RVLKWR3X.js} +2 -2
- package/dist/{installer-WZEN2XJ7.js → installer-V7BGTU55.js} +2 -2
- package/dist/lib/cloud-sync.js +3 -3
- package/dist/lib/consolidation.js +4 -4
- package/dist/lib/database.js +1 -1
- package/dist/lib/db.js +1 -1
- package/dist/lib/employee-templates.js +3 -3
- package/dist/lib/exe-daemon.js +103 -21
- package/dist/lib/hybrid-search.js +4 -4
- package/dist/lib/identity.js +2 -2
- package/dist/lib/messaging.js +5 -4
- package/dist/lib/reminders.js +2 -2
- package/dist/lib/schedules.js +4 -4
- package/dist/lib/skill-learning.js +3 -3
- package/dist/lib/store.js +3 -3
- package/dist/lib/tasks.js +7 -6
- package/dist/lib/tmux-routing.js +4 -3
- package/dist/lib/token-spend.js +2 -2
- package/dist/lib/ws-client.js +1 -1
- package/dist/mcp/register-tools.js +45 -45
- package/dist/mcp/server.js +45 -45
- package/dist/mcp/tools/complete-reminder.js +3 -3
- package/dist/mcp/tools/create-reminder.js +3 -3
- package/dist/mcp/tools/create-task.js +8 -7
- package/dist/mcp/tools/deactivate-behavior.js +3 -3
- package/dist/mcp/tools/list-reminders.js +3 -3
- package/dist/mcp/tools/list-tasks.js +8 -7
- package/dist/mcp/tools/send-message.js +6 -5
- package/dist/mcp/tools/update-task.js +8 -7
- package/dist/{memory-cards-MA5SIQKN.js → memory-cards-H2GNWDF2.js} +1 -1
- package/dist/{memory-reflection-VHCEW3UN.js → memory-reflection-J3LYZM5Y.js} +1 -1
- package/dist/{notifications-NY2OVCDV.js → notifications-3ZZS36PK.js} +4 -3
- package/dist/{orchestrator-ZVOTKKV6.js → orchestrator-W7XYR7EZ.js} +6 -5
- package/dist/{plan-limits-UQTXKXJQ.js → plan-limits-3FXBGHWT.js} +2 -2
- package/dist/{projection-worker-UL47LRTS.js → projection-worker-XGV76EMZ.js} +1 -1
- package/dist/push-notifications-S4QIZWJI.js +17 -0
- package/dist/runtime/index.js +11 -10
- package/dist/{session-events-DU6PKAJN.js → session-events-27MUL77I.js} +5 -4
- package/dist/{session-kill-telemetry-5XGSTQJS.js → session-kill-telemetry-WVFJ4U3A.js} +2 -2
- package/dist/{session-scope-WJRSCUKP.js → session-scope-QZTSCYLT.js} +5 -4
- package/dist/{setup-wizard-36V5GCGG.js → setup-wizard-JEYXHYVS.js} +1 -1
- package/dist/{task-scope-7XCYEZAG.js → task-scope-2L5DLU6T.js} +4 -3
- package/dist/{tasks-crud-DUNJJUV3.js → tasks-crud-MDCY6JHU.js} +5 -4
- package/dist/{tasks-review-BPSW2TBZ.js → tasks-review-QO55FYZI.js} +4 -3
- package/dist/{tool-gates-CAFAD576.js → tool-gates-FSNGZNXW.js} +1 -1
- package/dist/{tool-gates-5IWU2EVV.js → tool-gates-P6HATVYH.js} +1 -1
- package/dist/{tool-telemetry-Q6ZSUTHS.js → tool-telemetry-NW6HQYPA.js} +1 -1
- package/dist/tui/App.js +13 -12
- package/dist/{tui-data-GUMMW3IG.js → tui-data-6CKBIJJJ.js} +4 -3
- package/dist/{workflow-engine-A6K4MHN3.js → workflow-engine-7W4MSNBF.js} +1 -1
- package/package.json +2 -1
- package/release-notes.json +33343 -0
- package/dist/{chunk-M6ODLM7X.js → chunk-2FWMSQWU.js} +0 -0
- package/dist/{chunk-4AZA3DZM.js → chunk-6AJ4KAAB.js} +0 -0
- package/dist/{chunk-7U65IF2W.js → chunk-DLMPVZ4I.js} +0 -0
- package/dist/{chunk-KQW5PWOA.js → chunk-F3MUSAZY.js} +3 -3
- /package/dist/{chunk-KI3UEJUR.js → chunk-G3LVAJON.js} +0 -0
- /package/dist/{chunk-M6FENV7U.js → chunk-GMARURIG.js} +0 -0
- /package/dist/{chunk-FR5FFQ6G.js → chunk-KJMSHBWT.js} +0 -0
- /package/dist/{chunk-RCKUCKED.js → chunk-N6BE2CUT.js} +0 -0
- /package/dist/{chunk-6ZXIG7R6.js → chunk-WZ63HFR2.js} +0 -0
- /package/dist/{wiki-acl-QY5EXWEQ.js → wiki-acl-RVCO4WSP.js} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
findScopedDuplicate,
|
|
3
3
|
governMemoryRecord,
|
|
4
4
|
schedulePostWriteMemoryHygiene
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DLMPVZ4I.js";
|
|
6
6
|
import {
|
|
7
7
|
init_state_bus,
|
|
8
8
|
orgBus
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
getClient,
|
|
14
14
|
initTurso,
|
|
15
15
|
init_database
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2G6QGXVX.js";
|
|
17
17
|
import {
|
|
18
18
|
EMBEDDING_DIM,
|
|
19
19
|
init_memory
|
|
@@ -125,7 +125,7 @@ async function initStore(options) {
|
|
|
125
125
|
);
|
|
126
126
|
_nextVersion = (Number(vResult.rows[0]?.max_v) || 0) + 1;
|
|
127
127
|
try {
|
|
128
|
-
const { loadGlobalProcedures } = await import("./global-procedures-
|
|
128
|
+
const { loadGlobalProcedures } = await import("./global-procedures-OQFOUA5G.js");
|
|
129
129
|
await loadGlobalProcedures();
|
|
130
130
|
} catch (e) {
|
|
131
131
|
logStoreWarn("catch", e);
|
|
@@ -390,13 +390,13 @@ async function flushBatch() {
|
|
|
390
390
|
const globalStmts = batch.map(buildStmt);
|
|
391
391
|
await globalClient.batch(globalStmts, "write");
|
|
392
392
|
try {
|
|
393
|
-
const { insertMemoryCardsForBatch } = await import("./memory-cards-
|
|
393
|
+
const { insertMemoryCardsForBatch } = await import("./memory-cards-H2GNWDF2.js");
|
|
394
394
|
await insertMemoryCardsForBatch(batch);
|
|
395
395
|
} catch (e) {
|
|
396
396
|
logStoreWarn("catch", e);
|
|
397
397
|
}
|
|
398
398
|
try {
|
|
399
|
-
const { insertOntologyForBatch } = await import("./agentic-ontology-
|
|
399
|
+
const { insertOntologyForBatch } = await import("./agentic-ontology-TU2FNTHI.js");
|
|
400
400
|
await insertOntologyForBatch(batch);
|
|
401
401
|
} catch (e) {
|
|
402
402
|
logStoreWarn("catch", e);
|
|
@@ -6,11 +6,11 @@ import {
|
|
|
6
6
|
resolveExeSession,
|
|
7
7
|
sendIntercom,
|
|
8
8
|
strictSessionScopeFilter
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-FQZY4M45.js";
|
|
10
10
|
import {
|
|
11
11
|
getClient,
|
|
12
12
|
init_database
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2G6QGXVX.js";
|
|
14
14
|
|
|
15
15
|
// src/lib/messaging.ts
|
|
16
16
|
init_database();
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import {
|
|
2
|
+
config_exports,
|
|
3
|
+
init_config
|
|
4
|
+
} from "./chunk-ISRQKXHM.js";
|
|
5
|
+
import {
|
|
6
|
+
__esm,
|
|
7
|
+
__export,
|
|
8
|
+
__toCommonJS
|
|
9
|
+
} from "./chunk-KFQGP6VL.js";
|
|
10
|
+
|
|
11
|
+
// src/lib/push-notifications.ts
|
|
12
|
+
var push_notifications_exports = {};
|
|
13
|
+
__export(push_notifications_exports, {
|
|
14
|
+
_resetPushConfig: () => _resetPushConfig,
|
|
15
|
+
loadPushConfig: () => loadPushConfig,
|
|
16
|
+
pushNotify: () => pushNotify,
|
|
17
|
+
pushNotifyAsync: () => pushNotifyAsync
|
|
18
|
+
});
|
|
19
|
+
function loadPushConfig() {
|
|
20
|
+
if (_cachedConfig && _notifyOn) return { config: _cachedConfig, notifyOn: _notifyOn };
|
|
21
|
+
try {
|
|
22
|
+
const { loadConfigSync } = (init_config(), __toCommonJS(config_exports));
|
|
23
|
+
const cfg = loadConfigSync();
|
|
24
|
+
_cachedConfig = cfg.notifications ?? {};
|
|
25
|
+
const events = cfg.notify_on;
|
|
26
|
+
_notifyOn = new Set(events ?? ["task_complete", "task_blocked", "context_full", "error_spike", "daemon_crash"]);
|
|
27
|
+
} catch {
|
|
28
|
+
_cachedConfig = {};
|
|
29
|
+
_notifyOn = /* @__PURE__ */ new Set(["task_complete", "task_blocked", "context_full", "error_spike", "daemon_crash"]);
|
|
30
|
+
}
|
|
31
|
+
return { config: _cachedConfig, notifyOn: _notifyOn };
|
|
32
|
+
}
|
|
33
|
+
function _resetPushConfig() {
|
|
34
|
+
_cachedConfig = null;
|
|
35
|
+
_notifyOn = null;
|
|
36
|
+
}
|
|
37
|
+
async function sendTelegram(botToken, chatId, message) {
|
|
38
|
+
try {
|
|
39
|
+
const url = `https://api.telegram.org/bot${botToken}/sendMessage`;
|
|
40
|
+
const res = await fetch(url, {
|
|
41
|
+
method: "POST",
|
|
42
|
+
headers: { "Content-Type": "application/json" },
|
|
43
|
+
body: JSON.stringify({
|
|
44
|
+
chat_id: chatId,
|
|
45
|
+
text: message,
|
|
46
|
+
parse_mode: "Markdown",
|
|
47
|
+
disable_web_page_preview: true
|
|
48
|
+
}),
|
|
49
|
+
signal: AbortSignal.timeout(TELEGRAM_TIMEOUT_MS)
|
|
50
|
+
});
|
|
51
|
+
return res.ok;
|
|
52
|
+
} catch (err) {
|
|
53
|
+
process.stderr.write(`[push-notify] Telegram send failed: ${err instanceof Error ? err.message : String(err)}
|
|
54
|
+
`);
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
async function sendEmail(smtpUrl, from, to, subject, body) {
|
|
59
|
+
if (smtpUrl.startsWith("http")) {
|
|
60
|
+
try {
|
|
61
|
+
const res = await fetch(smtpUrl, {
|
|
62
|
+
method: "POST",
|
|
63
|
+
headers: { "Content-Type": "application/json" },
|
|
64
|
+
body: JSON.stringify({ from, to, subject, text: body }),
|
|
65
|
+
signal: AbortSignal.timeout(SMTP_TIMEOUT_MS)
|
|
66
|
+
});
|
|
67
|
+
return res.ok;
|
|
68
|
+
} catch (err) {
|
|
69
|
+
process.stderr.write(`[push-notify] Email send failed: ${err instanceof Error ? err.message : String(err)}
|
|
70
|
+
`);
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
process.stderr.write(`[push-notify] SMTP transport not implemented. Configure an HTTP email API endpoint.
|
|
75
|
+
`);
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
function formatMessage(msg) {
|
|
79
|
+
const emoji = msg.priority === "urgent" ? "\u{1F534}" : msg.priority === "low" ? "\u26AA" : "\u{1F535}";
|
|
80
|
+
const lines = [
|
|
81
|
+
`${emoji} *${msg.title}*`,
|
|
82
|
+
msg.body
|
|
83
|
+
];
|
|
84
|
+
if (msg.agent) lines.push(`Agent: ${msg.agent}`);
|
|
85
|
+
if (msg.project) lines.push(`Project: ${msg.project}`);
|
|
86
|
+
return lines.join("\n");
|
|
87
|
+
}
|
|
88
|
+
async function pushNotify(msg) {
|
|
89
|
+
const { config, notifyOn } = loadPushConfig();
|
|
90
|
+
const result = { telegram: false, email: false };
|
|
91
|
+
if (!notifyOn.has(msg.event)) return result;
|
|
92
|
+
const formatted = formatMessage(msg);
|
|
93
|
+
if (config.telegram?.bot_token && config.telegram?.chat_id) {
|
|
94
|
+
result.telegram = await sendTelegram(
|
|
95
|
+
config.telegram.bot_token,
|
|
96
|
+
config.telegram.chat_id,
|
|
97
|
+
formatted
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
if (config.email?.smtp_url && config.email?.from && config.email?.to) {
|
|
101
|
+
result.email = await sendEmail(
|
|
102
|
+
config.email.smtp_url,
|
|
103
|
+
config.email.from,
|
|
104
|
+
config.email.to,
|
|
105
|
+
`[exe-os] ${msg.title}`,
|
|
106
|
+
msg.body
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
return result;
|
|
110
|
+
}
|
|
111
|
+
function pushNotifyAsync(msg) {
|
|
112
|
+
pushNotify(msg).catch((err) => {
|
|
113
|
+
process.stderr.write(`[push-notify] async send failed: ${err instanceof Error ? err.message : String(err)}
|
|
114
|
+
`);
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
var TELEGRAM_TIMEOUT_MS, SMTP_TIMEOUT_MS, _cachedConfig, _notifyOn;
|
|
118
|
+
var init_push_notifications = __esm({
|
|
119
|
+
"src/lib/push-notifications.ts"() {
|
|
120
|
+
TELEGRAM_TIMEOUT_MS = 1e4;
|
|
121
|
+
SMTP_TIMEOUT_MS = 15e3;
|
|
122
|
+
_cachedConfig = null;
|
|
123
|
+
_notifyOn = null;
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
export {
|
|
128
|
+
loadPushConfig,
|
|
129
|
+
_resetPushConfig,
|
|
130
|
+
pushNotify,
|
|
131
|
+
pushNotifyAsync,
|
|
132
|
+
push_notifications_exports,
|
|
133
|
+
init_push_notifications
|
|
134
|
+
};
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
createTaskCore,
|
|
6
6
|
init_tasks_crud
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EZ2TJX6O.js";
|
|
8
8
|
import {
|
|
9
9
|
employeeSessionName,
|
|
10
10
|
ensureEmployee,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
init_tmux_routing,
|
|
14
14
|
isEmployeeAlive,
|
|
15
15
|
sessionScopeFilter
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-FQZY4M45.js";
|
|
17
17
|
import {
|
|
18
18
|
DEFAULT_COORDINATOR_TEMPLATE_NAME,
|
|
19
19
|
getCoordinatorName,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_tasks
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WTPYZG4I.js";
|
|
4
4
|
import {
|
|
5
5
|
getProjectName,
|
|
6
6
|
init_project_name
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-TCOTFMDP.js";
|
|
11
11
|
import {
|
|
12
12
|
listTasks
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EZ2TJX6O.js";
|
|
14
14
|
|
|
15
15
|
// src/mcp/tools/list-tasks.ts
|
|
16
16
|
init_tasks();
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
MultiAgentOrchestrator
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-R3IILARI.js";
|
|
4
4
|
import {
|
|
5
5
|
createQuietRenderer,
|
|
6
6
|
createTerminalRenderer,
|
|
7
7
|
renderAgentEvents
|
|
8
8
|
} from "./chunk-YZFZDJWZ.js";
|
|
9
|
+
import {
|
|
10
|
+
checkDangerousPatterns,
|
|
11
|
+
hasCriticalPattern
|
|
12
|
+
} from "./chunk-AVE2B4DQ.js";
|
|
9
13
|
import {
|
|
10
14
|
checkPathSafety,
|
|
11
15
|
checkReadPathSafety,
|
|
12
16
|
containsPathTraversal
|
|
13
17
|
} from "./chunk-NGVOA6ZQ.js";
|
|
14
|
-
import {
|
|
15
|
-
checkDangerousPatterns,
|
|
16
|
-
hasCriticalPattern
|
|
17
|
-
} from "./chunk-AVE2B4DQ.js";
|
|
18
18
|
import {
|
|
19
19
|
ContextManager,
|
|
20
20
|
agentLoop,
|
|
@@ -211,7 +211,7 @@ function createExeOSHooks(config) {
|
|
|
211
211
|
);
|
|
212
212
|
}
|
|
213
213
|
try {
|
|
214
|
-
const { listBehaviors } = await import("./behaviors-
|
|
214
|
+
const { listBehaviors } = await import("./behaviors-V3O5YYUK.js");
|
|
215
215
|
const behaviors = await listBehaviors(config.agentId, config.projectName, 12);
|
|
216
216
|
if (behaviors.length > 0) {
|
|
217
217
|
process.stderr.write(
|
|
@@ -332,7 +332,7 @@ function createExeOSHooks(config) {
|
|
|
332
332
|
async onSubagentStop(_reason) {
|
|
333
333
|
try {
|
|
334
334
|
const { getClient } = await import("./lib/database.js");
|
|
335
|
-
const { sessionScopeFilter } = await import("./task-scope-
|
|
335
|
+
const { sessionScopeFilter } = await import("./task-scope-2L5DLU6T.js");
|
|
336
336
|
const client = getClient();
|
|
337
337
|
const ehScope = sessionScopeFilter();
|
|
338
338
|
const tasks = await client.execute({
|
|
@@ -424,7 +424,7 @@ function createExeOSHooks(config) {
|
|
|
424
424
|
try {
|
|
425
425
|
const { writeMemory, flushBatch } = await import("./lib/store.js");
|
|
426
426
|
const { getClient } = await import("./lib/database.js");
|
|
427
|
-
const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-
|
|
427
|
+
const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-2L5DLU6T.js");
|
|
428
428
|
const client = getClient();
|
|
429
429
|
const cpScope = cpScopeFilter();
|
|
430
430
|
const tasks = await client.execute({
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
initStore
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-OVFU26ZD.js";
|
|
4
4
|
import {
|
|
5
5
|
getClient,
|
|
6
6
|
init_database,
|
|
7
7
|
isInitialized
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2G6QGXVX.js";
|
|
9
9
|
|
|
10
10
|
// src/lib/schedules.ts
|
|
11
11
|
init_database();
|
|
@@ -1,28 +1,39 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_session_scope,
|
|
3
3
|
session_scope_exports
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-T5A4EGUG.js";
|
|
5
5
|
import {
|
|
6
6
|
createTaskCore,
|
|
7
7
|
deleteTaskCore,
|
|
8
|
+
ensureArchitectureDoc,
|
|
9
|
+
ensureGitignoreExe,
|
|
8
10
|
init_tasks_crud,
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
listTasks,
|
|
12
|
+
resolveTask,
|
|
13
|
+
slugify,
|
|
14
|
+
updateTaskStatus,
|
|
15
|
+
writeCheckpoint
|
|
16
|
+
} from "./chunk-EZ2TJX6O.js";
|
|
11
17
|
import {
|
|
18
|
+
cleanupOrphanedReviews,
|
|
12
19
|
cleanupReviewFile,
|
|
20
|
+
countNewPendingReviewsSince,
|
|
21
|
+
countPendingReviews,
|
|
13
22
|
employeeSessionName,
|
|
14
23
|
ensureEmployee,
|
|
24
|
+
getReviewChecklist,
|
|
15
25
|
init_notifications,
|
|
16
26
|
init_task_scope,
|
|
17
27
|
init_tasks_review,
|
|
18
28
|
init_tmux_routing,
|
|
29
|
+
listPendingReviews,
|
|
19
30
|
markAsReadByTaskFile,
|
|
20
31
|
notifyParentExe,
|
|
21
32
|
resolveExeSession,
|
|
22
33
|
sendIntercom,
|
|
23
34
|
sessionScopeFilter,
|
|
24
35
|
writeNotification
|
|
25
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-FQZY4M45.js";
|
|
26
37
|
import {
|
|
27
38
|
getTransport,
|
|
28
39
|
init_transport
|
|
@@ -38,7 +49,7 @@ import {
|
|
|
38
49
|
import {
|
|
39
50
|
getClient,
|
|
40
51
|
init_database
|
|
41
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-2G6QGXVX.js";
|
|
42
53
|
import {
|
|
43
54
|
getCoordinatorName,
|
|
44
55
|
init_employees,
|
|
@@ -51,6 +62,7 @@ import {
|
|
|
51
62
|
} from "./chunk-ISRQKXHM.js";
|
|
52
63
|
import {
|
|
53
64
|
__esm,
|
|
65
|
+
__export,
|
|
54
66
|
__toCommonJS
|
|
55
67
|
} from "./chunk-KFQGP6VL.js";
|
|
56
68
|
|
|
@@ -59,17 +71,20 @@ import path from "path";
|
|
|
59
71
|
import { readFile, writeFile } from "fs/promises";
|
|
60
72
|
async function cascadeUnblock(taskId, baseDir, now) {
|
|
61
73
|
const client = getClient();
|
|
62
|
-
const unblocked = await client.execute({
|
|
63
|
-
sql: `UPDATE tasks SET status = 'open', blocked_by = NULL, updated_at = ?
|
|
64
|
-
WHERE blocked_by = ? AND status = 'blocked'`,
|
|
65
|
-
args: [now, taskId]
|
|
66
|
-
});
|
|
67
|
-
if (unblocked.rowsAffected === 0) return;
|
|
68
74
|
const ubScope = sessionScopeFilter();
|
|
69
|
-
const
|
|
70
|
-
sql: `SELECT id, title, assigned_to, priority, task_file FROM tasks WHERE blocked_by
|
|
71
|
-
args: [
|
|
75
|
+
const blockedRows = await client.execute({
|
|
76
|
+
sql: `SELECT id, title, assigned_to, priority, task_file FROM tasks WHERE blocked_by = ? AND status = 'blocked'${ubScope.sql}`,
|
|
77
|
+
args: [taskId, ...ubScope.args]
|
|
78
|
+
});
|
|
79
|
+
if (blockedRows.rows.length === 0) return;
|
|
80
|
+
const ids = blockedRows.rows.map((r) => String(r.id));
|
|
81
|
+
const ph = ids.map(() => "?").join(",");
|
|
82
|
+
await client.execute({
|
|
83
|
+
sql: `UPDATE tasks SET status = 'open', blocked_by = NULL, updated_at = ?
|
|
84
|
+
WHERE id IN (${ph})`,
|
|
85
|
+
args: [now, ...ids]
|
|
72
86
|
});
|
|
87
|
+
const unblockedRows = blockedRows;
|
|
73
88
|
if (baseDir) {
|
|
74
89
|
for (const ur of unblockedRows.rows) {
|
|
75
90
|
try {
|
|
@@ -234,6 +249,26 @@ var init_tasks_notify = __esm({
|
|
|
234
249
|
});
|
|
235
250
|
|
|
236
251
|
// src/lib/tasks.ts
|
|
252
|
+
var tasks_exports = {};
|
|
253
|
+
__export(tasks_exports, {
|
|
254
|
+
cleanupOrphanedReviews: () => cleanupOrphanedReviews,
|
|
255
|
+
countNewPendingReviewsSince: () => countNewPendingReviewsSince,
|
|
256
|
+
countPendingReviews: () => countPendingReviews,
|
|
257
|
+
createTask: () => createTask,
|
|
258
|
+
createTaskCore: () => createTaskCore,
|
|
259
|
+
deleteTask: () => deleteTask,
|
|
260
|
+
deleteTaskCore: () => deleteTaskCore,
|
|
261
|
+
ensureArchitectureDoc: () => ensureArchitectureDoc,
|
|
262
|
+
ensureGitignoreExe: () => ensureGitignoreExe,
|
|
263
|
+
getReviewChecklist: () => getReviewChecklist,
|
|
264
|
+
listPendingReviews: () => listPendingReviews,
|
|
265
|
+
listTasks: () => listTasks,
|
|
266
|
+
resolveTask: () => resolveTask,
|
|
267
|
+
slugify: () => slugify,
|
|
268
|
+
updateTask: () => updateTask,
|
|
269
|
+
updateTaskStatus: () => updateTaskStatus,
|
|
270
|
+
writeCheckpoint: () => writeCheckpoint
|
|
271
|
+
});
|
|
237
272
|
import path2 from "path";
|
|
238
273
|
import { writeFileSync, mkdirSync, unlinkSync } from "fs";
|
|
239
274
|
async function createTask(input) {
|
|
@@ -354,10 +389,24 @@ async function updateTask(input) {
|
|
|
354
389
|
`);
|
|
355
390
|
}
|
|
356
391
|
}
|
|
392
|
+
if (!isCoordinator) {
|
|
393
|
+
try {
|
|
394
|
+
const { pushNotifyAsync } = await import("./push-notifications-S4QIZWJI.js");
|
|
395
|
+
const event = input.status === "needs_review" ? "review_ready" : "task_complete";
|
|
396
|
+
pushNotifyAsync({
|
|
397
|
+
event,
|
|
398
|
+
title: `${String(row.assigned_to)} completed: ${String(row.title).slice(0, 80)}`,
|
|
399
|
+
body: input.result ? String(input.result).slice(0, 500) : `Task "${String(row.title)}" is ${input.status}.`,
|
|
400
|
+
agent: String(row.assigned_to),
|
|
401
|
+
project: String(row.project_name)
|
|
402
|
+
});
|
|
403
|
+
} catch {
|
|
404
|
+
}
|
|
405
|
+
}
|
|
357
406
|
await markTaskNotificationsRead(taskFile);
|
|
358
407
|
if (input.status === "needs_review" && !isCoordinator) {
|
|
359
408
|
try {
|
|
360
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
409
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-3ZZS36PK.js");
|
|
361
410
|
await writeNotification2({
|
|
362
411
|
agentId: String(row.assigned_to),
|
|
363
412
|
agentRole: String(row.assigned_to),
|
|
@@ -482,5 +531,6 @@ export {
|
|
|
482
531
|
createTask,
|
|
483
532
|
updateTask,
|
|
484
533
|
deleteTask,
|
|
534
|
+
tasks_exports,
|
|
485
535
|
init_tasks
|
|
486
536
|
};
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
getIdentity,
|
|
6
6
|
listIdentities,
|
|
7
7
|
updateIdentity
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-BOPKW4AV.js";
|
|
9
9
|
import {
|
|
10
10
|
getClient,
|
|
11
11
|
init_database
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-2G6QGXVX.js";
|
|
13
13
|
|
|
14
14
|
// src/lib/orchestration-package.ts
|
|
15
15
|
init_database();
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TelegramAdapter
|
|
3
|
+
} from "./chunk-Q3V7K4ME.js";
|
|
1
4
|
import {
|
|
2
5
|
DiscordAdapter
|
|
3
6
|
} from "./chunk-N5RRQOAC.js";
|
|
@@ -10,16 +13,13 @@ import {
|
|
|
10
13
|
import {
|
|
11
14
|
createCRMWebhookHandler,
|
|
12
15
|
parseTwentyWebhook
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-TRLP7FHS.js";
|
|
14
17
|
import {
|
|
15
18
|
WhatsAppAdapter
|
|
16
19
|
} from "./chunk-BU3ID2WT.js";
|
|
17
20
|
import {
|
|
18
21
|
SignalAdapter
|
|
19
22
|
} from "./chunk-RJT7H2KR.js";
|
|
20
|
-
import {
|
|
21
|
-
TelegramAdapter
|
|
22
|
-
} from "./chunk-Q3V7K4ME.js";
|
|
23
23
|
import {
|
|
24
24
|
BotRegistry,
|
|
25
25
|
BotRuntime,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
retryWithBackoff,
|
|
43
43
|
routeMessage,
|
|
44
44
|
validateGatewayConfig
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-OZ4SN7ZF.js";
|
|
46
46
|
import {
|
|
47
47
|
OllamaProvider
|
|
48
48
|
} from "./chunk-FWFFZGSC.js";
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import "./chunk-KFQGP6VL.js";
|
|
2
|
+
|
|
3
|
+
// src/lib/core-memory.ts
|
|
4
|
+
var MAX_CORE_ENTRIES = 20;
|
|
5
|
+
var MAX_ENTRY_LENGTH = 500;
|
|
6
|
+
var MAX_TOTAL_CHARS = 5e3;
|
|
7
|
+
async function getCoreMemory(agentId) {
|
|
8
|
+
try {
|
|
9
|
+
const { getClient } = await import("./lib/database.js");
|
|
10
|
+
const client = getClient();
|
|
11
|
+
const result = await client.execute({
|
|
12
|
+
sql: `SELECT key, value, updated_at FROM core_memory
|
|
13
|
+
WHERE agent_id = ? ORDER BY key ASC`,
|
|
14
|
+
args: [agentId]
|
|
15
|
+
});
|
|
16
|
+
return result.rows.map((r) => ({
|
|
17
|
+
key: r.key,
|
|
18
|
+
value: r.value,
|
|
19
|
+
updatedAt: r.updated_at
|
|
20
|
+
}));
|
|
21
|
+
} catch {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function setCoreMemory(agentId, key, value) {
|
|
26
|
+
if (value.length > MAX_ENTRY_LENGTH) {
|
|
27
|
+
throw new Error(`Core memory value too long (${value.length}/${MAX_ENTRY_LENGTH} chars). Core memory is for key facts, not documents.`);
|
|
28
|
+
}
|
|
29
|
+
const { getClient } = await import("./lib/database.js");
|
|
30
|
+
const client = getClient();
|
|
31
|
+
const countResult = await client.execute({
|
|
32
|
+
sql: `SELECT COUNT(*) as cnt FROM core_memory WHERE agent_id = ?`,
|
|
33
|
+
args: [agentId]
|
|
34
|
+
});
|
|
35
|
+
const count = Number(countResult.rows[0]?.cnt ?? 0);
|
|
36
|
+
const existing = await client.execute({
|
|
37
|
+
sql: `SELECT key FROM core_memory WHERE agent_id = ? AND key = ?`,
|
|
38
|
+
args: [agentId, key]
|
|
39
|
+
});
|
|
40
|
+
if (existing.rows.length === 0 && count >= MAX_CORE_ENTRIES) {
|
|
41
|
+
throw new Error(`Core memory full (${MAX_CORE_ENTRIES} entries). Delete an entry first.`);
|
|
42
|
+
}
|
|
43
|
+
const sizeResult = await client.execute({
|
|
44
|
+
sql: `SELECT COALESCE(SUM(LENGTH(value)), 0) as total FROM core_memory WHERE agent_id = ? AND key != ?`,
|
|
45
|
+
args: [agentId, key]
|
|
46
|
+
});
|
|
47
|
+
const currentSize = Number(sizeResult.rows[0]?.total ?? 0);
|
|
48
|
+
if (currentSize + value.length > MAX_TOTAL_CHARS) {
|
|
49
|
+
throw new Error(`Core memory would exceed ${MAX_TOTAL_CHARS} char limit. Delete entries or shorten values.`);
|
|
50
|
+
}
|
|
51
|
+
await client.execute({
|
|
52
|
+
sql: `INSERT OR REPLACE INTO core_memory (agent_id, key, value, updated_at)
|
|
53
|
+
VALUES (?, ?, ?, ?)`,
|
|
54
|
+
args: [agentId, key, value, (/* @__PURE__ */ new Date()).toISOString()]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
async function deleteCoreMemory(agentId, key) {
|
|
58
|
+
const { getClient } = await import("./lib/database.js");
|
|
59
|
+
const client = getClient();
|
|
60
|
+
const result = await client.execute({
|
|
61
|
+
sql: `DELETE FROM core_memory WHERE agent_id = ? AND key = ?`,
|
|
62
|
+
args: [agentId, key]
|
|
63
|
+
});
|
|
64
|
+
return (result.rowsAffected ?? 0) > 0;
|
|
65
|
+
}
|
|
66
|
+
function formatCoreMemoryBlock(entries) {
|
|
67
|
+
if (entries.length === 0) return null;
|
|
68
|
+
const lines = ["## Core Memory (always in context)", ""];
|
|
69
|
+
for (const e of entries) {
|
|
70
|
+
lines.push(`- **${e.key}:** ${e.value}`);
|
|
71
|
+
}
|
|
72
|
+
return lines.join("\n");
|
|
73
|
+
}
|
|
74
|
+
export {
|
|
75
|
+
deleteCoreMemory,
|
|
76
|
+
formatCoreMemoryBlock,
|
|
77
|
+
getCoreMemory,
|
|
78
|
+
setCoreMemory
|
|
79
|
+
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
init_task_scope,
|
|
3
3
|
sessionScopeFilter
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FQZY4M45.js";
|
|
5
5
|
import "./chunk-NEAHEC5G.js";
|
|
6
6
|
import "./chunk-KRLOFIPI.js";
|
|
7
7
|
import "./chunk-R4M6XCMU.js";
|
|
8
8
|
import "./chunk-TYLF4LSW.js";
|
|
9
|
+
import "./chunk-DC4ZD76Y.js";
|
|
9
10
|
import "./chunk-PJHHFJAN.js";
|
|
10
11
|
import "./chunk-K7E72WGL.js";
|
|
11
12
|
import "./chunk-JT76KRZQ.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-GRLQJ27R.js";
|
|
13
14
|
import "./chunk-HP43GLZ6.js";
|
|
14
15
|
import "./chunk-ELE2C7L4.js";
|
|
15
16
|
import "./chunk-WZQ4CPRG.js";
|
|
16
17
|
import {
|
|
17
18
|
getClient,
|
|
18
19
|
init_database
|
|
19
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2G6QGXVX.js";
|
|
20
21
|
import "./chunk-KSFOG6FJ.js";
|
|
21
22
|
import "./chunk-4NYQAS33.js";
|
|
22
23
|
import "./chunk-BPLXSBNM.js";
|