@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,463 @@
|
|
|
1
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
+
var __esm = (fn, res) => function __init() {
|
|
3
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
// src/lib/database.ts
|
|
7
|
+
import { createClient } from "@libsql/client";
|
|
8
|
+
function getClient() {
|
|
9
|
+
if (!_client) {
|
|
10
|
+
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
11
|
+
}
|
|
12
|
+
return _client;
|
|
13
|
+
}
|
|
14
|
+
var _client;
|
|
15
|
+
var init_database = __esm({
|
|
16
|
+
"src/lib/database.ts"() {
|
|
17
|
+
"use strict";
|
|
18
|
+
_client = null;
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// src/lib/config.ts
|
|
23
|
+
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
24
|
+
import { readFileSync, existsSync, renameSync } from "fs";
|
|
25
|
+
import path from "path";
|
|
26
|
+
import os from "os";
|
|
27
|
+
function resolveDataDir() {
|
|
28
|
+
if (process.env.EXE_OS_DIR) return process.env.EXE_OS_DIR;
|
|
29
|
+
if (process.env.EXE_MEM_DIR) return process.env.EXE_MEM_DIR;
|
|
30
|
+
const newDir = path.join(os.homedir(), ".exe-os");
|
|
31
|
+
const legacyDir = path.join(os.homedir(), ".exe-mem");
|
|
32
|
+
if (!existsSync(newDir) && existsSync(legacyDir)) {
|
|
33
|
+
try {
|
|
34
|
+
renameSync(legacyDir, newDir);
|
|
35
|
+
process.stderr.write(`[exe-os] Migrated data directory: ~/.exe-mem \u2192 ~/.exe-os
|
|
36
|
+
`);
|
|
37
|
+
} catch {
|
|
38
|
+
return legacyDir;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return newDir;
|
|
42
|
+
}
|
|
43
|
+
var EXE_AI_DIR, DB_PATH, MODELS_DIR, CONFIG_PATH, LEGACY_LANCE_PATH, CURRENT_CONFIG_VERSION, DEFAULT_CONFIG;
|
|
44
|
+
var init_config = __esm({
|
|
45
|
+
"src/lib/config.ts"() {
|
|
46
|
+
"use strict";
|
|
47
|
+
EXE_AI_DIR = resolveDataDir();
|
|
48
|
+
DB_PATH = path.join(EXE_AI_DIR, "memories.db");
|
|
49
|
+
MODELS_DIR = path.join(EXE_AI_DIR, "models");
|
|
50
|
+
CONFIG_PATH = path.join(EXE_AI_DIR, "config.json");
|
|
51
|
+
LEGACY_LANCE_PATH = path.join(EXE_AI_DIR, "local.lance");
|
|
52
|
+
CURRENT_CONFIG_VERSION = 1;
|
|
53
|
+
DEFAULT_CONFIG = {
|
|
54
|
+
config_version: CURRENT_CONFIG_VERSION,
|
|
55
|
+
dbPath: DB_PATH,
|
|
56
|
+
modelFile: "jina-embeddings-v5-small-q4_k_m.gguf",
|
|
57
|
+
embeddingDim: 1024,
|
|
58
|
+
batchSize: 20,
|
|
59
|
+
flushIntervalMs: 1e4,
|
|
60
|
+
autoIngestion: true,
|
|
61
|
+
autoRetrieval: true,
|
|
62
|
+
searchMode: "hybrid",
|
|
63
|
+
hookSearchMode: "hybrid",
|
|
64
|
+
fileGrepEnabled: true,
|
|
65
|
+
splashEffect: true,
|
|
66
|
+
consolidationEnabled: true,
|
|
67
|
+
consolidationIntervalMs: 6 * 60 * 60 * 1e3,
|
|
68
|
+
consolidationModel: "claude-haiku-4-5-20251001",
|
|
69
|
+
consolidationMaxCallsPerRun: 20,
|
|
70
|
+
selfQueryRouter: true,
|
|
71
|
+
selfQueryModel: "claude-haiku-4-5-20251001",
|
|
72
|
+
rerankerEnabled: true,
|
|
73
|
+
scalingRoadmap: {
|
|
74
|
+
rerankerAutoTrigger: {
|
|
75
|
+
enabled: true,
|
|
76
|
+
broadQueryMinCardinality: 5e4,
|
|
77
|
+
fetchTopK: 150,
|
|
78
|
+
returnTopK: 5
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
graphRagEnabled: true,
|
|
82
|
+
wikiEnabled: false,
|
|
83
|
+
wikiUrl: "",
|
|
84
|
+
wikiApiKey: "",
|
|
85
|
+
wikiSyncIntervalMs: 30 * 60 * 1e3,
|
|
86
|
+
wikiWorkspaceMapping: {
|
|
87
|
+
exe: "Executive",
|
|
88
|
+
yoshi: "Engineering",
|
|
89
|
+
mari: "Marketing",
|
|
90
|
+
tom: "Engineering",
|
|
91
|
+
sasha: "Production"
|
|
92
|
+
},
|
|
93
|
+
wikiAutoUpdate: true,
|
|
94
|
+
wikiAutoUpdateThreshold: 0.5,
|
|
95
|
+
wikiAutoUpdateCreateNew: true,
|
|
96
|
+
skillLearning: true,
|
|
97
|
+
skillThreshold: 3,
|
|
98
|
+
skillModel: "claude-haiku-4-5-20251001",
|
|
99
|
+
exeHeartbeat: {
|
|
100
|
+
enabled: true,
|
|
101
|
+
intervalSeconds: 60,
|
|
102
|
+
staleInProgressThresholdHours: 2
|
|
103
|
+
},
|
|
104
|
+
sessionLifecycle: {
|
|
105
|
+
idleKillEnabled: true,
|
|
106
|
+
idleKillTicksRequired: 3,
|
|
107
|
+
idleKillIntercomAckWindowMs: 1e4,
|
|
108
|
+
maxAutoInstances: 10
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
// src/lib/notifications.ts
|
|
115
|
+
import crypto from "crypto";
|
|
116
|
+
import path2 from "path";
|
|
117
|
+
import os2 from "os";
|
|
118
|
+
import {
|
|
119
|
+
readFileSync as readFileSync2,
|
|
120
|
+
readdirSync,
|
|
121
|
+
unlinkSync,
|
|
122
|
+
existsSync as existsSync2,
|
|
123
|
+
rmdirSync
|
|
124
|
+
} from "fs";
|
|
125
|
+
var init_notifications = __esm({
|
|
126
|
+
"src/lib/notifications.ts"() {
|
|
127
|
+
"use strict";
|
|
128
|
+
init_database();
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// src/lib/tasks-crud.ts
|
|
133
|
+
import crypto2 from "crypto";
|
|
134
|
+
import path3 from "path";
|
|
135
|
+
import { execSync } from "child_process";
|
|
136
|
+
import { mkdir as mkdir2, writeFile as writeFile2, appendFile } from "fs/promises";
|
|
137
|
+
import { existsSync as existsSync3, readFileSync as readFileSync3 } from "fs";
|
|
138
|
+
async function listTasks(input) {
|
|
139
|
+
const client = getClient();
|
|
140
|
+
const conditions = [];
|
|
141
|
+
const args = [];
|
|
142
|
+
if (input.assignedTo) {
|
|
143
|
+
conditions.push("assigned_to = ?");
|
|
144
|
+
args.push(input.assignedTo);
|
|
145
|
+
}
|
|
146
|
+
if (input.status) {
|
|
147
|
+
conditions.push("status = ?");
|
|
148
|
+
args.push(input.status);
|
|
149
|
+
} else {
|
|
150
|
+
conditions.push("status IN ('open', 'in_progress', 'blocked')");
|
|
151
|
+
}
|
|
152
|
+
if (input.projectName) {
|
|
153
|
+
conditions.push("project_name = ?");
|
|
154
|
+
args.push(input.projectName);
|
|
155
|
+
}
|
|
156
|
+
if (input.priority) {
|
|
157
|
+
conditions.push("priority = ?");
|
|
158
|
+
args.push(input.priority);
|
|
159
|
+
}
|
|
160
|
+
const where = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
161
|
+
const result = await client.execute({
|
|
162
|
+
sql: `SELECT * FROM tasks ${where} ORDER BY CASE status WHEN 'blocked' THEN 0 WHEN 'in_progress' THEN 1 WHEN 'open' THEN 2 ELSE 3 END, priority ASC, created_at DESC`,
|
|
163
|
+
args
|
|
164
|
+
});
|
|
165
|
+
return result.rows.map((r) => ({
|
|
166
|
+
id: String(r.id),
|
|
167
|
+
title: String(r.title),
|
|
168
|
+
assignedTo: String(r.assigned_to),
|
|
169
|
+
assignedBy: String(r.assigned_by),
|
|
170
|
+
projectName: String(r.project_name),
|
|
171
|
+
priority: String(r.priority),
|
|
172
|
+
status: String(r.status),
|
|
173
|
+
taskFile: String(r.task_file),
|
|
174
|
+
createdAt: String(r.created_at),
|
|
175
|
+
updatedAt: String(r.updated_at)
|
|
176
|
+
}));
|
|
177
|
+
}
|
|
178
|
+
var init_tasks_crud = __esm({
|
|
179
|
+
"src/lib/tasks-crud.ts"() {
|
|
180
|
+
"use strict";
|
|
181
|
+
init_database();
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
// src/lib/employees.ts
|
|
186
|
+
import { readFile as readFile2, writeFile as writeFile3, mkdir as mkdir3 } from "fs/promises";
|
|
187
|
+
import { existsSync as existsSync4, symlinkSync, readlinkSync } from "fs";
|
|
188
|
+
import { execSync as execSync2 } from "child_process";
|
|
189
|
+
import path4 from "path";
|
|
190
|
+
var EMPLOYEES_PATH;
|
|
191
|
+
var init_employees = __esm({
|
|
192
|
+
"src/lib/employees.ts"() {
|
|
193
|
+
"use strict";
|
|
194
|
+
init_config();
|
|
195
|
+
EMPLOYEES_PATH = path4.join(EXE_AI_DIR, "exe-employees.json");
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// src/lib/session-registry.ts
|
|
200
|
+
import path5 from "path";
|
|
201
|
+
import os3 from "os";
|
|
202
|
+
var REGISTRY_PATH;
|
|
203
|
+
var init_session_registry = __esm({
|
|
204
|
+
"src/lib/session-registry.ts"() {
|
|
205
|
+
"use strict";
|
|
206
|
+
REGISTRY_PATH = path5.join(os3.homedir(), ".exe-os", "session-registry.json");
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
// src/lib/session-key.ts
|
|
211
|
+
import { execSync as execSync3 } from "child_process";
|
|
212
|
+
var init_session_key = __esm({
|
|
213
|
+
"src/lib/session-key.ts"() {
|
|
214
|
+
"use strict";
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
// src/lib/transport.ts
|
|
219
|
+
var init_transport = __esm({
|
|
220
|
+
"src/lib/transport.ts"() {
|
|
221
|
+
"use strict";
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
|
|
225
|
+
// src/lib/cc-agent-support.ts
|
|
226
|
+
import { execSync as execSync4 } from "child_process";
|
|
227
|
+
var init_cc_agent_support = __esm({
|
|
228
|
+
"src/lib/cc-agent-support.ts"() {
|
|
229
|
+
"use strict";
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
// src/lib/mcp-prefix.ts
|
|
234
|
+
var MCP_PRIMARY_KEY, MCP_LEGACY_KEY, MCP_TOOL_PREFIXES;
|
|
235
|
+
var init_mcp_prefix = __esm({
|
|
236
|
+
"src/lib/mcp-prefix.ts"() {
|
|
237
|
+
"use strict";
|
|
238
|
+
MCP_PRIMARY_KEY = "exe-os";
|
|
239
|
+
MCP_LEGACY_KEY = "exe-mem";
|
|
240
|
+
MCP_TOOL_PREFIXES = [
|
|
241
|
+
`mcp__${MCP_PRIMARY_KEY}__`,
|
|
242
|
+
`mcp__${MCP_LEGACY_KEY}__`
|
|
243
|
+
];
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
// src/lib/provider-table.ts
|
|
248
|
+
var init_provider_table = __esm({
|
|
249
|
+
"src/lib/provider-table.ts"() {
|
|
250
|
+
"use strict";
|
|
251
|
+
}
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// src/lib/intercom-queue.ts
|
|
255
|
+
import { readFileSync as readFileSync4, writeFileSync, renameSync as renameSync2, existsSync as existsSync5, mkdirSync } from "fs";
|
|
256
|
+
import path6 from "path";
|
|
257
|
+
import os4 from "os";
|
|
258
|
+
var QUEUE_PATH, INTERCOM_LOG;
|
|
259
|
+
var init_intercom_queue = __esm({
|
|
260
|
+
"src/lib/intercom-queue.ts"() {
|
|
261
|
+
"use strict";
|
|
262
|
+
QUEUE_PATH = path6.join(os4.homedir(), ".exe-os", "intercom-queue.json");
|
|
263
|
+
INTERCOM_LOG = path6.join(os4.homedir(), ".exe-os", "intercom.log");
|
|
264
|
+
}
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
// src/lib/license.ts
|
|
268
|
+
import { readFileSync as readFileSync5, writeFileSync as writeFileSync2, existsSync as existsSync6, mkdirSync as mkdirSync2 } from "fs";
|
|
269
|
+
import { randomUUID } from "crypto";
|
|
270
|
+
import path7 from "path";
|
|
271
|
+
import { jwtVerify, importSPKI } from "jose";
|
|
272
|
+
var LICENSE_PATH, CACHE_PATH, DEVICE_ID_PATH;
|
|
273
|
+
var init_license = __esm({
|
|
274
|
+
"src/lib/license.ts"() {
|
|
275
|
+
"use strict";
|
|
276
|
+
init_config();
|
|
277
|
+
LICENSE_PATH = path7.join(EXE_AI_DIR, "license.key");
|
|
278
|
+
CACHE_PATH = path7.join(EXE_AI_DIR, "license-cache.json");
|
|
279
|
+
DEVICE_ID_PATH = path7.join(EXE_AI_DIR, "device-id");
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
|
|
283
|
+
// src/lib/plan-limits.ts
|
|
284
|
+
import { readFileSync as readFileSync6, existsSync as existsSync7 } from "fs";
|
|
285
|
+
import path8 from "path";
|
|
286
|
+
var CACHE_PATH2;
|
|
287
|
+
var init_plan_limits = __esm({
|
|
288
|
+
"src/lib/plan-limits.ts"() {
|
|
289
|
+
"use strict";
|
|
290
|
+
init_database();
|
|
291
|
+
init_employees();
|
|
292
|
+
init_license();
|
|
293
|
+
init_config();
|
|
294
|
+
CACHE_PATH2 = path8.join(EXE_AI_DIR, "license-cache.json");
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
// src/lib/worktree.ts
|
|
299
|
+
var init_worktree = __esm({
|
|
300
|
+
"src/lib/worktree.ts"() {
|
|
301
|
+
"use strict";
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
|
|
305
|
+
// src/lib/tmux-routing.ts
|
|
306
|
+
import path9 from "path";
|
|
307
|
+
import os5 from "os";
|
|
308
|
+
import { fileURLToPath } from "url";
|
|
309
|
+
var SESSION_CACHE, INTERCOM_LOG2, DEBOUNCE_FILE, DEBOUNCE_CLEANUP_AGE_MS;
|
|
310
|
+
var init_tmux_routing = __esm({
|
|
311
|
+
"src/lib/tmux-routing.ts"() {
|
|
312
|
+
"use strict";
|
|
313
|
+
init_session_registry();
|
|
314
|
+
init_session_key();
|
|
315
|
+
init_transport();
|
|
316
|
+
init_cc_agent_support();
|
|
317
|
+
init_mcp_prefix();
|
|
318
|
+
init_provider_table();
|
|
319
|
+
init_intercom_queue();
|
|
320
|
+
init_plan_limits();
|
|
321
|
+
init_worktree();
|
|
322
|
+
SESSION_CACHE = path9.join(os5.homedir(), ".exe-os", "session-cache");
|
|
323
|
+
INTERCOM_LOG2 = path9.join(os5.homedir(), ".exe-os", "intercom.log");
|
|
324
|
+
DEBOUNCE_FILE = path9.join(SESSION_CACHE, "intercom-debounce.json");
|
|
325
|
+
DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
|
|
329
|
+
// src/lib/tasks-review.ts
|
|
330
|
+
import path10 from "path";
|
|
331
|
+
import { existsSync as existsSync8, readdirSync as readdirSync2, unlinkSync as unlinkSync2 } from "fs";
|
|
332
|
+
var init_tasks_review = __esm({
|
|
333
|
+
"src/lib/tasks-review.ts"() {
|
|
334
|
+
"use strict";
|
|
335
|
+
init_database();
|
|
336
|
+
init_config();
|
|
337
|
+
init_employees();
|
|
338
|
+
init_notifications();
|
|
339
|
+
init_tasks_crud();
|
|
340
|
+
init_tmux_routing();
|
|
341
|
+
init_session_key();
|
|
342
|
+
}
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
// src/lib/tasks-chain.ts
|
|
346
|
+
import path11 from "path";
|
|
347
|
+
import { readFile as readFile3, writeFile as writeFile4 } from "fs/promises";
|
|
348
|
+
var init_tasks_chain = __esm({
|
|
349
|
+
"src/lib/tasks-chain.ts"() {
|
|
350
|
+
"use strict";
|
|
351
|
+
init_database();
|
|
352
|
+
init_notifications();
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// src/lib/tasks-notify.ts
|
|
357
|
+
var init_tasks_notify = __esm({
|
|
358
|
+
"src/lib/tasks-notify.ts"() {
|
|
359
|
+
"use strict";
|
|
360
|
+
init_tmux_routing();
|
|
361
|
+
init_session_key();
|
|
362
|
+
init_notifications();
|
|
363
|
+
init_transport();
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
// src/lib/tasks.ts
|
|
368
|
+
import path12 from "path";
|
|
369
|
+
import { writeFileSync as writeFileSync3, mkdirSync as mkdirSync3, unlinkSync as unlinkSync3 } from "fs";
|
|
370
|
+
var init_tasks = __esm({
|
|
371
|
+
"src/lib/tasks.ts"() {
|
|
372
|
+
"use strict";
|
|
373
|
+
init_database();
|
|
374
|
+
init_config();
|
|
375
|
+
init_notifications();
|
|
376
|
+
init_tasks_crud();
|
|
377
|
+
init_tasks_review();
|
|
378
|
+
init_tasks_crud();
|
|
379
|
+
init_tasks_chain();
|
|
380
|
+
init_tasks_review();
|
|
381
|
+
init_tasks_notify();
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
// src/lib/project-name.ts
|
|
386
|
+
import { execSync as execSync5 } from "child_process";
|
|
387
|
+
import path13 from "path";
|
|
388
|
+
function getProjectName(cwd) {
|
|
389
|
+
const dir = cwd ?? process.cwd();
|
|
390
|
+
if (_cached && _cachedCwd === dir) return _cached;
|
|
391
|
+
try {
|
|
392
|
+
const repoRoot = execSync5("git rev-parse --show-toplevel", {
|
|
393
|
+
cwd: dir,
|
|
394
|
+
encoding: "utf8",
|
|
395
|
+
timeout: 2e3,
|
|
396
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
397
|
+
}).trim();
|
|
398
|
+
_cached = path13.basename(repoRoot);
|
|
399
|
+
_cachedCwd = dir;
|
|
400
|
+
return _cached;
|
|
401
|
+
} catch {
|
|
402
|
+
_cached = path13.basename(dir);
|
|
403
|
+
_cachedCwd = dir;
|
|
404
|
+
return _cached;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
var _cached, _cachedCwd;
|
|
408
|
+
var init_project_name = __esm({
|
|
409
|
+
"src/lib/project-name.ts"() {
|
|
410
|
+
"use strict";
|
|
411
|
+
_cached = null;
|
|
412
|
+
_cachedCwd = null;
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
// src/mcp/tools/list-tasks.ts
|
|
417
|
+
init_tasks();
|
|
418
|
+
init_project_name();
|
|
419
|
+
import { z } from "zod";
|
|
420
|
+
function registerListTasks(server) {
|
|
421
|
+
server.registerTool(
|
|
422
|
+
"list_tasks",
|
|
423
|
+
{
|
|
424
|
+
title: "List Tasks",
|
|
425
|
+
description: "Query tasks by assignee, status, project, or priority. Defaults to current project. Pass project_name='all' to see all projects.",
|
|
426
|
+
inputSchema: {
|
|
427
|
+
assigned_to: z.string().optional().describe("Filter by employee name"),
|
|
428
|
+
status: z.enum(["open", "in_progress", "done", "blocked", "cancelled"]).optional().describe("Filter by status"),
|
|
429
|
+
project_name: z.string().optional().describe("Project name. Defaults to current project. Pass 'all' for all projects."),
|
|
430
|
+
priority: z.enum(["p0", "p1", "p2"]).optional().describe("Filter by priority")
|
|
431
|
+
}
|
|
432
|
+
},
|
|
433
|
+
async ({ assigned_to, status, project_name, priority }) => {
|
|
434
|
+
const resolvedProject = project_name === "all" ? void 0 : project_name ?? getProjectName();
|
|
435
|
+
const tasks = await listTasks({
|
|
436
|
+
assignedTo: assigned_to,
|
|
437
|
+
status,
|
|
438
|
+
projectName: resolvedProject,
|
|
439
|
+
priority
|
|
440
|
+
});
|
|
441
|
+
if (tasks.length === 0) {
|
|
442
|
+
return {
|
|
443
|
+
content: [{ type: "text", text: "No tasks found." }]
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
const lines = tasks.map(
|
|
447
|
+
(t) => `- [${t.priority.toUpperCase()}] ${t.title} (${t.projectName}) \u2014 ${t.status} \u2192 ${t.assignedTo}`
|
|
448
|
+
);
|
|
449
|
+
return {
|
|
450
|
+
content: [
|
|
451
|
+
{
|
|
452
|
+
type: "text",
|
|
453
|
+
text: `${tasks.length} task(s):
|
|
454
|
+
${lines.join("\n")}`
|
|
455
|
+
}
|
|
456
|
+
]
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
);
|
|
460
|
+
}
|
|
461
|
+
export {
|
|
462
|
+
registerListTasks
|
|
463
|
+
};
|