@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
|
@@ -1580,7 +1580,7 @@ __export(exe_daemon_client_exports, {
|
|
|
1580
1580
|
});
|
|
1581
1581
|
import net from "net";
|
|
1582
1582
|
import os6 from "os";
|
|
1583
|
-
import { spawn } from "child_process";
|
|
1583
|
+
import { spawn, execSync as execSync4 } from "child_process";
|
|
1584
1584
|
import { randomUUID } from "crypto";
|
|
1585
1585
|
import { existsSync as existsSync8, unlinkSync as unlinkSync2, readFileSync as readFileSync7, openSync, closeSync, statSync } from "fs";
|
|
1586
1586
|
import path8 from "path";
|
|
@@ -1610,6 +1610,14 @@ function handleData(chunk) {
|
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
|
+
function isZombie(pid) {
|
|
1614
|
+
try {
|
|
1615
|
+
const state = execSync4(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1616
|
+
return state.startsWith("Z");
|
|
1617
|
+
} catch {
|
|
1618
|
+
return false;
|
|
1619
|
+
}
|
|
1620
|
+
}
|
|
1613
1621
|
function cleanupStaleFiles() {
|
|
1614
1622
|
if (existsSync8(PID_PATH)) {
|
|
1615
1623
|
try {
|
|
@@ -1617,7 +1625,11 @@ function cleanupStaleFiles() {
|
|
|
1617
1625
|
if (pid > 0) {
|
|
1618
1626
|
try {
|
|
1619
1627
|
process.kill(pid, 0);
|
|
1620
|
-
|
|
1628
|
+
if (!isZombie(pid)) {
|
|
1629
|
+
return;
|
|
1630
|
+
}
|
|
1631
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1632
|
+
`);
|
|
1621
1633
|
} catch {
|
|
1622
1634
|
}
|
|
1623
1635
|
}
|
|
@@ -1645,8 +1657,8 @@ function findPackageRoot() {
|
|
|
1645
1657
|
function getAvailableMemoryGB() {
|
|
1646
1658
|
if (process.platform === "darwin") {
|
|
1647
1659
|
try {
|
|
1648
|
-
const { execSync:
|
|
1649
|
-
const vmstat =
|
|
1660
|
+
const { execSync: execSync11 } = __require("child_process");
|
|
1661
|
+
const vmstat = execSync11("vm_stat", { encoding: "utf8" });
|
|
1650
1662
|
const pageSize = 16384;
|
|
1651
1663
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1652
1664
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3636,6 +3648,12 @@ async function disposeDatabase() {
|
|
|
3636
3648
|
clearInterval(_walCheckpointTimer);
|
|
3637
3649
|
_walCheckpointTimer = null;
|
|
3638
3650
|
}
|
|
3651
|
+
if (_client) {
|
|
3652
|
+
try {
|
|
3653
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
3654
|
+
} catch {
|
|
3655
|
+
}
|
|
3656
|
+
}
|
|
3639
3657
|
if (_daemonClient) {
|
|
3640
3658
|
_daemonClient.close();
|
|
3641
3659
|
_daemonClient = null;
|
|
@@ -3984,7 +4002,7 @@ var init_state_bus = __esm({
|
|
|
3984
4002
|
});
|
|
3985
4003
|
|
|
3986
4004
|
// src/lib/project-name.ts
|
|
3987
|
-
import { execSync as
|
|
4005
|
+
import { execSync as execSync5 } from "child_process";
|
|
3988
4006
|
import path13 from "path";
|
|
3989
4007
|
function getProjectName(cwd) {
|
|
3990
4008
|
const dir = cwd ?? process.cwd();
|
|
@@ -3992,7 +4010,7 @@ function getProjectName(cwd) {
|
|
|
3992
4010
|
try {
|
|
3993
4011
|
let repoRoot;
|
|
3994
4012
|
try {
|
|
3995
|
-
const gitCommonDir =
|
|
4013
|
+
const gitCommonDir = execSync5("git rev-parse --path-format=absolute --git-common-dir", {
|
|
3996
4014
|
cwd: dir,
|
|
3997
4015
|
encoding: "utf8",
|
|
3998
4016
|
timeout: 2e3,
|
|
@@ -4000,7 +4018,7 @@ function getProjectName(cwd) {
|
|
|
4000
4018
|
}).trim();
|
|
4001
4019
|
repoRoot = path13.dirname(gitCommonDir);
|
|
4002
4020
|
} catch {
|
|
4003
|
-
repoRoot =
|
|
4021
|
+
repoRoot = execSync5("git rev-parse --show-toplevel", {
|
|
4004
4022
|
cwd: dir,
|
|
4005
4023
|
encoding: "utf8",
|
|
4006
4024
|
timeout: 2e3,
|
|
@@ -4107,7 +4125,7 @@ __export(tasks_crud_exports, {
|
|
|
4107
4125
|
import crypto4 from "crypto";
|
|
4108
4126
|
import path14 from "path";
|
|
4109
4127
|
import os10 from "os";
|
|
4110
|
-
import { execSync as
|
|
4128
|
+
import { execSync as execSync6 } from "child_process";
|
|
4111
4129
|
import { mkdir as mkdir3, writeFile as writeFile3, appendFile } from "fs/promises";
|
|
4112
4130
|
import { existsSync as existsSync13, readFileSync as readFileSync11 } from "fs";
|
|
4113
4131
|
async function writeCheckpoint(input) {
|
|
@@ -4452,14 +4470,14 @@ function isTmuxSessionAlive(identifier) {
|
|
|
4452
4470
|
if (!identifier || identifier === "unknown") return true;
|
|
4453
4471
|
try {
|
|
4454
4472
|
if (identifier.startsWith("%")) {
|
|
4455
|
-
const output =
|
|
4473
|
+
const output = execSync6("tmux list-panes -a -F '#{pane_id}'", {
|
|
4456
4474
|
timeout: 2e3,
|
|
4457
4475
|
encoding: "utf8",
|
|
4458
4476
|
stdio: ["pipe", "pipe", "pipe"]
|
|
4459
4477
|
});
|
|
4460
4478
|
return output.split("\n").some((l) => l.trim() === identifier);
|
|
4461
4479
|
} else {
|
|
4462
|
-
|
|
4480
|
+
execSync6(`tmux has-session -t ${JSON.stringify(identifier)}`, {
|
|
4463
4481
|
timeout: 2e3,
|
|
4464
4482
|
stdio: ["pipe", "pipe", "pipe"]
|
|
4465
4483
|
});
|
|
@@ -4468,7 +4486,7 @@ function isTmuxSessionAlive(identifier) {
|
|
|
4468
4486
|
} catch {
|
|
4469
4487
|
if (identifier.startsWith("%")) return true;
|
|
4470
4488
|
try {
|
|
4471
|
-
|
|
4489
|
+
execSync6("tmux list-sessions", {
|
|
4472
4490
|
timeout: 2e3,
|
|
4473
4491
|
stdio: ["pipe", "pipe", "pipe"]
|
|
4474
4492
|
});
|
|
@@ -4483,12 +4501,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
|
|
|
4483
4501
|
if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
|
|
4484
4502
|
try {
|
|
4485
4503
|
const since = new Date(taskCreatedAt).toISOString();
|
|
4486
|
-
const branch =
|
|
4504
|
+
const branch = execSync6(
|
|
4487
4505
|
"git rev-parse --abbrev-ref HEAD 2>/dev/null",
|
|
4488
4506
|
{ encoding: "utf8", timeout: 3e3 }
|
|
4489
4507
|
).trim();
|
|
4490
4508
|
const branchArg = branch && branch !== "HEAD" ? branch : "";
|
|
4491
|
-
const commitCount =
|
|
4509
|
+
const commitCount = execSync6(
|
|
4492
4510
|
`git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
|
|
4493
4511
|
{ encoding: "utf8", timeout: 5e3 }
|
|
4494
4512
|
).trim();
|
|
@@ -6087,7 +6105,7 @@ __export(tmux_routing_exports, {
|
|
|
6087
6105
|
spawnEmployee: () => spawnEmployee,
|
|
6088
6106
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
6089
6107
|
});
|
|
6090
|
-
import { execFileSync as execFileSync2, execSync as
|
|
6108
|
+
import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
|
|
6091
6109
|
import { readFileSync as readFileSync12, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7, existsSync as existsSync15, appendFileSync, readdirSync as readdirSync3 } from "fs";
|
|
6092
6110
|
import path18 from "path";
|
|
6093
6111
|
import os11 from "os";
|
|
@@ -6808,7 +6826,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
6808
6826
|
let booted = false;
|
|
6809
6827
|
for (let i = 0; i < 30; i++) {
|
|
6810
6828
|
try {
|
|
6811
|
-
|
|
6829
|
+
execSync7("sleep 0.5");
|
|
6812
6830
|
} catch {
|
|
6813
6831
|
}
|
|
6814
6832
|
try {
|
|
@@ -6920,7 +6938,7 @@ var init_task_scope = __esm({
|
|
|
6920
6938
|
// src/lib/keychain.ts
|
|
6921
6939
|
import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2 } from "fs/promises";
|
|
6922
6940
|
import { existsSync as existsSync16, statSync as statSync2 } from "fs";
|
|
6923
|
-
import { execSync as
|
|
6941
|
+
import { execSync as execSync9 } from "child_process";
|
|
6924
6942
|
import path19 from "path";
|
|
6925
6943
|
import os12 from "os";
|
|
6926
6944
|
function getKeyDir() {
|
|
@@ -6937,13 +6955,13 @@ function linuxSecretAvailable() {
|
|
|
6937
6955
|
if (process.platform !== "linux") return false;
|
|
6938
6956
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
6939
6957
|
try {
|
|
6940
|
-
|
|
6958
|
+
execSync9("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
6941
6959
|
} catch {
|
|
6942
6960
|
linuxSecretAvailability = false;
|
|
6943
6961
|
return false;
|
|
6944
6962
|
}
|
|
6945
6963
|
try {
|
|
6946
|
-
|
|
6964
|
+
execSync9("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
6947
6965
|
linuxSecretAvailability = true;
|
|
6948
6966
|
} catch {
|
|
6949
6967
|
linuxSecretAvailability = false;
|
|
@@ -6967,7 +6985,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
6967
6985
|
if (!nativeKeychainAllowed()) return null;
|
|
6968
6986
|
if (process.platform !== "darwin") return null;
|
|
6969
6987
|
try {
|
|
6970
|
-
return
|
|
6988
|
+
return execSync9(
|
|
6971
6989
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
6972
6990
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
6973
6991
|
).trim();
|
|
@@ -6980,13 +6998,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
6980
6998
|
if (process.platform !== "darwin") return false;
|
|
6981
6999
|
try {
|
|
6982
7000
|
try {
|
|
6983
|
-
|
|
7001
|
+
execSync9(
|
|
6984
7002
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
6985
7003
|
{ timeout: 5e3 }
|
|
6986
7004
|
);
|
|
6987
7005
|
} catch {
|
|
6988
7006
|
}
|
|
6989
|
-
|
|
7007
|
+
execSync9(
|
|
6990
7008
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
6991
7009
|
{ timeout: 5e3 }
|
|
6992
7010
|
);
|
|
@@ -6999,7 +7017,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
6999
7017
|
if (!nativeKeychainAllowed()) return false;
|
|
7000
7018
|
if (process.platform !== "darwin") return false;
|
|
7001
7019
|
try {
|
|
7002
|
-
|
|
7020
|
+
execSync9(
|
|
7003
7021
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
7004
7022
|
{ timeout: 5e3 }
|
|
7005
7023
|
);
|
|
@@ -7011,7 +7029,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
7011
7029
|
function linuxSecretGet(service = SERVICE) {
|
|
7012
7030
|
if (!linuxSecretAvailable()) return null;
|
|
7013
7031
|
try {
|
|
7014
|
-
return
|
|
7032
|
+
return execSync9(
|
|
7015
7033
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
7016
7034
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
7017
7035
|
).trim();
|
|
@@ -7022,7 +7040,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
7022
7040
|
function linuxSecretSet(value, service = SERVICE) {
|
|
7023
7041
|
if (!linuxSecretAvailable()) return false;
|
|
7024
7042
|
try {
|
|
7025
|
-
|
|
7043
|
+
execSync9(
|
|
7026
7044
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
7027
7045
|
{ timeout: 5e3 }
|
|
7028
7046
|
);
|
|
@@ -7035,7 +7053,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
7035
7053
|
if (!nativeKeychainAllowed()) return false;
|
|
7036
7054
|
if (process.platform !== "linux") return false;
|
|
7037
7055
|
try {
|
|
7038
|
-
|
|
7056
|
+
execSync9(
|
|
7039
7057
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
7040
7058
|
{ timeout: 5e3 }
|
|
7041
7059
|
);
|
|
@@ -9229,11 +9247,11 @@ var init_fast_db_init = __esm({
|
|
|
9229
9247
|
});
|
|
9230
9248
|
|
|
9231
9249
|
// src/adapters/claude/hooks/commit-complete.ts
|
|
9232
|
-
import { execSync as
|
|
9250
|
+
import { execSync as execSync10 } from "child_process";
|
|
9233
9251
|
|
|
9234
9252
|
// src/lib/git-task-sweep.ts
|
|
9235
9253
|
init_task_scope();
|
|
9236
|
-
import { execSync as
|
|
9254
|
+
import { execSync as execSync8 } from "child_process";
|
|
9237
9255
|
var EXACT_UUID_SCORE = 1;
|
|
9238
9256
|
var TITLE_KEYWORD_SCORE = 0.5;
|
|
9239
9257
|
var FILE_PATH_SCORE = 0.3;
|
|
@@ -9307,7 +9325,7 @@ function parseGitCommitOutput(output) {
|
|
|
9307
9325
|
}
|
|
9308
9326
|
function getChangedFiles(hash) {
|
|
9309
9327
|
try {
|
|
9310
|
-
const output =
|
|
9328
|
+
const output = execSync10(
|
|
9311
9329
|
`git diff-tree --no-commit-id --name-only -r ${hash}`,
|
|
9312
9330
|
{ encoding: "utf8", timeout: 5e3 }
|
|
9313
9331
|
);
|
|
@@ -1048,7 +1048,7 @@ var init_daemon_auth = __esm({
|
|
|
1048
1048
|
// src/lib/exe-daemon-client.ts
|
|
1049
1049
|
import net from "net";
|
|
1050
1050
|
import os4 from "os";
|
|
1051
|
-
import { spawn } from "child_process";
|
|
1051
|
+
import { spawn, execSync as execSync2 } from "child_process";
|
|
1052
1052
|
import { randomUUID } from "crypto";
|
|
1053
1053
|
import { existsSync as existsSync5, unlinkSync as unlinkSync2, readFileSync as readFileSync4, openSync, closeSync, statSync } from "fs";
|
|
1054
1054
|
import path5 from "path";
|
|
@@ -1078,6 +1078,14 @@ function handleData(chunk) {
|
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
|
+
function isZombie(pid) {
|
|
1082
|
+
try {
|
|
1083
|
+
const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1084
|
+
return state.startsWith("Z");
|
|
1085
|
+
} catch {
|
|
1086
|
+
return false;
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1081
1089
|
function cleanupStaleFiles() {
|
|
1082
1090
|
if (existsSync5(PID_PATH)) {
|
|
1083
1091
|
try {
|
|
@@ -1085,7 +1093,11 @@ function cleanupStaleFiles() {
|
|
|
1085
1093
|
if (pid > 0) {
|
|
1086
1094
|
try {
|
|
1087
1095
|
process.kill(pid, 0);
|
|
1088
|
-
|
|
1096
|
+
if (!isZombie(pid)) {
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1100
|
+
`);
|
|
1089
1101
|
} catch {
|
|
1090
1102
|
}
|
|
1091
1103
|
}
|
|
@@ -1113,8 +1125,8 @@ function findPackageRoot() {
|
|
|
1113
1125
|
function getAvailableMemoryGB() {
|
|
1114
1126
|
if (process.platform === "darwin") {
|
|
1115
1127
|
try {
|
|
1116
|
-
const { execSync:
|
|
1117
|
-
const vmstat =
|
|
1128
|
+
const { execSync: execSync8 } = __require("child_process");
|
|
1129
|
+
const vmstat = execSync8("vm_stat", { encoding: "utf8" });
|
|
1118
1130
|
const pageSize = 16384;
|
|
1119
1131
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1120
1132
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3049,6 +3061,12 @@ async function disposeDatabase() {
|
|
|
3049
3061
|
clearInterval(_walCheckpointTimer);
|
|
3050
3062
|
_walCheckpointTimer = null;
|
|
3051
3063
|
}
|
|
3064
|
+
if (_client) {
|
|
3065
|
+
try {
|
|
3066
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
3067
|
+
} catch {
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3052
3070
|
if (_daemonClient) {
|
|
3053
3071
|
_daemonClient.close();
|
|
3054
3072
|
_daemonClient = null;
|
|
@@ -3085,7 +3103,7 @@ var init_database = __esm({
|
|
|
3085
3103
|
// src/lib/keychain.ts
|
|
3086
3104
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3087
3105
|
import { existsSync as existsSync6, statSync as statSync2 } from "fs";
|
|
3088
|
-
import { execSync as
|
|
3106
|
+
import { execSync as execSync3 } from "child_process";
|
|
3089
3107
|
import path6 from "path";
|
|
3090
3108
|
import os5 from "os";
|
|
3091
3109
|
function getKeyDir() {
|
|
@@ -3102,13 +3120,13 @@ function linuxSecretAvailable() {
|
|
|
3102
3120
|
if (process.platform !== "linux") return false;
|
|
3103
3121
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
3104
3122
|
try {
|
|
3105
|
-
|
|
3123
|
+
execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
3106
3124
|
} catch {
|
|
3107
3125
|
linuxSecretAvailability = false;
|
|
3108
3126
|
return false;
|
|
3109
3127
|
}
|
|
3110
3128
|
try {
|
|
3111
|
-
|
|
3129
|
+
execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
3112
3130
|
linuxSecretAvailability = true;
|
|
3113
3131
|
} catch {
|
|
3114
3132
|
linuxSecretAvailability = false;
|
|
@@ -3132,7 +3150,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
3132
3150
|
if (!nativeKeychainAllowed()) return null;
|
|
3133
3151
|
if (process.platform !== "darwin") return null;
|
|
3134
3152
|
try {
|
|
3135
|
-
return
|
|
3153
|
+
return execSync3(
|
|
3136
3154
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3137
3155
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3138
3156
|
).trim();
|
|
@@ -3145,13 +3163,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
3145
3163
|
if (process.platform !== "darwin") return false;
|
|
3146
3164
|
try {
|
|
3147
3165
|
try {
|
|
3148
|
-
|
|
3166
|
+
execSync3(
|
|
3149
3167
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3150
3168
|
{ timeout: 5e3 }
|
|
3151
3169
|
);
|
|
3152
3170
|
} catch {
|
|
3153
3171
|
}
|
|
3154
|
-
|
|
3172
|
+
execSync3(
|
|
3155
3173
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
3156
3174
|
{ timeout: 5e3 }
|
|
3157
3175
|
);
|
|
@@ -3164,7 +3182,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
3164
3182
|
if (!nativeKeychainAllowed()) return false;
|
|
3165
3183
|
if (process.platform !== "darwin") return false;
|
|
3166
3184
|
try {
|
|
3167
|
-
|
|
3185
|
+
execSync3(
|
|
3168
3186
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3169
3187
|
{ timeout: 5e3 }
|
|
3170
3188
|
);
|
|
@@ -3176,7 +3194,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
3176
3194
|
function linuxSecretGet(service = SERVICE) {
|
|
3177
3195
|
if (!linuxSecretAvailable()) return null;
|
|
3178
3196
|
try {
|
|
3179
|
-
return
|
|
3197
|
+
return execSync3(
|
|
3180
3198
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3181
3199
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
3182
3200
|
).trim();
|
|
@@ -3187,7 +3205,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
3187
3205
|
function linuxSecretSet(value, service = SERVICE) {
|
|
3188
3206
|
if (!linuxSecretAvailable()) return false;
|
|
3189
3207
|
try {
|
|
3190
|
-
|
|
3208
|
+
execSync3(
|
|
3191
3209
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3192
3210
|
{ timeout: 5e3 }
|
|
3193
3211
|
);
|
|
@@ -3200,7 +3218,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
3200
3218
|
if (!nativeKeychainAllowed()) return false;
|
|
3201
3219
|
if (process.platform !== "linux") return false;
|
|
3202
3220
|
try {
|
|
3203
|
-
|
|
3221
|
+
execSync3(
|
|
3204
3222
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3205
3223
|
{ timeout: 5e3 }
|
|
3206
3224
|
);
|
|
@@ -5668,7 +5686,7 @@ __export(project_name_exports, {
|
|
|
5668
5686
|
_resetCache: () => _resetCache,
|
|
5669
5687
|
getProjectName: () => getProjectName
|
|
5670
5688
|
});
|
|
5671
|
-
import { execSync as
|
|
5689
|
+
import { execSync as execSync4 } from "child_process";
|
|
5672
5690
|
import path9 from "path";
|
|
5673
5691
|
function getProjectName(cwd) {
|
|
5674
5692
|
const dir = cwd ?? process.cwd();
|
|
@@ -5676,7 +5694,7 @@ function getProjectName(cwd) {
|
|
|
5676
5694
|
try {
|
|
5677
5695
|
let repoRoot;
|
|
5678
5696
|
try {
|
|
5679
|
-
const gitCommonDir =
|
|
5697
|
+
const gitCommonDir = execSync4("git rev-parse --path-format=absolute --git-common-dir", {
|
|
5680
5698
|
cwd: dir,
|
|
5681
5699
|
encoding: "utf8",
|
|
5682
5700
|
timeout: 2e3,
|
|
@@ -5684,7 +5702,7 @@ function getProjectName(cwd) {
|
|
|
5684
5702
|
}).trim();
|
|
5685
5703
|
repoRoot = path9.dirname(gitCommonDir);
|
|
5686
5704
|
} catch {
|
|
5687
|
-
repoRoot =
|
|
5705
|
+
repoRoot = execSync4("git rev-parse --show-toplevel", {
|
|
5688
5706
|
cwd: dir,
|
|
5689
5707
|
encoding: "utf8",
|
|
5690
5708
|
timeout: 2e3,
|
|
@@ -5718,14 +5736,14 @@ var file_grep_exports = {};
|
|
|
5718
5736
|
__export(file_grep_exports, {
|
|
5719
5737
|
grepProjectFiles: () => grepProjectFiles
|
|
5720
5738
|
});
|
|
5721
|
-
import { execSync as
|
|
5739
|
+
import { execSync as execSync5 } from "child_process";
|
|
5722
5740
|
import { readFileSync as readFileSync5, readdirSync as readdirSync2, statSync as statSync4, existsSync as existsSync9 } from "fs";
|
|
5723
5741
|
import path10 from "path";
|
|
5724
5742
|
import crypto3 from "crypto";
|
|
5725
5743
|
function hasRipgrep() {
|
|
5726
5744
|
if (_hasRg === null) {
|
|
5727
5745
|
try {
|
|
5728
|
-
|
|
5746
|
+
execSync5("rg --version", { stdio: "ignore", timeout: 2e3 });
|
|
5729
5747
|
_hasRg = true;
|
|
5730
5748
|
} catch {
|
|
5731
5749
|
_hasRg = false;
|
|
@@ -5791,7 +5809,7 @@ function grepWithRipgrep(pattern, projectRoot, patterns) {
|
|
|
5791
5809
|
const globs = (patterns ?? DEFAULT_PATTERNS).map((p) => `--glob '${p}'`).join(" ");
|
|
5792
5810
|
const excludes = EXCLUDE_DIRS.map((d) => `--glob '!${d}'`).join(" ");
|
|
5793
5811
|
const cmd = `rg -i -c --hidden --no-config --no-ignore '${pattern.replace(/'/g, "\\'")}' . ${globs} ${excludes} --max-filesize ${MAX_FILE_SIZE} 2>/dev/null || true`;
|
|
5794
|
-
const output =
|
|
5812
|
+
const output = execSync5(cmd, {
|
|
5795
5813
|
cwd: projectRoot,
|
|
5796
5814
|
encoding: "utf8",
|
|
5797
5815
|
timeout: 3e3,
|
|
@@ -5806,12 +5824,12 @@ function grepWithRipgrep(pattern, projectRoot, patterns) {
|
|
|
5806
5824
|
const matchCount = parseInt(line.slice(colonIdx + 1));
|
|
5807
5825
|
if (isNaN(matchCount) || matchCount === 0) continue;
|
|
5808
5826
|
try {
|
|
5809
|
-
const firstMatch =
|
|
5827
|
+
const firstMatch = execSync5(
|
|
5810
5828
|
`rg -i -n --hidden '${pattern.replace(/'/g, "\\'")}' '${filePath}' --max-count 1 2>/dev/null | head -1`,
|
|
5811
5829
|
{ cwd: projectRoot, encoding: "utf8", timeout: 1e3 }
|
|
5812
5830
|
).trim();
|
|
5813
5831
|
const lineNum = parseInt(firstMatch.split(":")[0] ?? "1");
|
|
5814
|
-
const totalLines =
|
|
5832
|
+
const totalLines = execSync5(`wc -l < '${filePath}'`, {
|
|
5815
5833
|
cwd: projectRoot,
|
|
5816
5834
|
encoding: "utf8",
|
|
5817
5835
|
timeout: 1e3
|
|
@@ -7259,11 +7277,11 @@ init_database();
|
|
|
7259
7277
|
// src/lib/active-agent.ts
|
|
7260
7278
|
init_config();
|
|
7261
7279
|
import { readFileSync as readFileSync6, writeFileSync as writeFileSync3, mkdirSync as mkdirSync3, unlinkSync as unlinkSync3, readdirSync as readdirSync3 } from "fs";
|
|
7262
|
-
import { execSync as
|
|
7280
|
+
import { execSync as execSync7 } from "child_process";
|
|
7263
7281
|
import path11 from "path";
|
|
7264
7282
|
|
|
7265
7283
|
// src/lib/session-key.ts
|
|
7266
|
-
import { execSync as
|
|
7284
|
+
import { execSync as execSync6 } from "child_process";
|
|
7267
7285
|
var _cached2 = null;
|
|
7268
7286
|
var _cachedRuntime = null;
|
|
7269
7287
|
var RUNTIME_COMMANDS = {
|
|
@@ -7289,7 +7307,7 @@ function resolveRuntimeProcess() {
|
|
|
7289
7307
|
let pid = process.ppid;
|
|
7290
7308
|
for (let i = 0; i < 10; i++) {
|
|
7291
7309
|
try {
|
|
7292
|
-
const info =
|
|
7310
|
+
const info = execSync6(`ps -p ${pid} -o ppid=,comm=`, {
|
|
7293
7311
|
encoding: "utf8",
|
|
7294
7312
|
timeout: 2e3
|
|
7295
7313
|
}).trim();
|
|
@@ -7411,7 +7429,7 @@ function getActiveAgent() {
|
|
|
7411
7429
|
} catch {
|
|
7412
7430
|
}
|
|
7413
7431
|
try {
|
|
7414
|
-
const sessionName =
|
|
7432
|
+
const sessionName = execSync7(
|
|
7415
7433
|
"tmux display-message -p '#{session_name}' 2>/dev/null",
|
|
7416
7434
|
{ encoding: "utf8", timeout: 2e3 }
|
|
7417
7435
|
).trim();
|
|
@@ -8,7 +8,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
8
8
|
// src/lib/exe-daemon-client.ts
|
|
9
9
|
import net from "net";
|
|
10
10
|
import os2 from "os";
|
|
11
|
-
import { spawn } from "child_process";
|
|
11
|
+
import { spawn, execSync } from "child_process";
|
|
12
12
|
import { randomUUID } from "crypto";
|
|
13
13
|
import { existsSync as existsSync4, unlinkSync, readFileSync as readFileSync3, openSync, closeSync, statSync } from "fs";
|
|
14
14
|
import path3 from "path";
|
|
@@ -497,7 +497,7 @@ function detectError(data) {
|
|
|
497
497
|
}
|
|
498
498
|
|
|
499
499
|
// src/lib/project-name.ts
|
|
500
|
-
import { execSync } from "child_process";
|
|
500
|
+
import { execSync as execSync2 } from "child_process";
|
|
501
501
|
import path5 from "path";
|
|
502
502
|
var _cached = null;
|
|
503
503
|
var _cachedCwd = null;
|
|
@@ -507,7 +507,7 @@ function getProjectName(cwd) {
|
|
|
507
507
|
try {
|
|
508
508
|
let repoRoot;
|
|
509
509
|
try {
|
|
510
|
-
const gitCommonDir =
|
|
510
|
+
const gitCommonDir = execSync2("git rev-parse --path-format=absolute --git-common-dir", {
|
|
511
511
|
cwd: dir,
|
|
512
512
|
encoding: "utf8",
|
|
513
513
|
timeout: 2e3,
|
|
@@ -515,7 +515,7 @@ function getProjectName(cwd) {
|
|
|
515
515
|
}).trim();
|
|
516
516
|
repoRoot = path5.dirname(gitCommonDir);
|
|
517
517
|
} catch {
|
|
518
|
-
repoRoot =
|
|
518
|
+
repoRoot = execSync2("git rev-parse --show-toplevel", {
|
|
519
519
|
cwd: dir,
|
|
520
520
|
encoding: "utf8",
|
|
521
521
|
timeout: 2e3,
|