@askexenow/exe-os 0.8.62 → 0.8.63
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 +2 -3
- package/dist/bin/backfill-responses.js +3 -4
- package/dist/bin/backfill-vectors.js +0 -1
- package/dist/bin/cleanup-stale-review-tasks.js +0 -1
- package/dist/bin/cli.js +47 -79
- package/dist/bin/exe-assign.js +0 -1
- package/dist/bin/exe-boot.js +40 -72
- package/dist/bin/exe-cloud.js +28 -60
- package/dist/bin/exe-dispatch.js +0 -1
- package/dist/bin/exe-doctor.js +0 -1
- package/dist/bin/exe-export-behaviors.js +1 -2
- package/dist/bin/exe-forget.js +0 -1
- package/dist/bin/exe-gateway.js +16 -17
- package/dist/bin/exe-heartbeat.js +1 -2
- package/dist/bin/exe-kill.js +2 -3
- package/dist/bin/exe-launch-agent.js +1 -2
- package/dist/bin/exe-link.js +28 -66
- package/dist/bin/exe-pending-messages.js +1 -2
- package/dist/bin/exe-pending-notifications.js +0 -1
- package/dist/bin/exe-pending-reviews.js +1 -2
- package/dist/bin/exe-review.js +0 -1
- package/dist/bin/exe-search.js +2 -3
- package/dist/bin/exe-session-cleanup.js +4 -5
- package/dist/bin/exe-status.js +0 -1
- package/dist/bin/exe-team.js +0 -1
- package/dist/bin/git-sweep.js +0 -1
- package/dist/bin/graph-backfill.js +5 -6
- package/dist/bin/graph-export.js +0 -1
- package/dist/bin/scan-tasks.js +0 -1
- package/dist/bin/setup.js +29 -61
- package/dist/bin/shard-migrate.js +0 -1
- package/dist/bin/wiki-sync.js +0 -1
- package/dist/gateway/index.js +16 -17
- package/dist/hooks/bug-report-worker.js +11 -12
- package/dist/hooks/commit-complete.js +0 -1
- package/dist/hooks/error-recall.js +2 -3
- package/dist/hooks/ingest-worker.js +14 -15
- package/dist/hooks/instructions-loaded.js +0 -1
- package/dist/hooks/notification.js +0 -1
- package/dist/hooks/post-compact.js +0 -1
- package/dist/hooks/pre-compact.js +2 -3
- package/dist/hooks/pre-tool-use.js +0 -1
- package/dist/hooks/prompt-ingest-worker.js +2 -3
- package/dist/hooks/prompt-submit.js +6 -7
- package/dist/hooks/response-ingest-worker.js +2 -3
- package/dist/hooks/session-end.js +3 -4
- package/dist/hooks/session-start.js +2 -3
- package/dist/hooks/stop.js +2 -3
- package/dist/hooks/subagent-stop.js +0 -1
- package/dist/hooks/summary-worker.js +30 -62
- package/dist/index.js +7 -8
- package/dist/lib/consolidation.js +0 -1
- package/dist/lib/exe-daemon.js +33 -65
- package/dist/lib/hybrid-search.js +2 -3
- package/dist/lib/keychain.js +19 -58
- package/dist/lib/schedules.js +2 -3
- package/dist/lib/store.js +0 -1
- package/dist/mcp/server.js +29 -30
- package/dist/runtime/index.js +2 -3
- package/dist/tui/App.js +24 -56
- package/package.json +1 -1
package/dist/lib/exe-daemon.js
CHANGED
|
@@ -5135,7 +5135,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
|
|
|
5135
5135
|
import { existsSync as existsSync13 } from "fs";
|
|
5136
5136
|
import path15 from "path";
|
|
5137
5137
|
import os7 from "os";
|
|
5138
|
-
import crypto6 from "crypto";
|
|
5139
5138
|
function getKeyDir() {
|
|
5140
5139
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path15.join(os7.homedir(), ".exe-os");
|
|
5141
5140
|
}
|
|
@@ -5200,65 +5199,34 @@ async function deleteMasterKey() {
|
|
|
5200
5199
|
await unlink(keyPath);
|
|
5201
5200
|
}
|
|
5202
5201
|
}
|
|
5203
|
-
function
|
|
5204
|
-
if (key.length !== 32) {
|
|
5205
|
-
throw new Error(`Key must be 32 bytes, got ${key.length}`);
|
|
5206
|
-
}
|
|
5207
|
-
const hash = crypto6.createHash("sha256").update(key).digest();
|
|
5208
|
-
const checksumByte = hash[0];
|
|
5209
|
-
let bits = "";
|
|
5210
|
-
for (const byte of key) {
|
|
5211
|
-
bits += byte.toString(2).padStart(8, "0");
|
|
5212
|
-
}
|
|
5213
|
-
bits += checksumByte.toString(2).padStart(8, "0");
|
|
5214
|
-
const words = [];
|
|
5215
|
-
let wordlist;
|
|
5202
|
+
async function loadBip39() {
|
|
5216
5203
|
try {
|
|
5217
|
-
|
|
5218
|
-
wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
|
|
5219
|
-
if (!wordlist) throw new Error("no wordlist");
|
|
5204
|
+
return await import("bip39");
|
|
5220
5205
|
} catch {
|
|
5221
|
-
throw new Error(
|
|
5206
|
+
throw new Error(
|
|
5207
|
+
"bip39 package not found. Run: npm install -g bip39\nOr reinstall exe-os: npm install -g @askexenow/exe-os"
|
|
5208
|
+
);
|
|
5222
5209
|
}
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5210
|
+
}
|
|
5211
|
+
async function exportMnemonic(key) {
|
|
5212
|
+
if (key.length !== 32) {
|
|
5213
|
+
throw new Error(`Key must be 32 bytes, got ${key.length}`);
|
|
5226
5214
|
}
|
|
5227
|
-
|
|
5215
|
+
const { entropyToMnemonic } = await loadBip39();
|
|
5216
|
+
return entropyToMnemonic(key.toString("hex"));
|
|
5228
5217
|
}
|
|
5229
|
-
function importMnemonic(mnemonic) {
|
|
5230
|
-
const
|
|
5218
|
+
async function importMnemonic(mnemonic) {
|
|
5219
|
+
const trimmed = mnemonic.trim();
|
|
5220
|
+
const words = trimmed.split(/\s+/);
|
|
5231
5221
|
if (words.length !== 24) {
|
|
5232
5222
|
throw new Error(`Expected 24 words, got ${words.length}`);
|
|
5233
5223
|
}
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
|
|
5238
|
-
if (!wordlist) throw new Error("no wordlist");
|
|
5239
|
-
} catch {
|
|
5240
|
-
throw new Error("bip39 package required. Install with: npm install bip39");
|
|
5224
|
+
const { validateMnemonic, mnemonicToEntropy } = await loadBip39();
|
|
5225
|
+
if (!validateMnemonic(trimmed)) {
|
|
5226
|
+
throw new Error("Invalid mnemonic \u2014 check for typos or missing words");
|
|
5241
5227
|
}
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
const index = wordlist.indexOf(word.toLowerCase());
|
|
5245
|
-
if (index === -1) {
|
|
5246
|
-
throw new Error(`Invalid BIP39 word: "${word}"`);
|
|
5247
|
-
}
|
|
5248
|
-
bits += index.toString(2).padStart(11, "0");
|
|
5249
|
-
}
|
|
5250
|
-
const entropyBits = bits.slice(0, 256);
|
|
5251
|
-
const checksumBits = bits.slice(256, 264);
|
|
5252
|
-
const key = Buffer.alloc(32);
|
|
5253
|
-
for (let i = 0; i < 32; i++) {
|
|
5254
|
-
key[i] = parseInt(entropyBits.slice(i * 8, (i + 1) * 8), 2);
|
|
5255
|
-
}
|
|
5256
|
-
const hash = crypto6.createHash("sha256").update(key).digest();
|
|
5257
|
-
const expectedChecksum = hash[0].toString(2).padStart(8, "0");
|
|
5258
|
-
if (checksumBits !== expectedChecksum) {
|
|
5259
|
-
throw new Error("Invalid mnemonic checksum");
|
|
5260
|
-
}
|
|
5261
|
-
return key;
|
|
5228
|
+
const entropy = mnemonicToEntropy(trimmed);
|
|
5229
|
+
return Buffer.from(entropy, "hex");
|
|
5262
5230
|
}
|
|
5263
5231
|
var SERVICE, ACCOUNT;
|
|
5264
5232
|
var init_keychain = __esm({
|
|
@@ -7354,13 +7322,13 @@ __export(graph_rag_exports, {
|
|
|
7354
7322
|
resolveAlias: () => resolveAlias,
|
|
7355
7323
|
storeExtraction: () => storeExtraction
|
|
7356
7324
|
});
|
|
7357
|
-
import
|
|
7325
|
+
import crypto6 from "crypto";
|
|
7358
7326
|
function normalizeEntityName(name) {
|
|
7359
7327
|
return name.replace(/\s*\([^)]*\)\s*/g, "").trim().toLowerCase();
|
|
7360
7328
|
}
|
|
7361
7329
|
function entityId(name, type) {
|
|
7362
7330
|
const normalized = normalizeEntityName(name);
|
|
7363
|
-
return
|
|
7331
|
+
return crypto6.createHash("sha256").update(`${normalized}::${type.toLowerCase()}`).digest("hex").slice(0, 16);
|
|
7364
7332
|
}
|
|
7365
7333
|
async function resolveAlias(client, name) {
|
|
7366
7334
|
const normalized = normalizeEntityName(name);
|
|
@@ -7595,7 +7563,7 @@ async function storeExtraction(client, extraction, memoryId, timestamp) {
|
|
|
7595
7563
|
const targetAlias = await resolveAlias(client, r.target);
|
|
7596
7564
|
const sourceId = sourceAlias ?? entityId(r.source, r.sourceType);
|
|
7597
7565
|
const targetId = targetAlias ?? entityId(r.target, r.targetType);
|
|
7598
|
-
const relId =
|
|
7566
|
+
const relId = crypto6.randomUUID().slice(0, 16);
|
|
7599
7567
|
try {
|
|
7600
7568
|
await client.execute({
|
|
7601
7569
|
sql: `INSERT OR IGNORE INTO entities (id, name, type, first_seen, last_seen)
|
|
@@ -7641,7 +7609,7 @@ async function storeExtraction(client, extraction, memoryId, timestamp) {
|
|
|
7641
7609
|
}
|
|
7642
7610
|
}
|
|
7643
7611
|
for (const h of extraction.hyperedges) {
|
|
7644
|
-
const hId =
|
|
7612
|
+
const hId = crypto6.randomUUID().slice(0, 16);
|
|
7645
7613
|
try {
|
|
7646
7614
|
await client.execute({
|
|
7647
7615
|
sql: `INSERT OR IGNORE INTO hyperedges (id, label, relation, confidence, timestamp)
|
|
@@ -7705,7 +7673,7 @@ async function extractBatch(client, batchSize = 50, model = "claude-haiku-4-5-20
|
|
|
7705
7673
|
totalEntities += stored.entitiesStored;
|
|
7706
7674
|
totalRelationships += stored.relationshipsStored;
|
|
7707
7675
|
}
|
|
7708
|
-
const contentHash =
|
|
7676
|
+
const contentHash = crypto6.createHash("sha256").update(rawContent).digest("hex").slice(0, 32);
|
|
7709
7677
|
await client.execute({
|
|
7710
7678
|
sql: "UPDATE memories SET graph_extracted = 1, content_hash = ?, graph_extracted_hash = ? WHERE id = ?",
|
|
7711
7679
|
args: [contentHash, contentHash, memoryId]
|
|
@@ -7994,16 +7962,16 @@ __export(ws_auth_exports, {
|
|
|
7994
7962
|
deriveWsAuthToken: () => deriveWsAuthToken,
|
|
7995
7963
|
hashAuthToken: () => hashAuthToken
|
|
7996
7964
|
});
|
|
7997
|
-
import
|
|
7965
|
+
import crypto7 from "crypto";
|
|
7998
7966
|
function deriveWsAuthToken(masterKey) {
|
|
7999
|
-
return Buffer.from(
|
|
7967
|
+
return Buffer.from(crypto7.hkdfSync("sha256", masterKey, "", WS_AUTH_HKDF_INFO, 32));
|
|
8000
7968
|
}
|
|
8001
7969
|
function deriveOrgId(masterKey) {
|
|
8002
|
-
const raw = Buffer.from(
|
|
8003
|
-
return
|
|
7970
|
+
const raw = Buffer.from(crypto7.hkdfSync("sha256", masterKey, "", ORG_ID_HKDF_INFO, 32));
|
|
7971
|
+
return crypto7.createHash("sha256").update(raw).digest("hex").slice(0, 32);
|
|
8004
7972
|
}
|
|
8005
7973
|
function hashAuthToken(token) {
|
|
8006
|
-
return
|
|
7974
|
+
return crypto7.createHash("sha256").update(token).digest("hex");
|
|
8007
7975
|
}
|
|
8008
7976
|
var WS_AUTH_HKDF_INFO, ORG_ID_HKDF_INFO;
|
|
8009
7977
|
var init_ws_auth = __esm({
|
|
@@ -8021,7 +7989,7 @@ __export(device_registry_exports, {
|
|
|
8021
7989
|
resolveTargetDevice: () => resolveTargetDevice,
|
|
8022
7990
|
setFriendlyName: () => setFriendlyName
|
|
8023
7991
|
});
|
|
8024
|
-
import
|
|
7992
|
+
import crypto8 from "crypto";
|
|
8025
7993
|
import os8 from "os";
|
|
8026
7994
|
import { readFileSync as readFileSync14, writeFileSync as writeFileSync7, mkdirSync as mkdirSync7, existsSync as existsSync16 } from "fs";
|
|
8027
7995
|
import path19 from "path";
|
|
@@ -8038,7 +8006,7 @@ function getDeviceInfo() {
|
|
|
8038
8006
|
}
|
|
8039
8007
|
const hostname = os8.hostname();
|
|
8040
8008
|
const info = {
|
|
8041
|
-
deviceId:
|
|
8009
|
+
deviceId: crypto8.randomUUID(),
|
|
8042
8010
|
friendlyName: hostname.replace(/\./g, "-").toLowerCase(),
|
|
8043
8011
|
hostname
|
|
8044
8012
|
};
|
|
@@ -8286,10 +8254,10 @@ __export(messaging_exports, {
|
|
|
8286
8254
|
sendMessage: () => sendMessage,
|
|
8287
8255
|
setWsClientSend: () => setWsClientSend
|
|
8288
8256
|
});
|
|
8289
|
-
import
|
|
8257
|
+
import crypto9 from "crypto";
|
|
8290
8258
|
function generateUlid() {
|
|
8291
8259
|
const timestamp = Date.now().toString(36).padStart(10, "0");
|
|
8292
|
-
const random =
|
|
8260
|
+
const random = crypto9.randomBytes(10).toString("hex").slice(0, 16);
|
|
8293
8261
|
return (timestamp + random).toUpperCase();
|
|
8294
8262
|
}
|
|
8295
8263
|
function rowToMessage(row) {
|
|
@@ -937,7 +937,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
937
937
|
import { existsSync } from "fs";
|
|
938
938
|
import path from "path";
|
|
939
939
|
import os from "os";
|
|
940
|
-
import crypto from "crypto";
|
|
941
940
|
function getKeyDir() {
|
|
942
941
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path.join(os.homedir(), ".exe-os");
|
|
943
942
|
}
|
|
@@ -2752,7 +2751,7 @@ __export(file_grep_exports, {
|
|
|
2752
2751
|
import { execSync as execSync2 } from "child_process";
|
|
2753
2752
|
import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2, existsSync as existsSync5 } from "fs";
|
|
2754
2753
|
import path6 from "path";
|
|
2755
|
-
import
|
|
2754
|
+
import crypto from "crypto";
|
|
2756
2755
|
function hasRipgrep() {
|
|
2757
2756
|
if (_hasRg === null) {
|
|
2758
2757
|
try {
|
|
@@ -2785,7 +2784,7 @@ async function grepProjectFiles(query, projectRoot, options) {
|
|
|
2785
2784
|
const chunkCtx = getChunkContext(hit.filePath, hit.lineNumber);
|
|
2786
2785
|
const prefix = chunkCtx ? `[file: ${hit.filePath}:${hit.lineNumber} in ${chunkCtx}]` : `[file: ${hit.filePath}:${hit.lineNumber}]`;
|
|
2787
2786
|
return {
|
|
2788
|
-
id:
|
|
2787
|
+
id: crypto.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
|
|
2789
2788
|
agent_id: "project",
|
|
2790
2789
|
agent_role: "file",
|
|
2791
2790
|
session_id: "file-grep",
|
package/dist/lib/keychain.js
CHANGED
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
1
|
// src/lib/keychain.ts
|
|
9
2
|
import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
10
3
|
import { existsSync } from "fs";
|
|
11
4
|
import path from "path";
|
|
12
5
|
import os from "os";
|
|
13
|
-
import crypto from "crypto";
|
|
14
6
|
var SERVICE = "exe-mem";
|
|
15
7
|
var ACCOUNT = "master-key";
|
|
16
8
|
function getKeyDir() {
|
|
@@ -77,65 +69,34 @@ async function deleteMasterKey() {
|
|
|
77
69
|
await unlink(keyPath);
|
|
78
70
|
}
|
|
79
71
|
}
|
|
80
|
-
function
|
|
81
|
-
if (key.length !== 32) {
|
|
82
|
-
throw new Error(`Key must be 32 bytes, got ${key.length}`);
|
|
83
|
-
}
|
|
84
|
-
const hash = crypto.createHash("sha256").update(key).digest();
|
|
85
|
-
const checksumByte = hash[0];
|
|
86
|
-
let bits = "";
|
|
87
|
-
for (const byte of key) {
|
|
88
|
-
bits += byte.toString(2).padStart(8, "0");
|
|
89
|
-
}
|
|
90
|
-
bits += checksumByte.toString(2).padStart(8, "0");
|
|
91
|
-
const words = [];
|
|
92
|
-
let wordlist;
|
|
72
|
+
async function loadBip39() {
|
|
93
73
|
try {
|
|
94
|
-
|
|
95
|
-
wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
|
|
96
|
-
if (!wordlist) throw new Error("no wordlist");
|
|
74
|
+
return await import("bip39");
|
|
97
75
|
} catch {
|
|
98
|
-
throw new Error(
|
|
76
|
+
throw new Error(
|
|
77
|
+
"bip39 package not found. Run: npm install -g bip39\nOr reinstall exe-os: npm install -g @askexenow/exe-os"
|
|
78
|
+
);
|
|
99
79
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
80
|
+
}
|
|
81
|
+
async function exportMnemonic(key) {
|
|
82
|
+
if (key.length !== 32) {
|
|
83
|
+
throw new Error(`Key must be 32 bytes, got ${key.length}`);
|
|
103
84
|
}
|
|
104
|
-
|
|
85
|
+
const { entropyToMnemonic } = await loadBip39();
|
|
86
|
+
return entropyToMnemonic(key.toString("hex"));
|
|
105
87
|
}
|
|
106
|
-
function importMnemonic(mnemonic) {
|
|
107
|
-
const
|
|
88
|
+
async function importMnemonic(mnemonic) {
|
|
89
|
+
const trimmed = mnemonic.trim();
|
|
90
|
+
const words = trimmed.split(/\s+/);
|
|
108
91
|
if (words.length !== 24) {
|
|
109
92
|
throw new Error(`Expected 24 words, got ${words.length}`);
|
|
110
93
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
|
|
115
|
-
if (!wordlist) throw new Error("no wordlist");
|
|
116
|
-
} catch {
|
|
117
|
-
throw new Error("bip39 package required. Install with: npm install bip39");
|
|
118
|
-
}
|
|
119
|
-
let bits = "";
|
|
120
|
-
for (const word of words) {
|
|
121
|
-
const index = wordlist.indexOf(word.toLowerCase());
|
|
122
|
-
if (index === -1) {
|
|
123
|
-
throw new Error(`Invalid BIP39 word: "${word}"`);
|
|
124
|
-
}
|
|
125
|
-
bits += index.toString(2).padStart(11, "0");
|
|
126
|
-
}
|
|
127
|
-
const entropyBits = bits.slice(0, 256);
|
|
128
|
-
const checksumBits = bits.slice(256, 264);
|
|
129
|
-
const key = Buffer.alloc(32);
|
|
130
|
-
for (let i = 0; i < 32; i++) {
|
|
131
|
-
key[i] = parseInt(entropyBits.slice(i * 8, (i + 1) * 8), 2);
|
|
132
|
-
}
|
|
133
|
-
const hash = crypto.createHash("sha256").update(key).digest();
|
|
134
|
-
const expectedChecksum = hash[0].toString(2).padStart(8, "0");
|
|
135
|
-
if (checksumBits !== expectedChecksum) {
|
|
136
|
-
throw new Error("Invalid mnemonic checksum");
|
|
94
|
+
const { validateMnemonic, mnemonicToEntropy } = await loadBip39();
|
|
95
|
+
if (!validateMnemonic(trimmed)) {
|
|
96
|
+
throw new Error("Invalid mnemonic \u2014 check for typos or missing words");
|
|
137
97
|
}
|
|
138
|
-
|
|
98
|
+
const entropy = mnemonicToEntropy(trimmed);
|
|
99
|
+
return Buffer.from(entropy, "hex");
|
|
139
100
|
}
|
|
140
101
|
export {
|
|
141
102
|
deleteMasterKey,
|
package/dist/lib/schedules.js
CHANGED
|
@@ -1531,7 +1531,7 @@ ${p.content}`).join("\n\n");
|
|
|
1531
1531
|
|
|
1532
1532
|
// src/lib/schedules.ts
|
|
1533
1533
|
init_database();
|
|
1534
|
-
import
|
|
1534
|
+
import crypto from "crypto";
|
|
1535
1535
|
import { execSync } from "child_process";
|
|
1536
1536
|
|
|
1537
1537
|
// src/lib/store.ts
|
|
@@ -1542,7 +1542,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
1542
1542
|
import { existsSync } from "fs";
|
|
1543
1543
|
import path from "path";
|
|
1544
1544
|
import os from "os";
|
|
1545
|
-
import crypto from "crypto";
|
|
1546
1545
|
var SERVICE = "exe-mem";
|
|
1547
1546
|
var ACCOUNT = "master-key";
|
|
1548
1547
|
function getKeyDir() {
|
|
@@ -1779,7 +1778,7 @@ function parseHumanCron(input) {
|
|
|
1779
1778
|
async function createSchedule(input) {
|
|
1780
1779
|
await ensureDb();
|
|
1781
1780
|
const client = getClient();
|
|
1782
|
-
const id =
|
|
1781
|
+
const id = crypto.randomUUID().slice(0, 8);
|
|
1783
1782
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1784
1783
|
const prompt = input.prompt ?? input.description;
|
|
1785
1784
|
await client.execute({
|
package/dist/lib/store.js
CHANGED
|
@@ -1545,7 +1545,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
1545
1545
|
import { existsSync } from "fs";
|
|
1546
1546
|
import path from "path";
|
|
1547
1547
|
import os from "os";
|
|
1548
|
-
import crypto from "crypto";
|
|
1549
1548
|
var SERVICE = "exe-mem";
|
|
1550
1549
|
var ACCOUNT = "master-key";
|
|
1551
1550
|
function getKeyDir() {
|
package/dist/mcp/server.js
CHANGED
|
@@ -1625,7 +1625,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
|
|
|
1625
1625
|
import { existsSync as existsSync3 } from "fs";
|
|
1626
1626
|
import path3 from "path";
|
|
1627
1627
|
import os2 from "os";
|
|
1628
|
-
import crypto from "crypto";
|
|
1629
1628
|
function getKeyDir() {
|
|
1630
1629
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
|
|
1631
1630
|
}
|
|
@@ -2783,7 +2782,7 @@ __export(file_grep_exports, {
|
|
|
2783
2782
|
import { execSync as execSync2 } from "child_process";
|
|
2784
2783
|
import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2, existsSync as existsSync5 } from "fs";
|
|
2785
2784
|
import path6 from "path";
|
|
2786
|
-
import
|
|
2785
|
+
import crypto from "crypto";
|
|
2787
2786
|
function hasRipgrep() {
|
|
2788
2787
|
if (_hasRg === null) {
|
|
2789
2788
|
try {
|
|
@@ -2816,7 +2815,7 @@ async function grepProjectFiles(query, projectRoot, options) {
|
|
|
2816
2815
|
const chunkCtx = getChunkContext(hit.filePath, hit.lineNumber);
|
|
2817
2816
|
const prefix = chunkCtx ? `[file: ${hit.filePath}:${hit.lineNumber} in ${chunkCtx}]` : `[file: ${hit.filePath}:${hit.lineNumber}]`;
|
|
2818
2817
|
return {
|
|
2819
|
-
id:
|
|
2818
|
+
id: crypto.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
|
|
2820
2819
|
agent_id: "project",
|
|
2821
2820
|
agent_role: "file",
|
|
2822
2821
|
session_id: "file-grep",
|
|
@@ -3935,7 +3934,7 @@ var init_plan_limits = __esm({
|
|
|
3935
3934
|
});
|
|
3936
3935
|
|
|
3937
3936
|
// src/lib/notifications.ts
|
|
3938
|
-
import
|
|
3937
|
+
import crypto4 from "crypto";
|
|
3939
3938
|
import path14 from "path";
|
|
3940
3939
|
import os3 from "os";
|
|
3941
3940
|
import {
|
|
@@ -3948,7 +3947,7 @@ import {
|
|
|
3948
3947
|
async function writeNotification(notification) {
|
|
3949
3948
|
try {
|
|
3950
3949
|
const client = getClient();
|
|
3951
|
-
const id =
|
|
3950
|
+
const id = crypto4.randomUUID();
|
|
3952
3951
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
3953
3952
|
await client.execute({
|
|
3954
3953
|
sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
|
|
@@ -4250,7 +4249,7 @@ var init_intercom_queue = __esm({
|
|
|
4250
4249
|
});
|
|
4251
4250
|
|
|
4252
4251
|
// src/lib/session-kill-telemetry.ts
|
|
4253
|
-
import
|
|
4252
|
+
import crypto5 from "crypto";
|
|
4254
4253
|
async function recordSessionKill(input) {
|
|
4255
4254
|
try {
|
|
4256
4255
|
const client = getClient();
|
|
@@ -4260,7 +4259,7 @@ async function recordSessionKill(input) {
|
|
|
4260
4259
|
ticks_idle, estimated_tokens_saved)
|
|
4261
4260
|
VALUES (?, ?, ?, ?, ?, ?, ?)`,
|
|
4262
4261
|
args: [
|
|
4263
|
-
|
|
4262
|
+
crypto5.randomUUID(),
|
|
4264
4263
|
input.sessionName,
|
|
4265
4264
|
input.agentId,
|
|
4266
4265
|
(/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -5244,7 +5243,7 @@ var init_task_scope = __esm({
|
|
|
5244
5243
|
});
|
|
5245
5244
|
|
|
5246
5245
|
// src/lib/tasks-crud.ts
|
|
5247
|
-
import
|
|
5246
|
+
import crypto6 from "crypto";
|
|
5248
5247
|
import path18 from "path";
|
|
5249
5248
|
import { execSync as execSync8 } from "child_process";
|
|
5250
5249
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
@@ -5335,7 +5334,7 @@ async function resolveTask(client, identifier, scopeSession) {
|
|
|
5335
5334
|
}
|
|
5336
5335
|
async function createTaskCore(input) {
|
|
5337
5336
|
const client = getClient();
|
|
5338
|
-
const id =
|
|
5337
|
+
const id = crypto6.randomUUID();
|
|
5339
5338
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
5340
5339
|
const slug = slugify(input.title);
|
|
5341
5340
|
const taskFile = input.taskFile ?? `exe/${input.assignedTo}/${slug}.md`;
|
|
@@ -6079,10 +6078,10 @@ var init_tasks_notify = __esm({
|
|
|
6079
6078
|
});
|
|
6080
6079
|
|
|
6081
6080
|
// src/lib/behaviors.ts
|
|
6082
|
-
import
|
|
6081
|
+
import crypto7 from "crypto";
|
|
6083
6082
|
async function storeBehavior(opts) {
|
|
6084
6083
|
const client = getClient();
|
|
6085
|
-
const id =
|
|
6084
|
+
const id = crypto7.randomUUID();
|
|
6086
6085
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
6087
6086
|
await client.execute({
|
|
6088
6087
|
sql: `INSERT INTO behaviors (id, agent_id, project_name, domain, priority, content, active, created_at, updated_at)
|
|
@@ -6139,7 +6138,7 @@ __export(skill_learning_exports, {
|
|
|
6139
6138
|
storeTrajectory: () => storeTrajectory,
|
|
6140
6139
|
sweepTrajectories: () => sweepTrajectories
|
|
6141
6140
|
});
|
|
6142
|
-
import
|
|
6141
|
+
import crypto8 from "crypto";
|
|
6143
6142
|
async function extractTrajectory(taskId, agentId) {
|
|
6144
6143
|
const client = getClient();
|
|
6145
6144
|
const result = await client.execute({
|
|
@@ -6168,11 +6167,11 @@ async function extractTrajectory(taskId, agentId) {
|
|
|
6168
6167
|
return signature;
|
|
6169
6168
|
}
|
|
6170
6169
|
function hashSignature(signature) {
|
|
6171
|
-
return
|
|
6170
|
+
return crypto8.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
|
|
6172
6171
|
}
|
|
6173
6172
|
async function storeTrajectory(opts) {
|
|
6174
6173
|
const client = getClient();
|
|
6175
|
-
const id =
|
|
6174
|
+
const id = crypto8.randomUUID();
|
|
6176
6175
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
6177
6176
|
const signatureHash = hashSignature(opts.signature);
|
|
6178
6177
|
await client.execute({
|
|
@@ -6598,10 +6597,10 @@ var init_tasks = __esm({
|
|
|
6598
6597
|
});
|
|
6599
6598
|
|
|
6600
6599
|
// src/lib/messaging.ts
|
|
6601
|
-
import
|
|
6600
|
+
import crypto9 from "crypto";
|
|
6602
6601
|
function generateUlid() {
|
|
6603
6602
|
const timestamp = Date.now().toString(36).padStart(10, "0");
|
|
6604
|
-
const random =
|
|
6603
|
+
const random = crypto9.randomBytes(10).toString("hex").slice(0, 16);
|
|
6605
6604
|
return (timestamp + random).toUpperCase();
|
|
6606
6605
|
}
|
|
6607
6606
|
function rowToMessage(row) {
|
|
@@ -7892,7 +7891,7 @@ init_store();
|
|
|
7892
7891
|
init_active_agent();
|
|
7893
7892
|
init_plan_limits();
|
|
7894
7893
|
import { z as z4 } from "zod";
|
|
7895
|
-
import
|
|
7894
|
+
import crypto2 from "crypto";
|
|
7896
7895
|
import { writeFileSync as writeFileSync3 } from "fs";
|
|
7897
7896
|
import path12 from "path";
|
|
7898
7897
|
function registerStoreMemory(server2) {
|
|
@@ -7943,7 +7942,7 @@ function registerStoreMemory(server2) {
|
|
|
7943
7942
|
vector = null;
|
|
7944
7943
|
needsBackfill = true;
|
|
7945
7944
|
}
|
|
7946
|
-
const memoryId =
|
|
7945
|
+
const memoryId = crypto2.randomUUID();
|
|
7947
7946
|
await writeMemory({
|
|
7948
7947
|
id: memoryId,
|
|
7949
7948
|
agent_id: agentId,
|
|
@@ -7985,7 +7984,7 @@ init_store();
|
|
|
7985
7984
|
init_plan_limits();
|
|
7986
7985
|
init_active_agent();
|
|
7987
7986
|
import { z as z5 } from "zod";
|
|
7988
|
-
import
|
|
7987
|
+
import crypto3 from "crypto";
|
|
7989
7988
|
import { writeFileSync as writeFileSync4 } from "fs";
|
|
7990
7989
|
import path13 from "path";
|
|
7991
7990
|
function registerCommitMemory(server2) {
|
|
@@ -8034,7 +8033,7 @@ function registerCommitMemory(server2) {
|
|
|
8034
8033
|
vector = null;
|
|
8035
8034
|
needsBackfill = true;
|
|
8036
8035
|
}
|
|
8037
|
-
const memoryId =
|
|
8036
|
+
const memoryId = crypto3.randomUUID();
|
|
8038
8037
|
await assertMemoryLimit();
|
|
8039
8038
|
await writeMemory({
|
|
8040
8039
|
id: memoryId,
|
|
@@ -9007,10 +9006,10 @@ import { z as z16 } from "zod";
|
|
|
9007
9006
|
|
|
9008
9007
|
// src/lib/reminders.ts
|
|
9009
9008
|
init_database();
|
|
9010
|
-
import
|
|
9009
|
+
import crypto10 from "crypto";
|
|
9011
9010
|
async function createReminder(text, dueDate) {
|
|
9012
9011
|
const client = getClient();
|
|
9013
|
-
const id =
|
|
9012
|
+
const id = crypto10.randomUUID();
|
|
9014
9013
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
9015
9014
|
await client.execute({
|
|
9016
9015
|
sql: `INSERT INTO reminders (id, text, created_at, due_date) VALUES (?, ?, ?, ?)`,
|
|
@@ -9496,7 +9495,7 @@ import { z as z23 } from "zod";
|
|
|
9496
9495
|
init_database();
|
|
9497
9496
|
init_embedder();
|
|
9498
9497
|
init_store();
|
|
9499
|
-
import
|
|
9498
|
+
import crypto11 from "crypto";
|
|
9500
9499
|
var WIKI_AGENT_ID = "wiki";
|
|
9501
9500
|
var WIKI_AGENT_ROLE = "Knowledge";
|
|
9502
9501
|
var WIKI_TOOL_NAME = "ingest_document";
|
|
@@ -9550,7 +9549,7 @@ async function resolveWorkspace(slug_or_id, name) {
|
|
|
9550
9549
|
if (existing.rows.length > 0) {
|
|
9551
9550
|
return rowToWorkspace(existing.rows[0]);
|
|
9552
9551
|
}
|
|
9553
|
-
const id =
|
|
9552
|
+
const id = crypto11.randomUUID();
|
|
9554
9553
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
9555
9554
|
const resolvedName = name ?? slug_or_id;
|
|
9556
9555
|
await client.execute({
|
|
@@ -9641,13 +9640,13 @@ async function ingestDocument(input) {
|
|
|
9641
9640
|
}));
|
|
9642
9641
|
const vectors = await embedTexts(enrichedChunks.map((c) => c.text));
|
|
9643
9642
|
const client = getClient();
|
|
9644
|
-
const documentId =
|
|
9643
|
+
const documentId = crypto11.randomUUID();
|
|
9645
9644
|
const uploadedAt = (/* @__PURE__ */ new Date()).toISOString();
|
|
9646
9645
|
const mime = input.mime ?? null;
|
|
9647
9646
|
const sourceType = input.source_type ?? DEFAULT_SOURCE_TYPE;
|
|
9648
9647
|
const userId = input.user_id ?? null;
|
|
9649
9648
|
const documentMetadata = input.document_metadata != null ? JSON.stringify(input.document_metadata) : null;
|
|
9650
|
-
const chunkIds = input.chunks.map(() =>
|
|
9649
|
+
const chunkIds = input.chunks.map(() => crypto11.randomUUID());
|
|
9651
9650
|
const versions = reserveVersions(input.chunks.length);
|
|
9652
9651
|
const documentStmt = {
|
|
9653
9652
|
sql: `INSERT INTO documents
|
|
@@ -10317,7 +10316,7 @@ function isScheduledTrigger(trigger) {
|
|
|
10317
10316
|
// src/lib/schedules.ts
|
|
10318
10317
|
init_database();
|
|
10319
10318
|
init_store();
|
|
10320
|
-
import
|
|
10319
|
+
import crypto12 from "crypto";
|
|
10321
10320
|
import { execSync as execSync9 } from "child_process";
|
|
10322
10321
|
async function ensureDb() {
|
|
10323
10322
|
if (!isInitialized()) {
|
|
@@ -10386,7 +10385,7 @@ function parseHumanCron(input) {
|
|
|
10386
10385
|
async function createSchedule(input) {
|
|
10387
10386
|
await ensureDb();
|
|
10388
10387
|
const client = getClient();
|
|
10389
|
-
const id =
|
|
10388
|
+
const id = crypto12.randomUUID().slice(0, 8);
|
|
10390
10389
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
10391
10390
|
const prompt = input.prompt ?? input.description;
|
|
10392
10391
|
await client.execute({
|
|
@@ -11044,7 +11043,7 @@ init_database();
|
|
|
11044
11043
|
import { z as z32 } from "zod";
|
|
11045
11044
|
|
|
11046
11045
|
// src/lib/graph-rag.ts
|
|
11047
|
-
import
|
|
11046
|
+
import crypto13 from "crypto";
|
|
11048
11047
|
|
|
11049
11048
|
// src/lib/code-chunker.ts
|
|
11050
11049
|
import ts from "typescript";
|
|
@@ -11055,7 +11054,7 @@ function normalizeEntityName(name) {
|
|
|
11055
11054
|
}
|
|
11056
11055
|
function entityId(name, type) {
|
|
11057
11056
|
const normalized = normalizeEntityName(name);
|
|
11058
|
-
return
|
|
11057
|
+
return crypto13.createHash("sha256").update(`${normalized}::${type.toLowerCase()}`).digest("hex").slice(0, 16);
|
|
11059
11058
|
}
|
|
11060
11059
|
async function registerAlias(client, alias, canonicalEntityId) {
|
|
11061
11060
|
const normalized = normalizeEntityName(alias);
|
package/dist/runtime/index.js
CHANGED
|
@@ -4160,7 +4160,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
|
|
|
4160
4160
|
import { existsSync as existsSync11 } from "fs";
|
|
4161
4161
|
import path15 from "path";
|
|
4162
4162
|
import os7 from "os";
|
|
4163
|
-
import crypto6 from "crypto";
|
|
4164
4163
|
function getKeyDir() {
|
|
4165
4164
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path15.join(os7.homedir(), ".exe-os");
|
|
4166
4165
|
}
|
|
@@ -5320,7 +5319,7 @@ __export(error_detector_exports, {
|
|
|
5320
5319
|
errorFingerprint: () => errorFingerprint,
|
|
5321
5320
|
isExeOsError: () => isExeOsError
|
|
5322
5321
|
});
|
|
5323
|
-
import
|
|
5322
|
+
import crypto6 from "crypto";
|
|
5324
5323
|
function isRealStderr(stderr) {
|
|
5325
5324
|
const lines = stderr.trim().split("\n");
|
|
5326
5325
|
const meaningful = lines.filter(
|
|
@@ -5391,7 +5390,7 @@ function classifyError(errorText) {
|
|
|
5391
5390
|
}
|
|
5392
5391
|
function errorFingerprint(toolName, errorText) {
|
|
5393
5392
|
const normalized = errorText.replace(/\d{4}-\d{2}-\d{2}T[\d:.]+Z/g, "TIMESTAMP").replace(/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi, "UUID").replace(/\/Users\/[^\s]+/g, "PATH").replace(/:\d+:\d+/g, ":LINE:COL").slice(0, 200);
|
|
5394
|
-
return
|
|
5393
|
+
return crypto6.createHash("sha256").update(`${toolName}:${normalized}`).digest("hex").slice(0, 16);
|
|
5395
5394
|
}
|
|
5396
5395
|
var ERROR_PATTERNS, FILE_CONTENT_TOOLS, STDERR_IGNORE_PATTERNS, USER_ERROR_PATTERNS, SYSTEM_BUG_PATTERNS;
|
|
5397
5396
|
var init_error_detector = __esm({
|