@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.
Files changed (103) hide show
  1. package/deploy/compose/docker-compose.yml +3 -3
  2. package/dist/bin/age-ontology-load.js +8 -2
  3. package/dist/bin/agentic-ontology-backfill.js +29 -0
  4. package/dist/bin/agentic-reflection-backfill.js +29 -0
  5. package/dist/bin/agentic-semantic-label.js +29 -0
  6. package/dist/bin/backfill-conversations.js +30 -0
  7. package/dist/bin/backfill-responses.js +30 -0
  8. package/dist/bin/backfill-vectors.js +30 -0
  9. package/dist/bin/bulk-sync-postgres.js +47 -1
  10. package/dist/bin/cc-doctor.js +3 -2
  11. package/dist/bin/cleanup-stale-review-tasks.js +30 -0
  12. package/dist/bin/cli.js +357 -19
  13. package/dist/bin/exe-agent.js +19 -0
  14. package/dist/bin/exe-assign.js +30 -0
  15. package/dist/bin/exe-boot.js +157 -4
  16. package/dist/bin/exe-call.js +20 -0
  17. package/dist/bin/exe-cloud.js +156 -3
  18. package/dist/bin/exe-dispatch.js +30 -1
  19. package/dist/bin/exe-doctor.js +30 -0
  20. package/dist/bin/exe-export-behaviors.js +29 -0
  21. package/dist/bin/exe-forget.js +30 -0
  22. package/dist/bin/exe-gateway.js +150 -35
  23. package/dist/bin/exe-healthcheck.js +2 -1
  24. package/dist/bin/exe-heartbeat.js +30 -0
  25. package/dist/bin/exe-kill.js +29 -0
  26. package/dist/bin/exe-launch-agent.js +29 -0
  27. package/dist/bin/exe-new-employee.js +37 -4
  28. package/dist/bin/exe-pending-messages.js +29 -0
  29. package/dist/bin/exe-pending-notifications.js +30 -0
  30. package/dist/bin/exe-pending-reviews.js +30 -0
  31. package/dist/bin/exe-rename.js +30 -0
  32. package/dist/bin/exe-review.js +30 -0
  33. package/dist/bin/exe-search.js +30 -0
  34. package/dist/bin/exe-session-cleanup.js +30 -1
  35. package/dist/bin/exe-settings.js +3 -0
  36. package/dist/bin/exe-start-codex.js +31 -2
  37. package/dist/bin/exe-start-opencode.js +31 -2
  38. package/dist/bin/exe-status.js +30 -0
  39. package/dist/bin/exe-team.js +30 -0
  40. package/dist/bin/git-sweep.js +30 -1
  41. package/dist/bin/graph-backfill.js +29 -0
  42. package/dist/bin/graph-export.js +29 -0
  43. package/dist/bin/graph-layer-benchmark.js +9 -1
  44. package/dist/bin/install.js +9 -0
  45. package/dist/bin/intercom-check.js +31 -1
  46. package/dist/bin/list-providers.js +1 -0
  47. package/dist/bin/postgres-agentic-reflection-backfill.js +7 -1
  48. package/dist/bin/postgres-agentic-semantic-backfill.js +7 -1
  49. package/dist/bin/registry-proxy.js +1 -0
  50. package/dist/bin/scan-tasks.js +31 -1
  51. package/dist/bin/setup.js +165 -9
  52. package/dist/bin/shard-migrate.js +29 -0
  53. package/dist/bin/stack-update.js +24 -7
  54. package/dist/bin/update.js +5 -0
  55. package/dist/gateway/index.js +30 -1
  56. package/dist/hooks/bug-report-worker.js +30 -1
  57. package/dist/hooks/codex-stop-task-finalizer.js +30 -1
  58. package/dist/hooks/commit-complete.js +30 -1
  59. package/dist/hooks/error-recall.js +29 -0
  60. package/dist/hooks/ingest.js +29 -0
  61. package/dist/hooks/instructions-loaded.js +29 -0
  62. package/dist/hooks/notification.js +29 -0
  63. package/dist/hooks/post-compact.js +29 -0
  64. package/dist/hooks/post-tool-combined.js +29 -0
  65. package/dist/hooks/pre-compact.js +30 -1
  66. package/dist/hooks/pre-tool-use.js +29 -0
  67. package/dist/hooks/prompt-submit.js +30 -1
  68. package/dist/hooks/session-end.js +30 -1
  69. package/dist/hooks/session-start.js +29 -0
  70. package/dist/hooks/stop.js +29 -0
  71. package/dist/hooks/subagent-stop.js +29 -0
  72. package/dist/hooks/summary-worker.js +155 -3
  73. package/dist/index.js +30 -1
  74. package/dist/lib/cloud-sync.js +136 -2
  75. package/dist/lib/consolidation.js +1 -0
  76. package/dist/lib/database.js +11 -0
  77. package/dist/lib/db.js +11 -0
  78. package/dist/lib/device-registry.js +11 -0
  79. package/dist/lib/employee-templates.js +19 -0
  80. package/dist/lib/exe-daemon.js +1455 -208
  81. package/dist/lib/hybrid-search.js +29 -0
  82. package/dist/lib/identity-templates.js +6 -2
  83. package/dist/lib/identity.js +1 -0
  84. package/dist/lib/messaging.js +2 -1
  85. package/dist/lib/reminders.js +1 -0
  86. package/dist/lib/schedules.js +29 -0
  87. package/dist/lib/skill-learning.js +1 -0
  88. package/dist/lib/store.js +29 -0
  89. package/dist/lib/tasks.js +2 -1
  90. package/dist/lib/tmux-routing.js +2 -1
  91. package/dist/lib/token-spend.js +1 -0
  92. package/dist/mcp/server.js +1278 -165
  93. package/dist/mcp/tools/complete-reminder.js +1 -0
  94. package/dist/mcp/tools/create-reminder.js +1 -0
  95. package/dist/mcp/tools/create-task.js +8 -3
  96. package/dist/mcp/tools/deactivate-behavior.js +1 -0
  97. package/dist/mcp/tools/list-reminders.js +1 -0
  98. package/dist/mcp/tools/list-tasks.js +1 -0
  99. package/dist/mcp/tools/send-message.js +2 -1
  100. package/dist/mcp/tools/update-task.js +2 -1
  101. package/dist/runtime/index.js +30 -1
  102. package/dist/tui/App.js +30 -1
  103. package/package.json +2 -2
@@ -1741,6 +1741,7 @@ __export(database_exports, {
1741
1741
  isInitialized: () => isInitialized,
1742
1742
  setExternalClient: () => setExternalClient
1743
1743
  });
1744
+ import { chmodSync as chmodSync2 } from "fs";
1744
1745
  import { createClient } from "@libsql/client";
1745
1746
  async function initDatabase(config) {
1746
1747
  if (_walCheckpointTimer) {
@@ -1782,6 +1783,16 @@ async function initDatabase(config) {
1782
1783
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1783
1784
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1784
1785
  }
1786
+ try {
1787
+ chmodSync2(config.dbPath, 384);
1788
+ for (const suffix of ["-wal", "-shm"]) {
1789
+ try {
1790
+ chmodSync2(config.dbPath + suffix, 384);
1791
+ } catch {
1792
+ }
1793
+ }
1794
+ } catch {
1795
+ }
1785
1796
  }
1786
1797
  function isInitialized() {
1787
1798
  return _adapterClient !== null || _client !== null;
@@ -4193,6 +4204,24 @@ var init_platform_procedures = __esm({
4193
4204
  priority: "p0",
4194
4205
  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."
4195
4206
  },
4207
+ {
4208
+ title: "Bug report status check \u2014 surface available fixes on boot",
4209
+ domain: "support",
4210
+ priority: "p1",
4211
+ 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."
4212
+ },
4213
+ {
4214
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4215
+ domain: "support",
4216
+ priority: "p0",
4217
+ 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."
4218
+ },
4219
+ {
4220
+ title: "Feature request status check \u2014 surface shipped features on boot",
4221
+ domain: "support",
4222
+ priority: "p1",
4223
+ 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."
4224
+ },
4196
4225
  // --- Operations ---
4197
4226
  {
4198
4227
  title: "Managers must supervise deployed workers",
@@ -5989,6 +6018,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
5989
6018
  function isMainModule(importMetaUrl) {
5990
6019
  if (process.argv[1] == null) return false;
5991
6020
  if (process.argv[1].includes("mcp/server")) return false;
6021
+ if (process.argv[1].includes("exe-daemon")) return false;
5992
6022
  try {
5993
6023
  const scriptPath = realpathSync(process.argv[1]);
5994
6024
  const modulePath = realpathSync(fileURLToPath2(importMetaUrl));
@@ -1702,6 +1702,7 @@ __export(database_exports, {
1702
1702
  isInitialized: () => isInitialized,
1703
1703
  setExternalClient: () => setExternalClient
1704
1704
  });
1705
+ import { chmodSync as chmodSync2 } from "fs";
1705
1706
  import { createClient } from "@libsql/client";
1706
1707
  async function initDatabase(config) {
1707
1708
  if (_walCheckpointTimer) {
@@ -1743,6 +1744,16 @@ async function initDatabase(config) {
1743
1744
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1744
1745
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1745
1746
  }
1747
+ try {
1748
+ chmodSync2(config.dbPath, 384);
1749
+ for (const suffix of ["-wal", "-shm"]) {
1750
+ try {
1751
+ chmodSync2(config.dbPath + suffix, 384);
1752
+ } catch {
1753
+ }
1754
+ }
1755
+ } catch {
1756
+ }
1746
1757
  }
1747
1758
  function isInitialized() {
1748
1759
  return _adapterClient !== null || _client !== null;
@@ -4154,6 +4165,24 @@ var init_platform_procedures = __esm({
4154
4165
  priority: "p0",
4155
4166
  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."
4156
4167
  },
4168
+ {
4169
+ title: "Bug report status check \u2014 surface available fixes on boot",
4170
+ domain: "support",
4171
+ priority: "p1",
4172
+ 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."
4173
+ },
4174
+ {
4175
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4176
+ domain: "support",
4177
+ priority: "p0",
4178
+ 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."
4179
+ },
4180
+ {
4181
+ title: "Feature request status check \u2014 surface shipped features on boot",
4182
+ domain: "support",
4183
+ priority: "p1",
4184
+ 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."
4185
+ },
4157
4186
  // --- Operations ---
4158
4187
  {
4159
4188
  title: "Managers must supervise deployed workers",
@@ -1800,6 +1800,7 @@ __export(database_exports, {
1800
1800
  isInitialized: () => isInitialized,
1801
1801
  setExternalClient: () => setExternalClient
1802
1802
  });
1803
+ import { chmodSync as chmodSync2 } from "fs";
1803
1804
  import { createClient } from "@libsql/client";
1804
1805
  async function initDatabase(config) {
1805
1806
  if (_walCheckpointTimer) {
@@ -1841,6 +1842,16 @@ async function initDatabase(config) {
1841
1842
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1842
1843
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1843
1844
  }
1845
+ try {
1846
+ chmodSync2(config.dbPath, 384);
1847
+ for (const suffix of ["-wal", "-shm"]) {
1848
+ try {
1849
+ chmodSync2(config.dbPath + suffix, 384);
1850
+ } catch {
1851
+ }
1852
+ }
1853
+ } catch {
1854
+ }
1844
1855
  }
1845
1856
  function isInitialized() {
1846
1857
  return _adapterClient !== null || _client !== null;
@@ -4252,6 +4263,24 @@ var init_platform_procedures = __esm({
4252
4263
  priority: "p0",
4253
4264
  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."
4254
4265
  },
4266
+ {
4267
+ title: "Bug report status check \u2014 surface available fixes on boot",
4268
+ domain: "support",
4269
+ priority: "p1",
4270
+ 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."
4271
+ },
4272
+ {
4273
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4274
+ domain: "support",
4275
+ priority: "p0",
4276
+ 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."
4277
+ },
4278
+ {
4279
+ title: "Feature request status check \u2014 surface shipped features on boot",
4280
+ domain: "support",
4281
+ priority: "p1",
4282
+ 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."
4283
+ },
4255
4284
  // --- Operations ---
4256
4285
  {
4257
4286
  title: "Managers must supervise deployed workers",
@@ -450,6 +450,7 @@ var init_memory = __esm({
450
450
  });
451
451
 
452
452
  // src/lib/database.ts
453
+ import { chmodSync as chmodSync3 } from "fs";
453
454
  import { createClient } from "@libsql/client";
454
455
  function getClient() {
455
456
  if (!_adapterClient) {
@@ -584,12 +585,14 @@ On EVERY new conversation, before doing anything else:
584
585
  1. **Memory scan**: Run recall_my_memory with broad queries \u2014 "project", "client", "pipeline", "campaign", "deal", "decision", "blocker". Summarize what you find.
585
586
  2. **Task scan**: Run list_tasks to see what's open, in progress, blocked, or needs review across all employees.
586
587
  3. **Team check**: Run ask_team_memory for recent activity from CTO/CMO/engineers.
587
- 4. **Present the brief**: Give the founder a concise status report:
588
+ 4. **Bug fix check** (one-time, never repeat): Call list_my_bug_reports to see if AskExe has fixed any previously filed bugs. If any have status "fixed" with a fixed_version, tell the founder: "\u{1F527} N bug fix(es) available \u2014 run \`exe-os update\` to get version X.Y.Z." Skip silently if none or if the call fails.
589
+ 5. **Present the brief**: Give the founder a concise status report:
588
590
  - What's active and progressing
589
591
  - What's blocked and needs attention
590
592
  - What decisions are pending
593
+ - Available bug fixes (from step 4, if any)
591
594
  - What you recommend doing next
592
- 5. Then ask: "What's the priority?"
595
+ 6. Then ask: "What's the priority?"
593
596
 
594
597
  If this is your FIRST ever conversation (few or no prior memories):
595
598
  - Search more broadly: "product", "SEO", "meeting", "strategy", "revenue"
@@ -609,6 +612,8 @@ Never say "I have no memories" without first searching broadly. Your memory may
609
612
  - **get_identity** \u2014 read any agent's identity for coordination
610
613
  - **set_agent_config** \u2014 view or change which tool (Claude Code, Codex, OpenCode) and model each agent uses. Call with no args to show all agents' current settings. Call with agent_id + runtime + model to change.
611
614
  - **send_message** \u2014 direct intercom to employees
615
+ - **create_bug_report** \u2014 file a bug when you encounter an Exe OS platform issue
616
+ - **list_my_bug_reports** \u2014 check status of filed bugs (boot check: surface available fixes to founder)
612
617
  ${PLAN_MODE_COMPAT}
613
618
  ## Completion Workflow
614
619
 
@@ -1268,7 +1273,7 @@ var init_preferences = __esm({
1268
1273
  });
1269
1274
 
1270
1275
  // src/adapters/mcp-http-config.ts
1271
- import { chmodSync as chmodSync3, existsSync as existsSync11, mkdirSync as mkdirSync6, readFileSync as readFileSync9, writeFileSync as writeFileSync7 } from "fs";
1276
+ import { chmodSync as chmodSync4, existsSync as existsSync11, mkdirSync as mkdirSync6, readFileSync as readFileSync9, writeFileSync as writeFileSync7 } from "fs";
1272
1277
  import { randomBytes } from "crypto";
1273
1278
  import path11 from "path";
1274
1279
  import os7 from "os";
@@ -1293,7 +1298,7 @@ function readOrCreateDaemonToken(homeDir = os7.homedir()) {
1293
1298
  writeFileSync7(tokenPath, `${token}
1294
1299
  `, "utf-8");
1295
1300
  try {
1296
- chmodSync3(tokenPath, 384);
1301
+ chmodSync4(tokenPath, 384);
1297
1302
  } catch {
1298
1303
  }
1299
1304
  return token;
@@ -1650,6 +1655,15 @@ async function registerMcpServer(packageRoot, homeDir = os8.homedir()) {
1650
1655
  delete claudeJson.mcpServers[MCP_LEGACY_KEY];
1651
1656
  process.stderr.write("exe-os: migrated MCP server key exe-mem \u2192 exe-os\n");
1652
1657
  }
1658
+ if (claudeJson.projects) {
1659
+ for (const [projectPath, projectConfig] of Object.entries(claudeJson.projects)) {
1660
+ if (projectConfig.mcpServers?.[MCP_LEGACY_KEY]) {
1661
+ delete projectConfig.mcpServers[MCP_LEGACY_KEY];
1662
+ process.stderr.write(`exe-os: removed stale project-level exe-mem from ${projectPath}
1663
+ `);
1664
+ }
1665
+ }
1666
+ }
1653
1667
  const currentOs = claudeJson.mcpServers[MCP_PRIMARY_KEY];
1654
1668
  const osMatches = currentOs && JSON.stringify(currentOs) === JSON.stringify(newEntry);
1655
1669
  if (osMatches) {
@@ -2679,6 +2693,24 @@ var PLATFORM_PROCEDURES = [
2679
2693
  priority: "p0",
2680
2694
  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."
2681
2695
  },
2696
+ {
2697
+ title: "Bug report status check \u2014 surface available fixes on boot",
2698
+ domain: "support",
2699
+ priority: "p1",
2700
+ 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."
2701
+ },
2702
+ {
2703
+ title: "Feature request triage \u2014 upstream feature vs local customization",
2704
+ domain: "support",
2705
+ priority: "p0",
2706
+ 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."
2707
+ },
2708
+ {
2709
+ title: "Feature request status check \u2014 surface shipped features on boot",
2710
+ domain: "support",
2711
+ priority: "p1",
2712
+ 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."
2713
+ },
2682
2714
  // --- Operations ---
2683
2715
  {
2684
2716
  title: "Managers must supervise deployed workers",
@@ -3155,6 +3187,7 @@ import { fileURLToPath } from "url";
3155
3187
  function isMainModule(importMetaUrl) {
3156
3188
  if (process.argv[1] == null) return false;
3157
3189
  if (process.argv[1].includes("mcp/server")) return false;
3190
+ if (process.argv[1].includes("exe-daemon")) return false;
3158
3191
  try {
3159
3192
  const scriptPath = realpathSync(process.argv[1]);
3160
3193
  const modulePath = realpathSync(fileURLToPath(importMetaUrl));
@@ -1712,6 +1712,7 @@ __export(database_exports, {
1712
1712
  isInitialized: () => isInitialized,
1713
1713
  setExternalClient: () => setExternalClient
1714
1714
  });
1715
+ import { chmodSync as chmodSync2 } from "fs";
1715
1716
  import { createClient } from "@libsql/client";
1716
1717
  async function initDatabase(config) {
1717
1718
  if (_walCheckpointTimer) {
@@ -1753,6 +1754,16 @@ async function initDatabase(config) {
1753
1754
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1754
1755
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1755
1756
  }
1757
+ try {
1758
+ chmodSync2(config.dbPath, 384);
1759
+ for (const suffix of ["-wal", "-shm"]) {
1760
+ try {
1761
+ chmodSync2(config.dbPath + suffix, 384);
1762
+ } catch {
1763
+ }
1764
+ }
1765
+ } catch {
1766
+ }
1756
1767
  }
1757
1768
  function isInitialized() {
1758
1769
  return _adapterClient !== null || _client !== null;
@@ -4591,6 +4602,24 @@ var init_platform_procedures = __esm({
4591
4602
  priority: "p0",
4592
4603
  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."
4593
4604
  },
4605
+ {
4606
+ title: "Bug report status check \u2014 surface available fixes on boot",
4607
+ domain: "support",
4608
+ priority: "p1",
4609
+ 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."
4610
+ },
4611
+ {
4612
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4613
+ domain: "support",
4614
+ priority: "p0",
4615
+ 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."
4616
+ },
4617
+ {
4618
+ title: "Feature request status check \u2014 surface shipped features on boot",
4619
+ domain: "support",
4620
+ priority: "p1",
4621
+ 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."
4622
+ },
4594
4623
  // --- Operations ---
4595
4624
  {
4596
4625
  title: "Managers must supervise deployed workers",
@@ -1713,6 +1713,7 @@ __export(database_exports, {
1713
1713
  isInitialized: () => isInitialized,
1714
1714
  setExternalClient: () => setExternalClient
1715
1715
  });
1716
+ import { chmodSync as chmodSync2 } from "fs";
1716
1717
  import { createClient } from "@libsql/client";
1717
1718
  async function initDatabase(config) {
1718
1719
  if (_walCheckpointTimer) {
@@ -1754,6 +1755,16 @@ async function initDatabase(config) {
1754
1755
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1755
1756
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1756
1757
  }
1758
+ try {
1759
+ chmodSync2(config.dbPath, 384);
1760
+ for (const suffix of ["-wal", "-shm"]) {
1761
+ try {
1762
+ chmodSync2(config.dbPath + suffix, 384);
1763
+ } catch {
1764
+ }
1765
+ }
1766
+ } catch {
1767
+ }
1757
1768
  }
1758
1769
  function isInitialized() {
1759
1770
  return _adapterClient !== null || _client !== null;
@@ -4657,6 +4668,24 @@ var init_platform_procedures = __esm({
4657
4668
  priority: "p0",
4658
4669
  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."
4659
4670
  },
4671
+ {
4672
+ title: "Bug report status check \u2014 surface available fixes on boot",
4673
+ domain: "support",
4674
+ priority: "p1",
4675
+ 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."
4676
+ },
4677
+ {
4678
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4679
+ domain: "support",
4680
+ priority: "p0",
4681
+ 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."
4682
+ },
4683
+ {
4684
+ title: "Feature request status check \u2014 surface shipped features on boot",
4685
+ domain: "support",
4686
+ priority: "p1",
4687
+ 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."
4688
+ },
4660
4689
  // --- Operations ---
4661
4690
  {
4662
4691
  title: "Managers must supervise deployed workers",
@@ -5905,6 +5934,7 @@ import { fileURLToPath as fileURLToPath3 } from "url";
5905
5934
  function isMainModule(importMetaUrl) {
5906
5935
  if (process.argv[1] == null) return false;
5907
5936
  if (process.argv[1].includes("mcp/server")) return false;
5937
+ if (process.argv[1].includes("exe-daemon")) return false;
5908
5938
  try {
5909
5939
  const scriptPath = realpathSync(process.argv[1]);
5910
5940
  const modulePath = realpathSync(fileURLToPath3(importMetaUrl));
@@ -1713,6 +1713,7 @@ __export(database_exports, {
1713
1713
  isInitialized: () => isInitialized,
1714
1714
  setExternalClient: () => setExternalClient
1715
1715
  });
1716
+ import { chmodSync as chmodSync2 } from "fs";
1716
1717
  import { createClient } from "@libsql/client";
1717
1718
  async function initDatabase(config) {
1718
1719
  if (_walCheckpointTimer) {
@@ -1754,6 +1755,16 @@ async function initDatabase(config) {
1754
1755
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1755
1756
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1756
1757
  }
1758
+ try {
1759
+ chmodSync2(config.dbPath, 384);
1760
+ for (const suffix of ["-wal", "-shm"]) {
1761
+ try {
1762
+ chmodSync2(config.dbPath + suffix, 384);
1763
+ } catch {
1764
+ }
1765
+ }
1766
+ } catch {
1767
+ }
1757
1768
  }
1758
1769
  function isInitialized() {
1759
1770
  return _adapterClient !== null || _client !== null;
@@ -4696,6 +4707,24 @@ var init_platform_procedures = __esm({
4696
4707
  priority: "p0",
4697
4708
  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."
4698
4709
  },
4710
+ {
4711
+ title: "Bug report status check \u2014 surface available fixes on boot",
4712
+ domain: "support",
4713
+ priority: "p1",
4714
+ 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."
4715
+ },
4716
+ {
4717
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4718
+ domain: "support",
4719
+ priority: "p0",
4720
+ 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."
4721
+ },
4722
+ {
4723
+ title: "Feature request status check \u2014 surface shipped features on boot",
4724
+ domain: "support",
4725
+ priority: "p1",
4726
+ 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."
4727
+ },
4699
4728
  // --- Operations ---
4700
4729
  {
4701
4730
  title: "Managers must supervise deployed workers",
@@ -5941,6 +5970,7 @@ import { fileURLToPath } from "url";
5941
5970
  function isMainModule(importMetaUrl) {
5942
5971
  if (process.argv[1] == null) return false;
5943
5972
  if (process.argv[1].includes("mcp/server")) return false;
5973
+ if (process.argv[1].includes("exe-daemon")) return false;
5944
5974
  try {
5945
5975
  const scriptPath = realpathSync(process.argv[1]);
5946
5976
  const modulePath = realpathSync(fileURLToPath(importMetaUrl));
@@ -1557,6 +1557,7 @@ __export(database_exports, {
1557
1557
  isInitialized: () => isInitialized,
1558
1558
  setExternalClient: () => setExternalClient
1559
1559
  });
1560
+ import { chmodSync as chmodSync2 } from "fs";
1560
1561
  import { createClient } from "@libsql/client";
1561
1562
  async function initDatabase(config) {
1562
1563
  if (_walCheckpointTimer) {
@@ -1598,6 +1599,16 @@ async function initDatabase(config) {
1598
1599
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1599
1600
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1600
1601
  }
1602
+ try {
1603
+ chmodSync2(config.dbPath, 384);
1604
+ for (const suffix of ["-wal", "-shm"]) {
1605
+ try {
1606
+ chmodSync2(config.dbPath + suffix, 384);
1607
+ } catch {
1608
+ }
1609
+ }
1610
+ } catch {
1611
+ }
1601
1612
  }
1602
1613
  function isInitialized() {
1603
1614
  return _adapterClient !== null || _client !== null;
@@ -3037,6 +3048,24 @@ var init_platform_procedures = __esm({
3037
3048
  priority: "p0",
3038
3049
  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."
3039
3050
  },
3051
+ {
3052
+ title: "Bug report status check \u2014 surface available fixes on boot",
3053
+ domain: "support",
3054
+ priority: "p1",
3055
+ 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."
3056
+ },
3057
+ {
3058
+ title: "Feature request triage \u2014 upstream feature vs local customization",
3059
+ domain: "support",
3060
+ priority: "p0",
3061
+ 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."
3062
+ },
3063
+ {
3064
+ title: "Feature request status check \u2014 surface shipped features on boot",
3065
+ domain: "support",
3066
+ priority: "p1",
3067
+ 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."
3068
+ },
3040
3069
  // --- Operations ---
3041
3070
  {
3042
3071
  title: "Managers must supervise deployed workers",
@@ -5269,6 +5298,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
5269
5298
  function isMainModule(importMetaUrl) {
5270
5299
  if (process.argv[1] == null) return false;
5271
5300
  if (process.argv[1].includes("mcp/server")) return false;
5301
+ if (process.argv[1].includes("exe-daemon")) return false;
5272
5302
  try {
5273
5303
  const scriptPath = realpathSync(process.argv[1]);
5274
5304
  const modulePath = realpathSync(fileURLToPath2(importMetaUrl));
@@ -1716,6 +1716,7 @@ __export(database_exports, {
1716
1716
  isInitialized: () => isInitialized,
1717
1717
  setExternalClient: () => setExternalClient
1718
1718
  });
1719
+ import { chmodSync as chmodSync2 } from "fs";
1719
1720
  import { createClient } from "@libsql/client";
1720
1721
  async function initDatabase(config) {
1721
1722
  if (_walCheckpointTimer) {
@@ -1757,6 +1758,16 @@ async function initDatabase(config) {
1757
1758
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1758
1759
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1759
1760
  }
1761
+ try {
1762
+ chmodSync2(config.dbPath, 384);
1763
+ for (const suffix of ["-wal", "-shm"]) {
1764
+ try {
1765
+ chmodSync2(config.dbPath + suffix, 384);
1766
+ } catch {
1767
+ }
1768
+ }
1769
+ } catch {
1770
+ }
1760
1771
  }
1761
1772
  function isInitialized() {
1762
1773
  return _adapterClient !== null || _client !== null;
@@ -4168,6 +4179,24 @@ var init_platform_procedures = __esm({
4168
4179
  priority: "p0",
4169
4180
  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."
4170
4181
  },
4182
+ {
4183
+ title: "Bug report status check \u2014 surface available fixes on boot",
4184
+ domain: "support",
4185
+ priority: "p1",
4186
+ 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."
4187
+ },
4188
+ {
4189
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4190
+ domain: "support",
4191
+ priority: "p0",
4192
+ 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."
4193
+ },
4194
+ {
4195
+ title: "Feature request status check \u2014 surface shipped features on boot",
4196
+ domain: "support",
4197
+ priority: "p1",
4198
+ 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."
4199
+ },
4171
4200
  // --- Operations ---
4172
4201
  {
4173
4202
  title: "Managers must supervise deployed workers",
@@ -5484,6 +5513,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
5484
5513
  function isMainModule(importMetaUrl) {
5485
5514
  if (process.argv[1] == null) return false;
5486
5515
  if (process.argv[1].includes("mcp/server")) return false;
5516
+ if (process.argv[1].includes("exe-daemon")) return false;
5487
5517
  try {
5488
5518
  const scriptPath = realpathSync(process.argv[1]);
5489
5519
  const modulePath = realpathSync(fileURLToPath2(importMetaUrl));
@@ -1701,6 +1701,7 @@ __export(database_exports, {
1701
1701
  isInitialized: () => isInitialized,
1702
1702
  setExternalClient: () => setExternalClient
1703
1703
  });
1704
+ import { chmodSync as chmodSync2 } from "fs";
1704
1705
  import { createClient } from "@libsql/client";
1705
1706
  async function initDatabase(config) {
1706
1707
  if (_walCheckpointTimer) {
@@ -1742,6 +1743,16 @@ async function initDatabase(config) {
1742
1743
  if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") {
1743
1744
  _adapterClient = await createPrismaDbAdapter(_resilientClient);
1744
1745
  }
1746
+ try {
1747
+ chmodSync2(config.dbPath, 384);
1748
+ for (const suffix of ["-wal", "-shm"]) {
1749
+ try {
1750
+ chmodSync2(config.dbPath + suffix, 384);
1751
+ } catch {
1752
+ }
1753
+ }
1754
+ } catch {
1755
+ }
1745
1756
  }
1746
1757
  function isInitialized() {
1747
1758
  return _adapterClient !== null || _client !== null;
@@ -4153,6 +4164,24 @@ var init_platform_procedures = __esm({
4153
4164
  priority: "p0",
4154
4165
  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."
4155
4166
  },
4167
+ {
4168
+ title: "Bug report status check \u2014 surface available fixes on boot",
4169
+ domain: "support",
4170
+ priority: "p1",
4171
+ 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."
4172
+ },
4173
+ {
4174
+ title: "Feature request triage \u2014 upstream feature vs local customization",
4175
+ domain: "support",
4176
+ priority: "p0",
4177
+ 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."
4178
+ },
4179
+ {
4180
+ title: "Feature request status check \u2014 surface shipped features on boot",
4181
+ domain: "support",
4182
+ priority: "p1",
4183
+ 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."
4184
+ },
4156
4185
  // --- Operations ---
4157
4186
  {
4158
4187
  title: "Managers must supervise deployed workers",
@@ -7171,6 +7200,7 @@ import { fileURLToPath as fileURLToPath2 } from "url";
7171
7200
  function isMainModule(importMetaUrl) {
7172
7201
  if (process.argv[1] == null) return false;
7173
7202
  if (process.argv[1].includes("mcp/server")) return false;
7203
+ if (process.argv[1].includes("exe-daemon")) return false;
7174
7204
  try {
7175
7205
  const scriptPath = realpathSync(process.argv[1]);
7176
7206
  const modulePath = realpathSync(fileURLToPath2(importMetaUrl));