@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
|
@@ -1051,8 +1051,8 @@ function findPackageRoot() {
|
|
|
1051
1051
|
function getAvailableMemoryGB() {
|
|
1052
1052
|
if (process.platform === "darwin") {
|
|
1053
1053
|
try {
|
|
1054
|
-
const { execSync:
|
|
1055
|
-
const vmstat =
|
|
1054
|
+
const { execSync: execSync5 } = __require("child_process");
|
|
1055
|
+
const vmstat = execSync5("vm_stat", { encoding: "utf8" });
|
|
1056
1056
|
const pageSize = 16384;
|
|
1057
1057
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1058
1058
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -2791,6 +2791,7 @@ var init_database = __esm({
|
|
|
2791
2791
|
// src/lib/keychain.ts
|
|
2792
2792
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
2793
2793
|
import { existsSync as existsSync6 } from "fs";
|
|
2794
|
+
import { execSync as execSync2 } from "child_process";
|
|
2794
2795
|
import path6 from "path";
|
|
2795
2796
|
import os5 from "os";
|
|
2796
2797
|
function getKeyDir() {
|
|
@@ -2799,6 +2800,59 @@ function getKeyDir() {
|
|
|
2799
2800
|
function getKeyPath() {
|
|
2800
2801
|
return path6.join(getKeyDir(), "master.key");
|
|
2801
2802
|
}
|
|
2803
|
+
function macKeychainGet() {
|
|
2804
|
+
if (process.platform !== "darwin") return null;
|
|
2805
|
+
try {
|
|
2806
|
+
return execSync2(
|
|
2807
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
2808
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
2809
|
+
).trim();
|
|
2810
|
+
} catch {
|
|
2811
|
+
return null;
|
|
2812
|
+
}
|
|
2813
|
+
}
|
|
2814
|
+
function macKeychainSet(value) {
|
|
2815
|
+
if (process.platform !== "darwin") return false;
|
|
2816
|
+
try {
|
|
2817
|
+
try {
|
|
2818
|
+
execSync2(
|
|
2819
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
2820
|
+
{ timeout: 5e3 }
|
|
2821
|
+
);
|
|
2822
|
+
} catch {
|
|
2823
|
+
}
|
|
2824
|
+
execSync2(
|
|
2825
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
2826
|
+
{ timeout: 5e3 }
|
|
2827
|
+
);
|
|
2828
|
+
return true;
|
|
2829
|
+
} catch {
|
|
2830
|
+
return false;
|
|
2831
|
+
}
|
|
2832
|
+
}
|
|
2833
|
+
function linuxSecretGet() {
|
|
2834
|
+
if (process.platform !== "linux") return null;
|
|
2835
|
+
try {
|
|
2836
|
+
return execSync2(
|
|
2837
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
2838
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
2839
|
+
).trim();
|
|
2840
|
+
} catch {
|
|
2841
|
+
return null;
|
|
2842
|
+
}
|
|
2843
|
+
}
|
|
2844
|
+
function linuxSecretSet(value) {
|
|
2845
|
+
if (process.platform !== "linux") return false;
|
|
2846
|
+
try {
|
|
2847
|
+
execSync2(
|
|
2848
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
2849
|
+
{ timeout: 5e3 }
|
|
2850
|
+
);
|
|
2851
|
+
return true;
|
|
2852
|
+
} catch {
|
|
2853
|
+
return false;
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2802
2856
|
async function tryKeytar() {
|
|
2803
2857
|
try {
|
|
2804
2858
|
return await import("keytar");
|
|
@@ -2806,13 +2860,63 @@ async function tryKeytar() {
|
|
|
2806
2860
|
return null;
|
|
2807
2861
|
}
|
|
2808
2862
|
}
|
|
2863
|
+
function deriveMachineKey() {
|
|
2864
|
+
try {
|
|
2865
|
+
const crypto2 = __require("crypto");
|
|
2866
|
+
const material = [
|
|
2867
|
+
os5.hostname(),
|
|
2868
|
+
os5.userInfo().username,
|
|
2869
|
+
os5.arch(),
|
|
2870
|
+
os5.platform(),
|
|
2871
|
+
// Machine ID on Linux (stable across reboots)
|
|
2872
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
2873
|
+
].join("|");
|
|
2874
|
+
return crypto2.createHash("sha256").update(material).digest();
|
|
2875
|
+
} catch {
|
|
2876
|
+
return null;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
function readMachineId() {
|
|
2880
|
+
try {
|
|
2881
|
+
const { readFileSync: readFileSync10 } = __require("fs");
|
|
2882
|
+
return readFileSync10("/etc/machine-id", "utf-8").trim();
|
|
2883
|
+
} catch {
|
|
2884
|
+
return "";
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
2888
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
2889
|
+
try {
|
|
2890
|
+
const crypto2 = __require("crypto");
|
|
2891
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
2892
|
+
if (parts.length !== 3) return null;
|
|
2893
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
2894
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
2895
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
2896
|
+
const decipher = crypto2.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
2897
|
+
decipher.setAuthTag(authTag);
|
|
2898
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
2899
|
+
decrypted += decipher.final("utf-8");
|
|
2900
|
+
return decrypted;
|
|
2901
|
+
} catch {
|
|
2902
|
+
return null;
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2809
2905
|
async function getMasterKey() {
|
|
2906
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
2907
|
+
if (nativeValue) {
|
|
2908
|
+
return Buffer.from(nativeValue, "base64");
|
|
2909
|
+
}
|
|
2810
2910
|
const keytar = await tryKeytar();
|
|
2811
2911
|
if (keytar) {
|
|
2812
2912
|
try {
|
|
2813
|
-
const
|
|
2814
|
-
if (
|
|
2815
|
-
|
|
2913
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
2914
|
+
if (keytarValue) {
|
|
2915
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
2916
|
+
if (migrated) {
|
|
2917
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
2918
|
+
}
|
|
2919
|
+
return Buffer.from(keytarValue, "base64");
|
|
2816
2920
|
}
|
|
2817
2921
|
} catch {
|
|
2818
2922
|
}
|
|
@@ -2826,8 +2930,31 @@ async function getMasterKey() {
|
|
|
2826
2930
|
return null;
|
|
2827
2931
|
}
|
|
2828
2932
|
try {
|
|
2829
|
-
const content = await readFile3(keyPath, "utf-8");
|
|
2830
|
-
|
|
2933
|
+
const content = (await readFile3(keyPath, "utf-8")).trim();
|
|
2934
|
+
let b64Value;
|
|
2935
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
2936
|
+
const machineKey = deriveMachineKey();
|
|
2937
|
+
if (!machineKey) {
|
|
2938
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
2939
|
+
return null;
|
|
2940
|
+
}
|
|
2941
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
2942
|
+
if (!decrypted) {
|
|
2943
|
+
process.stderr.write(
|
|
2944
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
2945
|
+
);
|
|
2946
|
+
return null;
|
|
2947
|
+
}
|
|
2948
|
+
b64Value = decrypted;
|
|
2949
|
+
} else {
|
|
2950
|
+
b64Value = content;
|
|
2951
|
+
}
|
|
2952
|
+
const key = Buffer.from(b64Value, "base64");
|
|
2953
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
2954
|
+
if (migrated) {
|
|
2955
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
2956
|
+
}
|
|
2957
|
+
return key;
|
|
2831
2958
|
} catch (err) {
|
|
2832
2959
|
process.stderr.write(
|
|
2833
2960
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -2836,12 +2963,13 @@ async function getMasterKey() {
|
|
|
2836
2963
|
return null;
|
|
2837
2964
|
}
|
|
2838
2965
|
}
|
|
2839
|
-
var SERVICE, ACCOUNT;
|
|
2966
|
+
var SERVICE, ACCOUNT, ENCRYPTED_PREFIX;
|
|
2840
2967
|
var init_keychain = __esm({
|
|
2841
2968
|
"src/lib/keychain.ts"() {
|
|
2842
2969
|
"use strict";
|
|
2843
2970
|
SERVICE = "exe-mem";
|
|
2844
2971
|
ACCOUNT = "master-key";
|
|
2972
|
+
ENCRYPTED_PREFIX = "enc:";
|
|
2845
2973
|
}
|
|
2846
2974
|
});
|
|
2847
2975
|
|
|
@@ -4084,7 +4212,7 @@ var init_session_registry = __esm({
|
|
|
4084
4212
|
});
|
|
4085
4213
|
|
|
4086
4214
|
// src/lib/session-key.ts
|
|
4087
|
-
import { execSync as
|
|
4215
|
+
import { execSync as execSync3 } from "child_process";
|
|
4088
4216
|
function normalizeCommand(command) {
|
|
4089
4217
|
const trimmed = command.trim().toLowerCase();
|
|
4090
4218
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -4103,7 +4231,7 @@ function resolveRuntimeProcess() {
|
|
|
4103
4231
|
let pid = process.ppid;
|
|
4104
4232
|
for (let i = 0; i < 10; i++) {
|
|
4105
4233
|
try {
|
|
4106
|
-
const info =
|
|
4234
|
+
const info = execSync3(`ps -p ${pid} -o ppid=,comm=`, {
|
|
4107
4235
|
encoding: "utf8",
|
|
4108
4236
|
timeout: 2e3
|
|
4109
4237
|
}).trim();
|
|
@@ -4269,7 +4397,7 @@ var init_transport = __esm({
|
|
|
4269
4397
|
});
|
|
4270
4398
|
|
|
4271
4399
|
// src/lib/cc-agent-support.ts
|
|
4272
|
-
import { execSync as
|
|
4400
|
+
import { execSync as execSync4 } from "child_process";
|
|
4273
4401
|
var init_cc_agent_support = __esm({
|
|
4274
4402
|
"src/lib/cc-agent-support.ts"() {
|
|
4275
4403
|
"use strict";
|