@askexenow/exe-os 0.8.32 → 0.8.36
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 +332 -348
- package/dist/bin/backfill-responses.js +72 -12
- package/dist/bin/backfill-vectors.js +72 -12
- package/dist/bin/cleanup-stale-review-tasks.js +63 -3
- package/dist/bin/cli.js +1518 -1122
- package/dist/bin/exe-agent.js +4 -4
- package/dist/bin/exe-assign.js +80 -18
- package/dist/bin/exe-boot.js +408 -89
- package/dist/bin/exe-call.js +83 -24
- package/dist/bin/exe-dispatch.js +18 -10
- package/dist/bin/exe-doctor.js +63 -3
- package/dist/bin/exe-export-behaviors.js +64 -3
- package/dist/bin/exe-forget.js +69 -4
- package/dist/bin/exe-gateway.js +121 -36
- package/dist/bin/exe-heartbeat.js +77 -13
- package/dist/bin/exe-kill.js +64 -3
- package/dist/bin/exe-launch-agent.js +162 -35
- package/dist/bin/exe-link.js +946 -0
- package/dist/bin/exe-new-employee.js +121 -36
- package/dist/bin/exe-pending-messages.js +72 -7
- package/dist/bin/exe-pending-notifications.js +63 -3
- package/dist/bin/exe-pending-reviews.js +75 -10
- package/dist/bin/exe-rename.js +1287 -0
- package/dist/bin/exe-review.js +64 -4
- package/dist/bin/exe-search.js +79 -13
- package/dist/bin/exe-session-cleanup.js +91 -26
- package/dist/bin/exe-status.js +64 -4
- package/dist/bin/exe-team.js +64 -4
- package/dist/bin/git-sweep.js +71 -4
- package/dist/bin/graph-backfill.js +64 -3
- package/dist/bin/graph-export.js +64 -3
- package/dist/bin/install.js +3 -3
- package/dist/bin/scan-tasks.js +71 -4
- package/dist/bin/setup.js +156 -38
- package/dist/bin/shard-migrate.js +64 -3
- package/dist/bin/wiki-sync.js +64 -3
- package/dist/gateway/index.js +122 -37
- package/dist/hooks/bug-report-worker.js +209 -23
- package/dist/hooks/commit-complete.js +71 -4
- package/dist/hooks/error-recall.js +79 -13
- package/dist/hooks/ingest-worker.js +129 -43
- package/dist/hooks/instructions-loaded.js +71 -4
- package/dist/hooks/notification.js +71 -4
- package/dist/hooks/post-compact.js +71 -4
- package/dist/hooks/pre-compact.js +71 -4
- package/dist/hooks/pre-tool-use.js +413 -194
- package/dist/hooks/prompt-ingest-worker.js +82 -22
- package/dist/hooks/prompt-submit.js +103 -37
- package/dist/hooks/response-ingest-worker.js +87 -22
- package/dist/hooks/session-end.js +71 -4
- package/dist/hooks/session-start.js +79 -13
- package/dist/hooks/stop.js +71 -4
- package/dist/hooks/subagent-stop.js +71 -4
- package/dist/hooks/summary-worker.js +303 -50
- package/dist/index.js +134 -46
- package/dist/lib/cloud-sync.js +209 -15
- package/dist/lib/consolidation.js +4 -4
- package/dist/lib/database.js +64 -2
- package/dist/lib/device-registry.js +70 -3
- package/dist/lib/employee-templates.js +48 -22
- package/dist/lib/employees.js +34 -1
- package/dist/lib/exe-daemon.js +136 -53
- package/dist/lib/hybrid-search.js +79 -13
- package/dist/lib/identity-templates.js +57 -6
- package/dist/lib/identity.js +3 -3
- package/dist/lib/messaging.js +22 -14
- package/dist/lib/reminders.js +3 -3
- package/dist/lib/schedules.js +63 -3
- package/dist/lib/skill-learning.js +3 -3
- package/dist/lib/status-brief.js +63 -5
- package/dist/lib/store.js +64 -3
- package/dist/lib/task-router.js +4 -2
- package/dist/lib/tasks.js +48 -21
- package/dist/lib/tmux-routing.js +47 -20
- package/dist/mcp/server.js +727 -58
- 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 +151 -24
- 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 +17 -8
- package/dist/mcp/tools/send-message.js +24 -16
- package/dist/mcp/tools/update-task.js +25 -16
- package/dist/runtime/index.js +112 -24
- package/dist/tui/App.js +139 -36
- package/package.json +6 -2
- package/src/commands/exe/rename.md +12 -0
|
@@ -15,12 +15,68 @@ var __export = (target, all) => {
|
|
|
15
15
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
// src/lib/db-retry.ts
|
|
19
|
+
function isBusyError(err) {
|
|
20
|
+
if (err instanceof Error) {
|
|
21
|
+
const msg = err.message.toLowerCase();
|
|
22
|
+
return msg.includes("sqlite_busy") || msg.includes("database is locked");
|
|
23
|
+
}
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
function delay(ms) {
|
|
27
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
28
|
+
}
|
|
29
|
+
async function retryOnBusy(fn, label) {
|
|
30
|
+
let lastError;
|
|
31
|
+
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
|
|
32
|
+
try {
|
|
33
|
+
return await fn();
|
|
34
|
+
} catch (err) {
|
|
35
|
+
lastError = err;
|
|
36
|
+
if (!isBusyError(err) || attempt === MAX_RETRIES) {
|
|
37
|
+
throw err;
|
|
38
|
+
}
|
|
39
|
+
const backoff = BASE_DELAY_MS * Math.pow(2, attempt);
|
|
40
|
+
const jitter = Math.floor(Math.random() * MAX_JITTER_MS);
|
|
41
|
+
process.stderr.write(
|
|
42
|
+
`[exe-os] SQLITE_BUSY ${label} retry ${attempt + 1}/${MAX_RETRIES} \u2014 waiting ${backoff + jitter}ms
|
|
43
|
+
`
|
|
44
|
+
);
|
|
45
|
+
await delay(backoff + jitter);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
throw lastError;
|
|
49
|
+
}
|
|
50
|
+
function wrapWithRetry(client) {
|
|
51
|
+
return new Proxy(client, {
|
|
52
|
+
get(target, prop, receiver) {
|
|
53
|
+
if (prop === "execute") {
|
|
54
|
+
return (sql) => retryOnBusy(() => target.execute(sql), "execute");
|
|
55
|
+
}
|
|
56
|
+
if (prop === "batch") {
|
|
57
|
+
return (stmts) => retryOnBusy(() => target.batch(stmts), "batch");
|
|
58
|
+
}
|
|
59
|
+
return Reflect.get(target, prop, receiver);
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
var MAX_RETRIES, BASE_DELAY_MS, MAX_JITTER_MS;
|
|
64
|
+
var init_db_retry = __esm({
|
|
65
|
+
"src/lib/db-retry.ts"() {
|
|
66
|
+
"use strict";
|
|
67
|
+
MAX_RETRIES = 3;
|
|
68
|
+
BASE_DELAY_MS = 200;
|
|
69
|
+
MAX_JITTER_MS = 300;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
|
|
18
73
|
// src/lib/database.ts
|
|
19
74
|
import { createClient } from "@libsql/client";
|
|
20
75
|
async function initDatabase(config) {
|
|
21
76
|
if (_client) {
|
|
22
77
|
_client.close();
|
|
23
78
|
_client = null;
|
|
79
|
+
_resilientClient = null;
|
|
24
80
|
}
|
|
25
81
|
const opts = {
|
|
26
82
|
url: `file:${config.dbPath}`
|
|
@@ -29,17 +85,24 @@ async function initDatabase(config) {
|
|
|
29
85
|
opts.encryptionKey = config.encryptionKey;
|
|
30
86
|
}
|
|
31
87
|
_client = createClient(opts);
|
|
88
|
+
_resilientClient = wrapWithRetry(_client);
|
|
32
89
|
}
|
|
33
90
|
function getClient() {
|
|
91
|
+
if (!_resilientClient) {
|
|
92
|
+
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
93
|
+
}
|
|
94
|
+
return _resilientClient;
|
|
95
|
+
}
|
|
96
|
+
function getRawClient() {
|
|
34
97
|
if (!_client) {
|
|
35
98
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
36
99
|
}
|
|
37
100
|
return _client;
|
|
38
101
|
}
|
|
39
102
|
async function ensureSchema() {
|
|
40
|
-
const client =
|
|
103
|
+
const client = getRawClient();
|
|
41
104
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
42
|
-
await client.execute("PRAGMA busy_timeout =
|
|
105
|
+
await client.execute("PRAGMA busy_timeout = 30000");
|
|
43
106
|
try {
|
|
44
107
|
await client.execute("PRAGMA libsql_vector_search_ef = 128");
|
|
45
108
|
} catch {
|
|
@@ -828,11 +891,13 @@ async function ensureSchema() {
|
|
|
828
891
|
}
|
|
829
892
|
}
|
|
830
893
|
}
|
|
831
|
-
var _client, initTurso;
|
|
894
|
+
var _client, _resilientClient, initTurso;
|
|
832
895
|
var init_database = __esm({
|
|
833
896
|
"src/lib/database.ts"() {
|
|
834
897
|
"use strict";
|
|
898
|
+
init_db_retry();
|
|
835
899
|
_client = null;
|
|
900
|
+
_resilientClient = null;
|
|
836
901
|
initTurso = initDatabase;
|
|
837
902
|
}
|
|
838
903
|
});
|
|
@@ -1084,7 +1149,7 @@ function listShards() {
|
|
|
1084
1149
|
}
|
|
1085
1150
|
async function ensureShardSchema(client) {
|
|
1086
1151
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
1087
|
-
await client.execute("PRAGMA busy_timeout =
|
|
1152
|
+
await client.execute("PRAGMA busy_timeout = 30000");
|
|
1088
1153
|
try {
|
|
1089
1154
|
await client.execute("PRAGMA libsql_vector_search_ef = 128");
|
|
1090
1155
|
} catch {
|
|
@@ -1270,7 +1335,7 @@ var init_shard_manager = __esm({
|
|
|
1270
1335
|
|
|
1271
1336
|
// src/lib/employees.ts
|
|
1272
1337
|
import { readFile as readFile3, writeFile as writeFile3, mkdir as mkdir3 } from "fs/promises";
|
|
1273
|
-
import { existsSync as existsSync4, symlinkSync, readlinkSync } from "fs";
|
|
1338
|
+
import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync2 } from "fs";
|
|
1274
1339
|
import { execSync } from "child_process";
|
|
1275
1340
|
import path4 from "path";
|
|
1276
1341
|
var EMPLOYEES_PATH;
|
|
@@ -1287,7 +1352,7 @@ import crypto2 from "crypto";
|
|
|
1287
1352
|
import path5 from "path";
|
|
1288
1353
|
import os2 from "os";
|
|
1289
1354
|
import {
|
|
1290
|
-
readFileSync as
|
|
1355
|
+
readFileSync as readFileSync3,
|
|
1291
1356
|
readdirSync,
|
|
1292
1357
|
unlinkSync,
|
|
1293
1358
|
existsSync as existsSync5,
|
|
@@ -1305,7 +1370,7 @@ import crypto3 from "crypto";
|
|
|
1305
1370
|
import path6 from "path";
|
|
1306
1371
|
import { execSync as execSync2 } from "child_process";
|
|
1307
1372
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
1308
|
-
import { existsSync as existsSync6, readFileSync as
|
|
1373
|
+
import { existsSync as existsSync6, readFileSync as readFileSync4 } from "fs";
|
|
1309
1374
|
var init_tasks_crud = __esm({
|
|
1310
1375
|
"src/lib/tasks-crud.ts"() {
|
|
1311
1376
|
"use strict";
|
|
@@ -1369,7 +1434,7 @@ var init_provider_table = __esm({
|
|
|
1369
1434
|
});
|
|
1370
1435
|
|
|
1371
1436
|
// src/lib/intercom-queue.ts
|
|
1372
|
-
import { readFileSync as
|
|
1437
|
+
import { readFileSync as readFileSync5, writeFileSync, renameSync as renameSync2, existsSync as existsSync7, mkdirSync as mkdirSync2 } from "fs";
|
|
1373
1438
|
import path8 from "path";
|
|
1374
1439
|
import os4 from "os";
|
|
1375
1440
|
var QUEUE_PATH, TTL_MS, INTERCOM_LOG;
|
|
@@ -1383,7 +1448,7 @@ var init_intercom_queue = __esm({
|
|
|
1383
1448
|
});
|
|
1384
1449
|
|
|
1385
1450
|
// src/lib/license.ts
|
|
1386
|
-
import { readFileSync as
|
|
1451
|
+
import { readFileSync as readFileSync6, writeFileSync as writeFileSync2, existsSync as existsSync8, mkdirSync as mkdirSync3 } from "fs";
|
|
1387
1452
|
import { randomUUID } from "crypto";
|
|
1388
1453
|
import path9 from "path";
|
|
1389
1454
|
import { jwtVerify, importSPKI } from "jose";
|
|
@@ -1399,7 +1464,7 @@ var init_license = __esm({
|
|
|
1399
1464
|
});
|
|
1400
1465
|
|
|
1401
1466
|
// src/lib/plan-limits.ts
|
|
1402
|
-
import { readFileSync as
|
|
1467
|
+
import { readFileSync as readFileSync7, existsSync as existsSync9 } from "fs";
|
|
1403
1468
|
import path10 from "path";
|
|
1404
1469
|
var CACHE_PATH2;
|
|
1405
1470
|
var init_plan_limits = __esm({
|