@askexenow/exe-os 0.9.156 → 0.9.158

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 (131) hide show
  1. package/deploy/compose/PROTECTED_FILES.md +34 -0
  2. package/deploy/compose/backup.sh +99 -19
  3. package/deploy/compose/docker-compose.yml +6 -6
  4. package/deploy/compose/restore.sh +73 -0
  5. package/deploy/stack-manifests/v0.9.json +41 -2
  6. package/dist/{backfill-metadata-W7FUQRD7.js → backfill-metadata-CUNNA5MI.js} +1 -1
  7. package/dist/bin/agentic-ontology-backfill.js +1 -1
  8. package/dist/bin/agentic-reflection-backfill.js +1 -1
  9. package/dist/bin/agentic-semantic-label.js +1 -1
  10. package/dist/bin/backfill-conversations.js +1 -1
  11. package/dist/bin/backfill-responses.js +1 -1
  12. package/dist/bin/backfill-vectors.js +2 -2
  13. package/dist/bin/bulk-sync-postgres.js +1 -1
  14. package/dist/bin/cleanup-stale-review-tasks.js +2 -2
  15. package/dist/bin/cli.js +4 -4
  16. package/dist/bin/exe-assign.js +1 -1
  17. package/dist/bin/exe-boot.js +3 -3
  18. package/dist/bin/exe-dispatch.js +2 -2
  19. package/dist/bin/exe-doctor.js +1 -1
  20. package/dist/bin/exe-export-behaviors.js +2 -2
  21. package/dist/bin/exe-forget.js +3 -3
  22. package/dist/bin/exe-gateway.js +4 -4
  23. package/dist/bin/exe-heartbeat.js +2 -2
  24. package/dist/bin/exe-kill.js +3 -3
  25. package/dist/bin/exe-launch-agent.js +2 -2
  26. package/dist/bin/exe-pending-messages.js +3 -3
  27. package/dist/bin/exe-pending-notifications.js +2 -2
  28. package/dist/bin/exe-pending-reviews.js +2 -2
  29. package/dist/bin/exe-review.js +3 -3
  30. package/dist/bin/exe-search.js +2 -2
  31. package/dist/bin/exe-session-cleanup.js +7 -6
  32. package/dist/bin/exe-start-codex.js +2 -2
  33. package/dist/bin/exe-start-opencode.js +1 -1
  34. package/dist/bin/exe-status.js +3 -3
  35. package/dist/bin/exe-team.js +1 -1
  36. package/dist/bin/git-sweep.js +2 -2
  37. package/dist/bin/graph-backfill.js +1 -1
  38. package/dist/bin/graph-export.js +2 -2
  39. package/dist/bin/intercom-check.js +3 -3
  40. package/dist/bin/scan-tasks.js +2 -2
  41. package/dist/bin/shard-migrate.js +1 -1
  42. package/dist/bin/stack-update.js +27 -2
  43. package/dist/{capacity-monitor-WAZTZAR5.js → capacity-monitor-24CCEIJP.js} +2 -2
  44. package/dist/{catchup-brief-PKETW4ND.js → catchup-brief-QQUPS66I.js} +3 -3
  45. package/dist/{chunk-7XRGVVG6.js → chunk-3SQ6D4VK.js} +2 -2
  46. package/dist/{chunk-KZXC3G3P.js → chunk-47B5ZHTD.js} +1 -1
  47. package/dist/{chunk-6F46227N.js → chunk-4Q2OWCEU.js} +2 -2
  48. package/dist/{chunk-7VIH6LOQ.js → chunk-6OXHZIB6.js} +1 -1
  49. package/dist/{chunk-FOG7AEEO.js → chunk-6QQMF3AG.js} +1 -1
  50. package/dist/{chunk-3AN3RTUT.js → chunk-7DUZ3JFZ.js} +3 -3
  51. package/dist/{chunk-A6LSJC2O.js → chunk-7TV6RZLE.js} +1 -1
  52. package/dist/{chunk-U56WZR5E.js → chunk-AU4YZOTU.js} +3 -3
  53. package/dist/{chunk-AK7S4GRC.js → chunk-BED3IEEA.js} +1 -1
  54. package/dist/{chunk-TM3WWKNB.js → chunk-C6HHR6RL.js} +2 -2
  55. package/dist/{chunk-JYYWHPQC.js → chunk-HIMHVTER.js} +3 -3
  56. package/dist/{chunk-HDQJMTBG.js → chunk-JETWZJDU.js} +1 -1
  57. package/dist/{chunk-OCFYT3LE.js → chunk-LIYHRGAB.js} +22 -3
  58. package/dist/{chunk-JFEFVLLD.js → chunk-OMS7KJFD.js} +1 -1
  59. package/dist/{chunk-IRVLV6C5.js → chunk-P66GZHIS.js} +1 -1
  60. package/dist/{chunk-XIZR2YLR.js → chunk-QSQWOHS7.js} +22 -22
  61. package/dist/{chunk-RZE4KMRO.js → chunk-S3XTYXAG.js} +1 -1
  62. package/dist/{chunk-MBXAWOYB.js → chunk-SFQYCOJK.js} +1 -1
  63. package/dist/{chunk-BRHV6CJT.js → chunk-T25RLVTT.js} +1 -1
  64. package/dist/{chunk-23UPL4NU.js → chunk-TNW7GPEM.js} +2 -2
  65. package/dist/{chunk-HF6TVN2J.js → chunk-VEGDCI2M.js} +5 -5
  66. package/dist/{chunk-PY7QM2C7.js → chunk-WUVYHPLZ.js} +1 -1
  67. package/dist/{chunk-CGLSVN6N.js → chunk-YL5UVGMM.js} +1 -1
  68. package/dist/{chunk-HH6ZCDZH.js → chunk-YW7LDVCW.js} +2 -2
  69. package/dist/{crm-webhook-DGL6XEOQ.js → crm-webhook-7OPJC3KJ.js} +2 -2
  70. package/dist/{cto-delegation-gate-UFSXT2CA.js → cto-delegation-gate-OWFS6YCI.js} +1 -1
  71. package/dist/{daemon-orchestration-IP2LHJJK.js → daemon-orchestration-IMVQSOUF.js} +3 -3
  72. package/dist/{exe-export-LLKDWX7F.js → exe-export-WRRUZP7P.js} +1 -1
  73. package/dist/{exe-import-XVAR7ZVC.js → exe-import-XKQBNQPY.js} +1 -1
  74. package/dist/{fast-db-init-SMQC6S3C.js → fast-db-init-F4IPHJ23.js} +1 -1
  75. package/dist/gateway/index.js +8 -8
  76. package/dist/{git-task-sweep-NWHG3FWG.js → git-task-sweep-IAOWJBSG.js} +2 -2
  77. package/dist/hooks/bug-report-worker.js +3 -3
  78. package/dist/hooks/codex-stop-task-finalizer.js +3 -3
  79. package/dist/hooks/commit-complete.js +4 -4
  80. package/dist/hooks/error-recall.js +2 -2
  81. package/dist/hooks/ingest.js +2 -2
  82. package/dist/hooks/instructions-loaded.js +1 -1
  83. package/dist/hooks/notification.js +1 -1
  84. package/dist/hooks/post-compact.js +2 -2
  85. package/dist/hooks/post-tool-combined.js +2 -2
  86. package/dist/hooks/pre-compact.js +3 -3
  87. package/dist/hooks/pre-tool-use.js +6 -6
  88. package/dist/hooks/prompt-submit.js +8 -8
  89. package/dist/hooks/session-end.js +6 -6
  90. package/dist/hooks/session-start.js +5 -5
  91. package/dist/hooks/stop.js +5 -5
  92. package/dist/hooks/subagent-stop.js +2 -2
  93. package/dist/hooks/summary-worker.js +5 -5
  94. package/dist/index.js +9 -9
  95. package/dist/lib/consolidation.js +2 -2
  96. package/dist/lib/exe-daemon.js +11 -11
  97. package/dist/lib/hybrid-search.js +2 -2
  98. package/dist/lib/messaging.js +2 -2
  99. package/dist/lib/schedules.js +2 -2
  100. package/dist/lib/store.js +1 -1
  101. package/dist/lib/tasks.js +2 -2
  102. package/dist/lib/tmux-routing.js +1 -1
  103. package/dist/mcp/register-tools.js +20 -20
  104. package/dist/mcp/server.js +21 -21
  105. package/dist/mcp/tools/create-task.js +3 -3
  106. package/dist/mcp/tools/list-tasks.js +3 -3
  107. package/dist/mcp/tools/send-message.js +3 -3
  108. package/dist/mcp/tools/update-task.js +3 -3
  109. package/dist/{notifications-Z6Q2SEHP.js → notifications-VJPITPQ3.js} +1 -1
  110. package/dist/{orchestrator-RHJGFMAS.js → orchestrator-L6XE65KD.js} +2 -2
  111. package/dist/{review-polling-XUIKH7HF.js → review-polling-XLY35KOM.js} +2 -2
  112. package/dist/runtime/index.js +3 -3
  113. package/dist/{session-events-KURSY7LK.js → session-events-76JYQUF6.js} +2 -2
  114. package/dist/{session-scope-5MOCMTAM.js → session-scope-X4V5Q3OT.js} +1 -1
  115. package/dist/{task-enforcement-2WCWSZQ3.js → task-enforcement-T3QFAHOT.js} +1 -1
  116. package/dist/{task-scope-HW6BE2PI.js → task-scope-AJPW2PUM.js} +1 -1
  117. package/dist/{tasks-crud-WACRTPQK.js → tasks-crud-PIYGXNBH.js} +1 -1
  118. package/dist/{tasks-review-LIWD4PGN.js → tasks-review-MYFRICXX.js} +1 -1
  119. package/dist/tui/App.js +7 -7
  120. package/dist/{tui-data-UKFAWSNP.js → tui-data-4S3IDSXK.js} +1 -1
  121. package/dist/{worker-gate-NJRW5QYT.js → worker-gate-B5MEFZ55.js} +1 -1
  122. package/dist/{workflow-engine-ICAQJSYT.js → workflow-engine-PYGOBKLD.js} +2 -2
  123. package/package.json +1 -1
  124. package/release-notes.json +71 -71
  125. /package/dist/{chunk-U5GTF2JP.js → chunk-CB3AZW66.js} +0 -0
  126. /package/dist/{chunk-RTNRPBQP.js → chunk-CUHCGEHC.js} +0 -0
  127. /package/dist/{chunk-PYDL42BL.js → chunk-LJDQQYKZ.js} +0 -0
  128. /package/dist/{chunk-E5PVJXIP.js → chunk-PPGL2TMJ.js} +0 -0
  129. /package/dist/{core-memory-QRQ62AZY.js → core-memory-JXVJ7S5Q.js} +0 -0
  130. /package/dist/{exe-key-E3YOJ2ME.js → exe-key-OU6EXI5G.js} +0 -0
  131. /package/dist/{skill-refinement-JBZRPZKW.js → skill-refinement-4WWF5AML.js} +0 -0
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getPendingMessages,
3
3
  markRead
4
- } from "../chunk-FOG7AEEO.js";
4
+ } from "../chunk-6QQMF3AG.js";
5
5
  import {
6
6
  fastDbInit
7
- } from "../chunk-PYDL42BL.js";
8
- import "../chunk-OCFYT3LE.js";
7
+ } from "../chunk-LJDQQYKZ.js";
8
+ import "../chunk-LIYHRGAB.js";
9
9
  import "../chunk-LOQCOHEW.js";
10
10
  import "../chunk-TXSJ2L5O.js";
11
11
  import "../chunk-64WZEXXA.js";
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  fastDbInit
4
- } from "../chunk-PYDL42BL.js";
4
+ } from "../chunk-LJDQQYKZ.js";
5
5
  import {
6
6
  markAsRead,
7
7
  readUnreadNotifications,
8
8
  resolveExeSession
9
- } from "../chunk-OCFYT3LE.js";
9
+ } from "../chunk-LIYHRGAB.js";
10
10
  import "../chunk-LOQCOHEW.js";
11
11
  import "../chunk-TXSJ2L5O.js";
12
12
  import "../chunk-64WZEXXA.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  fastDbInit
4
- } from "../chunk-PYDL42BL.js";
4
+ } from "../chunk-LJDQQYKZ.js";
5
5
  import {
6
6
  cleanupOrphanedReviews,
7
7
  extractRootExe,
@@ -9,7 +9,7 @@ import {
9
9
  isExeSession,
10
10
  isStale,
11
11
  listPendingReviews
12
- } from "../chunk-OCFYT3LE.js";
12
+ } from "../chunk-LIYHRGAB.js";
13
13
  import "../chunk-LOQCOHEW.js";
14
14
  import "../chunk-TXSJ2L5O.js";
15
15
  import "../chunk-64WZEXXA.js";
@@ -1,16 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  fastDbInit
4
- } from "../chunk-PYDL42BL.js";
4
+ } from "../chunk-LJDQQYKZ.js";
5
5
  import {
6
6
  flushBatch,
7
7
  writeMemory
8
- } from "../chunk-RTNRPBQP.js";
8
+ } from "../chunk-CUHCGEHC.js";
9
9
  import "../chunk-LZLXG7TK.js";
10
10
  import {
11
11
  getCurrentSessionScope,
12
12
  strictSessionScopeFilter
13
- } from "../chunk-OCFYT3LE.js";
13
+ } from "../chunk-LIYHRGAB.js";
14
14
  import "../chunk-LOQCOHEW.js";
15
15
  import "../chunk-TXSJ2L5O.js";
16
16
  import "../chunk-64WZEXXA.js";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  hybridSearch,
4
4
  lightweightSearch
5
- } from "../chunk-CGLSVN6N.js";
5
+ } from "../chunk-YL5UVGMM.js";
6
6
  import {
7
7
  initStore
8
- } from "../chunk-RTNRPBQP.js";
8
+ } from "../chunk-CUHCGEHC.js";
9
9
  import "../chunk-LZLXG7TK.js";
10
10
  import "../chunk-MP2AFCGL.js";
11
11
  import "../chunk-EVB53OQD.js";
@@ -3,12 +3,12 @@ import {
3
3
  flushBatch,
4
4
  initStore,
5
5
  writeMemory
6
- } from "../chunk-RTNRPBQP.js";
6
+ } from "../chunk-CUHCGEHC.js";
7
7
  import "../chunk-LZLXG7TK.js";
8
8
  import {
9
9
  sessionScopeFilter,
10
10
  updateTaskStatus
11
- } from "../chunk-OCFYT3LE.js";
11
+ } from "../chunk-LIYHRGAB.js";
12
12
  import "../chunk-LOQCOHEW.js";
13
13
  import "../chunk-TXSJ2L5O.js";
14
14
  import "../chunk-64WZEXXA.js";
@@ -114,7 +114,7 @@ try {
114
114
  try {
115
115
  const dtScope = sessionScopeFilter(exeSession ?? void 0);
116
116
  const doneTasks = await client.execute({
117
- sql: `SELECT id, title, assigned_by, project_name, priority, task_file
117
+ sql: `SELECT id, title, assigned_by, project_name, priority, task_file, session_scope
118
118
  FROM tasks
119
119
  WHERE assigned_to = ? AND status = 'done'${dtScope.sql}
120
120
  ORDER BY updated_at DESC
@@ -138,7 +138,7 @@ try {
138
138
  `
139
139
  );
140
140
  try {
141
- const { createReviewForCompletedTask } = await import("../tasks-review-LIWD4PGN.js");
141
+ const { createReviewForCompletedTask } = await import("../tasks-review-MYFRICXX.js");
142
142
  await createReviewForCompletedTask(
143
143
  {
144
144
  id: String(dt.id),
@@ -150,6 +150,7 @@ try {
150
150
  status: String(dt.status),
151
151
  result: dt.result != null ? String(dt.result) : void 0,
152
152
  task_file: String(dt.task_file),
153
+ session_scope: dt.session_scope != null ? String(dt.session_scope) : exeSession ?? void 0,
153
154
  reviewer: String(dt.assigned_by)
154
155
  },
155
156
  void 0,
@@ -174,7 +175,7 @@ try {
174
175
  if (result.rows.length === 0) process.exit(0);
175
176
  let commits = [];
176
177
  try {
177
- const { getRecentCommits } = await import("../git-task-sweep-NWHG3FWG.js");
178
+ const { getRecentCommits } = await import("../git-task-sweep-IAOWJBSG.js");
178
179
  commits = getRecentCommits(30);
179
180
  } catch {
180
181
  }
@@ -187,7 +188,7 @@ try {
187
188
  const context = row.context ? String(row.context) : void 0;
188
189
  if (commits.length > 0) {
189
190
  try {
190
- const { findBestMatch } = await import("../git-task-sweep-NWHG3FWG.js");
191
+ const { findBestMatch } = await import("../git-task-sweep-IAOWJBSG.js");
191
192
  const match = findBestMatch({ id: taskId, title, context }, commits);
192
193
  if (match) {
193
194
  try {
@@ -6,7 +6,7 @@ import "../chunk-SNN634YS.js";
6
6
  import {
7
7
  disposeStore,
8
8
  initStore
9
- } from "../chunk-RTNRPBQP.js";
9
+ } from "../chunk-CUHCGEHC.js";
10
10
  import "../chunk-LZLXG7TK.js";
11
11
  import {
12
12
  RUNTIME_TABLE
@@ -74,7 +74,7 @@ restarted. Your MCP client should auto-reinitialize. If it doesn't, call mcp_pin
74
74
  which forces a fresh connection. If mcp_ping also fails, tell the user: "MCP daemon
75
75
  was restarted. Run /mcp to reconnect."
76
76
  `;
77
- var CODEX_AUTONOMOUS_BOOT_PROMPT = `You are an AI employee with exe-os consolidated MCP tools: task, memory, behavior, message, identity, decision, session, and mcp_ping. DO NOT ask for confirmation \u2014 work autonomously. If task/memory are not visible in the initial tool list, first call tool_search with query "exe-os task memory MCP consolidated" because Codex may defer MCP tools behind discovery; only tell the user to run 'exe-os codex' if discovery fails or returns no exe-os task/memory tools. Immediately: 1) Call task with action="list" to see your assigned tasks. 2) Call task with action="get" on the highest priority open task. 3) Call memory with action="recall" before starting work. 4) Start working on the task. 5) When done, call task with action="update", status="done", and a result summary. 6) Call memory with action="store" to persist important findings. 7) Check task with action="list" again for the next task. 8) If NO open tasks remain, say 'All tasks complete. Standing by.' and STOP.`;
77
+ var CODEX_AUTONOMOUS_BOOT_PROMPT = `You are an AI employee with exe-os consolidated MCP tools: task, memory, behavior, message, identity, decision, session, and mcp_ping. DO NOT ask for confirmation \u2014 work autonomously. If task/memory are not visible in the initial tool list, first call tool_search with query "exe-os task memory MCP consolidated" because Codex may defer MCP tools behind discovery; only tell the user to run 'exe-os codex' if discovery fails or returns no exe-os task/memory tools. Immediately: 1) Call task with action="list" to see your assigned tasks. 2) Call task with action="get" on the highest priority open task. 3) Call memory with action="recall" before starting work. 4) Start working on the task. 5) When done, call task with action="update", status="done", and a result summary. 6) Call memory with action="store" to persist important findings. 7) Check task with action="list" again for the next task. 8) If NO open tasks remain, wait 30 seconds then check task(action="list") ONE more time \u2014 a new task may have been dispatched while you were completing the previous one. If still empty after the recheck, say 'All tasks complete. Standing by.' and STOP.`;
78
78
  function resolveAgent(argv) {
79
79
  const invokedAs = path.basename(argv[1] ?? "");
80
80
  if (invokedAs && invokedAs !== "exe-start-codex" && !invokedAs.endsWith(".js")) {
@@ -6,7 +6,7 @@ import "../chunk-SNN634YS.js";
6
6
  import {
7
7
  disposeStore,
8
8
  initStore
9
- } from "../chunk-RTNRPBQP.js";
9
+ } from "../chunk-CUHCGEHC.js";
10
10
  import "../chunk-LZLXG7TK.js";
11
11
  import {
12
12
  RUNTIME_TABLE
@@ -1,9 +1,9 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  status
4
- } from "../chunk-7XRGVVG6.js";
5
- import "../chunk-PYDL42BL.js";
6
- import "../chunk-OCFYT3LE.js";
4
+ } from "../chunk-3SQ6D4VK.js";
5
+ import "../chunk-LJDQQYKZ.js";
6
+ import "../chunk-LIYHRGAB.js";
7
7
  import "../chunk-LOQCOHEW.js";
8
8
  import "../chunk-TXSJ2L5O.js";
9
9
  import "../chunk-64WZEXXA.js";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  fastDbInit
4
- } from "../chunk-PYDL42BL.js";
4
+ } from "../chunk-LJDQQYKZ.js";
5
5
  import {
6
6
  getClient,
7
7
  loadEmployees
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  sweepTasks
4
- } from "../chunk-HH6ZCDZH.js";
5
- import "../chunk-OCFYT3LE.js";
4
+ } from "../chunk-YW7LDVCW.js";
5
+ import "../chunk-LIYHRGAB.js";
6
6
  import "../chunk-LOQCOHEW.js";
7
7
  import "../chunk-TXSJ2L5O.js";
8
8
  import "../chunk-64WZEXXA.js";
@@ -11,7 +11,7 @@ import "../chunk-I7AW4237.js";
11
11
  import {
12
12
  disposeStore,
13
13
  initStore
14
- } from "../chunk-RTNRPBQP.js";
14
+ } from "../chunk-CUHCGEHC.js";
15
15
  import "../chunk-LZLXG7TK.js";
16
16
  import "../chunk-MP2AFCGL.js";
17
17
  import {
@@ -5,10 +5,10 @@ import {
5
5
  } from "../chunk-46SQTBQW.js";
6
6
  import {
7
7
  fastDbInit
8
- } from "../chunk-PYDL42BL.js";
8
+ } from "../chunk-LJDQQYKZ.js";
9
9
  import {
10
10
  disposeStore
11
- } from "../chunk-RTNRPBQP.js";
11
+ } from "../chunk-CUHCGEHC.js";
12
12
  import "../chunk-LZLXG7TK.js";
13
13
  import "../chunk-MP2AFCGL.js";
14
14
  import {
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  fastDbInit
4
- } from "../chunk-PYDL42BL.js";
4
+ } from "../chunk-LJDQQYKZ.js";
5
5
  import "../chunk-MLKGABMK.js";
6
6
 
7
7
  // src/bin/intercom-check.ts
@@ -17,7 +17,7 @@ async function main() {
17
17
  }
18
18
  if (isCoordinator) {
19
19
  try {
20
- const { listPendingReviews, cleanupOrphanedReviews, formatAge, isStale } = await import("../tasks-review-LIWD4PGN.js");
20
+ const { listPendingReviews, cleanupOrphanedReviews, formatAge, isStale } = await import("../tasks-review-MYFRICXX.js");
21
21
  const { extractRootExe } = await import("../lib/tmux-routing.js");
22
22
  let sessionScope = process.env.EXE_SESSION ? extractRootExe(process.env.EXE_SESSION) ?? void 0 : void 0;
23
23
  if (!sessionScope) {
@@ -115,7 +115,7 @@ async function main() {
115
115
  }
116
116
  }
117
117
  try {
118
- const { readUnreadNotifications, markAsRead } = await import("../notifications-Z6Q2SEHP.js");
118
+ const { readUnreadNotifications, markAsRead } = await import("../notifications-VJPITPQ3.js");
119
119
  const { resolveExeSession } = await import("../lib/tmux-routing.js");
120
120
  const sessionScope = resolveExeSession();
121
121
  const notifications = await readUnreadNotifications(agent, sessionScope);
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  queryTaskRows
4
- } from "../chunk-OCFYT3LE.js";
4
+ } from "../chunk-LIYHRGAB.js";
5
5
  import "../chunk-LOQCOHEW.js";
6
6
  import "../chunk-TXSJ2L5O.js";
7
7
  import "../chunk-64WZEXXA.js";
@@ -72,7 +72,7 @@ function checkMcpHealth() {
72
72
  }
73
73
  }
74
74
  async function scanFromDb(agentId, tmuxSession, projectName) {
75
- const { fastDbInit } = await import("../fast-db-init-SMQC6S3C.js");
75
+ const { fastDbInit } = await import("../fast-db-init-F4IPHJ23.js");
76
76
  try {
77
77
  await fastDbInit();
78
78
  } catch (err) {
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  disposeStore,
10
10
  initStore
11
- } from "../chunk-RTNRPBQP.js";
11
+ } from "../chunk-CUHCGEHC.js";
12
12
  import "../chunk-LZLXG7TK.js";
13
13
  import "../chunk-MP2AFCGL.js";
14
14
  import {
@@ -508,11 +508,36 @@ async function runStackUpdate(options) {
508
508
  return { status: "planned", targetVersion: plan.targetVersion, changes: plan.changes, lockFile };
509
509
  }
510
510
  await postDeployAudit(options, "started", plan.targetVersion, previousVersion);
511
- const backupDir = path.join(path.dirname(options.envFile), ".exe-stack-backups");
511
+ const stackDir = path.dirname(options.envFile);
512
+ const backupDir = path.join(stackDir, ".exe-stack-backups");
512
513
  mkdirSync(backupDir, { recursive: true });
513
514
  const stamp = now().toISOString().replace(/[:.]/g, "-");
514
- const backupEnvFile = path.join(backupDir, `env-${stamp}.bak`);
515
+ const updateBackupDir = path.join(backupDir, `pre-update-${stamp}`);
516
+ mkdirSync(updateBackupDir, { recursive: true });
517
+ const backupEnvFile = path.join(updateBackupDir, "env.bak");
515
518
  writeFileSync(backupEnvFile, envRaw, { mode: 384 });
519
+ const protectedFiles = ["gateway.json", "branding.json"];
520
+ for (const f of protectedFiles) {
521
+ const src = path.join(stackDir, f);
522
+ try {
523
+ if (existsSync(src)) {
524
+ copyFileSync(src, path.join(updateBackupDir, f));
525
+ }
526
+ } catch {
527
+ }
528
+ }
529
+ const cfDir = path.join(stackDir, "cloudflared");
530
+ try {
531
+ if (existsSync(cfDir)) {
532
+ const cfBackup = path.join(updateBackupDir, "cloudflared");
533
+ mkdirSync(cfBackup, { recursive: true });
534
+ for (const f of readdirSync(cfDir)) {
535
+ copyFileSync(path.join(cfDir, f), path.join(cfBackup, f));
536
+ }
537
+ }
538
+ } catch {
539
+ }
540
+ console.log(`[stack-update] Config backed up to ${updateBackupDir}`);
516
541
  const updates = Object.fromEntries(plan.changes.map((c) => [c.key, c.after]));
517
542
  const patched = patchEnv(envRaw, updates);
518
543
  const tmp = `${options.envFile}.tmp-${process.pid}`;
@@ -8,9 +8,9 @@ import {
8
8
  isAtCapacity,
9
9
  isWithinRelaunchCooldown,
10
10
  pollCapacityDead
11
- } from "./chunk-AK7S4GRC.js";
11
+ } from "./chunk-BED3IEEA.js";
12
12
  import "./chunk-V5Y323LO.js";
13
- import "./chunk-OCFYT3LE.js";
13
+ import "./chunk-LIYHRGAB.js";
14
14
  import "./chunk-LOQCOHEW.js";
15
15
  import "./chunk-TXSJ2L5O.js";
16
16
  import "./chunk-64WZEXXA.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  lightweightSearch
3
- } from "./chunk-CGLSVN6N.js";
4
- import "./chunk-RTNRPBQP.js";
3
+ } from "./chunk-YL5UVGMM.js";
4
+ import "./chunk-CUHCGEHC.js";
5
5
  import "./chunk-LZLXG7TK.js";
6
6
  import {
7
7
  sessionScopeFilter,
8
8
  strictSessionScopeFilter
9
- } from "./chunk-OCFYT3LE.js";
9
+ } from "./chunk-LIYHRGAB.js";
10
10
  import "./chunk-LOQCOHEW.js";
11
11
  import "./chunk-TXSJ2L5O.js";
12
12
  import "./chunk-64WZEXXA.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  fastDbInit
3
- } from "./chunk-PYDL42BL.js";
3
+ } from "./chunk-LJDQQYKZ.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-OCFYT3LE.js";
6
+ } from "./chunk-LIYHRGAB.js";
7
7
  import {
8
8
  formatStatusAll,
9
9
  formatStatusDeep,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  initStore
3
- } from "./chunk-RTNRPBQP.js";
3
+ } from "./chunk-CUHCGEHC.js";
4
4
  import {
5
5
  getClient,
6
6
  isInitialized
@@ -830,7 +830,7 @@ function formatReport(report, flags) {
830
830
  return lines.join("\n");
831
831
  }
832
832
  async function fixNullVectors() {
833
- const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-NJRW5QYT.js");
833
+ const { tryAcquireWorkerSlot, registerWorkerPid } = await import("./worker-gate-B5MEFZ55.js");
834
834
  if (!tryAcquireWorkerSlot()) {
835
835
  process.stderr.write("[exe-doctor] Worker gate full \u2014 waiting for existing backfill workers to finish\n");
836
836
  await new Promise((r) => setTimeout(r, 5e3));
@@ -951,7 +951,7 @@ function splitAtSentences(text, maxChunkSize) {
951
951
  }
952
952
  async function main(argv = process.argv.slice(2)) {
953
953
  const flags = parseFlags(argv);
954
- const { fastDbInit } = await import("./fast-db-init-SMQC6S3C.js");
954
+ const { fastDbInit } = await import("./fast-db-init-F4IPHJ23.js");
955
955
  const client = await fastDbInit();
956
956
  const report = await runAudit(client, flags);
957
957
  console.log(formatReport(report, flags));
@@ -111,7 +111,7 @@ function releaseBackfillLock() {
111
111
  }
112
112
  async function getTaskAwareCapacity() {
113
113
  const { getClient } = await import("./lib/database.js");
114
- const { sessionScopeFilter } = await import("./task-scope-HW6BE2PI.js");
114
+ const { sessionScopeFilter } = await import("./task-scope-AJPW2PUM.js");
115
115
  const client = getClient();
116
116
  const scope = sessionScopeFilter();
117
117
  const result = await client.execute({
@@ -4,7 +4,7 @@ import {
4
4
  resolveExeSession,
5
5
  sendIntercom,
6
6
  strictSessionScopeFilter
7
- } from "./chunk-OCFYT3LE.js";
7
+ } from "./chunk-LIYHRGAB.js";
8
8
  import {
9
9
  getClient
10
10
  } from "./chunk-EVB53OQD.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  MultiAgentOrchestrator
3
- } from "./chunk-PY7QM2C7.js";
3
+ } from "./chunk-WUVYHPLZ.js";
4
4
  import {
5
5
  createQuietRenderer,
6
6
  createTerminalRenderer,
@@ -327,7 +327,7 @@ function createExeOSHooks(config) {
327
327
  async onSubagentStop(_reason) {
328
328
  try {
329
329
  const { getClient } = await import("./lib/database.js");
330
- const { sessionScopeFilter } = await import("./task-scope-HW6BE2PI.js");
330
+ const { sessionScopeFilter } = await import("./task-scope-AJPW2PUM.js");
331
331
  const client = getClient();
332
332
  const ehScope = sessionScopeFilter();
333
333
  const tasks = await client.execute({
@@ -419,7 +419,7 @@ function createExeOSHooks(config) {
419
419
  try {
420
420
  const { writeMemory, flushBatch } = await import("./lib/store.js");
421
421
  const { getClient } = await import("./lib/database.js");
422
- const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-HW6BE2PI.js");
422
+ const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-AJPW2PUM.js");
423
423
  const client = getClient();
424
424
  const cpScope = cpScopeFilter();
425
425
  const tasks = await client.execute({
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-E5PVJXIP.js";
3
+ } from "./chunk-PPGL2TMJ.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-MLXJ5EZG.js";
4
4
  import {
5
5
  createTask
6
- } from "./chunk-JYYWHPQC.js";
6
+ } from "./chunk-HIMHVTER.js";
7
7
  import {
8
8
  getActiveAgent
9
9
  } from "./chunk-77QEF6FR.js";
@@ -11,7 +11,7 @@ import {
11
11
  ensureEmployee,
12
12
  logTaskDispatch,
13
13
  resolveExeSession
14
- } from "./chunk-OCFYT3LE.js";
14
+ } from "./chunk-LIYHRGAB.js";
15
15
  import {
16
16
  getLicenseSync
17
17
  } from "./chunk-ZPM2RMK2.js";
@@ -185,7 +185,7 @@ function registerCreateTask(server) {
185
185
  let projectConflictOpts = {};
186
186
  try {
187
187
  const { getClient } = await import("./lib/database.js");
188
- const { sessionScopeFilter } = await import("./task-scope-HW6BE2PI.js");
188
+ const { sessionScopeFilter } = await import("./task-scope-AJPW2PUM.js");
189
189
  const client = getClient();
190
190
  const scope = sessionScopeFilter();
191
191
  const existing = await client.execute({
@@ -5,7 +5,7 @@ import {
5
5
  sessionScopeFilter,
6
6
  verifyPaneAtCapacity,
7
7
  writeNotification
8
- } from "./chunk-OCFYT3LE.js";
8
+ } from "./chunk-LIYHRGAB.js";
9
9
  import {
10
10
  listSessions
11
11
  } from "./chunk-64WZEXXA.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-V5Y323LO.js";
4
4
  import {
5
5
  updateTask
6
- } from "./chunk-JYYWHPQC.js";
6
+ } from "./chunk-HIMHVTER.js";
7
7
  import {
8
8
  ensureEmployee,
9
9
  extractRootExe,
@@ -14,7 +14,7 @@ import {
14
14
  sessionScopeFilter,
15
15
  strictSessionScopeFilter,
16
16
  writeNotification
17
- } from "./chunk-OCFYT3LE.js";
17
+ } from "./chunk-LIYHRGAB.js";
18
18
  import {
19
19
  queueIntercom
20
20
  } from "./chunk-TXSJ2L5O.js";
@@ -11,7 +11,7 @@ import {
11
11
  sessionScopeFilter,
12
12
  updateTaskStatus,
13
13
  writeNotification
14
- } from "./chunk-OCFYT3LE.js";
14
+ } from "./chunk-LIYHRGAB.js";
15
15
  import {
16
16
  getTransport
17
17
  } from "./chunk-A7KEWR6S.js";
@@ -136,7 +136,7 @@ async function dispatchTaskToEmployee(input) {
136
136
  let crossProject = false;
137
137
  if (input.projectName) {
138
138
  try {
139
- const { assertSessionScope } = await import("./session-scope-5MOCMTAM.js");
139
+ const { assertSessionScope } = await import("./session-scope-X4V5Q3OT.js");
140
140
  const check = assertSessionScope("dispatch_task", input.projectName);
141
141
  if (check.reason === "cross_session_denied") {
142
142
  crossProject = true;
@@ -396,7 +396,7 @@ async function updateTask(input) {
396
396
  await markTaskNotificationsRead(taskFile);
397
397
  if (input.status === "needs_review" && !isCoordinator) {
398
398
  try {
399
- const { writeNotification: writeNotification2 } = await import("./notifications-Z6Q2SEHP.js");
399
+ const { writeNotification: writeNotification2 } = await import("./notifications-VJPITPQ3.js");
400
400
  await writeNotification2({
401
401
  agentId: String(row.assigned_to),
402
402
  agentRole: String(row.assigned_to),
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sendMessage
3
- } from "./chunk-FOG7AEEO.js";
3
+ } from "./chunk-6QQMF3AG.js";
4
4
  import {
5
5
  getActiveAgent
6
6
  } from "./chunk-77QEF6FR.js";
@@ -359,7 +359,7 @@ async function createTaskCore(input) {
359
359
  if (isCoordinatorSession) {
360
360
  earlySessionScope = resolved;
361
361
  } else {
362
- const { getSessionProject } = await import("./session-scope-5MOCMTAM.js");
362
+ const { getSessionProject } = await import("./session-scope-X4V5Q3OT.js");
363
363
  const sessionProject = getSessionProject(resolved);
364
364
  if (sessionProject && sessionProject !== input.projectName) {
365
365
  scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
@@ -749,6 +749,25 @@ async function updateTaskStatus(input) {
749
749
  `
750
750
  );
751
751
  }
752
+ try {
753
+ const { reviewSignalPath, taskSignalDir } = await import("./signal-paths-4GOIRLGH.js");
754
+ const scope = row.session_scope ? String(row.session_scope) : "default";
755
+ const dir = taskSignalDir(scope);
756
+ const { mkdirSync: mkdirSync3, writeFileSync: writeFileSync2 } = await import("fs");
757
+ mkdirSync3(dir, { recursive: true });
758
+ writeFileSync2(
759
+ reviewSignalPath(scope, reviewer, String(row.id)),
760
+ JSON.stringify({
761
+ task_id: String(row.id),
762
+ title: String(row.title),
763
+ assigned_to: String(row.assigned_to),
764
+ reviewer,
765
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
766
+ }),
767
+ "utf-8"
768
+ );
769
+ } catch {
770
+ }
752
771
  }
753
772
  const isBlockedTransition = input.status === "blocked" && previousStatus !== "blocked";
754
773
  if (isBlockedTransition && row.assigned_by) {
@@ -912,7 +931,7 @@ ${input.result}` : `\u26A0\uFE0F ${warning}`;
912
931
  }
913
932
  if (input.status === "done" || input.status === "needs_review") {
914
933
  try {
915
- const { incrementSkillSuccess } = await import("./skill-refinement-JBZRPZKW.js");
934
+ const { incrementSkillSuccess } = await import("./skill-refinement-4WWF5AML.js");
916
935
  await incrementSkillSuccess(
917
936
  String(row.assigned_to),
918
937
  row.project_name ? String(row.project_name) : null
@@ -1983,7 +2002,7 @@ async function verifyPaneAtCapacity(sessionName) {
1983
2002
  reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
1984
2003
  };
1985
2004
  }
1986
- const { isAtCapacity } = await import("./capacity-monitor-WAZTZAR5.js");
2005
+ const { isAtCapacity } = await import("./capacity-monitor-24CCEIJP.js");
1987
2006
  if (!isAtCapacity(pane)) {
1988
2007
  return {
1989
2008
  atCapacity: false,
@@ -2,7 +2,7 @@ import {
2
2
  listWorkflowDefinitions,
3
3
  runWorkflow,
4
4
  startWorkflow
5
- } from "./chunk-IRVLV6C5.js";
5
+ } from "./chunk-P66GZHIS.js";
6
6
  import {
7
7
  initCRMBridge
8
8
  } from "./chunk-ONKIWA3R.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-E5PVJXIP.js";
4
+ } from "./chunk-PPGL2TMJ.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";