@askexenow/exe-os 0.9.112 → 0.9.113

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 (95) hide show
  1. package/README.md +9 -7
  2. package/dist/bin/agentic-ontology-backfill.js +54 -11
  3. package/dist/bin/agentic-reflection-backfill.js +29 -1
  4. package/dist/bin/agentic-semantic-label.js +29 -1
  5. package/dist/bin/backfill-conversations.js +53 -10
  6. package/dist/bin/backfill-responses.js +54 -11
  7. package/dist/bin/backfill-vectors.js +29 -1
  8. package/dist/bin/bulk-sync-postgres.js +55 -12
  9. package/dist/bin/cleanup-stale-review-tasks.js +75 -15
  10. package/dist/bin/cli.js +293 -76
  11. package/dist/bin/exe-agent-config.js +7 -1
  12. package/dist/bin/exe-agent.js +28 -2
  13. package/dist/bin/exe-assign.js +54 -11
  14. package/dist/bin/exe-boot.js +481 -147
  15. package/dist/bin/exe-call.js +45 -4
  16. package/dist/bin/exe-cloud.js +93 -15
  17. package/dist/bin/exe-dispatch.js +369 -24
  18. package/dist/bin/exe-doctor.js +53 -10
  19. package/dist/bin/exe-export-behaviors.js +54 -11
  20. package/dist/bin/exe-forget.js +54 -11
  21. package/dist/bin/exe-gateway.js +128 -23
  22. package/dist/bin/exe-heartbeat.js +75 -15
  23. package/dist/bin/exe-kill.js +54 -11
  24. package/dist/bin/exe-launch-agent.js +70 -12
  25. package/dist/bin/exe-new-employee.js +175 -7
  26. package/dist/bin/exe-pending-messages.js +75 -15
  27. package/dist/bin/exe-pending-notifications.js +75 -15
  28. package/dist/bin/exe-pending-reviews.js +75 -15
  29. package/dist/bin/exe-rename.js +54 -11
  30. package/dist/bin/exe-review.js +54 -11
  31. package/dist/bin/exe-search.js +54 -11
  32. package/dist/bin/exe-session-cleanup.js +491 -146
  33. package/dist/bin/exe-settings.js +10 -4
  34. package/dist/bin/exe-start-codex.js +524 -245
  35. package/dist/bin/exe-start-opencode.js +534 -165
  36. package/dist/bin/exe-status.js +75 -15
  37. package/dist/bin/exe-support.js +1 -1
  38. package/dist/bin/exe-team.js +54 -11
  39. package/dist/bin/git-sweep.js +369 -24
  40. package/dist/bin/graph-backfill.js +54 -11
  41. package/dist/bin/graph-export.js +54 -11
  42. package/dist/bin/install.js +62 -4
  43. package/dist/bin/intercom-check.js +491 -146
  44. package/dist/bin/pre-publish.js +13 -1
  45. package/dist/bin/scan-tasks.js +369 -24
  46. package/dist/bin/setup.js +91 -13
  47. package/dist/bin/shard-migrate.js +54 -11
  48. package/dist/bin/stack-update.js +1 -1
  49. package/dist/bin/update.js +3 -3
  50. package/dist/gateway/index.js +128 -23
  51. package/dist/hooks/bug-report-worker.js +128 -23
  52. package/dist/hooks/codex-stop-task-finalizer.js +512 -140
  53. package/dist/hooks/commit-complete.js +369 -24
  54. package/dist/hooks/error-recall.js +54 -11
  55. package/dist/hooks/ingest.js +4575 -252
  56. package/dist/hooks/instructions-loaded.js +54 -11
  57. package/dist/hooks/notification.js +54 -11
  58. package/dist/hooks/post-compact.js +75 -15
  59. package/dist/hooks/post-tool-combined.js +75 -15
  60. package/dist/hooks/pre-compact.js +449 -104
  61. package/dist/hooks/pre-tool-use.js +90 -15
  62. package/dist/hooks/prompt-submit.js +129 -24
  63. package/dist/hooks/session-end.js +451 -109
  64. package/dist/hooks/session-start.js +104 -16
  65. package/dist/hooks/stop.js +74 -14
  66. package/dist/hooks/subagent-stop.js +75 -15
  67. package/dist/hooks/summary-worker.js +73 -7
  68. package/dist/index.js +128 -23
  69. package/dist/lib/agent-config.js +16 -1
  70. package/dist/lib/cloud-sync.js +38 -1
  71. package/dist/lib/consolidation.js +16 -1
  72. package/dist/lib/database.js +16 -0
  73. package/dist/lib/db.js +16 -0
  74. package/dist/lib/device-registry.js +16 -0
  75. package/dist/lib/employee-templates.js +29 -3
  76. package/dist/lib/employees.js +16 -1
  77. package/dist/lib/exe-daemon.js +268 -42
  78. package/dist/lib/hybrid-search.js +54 -11
  79. package/dist/lib/license.js +3 -3
  80. package/dist/lib/messaging.js +21 -4
  81. package/dist/lib/schedules.js +29 -1
  82. package/dist/lib/skill-learning.js +458 -70
  83. package/dist/lib/status-brief.js +14 -1
  84. package/dist/lib/store.js +54 -11
  85. package/dist/lib/tasks.js +393 -91
  86. package/dist/lib/tmux-routing.js +316 -14
  87. package/dist/mcp/server.js +169 -30
  88. package/dist/mcp/tools/create-task.js +75 -13
  89. package/dist/mcp/tools/deactivate-behavior.js +33 -24
  90. package/dist/mcp/tools/list-tasks.js +21 -4
  91. package/dist/mcp/tools/send-message.js +21 -4
  92. package/dist/mcp/tools/update-task.js +390 -91
  93. package/dist/runtime/index.js +446 -101
  94. package/dist/tui/App.js +208 -54
  95. package/package.json +1 -1
@@ -197,11 +197,17 @@ var PLATFORM_PROCEDURES = [
197
197
  content: "Founder -> coordinator (the executive agent, internally routed as 'COO') -> CTO/CMO. CTO -> engineers. CMO -> content production. Never skip levels: the coordinator does not bypass managers for specialist work. Specialists report to their manager. If you need cross-team info, use ask_team_memory \u2014 don't read other agents' task folders. Each level owns dispatch downward and review upward."
198
198
  },
199
199
  {
200
- title: "Customer orchestration maturity \u2014 recommend, never trap",
200
+ title: "Orchestration phase guidance \u2014 recommend, never trap",
201
201
  domain: "workflow",
202
202
  priority: "p1",
203
203
  content: "New customers start best in Phase 1: founder \u2194 coordinator/Chief of Staff, building company context. Suggest Phase 2 executives when domain work repeats; suggest Phase 3 parallel execution only when review/permission gates are ready. This is guidance, not a blocker: users may jump phases anytime. Never overwrite their phase, role titles, identities, or custom org design."
204
204
  },
205
+ {
206
+ title: "Routing slot vs display title \u2014 internal 'coo' is plumbing, not your name",
207
+ domain: "identity",
208
+ priority: "p0",
209
+ content: "These procedures reference 'COO' as a shorthand for the coordinator role. This is an INTERNAL routing slot used by exe-os code (chain-of-command checks, dispatch logic, session detection). It is NOT your display title. Your actual title comes from your identity file's `title:` field \u2014 that is what you use externally: introductions, sign-offs, team comms, and any user-facing text. If your identity says `title: AI Chief of Staff`, you are the AI Chief of Staff. The routing slot stays `role: coo` for code compatibility \u2014 never rename it, but also never introduce yourself as 'COO' unless your identity file explicitly says so. The founder chose your title; respect it."
210
+ },
205
211
  {
206
212
  title: "Single dispatch path \u2014 create_task only",
207
213
  domain: "workflow",
@@ -235,6 +241,12 @@ var PLATFORM_PROCEDURES = [
235
241
  priority: "p0",
236
242
  content: "NEVER: (1) Access the database directly \u2014 it's SQLCipher encrypted, always fails. Use MCP tools only. (2) Manually spawn tmux sessions \u2014 create_task handles it. (3) Run git checkout main \u2014 agents work in worktrees. (4) Modify another agent's in-progress task. (5) Push to remote \u2014 the COO reviews and pushes. (6) Skip update_task(done) \u2014 it's the ONLY way your work gets reviewed. (7) Run git init."
237
243
  },
244
+ {
245
+ title: "Destructive operations \u2014 mandatory reviewer gate",
246
+ domain: "security",
247
+ priority: "p0",
248
+ content: "Before ANY destructive operation (delete, remove, overwrite, drop, reset, force-push, truncate), you MUST: (1) Have your full task spec accessible \u2014 if you cannot read it, STOP and report to your reviewer. Never improvise destructive actions. (2) Confirm with your reviewer (assigned_by or COO) before executing. (3) If the task spec explicitly authorizes the operation, proceed \u2014 but log it. Violation = immediate task failure. This applies to ALL agents regardless of role."
249
+ },
238
250
  {
239
251
  title: "Customer patch triage \u2014 upstream bug vs customization",
240
252
  domain: "support",
@@ -601,9 +613,23 @@ var PROCEDURES_MARKER = "EXE OS \u2014 VISION AND NON-NEGOTIABLE PRINCIPLES";
601
613
  function getSessionPrompt(storedPrompt) {
602
614
  const markerIndex = storedPrompt.indexOf(PROCEDURES_MARKER);
603
615
  const withoutProcedures = markerIndex >= 0 ? storedPrompt.slice(0, markerIndex).trimEnd() : storedPrompt;
616
+ let titlePrefix = "";
617
+ const frontmatterMatch = withoutProcedures.match(/^---\r?\n([\s\S]*?)\r?\n---/);
618
+ if (frontmatterMatch) {
619
+ const titleMatch = frontmatterMatch[1].match(/^title:\s*(.+)$/m);
620
+ const roleMatch = frontmatterMatch[1].match(/^role:\s*(.+)$/m);
621
+ if (titleMatch) {
622
+ const title = titleMatch[1].trim();
623
+ const role = roleMatch ? roleMatch[1].trim() : "";
624
+ if (title && role && title.toLowerCase() !== role.toLowerCase()) {
625
+ titlePrefix = `## Your Identity
626
+ You are **${title}** (specialist). `;
627
+ }
628
+ }
629
+ }
604
630
  const rolePrompt = withoutProcedures.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, "").replace(/<!--[\s\S]*?-->/g, "").trimStart();
605
631
  const globalBlock = getGlobalProceduresBlock();
606
- return `${globalBlock}${rolePrompt}
632
+ return `${globalBlock}${titlePrefix}${rolePrompt}
607
633
  ${BASE_OPERATING_PROCEDURES}`;
608
634
  }
609
635
  var TEMPLATES = {
@@ -1056,7 +1082,7 @@ var CLIENT_COO_PLACEHOLDERS = [
1056
1082
  "title"
1057
1083
  ];
1058
1084
  function renderClientCOOTemplate(vars) {
1059
- const resolved = { ...vars, title: vars.title || "Chief Operating Officer" };
1085
+ const resolved = { ...vars, title: vars.title || "Chief of Staff" };
1060
1086
  for (const key of CLIENT_COO_PLACEHOLDERS) {
1061
1087
  const value = resolved[key];
1062
1088
  if (typeof value !== "string" || value.length === 0) {
@@ -170,6 +170,7 @@ __export(agent_config_exports, {
170
170
  getAgentRuntime: () => getAgentRuntime,
171
171
  loadAgentConfig: () => loadAgentConfig,
172
172
  saveAgentConfig: () => saveAgentConfig,
173
+ setAgentMcps: () => setAgentMcps,
173
174
  setAgentRuntime: () => setAgentRuntime
174
175
  });
175
176
  import { readFileSync as readFileSync2, writeFileSync, existsSync as existsSync3 } from "fs";
@@ -196,7 +197,7 @@ function getAgentRuntime(agentId) {
196
197
  if (orgDefault) return orgDefault;
197
198
  return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
198
199
  }
199
- function setAgentRuntime(agentId, runtime, model, reasoning_effort) {
200
+ function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
200
201
  const knownModels = KNOWN_RUNTIMES[runtime];
201
202
  if (!knownModels) {
202
203
  return {
@@ -211,12 +212,26 @@ function setAgentRuntime(agentId, runtime, model, reasoning_effort) {
211
212
  };
212
213
  }
213
214
  const config = loadAgentConfig();
215
+ const existing = config[agentId];
214
216
  const entry = { runtime, model };
215
217
  if (reasoning_effort) entry.reasoning_effort = reasoning_effort;
218
+ if (mcps !== void 0) {
219
+ entry.mcps = mcps.includes("exe-os") ? mcps : ["exe-os", ...mcps];
220
+ } else if (existing?.mcps) {
221
+ entry.mcps = existing.mcps;
222
+ }
216
223
  config[agentId] = entry;
217
224
  saveAgentConfig(config);
218
225
  return { ok: true };
219
226
  }
227
+ function setAgentMcps(agentId, mcps) {
228
+ const config = loadAgentConfig();
229
+ const existing = config[agentId] ?? getAgentRuntime(agentId);
230
+ existing.mcps = mcps.includes("exe-os") ? mcps : ["exe-os", ...mcps];
231
+ config[agentId] = existing;
232
+ saveAgentConfig(config);
233
+ return { ok: true };
234
+ }
220
235
  function clearAgentRuntime(agentId) {
221
236
  const config = loadAgentConfig();
222
237
  delete config[agentId];