@askexenow/exe-os 0.9.85 → 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 +152 -77
- 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 +40 -22
- 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/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 +59 -2
- 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
|
@@ -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: execSync9 } = __require("child_process");
|
|
1483
|
+
const vmstat = execSync9("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
|
);
|
|
@@ -5820,7 +5838,7 @@ var init_session_registry = __esm({
|
|
|
5820
5838
|
});
|
|
5821
5839
|
|
|
5822
5840
|
// src/lib/session-key.ts
|
|
5823
|
-
import { execSync as
|
|
5841
|
+
import { execSync as execSync4 } from "child_process";
|
|
5824
5842
|
function normalizeCommand(command) {
|
|
5825
5843
|
const trimmed = command.trim().toLowerCase();
|
|
5826
5844
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -5839,7 +5857,7 @@ function resolveRuntimeProcess() {
|
|
|
5839
5857
|
let pid = process.ppid;
|
|
5840
5858
|
for (let i = 0; i < 10; i++) {
|
|
5841
5859
|
try {
|
|
5842
|
-
const info =
|
|
5860
|
+
const info = execSync4(`ps -p ${pid} -o ppid=,comm=`, {
|
|
5843
5861
|
encoding: "utf8",
|
|
5844
5862
|
timeout: 2e3
|
|
5845
5863
|
}).trim();
|
|
@@ -6005,14 +6023,14 @@ var init_transport = __esm({
|
|
|
6005
6023
|
});
|
|
6006
6024
|
|
|
6007
6025
|
// src/lib/cc-agent-support.ts
|
|
6008
|
-
import { execSync as
|
|
6026
|
+
import { execSync as execSync5 } from "child_process";
|
|
6009
6027
|
function _resetCcAgentSupportCache() {
|
|
6010
6028
|
_cachedSupport = null;
|
|
6011
6029
|
}
|
|
6012
6030
|
function claudeSupportsAgentFlag() {
|
|
6013
6031
|
if (_cachedSupport !== null) return _cachedSupport;
|
|
6014
6032
|
try {
|
|
6015
|
-
const helpOutput =
|
|
6033
|
+
const helpOutput = execSync5("claude --help 2>&1", {
|
|
6016
6034
|
encoding: "utf-8",
|
|
6017
6035
|
timeout: 5e3
|
|
6018
6036
|
});
|
|
@@ -7023,7 +7041,7 @@ __export(tmux_routing_exports, {
|
|
|
7023
7041
|
spawnEmployee: () => spawnEmployee,
|
|
7024
7042
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
7025
7043
|
});
|
|
7026
|
-
import { execFileSync as execFileSync2, execSync as
|
|
7044
|
+
import { execFileSync as execFileSync2, execSync as execSync6 } from "child_process";
|
|
7027
7045
|
import { readFileSync as readFileSync10, writeFileSync as writeFileSync7, mkdirSync as mkdirSync7, existsSync as existsSync15, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
7028
7046
|
import path15 from "path";
|
|
7029
7047
|
import os10 from "os";
|
|
@@ -7744,7 +7762,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
7744
7762
|
let booted = false;
|
|
7745
7763
|
for (let i = 0; i < 30; i++) {
|
|
7746
7764
|
try {
|
|
7747
|
-
|
|
7765
|
+
execSync6("sleep 0.5");
|
|
7748
7766
|
} catch {
|
|
7749
7767
|
}
|
|
7750
7768
|
try {
|
|
@@ -7911,7 +7929,7 @@ var init_notifications = __esm({
|
|
|
7911
7929
|
});
|
|
7912
7930
|
|
|
7913
7931
|
// src/lib/project-name.ts
|
|
7914
|
-
import { execSync as
|
|
7932
|
+
import { execSync as execSync7 } from "child_process";
|
|
7915
7933
|
import path17 from "path";
|
|
7916
7934
|
function getProjectName(cwd) {
|
|
7917
7935
|
const dir = cwd ?? process.cwd();
|
|
@@ -7919,7 +7937,7 @@ function getProjectName(cwd) {
|
|
|
7919
7937
|
try {
|
|
7920
7938
|
let repoRoot;
|
|
7921
7939
|
try {
|
|
7922
|
-
const gitCommonDir =
|
|
7940
|
+
const gitCommonDir = execSync7("git rev-parse --path-format=absolute --git-common-dir", {
|
|
7923
7941
|
cwd: dir,
|
|
7924
7942
|
encoding: "utf8",
|
|
7925
7943
|
timeout: 2e3,
|
|
@@ -7927,7 +7945,7 @@ function getProjectName(cwd) {
|
|
|
7927
7945
|
}).trim();
|
|
7928
7946
|
repoRoot = path17.dirname(gitCommonDir);
|
|
7929
7947
|
} catch {
|
|
7930
|
-
repoRoot =
|
|
7948
|
+
repoRoot = execSync7("git rev-parse --show-toplevel", {
|
|
7931
7949
|
cwd: dir,
|
|
7932
7950
|
encoding: "utf8",
|
|
7933
7951
|
timeout: 2e3,
|
|
@@ -8018,7 +8036,7 @@ var init_session_scope = __esm({
|
|
|
8018
8036
|
import crypto4 from "crypto";
|
|
8019
8037
|
import path18 from "path";
|
|
8020
8038
|
import os12 from "os";
|
|
8021
|
-
import { execSync as
|
|
8039
|
+
import { execSync as execSync8 } from "child_process";
|
|
8022
8040
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
8023
8041
|
import { existsSync as existsSync17, readFileSync as readFileSync12 } from "fs";
|
|
8024
8042
|
async function writeCheckpoint(input) {
|
|
@@ -8363,14 +8381,14 @@ function isTmuxSessionAlive(identifier) {
|
|
|
8363
8381
|
if (!identifier || identifier === "unknown") return true;
|
|
8364
8382
|
try {
|
|
8365
8383
|
if (identifier.startsWith("%")) {
|
|
8366
|
-
const output =
|
|
8384
|
+
const output = execSync8("tmux list-panes -a -F '#{pane_id}'", {
|
|
8367
8385
|
timeout: 2e3,
|
|
8368
8386
|
encoding: "utf8",
|
|
8369
8387
|
stdio: ["pipe", "pipe", "pipe"]
|
|
8370
8388
|
});
|
|
8371
8389
|
return output.split("\n").some((l) => l.trim() === identifier);
|
|
8372
8390
|
} else {
|
|
8373
|
-
|
|
8391
|
+
execSync8(`tmux has-session -t ${JSON.stringify(identifier)}`, {
|
|
8374
8392
|
timeout: 2e3,
|
|
8375
8393
|
stdio: ["pipe", "pipe", "pipe"]
|
|
8376
8394
|
});
|
|
@@ -8379,7 +8397,7 @@ function isTmuxSessionAlive(identifier) {
|
|
|
8379
8397
|
} catch {
|
|
8380
8398
|
if (identifier.startsWith("%")) return true;
|
|
8381
8399
|
try {
|
|
8382
|
-
|
|
8400
|
+
execSync8("tmux list-sessions", {
|
|
8383
8401
|
timeout: 2e3,
|
|
8384
8402
|
stdio: ["pipe", "pipe", "pipe"]
|
|
8385
8403
|
});
|
|
@@ -8394,12 +8412,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
|
|
|
8394
8412
|
if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
|
|
8395
8413
|
try {
|
|
8396
8414
|
const since = new Date(taskCreatedAt).toISOString();
|
|
8397
|
-
const branch =
|
|
8415
|
+
const branch = execSync8(
|
|
8398
8416
|
"git rev-parse --abbrev-ref HEAD 2>/dev/null",
|
|
8399
8417
|
{ encoding: "utf8", timeout: 3e3 }
|
|
8400
8418
|
).trim();
|
|
8401
8419
|
const branchArg = branch && branch !== "HEAD" ? branch : "";
|
|
8402
|
-
const commitCount =
|
|
8420
|
+
const commitCount = execSync8(
|
|
8403
8421
|
`git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
|
|
8404
8422
|
{ encoding: "utf8", timeout: 5e3 }
|
|
8405
8423
|
).trim();
|
|
@@ -1085,7 +1085,7 @@ __export(exe_daemon_client_exports, {
|
|
|
1085
1085
|
});
|
|
1086
1086
|
import net from "net";
|
|
1087
1087
|
import os4 from "os";
|
|
1088
|
-
import { spawn } from "child_process";
|
|
1088
|
+
import { spawn, execSync as execSync2 } from "child_process";
|
|
1089
1089
|
import { randomUUID } from "crypto";
|
|
1090
1090
|
import { existsSync as existsSync5, unlinkSync as unlinkSync2, readFileSync as readFileSync4, openSync, closeSync, statSync } from "fs";
|
|
1091
1091
|
import path5 from "path";
|
|
@@ -1115,6 +1115,14 @@ function handleData(chunk) {
|
|
|
1115
1115
|
}
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
|
+
function isZombie(pid) {
|
|
1119
|
+
try {
|
|
1120
|
+
const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1121
|
+
return state.startsWith("Z");
|
|
1122
|
+
} catch {
|
|
1123
|
+
return false;
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1118
1126
|
function cleanupStaleFiles() {
|
|
1119
1127
|
if (existsSync5(PID_PATH)) {
|
|
1120
1128
|
try {
|
|
@@ -1122,7 +1130,11 @@ function cleanupStaleFiles() {
|
|
|
1122
1130
|
if (pid > 0) {
|
|
1123
1131
|
try {
|
|
1124
1132
|
process.kill(pid, 0);
|
|
1125
|
-
|
|
1133
|
+
if (!isZombie(pid)) {
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1137
|
+
`);
|
|
1126
1138
|
} catch {
|
|
1127
1139
|
}
|
|
1128
1140
|
}
|
|
@@ -1150,8 +1162,8 @@ function findPackageRoot() {
|
|
|
1150
1162
|
function getAvailableMemoryGB() {
|
|
1151
1163
|
if (process.platform === "darwin") {
|
|
1152
1164
|
try {
|
|
1153
|
-
const { execSync:
|
|
1154
|
-
const vmstat =
|
|
1165
|
+
const { execSync: execSync7 } = __require("child_process");
|
|
1166
|
+
const vmstat = execSync7("vm_stat", { encoding: "utf8" });
|
|
1155
1167
|
const pageSize = 16384;
|
|
1156
1168
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1157
1169
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3141,6 +3153,12 @@ async function disposeDatabase() {
|
|
|
3141
3153
|
clearInterval(_walCheckpointTimer);
|
|
3142
3154
|
_walCheckpointTimer = null;
|
|
3143
3155
|
}
|
|
3156
|
+
if (_client) {
|
|
3157
|
+
try {
|
|
3158
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
3159
|
+
} catch {
|
|
3160
|
+
}
|
|
3161
|
+
}
|
|
3144
3162
|
if (_daemonClient) {
|
|
3145
3163
|
_daemonClient.close();
|
|
3146
3164
|
_daemonClient = null;
|
|
@@ -3177,7 +3195,7 @@ var init_database = __esm({
|
|
|
3177
3195
|
// src/lib/keychain.ts
|
|
3178
3196
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3179
3197
|
import { existsSync as existsSync6, statSync as statSync2 } from "fs";
|
|
3180
|
-
import { execSync as
|
|
3198
|
+
import { execSync as execSync3 } from "child_process";
|
|
3181
3199
|
import path6 from "path";
|
|
3182
3200
|
import os5 from "os";
|
|
3183
3201
|
function getKeyDir() {
|
|
@@ -3194,13 +3212,13 @@ function linuxSecretAvailable() {
|
|
|
3194
3212
|
if (process.platform !== "linux") return false;
|
|
3195
3213
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
3196
3214
|
try {
|
|
3197
|
-
|
|
3215
|
+
execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
3198
3216
|
} catch {
|
|
3199
3217
|
linuxSecretAvailability = false;
|
|
3200
3218
|
return false;
|
|
3201
3219
|
}
|
|
3202
3220
|
try {
|
|
3203
|
-
|
|
3221
|
+
execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
3204
3222
|
linuxSecretAvailability = true;
|
|
3205
3223
|
} catch {
|
|
3206
3224
|
linuxSecretAvailability = false;
|
|
@@ -3224,7 +3242,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
3224
3242
|
if (!nativeKeychainAllowed()) return null;
|
|
3225
3243
|
if (process.platform !== "darwin") return null;
|
|
3226
3244
|
try {
|
|
3227
|
-
return
|
|
3245
|
+
return execSync3(
|
|
3228
3246
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3229
3247
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3230
3248
|
).trim();
|
|
@@ -3237,13 +3255,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
3237
3255
|
if (process.platform !== "darwin") return false;
|
|
3238
3256
|
try {
|
|
3239
3257
|
try {
|
|
3240
|
-
|
|
3258
|
+
execSync3(
|
|
3241
3259
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3242
3260
|
{ timeout: 5e3 }
|
|
3243
3261
|
);
|
|
3244
3262
|
} catch {
|
|
3245
3263
|
}
|
|
3246
|
-
|
|
3264
|
+
execSync3(
|
|
3247
3265
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
3248
3266
|
{ timeout: 5e3 }
|
|
3249
3267
|
);
|
|
@@ -3256,7 +3274,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
3256
3274
|
if (!nativeKeychainAllowed()) return false;
|
|
3257
3275
|
if (process.platform !== "darwin") return false;
|
|
3258
3276
|
try {
|
|
3259
|
-
|
|
3277
|
+
execSync3(
|
|
3260
3278
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3261
3279
|
{ timeout: 5e3 }
|
|
3262
3280
|
);
|
|
@@ -3268,7 +3286,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
3268
3286
|
function linuxSecretGet(service = SERVICE) {
|
|
3269
3287
|
if (!linuxSecretAvailable()) return null;
|
|
3270
3288
|
try {
|
|
3271
|
-
return
|
|
3289
|
+
return execSync3(
|
|
3272
3290
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3273
3291
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3274
3292
|
).trim();
|
|
@@ -3279,7 +3297,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
3279
3297
|
function linuxSecretSet(value, service = SERVICE) {
|
|
3280
3298
|
if (!linuxSecretAvailable()) return false;
|
|
3281
3299
|
try {
|
|
3282
|
-
|
|
3300
|
+
execSync3(
|
|
3283
3301
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3284
3302
|
{ timeout: 5e3 }
|
|
3285
3303
|
);
|
|
@@ -3292,7 +3310,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
3292
3310
|
if (!nativeKeychainAllowed()) return false;
|
|
3293
3311
|
if (process.platform !== "linux") return false;
|
|
3294
3312
|
try {
|
|
3295
|
-
|
|
3313
|
+
execSync3(
|
|
3296
3314
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3297
3315
|
{ timeout: 5e3 }
|
|
3298
3316
|
);
|
|
@@ -5480,7 +5498,7 @@ var init_session_registry = __esm({
|
|
|
5480
5498
|
});
|
|
5481
5499
|
|
|
5482
5500
|
// src/lib/session-key.ts
|
|
5483
|
-
import { execSync as
|
|
5501
|
+
import { execSync as execSync4 } from "child_process";
|
|
5484
5502
|
function normalizeCommand(command) {
|
|
5485
5503
|
const trimmed = command.trim().toLowerCase();
|
|
5486
5504
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -5499,7 +5517,7 @@ function resolveRuntimeProcess() {
|
|
|
5499
5517
|
let pid = process.ppid;
|
|
5500
5518
|
for (let i = 0; i < 10; i++) {
|
|
5501
5519
|
try {
|
|
5502
|
-
const info =
|
|
5520
|
+
const info = execSync4(`ps -p ${pid} -o ppid=,comm=`, {
|
|
5503
5521
|
encoding: "utf8",
|
|
5504
5522
|
timeout: 2e3
|
|
5505
5523
|
}).trim();
|
|
@@ -5665,7 +5683,7 @@ var init_transport = __esm({
|
|
|
5665
5683
|
});
|
|
5666
5684
|
|
|
5667
5685
|
// src/lib/cc-agent-support.ts
|
|
5668
|
-
import { execSync as
|
|
5686
|
+
import { execSync as execSync5 } from "child_process";
|
|
5669
5687
|
var init_cc_agent_support = __esm({
|
|
5670
5688
|
"src/lib/cc-agent-support.ts"() {
|
|
5671
5689
|
"use strict";
|
|
@@ -6296,7 +6314,7 @@ var init_notifications = __esm({
|
|
|
6296
6314
|
import crypto3 from "crypto";
|
|
6297
6315
|
import path16 from "path";
|
|
6298
6316
|
import os12 from "os";
|
|
6299
|
-
import { execSync as
|
|
6317
|
+
import { execSync as execSync6 } from "child_process";
|
|
6300
6318
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
6301
6319
|
import { existsSync as existsSync15, readFileSync as readFileSync11 } from "fs";
|
|
6302
6320
|
async function writeCheckpoint(input) {
|
|
@@ -6438,14 +6456,14 @@ function isTmuxSessionAlive(identifier) {
|
|
|
6438
6456
|
if (!identifier || identifier === "unknown") return true;
|
|
6439
6457
|
try {
|
|
6440
6458
|
if (identifier.startsWith("%")) {
|
|
6441
|
-
const output =
|
|
6459
|
+
const output = execSync6("tmux list-panes -a -F '#{pane_id}'", {
|
|
6442
6460
|
timeout: 2e3,
|
|
6443
6461
|
encoding: "utf8",
|
|
6444
6462
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6445
6463
|
});
|
|
6446
6464
|
return output.split("\n").some((l) => l.trim() === identifier);
|
|
6447
6465
|
} else {
|
|
6448
|
-
|
|
6466
|
+
execSync6(`tmux has-session -t ${JSON.stringify(identifier)}`, {
|
|
6449
6467
|
timeout: 2e3,
|
|
6450
6468
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6451
6469
|
});
|
|
@@ -6454,7 +6472,7 @@ function isTmuxSessionAlive(identifier) {
|
|
|
6454
6472
|
} catch {
|
|
6455
6473
|
if (identifier.startsWith("%")) return true;
|
|
6456
6474
|
try {
|
|
6457
|
-
|
|
6475
|
+
execSync6("tmux list-sessions", {
|
|
6458
6476
|
timeout: 2e3,
|
|
6459
6477
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6460
6478
|
});
|
|
@@ -6469,12 +6487,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
|
|
|
6469
6487
|
if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
|
|
6470
6488
|
try {
|
|
6471
6489
|
const since = new Date(taskCreatedAt).toISOString();
|
|
6472
|
-
const branch =
|
|
6490
|
+
const branch = execSync6(
|
|
6473
6491
|
"git rev-parse --abbrev-ref HEAD 2>/dev/null",
|
|
6474
6492
|
{ encoding: "utf8", timeout: 3e3 }
|
|
6475
6493
|
).trim();
|
|
6476
6494
|
const branchArg = branch && branch !== "HEAD" ? branch : "";
|
|
6477
|
-
const commitCount =
|
|
6495
|
+
const commitCount = execSync6(
|
|
6478
6496
|
`git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
|
|
6479
6497
|
{ encoding: "utf8", timeout: 5e3 }
|
|
6480
6498
|
).trim();
|