@askexenow/exe-os 0.9.86 → 0.9.88
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/deploy/compose/docker-compose.yml +3 -3
- package/dist/bin/age-ontology-load.js +8 -2
- package/dist/bin/agentic-ontology-backfill.js +29 -0
- package/dist/bin/agentic-reflection-backfill.js +29 -0
- package/dist/bin/agentic-semantic-label.js +29 -0
- package/dist/bin/backfill-conversations.js +30 -0
- package/dist/bin/backfill-responses.js +30 -0
- package/dist/bin/backfill-vectors.js +30 -0
- package/dist/bin/bulk-sync-postgres.js +47 -1
- package/dist/bin/cc-doctor.js +3 -2
- package/dist/bin/cleanup-stale-review-tasks.js +30 -0
- package/dist/bin/cli.js +357 -19
- package/dist/bin/exe-agent.js +19 -0
- package/dist/bin/exe-assign.js +30 -0
- package/dist/bin/exe-boot.js +157 -4
- package/dist/bin/exe-call.js +20 -0
- package/dist/bin/exe-cloud.js +156 -3
- package/dist/bin/exe-dispatch.js +30 -1
- package/dist/bin/exe-doctor.js +30 -0
- package/dist/bin/exe-export-behaviors.js +29 -0
- package/dist/bin/exe-forget.js +30 -0
- package/dist/bin/exe-gateway.js +150 -35
- package/dist/bin/exe-healthcheck.js +2 -1
- package/dist/bin/exe-heartbeat.js +30 -0
- package/dist/bin/exe-kill.js +29 -0
- package/dist/bin/exe-launch-agent.js +29 -0
- package/dist/bin/exe-new-employee.js +37 -4
- package/dist/bin/exe-pending-messages.js +29 -0
- package/dist/bin/exe-pending-notifications.js +30 -0
- package/dist/bin/exe-pending-reviews.js +30 -0
- package/dist/bin/exe-rename.js +30 -0
- package/dist/bin/exe-review.js +30 -0
- package/dist/bin/exe-search.js +30 -0
- package/dist/bin/exe-session-cleanup.js +30 -1
- package/dist/bin/exe-settings.js +3 -0
- package/dist/bin/exe-start-codex.js +31 -2
- package/dist/bin/exe-start-opencode.js +31 -2
- package/dist/bin/exe-status.js +30 -0
- package/dist/bin/exe-team.js +30 -0
- package/dist/bin/git-sweep.js +30 -1
- package/dist/bin/graph-backfill.js +29 -0
- package/dist/bin/graph-export.js +29 -0
- package/dist/bin/graph-layer-benchmark.js +9 -1
- package/dist/bin/install.js +9 -0
- package/dist/bin/intercom-check.js +31 -1
- package/dist/bin/list-providers.js +1 -0
- package/dist/bin/postgres-agentic-reflection-backfill.js +7 -1
- package/dist/bin/postgres-agentic-semantic-backfill.js +7 -1
- package/dist/bin/registry-proxy.js +1 -0
- package/dist/bin/scan-tasks.js +31 -1
- package/dist/bin/setup.js +165 -9
- package/dist/bin/shard-migrate.js +29 -0
- package/dist/bin/stack-update.js +24 -7
- package/dist/bin/update.js +5 -0
- package/dist/gateway/index.js +30 -1
- package/dist/hooks/bug-report-worker.js +30 -1
- package/dist/hooks/codex-stop-task-finalizer.js +30 -1
- package/dist/hooks/commit-complete.js +30 -1
- package/dist/hooks/error-recall.js +29 -0
- package/dist/hooks/ingest.js +29 -0
- package/dist/hooks/instructions-loaded.js +29 -0
- package/dist/hooks/notification.js +29 -0
- package/dist/hooks/post-compact.js +29 -0
- package/dist/hooks/post-tool-combined.js +29 -0
- package/dist/hooks/pre-compact.js +30 -1
- package/dist/hooks/pre-tool-use.js +29 -0
- package/dist/hooks/prompt-submit.js +30 -1
- package/dist/hooks/session-end.js +30 -1
- package/dist/hooks/session-start.js +29 -0
- package/dist/hooks/stop.js +29 -0
- package/dist/hooks/subagent-stop.js +29 -0
- package/dist/hooks/summary-worker.js +155 -3
- package/dist/index.js +30 -1
- package/dist/lib/cloud-sync.js +136 -2
- package/dist/lib/consolidation.js +1 -0
- package/dist/lib/database.js +11 -0
- package/dist/lib/db.js +11 -0
- package/dist/lib/device-registry.js +11 -0
- package/dist/lib/employee-templates.js +19 -0
- package/dist/lib/exe-daemon.js +1455 -208
- package/dist/lib/hybrid-search.js +29 -0
- package/dist/lib/identity-templates.js +6 -2
- package/dist/lib/identity.js +1 -0
- package/dist/lib/messaging.js +2 -1
- package/dist/lib/reminders.js +1 -0
- package/dist/lib/schedules.js +29 -0
- package/dist/lib/skill-learning.js +1 -0
- package/dist/lib/store.js +29 -0
- package/dist/lib/tasks.js +2 -1
- package/dist/lib/tmux-routing.js +2 -1
- package/dist/lib/token-spend.js +1 -0
- package/dist/mcp/server.js +1278 -165
- package/dist/mcp/tools/complete-reminder.js +1 -0
- package/dist/mcp/tools/create-reminder.js +1 -0
- package/dist/mcp/tools/create-task.js +8 -3
- package/dist/mcp/tools/deactivate-behavior.js +1 -0
- package/dist/mcp/tools/list-reminders.js +1 -0
- package/dist/mcp/tools/list-tasks.js +1 -0
- package/dist/mcp/tools/send-message.js +2 -1
- package/dist/mcp/tools/update-task.js +2 -1
- package/dist/runtime/index.js +30 -1
- package/dist/tui/App.js +30 -1
- package/package.json +2 -2
package/dist/bin/exe-assign.js
CHANGED
|
@@ -1637,6 +1637,7 @@ __export(database_exports, {
|
|
|
1637
1637
|
isInitialized: () => isInitialized,
|
|
1638
1638
|
setExternalClient: () => setExternalClient
|
|
1639
1639
|
});
|
|
1640
|
+
import { chmodSync as chmodSync2 } from "fs";
|
|
1640
1641
|
import { createClient } from "@libsql/client";
|
|
1641
1642
|
async function initDatabase(config) {
|
|
1642
1643
|
if (_walCheckpointTimer) {
|
|
@@ -1678,6 +1679,16 @@ async function initDatabase(config) {
|
|
|
1678
1679
|
if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
|
|
1679
1680
|
_adapterClient = await createPrismaDbAdapter(_resilientClient);
|
|
1680
1681
|
}
|
|
1682
|
+
try {
|
|
1683
|
+
chmodSync2(config.dbPath, 384);
|
|
1684
|
+
for (const suffix of ["-wal", "-shm"]) {
|
|
1685
|
+
try {
|
|
1686
|
+
chmodSync2(config.dbPath + suffix, 384);
|
|
1687
|
+
} catch {
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
} catch {
|
|
1691
|
+
}
|
|
1681
1692
|
}
|
|
1682
1693
|
function isInitialized() {
|
|
1683
1694
|
return _adapterClient !== null || _client !== null;
|
|
@@ -3532,6 +3543,24 @@ var init_platform_procedures = __esm({
|
|
|
3532
3543
|
priority: "p0",
|
|
3533
3544
|
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."
|
|
3534
3545
|
},
|
|
3546
|
+
{
|
|
3547
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
3548
|
+
domain: "support",
|
|
3549
|
+
priority: "p1",
|
|
3550
|
+
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."
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
3554
|
+
domain: "support",
|
|
3555
|
+
priority: "p0",
|
|
3556
|
+
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."
|
|
3557
|
+
},
|
|
3558
|
+
{
|
|
3559
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
3560
|
+
domain: "support",
|
|
3561
|
+
priority: "p1",
|
|
3562
|
+
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."
|
|
3563
|
+
},
|
|
3535
3564
|
// --- Operations ---
|
|
3536
3565
|
{
|
|
3537
3566
|
title: "Managers must supervise deployed workers",
|
|
@@ -5348,6 +5377,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
|
|
|
5348
5377
|
function isMainModule(importMetaUrl) {
|
|
5349
5378
|
if (process.argv[1] == null) return false;
|
|
5350
5379
|
if (process.argv[1].includes("mcp/server")) return false;
|
|
5380
|
+
if (process.argv[1].includes("exe-daemon")) return false;
|
|
5351
5381
|
try {
|
|
5352
5382
|
const scriptPath = realpathSync(process.argv[1]);
|
|
5353
5383
|
const modulePath = realpathSync(fileURLToPath2(importMetaUrl));
|
package/dist/bin/exe-boot.js
CHANGED
|
@@ -1789,6 +1789,7 @@ __export(database_exports, {
|
|
|
1789
1789
|
isInitialized: () => isInitialized,
|
|
1790
1790
|
setExternalClient: () => setExternalClient
|
|
1791
1791
|
});
|
|
1792
|
+
import { chmodSync as chmodSync2 } from "fs";
|
|
1792
1793
|
import { createClient } from "@libsql/client";
|
|
1793
1794
|
async function initDatabase(config) {
|
|
1794
1795
|
if (_walCheckpointTimer) {
|
|
@@ -1830,6 +1831,16 @@ async function initDatabase(config) {
|
|
|
1830
1831
|
if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
|
|
1831
1832
|
_adapterClient = await createPrismaDbAdapter(_resilientClient);
|
|
1832
1833
|
}
|
|
1834
|
+
try {
|
|
1835
|
+
chmodSync2(config.dbPath, 384);
|
|
1836
|
+
for (const suffix of ["-wal", "-shm"]) {
|
|
1837
|
+
try {
|
|
1838
|
+
chmodSync2(config.dbPath + suffix, 384);
|
|
1839
|
+
} catch {
|
|
1840
|
+
}
|
|
1841
|
+
}
|
|
1842
|
+
} catch {
|
|
1843
|
+
}
|
|
1833
1844
|
}
|
|
1834
1845
|
function isInitialized() {
|
|
1835
1846
|
return _adapterClient !== null || _client !== null;
|
|
@@ -3269,6 +3280,24 @@ var init_platform_procedures = __esm({
|
|
|
3269
3280
|
priority: "p0",
|
|
3270
3281
|
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."
|
|
3271
3282
|
},
|
|
3283
|
+
{
|
|
3284
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
3285
|
+
domain: "support",
|
|
3286
|
+
priority: "p1",
|
|
3287
|
+
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."
|
|
3288
|
+
},
|
|
3289
|
+
{
|
|
3290
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
3291
|
+
domain: "support",
|
|
3292
|
+
priority: "p0",
|
|
3293
|
+
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."
|
|
3294
|
+
},
|
|
3295
|
+
{
|
|
3296
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
3297
|
+
domain: "support",
|
|
3298
|
+
priority: "p1",
|
|
3299
|
+
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."
|
|
3300
|
+
},
|
|
3272
3301
|
// --- Operations ---
|
|
3273
3302
|
{
|
|
3274
3303
|
title: "Managers must supervise deployed workers",
|
|
@@ -4929,7 +4958,7 @@ function readQueue() {
|
|
|
4929
4958
|
function writeQueue(queue) {
|
|
4930
4959
|
ensureDir();
|
|
4931
4960
|
const tmp = `${QUEUE_PATH}.tmp`;
|
|
4932
|
-
writeFileSync5(tmp, JSON.stringify(queue, null, 2));
|
|
4961
|
+
writeFileSync5(tmp, JSON.stringify(queue, null, 2), { mode: 384 });
|
|
4933
4962
|
renameSync4(tmp, QUEUE_PATH);
|
|
4934
4963
|
}
|
|
4935
4964
|
function queueIntercom(targetSession, reason) {
|
|
@@ -9285,6 +9314,21 @@ var init_crdt_sync = __esm({
|
|
|
9285
9314
|
}
|
|
9286
9315
|
});
|
|
9287
9316
|
|
|
9317
|
+
// src/lib/pg-ssl.ts
|
|
9318
|
+
var pg_ssl_exports = {};
|
|
9319
|
+
__export(pg_ssl_exports, {
|
|
9320
|
+
pgSslConfig: () => pgSslConfig
|
|
9321
|
+
});
|
|
9322
|
+
function pgSslConfig() {
|
|
9323
|
+
if (process.env.EXE_DB_SSL_DISABLED === "true") return {};
|
|
9324
|
+
return { ssl: { rejectUnauthorized: process.env.EXE_DB_SSL_ALLOW_SELFSIGNED !== "true" } };
|
|
9325
|
+
}
|
|
9326
|
+
var init_pg_ssl = __esm({
|
|
9327
|
+
"src/lib/pg-ssl.ts"() {
|
|
9328
|
+
"use strict";
|
|
9329
|
+
}
|
|
9330
|
+
});
|
|
9331
|
+
|
|
9288
9332
|
// src/lib/db-backup.ts
|
|
9289
9333
|
var db_backup_exports = {};
|
|
9290
9334
|
__export(db_backup_exports, {
|
|
@@ -9398,6 +9442,7 @@ __export(cloud_sync_exports, {
|
|
|
9398
9442
|
cloudPull: () => cloudPull,
|
|
9399
9443
|
cloudPullBehaviors: () => cloudPullBehaviors,
|
|
9400
9444
|
cloudPullBlob: () => cloudPullBlob,
|
|
9445
|
+
cloudPullCodeContext: () => cloudPullCodeContext,
|
|
9401
9446
|
cloudPullConversations: () => cloudPullConversations,
|
|
9402
9447
|
cloudPullDocuments: () => cloudPullDocuments,
|
|
9403
9448
|
cloudPullGlobalProcedures: () => cloudPullGlobalProcedures,
|
|
@@ -9407,6 +9452,7 @@ __export(cloud_sync_exports, {
|
|
|
9407
9452
|
cloudPush: () => cloudPush,
|
|
9408
9453
|
cloudPushBehaviors: () => cloudPushBehaviors,
|
|
9409
9454
|
cloudPushBlob: () => cloudPushBlob,
|
|
9455
|
+
cloudPushCodeContext: () => cloudPushCodeContext,
|
|
9410
9456
|
cloudPushConversations: () => cloudPushConversations,
|
|
9411
9457
|
cloudPushDocuments: () => cloudPushDocuments,
|
|
9412
9458
|
cloudPushGlobalProcedures: () => cloudPushGlobalProcedures,
|
|
@@ -9485,7 +9531,8 @@ function loadPgClient() {
|
|
|
9485
9531
|
return new Ctor();
|
|
9486
9532
|
}
|
|
9487
9533
|
const { Pool } = await import("pg");
|
|
9488
|
-
const
|
|
9534
|
+
const { pgSslConfig: pgSslConfig2 } = await Promise.resolve().then(() => (init_pg_ssl(), pg_ssl_exports));
|
|
9535
|
+
const pool = new Pool({ connectionString: process.env.DATABASE_URL, ...pgSslConfig2() });
|
|
9489
9536
|
return {
|
|
9490
9537
|
async $queryRawUnsafe(query, ...values) {
|
|
9491
9538
|
const result = await pool.query(query, values);
|
|
@@ -10030,6 +10077,17 @@ async function cloudSync(config) {
|
|
|
10030
10077
|
} catch (err) {
|
|
10031
10078
|
logError(`[cloud-sync] DB backup upload error: ${err instanceof Error ? err.message : String(err)}`);
|
|
10032
10079
|
}
|
|
10080
|
+
let codeContextResult = { pushed: 0, pulled: 0 };
|
|
10081
|
+
try {
|
|
10082
|
+
codeContextResult.pushed = await cloudPushCodeContext(config);
|
|
10083
|
+
} catch (err) {
|
|
10084
|
+
logError(`[cloud-sync] Code context push: ${err instanceof Error ? err.message : String(err)}`);
|
|
10085
|
+
}
|
|
10086
|
+
try {
|
|
10087
|
+
codeContextResult.pulled = await cloudPullCodeContext(config);
|
|
10088
|
+
} catch (err) {
|
|
10089
|
+
logError(`[cloud-sync] Code context pull: ${err instanceof Error ? err.message : String(err)}`);
|
|
10090
|
+
}
|
|
10033
10091
|
return {
|
|
10034
10092
|
pushed,
|
|
10035
10093
|
pulled,
|
|
@@ -10039,7 +10097,8 @@ async function cloudSync(config) {
|
|
|
10039
10097
|
tasks: tasksResult,
|
|
10040
10098
|
conversations: conversationsResult,
|
|
10041
10099
|
documents: documentsResult,
|
|
10042
|
-
roster: rosterResult
|
|
10100
|
+
roster: rosterResult,
|
|
10101
|
+
codeContext: codeContextResult
|
|
10043
10102
|
};
|
|
10044
10103
|
}
|
|
10045
10104
|
function recordRosterDeletion(name) {
|
|
@@ -10677,7 +10736,99 @@ async function cloudPullDocuments(config) {
|
|
|
10677
10736
|
}
|
|
10678
10737
|
return { pulled };
|
|
10679
10738
|
}
|
|
10680
|
-
|
|
10739
|
+
async function cloudPushCodeContext(config) {
|
|
10740
|
+
assertSecureEndpoint(config.endpoint);
|
|
10741
|
+
if (!existsSync21(CODE_CONTEXT_DIR)) return 0;
|
|
10742
|
+
const files = readdirSync8(CODE_CONTEXT_DIR).filter(
|
|
10743
|
+
(f) => f.endsWith(".json") && !f.endsWith(".vectors.json") && !f.startsWith(".")
|
|
10744
|
+
);
|
|
10745
|
+
if (files.length === 0) return 0;
|
|
10746
|
+
const metaPath = path25.join(CODE_CONTEXT_DIR, ".sync-meta.json");
|
|
10747
|
+
let syncMeta = {};
|
|
10748
|
+
if (existsSync21(metaPath)) {
|
|
10749
|
+
try {
|
|
10750
|
+
syncMeta = JSON.parse(readFileSync15(metaPath, "utf-8"));
|
|
10751
|
+
} catch {
|
|
10752
|
+
}
|
|
10753
|
+
}
|
|
10754
|
+
let pushed = 0;
|
|
10755
|
+
for (const file of files) {
|
|
10756
|
+
const filePath = path25.join(CODE_CONTEXT_DIR, file);
|
|
10757
|
+
try {
|
|
10758
|
+
const stat = statSync5(filePath);
|
|
10759
|
+
const lastPushed = syncMeta[file] ?? 0;
|
|
10760
|
+
if (stat.mtimeMs <= lastPushed) continue;
|
|
10761
|
+
const content = readFileSync15(filePath, "utf-8");
|
|
10762
|
+
const header = content.substring(0, 300);
|
|
10763
|
+
if (header.includes("/tmp") || header.includes("/var/folders") || header.includes(".worktrees/")) continue;
|
|
10764
|
+
const compressed = compress(Buffer.from(content, "utf8"));
|
|
10765
|
+
const encrypted = encryptSyncBlob(compressed);
|
|
10766
|
+
const resp = await fetchWithRetry(`${config.endpoint}/sync/push-code-context`, {
|
|
10767
|
+
method: "POST",
|
|
10768
|
+
headers: {
|
|
10769
|
+
Authorization: `Bearer ${config.apiKey}`,
|
|
10770
|
+
"Content-Type": "application/json",
|
|
10771
|
+
"X-Device-Id": loadDeviceId()
|
|
10772
|
+
},
|
|
10773
|
+
body: JSON.stringify({ key: file, blob: encrypted })
|
|
10774
|
+
});
|
|
10775
|
+
if (resp.ok) {
|
|
10776
|
+
syncMeta[file] = stat.mtimeMs;
|
|
10777
|
+
pushed++;
|
|
10778
|
+
}
|
|
10779
|
+
} catch {
|
|
10780
|
+
}
|
|
10781
|
+
}
|
|
10782
|
+
if (pushed > 0) {
|
|
10783
|
+
try {
|
|
10784
|
+
writeFileSync12(metaPath, JSON.stringify(syncMeta));
|
|
10785
|
+
} catch {
|
|
10786
|
+
}
|
|
10787
|
+
}
|
|
10788
|
+
return pushed;
|
|
10789
|
+
}
|
|
10790
|
+
async function cloudPullCodeContext(config) {
|
|
10791
|
+
assertSecureEndpoint(config.endpoint);
|
|
10792
|
+
try {
|
|
10793
|
+
const resp = await fetchWithRetry(`${config.endpoint}/sync/pull-code-context`, {
|
|
10794
|
+
method: "GET",
|
|
10795
|
+
headers: {
|
|
10796
|
+
Authorization: `Bearer ${config.apiKey}`,
|
|
10797
|
+
"X-Device-Id": loadDeviceId()
|
|
10798
|
+
}
|
|
10799
|
+
});
|
|
10800
|
+
if (!resp.ok) return 0;
|
|
10801
|
+
const data = await resp.json();
|
|
10802
|
+
if (!data.indexes || data.indexes.length === 0) return 0;
|
|
10803
|
+
mkdirSync13(CODE_CONTEXT_DIR, { recursive: true });
|
|
10804
|
+
let pulled = 0;
|
|
10805
|
+
for (const { key, blob } of data.indexes) {
|
|
10806
|
+
try {
|
|
10807
|
+
if (key.endsWith(".vectors.json")) continue;
|
|
10808
|
+
const localPath = path25.join(CODE_CONTEXT_DIR, key);
|
|
10809
|
+
const compressed = decryptSyncBlob(blob);
|
|
10810
|
+
const content = decompress(compressed).toString("utf8");
|
|
10811
|
+
if (!existsSync21(localPath)) {
|
|
10812
|
+
writeFileSync12(localPath, content, "utf-8");
|
|
10813
|
+
pulled++;
|
|
10814
|
+
} else {
|
|
10815
|
+
const localContent = readFileSync15(localPath, "utf-8");
|
|
10816
|
+
if (localContent.length !== content.length) {
|
|
10817
|
+
writeFileSync12(localPath, content, "utf-8");
|
|
10818
|
+
pulled++;
|
|
10819
|
+
}
|
|
10820
|
+
}
|
|
10821
|
+
} catch {
|
|
10822
|
+
}
|
|
10823
|
+
}
|
|
10824
|
+
return pulled;
|
|
10825
|
+
} catch (err) {
|
|
10826
|
+
process.stderr.write(`[cloud-sync] Code context pull failed: ${err instanceof Error ? err.message : String(err)}
|
|
10827
|
+
`);
|
|
10828
|
+
return 0;
|
|
10829
|
+
}
|
|
10830
|
+
}
|
|
10831
|
+
var LOCALHOST_PATTERNS, FETCH_TIMEOUT_MS, PUSH_BATCH_SIZE, ROSTER_LOCK_PATH, LOCK_STALE_MS, _pgPromise, _pgFailed, CLOUD_REUPLOAD_REQUIRED_MESSAGE, ROSTER_DELETIONS_PATH, CODE_CONTEXT_DIR;
|
|
10681
10832
|
var init_cloud_sync = __esm({
|
|
10682
10833
|
"src/lib/cloud-sync.ts"() {
|
|
10683
10834
|
"use strict";
|
|
@@ -10698,6 +10849,7 @@ var init_cloud_sync = __esm({
|
|
|
10698
10849
|
_pgFailed = false;
|
|
10699
10850
|
CLOUD_REUPLOAD_REQUIRED_MESSAGE = "Cloud sync is blocked because this device rotated its memory encryption key. Run `exe-os cloud reupload` first to re-upload the cloud backup with the new key.";
|
|
10700
10851
|
ROSTER_DELETIONS_PATH = path25.join(EXE_AI_DIR, "roster-deletions.json");
|
|
10852
|
+
CODE_CONTEXT_DIR = path25.join(EXE_AI_DIR, "code-context");
|
|
10701
10853
|
}
|
|
10702
10854
|
});
|
|
10703
10855
|
|
|
@@ -11430,6 +11582,7 @@ import { fileURLToPath as fileURLToPath3 } from "url";
|
|
|
11430
11582
|
function isMainModule(importMetaUrl) {
|
|
11431
11583
|
if (process.argv[1] == null) return false;
|
|
11432
11584
|
if (process.argv[1].includes("mcp/server")) return false;
|
|
11585
|
+
if (process.argv[1].includes("exe-daemon")) return false;
|
|
11433
11586
|
try {
|
|
11434
11587
|
const scriptPath = realpathSync(process.argv[1]);
|
|
11435
11588
|
const modulePath = realpathSync(fileURLToPath3(importMetaUrl));
|
package/dist/bin/exe-call.js
CHANGED
|
@@ -221,6 +221,7 @@ var init_memory = __esm({
|
|
|
221
221
|
});
|
|
222
222
|
|
|
223
223
|
// src/lib/database.ts
|
|
224
|
+
import { chmodSync as chmodSync2 } from "fs";
|
|
224
225
|
import { createClient } from "@libsql/client";
|
|
225
226
|
var init_database = __esm({
|
|
226
227
|
"src/lib/database.ts"() {
|
|
@@ -315,6 +316,24 @@ var init_platform_procedures = __esm({
|
|
|
315
316
|
priority: "p0",
|
|
316
317
|
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."
|
|
317
318
|
},
|
|
319
|
+
{
|
|
320
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
321
|
+
domain: "support",
|
|
322
|
+
priority: "p1",
|
|
323
|
+
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."
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
327
|
+
domain: "support",
|
|
328
|
+
priority: "p0",
|
|
329
|
+
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."
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
333
|
+
domain: "support",
|
|
334
|
+
priority: "p1",
|
|
335
|
+
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."
|
|
336
|
+
},
|
|
318
337
|
// --- Operations ---
|
|
319
338
|
{
|
|
320
339
|
title: "Managers must supervise deployed workers",
|
|
@@ -1235,6 +1254,7 @@ import { fileURLToPath } from "url";
|
|
|
1235
1254
|
function isMainModule(importMetaUrl) {
|
|
1236
1255
|
if (process.argv[1] == null) return false;
|
|
1237
1256
|
if (process.argv[1].includes("mcp/server")) return false;
|
|
1257
|
+
if (process.argv[1].includes("exe-daemon")) return false;
|
|
1238
1258
|
try {
|
|
1239
1259
|
const scriptPath = realpathSync(process.argv[1]);
|
|
1240
1260
|
const modulePath = realpathSync(fileURLToPath(importMetaUrl));
|
package/dist/bin/exe-cloud.js
CHANGED
|
@@ -2206,6 +2206,7 @@ __export(database_exports, {
|
|
|
2206
2206
|
isInitialized: () => isInitialized,
|
|
2207
2207
|
setExternalClient: () => setExternalClient
|
|
2208
2208
|
});
|
|
2209
|
+
import { chmodSync as chmodSync2 } from "fs";
|
|
2209
2210
|
import { createClient } from "@libsql/client";
|
|
2210
2211
|
async function initDatabase(config) {
|
|
2211
2212
|
if (_walCheckpointTimer) {
|
|
@@ -2247,6 +2248,16 @@ async function initDatabase(config) {
|
|
|
2247
2248
|
if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
|
|
2248
2249
|
_adapterClient = await createPrismaDbAdapter(_resilientClient);
|
|
2249
2250
|
}
|
|
2251
|
+
try {
|
|
2252
|
+
chmodSync2(config.dbPath, 384);
|
|
2253
|
+
for (const suffix of ["-wal", "-shm"]) {
|
|
2254
|
+
try {
|
|
2255
|
+
chmodSync2(config.dbPath + suffix, 384);
|
|
2256
|
+
} catch {
|
|
2257
|
+
}
|
|
2258
|
+
}
|
|
2259
|
+
} catch {
|
|
2260
|
+
}
|
|
2250
2261
|
}
|
|
2251
2262
|
function isInitialized() {
|
|
2252
2263
|
return _adapterClient !== null || _client !== null;
|
|
@@ -4375,6 +4386,21 @@ var init_crdt_sync = __esm({
|
|
|
4375
4386
|
}
|
|
4376
4387
|
});
|
|
4377
4388
|
|
|
4389
|
+
// src/lib/pg-ssl.ts
|
|
4390
|
+
var pg_ssl_exports = {};
|
|
4391
|
+
__export(pg_ssl_exports, {
|
|
4392
|
+
pgSslConfig: () => pgSslConfig
|
|
4393
|
+
});
|
|
4394
|
+
function pgSslConfig() {
|
|
4395
|
+
if (process.env.EXE_DB_SSL_DISABLED === "true") return {};
|
|
4396
|
+
return { ssl: { rejectUnauthorized: process.env.EXE_DB_SSL_ALLOW_SELFSIGNED !== "true" } };
|
|
4397
|
+
}
|
|
4398
|
+
var init_pg_ssl = __esm({
|
|
4399
|
+
"src/lib/pg-ssl.ts"() {
|
|
4400
|
+
"use strict";
|
|
4401
|
+
}
|
|
4402
|
+
});
|
|
4403
|
+
|
|
4378
4404
|
// src/lib/db-backup.ts
|
|
4379
4405
|
var db_backup_exports = {};
|
|
4380
4406
|
__export(db_backup_exports, {
|
|
@@ -4488,6 +4514,7 @@ __export(cloud_sync_exports, {
|
|
|
4488
4514
|
cloudPull: () => cloudPull,
|
|
4489
4515
|
cloudPullBehaviors: () => cloudPullBehaviors,
|
|
4490
4516
|
cloudPullBlob: () => cloudPullBlob,
|
|
4517
|
+
cloudPullCodeContext: () => cloudPullCodeContext,
|
|
4491
4518
|
cloudPullConversations: () => cloudPullConversations,
|
|
4492
4519
|
cloudPullDocuments: () => cloudPullDocuments,
|
|
4493
4520
|
cloudPullGlobalProcedures: () => cloudPullGlobalProcedures,
|
|
@@ -4497,6 +4524,7 @@ __export(cloud_sync_exports, {
|
|
|
4497
4524
|
cloudPush: () => cloudPush,
|
|
4498
4525
|
cloudPushBehaviors: () => cloudPushBehaviors,
|
|
4499
4526
|
cloudPushBlob: () => cloudPushBlob,
|
|
4527
|
+
cloudPushCodeContext: () => cloudPushCodeContext,
|
|
4500
4528
|
cloudPushConversations: () => cloudPushConversations,
|
|
4501
4529
|
cloudPushDocuments: () => cloudPushDocuments,
|
|
4502
4530
|
cloudPushGlobalProcedures: () => cloudPushGlobalProcedures,
|
|
@@ -4575,7 +4603,8 @@ function loadPgClient() {
|
|
|
4575
4603
|
return new Ctor();
|
|
4576
4604
|
}
|
|
4577
4605
|
const { Pool } = await import("pg");
|
|
4578
|
-
const
|
|
4606
|
+
const { pgSslConfig: pgSslConfig2 } = await Promise.resolve().then(() => (init_pg_ssl(), pg_ssl_exports));
|
|
4607
|
+
const pool = new Pool({ connectionString: process.env.DATABASE_URL, ...pgSslConfig2() });
|
|
4579
4608
|
return {
|
|
4580
4609
|
async $queryRawUnsafe(query, ...values) {
|
|
4581
4610
|
const result = await pool.query(query, values);
|
|
@@ -5120,6 +5149,17 @@ async function cloudSync(config) {
|
|
|
5120
5149
|
} catch (err) {
|
|
5121
5150
|
logError(`[cloud-sync] DB backup upload error: ${err instanceof Error ? err.message : String(err)}`);
|
|
5122
5151
|
}
|
|
5152
|
+
let codeContextResult = { pushed: 0, pulled: 0 };
|
|
5153
|
+
try {
|
|
5154
|
+
codeContextResult.pushed = await cloudPushCodeContext(config);
|
|
5155
|
+
} catch (err) {
|
|
5156
|
+
logError(`[cloud-sync] Code context push: ${err instanceof Error ? err.message : String(err)}`);
|
|
5157
|
+
}
|
|
5158
|
+
try {
|
|
5159
|
+
codeContextResult.pulled = await cloudPullCodeContext(config);
|
|
5160
|
+
} catch (err) {
|
|
5161
|
+
logError(`[cloud-sync] Code context pull: ${err instanceof Error ? err.message : String(err)}`);
|
|
5162
|
+
}
|
|
5123
5163
|
return {
|
|
5124
5164
|
pushed,
|
|
5125
5165
|
pulled,
|
|
@@ -5129,7 +5169,8 @@ async function cloudSync(config) {
|
|
|
5129
5169
|
tasks: tasksResult,
|
|
5130
5170
|
conversations: conversationsResult,
|
|
5131
5171
|
documents: documentsResult,
|
|
5132
|
-
roster: rosterResult
|
|
5172
|
+
roster: rosterResult,
|
|
5173
|
+
codeContext: codeContextResult
|
|
5133
5174
|
};
|
|
5134
5175
|
}
|
|
5135
5176
|
function recordRosterDeletion(name) {
|
|
@@ -5767,7 +5808,99 @@ async function cloudPullDocuments(config) {
|
|
|
5767
5808
|
}
|
|
5768
5809
|
return { pulled };
|
|
5769
5810
|
}
|
|
5770
|
-
|
|
5811
|
+
async function cloudPushCodeContext(config) {
|
|
5812
|
+
assertSecureEndpoint(config.endpoint);
|
|
5813
|
+
if (!existsSync10(CODE_CONTEXT_DIR)) return 0;
|
|
5814
|
+
const files = readdirSync2(CODE_CONTEXT_DIR).filter(
|
|
5815
|
+
(f) => f.endsWith(".json") && !f.endsWith(".vectors.json") && !f.startsWith(".")
|
|
5816
|
+
);
|
|
5817
|
+
if (files.length === 0) return 0;
|
|
5818
|
+
const metaPath = path10.join(CODE_CONTEXT_DIR, ".sync-meta.json");
|
|
5819
|
+
let syncMeta = {};
|
|
5820
|
+
if (existsSync10(metaPath)) {
|
|
5821
|
+
try {
|
|
5822
|
+
syncMeta = JSON.parse(readFileSync7(metaPath, "utf-8"));
|
|
5823
|
+
} catch {
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5826
|
+
let pushed = 0;
|
|
5827
|
+
for (const file of files) {
|
|
5828
|
+
const filePath = path10.join(CODE_CONTEXT_DIR, file);
|
|
5829
|
+
try {
|
|
5830
|
+
const stat = statSync4(filePath);
|
|
5831
|
+
const lastPushed = syncMeta[file] ?? 0;
|
|
5832
|
+
if (stat.mtimeMs <= lastPushed) continue;
|
|
5833
|
+
const content = readFileSync7(filePath, "utf-8");
|
|
5834
|
+
const header = content.substring(0, 300);
|
|
5835
|
+
if (header.includes("/tmp") || header.includes("/var/folders") || header.includes(".worktrees/")) continue;
|
|
5836
|
+
const compressed = compress(Buffer.from(content, "utf8"));
|
|
5837
|
+
const encrypted = encryptSyncBlob(compressed);
|
|
5838
|
+
const resp = await fetchWithRetry(`${config.endpoint}/sync/push-code-context`, {
|
|
5839
|
+
method: "POST",
|
|
5840
|
+
headers: {
|
|
5841
|
+
Authorization: `Bearer ${config.apiKey}`,
|
|
5842
|
+
"Content-Type": "application/json",
|
|
5843
|
+
"X-Device-Id": loadDeviceId()
|
|
5844
|
+
},
|
|
5845
|
+
body: JSON.stringify({ key: file, blob: encrypted })
|
|
5846
|
+
});
|
|
5847
|
+
if (resp.ok) {
|
|
5848
|
+
syncMeta[file] = stat.mtimeMs;
|
|
5849
|
+
pushed++;
|
|
5850
|
+
}
|
|
5851
|
+
} catch {
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5854
|
+
if (pushed > 0) {
|
|
5855
|
+
try {
|
|
5856
|
+
writeFileSync5(metaPath, JSON.stringify(syncMeta));
|
|
5857
|
+
} catch {
|
|
5858
|
+
}
|
|
5859
|
+
}
|
|
5860
|
+
return pushed;
|
|
5861
|
+
}
|
|
5862
|
+
async function cloudPullCodeContext(config) {
|
|
5863
|
+
assertSecureEndpoint(config.endpoint);
|
|
5864
|
+
try {
|
|
5865
|
+
const resp = await fetchWithRetry(`${config.endpoint}/sync/pull-code-context`, {
|
|
5866
|
+
method: "GET",
|
|
5867
|
+
headers: {
|
|
5868
|
+
Authorization: `Bearer ${config.apiKey}`,
|
|
5869
|
+
"X-Device-Id": loadDeviceId()
|
|
5870
|
+
}
|
|
5871
|
+
});
|
|
5872
|
+
if (!resp.ok) return 0;
|
|
5873
|
+
const data = await resp.json();
|
|
5874
|
+
if (!data.indexes || data.indexes.length === 0) return 0;
|
|
5875
|
+
mkdirSync5(CODE_CONTEXT_DIR, { recursive: true });
|
|
5876
|
+
let pulled = 0;
|
|
5877
|
+
for (const { key, blob } of data.indexes) {
|
|
5878
|
+
try {
|
|
5879
|
+
if (key.endsWith(".vectors.json")) continue;
|
|
5880
|
+
const localPath = path10.join(CODE_CONTEXT_DIR, key);
|
|
5881
|
+
const compressed = decryptSyncBlob(blob);
|
|
5882
|
+
const content = decompress(compressed).toString("utf8");
|
|
5883
|
+
if (!existsSync10(localPath)) {
|
|
5884
|
+
writeFileSync5(localPath, content, "utf-8");
|
|
5885
|
+
pulled++;
|
|
5886
|
+
} else {
|
|
5887
|
+
const localContent = readFileSync7(localPath, "utf-8");
|
|
5888
|
+
if (localContent.length !== content.length) {
|
|
5889
|
+
writeFileSync5(localPath, content, "utf-8");
|
|
5890
|
+
pulled++;
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
} catch {
|
|
5894
|
+
}
|
|
5895
|
+
}
|
|
5896
|
+
return pulled;
|
|
5897
|
+
} catch (err) {
|
|
5898
|
+
process.stderr.write(`[cloud-sync] Code context pull failed: ${err instanceof Error ? err.message : String(err)}
|
|
5899
|
+
`);
|
|
5900
|
+
return 0;
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5903
|
+
var LOCALHOST_PATTERNS, FETCH_TIMEOUT_MS, PUSH_BATCH_SIZE, ROSTER_LOCK_PATH, LOCK_STALE_MS, _pgPromise, _pgFailed, CLOUD_REUPLOAD_REQUIRED_MESSAGE, ROSTER_DELETIONS_PATH, CODE_CONTEXT_DIR;
|
|
5771
5904
|
var init_cloud_sync = __esm({
|
|
5772
5905
|
"src/lib/cloud-sync.ts"() {
|
|
5773
5906
|
"use strict";
|
|
@@ -5788,6 +5921,7 @@ var init_cloud_sync = __esm({
|
|
|
5788
5921
|
_pgFailed = false;
|
|
5789
5922
|
CLOUD_REUPLOAD_REQUIRED_MESSAGE = "Cloud sync is blocked because this device rotated its memory encryption key. Run `exe-os cloud reupload` first to re-upload the cloud backup with the new key.";
|
|
5790
5923
|
ROSTER_DELETIONS_PATH = path10.join(EXE_AI_DIR, "roster-deletions.json");
|
|
5924
|
+
CODE_CONTEXT_DIR = path10.join(EXE_AI_DIR, "code-context");
|
|
5791
5925
|
}
|
|
5792
5926
|
});
|
|
5793
5927
|
|
|
@@ -6538,6 +6672,24 @@ var init_platform_procedures = __esm({
|
|
|
6538
6672
|
priority: "p0",
|
|
6539
6673
|
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."
|
|
6540
6674
|
},
|
|
6675
|
+
{
|
|
6676
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
6677
|
+
domain: "support",
|
|
6678
|
+
priority: "p1",
|
|
6679
|
+
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."
|
|
6680
|
+
},
|
|
6681
|
+
{
|
|
6682
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
6683
|
+
domain: "support",
|
|
6684
|
+
priority: "p0",
|
|
6685
|
+
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."
|
|
6686
|
+
},
|
|
6687
|
+
{
|
|
6688
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
6689
|
+
domain: "support",
|
|
6690
|
+
priority: "p1",
|
|
6691
|
+
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."
|
|
6692
|
+
},
|
|
6541
6693
|
// --- Operations ---
|
|
6542
6694
|
{
|
|
6543
6695
|
title: "Managers must supervise deployed workers",
|
|
@@ -7844,6 +7996,7 @@ import { fileURLToPath } from "url";
|
|
|
7844
7996
|
function isMainModule(importMetaUrl) {
|
|
7845
7997
|
if (process.argv[1] == null) return false;
|
|
7846
7998
|
if (process.argv[1].includes("mcp/server")) return false;
|
|
7999
|
+
if (process.argv[1].includes("exe-daemon")) return false;
|
|
7847
8000
|
try {
|
|
7848
8001
|
const scriptPath = realpathSync(process.argv[1]);
|
|
7849
8002
|
const modulePath = realpathSync(fileURLToPath(importMetaUrl));
|
package/dist/bin/exe-dispatch.js
CHANGED
|
@@ -712,7 +712,7 @@ function readQueue() {
|
|
|
712
712
|
function writeQueue(queue) {
|
|
713
713
|
ensureDir();
|
|
714
714
|
const tmp = `${QUEUE_PATH}.tmp`;
|
|
715
|
-
writeFileSync3(tmp, JSON.stringify(queue, null, 2));
|
|
715
|
+
writeFileSync3(tmp, JSON.stringify(queue, null, 2), { mode: 384 });
|
|
716
716
|
renameSync2(tmp, QUEUE_PATH);
|
|
717
717
|
}
|
|
718
718
|
function queueIntercom(targetSession, reason) {
|
|
@@ -2291,6 +2291,7 @@ __export(database_exports, {
|
|
|
2291
2291
|
isInitialized: () => isInitialized,
|
|
2292
2292
|
setExternalClient: () => setExternalClient
|
|
2293
2293
|
});
|
|
2294
|
+
import { chmodSync as chmodSync2 } from "fs";
|
|
2294
2295
|
import { createClient } from "@libsql/client";
|
|
2295
2296
|
async function initDatabase(config) {
|
|
2296
2297
|
if (_walCheckpointTimer) {
|
|
@@ -2332,6 +2333,16 @@ async function initDatabase(config) {
|
|
|
2332
2333
|
if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
|
|
2333
2334
|
_adapterClient = await createPrismaDbAdapter(_resilientClient);
|
|
2334
2335
|
}
|
|
2336
|
+
try {
|
|
2337
|
+
chmodSync2(config.dbPath, 384);
|
|
2338
|
+
for (const suffix of ["-wal", "-shm"]) {
|
|
2339
|
+
try {
|
|
2340
|
+
chmodSync2(config.dbPath + suffix, 384);
|
|
2341
|
+
} catch {
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
} catch {
|
|
2345
|
+
}
|
|
2335
2346
|
}
|
|
2336
2347
|
function isInitialized() {
|
|
2337
2348
|
return _adapterClient !== null || _client !== null;
|
|
@@ -7920,6 +7931,24 @@ var init_platform_procedures = __esm({
|
|
|
7920
7931
|
priority: "p0",
|
|
7921
7932
|
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."
|
|
7922
7933
|
},
|
|
7934
|
+
{
|
|
7935
|
+
title: "Bug report status check \u2014 surface available fixes on boot",
|
|
7936
|
+
domain: "support",
|
|
7937
|
+
priority: "p1",
|
|
7938
|
+
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."
|
|
7939
|
+
},
|
|
7940
|
+
{
|
|
7941
|
+
title: "Feature request triage \u2014 upstream feature vs local customization",
|
|
7942
|
+
domain: "support",
|
|
7943
|
+
priority: "p0",
|
|
7944
|
+
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."
|
|
7945
|
+
},
|
|
7946
|
+
{
|
|
7947
|
+
title: "Feature request status check \u2014 surface shipped features on boot",
|
|
7948
|
+
domain: "support",
|
|
7949
|
+
priority: "p1",
|
|
7950
|
+
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."
|
|
7951
|
+
},
|
|
7923
7952
|
// --- Operations ---
|
|
7924
7953
|
{
|
|
7925
7954
|
title: "Managers must supervise deployed workers",
|