@askexenow/exe-os 0.9.198 → 0.9.199

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 (151) hide show
  1. package/deploy/compose/cloudflared/config.yml.example +3 -0
  2. package/deploy/compose/init-db.sql +4 -0
  3. package/deploy/stack-manifests/v0.9.json +5 -0
  4. package/dist/{backfill-metadata-KYCN4I7C.js → backfill-metadata-RL7T4XGY.js} +1 -1
  5. package/dist/bin/agentic-ontology-backfill.js +1 -1
  6. package/dist/bin/agentic-reflection-backfill.js +1 -1
  7. package/dist/bin/agentic-semantic-label.js +1 -1
  8. package/dist/bin/backfill-conversations.js +1 -1
  9. package/dist/bin/backfill-responses.js +1 -1
  10. package/dist/bin/backfill-vectors.js +2 -2
  11. package/dist/bin/bulk-sync-postgres.js +1 -1
  12. package/dist/bin/cleanup-stale-review-tasks.js +2 -2
  13. package/dist/bin/cli.js +10 -10
  14. package/dist/bin/exe-agent.js +8 -8
  15. package/dist/bin/exe-assign.js +1 -1
  16. package/dist/bin/exe-boot.js +4 -4
  17. package/dist/bin/exe-call.js +1 -1
  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 +3 -9
  26. package/dist/bin/exe-new-employee.js +2 -2
  27. package/dist/bin/exe-pending-messages.js +3 -3
  28. package/dist/bin/exe-pending-notifications.js +2 -2
  29. package/dist/bin/exe-pending-reviews.js +2 -2
  30. package/dist/bin/exe-rename.js +1 -1
  31. package/dist/bin/exe-review.js +3 -3
  32. package/dist/bin/exe-search.js +2 -2
  33. package/dist/bin/exe-session-cleanup.js +5 -5
  34. package/dist/bin/exe-start-codex.js +2 -2
  35. package/dist/bin/exe-start-opencode.js +2 -2
  36. package/dist/bin/exe-status.js +3 -3
  37. package/dist/bin/exe-team.js +1 -1
  38. package/dist/bin/generate-hook-manifest.js +30 -0
  39. package/dist/bin/git-sweep.js +2 -2
  40. package/dist/bin/graph-backfill.js +1 -1
  41. package/dist/bin/graph-export.js +2 -2
  42. package/dist/bin/import-history.js +1 -1
  43. package/dist/bin/install.js +3 -3
  44. package/dist/bin/intercom-check.js +3 -3
  45. package/dist/bin/scan-tasks.js +2 -2
  46. package/dist/bin/setup.js +1 -1
  47. package/dist/bin/shard-migrate.js +1 -1
  48. package/dist/browser-sanitizer-Q3GWRYKI.js +229 -0
  49. package/dist/browser-session-store-TSD4PCY7.js +232 -0
  50. package/dist/{capacity-monitor-H7D43IUQ.js → capacity-monitor-2TRPP3AX.js} +2 -2
  51. package/dist/{catchup-brief-PTVQRBQK.js → catchup-brief-74ORL525.js} +3 -3
  52. package/dist/{chunk-BM4X3WHU.js → chunk-2DWKMJPE.js} +1 -1
  53. package/dist/{chunk-EMUQSTJL.js → chunk-2HEXCZGP.js} +1 -1
  54. package/dist/{chunk-HX4ULQ3E.js → chunk-5YVGHP2B.js} +11 -11
  55. package/dist/{chunk-5RT7IBY4.js → chunk-6BJ5GZD4.js} +3 -3
  56. package/dist/{chunk-BUN6JIDP.js → chunk-ACOQS4ZL.js} +1 -1
  57. package/dist/{chunk-HH4UGDJH.js → chunk-CGAYSKQF.js} +2 -2
  58. package/dist/{chunk-ADI4Z63O.js → chunk-DNEOEKWA.js} +2 -2
  59. package/dist/{chunk-62DAMAFL.js → chunk-FDD7KX7Q.js} +3 -3
  60. package/dist/{chunk-7AJST6LP.js → chunk-FXVTLBBA.js} +1 -1
  61. package/dist/{chunk-CGDA6NJI.js → chunk-IFFVONU6.js} +1 -1
  62. package/dist/{chunk-VGBQKQHJ.js → chunk-JDGCEOT4.js} +1 -1
  63. package/dist/{chunk-2EVDBTCZ.js → chunk-JDHB6I4O.js} +1 -1
  64. package/dist/{chunk-FL4PEEWL.js → chunk-JQLWMZZJ.js} +1 -1
  65. package/dist/{chunk-CHZMPZJ3.js → chunk-JRLSQFIE.js} +44 -44
  66. package/dist/{chunk-34ENR4JM.js → chunk-KRYEHI4V.js} +2 -2
  67. package/dist/{chunk-WP6P3LSI.js → chunk-MABQMUCQ.js} +9 -26
  68. package/dist/chunk-MNNWWEVJ.js +58 -0
  69. package/dist/{chunk-LLEB3QLI.js → chunk-MWGAC2ER.js} +1 -1
  70. package/dist/{chunk-UTDZUTRN.js → chunk-OF6TXNOC.js} +1 -1
  71. package/dist/{chunk-HH2QED73.js → chunk-OYU7TCBG.js} +1 -1
  72. package/dist/{chunk-UTUYZCQA.js → chunk-PHIQW2IU.js} +3 -3
  73. package/dist/{chunk-FXYOH3NG.js → chunk-RUKOGGQG.js} +1 -1
  74. package/dist/{chunk-FC3U23FN.js → chunk-WSYFZZCP.js} +2 -2
  75. package/dist/{chunk-QCNSCSCH.js → chunk-YZIUQ77U.js} +2 -2
  76. package/dist/{chunk-IUC2332K.js → chunk-ZAF4GJTD.js} +4 -4
  77. package/dist/{chunk-Q4WJJBOP.js → chunk-ZLP5TNRU.js} +1 -1
  78. package/dist/{crm-webhook-LRLN55LB.js → crm-webhook-OFWPEK33.js} +2 -2
  79. package/dist/{cto-delegation-gate-2FZN5SUY.js → cto-delegation-gate-7PGS5IN4.js} +1 -1
  80. package/dist/{daemon-orchestration-ZBSS6VZR.js → daemon-orchestration-MP3PPX7Q.js} +3 -3
  81. package/dist/{exe-export-4ZJTQRRE.js → exe-export-QMGWH3PL.js} +1 -1
  82. package/dist/{exe-import-JI3FTSWZ.js → exe-import-7NNKSCKI.js} +1 -1
  83. package/dist/{fast-db-init-URP3KJAE.js → fast-db-init-DAZZ7ZUP.js} +1 -1
  84. package/dist/gateway/index.js +5 -5
  85. package/dist/{git-task-sweep-GPPNL2DK.js → git-task-sweep-SLANXCSW.js} +2 -2
  86. package/dist/hooks/bug-report-worker.js +3 -3
  87. package/dist/hooks/codex-stop-task-finalizer.js +3 -3
  88. package/dist/hooks/commit-complete.js +4 -4
  89. package/dist/hooks/error-recall.js +2 -2
  90. package/dist/hooks/ingest.js +2 -2
  91. package/dist/hooks/instructions-loaded.js +1 -1
  92. package/dist/hooks/manifest.json +25 -0
  93. package/dist/hooks/notification.js +1 -1
  94. package/dist/hooks/post-compact.js +2 -2
  95. package/dist/hooks/post-tool-combined.js +2 -2
  96. package/dist/hooks/pre-compact.js +3 -3
  97. package/dist/hooks/pre-tool-use.js +6 -6
  98. package/dist/hooks/prompt-submit.js +8 -8
  99. package/dist/hooks/session-end.js +18 -4
  100. package/dist/hooks/session-start.js +17 -4
  101. package/dist/hooks/stop.js +5 -5
  102. package/dist/hooks/subagent-stop.js +2 -2
  103. package/dist/hooks/summary-worker.js +5 -5
  104. package/dist/index.js +10 -10
  105. package/dist/{installer-4SH2HTIU.js → installer-CWKEI7SE.js} +2 -2
  106. package/dist/{installer-BTOQSNZI.js → installer-DWVZFKAH.js} +4 -4
  107. package/dist/{installer-MWOEIXKV.js → installer-GSA2KOSE.js} +2 -2
  108. package/dist/lib/consolidation.js +2 -2
  109. package/dist/lib/embed-worker.js +81 -14
  110. package/dist/lib/employee-templates.js +1 -1
  111. package/dist/lib/exe-daemon.js +62 -13
  112. package/dist/lib/hybrid-search.js +2 -2
  113. package/dist/lib/messaging.js +2 -2
  114. package/dist/lib/schedules.js +2 -2
  115. package/dist/lib/store.js +1 -1
  116. package/dist/lib/tasks.js +2 -2
  117. package/dist/lib/tmux-routing.js +1 -1
  118. package/dist/mcp/register-tools.js +26 -26
  119. package/dist/mcp/server.js +29 -29
  120. package/dist/mcp/tools/create-task.js +3 -3
  121. package/dist/mcp/tools/list-tasks.js +3 -3
  122. package/dist/mcp/tools/send-message.js +3 -3
  123. package/dist/mcp/tools/update-task.js +3 -3
  124. package/dist/{notifications-GENT3AWZ.js → notifications-WYNI5OG6.js} +1 -1
  125. package/dist/{orchestrator-A72IFTWK.js → orchestrator-FRFCMLW3.js} +2 -2
  126. package/dist/{reranker-JJRY3V3V.js → reranker-2ZWUZRUF.js} +1 -1
  127. package/dist/{review-polling-UJ4P3BIG.js → review-polling-ADP5YFHW.js} +2 -2
  128. package/dist/runtime/index.js +11 -11
  129. package/dist/{session-events-GWEVYXPJ.js → session-events-JA3MCMZK.js} +2 -2
  130. package/dist/{session-scope-DKE6OPV5.js → session-scope-LXQKQDIS.js} +1 -1
  131. package/dist/{setup-wizard-B4WDA4KT.js → setup-wizard-GRR4F4TX.js} +1 -1
  132. package/dist/{task-enforcement-QYS2QEEO.js → task-enforcement-KSLBFILH.js} +1 -1
  133. package/dist/{task-scope-OS66ZD7O.js → task-scope-AI62AIPT.js} +1 -1
  134. package/dist/{tasks-crud-DJH4NZC2.js → tasks-crud-IEOK55IV.js} +1 -1
  135. package/dist/{tasks-review-Z6PA4AF5.js → tasks-review-ID7V6RSR.js} +1 -1
  136. package/dist/tui/App.js +8 -8
  137. package/dist/{tui-data-JI4URSHX.js → tui-data-HIFVW2PE.js} +1 -1
  138. package/dist/{worker-gate-DIILYSRZ.js → worker-gate-F3L7XDMJ.js} +1 -1
  139. package/dist/{workflow-engine-PJ5YSMRL.js → workflow-engine-H5KTDDJG.js} +2 -2
  140. package/package.json +3 -3
  141. package/release-notes.json +116 -119
  142. package/dist/chunk-WZTQUBIE.js +0 -125
  143. package/dist/{chunk-42QSXHKN.js → chunk-4X7CMJDN.js} +0 -0
  144. package/dist/{chunk-ZGPURQ4J.js → chunk-54MZI4PK.js} +0 -0
  145. package/dist/{chunk-TF2BZTXF.js → chunk-7WUBXLK2.js} +3 -3
  146. /package/dist/{chunk-SSRRHKIO.js → chunk-MQLMIY6U.js} +0 -0
  147. /package/dist/{chunk-M4UP7VWO.js → chunk-NF4AEKQK.js} +0 -0
  148. /package/dist/{chunk-LZU4HY4C.js → chunk-XNXTN5XZ.js} +0 -0
  149. /package/dist/{core-memory-UHWYIN2A.js → core-memory-VQKCHGFX.js} +0 -0
  150. /package/dist/{exe-key-4EUOGKBN.js → exe-key-QZ5GWV6D.js} +0 -0
  151. /package/dist/{skill-refinement-2U2UCV2H.js → skill-refinement-3UVLBCZD.js} +0 -0
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  lightweightSearch
3
- } from "./chunk-IUC2332K.js";
4
- import "./chunk-42QSXHKN.js";
3
+ } from "./chunk-ZAF4GJTD.js";
4
+ import "./chunk-4X7CMJDN.js";
5
5
  import "./chunk-CHCA3ZM2.js";
6
6
  import "./chunk-OO5CPMT3.js";
7
7
  import {
8
8
  sessionScopeFilter,
9
9
  strictSessionScopeFilter
10
- } from "./chunk-WP6P3LSI.js";
10
+ } from "./chunk-MABQMUCQ.js";
11
11
  import "./chunk-RN6XYY7U.js";
12
12
  import "./chunk-QI4IXJN7.js";
13
13
  import "./chunk-64WZEXXA.js";
@@ -2,7 +2,7 @@ import {
2
2
  listWorkflowDefinitions,
3
3
  runWorkflow,
4
4
  startWorkflow
5
- } from "./chunk-UTDZUTRN.js";
5
+ } from "./chunk-OF6TXNOC.js";
6
6
  import {
7
7
  initCRMBridge
8
8
  } from "./chunk-ONKIWA3R.js";
@@ -102,7 +102,7 @@ DO NOT keep working degraded. Instead:
102
102
  2. Send intercom to the COO session to trigger kill + relaunch:
103
103
  MY_SESSION=$(tmux display-message -p '#{session_name}' 2>/dev/null)
104
104
  EXE_SESSION="\${MY_SESSION#\${AGENT_ID}-}"
105
- tmux send-keys -t "$EXE_SESSION" "/exe-intercom context-full: \${AGENT_ID} hit capacity. Checkpoint saved. Resume task <task-id>." Enter
105
+ tmux send-keys -t "$EXE_SESSION" "context-full: \${AGENT_ID} hit capacity. Checkpoint saved. Resume task <task-id>." Enter
106
106
 
107
107
  3. Stop working immediately. Do not attempt to continue with degraded context.
108
108
 
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  MultiAgentOrchestrator
3
- } from "./chunk-7AJST6LP.js";
3
+ } from "./chunk-FXVTLBBA.js";
4
4
  import {
5
5
  createQuietRenderer,
6
6
  createTerminalRenderer,
7
7
  renderAgentEvents
8
8
  } from "./chunk-YZFZDJWZ.js";
9
- import {
10
- checkDangerousPatterns,
11
- hasCriticalPattern
12
- } from "./chunk-AVE2B4DQ.js";
13
9
  import {
14
10
  checkPathSafety,
15
11
  checkReadPathSafety,
16
12
  containsPathTraversal
17
13
  } from "./chunk-NGVOA6ZQ.js";
14
+ import {
15
+ checkDangerousPatterns,
16
+ hasCriticalPattern
17
+ } from "./chunk-AVE2B4DQ.js";
18
18
  import {
19
19
  ContextManager,
20
20
  agentLoop,
@@ -33,16 +33,16 @@ import {
33
33
  partitionTools,
34
34
  zodToJsonSchema
35
35
  } from "./chunk-JQ6TLNIV.js";
36
- import {
37
- composeHooks,
38
- createDefaultHooks
39
- } from "./chunk-O377P7GM.js";
40
36
  import {
41
37
  EMPLOYEE_PERMISSIONS,
42
38
  checkPermission,
43
39
  createPermissionsFromPreset,
44
40
  createRestrictedPermissions
45
41
  } from "./chunk-PRKVT4KN.js";
42
+ import {
43
+ composeHooks,
44
+ createDefaultHooks
45
+ } from "./chunk-O377P7GM.js";
46
46
  import {
47
47
  PERMISSION_PRESETS,
48
48
  evaluatePermission,
@@ -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-OS66ZD7O.js");
330
+ const { sessionScopeFilter } = await import("./task-scope-AI62AIPT.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-OS66ZD7O.js");
422
+ const { sessionScopeFilter: cpScopeFilter } = await import("./task-scope-AI62AIPT.js");
423
423
  const client = getClient();
424
424
  const cpScope = cpScopeFilter();
425
425
  const tasks = await client.execute({
@@ -11,7 +11,7 @@ import {
11
11
  sessionScopeFilter,
12
12
  updateTaskStatus,
13
13
  writeNotification
14
- } from "./chunk-WP6P3LSI.js";
14
+ } from "./chunk-MABQMUCQ.js";
15
15
  import {
16
16
  getTransport
17
17
  } from "./chunk-TXWQPL2U.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-DKE6OPV5.js");
139
+ const { assertSessionScope } = await import("./session-scope-LXQKQDIS.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-GENT3AWZ.js");
399
+ const { writeNotification: writeNotification2 } = await import("./notifications-WYNI5OG6.js");
400
400
  await writeNotification2({
401
401
  agentId: String(row.assigned_to),
402
402
  agentRole: String(row.assigned_to),
@@ -4,7 +4,7 @@ import {
4
4
  resolveExeSession,
5
5
  sendIntercom,
6
6
  strictSessionScopeFilter
7
- } from "./chunk-WP6P3LSI.js";
7
+ } from "./chunk-MABQMUCQ.js";
8
8
  import {
9
9
  getClient
10
10
  } from "./chunk-TGOJR5SS.js";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  createCRMWebhookHandler,
21
21
  parseTwentyWebhook
22
- } from "./chunk-HH2QED73.js";
22
+ } from "./chunk-OYU7TCBG.js";
23
23
  import {
24
24
  BotRegistry,
25
25
  BotRuntime,
@@ -42,7 +42,7 @@ import {
42
42
  retryWithBackoff,
43
43
  routeMessage,
44
44
  validateGatewayConfig
45
- } from "./chunk-BM4X3WHU.js";
45
+ } from "./chunk-2DWKMJPE.js";
46
46
  import {
47
47
  OllamaProvider
48
48
  } from "./chunk-FWFFZGSC.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionScopeFilter
3
- } from "./chunk-WP6P3LSI.js";
3
+ } from "./chunk-MABQMUCQ.js";
4
4
 
5
5
  // src/lib/git-task-sweep.ts
6
6
  import { execSync } from "child_process";
@@ -178,7 +178,7 @@ async function sweepTasks(projectName, options = {}) {
178
178
  }
179
179
  if (!dryRun) {
180
180
  try {
181
- const { updateTaskStatus } = await import("./tasks-crud-DJH4NZC2.js");
181
+ const { updateTaskStatus } = await import("./tasks-crud-IEOK55IV.js");
182
182
  await updateTaskStatus({
183
183
  taskId: task.id,
184
184
  status: "needs_review",
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-WRCETUYE.js";
4
4
  import {
5
5
  updateTask
6
- } from "./chunk-5RT7IBY4.js";
6
+ } from "./chunk-6BJ5GZD4.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-WP6P3LSI.js";
17
+ } from "./chunk-MABQMUCQ.js";
18
18
  import {
19
19
  queueIntercom
20
20
  } from "./chunk-QI4IXJN7.js";
@@ -331,7 +331,7 @@ async function pollIdleKill(deps, idleTickCounts, opts) {
331
331
  try {
332
332
  const { execFileSync: warnExec } = await import("child_process");
333
333
  const shutdownMsg = [
334
- "/exe-intercom SHUTDOWN WARNING: Your session will be terminated in ~90 seconds due to inactivity.",
334
+ "SHUTDOWN WARNING: Your session will be terminated in ~90 seconds due to inactivity.",
335
335
  "All your tasks are complete. Before shutdown:",
336
336
  "1. store_memory() any important decisions, discoveries, or context from this session",
337
337
  "2. If you learned anything non-obvious, commit it to memory for future sessions",
@@ -9,7 +9,7 @@ import {
9
9
  isEmployeeAlive,
10
10
  sessionScopeFilter,
11
11
  updateTaskStatus
12
- } from "./chunk-WP6P3LSI.js";
12
+ } from "./chunk-MABQMUCQ.js";
13
13
  import {
14
14
  DEFAULT_COORDINATOR_TEMPLATE_NAME,
15
15
  getCoordinatorName
@@ -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-OS66ZD7O.js");
114
+ const { sessionScopeFilter } = await import("./task-scope-AI62AIPT.js");
115
115
  const client = getClient();
116
116
  const scope = sessionScopeFilter();
117
117
  const result = await client.execute({
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-BDYUENC7.js";
4
4
  import {
5
5
  listTasks
6
- } from "./chunk-WP6P3LSI.js";
6
+ } from "./chunk-MABQMUCQ.js";
7
7
 
8
8
  // src/mcp/tools/list-tasks.ts
9
9
  import { z } from "zod";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  vectorToBlob
3
- } from "./chunk-42QSXHKN.js";
3
+ } from "./chunk-4X7CMJDN.js";
4
4
  import {
5
5
  extractKeywords,
6
6
  keywordsToString
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getCurrentSessionScope,
3
3
  strictSessionScopeFilter
4
- } from "./chunk-WP6P3LSI.js";
4
+ } from "./chunk-MABQMUCQ.js";
5
5
  import {
6
6
  getProjectName
7
7
  } from "./chunk-OPU3NYOO.js";
@@ -1,19 +1,7 @@
1
- import {
2
- getCachedLicenseGate
3
- } from "./chunk-PLNYW6PA.js";
4
- import {
5
- getToolUsageStats
6
- } from "./chunk-AFJWUI3Y.js";
7
- import {
8
- AUTO_WAKE_MAX_RETRIES
9
- } from "./chunk-62DAMAFL.js";
10
- import {
11
- getToolCapabilityIndex
12
- } from "./chunk-GHCVD7WV.js";
13
1
  import {
14
2
  isRerankerAvailable,
15
3
  rerankWithScores
16
- } from "./chunk-WZTQUBIE.js";
4
+ } from "./chunk-MNNWWEVJ.js";
17
5
  import {
18
6
  getEntityByName,
19
7
  getEntityNeighbors,
@@ -22,13 +10,25 @@ import {
22
10
  getRelationships,
23
11
  searchEntities
24
12
  } from "./chunk-KH5Y6RR4.js";
13
+ import {
14
+ listRecentSessionEvents
15
+ } from "./chunk-JQLWMZZJ.js";
16
+ import {
17
+ getToolUsageStats
18
+ } from "./chunk-AFJWUI3Y.js";
19
+ import {
20
+ AUTO_WAKE_MAX_RETRIES
21
+ } from "./chunk-FDD7KX7Q.js";
22
+ import {
23
+ getCachedLicenseGate
24
+ } from "./chunk-PLNYW6PA.js";
25
+ import {
26
+ getToolCapabilityIndex
27
+ } from "./chunk-GHCVD7WV.js";
25
28
  import {
26
29
  isToolAllowed,
27
30
  isToolAllowedForPlan
28
31
  } from "./chunk-E6ORBQHP.js";
29
- import {
30
- listRecentSessionEvents
31
- } from "./chunk-FL4PEEWL.js";
32
32
  import {
33
33
  analyzeBlastRadius,
34
34
  buildCodeContextIndex,
@@ -52,7 +52,10 @@ import {
52
52
  } from "./chunk-DH65L4XI.js";
53
53
  import {
54
54
  createOrRefreshResumeTask
55
- } from "./chunk-Q4WJJBOP.js";
55
+ } from "./chunk-ZLP5TNRU.js";
56
+ import {
57
+ registerListReminders
58
+ } from "./chunk-K6K55GMZ.js";
56
59
  import {
57
60
  registerCompleteReminder
58
61
  } from "./chunk-5XAGTHF2.js";
@@ -61,22 +64,19 @@ import {
61
64
  } from "./chunk-FBTIOBF6.js";
62
65
  import {
63
66
  registerSendMessage
64
- } from "./chunk-LLEB3QLI.js";
67
+ } from "./chunk-MWGAC2ER.js";
65
68
  import {
66
69
  registerCreateTask
67
- } from "./chunk-UTUYZCQA.js";
70
+ } from "./chunk-PHIQW2IU.js";
68
71
  import {
69
72
  registerListTasks
70
- } from "./chunk-VGBQKQHJ.js";
73
+ } from "./chunk-JDGCEOT4.js";
71
74
  import {
72
75
  registerUpdateTask
73
- } from "./chunk-QCNSCSCH.js";
76
+ } from "./chunk-YZIUQ77U.js";
74
77
  import {
75
78
  registerCreateReminder
76
79
  } from "./chunk-WATDOTGK.js";
77
- import {
78
- registerListReminders
79
- } from "./chunk-K6K55GMZ.js";
80
80
  import {
81
81
  completeReminder,
82
82
  createReminder,
@@ -100,10 +100,10 @@ import {
100
100
  import {
101
101
  createSchedule,
102
102
  parseHumanCron
103
- } from "./chunk-FXYOH3NG.js";
103
+ } from "./chunk-RUKOGGQG.js";
104
104
  import {
105
105
  status
106
- } from "./chunk-34ENR4JM.js";
106
+ } from "./chunk-KRYEHI4V.js";
107
107
  import {
108
108
  getAgentSpend
109
109
  } from "./chunk-OO5EWGC6.js";
@@ -122,7 +122,7 @@ import {
122
122
  fixShards,
123
123
  formatReport,
124
124
  runAudit
125
- } from "./chunk-FC3U23FN.js";
125
+ } from "./chunk-WSYFZZCP.js";
126
126
  import {
127
127
  runHealthCheck
128
128
  } from "./chunk-J73N5EJ6.js";
@@ -133,7 +133,7 @@ import {
133
133
  } from "./chunk-46Q3LLXC.js";
134
134
  import {
135
135
  renderClientCOOTemplate
136
- } from "./chunk-EMUQSTJL.js";
136
+ } from "./chunk-2HEXCZGP.js";
137
137
  import {
138
138
  deactivateGlobalProcedure,
139
139
  loadGlobalProcedures,
@@ -166,7 +166,7 @@ import {
166
166
  groupMemories,
167
167
  runConsolidation,
168
168
  selectUnconsolidated
169
- } from "./chunk-2EVDBTCZ.js";
169
+ } from "./chunk-JDHB6I4O.js";
170
170
  import {
171
171
  embed
172
172
  } from "./chunk-KTJ57PVS.js";
@@ -177,17 +177,17 @@ import {
177
177
  } from "./chunk-T5YT64SZ.js";
178
178
  import {
179
179
  updateTask
180
- } from "./chunk-5RT7IBY4.js";
180
+ } from "./chunk-6BJ5GZD4.js";
181
181
  import {
182
182
  fastDbInit
183
- } from "./chunk-M4UP7VWO.js";
183
+ } from "./chunk-NF4AEKQK.js";
184
184
  import {
185
185
  MAX_CONCURRENT_WORKERS
186
- } from "./chunk-CGDA6NJI.js";
186
+ } from "./chunk-IFFVONU6.js";
187
187
  import {
188
188
  hybridSearch,
189
189
  recentRecords
190
- } from "./chunk-IUC2332K.js";
190
+ } from "./chunk-ZAF4GJTD.js";
191
191
  import {
192
192
  attachDocumentMetadata,
193
193
  flushBatch,
@@ -195,7 +195,7 @@ import {
195
195
  reserveVersions,
196
196
  vectorToBlob,
197
197
  writeMemory
198
- } from "./chunk-42QSXHKN.js";
198
+ } from "./chunk-4X7CMJDN.js";
199
199
  import {
200
200
  extractKeywords,
201
201
  keywordsToString
@@ -210,7 +210,7 @@ import {
210
210
  sessionScopeFilter,
211
211
  updateTaskStatus,
212
212
  writeCheckpoint
213
- } from "./chunk-WP6P3LSI.js";
213
+ } from "./chunk-MABQMUCQ.js";
214
214
  import {
215
215
  listSessions
216
216
  } from "./chunk-64WZEXXA.js";
@@ -238,15 +238,15 @@ import {
238
238
  getAccountByName,
239
239
  getDefaultAccount
240
240
  } from "./chunk-YGAAZN3E.js";
241
- import {
242
- pushConversationToCRM
243
- } from "./chunk-ONKIWA3R.js";
244
241
  import {
245
242
  createNewTrigger,
246
243
  isScheduledTrigger,
247
244
  loadTriggers,
248
245
  sanitizeParam
249
- } from "./chunk-ZGPURQ4J.js";
246
+ } from "./chunk-54MZI4PK.js";
247
+ import {
248
+ pushConversationToCRM
249
+ } from "./chunk-ONKIWA3R.js";
250
250
  import {
251
251
  EMPLOYEES_PATH,
252
252
  addEmployee,
@@ -1557,7 +1557,7 @@ function registerMemory(server) {
1557
1557
  if (action === "core_get" || action === "core_set" || action === "core_delete") {
1558
1558
  const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-O433V5SV.js");
1559
1559
  const { agentId } = getActiveAgent2();
1560
- const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-UHWYIN2A.js");
1560
+ const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-VQKCHGFX.js");
1561
1561
  if (action === "core_get") {
1562
1562
  const entries = await getCoreMemory(agentId);
1563
1563
  const block = formatCoreMemoryBlock(entries);
@@ -2266,7 +2266,7 @@ function registerResumeEmployee(server) {
2266
2266
  };
2267
2267
  }
2268
2268
  try {
2269
- const { isTmuxSessionAlive } = await import("./tasks-crud-DJH4NZC2.js");
2269
+ const { isTmuxSessionAlive } = await import("./tasks-crud-IEOK55IV.js");
2270
2270
  const now = (/* @__PURE__ */ new Date()).toISOString();
2271
2271
  for (const row of openTasks.rows) {
2272
2272
  const status2 = String(row.status);
@@ -5433,7 +5433,7 @@ async function getAgentSessionLoad() {
5433
5433
  return { sessions: [], totalLive: 0, busySessions: 0, idleSessions: 0 };
5434
5434
  }
5435
5435
  const { getClient: getClient2 } = await import("./lib/database.js");
5436
- const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-OS66ZD7O.js");
5436
+ const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-AI62AIPT.js");
5437
5437
  const client = getClient2();
5438
5438
  const scope = sessionScopeFilter2();
5439
5439
  for (const s of liveAgentSessions) {
@@ -8028,7 +8028,7 @@ You are ${employeeName}. Role: ${role}.`, "utf-8");
8028
8028
  }
8029
8029
  try {
8030
8030
  const { generateSessionWrappers } = await import("./lib/session-wrappers.js");
8031
- const { resolvePackageRoot } = await import("./installer-4SH2HTIU.js");
8031
+ const { resolvePackageRoot } = await import("./installer-CWKEI7SE.js");
8032
8032
  generateSessionWrappers(resolvePackageRoot());
8033
8033
  } catch {
8034
8034
  }
@@ -9529,7 +9529,7 @@ function registerWorkflowTool(server) {
9529
9529
  getWorkflowInstance,
9530
9530
  listWorkflowInstances,
9531
9531
  approveWorkflowStep
9532
- } = await import("./workflow-engine-PJ5YSMRL.js");
9532
+ } = await import("./workflow-engine-H5KTDDJG.js");
9533
9533
  try {
9534
9534
  switch (input.action) {
9535
9535
  case "create_workflow": {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  fastDbInit
3
- } from "./chunk-M4UP7VWO.js";
3
+ } from "./chunk-NF4AEKQK.js";
4
4
  import {
5
5
  sessionScopeFilter
6
- } from "./chunk-WP6P3LSI.js";
6
+ } from "./chunk-MABQMUCQ.js";
7
7
  import {
8
8
  formatStatusAll,
9
9
  formatStatusDeep,
@@ -360,7 +360,7 @@ async function createTaskCore(input) {
360
360
  if (isCoordinatorSession) {
361
361
  earlySessionScope = resolved;
362
362
  } else {
363
- const { getSessionProject } = await import("./session-scope-DKE6OPV5.js");
363
+ const { getSessionProject } = await import("./session-scope-LXQKQDIS.js");
364
364
  const sessionProject = getSessionProject(resolved);
365
365
  if (sessionProject && sessionProject !== input.projectName) {
366
366
  scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
@@ -788,7 +788,7 @@ async function updateTaskStatus(input) {
788
788
  } catch {
789
789
  }
790
790
  try {
791
- const { writeNotification: writeNotification2 } = await import("./notifications-GENT3AWZ.js");
791
+ const { writeNotification: writeNotification2 } = await import("./notifications-WYNI5OG6.js");
792
792
  await writeNotification2({
793
793
  agentId: reviewer,
794
794
  agentRole: isCoordinatorName(reviewer) ? "COO" : "manager",
@@ -963,7 +963,7 @@ ${input.result}` : `\u26A0\uFE0F ${warning}`;
963
963
  }
964
964
  if (input.status === "done" || input.status === "needs_review") {
965
965
  try {
966
- const { incrementSkillSuccess } = await import("./skill-refinement-2U2UCV2H.js");
966
+ const { incrementSkillSuccess } = await import("./skill-refinement-3UVLBCZD.js");
967
967
  await incrementSkillSuccess(
968
968
  String(row.assigned_to),
969
969
  row.project_name ? String(row.project_name) : null
@@ -2041,7 +2041,7 @@ async function verifyPaneAtCapacity(sessionName) {
2041
2041
  reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
2042
2042
  };
2043
2043
  }
2044
- const { isAtCapacity } = await import("./capacity-monitor-H7D43IUQ.js");
2044
+ const { isAtCapacity } = await import("./capacity-monitor-2TRPP3AX.js");
2045
2045
  if (!isAtCapacity(pane)) {
2046
2046
  return {
2047
2047
  atCapacity: false,
@@ -2213,26 +2213,9 @@ function sendIntercom(targetSession, opts) {
2213
2213
  logIntercom(`COPY_MODE \u2192 ${targetSession} (exiting copy mode first)`);
2214
2214
  transport.sendKeys(targetSession, "q");
2215
2215
  }
2216
- const rawAgentName = targetSession.split("-")[0] ?? targetSession;
2217
- const agentName = baseAgentName(rawAgentName);
2218
- let actualRuntime = "claude";
2219
- try {
2220
- const dispatchInfoPath = path5.join(SESSION_CACHE, `dispatch-info-${targetSession}.json`);
2221
- if (existsSync5(dispatchInfoPath)) {
2222
- const dispatchInfo = JSON.parse(readFileSync3(dispatchInfoPath, "utf-8"));
2223
- if (dispatchInfo.runtime) actualRuntime = dispatchInfo.runtime;
2224
- } else {
2225
- actualRuntime = getAgentRuntime(agentName).runtime;
2226
- }
2227
- } catch {
2228
- actualRuntime = getAgentRuntime(agentName).runtime;
2229
- }
2230
- if (actualRuntime === "codex" || actualRuntime === "opencode" || actualRuntime === "exe-agent") {
2231
- const msg = "You have a new P0 task. Run list_tasks to find it.";
2232
- transport.sendKeysLiteral(targetSession, msg);
2233
- } else {
2234
- transport.sendKeys(targetSession, "/exe-intercom");
2235
- }
2216
+ const reason = opts?.reason ?? "nudge";
2217
+ const msg = reason === "completion" ? `An employee completed work. Run task(action='list', status='needs_review') to review it.` : `P0: You have a new task dispatched. Run task(action='list', status='open') to find it. Start immediately.`;
2218
+ transport.sendKeysLiteral(targetSession, msg);
2236
2219
  const batched = recordDebounce(targetSession);
2237
2220
  logIntercom(`DELIVERED \u2192 ${targetSession}${batched > 0 ? ` [${batched} nudges batched during debounce]` : ""} (fire-and-forget)`);
2238
2221
  return "delivered";
@@ -2251,13 +2234,13 @@ function notifyParentExe(sessionKey) {
2251
2234
  }
2252
2235
  process.stderr.write(`[intercom] notifyParentExe \u2192 ${target}
2253
2236
  `);
2254
- const result = sendIntercom(target);
2237
+ const result = sendIntercom(target, { reason: "completion" });
2255
2238
  if (result === "failed") {
2256
2239
  const rootExe = resolveExeSession();
2257
2240
  if (rootExe && rootExe !== target) {
2258
2241
  process.stderr.write(`[intercom] notifyParentExe: dispatcher ${target} dead, falling back to root coordinator session ${rootExe}
2259
2242
  `);
2260
- const fallback = sendIntercom(rootExe);
2243
+ const fallback = sendIntercom(rootExe, { reason: "completion" });
2261
2244
  return fallback !== "failed";
2262
2245
  }
2263
2246
  return false;
@@ -0,0 +1,58 @@
1
+ import {
2
+ MODELS_DIR
3
+ } from "./chunk-4GXRETYL.js";
4
+
5
+ // src/lib/reranker.ts
6
+ import path from "path";
7
+ import { existsSync } from "fs";
8
+ var RERANKER_MODEL_FILE = "jina-reranker-v3-q4_k_m.gguf";
9
+ function isRerankerAvailable() {
10
+ return existsSync(path.join(MODELS_DIR, RERANKER_MODEL_FILE));
11
+ }
12
+ function getRerankerModelPath() {
13
+ return path.join(MODELS_DIR, RERANKER_MODEL_FILE);
14
+ }
15
+ async function disposeReranker() {
16
+ }
17
+ async function rerankWithScores(query, texts, topK) {
18
+ if (texts.length === 0) return [];
19
+ const { rerankViaWorker } = await import("./lib/exe-daemon.js");
20
+ const scored = await rerankViaWorker(query, texts, topK);
21
+ return scored.map((s) => ({
22
+ text: texts[s.index] ?? "",
23
+ score: s.score,
24
+ index: s.index
25
+ }));
26
+ }
27
+ async function rerank(query, candidates, topK = 5) {
28
+ if (candidates.length === 0) return [];
29
+ if (candidates.length <= topK) return candidates;
30
+ const scored = await rerankWithScores(
31
+ query,
32
+ candidates.map((c) => c.raw_text),
33
+ topK
34
+ );
35
+ return scored.map((s) => candidates[s.index]);
36
+ }
37
+ async function rerankWithContext(query, candidates, topK) {
38
+ if (candidates.length === 0) return [];
39
+ const formattedTexts = candidates.map(
40
+ (c) => c.context ? `[${c.context}] ${c.text.slice(0, 460)}` : c.text.slice(0, 512)
41
+ );
42
+ const { rerankViaWorker } = await import("./lib/exe-daemon.js");
43
+ const scored = await rerankViaWorker(query, formattedTexts, topK);
44
+ return scored.map((s) => ({
45
+ text: candidates[s.index]?.text ?? "",
46
+ score: s.score,
47
+ index: s.index
48
+ }));
49
+ }
50
+
51
+ export {
52
+ isRerankerAvailable,
53
+ getRerankerModelPath,
54
+ disposeReranker,
55
+ rerankWithScores,
56
+ rerank,
57
+ rerankWithContext
58
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sendMessage
3
- } from "./chunk-BUN6JIDP.js";
3
+ } from "./chunk-ACOQS4ZL.js";
4
4
  import {
5
5
  getActiveAgent
6
6
  } from "./chunk-BDYUENC7.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  executeAction,
3
3
  substituteTemplate
4
- } from "./chunk-ZGPURQ4J.js";
4
+ } from "./chunk-54MZI4PK.js";
5
5
 
6
6
  // src/automation/workflow-engine.ts
7
7
  import { randomUUID } from "crypto";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  processCRMEvent
3
- } from "./chunk-ZGPURQ4J.js";
3
+ } from "./chunk-54MZI4PK.js";
4
4
 
5
5
  // src/gateway/adapters/crm-webhook.ts
6
6
  function parseTwentyWebhook(payload) {