@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
|
@@ -1618,8 +1618,8 @@ function findPackageRoot() {
|
|
|
1618
1618
|
function getAvailableMemoryGB() {
|
|
1619
1619
|
if (process.platform === "darwin") {
|
|
1620
1620
|
try {
|
|
1621
|
-
const { execSync:
|
|
1622
|
-
const vmstat =
|
|
1621
|
+
const { execSync: execSync9 } = __require("child_process");
|
|
1622
|
+
const vmstat = execSync9("vm_stat", { encoding: "utf8" });
|
|
1623
1623
|
const pageSize = 16384;
|
|
1624
1624
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1625
1625
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -6513,6 +6513,7 @@ var init_task_scope = __esm({
|
|
|
6513
6513
|
// src/lib/keychain.ts
|
|
6514
6514
|
import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2 } from "fs/promises";
|
|
6515
6515
|
import { existsSync as existsSync15 } from "fs";
|
|
6516
|
+
import { execSync as execSync8 } from "child_process";
|
|
6516
6517
|
import path19 from "path";
|
|
6517
6518
|
import os11 from "os";
|
|
6518
6519
|
function getKeyDir() {
|
|
@@ -6521,6 +6522,59 @@ function getKeyDir() {
|
|
|
6521
6522
|
function getKeyPath() {
|
|
6522
6523
|
return path19.join(getKeyDir(), "master.key");
|
|
6523
6524
|
}
|
|
6525
|
+
function macKeychainGet() {
|
|
6526
|
+
if (process.platform !== "darwin") return null;
|
|
6527
|
+
try {
|
|
6528
|
+
return execSync8(
|
|
6529
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
6530
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
6531
|
+
).trim();
|
|
6532
|
+
} catch {
|
|
6533
|
+
return null;
|
|
6534
|
+
}
|
|
6535
|
+
}
|
|
6536
|
+
function macKeychainSet(value) {
|
|
6537
|
+
if (process.platform !== "darwin") return false;
|
|
6538
|
+
try {
|
|
6539
|
+
try {
|
|
6540
|
+
execSync8(
|
|
6541
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
6542
|
+
{ timeout: 5e3 }
|
|
6543
|
+
);
|
|
6544
|
+
} catch {
|
|
6545
|
+
}
|
|
6546
|
+
execSync8(
|
|
6547
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
6548
|
+
{ timeout: 5e3 }
|
|
6549
|
+
);
|
|
6550
|
+
return true;
|
|
6551
|
+
} catch {
|
|
6552
|
+
return false;
|
|
6553
|
+
}
|
|
6554
|
+
}
|
|
6555
|
+
function linuxSecretGet() {
|
|
6556
|
+
if (process.platform !== "linux") return null;
|
|
6557
|
+
try {
|
|
6558
|
+
return execSync8(
|
|
6559
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
6560
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
6561
|
+
).trim();
|
|
6562
|
+
} catch {
|
|
6563
|
+
return null;
|
|
6564
|
+
}
|
|
6565
|
+
}
|
|
6566
|
+
function linuxSecretSet(value) {
|
|
6567
|
+
if (process.platform !== "linux") return false;
|
|
6568
|
+
try {
|
|
6569
|
+
execSync8(
|
|
6570
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
6571
|
+
{ timeout: 5e3 }
|
|
6572
|
+
);
|
|
6573
|
+
return true;
|
|
6574
|
+
} catch {
|
|
6575
|
+
return false;
|
|
6576
|
+
}
|
|
6577
|
+
}
|
|
6524
6578
|
async function tryKeytar() {
|
|
6525
6579
|
try {
|
|
6526
6580
|
return await import("keytar");
|
|
@@ -6528,13 +6582,63 @@ async function tryKeytar() {
|
|
|
6528
6582
|
return null;
|
|
6529
6583
|
}
|
|
6530
6584
|
}
|
|
6585
|
+
function deriveMachineKey() {
|
|
6586
|
+
try {
|
|
6587
|
+
const crypto7 = __require("crypto");
|
|
6588
|
+
const material = [
|
|
6589
|
+
os11.hostname(),
|
|
6590
|
+
os11.userInfo().username,
|
|
6591
|
+
os11.arch(),
|
|
6592
|
+
os11.platform(),
|
|
6593
|
+
// Machine ID on Linux (stable across reboots)
|
|
6594
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
6595
|
+
].join("|");
|
|
6596
|
+
return crypto7.createHash("sha256").update(material).digest();
|
|
6597
|
+
} catch {
|
|
6598
|
+
return null;
|
|
6599
|
+
}
|
|
6600
|
+
}
|
|
6601
|
+
function readMachineId() {
|
|
6602
|
+
try {
|
|
6603
|
+
const { readFileSync: readFileSync15 } = __require("fs");
|
|
6604
|
+
return readFileSync15("/etc/machine-id", "utf-8").trim();
|
|
6605
|
+
} catch {
|
|
6606
|
+
return "";
|
|
6607
|
+
}
|
|
6608
|
+
}
|
|
6609
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
6610
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
6611
|
+
try {
|
|
6612
|
+
const crypto7 = __require("crypto");
|
|
6613
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
6614
|
+
if (parts.length !== 3) return null;
|
|
6615
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
6616
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
6617
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
6618
|
+
const decipher = crypto7.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
6619
|
+
decipher.setAuthTag(authTag);
|
|
6620
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
6621
|
+
decrypted += decipher.final("utf-8");
|
|
6622
|
+
return decrypted;
|
|
6623
|
+
} catch {
|
|
6624
|
+
return null;
|
|
6625
|
+
}
|
|
6626
|
+
}
|
|
6531
6627
|
async function getMasterKey() {
|
|
6628
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
6629
|
+
if (nativeValue) {
|
|
6630
|
+
return Buffer.from(nativeValue, "base64");
|
|
6631
|
+
}
|
|
6532
6632
|
const keytar = await tryKeytar();
|
|
6533
6633
|
if (keytar) {
|
|
6534
6634
|
try {
|
|
6535
|
-
const
|
|
6536
|
-
if (
|
|
6537
|
-
|
|
6635
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
6636
|
+
if (keytarValue) {
|
|
6637
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
6638
|
+
if (migrated) {
|
|
6639
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
6640
|
+
}
|
|
6641
|
+
return Buffer.from(keytarValue, "base64");
|
|
6538
6642
|
}
|
|
6539
6643
|
} catch {
|
|
6540
6644
|
}
|
|
@@ -6548,8 +6652,31 @@ async function getMasterKey() {
|
|
|
6548
6652
|
return null;
|
|
6549
6653
|
}
|
|
6550
6654
|
try {
|
|
6551
|
-
const content = await readFile4(keyPath, "utf-8");
|
|
6552
|
-
|
|
6655
|
+
const content = (await readFile4(keyPath, "utf-8")).trim();
|
|
6656
|
+
let b64Value;
|
|
6657
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
6658
|
+
const machineKey = deriveMachineKey();
|
|
6659
|
+
if (!machineKey) {
|
|
6660
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
6661
|
+
return null;
|
|
6662
|
+
}
|
|
6663
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
6664
|
+
if (!decrypted) {
|
|
6665
|
+
process.stderr.write(
|
|
6666
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
6667
|
+
);
|
|
6668
|
+
return null;
|
|
6669
|
+
}
|
|
6670
|
+
b64Value = decrypted;
|
|
6671
|
+
} else {
|
|
6672
|
+
b64Value = content;
|
|
6673
|
+
}
|
|
6674
|
+
const key = Buffer.from(b64Value, "base64");
|
|
6675
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
6676
|
+
if (migrated) {
|
|
6677
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
6678
|
+
}
|
|
6679
|
+
return key;
|
|
6553
6680
|
} catch (err) {
|
|
6554
6681
|
process.stderr.write(
|
|
6555
6682
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -6558,12 +6685,13 @@ async function getMasterKey() {
|
|
|
6558
6685
|
return null;
|
|
6559
6686
|
}
|
|
6560
6687
|
}
|
|
6561
|
-
var SERVICE, ACCOUNT;
|
|
6688
|
+
var SERVICE, ACCOUNT, ENCRYPTED_PREFIX;
|
|
6562
6689
|
var init_keychain = __esm({
|
|
6563
6690
|
"src/lib/keychain.ts"() {
|
|
6564
6691
|
"use strict";
|
|
6565
6692
|
SERVICE = "exe-mem";
|
|
6566
6693
|
ACCOUNT = "master-key";
|
|
6694
|
+
ENCRYPTED_PREFIX = "enc:";
|
|
6567
6695
|
}
|
|
6568
6696
|
});
|
|
6569
6697
|
|
|
@@ -1623,8 +1623,8 @@ function findPackageRoot() {
|
|
|
1623
1623
|
function getAvailableMemoryGB() {
|
|
1624
1624
|
if (process.platform === "darwin") {
|
|
1625
1625
|
try {
|
|
1626
|
-
const { execSync:
|
|
1627
|
-
const vmstat =
|
|
1626
|
+
const { execSync: execSync8 } = __require("child_process");
|
|
1627
|
+
const vmstat = execSync8("vm_stat", { encoding: "utf8" });
|
|
1628
1628
|
const pageSize = 16384;
|
|
1629
1629
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1630
1630
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -3669,6 +3669,7 @@ var init_cto_delegation_gate = __esm({
|
|
|
3669
3669
|
// src/lib/keychain.ts
|
|
3670
3670
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
3671
3671
|
import { existsSync as existsSync12 } from "fs";
|
|
3672
|
+
import { execSync as execSync5 } from "child_process";
|
|
3672
3673
|
import path14 from "path";
|
|
3673
3674
|
import os10 from "os";
|
|
3674
3675
|
function getKeyDir() {
|
|
@@ -3677,6 +3678,59 @@ function getKeyDir() {
|
|
|
3677
3678
|
function getKeyPath() {
|
|
3678
3679
|
return path14.join(getKeyDir(), "master.key");
|
|
3679
3680
|
}
|
|
3681
|
+
function macKeychainGet() {
|
|
3682
|
+
if (process.platform !== "darwin") return null;
|
|
3683
|
+
try {
|
|
3684
|
+
return execSync5(
|
|
3685
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
3686
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
3687
|
+
).trim();
|
|
3688
|
+
} catch {
|
|
3689
|
+
return null;
|
|
3690
|
+
}
|
|
3691
|
+
}
|
|
3692
|
+
function macKeychainSet(value) {
|
|
3693
|
+
if (process.platform !== "darwin") return false;
|
|
3694
|
+
try {
|
|
3695
|
+
try {
|
|
3696
|
+
execSync5(
|
|
3697
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
3698
|
+
{ timeout: 5e3 }
|
|
3699
|
+
);
|
|
3700
|
+
} catch {
|
|
3701
|
+
}
|
|
3702
|
+
execSync5(
|
|
3703
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
3704
|
+
{ timeout: 5e3 }
|
|
3705
|
+
);
|
|
3706
|
+
return true;
|
|
3707
|
+
} catch {
|
|
3708
|
+
return false;
|
|
3709
|
+
}
|
|
3710
|
+
}
|
|
3711
|
+
function linuxSecretGet() {
|
|
3712
|
+
if (process.platform !== "linux") return null;
|
|
3713
|
+
try {
|
|
3714
|
+
return execSync5(
|
|
3715
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
3716
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
3717
|
+
).trim();
|
|
3718
|
+
} catch {
|
|
3719
|
+
return null;
|
|
3720
|
+
}
|
|
3721
|
+
}
|
|
3722
|
+
function linuxSecretSet(value) {
|
|
3723
|
+
if (process.platform !== "linux") return false;
|
|
3724
|
+
try {
|
|
3725
|
+
execSync5(
|
|
3726
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
3727
|
+
{ timeout: 5e3 }
|
|
3728
|
+
);
|
|
3729
|
+
return true;
|
|
3730
|
+
} catch {
|
|
3731
|
+
return false;
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3680
3734
|
async function tryKeytar() {
|
|
3681
3735
|
try {
|
|
3682
3736
|
return await import("keytar");
|
|
@@ -3684,13 +3738,63 @@ async function tryKeytar() {
|
|
|
3684
3738
|
return null;
|
|
3685
3739
|
}
|
|
3686
3740
|
}
|
|
3741
|
+
function deriveMachineKey() {
|
|
3742
|
+
try {
|
|
3743
|
+
const crypto2 = __require("crypto");
|
|
3744
|
+
const material = [
|
|
3745
|
+
os10.hostname(),
|
|
3746
|
+
os10.userInfo().username,
|
|
3747
|
+
os10.arch(),
|
|
3748
|
+
os10.platform(),
|
|
3749
|
+
// Machine ID on Linux (stable across reboots)
|
|
3750
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
3751
|
+
].join("|");
|
|
3752
|
+
return crypto2.createHash("sha256").update(material).digest();
|
|
3753
|
+
} catch {
|
|
3754
|
+
return null;
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
function readMachineId() {
|
|
3758
|
+
try {
|
|
3759
|
+
const { readFileSync: readFileSync12 } = __require("fs");
|
|
3760
|
+
return readFileSync12("/etc/machine-id", "utf-8").trim();
|
|
3761
|
+
} catch {
|
|
3762
|
+
return "";
|
|
3763
|
+
}
|
|
3764
|
+
}
|
|
3765
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
3766
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
3767
|
+
try {
|
|
3768
|
+
const crypto2 = __require("crypto");
|
|
3769
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
3770
|
+
if (parts.length !== 3) return null;
|
|
3771
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
3772
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
3773
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
3774
|
+
const decipher = crypto2.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
3775
|
+
decipher.setAuthTag(authTag);
|
|
3776
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
3777
|
+
decrypted += decipher.final("utf-8");
|
|
3778
|
+
return decrypted;
|
|
3779
|
+
} catch {
|
|
3780
|
+
return null;
|
|
3781
|
+
}
|
|
3782
|
+
}
|
|
3687
3783
|
async function getMasterKey() {
|
|
3784
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
3785
|
+
if (nativeValue) {
|
|
3786
|
+
return Buffer.from(nativeValue, "base64");
|
|
3787
|
+
}
|
|
3688
3788
|
const keytar = await tryKeytar();
|
|
3689
3789
|
if (keytar) {
|
|
3690
3790
|
try {
|
|
3691
|
-
const
|
|
3692
|
-
if (
|
|
3693
|
-
|
|
3791
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
3792
|
+
if (keytarValue) {
|
|
3793
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
3794
|
+
if (migrated) {
|
|
3795
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
3796
|
+
}
|
|
3797
|
+
return Buffer.from(keytarValue, "base64");
|
|
3694
3798
|
}
|
|
3695
3799
|
} catch {
|
|
3696
3800
|
}
|
|
@@ -3704,8 +3808,31 @@ async function getMasterKey() {
|
|
|
3704
3808
|
return null;
|
|
3705
3809
|
}
|
|
3706
3810
|
try {
|
|
3707
|
-
const content = await readFile3(keyPath, "utf-8");
|
|
3708
|
-
|
|
3811
|
+
const content = (await readFile3(keyPath, "utf-8")).trim();
|
|
3812
|
+
let b64Value;
|
|
3813
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
3814
|
+
const machineKey = deriveMachineKey();
|
|
3815
|
+
if (!machineKey) {
|
|
3816
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
3817
|
+
return null;
|
|
3818
|
+
}
|
|
3819
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
3820
|
+
if (!decrypted) {
|
|
3821
|
+
process.stderr.write(
|
|
3822
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
3823
|
+
);
|
|
3824
|
+
return null;
|
|
3825
|
+
}
|
|
3826
|
+
b64Value = decrypted;
|
|
3827
|
+
} else {
|
|
3828
|
+
b64Value = content;
|
|
3829
|
+
}
|
|
3830
|
+
const key = Buffer.from(b64Value, "base64");
|
|
3831
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
3832
|
+
if (migrated) {
|
|
3833
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
3834
|
+
}
|
|
3835
|
+
return key;
|
|
3709
3836
|
} catch (err) {
|
|
3710
3837
|
process.stderr.write(
|
|
3711
3838
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -3714,12 +3841,13 @@ async function getMasterKey() {
|
|
|
3714
3841
|
return null;
|
|
3715
3842
|
}
|
|
3716
3843
|
}
|
|
3717
|
-
var SERVICE, ACCOUNT;
|
|
3844
|
+
var SERVICE, ACCOUNT, ENCRYPTED_PREFIX;
|
|
3718
3845
|
var init_keychain = __esm({
|
|
3719
3846
|
"src/lib/keychain.ts"() {
|
|
3720
3847
|
"use strict";
|
|
3721
3848
|
SERVICE = "exe-mem";
|
|
3722
3849
|
ACCOUNT = "master-key";
|
|
3850
|
+
ENCRYPTED_PREFIX = "enc:";
|
|
3723
3851
|
}
|
|
3724
3852
|
});
|
|
3725
3853
|
|
|
@@ -5031,12 +5159,12 @@ __export(review_gate_exports, {
|
|
|
5031
5159
|
checkTestCoverage: () => checkTestCoverage,
|
|
5032
5160
|
runReviewGate: () => runReviewGate
|
|
5033
5161
|
});
|
|
5034
|
-
import { execSync as
|
|
5162
|
+
import { execSync as execSync6 } from "child_process";
|
|
5035
5163
|
import { existsSync as existsSync14 } from "fs";
|
|
5036
5164
|
function checkCommitsExist(taskCreatedAt) {
|
|
5037
5165
|
try {
|
|
5038
5166
|
const since = new Date(taskCreatedAt).toISOString();
|
|
5039
|
-
const output =
|
|
5167
|
+
const output = execSync6(
|
|
5040
5168
|
`git log --oneline --since="${since}" --no-merges 2>/dev/null`,
|
|
5041
5169
|
{ encoding: "utf8", timeout: 5e3 }
|
|
5042
5170
|
).trim();
|
|
@@ -5053,7 +5181,7 @@ function checkLayerBoundaries(taskCreatedAt) {
|
|
|
5053
5181
|
const violations = [];
|
|
5054
5182
|
try {
|
|
5055
5183
|
const since = new Date(taskCreatedAt).toISOString();
|
|
5056
|
-
const filesOutput =
|
|
5184
|
+
const filesOutput = execSync6(
|
|
5057
5185
|
`git log --since="${since}" --no-merges --name-only --pretty=format: 2>/dev/null`,
|
|
5058
5186
|
{ encoding: "utf8", timeout: 5e3 }
|
|
5059
5187
|
).trim();
|
|
@@ -5062,7 +5190,7 @@ function checkLayerBoundaries(taskCreatedAt) {
|
|
|
5062
5190
|
const libFiles = changedFiles.filter((f) => f.startsWith("src/lib/"));
|
|
5063
5191
|
for (const file of libFiles) {
|
|
5064
5192
|
try {
|
|
5065
|
-
const grepResult =
|
|
5193
|
+
const grepResult = execSync6(
|
|
5066
5194
|
`grep -nE "from ['"]\\.\\./(adapters|tui|runtime)/" "${file}" 2>/dev/null`,
|
|
5067
5195
|
{ encoding: "utf8", timeout: 3e3 }
|
|
5068
5196
|
).trim();
|
|
@@ -5082,7 +5210,7 @@ function checkTestCoverage(taskCreatedAt) {
|
|
|
5082
5210
|
const warnings = [];
|
|
5083
5211
|
try {
|
|
5084
5212
|
const since = new Date(taskCreatedAt).toISOString();
|
|
5085
|
-
const output =
|
|
5213
|
+
const output = execSync6(
|
|
5086
5214
|
`git log --since="${since}" --no-merges --diff-filter=A --name-only --pretty=format: 2>/dev/null`,
|
|
5087
5215
|
{ encoding: "utf8", timeout: 5e3 }
|
|
5088
5216
|
).trim();
|
|
@@ -5098,7 +5226,7 @@ function checkTestCoverage(taskCreatedAt) {
|
|
|
5098
5226
|
const hasDirectTest = existsSync14(testPath);
|
|
5099
5227
|
let hasRelatedTest = false;
|
|
5100
5228
|
try {
|
|
5101
|
-
const related =
|
|
5229
|
+
const related = execSync6(
|
|
5102
5230
|
`find "${testDir}" -name "*${baseName}*" -name "*.test.ts" 2>/dev/null`,
|
|
5103
5231
|
{ encoding: "utf8", timeout: 3e3 }
|
|
5104
5232
|
).trim();
|
|
@@ -5150,7 +5278,7 @@ var init_review_gate = __esm({
|
|
|
5150
5278
|
|
|
5151
5279
|
// src/adapters/claude/hooks/pre-tool-use.ts
|
|
5152
5280
|
import { existsSync as existsSync15, writeFileSync as writeFileSync8, mkdirSync as mkdirSync7 } from "fs";
|
|
5153
|
-
import { execSync as
|
|
5281
|
+
import { execSync as execSync7 } from "child_process";
|
|
5154
5282
|
import path16 from "path";
|
|
5155
5283
|
|
|
5156
5284
|
// src/lib/active-agent.ts
|
|
@@ -5289,7 +5417,7 @@ function markDelegationFired() {
|
|
|
5289
5417
|
}
|
|
5290
5418
|
function countEngineerSessions() {
|
|
5291
5419
|
try {
|
|
5292
|
-
const output =
|
|
5420
|
+
const output = execSync7("tmux list-sessions 2>/dev/null", {
|
|
5293
5421
|
encoding: "utf8",
|
|
5294
5422
|
timeout: 2e3
|
|
5295
5423
|
});
|