@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
|
@@ -1764,7 +1764,7 @@ ${p.content}`).join("\n\n");
|
|
|
1764
1764
|
});
|
|
1765
1765
|
|
|
1766
1766
|
// src/lib/notifications.ts
|
|
1767
|
-
import
|
|
1767
|
+
import crypto2 from "crypto";
|
|
1768
1768
|
import path6 from "path";
|
|
1769
1769
|
import os3 from "os";
|
|
1770
1770
|
import {
|
|
@@ -1777,7 +1777,7 @@ import {
|
|
|
1777
1777
|
async function writeNotification(notification) {
|
|
1778
1778
|
try {
|
|
1779
1779
|
const client = getClient();
|
|
1780
|
-
const id =
|
|
1780
|
+
const id = crypto2.randomUUID();
|
|
1781
1781
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1782
1782
|
await client.execute({
|
|
1783
1783
|
sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
|
|
@@ -2861,7 +2861,7 @@ var init_intercom_queue = __esm({
|
|
|
2861
2861
|
});
|
|
2862
2862
|
|
|
2863
2863
|
// src/lib/session-kill-telemetry.ts
|
|
2864
|
-
import
|
|
2864
|
+
import crypto3 from "crypto";
|
|
2865
2865
|
async function recordSessionKill(input2) {
|
|
2866
2866
|
try {
|
|
2867
2867
|
const client = getClient();
|
|
@@ -2871,7 +2871,7 @@ async function recordSessionKill(input2) {
|
|
|
2871
2871
|
ticks_idle, estimated_tokens_saved)
|
|
2872
2872
|
VALUES (?, ?, ?, ?, ?, ?, ?)`,
|
|
2873
2873
|
args: [
|
|
2874
|
-
|
|
2874
|
+
crypto3.randomUUID(),
|
|
2875
2875
|
input2.sessionName,
|
|
2876
2876
|
input2.agentId,
|
|
2877
2877
|
(/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -3855,7 +3855,7 @@ var init_task_scope = __esm({
|
|
|
3855
3855
|
});
|
|
3856
3856
|
|
|
3857
3857
|
// src/lib/tasks-crud.ts
|
|
3858
|
-
import
|
|
3858
|
+
import crypto4 from "crypto";
|
|
3859
3859
|
import path14 from "path";
|
|
3860
3860
|
import { execSync as execSync7 } from "child_process";
|
|
3861
3861
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
@@ -3946,7 +3946,7 @@ async function resolveTask(client, identifier, scopeSession) {
|
|
|
3946
3946
|
}
|
|
3947
3947
|
async function createTaskCore(input2) {
|
|
3948
3948
|
const client = getClient();
|
|
3949
|
-
const id =
|
|
3949
|
+
const id = crypto4.randomUUID();
|
|
3950
3950
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
3951
3951
|
const slug = slugify(input2.title);
|
|
3952
3952
|
const taskFile = input2.taskFile ?? `exe/${input2.assignedTo}/${slug}.md`;
|
|
@@ -4690,10 +4690,10 @@ var init_tasks_notify = __esm({
|
|
|
4690
4690
|
});
|
|
4691
4691
|
|
|
4692
4692
|
// src/lib/behaviors.ts
|
|
4693
|
-
import
|
|
4693
|
+
import crypto5 from "crypto";
|
|
4694
4694
|
async function storeBehavior(opts) {
|
|
4695
4695
|
const client = getClient();
|
|
4696
|
-
const id =
|
|
4696
|
+
const id = crypto5.randomUUID();
|
|
4697
4697
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
4698
4698
|
await client.execute({
|
|
4699
4699
|
sql: `INSERT INTO behaviors (id, agent_id, project_name, domain, priority, content, active, created_at, updated_at)
|
|
@@ -4722,7 +4722,7 @@ __export(skill_learning_exports, {
|
|
|
4722
4722
|
storeTrajectory: () => storeTrajectory,
|
|
4723
4723
|
sweepTrajectories: () => sweepTrajectories
|
|
4724
4724
|
});
|
|
4725
|
-
import
|
|
4725
|
+
import crypto6 from "crypto";
|
|
4726
4726
|
async function extractTrajectory(taskId, agentId) {
|
|
4727
4727
|
const client = getClient();
|
|
4728
4728
|
const result = await client.execute({
|
|
@@ -4751,11 +4751,11 @@ async function extractTrajectory(taskId, agentId) {
|
|
|
4751
4751
|
return signature;
|
|
4752
4752
|
}
|
|
4753
4753
|
function hashSignature(signature) {
|
|
4754
|
-
return
|
|
4754
|
+
return crypto6.createHash("sha256").update(signature.join("|")).digest("hex").slice(0, 16);
|
|
4755
4755
|
}
|
|
4756
4756
|
async function storeTrajectory(opts) {
|
|
4757
4757
|
const client = getClient();
|
|
4758
|
-
const id =
|
|
4758
|
+
const id = crypto6.randomUUID();
|
|
4759
4759
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
4760
4760
|
const signatureHash = hashSignature(opts.signature);
|
|
4761
4761
|
await client.execute({
|
|
@@ -5291,7 +5291,7 @@ var init_worker_gate = __esm({
|
|
|
5291
5291
|
});
|
|
5292
5292
|
|
|
5293
5293
|
// src/adapters/claude/hooks/ingest-worker.ts
|
|
5294
|
-
import
|
|
5294
|
+
import crypto7 from "crypto";
|
|
5295
5295
|
import { execSync as execSync8 } from "child_process";
|
|
5296
5296
|
import { mkdirSync as mkdirSync8, writeFileSync as writeFileSync7 } from "fs";
|
|
5297
5297
|
import path19 from "path";
|
|
@@ -5409,7 +5409,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
5409
5409
|
import { existsSync as existsSync2 } from "fs";
|
|
5410
5410
|
import path3 from "path";
|
|
5411
5411
|
import os from "os";
|
|
5412
|
-
import crypto2 from "crypto";
|
|
5413
5412
|
var SERVICE = "exe-mem";
|
|
5414
5413
|
var ACCOUNT = "master-key";
|
|
5415
5414
|
function getKeyDir() {
|
|
@@ -5981,7 +5980,7 @@ process.stdin.on("end", async () => {
|
|
|
5981
5980
|
}
|
|
5982
5981
|
const agentId = process.env.AGENT_ID;
|
|
5983
5982
|
await writeMemory({
|
|
5984
|
-
id:
|
|
5983
|
+
id: crypto7.randomUUID(),
|
|
5985
5984
|
agent_id: agentId,
|
|
5986
5985
|
agent_role: process.env.AGENT_ROLE ?? "unknown",
|
|
5987
5986
|
session_id: data.session_id,
|
|
@@ -6091,7 +6090,7 @@ process.stdin.on("end", async () => {
|
|
|
6091
6090
|
});
|
|
6092
6091
|
const assignmentText = `TASK ASSIGNED: ${title} \u2192 ${employee} [${priority}] in ${projectName}`;
|
|
6093
6092
|
await writeMemory({
|
|
6094
|
-
id:
|
|
6093
|
+
id: crypto7.randomUUID(),
|
|
6095
6094
|
agent_id: assignedBy,
|
|
6096
6095
|
agent_role: "COO",
|
|
6097
6096
|
session_id: data.session_id,
|
|
@@ -1140,7 +1140,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
|
|
|
1140
1140
|
import { existsSync as existsSync3 } from "fs";
|
|
1141
1141
|
import path4 from "path";
|
|
1142
1142
|
import os2 from "os";
|
|
1143
|
-
import crypto from "crypto";
|
|
1144
1143
|
function getKeyDir() {
|
|
1145
1144
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path4.join(os2.homedir(), ".exe-os");
|
|
1146
1145
|
}
|
|
@@ -1140,7 +1140,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
|
|
|
1140
1140
|
import { existsSync as existsSync2 } from "fs";
|
|
1141
1141
|
import path3 from "path";
|
|
1142
1142
|
import os2 from "os";
|
|
1143
|
-
import crypto from "crypto";
|
|
1144
1143
|
function getKeyDir() {
|
|
1145
1144
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path3.join(os2.homedir(), ".exe-os");
|
|
1146
1145
|
}
|
|
@@ -1469,7 +1469,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
|
|
|
1469
1469
|
import { existsSync as existsSync7 } from "fs";
|
|
1470
1470
|
import path9 from "path";
|
|
1471
1471
|
import os5 from "os";
|
|
1472
|
-
import crypto from "crypto";
|
|
1473
1472
|
function getKeyDir() {
|
|
1474
1473
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path9.join(os5.homedir(), ".exe-os");
|
|
1475
1474
|
}
|
|
@@ -4051,7 +4051,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
|
|
|
4051
4051
|
import { existsSync as existsSync11 } from "fs";
|
|
4052
4052
|
import path15 from "path";
|
|
4053
4053
|
import os6 from "os";
|
|
4054
|
-
import crypto6 from "crypto";
|
|
4055
4054
|
function getKeyDir() {
|
|
4056
4055
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path15.join(os6.homedir(), ".exe-os");
|
|
4057
4056
|
}
|
|
@@ -5007,7 +5006,7 @@ var init_store = __esm({
|
|
|
5007
5006
|
});
|
|
5008
5007
|
|
|
5009
5008
|
// src/adapters/claude/hooks/pre-compact.ts
|
|
5010
|
-
import
|
|
5009
|
+
import crypto6 from "crypto";
|
|
5011
5010
|
|
|
5012
5011
|
// src/adapters/claude/active-agent.ts
|
|
5013
5012
|
init_config();
|
|
@@ -5146,7 +5145,7 @@ ${taskLines}`);
|
|
|
5146
5145
|
recoveryLines.push(`Files: ${lastCheckpoint.files_touched.join(", ")}`);
|
|
5147
5146
|
}
|
|
5148
5147
|
await writeMemory2({
|
|
5149
|
-
id:
|
|
5148
|
+
id: crypto6.randomUUID(),
|
|
5150
5149
|
agent_id: agent.agentId,
|
|
5151
5150
|
agent_role: agent.agentRole,
|
|
5152
5151
|
session_id: payload.session_id,
|
|
@@ -1766,7 +1766,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
|
|
|
1766
1766
|
import { existsSync as existsSync8 } from "fs";
|
|
1767
1767
|
import path10 from "path";
|
|
1768
1768
|
import os6 from "os";
|
|
1769
|
-
import crypto from "crypto";
|
|
1770
1769
|
function getKeyDir() {
|
|
1771
1770
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path10.join(os6.homedir(), ".exe-os");
|
|
1772
1771
|
}
|
|
@@ -2013,7 +2013,7 @@ var init_embedder = __esm({
|
|
|
2013
2013
|
});
|
|
2014
2014
|
|
|
2015
2015
|
// src/adapters/claude/hooks/prompt-ingest-worker.ts
|
|
2016
|
-
import
|
|
2016
|
+
import crypto from "crypto";
|
|
2017
2017
|
import { writeFileSync as writeFileSync2 } from "fs";
|
|
2018
2018
|
import path9 from "path";
|
|
2019
2019
|
|
|
@@ -2062,7 +2062,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
2062
2062
|
import { existsSync } from "fs";
|
|
2063
2063
|
import path2 from "path";
|
|
2064
2064
|
import os from "os";
|
|
2065
|
-
import crypto from "crypto";
|
|
2066
2065
|
var SERVICE = "exe-mem";
|
|
2067
2066
|
var ACCOUNT = "master-key";
|
|
2068
2067
|
function getKeyDir() {
|
|
@@ -2724,7 +2723,7 @@ async function main() {
|
|
|
2724
2723
|
await assertMemoryLimit();
|
|
2725
2724
|
const confidence = agentId === "default" ? 0.9 : 0.7;
|
|
2726
2725
|
await writeMemory({
|
|
2727
|
-
id:
|
|
2726
|
+
id: crypto.randomUUID(),
|
|
2728
2727
|
agent_id: agentId,
|
|
2729
2728
|
agent_role: agentRole,
|
|
2730
2729
|
session_id: sessionId,
|
|
@@ -1202,7 +1202,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
|
|
|
1202
1202
|
import { existsSync as existsSync2 } from "fs";
|
|
1203
1203
|
import path2 from "path";
|
|
1204
1204
|
import os2 from "os";
|
|
1205
|
-
import crypto from "crypto";
|
|
1206
1205
|
function getKeyDir() {
|
|
1207
1206
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path2.join(os2.homedir(), ".exe-os");
|
|
1208
1207
|
}
|
|
@@ -2769,7 +2768,7 @@ __export(file_grep_exports, {
|
|
|
2769
2768
|
import { execSync as execSync2 } from "child_process";
|
|
2770
2769
|
import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2, existsSync as existsSync5 } from "fs";
|
|
2771
2770
|
import path6 from "path";
|
|
2772
|
-
import
|
|
2771
|
+
import crypto from "crypto";
|
|
2773
2772
|
function hasRipgrep() {
|
|
2774
2773
|
if (_hasRg === null) {
|
|
2775
2774
|
try {
|
|
@@ -2802,7 +2801,7 @@ async function grepProjectFiles(query, projectRoot, options) {
|
|
|
2802
2801
|
const chunkCtx = getChunkContext(hit.filePath, hit.lineNumber);
|
|
2803
2802
|
const prefix = chunkCtx ? `[file: ${hit.filePath}:${hit.lineNumber} in ${chunkCtx}]` : `[file: ${hit.filePath}:${hit.lineNumber}]`;
|
|
2804
2803
|
return {
|
|
2805
|
-
id:
|
|
2804
|
+
id: crypto.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
|
|
2806
2805
|
agent_id: "project",
|
|
2807
2806
|
agent_role: "file",
|
|
2808
2807
|
session_id: "file-grep",
|
|
@@ -3661,10 +3660,10 @@ __export(messaging_exports, {
|
|
|
3661
3660
|
sendMessage: () => sendMessage,
|
|
3662
3661
|
setWsClientSend: () => setWsClientSend
|
|
3663
3662
|
});
|
|
3664
|
-
import
|
|
3663
|
+
import crypto2 from "crypto";
|
|
3665
3664
|
function generateUlid() {
|
|
3666
3665
|
const timestamp = Date.now().toString(36).padStart(10, "0");
|
|
3667
|
-
const random =
|
|
3666
|
+
const random = crypto2.randomBytes(10).toString("hex").slice(0, 16);
|
|
3668
3667
|
return (timestamp + random).toUpperCase();
|
|
3669
3668
|
}
|
|
3670
3669
|
function rowToMessage(row) {
|
|
@@ -3896,7 +3895,7 @@ var init_messaging = __esm({
|
|
|
3896
3895
|
});
|
|
3897
3896
|
|
|
3898
3897
|
// src/lib/notifications.ts
|
|
3899
|
-
import
|
|
3898
|
+
import crypto3 from "crypto";
|
|
3900
3899
|
import path15 from "path";
|
|
3901
3900
|
import os6 from "os";
|
|
3902
3901
|
import {
|
|
@@ -3909,7 +3908,7 @@ import {
|
|
|
3909
3908
|
async function writeNotification(notification) {
|
|
3910
3909
|
try {
|
|
3911
3910
|
const client = getClient();
|
|
3912
|
-
const id =
|
|
3911
|
+
const id = crypto3.randomUUID();
|
|
3913
3912
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
3914
3913
|
await client.execute({
|
|
3915
3914
|
sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
|
|
@@ -2405,7 +2405,7 @@ var init_plan_limits = __esm({
|
|
|
2405
2405
|
});
|
|
2406
2406
|
|
|
2407
2407
|
// src/adapters/claude/hooks/response-ingest-worker.ts
|
|
2408
|
-
import
|
|
2408
|
+
import crypto from "crypto";
|
|
2409
2409
|
import { writeFileSync as writeFileSync2 } from "fs";
|
|
2410
2410
|
import path9 from "path";
|
|
2411
2411
|
|
|
@@ -2454,7 +2454,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
2454
2454
|
import { existsSync } from "fs";
|
|
2455
2455
|
import path2 from "path";
|
|
2456
2456
|
import os from "os";
|
|
2457
|
-
import crypto from "crypto";
|
|
2458
2457
|
var SERVICE = "exe-mem";
|
|
2459
2458
|
var ACCOUNT = "master-key";
|
|
2460
2459
|
function getKeyDir() {
|
|
@@ -2858,7 +2857,7 @@ async function main() {
|
|
|
2858
2857
|
process.exit(0);
|
|
2859
2858
|
}
|
|
2860
2859
|
await writeMemory({
|
|
2861
|
-
id:
|
|
2860
|
+
id: crypto.randomUUID(),
|
|
2862
2861
|
agent_id: agentId,
|
|
2863
2862
|
agent_role: agentRole,
|
|
2864
2863
|
session_id: sessionId,
|
|
@@ -1469,7 +1469,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
|
|
|
1469
1469
|
import { existsSync as existsSync7 } from "fs";
|
|
1470
1470
|
import path9 from "path";
|
|
1471
1471
|
import os5 from "os";
|
|
1472
|
-
import crypto from "crypto";
|
|
1473
1472
|
function getKeyDir() {
|
|
1474
1473
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path9.join(os5.homedir(), ".exe-os");
|
|
1475
1474
|
}
|
|
@@ -2491,7 +2490,7 @@ __export(notifications_exports, {
|
|
|
2491
2490
|
readUnreadNotifications: () => readUnreadNotifications,
|
|
2492
2491
|
writeNotification: () => writeNotification
|
|
2493
2492
|
});
|
|
2494
|
-
import
|
|
2493
|
+
import crypto from "crypto";
|
|
2495
2494
|
import path11 from "path";
|
|
2496
2495
|
import os6 from "os";
|
|
2497
2496
|
import {
|
|
@@ -2504,7 +2503,7 @@ import {
|
|
|
2504
2503
|
async function writeNotification(notification) {
|
|
2505
2504
|
try {
|
|
2506
2505
|
const client = getClient();
|
|
2507
|
-
const id =
|
|
2506
|
+
const id = crypto.randomUUID();
|
|
2508
2507
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2509
2508
|
await client.execute({
|
|
2510
2509
|
sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
|
|
@@ -2650,7 +2649,7 @@ async function migrateJsonNotifications() {
|
|
|
2650
2649
|
sql: `INSERT OR IGNORE INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
|
|
2651
2650
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
2652
2651
|
args: [
|
|
2653
|
-
|
|
2652
|
+
crypto.randomUUID(),
|
|
2654
2653
|
data.agentId ?? "unknown",
|
|
2655
2654
|
data.agentRole ?? "unknown",
|
|
2656
2655
|
data.event ?? "session_summary",
|
|
@@ -1196,7 +1196,6 @@ import { readFile as readFile2, writeFile as writeFile2, unlink, mkdir as mkdir2
|
|
|
1196
1196
|
import { existsSync as existsSync2 } from "fs";
|
|
1197
1197
|
import path2 from "path";
|
|
1198
1198
|
import os2 from "os";
|
|
1199
|
-
import crypto from "crypto";
|
|
1200
1199
|
function getKeyDir() {
|
|
1201
1200
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path2.join(os2.homedir(), ".exe-os");
|
|
1202
1201
|
}
|
|
@@ -2763,7 +2762,7 @@ __export(file_grep_exports, {
|
|
|
2763
2762
|
import { execSync as execSync2 } from "child_process";
|
|
2764
2763
|
import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync as statSync2, existsSync as existsSync5 } from "fs";
|
|
2765
2764
|
import path6 from "path";
|
|
2766
|
-
import
|
|
2765
|
+
import crypto from "crypto";
|
|
2767
2766
|
function hasRipgrep() {
|
|
2768
2767
|
if (_hasRg === null) {
|
|
2769
2768
|
try {
|
|
@@ -2796,7 +2795,7 @@ async function grepProjectFiles(query, projectRoot, options) {
|
|
|
2796
2795
|
const chunkCtx = getChunkContext(hit.filePath, hit.lineNumber);
|
|
2797
2796
|
const prefix = chunkCtx ? `[file: ${hit.filePath}:${hit.lineNumber} in ${chunkCtx}]` : `[file: ${hit.filePath}:${hit.lineNumber}]`;
|
|
2798
2797
|
return {
|
|
2799
|
-
id:
|
|
2798
|
+
id: crypto.createHash("sha256").update(`${hit.filePath}:${hit.lineNumber}`).digest("hex").slice(0, 36),
|
|
2800
2799
|
agent_id: "project",
|
|
2801
2800
|
agent_role: "file",
|
|
2802
2801
|
session_id: "file-grep",
|
package/dist/hooks/stop.js
CHANGED
|
@@ -1488,7 +1488,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
|
|
|
1488
1488
|
import { existsSync as existsSync7 } from "fs";
|
|
1489
1489
|
import path9 from "path";
|
|
1490
1490
|
import os5 from "os";
|
|
1491
|
-
import crypto from "crypto";
|
|
1492
1491
|
function getKeyDir() {
|
|
1493
1492
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path9.join(os5.homedir(), ".exe-os");
|
|
1494
1493
|
}
|
|
@@ -2629,9 +2628,9 @@ process.stdin.on("end", () => {
|
|
|
2629
2628
|
"",
|
|
2630
2629
|
`Last response fragment: ${message.slice(0, 500)}`
|
|
2631
2630
|
].join("\n");
|
|
2632
|
-
const
|
|
2631
|
+
const crypto = await import("crypto");
|
|
2633
2632
|
await writeMemory2({
|
|
2634
|
-
id:
|
|
2633
|
+
id: crypto.randomUUID(),
|
|
2635
2634
|
agent_id: agent.agentId,
|
|
2636
2635
|
agent_role: agent.agentRole,
|
|
2637
2636
|
session_id: data.session_id,
|
|
@@ -1470,7 +1470,6 @@ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3
|
|
|
1470
1470
|
import { existsSync as existsSync7 } from "fs";
|
|
1471
1471
|
import path9 from "path";
|
|
1472
1472
|
import os5 from "os";
|
|
1473
|
-
import crypto from "crypto";
|
|
1474
1473
|
function getKeyDir() {
|
|
1475
1474
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path9.join(os5.homedir(), ".exe-os");
|
|
1476
1475
|
}
|
|
@@ -976,7 +976,6 @@ import { readFile, writeFile, unlink, mkdir, chmod } from "fs/promises";
|
|
|
976
976
|
import { existsSync } from "fs";
|
|
977
977
|
import path from "path";
|
|
978
978
|
import os from "os";
|
|
979
|
-
import crypto from "crypto";
|
|
980
979
|
function getKeyDir() {
|
|
981
980
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path.join(os.homedir(), ".exe-os");
|
|
982
981
|
}
|
|
@@ -1041,65 +1040,34 @@ async function deleteMasterKey() {
|
|
|
1041
1040
|
await unlink(keyPath);
|
|
1042
1041
|
}
|
|
1043
1042
|
}
|
|
1044
|
-
function
|
|
1045
|
-
if (key.length !== 32) {
|
|
1046
|
-
throw new Error(`Key must be 32 bytes, got ${key.length}`);
|
|
1047
|
-
}
|
|
1048
|
-
const hash = crypto.createHash("sha256").update(key).digest();
|
|
1049
|
-
const checksumByte = hash[0];
|
|
1050
|
-
let bits = "";
|
|
1051
|
-
for (const byte of key) {
|
|
1052
|
-
bits += byte.toString(2).padStart(8, "0");
|
|
1053
|
-
}
|
|
1054
|
-
bits += checksumByte.toString(2).padStart(8, "0");
|
|
1055
|
-
const words = [];
|
|
1056
|
-
let wordlist;
|
|
1043
|
+
async function loadBip39() {
|
|
1057
1044
|
try {
|
|
1058
|
-
|
|
1059
|
-
wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
|
|
1060
|
-
if (!wordlist) throw new Error("no wordlist");
|
|
1045
|
+
return await import("bip39");
|
|
1061
1046
|
} catch {
|
|
1062
|
-
throw new Error(
|
|
1047
|
+
throw new Error(
|
|
1048
|
+
"bip39 package not found. Run: npm install -g bip39\nOr reinstall exe-os: npm install -g @askexenow/exe-os"
|
|
1049
|
+
);
|
|
1063
1050
|
}
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1051
|
+
}
|
|
1052
|
+
async function exportMnemonic(key) {
|
|
1053
|
+
if (key.length !== 32) {
|
|
1054
|
+
throw new Error(`Key must be 32 bytes, got ${key.length}`);
|
|
1067
1055
|
}
|
|
1068
|
-
|
|
1056
|
+
const { entropyToMnemonic } = await loadBip39();
|
|
1057
|
+
return entropyToMnemonic(key.toString("hex"));
|
|
1069
1058
|
}
|
|
1070
|
-
function importMnemonic(mnemonic) {
|
|
1071
|
-
const
|
|
1059
|
+
async function importMnemonic(mnemonic) {
|
|
1060
|
+
const trimmed = mnemonic.trim();
|
|
1061
|
+
const words = trimmed.split(/\s+/);
|
|
1072
1062
|
if (words.length !== 24) {
|
|
1073
1063
|
throw new Error(`Expected 24 words, got ${words.length}`);
|
|
1074
1064
|
}
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
wordlist = bip39.wordlists?.english ?? bip39.default?.wordlists?.english;
|
|
1079
|
-
if (!wordlist) throw new Error("no wordlist");
|
|
1080
|
-
} catch {
|
|
1081
|
-
throw new Error("bip39 package required. Install with: npm install bip39");
|
|
1065
|
+
const { validateMnemonic, mnemonicToEntropy } = await loadBip39();
|
|
1066
|
+
if (!validateMnemonic(trimmed)) {
|
|
1067
|
+
throw new Error("Invalid mnemonic \u2014 check for typos or missing words");
|
|
1082
1068
|
}
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
const index = wordlist.indexOf(word.toLowerCase());
|
|
1086
|
-
if (index === -1) {
|
|
1087
|
-
throw new Error(`Invalid BIP39 word: "${word}"`);
|
|
1088
|
-
}
|
|
1089
|
-
bits += index.toString(2).padStart(11, "0");
|
|
1090
|
-
}
|
|
1091
|
-
const entropyBits = bits.slice(0, 256);
|
|
1092
|
-
const checksumBits = bits.slice(256, 264);
|
|
1093
|
-
const key = Buffer.alloc(32);
|
|
1094
|
-
for (let i = 0; i < 32; i++) {
|
|
1095
|
-
key[i] = parseInt(entropyBits.slice(i * 8, (i + 1) * 8), 2);
|
|
1096
|
-
}
|
|
1097
|
-
const hash = crypto.createHash("sha256").update(key).digest();
|
|
1098
|
-
const expectedChecksum = hash[0].toString(2).padStart(8, "0");
|
|
1099
|
-
if (checksumBits !== expectedChecksum) {
|
|
1100
|
-
throw new Error("Invalid mnemonic checksum");
|
|
1101
|
-
}
|
|
1102
|
-
return key;
|
|
1069
|
+
const entropy = mnemonicToEntropy(trimmed);
|
|
1070
|
+
return Buffer.from(entropy, "hex");
|
|
1103
1071
|
}
|
|
1104
1072
|
var SERVICE, ACCOUNT;
|
|
1105
1073
|
var init_keychain = __esm({
|
|
@@ -1836,7 +1804,7 @@ ${p.content}`).join("\n\n");
|
|
|
1836
1804
|
});
|
|
1837
1805
|
|
|
1838
1806
|
// src/lib/notifications.ts
|
|
1839
|
-
import
|
|
1807
|
+
import crypto from "crypto";
|
|
1840
1808
|
import path4 from "path";
|
|
1841
1809
|
import os3 from "os";
|
|
1842
1810
|
import {
|
|
@@ -1849,7 +1817,7 @@ import {
|
|
|
1849
1817
|
async function writeNotification(notification) {
|
|
1850
1818
|
try {
|
|
1851
1819
|
const client = getClient();
|
|
1852
|
-
const id =
|
|
1820
|
+
const id = crypto.randomUUID();
|
|
1853
1821
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1854
1822
|
await client.execute({
|
|
1855
1823
|
sql: `INSERT INTO notifications (id, agent_id, agent_role, event, project, summary, task_file, read, created_at)
|
|
@@ -3258,13 +3226,13 @@ __export(crypto_exports, {
|
|
|
3258
3226
|
initSyncCrypto: () => initSyncCrypto,
|
|
3259
3227
|
isSyncCryptoInitialized: () => isSyncCryptoInitialized
|
|
3260
3228
|
});
|
|
3261
|
-
import
|
|
3229
|
+
import crypto2 from "crypto";
|
|
3262
3230
|
function initSyncCrypto(masterKey) {
|
|
3263
3231
|
if (masterKey.length !== 32) {
|
|
3264
3232
|
throw new Error(`Master key must be 32 bytes, got ${masterKey.length}`);
|
|
3265
3233
|
}
|
|
3266
3234
|
_syncKey = Buffer.from(
|
|
3267
|
-
|
|
3235
|
+
crypto2.hkdfSync("sha256", masterKey, "", SYNC_HKDF_INFO, 32)
|
|
3268
3236
|
);
|
|
3269
3237
|
}
|
|
3270
3238
|
function isSyncCryptoInitialized() {
|
|
@@ -3278,8 +3246,8 @@ function requireSyncKey() {
|
|
|
3278
3246
|
}
|
|
3279
3247
|
function encryptSyncBlob(data) {
|
|
3280
3248
|
const key = requireSyncKey();
|
|
3281
|
-
const iv =
|
|
3282
|
-
const cipher =
|
|
3249
|
+
const iv = crypto2.randomBytes(IV_LENGTH);
|
|
3250
|
+
const cipher = crypto2.createCipheriv(ALGORITHM, key, iv);
|
|
3283
3251
|
const encrypted = Buffer.concat([cipher.update(data), cipher.final()]);
|
|
3284
3252
|
const tag = cipher.getAuthTag();
|
|
3285
3253
|
return Buffer.concat([iv, encrypted, tag]).toString("base64");
|
|
@@ -3293,7 +3261,7 @@ function decryptSyncBlob(ciphertext) {
|
|
|
3293
3261
|
const iv = combined.subarray(0, IV_LENGTH);
|
|
3294
3262
|
const tag = combined.subarray(combined.length - TAG_LENGTH);
|
|
3295
3263
|
const encrypted = combined.subarray(IV_LENGTH, combined.length - TAG_LENGTH);
|
|
3296
|
-
const decipher =
|
|
3264
|
+
const decipher = crypto2.createDecipheriv(ALGORITHM, key, iv);
|
|
3297
3265
|
decipher.setAuthTag(tag);
|
|
3298
3266
|
return Buffer.concat([decipher.update(encrypted), decipher.final()]);
|
|
3299
3267
|
}
|
|
@@ -3358,7 +3326,7 @@ __export(cloud_sync_exports, {
|
|
|
3358
3326
|
recordRosterDeletion: () => recordRosterDeletion
|
|
3359
3327
|
});
|
|
3360
3328
|
import { readFileSync as readFileSync9, writeFileSync as writeFileSync5, existsSync as existsSync12, readdirSync as readdirSync4, mkdirSync as mkdirSync6, appendFileSync as appendFileSync2, unlinkSync as unlinkSync4, openSync as openSync2, closeSync as closeSync2 } from "fs";
|
|
3361
|
-
import
|
|
3329
|
+
import crypto3 from "crypto";
|
|
3362
3330
|
import path13 from "path";
|
|
3363
3331
|
import { homedir } from "os";
|
|
3364
3332
|
function sqlSafe(v) {
|
|
@@ -3741,7 +3709,7 @@ function buildRosterBlob(paths) {
|
|
|
3741
3709
|
}
|
|
3742
3710
|
const deletedNames = consumeRosterDeletions();
|
|
3743
3711
|
const content = JSON.stringify({ roster, identities, config, deletedNames });
|
|
3744
|
-
const hash =
|
|
3712
|
+
const hash = crypto3.createHash("sha256").update(content).digest("hex").slice(0, 16);
|
|
3745
3713
|
return { roster, identities, config, deletedNames, version: hash };
|
|
3746
3714
|
}
|
|
3747
3715
|
async function cloudPushRoster(config) {
|
|
@@ -4601,7 +4569,7 @@ function vectorToBlob(vector) {
|
|
|
4601
4569
|
init_database();
|
|
4602
4570
|
init_notifications();
|
|
4603
4571
|
init_task_scope();
|
|
4604
|
-
import
|
|
4572
|
+
import crypto4 from "crypto";
|
|
4605
4573
|
import { execSync as execSync4 } from "child_process";
|
|
4606
4574
|
import { existsSync as existsSync13, mkdirSync as mkdirSync7, openSync as openSync3, closeSync as closeSync3 } from "fs";
|
|
4607
4575
|
import path14 from "path";
|
|
@@ -4675,7 +4643,7 @@ async function main() {
|
|
|
4675
4643
|
process.exit(0);
|
|
4676
4644
|
}
|
|
4677
4645
|
await writeMemory({
|
|
4678
|
-
id:
|
|
4646
|
+
id: crypto4.randomUUID(),
|
|
4679
4647
|
agent_id: agentId,
|
|
4680
4648
|
agent_role: agentRole,
|
|
4681
4649
|
session_id: `auto-summary-${Date.now()}`,
|
package/dist/index.js
CHANGED
|
@@ -4219,7 +4219,6 @@ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4
|
|
|
4219
4219
|
import { existsSync as existsSync11 } from "fs";
|
|
4220
4220
|
import path15 from "path";
|
|
4221
4221
|
import os7 from "os";
|
|
4222
|
-
import crypto6 from "crypto";
|
|
4223
4222
|
function getKeyDir() {
|
|
4224
4223
|
return process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? path15.join(os7.homedir(), ".exe-os");
|
|
4225
4224
|
}
|
|
@@ -5379,7 +5378,7 @@ __export(error_detector_exports, {
|
|
|
5379
5378
|
errorFingerprint: () => errorFingerprint,
|
|
5380
5379
|
isExeOsError: () => isExeOsError
|
|
5381
5380
|
});
|
|
5382
|
-
import
|
|
5381
|
+
import crypto6 from "crypto";
|
|
5383
5382
|
function isRealStderr(stderr) {
|
|
5384
5383
|
const lines = stderr.trim().split("\n");
|
|
5385
5384
|
const meaningful = lines.filter(
|
|
@@ -5450,7 +5449,7 @@ function classifyError(errorText) {
|
|
|
5450
5449
|
}
|
|
5451
5450
|
function errorFingerprint(toolName, errorText) {
|
|
5452
5451
|
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);
|
|
5453
|
-
return
|
|
5452
|
+
return crypto6.createHash("sha256").update(`${toolName}:${normalized}`).digest("hex").slice(0, 16);
|
|
5454
5453
|
}
|
|
5455
5454
|
var ERROR_PATTERNS, FILE_CONTENT_TOOLS, STDERR_IGNORE_PATTERNS, USER_ERROR_PATTERNS, SYSTEM_BUG_PATTERNS;
|
|
5456
5455
|
var init_error_detector = __esm({
|
|
@@ -6399,10 +6398,10 @@ __export(messaging_exports, {
|
|
|
6399
6398
|
sendMessage: () => sendMessage,
|
|
6400
6399
|
setWsClientSend: () => setWsClientSend
|
|
6401
6400
|
});
|
|
6402
|
-
import
|
|
6401
|
+
import crypto8 from "crypto";
|
|
6403
6402
|
function generateUlid() {
|
|
6404
6403
|
const timestamp = Date.now().toString(36).padStart(10, "0");
|
|
6405
|
-
const random =
|
|
6404
|
+
const random = crypto8.randomBytes(10).toString("hex").slice(0, 16);
|
|
6406
6405
|
return (timestamp + random).toUpperCase();
|
|
6407
6406
|
}
|
|
6408
6407
|
function rowToMessage(row) {
|
|
@@ -9088,11 +9087,11 @@ init_crm_bridge();
|
|
|
9088
9087
|
|
|
9089
9088
|
// src/lib/pipeline-router.ts
|
|
9090
9089
|
init_database();
|
|
9091
|
-
import
|
|
9090
|
+
import crypto7 from "crypto";
|
|
9092
9091
|
async function sinkConversationStore(msg, agentResponse, agentName) {
|
|
9093
9092
|
try {
|
|
9094
9093
|
const client = getClient();
|
|
9095
|
-
const id =
|
|
9094
|
+
const id = crypto7.randomUUID();
|
|
9096
9095
|
const mediaJson = msg.media ? JSON.stringify(msg.media) : null;
|
|
9097
9096
|
await client.execute({
|
|
9098
9097
|
sql: `INSERT INTO conversations
|
|
@@ -9142,7 +9141,7 @@ async function sinkMemory(msg, agentResponse, agentName) {
|
|
|
9142
9141
|
].filter(Boolean).join("\n");
|
|
9143
9142
|
const vector = await embed2(rawText);
|
|
9144
9143
|
await writeMemory2({
|
|
9145
|
-
id:
|
|
9144
|
+
id: crypto7.randomUUID(),
|
|
9146
9145
|
agent_id: agentName ?? "gateway",
|
|
9147
9146
|
agent_role: "gateway",
|
|
9148
9147
|
session_id: `gateway-${msg.platform}`,
|