@askexenow/exe-os 0.9.30 → 0.9.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/backfill-conversations.js +135 -7
- package/dist/bin/backfill-responses.js +135 -7
- package/dist/bin/backfill-vectors.js +135 -7
- package/dist/bin/cleanup-stale-review-tasks.js +139 -11
- package/dist/bin/cli.js +812 -486
- package/dist/bin/exe-assign.js +135 -7
- package/dist/bin/exe-boot.js +422 -113
- package/dist/bin/exe-cloud.js +160 -9
- package/dist/bin/exe-dispatch.js +136 -8
- package/dist/bin/exe-doctor.js +255 -13
- package/dist/bin/exe-export-behaviors.js +136 -8
- package/dist/bin/exe-forget.js +136 -8
- package/dist/bin/exe-gateway.js +171 -24
- package/dist/bin/exe-heartbeat.js +141 -13
- package/dist/bin/exe-kill.js +140 -12
- package/dist/bin/exe-launch-agent.js +143 -15
- package/dist/bin/exe-link.js +357 -48
- package/dist/bin/exe-pending-messages.js +136 -8
- package/dist/bin/exe-pending-notifications.js +136 -8
- package/dist/bin/exe-pending-reviews.js +138 -10
- package/dist/bin/exe-review.js +136 -8
- package/dist/bin/exe-search.js +155 -20
- package/dist/bin/exe-session-cleanup.js +166 -38
- package/dist/bin/exe-start-codex.js +142 -14
- package/dist/bin/exe-start-opencode.js +140 -12
- package/dist/bin/exe-status.js +148 -20
- package/dist/bin/exe-team.js +136 -8
- package/dist/bin/git-sweep.js +138 -10
- package/dist/bin/graph-backfill.js +135 -7
- package/dist/bin/graph-export.js +136 -8
- package/dist/bin/intercom-check.js +153 -25
- package/dist/bin/scan-tasks.js +138 -10
- package/dist/bin/setup.js +447 -121
- package/dist/bin/shard-migrate.js +135 -7
- package/dist/gateway/index.js +151 -23
- package/dist/hooks/bug-report-worker.js +151 -23
- package/dist/hooks/codex-stop-task-finalizer.js +145 -17
- package/dist/hooks/commit-complete.js +138 -10
- package/dist/hooks/error-recall.js +159 -24
- package/dist/hooks/ingest.js +142 -14
- package/dist/hooks/instructions-loaded.js +136 -8
- package/dist/hooks/notification.js +136 -8
- package/dist/hooks/post-compact.js +136 -8
- package/dist/hooks/post-tool-combined.js +159 -24
- package/dist/hooks/pre-compact.js +136 -8
- package/dist/hooks/pre-tool-use.js +144 -16
- package/dist/hooks/prompt-submit.js +195 -55
- package/dist/hooks/session-end.js +141 -13
- package/dist/hooks/session-start.js +165 -30
- package/dist/hooks/stop.js +136 -8
- package/dist/hooks/subagent-stop.js +136 -8
- package/dist/hooks/summary-worker.js +374 -65
- package/dist/index.js +136 -8
- package/dist/lib/cloud-sync.js +355 -46
- package/dist/lib/consolidation.js +1 -0
- package/dist/lib/exe-daemon.js +469 -127
- package/dist/lib/hybrid-search.js +155 -20
- package/dist/lib/keychain.js +191 -7
- package/dist/lib/schedules.js +138 -10
- package/dist/lib/store.js +135 -7
- package/dist/mcp/server.js +706 -213
- package/dist/runtime/index.js +136 -8
- package/dist/tui/App.js +208 -31
- package/package.json +1 -1
|
@@ -1029,8 +1029,8 @@ function findPackageRoot() {
|
|
|
1029
1029
|
function getAvailableMemoryGB() {
|
|
1030
1030
|
if (process.platform === "darwin") {
|
|
1031
1031
|
try {
|
|
1032
|
-
const { execSync:
|
|
1033
|
-
const vmstat =
|
|
1032
|
+
const { execSync: execSync3 } = __require("child_process");
|
|
1033
|
+
const vmstat = execSync3("vm_stat", { encoding: "utf8" });
|
|
1034
1034
|
const pageSize = 16384;
|
|
1035
1035
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1036
1036
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3141,6 +3141,7 @@ import { createHash } from "crypto";
|
|
|
3141
3141
|
// src/lib/keychain.ts
|
|
3142
3142
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3143
3143
|
import { existsSync as existsSync6 } from "fs";
|
|
3144
|
+
import { execSync as execSync2 } from "child_process";
|
|
3144
3145
|
import path6 from "path";
|
|
3145
3146
|
import os5 from "os";
|
|
3146
3147
|
var SERVICE = "exe-mem";
|
|
@@ -3151,6 +3152,59 @@ function getKeyDir() {
|
|
|
3151
3152
|
function getKeyPath() {
|
|
3152
3153
|
return path6.join(getKeyDir(), "master.key");
|
|
3153
3154
|
}
|
|
3155
|
+
function macKeychainGet() {
|
|
3156
|
+
if (process.platform !== "darwin") return null;
|
|
3157
|
+
try {
|
|
3158
|
+
return execSync2(
|
|
3159
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3160
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
3161
|
+
).trim();
|
|
3162
|
+
} catch {
|
|
3163
|
+
return null;
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
function macKeychainSet(value) {
|
|
3167
|
+
if (process.platform !== "darwin") return false;
|
|
3168
|
+
try {
|
|
3169
|
+
try {
|
|
3170
|
+
execSync2(
|
|
3171
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3172
|
+
{ timeout: 5e3 }
|
|
3173
|
+
);
|
|
3174
|
+
} catch {
|
|
3175
|
+
}
|
|
3176
|
+
execSync2(
|
|
3177
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
3178
|
+
{ timeout: 5e3 }
|
|
3179
|
+
);
|
|
3180
|
+
return true;
|
|
3181
|
+
} catch {
|
|
3182
|
+
return false;
|
|
3183
|
+
}
|
|
3184
|
+
}
|
|
3185
|
+
function linuxSecretGet() {
|
|
3186
|
+
if (process.platform !== "linux") return null;
|
|
3187
|
+
try {
|
|
3188
|
+
return execSync2(
|
|
3189
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3190
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
3191
|
+
).trim();
|
|
3192
|
+
} catch {
|
|
3193
|
+
return null;
|
|
3194
|
+
}
|
|
3195
|
+
}
|
|
3196
|
+
function linuxSecretSet(value) {
|
|
3197
|
+
if (process.platform !== "linux") return false;
|
|
3198
|
+
try {
|
|
3199
|
+
execSync2(
|
|
3200
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
3201
|
+
{ timeout: 5e3 }
|
|
3202
|
+
);
|
|
3203
|
+
return true;
|
|
3204
|
+
} catch {
|
|
3205
|
+
return false;
|
|
3206
|
+
}
|
|
3207
|
+
}
|
|
3154
3208
|
async function tryKeytar() {
|
|
3155
3209
|
try {
|
|
3156
3210
|
return await import("keytar");
|
|
@@ -3158,13 +3212,64 @@ async function tryKeytar() {
|
|
|
3158
3212
|
return null;
|
|
3159
3213
|
}
|
|
3160
3214
|
}
|
|
3215
|
+
var ENCRYPTED_PREFIX = "enc:";
|
|
3216
|
+
function deriveMachineKey() {
|
|
3217
|
+
try {
|
|
3218
|
+
const crypto2 = __require("crypto");
|
|
3219
|
+
const material = [
|
|
3220
|
+
os5.hostname(),
|
|
3221
|
+
os5.userInfo().username,
|
|
3222
|
+
os5.arch(),
|
|
3223
|
+
os5.platform(),
|
|
3224
|
+
// Machine ID on Linux (stable across reboots)
|
|
3225
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
3226
|
+
].join("|");
|
|
3227
|
+
return crypto2.createHash("sha256").update(material).digest();
|
|
3228
|
+
} catch {
|
|
3229
|
+
return null;
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
function readMachineId() {
|
|
3233
|
+
try {
|
|
3234
|
+
const { readFileSync: readFileSync5 } = __require("fs");
|
|
3235
|
+
return readFileSync5("/etc/machine-id", "utf-8").trim();
|
|
3236
|
+
} catch {
|
|
3237
|
+
return "";
|
|
3238
|
+
}
|
|
3239
|
+
}
|
|
3240
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
3241
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
3242
|
+
try {
|
|
3243
|
+
const crypto2 = __require("crypto");
|
|
3244
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
3245
|
+
if (parts.length !== 3) return null;
|
|
3246
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
3247
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
3248
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
3249
|
+
const decipher = crypto2.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
3250
|
+
decipher.setAuthTag(authTag);
|
|
3251
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
3252
|
+
decrypted += decipher.final("utf-8");
|
|
3253
|
+
return decrypted;
|
|
3254
|
+
} catch {
|
|
3255
|
+
return null;
|
|
3256
|
+
}
|
|
3257
|
+
}
|
|
3161
3258
|
async function getMasterKey() {
|
|
3259
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
3260
|
+
if (nativeValue) {
|
|
3261
|
+
return Buffer.from(nativeValue, "base64");
|
|
3262
|
+
}
|
|
3162
3263
|
const keytar = await tryKeytar();
|
|
3163
3264
|
if (keytar) {
|
|
3164
3265
|
try {
|
|
3165
|
-
const
|
|
3166
|
-
if (
|
|
3167
|
-
|
|
3266
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
3267
|
+
if (keytarValue) {
|
|
3268
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
3269
|
+
if (migrated) {
|
|
3270
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
3271
|
+
}
|
|
3272
|
+
return Buffer.from(keytarValue, "base64");
|
|
3168
3273
|
}
|
|
3169
3274
|
} catch {
|
|
3170
3275
|
}
|
|
@@ -3178,8 +3283,31 @@ async function getMasterKey() {
|
|
|
3178
3283
|
return null;
|
|
3179
3284
|
}
|
|
3180
3285
|
try {
|
|
3181
|
-
const content = await readFile3(keyPath, "utf-8");
|
|
3182
|
-
|
|
3286
|
+
const content = (await readFile3(keyPath, "utf-8")).trim();
|
|
3287
|
+
let b64Value;
|
|
3288
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
3289
|
+
const machineKey = deriveMachineKey();
|
|
3290
|
+
if (!machineKey) {
|
|
3291
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
3292
|
+
return null;
|
|
3293
|
+
}
|
|
3294
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
3295
|
+
if (!decrypted) {
|
|
3296
|
+
process.stderr.write(
|
|
3297
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
3298
|
+
);
|
|
3299
|
+
return null;
|
|
3300
|
+
}
|
|
3301
|
+
b64Value = decrypted;
|
|
3302
|
+
} else {
|
|
3303
|
+
b64Value = content;
|
|
3304
|
+
}
|
|
3305
|
+
const key = Buffer.from(b64Value, "base64");
|
|
3306
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
3307
|
+
if (migrated) {
|
|
3308
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
3309
|
+
}
|
|
3310
|
+
return key;
|
|
3183
3311
|
} catch (err) {
|
|
3184
3312
|
process.stderr.write(
|
|
3185
3313
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
package/dist/gateway/index.js
CHANGED
|
@@ -1739,8 +1739,8 @@ function findPackageRoot() {
|
|
|
1739
1739
|
function getAvailableMemoryGB() {
|
|
1740
1740
|
if (process.platform === "darwin") {
|
|
1741
1741
|
try {
|
|
1742
|
-
const { execSync:
|
|
1743
|
-
const vmstat =
|
|
1742
|
+
const { execSync: execSync8 } = __require("child_process");
|
|
1743
|
+
const vmstat = execSync8("vm_stat", { encoding: "utf8" });
|
|
1744
1744
|
const pageSize = 16384;
|
|
1745
1745
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1746
1746
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3492,6 +3492,7 @@ var init_embedder = __esm({
|
|
|
3492
3492
|
// src/lib/keychain.ts
|
|
3493
3493
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3494
3494
|
import { existsSync as existsSync7 } from "fs";
|
|
3495
|
+
import { execSync as execSync2 } from "child_process";
|
|
3495
3496
|
import path7 from "path";
|
|
3496
3497
|
import os5 from "os";
|
|
3497
3498
|
function getKeyDir() {
|
|
@@ -3500,6 +3501,59 @@ function getKeyDir() {
|
|
|
3500
3501
|
function getKeyPath() {
|
|
3501
3502
|
return path7.join(getKeyDir(), "master.key");
|
|
3502
3503
|
}
|
|
3504
|
+
function macKeychainGet() {
|
|
3505
|
+
if (process.platform !== "darwin") return null;
|
|
3506
|
+
try {
|
|
3507
|
+
return execSync2(
|
|
3508
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3509
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
3510
|
+
).trim();
|
|
3511
|
+
} catch {
|
|
3512
|
+
return null;
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
function macKeychainSet(value) {
|
|
3516
|
+
if (process.platform !== "darwin") return false;
|
|
3517
|
+
try {
|
|
3518
|
+
try {
|
|
3519
|
+
execSync2(
|
|
3520
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3521
|
+
{ timeout: 5e3 }
|
|
3522
|
+
);
|
|
3523
|
+
} catch {
|
|
3524
|
+
}
|
|
3525
|
+
execSync2(
|
|
3526
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
3527
|
+
{ timeout: 5e3 }
|
|
3528
|
+
);
|
|
3529
|
+
return true;
|
|
3530
|
+
} catch {
|
|
3531
|
+
return false;
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
3534
|
+
function linuxSecretGet() {
|
|
3535
|
+
if (process.platform !== "linux") return null;
|
|
3536
|
+
try {
|
|
3537
|
+
return execSync2(
|
|
3538
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3539
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
3540
|
+
).trim();
|
|
3541
|
+
} catch {
|
|
3542
|
+
return null;
|
|
3543
|
+
}
|
|
3544
|
+
}
|
|
3545
|
+
function linuxSecretSet(value) {
|
|
3546
|
+
if (process.platform !== "linux") return false;
|
|
3547
|
+
try {
|
|
3548
|
+
execSync2(
|
|
3549
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
3550
|
+
{ timeout: 5e3 }
|
|
3551
|
+
);
|
|
3552
|
+
return true;
|
|
3553
|
+
} catch {
|
|
3554
|
+
return false;
|
|
3555
|
+
}
|
|
3556
|
+
}
|
|
3503
3557
|
async function tryKeytar() {
|
|
3504
3558
|
try {
|
|
3505
3559
|
return await import("keytar");
|
|
@@ -3507,13 +3561,63 @@ async function tryKeytar() {
|
|
|
3507
3561
|
return null;
|
|
3508
3562
|
}
|
|
3509
3563
|
}
|
|
3564
|
+
function deriveMachineKey() {
|
|
3565
|
+
try {
|
|
3566
|
+
const crypto10 = __require("crypto");
|
|
3567
|
+
const material = [
|
|
3568
|
+
os5.hostname(),
|
|
3569
|
+
os5.userInfo().username,
|
|
3570
|
+
os5.arch(),
|
|
3571
|
+
os5.platform(),
|
|
3572
|
+
// Machine ID on Linux (stable across reboots)
|
|
3573
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
3574
|
+
].join("|");
|
|
3575
|
+
return crypto10.createHash("sha256").update(material).digest();
|
|
3576
|
+
} catch {
|
|
3577
|
+
return null;
|
|
3578
|
+
}
|
|
3579
|
+
}
|
|
3580
|
+
function readMachineId() {
|
|
3581
|
+
try {
|
|
3582
|
+
const { readFileSync: readFileSync15 } = __require("fs");
|
|
3583
|
+
return readFileSync15("/etc/machine-id", "utf-8").trim();
|
|
3584
|
+
} catch {
|
|
3585
|
+
return "";
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
3589
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
3590
|
+
try {
|
|
3591
|
+
const crypto10 = __require("crypto");
|
|
3592
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
3593
|
+
if (parts.length !== 3) return null;
|
|
3594
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
3595
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
3596
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
3597
|
+
const decipher = crypto10.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
3598
|
+
decipher.setAuthTag(authTag);
|
|
3599
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
3600
|
+
decrypted += decipher.final("utf-8");
|
|
3601
|
+
return decrypted;
|
|
3602
|
+
} catch {
|
|
3603
|
+
return null;
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3510
3606
|
async function getMasterKey() {
|
|
3607
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
3608
|
+
if (nativeValue) {
|
|
3609
|
+
return Buffer.from(nativeValue, "base64");
|
|
3610
|
+
}
|
|
3511
3611
|
const keytar = await tryKeytar();
|
|
3512
3612
|
if (keytar) {
|
|
3513
3613
|
try {
|
|
3514
|
-
const
|
|
3515
|
-
if (
|
|
3516
|
-
|
|
3614
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
3615
|
+
if (keytarValue) {
|
|
3616
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
3617
|
+
if (migrated) {
|
|
3618
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
3619
|
+
}
|
|
3620
|
+
return Buffer.from(keytarValue, "base64");
|
|
3517
3621
|
}
|
|
3518
3622
|
} catch {
|
|
3519
3623
|
}
|
|
@@ -3527,8 +3631,31 @@ async function getMasterKey() {
|
|
|
3527
3631
|
return null;
|
|
3528
3632
|
}
|
|
3529
3633
|
try {
|
|
3530
|
-
const content = await readFile3(keyPath, "utf-8");
|
|
3531
|
-
|
|
3634
|
+
const content = (await readFile3(keyPath, "utf-8")).trim();
|
|
3635
|
+
let b64Value;
|
|
3636
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
3637
|
+
const machineKey = deriveMachineKey();
|
|
3638
|
+
if (!machineKey) {
|
|
3639
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
3640
|
+
return null;
|
|
3641
|
+
}
|
|
3642
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
3643
|
+
if (!decrypted) {
|
|
3644
|
+
process.stderr.write(
|
|
3645
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
3646
|
+
);
|
|
3647
|
+
return null;
|
|
3648
|
+
}
|
|
3649
|
+
b64Value = decrypted;
|
|
3650
|
+
} else {
|
|
3651
|
+
b64Value = content;
|
|
3652
|
+
}
|
|
3653
|
+
const key = Buffer.from(b64Value, "base64");
|
|
3654
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
3655
|
+
if (migrated) {
|
|
3656
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
3657
|
+
}
|
|
3658
|
+
return key;
|
|
3532
3659
|
} catch (err) {
|
|
3533
3660
|
process.stderr.write(
|
|
3534
3661
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -3537,12 +3664,13 @@ async function getMasterKey() {
|
|
|
3537
3664
|
return null;
|
|
3538
3665
|
}
|
|
3539
3666
|
}
|
|
3540
|
-
var SERVICE, ACCOUNT;
|
|
3667
|
+
var SERVICE, ACCOUNT, ENCRYPTED_PREFIX;
|
|
3541
3668
|
var init_keychain = __esm({
|
|
3542
3669
|
"src/lib/keychain.ts"() {
|
|
3543
3670
|
"use strict";
|
|
3544
3671
|
SERVICE = "exe-mem";
|
|
3545
3672
|
ACCOUNT = "master-key";
|
|
3673
|
+
ENCRYPTED_PREFIX = "enc:";
|
|
3546
3674
|
}
|
|
3547
3675
|
});
|
|
3548
3676
|
|
|
@@ -5862,7 +5990,7 @@ var init_session_registry = __esm({
|
|
|
5862
5990
|
});
|
|
5863
5991
|
|
|
5864
5992
|
// src/lib/session-key.ts
|
|
5865
|
-
import { execSync as
|
|
5993
|
+
import { execSync as execSync3 } from "child_process";
|
|
5866
5994
|
function normalizeCommand(command) {
|
|
5867
5995
|
const trimmed = command.trim().toLowerCase();
|
|
5868
5996
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -5881,7 +6009,7 @@ function resolveRuntimeProcess() {
|
|
|
5881
6009
|
let pid = process.ppid;
|
|
5882
6010
|
for (let i = 0; i < 10; i++) {
|
|
5883
6011
|
try {
|
|
5884
|
-
const info =
|
|
6012
|
+
const info = execSync3(`ps -p ${pid} -o ppid=,comm=`, {
|
|
5885
6013
|
encoding: "utf8",
|
|
5886
6014
|
timeout: 2e3
|
|
5887
6015
|
}).trim();
|
|
@@ -6047,14 +6175,14 @@ var init_transport = __esm({
|
|
|
6047
6175
|
});
|
|
6048
6176
|
|
|
6049
6177
|
// src/lib/cc-agent-support.ts
|
|
6050
|
-
import { execSync as
|
|
6178
|
+
import { execSync as execSync4 } from "child_process";
|
|
6051
6179
|
function _resetCcAgentSupportCache() {
|
|
6052
6180
|
_cachedSupport = null;
|
|
6053
6181
|
}
|
|
6054
6182
|
function claudeSupportsAgentFlag() {
|
|
6055
6183
|
if (_cachedSupport !== null) return _cachedSupport;
|
|
6056
6184
|
try {
|
|
6057
|
-
const helpOutput =
|
|
6185
|
+
const helpOutput = execSync4("claude --help 2>&1", {
|
|
6058
6186
|
encoding: "utf-8",
|
|
6059
6187
|
timeout: 5e3
|
|
6060
6188
|
});
|
|
@@ -6474,7 +6602,7 @@ var init_session_kill_telemetry = __esm({
|
|
|
6474
6602
|
});
|
|
6475
6603
|
|
|
6476
6604
|
// src/lib/project-name.ts
|
|
6477
|
-
import { execSync as
|
|
6605
|
+
import { execSync as execSync5 } from "child_process";
|
|
6478
6606
|
import path15 from "path";
|
|
6479
6607
|
function getProjectName(cwd) {
|
|
6480
6608
|
const dir = cwd ?? process.cwd();
|
|
@@ -6482,7 +6610,7 @@ function getProjectName(cwd) {
|
|
|
6482
6610
|
try {
|
|
6483
6611
|
let repoRoot;
|
|
6484
6612
|
try {
|
|
6485
|
-
const gitCommonDir =
|
|
6613
|
+
const gitCommonDir = execSync5("git rev-parse --path-format=absolute --git-common-dir", {
|
|
6486
6614
|
cwd: dir,
|
|
6487
6615
|
encoding: "utf8",
|
|
6488
6616
|
timeout: 2e3,
|
|
@@ -6490,7 +6618,7 @@ function getProjectName(cwd) {
|
|
|
6490
6618
|
}).trim();
|
|
6491
6619
|
repoRoot = path15.dirname(gitCommonDir);
|
|
6492
6620
|
} catch {
|
|
6493
|
-
repoRoot =
|
|
6621
|
+
repoRoot = execSync5("git rev-parse --show-toplevel", {
|
|
6494
6622
|
cwd: dir,
|
|
6495
6623
|
encoding: "utf8",
|
|
6496
6624
|
timeout: 2e3,
|
|
@@ -6581,7 +6709,7 @@ var init_session_scope = __esm({
|
|
|
6581
6709
|
import crypto6 from "crypto";
|
|
6582
6710
|
import path16 from "path";
|
|
6583
6711
|
import os11 from "os";
|
|
6584
|
-
import { execSync as
|
|
6712
|
+
import { execSync as execSync6 } from "child_process";
|
|
6585
6713
|
import { mkdir as mkdir4, writeFile as writeFile4, appendFile } from "fs/promises";
|
|
6586
6714
|
import { existsSync as existsSync14, readFileSync as readFileSync12 } from "fs";
|
|
6587
6715
|
async function writeCheckpoint(input) {
|
|
@@ -6926,14 +7054,14 @@ function isTmuxSessionAlive(identifier) {
|
|
|
6926
7054
|
if (!identifier || identifier === "unknown") return true;
|
|
6927
7055
|
try {
|
|
6928
7056
|
if (identifier.startsWith("%")) {
|
|
6929
|
-
const output =
|
|
7057
|
+
const output = execSync6("tmux list-panes -a -F '#{pane_id}'", {
|
|
6930
7058
|
timeout: 2e3,
|
|
6931
7059
|
encoding: "utf8",
|
|
6932
7060
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6933
7061
|
});
|
|
6934
7062
|
return output.split("\n").some((l) => l.trim() === identifier);
|
|
6935
7063
|
} else {
|
|
6936
|
-
|
|
7064
|
+
execSync6(`tmux has-session -t ${JSON.stringify(identifier)}`, {
|
|
6937
7065
|
timeout: 2e3,
|
|
6938
7066
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6939
7067
|
});
|
|
@@ -6942,7 +7070,7 @@ function isTmuxSessionAlive(identifier) {
|
|
|
6942
7070
|
} catch {
|
|
6943
7071
|
if (identifier.startsWith("%")) return true;
|
|
6944
7072
|
try {
|
|
6945
|
-
|
|
7073
|
+
execSync6("tmux list-sessions", {
|
|
6946
7074
|
timeout: 2e3,
|
|
6947
7075
|
stdio: ["pipe", "pipe", "pipe"]
|
|
6948
7076
|
});
|
|
@@ -6957,12 +7085,12 @@ function checkStaleCompletion(taskContext, taskCreatedAt) {
|
|
|
6957
7085
|
if (!DELEGATION_KEYWORDS.test(taskContext)) return null;
|
|
6958
7086
|
try {
|
|
6959
7087
|
const since = new Date(taskCreatedAt).toISOString();
|
|
6960
|
-
const branch =
|
|
7088
|
+
const branch = execSync6(
|
|
6961
7089
|
"git rev-parse --abbrev-ref HEAD 2>/dev/null",
|
|
6962
7090
|
{ encoding: "utf8", timeout: 3e3 }
|
|
6963
7091
|
).trim();
|
|
6964
7092
|
const branchArg = branch && branch !== "HEAD" ? branch : "";
|
|
6965
|
-
const commitCount =
|
|
7093
|
+
const commitCount = execSync6(
|
|
6966
7094
|
`git log --oneline --since="${since}" ${branchArg} 2>/dev/null | wc -l`,
|
|
6967
7095
|
{ encoding: "utf8", timeout: 5e3 }
|
|
6968
7096
|
).trim();
|
|
@@ -8492,7 +8620,7 @@ __export(tmux_routing_exports, {
|
|
|
8492
8620
|
spawnEmployee: () => spawnEmployee,
|
|
8493
8621
|
verifyPaneAtCapacity: () => verifyPaneAtCapacity
|
|
8494
8622
|
});
|
|
8495
|
-
import { execFileSync as execFileSync2, execSync as
|
|
8623
|
+
import { execFileSync as execFileSync2, execSync as execSync7 } from "child_process";
|
|
8496
8624
|
import { readFileSync as readFileSync13, writeFileSync as writeFileSync8, mkdirSync as mkdirSync8, existsSync as existsSync16, appendFileSync, readdirSync as readdirSync4 } from "fs";
|
|
8497
8625
|
import path20 from "path";
|
|
8498
8626
|
import os12 from "os";
|
|
@@ -9202,7 +9330,7 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
|
|
|
9202
9330
|
let booted = false;
|
|
9203
9331
|
for (let i = 0; i < 30; i++) {
|
|
9204
9332
|
try {
|
|
9205
|
-
|
|
9333
|
+
execSync7("sleep 0.5");
|
|
9206
9334
|
} catch {
|
|
9207
9335
|
}
|
|
9208
9336
|
try {
|