@askexenow/exe-os 0.9.84 → 0.9.86
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/agentic-ontology-backfill.js +32 -14
- package/dist/bin/agentic-reflection-backfill.js +32 -14
- package/dist/bin/agentic-semantic-label.js +32 -14
- package/dist/bin/backfill-conversations.js +32 -14
- package/dist/bin/backfill-responses.js +32 -14
- package/dist/bin/backfill-vectors.js +32 -14
- package/dist/bin/bulk-sync-postgres.js +32 -14
- package/dist/bin/cleanup-stale-review-tasks.js +35 -17
- package/dist/bin/cli.js +224 -86
- package/dist/bin/exe-assign.js +32 -14
- package/dist/bin/exe-boot.js +57 -39
- package/dist/bin/exe-cloud.js +22 -4
- package/dist/bin/exe-dispatch.js +43 -25
- package/dist/bin/exe-doctor.js +22 -4
- package/dist/bin/exe-export-behaviors.js +32 -14
- package/dist/bin/exe-forget.js +32 -14
- package/dist/bin/exe-gateway.js +47 -29
- package/dist/bin/exe-heartbeat.js +37 -19
- package/dist/bin/exe-kill.js +36 -18
- package/dist/bin/exe-launch-agent.js +170 -79
- package/dist/bin/exe-new-employee.js +32 -0
- package/dist/bin/exe-pending-messages.js +35 -17
- package/dist/bin/exe-pending-notifications.js +35 -17
- package/dist/bin/exe-pending-reviews.js +37 -19
- package/dist/bin/exe-rename.js +34 -16
- package/dist/bin/exe-review.js +32 -14
- package/dist/bin/exe-search.js +40 -22
- package/dist/bin/exe-session-cleanup.js +67 -44
- package/dist/bin/exe-start-codex.js +39 -21
- package/dist/bin/exe-start-opencode.js +37 -19
- package/dist/bin/exe-status.js +44 -26
- package/dist/bin/exe-team.js +32 -14
- package/dist/bin/git-sweep.js +45 -27
- package/dist/bin/graph-backfill.js +32 -14
- package/dist/bin/graph-export.js +32 -14
- package/dist/bin/install.js +32 -0
- package/dist/bin/intercom-check.js +49 -31
- package/dist/bin/scan-tasks.js +45 -27
- package/dist/bin/setup.js +29 -11
- package/dist/bin/shard-migrate.js +32 -14
- package/dist/bin/stack-update.js +95 -7
- package/dist/bin/update.js +1 -1
- package/dist/gateway/index.js +47 -29
- package/dist/hooks/bug-report-worker.js +47 -29
- package/dist/hooks/codex-stop-task-finalizer.js +41 -23
- package/dist/hooks/commit-complete.js +46 -28
- package/dist/hooks/error-recall.js +44 -26
- package/dist/hooks/ingest-worker.js +4 -4
- package/dist/hooks/ingest.js +38 -20
- package/dist/hooks/instructions-loaded.js +32 -14
- package/dist/hooks/notification.js +32 -14
- package/dist/hooks/post-compact.js +32 -14
- package/dist/hooks/post-tool-combined.js +45 -27
- package/dist/hooks/pre-compact.js +43 -25
- package/dist/hooks/pre-tool-use.js +40 -22
- package/dist/hooks/prompt-submit.js +60 -42
- package/dist/hooks/session-end.js +48 -30
- package/dist/hooks/session-start.js +50 -32
- package/dist/hooks/stop.js +35 -17
- package/dist/hooks/subagent-stop.js +32 -14
- package/dist/hooks/summary-worker.js +37 -19
- package/dist/index.js +43 -25
- package/dist/lib/cloud-sync.js +32 -14
- package/dist/lib/database.js +22 -4
- package/dist/lib/db-daemon-client.js +16 -4
- package/dist/lib/db.js +22 -4
- package/dist/lib/device-registry.js +22 -4
- package/dist/lib/embedder.js +16 -4
- package/dist/lib/exe-daemon-client.js +16 -4
- package/dist/lib/exe-daemon.js +165 -66
- package/dist/lib/hybrid-search.js +40 -22
- package/dist/lib/schedules.js +35 -17
- package/dist/lib/skill-learning.js +16 -4
- package/dist/lib/store.js +32 -14
- package/dist/lib/tasks.js +16 -4
- package/dist/lib/tmux-routing.js +18 -6
- package/dist/mcp/server.js +142 -60
- package/dist/mcp/tools/create-task.js +18 -6
- package/dist/mcp/tools/update-task.js +18 -6
- package/dist/runtime/index.js +43 -25
- package/dist/tui/App.js +73 -55
- package/package.json +1 -1
|
@@ -1576,7 +1576,7 @@ __export(exe_daemon_client_exports, {
|
|
|
1576
1576
|
});
|
|
1577
1577
|
import net from "net";
|
|
1578
1578
|
import os6 from "os";
|
|
1579
|
-
import { spawn } from "child_process";
|
|
1579
|
+
import { spawn, execSync as execSync5 } from "child_process";
|
|
1580
1580
|
import { randomUUID } from "crypto";
|
|
1581
1581
|
import { existsSync as existsSync7, unlinkSync as unlinkSync3, readFileSync as readFileSync7, openSync, closeSync, statSync } from "fs";
|
|
1582
1582
|
import path9 from "path";
|
|
@@ -1606,6 +1606,14 @@ function handleData(chunk) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
+
function isZombie(pid) {
|
|
1610
|
+
try {
|
|
1611
|
+
const state = execSync5(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1612
|
+
return state.startsWith("Z");
|
|
1613
|
+
} catch {
|
|
1614
|
+
return false;
|
|
1615
|
+
}
|
|
1616
|
+
}
|
|
1609
1617
|
function cleanupStaleFiles() {
|
|
1610
1618
|
if (existsSync7(PID_PATH)) {
|
|
1611
1619
|
try {
|
|
@@ -1613,7 +1621,11 @@ function cleanupStaleFiles() {
|
|
|
1613
1621
|
if (pid > 0) {
|
|
1614
1622
|
try {
|
|
1615
1623
|
process.kill(pid, 0);
|
|
1616
|
-
|
|
1624
|
+
if (!isZombie(pid)) {
|
|
1625
|
+
return;
|
|
1626
|
+
}
|
|
1627
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1628
|
+
`);
|
|
1617
1629
|
} catch {
|
|
1618
1630
|
}
|
|
1619
1631
|
}
|
|
@@ -1641,8 +1653,8 @@ function findPackageRoot() {
|
|
|
1641
1653
|
function getAvailableMemoryGB() {
|
|
1642
1654
|
if (process.platform === "darwin") {
|
|
1643
1655
|
try {
|
|
1644
|
-
const { execSync:
|
|
1645
|
-
const vmstat =
|
|
1656
|
+
const { execSync: execSync9 } = __require("child_process");
|
|
1657
|
+
const vmstat = execSync9("vm_stat", { encoding: "utf8" });
|
|
1646
1658
|
const pageSize = 16384;
|
|
1647
1659
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1648
1660
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3632,6 +3644,12 @@ async function disposeDatabase() {
|
|
|
3632
3644
|
clearInterval(_walCheckpointTimer);
|
|
3633
3645
|
_walCheckpointTimer = null;
|
|
3634
3646
|
}
|
|
3647
|
+
if (_client) {
|
|
3648
|
+
try {
|
|
3649
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
3650
|
+
} catch {
|
|
3651
|
+
}
|
|
3652
|
+
}
|
|
3635
3653
|
if (_daemonClient) {
|
|
3636
3654
|
_daemonClient.close();
|
|
3637
3655
|
_daemonClient = null;
|
|
@@ -3995,7 +4013,7 @@ var init_cto_delegation_gate = __esm({
|
|
|
3995
4013
|
// src/lib/keychain.ts
|
|
3996
4014
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3997
4015
|
import { existsSync as existsSync13, statSync as statSync3 } from "fs";
|
|
3998
|
-
import { execSync as
|
|
4016
|
+
import { execSync as execSync6 } from "child_process";
|
|
3999
4017
|
import path15 from "path";
|
|
4000
4018
|
import os11 from "os";
|
|
4001
4019
|
function getKeyDir() {
|
|
@@ -4012,13 +4030,13 @@ function linuxSecretAvailable() {
|
|
|
4012
4030
|
if (process.platform !== "linux") return false;
|
|
4013
4031
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
4014
4032
|
try {
|
|
4015
|
-
|
|
4033
|
+
execSync6("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
4016
4034
|
} catch {
|
|
4017
4035
|
linuxSecretAvailability = false;
|
|
4018
4036
|
return false;
|
|
4019
4037
|
}
|
|
4020
4038
|
try {
|
|
4021
|
-
|
|
4039
|
+
execSync6("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
4022
4040
|
linuxSecretAvailability = true;
|
|
4023
4041
|
} catch {
|
|
4024
4042
|
linuxSecretAvailability = false;
|
|
@@ -4042,7 +4060,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
4042
4060
|
if (!nativeKeychainAllowed()) return null;
|
|
4043
4061
|
if (process.platform !== "darwin") return null;
|
|
4044
4062
|
try {
|
|
4045
|
-
return
|
|
4063
|
+
return execSync6(
|
|
4046
4064
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
4047
4065
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
4048
4066
|
).trim();
|
|
@@ -4055,13 +4073,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
4055
4073
|
if (process.platform !== "darwin") return false;
|
|
4056
4074
|
try {
|
|
4057
4075
|
try {
|
|
4058
|
-
|
|
4076
|
+
execSync6(
|
|
4059
4077
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
4060
4078
|
{ timeout: 5e3 }
|
|
4061
4079
|
);
|
|
4062
4080
|
} catch {
|
|
4063
4081
|
}
|
|
4064
|
-
|
|
4082
|
+
execSync6(
|
|
4065
4083
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
4066
4084
|
{ timeout: 5e3 }
|
|
4067
4085
|
);
|
|
@@ -4074,7 +4092,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
4074
4092
|
if (!nativeKeychainAllowed()) return false;
|
|
4075
4093
|
if (process.platform !== "darwin") return false;
|
|
4076
4094
|
try {
|
|
4077
|
-
|
|
4095
|
+
execSync6(
|
|
4078
4096
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
4079
4097
|
{ timeout: 5e3 }
|
|
4080
4098
|
);
|
|
@@ -4086,7 +4104,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
4086
4104
|
function linuxSecretGet(service = SERVICE) {
|
|
4087
4105
|
if (!linuxSecretAvailable()) return null;
|
|
4088
4106
|
try {
|
|
4089
|
-
return
|
|
4107
|
+
return execSync6(
|
|
4090
4108
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
4091
4109
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
4092
4110
|
).trim();
|
|
@@ -4097,7 +4115,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
4097
4115
|
function linuxSecretSet(value, service = SERVICE) {
|
|
4098
4116
|
if (!linuxSecretAvailable()) return false;
|
|
4099
4117
|
try {
|
|
4100
|
-
|
|
4118
|
+
execSync6(
|
|
4101
4119
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
4102
4120
|
{ timeout: 5e3 }
|
|
4103
4121
|
);
|
|
@@ -4110,7 +4128,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
4110
4128
|
if (!nativeKeychainAllowed()) return false;
|
|
4111
4129
|
if (process.platform !== "linux") return false;
|
|
4112
4130
|
try {
|
|
4113
|
-
|
|
4131
|
+
execSync6(
|
|
4114
4132
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
4115
4133
|
{ timeout: 5e3 }
|
|
4116
4134
|
);
|
|
@@ -6367,12 +6385,12 @@ __export(review_gate_exports, {
|
|
|
6367
6385
|
checkTestCoverage: () => checkTestCoverage,
|
|
6368
6386
|
runReviewGate: () => runReviewGate
|
|
6369
6387
|
});
|
|
6370
|
-
import { execSync as
|
|
6388
|
+
import { execSync as execSync7 } from "child_process";
|
|
6371
6389
|
import { existsSync as existsSync15 } from "fs";
|
|
6372
6390
|
function checkCommitsExist(taskCreatedAt) {
|
|
6373
6391
|
try {
|
|
6374
6392
|
const since = new Date(taskCreatedAt).toISOString();
|
|
6375
|
-
const output =
|
|
6393
|
+
const output = execSync7(
|
|
6376
6394
|
`git log --oneline --since="${since}" --no-merges 2>/dev/null`,
|
|
6377
6395
|
{ encoding: "utf8", timeout: 5e3 }
|
|
6378
6396
|
).trim();
|
|
@@ -6389,7 +6407,7 @@ function checkLayerBoundaries(taskCreatedAt) {
|
|
|
6389
6407
|
const violations = [];
|
|
6390
6408
|
try {
|
|
6391
6409
|
const since = new Date(taskCreatedAt).toISOString();
|
|
6392
|
-
const filesOutput =
|
|
6410
|
+
const filesOutput = execSync7(
|
|
6393
6411
|
`git log --since="${since}" --no-merges --name-only --pretty=format: 2>/dev/null`,
|
|
6394
6412
|
{ encoding: "utf8", timeout: 5e3 }
|
|
6395
6413
|
).trim();
|
|
@@ -6398,7 +6416,7 @@ function checkLayerBoundaries(taskCreatedAt) {
|
|
|
6398
6416
|
const libFiles = changedFiles.filter((f) => f.startsWith("src/lib/"));
|
|
6399
6417
|
for (const file of libFiles) {
|
|
6400
6418
|
try {
|
|
6401
|
-
const grepResult =
|
|
6419
|
+
const grepResult = execSync7(
|
|
6402
6420
|
`grep -nE "from ['"]\\.\\./(adapters|tui|runtime)/" "${file}" 2>/dev/null`,
|
|
6403
6421
|
{ encoding: "utf8", timeout: 3e3 }
|
|
6404
6422
|
).trim();
|
|
@@ -6418,7 +6436,7 @@ function checkTestCoverage(taskCreatedAt) {
|
|
|
6418
6436
|
const warnings = [];
|
|
6419
6437
|
try {
|
|
6420
6438
|
const since = new Date(taskCreatedAt).toISOString();
|
|
6421
|
-
const output =
|
|
6439
|
+
const output = execSync7(
|
|
6422
6440
|
`git log --since="${since}" --no-merges --diff-filter=A --name-only --pretty=format: 2>/dev/null`,
|
|
6423
6441
|
{ encoding: "utf8", timeout: 5e3 }
|
|
6424
6442
|
).trim();
|
|
@@ -6434,7 +6452,7 @@ function checkTestCoverage(taskCreatedAt) {
|
|
|
6434
6452
|
const hasDirectTest = existsSync15(testPath);
|
|
6435
6453
|
let hasRelatedTest = false;
|
|
6436
6454
|
try {
|
|
6437
|
-
const related =
|
|
6455
|
+
const related = execSync7(
|
|
6438
6456
|
`find "${testDir}" -name "*${baseName}*" -name "*.test.ts" 2>/dev/null`,
|
|
6439
6457
|
{ encoding: "utf8", timeout: 3e3 }
|
|
6440
6458
|
).trim();
|
|
@@ -6486,7 +6504,7 @@ var init_review_gate = __esm({
|
|
|
6486
6504
|
|
|
6487
6505
|
// src/adapters/claude/hooks/pre-tool-use.ts
|
|
6488
6506
|
import { existsSync as existsSync16, writeFileSync as writeFileSync8, mkdirSync as mkdirSync8 } from "fs";
|
|
6489
|
-
import { execSync as
|
|
6507
|
+
import { execSync as execSync8 } from "child_process";
|
|
6490
6508
|
import path17 from "path";
|
|
6491
6509
|
|
|
6492
6510
|
// src/lib/active-agent.ts
|
|
@@ -6636,7 +6654,7 @@ function markDelegationFired() {
|
|
|
6636
6654
|
}
|
|
6637
6655
|
function countEngineerSessions() {
|
|
6638
6656
|
try {
|
|
6639
|
-
const output =
|
|
6657
|
+
const output = execSync8("tmux list-sessions 2>/dev/null", {
|
|
6640
6658
|
encoding: "utf8",
|
|
6641
6659
|
timeout: 2e3
|
|
6642
6660
|
});
|
|
@@ -1402,7 +1402,7 @@ __export(exe_daemon_client_exports, {
|
|
|
1402
1402
|
});
|
|
1403
1403
|
import net from "net";
|
|
1404
1404
|
import os4 from "os";
|
|
1405
|
-
import { spawn } from "child_process";
|
|
1405
|
+
import { spawn, execSync as execSync2 } from "child_process";
|
|
1406
1406
|
import { randomUUID } from "crypto";
|
|
1407
1407
|
import { existsSync as existsSync6, unlinkSync as unlinkSync2, readFileSync as readFileSync5, openSync, closeSync, statSync } from "fs";
|
|
1408
1408
|
import path6 from "path";
|
|
@@ -1432,6 +1432,14 @@ function handleData(chunk) {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
+
function isZombie(pid) {
|
|
1436
|
+
try {
|
|
1437
|
+
const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1438
|
+
return state.startsWith("Z");
|
|
1439
|
+
} catch {
|
|
1440
|
+
return false;
|
|
1441
|
+
}
|
|
1442
|
+
}
|
|
1435
1443
|
function cleanupStaleFiles() {
|
|
1436
1444
|
if (existsSync6(PID_PATH)) {
|
|
1437
1445
|
try {
|
|
@@ -1439,7 +1447,11 @@ function cleanupStaleFiles() {
|
|
|
1439
1447
|
if (pid > 0) {
|
|
1440
1448
|
try {
|
|
1441
1449
|
process.kill(pid, 0);
|
|
1442
|
-
|
|
1450
|
+
if (!isZombie(pid)) {
|
|
1451
|
+
return;
|
|
1452
|
+
}
|
|
1453
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1454
|
+
`);
|
|
1443
1455
|
} catch {
|
|
1444
1456
|
}
|
|
1445
1457
|
}
|
|
@@ -1467,8 +1479,8 @@ function findPackageRoot() {
|
|
|
1467
1479
|
function getAvailableMemoryGB() {
|
|
1468
1480
|
if (process.platform === "darwin") {
|
|
1469
1481
|
try {
|
|
1470
|
-
const { execSync:
|
|
1471
|
-
const vmstat =
|
|
1482
|
+
const { execSync: execSync12 } = __require("child_process");
|
|
1483
|
+
const vmstat = execSync12("vm_stat", { encoding: "utf8" });
|
|
1472
1484
|
const pageSize = 16384;
|
|
1473
1485
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1474
1486
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3458,6 +3470,12 @@ async function disposeDatabase() {
|
|
|
3458
3470
|
clearInterval(_walCheckpointTimer);
|
|
3459
3471
|
_walCheckpointTimer = null;
|
|
3460
3472
|
}
|
|
3473
|
+
if (_client) {
|
|
3474
|
+
try {
|
|
3475
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
3476
|
+
} catch {
|
|
3477
|
+
}
|
|
3478
|
+
}
|
|
3461
3479
|
if (_daemonClient) {
|
|
3462
3480
|
_daemonClient.close();
|
|
3463
3481
|
_daemonClient = null;
|
|
@@ -3494,7 +3512,7 @@ var init_database = __esm({
|
|
|
3494
3512
|
// src/lib/keychain.ts
|
|
3495
3513
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3496
3514
|
import { existsSync as existsSync7, statSync as statSync2 } from "fs";
|
|
3497
|
-
import { execSync as
|
|
3515
|
+
import { execSync as execSync3 } from "child_process";
|
|
3498
3516
|
import path7 from "path";
|
|
3499
3517
|
import os5 from "os";
|
|
3500
3518
|
function getKeyDir() {
|
|
@@ -3511,13 +3529,13 @@ function linuxSecretAvailable() {
|
|
|
3511
3529
|
if (process.platform !== "linux") return false;
|
|
3512
3530
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
3513
3531
|
try {
|
|
3514
|
-
|
|
3532
|
+
execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
3515
3533
|
} catch {
|
|
3516
3534
|
linuxSecretAvailability = false;
|
|
3517
3535
|
return false;
|
|
3518
3536
|
}
|
|
3519
3537
|
try {
|
|
3520
|
-
|
|
3538
|
+
execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
3521
3539
|
linuxSecretAvailability = true;
|
|
3522
3540
|
} catch {
|
|
3523
3541
|
linuxSecretAvailability = false;
|
|
@@ -3541,7 +3559,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
3541
3559
|
if (!nativeKeychainAllowed()) return null;
|
|
3542
3560
|
if (process.platform !== "darwin") return null;
|
|
3543
3561
|
try {
|
|
3544
|
-
return
|
|
3562
|
+
return execSync3(
|
|
3545
3563
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3546
3564
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3547
3565
|
).trim();
|
|
@@ -3554,13 +3572,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
3554
3572
|
if (process.platform !== "darwin") return false;
|
|
3555
3573
|
try {
|
|
3556
3574
|
try {
|
|
3557
|
-
|
|
3575
|
+
execSync3(
|
|
3558
3576
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3559
3577
|
{ timeout: 5e3 }
|
|
3560
3578
|
);
|
|
3561
3579
|
} catch {
|
|
3562
3580
|
}
|
|
3563
|
-
|
|
3581
|
+
execSync3(
|
|
3564
3582
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
3565
3583
|
{ timeout: 5e3 }
|
|
3566
3584
|
);
|
|
@@ -3573,7 +3591,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
3573
3591
|
if (!nativeKeychainAllowed()) return false;
|
|
3574
3592
|
if (process.platform !== "darwin") return false;
|
|
3575
3593
|
try {
|
|
3576
|
-
|
|
3594
|
+
execSync3(
|
|
3577
3595
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3578
3596
|
{ timeout: 5e3 }
|
|
3579
3597
|
);
|
|
@@ -3585,7 +3603,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
3585
3603
|
function linuxSecretGet(service = SERVICE) {
|
|
3586
3604
|
if (!linuxSecretAvailable()) return null;
|
|
3587
3605
|
try {
|
|
3588
|
-
return
|
|
3606
|
+
return execSync3(
|
|
3589
3607
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3590
3608
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3591
3609
|
).trim();
|
|
@@ -3596,7 +3614,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
3596
3614
|
function linuxSecretSet(value, service = SERVICE) {
|
|
3597
3615
|
if (!linuxSecretAvailable()) return false;
|
|
3598
3616
|
try {
|
|
3599
|
-
|
|
3617
|
+
execSync3(
|
|
3600
3618
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3601
3619
|
{ timeout: 5e3 }
|
|
3602
3620
|
);
|
|
@@ -3609,7 +3627,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
3609
3627
|
if (!nativeKeychainAllowed()) return false;
|
|
3610
3628
|
if (process.platform !== "linux") return false;
|
|
3611
3629
|
try {
|
|
3612
|
-
|
|
3630
|
+
execSync3(
|
|
3613
3631
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3614
3632
|
{ timeout: 5e3 }
|
|
3615
3633
|
);
|
|
@@ -6077,7 +6095,7 @@ __export(project_name_exports, {
|
|
|
6077
6095
|
_resetCache: () => _resetCache,
|
|
6078
6096
|
getProjectName: () => getProjectName
|
|
6079
6097
|
});
|
|
6080
|
-
import { execSync as
|
|
6098
|
+
import { execSync as execSync4 } from "child_process";
|
|
6081
6099
|
import path10 from "path";
|
|
6082
6100
|
function getProjectName(cwd) {
|
|
6083
6101
|
const dir = cwd ?? process.cwd();
|
|
@@ -6085,7 +6103,7 @@ function getProjectName(cwd) {
|
|
|
6085
6103
|
try {
|
|
6086
6104
|
let repoRoot;
|
|
6087
6105
|
try {
|
|
6088
|
-
const gitCommonDir =
|
|
6106
|
+
const gitCommonDir = execSync4("git rev-parse --path-format=absolute --git-common-dir", {
|
|
6089
6107
|
cwd: dir,
|
|
6090
6108
|
encoding: "utf8",
|
|
6091
6109
|
timeout: 2e3,
|
|
@@ -6093,7 +6111,7 @@ function getProjectName(cwd) {
|
|
|
6093
6111
|
}).trim();
|
|
6094
6112
|
repoRoot = path10.dirname(gitCommonDir);
|
|
6095
6113
|
} catch {
|
|
6096
|
-
repoRoot =
|
|
6114
|
+
repoRoot = execSync4("git rev-parse --show-toplevel", {
|
|
6097
6115
|
cwd: dir,
|
|
6098
6116
|
encoding: "utf8",
|
|
6099
6117
|
timeout: 2e3,
|
|
@@ -6127,14 +6145,14 @@ var file_grep_exports = {};
|
|
|
6127
6145
|
__export(file_grep_exports, {
|
|
6128
6146
|
grepProjectFiles: () => grepProjectFiles
|
|
6129
6147
|
});
|
|
6130
|
-
import { execSync as
|
|
6148
|
+
import { execSync as execSync5 } from "child_process";
|
|
6131
6149
|
import { readFileSync as readFileSync6, readdirSync as readdirSync2, statSync as statSync4, existsSync as existsSync10 } from "fs";
|
|
6132
6150
|
import path11 from "path";
|
|
6133
6151
|
import crypto2 from "crypto";
|
|
6134
6152
|
function hasRipgrep() {
|
|
6135
6153
|
if (_hasRg === null) {
|
|
6136
6154
|
try {
|
|
6137
|
-
|
|
6155
|
+
execSync5("rg --version", { stdio: "ignore", timeout: 2e3 });
|
|
6138
6156
|
_hasRg = true;
|
|
6139
6157
|
} catch {
|
|
6140
6158
|
_hasRg = false;
|
|
@@ -6200,7 +6218,7 @@ function grepWithRipgrep(pattern, projectRoot, patterns) {
|
|
|
6200
6218
|
const globs = (patterns ?? DEFAULT_PATTERNS).map((p) => `--glob '${p}'`).join(" ");
|
|
6201
6219
|
const excludes = EXCLUDE_DIRS.map((d) => `--glob '!${d}'`).join(" ");
|
|
6202
6220
|
const cmd = `rg -i -c --hidden --no-config --no-ignore '${pattern.replace(/'/g, "\\'")}' . ${globs} ${excludes} --max-filesize ${MAX_FILE_SIZE} 2>/dev/null || true`;
|
|
6203
|
-
const output =
|
|
6221
|
+
const output = execSync5(cmd, {
|
|
6204
6222
|
cwd: projectRoot,
|
|
6205
6223
|
encoding: "utf8",
|
|
6206
6224
|
timeout: 3e3,
|
|
@@ -6215,12 +6233,12 @@ function grepWithRipgrep(pattern, projectRoot, patterns) {
|
|
|
6215
6233
|
const matchCount = parseInt(line.slice(colonIdx + 1));
|
|
6216
6234
|
if (isNaN(matchCount) || matchCount === 0) continue;
|
|
6217
6235
|
try {
|
|
6218
|
-
const firstMatch =
|
|
6236
|
+
const firstMatch = execSync5(
|
|
6219
6237
|
`rg -i -n --hidden '${pattern.replace(/'/g, "\\'")}' '${filePath}' --max-count 1 2>/dev/null | head -1`,
|
|
6220
6238
|
{ cwd: projectRoot, encoding: "utf8", timeout: 1e3 }
|
|
6221
6239
|
).trim();
|
|
6222
6240
|
const lineNum = parseInt(firstMatch.split(":")[0] ?? "1");
|
|
6223
|
-
const totalLines =
|
|
6241
|
+
const totalLines = execSync5(`wc -l < '${filePath}'`, {
|
|
6224
6242
|
cwd: projectRoot,
|
|
6225
6243
|
encoding: "utf8",
|
|
6226
6244
|
timeout: 1e3
|
|
@@ -6924,7 +6942,7 @@ var init_entity_boost = __esm({
|
|
|
6924
6942
|
});
|
|
6925
6943
|
|
|
6926
6944
|
// src/lib/session-key.ts
|
|
6927
|
-
import { execSync as
|
|
6945
|
+
import { execSync as execSync6 } from "child_process";
|
|
6928
6946
|
function normalizeCommand(command) {
|
|
6929
6947
|
const trimmed = command.trim().toLowerCase();
|
|
6930
6948
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -6943,7 +6961,7 @@ function resolveRuntimeProcess() {
|
|
|
6943
6961
|
let pid = process.ppid;
|
|
6944
6962
|
for (let i = 0; i < 10; i++) {
|
|
6945
6963
|
try {
|
|
6946
|
-
const info =
|
|
6964
|
+
const info = execSync6(`ps -p ${pid} -o ppid=,comm=`, {
|
|
6947
6965
|
encoding: "utf8",
|
|
6948
6966
|
timeout: 2e3
|
|
6949
6967
|
}).trim();
|
|
@@ -7000,7 +7018,7 @@ __export(session_registry_exports, {
|
|
|
7000
7018
|
registerSession: () => registerSession
|
|
7001
7019
|
});
|
|
7002
7020
|
import { readFileSync as readFileSync9, writeFileSync as writeFileSync6, mkdirSync as mkdirSync5, existsSync as existsSync12 } from "fs";
|
|
7003
|
-
import { execSync as
|
|
7021
|
+
import { execSync as execSync8 } from "child_process";
|
|
7004
7022
|
import path14 from "path";
|
|
7005
7023
|
import os7 from "os";
|
|
7006
7024
|
function registerSession(entry) {
|
|
@@ -7040,7 +7058,7 @@ function pruneStaleSessions() {
|
|
|
7040
7058
|
if (sessions.length === 0) return 0;
|
|
7041
7059
|
let liveSessions = [];
|
|
7042
7060
|
try {
|
|
7043
|
-
liveSessions =
|
|
7061
|
+
liveSessions = execSync8("tmux list-sessions -F '#{session_name}' 2>/dev/null", {
|
|
7044
7062
|
encoding: "utf8"
|
|
7045
7063
|
}).trim().split("\n").filter(Boolean);
|
|
7046
7064
|
} catch {
|
|
@@ -7188,14 +7206,14 @@ var init_transport = __esm({
|
|
|
7188
7206
|
});
|
|
7189
7207
|
|
|
7190
7208
|
// src/lib/cc-agent-support.ts
|
|
7191
|
-
import { execSync as
|
|
7209
|
+
import { execSync as execSync9 } from "child_process";
|
|
7192
7210
|
function _resetCcAgentSupportCache() {
|
|
7193
7211
|
_cachedSupport = null;
|
|
7194
7212
|
}
|
|
7195
7213
|
function claudeSupportsAgentFlag() {
|
|
7196
7214
|
if (_cachedSupport !== null) return _cachedSupport;
|
|
7197
7215
|
try {
|
|
7198
|
-
const helpOutput =
|
|
7216
|
+
const helpOutput = execSync9("claude --help 2>&1", {
|
|
7199
7217
|
encoding: "utf-8",
|
|
7200
7218
|
timeout: 5e3
|
|
7201
7219
|
});
|
|
@@ -7744,7 +7762,7 @@ var init_session_scope = __esm({
|
|
|
7744
7762
|
import crypto5 from "crypto";
|
|
7745
7763
|
import path20 from "path";
|
|
7746
7764
|
import os12 from "os";
|
|
7747
|
-
import { execSync as
|
|
7765
|
+
import { execSync as execSync10 } from "child_process";
|
|
7748
7766
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
7749
7767
|
import { existsSync as existsSync18, readFileSync as readFileSync14 } from "fs";
|
|
7750
7768
|
async function writeCheckpoint(input2) {
|
|
@@ -8089,14 +8107,14 @@ function isTmuxSessionAlive(identifier) {
|
|
|
8089
8107
|
if (!identifier || identifier === "unknown") return true;
|
|
8090
8108
|
try {
|
|
8091
8109
|
if (identifier.startsWith("%")) {
|
|
8092
|
-
const output =
|
|
8110
|
+
const output = execSync10("tmux list-panes -a -F '#{pane_id}'", {
|
|
8093
8111
|
timeout: 2e3,
|
|
8094
8112
|
encoding: "utf8",
|
|
8095
8113
|
stdio: ["pipe", "pipe", "pipe"]
|
|
8096
8114
|
});
|
|
8097
8115
|
return output.split("\n").some((l) => l.trim() === identifier);
|
|
8098
8116
|
} else {
|
|
8099
|
-
|
|
8117
|
+
execSync10(`tmux has-session -t ${JSON.stringify(identifier)}`, {
|
|
8100
8118
|
timeout: 2e3,
|
|
8101
8119
|
stdio: ["pipe", "pipe", "pipe"]
|
|
8102
8120
|
});
|
|
@@ -8105,7 +8123,7 @@ function isTmuxSessionAlive(identifier) {
|
|
|
8105
8123
|
} catch {
|
|
8106
8124
|
if (identifier.startsWith("%")) return true;
|
|
8107
8125
|
try {
|
|
8108
|
-
|
|
8126
|
+
execSync10("tmux list-sessions", {
|
|
8109
8127
|
timeout: 2e3,
|
|
8110
8128
|
stdio: ["pipe", "pipe", "pipe"]
|
|
8111
8129
|
});
|
|
@@ -8120,12 +8138,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
|
|
|
8120
8138
|
if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
|
|
8121
8139
|
try {
|
|
8122
8140
|
const since = new Date(taskCreatedAt).toISOString();
|
|
8123
|
-
const branch =
|
|
8141
|
+
const branch = execSync10(
|
|
8124
8142
|
"git rev-parse --abbrev-ref HEAD 2>/dev/null",
|
|
8125
8143
|
{ encoding: "utf8", timeout: 3e3 }
|
|
8126
8144
|
).trim();
|
|
8127
8145
|
const branchArg = branch && branch !== "HEAD" ? branch : "";
|
|
8128
|
-
const commitCount =
|
|
8146
|
+
const commitCount = execSync10(
|
|
8129
8147
|
`git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
|
|
8130
8148
|
{ encoding: "utf8", timeout: 5e3 }
|
|
8131
8149
|
).trim();
|
|
@@ -9727,7 +9745,7 @@ __export(tmux_routing_exports, {
|
|
|
9727
9745
|
spawnEmployee: () => spawnEmployee,
|
|
9728
9746
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
9729
9747
|
});
|
|
9730
|
-
import { execFileSync as execFileSync2, execSync as
|
|
9748
|
+
import { execFileSync as execFileSync2, execSync as execSync11 } from "child_process";
|
|
9731
9749
|
import { readFileSync as readFileSync15, writeFileSync as writeFileSync10, mkdirSync as mkdirSync10, existsSync as existsSync20, appendFileSync, readdirSync as readdirSync6 } from "fs";
|
|
9732
9750
|
import path24 from "path";
|
|
9733
9751
|
import os13 from "os";
|
|
@@ -10448,7 +10466,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
10448
10466
|
let booted = false;
|
|
10449
10467
|
for (let i = 0; i < 30; i++) {
|
|
10450
10468
|
try {
|
|
10451
|
-
|
|
10469
|
+
execSync11("sleep 0.5");
|
|
10452
10470
|
} catch {
|
|
10453
10471
|
}
|
|
10454
10472
|
try {
|
|
@@ -11739,7 +11757,7 @@ function isCacheCold(sessionKey) {
|
|
|
11739
11757
|
init_config();
|
|
11740
11758
|
init_session_key();
|
|
11741
11759
|
import { readFileSync as readFileSync8, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, unlinkSync as unlinkSync4, readdirSync as readdirSync3 } from "fs";
|
|
11742
|
-
import { execSync as
|
|
11760
|
+
import { execSync as execSync7 } from "child_process";
|
|
11743
11761
|
import path13 from "path";
|
|
11744
11762
|
|
|
11745
11763
|
// src/mcp/agent-context.ts
|
|
@@ -11829,7 +11847,7 @@ function getActiveAgent() {
|
|
|
11829
11847
|
} catch {
|
|
11830
11848
|
}
|
|
11831
11849
|
try {
|
|
11832
|
-
const sessionName =
|
|
11850
|
+
const sessionName = execSync7(
|
|
11833
11851
|
"tmux display-message -p '#{session_name}' 2>/dev/null",
|
|
11834
11852
|
{ encoding: "utf8", timeout: 2e3 }
|
|
11835
11853
|
).trim();
|
|
@@ -11917,8 +11935,8 @@ process.stdin.on("end", async () => {
|
|
|
11917
11935
|
}
|
|
11918
11936
|
}
|
|
11919
11937
|
try {
|
|
11920
|
-
const { execSync:
|
|
11921
|
-
const currentSession =
|
|
11938
|
+
const { execSync: execSync12 } = await import("child_process");
|
|
11939
|
+
const currentSession = execSync12("tmux display-message -p '#{session_name}' 2>/dev/null", {
|
|
11922
11940
|
encoding: "utf8",
|
|
11923
11941
|
timeout: 2e3
|
|
11924
11942
|
}).trim();
|
|
@@ -12055,8 +12073,8 @@ ${lines.join("\n")}`;
|
|
|
12055
12073
|
const lastCheckPath = path26.join(CACHE_DIR3, `review-lastcheck-${sessionKey}.json`);
|
|
12056
12074
|
let sessionScope;
|
|
12057
12075
|
try {
|
|
12058
|
-
const { execSync:
|
|
12059
|
-
const tmuxSession =
|
|
12076
|
+
const { execSync: execSync12 } = await import("child_process");
|
|
12077
|
+
const tmuxSession = execSync12("tmux display-message -p '#{session_name}'", { encoding: "utf8", timeout: 2e3 }).trim();
|
|
12060
12078
|
if (isExeSession(tmuxSession)) sessionScope = tmuxSession;
|
|
12061
12079
|
} catch {
|
|
12062
12080
|
}
|