@askexenow/exe-os 0.8.82 → 0.8.85
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/bin/backfill-conversations.js +746 -595
- package/dist/bin/backfill-responses.js +745 -594
- package/dist/bin/backfill-vectors.js +312 -226
- package/dist/bin/cleanup-stale-review-tasks.js +97 -2
- package/dist/bin/cli.js +14360 -12525
- package/dist/bin/exe-agent.js +97 -88
- package/dist/bin/exe-assign.js +1003 -854
- package/dist/bin/exe-boot.js +1260 -323
- package/dist/bin/exe-call.js +10 -0
- package/dist/bin/exe-cloud.js +32 -9
- package/dist/bin/exe-dispatch.js +212 -36
- package/dist/bin/exe-doctor.js +403 -6
- package/dist/bin/exe-export-behaviors.js +175 -72
- package/dist/bin/exe-forget.js +97 -2
- package/dist/bin/exe-gateway.js +553 -174
- package/dist/bin/exe-healthcheck.js +1 -0
- package/dist/bin/exe-heartbeat.js +100 -5
- package/dist/bin/exe-kill.js +175 -72
- package/dist/bin/exe-launch-agent.js +189 -76
- package/dist/bin/exe-link.js +902 -80
- package/dist/bin/exe-new-employee.js +41 -11
- package/dist/bin/exe-pending-messages.js +96 -2
- package/dist/bin/exe-pending-notifications.js +97 -2
- package/dist/bin/exe-pending-reviews.js +98 -3
- package/dist/bin/exe-rename.js +577 -33
- package/dist/bin/exe-review.js +231 -73
- package/dist/bin/exe-search.js +989 -226
- package/dist/bin/exe-session-cleanup.js +4806 -1665
- package/dist/bin/exe-settings.js +20 -5
- package/dist/bin/exe-status.js +97 -2
- package/dist/bin/exe-team.js +97 -2
- package/dist/bin/git-sweep.js +901 -209
- package/dist/bin/graph-backfill.js +175 -72
- package/dist/bin/graph-export.js +175 -72
- package/dist/bin/install.js +38 -7
- package/dist/bin/list-providers.js +1 -0
- package/dist/bin/scan-tasks.js +906 -213
- package/dist/bin/setup.js +870 -271
- package/dist/bin/shard-migrate.js +175 -72
- package/dist/bin/update.js +4 -3
- package/dist/bin/wiki-sync.js +175 -72
- package/dist/gateway/index.js +550 -168
- package/dist/hooks/bug-report-worker.js +210 -25
- package/dist/hooks/commit-complete.js +899 -207
- package/dist/hooks/error-recall.js +988 -226
- package/dist/hooks/ingest-worker.js +1639 -1195
- package/dist/hooks/ingest.js +3 -0
- package/dist/hooks/instructions-loaded.js +707 -97
- package/dist/hooks/notification.js +699 -89
- package/dist/hooks/post-compact.js +714 -104
- package/dist/hooks/pre-compact.js +899 -207
- package/dist/hooks/pre-tool-use.js +742 -123
- package/dist/hooks/prompt-ingest-worker.js +245 -104
- package/dist/hooks/prompt-submit.js +995 -233
- package/dist/hooks/response-ingest-worker.js +245 -104
- package/dist/hooks/session-end.js +3941 -400
- package/dist/hooks/session-start.js +1001 -226
- package/dist/hooks/stop.js +725 -115
- package/dist/hooks/subagent-stop.js +714 -104
- package/dist/hooks/summary-worker.js +1970 -1336
- package/dist/index.js +1653 -1055
- package/dist/lib/cloud-sync.js +907 -86
- package/dist/lib/consolidation.js +2 -1
- package/dist/lib/database.js +642 -87
- package/dist/lib/db-daemon-client.js +503 -0
- package/dist/lib/device-registry.js +547 -7
- package/dist/lib/embedder.js +14 -28
- package/dist/lib/employee-templates.js +84 -74
- package/dist/lib/employees.js +9 -0
- package/dist/lib/exe-daemon-client.js +16 -29
- package/dist/lib/exe-daemon.js +1957 -924
- package/dist/lib/hybrid-search.js +988 -226
- package/dist/lib/identity.js +87 -67
- package/dist/lib/keychain.js +9 -1
- package/dist/lib/license.js +3 -3
- package/dist/lib/messaging.js +8 -1
- package/dist/lib/reminders.js +91 -74
- package/dist/lib/schedules.js +96 -2
- package/dist/lib/skill-learning.js +103 -85
- package/dist/lib/store.js +234 -73
- package/dist/lib/tasks.js +113 -24
- package/dist/lib/tmux-routing.js +122 -33
- package/dist/lib/token-spend.js +273 -0
- package/dist/lib/ws-client.js +11 -0
- package/dist/mcp/server.js +10874 -5546
- package/dist/mcp/tools/complete-reminder.js +94 -77
- package/dist/mcp/tools/create-reminder.js +94 -77
- package/dist/mcp/tools/create-task.js +810 -27
- package/dist/mcp/tools/deactivate-behavior.js +95 -77
- package/dist/mcp/tools/list-reminders.js +94 -77
- package/dist/mcp/tools/list-tasks.js +31 -1
- package/dist/mcp/tools/send-message.js +8 -1
- package/dist/mcp/tools/update-task.js +39 -10
- package/dist/runtime/index.js +913 -221
- package/dist/tui/App.js +1000 -298
- package/package.json +6 -1
- package/src/commands/exe/build-adv.md +2 -2
|
@@ -316,6 +316,12 @@ function getClient() {
|
|
|
316
316
|
if (!_resilientClient) {
|
|
317
317
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
318
318
|
}
|
|
319
|
+
if (process.env.EXE_IS_DAEMON === "1") {
|
|
320
|
+
return _resilientClient;
|
|
321
|
+
}
|
|
322
|
+
if (_daemonClient && _daemonClient._isDaemonActive()) {
|
|
323
|
+
return _daemonClient;
|
|
324
|
+
}
|
|
319
325
|
return _resilientClient;
|
|
320
326
|
}
|
|
321
327
|
function getRawClient() {
|
|
@@ -804,6 +810,12 @@ async function ensureSchema() {
|
|
|
804
810
|
} catch {
|
|
805
811
|
}
|
|
806
812
|
}
|
|
813
|
+
try {
|
|
814
|
+
await client.execute(
|
|
815
|
+
`CREATE INDEX IF NOT EXISTS idx_memories_content_hash ON memories(content_hash, agent_id)`
|
|
816
|
+
);
|
|
817
|
+
} catch {
|
|
818
|
+
}
|
|
807
819
|
await client.executeMultiple(`
|
|
808
820
|
CREATE TABLE IF NOT EXISTS entities (
|
|
809
821
|
id TEXT PRIMARY KEY,
|
|
@@ -856,7 +868,30 @@ async function ensureSchema() {
|
|
|
856
868
|
entity_id TEXT NOT NULL,
|
|
857
869
|
PRIMARY KEY (hyperedge_id, entity_id)
|
|
858
870
|
);
|
|
871
|
+
|
|
872
|
+
CREATE VIRTUAL TABLE IF NOT EXISTS entities_fts USING fts5(
|
|
873
|
+
name,
|
|
874
|
+
content=entities,
|
|
875
|
+
content_rowid=rowid
|
|
876
|
+
);
|
|
877
|
+
|
|
878
|
+
CREATE TRIGGER IF NOT EXISTS entities_fts_ai AFTER INSERT ON entities BEGIN
|
|
879
|
+
INSERT INTO entities_fts(rowid, name) VALUES (new.rowid, new.name);
|
|
880
|
+
END;
|
|
881
|
+
|
|
882
|
+
CREATE TRIGGER IF NOT EXISTS entities_fts_ad AFTER DELETE ON entities BEGIN
|
|
883
|
+
INSERT INTO entities_fts(entities_fts, rowid, name) VALUES('delete', old.rowid, old.name);
|
|
884
|
+
END;
|
|
885
|
+
|
|
886
|
+
CREATE TRIGGER IF NOT EXISTS entities_fts_au AFTER UPDATE ON entities BEGIN
|
|
887
|
+
INSERT INTO entities_fts(entities_fts, rowid, name) VALUES('delete', old.rowid, old.name);
|
|
888
|
+
INSERT INTO entities_fts(rowid, name) VALUES (new.rowid, new.name);
|
|
889
|
+
END;
|
|
859
890
|
`);
|
|
891
|
+
try {
|
|
892
|
+
await client.execute("INSERT INTO entities_fts(entities_fts) VALUES('rebuild')");
|
|
893
|
+
} catch {
|
|
894
|
+
}
|
|
860
895
|
await client.executeMultiple(`
|
|
861
896
|
CREATE TABLE IF NOT EXISTS entity_aliases (
|
|
862
897
|
alias TEXT NOT NULL PRIMARY KEY,
|
|
@@ -1037,6 +1072,33 @@ async function ensureSchema() {
|
|
|
1037
1072
|
CREATE INDEX IF NOT EXISTS idx_conversations_channel
|
|
1038
1073
|
ON conversations(channel_id);
|
|
1039
1074
|
`);
|
|
1075
|
+
await client.executeMultiple(`
|
|
1076
|
+
CREATE TABLE IF NOT EXISTS session_agent_map (
|
|
1077
|
+
session_uuid TEXT PRIMARY KEY,
|
|
1078
|
+
agent_id TEXT NOT NULL,
|
|
1079
|
+
session_name TEXT,
|
|
1080
|
+
task_id TEXT,
|
|
1081
|
+
project_name TEXT,
|
|
1082
|
+
started_at TEXT NOT NULL
|
|
1083
|
+
);
|
|
1084
|
+
|
|
1085
|
+
CREATE INDEX IF NOT EXISTS idx_session_agent_map_agent
|
|
1086
|
+
ON session_agent_map(agent_id);
|
|
1087
|
+
`);
|
|
1088
|
+
try {
|
|
1089
|
+
const mapCount = await client.execute({ sql: `SELECT COUNT(*) as cnt FROM session_agent_map`, args: [] });
|
|
1090
|
+
if (Number(mapCount.rows[0]?.cnt ?? 0) === 0) {
|
|
1091
|
+
await client.execute({
|
|
1092
|
+
sql: `INSERT OR IGNORE INTO session_agent_map (session_uuid, agent_id, session_name, started_at)
|
|
1093
|
+
SELECT session_id, agent_id, '', MIN(timestamp)
|
|
1094
|
+
FROM memories
|
|
1095
|
+
WHERE session_id IS NOT NULL AND session_id != '' AND agent_id IS NOT NULL AND agent_id != ''
|
|
1096
|
+
GROUP BY session_id, agent_id`,
|
|
1097
|
+
args: []
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
} catch {
|
|
1101
|
+
}
|
|
1040
1102
|
try {
|
|
1041
1103
|
await client.execute({
|
|
1042
1104
|
sql: `ALTER TABLE tasks ADD COLUMN budget_tokens INTEGER`,
|
|
@@ -1170,8 +1232,30 @@ async function ensureSchema() {
|
|
|
1170
1232
|
});
|
|
1171
1233
|
} catch {
|
|
1172
1234
|
}
|
|
1235
|
+
for (const col of [
|
|
1236
|
+
"ALTER TABLE memories ADD COLUMN intent TEXT",
|
|
1237
|
+
"ALTER TABLE memories ADD COLUMN outcome TEXT",
|
|
1238
|
+
"ALTER TABLE memories ADD COLUMN domain TEXT",
|
|
1239
|
+
"ALTER TABLE memories ADD COLUMN referenced_entities TEXT",
|
|
1240
|
+
"ALTER TABLE memories ADD COLUMN retrieval_count INTEGER DEFAULT 0",
|
|
1241
|
+
"ALTER TABLE memories ADD COLUMN chain_position TEXT",
|
|
1242
|
+
"ALTER TABLE memories ADD COLUMN review_status TEXT",
|
|
1243
|
+
"ALTER TABLE memories ADD COLUMN context_window_pct INTEGER",
|
|
1244
|
+
"ALTER TABLE memories ADD COLUMN file_paths TEXT",
|
|
1245
|
+
"ALTER TABLE memories ADD COLUMN commit_hash TEXT",
|
|
1246
|
+
"ALTER TABLE memories ADD COLUMN duration_ms INTEGER",
|
|
1247
|
+
"ALTER TABLE memories ADD COLUMN token_cost REAL",
|
|
1248
|
+
"ALTER TABLE memories ADD COLUMN audience TEXT",
|
|
1249
|
+
"ALTER TABLE memories ADD COLUMN language_type TEXT",
|
|
1250
|
+
"ALTER TABLE memories ADD COLUMN parent_memory_id TEXT"
|
|
1251
|
+
]) {
|
|
1252
|
+
try {
|
|
1253
|
+
await client.execute(col);
|
|
1254
|
+
} catch {
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1173
1257
|
}
|
|
1174
|
-
var _client, _resilientClient, initTurso;
|
|
1258
|
+
var _client, _resilientClient, _daemonClient, initTurso;
|
|
1175
1259
|
var init_database = __esm({
|
|
1176
1260
|
"src/lib/database.ts"() {
|
|
1177
1261
|
"use strict";
|
|
@@ -1179,6 +1263,7 @@ var init_database = __esm({
|
|
|
1179
1263
|
init_employees();
|
|
1180
1264
|
_client = null;
|
|
1181
1265
|
_resilientClient = null;
|
|
1266
|
+
_daemonClient = null;
|
|
1182
1267
|
initTurso = initDatabase;
|
|
1183
1268
|
}
|
|
1184
1269
|
});
|
|
@@ -1972,6 +2057,7 @@ var init_task_scope = __esm({
|
|
|
1972
2057
|
});
|
|
1973
2058
|
|
|
1974
2059
|
// src/lib/store.ts
|
|
2060
|
+
import { createHash } from "crypto";
|
|
1975
2061
|
init_database();
|
|
1976
2062
|
|
|
1977
2063
|
// src/lib/keychain.ts
|
|
@@ -2007,12 +2093,20 @@ async function getMasterKey() {
|
|
|
2007
2093
|
}
|
|
2008
2094
|
const keyPath = getKeyPath();
|
|
2009
2095
|
if (!existsSync3(keyPath)) {
|
|
2096
|
+
process.stderr.write(
|
|
2097
|
+
`[keychain] Key not found at ${keyPath} (HOME=${os3.homedir()}, EXE_OS_DIR=${process.env.EXE_OS_DIR ?? "unset"})
|
|
2098
|
+
`
|
|
2099
|
+
);
|
|
2010
2100
|
return null;
|
|
2011
2101
|
}
|
|
2012
2102
|
try {
|
|
2013
2103
|
const content = await readFile3(keyPath, "utf-8");
|
|
2014
2104
|
return Buffer.from(content.trim(), "base64");
|
|
2015
|
-
} catch {
|
|
2105
|
+
} catch (err) {
|
|
2106
|
+
process.stderr.write(
|
|
2107
|
+
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
2108
|
+
`
|
|
2109
|
+
);
|
|
2016
2110
|
return null;
|
|
2017
2111
|
}
|
|
2018
2112
|
}
|
|
@@ -2106,6 +2200,7 @@ import { realpathSync } from "fs";
|
|
|
2106
2200
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
2107
2201
|
function isMainModule(importMetaUrl) {
|
|
2108
2202
|
if (process.argv[1] == null) return false;
|
|
2203
|
+
if (process.argv[1].includes("mcp/server")) return false;
|
|
2109
2204
|
try {
|
|
2110
2205
|
const scriptPath = realpathSync(process.argv[1]);
|
|
2111
2206
|
const modulePath = realpathSync(fileURLToPath2(importMetaUrl));
|