@askexenow/exe-os 0.9.22 → 0.9.23

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.
@@ -9343,8 +9343,8 @@ function createReviewNudgeRealDeps(getClient2) {
9343
9343
  return Number(result.rows[0]?.cnt ?? 0);
9344
9344
  },
9345
9345
  sendNudge: (sessionName) => {
9346
- const { getTransport: getTransport2 } = (init_transport(), __toCommonJS(transport_exports));
9347
- getTransport2().sendKeys(sessionName, "check reviews");
9346
+ const { queueIntercom: qi } = (init_intercom_queue(), __toCommonJS(intercom_queue_exports));
9347
+ qi(sessionName, "review nudge: pending reviews");
9348
9348
  },
9349
9349
  persistState: saveNudgeState
9350
9350
  };
@@ -12466,7 +12466,7 @@ function _resetNudgeState() {
12466
12466
  _lastNudge.clear();
12467
12467
  }
12468
12468
  async function runTaskEnforcementTick(deps) {
12469
- const { transport, agentConfig, employees, client, scopeFilter } = deps;
12469
+ const { transport, employees, client, scopeFilter } = deps;
12470
12470
  const now = deps.now ?? Date.now();
12471
12471
  const sessions = transport.listSessions();
12472
12472
  for (const session of sessions) {
@@ -12479,6 +12479,17 @@ async function runTaskEnforcementTick(deps) {
12479
12479
  }
12480
12480
  const employee = employees.find((e) => e.name === agentName);
12481
12481
  if (!employee) continue;
12482
+ let effectiveScope = scopeFilter;
12483
+ const dashIndex = session.indexOf("-");
12484
+ if (dashIndex > 0) {
12485
+ const coordinatorSession = session.slice(dashIndex + 1);
12486
+ if (coordinatorSession) {
12487
+ effectiveScope = {
12488
+ sql: " AND (session_scope IS NULL OR session_scope = ?)",
12489
+ args: [coordinatorSession]
12490
+ };
12491
+ }
12492
+ }
12482
12493
  const isManager = MANAGER_ROLES.includes(employee.role);
12483
12494
  try {
12484
12495
  let action = "skip";
@@ -12488,8 +12499,8 @@ async function runTaskEnforcementTick(deps) {
12488
12499
  let paneIdle;
12489
12500
  if (isManager) {
12490
12501
  const openResult = await client.execute({
12491
- sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status = 'open'${scopeFilter.sql}`,
12492
- args: [agentName, ...scopeFilter.args]
12502
+ sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status = 'open'${effectiveScope.sql}`,
12503
+ args: [agentName, ...effectiveScope.args]
12493
12504
  });
12494
12505
  openTasks = Number(openResult.rows[0]?.cnt ?? 0);
12495
12506
  if (openTasks > 0) {
@@ -12541,8 +12552,8 @@ async function runTaskEnforcementTick(deps) {
12541
12552
  );
12542
12553
  } else {
12543
12554
  const taskResult = await client.execute({
12544
- sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status IN ('open', 'in_progress')${scopeFilter.sql}`,
12545
- args: [agentName, ...scopeFilter.args]
12555
+ sql: `SELECT COUNT(*) as cnt FROM tasks WHERE assigned_to = ? AND status IN ('open', 'in_progress')${effectiveScope.sql}`,
12556
+ args: [agentName, ...effectiveScope.args]
12546
12557
  });
12547
12558
  const taskCount = Number(taskResult.rows[0]?.cnt ?? 0);
12548
12559
  openTasks = taskCount;
@@ -12570,9 +12581,7 @@ async function runTaskEnforcementTick(deps) {
12570
12581
  );
12571
12582
  }
12572
12583
  if (action === "skip" || action === "idle" || action === "grace_period" || action === "active") continue;
12573
- const config = agentConfig[agentName];
12574
- const runtime = config?.runtime ?? "claude";
12575
- sendNudge(transport, session, runtime, action);
12584
+ queueIntercom(session, `enforcement: ${reason}`);
12576
12585
  _lastNudge.set(session, now);
12577
12586
  } catch {
12578
12587
  }
@@ -12582,6 +12591,7 @@ var TASK_ENFORCEMENT_INTERVAL_MS, TASK_ENFORCEMENT_DEBOUNCE_MS, MANAGER_GRACE_PE
12582
12591
  var init_task_enforcement = __esm({
12583
12592
  "src/lib/task-enforcement.ts"() {
12584
12593
  "use strict";
12594
+ init_intercom_queue();
12585
12595
  TASK_ENFORCEMENT_INTERVAL_MS = 6e4;
12586
12596
  TASK_ENFORCEMENT_DEBOUNCE_MS = 18e4;
12587
12597
  MANAGER_GRACE_PERIOD_MS = 6e5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askexenow/exe-os",
3
- "version": "0.9.22",
3
+ "version": "0.9.23",
4
4
  "description": "AI employee operating system — persistent memory, task management, and multi-agent coordination for Claude Code.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",