@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
|
@@ -1363,8 +1363,8 @@ function findPackageRoot() {
|
|
|
1363
1363
|
function getAvailableMemoryGB() {
|
|
1364
1364
|
if (process.platform === "darwin") {
|
|
1365
1365
|
try {
|
|
1366
|
-
const { execSync:
|
|
1367
|
-
const vmstat =
|
|
1366
|
+
const { execSync: execSync7 } = __require("child_process");
|
|
1367
|
+
const vmstat = execSync7("vm_stat", { encoding: "utf8" });
|
|
1368
1368
|
const pageSize = 16384;
|
|
1369
1369
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1370
1370
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -4085,7 +4085,7 @@ All memory, tasks, behaviors, documents, and wiki content belonging to {{company
|
|
|
4085
4085
|
});
|
|
4086
4086
|
|
|
4087
4087
|
// src/lib/session-key.ts
|
|
4088
|
-
import { execSync as
|
|
4088
|
+
import { execSync as execSync4 } from "child_process";
|
|
4089
4089
|
function normalizeCommand(command) {
|
|
4090
4090
|
const trimmed = command.trim().toLowerCase();
|
|
4091
4091
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -4104,7 +4104,7 @@ function resolveRuntimeProcess() {
|
|
|
4104
4104
|
let pid = process.ppid;
|
|
4105
4105
|
for (let i = 0; i < 10; i++) {
|
|
4106
4106
|
try {
|
|
4107
|
-
const info =
|
|
4107
|
+
const info = execSync4(`ps -p ${pid} -o ppid=,comm=`, {
|
|
4108
4108
|
encoding: "utf8",
|
|
4109
4109
|
timeout: 2e3
|
|
4110
4110
|
}).trim();
|
|
@@ -4163,7 +4163,7 @@ __export(active_agent_exports, {
|
|
|
4163
4163
|
writeActiveAgent: () => writeActiveAgent
|
|
4164
4164
|
});
|
|
4165
4165
|
import { readFileSync as readFileSync6, writeFileSync as writeFileSync5, mkdirSync as mkdirSync4, unlinkSync as unlinkSync4, readdirSync as readdirSync3 } from "fs";
|
|
4166
|
-
import { execSync as
|
|
4166
|
+
import { execSync as execSync5 } from "child_process";
|
|
4167
4167
|
import path10 from "path";
|
|
4168
4168
|
function isNameWithOptionalInstance(candidate, baseName) {
|
|
4169
4169
|
if (candidate === baseName) return true;
|
|
@@ -4255,7 +4255,7 @@ function getActiveAgent() {
|
|
|
4255
4255
|
} catch {
|
|
4256
4256
|
}
|
|
4257
4257
|
try {
|
|
4258
|
-
const sessionName =
|
|
4258
|
+
const sessionName = execSync5(
|
|
4259
4259
|
"tmux display-message -p '#{session_name}' 2>/dev/null",
|
|
4260
4260
|
{ encoding: "utf8", timeout: 2e3 }
|
|
4261
4261
|
).trim();
|
|
@@ -4341,6 +4341,7 @@ import { createHash } from "crypto";
|
|
|
4341
4341
|
// src/lib/keychain.ts
|
|
4342
4342
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
4343
4343
|
import { existsSync as existsSync7 } from "fs";
|
|
4344
|
+
import { execSync as execSync2 } from "child_process";
|
|
4344
4345
|
import path7 from "path";
|
|
4345
4346
|
import os5 from "os";
|
|
4346
4347
|
var SERVICE = "exe-mem";
|
|
@@ -4351,6 +4352,59 @@ function getKeyDir() {
|
|
|
4351
4352
|
function getKeyPath() {
|
|
4352
4353
|
return path7.join(getKeyDir(), "master.key");
|
|
4353
4354
|
}
|
|
4355
|
+
function macKeychainGet() {
|
|
4356
|
+
if (process.platform !== "darwin") return null;
|
|
4357
|
+
try {
|
|
4358
|
+
return execSync2(
|
|
4359
|
+
`security find-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
4360
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
4361
|
+
).trim();
|
|
4362
|
+
} catch {
|
|
4363
|
+
return null;
|
|
4364
|
+
}
|
|
4365
|
+
}
|
|
4366
|
+
function macKeychainSet(value) {
|
|
4367
|
+
if (process.platform !== "darwin") return false;
|
|
4368
|
+
try {
|
|
4369
|
+
try {
|
|
4370
|
+
execSync2(
|
|
4371
|
+
`security delete-generic-password -s "${SERVICE}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
4372
|
+
{ timeout: 5e3 }
|
|
4373
|
+
);
|
|
4374
|
+
} catch {
|
|
4375
|
+
}
|
|
4376
|
+
execSync2(
|
|
4377
|
+
`security add-generic-password -s "${SERVICE}" -a "${ACCOUNT}" -w "${value}"`,
|
|
4378
|
+
{ timeout: 5e3 }
|
|
4379
|
+
);
|
|
4380
|
+
return true;
|
|
4381
|
+
} catch {
|
|
4382
|
+
return false;
|
|
4383
|
+
}
|
|
4384
|
+
}
|
|
4385
|
+
function linuxSecretGet() {
|
|
4386
|
+
if (process.platform !== "linux") return null;
|
|
4387
|
+
try {
|
|
4388
|
+
return execSync2(
|
|
4389
|
+
`secret-tool lookup service "${SERVICE}" account "${ACCOUNT}" 2>/dev/null`,
|
|
4390
|
+
{ encoding: "utf-8", timeout: 5e3 }
|
|
4391
|
+
).trim();
|
|
4392
|
+
} catch {
|
|
4393
|
+
return null;
|
|
4394
|
+
}
|
|
4395
|
+
}
|
|
4396
|
+
function linuxSecretSet(value) {
|
|
4397
|
+
if (process.platform !== "linux") return false;
|
|
4398
|
+
try {
|
|
4399
|
+
execSync2(
|
|
4400
|
+
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${SERVICE}" account "${ACCOUNT}"`,
|
|
4401
|
+
{ timeout: 5e3 }
|
|
4402
|
+
);
|
|
4403
|
+
return true;
|
|
4404
|
+
} catch {
|
|
4405
|
+
return false;
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4354
4408
|
async function tryKeytar() {
|
|
4355
4409
|
try {
|
|
4356
4410
|
return await import("keytar");
|
|
@@ -4358,13 +4412,64 @@ async function tryKeytar() {
|
|
|
4358
4412
|
return null;
|
|
4359
4413
|
}
|
|
4360
4414
|
}
|
|
4415
|
+
var ENCRYPTED_PREFIX = "enc:";
|
|
4416
|
+
function deriveMachineKey() {
|
|
4417
|
+
try {
|
|
4418
|
+
const crypto3 = __require("crypto");
|
|
4419
|
+
const material = [
|
|
4420
|
+
os5.hostname(),
|
|
4421
|
+
os5.userInfo().username,
|
|
4422
|
+
os5.arch(),
|
|
4423
|
+
os5.platform(),
|
|
4424
|
+
// Machine ID on Linux (stable across reboots)
|
|
4425
|
+
process.platform === "linux" ? readMachineId() : ""
|
|
4426
|
+
].join("|");
|
|
4427
|
+
return crypto3.createHash("sha256").update(material).digest();
|
|
4428
|
+
} catch {
|
|
4429
|
+
return null;
|
|
4430
|
+
}
|
|
4431
|
+
}
|
|
4432
|
+
function readMachineId() {
|
|
4433
|
+
try {
|
|
4434
|
+
const { readFileSync: readFileSync8 } = __require("fs");
|
|
4435
|
+
return readFileSync8("/etc/machine-id", "utf-8").trim();
|
|
4436
|
+
} catch {
|
|
4437
|
+
return "";
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
function decryptWithMachineKey(encrypted, machineKey) {
|
|
4441
|
+
if (!encrypted.startsWith(ENCRYPTED_PREFIX)) return null;
|
|
4442
|
+
try {
|
|
4443
|
+
const crypto3 = __require("crypto");
|
|
4444
|
+
const parts = encrypted.slice(ENCRYPTED_PREFIX.length).split(":");
|
|
4445
|
+
if (parts.length !== 3) return null;
|
|
4446
|
+
const [ivB64, tagB64, cipherB64] = parts;
|
|
4447
|
+
const iv = Buffer.from(ivB64, "base64");
|
|
4448
|
+
const authTag = Buffer.from(tagB64, "base64");
|
|
4449
|
+
const decipher = crypto3.createDecipheriv("aes-256-gcm", machineKey, iv);
|
|
4450
|
+
decipher.setAuthTag(authTag);
|
|
4451
|
+
let decrypted = decipher.update(cipherB64, "base64", "utf-8");
|
|
4452
|
+
decrypted += decipher.final("utf-8");
|
|
4453
|
+
return decrypted;
|
|
4454
|
+
} catch {
|
|
4455
|
+
return null;
|
|
4456
|
+
}
|
|
4457
|
+
}
|
|
4361
4458
|
async function getMasterKey() {
|
|
4459
|
+
const nativeValue = macKeychainGet() ?? linuxSecretGet();
|
|
4460
|
+
if (nativeValue) {
|
|
4461
|
+
return Buffer.from(nativeValue, "base64");
|
|
4462
|
+
}
|
|
4362
4463
|
const keytar = await tryKeytar();
|
|
4363
4464
|
if (keytar) {
|
|
4364
4465
|
try {
|
|
4365
|
-
const
|
|
4366
|
-
if (
|
|
4367
|
-
|
|
4466
|
+
const keytarValue = await keytar.getPassword(SERVICE, ACCOUNT);
|
|
4467
|
+
if (keytarValue) {
|
|
4468
|
+
const migrated = macKeychainSet(keytarValue) || linuxSecretSet(keytarValue);
|
|
4469
|
+
if (migrated) {
|
|
4470
|
+
process.stderr.write("[keychain] Migrated key from keytar to native keychain.\n");
|
|
4471
|
+
}
|
|
4472
|
+
return Buffer.from(keytarValue, "base64");
|
|
4368
4473
|
}
|
|
4369
4474
|
} catch {
|
|
4370
4475
|
}
|
|
@@ -4378,8 +4483,31 @@ async function getMasterKey() {
|
|
|
4378
4483
|
return null;
|
|
4379
4484
|
}
|
|
4380
4485
|
try {
|
|
4381
|
-
const content = await readFile3(keyPath, "utf-8");
|
|
4382
|
-
|
|
4486
|
+
const content = (await readFile3(keyPath, "utf-8")).trim();
|
|
4487
|
+
let b64Value;
|
|
4488
|
+
if (content.startsWith(ENCRYPTED_PREFIX)) {
|
|
4489
|
+
const machineKey = deriveMachineKey();
|
|
4490
|
+
if (!machineKey) {
|
|
4491
|
+
process.stderr.write("[keychain] Cannot derive machine key to decrypt stored key.\n");
|
|
4492
|
+
return null;
|
|
4493
|
+
}
|
|
4494
|
+
const decrypted = decryptWithMachineKey(content, machineKey);
|
|
4495
|
+
if (!decrypted) {
|
|
4496
|
+
process.stderr.write(
|
|
4497
|
+
"[keychain] Key decryption failed \u2014 machine may have changed.\n Use your 24-word recovery phrase: exe-os link import\n"
|
|
4498
|
+
);
|
|
4499
|
+
return null;
|
|
4500
|
+
}
|
|
4501
|
+
b64Value = decrypted;
|
|
4502
|
+
} else {
|
|
4503
|
+
b64Value = content;
|
|
4504
|
+
}
|
|
4505
|
+
const key = Buffer.from(b64Value, "base64");
|
|
4506
|
+
const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
|
|
4507
|
+
if (migrated) {
|
|
4508
|
+
process.stderr.write("[keychain] Migrated key from file to native keychain.\n");
|
|
4509
|
+
}
|
|
4510
|
+
return key;
|
|
4383
4511
|
} catch (err) {
|
|
4384
4512
|
process.stderr.write(
|
|
4385
4513
|
`[keychain] Key read failed at ${keyPath}: ${err instanceof Error ? err.message : String(err)}
|
|
@@ -4817,7 +4945,7 @@ async function exportBehaviorsForAgent(agentId, projectName, sessionKey) {
|
|
|
4817
4945
|
init_employee_templates();
|
|
4818
4946
|
|
|
4819
4947
|
// src/lib/cc-agent-support.ts
|
|
4820
|
-
import { execSync as
|
|
4948
|
+
import { execSync as execSync3 } from "child_process";
|
|
4821
4949
|
var _cachedSupport = null;
|
|
4822
4950
|
function _resetCcAgentSupportCache() {
|
|
4823
4951
|
_cachedSupport = null;
|
|
@@ -4825,7 +4953,7 @@ function _resetCcAgentSupportCache() {
|
|
|
4825
4953
|
function claudeSupportsAgentFlag() {
|
|
4826
4954
|
if (_cachedSupport !== null) return _cachedSupport;
|
|
4827
4955
|
try {
|
|
4828
|
-
const helpOutput =
|
|
4956
|
+
const helpOutput = execSync3("claude --help 2>&1", {
|
|
4829
4957
|
encoding: "utf-8",
|
|
4830
4958
|
timeout: 5e3
|
|
4831
4959
|
});
|
|
@@ -4838,7 +4966,7 @@ function claudeSupportsAgentFlag() {
|
|
|
4838
4966
|
|
|
4839
4967
|
// src/bin/exe-launch-agent.ts
|
|
4840
4968
|
init_employees();
|
|
4841
|
-
import { execSync as
|
|
4969
|
+
import { execSync as execSync6 } from "child_process";
|
|
4842
4970
|
|
|
4843
4971
|
// src/lib/provider-table.ts
|
|
4844
4972
|
var PROVIDER_TABLE = {
|
|
@@ -4989,7 +5117,7 @@ var _ccHelpOutput = null;
|
|
|
4989
5117
|
function getCcHelpOutput() {
|
|
4990
5118
|
if (_ccHelpOutput === null) {
|
|
4991
5119
|
try {
|
|
4992
|
-
const result =
|
|
5120
|
+
const result = execSync6("claude --help 2>&1", { encoding: "utf8", timeout: 5e3 });
|
|
4993
5121
|
_ccHelpOutput = typeof result === "string" ? result : "";
|
|
4994
5122
|
} catch {
|
|
4995
5123
|
_ccHelpOutput = "";
|