@askexenow/exe-os 0.8.65 → 0.8.69
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 +8 -7
- package/dist/bin/cli.js +204 -120
- package/dist/bin/exe-assign.js +11 -10
- package/dist/bin/exe-boot.js +83 -78
- package/dist/bin/exe-call.js +33 -1
- package/dist/bin/exe-cloud.js +3 -2
- package/dist/bin/exe-dispatch.js +31 -30
- package/dist/bin/exe-gateway.js +33 -32
- package/dist/bin/exe-heartbeat.js +21 -20
- package/dist/bin/exe-launch-agent.js +84 -19
- package/dist/bin/exe-link.js +16 -11
- package/dist/bin/exe-new-employee.js +20 -19
- package/dist/bin/exe-pending-messages.js +7 -6
- package/dist/bin/exe-pending-reviews.js +16 -15
- package/dist/bin/exe-rename.js +12 -11
- package/dist/bin/exe-review.js +4 -3
- package/dist/bin/exe-session-cleanup.js +20 -19
- package/dist/bin/exe-settings.js +3 -2
- package/dist/bin/exe-status.js +16 -15
- package/dist/bin/exe-team.js +4 -3
- package/dist/bin/git-sweep.js +31 -30
- package/dist/bin/install.js +284 -113
- package/dist/bin/scan-tasks.js +33 -32
- package/dist/bin/setup.js +114 -30
- package/dist/gateway/index.js +32 -31
- package/dist/hooks/bug-report-worker.js +58 -26
- package/dist/hooks/commit-complete.js +31 -30
- package/dist/hooks/ingest-worker.js +58 -57
- package/dist/hooks/post-compact.js +10 -9
- package/dist/hooks/pre-compact.js +31 -30
- package/dist/hooks/pre-tool-use.js +46 -14
- package/dist/hooks/prompt-ingest-worker.js +15 -14
- package/dist/hooks/prompt-submit.js +15 -14
- package/dist/hooks/response-ingest-worker.js +8 -7
- package/dist/hooks/session-end.js +14 -13
- package/dist/hooks/session-start.js +10 -9
- package/dist/hooks/stop.js +10 -9
- package/dist/hooks/subagent-stop.js +10 -9
- package/dist/hooks/summary-worker.js +41 -36
- package/dist/index.js +43 -42
- package/dist/lib/cloud-sync.js +16 -11
- package/dist/lib/employees.js +33 -1
- package/dist/lib/exe-daemon.js +56 -55
- package/dist/lib/messaging.js +9 -8
- package/dist/lib/tasks.js +27 -26
- package/dist/lib/tmux-routing.js +29 -28
- package/dist/mcp/server.js +94 -62
- package/dist/mcp/tools/create-task.js +60 -28
- package/dist/mcp/tools/list-tasks.js +10 -9
- package/dist/mcp/tools/send-message.js +11 -10
- package/dist/mcp/tools/update-task.js +21 -20
- package/dist/runtime/index.js +31 -30
- package/dist/tui/App.js +67 -35
- package/package.json +1 -1
package/dist/lib/tmux-routing.js
CHANGED
|
@@ -532,9 +532,10 @@ var init_config = __esm({
|
|
|
532
532
|
|
|
533
533
|
// src/lib/employees.ts
|
|
534
534
|
import { readFile as readFile2, writeFile as writeFile2, mkdir as mkdir2 } from "fs/promises";
|
|
535
|
-
import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync4 } from "fs";
|
|
535
|
+
import { existsSync as existsSync4, symlinkSync, readlinkSync, readFileSync as readFileSync4, renameSync as renameSync3, unlinkSync, writeFileSync as writeFileSync3 } from "fs";
|
|
536
536
|
import { execSync as execSync3 } from "child_process";
|
|
537
537
|
import path4 from "path";
|
|
538
|
+
import os4 from "os";
|
|
538
539
|
function loadEmployeesSync(employeesPath = EMPLOYEES_PATH) {
|
|
539
540
|
if (!existsSync4(employeesPath)) return [];
|
|
540
541
|
try {
|
|
@@ -563,7 +564,7 @@ var init_employees = __esm({
|
|
|
563
564
|
});
|
|
564
565
|
|
|
565
566
|
// src/lib/license.ts
|
|
566
|
-
import { readFileSync as readFileSync5, writeFileSync as
|
|
567
|
+
import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, existsSync as existsSync5, mkdirSync as mkdirSync3 } from "fs";
|
|
567
568
|
import { randomUUID } from "crypto";
|
|
568
569
|
import path5 from "path";
|
|
569
570
|
import { jwtVerify, importSPKI } from "jose";
|
|
@@ -666,11 +667,11 @@ var init_plan_limits = __esm({
|
|
|
666
667
|
// src/lib/notifications.ts
|
|
667
668
|
import crypto from "crypto";
|
|
668
669
|
import path7 from "path";
|
|
669
|
-
import
|
|
670
|
+
import os5 from "os";
|
|
670
671
|
import {
|
|
671
672
|
readFileSync as readFileSync7,
|
|
672
673
|
readdirSync,
|
|
673
|
-
unlinkSync,
|
|
674
|
+
unlinkSync as unlinkSync2,
|
|
674
675
|
existsSync as existsSync7,
|
|
675
676
|
rmdirSync
|
|
676
677
|
} from "fs";
|
|
@@ -1246,7 +1247,7 @@ var init_tasks_crud = __esm({
|
|
|
1246
1247
|
|
|
1247
1248
|
// src/lib/tasks-review.ts
|
|
1248
1249
|
import path9 from "path";
|
|
1249
|
-
import { existsSync as existsSync9, readdirSync as readdirSync2, unlinkSync as
|
|
1250
|
+
import { existsSync as existsSync9, readdirSync as readdirSync2, unlinkSync as unlinkSync3 } from "fs";
|
|
1250
1251
|
async function countPendingReviews(sessionScope) {
|
|
1251
1252
|
const client = getClient();
|
|
1252
1253
|
if (sessionScope) {
|
|
@@ -1431,7 +1432,7 @@ async function cleanupReviewFile(row, taskFile, _baseDir) {
|
|
|
1431
1432
|
if (existsSync9(cacheDir)) {
|
|
1432
1433
|
for (const f of readdirSync2(cacheDir)) {
|
|
1433
1434
|
if (f.startsWith("review-notified-")) {
|
|
1434
|
-
|
|
1435
|
+
unlinkSync3(path9.join(cacheDir, f));
|
|
1435
1436
|
}
|
|
1436
1437
|
}
|
|
1437
1438
|
}
|
|
@@ -2037,7 +2038,7 @@ __export(tasks_exports, {
|
|
|
2037
2038
|
writeCheckpoint: () => writeCheckpoint
|
|
2038
2039
|
});
|
|
2039
2040
|
import path12 from "path";
|
|
2040
|
-
import { writeFileSync as
|
|
2041
|
+
import { writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, unlinkSync as unlinkSync4 } from "fs";
|
|
2041
2042
|
async function createTask(input) {
|
|
2042
2043
|
const result = await createTaskCore(input);
|
|
2043
2044
|
if (!input.skipDispatch && result.status !== "blocked" && !process.env.VITEST) {
|
|
@@ -2060,10 +2061,10 @@ async function updateTask(input) {
|
|
|
2060
2061
|
const cachePath = path12.join(cacheDir, `current-task-${agent}.json`);
|
|
2061
2062
|
if (input.status === "in_progress") {
|
|
2062
2063
|
mkdirSync4(cacheDir, { recursive: true });
|
|
2063
|
-
|
|
2064
|
+
writeFileSync5(cachePath, JSON.stringify({ taskId, title: String(row.title) }));
|
|
2064
2065
|
} else if (input.status === "done" || input.status === "blocked" || input.status === "cancelled") {
|
|
2065
2066
|
try {
|
|
2066
|
-
|
|
2067
|
+
unlinkSync4(cachePath);
|
|
2067
2068
|
} catch {
|
|
2068
2069
|
}
|
|
2069
2070
|
}
|
|
@@ -2505,11 +2506,11 @@ __export(tmux_routing_exports, {
|
|
|
2505
2506
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
2506
2507
|
});
|
|
2507
2508
|
import { execFileSync as execFileSync2, execSync as execSync6 } from "child_process";
|
|
2508
|
-
import { readFileSync as readFileSync9, writeFileSync as
|
|
2509
|
+
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync10, appendFileSync } from "fs";
|
|
2509
2510
|
import path13 from "path";
|
|
2510
|
-
import
|
|
2511
|
+
import os6 from "os";
|
|
2511
2512
|
import { fileURLToPath } from "url";
|
|
2512
|
-
import { unlinkSync as
|
|
2513
|
+
import { unlinkSync as unlinkSync5 } from "fs";
|
|
2513
2514
|
function spawnLockPath(sessionName) {
|
|
2514
2515
|
return path13.join(SPAWN_LOCK_DIR, `${sessionName}.lock`);
|
|
2515
2516
|
}
|
|
@@ -2536,12 +2537,12 @@ function acquireSpawnLock(sessionName) {
|
|
|
2536
2537
|
} catch {
|
|
2537
2538
|
}
|
|
2538
2539
|
}
|
|
2539
|
-
|
|
2540
|
+
writeFileSync6(lockFile, JSON.stringify({ pid: process.pid, timestamp: Date.now() }));
|
|
2540
2541
|
return true;
|
|
2541
2542
|
}
|
|
2542
2543
|
function releaseSpawnLock(sessionName) {
|
|
2543
2544
|
try {
|
|
2544
|
-
|
|
2545
|
+
unlinkSync5(spawnLockPath(sessionName));
|
|
2545
2546
|
} catch {
|
|
2546
2547
|
}
|
|
2547
2548
|
}
|
|
@@ -2623,7 +2624,7 @@ function registerParentExe(sessionKey, parentExe, dispatchedBy) {
|
|
|
2623
2624
|
}
|
|
2624
2625
|
const rootExe = extractRootExe(parentExe) ?? parentExe;
|
|
2625
2626
|
const filePath = path13.join(SESSION_CACHE, `parent-exe-${sessionKey}.json`);
|
|
2626
|
-
|
|
2627
|
+
writeFileSync6(filePath, JSON.stringify({
|
|
2627
2628
|
parentExe: rootExe,
|
|
2628
2629
|
dispatchedBy: dispatchedBy || rootExe,
|
|
2629
2630
|
registeredAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -2710,7 +2711,7 @@ function readDebounceState() {
|
|
|
2710
2711
|
function writeDebounceState(state) {
|
|
2711
2712
|
try {
|
|
2712
2713
|
if (!existsSync10(SESSION_CACHE)) mkdirSync5(SESSION_CACHE, { recursive: true });
|
|
2713
|
-
|
|
2714
|
+
writeFileSync6(DEBOUNCE_FILE, JSON.stringify(state));
|
|
2714
2715
|
} catch {
|
|
2715
2716
|
}
|
|
2716
2717
|
}
|
|
@@ -2899,7 +2900,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2899
2900
|
const transport = getTransport();
|
|
2900
2901
|
const sessionName = employeeSessionName(employeeName, exeSession, opts?.instance);
|
|
2901
2902
|
const instanceLabel = opts?.instance != null && opts.instance > 0 ? `${employeeName}${opts.instance}` : employeeName;
|
|
2902
|
-
const logDir = path13.join(
|
|
2903
|
+
const logDir = path13.join(os6.homedir(), ".exe-os", "session-logs");
|
|
2903
2904
|
const logFile = path13.join(logDir, `${instanceLabel}-${Date.now()}.log`);
|
|
2904
2905
|
if (!existsSync10(logDir)) {
|
|
2905
2906
|
mkdirSync5(logDir, { recursive: true });
|
|
@@ -2915,7 +2916,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2915
2916
|
} catch {
|
|
2916
2917
|
}
|
|
2917
2918
|
try {
|
|
2918
|
-
const claudeJsonPath = path13.join(
|
|
2919
|
+
const claudeJsonPath = path13.join(os6.homedir(), ".claude.json");
|
|
2919
2920
|
let claudeJson = {};
|
|
2920
2921
|
try {
|
|
2921
2922
|
claudeJson = JSON.parse(readFileSync9(claudeJsonPath, "utf8"));
|
|
@@ -2926,11 +2927,11 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2926
2927
|
const trustDir = opts?.cwd ?? projectDir;
|
|
2927
2928
|
if (!projects[trustDir]) projects[trustDir] = {};
|
|
2928
2929
|
projects[trustDir].hasTrustDialogAccepted = true;
|
|
2929
|
-
|
|
2930
|
+
writeFileSync6(claudeJsonPath, JSON.stringify(claudeJson, null, 2) + "\n");
|
|
2930
2931
|
} catch {
|
|
2931
2932
|
}
|
|
2932
2933
|
try {
|
|
2933
|
-
const settingsDir = path13.join(
|
|
2934
|
+
const settingsDir = path13.join(os6.homedir(), ".claude", "projects");
|
|
2934
2935
|
const normalizedKey = (opts?.cwd ?? projectDir).replace(/\//g, "-").replace(/^-/, "");
|
|
2935
2936
|
const projSettingsDir = path13.join(settingsDir, normalizedKey);
|
|
2936
2937
|
const settingsPath = path13.join(projSettingsDir, "settings.json");
|
|
@@ -2965,7 +2966,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2965
2966
|
perms.allow = allow;
|
|
2966
2967
|
settings.permissions = perms;
|
|
2967
2968
|
mkdirSync5(projSettingsDir, { recursive: true });
|
|
2968
|
-
|
|
2969
|
+
writeFileSync6(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
2969
2970
|
}
|
|
2970
2971
|
} catch {
|
|
2971
2972
|
}
|
|
@@ -2978,7 +2979,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
2978
2979
|
let legacyFallbackWarned = false;
|
|
2979
2980
|
if (!useExeAgent && !useBinSymlink) {
|
|
2980
2981
|
const identityPath = path13.join(
|
|
2981
|
-
|
|
2982
|
+
os6.homedir(),
|
|
2982
2983
|
".exe-os",
|
|
2983
2984
|
"identity",
|
|
2984
2985
|
`${employeeName}.md`
|
|
@@ -3008,7 +3009,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
3008
3009
|
}
|
|
3009
3010
|
let sessionContextFlag = "";
|
|
3010
3011
|
try {
|
|
3011
|
-
const ctxDir = path13.join(
|
|
3012
|
+
const ctxDir = path13.join(os6.homedir(), ".exe-os", "session-cache");
|
|
3012
3013
|
mkdirSync5(ctxDir, { recursive: true });
|
|
3013
3014
|
const ctxFile = path13.join(ctxDir, `session-context-${sessionName}.md`);
|
|
3014
3015
|
const ctxContent = [
|
|
@@ -3017,7 +3018,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
3017
3018
|
`Your parent exe session is ${exeSession}.`,
|
|
3018
3019
|
`Your employees (if any) use the -${exeSession} suffix (e.g., tom-${exeSession}).`
|
|
3019
3020
|
].join("\n");
|
|
3020
|
-
|
|
3021
|
+
writeFileSync6(ctxFile, ctxContent);
|
|
3021
3022
|
sessionContextFlag = ` --append-system-prompt-file ${ctxFile}`;
|
|
3022
3023
|
} catch {
|
|
3023
3024
|
}
|
|
@@ -3056,7 +3057,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
3056
3057
|
try {
|
|
3057
3058
|
const mySession = getMySession();
|
|
3058
3059
|
const dispatchInfo = path13.join(SESSION_CACHE, `dispatch-info-${sessionName}.json`);
|
|
3059
|
-
|
|
3060
|
+
writeFileSync6(dispatchInfo, JSON.stringify({
|
|
3060
3061
|
dispatchedBy: mySession,
|
|
3061
3062
|
rootExe: exeSession,
|
|
3062
3063
|
provider: useBinSymlink ? ccProvider : useExeAgent ? opts.provider : "anthropic",
|
|
@@ -3118,13 +3119,13 @@ var init_tmux_routing = __esm({
|
|
|
3118
3119
|
init_provider_table();
|
|
3119
3120
|
init_intercom_queue();
|
|
3120
3121
|
init_plan_limits();
|
|
3121
|
-
SPAWN_LOCK_DIR = path13.join(
|
|
3122
|
-
SESSION_CACHE = path13.join(
|
|
3122
|
+
SPAWN_LOCK_DIR = path13.join(os6.homedir(), ".exe-os", "spawn-locks");
|
|
3123
|
+
SESSION_CACHE = path13.join(os6.homedir(), ".exe-os", "session-cache");
|
|
3123
3124
|
BEHAVIORS_EXPORT_TIMEOUT_MS = 1e4;
|
|
3124
3125
|
VALID_SESSION_NAME = /^[a-z]+\d*-[a-zA-Z0-9_]+$/;
|
|
3125
3126
|
VERIFY_PANE_LINES = 200;
|
|
3126
3127
|
INTERCOM_DEBOUNCE_MS = 3e4;
|
|
3127
|
-
INTERCOM_LOG2 = path13.join(
|
|
3128
|
+
INTERCOM_LOG2 = path13.join(os6.homedir(), ".exe-os", "intercom.log");
|
|
3128
3129
|
DEBOUNCE_FILE = path13.join(SESSION_CACHE, "intercom-debounce.json");
|
|
3129
3130
|
DEBOUNCE_CLEANUP_AGE_MS = 5 * 60 * 1e3;
|
|
3130
3131
|
BUSY_PATTERN = /[✻✽✶✳·].*…|Running…/;
|