@askexenow/exe-os 0.8.0
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/LICENSE +21 -0
- package/README.md +139 -0
- package/dist/bin/backfill-responses.js +1912 -0
- package/dist/bin/backfill-vectors.js +1642 -0
- package/dist/bin/cleanup-stale-review-tasks.js +1339 -0
- package/dist/bin/cli.js +18800 -0
- package/dist/bin/exe-agent.js +1858 -0
- package/dist/bin/exe-assign.js +1957 -0
- package/dist/bin/exe-boot.js +6460 -0
- package/dist/bin/exe-call.js +197 -0
- package/dist/bin/exe-cloud.js +850 -0
- package/dist/bin/exe-dispatch.js +1146 -0
- package/dist/bin/exe-doctor.js +1657 -0
- package/dist/bin/exe-export-behaviors.js +1494 -0
- package/dist/bin/exe-forget.js +1627 -0
- package/dist/bin/exe-gateway.js +7732 -0
- package/dist/bin/exe-healthcheck.js +207 -0
- package/dist/bin/exe-heartbeat.js +1647 -0
- package/dist/bin/exe-kill.js +1479 -0
- package/dist/bin/exe-launch-agent.js +1704 -0
- package/dist/bin/exe-link.js +192 -0
- package/dist/bin/exe-new-employee.js +852 -0
- package/dist/bin/exe-pending-messages.js +1446 -0
- package/dist/bin/exe-pending-notifications.js +1321 -0
- package/dist/bin/exe-pending-reviews.js +1468 -0
- package/dist/bin/exe-repo-drift.js +95 -0
- package/dist/bin/exe-review.js +1590 -0
- package/dist/bin/exe-search.js +2651 -0
- package/dist/bin/exe-session-cleanup.js +3173 -0
- package/dist/bin/exe-settings.js +354 -0
- package/dist/bin/exe-status.js +1532 -0
- package/dist/bin/exe-team.js +1324 -0
- package/dist/bin/git-sweep.js +2185 -0
- package/dist/bin/graph-backfill.js +1968 -0
- package/dist/bin/graph-export.js +1604 -0
- package/dist/bin/install.js +656 -0
- package/dist/bin/list-providers.js +140 -0
- package/dist/bin/scan-tasks.js +1820 -0
- package/dist/bin/setup.js +951 -0
- package/dist/bin/shard-migrate.js +1494 -0
- package/dist/bin/update.js +95 -0
- package/dist/bin/wiki-sync.js +1514 -0
- package/dist/gateway/index.js +8848 -0
- package/dist/hooks/bug-report-worker.js +2743 -0
- package/dist/hooks/commit-complete.js +2108 -0
- package/dist/hooks/error-recall.js +2861 -0
- package/dist/hooks/exe-heartbeat-hook.js +232 -0
- package/dist/hooks/ingest-worker.js +4793 -0
- package/dist/hooks/ingest.js +684 -0
- package/dist/hooks/instructions-loaded.js +1880 -0
- package/dist/hooks/notification.js +1726 -0
- package/dist/hooks/post-compact.js +1751 -0
- package/dist/hooks/pre-compact.js +1746 -0
- package/dist/hooks/pre-tool-use.js +2191 -0
- package/dist/hooks/prompt-ingest-worker.js +2126 -0
- package/dist/hooks/prompt-submit.js +4693 -0
- package/dist/hooks/response-ingest-worker.js +1936 -0
- package/dist/hooks/session-end.js +1752 -0
- package/dist/hooks/session-start.js +2795 -0
- package/dist/hooks/stop.js +1835 -0
- package/dist/hooks/subagent-stop.js +1726 -0
- package/dist/hooks/summary-worker.js +2661 -0
- package/dist/index.js +11834 -0
- package/dist/lib/cloud-sync.js +495 -0
- package/dist/lib/config.js +222 -0
- package/dist/lib/consolidation.js +476 -0
- package/dist/lib/crypto.js +51 -0
- package/dist/lib/database.js +730 -0
- package/dist/lib/device-registry.js +900 -0
- package/dist/lib/embedder.js +632 -0
- package/dist/lib/employee-templates.js +543 -0
- package/dist/lib/employees.js +177 -0
- package/dist/lib/error-detector.js +156 -0
- package/dist/lib/exe-daemon-client.js +451 -0
- package/dist/lib/exe-daemon.js +8285 -0
- package/dist/lib/file-grep.js +199 -0
- package/dist/lib/hybrid-search.js +1819 -0
- package/dist/lib/identity-templates.js +320 -0
- package/dist/lib/identity.js +223 -0
- package/dist/lib/keychain.js +145 -0
- package/dist/lib/license.js +377 -0
- package/dist/lib/messaging.js +1376 -0
- package/dist/lib/reminders.js +63 -0
- package/dist/lib/schedules.js +1396 -0
- package/dist/lib/session-registry.js +52 -0
- package/dist/lib/skill-learning.js +477 -0
- package/dist/lib/status-brief.js +235 -0
- package/dist/lib/store.js +1551 -0
- package/dist/lib/task-router.js +62 -0
- package/dist/lib/tasks.js +2456 -0
- package/dist/lib/tmux-routing.js +2836 -0
- package/dist/lib/tmux-status.js +261 -0
- package/dist/lib/tmux-transport.js +83 -0
- package/dist/lib/transport.js +128 -0
- package/dist/lib/ws-auth.js +19 -0
- package/dist/lib/ws-client.js +160 -0
- package/dist/mcp/server.js +10538 -0
- package/dist/mcp/tools/complete-reminder.js +67 -0
- package/dist/mcp/tools/create-reminder.js +52 -0
- package/dist/mcp/tools/create-task.js +1853 -0
- package/dist/mcp/tools/deactivate-behavior.js +263 -0
- package/dist/mcp/tools/list-reminders.js +62 -0
- package/dist/mcp/tools/list-tasks.js +463 -0
- package/dist/mcp/tools/send-message.js +1382 -0
- package/dist/mcp/tools/update-task.js +1692 -0
- package/dist/runtime/index.js +6809 -0
- package/dist/tui/App.js +17479 -0
- package/package.json +104 -0
- package/src/commands/exe/assign.md +17 -0
- package/src/commands/exe/build-adv.md +381 -0
- package/src/commands/exe/call.md +133 -0
- package/src/commands/exe/cloud.md +17 -0
- package/src/commands/exe/employee-heartbeat.md +44 -0
- package/src/commands/exe/forget.md +15 -0
- package/src/commands/exe/heartbeat.md +92 -0
- package/src/commands/exe/intercom.md +81 -0
- package/src/commands/exe/kill.md +34 -0
- package/src/commands/exe/launch.md +52 -0
- package/src/commands/exe/link.md +17 -0
- package/src/commands/exe/logs.md +22 -0
- package/src/commands/exe/new-employee.md +12 -0
- package/src/commands/exe/review.md +14 -0
- package/src/commands/exe/schedule.md +108 -0
- package/src/commands/exe/search.md +13 -0
- package/src/commands/exe/sessions.md +25 -0
- package/src/commands/exe/settings.md +13 -0
- package/src/commands/exe/setup.md +171 -0
- package/src/commands/exe/status.md +15 -0
- package/src/commands/exe/team.md +11 -0
- package/src/commands/exe/update.md +11 -0
- package/src/commands/exe.md +181 -0
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
// src/lib/status-brief.ts
|
|
2
|
+
var EMPLOYEE_EMOJIS = {
|
|
3
|
+
exe: "\u{1F3AF}",
|
|
4
|
+
// 🎯
|
|
5
|
+
yoshi: "\u26A1",
|
|
6
|
+
// ⚡
|
|
7
|
+
mari: "\u{1F3A8}",
|
|
8
|
+
// 🎨
|
|
9
|
+
tom: "\u{1F529}",
|
|
10
|
+
// 🔩
|
|
11
|
+
sasha: "\u{1F4F8}"
|
|
12
|
+
// 📸
|
|
13
|
+
};
|
|
14
|
+
function displayWidth(str) {
|
|
15
|
+
let w = 0;
|
|
16
|
+
for (const ch of str) {
|
|
17
|
+
const cp = ch.codePointAt(0);
|
|
18
|
+
if (cp > 255) w += 2;
|
|
19
|
+
else w += 1;
|
|
20
|
+
}
|
|
21
|
+
return w;
|
|
22
|
+
}
|
|
23
|
+
function padRight(str, target) {
|
|
24
|
+
const gap = target - displayWidth(str);
|
|
25
|
+
return gap > 0 ? str + " ".repeat(gap) : str;
|
|
26
|
+
}
|
|
27
|
+
function boxTop(w) {
|
|
28
|
+
return `\u250C${"\u2500".repeat(w)}\u2510`;
|
|
29
|
+
}
|
|
30
|
+
function boxMid(w) {
|
|
31
|
+
return `\u251C${"\u2500".repeat(w)}\u2524`;
|
|
32
|
+
}
|
|
33
|
+
function boxBot(w) {
|
|
34
|
+
return `\u2514${"\u2500".repeat(w)}\u2518`;
|
|
35
|
+
}
|
|
36
|
+
function boxRow(content, w) {
|
|
37
|
+
return `\u2502 ${padRight(content, w - 2)} \u2502`;
|
|
38
|
+
}
|
|
39
|
+
function formatUptime(seconds) {
|
|
40
|
+
if (seconds < 3600) return `${Math.floor(seconds / 60)}m`;
|
|
41
|
+
return `${(seconds / 3600).toFixed(1)}h`;
|
|
42
|
+
}
|
|
43
|
+
async function generateStatusBrief(employees, data, _activeAgentIds) {
|
|
44
|
+
const now = /* @__PURE__ */ new Date();
|
|
45
|
+
const dateStr = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")} ${String(now.getHours()).padStart(2, "0")}:${String(now.getMinutes()).padStart(2, "0")}`;
|
|
46
|
+
const sessionTag = data.exeSession ? ` [${data.exeSession}]` : "";
|
|
47
|
+
const sections = [];
|
|
48
|
+
sections.push([` EXE STATUS BRIEF \u2014 ${dateStr}${sessionTag}`]);
|
|
49
|
+
const reminderLines = buildReminders(data);
|
|
50
|
+
if (reminderLines.length > 0) sections.push(reminderLines);
|
|
51
|
+
const actionLines = buildActionRequired(data);
|
|
52
|
+
if (actionLines.length > 0) sections.push(actionLines);
|
|
53
|
+
sections.push(buildProjects(data));
|
|
54
|
+
sections.push(buildTeam(employees, data));
|
|
55
|
+
sections.push(buildHealth(data));
|
|
56
|
+
let maxW = 0;
|
|
57
|
+
for (const sec of sections) {
|
|
58
|
+
for (const line of sec) {
|
|
59
|
+
const w = displayWidth(line);
|
|
60
|
+
if (w > maxW) maxW = w;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const innerW = maxW + 4;
|
|
64
|
+
const out = [];
|
|
65
|
+
out.push("[VERBATIM OUTPUT \u2014 do not reformat]");
|
|
66
|
+
for (let i = 0; i < sections.length; i++) {
|
|
67
|
+
out.push(i === 0 ? boxTop(innerW) : boxMid(innerW));
|
|
68
|
+
for (const line of sections[i]) {
|
|
69
|
+
out.push(boxRow(line, innerW));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
out.push(boxBot(innerW));
|
|
73
|
+
return out.join("\n");
|
|
74
|
+
}
|
|
75
|
+
function buildReminders(data) {
|
|
76
|
+
if (!data.reminders || data.reminders.length === 0) return [];
|
|
77
|
+
const lines = [];
|
|
78
|
+
lines.push(" \u{1F4DD} REMINDERS");
|
|
79
|
+
for (const r of data.reminders) {
|
|
80
|
+
const due = r.dueDate ? ` (due: ${r.dueDate})` : "";
|
|
81
|
+
const prefix = r.overdue ? " \u{1F534}" : " \u2022";
|
|
82
|
+
lines.push(`${prefix} ${r.text}${due}`);
|
|
83
|
+
}
|
|
84
|
+
return lines;
|
|
85
|
+
}
|
|
86
|
+
function buildActionRequired(data) {
|
|
87
|
+
const lines = [];
|
|
88
|
+
let hasIssues = false;
|
|
89
|
+
const blockedTasks = data.globalTasks.filter((t) => t.status === "blocked");
|
|
90
|
+
if (blockedTasks.length > 0) {
|
|
91
|
+
hasIssues = true;
|
|
92
|
+
lines.push(` \u{1F534} ${blockedTasks.length} blocked task${blockedTasks.length === 1 ? "" : "s"} \u2014 needs your decision`);
|
|
93
|
+
}
|
|
94
|
+
if (data.flaggedIssues.length > 0) {
|
|
95
|
+
hasIssues = true;
|
|
96
|
+
lines.push(` \u{1F534} ${data.flaggedIssues.length} error${data.flaggedIssues.length === 1 ? "" : "s"} (24h)`);
|
|
97
|
+
}
|
|
98
|
+
const STALE_MS = 2 * 60 * 60 * 1e3;
|
|
99
|
+
const staleTasks = data.globalTasks.filter((t) => {
|
|
100
|
+
if (t.status !== "in_progress" || !t.updatedAt) return false;
|
|
101
|
+
return Date.now() - new Date(t.updatedAt).getTime() > STALE_MS;
|
|
102
|
+
});
|
|
103
|
+
if (staleTasks.length > 0) {
|
|
104
|
+
hasIssues = true;
|
|
105
|
+
lines.push(` \u{1F7E0} ${staleTasks.length} stale task${staleTasks.length === 1 ? "" : "s"} (in_progress >2h)`);
|
|
106
|
+
for (const t of staleTasks) {
|
|
107
|
+
const hrs = ((Date.now() - new Date(t.updatedAt).getTime()) / 36e5).toFixed(1);
|
|
108
|
+
lines.push(` \u2022 "${t.title}" \u2192 ${t.assignedTo} (${hrs}h)`);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (data.failedMessages && data.failedMessages.length > 0) {
|
|
112
|
+
hasIssues = true;
|
|
113
|
+
lines.push(` \u{1F534} ${data.failedMessages.length} undeliverable message${data.failedMessages.length === 1 ? "" : "s"}`);
|
|
114
|
+
for (const m of data.failedMessages) {
|
|
115
|
+
const snippet = m.content.slice(0, 60).replace(/\n/g, " ");
|
|
116
|
+
lines.push(` \u2022 "${snippet}" \u2192 ${m.targetAgent} (${m.failureReason ?? "unknown"})`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (!hasIssues) return [];
|
|
120
|
+
return ["\u26A0\uFE0F ACTION REQUIRED", ...lines];
|
|
121
|
+
}
|
|
122
|
+
function buildProjects(data) {
|
|
123
|
+
const lines = ["\u{1F4C2} PROJECTS"];
|
|
124
|
+
if (!data.projects || data.projects.length === 0) {
|
|
125
|
+
lines.push(" No projects tracked.");
|
|
126
|
+
return lines;
|
|
127
|
+
}
|
|
128
|
+
const sevenDaysMs = 7 * 24 * 60 * 60 * 1e3;
|
|
129
|
+
const active = [];
|
|
130
|
+
const idle = [];
|
|
131
|
+
for (const p of data.projects) {
|
|
132
|
+
const hasOpenTasks = p.openTasks > 0;
|
|
133
|
+
const hasRecentActivity = p.recentTasks.some(
|
|
134
|
+
(t) => t.updatedAt && Date.now() - new Date(t.updatedAt).getTime() < sevenDaysMs
|
|
135
|
+
);
|
|
136
|
+
if (hasOpenTasks || hasRecentActivity || p.isCurrent) {
|
|
137
|
+
active.push(p);
|
|
138
|
+
} else {
|
|
139
|
+
idle.push(p);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
for (const p of active) {
|
|
143
|
+
const blocked = p.blockedCount ?? 0;
|
|
144
|
+
const statusEmoji = blocked > 0 ? "\u{1F534}" : "\u{1F7E2}";
|
|
145
|
+
const sessionStr = p.sessionName ? ` (${p.sessionName})` : p.isCurrent ? " (current)" : "";
|
|
146
|
+
lines.push(` \u{1F4E6} ${p.projectName} ${statusEmoji}${sessionStr}`);
|
|
147
|
+
if (p.commits7d != null && p.commits7d > 0) {
|
|
148
|
+
lines.push(` ${p.commits7d} commits (7d)`);
|
|
149
|
+
}
|
|
150
|
+
if (p.teamActivity && p.teamActivity.length > 0) {
|
|
151
|
+
for (const ta of p.teamActivity) {
|
|
152
|
+
const parts = [];
|
|
153
|
+
if (ta.tasksDone > 0) parts.push(`${ta.tasksDone} ${ta.tasksDone === 1 ? "task" : "tasks"} done`);
|
|
154
|
+
if (ta.reviewsCleared > 0) parts.push(`${ta.reviewsCleared} ${ta.reviewsCleared === 1 ? "review" : "reviews"} cleared`);
|
|
155
|
+
if (ta.tasksAssigned && ta.tasksAssigned > 0) parts.push(`${ta.tasksAssigned} ${ta.tasksAssigned === 1 ? "task" : "tasks"} assigned`);
|
|
156
|
+
if (parts.length > 0) {
|
|
157
|
+
lines.push(` ${ta.name} \u2014 ${parts.join(", ")}`);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
if (blocked > 0) {
|
|
162
|
+
lines.push(` Blocked: ${blocked}`);
|
|
163
|
+
}
|
|
164
|
+
lines.push("");
|
|
165
|
+
}
|
|
166
|
+
if (idle.length > 0) {
|
|
167
|
+
const idleNames = idle.map((p) => p.projectName);
|
|
168
|
+
lines.push(` Idle: ${idleNames.join(", ")}`);
|
|
169
|
+
}
|
|
170
|
+
return lines;
|
|
171
|
+
}
|
|
172
|
+
function buildTeam(employees, data) {
|
|
173
|
+
const lines = ["\u{1F465} TEAM"];
|
|
174
|
+
const memMap = /* @__PURE__ */ new Map();
|
|
175
|
+
if (data.memoryStats) {
|
|
176
|
+
for (const m of data.memoryStats) memMap.set(m.agentId, m.totalMemories);
|
|
177
|
+
}
|
|
178
|
+
for (const emp of employees) {
|
|
179
|
+
const emoji = EMPLOYEE_EMOJIS[emp.name] ?? "\u{1F464}";
|
|
180
|
+
const memCount = memMap.get(emp.name) ?? 0;
|
|
181
|
+
const memStr = memCount > 0 ? `${memCount.toLocaleString()} memories` : "0 memories";
|
|
182
|
+
const role = emp.role ? ` (${emp.role})` : "";
|
|
183
|
+
lines.push(` ${emoji} ${emp.name}${role} \u2014 ${memStr}`);
|
|
184
|
+
}
|
|
185
|
+
return lines;
|
|
186
|
+
}
|
|
187
|
+
function buildHealth(data) {
|
|
188
|
+
const lines = ["\u{1F48A} HEALTH"];
|
|
189
|
+
if (data.embedding) {
|
|
190
|
+
const e = data.embedding;
|
|
191
|
+
const pct = e.totalMemories > 0 ? Math.round(e.memoriesWithVectors / e.totalMemories * 100) : 100;
|
|
192
|
+
lines.push(` \u{1F9E0} Memory: ${e.memoriesWithVectors.toLocaleString()}/${e.totalMemories.toLocaleString()} (${pct}%)`);
|
|
193
|
+
if (e.recent24hTotal != null && e.recent24hWithVectors != null && e.recent24hTotal > 0) {
|
|
194
|
+
const recentPct = Math.round(e.recent24hWithVectors / e.recent24hTotal * 100);
|
|
195
|
+
if (recentPct < 60) {
|
|
196
|
+
lines.push(` \u{1F534} Recent vectors: ${e.recent24hWithVectors}/${e.recent24hTotal} (${recentPct}%) \u2014 backfill stalled`);
|
|
197
|
+
} else if (recentPct < 80) {
|
|
198
|
+
lines.push(` \u{1F7E0} Recent vectors: ${e.recent24hWithVectors}/${e.recent24hTotal} (${recentPct}%) \u2014 backfill needed`);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (e.daemonRunning) {
|
|
202
|
+
const uptime = e.daemonUptime != null ? formatUptime(e.daemonUptime) : "?";
|
|
203
|
+
const reqs = e.daemonRequestsServed != null ? `, ${e.daemonRequestsServed.toLocaleString()} requests` : "";
|
|
204
|
+
lines.push(` \u{1F916} Model: \u{1F7E2} (${uptime} uptime${reqs})`);
|
|
205
|
+
} else {
|
|
206
|
+
lines.push(` \u{1F916} Model: \u26A0 not running`);
|
|
207
|
+
}
|
|
208
|
+
const nullCount = e.totalMemories - e.memoriesWithVectors;
|
|
209
|
+
if (nullCount > 0) {
|
|
210
|
+
if (!e.daemonRunning) {
|
|
211
|
+
lines.push(` \u{1F534} ${nullCount.toLocaleString()} memories missing embeddings \u2014 start model to backfill`);
|
|
212
|
+
} else if (e.backfillRunning) {
|
|
213
|
+
lines.push(` \u{1F7E1} Backfilling ${nullCount.toLocaleString()} memories\u2026`);
|
|
214
|
+
} else {
|
|
215
|
+
lines.push(` \u{1F7E0} ${nullCount.toLocaleString()} memories missing embeddings`);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
lines.push(` \u2601\uFE0F Cloud: ${data.cloudConnected ? "\u{1F7E2}" : "not configured"}`);
|
|
220
|
+
if (data.sessionsKilledToday !== void 0) {
|
|
221
|
+
lines.push(` \u{1F480} Sessions killed today: ${data.sessionsKilledToday}`);
|
|
222
|
+
}
|
|
223
|
+
if (data.idleKillSuspectBroken) {
|
|
224
|
+
lines.push(` \u{1F534} Idle-kill may be broken or workload is unusually high.`);
|
|
225
|
+
}
|
|
226
|
+
if (data.missingBinaries && data.missingBinaries.length > 0) {
|
|
227
|
+
for (const bin of data.missingBinaries) {
|
|
228
|
+
lines.push(` \u{1F534} Missing binary: ${bin} \u2014 run npm run build`);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return lines;
|
|
232
|
+
}
|
|
233
|
+
export {
|
|
234
|
+
generateStatusBrief
|
|
235
|
+
};
|