@askexenow/exe-os 0.9.141 → 0.9.142

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 (94) hide show
  1. package/dist/bin/bulk-sync-postgres.js +1 -1
  2. package/dist/bin/cleanup-stale-review-tasks.js +1 -1
  3. package/dist/bin/cli.js +2 -2
  4. package/dist/bin/exe-boot.js +1 -1
  5. package/dist/bin/exe-cloud.js +1 -1
  6. package/dist/bin/exe-dispatch.js +1 -1
  7. package/dist/bin/exe-gateway.js +4 -4
  8. package/dist/bin/exe-heartbeat.js +1 -1
  9. package/dist/bin/exe-launch-agent.js +15 -2
  10. package/dist/bin/exe-pending-messages.js +2 -2
  11. package/dist/bin/exe-pending-notifications.js +1 -1
  12. package/dist/bin/exe-pending-reviews.js +1 -1
  13. package/dist/bin/exe-review.js +1 -1
  14. package/dist/bin/exe-session-cleanup.js +4 -4
  15. package/dist/bin/exe-settings.js +1 -1
  16. package/dist/bin/exe-status.js +2 -2
  17. package/dist/bin/git-sweep.js +2 -2
  18. package/dist/bin/intercom-check.js +2 -2
  19. package/dist/bin/scan-tasks.js +1 -1
  20. package/dist/bin/setup.js +1 -1
  21. package/dist/{capacity-monitor-ZIAX3FBS.js → capacity-monitor-D3RGDLMN.js} +2 -2
  22. package/dist/{catchup-brief-GYZWGUDP.js → catchup-brief-LD2QLE2D.js} +1 -1
  23. package/dist/{chunk-NTALKXBR.js → chunk-25QUV6FU.js} +2 -2
  24. package/dist/{chunk-NW4AUWIT.js → chunk-32Z4GK25.js} +2 -2
  25. package/dist/{chunk-CXXGHL7T.js → chunk-4CBBN2XD.js} +123 -34
  26. package/dist/{chunk-K6WORHFF.js → chunk-4YSDLTCT.js} +3 -3
  27. package/dist/{chunk-IBWVMMLN.js → chunk-5PZ3HSGP.js} +44 -34
  28. package/dist/{chunk-EP523LJD.js → chunk-7BPUBHGW.js} +1 -1
  29. package/dist/{chunk-Y3JNBCZI.js → chunk-AOJHEMHE.js} +24 -5
  30. package/dist/{chunk-4NKNXOA5.js → chunk-CHXX73NX.js} +2 -2
  31. package/dist/{chunk-P3RKVFBX.js → chunk-CK5ZAMWX.js} +2 -2
  32. package/dist/{chunk-HSJKFTKP.js → chunk-DKWTDULH.js} +2 -2
  33. package/dist/{chunk-QWOQHCRO.js → chunk-E2KEN3PG.js} +1 -1
  34. package/dist/{chunk-T62RXVA4.js → chunk-EENNKZMN.js} +2 -2
  35. package/dist/{chunk-47D4UN72.js → chunk-JMMY24KD.js} +2 -2
  36. package/dist/{chunk-RGKFUMLQ.js → chunk-JSVRX6IW.js} +3 -3
  37. package/dist/{chunk-BBOD5TVX.js → chunk-KCLL5ECT.js} +1 -1
  38. package/dist/{chunk-ENL5P2CU.js → chunk-LFVL3R6H.js} +1 -1
  39. package/dist/{chunk-UEJTDPRA.js → chunk-MRX42FAS.js} +1 -1
  40. package/dist/{chunk-PB5TRWLG.js → chunk-NWUWTV7B.js} +1 -1
  41. package/dist/{chunk-GQNG4MKL.js → chunk-TJI7DMBT.js} +1 -1
  42. package/dist/{chunk-GVGISFMN.js → chunk-UB7E2FEB.js} +1 -1
  43. package/dist/{chunk-EP3OKNTW.js → chunk-UYNFWD54.js} +1 -1
  44. package/dist/{crm-webhook-7654EZEJ.js → crm-webhook-HGUHXI6W.js} +2 -2
  45. package/dist/{cto-delegation-gate-43UJFGMT.js → cto-delegation-gate-RJ5EVOY3.js} +1 -1
  46. package/dist/{daemon-orchestration-NB5HYPXS.js → daemon-orchestration-3E3BIK7E.js} +4 -4
  47. package/dist/gateway/index.js +5 -5
  48. package/dist/{git-task-sweep-ATQQNA7A.js → git-task-sweep-O4OIPQB3.js} +2 -2
  49. package/dist/hooks/bug-report-worker.js +3 -3
  50. package/dist/hooks/codex-stop-task-finalizer.js +3 -3
  51. package/dist/hooks/commit-complete.js +3 -3
  52. package/dist/hooks/ingest.js +1 -1
  53. package/dist/hooks/post-compact.js +1 -1
  54. package/dist/hooks/post-tool-combined.js +1 -1
  55. package/dist/hooks/pre-compact.js +2 -2
  56. package/dist/hooks/pre-tool-use.js +9 -6
  57. package/dist/hooks/prompt-submit.js +3 -3
  58. package/dist/hooks/session-end.js +5 -5
  59. package/dist/hooks/session-start.js +2 -2
  60. package/dist/hooks/stop.js +2 -2
  61. package/dist/hooks/subagent-stop.js +1 -1
  62. package/dist/hooks/summary-worker.js +2 -2
  63. package/dist/index.js +8 -8
  64. package/dist/lib/cloud-sync.js +1 -1
  65. package/dist/lib/exe-daemon.js +63 -11
  66. package/dist/lib/messaging.js +2 -2
  67. package/dist/lib/tasks.js +3 -3
  68. package/dist/lib/tmux-routing.js +1 -1
  69. package/dist/mcp/register-tools.js +15 -15
  70. package/dist/mcp/server.js +15 -15
  71. package/dist/mcp/tools/create-task.js +4 -4
  72. package/dist/mcp/tools/list-tasks.js +4 -4
  73. package/dist/mcp/tools/send-message.js +3 -3
  74. package/dist/mcp/tools/update-task.js +4 -4
  75. package/dist/message-queue-client-2YTGEB5H.js +92 -0
  76. package/dist/{notifications-OXEFBG2D.js → notifications-APKWB63A.js} +1 -1
  77. package/dist/{orchestrator-6ULAKZQP.js → orchestrator-W62CLQLP.js} +2 -2
  78. package/dist/runtime/index.js +3 -3
  79. package/dist/{session-events-5X2SSRXX.js → session-events-SR2WX2X4.js} +2 -2
  80. package/dist/{session-scope-42JIV5KF.js → session-scope-S5DODJU4.js} +2 -2
  81. package/dist/{setup-wizard-MAPYQDKT.js → setup-wizard-H4TZHU36.js} +1 -1
  82. package/dist/{task-enforcement-V2CQEPXS.js → task-enforcement-L7EGD6LJ.js} +1 -1
  83. package/dist/{task-scope-EY3G5623.js → task-scope-QNRAYD7S.js} +1 -1
  84. package/dist/{tasks-crud-FPWY4RZ2.js → tasks-crud-JHHIROCS.js} +1 -1
  85. package/dist/{tasks-review-XDSW3WRG.js → tasks-review-TXMVOOFN.js} +1 -1
  86. package/dist/tui/App.js +7 -7
  87. package/dist/{tui-data-FQ2F5WA3.js → tui-data-65WM7L5Q.js} +1 -1
  88. package/dist/{workflow-engine-6QPTYDQI.js → workflow-engine-PK2TC7UE.js} +2 -2
  89. package/package.json +1 -1
  90. package/release-notes.json +104 -100
  91. /package/dist/{chunk-T7SJCDG3.js → chunk-72O7CSKA.js} +0 -0
  92. /package/dist/{chunk-CU2XXD5I.js → chunk-UYFPFO6Q.js} +0 -0
  93. /package/dist/{chunk-XFBKSNNI.js → chunk-XRPIVNFS.js} +0 -0
  94. /package/dist/{exe-key-KHNNQGSZ.js → exe-key-KNR4LT2L.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MultiAgentOrchestrator
3
- } from "./chunk-EP3OKNTW.js";
3
+ } from "./chunk-UYNFWD54.js";
4
4
  import {
5
5
  createQuietRenderer,
6
6
  createTerminalRenderer,
@@ -332,7 +332,7 @@ function createExeOSHooks(config) {
332
332
  async onSubagentStop(_reason) {
333
333
  try {
334
334
  const { getClient } = await import("./lib/database.js");
335
- const { sessionScopeFilter } = await import("./task-scope-EY3G5623.js");
335
+ const { sessionScopeFilter } = await import("./task-scope-QNRAYD7S.js");
336
336
  const client = getClient();
337
337
  const ehScope = sessionScopeFilter();
338
338
  const tasks = await client.execute({
@@ -424,7 +424,7 @@ function createExeOSHooks(config) {
424
424
  try {
425
425
  const { writeMemory, flushBatch } = await import("./lib/store.js");
426
426
  const { getClient } = await import("./lib/database.js");
427
- const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-EY3G5623.js");
427
+ const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-QNRAYD7S.js");
428
428
  const client = getClient();
429
429
  const cpScope = cpScopeFilter();
430
430
  const tasks = await client.execute({
@@ -75,6 +75,9 @@ var FETCH_TIMEOUT_MS = 3e4;
75
75
  var PUSH_BATCH_SIZE = 5e3;
76
76
  var ROSTER_LOCK_PATH = path.join(EXE_AI_DIR, "roster-merge.lock");
77
77
  var LOCK_STALE_MS = 3e4;
78
+ var SYNC_COOLDOWN_MS = 1e4;
79
+ var _lastSyncPushVersion = -1;
80
+ var _lastSyncPushTimestamp = 0;
78
81
  var _pgPromise = null;
79
82
  var _pgFailed = false;
80
83
  function isTruthyEnv(value) {
@@ -642,9 +645,13 @@ async function cloudSync(config) {
642
645
  const lastPushVersion = pushMeta.rows.length > 0 ? Number(pushMeta.rows[0].value) : 0;
643
646
  let pushed = 0;
644
647
  let batchCursor = lastPushVersion;
645
- while (true) {
646
- const recordsResult = await client.execute({
647
- sql: `SELECT id, agent_id, agent_role, session_id, timestamp,
648
+ const nowMs = Date.now();
649
+ const pushCooldownActive = lastPushVersion > 0 && lastPushVersion === _lastSyncPushVersion && nowMs - _lastSyncPushTimestamp < SYNC_COOLDOWN_MS;
650
+ if (pushCooldownActive) {
651
+ } else {
652
+ while (true) {
653
+ const recordsResult = await client.execute({
654
+ sql: `SELECT id, agent_id, agent_role, session_id, timestamp,
648
655
  tool_name, project_name, has_error, raw_text, version,
649
656
  author_device_id, scope
650
657
  FROM memories
@@ -652,38 +659,41 @@ async function cloudSync(config) {
652
659
  AND (scope IS NULL OR scope != 'personal')
653
660
  ORDER BY version ASC
654
661
  LIMIT ?`,
655
- args: [batchCursor, PUSH_BATCH_SIZE]
656
- });
657
- if (recordsResult.rows.length === 0) break;
658
- const records = recordsResult.rows.map((row) => ({
659
- id: row.id,
660
- agent_id: row.agent_id,
661
- agent_role: row.agent_role,
662
- session_id: row.session_id,
663
- timestamp: row.timestamp,
664
- tool_name: row.tool_name,
665
- project_name: row.project_name,
666
- has_error: row.has_error,
667
- raw_text: row.raw_text,
668
- version: row.version,
669
- author_device_id: row.author_device_id,
670
- scope: row.scope
671
- }));
672
- const maxVersion = Number(records[records.length - 1].version);
673
- const pushOk = await cloudPush(records, maxVersion, config);
674
- if (!pushOk) break;
675
- try {
676
- await pushToPostgres(records);
677
- } catch (e) {
678
- process.stderr.write("[cloud-sync] Postgres push of local records failed: " + (e instanceof Error ? e.message : String(e)) + "\n");
662
+ args: [batchCursor, PUSH_BATCH_SIZE]
663
+ });
664
+ if (recordsResult.rows.length === 0) break;
665
+ const records = recordsResult.rows.map((row) => ({
666
+ id: row.id,
667
+ agent_id: row.agent_id,
668
+ agent_role: row.agent_role,
669
+ session_id: row.session_id,
670
+ timestamp: row.timestamp,
671
+ tool_name: row.tool_name,
672
+ project_name: row.project_name,
673
+ has_error: row.has_error,
674
+ raw_text: row.raw_text,
675
+ version: row.version,
676
+ author_device_id: row.author_device_id,
677
+ scope: row.scope
678
+ }));
679
+ const maxVersion = Number(records[records.length - 1].version);
680
+ const pushOk = await cloudPush(records, maxVersion, config);
681
+ if (!pushOk) break;
682
+ try {
683
+ await pushToPostgres(records);
684
+ } catch (e) {
685
+ process.stderr.write("[cloud-sync] Postgres push of local records failed: " + (e instanceof Error ? e.message : String(e)) + "\n");
686
+ }
687
+ await client.execute({
688
+ sql: "INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('last_cloud_push_version', ?)",
689
+ args: [String(maxVersion)]
690
+ });
691
+ pushed += records.length;
692
+ batchCursor = maxVersion;
693
+ _lastSyncPushVersion = maxVersion;
694
+ _lastSyncPushTimestamp = Date.now();
695
+ if (recordsResult.rows.length < PUSH_BATCH_SIZE) break;
679
696
  }
680
- await client.execute({
681
- sql: "INSERT OR REPLACE INTO sync_meta (key, value) VALUES ('last_cloud_push_version', ?)",
682
- args: [String(maxVersion)]
683
- });
684
- pushed += records.length;
685
- batchCursor = maxVersion;
686
- if (recordsResult.rows.length < PUSH_BATCH_SIZE) break;
687
697
  }
688
698
  try {
689
699
  await cloudPushRoster(config);
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  init_tmux_routing,
7
7
  resolveExeSession
8
- } from "./chunk-Y3JNBCZI.js";
8
+ } from "./chunk-AOJHEMHE.js";
9
9
  import {
10
10
  init_session_registry,
11
11
  listSessions
@@ -345,7 +345,7 @@ async function createTaskCore(input) {
345
345
  if (isCoordinatorSession) {
346
346
  earlySessionScope = resolved;
347
347
  } else {
348
- const { getSessionProject } = await import("./session-scope-42JIV5KF.js");
348
+ const { getSessionProject } = await import("./session-scope-S5DODJU4.js");
349
349
  const sessionProject = getSessionProject(resolved);
350
350
  if (sessionProject && sessionProject !== input.projectName) {
351
351
  scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
@@ -1861,7 +1861,7 @@ async function verifyPaneAtCapacity(sessionName) {
1861
1861
  reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
1862
1862
  };
1863
1863
  }
1864
- const { isAtCapacity } = await import("./capacity-monitor-ZIAX3FBS.js");
1864
+ const { isAtCapacity } = await import("./capacity-monitor-D3RGDLMN.js");
1865
1865
  if (!isAtCapacity(pane)) {
1866
1866
  return {
1867
1867
  atCapacity: false,
@@ -2119,7 +2119,7 @@ function ensureEmployee(employeeName, exeSession, projectDir, opts) {
2119
2119
  }
2120
2120
  }
2121
2121
  try {
2122
- const MAX_CONCURRENT = Number(process.env.EXE_MAX_SESSIONS) || 10;
2122
+ const MAX_CONCURRENT = Number(process.env.EXE_MAX_SESSIONS) || 50;
2123
2123
  const { listTmuxSessions } = (init_tmux_status(), __toCommonJS(tmux_status_exports));
2124
2124
  const liveSessions = listTmuxSessions().filter((s) => !isExeSession(s));
2125
2125
  if (liveSessions.length >= MAX_CONCURRENT) {
@@ -2460,10 +2460,29 @@ function spawnEmployee(employeeName, exeSession, projectDir, opts) {
2460
2460
  releaseSpawnLock(sessionName);
2461
2461
  const runtimeLabel = useExeAgent ? "exe-agent" : useCodex ? "codex" : "claude";
2462
2462
  process.stderr.write(
2463
- `[tmux-routing] ${runtimeLabel} boot poll timed out for ${sessionName} \u2014 session exists, boot pending
2463
+ `[tmux-routing] ${runtimeLabel} boot poll timed out for ${sessionName} \u2014 retrying with extended wait
2464
2464
  `
2465
2465
  );
2466
- return { sessionName };
2466
+ for (let j = 0; j < 30; j++) {
2467
+ try {
2468
+ execSync2("sleep 0.5");
2469
+ } catch {
2470
+ }
2471
+ try {
2472
+ const pane = transport.capturePane(sessionName);
2473
+ if (pane.includes("Claude Code") || pane.includes("\u276F")) {
2474
+ booted = true;
2475
+ break;
2476
+ }
2477
+ } catch {
2478
+ }
2479
+ }
2480
+ if (!booted) {
2481
+ process.stderr.write(
2482
+ `[tmux-routing] ${runtimeLabel} boot FAILED for ${sessionName} after 30s \u2014 session may need manual intervention
2483
+ `
2484
+ );
2485
+ }
2467
2486
  }
2468
2487
  if (!useExeAgent && !useCodex) {
2469
2488
  try {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createCRMWebhookHandler,
6
6
  parseTwentyWebhook
7
- } from "./chunk-PB5TRWLG.js";
7
+ } from "./chunk-NWUWTV7B.js";
8
8
  import {
9
9
  WhatsAppAdapter
10
10
  } from "./chunk-ECSNSHZ7.js";
@@ -42,7 +42,7 @@ import {
42
42
  retryWithBackoff,
43
43
  routeMessage,
44
44
  validateGatewayConfig
45
- } from "./chunk-GQNG4MKL.js";
45
+ } from "./chunk-TJI7DMBT.js";
46
46
  import {
47
47
  OllamaProvider
48
48
  } from "./chunk-FWFFZGSC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  init_tasks
3
- } from "./chunk-RGKFUMLQ.js";
3
+ } from "./chunk-JSVRX6IW.js";
4
4
  import {
5
5
  getProjectName,
6
6
  init_project_name
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-CBSUVFZ7.js";
11
11
  import {
12
12
  listTasks
13
- } from "./chunk-Y3JNBCZI.js";
13
+ } from "./chunk-AOJHEMHE.js";
14
14
 
15
15
  // src/mcp/tools/list-tasks.ts
16
16
  init_tasks();
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_task_scope,
3
3
  sessionScopeFilter
4
- } from "./chunk-Y3JNBCZI.js";
4
+ } from "./chunk-AOJHEMHE.js";
5
5
 
6
6
  // src/lib/git-task-sweep.ts
7
7
  init_task_scope();
@@ -180,7 +180,7 @@ async function sweepTasks(projectName, options = {}) {
180
180
  }
181
181
  if (!dryRun) {
182
182
  try {
183
- const { updateTaskStatus } = await import("./tasks-crud-FPWY4RZ2.js");
183
+ const { updateTaskStatus } = await import("./tasks-crud-JHHIROCS.js");
184
184
  await updateTaskStatus({
185
185
  taskId: task.id,
186
186
  status: "needs_review",
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-T7SJCDG3.js";
4
+ } from "./chunk-72O7CSKA.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";
@@ -6,7 +6,7 @@ import {
6
6
  resolveExeSession,
7
7
  sendIntercom,
8
8
  strictSessionScopeFilter
9
- } from "./chunk-Y3JNBCZI.js";
9
+ } from "./chunk-AOJHEMHE.js";
10
10
  import {
11
11
  getClient,
12
12
  init_database
@@ -136,7 +136,7 @@ async function deliverLocalMessage(messageId) {
136
136
  if (!isEmployeeAlive(sessionName)) {
137
137
  throw new Error("Session not running \u2014 message stays queued");
138
138
  }
139
- sendIntercom(sessionName);
139
+ sendIntercom(sessionName, { force: true });
140
140
  await client.execute({
141
141
  sql: "UPDATE messages SET status = 'delivered', delivered_at = ? WHERE id = ?",
142
142
  args: [now, messageId]
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  init_tasks,
7
7
  tasks_exports
8
- } from "./chunk-RGKFUMLQ.js";
8
+ } from "./chunk-JSVRX6IW.js";
9
9
  import {
10
10
  init_notifications,
11
11
  init_task_scope,
@@ -14,7 +14,7 @@ import {
14
14
  notifications_exports,
15
15
  sessionScopeFilter,
16
16
  tmux_routing_exports
17
- } from "./chunk-Y3JNBCZI.js";
17
+ } from "./chunk-AOJHEMHE.js";
18
18
  import {
19
19
  init_intercom_queue,
20
20
  intercom_queue_exports
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_session_scope,
3
3
  session_scope_exports
4
- } from "./chunk-EP523LJD.js";
4
+ } from "./chunk-7BPUBHGW.js";
5
5
  import {
6
6
  cleanupOrphanedReviews,
7
7
  cleanupReviewFile,
@@ -31,7 +31,7 @@ import {
31
31
  updateTaskStatus,
32
32
  writeCheckpoint,
33
33
  writeNotification
34
- } from "./chunk-Y3JNBCZI.js";
34
+ } from "./chunk-AOJHEMHE.js";
35
35
  import {
36
36
  getTransport,
37
37
  init_transport
@@ -452,7 +452,7 @@ async function updateTask(input) {
452
452
  await markTaskNotificationsRead(taskFile);
453
453
  if (input.status === "needs_review" && !isCoordinator) {
454
454
  try {
455
- const { writeNotification: writeNotification2 } = await import("./notifications-OXEFBG2D.js");
455
+ const { writeNotification: writeNotification2 } = await import("./notifications-APKWB63A.js");
456
456
  await writeNotification2({
457
457
  agentId: String(row.assigned_to),
458
458
  agentRole: String(row.assigned_to),
@@ -6,7 +6,7 @@ import {
6
6
  getCurrentSessionScope,
7
7
  init_task_scope,
8
8
  strictSessionScopeFilter
9
- } from "./chunk-Y3JNBCZI.js";
9
+ } from "./chunk-AOJHEMHE.js";
10
10
 
11
11
  // src/lib/session-events.ts
12
12
  init_task_scope();
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sendMessage
3
- } from "./chunk-T62RXVA4.js";
3
+ } from "./chunk-EENNKZMN.js";
4
4
  import {
5
5
  getActiveAgent
6
6
  } from "./chunk-CBSUVFZ7.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  init_task_scope,
6
6
  sessionScopeFilter
7
- } from "./chunk-Y3JNBCZI.js";
7
+ } from "./chunk-AOJHEMHE.js";
8
8
  import {
9
9
  formatStatusAll,
10
10
  formatStatusDeep,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-T7SJCDG3.js";
3
+ } from "./chunk-72O7CSKA.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {
@@ -2,7 +2,7 @@ import {
2
2
  listWorkflowDefinitions,
3
3
  runWorkflow,
4
4
  startWorkflow
5
- } from "./chunk-QWOQHCRO.js";
5
+ } from "./chunk-E2KEN3PG.js";
6
6
  import {
7
7
  initCRMBridge
8
8
  } from "./chunk-GCNWCYJI.js";
@@ -9,7 +9,7 @@ import {
9
9
  sessionScopeFilter,
10
10
  verifyPaneAtCapacity,
11
11
  writeNotification
12
- } from "./chunk-Y3JNBCZI.js";
12
+ } from "./chunk-AOJHEMHE.js";
13
13
  import {
14
14
  init_session_registry,
15
15
  listSessions
@@ -12,7 +12,7 @@ import {
12
12
  isEmployeeAlive,
13
13
  sessionScopeFilter,
14
14
  updateTaskStatus
15
- } from "./chunk-Y3JNBCZI.js";
15
+ } from "./chunk-AOJHEMHE.js";
16
16
  import {
17
17
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
18
18
  getCoordinatorName,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createCRMWebhookHandler,
3
3
  parseTwentyWebhook
4
- } from "./chunk-PB5TRWLG.js";
5
- import "./chunk-T7SJCDG3.js";
4
+ } from "./chunk-NWUWTV7B.js";
5
+ import "./chunk-72O7CSKA.js";
6
6
  import "./chunk-KFQGP6VL.js";
7
7
  export {
8
8
  createCRMWebhookHandler,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  init_task_scope,
3
3
  sessionScopeFilter
4
- } from "./chunk-Y3JNBCZI.js";
4
+ } from "./chunk-AOJHEMHE.js";
5
5
  import "./chunk-2OG5NAO2.js";
6
6
  import "./chunk-NEAHEC5G.js";
7
7
  import "./chunk-KRLOFIPI.js";
@@ -31,12 +31,12 @@ import {
31
31
  shouldKillIdleSession,
32
32
  shouldKillSession,
33
33
  shouldNudgeEmployee
34
- } from "./chunk-47D4UN72.js";
34
+ } from "./chunk-JMMY24KD.js";
35
35
  import "./chunk-EZUWMBWA.js";
36
- import "./chunk-RGKFUMLQ.js";
37
- import "./chunk-EP523LJD.js";
36
+ import "./chunk-JSVRX6IW.js";
37
+ import "./chunk-7BPUBHGW.js";
38
38
  import "./chunk-TOR5ZPKF.js";
39
- import "./chunk-Y3JNBCZI.js";
39
+ import "./chunk-AOJHEMHE.js";
40
40
  import "./chunk-2OG5NAO2.js";
41
41
  import "./chunk-NEAHEC5G.js";
42
42
  import "./chunk-KRLOFIPI.js";
@@ -11,14 +11,14 @@ import {
11
11
  createSignupBot,
12
12
  ensureCRMContact,
13
13
  formatAlert
14
- } from "../chunk-4NKNXOA5.js";
14
+ } from "../chunk-CHXX73NX.js";
15
15
  import {
16
16
  IMessageAdapter
17
17
  } from "../chunk-VU447UAO.js";
18
18
  import {
19
19
  createCRMWebhookHandler,
20
20
  parseTwentyWebhook
21
- } from "../chunk-PB5TRWLG.js";
21
+ } from "../chunk-NWUWTV7B.js";
22
22
  import {
23
23
  WhatsAppAdapter
24
24
  } from "../chunk-ECSNSHZ7.js";
@@ -56,8 +56,8 @@ import {
56
56
  retryWithBackoff,
57
57
  routeMessage,
58
58
  validateGatewayConfig
59
- } from "../chunk-GQNG4MKL.js";
60
- import "../chunk-QWOQHCRO.js";
59
+ } from "../chunk-TJI7DMBT.js";
60
+ import "../chunk-E2KEN3PG.js";
61
61
  import {
62
62
  OllamaProvider
63
63
  } from "../chunk-FWFFZGSC.js";
@@ -71,7 +71,7 @@ import {
71
71
  getDefaultAccount,
72
72
  loadAccounts
73
73
  } from "../chunk-YGAAZN3E.js";
74
- import "../chunk-T7SJCDG3.js";
74
+ import "../chunk-72O7CSKA.js";
75
75
  import {
76
76
  createPerson,
77
77
  findPersonByContact,
@@ -4,8 +4,8 @@ import {
4
4
  getRecentCommits,
5
5
  matchScore,
6
6
  sweepTasks
7
- } from "./chunk-HSJKFTKP.js";
8
- import "./chunk-Y3JNBCZI.js";
7
+ } from "./chunk-DKWTDULH.js";
8
+ import "./chunk-AOJHEMHE.js";
9
9
  import "./chunk-2OG5NAO2.js";
10
10
  import "./chunk-NEAHEC5G.js";
11
11
  import "./chunk-KRLOFIPI.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createTask,
3
3
  init_tasks
4
- } from "../chunk-RGKFUMLQ.js";
5
- import "../chunk-EP523LJD.js";
4
+ } from "../chunk-JSVRX6IW.js";
5
+ import "../chunk-7BPUBHGW.js";
6
6
  import {
7
7
  fastDbInit
8
8
  } from "../chunk-7A2YCQNM.js";
9
9
  import "../chunk-TOR5ZPKF.js";
10
- import "../chunk-Y3JNBCZI.js";
10
+ import "../chunk-AOJHEMHE.js";
11
11
  import "../chunk-2OG5NAO2.js";
12
12
  import "../chunk-NEAHEC5G.js";
13
13
  import "../chunk-KRLOFIPI.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  init_tasks,
3
3
  updateTask
4
- } from "../chunk-RGKFUMLQ.js";
5
- import "../chunk-EP523LJD.js";
4
+ } from "../chunk-JSVRX6IW.js";
5
+ import "../chunk-7BPUBHGW.js";
6
6
  import {
7
7
  fastDbInit
8
8
  } from "../chunk-7A2YCQNM.js";
9
9
  import "../chunk-TOR5ZPKF.js";
10
10
  import {
11
11
  listTasks
12
- } from "../chunk-Y3JNBCZI.js";
12
+ } from "../chunk-AOJHEMHE.js";
13
13
  import "../chunk-2OG5NAO2.js";
14
14
  import "../chunk-NEAHEC5G.js";
15
15
  import "../chunk-KRLOFIPI.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  extractKeywords,
3
3
  matchScore
4
- } from "../chunk-HSJKFTKP.js";
5
- import "../chunk-Y3JNBCZI.js";
4
+ } from "../chunk-DKWTDULH.js";
5
+ import "../chunk-AOJHEMHE.js";
6
6
  import "../chunk-2OG5NAO2.js";
7
7
  import "../chunk-NEAHEC5G.js";
8
8
  import "../chunk-KRLOFIPI.js";
@@ -68,7 +68,7 @@ async function main() {
68
68
  process.stderr.write("[commit-complete] DB init failed \u2014 skipping\n");
69
69
  return;
70
70
  }
71
- const { listTasks, updateTaskStatus } = await import("../tasks-crud-FPWY4RZ2.js");
71
+ const { listTasks, updateTaskStatus } = await import("../tasks-crud-JHHIROCS.js");
72
72
  const tasks = await listTasks({
73
73
  assignedTo: agentId,
74
74
  status: "in_progress",
@@ -325,7 +325,7 @@ Your output files must start with: exe/output/${agent.agentId}-`
325
325
  if (taskData.taskId) {
326
326
  const { initStore: cpInit } = await import("../lib/store.js");
327
327
  await cpInit();
328
- const { writeCheckpoint } = await import("../tasks-crud-FPWY4RZ2.js");
328
+ const { writeCheckpoint } = await import("../tasks-crud-JHHIROCS.js");
329
329
  await writeCheckpoint({
330
330
  taskId: taskData.taskId,
331
331
  step: `auto_checkpoint_${counter.total}`,
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  init_task_scope,
7
7
  sessionScopeFilter
8
- } from "../chunk-Y3JNBCZI.js";
8
+ } from "../chunk-AOJHEMHE.js";
9
9
  import "../chunk-2OG5NAO2.js";
10
10
  import "../chunk-NEAHEC5G.js";
11
11
  import "../chunk-KRLOFIPI.js";
@@ -111,7 +111,7 @@ You are **${driftAgent.agentId}** (${driftAgent.agentRole}). You've used ${misma
111
111
  const agent = getActiveAgent();
112
112
  try {
113
113
  const { fastDbInit } = await import("../fast-db-init-ADRYLHUA.js");
114
- const { recordSessionEvent } = await import("../session-events-5X2SSRXX.js");
114
+ const { recordSessionEvent } = await import("../session-events-SR2WX2X4.js");
115
115
  const client = await fastDbInit();
116
116
  const toolName = String(data.tool_name ?? "unknown");
117
117
  const toolInput = JSON.stringify(data.tool_input ?? {});
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  checkpointActiveTask,
7
7
  writeContinuityCheckpoint
8
- } from "../chunk-XFBKSNNI.js";
8
+ } from "../chunk-XRPIVNFS.js";
9
9
  import "../chunk-4GA5XZWY.js";
10
10
  import "../chunk-ITJMONDK.js";
11
11
  import "../chunk-UKCSMGNM.js";
@@ -13,7 +13,7 @@ import "../chunk-SDYBAMPW.js";
13
13
  import {
14
14
  init_task_scope,
15
15
  sessionScopeFilter
16
- } from "../chunk-Y3JNBCZI.js";
16
+ } from "../chunk-AOJHEMHE.js";
17
17
  import "../chunk-2OG5NAO2.js";
18
18
  import "../chunk-NEAHEC5G.js";
19
19
  import "../chunk-KRLOFIPI.js";
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  init_task_scope,
8
8
  sessionScopeFilter
9
- } from "../chunk-Y3JNBCZI.js";
9
+ } from "../chunk-AOJHEMHE.js";
10
10
  import "../chunk-2OG5NAO2.js";
11
11
  import "../chunk-NEAHEC5G.js";
12
12
  import "../chunk-KRLOFIPI.js";
@@ -110,13 +110,16 @@ process.stdin.on("end", async () => {
110
110
  const agent = getActiveAgent();
111
111
  if (data.tool_name === "Bash") {
112
112
  const command = data.tool_input?.command ?? "";
113
- if (/tmux\s+send-keys/i.test(command) && !canCoordinate(agent.agentId, agent.agentRole)) {
113
+ if (/tmux\s+send-keys/i.test(command)) {
114
114
  const output = JSON.stringify({
115
115
  hookSpecificOutput: { permissionDecision: "deny" },
116
- systemMessage: `\u274C BLOCKED: tmux send-keys is not allowed. Use MCP tools to communicate:
117
- - create_task to assign work
116
+ systemMessage: `\u274C BLOCKED: tmux send-keys is not allowed for ANY agent (including COO).
117
+ Use MCP tools to communicate:
118
+ - create_task to assign work (auto-spawns + sends intercom)
118
119
  - send_message for context
119
120
  - update_task to report status
121
+ - task(action="resume") to respawn a dead session
122
+ Read-only tmux (capture-pane, list-sessions) is fine for monitoring.
120
123
  If MCP is down, tell the user: "MCP disconnected. Run /mcp to reconnect."`
121
124
  });
122
125
  process.stdout.write(output);
@@ -156,7 +159,7 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
156
159
  process.exit(0);
157
160
  }
158
161
  }
159
- const { getGatedAgent } = await import("../cto-delegation-gate-43UJFGMT.js");
162
+ const { getGatedAgent } = await import("../cto-delegation-gate-RJ5EVOY3.js");
160
163
  const gatedAgent = getGatedAgent();
161
164
  if (agent.agentId === gatedAgent && /^(Write|Edit)$/.test(data.tool_name)) {
162
165
  const filePath = data.tool_input?.file_path ?? "";
@@ -164,7 +167,7 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
164
167
  try {
165
168
  const { fastDbInit } = await import("../fast-db-init-ADRYLHUA.js");
166
169
  await fastDbInit();
167
- const { evaluateDelegationGate, GATE_BLOCK_MESSAGE } = await import("../cto-delegation-gate-43UJFGMT.js");
170
+ const { evaluateDelegationGate, GATE_BLOCK_MESSAGE } = await import("../cto-delegation-gate-RJ5EVOY3.js");
168
171
  const decision = await evaluateDelegationGate({
169
172
  agentId: agent.agentId,
170
173
  toolName: data.tool_name,