@askexenow/exe-os 0.8.0 → 0.8.2

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.
Files changed (107) hide show
  1. package/README.md +178 -79
  2. package/package.json +1 -1
  3. package/dist/bin/backfill-responses.js +0 -1912
  4. package/dist/bin/backfill-vectors.js +0 -1642
  5. package/dist/bin/cleanup-stale-review-tasks.js +0 -1339
  6. package/dist/bin/cli.js +0 -18800
  7. package/dist/bin/exe-agent.js +0 -1858
  8. package/dist/bin/exe-assign.js +0 -1957
  9. package/dist/bin/exe-boot.js +0 -6460
  10. package/dist/bin/exe-call.js +0 -197
  11. package/dist/bin/exe-cloud.js +0 -850
  12. package/dist/bin/exe-dispatch.js +0 -1146
  13. package/dist/bin/exe-doctor.js +0 -1657
  14. package/dist/bin/exe-export-behaviors.js +0 -1494
  15. package/dist/bin/exe-forget.js +0 -1627
  16. package/dist/bin/exe-gateway.js +0 -7732
  17. package/dist/bin/exe-healthcheck.js +0 -207
  18. package/dist/bin/exe-heartbeat.js +0 -1647
  19. package/dist/bin/exe-kill.js +0 -1479
  20. package/dist/bin/exe-launch-agent.js +0 -1704
  21. package/dist/bin/exe-link.js +0 -192
  22. package/dist/bin/exe-new-employee.js +0 -852
  23. package/dist/bin/exe-pending-messages.js +0 -1446
  24. package/dist/bin/exe-pending-notifications.js +0 -1321
  25. package/dist/bin/exe-pending-reviews.js +0 -1468
  26. package/dist/bin/exe-repo-drift.js +0 -95
  27. package/dist/bin/exe-review.js +0 -1590
  28. package/dist/bin/exe-search.js +0 -2651
  29. package/dist/bin/exe-session-cleanup.js +0 -3173
  30. package/dist/bin/exe-settings.js +0 -354
  31. package/dist/bin/exe-status.js +0 -1532
  32. package/dist/bin/exe-team.js +0 -1324
  33. package/dist/bin/git-sweep.js +0 -2185
  34. package/dist/bin/graph-backfill.js +0 -1968
  35. package/dist/bin/graph-export.js +0 -1604
  36. package/dist/bin/install.js +0 -656
  37. package/dist/bin/list-providers.js +0 -140
  38. package/dist/bin/scan-tasks.js +0 -1820
  39. package/dist/bin/setup.js +0 -951
  40. package/dist/bin/shard-migrate.js +0 -1494
  41. package/dist/bin/update.js +0 -95
  42. package/dist/bin/wiki-sync.js +0 -1514
  43. package/dist/gateway/index.js +0 -8848
  44. package/dist/hooks/bug-report-worker.js +0 -2743
  45. package/dist/hooks/commit-complete.js +0 -2108
  46. package/dist/hooks/error-recall.js +0 -2861
  47. package/dist/hooks/exe-heartbeat-hook.js +0 -232
  48. package/dist/hooks/ingest-worker.js +0 -4793
  49. package/dist/hooks/ingest.js +0 -684
  50. package/dist/hooks/instructions-loaded.js +0 -1880
  51. package/dist/hooks/notification.js +0 -1726
  52. package/dist/hooks/post-compact.js +0 -1751
  53. package/dist/hooks/pre-compact.js +0 -1746
  54. package/dist/hooks/pre-tool-use.js +0 -2191
  55. package/dist/hooks/prompt-ingest-worker.js +0 -2126
  56. package/dist/hooks/prompt-submit.js +0 -4693
  57. package/dist/hooks/response-ingest-worker.js +0 -1936
  58. package/dist/hooks/session-end.js +0 -1752
  59. package/dist/hooks/session-start.js +0 -2795
  60. package/dist/hooks/stop.js +0 -1835
  61. package/dist/hooks/subagent-stop.js +0 -1726
  62. package/dist/hooks/summary-worker.js +0 -2661
  63. package/dist/index.js +0 -11834
  64. package/dist/lib/cloud-sync.js +0 -495
  65. package/dist/lib/config.js +0 -222
  66. package/dist/lib/consolidation.js +0 -476
  67. package/dist/lib/crypto.js +0 -51
  68. package/dist/lib/database.js +0 -730
  69. package/dist/lib/device-registry.js +0 -900
  70. package/dist/lib/embedder.js +0 -632
  71. package/dist/lib/employee-templates.js +0 -543
  72. package/dist/lib/employees.js +0 -177
  73. package/dist/lib/error-detector.js +0 -156
  74. package/dist/lib/exe-daemon-client.js +0 -451
  75. package/dist/lib/exe-daemon.js +0 -8285
  76. package/dist/lib/file-grep.js +0 -199
  77. package/dist/lib/hybrid-search.js +0 -1819
  78. package/dist/lib/identity-templates.js +0 -320
  79. package/dist/lib/identity.js +0 -223
  80. package/dist/lib/keychain.js +0 -145
  81. package/dist/lib/license.js +0 -377
  82. package/dist/lib/messaging.js +0 -1376
  83. package/dist/lib/reminders.js +0 -63
  84. package/dist/lib/schedules.js +0 -1396
  85. package/dist/lib/session-registry.js +0 -52
  86. package/dist/lib/skill-learning.js +0 -477
  87. package/dist/lib/status-brief.js +0 -235
  88. package/dist/lib/store.js +0 -1551
  89. package/dist/lib/task-router.js +0 -62
  90. package/dist/lib/tasks.js +0 -2456
  91. package/dist/lib/tmux-routing.js +0 -2836
  92. package/dist/lib/tmux-status.js +0 -261
  93. package/dist/lib/tmux-transport.js +0 -83
  94. package/dist/lib/transport.js +0 -128
  95. package/dist/lib/ws-auth.js +0 -19
  96. package/dist/lib/ws-client.js +0 -160
  97. package/dist/mcp/server.js +0 -10538
  98. package/dist/mcp/tools/complete-reminder.js +0 -67
  99. package/dist/mcp/tools/create-reminder.js +0 -52
  100. package/dist/mcp/tools/create-task.js +0 -1853
  101. package/dist/mcp/tools/deactivate-behavior.js +0 -263
  102. package/dist/mcp/tools/list-reminders.js +0 -62
  103. package/dist/mcp/tools/list-tasks.js +0 -463
  104. package/dist/mcp/tools/send-message.js +0 -1382
  105. package/dist/mcp/tools/update-task.js +0 -1692
  106. package/dist/runtime/index.js +0 -6809
  107. package/dist/tui/App.js +0 -17479
@@ -1,235 +0,0 @@
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
- };