@askexenow/exe-os 0.8.1 → 0.8.3
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/package.json +1 -1
- package/dist/bin/backfill-responses.js +0 -2064
- package/dist/bin/backfill-vectors.js +0 -1771
- package/dist/bin/cleanup-stale-review-tasks.js +0 -1468
- package/dist/bin/cli.js +0 -21371
- package/dist/bin/exe-agent.js +0 -2016
- package/dist/bin/exe-assign.js +0 -2176
- package/dist/bin/exe-boot.js +0 -6332
- package/dist/bin/exe-call.js +0 -341
- package/dist/bin/exe-cloud.js +0 -861
- package/dist/bin/exe-dispatch.js +0 -1159
- package/dist/bin/exe-doctor.js +0 -1786
- package/dist/bin/exe-export-behaviors.js +0 -1637
- package/dist/bin/exe-forget.js +0 -1784
- package/dist/bin/exe-gateway.js +0 -8140
- package/dist/bin/exe-healthcheck.js +0 -207
- package/dist/bin/exe-heartbeat.js +0 -1778
- package/dist/bin/exe-kill.js +0 -1622
- package/dist/bin/exe-launch-agent.js +0 -1847
- package/dist/bin/exe-link.js +0 -192
- package/dist/bin/exe-new-employee.js +0 -1384
- package/dist/bin/exe-pending-messages.js +0 -1576
- package/dist/bin/exe-pending-notifications.js +0 -1450
- package/dist/bin/exe-pending-reviews.js +0 -1598
- package/dist/bin/exe-repo-drift.js +0 -95
- package/dist/bin/exe-review.js +0 -1742
- package/dist/bin/exe-search.js +0 -3116
- package/dist/bin/exe-session-cleanup.js +0 -3360
- package/dist/bin/exe-settings.js +0 -365
- package/dist/bin/exe-status.js +0 -1661
- package/dist/bin/exe-team.js +0 -1453
- package/dist/bin/git-sweep.js +0 -2441
- package/dist/bin/graph-backfill.js +0 -2111
- package/dist/bin/graph-export.js +0 -1747
- package/dist/bin/install.js +0 -661
- package/dist/bin/list-providers.js +0 -140
- package/dist/bin/scan-tasks.js +0 -2039
- package/dist/bin/setup.js +0 -2717
- package/dist/bin/shard-migrate.js +0 -1637
- package/dist/bin/update.js +0 -98
- package/dist/bin/wiki-sync.js +0 -1657
- package/dist/gateway/index.js +0 -9256
- package/dist/hooks/bug-report-worker.js +0 -2903
- package/dist/hooks/commit-complete.js +0 -2364
- package/dist/hooks/error-recall.js +0 -3327
- package/dist/hooks/exe-heartbeat-hook.js +0 -237
- package/dist/hooks/ingest-worker.js +0 -5065
- package/dist/hooks/ingest.js +0 -695
- package/dist/hooks/instructions-loaded.js +0 -2069
- package/dist/hooks/notification.js +0 -1915
- package/dist/hooks/post-compact.js +0 -1940
- package/dist/hooks/pre-compact.js +0 -1935
- package/dist/hooks/pre-tool-use.js +0 -2380
- package/dist/hooks/prompt-ingest-worker.js +0 -2291
- package/dist/hooks/prompt-submit.js +0 -5189
- package/dist/hooks/response-ingest-worker.js +0 -2431
- package/dist/hooks/session-end.js +0 -2196
- package/dist/hooks/session-start.js +0 -3259
- package/dist/hooks/stop.js +0 -2025
- package/dist/hooks/subagent-stop.js +0 -1915
- package/dist/hooks/summary-worker.js +0 -2931
- package/dist/index.js +0 -12327
- package/dist/lib/cloud-sync.js +0 -500
- package/dist/lib/config.js +0 -235
- package/dist/lib/consolidation.js +0 -481
- package/dist/lib/crypto.js +0 -51
- package/dist/lib/database.js +0 -834
- package/dist/lib/device-registry.js +0 -1009
- package/dist/lib/embedder.js +0 -645
- package/dist/lib/employee-templates.js +0 -570
- package/dist/lib/employees.js +0 -182
- package/dist/lib/error-detector.js +0 -156
- package/dist/lib/exe-daemon-client.js +0 -456
- package/dist/lib/exe-daemon.js +0 -8699
- package/dist/lib/file-grep.js +0 -215
- package/dist/lib/hybrid-search.js +0 -3064
- package/dist/lib/identity-templates.js +0 -441
- package/dist/lib/identity.js +0 -228
- package/dist/lib/keychain.js +0 -145
- package/dist/lib/license.js +0 -382
- package/dist/lib/messaging.js +0 -1389
- package/dist/lib/reminders.js +0 -63
- package/dist/lib/schedules.js +0 -1525
- package/dist/lib/session-registry.js +0 -52
- package/dist/lib/skill-learning.js +0 -488
- package/dist/lib/status-brief.js +0 -240
- package/dist/lib/store.js +0 -1740
- package/dist/lib/task-router.js +0 -128
- package/dist/lib/tasks.js +0 -2585
- package/dist/lib/tmux-routing.js +0 -2969
- package/dist/lib/tmux-status.js +0 -261
- package/dist/lib/tmux-transport.js +0 -83
- package/dist/lib/transport.js +0 -128
- package/dist/lib/ws-auth.js +0 -19
- package/dist/lib/ws-client.js +0 -160
- package/dist/mcp/server.js +0 -10812
- package/dist/mcp/tools/complete-reminder.js +0 -67
- package/dist/mcp/tools/create-reminder.js +0 -52
- package/dist/mcp/tools/create-task.js +0 -1903
- package/dist/mcp/tools/deactivate-behavior.js +0 -268
- package/dist/mcp/tools/list-reminders.js +0 -62
- package/dist/mcp/tools/list-tasks.js +0 -491
- package/dist/mcp/tools/send-message.js +0 -1395
- package/dist/mcp/tools/update-task.js +0 -1807
- package/dist/runtime/index.js +0 -7201
- package/dist/tui/App.js +0 -17874
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
// src/adapters/claude/hooks/exe-heartbeat-hook.ts
|
|
2
|
-
import { execFileSync } from "child_process";
|
|
3
|
-
import path3 from "path";
|
|
4
|
-
import { fileURLToPath } from "url";
|
|
5
|
-
|
|
6
|
-
// src/adapters/claude/active-agent.ts
|
|
7
|
-
import { readFileSync as readFileSync2, writeFileSync, mkdirSync, unlinkSync, readdirSync } from "fs";
|
|
8
|
-
import { execSync as execSync2 } from "child_process";
|
|
9
|
-
import path2 from "path";
|
|
10
|
-
|
|
11
|
-
// src/lib/config.ts
|
|
12
|
-
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
13
|
-
import { readFileSync, existsSync, renameSync } from "fs";
|
|
14
|
-
import path from "path";
|
|
15
|
-
import os from "os";
|
|
16
|
-
function resolveDataDir() {
|
|
17
|
-
if (process.env.EXE_OS_DIR) return process.env.EXE_OS_DIR;
|
|
18
|
-
if (process.env.EXE_MEM_DIR) return process.env.EXE_MEM_DIR;
|
|
19
|
-
const newDir = path.join(os.homedir(), ".exe-os");
|
|
20
|
-
const legacyDir = path.join(os.homedir(), ".exe-mem");
|
|
21
|
-
if (!existsSync(newDir) && existsSync(legacyDir)) {
|
|
22
|
-
try {
|
|
23
|
-
renameSync(legacyDir, newDir);
|
|
24
|
-
process.stderr.write(`[exe-os] Migrated data directory: ~/.exe-mem \u2192 ~/.exe-os
|
|
25
|
-
`);
|
|
26
|
-
} catch {
|
|
27
|
-
return legacyDir;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return newDir;
|
|
31
|
-
}
|
|
32
|
-
var EXE_AI_DIR = resolveDataDir();
|
|
33
|
-
var DB_PATH = path.join(EXE_AI_DIR, "memories.db");
|
|
34
|
-
var MODELS_DIR = path.join(EXE_AI_DIR, "models");
|
|
35
|
-
var CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
|
|
36
|
-
var LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
|
|
37
|
-
var CURRENT_CONFIG_VERSION = 1;
|
|
38
|
-
var DEFAULT_CONFIG = {
|
|
39
|
-
config_version: CURRENT_CONFIG_VERSION,
|
|
40
|
-
dbPath: DB_PATH,
|
|
41
|
-
modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
|
|
42
|
-
embeddingDim: 1024,
|
|
43
|
-
batchSize: 20,
|
|
44
|
-
flushIntervalMs: 1e4,
|
|
45
|
-
autoIngestion: true,
|
|
46
|
-
autoRetrieval: true,
|
|
47
|
-
searchMode: "hybrid",
|
|
48
|
-
hookSearchMode: "hybrid",
|
|
49
|
-
fileGrepEnabled: true,
|
|
50
|
-
splashEffect: true,
|
|
51
|
-
consolidationEnabled: true,
|
|
52
|
-
consolidationIntervalMs: 6 * 60 * 60 * 1e3,
|
|
53
|
-
consolidationModel: "claude-haiku-4-5-20251001",
|
|
54
|
-
consolidationMaxCallsPerRun: 20,
|
|
55
|
-
selfQueryRouter: true,
|
|
56
|
-
selfQueryModel: "claude-haiku-4-5-20251001",
|
|
57
|
-
rerankerEnabled: true,
|
|
58
|
-
scalingRoadmap: {
|
|
59
|
-
rerankerAutoTrigger: {
|
|
60
|
-
enabled: true,
|
|
61
|
-
broadQueryMinCardinality: 5e4,
|
|
62
|
-
fetchTopK: 150,
|
|
63
|
-
returnTopK: 5
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
graphRagEnabled: true,
|
|
67
|
-
wikiEnabled: false,
|
|
68
|
-
wikiUrl: "",
|
|
69
|
-
wikiApiKey: "",
|
|
70
|
-
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
71
|
-
wikiWorkspaceMapping: {
|
|
72
|
-
exe: "Executive",
|
|
73
|
-
yoshi: "Engineering",
|
|
74
|
-
mari: "Marketing",
|
|
75
|
-
tom: "Engineering",
|
|
76
|
-
sasha: "Production"
|
|
77
|
-
},
|
|
78
|
-
wikiAutoUpdate: true,
|
|
79
|
-
wikiAutoUpdateThreshold: 0.5,
|
|
80
|
-
wikiAutoUpdateCreateNew: true,
|
|
81
|
-
skillLearning: true,
|
|
82
|
-
skillThreshold: 3,
|
|
83
|
-
skillModel: "claude-haiku-4-5-20251001",
|
|
84
|
-
exeHeartbeat: {
|
|
85
|
-
enabled: true,
|
|
86
|
-
intervalSeconds: 60,
|
|
87
|
-
staleInProgressThresholdHours: 2
|
|
88
|
-
},
|
|
89
|
-
sessionLifecycle: {
|
|
90
|
-
idleKillEnabled: true,
|
|
91
|
-
idleKillTicksRequired: 3,
|
|
92
|
-
idleKillIntercomAckWindowMs: 1e4,
|
|
93
|
-
maxAutoInstances: 10
|
|
94
|
-
},
|
|
95
|
-
autoUpdate: {
|
|
96
|
-
checkOnBoot: true,
|
|
97
|
-
autoInstall: false,
|
|
98
|
-
checkIntervalMs: 24 * 60 * 60 * 1e3
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// src/lib/session-key.ts
|
|
103
|
-
import { execSync } from "child_process";
|
|
104
|
-
var _cached = null;
|
|
105
|
-
function getSessionKey() {
|
|
106
|
-
if (_cached) return _cached;
|
|
107
|
-
let pid = process.ppid;
|
|
108
|
-
for (let i = 0; i < 10; i++) {
|
|
109
|
-
try {
|
|
110
|
-
const info = execSync(`ps -p ${pid} -o ppid=,comm=`, {
|
|
111
|
-
encoding: "utf8",
|
|
112
|
-
timeout: 2e3
|
|
113
|
-
}).trim();
|
|
114
|
-
const match = info.match(/^\s*(\d+)\s+(.+)$/);
|
|
115
|
-
if (!match) break;
|
|
116
|
-
const [, ppid, cmd] = match;
|
|
117
|
-
if (cmd === "claude" || cmd.endsWith("/claude")) {
|
|
118
|
-
_cached = String(pid);
|
|
119
|
-
return _cached;
|
|
120
|
-
}
|
|
121
|
-
pid = parseInt(ppid, 10);
|
|
122
|
-
if (pid <= 1) break;
|
|
123
|
-
} catch {
|
|
124
|
-
break;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
_cached = process.env.CLAUDE_CODE_SSE_PORT ?? String(process.ppid);
|
|
128
|
-
return _cached;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/adapters/claude/active-agent.ts
|
|
132
|
-
var CACHE_DIR = path2.join(EXE_AI_DIR, "session-cache");
|
|
133
|
-
var STALE_MS = 24 * 60 * 60 * 1e3;
|
|
134
|
-
function getMarkerPath() {
|
|
135
|
-
return path2.join(CACHE_DIR, `active-agent-${getSessionKey()}.json`);
|
|
136
|
-
}
|
|
137
|
-
function getActiveAgent() {
|
|
138
|
-
try {
|
|
139
|
-
const markerPath = getMarkerPath();
|
|
140
|
-
const raw = readFileSync2(markerPath, "utf8");
|
|
141
|
-
const data = JSON.parse(raw);
|
|
142
|
-
if (data.agentId) {
|
|
143
|
-
if (data.startedAt) {
|
|
144
|
-
const age = Date.now() - new Date(data.startedAt).getTime();
|
|
145
|
-
if (age > STALE_MS) {
|
|
146
|
-
try {
|
|
147
|
-
unlinkSync(markerPath);
|
|
148
|
-
} catch {
|
|
149
|
-
}
|
|
150
|
-
} else {
|
|
151
|
-
return {
|
|
152
|
-
agentId: data.agentId,
|
|
153
|
-
agentRole: data.agentRole || "employee"
|
|
154
|
-
};
|
|
155
|
-
}
|
|
156
|
-
} else {
|
|
157
|
-
return {
|
|
158
|
-
agentId: data.agentId,
|
|
159
|
-
agentRole: data.agentRole || "employee"
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
} catch {
|
|
164
|
-
}
|
|
165
|
-
try {
|
|
166
|
-
const sessionName = execSync2(
|
|
167
|
-
"tmux display-message -p '#{session_name}' 2>/dev/null",
|
|
168
|
-
{ encoding: "utf8", timeout: 2e3 }
|
|
169
|
-
).trim();
|
|
170
|
-
const empMatch = sessionName.match(/^(\w+)-exe\d+$/);
|
|
171
|
-
if (empMatch && empMatch[1] !== "exe") {
|
|
172
|
-
return { agentId: empMatch[1], agentRole: "employee" };
|
|
173
|
-
}
|
|
174
|
-
if (/^exe\d+$/.test(sessionName)) {
|
|
175
|
-
return { agentId: "exe", agentRole: "COO" };
|
|
176
|
-
}
|
|
177
|
-
} catch {
|
|
178
|
-
}
|
|
179
|
-
return {
|
|
180
|
-
agentId: process.env.AGENT_ID || "default",
|
|
181
|
-
agentRole: process.env.AGENT_ROLE || "employee"
|
|
182
|
-
};
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// src/adapters/claude/hooks/exe-heartbeat-hook.ts
|
|
186
|
-
var HOOK_TIMEOUT_MS = 5e3;
|
|
187
|
-
var CLI_TIMEOUT_MS = 4e3;
|
|
188
|
-
var EXE_AGENT_ID = "exe";
|
|
189
|
-
var watchdog = setTimeout(() => process.exit(0), HOOK_TIMEOUT_MS);
|
|
190
|
-
watchdog.unref();
|
|
191
|
-
var input = "";
|
|
192
|
-
process.stdin.setEncoding("utf8");
|
|
193
|
-
process.stdin.on("data", (chunk) => {
|
|
194
|
-
input += chunk;
|
|
195
|
-
});
|
|
196
|
-
process.stdin.on("end", () => {
|
|
197
|
-
void input;
|
|
198
|
-
try {
|
|
199
|
-
const agent = getActiveAgent();
|
|
200
|
-
if (agent.agentId !== EXE_AGENT_ID) {
|
|
201
|
-
cleanExit();
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
const cliPath = path3.resolve(
|
|
205
|
-
path3.dirname(fileURLToPath(import.meta.url)),
|
|
206
|
-
"..",
|
|
207
|
-
"bin",
|
|
208
|
-
"exe-heartbeat.js"
|
|
209
|
-
);
|
|
210
|
-
let output = "";
|
|
211
|
-
try {
|
|
212
|
-
output = execFileSync(process.execPath, [cliPath], {
|
|
213
|
-
encoding: "utf8",
|
|
214
|
-
timeout: CLI_TIMEOUT_MS
|
|
215
|
-
});
|
|
216
|
-
} catch {
|
|
217
|
-
cleanExit();
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if (output.trim().length === 0) {
|
|
221
|
-
cleanExit();
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
process.stdout.write(JSON.stringify({
|
|
225
|
-
hookSpecificOutput: {
|
|
226
|
-
hookEventName: "UserPromptSubmit",
|
|
227
|
-
additionalContext: output
|
|
228
|
-
}
|
|
229
|
-
}));
|
|
230
|
-
} catch {
|
|
231
|
-
}
|
|
232
|
-
cleanExit();
|
|
233
|
-
});
|
|
234
|
-
function cleanExit() {
|
|
235
|
-
clearTimeout(watchdog);
|
|
236
|
-
process.exit(0);
|
|
237
|
-
}
|