@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
package/dist/index.js
CHANGED
|
@@ -1893,8 +1893,8 @@ function findPackageRoot() {
|
|
|
1893
1893
|
function getAvailableMemoryGB() {
|
|
1894
1894
|
if (process.platform === "darwin") {
|
|
1895
1895
|
try {
|
|
1896
|
-
const { execSync:
|
|
1897
|
-
const vmstat =
|
|
1896
|
+
const { execSync: execSync9 } = __require("child_process");
|
|
1897
|
+
const vmstat = execSync9("vm_stat", { encoding: "utf8" });
|
|
1898
1898
|
const pageSize = 16384;
|
|
1899
1899
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1900
1900
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -6803,6 +6803,7 @@ var init_tmux_routing = __esm({
|
|
|
6803
6803
|
// src/lib/keychain.ts
|
|
6804
6804
|
import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2 } from "fs/promises";
|
|
6805
6805
|
import { existsSync as existsSync15 } from "fs";
|
|
6806
|
+
import { execSync as execSync8 } from "child_process";
|
|
6806
6807
|
import path19 from "path";
|
|
6807
6808
|
import os12 from "os";
|
|
6808
6809
|
function getKeyDir() {
|
|
@@ -6811,6 +6812,59 @@ function getKeyDir() {
|
|
|
6811
6812
|
function getKeyPath() {
|
|
6812
6813
|
return path19.join(getKeyDir(), "master.key");
|
|
6813
6814
|
}
|
|
6815
|
+
function macKeychainGet() {
|
|
6816
|
+
if (process.platform !== "darwin") return null;
|
|
6817
|
+
try {
|
|
6818
|
+
return execSync8(
|
|
6819
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
6820
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
6821
|
+
).trim();
|
|
6822
|
+
} catch {
|
|
6823
|
+
return null;
|
|
6824
|
+
}
|
|
6825
|
+
}
|
|
6826
|
+
function macKeychainSet(value) {
|
|
6827
|
+
if (process.platform !== "darwin") return false;
|
|
6828
|
+
try {
|
|
6829
|
+
try {
|
|
6830
|
+
execSync8(
|
|
6831
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
6832
|
+
{ timeout: 5e3 }
|
|
6833
|
+
);
|
|
6834
|
+
} catch {
|
|
6835
|
+
}
|
|
6836
|
+
execSync8(
|
|
6837
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
6838
|
+
{ timeout: 5e3 }
|
|
6839
|
+
);
|
|
6840
|
+
return true;
|
|
6841
|
+
} catch {
|
|
6842
|
+
return false;
|
|
6843
|
+
}
|
|
6844
|
+
}
|
|
6845
|
+
function linuxSecretGet() {
|
|
6846
|
+
if (process.platform !== "linux") return null;
|
|
6847
|
+
try {
|
|
6848
|
+
return execSync8(
|
|
6849
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
6850
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
6851
|
+
).trim();
|
|
6852
|
+
} catch {
|
|
6853
|
+
return null;
|
|
6854
|
+
}
|
|
6855
|
+
}
|
|
6856
|
+
function linuxSecretSet(value) {
|
|
6857
|
+
if (process.platform !== "linux") return false;
|
|
6858
|
+
try {
|
|
6859
|
+
execSync8(
|
|
6860
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
6861
|
+
{ timeout: 5e3 }
|
|
6862
|
+
);
|
|
6863
|
+
return true;
|
|
6864
|
+
} catch {
|
|
6865
|
+
return false;
|
|
6866
|
+
}
|
|
6867
|
+
}
|
|
6814
6868
|
async function tryKeytar() {
|
|
6815
6869
|
try {
|
|
6816
6870
|
return await import("keytar");
|
|
@@ -6818,13 +6872,63 @@ async function tryKeytar() {
|
|
|
6818
6872
|
return null;
|
|
6819
6873
|
}
|
|
6820
6874
|
}
|
|
6875
|
+
function deriveMachineKey() {
|
|
6876
|
+
try {
|
|
6877
|
+
const crypto11 = __require("crypto");
|
|
6878
|
+
const material = [
|
|
6879
|
+
os12.hostname(),
|
|
6880
|
+
os12.userInfo().username,
|
|
6881
|
+
os12.arch(),
|
|
6882
|
+
os12.platform(),
|
|
6883
|
+
// Machine ID on Linux (stable across reboots)
|
|
6884
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
6885
|
+
].join("|");
|
|
6886
|
+
return crypto11.createHash("sha256").update(material).digest();
|
|
6887
|
+
} catch {
|
|
6888
|
+
return null;
|
|
6889
|
+
}
|
|
6890
|
+
}
|
|
6891
|
+
function readMachineId() {
|
|
6892
|
+
try {
|
|
6893
|
+
const { readFileSync: readFileSync15 } = __require("fs");
|
|
6894
|
+
return readFileSync15("/etc/machine-id", "utf-8").trim();
|
|
6895
|
+
} catch {
|
|
6896
|
+
return "";
|
|
6897
|
+
}
|
|
6898
|
+
}
|
|
6899
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
6900
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
6901
|
+
try {
|
|
6902
|
+
const crypto11 = __require("crypto");
|
|
6903
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
6904
|
+
if (parts.length !== 3) return null;
|
|
6905
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
6906
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
6907
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
6908
|
+
const decipher = crypto11.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
6909
|
+
decipher.setAuthTag(authTag);
|
|
6910
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
6911
|
+
decrypted += decipher.final("utf-8");
|
|
6912
|
+
return decrypted;
|
|
6913
|
+
} catch {
|
|
6914
|
+
return null;
|
|
6915
|
+
}
|
|
6916
|
+
}
|
|
6821
6917
|
async function getMasterKey() {
|
|
6918
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
6919
|
+
if (nativeValue) {
|
|
6920
|
+
return Buffer.from(nativeValue, "base64");
|
|
6921
|
+
}
|
|
6822
6922
|
const keytar = await tryKeytar();
|
|
6823
6923
|
if (keytar) {
|
|
6824
6924
|
try {
|
|
6825
|
-
const
|
|
6826
|
-
if (
|
|
6827
|
-
|
|
6925
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
6926
|
+
if (keytarValue) {
|
|
6927
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
6928
|
+
if (migrated) {
|
|
6929
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
6930
|
+
}
|
|
6931
|
+
return Buffer.from(keytarValue, "base64");
|
|
6828
6932
|
}
|
|
6829
6933
|
} catch {
|
|
6830
6934
|
}
|
|
@@ -6838,8 +6942,31 @@ async function getMasterKey() {
|
|
|
6838
6942
|
return null;
|
|
6839
6943
|
}
|
|
6840
6944
|
try {
|
|
6841
|
-
const content = await readFile4(keyPath, "utf-8");
|
|
6842
|
-
|
|
6945
|
+
const content = (await readFile4(keyPath, "utf-8")).trim();
|
|
6946
|
+
let b64Value;
|
|
6947
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
6948
|
+
const machineKey = deriveMachineKey();
|
|
6949
|
+
if (!machineKey) {
|
|
6950
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
6951
|
+
return null;
|
|
6952
|
+
}
|
|
6953
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
6954
|
+
if (!decrypted) {
|
|
6955
|
+
process.stderr.write(
|
|
6956
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
6957
|
+
);
|
|
6958
|
+
return null;
|
|
6959
|
+
}
|
|
6960
|
+
b64Value = decrypted;
|
|
6961
|
+
} else {
|
|
6962
|
+
b64Value = content;
|
|
6963
|
+
}
|
|
6964
|
+
const key = Buffer.from(b64Value, "base64");
|
|
6965
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
6966
|
+
if (migrated) {
|
|
6967
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
6968
|
+
}
|
|
6969
|
+
return key;
|
|
6843
6970
|
} catch (err) {
|
|
6844
6971
|
process.stderr.write(
|
|
6845
6972
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -6848,12 +6975,13 @@ async function getMasterKey() {
|
|
|
6848
6975
|
return null;
|
|
6849
6976
|
}
|
|
6850
6977
|
}
|
|
6851
|
-
var SERVICE, ACCOUNT;
|
|
6978
|
+
var SERVICE, ACCOUNT, ENCRYPTED_PREFIX;
|
|
6852
6979
|
var init_keychain = __esm({
|
|
6853
6980
|
"src/lib/keychain.ts"() {
|
|
6854
6981
|
"use strict";
|
|
6855
6982
|
SERVICE = "exe-mem";
|
|
6856
6983
|
ACCOUNT = "master-key";
|
|
6984
|
+
ENCRYPTED_PREFIX = "enc:";
|
|
6857
6985
|
}
|
|
6858
6986
|
});
|
|
6859
6987
|
|