@askexenow/exe-os 0.9.85 → 0.9.87
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/agentic-ontology-backfill.js +50 -14
- package/dist/bin/agentic-reflection-backfill.js +50 -14
- package/dist/bin/agentic-semantic-label.js +50 -14
- package/dist/bin/backfill-conversations.js +50 -14
- package/dist/bin/backfill-responses.js +50 -14
- package/dist/bin/backfill-vectors.js +50 -14
- package/dist/bin/bulk-sync-postgres.js +50 -14
- package/dist/bin/cleanup-stale-review-tasks.js +53 -17
- package/dist/bin/cli.js +339 -81
- package/dist/bin/exe-agent.js +18 -0
- package/dist/bin/exe-assign.js +50 -14
- package/dist/bin/exe-boot.js +75 -39
- package/dist/bin/exe-call.js +18 -0
- package/dist/bin/exe-cloud.js +40 -4
- package/dist/bin/exe-dispatch.js +61 -25
- package/dist/bin/exe-doctor.js +40 -4
- package/dist/bin/exe-export-behaviors.js +50 -14
- package/dist/bin/exe-forget.js +50 -14
- package/dist/bin/exe-gateway.js +65 -29
- package/dist/bin/exe-heartbeat.js +55 -19
- package/dist/bin/exe-kill.js +54 -18
- package/dist/bin/exe-launch-agent.js +58 -22
- package/dist/bin/exe-new-employee.js +33 -2
- package/dist/bin/exe-pending-messages.js +53 -17
- package/dist/bin/exe-pending-notifications.js +53 -17
- package/dist/bin/exe-pending-reviews.js +55 -19
- package/dist/bin/exe-rename.js +52 -16
- package/dist/bin/exe-review.js +50 -14
- package/dist/bin/exe-search.js +58 -22
- package/dist/bin/exe-session-cleanup.js +85 -44
- package/dist/bin/exe-start-codex.js +57 -21
- package/dist/bin/exe-start-opencode.js +55 -19
- package/dist/bin/exe-status.js +62 -26
- package/dist/bin/exe-team.js +50 -14
- package/dist/bin/git-sweep.js +63 -27
- package/dist/bin/graph-backfill.js +50 -14
- package/dist/bin/graph-export.js +50 -14
- package/dist/bin/install.js +9 -0
- package/dist/bin/intercom-check.js +67 -31
- package/dist/bin/scan-tasks.js +63 -27
- package/dist/bin/setup.js +53 -13
- package/dist/bin/shard-migrate.js +50 -14
- package/dist/bin/stack-update.js +59 -2
- package/dist/bin/update.js +1 -1
- package/dist/gateway/index.js +65 -29
- package/dist/hooks/bug-report-worker.js +65 -29
- package/dist/hooks/codex-stop-task-finalizer.js +59 -23
- package/dist/hooks/commit-complete.js +64 -28
- package/dist/hooks/error-recall.js +62 -26
- package/dist/hooks/ingest-worker.js +4 -4
- package/dist/hooks/ingest.js +56 -20
- package/dist/hooks/instructions-loaded.js +50 -14
- package/dist/hooks/notification.js +50 -14
- package/dist/hooks/post-compact.js +50 -14
- package/dist/hooks/post-tool-combined.js +63 -27
- package/dist/hooks/pre-compact.js +61 -25
- package/dist/hooks/pre-tool-use.js +58 -22
- package/dist/hooks/prompt-submit.js +78 -42
- package/dist/hooks/session-end.js +66 -30
- package/dist/hooks/session-start.js +68 -32
- package/dist/hooks/stop.js +53 -17
- package/dist/hooks/subagent-stop.js +50 -14
- package/dist/hooks/summary-worker.js +55 -19
- package/dist/index.js +61 -25
- package/dist/lib/cloud-sync.js +32 -14
- package/dist/lib/database.js +22 -4
- package/dist/lib/db-daemon-client.js +16 -4
- package/dist/lib/db.js +22 -4
- package/dist/lib/device-registry.js +22 -4
- package/dist/lib/embedder.js +16 -4
- package/dist/lib/employee-templates.js +18 -0
- package/dist/lib/exe-daemon-client.js +16 -4
- package/dist/lib/exe-daemon.js +874 -232
- package/dist/lib/hybrid-search.js +58 -22
- package/dist/lib/identity-templates.js +6 -2
- package/dist/lib/schedules.js +53 -17
- package/dist/lib/skill-learning.js +16 -4
- package/dist/lib/store.js +50 -14
- package/dist/lib/tasks.js +16 -4
- package/dist/lib/tmux-routing.js +18 -6
- package/dist/mcp/server.js +809 -200
- package/dist/mcp/tools/create-task.js +24 -8
- package/dist/mcp/tools/update-task.js +18 -6
- package/dist/runtime/index.js +61 -25
- package/dist/tui/App.js +91 -55
- package/package.json +1 -1
|
@@ -1068,7 +1068,7 @@ var init_daemon_auth = __esm({
|
|
|
1068
1068
|
// src/lib/exe-daemon-client.ts
|
|
1069
1069
|
import net from "net";
|
|
1070
1070
|
import os4 from "os";
|
|
1071
|
-
import { spawn } from "child_process";
|
|
1071
|
+
import { spawn, execSync as execSync2 } from "child_process";
|
|
1072
1072
|
import { randomUUID } from "crypto";
|
|
1073
1073
|
import { existsSync as existsSync5, unlinkSync as unlinkSync2, readFileSync as readFileSync4, openSync, closeSync, statSync } from "fs";
|
|
1074
1074
|
import path5 from "path";
|
|
@@ -1098,6 +1098,14 @@ function handleData(chunk) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
+
function isZombie(pid) {
|
|
1102
|
+
try {
|
|
1103
|
+
const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1104
|
+
return state.startsWith("Z");
|
|
1105
|
+
} catch {
|
|
1106
|
+
return false;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1101
1109
|
function cleanupStaleFiles() {
|
|
1102
1110
|
if (existsSync5(PID_PATH)) {
|
|
1103
1111
|
try {
|
|
@@ -1105,7 +1113,11 @@ function cleanupStaleFiles() {
|
|
|
1105
1113
|
if (pid > 0) {
|
|
1106
1114
|
try {
|
|
1107
1115
|
process.kill(pid, 0);
|
|
1108
|
-
|
|
1116
|
+
if (!isZombie(pid)) {
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1120
|
+
`);
|
|
1109
1121
|
} catch {
|
|
1110
1122
|
}
|
|
1111
1123
|
}
|
|
@@ -1133,8 +1145,8 @@ function findPackageRoot() {
|
|
|
1133
1145
|
function getAvailableMemoryGB() {
|
|
1134
1146
|
if (process.platform === "darwin") {
|
|
1135
1147
|
try {
|
|
1136
|
-
const { execSync:
|
|
1137
|
-
const vmstat =
|
|
1148
|
+
const { execSync: execSync7 } = __require("child_process");
|
|
1149
|
+
const vmstat = execSync7("vm_stat", { encoding: "utf8" });
|
|
1138
1150
|
const pageSize = 16384;
|
|
1139
1151
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1140
1152
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -2920,6 +2932,12 @@ async function disposeDatabase() {
|
|
|
2920
2932
|
clearInterval(_walCheckpointTimer);
|
|
2921
2933
|
_walCheckpointTimer = null;
|
|
2922
2934
|
}
|
|
2935
|
+
if (_client) {
|
|
2936
|
+
try {
|
|
2937
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
2938
|
+
} catch {
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2923
2941
|
if (_daemonClient) {
|
|
2924
2942
|
_daemonClient.close();
|
|
2925
2943
|
_daemonClient = null;
|
|
@@ -3451,6 +3469,24 @@ var init_platform_procedures = __esm({
|
|
|
3451
3469
|
priority: "p0",
|
|
3452
3470
|
content: "When an agent encounters a suspected Exe OS bug, update breakage, MCP/tool failure, installer issue, memory/orchestration defect, or customer-local patch need, it MUST use create_bug_report. Do this before or alongside any local workaround so the report reaches AskExe support directly via the customer's license. Do NOT ask the founder for permission to file a required bug report. If create_bug_report is deferred/lazy-loaded, load it and call it. If it is unavailable in the live MCP surface, report 'create_bug_report unavailable in this session' and save a local report in exe/output \u2014 never claim the tool does not exist unless the live MCP surface was checked. If upstream delivery fails, call support_test (MCP) and include its result in the local report so AskExe can distinguish customer setup, license provisioning, and server intake issues; only ask the founder to run `exe-os support test` if MCP is disconnected/unavailable. Classify first: upstream_bug = reproducible exe-os/platform defect; customer_customization = identity, behavior, procedure, config, branding, workflow preference that belongs in customer-owned layers; emergency_hotfix = temporary local patch. For upstream bugs/emergency hotfixes include version, repro steps, expected/actual, files changed, workaround, and local diff summary. Avoid permanent platform-code patches unless founder approves; if a hotfix is unavoidable, document it in the bug report and re-check after npm update."
|
|
3453
3471
|
},
|
|
3472
|
+
{
|
|
3473
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
3474
|
+
domain: "support",
|
|
3475
|
+
priority: "p1",
|
|
3476
|
+
content: "Once per session (COO boot only, never repeat), call list_my_bug_reports to check if any previously filed bug reports have been fixed by AskExe. If any report has status 'fixed' with a fixed_version, surface it to the founder immediately: '\u{1F527} N bug fix(es) available \u2014 run exe-os update to get version X.Y.Z'. This is a one-time check at boot, not a recurring poll. If no reports exist or none are fixed, skip silently. If the MCP tool is unavailable or the network call fails, skip silently \u2014 this is informational, not blocking."
|
|
3477
|
+
},
|
|
3478
|
+
{
|
|
3479
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
3480
|
+
domain: "support",
|
|
3481
|
+
priority: "p0",
|
|
3482
|
+
content: "When an agent or founder identifies a desired capability that exe-os does not yet provide, the COO (or equivalent coordinator) must decide: is this a local customization (identity, behavior, procedure, config, branding, workflow preference that can be configured in customer-owned layers) or an upstream feature request (a platform capability that requires changes to exe-os code, shipped via npm update)? Local customizations: implement immediately using store_behavior, update_identity, company_procedure, or config changes. Upstream features: use create_feature_request to submit to AskExe. Include use case, business impact, and current workaround. Do NOT ask the founder for permission to file a feature request \u2014 file it proactively when the need is clear."
|
|
3483
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
3486
|
+
domain: "support",
|
|
3487
|
+
priority: "p1",
|
|
3488
|
+
content: "Once per session (COO boot only, never repeat), call list_my_feature_requests to check if any previously filed feature requests have been shipped by AskExe. If any request has status 'shipped' with a shipped_version, surface it to the founder immediately: '\u{1F680} N feature(s) shipped \u2014 run exe-os update to get version X.Y.Z'. This is a one-time check at boot, not a recurring poll. If no requests exist or none are shipped, skip silently. If the MCP tool is unavailable or the network call fails, skip silently \u2014 this is informational, not blocking."
|
|
3489
|
+
},
|
|
3454
3490
|
// --- Operations ---
|
|
3455
3491
|
{
|
|
3456
3492
|
title: "Managers must supervise deployed workers",
|
|
@@ -4095,7 +4131,7 @@ var init_runtime_table = __esm({
|
|
|
4095
4131
|
});
|
|
4096
4132
|
|
|
4097
4133
|
// src/lib/session-key.ts
|
|
4098
|
-
import { execSync as
|
|
4134
|
+
import { execSync as execSync4 } from "child_process";
|
|
4099
4135
|
function normalizeCommand(command) {
|
|
4100
4136
|
const trimmed = command.trim().toLowerCase();
|
|
4101
4137
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -4114,7 +4150,7 @@ function resolveRuntimeProcess() {
|
|
|
4114
4150
|
let pid = process.ppid;
|
|
4115
4151
|
for (let i = 0; i < 10; i++) {
|
|
4116
4152
|
try {
|
|
4117
|
-
const info =
|
|
4153
|
+
const info = execSync4(`ps -p ${pid} -o ppid=,comm=`, {
|
|
4118
4154
|
encoding: "utf8",
|
|
4119
4155
|
timeout: 2e3
|
|
4120
4156
|
}).trim();
|
|
@@ -4186,7 +4222,7 @@ __export(active_agent_exports, {
|
|
|
4186
4222
|
writeActiveAgent: () => writeActiveAgent
|
|
4187
4223
|
});
|
|
4188
4224
|
import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, unlinkSync as unlinkSync4, readdirSync as readdirSync3 } from "fs";
|
|
4189
|
-
import { execSync as
|
|
4225
|
+
import { execSync as execSync5 } from "child_process";
|
|
4190
4226
|
import path9 from "path";
|
|
4191
4227
|
function isNameWithOptionalInstance(candidate, baseName) {
|
|
4192
4228
|
if (candidate === baseName) return true;
|
|
@@ -4280,7 +4316,7 @@ function getActiveAgent() {
|
|
|
4280
4316
|
} catch {
|
|
4281
4317
|
}
|
|
4282
4318
|
try {
|
|
4283
|
-
const sessionName =
|
|
4319
|
+
const sessionName = execSync5(
|
|
4284
4320
|
"tmux display-message -p '#{session_name}' 2>/dev/null",
|
|
4285
4321
|
{ encoding: "utf8", timeout: 2e3 }
|
|
4286
4322
|
).trim();
|
|
@@ -4604,7 +4640,7 @@ import { existsSync as existsSync12, readFileSync as readFileSync8, writeFileSyn
|
|
|
4604
4640
|
import { createHash as createHash4 } from "crypto";
|
|
4605
4641
|
import path13 from "path";
|
|
4606
4642
|
import os10 from "os";
|
|
4607
|
-
import { execSync as
|
|
4643
|
+
import { execSync as execSync6 } from "child_process";
|
|
4608
4644
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
4609
4645
|
function resolvePackageRoot() {
|
|
4610
4646
|
const thisFile = fileURLToPath2(import.meta.url);
|
|
@@ -5080,7 +5116,7 @@ init_database();
|
|
|
5080
5116
|
// src/lib/keychain.ts
|
|
5081
5117
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
5082
5118
|
import { existsSync as existsSync6, statSync as statSync2 } from "fs";
|
|
5083
|
-
import { execSync as
|
|
5119
|
+
import { execSync as execSync3 } from "child_process";
|
|
5084
5120
|
import path6 from "path";
|
|
5085
5121
|
import os5 from "os";
|
|
5086
5122
|
var SERVICE = "exe-os";
|
|
@@ -5101,13 +5137,13 @@ function linuxSecretAvailable() {
|
|
|
5101
5137
|
if (process.platform !== "linux") return false;
|
|
5102
5138
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
5103
5139
|
try {
|
|
5104
|
-
|
|
5140
|
+
execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
5105
5141
|
} catch {
|
|
5106
5142
|
linuxSecretAvailability = false;
|
|
5107
5143
|
return false;
|
|
5108
5144
|
}
|
|
5109
5145
|
try {
|
|
5110
|
-
|
|
5146
|
+
execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
5111
5147
|
linuxSecretAvailability = true;
|
|
5112
5148
|
} catch {
|
|
5113
5149
|
linuxSecretAvailability = false;
|
|
@@ -5131,7 +5167,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
5131
5167
|
if (!nativeKeychainAllowed()) return null;
|
|
5132
5168
|
if (process.platform !== "darwin") return null;
|
|
5133
5169
|
try {
|
|
5134
|
-
return
|
|
5170
|
+
return execSync3(
|
|
5135
5171
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
5136
5172
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
5137
5173
|
).trim();
|
|
@@ -5144,13 +5180,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
5144
5180
|
if (process.platform !== "darwin") return false;
|
|
5145
5181
|
try {
|
|
5146
5182
|
try {
|
|
5147
|
-
|
|
5183
|
+
execSync3(
|
|
5148
5184
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
5149
5185
|
{ timeout: 5e3 }
|
|
5150
5186
|
);
|
|
5151
5187
|
} catch {
|
|
5152
5188
|
}
|
|
5153
|
-
|
|
5189
|
+
execSync3(
|
|
5154
5190
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
5155
5191
|
{ timeout: 5e3 }
|
|
5156
5192
|
);
|
|
@@ -5163,7 +5199,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
5163
5199
|
if (!nativeKeychainAllowed()) return false;
|
|
5164
5200
|
if (process.platform !== "darwin") return false;
|
|
5165
5201
|
try {
|
|
5166
|
-
|
|
5202
|
+
execSync3(
|
|
5167
5203
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
5168
5204
|
{ timeout: 5e3 }
|
|
5169
5205
|
);
|
|
@@ -5175,7 +5211,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
5175
5211
|
function linuxSecretGet(service = SERVICE) {
|
|
5176
5212
|
if (!linuxSecretAvailable()) return null;
|
|
5177
5213
|
try {
|
|
5178
|
-
return
|
|
5214
|
+
return execSync3(
|
|
5179
5215
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
5180
5216
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
5181
5217
|
).trim();
|
|
@@ -5186,7 +5222,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
5186
5222
|
function linuxSecretSet(value, service = SERVICE) {
|
|
5187
5223
|
if (!linuxSecretAvailable()) return false;
|
|
5188
5224
|
try {
|
|
5189
|
-
|
|
5225
|
+
execSync3(
|
|
5190
5226
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
5191
5227
|
{ timeout: 5e3 }
|
|
5192
5228
|
);
|
|
@@ -5199,7 +5235,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
5199
5235
|
if (!nativeKeychainAllowed()) return false;
|
|
5200
5236
|
if (process.platform !== "linux") return false;
|
|
5201
5237
|
try {
|
|
5202
|
-
|
|
5238
|
+
execSync3(
|
|
5203
5239
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
5204
5240
|
{ timeout: 5e3 }
|
|
5205
5241
|
);
|
|
@@ -6035,8 +6071,8 @@ async function main() {
|
|
|
6035
6071
|
}
|
|
6036
6072
|
if (!process.env[CODEX.apiKeyEnv]) {
|
|
6037
6073
|
try {
|
|
6038
|
-
const { execSync:
|
|
6039
|
-
const status =
|
|
6074
|
+
const { execSync: execSync7 } = await import("child_process");
|
|
6075
|
+
const status = execSync7("codex login status 2>&1", { encoding: "utf8", timeout: 5e3 }).trim();
|
|
6040
6076
|
if (!status.toLowerCase().includes("logged in")) {
|
|
6041
6077
|
process.stderr.write(
|
|
6042
6078
|
`exe-start-codex: not authenticated. Run \`codex login\` or set ${CODEX.apiKeyEnv}.
|
|
@@ -1068,7 +1068,7 @@ var init_daemon_auth = __esm({
|
|
|
1068
1068
|
// src/lib/exe-daemon-client.ts
|
|
1069
1069
|
import net from "net";
|
|
1070
1070
|
import os4 from "os";
|
|
1071
|
-
import { spawn } from "child_process";
|
|
1071
|
+
import { spawn, execSync as execSync2 } from "child_process";
|
|
1072
1072
|
import { randomUUID } from "crypto";
|
|
1073
1073
|
import { existsSync as existsSync5, unlinkSync as unlinkSync2, readFileSync as readFileSync4, openSync, closeSync, statSync } from "fs";
|
|
1074
1074
|
import path5 from "path";
|
|
@@ -1098,6 +1098,14 @@ function handleData(chunk) {
|
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
1100
1100
|
}
|
|
1101
|
+
function isZombie(pid) {
|
|
1102
|
+
try {
|
|
1103
|
+
const state = execSync2(`ps -p ${pid} -o state=`, { encoding: "utf8", timeout: 2e3 }).trim();
|
|
1104
|
+
return state.startsWith("Z");
|
|
1105
|
+
} catch {
|
|
1106
|
+
return false;
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1101
1109
|
function cleanupStaleFiles() {
|
|
1102
1110
|
if (existsSync5(PID_PATH)) {
|
|
1103
1111
|
try {
|
|
@@ -1105,7 +1113,11 @@ function cleanupStaleFiles() {
|
|
|
1105
1113
|
if (pid > 0) {
|
|
1106
1114
|
try {
|
|
1107
1115
|
process.kill(pid, 0);
|
|
1108
|
-
|
|
1116
|
+
if (!isZombie(pid)) {
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
process.stderr.write(`[exed-client] PID ${pid} is a zombie \u2014 cleaning up stale files
|
|
1120
|
+
`);
|
|
1109
1121
|
} catch {
|
|
1110
1122
|
}
|
|
1111
1123
|
}
|
|
@@ -1133,8 +1145,8 @@ function findPackageRoot() {
|
|
|
1133
1145
|
function getAvailableMemoryGB() {
|
|
1134
1146
|
if (process.platform === "darwin") {
|
|
1135
1147
|
try {
|
|
1136
|
-
const { execSync:
|
|
1137
|
-
const vmstat =
|
|
1148
|
+
const { execSync: execSync7 } = __require("child_process");
|
|
1149
|
+
const vmstat = execSync7("vm_stat", { encoding: "utf8" });
|
|
1138
1150
|
const pageSize = 16384;
|
|
1139
1151
|
const pageSizeMatch = vmstat.match(/page size of (\d+) bytes/);
|
|
1140
1152
|
const actualPageSize = pageSizeMatch ? parseInt(pageSizeMatch[1], 10) : pageSize;
|
|
@@ -2920,6 +2932,12 @@ async function disposeDatabase() {
|
|
|
2920
2932
|
clearInterval(_walCheckpointTimer);
|
|
2921
2933
|
_walCheckpointTimer = null;
|
|
2922
2934
|
}
|
|
2935
|
+
if (_client) {
|
|
2936
|
+
try {
|
|
2937
|
+
await _client.execute("PRAGMA wal_checkpoint(PASSIVE)");
|
|
2938
|
+
} catch {
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2923
2941
|
if (_daemonClient) {
|
|
2924
2942
|
_daemonClient.close();
|
|
2925
2943
|
_daemonClient = null;
|
|
@@ -3451,6 +3469,24 @@ var init_platform_procedures = __esm({
|
|
|
3451
3469
|
priority: "p0",
|
|
3452
3470
|
content: "When an agent encounters a suspected Exe OS bug, update breakage, MCP/tool failure, installer issue, memory/orchestration defect, or customer-local patch need, it MUST use create_bug_report. Do this before or alongside any local workaround so the report reaches AskExe support directly via the customer's license. Do NOT ask the founder for permission to file a required bug report. If create_bug_report is deferred/lazy-loaded, load it and call it. If it is unavailable in the live MCP surface, report 'create_bug_report unavailable in this session' and save a local report in exe/output \u2014 never claim the tool does not exist unless the live MCP surface was checked. If upstream delivery fails, call support_test (MCP) and include its result in the local report so AskExe can distinguish customer setup, license provisioning, and server intake issues; only ask the founder to run `exe-os support test` if MCP is disconnected/unavailable. Classify first: upstream_bug = reproducible exe-os/platform defect; customer_customization = identity, behavior, procedure, config, branding, workflow preference that belongs in customer-owned layers; emergency_hotfix = temporary local patch. For upstream bugs/emergency hotfixes include version, repro steps, expected/actual, files changed, workaround, and local diff summary. Avoid permanent platform-code patches unless founder approves; if a hotfix is unavoidable, document it in the bug report and re-check after npm update."
|
|
3453
3471
|
},
|
|
3472
|
+
{
|
|
3473
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
3474
|
+
domain: "support",
|
|
3475
|
+
priority: "p1",
|
|
3476
|
+
content: "Once per session (COO boot only, never repeat), call list_my_bug_reports to check if any previously filed bug reports have been fixed by AskExe. If any report has status 'fixed' with a fixed_version, surface it to the founder immediately: '\u{1F527} N bug fix(es) available \u2014 run exe-os update to get version X.Y.Z'. This is a one-time check at boot, not a recurring poll. If no reports exist or none are fixed, skip silently. If the MCP tool is unavailable or the network call fails, skip silently \u2014 this is informational, not blocking."
|
|
3477
|
+
},
|
|
3478
|
+
{
|
|
3479
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
3480
|
+
domain: "support",
|
|
3481
|
+
priority: "p0",
|
|
3482
|
+
content: "When an agent or founder identifies a desired capability that exe-os does not yet provide, the COO (or equivalent coordinator) must decide: is this a local customization (identity, behavior, procedure, config, branding, workflow preference that can be configured in customer-owned layers) or an upstream feature request (a platform capability that requires changes to exe-os code, shipped via npm update)? Local customizations: implement immediately using store_behavior, update_identity, company_procedure, or config changes. Upstream features: use create_feature_request to submit to AskExe. Include use case, business impact, and current workaround. Do NOT ask the founder for permission to file a feature request \u2014 file it proactively when the need is clear."
|
|
3483
|
+
},
|
|
3484
|
+
{
|
|
3485
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
3486
|
+
domain: "support",
|
|
3487
|
+
priority: "p1",
|
|
3488
|
+
content: "Once per session (COO boot only, never repeat), call list_my_feature_requests to check if any previously filed feature requests have been shipped by AskExe. If any request has status 'shipped' with a shipped_version, surface it to the founder immediately: '\u{1F680} N feature(s) shipped \u2014 run exe-os update to get version X.Y.Z'. This is a one-time check at boot, not a recurring poll. If no requests exist or none are shipped, skip silently. If the MCP tool is unavailable or the network call fails, skip silently \u2014 this is informational, not blocking."
|
|
3489
|
+
},
|
|
3454
3490
|
// --- Operations ---
|
|
3455
3491
|
{
|
|
3456
3492
|
title: "Managers must supervise deployed workers",
|
|
@@ -4094,7 +4130,7 @@ var init_runtime_table = __esm({
|
|
|
4094
4130
|
});
|
|
4095
4131
|
|
|
4096
4132
|
// src/lib/session-key.ts
|
|
4097
|
-
import { execSync as
|
|
4133
|
+
import { execSync as execSync4 } from "child_process";
|
|
4098
4134
|
function normalizeCommand(command) {
|
|
4099
4135
|
const trimmed = command.trim().toLowerCase();
|
|
4100
4136
|
const parts = trimmed.split(/[\\/]/);
|
|
@@ -4113,7 +4149,7 @@ function resolveRuntimeProcess() {
|
|
|
4113
4149
|
let pid = process.ppid;
|
|
4114
4150
|
for (let i = 0; i < 10; i++) {
|
|
4115
4151
|
try {
|
|
4116
|
-
const info =
|
|
4152
|
+
const info = execSync4(`ps -p ${pid} -o ppid=,comm=`, {
|
|
4117
4153
|
encoding: "utf8",
|
|
4118
4154
|
timeout: 2e3
|
|
4119
4155
|
}).trim();
|
|
@@ -4185,7 +4221,7 @@ __export(active_agent_exports, {
|
|
|
4185
4221
|
writeActiveAgent: () => writeActiveAgent
|
|
4186
4222
|
});
|
|
4187
4223
|
import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, unlinkSync as unlinkSync4, readdirSync as readdirSync3 } from "fs";
|
|
4188
|
-
import { execSync as
|
|
4224
|
+
import { execSync as execSync5 } from "child_process";
|
|
4189
4225
|
import path9 from "path";
|
|
4190
4226
|
function isNameWithOptionalInstance(candidate, baseName) {
|
|
4191
4227
|
if (candidate === baseName) return true;
|
|
@@ -4279,7 +4315,7 @@ function getActiveAgent() {
|
|
|
4279
4315
|
} catch {
|
|
4280
4316
|
}
|
|
4281
4317
|
try {
|
|
4282
|
-
const sessionName =
|
|
4318
|
+
const sessionName = execSync5(
|
|
4283
4319
|
"tmux display-message -p '#{session_name}' 2>/dev/null",
|
|
4284
4320
|
{ encoding: "utf8", timeout: 2e3 }
|
|
4285
4321
|
).trim();
|
|
@@ -4591,7 +4627,7 @@ import { existsSync as existsSync12, readFileSync as readFileSync8, writeFileSyn
|
|
|
4591
4627
|
import { createHash as createHash4 } from "crypto";
|
|
4592
4628
|
import path13 from "path";
|
|
4593
4629
|
import os10 from "os";
|
|
4594
|
-
import { execSync as
|
|
4630
|
+
import { execSync as execSync6 } from "child_process";
|
|
4595
4631
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
4596
4632
|
function resolvePackageRoot() {
|
|
4597
4633
|
const thisFile = fileURLToPath2(import.meta.url);
|
|
@@ -4943,7 +4979,7 @@ init_database();
|
|
|
4943
4979
|
// src/lib/keychain.ts
|
|
4944
4980
|
import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
|
|
4945
4981
|
import { existsSync as existsSync6, statSync as statSync2 } from "fs";
|
|
4946
|
-
import { execSync as
|
|
4982
|
+
import { execSync as execSync3 } from "child_process";
|
|
4947
4983
|
import path6 from "path";
|
|
4948
4984
|
import os5 from "os";
|
|
4949
4985
|
var SERVICE = "exe-os";
|
|
@@ -4964,13 +5000,13 @@ function linuxSecretAvailable() {
|
|
|
4964
5000
|
if (process.platform !== "linux") return false;
|
|
4965
5001
|
if (linuxSecretAvailability !== null) return linuxSecretAvailability;
|
|
4966
5002
|
try {
|
|
4967
|
-
|
|
5003
|
+
execSync3("command -v secret-tool >/dev/null 2>&1", { timeout: 1e3 });
|
|
4968
5004
|
} catch {
|
|
4969
5005
|
linuxSecretAvailability = false;
|
|
4970
5006
|
return false;
|
|
4971
5007
|
}
|
|
4972
5008
|
try {
|
|
4973
|
-
|
|
5009
|
+
execSync3("secret-tool search --all exe-os probe >/dev/null 2>&1", { timeout: 1e3 });
|
|
4974
5010
|
linuxSecretAvailability = true;
|
|
4975
5011
|
} catch {
|
|
4976
5012
|
linuxSecretAvailability = false;
|
|
@@ -4994,7 +5030,7 @@ function macKeychainGet(service = SERVICE) {
|
|
|
4994
5030
|
if (!nativeKeychainAllowed()) return null;
|
|
4995
5031
|
if (process.platform !== "darwin") return null;
|
|
4996
5032
|
try {
|
|
4997
|
-
return
|
|
5033
|
+
return execSync3(
|
|
4998
5034
|
`security find-generic-password -s "${service}" -a "${ACCOUNT}" -w 2>/dev/null`,
|
|
4999
5035
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
5000
5036
|
).trim();
|
|
@@ -5007,13 +5043,13 @@ function macKeychainSet(value, service = SERVICE) {
|
|
|
5007
5043
|
if (process.platform !== "darwin") return false;
|
|
5008
5044
|
try {
|
|
5009
5045
|
try {
|
|
5010
|
-
|
|
5046
|
+
execSync3(
|
|
5011
5047
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
5012
5048
|
{ timeout: 5e3 }
|
|
5013
5049
|
);
|
|
5014
5050
|
} catch {
|
|
5015
5051
|
}
|
|
5016
|
-
|
|
5052
|
+
execSync3(
|
|
5017
5053
|
`security add-generic-password -s "${service}" -a "${ACCOUNT}" -w "${value}"`,
|
|
5018
5054
|
{ timeout: 5e3 }
|
|
5019
5055
|
);
|
|
@@ -5026,7 +5062,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
5026
5062
|
if (!nativeKeychainAllowed()) return false;
|
|
5027
5063
|
if (process.platform !== "darwin") return false;
|
|
5028
5064
|
try {
|
|
5029
|
-
|
|
5065
|
+
execSync3(
|
|
5030
5066
|
`security delete-generic-password -s "${service}" -a "${ACCOUNT}" 2>/dev/null`,
|
|
5031
5067
|
{ timeout: 5e3 }
|
|
5032
5068
|
);
|
|
@@ -5038,7 +5074,7 @@ function macKeychainDelete(service = SERVICE) {
|
|
|
5038
5074
|
function linuxSecretGet(service = SERVICE) {
|
|
5039
5075
|
if (!linuxSecretAvailable()) return null;
|
|
5040
5076
|
try {
|
|
5041
|
-
return
|
|
5077
|
+
return execSync3(
|
|
5042
5078
|
`secret-tool lookup service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
5043
5079
|
{ encoding: "utf-8", timeout: 5e3 }
|
|
5044
5080
|
).trim();
|
|
@@ -5049,7 +5085,7 @@ function linuxSecretGet(service = SERVICE) {
|
|
|
5049
5085
|
function linuxSecretSet(value, service = SERVICE) {
|
|
5050
5086
|
if (!linuxSecretAvailable()) return false;
|
|
5051
5087
|
try {
|
|
5052
|
-
|
|
5088
|
+
execSync3(
|
|
5053
5089
|
`echo -n "${value}" | secret-tool store --label="exe-os master key" service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
5054
5090
|
{ timeout: 5e3 }
|
|
5055
5091
|
);
|
|
@@ -5062,7 +5098,7 @@ function linuxSecretDelete(service = SERVICE) {
|
|
|
5062
5098
|
if (!nativeKeychainAllowed()) return false;
|
|
5063
5099
|
if (process.platform !== "linux") return false;
|
|
5064
5100
|
try {
|
|
5065
|
-
|
|
5101
|
+
execSync3(
|
|
5066
5102
|
`secret-tool clear service "${service}" account "${ACCOUNT}" 2>/dev/null`,
|
|
5067
5103
|
{ timeout: 5e3 }
|
|
5068
5104
|
);
|