@askexenow/exe-os 0.9.38 → 0.9.40
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 +34 -7
- package/dist/bin/backfill-responses.js +34 -7
- package/dist/bin/backfill-vectors.js +34 -7
- package/dist/bin/cleanup-stale-review-tasks.js +35 -8
- package/dist/bin/cli.js +108 -45
- package/dist/bin/exe-agent.js +11 -3
- package/dist/bin/exe-assign.js +34 -7
- package/dist/bin/exe-boot.js +48 -18
- package/dist/bin/exe-call.js +132 -340
- package/dist/bin/exe-dispatch.js +34 -7
- package/dist/bin/exe-doctor.js +37 -10
- package/dist/bin/exe-export-behaviors.js +36 -9
- package/dist/bin/exe-forget.js +34 -7
- package/dist/bin/exe-gateway.js +40 -12
- package/dist/bin/exe-heartbeat.js +35 -8
- package/dist/bin/exe-kill.js +34 -7
- package/dist/bin/exe-launch-agent.js +285 -1079
- package/dist/bin/exe-new-employee.js +29 -10
- package/dist/bin/exe-pending-messages.js +34 -7
- package/dist/bin/exe-pending-notifications.js +34 -7
- package/dist/bin/exe-pending-reviews.js +34 -7
- package/dist/bin/exe-rename.js +41 -13
- package/dist/bin/exe-review.js +34 -7
- package/dist/bin/exe-search.js +36 -9
- package/dist/bin/exe-session-cleanup.js +36 -9
- package/dist/bin/exe-start-codex.js +36 -9
- package/dist/bin/exe-start-opencode.js +36 -9
- package/dist/bin/exe-status.js +35 -8
- package/dist/bin/exe-team.js +34 -7
- package/dist/bin/git-sweep.js +34 -7
- package/dist/bin/graph-backfill.js +34 -7
- package/dist/bin/graph-export.js +34 -7
- package/dist/bin/install.js +2 -1
- package/dist/bin/intercom-check.js +36 -9
- package/dist/bin/scan-tasks.js +34 -7
- package/dist/bin/setup.js +18 -17
- package/dist/bin/shard-migrate.js +34 -7
- package/dist/bin/update.js +36 -3
- package/dist/gateway/index.js +38 -10
- package/dist/hooks/bug-report-worker.js +38 -10
- package/dist/hooks/codex-stop-task-finalizer.js +36 -9
- package/dist/hooks/commit-complete.js +34 -7
- package/dist/hooks/error-recall.js +36 -9
- package/dist/hooks/ingest.js +36 -8
- package/dist/hooks/instructions-loaded.js +42 -10
- package/dist/hooks/notification.js +34 -7
- package/dist/hooks/post-compact.js +34 -7
- package/dist/hooks/post-tool-combined.js +37 -10
- package/dist/hooks/pre-compact.js +35 -8
- package/dist/hooks/pre-tool-use.js +36 -8
- package/dist/hooks/prompt-submit.js +41 -13
- package/dist/hooks/session-end.js +35 -8
- package/dist/hooks/session-start.js +47 -14
- package/dist/hooks/stop.js +35 -8
- package/dist/hooks/subagent-stop.js +34 -7
- package/dist/hooks/summary-worker.js +43 -16
- package/dist/index.js +36 -8
- package/dist/lib/consolidation.js +2 -1
- package/dist/lib/employee-templates.js +2 -1
- package/dist/lib/employees.js +2 -1
- package/dist/lib/exe-daemon.js +136 -36
- package/dist/lib/hybrid-search.js +36 -9
- package/dist/lib/identity.js +8 -3
- package/dist/lib/schedules.js +34 -7
- package/dist/lib/store.js +34 -7
- package/dist/mcp/server.js +133 -33
- package/dist/mcp/tools/create-task.js +10 -4
- package/dist/runtime/index.js +34 -7
- package/dist/tui/App.js +40 -11
- package/package.json +2 -2
package/dist/bin/exe-boot.js
CHANGED
|
@@ -3505,7 +3505,7 @@ __export(shard_manager_exports, {
|
|
|
3505
3505
|
shardExists: () => shardExists
|
|
3506
3506
|
});
|
|
3507
3507
|
import path7 from "path";
|
|
3508
|
-
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readdirSync } from "fs";
|
|
3508
|
+
import { existsSync as existsSync7, mkdirSync as mkdirSync2, readdirSync, renameSync as renameSync3, statSync as statSync2 } from "fs";
|
|
3509
3509
|
import { createClient as createClient2 } from "@libsql/client";
|
|
3510
3510
|
function initShardManager(encryptionKey) {
|
|
3511
3511
|
_encryptionKey = encryptionKey;
|
|
@@ -3527,7 +3527,7 @@ function getShardClient(projectName) {
|
|
|
3527
3527
|
if (!_encryptionKey) {
|
|
3528
3528
|
throw new Error("Shard manager not initialized. Call initShardManager() first.");
|
|
3529
3529
|
}
|
|
3530
|
-
const safeName = projectName
|
|
3530
|
+
const safeName = safeShardName(projectName);
|
|
3531
3531
|
if (!safeName || safeName === "unknown") {
|
|
3532
3532
|
throw new Error(`Invalid project name for shard: "${projectName}" (resolved to "${safeName}")`);
|
|
3533
3533
|
}
|
|
@@ -3549,9 +3549,12 @@ function getShardClient(projectName) {
|
|
|
3549
3549
|
return client;
|
|
3550
3550
|
}
|
|
3551
3551
|
function shardExists(projectName) {
|
|
3552
|
-
const safeName = projectName
|
|
3552
|
+
const safeName = safeShardName(projectName);
|
|
3553
3553
|
return existsSync7(path7.join(SHARDS_DIR, `${safeName}.db`));
|
|
3554
3554
|
}
|
|
3555
|
+
function safeShardName(projectName) {
|
|
3556
|
+
return projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
3557
|
+
}
|
|
3555
3558
|
function listShards() {
|
|
3556
3559
|
if (!existsSync7(SHARDS_DIR)) return [];
|
|
3557
3560
|
return readdirSync(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
@@ -3645,7 +3648,8 @@ async function ensureShardSchema(client) {
|
|
|
3645
3648
|
"ALTER TABLE memories ADD COLUMN token_cost REAL",
|
|
3646
3649
|
"ALTER TABLE memories ADD COLUMN audience TEXT",
|
|
3647
3650
|
"ALTER TABLE memories ADD COLUMN language_type TEXT",
|
|
3648
|
-
"ALTER TABLE memories ADD COLUMN parent_memory_id TEXT"
|
|
3651
|
+
"ALTER TABLE memories ADD COLUMN parent_memory_id TEXT",
|
|
3652
|
+
"ALTER TABLE memories ADD COLUMN deleted_at TEXT"
|
|
3649
3653
|
]) {
|
|
3650
3654
|
try {
|
|
3651
3655
|
await client.execute(col);
|
|
@@ -3741,9 +3745,32 @@ async function ensureShardSchema(client) {
|
|
|
3741
3745
|
}
|
|
3742
3746
|
}
|
|
3743
3747
|
async function getReadyShardClient(projectName) {
|
|
3744
|
-
const
|
|
3745
|
-
|
|
3746
|
-
|
|
3748
|
+
const safeName = safeShardName(projectName);
|
|
3749
|
+
let client = getShardClient(projectName);
|
|
3750
|
+
try {
|
|
3751
|
+
await ensureShardSchema(client);
|
|
3752
|
+
return client;
|
|
3753
|
+
} catch (err) {
|
|
3754
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
3755
|
+
if (!/SQLITE_NOTADB|file is not a database/i.test(message)) throw err;
|
|
3756
|
+
client.close();
|
|
3757
|
+
_shards.delete(safeName);
|
|
3758
|
+
_shardLastAccess.delete(safeName);
|
|
3759
|
+
const dbPath = path7.join(SHARDS_DIR, `${safeName}.db`);
|
|
3760
|
+
if (existsSync7(dbPath)) {
|
|
3761
|
+
const stat = statSync2(dbPath);
|
|
3762
|
+
const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
|
|
3763
|
+
const archivedPath = path7.join(SHARDS_DIR, `${safeName}.db.broken-${stamp}`);
|
|
3764
|
+
renameSync3(dbPath, archivedPath);
|
|
3765
|
+
process.stderr.write(
|
|
3766
|
+
`[shard-manager] Archived unreadable shard ${safeName}: ${archivedPath} (${stat.size} bytes, mtime ${stat.mtime.toISOString()})
|
|
3767
|
+
`
|
|
3768
|
+
);
|
|
3769
|
+
}
|
|
3770
|
+
client = getShardClient(projectName);
|
|
3771
|
+
await ensureShardSchema(client);
|
|
3772
|
+
return client;
|
|
3773
|
+
}
|
|
3747
3774
|
}
|
|
3748
3775
|
function evictLRU() {
|
|
3749
3776
|
let oldest = null;
|
|
@@ -4310,7 +4337,7 @@ __export(intercom_queue_exports, {
|
|
|
4310
4337
|
queueIntercom: () => queueIntercom,
|
|
4311
4338
|
readQueue: () => readQueue
|
|
4312
4339
|
});
|
|
4313
|
-
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, renameSync as
|
|
4340
|
+
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, renameSync as renameSync4, existsSync as existsSync10, mkdirSync as mkdirSync4 } from "fs";
|
|
4314
4341
|
import path10 from "path";
|
|
4315
4342
|
import os7 from "os";
|
|
4316
4343
|
function ensureDir() {
|
|
@@ -4329,7 +4356,7 @@ function writeQueue(queue) {
|
|
|
4329
4356
|
ensureDir();
|
|
4330
4357
|
const tmp = `${QUEUE_PATH}.tmp`;
|
|
4331
4358
|
writeFileSync5(tmp, JSON.stringify(queue, null, 2));
|
|
4332
|
-
|
|
4359
|
+
renameSync4(tmp, QUEUE_PATH);
|
|
4333
4360
|
}
|
|
4334
4361
|
function queueIntercom(targetSession, reason) {
|
|
4335
4362
|
const queue = readQueue();
|
|
@@ -4688,8 +4715,8 @@ async function validateLicense(apiKey, deviceId) {
|
|
|
4688
4715
|
}
|
|
4689
4716
|
function getCacheAgeMs() {
|
|
4690
4717
|
try {
|
|
4691
|
-
const { statSync:
|
|
4692
|
-
const s =
|
|
4718
|
+
const { statSync: statSync5 } = __require("fs");
|
|
4719
|
+
const s = statSync5(CACHE_PATH);
|
|
4693
4720
|
return Date.now() - s.mtimeMs;
|
|
4694
4721
|
} catch {
|
|
4695
4722
|
return Infinity;
|
|
@@ -8622,7 +8649,7 @@ __export(db_backup_exports, {
|
|
|
8622
8649
|
listBackups: () => listBackups,
|
|
8623
8650
|
rotateBackups: () => rotateBackups
|
|
8624
8651
|
});
|
|
8625
|
-
import { copyFileSync, existsSync as existsSync19, mkdirSync as mkdirSync11, readdirSync as readdirSync7, unlinkSync as unlinkSync10, statSync as
|
|
8652
|
+
import { copyFileSync, existsSync as existsSync19, mkdirSync as mkdirSync11, readdirSync as readdirSync7, unlinkSync as unlinkSync10, statSync as statSync3 } from "fs";
|
|
8626
8653
|
import path23 from "path";
|
|
8627
8654
|
function findActiveDb() {
|
|
8628
8655
|
for (const name of DB_NAMES) {
|
|
@@ -8666,7 +8693,7 @@ function rotateBackups(keepDays = DEFAULT_KEEP_DAYS) {
|
|
|
8666
8693
|
if (!file.endsWith(".db") && !file.endsWith(".db-wal") && !file.endsWith(".db-shm")) continue;
|
|
8667
8694
|
const filePath = path23.join(BACKUP_DIR, file);
|
|
8668
8695
|
try {
|
|
8669
|
-
const stat =
|
|
8696
|
+
const stat = statSync3(filePath);
|
|
8670
8697
|
if (stat.mtimeMs < cutoff) {
|
|
8671
8698
|
unlinkSync10(filePath);
|
|
8672
8699
|
deleted++;
|
|
@@ -8684,7 +8711,7 @@ function listBackups() {
|
|
|
8684
8711
|
const files = readdirSync7(BACKUP_DIR).filter((f) => f.endsWith(".db") && !f.endsWith("-wal") && !f.endsWith("-shm"));
|
|
8685
8712
|
return files.map((name) => {
|
|
8686
8713
|
const p = path23.join(BACKUP_DIR, name);
|
|
8687
|
-
const stat =
|
|
8714
|
+
const stat = statSync3(p);
|
|
8688
8715
|
return { path: p, name, size: stat.size, date: stat.mtime };
|
|
8689
8716
|
}).sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
8690
8717
|
} catch {
|
|
@@ -8743,7 +8770,7 @@ __export(cloud_sync_exports, {
|
|
|
8743
8770
|
pushToPostgres: () => pushToPostgres,
|
|
8744
8771
|
recordRosterDeletion: () => recordRosterDeletion
|
|
8745
8772
|
});
|
|
8746
|
-
import { readFileSync as readFileSync15, writeFileSync as writeFileSync12, existsSync as existsSync20, readdirSync as readdirSync8, mkdirSync as mkdirSync12, appendFileSync as appendFileSync2, unlinkSync as unlinkSync11, openSync as openSync2, closeSync as closeSync2, statSync as
|
|
8773
|
+
import { readFileSync as readFileSync15, writeFileSync as writeFileSync12, existsSync as existsSync20, readdirSync as readdirSync8, mkdirSync as mkdirSync12, appendFileSync as appendFileSync2, unlinkSync as unlinkSync11, openSync as openSync2, closeSync as closeSync2, statSync as statSync4 } from "fs";
|
|
8747
8774
|
import crypto8 from "crypto";
|
|
8748
8775
|
import path24 from "path";
|
|
8749
8776
|
import { homedir as homedir2 } from "os";
|
|
@@ -9235,7 +9262,7 @@ async function cloudSync(config) {
|
|
|
9235
9262
|
const { getLatestBackup: getLatestBackup2 } = await Promise.resolve().then(() => (init_db_backup(), db_backup_exports));
|
|
9236
9263
|
const latestBackup = getLatestBackup2();
|
|
9237
9264
|
if (latestBackup) {
|
|
9238
|
-
const backupSize =
|
|
9265
|
+
const backupSize = statSync4(latestBackup).size;
|
|
9239
9266
|
const MAX_CLOUD_BACKUP_BYTES = 50 * 1024 * 1024;
|
|
9240
9267
|
if (backupSize <= MAX_CLOUD_BACKUP_BYTES) {
|
|
9241
9268
|
const backupData = readFileSync15(latestBackup);
|
|
@@ -10283,7 +10310,8 @@ Use recall_my_memory and ask_team_memory constantly. Store your own summaries (d
|
|
|
10283
10310
|
var PROCEDURES_MARKER = "EXE OS \u2014 VISION AND NON-NEGOTIABLE PRINCIPLES";
|
|
10284
10311
|
function getSessionPrompt(storedPrompt) {
|
|
10285
10312
|
const markerIndex = storedPrompt.indexOf(PROCEDURES_MARKER);
|
|
10286
|
-
const
|
|
10313
|
+
const withoutProcedures = markerIndex >= 0 ? storedPrompt.slice(0, markerIndex).trimEnd() : storedPrompt;
|
|
10314
|
+
const rolePrompt = withoutProcedures.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, "").replace(/<!--[\s\S]*?-->/g, "").trimStart();
|
|
10287
10315
|
const globalBlock = getGlobalProceduresBlock();
|
|
10288
10316
|
return `${globalBlock}${rolePrompt}
|
|
10289
10317
|
${BASE_OPERATING_PROCEDURES}`;
|
|
@@ -11585,7 +11613,9 @@ async function boot(options) {
|
|
|
11585
11613
|
}
|
|
11586
11614
|
const sessionDir = path25.join(EXE_AI_DIR, "sessions", coordinatorName);
|
|
11587
11615
|
await mkdir5(sessionDir, { recursive: true });
|
|
11588
|
-
const
|
|
11616
|
+
const coordinatorIdentityPath = path25.join(EXE_AI_DIR, "identity", `${coordinatorName}.md`);
|
|
11617
|
+
const coordinatorPrompt = existsSync21(coordinatorIdentityPath) ? readFileSync16(coordinatorIdentityPath, "utf-8") : coordinatorEmployee.systemPrompt ?? "";
|
|
11618
|
+
const claudeMdContent = `${getSessionPrompt(coordinatorPrompt)}
|
|
11589
11619
|
|
|
11590
11620
|
---
|
|
11591
11621
|
|