@askexenow/exe-os 0.9.5 → 0.9.6
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/dist/bin/cleanup-stale-review-tasks.js +1 -1
- package/dist/bin/cli.js +27 -9
- package/dist/bin/exe-boot.js +30 -12
- package/dist/bin/exe-dispatch.js +21 -3
- package/dist/bin/exe-gateway.js +19 -1
- package/dist/bin/exe-heartbeat.js +2 -2
- package/dist/bin/exe-session-cleanup.js +19 -1
- package/dist/bin/exe-status.js +1 -1
- package/dist/bin/git-sweep.js +21 -3
- package/dist/bin/scan-tasks.js +21 -3
- package/dist/gateway/index.js +19 -1
- package/dist/hooks/bug-report-worker.js +21 -3
- package/dist/hooks/commit-complete.js +21 -3
- package/dist/hooks/ingest-worker.js +23 -5
- package/dist/hooks/post-compact.js +3 -3
- package/dist/hooks/pre-compact.js +21 -3
- package/dist/hooks/pre-tool-use.js +3 -3
- package/dist/hooks/prompt-submit.js +19 -1
- package/dist/hooks/session-end.js +21 -3
- package/dist/hooks/session-start.js +1 -1
- package/dist/hooks/stop.js +3 -3
- package/dist/hooks/subagent-stop.js +3 -3
- package/dist/hooks/summary-worker.js +6 -6
- package/dist/index.js +21 -3
- package/dist/lib/exe-daemon.js +21 -3
- package/dist/lib/messaging.js +19 -1
- package/dist/lib/tasks.js +21 -3
- package/dist/lib/tmux-routing.js +19 -1
- package/dist/mcp/server.js +35 -17
- package/dist/mcp/tools/create-task.js +24 -6
- package/dist/mcp/tools/list-tasks.js +2 -2
- package/dist/mcp/tools/send-message.js +20 -2
- package/dist/mcp/tools/update-task.js +23 -5
- package/dist/runtime/index.js +21 -3
- package/dist/tui/App.js +21 -3
- package/package.json +1 -1
|
@@ -3768,7 +3768,7 @@ __export(tmux_routing_exports, {
|
|
|
3768
3768
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
3769
3769
|
});
|
|
3770
3770
|
import { execFileSync as execFileSync2, execSync as execSync5 } from "child_process";
|
|
3771
|
-
import { readFileSync as readFileSync10, writeFileSync as writeFileSync6, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync } from "fs";
|
|
3771
|
+
import { readFileSync as readFileSync10, writeFileSync as writeFileSync6, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
3772
3772
|
import path13 from "path";
|
|
3773
3773
|
import os8 from "os";
|
|
3774
3774
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -4089,6 +4089,24 @@ function sendIntercom(targetSession) {
|
|
|
4089
4089
|
}
|
|
4090
4090
|
} catch {
|
|
4091
4091
|
}
|
|
4092
|
+
try {
|
|
4093
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
4094
|
+
const agent = baseAgentName(rawAgent);
|
|
4095
|
+
const taskDir = path13.join(process.cwd(), "exe", agent);
|
|
4096
|
+
if (existsSync12(taskDir)) {
|
|
4097
|
+
const files = readdirSync3(taskDir).filter(
|
|
4098
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
4099
|
+
);
|
|
4100
|
+
if (files.length === 0) {
|
|
4101
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
4102
|
+
return "debounced";
|
|
4103
|
+
}
|
|
4104
|
+
} else {
|
|
4105
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
4106
|
+
return "debounced";
|
|
4107
|
+
}
|
|
4108
|
+
} catch {
|
|
4109
|
+
}
|
|
4092
4110
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
4093
4111
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
4094
4112
|
transport.sendKeys(targetSession, "q");
|
|
@@ -5110,7 +5128,7 @@ var init_tasks_crud = __esm({
|
|
|
5110
5128
|
|
|
5111
5129
|
// src/lib/tasks-review.ts
|
|
5112
5130
|
import path15 from "path";
|
|
5113
|
-
import { existsSync as existsSync14, readdirSync as
|
|
5131
|
+
import { existsSync as existsSync14, readdirSync as readdirSync4, unlinkSync as unlinkSync5 } from "fs";
|
|
5114
5132
|
async function countPendingReviews(sessionScope) {
|
|
5115
5133
|
const client = getClient();
|
|
5116
5134
|
if (sessionScope) {
|
|
@@ -5293,7 +5311,7 @@ async function cleanupReviewFile(row, taskFile, _baseDir) {
|
|
|
5293
5311
|
try {
|
|
5294
5312
|
const cacheDir = path15.join(EXE_AI_DIR, "session-cache");
|
|
5295
5313
|
if (existsSync14(cacheDir)) {
|
|
5296
|
-
for (const f of
|
|
5314
|
+
for (const f of readdirSync4(cacheDir)) {
|
|
5297
5315
|
if (f.startsWith("review-notified-")) {
|
|
5298
5316
|
unlinkSync5(path15.join(cacheDir, f));
|
|
5299
5317
|
}
|
|
@@ -6050,7 +6068,7 @@ __export(worker_gate_exports, {
|
|
|
6050
6068
|
tryAcquireBackfillLock: () => tryAcquireBackfillLock,
|
|
6051
6069
|
tryAcquireWorkerSlot: () => tryAcquireWorkerSlot
|
|
6052
6070
|
});
|
|
6053
|
-
import { readdirSync as
|
|
6071
|
+
import { readdirSync as readdirSync5, writeFileSync as writeFileSync8, unlinkSync as unlinkSync7, mkdirSync as mkdirSync8, existsSync as existsSync15 } from "fs";
|
|
6054
6072
|
import path18 from "path";
|
|
6055
6073
|
function tryAcquireWorkerSlot() {
|
|
6056
6074
|
try {
|
|
@@ -6058,7 +6076,7 @@ function tryAcquireWorkerSlot() {
|
|
|
6058
6076
|
const reservationId = `res-${process.pid}-${Date.now()}`;
|
|
6059
6077
|
const reservationPath = path18.join(WORKER_PID_DIR, `${reservationId}.pid`);
|
|
6060
6078
|
writeFileSync8(reservationPath, String(process.pid));
|
|
6061
|
-
const files =
|
|
6079
|
+
const files = readdirSync5(WORKER_PID_DIR);
|
|
6062
6080
|
let alive = 0;
|
|
6063
6081
|
for (const f of files) {
|
|
6064
6082
|
if (!f.endsWith(".pid")) continue;
|
|
@@ -2082,7 +2082,7 @@ var init_plan_limits = __esm({
|
|
|
2082
2082
|
});
|
|
2083
2083
|
|
|
2084
2084
|
// src/lib/tmux-routing.ts
|
|
2085
|
-
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync } from "fs";
|
|
2085
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync, readdirSync as readdirSync2 } from "fs";
|
|
2086
2086
|
import path10 from "path";
|
|
2087
2087
|
import os6 from "os";
|
|
2088
2088
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -2298,7 +2298,7 @@ __export(shard_manager_exports, {
|
|
|
2298
2298
|
shardExists: () => shardExists
|
|
2299
2299
|
});
|
|
2300
2300
|
import path12 from "path";
|
|
2301
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as
|
|
2301
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as readdirSync3 } from "fs";
|
|
2302
2302
|
import { createClient as createClient2 } from "@libsql/client";
|
|
2303
2303
|
function initShardManager(encryptionKey) {
|
|
2304
2304
|
_encryptionKey = encryptionKey;
|
|
@@ -2337,7 +2337,7 @@ function shardExists(projectName) {
|
|
|
2337
2337
|
}
|
|
2338
2338
|
function listShards() {
|
|
2339
2339
|
if (!existsSync10(SHARDS_DIR)) return [];
|
|
2340
|
-
return
|
|
2340
|
+
return readdirSync3(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
2341
2341
|
}
|
|
2342
2342
|
async function ensureShardSchema(client) {
|
|
2343
2343
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -4386,7 +4386,7 @@ __export(tmux_routing_exports, {
|
|
|
4386
4386
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
4387
4387
|
});
|
|
4388
4388
|
import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
|
|
4389
|
-
import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync12, appendFileSync } from "fs";
|
|
4389
|
+
import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync12, appendFileSync, readdirSync as readdirSync4 } from "fs";
|
|
4390
4390
|
import path16 from "path";
|
|
4391
4391
|
import os8 from "os";
|
|
4392
4392
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -4707,6 +4707,24 @@ function sendIntercom(targetSession) {
|
|
|
4707
4707
|
}
|
|
4708
4708
|
} catch {
|
|
4709
4709
|
}
|
|
4710
|
+
try {
|
|
4711
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
4712
|
+
const agent = baseAgentName(rawAgent);
|
|
4713
|
+
const taskDir = path16.join(process.cwd(), "exe", agent);
|
|
4714
|
+
if (existsSync12(taskDir)) {
|
|
4715
|
+
const files = readdirSync4(taskDir).filter(
|
|
4716
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
4717
|
+
);
|
|
4718
|
+
if (files.length === 0) {
|
|
4719
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
4720
|
+
return "debounced";
|
|
4721
|
+
}
|
|
4722
|
+
} else {
|
|
4723
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
4724
|
+
return "debounced";
|
|
4725
|
+
}
|
|
4726
|
+
} catch {
|
|
4727
|
+
}
|
|
4710
4728
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
4711
4729
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
4712
4730
|
transport.sendKeys(targetSession, "q");
|
|
@@ -5217,7 +5235,7 @@ __export(shard_manager_exports, {
|
|
|
5217
5235
|
shardExists: () => shardExists
|
|
5218
5236
|
});
|
|
5219
5237
|
import path18 from "path";
|
|
5220
|
-
import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as
|
|
5238
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as readdirSync5 } from "fs";
|
|
5221
5239
|
import { createClient as createClient2 } from "@libsql/client";
|
|
5222
5240
|
function initShardManager(encryptionKey) {
|
|
5223
5241
|
_encryptionKey = encryptionKey;
|
|
@@ -5256,7 +5274,7 @@ function shardExists(projectName) {
|
|
|
5256
5274
|
}
|
|
5257
5275
|
function listShards() {
|
|
5258
5276
|
if (!existsSync14(SHARDS_DIR)) return [];
|
|
5259
|
-
return
|
|
5277
|
+
return readdirSync5(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
5260
5278
|
}
|
|
5261
5279
|
async function ensureShardSchema(client) {
|
|
5262
5280
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -2249,7 +2249,7 @@ var init_plan_limits = __esm({
|
|
|
2249
2249
|
});
|
|
2250
2250
|
|
|
2251
2251
|
// src/lib/tmux-routing.ts
|
|
2252
|
-
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync } from "fs";
|
|
2252
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync, readdirSync as readdirSync2 } from "fs";
|
|
2253
2253
|
import path10 from "path";
|
|
2254
2254
|
import os6 from "os";
|
|
2255
2255
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -2646,7 +2646,7 @@ __export(shard_manager_exports, {
|
|
|
2646
2646
|
shardExists: () => shardExists
|
|
2647
2647
|
});
|
|
2648
2648
|
import path13 from "path";
|
|
2649
|
-
import { existsSync as existsSync11, mkdirSync as mkdirSync6, readdirSync as
|
|
2649
|
+
import { existsSync as existsSync11, mkdirSync as mkdirSync6, readdirSync as readdirSync3 } from "fs";
|
|
2650
2650
|
import { createClient as createClient2 } from "@libsql/client";
|
|
2651
2651
|
function initShardManager(encryptionKey) {
|
|
2652
2652
|
_encryptionKey = encryptionKey;
|
|
@@ -2685,7 +2685,7 @@ function shardExists(projectName) {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
function listShards() {
|
|
2687
2687
|
if (!existsSync11(SHARDS_DIR)) return [];
|
|
2688
|
-
return
|
|
2688
|
+
return readdirSync3(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
2689
2689
|
}
|
|
2690
2690
|
async function ensureShardSchema(client) {
|
|
2691
2691
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -6813,7 +6813,7 @@ __export(tmux_routing_exports, {
|
|
|
6813
6813
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
6814
6814
|
});
|
|
6815
6815
|
import { execFileSync as execFileSync2, execSync as execSync8 } from "child_process";
|
|
6816
|
-
import { readFileSync as readFileSync13, writeFileSync as writeFileSync8, mkdirSync as mkdirSync8, existsSync as existsSync16, appendFileSync } from "fs";
|
|
6816
|
+
import { readFileSync as readFileSync13, writeFileSync as writeFileSync8, mkdirSync as mkdirSync8, existsSync as existsSync16, appendFileSync, readdirSync as readdirSync6 } from "fs";
|
|
6817
6817
|
import path20 from "path";
|
|
6818
6818
|
import os9 from "os";
|
|
6819
6819
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -7134,6 +7134,24 @@ function sendIntercom(targetSession) {
|
|
|
7134
7134
|
}
|
|
7135
7135
|
} catch {
|
|
7136
7136
|
}
|
|
7137
|
+
try {
|
|
7138
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
7139
|
+
const agent = baseAgentName(rawAgent);
|
|
7140
|
+
const taskDir = path20.join(process.cwd(), "exe", agent);
|
|
7141
|
+
if (existsSync16(taskDir)) {
|
|
7142
|
+
const files = readdirSync6(taskDir).filter(
|
|
7143
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
7144
|
+
);
|
|
7145
|
+
if (files.length === 0) {
|
|
7146
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
7147
|
+
return "debounced";
|
|
7148
|
+
}
|
|
7149
|
+
} else {
|
|
7150
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
7151
|
+
return "debounced";
|
|
7152
|
+
}
|
|
7153
|
+
} catch {
|
|
7154
|
+
}
|
|
7137
7155
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
7138
7156
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
7139
7157
|
transport.sendKeys(targetSession, "q");
|
|
@@ -4588,7 +4588,7 @@ __export(tmux_routing_exports, {
|
|
|
4588
4588
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
4589
4589
|
});
|
|
4590
4590
|
import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
|
|
4591
|
-
import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync12, appendFileSync } from "fs";
|
|
4591
|
+
import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync12, appendFileSync, readdirSync as readdirSync4 } from "fs";
|
|
4592
4592
|
import path16 from "path";
|
|
4593
4593
|
import os8 from "os";
|
|
4594
4594
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -4909,6 +4909,24 @@ function sendIntercom(targetSession) {
|
|
|
4909
4909
|
}
|
|
4910
4910
|
} catch {
|
|
4911
4911
|
}
|
|
4912
|
+
try {
|
|
4913
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
4914
|
+
const agent = baseAgentName(rawAgent);
|
|
4915
|
+
const taskDir = path16.join(process.cwd(), "exe", agent);
|
|
4916
|
+
if (existsSync12(taskDir)) {
|
|
4917
|
+
const files = readdirSync4(taskDir).filter(
|
|
4918
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
4919
|
+
);
|
|
4920
|
+
if (files.length === 0) {
|
|
4921
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
4922
|
+
return "debounced";
|
|
4923
|
+
}
|
|
4924
|
+
} else {
|
|
4925
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
4926
|
+
return "debounced";
|
|
4927
|
+
}
|
|
4928
|
+
} catch {
|
|
4929
|
+
}
|
|
4912
4930
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
4913
4931
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
4914
4932
|
transport.sendKeys(targetSession, "q");
|
|
@@ -5419,7 +5437,7 @@ __export(shard_manager_exports, {
|
|
|
5419
5437
|
shardExists: () => shardExists
|
|
5420
5438
|
});
|
|
5421
5439
|
import path18 from "path";
|
|
5422
|
-
import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as
|
|
5440
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync8, readdirSync as readdirSync5 } from "fs";
|
|
5423
5441
|
import { createClient as createClient2 } from "@libsql/client";
|
|
5424
5442
|
function initShardManager(encryptionKey) {
|
|
5425
5443
|
_encryptionKey = encryptionKey;
|
|
@@ -5458,7 +5476,7 @@ function shardExists(projectName) {
|
|
|
5458
5476
|
}
|
|
5459
5477
|
function listShards() {
|
|
5460
5478
|
if (!existsSync14(SHARDS_DIR)) return [];
|
|
5461
|
-
return
|
|
5479
|
+
return readdirSync5(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
5462
5480
|
}
|
|
5463
5481
|
async function ensureShardSchema(client) {
|
|
5464
5482
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -5390,7 +5390,7 @@ var init_plan_limits = __esm({
|
|
|
5390
5390
|
});
|
|
5391
5391
|
|
|
5392
5392
|
// src/lib/tmux-routing.ts
|
|
5393
|
-
import { readFileSync as readFileSync10, writeFileSync as writeFileSync6, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync } from "fs";
|
|
5393
|
+
import { readFileSync as readFileSync10, writeFileSync as writeFileSync6, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync, readdirSync as readdirSync4 } from "fs";
|
|
5394
5394
|
import path15 from "path";
|
|
5395
5395
|
import os7 from "os";
|
|
5396
5396
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
package/dist/hooks/stop.js
CHANGED
|
@@ -2114,7 +2114,7 @@ var init_plan_limits = __esm({
|
|
|
2114
2114
|
});
|
|
2115
2115
|
|
|
2116
2116
|
// src/lib/tmux-routing.ts
|
|
2117
|
-
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync } from "fs";
|
|
2117
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync, readdirSync as readdirSync2 } from "fs";
|
|
2118
2118
|
import path10 from "path";
|
|
2119
2119
|
import os6 from "os";
|
|
2120
2120
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -2330,7 +2330,7 @@ __export(shard_manager_exports, {
|
|
|
2330
2330
|
shardExists: () => shardExists
|
|
2331
2331
|
});
|
|
2332
2332
|
import path12 from "path";
|
|
2333
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as
|
|
2333
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as readdirSync3 } from "fs";
|
|
2334
2334
|
import { createClient as createClient2 } from "@libsql/client";
|
|
2335
2335
|
function initShardManager(encryptionKey) {
|
|
2336
2336
|
_encryptionKey = encryptionKey;
|
|
@@ -2369,7 +2369,7 @@ function shardExists(projectName) {
|
|
|
2369
2369
|
}
|
|
2370
2370
|
function listShards() {
|
|
2371
2371
|
if (!existsSync10(SHARDS_DIR)) return [];
|
|
2372
|
-
return
|
|
2372
|
+
return readdirSync3(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
2373
2373
|
}
|
|
2374
2374
|
async function ensureShardSchema(client) {
|
|
2375
2375
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -2089,7 +2089,7 @@ var init_plan_limits = __esm({
|
|
|
2089
2089
|
});
|
|
2090
2090
|
|
|
2091
2091
|
// src/lib/tmux-routing.ts
|
|
2092
|
-
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync } from "fs";
|
|
2092
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync8, appendFileSync, readdirSync as readdirSync2 } from "fs";
|
|
2093
2093
|
import path10 from "path";
|
|
2094
2094
|
import os6 from "os";
|
|
2095
2095
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -2305,7 +2305,7 @@ __export(shard_manager_exports, {
|
|
|
2305
2305
|
shardExists: () => shardExists
|
|
2306
2306
|
});
|
|
2307
2307
|
import path12 from "path";
|
|
2308
|
-
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as
|
|
2308
|
+
import { existsSync as existsSync10, mkdirSync as mkdirSync6, readdirSync as readdirSync3 } from "fs";
|
|
2309
2309
|
import { createClient as createClient2 } from "@libsql/client";
|
|
2310
2310
|
function initShardManager(encryptionKey) {
|
|
2311
2311
|
_encryptionKey = encryptionKey;
|
|
@@ -2344,7 +2344,7 @@ function shardExists(projectName) {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
function listShards() {
|
|
2346
2346
|
if (!existsSync10(SHARDS_DIR)) return [];
|
|
2347
|
-
return
|
|
2347
|
+
return readdirSync3(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
2348
2348
|
}
|
|
2349
2349
|
async function ensureShardSchema(client) {
|
|
2350
2350
|
await client.execute("PRAGMA journal_mode = WAL");
|
|
@@ -3442,7 +3442,7 @@ var init_plan_limits = __esm({
|
|
|
3442
3442
|
});
|
|
3443
3443
|
|
|
3444
3444
|
// src/lib/tmux-routing.ts
|
|
3445
|
-
import { readFileSync as readFileSync9, writeFileSync as writeFileSync5, mkdirSync as mkdirSync5, existsSync as existsSync11, appendFileSync } from "fs";
|
|
3445
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync5, mkdirSync as mkdirSync5, existsSync as existsSync11, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
3446
3446
|
import path12 from "path";
|
|
3447
3447
|
import os8 from "os";
|
|
3448
3448
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -3601,7 +3601,7 @@ __export(worker_gate_exports, {
|
|
|
3601
3601
|
tryAcquireBackfillLock: () => tryAcquireBackfillLock,
|
|
3602
3602
|
tryAcquireWorkerSlot: () => tryAcquireWorkerSlot
|
|
3603
3603
|
});
|
|
3604
|
-
import { readdirSync as
|
|
3604
|
+
import { readdirSync as readdirSync4, writeFileSync as writeFileSync6, unlinkSync as unlinkSync4, mkdirSync as mkdirSync6, existsSync as existsSync12 } from "fs";
|
|
3605
3605
|
import path13 from "path";
|
|
3606
3606
|
function tryAcquireWorkerSlot() {
|
|
3607
3607
|
try {
|
|
@@ -3609,7 +3609,7 @@ function tryAcquireWorkerSlot() {
|
|
|
3609
3609
|
const reservationId = `res-${process.pid}-${Date.now()}`;
|
|
3610
3610
|
const reservationPath = path13.join(WORKER_PID_DIR, `${reservationId}.pid`);
|
|
3611
3611
|
writeFileSync6(reservationPath, String(process.pid));
|
|
3612
|
-
const files =
|
|
3612
|
+
const files = readdirSync4(WORKER_PID_DIR);
|
|
3613
3613
|
let alive = 0;
|
|
3614
3614
|
for (const f of files) {
|
|
3615
3615
|
if (!f.endsWith(".pid")) continue;
|
|
@@ -4034,7 +4034,7 @@ __export(cloud_sync_exports, {
|
|
|
4034
4034
|
mergeRosterFromRemote: () => mergeRosterFromRemote,
|
|
4035
4035
|
recordRosterDeletion: () => recordRosterDeletion
|
|
4036
4036
|
});
|
|
4037
|
-
import { readFileSync as readFileSync11, writeFileSync as writeFileSync8, existsSync as existsSync14, readdirSync as
|
|
4037
|
+
import { readFileSync as readFileSync11, writeFileSync as writeFileSync8, existsSync as existsSync14, readdirSync as readdirSync5, mkdirSync as mkdirSync8, appendFileSync as appendFileSync2, unlinkSync as unlinkSync6, openSync as openSync2, closeSync as closeSync2 } from "fs";
|
|
4038
4038
|
import crypto3 from "crypto";
|
|
4039
4039
|
import path15 from "path";
|
|
4040
4040
|
import { homedir as homedir2 } from "os";
|
|
@@ -4440,7 +4440,7 @@ async function cloudSync(config) {
|
|
|
4440
4440
|
rosterResult.employees = employees.length;
|
|
4441
4441
|
const idDir = path15.join(EXE_AI_DIR, "identity");
|
|
4442
4442
|
if (existsSync14(idDir)) {
|
|
4443
|
-
rosterResult.identities =
|
|
4443
|
+
rosterResult.identities = readdirSync5(idDir).filter((f) => f.endsWith(".md")).length;
|
|
4444
4444
|
}
|
|
4445
4445
|
} catch {
|
|
4446
4446
|
}
|
|
@@ -4491,7 +4491,7 @@ function buildRosterBlob(paths) {
|
|
|
4491
4491
|
}
|
|
4492
4492
|
const identities = {};
|
|
4493
4493
|
if (existsSync14(identityDir)) {
|
|
4494
|
-
for (const file of
|
|
4494
|
+
for (const file of readdirSync5(identityDir).filter((f) => f.endsWith(".md"))) {
|
|
4495
4495
|
try {
|
|
4496
4496
|
identities[file] = readFileSync11(path15.join(identityDir, file), "utf-8");
|
|
4497
4497
|
} catch {
|
package/dist/index.js
CHANGED
|
@@ -4814,7 +4814,7 @@ __export(tmux_routing_exports, {
|
|
|
4814
4814
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
4815
4815
|
});
|
|
4816
4816
|
import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
|
|
4817
|
-
import { readFileSync as readFileSync11, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync } from "fs";
|
|
4817
|
+
import { readFileSync as readFileSync11, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
4818
4818
|
import path16 from "path";
|
|
4819
4819
|
import os9 from "os";
|
|
4820
4820
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -5135,6 +5135,24 @@ function sendIntercom(targetSession) {
|
|
|
5135
5135
|
}
|
|
5136
5136
|
} catch {
|
|
5137
5137
|
}
|
|
5138
|
+
try {
|
|
5139
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
5140
|
+
const agent = baseAgentName(rawAgent);
|
|
5141
|
+
const taskDir = path16.join(process.cwd(), "exe", agent);
|
|
5142
|
+
if (existsSync12(taskDir)) {
|
|
5143
|
+
const files = readdirSync3(taskDir).filter(
|
|
5144
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
5145
|
+
);
|
|
5146
|
+
if (files.length === 0) {
|
|
5147
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
5148
|
+
return "debounced";
|
|
5149
|
+
}
|
|
5150
|
+
} else {
|
|
5151
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
5152
|
+
return "debounced";
|
|
5153
|
+
}
|
|
5154
|
+
} catch {
|
|
5155
|
+
}
|
|
5138
5156
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
5139
5157
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
5140
5158
|
transport.sendKeys(targetSession, "q");
|
|
@@ -5621,7 +5639,7 @@ __export(shard_manager_exports, {
|
|
|
5621
5639
|
shardExists: () => shardExists
|
|
5622
5640
|
});
|
|
5623
5641
|
import path18 from "path";
|
|
5624
|
-
import { existsSync as existsSync14, mkdirSync as mkdirSync7, readdirSync as
|
|
5642
|
+
import { existsSync as existsSync14, mkdirSync as mkdirSync7, readdirSync as readdirSync4 } from "fs";
|
|
5625
5643
|
import { createClient as createClient2 } from "@libsql/client";
|
|
5626
5644
|
function initShardManager(encryptionKey) {
|
|
5627
5645
|
_encryptionKey = encryptionKey;
|
|
@@ -5660,7 +5678,7 @@ function shardExists(projectName) {
|
|
|
5660
5678
|
}
|
|
5661
5679
|
function listShards() {
|
|
5662
5680
|
if (!existsSync14(SHARDS_DIR)) return [];
|
|
5663
|
-
return
|
|
5681
|
+
return readdirSync4(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
5664
5682
|
}
|
|
5665
5683
|
async function ensureShardSchema(client) {
|
|
5666
5684
|
await client.execute("PRAGMA journal_mode = WAL");
|
package/dist/lib/exe-daemon.js
CHANGED
|
@@ -5014,7 +5014,7 @@ __export(tmux_routing_exports, {
|
|
|
5014
5014
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
5015
5015
|
});
|
|
5016
5016
|
import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
|
|
5017
|
-
import { readFileSync as readFileSync11, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync } from "fs";
|
|
5017
|
+
import { readFileSync as readFileSync11, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6, existsSync as existsSync12, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
5018
5018
|
import path15 from "path";
|
|
5019
5019
|
import os8 from "os";
|
|
5020
5020
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
@@ -5335,6 +5335,24 @@ function sendIntercom(targetSession) {
|
|
|
5335
5335
|
}
|
|
5336
5336
|
} catch {
|
|
5337
5337
|
}
|
|
5338
|
+
try {
|
|
5339
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
5340
|
+
const agent = baseAgentName(rawAgent);
|
|
5341
|
+
const taskDir = path15.join(process.cwd(), "exe", agent);
|
|
5342
|
+
if (existsSync12(taskDir)) {
|
|
5343
|
+
const files = readdirSync3(taskDir).filter(
|
|
5344
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
5345
|
+
);
|
|
5346
|
+
if (files.length === 0) {
|
|
5347
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
5348
|
+
return "debounced";
|
|
5349
|
+
}
|
|
5350
|
+
} else {
|
|
5351
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
5352
|
+
return "debounced";
|
|
5353
|
+
}
|
|
5354
|
+
} catch {
|
|
5355
|
+
}
|
|
5338
5356
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
5339
5357
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
5340
5358
|
transport.sendKeys(targetSession, "q");
|
|
@@ -6820,7 +6838,7 @@ __export(shard_manager_exports, {
|
|
|
6820
6838
|
shardExists: () => shardExists
|
|
6821
6839
|
});
|
|
6822
6840
|
import path18 from "path";
|
|
6823
|
-
import { existsSync as existsSync16, mkdirSync as mkdirSync7, readdirSync as
|
|
6841
|
+
import { existsSync as existsSync16, mkdirSync as mkdirSync7, readdirSync as readdirSync4 } from "fs";
|
|
6824
6842
|
import { createClient as createClient2 } from "@libsql/client";
|
|
6825
6843
|
function initShardManager(encryptionKey) {
|
|
6826
6844
|
_encryptionKey = encryptionKey;
|
|
@@ -6859,7 +6877,7 @@ function shardExists(projectName) {
|
|
|
6859
6877
|
}
|
|
6860
6878
|
function listShards() {
|
|
6861
6879
|
if (!existsSync16(SHARDS_DIR)) return [];
|
|
6862
|
-
return
|
|
6880
|
+
return readdirSync4(SHARDS_DIR).filter((f) => f.endsWith(".db")).map((f) => f.replace(".db", ""));
|
|
6863
6881
|
}
|
|
6864
6882
|
async function ensureShardSchema(client) {
|
|
6865
6883
|
await client.execute("PRAGMA journal_mode = WAL");
|
package/dist/lib/messaging.js
CHANGED
|
@@ -548,7 +548,7 @@ var init_plan_limits = __esm({
|
|
|
548
548
|
|
|
549
549
|
// src/lib/tmux-routing.ts
|
|
550
550
|
import { execFileSync as execFileSync2, execSync as execSync4 } from "child_process";
|
|
551
|
-
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, existsSync as existsSync7, appendFileSync } from "fs";
|
|
551
|
+
import { readFileSync as readFileSync7, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, existsSync as existsSync7, appendFileSync, readdirSync } from "fs";
|
|
552
552
|
import path8 from "path";
|
|
553
553
|
import os5 from "os";
|
|
554
554
|
import { fileURLToPath } from "url";
|
|
@@ -733,6 +733,24 @@ function sendIntercom(targetSession) {
|
|
|
733
733
|
}
|
|
734
734
|
} catch {
|
|
735
735
|
}
|
|
736
|
+
try {
|
|
737
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
738
|
+
const agent = baseAgentName(rawAgent);
|
|
739
|
+
const taskDir = path8.join(process.cwd(), "exe", agent);
|
|
740
|
+
if (existsSync7(taskDir)) {
|
|
741
|
+
const files = readdirSync(taskDir).filter(
|
|
742
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
743
|
+
);
|
|
744
|
+
if (files.length === 0) {
|
|
745
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
746
|
+
return "debounced";
|
|
747
|
+
}
|
|
748
|
+
} else {
|
|
749
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
750
|
+
return "debounced";
|
|
751
|
+
}
|
|
752
|
+
} catch {
|
|
753
|
+
}
|
|
736
754
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
737
755
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
738
756
|
transport.sendKeys(targetSession, "q");
|
package/dist/lib/tasks.js
CHANGED
|
@@ -1320,7 +1320,7 @@ __export(tmux_routing_exports, {
|
|
|
1320
1320
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
1321
1321
|
});
|
|
1322
1322
|
import { execFileSync as execFileSync2, execSync as execSync4 } from "child_process";
|
|
1323
|
-
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync9, appendFileSync } from "fs";
|
|
1323
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync9, appendFileSync, readdirSync as readdirSync2 } from "fs";
|
|
1324
1324
|
import path9 from "path";
|
|
1325
1325
|
import os6 from "os";
|
|
1326
1326
|
import { fileURLToPath } from "url";
|
|
@@ -1641,6 +1641,24 @@ function sendIntercom(targetSession) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
} catch {
|
|
1643
1643
|
}
|
|
1644
|
+
try {
|
|
1645
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
1646
|
+
const agent = baseAgentName(rawAgent);
|
|
1647
|
+
const taskDir = path9.join(process.cwd(), "exe", agent);
|
|
1648
|
+
if (existsSync9(taskDir)) {
|
|
1649
|
+
const files = readdirSync2(taskDir).filter(
|
|
1650
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
1651
|
+
);
|
|
1652
|
+
if (files.length === 0) {
|
|
1653
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
1654
|
+
return "debounced";
|
|
1655
|
+
}
|
|
1656
|
+
} else {
|
|
1657
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
1658
|
+
return "debounced";
|
|
1659
|
+
}
|
|
1660
|
+
} catch {
|
|
1661
|
+
}
|
|
1644
1662
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
1645
1663
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
1646
1664
|
transport.sendKeys(targetSession, "q");
|
|
@@ -2662,7 +2680,7 @@ var init_tasks_crud = __esm({
|
|
|
2662
2680
|
|
|
2663
2681
|
// src/lib/tasks-review.ts
|
|
2664
2682
|
import path11 from "path";
|
|
2665
|
-
import { existsSync as existsSync11, readdirSync as
|
|
2683
|
+
import { existsSync as existsSync11, readdirSync as readdirSync3, unlinkSync as unlinkSync4 } from "fs";
|
|
2666
2684
|
async function countPendingReviews(sessionScope) {
|
|
2667
2685
|
const client = getClient();
|
|
2668
2686
|
if (sessionScope) {
|
|
@@ -2845,7 +2863,7 @@ async function cleanupReviewFile(row, taskFile, _baseDir) {
|
|
|
2845
2863
|
try {
|
|
2846
2864
|
const cacheDir = path11.join(EXE_AI_DIR, "session-cache");
|
|
2847
2865
|
if (existsSync11(cacheDir)) {
|
|
2848
|
-
for (const f of
|
|
2866
|
+
for (const f of readdirSync3(cacheDir)) {
|
|
2849
2867
|
if (f.startsWith("review-notified-")) {
|
|
2850
2868
|
unlinkSync4(path11.join(cacheDir, f));
|
|
2851
2869
|
}
|
package/dist/lib/tmux-routing.js
CHANGED
|
@@ -2907,7 +2907,7 @@ __export(tmux_routing_exports, {
|
|
|
2907
2907
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
2908
2908
|
});
|
|
2909
2909
|
import { execFileSync as execFileSync2, execSync as execSync6 } from "child_process";
|
|
2910
|
-
import { readFileSync as readFileSync10, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6, existsSync as existsSync11, appendFileSync } from "fs";
|
|
2910
|
+
import { readFileSync as readFileSync10, writeFileSync as writeFileSync7, mkdirSync as mkdirSync6, existsSync as existsSync11, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
2911
2911
|
import path14 from "path";
|
|
2912
2912
|
import os7 from "os";
|
|
2913
2913
|
import { fileURLToPath } from "url";
|
|
@@ -3228,6 +3228,24 @@ function sendIntercom(targetSession) {
|
|
|
3228
3228
|
}
|
|
3229
3229
|
} catch {
|
|
3230
3230
|
}
|
|
3231
|
+
try {
|
|
3232
|
+
const rawAgent = targetSession.split("-")[0] ?? targetSession;
|
|
3233
|
+
const agent = baseAgentName(rawAgent);
|
|
3234
|
+
const taskDir = path14.join(process.cwd(), "exe", agent);
|
|
3235
|
+
if (existsSync11(taskDir)) {
|
|
3236
|
+
const files = readdirSync3(taskDir).filter(
|
|
3237
|
+
(f) => f.endsWith(".md") && f !== "DONE.txt"
|
|
3238
|
+
);
|
|
3239
|
+
if (files.length === 0) {
|
|
3240
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task files in exe/${agent}/ \u2014 nothing to do)`);
|
|
3241
|
+
return "debounced";
|
|
3242
|
+
}
|
|
3243
|
+
} else {
|
|
3244
|
+
logIntercom(`SKIP \u2192 ${targetSession} (no task folder exe/${agent}/ \u2014 nothing to do)`);
|
|
3245
|
+
return "debounced";
|
|
3246
|
+
}
|
|
3247
|
+
} catch {
|
|
3248
|
+
}
|
|
3231
3249
|
if (transport.isPaneInCopyMode(targetSession)) {
|
|
3232
3250
|
logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
|
|
3233
3251
|
transport.sendKeys(targetSession, "q");
|