@askexenow/exe-os 0.8.32 → 0.8.36
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/backfill-conversations.js +332 -348
- package/dist/bin/backfill-responses.js +72 -12
- package/dist/bin/backfill-vectors.js +72 -12
- package/dist/bin/cleanup-stale-review-tasks.js +63 -3
- package/dist/bin/cli.js +1518 -1122
- package/dist/bin/exe-agent.js +4 -4
- package/dist/bin/exe-assign.js +80 -18
- package/dist/bin/exe-boot.js +408 -89
- package/dist/bin/exe-call.js +83 -24
- package/dist/bin/exe-dispatch.js +18 -10
- package/dist/bin/exe-doctor.js +63 -3
- package/dist/bin/exe-export-behaviors.js +64 -3
- package/dist/bin/exe-forget.js +69 -4
- package/dist/bin/exe-gateway.js +121 -36
- package/dist/bin/exe-heartbeat.js +77 -13
- package/dist/bin/exe-kill.js +64 -3
- package/dist/bin/exe-launch-agent.js +162 -35
- package/dist/bin/exe-link.js +946 -0
- package/dist/bin/exe-new-employee.js +121 -36
- package/dist/bin/exe-pending-messages.js +72 -7
- package/dist/bin/exe-pending-notifications.js +63 -3
- package/dist/bin/exe-pending-reviews.js +75 -10
- package/dist/bin/exe-rename.js +1287 -0
- package/dist/bin/exe-review.js +64 -4
- package/dist/bin/exe-search.js +79 -13
- package/dist/bin/exe-session-cleanup.js +91 -26
- package/dist/bin/exe-status.js +64 -4
- package/dist/bin/exe-team.js +64 -4
- package/dist/bin/git-sweep.js +71 -4
- package/dist/bin/graph-backfill.js +64 -3
- package/dist/bin/graph-export.js +64 -3
- package/dist/bin/install.js +3 -3
- package/dist/bin/scan-tasks.js +71 -4
- package/dist/bin/setup.js +156 -38
- package/dist/bin/shard-migrate.js +64 -3
- package/dist/bin/wiki-sync.js +64 -3
- package/dist/gateway/index.js +122 -37
- package/dist/hooks/bug-report-worker.js +209 -23
- package/dist/hooks/commit-complete.js +71 -4
- package/dist/hooks/error-recall.js +79 -13
- package/dist/hooks/ingest-worker.js +129 -43
- package/dist/hooks/instructions-loaded.js +71 -4
- package/dist/hooks/notification.js +71 -4
- package/dist/hooks/post-compact.js +71 -4
- package/dist/hooks/pre-compact.js +71 -4
- package/dist/hooks/pre-tool-use.js +413 -194
- package/dist/hooks/prompt-ingest-worker.js +82 -22
- package/dist/hooks/prompt-submit.js +103 -37
- package/dist/hooks/response-ingest-worker.js +87 -22
- package/dist/hooks/session-end.js +71 -4
- package/dist/hooks/session-start.js +79 -13
- package/dist/hooks/stop.js +71 -4
- package/dist/hooks/subagent-stop.js +71 -4
- package/dist/hooks/summary-worker.js +303 -50
- package/dist/index.js +134 -46
- package/dist/lib/cloud-sync.js +209 -15
- package/dist/lib/consolidation.js +4 -4
- package/dist/lib/database.js +64 -2
- package/dist/lib/device-registry.js +70 -3
- package/dist/lib/employee-templates.js +48 -22
- package/dist/lib/employees.js +34 -1
- package/dist/lib/exe-daemon.js +136 -53
- package/dist/lib/hybrid-search.js +79 -13
- package/dist/lib/identity-templates.js +57 -6
- package/dist/lib/identity.js +3 -3
- package/dist/lib/messaging.js +22 -14
- package/dist/lib/reminders.js +3 -3
- package/dist/lib/schedules.js +63 -3
- package/dist/lib/skill-learning.js +3 -3
- package/dist/lib/status-brief.js +63 -5
- package/dist/lib/store.js +64 -3
- package/dist/lib/task-router.js +4 -2
- package/dist/lib/tasks.js +48 -21
- package/dist/lib/tmux-routing.js +47 -20
- package/dist/mcp/server.js +727 -58
- package/dist/mcp/tools/complete-reminder.js +3 -3
- package/dist/mcp/tools/create-reminder.js +3 -3
- package/dist/mcp/tools/create-task.js +151 -24
- package/dist/mcp/tools/deactivate-behavior.js +3 -3
- package/dist/mcp/tools/list-reminders.js +3 -3
- package/dist/mcp/tools/list-tasks.js +17 -8
- package/dist/mcp/tools/send-message.js +24 -16
- package/dist/mcp/tools/update-task.js +25 -16
- package/dist/runtime/index.js +112 -24
- package/dist/tui/App.js +139 -36
- package/package.json +6 -2
- package/src/commands/exe/rename.md +12 -0
package/dist/lib/tasks.js
CHANGED
|
@@ -19,19 +19,27 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
};
|
|
20
20
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
21
|
|
|
22
|
+
// src/lib/db-retry.ts
|
|
23
|
+
var init_db_retry = __esm({
|
|
24
|
+
"src/lib/db-retry.ts"() {
|
|
25
|
+
"use strict";
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
|
|
22
29
|
// src/lib/database.ts
|
|
23
30
|
import { createClient } from "@libsql/client";
|
|
24
31
|
function getClient() {
|
|
25
|
-
if (!
|
|
32
|
+
if (!_resilientClient) {
|
|
26
33
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
27
34
|
}
|
|
28
|
-
return
|
|
35
|
+
return _resilientClient;
|
|
29
36
|
}
|
|
30
|
-
var
|
|
37
|
+
var _resilientClient;
|
|
31
38
|
var init_database = __esm({
|
|
32
39
|
"src/lib/database.ts"() {
|
|
33
40
|
"use strict";
|
|
34
|
-
|
|
41
|
+
init_db_retry();
|
|
42
|
+
_resilientClient = null;
|
|
35
43
|
}
|
|
36
44
|
});
|
|
37
45
|
|
|
@@ -679,20 +687,38 @@ var init_tasks_crud = __esm({
|
|
|
679
687
|
|
|
680
688
|
// src/lib/employees.ts
|
|
681
689
|
import { readFile as readFile2, writeFile as writeFile3, mkdir as mkdir3 } from "fs/promises";
|
|
682
|
-
import { existsSync as existsSync4, symlinkSync, readlinkSync } from "fs";
|
|
690
|
+
import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync4 } from "fs";
|
|
683
691
|
import { execSync as execSync2 } from "child_process";
|
|
684
692
|
import path4 from "path";
|
|
685
|
-
|
|
693
|
+
function loadEmployeesSync(employeesPath = EMPLOYEES_PATH) {
|
|
694
|
+
if (!existsSync4(employeesPath)) return [];
|
|
695
|
+
try {
|
|
696
|
+
return JSON.parse(readFileSync4(employeesPath, "utf-8"));
|
|
697
|
+
} catch {
|
|
698
|
+
return [];
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
function getEmployee(employees, name) {
|
|
702
|
+
return employees.find((e) => e.name.toLowerCase() === name.toLowerCase());
|
|
703
|
+
}
|
|
704
|
+
function isMultiInstance(agentName, employees) {
|
|
705
|
+
const roster = employees ?? loadEmployeesSync();
|
|
706
|
+
const emp = getEmployee(roster, agentName);
|
|
707
|
+
if (!emp) return false;
|
|
708
|
+
return MULTI_INSTANCE_ROLES.has(emp.role.toLowerCase());
|
|
709
|
+
}
|
|
710
|
+
var EMPLOYEES_PATH, MULTI_INSTANCE_ROLES;
|
|
686
711
|
var init_employees = __esm({
|
|
687
712
|
"src/lib/employees.ts"() {
|
|
688
713
|
"use strict";
|
|
689
714
|
init_config();
|
|
690
715
|
EMPLOYEES_PATH = path4.join(EXE_AI_DIR, "exe-employees.json");
|
|
716
|
+
MULTI_INSTANCE_ROLES = /* @__PURE__ */ new Set(["principal engineer", "content production specialist", "staff code reviewer"]);
|
|
691
717
|
}
|
|
692
718
|
});
|
|
693
719
|
|
|
694
720
|
// src/lib/session-registry.ts
|
|
695
|
-
import { readFileSync as
|
|
721
|
+
import { readFileSync as readFileSync5, writeFileSync, mkdirSync, existsSync as existsSync5 } from "fs";
|
|
696
722
|
import path5 from "path";
|
|
697
723
|
import os3 from "os";
|
|
698
724
|
function registerSession(entry) {
|
|
@@ -711,7 +737,7 @@ function registerSession(entry) {
|
|
|
711
737
|
}
|
|
712
738
|
function listSessions() {
|
|
713
739
|
try {
|
|
714
|
-
const raw =
|
|
740
|
+
const raw = readFileSync5(REGISTRY_PATH, "utf8");
|
|
715
741
|
return JSON.parse(raw);
|
|
716
742
|
} catch {
|
|
717
743
|
return [];
|
|
@@ -941,7 +967,7 @@ var init_provider_table = __esm({
|
|
|
941
967
|
});
|
|
942
968
|
|
|
943
969
|
// src/lib/intercom-queue.ts
|
|
944
|
-
import { readFileSync as
|
|
970
|
+
import { readFileSync as readFileSync6, writeFileSync as writeFileSync2, renameSync as renameSync2, existsSync as existsSync6, mkdirSync as mkdirSync2 } from "fs";
|
|
945
971
|
import path6 from "path";
|
|
946
972
|
import os4 from "os";
|
|
947
973
|
function ensureDir() {
|
|
@@ -951,7 +977,7 @@ function ensureDir() {
|
|
|
951
977
|
function readQueue() {
|
|
952
978
|
try {
|
|
953
979
|
if (!existsSync6(QUEUE_PATH)) return [];
|
|
954
|
-
return JSON.parse(
|
|
980
|
+
return JSON.parse(readFileSync6(QUEUE_PATH, "utf8"));
|
|
955
981
|
} catch {
|
|
956
982
|
return [];
|
|
957
983
|
}
|
|
@@ -990,7 +1016,7 @@ var init_intercom_queue = __esm({
|
|
|
990
1016
|
});
|
|
991
1017
|
|
|
992
1018
|
// src/lib/license.ts
|
|
993
|
-
import { readFileSync as
|
|
1019
|
+
import { readFileSync as readFileSync7, writeFileSync as writeFileSync3, existsSync as existsSync7, mkdirSync as mkdirSync3 } from "fs";
|
|
994
1020
|
import { randomUUID } from "crypto";
|
|
995
1021
|
import path7 from "path";
|
|
996
1022
|
import { jwtVerify, importSPKI } from "jose";
|
|
@@ -1013,12 +1039,12 @@ var init_license = __esm({
|
|
|
1013
1039
|
});
|
|
1014
1040
|
|
|
1015
1041
|
// src/lib/plan-limits.ts
|
|
1016
|
-
import { readFileSync as
|
|
1042
|
+
import { readFileSync as readFileSync8, existsSync as existsSync8 } from "fs";
|
|
1017
1043
|
import path8 from "path";
|
|
1018
1044
|
function getLicenseSync() {
|
|
1019
1045
|
try {
|
|
1020
1046
|
if (!existsSync8(CACHE_PATH2)) return freeLicense();
|
|
1021
|
-
const raw = JSON.parse(
|
|
1047
|
+
const raw = JSON.parse(readFileSync8(CACHE_PATH2, "utf8"));
|
|
1022
1048
|
if (!raw.token || typeof raw.token !== "string") return freeLicense();
|
|
1023
1049
|
const parts = raw.token.split(".");
|
|
1024
1050
|
if (parts.length !== 3) return freeLicense();
|
|
@@ -1057,7 +1083,7 @@ function assertEmployeeLimitSync(rosterPath) {
|
|
|
1057
1083
|
let count = 0;
|
|
1058
1084
|
try {
|
|
1059
1085
|
if (existsSync8(filePath)) {
|
|
1060
|
-
const raw =
|
|
1086
|
+
const raw = readFileSync8(filePath, "utf8");
|
|
1061
1087
|
const employees = JSON.parse(raw);
|
|
1062
1088
|
count = Array.isArray(employees) ? employees.length : 0;
|
|
1063
1089
|
}
|
|
@@ -1092,7 +1118,7 @@ var init_plan_limits = __esm({
|
|
|
1092
1118
|
|
|
1093
1119
|
// src/lib/tmux-routing.ts
|
|
1094
1120
|
import { execFileSync as execFileSync2, execSync as execSync5 } from "child_process";
|
|
1095
|
-
import { readFileSync as
|
|
1121
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, existsSync as existsSync9, appendFileSync } from "fs";
|
|
1096
1122
|
import path9 from "path";
|
|
1097
1123
|
import os5 from "os";
|
|
1098
1124
|
import { fileURLToPath } from "url";
|
|
@@ -1141,7 +1167,7 @@ function extractRootExe(name) {
|
|
|
1141
1167
|
}
|
|
1142
1168
|
function getParentExe(sessionKey) {
|
|
1143
1169
|
try {
|
|
1144
|
-
const data = JSON.parse(
|
|
1170
|
+
const data = JSON.parse(readFileSync9(path9.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
|
|
1145
1171
|
return data.parentExe || null;
|
|
1146
1172
|
} catch {
|
|
1147
1173
|
return null;
|
|
@@ -1149,7 +1175,7 @@ function getParentExe(sessionKey) {
|
|
|
1149
1175
|
}
|
|
1150
1176
|
function getDispatchedBy(sessionKey) {
|
|
1151
1177
|
try {
|
|
1152
|
-
const data = JSON.parse(
|
|
1178
|
+
const data = JSON.parse(readFileSync9(
|
|
1153
1179
|
path9.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`),
|
|
1154
1180
|
"utf8"
|
|
1155
1181
|
));
|
|
@@ -1186,7 +1212,7 @@ function findFreeInstance(employeeName, exeSession, maxInstances = 10, isAlive =
|
|
|
1186
1212
|
function readDebounceState() {
|
|
1187
1213
|
try {
|
|
1188
1214
|
if (!existsSync9(DEBOUNCE_FILE)) return {};
|
|
1189
|
-
return JSON.parse(
|
|
1215
|
+
return JSON.parse(readFileSync9(DEBOUNCE_FILE, "utf8"));
|
|
1190
1216
|
} catch {
|
|
1191
1217
|
return {};
|
|
1192
1218
|
}
|
|
@@ -1382,7 +1408,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
1382
1408
|
const claudeJsonPath = path9.join(os5.homedir(), ".claude.json");
|
|
1383
1409
|
let claudeJson = {};
|
|
1384
1410
|
try {
|
|
1385
|
-
claudeJson = JSON.parse(
|
|
1411
|
+
claudeJson = JSON.parse(readFileSync9(claudeJsonPath, "utf8"));
|
|
1386
1412
|
} catch {
|
|
1387
1413
|
}
|
|
1388
1414
|
if (!claudeJson.projects) claudeJson.projects = {};
|
|
@@ -1400,7 +1426,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
1400
1426
|
const settingsPath = path9.join(projSettingsDir, "settings.json");
|
|
1401
1427
|
let settings = {};
|
|
1402
1428
|
try {
|
|
1403
|
-
settings = JSON.parse(
|
|
1429
|
+
settings = JSON.parse(readFileSync9(settingsPath, "utf8"));
|
|
1404
1430
|
} catch {
|
|
1405
1431
|
}
|
|
1406
1432
|
const perms = settings.permissions ?? {};
|
|
@@ -1947,7 +1973,7 @@ async function dispatchTaskToEmployee(input) {
|
|
|
1947
1973
|
} else {
|
|
1948
1974
|
const projectDir = input.projectDir ?? process.cwd();
|
|
1949
1975
|
const result = ensureEmployee(input.assignedTo, exeSession, projectDir, {
|
|
1950
|
-
autoInstance: input.assignedTo
|
|
1976
|
+
autoInstance: isMultiInstance(input.assignedTo)
|
|
1951
1977
|
});
|
|
1952
1978
|
if (result.status === "failed") {
|
|
1953
1979
|
process.stderr.write(
|
|
@@ -1982,6 +2008,7 @@ var init_tasks_notify = __esm({
|
|
|
1982
2008
|
init_session_key();
|
|
1983
2009
|
init_notifications();
|
|
1984
2010
|
init_transport();
|
|
2011
|
+
init_employees();
|
|
1985
2012
|
}
|
|
1986
2013
|
});
|
|
1987
2014
|
|
package/dist/lib/tmux-routing.js
CHANGED
|
@@ -317,19 +317,27 @@ var init_intercom_queue = __esm({
|
|
|
317
317
|
}
|
|
318
318
|
});
|
|
319
319
|
|
|
320
|
+
// src/lib/db-retry.ts
|
|
321
|
+
var init_db_retry = __esm({
|
|
322
|
+
"src/lib/db-retry.ts"() {
|
|
323
|
+
"use strict";
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
|
|
320
327
|
// src/lib/database.ts
|
|
321
328
|
import { createClient } from "@libsql/client";
|
|
322
329
|
function getClient() {
|
|
323
|
-
if (!
|
|
330
|
+
if (!_resilientClient) {
|
|
324
331
|
throw new Error("Database client not initialized. Call initDatabase() first.");
|
|
325
332
|
}
|
|
326
|
-
return
|
|
333
|
+
return _resilientClient;
|
|
327
334
|
}
|
|
328
|
-
var
|
|
335
|
+
var _resilientClient;
|
|
329
336
|
var init_database = __esm({
|
|
330
337
|
"src/lib/database.ts"() {
|
|
331
338
|
"use strict";
|
|
332
|
-
|
|
339
|
+
init_db_retry();
|
|
340
|
+
_resilientClient = null;
|
|
333
341
|
}
|
|
334
342
|
});
|
|
335
343
|
|
|
@@ -524,20 +532,38 @@ var init_config = __esm({
|
|
|
524
532
|
|
|
525
533
|
// src/lib/employees.ts
|
|
526
534
|
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
527
|
-
import { existsSync as existsSync4, symlinkSync, readlinkSync } from "fs";
|
|
535
|
+
import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync4 } from "fs";
|
|
528
536
|
import { execSync as execSync3 } from "child_process";
|
|
529
537
|
import path4 from "path";
|
|
530
|
-
|
|
538
|
+
function loadEmployeesSync(employeesPath = EMPLOYEES_PATH) {
|
|
539
|
+
if (!existsSync4(employeesPath)) return [];
|
|
540
|
+
try {
|
|
541
|
+
return JSON.parse(readFileSync4(employeesPath, "utf-8"));
|
|
542
|
+
} catch {
|
|
543
|
+
return [];
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
function getEmployee(employees, name) {
|
|
547
|
+
return employees.find((e) => e.name.toLowerCase() === name.toLowerCase());
|
|
548
|
+
}
|
|
549
|
+
function isMultiInstance(agentName, employees) {
|
|
550
|
+
const roster = employees ?? loadEmployeesSync();
|
|
551
|
+
const emp = getEmployee(roster, agentName);
|
|
552
|
+
if (!emp) return false;
|
|
553
|
+
return MULTI_INSTANCE_ROLES.has(emp.role.toLowerCase());
|
|
554
|
+
}
|
|
555
|
+
var EMPLOYEES_PATH, MULTI_INSTANCE_ROLES;
|
|
531
556
|
var init_employees = __esm({
|
|
532
557
|
"src/lib/employees.ts"() {
|
|
533
558
|
"use strict";
|
|
534
559
|
init_config();
|
|
535
560
|
EMPLOYEES_PATH = path4.join(EXE_AI_DIR, "exe-employees.json");
|
|
561
|
+
MULTI_INSTANCE_ROLES = /* @__PURE__ */ new Set(["principal engineer", "content production specialist", "staff code reviewer"]);
|
|
536
562
|
}
|
|
537
563
|
});
|
|
538
564
|
|
|
539
565
|
// src/lib/license.ts
|
|
540
|
-
import { readFileSync as
|
|
566
|
+
import { readFileSync as readFileSync5, writeFileSync as writeFileSync3, existsSync as existsSync5, mkdirSync as mkdirSync3 } from "fs";
|
|
541
567
|
import { randomUUID } from "crypto";
|
|
542
568
|
import path5 from "path";
|
|
543
569
|
import { jwtVerify, importSPKI } from "jose";
|
|
@@ -560,12 +586,12 @@ var init_license = __esm({
|
|
|
560
586
|
});
|
|
561
587
|
|
|
562
588
|
// src/lib/plan-limits.ts
|
|
563
|
-
import { readFileSync as
|
|
589
|
+
import { readFileSync as readFileSync6, existsSync as existsSync6 } from "fs";
|
|
564
590
|
import path6 from "path";
|
|
565
591
|
function getLicenseSync() {
|
|
566
592
|
try {
|
|
567
593
|
if (!existsSync6(CACHE_PATH2)) return freeLicense();
|
|
568
|
-
const raw = JSON.parse(
|
|
594
|
+
const raw = JSON.parse(readFileSync6(CACHE_PATH2, "utf8"));
|
|
569
595
|
if (!raw.token || typeof raw.token !== "string") return freeLicense();
|
|
570
596
|
const parts = raw.token.split(".");
|
|
571
597
|
if (parts.length !== 3) return freeLicense();
|
|
@@ -604,7 +630,7 @@ function assertEmployeeLimitSync(rosterPath) {
|
|
|
604
630
|
let count = 0;
|
|
605
631
|
try {
|
|
606
632
|
if (existsSync6(filePath)) {
|
|
607
|
-
const raw =
|
|
633
|
+
const raw = readFileSync6(filePath, "utf8");
|
|
608
634
|
const employees = JSON.parse(raw);
|
|
609
635
|
count = Array.isArray(employees) ? employees.length : 0;
|
|
610
636
|
}
|
|
@@ -642,7 +668,7 @@ import crypto from "crypto";
|
|
|
642
668
|
import path7 from "path";
|
|
643
669
|
import os4 from "os";
|
|
644
670
|
import {
|
|
645
|
-
readFileSync as
|
|
671
|
+
readFileSync as readFileSync7,
|
|
646
672
|
readdirSync,
|
|
647
673
|
unlinkSync,
|
|
648
674
|
existsSync as existsSync7,
|
|
@@ -728,7 +754,7 @@ import crypto3 from "crypto";
|
|
|
728
754
|
import path8 from "path";
|
|
729
755
|
import { execSync as execSync4 } from "child_process";
|
|
730
756
|
import { mkdir as mkdir3, writeFile as writeFile3, appendFile } from "fs/promises";
|
|
731
|
-
import { existsSync as existsSync8, readFileSync as
|
|
757
|
+
import { existsSync as existsSync8, readFileSync as readFileSync8 } from "fs";
|
|
732
758
|
async function writeCheckpoint(input) {
|
|
733
759
|
const client = getClient();
|
|
734
760
|
const row = await resolveTask(client, input.taskId);
|
|
@@ -1105,7 +1131,7 @@ async function ensureGitignoreExe(baseDir) {
|
|
|
1105
1131
|
const gitignorePath = path8.join(baseDir, ".gitignore");
|
|
1106
1132
|
try {
|
|
1107
1133
|
if (existsSync8(gitignorePath)) {
|
|
1108
|
-
const content =
|
|
1134
|
+
const content = readFileSync8(gitignorePath, "utf-8");
|
|
1109
1135
|
if (/^\/?exe\/?$/m.test(content)) return;
|
|
1110
1136
|
await appendFile(gitignorePath, "\n# Employee task assignments (private)\n/exe/\n");
|
|
1111
1137
|
} else {
|
|
@@ -1481,7 +1507,7 @@ async function dispatchTaskToEmployee(input) {
|
|
|
1481
1507
|
} else {
|
|
1482
1508
|
const projectDir = input.projectDir ?? process.cwd();
|
|
1483
1509
|
const result = ensureEmployee(input.assignedTo, exeSession, projectDir, {
|
|
1484
|
-
autoInstance: input.assignedTo
|
|
1510
|
+
autoInstance: isMultiInstance(input.assignedTo)
|
|
1485
1511
|
});
|
|
1486
1512
|
if (result.status === "failed") {
|
|
1487
1513
|
process.stderr.write(
|
|
@@ -1516,6 +1542,7 @@ var init_tasks_notify = __esm({
|
|
|
1516
1542
|
init_session_key();
|
|
1517
1543
|
init_notifications();
|
|
1518
1544
|
init_transport();
|
|
1545
|
+
init_employees();
|
|
1519
1546
|
}
|
|
1520
1547
|
});
|
|
1521
1548
|
|
|
@@ -2268,7 +2295,7 @@ var init_capacity_monitor = __esm({
|
|
|
2268
2295
|
|
|
2269
2296
|
// src/lib/tmux-routing.ts
|
|
2270
2297
|
import { execFileSync as execFileSync2, execSync as execSync6 } from "child_process";
|
|
2271
|
-
import { readFileSync as
|
|
2298
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync5, mkdirSync as mkdirSync5, existsSync as existsSync10, appendFileSync } from "fs";
|
|
2272
2299
|
import path13 from "path";
|
|
2273
2300
|
import os5 from "os";
|
|
2274
2301
|
import { fileURLToPath } from "url";
|
|
@@ -2335,7 +2362,7 @@ function registerParentExe(sessionKey, parentExe, dispatchedBy) {
|
|
|
2335
2362
|
}
|
|
2336
2363
|
function getParentExe(sessionKey) {
|
|
2337
2364
|
try {
|
|
2338
|
-
const data = JSON.parse(
|
|
2365
|
+
const data = JSON.parse(readFileSync9(path13.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`), "utf8"));
|
|
2339
2366
|
return data.parentExe || null;
|
|
2340
2367
|
} catch {
|
|
2341
2368
|
return null;
|
|
@@ -2343,7 +2370,7 @@ function getParentExe(sessionKey) {
|
|
|
2343
2370
|
}
|
|
2344
2371
|
function getDispatchedBy(sessionKey) {
|
|
2345
2372
|
try {
|
|
2346
|
-
const data = JSON.parse(
|
|
2373
|
+
const data = JSON.parse(readFileSync9(
|
|
2347
2374
|
path13.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`),
|
|
2348
2375
|
"utf8"
|
|
2349
2376
|
));
|
|
@@ -2406,7 +2433,7 @@ async function verifyPaneAtCapacity(sessionName) {
|
|
|
2406
2433
|
function readDebounceState() {
|
|
2407
2434
|
try {
|
|
2408
2435
|
if (!existsSync10(DEBOUNCE_FILE)) return {};
|
|
2409
|
-
return JSON.parse(
|
|
2436
|
+
return JSON.parse(readFileSync9(DEBOUNCE_FILE, "utf8"));
|
|
2410
2437
|
} catch {
|
|
2411
2438
|
return {};
|
|
2412
2439
|
}
|
|
@@ -2606,7 +2633,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2606
2633
|
const claudeJsonPath = path13.join(os5.homedir(), ".claude.json");
|
|
2607
2634
|
let claudeJson = {};
|
|
2608
2635
|
try {
|
|
2609
|
-
claudeJson = JSON.parse(
|
|
2636
|
+
claudeJson = JSON.parse(readFileSync9(claudeJsonPath, "utf8"));
|
|
2610
2637
|
} catch {
|
|
2611
2638
|
}
|
|
2612
2639
|
if (!claudeJson.projects) claudeJson.projects = {};
|
|
@@ -2624,7 +2651,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2624
2651
|
const settingsPath = path13.join(projSettingsDir, "settings.json");
|
|
2625
2652
|
let settings = {};
|
|
2626
2653
|
try {
|
|
2627
|
-
settings = JSON.parse(
|
|
2654
|
+
settings = JSON.parse(readFileSync9(settingsPath, "utf8"));
|
|
2628
2655
|
} catch {
|
|
2629
2656
|
}
|
|
2630
2657
|
const perms = settings.permissions ?? {};
|