@askexenow/exe-os 0.8.1 → 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 (106) hide show
  1. package/package.json +1 -1
  2. package/dist/bin/backfill-responses.js +0 -2064
  3. package/dist/bin/backfill-vectors.js +0 -1771
  4. package/dist/bin/cleanup-stale-review-tasks.js +0 -1468
  5. package/dist/bin/cli.js +0 -21371
  6. package/dist/bin/exe-agent.js +0 -2016
  7. package/dist/bin/exe-assign.js +0 -2176
  8. package/dist/bin/exe-boot.js +0 -6332
  9. package/dist/bin/exe-call.js +0 -341
  10. package/dist/bin/exe-cloud.js +0 -861
  11. package/dist/bin/exe-dispatch.js +0 -1159
  12. package/dist/bin/exe-doctor.js +0 -1786
  13. package/dist/bin/exe-export-behaviors.js +0 -1637
  14. package/dist/bin/exe-forget.js +0 -1784
  15. package/dist/bin/exe-gateway.js +0 -8140
  16. package/dist/bin/exe-healthcheck.js +0 -207
  17. package/dist/bin/exe-heartbeat.js +0 -1778
  18. package/dist/bin/exe-kill.js +0 -1622
  19. package/dist/bin/exe-launch-agent.js +0 -1847
  20. package/dist/bin/exe-link.js +0 -192
  21. package/dist/bin/exe-new-employee.js +0 -1384
  22. package/dist/bin/exe-pending-messages.js +0 -1576
  23. package/dist/bin/exe-pending-notifications.js +0 -1450
  24. package/dist/bin/exe-pending-reviews.js +0 -1598
  25. package/dist/bin/exe-repo-drift.js +0 -95
  26. package/dist/bin/exe-review.js +0 -1742
  27. package/dist/bin/exe-search.js +0 -3116
  28. package/dist/bin/exe-session-cleanup.js +0 -3360
  29. package/dist/bin/exe-settings.js +0 -365
  30. package/dist/bin/exe-status.js +0 -1661
  31. package/dist/bin/exe-team.js +0 -1453
  32. package/dist/bin/git-sweep.js +0 -2441
  33. package/dist/bin/graph-backfill.js +0 -2111
  34. package/dist/bin/graph-export.js +0 -1747
  35. package/dist/bin/install.js +0 -661
  36. package/dist/bin/list-providers.js +0 -140
  37. package/dist/bin/scan-tasks.js +0 -2039
  38. package/dist/bin/setup.js +0 -2717
  39. package/dist/bin/shard-migrate.js +0 -1637
  40. package/dist/bin/update.js +0 -98
  41. package/dist/bin/wiki-sync.js +0 -1657
  42. package/dist/gateway/index.js +0 -9256
  43. package/dist/hooks/bug-report-worker.js +0 -2903
  44. package/dist/hooks/commit-complete.js +0 -2364
  45. package/dist/hooks/error-recall.js +0 -3327
  46. package/dist/hooks/exe-heartbeat-hook.js +0 -237
  47. package/dist/hooks/ingest-worker.js +0 -5065
  48. package/dist/hooks/ingest.js +0 -695
  49. package/dist/hooks/instructions-loaded.js +0 -2069
  50. package/dist/hooks/notification.js +0 -1915
  51. package/dist/hooks/post-compact.js +0 -1940
  52. package/dist/hooks/pre-compact.js +0 -1935
  53. package/dist/hooks/pre-tool-use.js +0 -2380
  54. package/dist/hooks/prompt-ingest-worker.js +0 -2291
  55. package/dist/hooks/prompt-submit.js +0 -5189
  56. package/dist/hooks/response-ingest-worker.js +0 -2431
  57. package/dist/hooks/session-end.js +0 -2196
  58. package/dist/hooks/session-start.js +0 -3259
  59. package/dist/hooks/stop.js +0 -2025
  60. package/dist/hooks/subagent-stop.js +0 -1915
  61. package/dist/hooks/summary-worker.js +0 -2931
  62. package/dist/index.js +0 -12327
  63. package/dist/lib/cloud-sync.js +0 -500
  64. package/dist/lib/config.js +0 -235
  65. package/dist/lib/consolidation.js +0 -481
  66. package/dist/lib/crypto.js +0 -51
  67. package/dist/lib/database.js +0 -834
  68. package/dist/lib/device-registry.js +0 -1009
  69. package/dist/lib/embedder.js +0 -645
  70. package/dist/lib/employee-templates.js +0 -570
  71. package/dist/lib/employees.js +0 -182
  72. package/dist/lib/error-detector.js +0 -156
  73. package/dist/lib/exe-daemon-client.js +0 -456
  74. package/dist/lib/exe-daemon.js +0 -8699
  75. package/dist/lib/file-grep.js +0 -215
  76. package/dist/lib/hybrid-search.js +0 -3064
  77. package/dist/lib/identity-templates.js +0 -441
  78. package/dist/lib/identity.js +0 -228
  79. package/dist/lib/keychain.js +0 -145
  80. package/dist/lib/license.js +0 -382
  81. package/dist/lib/messaging.js +0 -1389
  82. package/dist/lib/reminders.js +0 -63
  83. package/dist/lib/schedules.js +0 -1525
  84. package/dist/lib/session-registry.js +0 -52
  85. package/dist/lib/skill-learning.js +0 -488
  86. package/dist/lib/status-brief.js +0 -240
  87. package/dist/lib/store.js +0 -1740
  88. package/dist/lib/task-router.js +0 -128
  89. package/dist/lib/tasks.js +0 -2585
  90. package/dist/lib/tmux-routing.js +0 -2969
  91. package/dist/lib/tmux-status.js +0 -261
  92. package/dist/lib/tmux-transport.js +0 -83
  93. package/dist/lib/transport.js +0 -128
  94. package/dist/lib/ws-auth.js +0 -19
  95. package/dist/lib/ws-client.js +0 -160
  96. package/dist/mcp/server.js +0 -10812
  97. package/dist/mcp/tools/complete-reminder.js +0 -67
  98. package/dist/mcp/tools/create-reminder.js +0 -52
  99. package/dist/mcp/tools/create-task.js +0 -1903
  100. package/dist/mcp/tools/deactivate-behavior.js +0 -268
  101. package/dist/mcp/tools/list-reminders.js +0 -62
  102. package/dist/mcp/tools/list-tasks.js +0 -491
  103. package/dist/mcp/tools/send-message.js +0 -1395
  104. package/dist/mcp/tools/update-task.js +0 -1807
  105. package/dist/runtime/index.js +0 -7201
  106. package/dist/tui/App.js +0 -17874
@@ -1,240 +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
- if (data.plan) {
186
- const planLabel = data.plan === "pro" ? "Solopreneur" : data.plan.charAt(0).toUpperCase() + data.plan.slice(1);
187
- const limit = data.employeeLimit ?? "?";
188
- lines.push(` Plan: ${planLabel} | ${employees.length}/${limit} employees | https://askexe.com`);
189
- }
190
- return lines;
191
- }
192
- function buildHealth(data) {
193
- const lines = ["\u{1F48A} HEALTH"];
194
- if (data.embedding) {
195
- const e = data.embedding;
196
- const pct = e.totalMemories > 0 ? Math.round(e.memoriesWithVectors / e.totalMemories * 100) : 100;
197
- lines.push(` \u{1F9E0} Memory: ${e.memoriesWithVectors.toLocaleString()}/${e.totalMemories.toLocaleString()} (${pct}%)`);
198
- if (e.recent24hTotal != null && e.recent24hWithVectors != null && e.recent24hTotal > 0) {
199
- const recentPct = Math.round(e.recent24hWithVectors / e.recent24hTotal * 100);
200
- if (recentPct < 60) {
201
- lines.push(` \u{1F534} Recent vectors: ${e.recent24hWithVectors}/${e.recent24hTotal} (${recentPct}%) \u2014 backfill stalled`);
202
- } else if (recentPct < 80) {
203
- lines.push(` \u{1F7E0} Recent vectors: ${e.recent24hWithVectors}/${e.recent24hTotal} (${recentPct}%) \u2014 backfill needed`);
204
- }
205
- }
206
- if (e.daemonRunning) {
207
- const uptime = e.daemonUptime != null ? formatUptime(e.daemonUptime) : "?";
208
- const reqs = e.daemonRequestsServed != null ? `, ${e.daemonRequestsServed.toLocaleString()} requests` : "";
209
- lines.push(` \u{1F916} Model: \u{1F7E2} (${uptime} uptime${reqs})`);
210
- } else {
211
- lines.push(` \u{1F916} Model: \u26A0 not running`);
212
- }
213
- const nullCount = e.totalMemories - e.memoriesWithVectors;
214
- if (nullCount > 0) {
215
- if (!e.daemonRunning) {
216
- lines.push(` \u{1F534} ${nullCount.toLocaleString()} memories missing embeddings \u2014 start model to backfill`);
217
- } else if (e.backfillRunning) {
218
- lines.push(` \u{1F7E1} Backfilling ${nullCount.toLocaleString()} memories\u2026`);
219
- } else {
220
- lines.push(` \u{1F7E0} ${nullCount.toLocaleString()} memories missing embeddings`);
221
- }
222
- }
223
- }
224
- lines.push(` \u2601\uFE0F Cloud: ${data.cloudConnected ? "\u{1F7E2}" : "not configured"}`);
225
- if (data.sessionsKilledToday !== void 0) {
226
- lines.push(` \u{1F480} Sessions killed today: ${data.sessionsKilledToday}`);
227
- }
228
- if (data.idleKillSuspectBroken) {
229
- lines.push(` \u{1F534} Idle-kill may be broken or workload is unusually high.`);
230
- }
231
- if (data.missingBinaries && data.missingBinaries.length > 0) {
232
- for (const bin of data.missingBinaries) {
233
- lines.push(` \u{1F534} Missing binary: ${bin} \u2014 run npm run build`);
234
- }
235
- }
236
- return lines;
237
- }
238
- export {
239
- generateStatusBrief
240
- };