@askexenow/exe-os 0.9.7 → 0.9.9
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 +953 -105
- package/dist/bin/backfill-responses.js +952 -104
- package/dist/bin/backfill-vectors.js +956 -108
- package/dist/bin/cleanup-stale-review-tasks.js +802 -58
- package/dist/bin/cli.js +2292 -1070
- package/dist/bin/exe-agent-config.js +157 -101
- package/dist/bin/exe-agent.js +55 -29
- package/dist/bin/exe-assign.js +940 -92
- package/dist/bin/exe-boot.js +1424 -442
- package/dist/bin/exe-call.js +240 -141
- package/dist/bin/exe-cloud.js +198 -70
- package/dist/bin/exe-dispatch.js +951 -192
- package/dist/bin/exe-doctor.js +791 -51
- package/dist/bin/exe-export-behaviors.js +790 -42
- package/dist/bin/exe-forget.js +771 -31
- package/dist/bin/exe-gateway.js +1592 -521
- package/dist/bin/exe-heartbeat.js +850 -109
- package/dist/bin/exe-kill.js +783 -35
- package/dist/bin/exe-launch-agent.js +1030 -107
- package/dist/bin/exe-link.js +916 -110
- package/dist/bin/exe-new-employee.js +526 -217
- package/dist/bin/exe-pending-messages.js +1046 -62
- package/dist/bin/exe-pending-notifications.js +1318 -111
- package/dist/bin/exe-pending-reviews.js +1040 -72
- package/dist/bin/exe-rename.js +772 -59
- package/dist/bin/exe-review.js +772 -32
- package/dist/bin/exe-search.js +982 -128
- package/dist/bin/exe-session-cleanup.js +1180 -306
- package/dist/bin/exe-settings.js +185 -105
- package/dist/bin/exe-start-codex.js +886 -132
- package/dist/bin/exe-start-opencode.js +873 -119
- package/dist/bin/exe-status.js +803 -59
- package/dist/bin/exe-team.js +772 -32
- package/dist/bin/git-sweep.js +1046 -223
- package/dist/bin/graph-backfill.js +779 -31
- package/dist/bin/graph-export.js +785 -37
- package/dist/bin/install.js +632 -200
- package/dist/bin/scan-tasks.js +1055 -232
- package/dist/bin/setup.js +1419 -320
- package/dist/bin/shard-migrate.js +783 -35
- package/dist/bin/update.js +138 -49
- package/dist/bin/wiki-sync.js +782 -34
- package/dist/gateway/index.js +1444 -449
- package/dist/hooks/bug-report-worker.js +1141 -269
- package/dist/hooks/codex-stop-task-finalizer.js +4678 -0
- package/dist/hooks/commit-complete.js +1044 -221
- package/dist/hooks/error-recall.js +989 -135
- package/dist/hooks/exe-heartbeat-hook.js +99 -75
- package/dist/hooks/ingest-worker.js +4176 -3226
- package/dist/hooks/ingest.js +920 -168
- package/dist/hooks/instructions-loaded.js +874 -70
- package/dist/hooks/notification.js +860 -56
- package/dist/hooks/post-compact.js +881 -73
- package/dist/hooks/pre-compact.js +1050 -227
- package/dist/hooks/pre-tool-use.js +1084 -159
- package/dist/hooks/prompt-ingest-worker.js +1089 -164
- package/dist/hooks/prompt-submit.js +1469 -515
- package/dist/hooks/response-ingest-worker.js +1104 -179
- package/dist/hooks/session-end.js +1085 -251
- package/dist/hooks/session-start.js +1241 -231
- package/dist/hooks/stop.js +935 -109
- package/dist/hooks/subagent-stop.js +881 -73
- package/dist/hooks/summary-worker.js +1323 -307
- package/dist/index.js +1449 -452
- package/dist/lib/agent-config.js +28 -6
- package/dist/lib/cloud-sync.js +909 -115
- package/dist/lib/config.js +30 -10
- package/dist/lib/consolidation.js +42 -9
- package/dist/lib/database.js +739 -33
- package/dist/lib/db-daemon-client.js +73 -19
- package/dist/lib/db.js +2359 -0
- package/dist/lib/device-registry.js +760 -47
- package/dist/lib/embedder.js +201 -73
- package/dist/lib/employee-templates.js +30 -4
- package/dist/lib/employees.js +290 -86
- package/dist/lib/exe-daemon-client.js +187 -83
- package/dist/lib/exe-daemon.js +1696 -616
- package/dist/lib/hybrid-search.js +982 -128
- package/dist/lib/identity.js +43 -13
- package/dist/lib/license.js +133 -48
- package/dist/lib/messaging.js +167 -80
- package/dist/lib/reminders.js +35 -5
- package/dist/lib/schedules.js +772 -32
- package/dist/lib/skill-learning.js +54 -7
- package/dist/lib/store.js +779 -31
- package/dist/lib/task-router.js +94 -73
- package/dist/lib/tasks.js +298 -225
- package/dist/lib/tmux-routing.js +246 -172
- package/dist/lib/token-spend.js +52 -14
- package/dist/mcp/server.js +2893 -850
- package/dist/mcp/tools/complete-reminder.js +35 -5
- package/dist/mcp/tools/create-reminder.js +35 -5
- package/dist/mcp/tools/create-task.js +507 -323
- package/dist/mcp/tools/deactivate-behavior.js +40 -10
- package/dist/mcp/tools/list-reminders.js +35 -5
- package/dist/mcp/tools/list-tasks.js +277 -104
- package/dist/mcp/tools/send-message.js +129 -56
- package/dist/mcp/tools/update-task.js +1864 -188
- package/dist/runtime/index.js +1083 -259
- package/dist/tui/App.js +1501 -434
- package/package.json +3 -2
|
@@ -3,9 +3,34 @@ var __esm = (fn, res) => function __init() {
|
|
|
3
3
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
4
4
|
};
|
|
5
5
|
|
|
6
|
+
// src/lib/secure-files.ts
|
|
7
|
+
import { chmodSync, existsSync, mkdirSync } from "fs";
|
|
8
|
+
import { chmod, mkdir } from "fs/promises";
|
|
9
|
+
async function ensurePrivateDir(dirPath) {
|
|
10
|
+
await mkdir(dirPath, { recursive: true, mode: PRIVATE_DIR_MODE });
|
|
11
|
+
try {
|
|
12
|
+
await chmod(dirPath, PRIVATE_DIR_MODE);
|
|
13
|
+
} catch {
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
async function enforcePrivateFile(filePath) {
|
|
17
|
+
try {
|
|
18
|
+
await chmod(filePath, PRIVATE_FILE_MODE);
|
|
19
|
+
} catch {
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
var PRIVATE_DIR_MODE, PRIVATE_FILE_MODE;
|
|
23
|
+
var init_secure_files = __esm({
|
|
24
|
+
"src/lib/secure-files.ts"() {
|
|
25
|
+
"use strict";
|
|
26
|
+
PRIVATE_DIR_MODE = 448;
|
|
27
|
+
PRIVATE_FILE_MODE = 384;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
6
31
|
// src/lib/config.ts
|
|
7
|
-
import { readFile, writeFile
|
|
8
|
-
import { readFileSync, existsSync, renameSync } from "fs";
|
|
32
|
+
import { readFile, writeFile } from "fs/promises";
|
|
33
|
+
import { readFileSync, existsSync as existsSync2, renameSync } from "fs";
|
|
9
34
|
import path from "path";
|
|
10
35
|
import os from "os";
|
|
11
36
|
function resolveDataDir() {
|
|
@@ -13,7 +38,7 @@ function resolveDataDir() {
|
|
|
13
38
|
if (process.env.EXE_MEM_DIR) return process.env.EXE_MEM_DIR;
|
|
14
39
|
const newDir = path.join(os.homedir(), ".exe-os");
|
|
15
40
|
const legacyDir = path.join(os.homedir(), ".exe-mem");
|
|
16
|
-
if (!
|
|
41
|
+
if (!existsSync2(newDir) && existsSync2(legacyDir)) {
|
|
17
42
|
try {
|
|
18
43
|
renameSync(legacyDir, newDir);
|
|
19
44
|
process.stderr.write(`[exe-os] Migrated data directory: ~/.exe-mem \u2192 ~/.exe-os
|
|
@@ -76,9 +101,9 @@ function normalizeAutoUpdate(raw) {
|
|
|
76
101
|
}
|
|
77
102
|
async function loadConfig() {
|
|
78
103
|
const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
|
|
79
|
-
await
|
|
104
|
+
await ensurePrivateDir(dir);
|
|
80
105
|
const configPath = path.join(dir, "config.json");
|
|
81
|
-
if (!
|
|
106
|
+
if (!existsSync2(configPath)) {
|
|
82
107
|
return { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db") };
|
|
83
108
|
}
|
|
84
109
|
const raw = await readFile(configPath, "utf-8");
|
|
@@ -91,6 +116,7 @@ async function loadConfig() {
|
|
|
91
116
|
`);
|
|
92
117
|
try {
|
|
93
118
|
await writeFile(configPath, JSON.stringify(migratedCfg, null, 2) + "\n");
|
|
119
|
+
await enforcePrivateFile(configPath);
|
|
94
120
|
} catch {
|
|
95
121
|
}
|
|
96
122
|
}
|
|
@@ -110,6 +136,7 @@ var EXE_AI_DIR, DB_PATH, MODELS_DIR, CONFIG_PATH, LEGACY_LANCE_PATH, CURRENT_CON
|
|
|
110
136
|
var init_config = __esm({
|
|
111
137
|
"src/lib/config.ts"() {
|
|
112
138
|
"use strict";
|
|
139
|
+
init_secure_files();
|
|
113
140
|
EXE_AI_DIR = resolveDataDir();
|
|
114
141
|
DB_PATH = path.join(EXE_AI_DIR, "memories.db");
|
|
115
142
|
MODELS_DIR = path.join(EXE_AI_DIR, "models");
|
|
@@ -195,19 +222,39 @@ import { createClient } from "@libsql/client";
|
|
|
195
222
|
// src/lib/employees.ts
|
|
196
223
|
init_config();
|
|
197
224
|
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
198
|
-
import { existsSync as
|
|
225
|
+
import { existsSync as existsSync3, symlinkSync, readlinkSync, readFileSync as readFileSync2, renameSync as renameSync2, unlinkSync, writeFileSync } from "fs";
|
|
199
226
|
import { execSync } from "child_process";
|
|
200
227
|
import path2 from "path";
|
|
201
228
|
import os2 from "os";
|
|
202
229
|
var EMPLOYEES_PATH = path2.join(EXE_AI_DIR, "exe-employees.json");
|
|
230
|
+
var IDENTITY_DIR = path2.join(EXE_AI_DIR, "identity");
|
|
231
|
+
|
|
232
|
+
// src/lib/database-adapter.ts
|
|
233
|
+
import os3 from "os";
|
|
234
|
+
import path3 from "path";
|
|
235
|
+
import { createRequire } from "module";
|
|
236
|
+
import { pathToFileURL } from "url";
|
|
237
|
+
var BOOLEAN_COLUMNS_BY_TABLE = {
|
|
238
|
+
memories: /* @__PURE__ */ new Set(["has_error", "draft"]),
|
|
239
|
+
behaviors: /* @__PURE__ */ new Set(["active"]),
|
|
240
|
+
notifications: /* @__PURE__ */ new Set(["read"]),
|
|
241
|
+
users: /* @__PURE__ */ new Set(["has_personal_memory"])
|
|
242
|
+
};
|
|
243
|
+
var BOOLEAN_COLUMN_NAMES = new Set(
|
|
244
|
+
Object.values(BOOLEAN_COLUMNS_BY_TABLE).flatMap((cols) => [...cols])
|
|
245
|
+
);
|
|
203
246
|
|
|
204
247
|
// src/lib/database.ts
|
|
205
248
|
var _resilientClient = null;
|
|
206
249
|
var _daemonClient = null;
|
|
250
|
+
var _adapterClient = null;
|
|
207
251
|
function getClient() {
|
|
208
|
-
if (!
|
|
252
|
+
if (!_adapterClient) {
|
|
209
253
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
210
254
|
}
|
|
255
|
+
if (process.env.DATABASE_URL) {
|
|
256
|
+
return _adapterClient;
|
|
257
|
+
}
|
|
211
258
|
if (process.env.EXE_IS_DAEMON === "1") {
|
|
212
259
|
return _resilientClient;
|
|
213
260
|
}
|