@askexenow/exe-os 0.9.113 → 0.9.114

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 (79) hide show
  1. package/dist/bin/agentic-ontology-backfill.js +24 -12
  2. package/dist/bin/agentic-reflection-backfill.js +24 -12
  3. package/dist/bin/agentic-semantic-label.js +24 -12
  4. package/dist/bin/backfill-conversations.js +24 -12
  5. package/dist/bin/backfill-responses.js +24 -12
  6. package/dist/bin/backfill-vectors.js +24 -12
  7. package/dist/bin/bulk-sync-postgres.js +24 -12
  8. package/dist/bin/cleanup-stale-review-tasks.js +24 -12
  9. package/dist/bin/cli.js +96 -22
  10. package/dist/bin/exe-agent.js +27 -0
  11. package/dist/bin/exe-assign.js +24 -12
  12. package/dist/bin/exe-boot.js +44 -15
  13. package/dist/bin/exe-call.js +8 -0
  14. package/dist/bin/exe-cloud.js +34 -11
  15. package/dist/bin/exe-dispatch.js +34 -16
  16. package/dist/bin/exe-doctor.js +24 -12
  17. package/dist/bin/exe-export-behaviors.js +24 -12
  18. package/dist/bin/exe-forget.js +24 -12
  19. package/dist/bin/exe-gateway.js +33 -15
  20. package/dist/bin/exe-heartbeat.js +24 -12
  21. package/dist/bin/exe-kill.js +24 -12
  22. package/dist/bin/exe-launch-agent.js +103 -17
  23. package/dist/bin/exe-new-employee.js +9 -1
  24. package/dist/bin/exe-pending-messages.js +24 -12
  25. package/dist/bin/exe-pending-notifications.js +24 -12
  26. package/dist/bin/exe-pending-reviews.js +24 -12
  27. package/dist/bin/exe-rename.js +24 -12
  28. package/dist/bin/exe-review.js +24 -12
  29. package/dist/bin/exe-search.js +24 -12
  30. package/dist/bin/exe-session-cleanup.js +33 -15
  31. package/dist/bin/exe-start-codex.js +33 -13
  32. package/dist/bin/exe-start-opencode.js +33 -13
  33. package/dist/bin/exe-status.js +24 -12
  34. package/dist/bin/exe-team.js +24 -12
  35. package/dist/bin/git-sweep.js +34 -16
  36. package/dist/bin/graph-backfill.js +24 -12
  37. package/dist/bin/graph-export.js +24 -12
  38. package/dist/bin/install.js +9 -1
  39. package/dist/bin/intercom-check.js +33 -15
  40. package/dist/bin/scan-tasks.js +34 -16
  41. package/dist/bin/setup.js +60 -11
  42. package/dist/bin/shard-migrate.js +24 -12
  43. package/dist/gateway/index.js +33 -15
  44. package/dist/hooks/bug-report-worker.js +33 -15
  45. package/dist/hooks/codex-stop-task-finalizer.js +32 -12
  46. package/dist/hooks/commit-complete.js +34 -16
  47. package/dist/hooks/error-recall.js +24 -12
  48. package/dist/hooks/ingest.js +33 -15
  49. package/dist/hooks/instructions-loaded.js +24 -12
  50. package/dist/hooks/notification.js +24 -12
  51. package/dist/hooks/post-compact.js +24 -12
  52. package/dist/hooks/post-tool-combined.js +24 -12
  53. package/dist/hooks/pre-compact.js +34 -16
  54. package/dist/hooks/pre-tool-use.js +58 -11
  55. package/dist/hooks/prompt-submit.js +33 -15
  56. package/dist/hooks/session-end.js +34 -16
  57. package/dist/hooks/session-start.js +32 -12
  58. package/dist/hooks/stop.js +24 -12
  59. package/dist/hooks/subagent-stop.js +24 -12
  60. package/dist/hooks/summary-worker.js +34 -11
  61. package/dist/index.js +60 -15
  62. package/dist/lib/agent-config.js +8 -0
  63. package/dist/lib/cloud-sync.js +34 -11
  64. package/dist/lib/consolidation.js +9 -1
  65. package/dist/lib/employees.js +8 -0
  66. package/dist/lib/exe-daemon.js +174 -17
  67. package/dist/lib/hybrid-search.js +24 -12
  68. package/dist/lib/keychain.js +24 -12
  69. package/dist/lib/schedules.js +24 -12
  70. package/dist/lib/skill-learning.js +8 -0
  71. package/dist/lib/store.js +24 -12
  72. package/dist/lib/tasks.js +10 -4
  73. package/dist/lib/tmux-routing.js +10 -4
  74. package/dist/mcp/server.js +44 -15
  75. package/dist/mcp/tools/create-task.js +10 -4
  76. package/dist/mcp/tools/update-task.js +10 -4
  77. package/dist/runtime/index.js +60 -15
  78. package/dist/tui/App.js +61 -16
  79. package/package.json +1 -1
package/dist/tui/App.js CHANGED
@@ -718,6 +718,7 @@ __export(agent_config_exports, {
718
718
  clearAgentRuntime: () => clearAgentRuntime,
719
719
  getAgentRuntime: () => getAgentRuntime,
720
720
  loadAgentConfig: () => loadAgentConfig,
721
+ normalizeCcModelName: () => normalizeCcModelName,
721
722
  saveAgentConfig: () => saveAgentConfig,
722
723
  setAgentMcps: () => setAgentMcps,
723
724
  setAgentRuntime: () => setAgentRuntime
@@ -746,6 +747,13 @@ function getAgentRuntime(agentId) {
746
747
  if (orgDefault) return orgDefault;
747
748
  return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
748
749
  }
750
+ function normalizeCcModelName(model) {
751
+ let ccModel = model.replace(/(\d+)\.(\d+)/g, "$1-$2");
752
+ if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
753
+ ccModel += "[1m]";
754
+ }
755
+ return ccModel;
756
+ }
749
757
  function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
750
758
  const knownModels = KNOWN_RUNTIMES[runtime];
751
759
  if (!knownModels) {
@@ -7781,10 +7789,8 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
7781
7789
  }
7782
7790
  if (!useExeAgent && !useCodex && !useOpencode && !useBinSymlink) {
7783
7791
  if (agentRtConfig.runtime === "claude" && agentRtConfig.model) {
7784
- let ccModel = agentRtConfig.model.replace(/(\d+)\.(\d+)/g, "$1-$2");
7785
- if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
7786
- ccModel += "[1m]";
7787
- }
7792
+ const { normalizeCcModelName: normalizeCcModelName2 } = (init_agent_config(), __toCommonJS(agent_config_exports));
7793
+ const ccModel = normalizeCcModelName2(agentRtConfig.model);
7788
7794
  envPrefix = `${envPrefix} ANTHROPIC_MODEL=${ccModel}`;
7789
7795
  }
7790
7796
  }
@@ -10605,6 +10611,33 @@ var init_dangerous_patterns = __esm({
10605
10611
  regex: /\bkill\s+-9\b/,
10606
10612
  severity: "warning",
10607
10613
  reason: "Force kill signal"
10614
+ },
10615
+ // MCP bypass — agents must use MCP tools, never access the DB directly.
10616
+ // These patterns catch attempts to work around a disconnected MCP server.
10617
+ {
10618
+ regex: /\bsqlite3\b.*\bmemories\.db\b/,
10619
+ severity: "critical",
10620
+ reason: "Direct SQLite access bypasses MCP contract boundary \u2014 use MCP tools"
10621
+ },
10622
+ {
10623
+ regex: /\bsqlite3\b.*\.exe-os\b/,
10624
+ severity: "critical",
10625
+ reason: "Direct SQLite access to exe-os database \u2014 use MCP tools"
10626
+ },
10627
+ {
10628
+ regex: /\bnode\s+-e\b.*\b(better-sqlite3|libsql|sqlite3)\b/,
10629
+ severity: "critical",
10630
+ reason: "Inline Node.js script accessing SQLite directly \u2014 use MCP tools"
10631
+ },
10632
+ {
10633
+ regex: /\brequire\s*\(\s*['"].*memories\.db['"]\s*\)/,
10634
+ severity: "critical",
10635
+ reason: "Direct require of memories database \u2014 use MCP tools"
10636
+ },
10637
+ {
10638
+ regex: /\bcat\b.*\bmemories\.db\b/,
10639
+ severity: "warning",
10640
+ reason: "Reading raw database file \u2014 encrypted data, use MCP tools instead"
10608
10641
  }
10609
10642
  ];
10610
10643
  }
@@ -11263,7 +11296,7 @@ __export(keychain_exports, {
11263
11296
  importMnemonic: () => importMnemonic,
11264
11297
  setMasterKey: () => setMasterKey
11265
11298
  });
11266
- import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2 } from "fs/promises";
11299
+ import { readFile as readFile4, writeFile as writeFile5, unlink, mkdir as mkdir4, chmod as chmod2, rename, copyFile } from "fs/promises";
11267
11300
  import { existsSync as existsSync18, statSync as statSync3 } from "fs";
11268
11301
  import { execSync as execSync10 } from "child_process";
11269
11302
  import path27 from "path";
@@ -11298,12 +11331,14 @@ function linuxSecretAvailable() {
11298
11331
  function isRootOnlyTrustedServerKeyFile(keyPath) {
11299
11332
  if (process.platform !== "linux") return false;
11300
11333
  try {
11301
- const uid = typeof os13.userInfo().uid === "number" ? os13.userInfo().uid : -1;
11302
11334
  const st = statSync3(keyPath);
11303
11335
  if (!st.isFile() || (st.mode & 63) !== 0) return false;
11336
+ const uid = typeof os13.userInfo().uid === "number" ? os13.userInfo().uid : -1;
11304
11337
  if (uid === 0) return true;
11305
11338
  const exeOsDir = process.env.EXE_OS_DIR;
11306
- return Boolean(exeOsDir && path27.resolve(keyPath).startsWith(path27.resolve(exeOsDir) + path27.sep));
11339
+ if (exeOsDir && path27.resolve(keyPath).startsWith(path27.resolve(exeOsDir) + path27.sep)) return true;
11340
+ if (!linuxSecretAvailable()) return true;
11341
+ return false;
11307
11342
  } catch {
11308
11343
  return false;
11309
11344
  }
@@ -11453,15 +11488,25 @@ async function writeMachineBoundFileFallback(b64) {
11453
11488
  await mkdir4(dir, { recursive: true });
11454
11489
  const keyPath = getKeyPath();
11455
11490
  const machineKey = deriveMachineKey();
11456
- if (machineKey) {
11457
- const encrypted = encryptWithMachineKey(b64, machineKey);
11458
- await writeFile5(keyPath, encrypted + "\n", "utf-8");
11459
- await chmod2(keyPath, 384);
11460
- return "encrypted";
11461
- }
11462
- await writeFile5(keyPath, b64 + "\n", "utf-8");
11463
- await chmod2(keyPath, 384);
11464
- return "plaintext";
11491
+ const content = machineKey ? encryptWithMachineKey(b64, machineKey) + "\n" : b64 + "\n";
11492
+ const result = machineKey ? "encrypted" : "plaintext";
11493
+ const tmpPath = keyPath + ".tmp";
11494
+ try {
11495
+ if (existsSync18(keyPath)) {
11496
+ await copyFile(keyPath, keyPath + ".bak").catch(() => {
11497
+ });
11498
+ }
11499
+ await writeFile5(tmpPath, content, "utf-8");
11500
+ await chmod2(tmpPath, 384);
11501
+ await rename(tmpPath, keyPath);
11502
+ } catch (err) {
11503
+ try {
11504
+ await unlink(tmpPath);
11505
+ } catch {
11506
+ }
11507
+ throw err;
11508
+ }
11509
+ return result;
11465
11510
  }
11466
11511
  async function getMasterKey() {
11467
11512
  let nativeValue = macKeychainGet() ?? linuxSecretGet();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.113",
3
+ "version": "0.9.114",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",