@askexenow/exe-os 0.9.217 → 0.9.219
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.
- package/deploy/compose/.env.customer.example +12 -2
- package/deploy/compose/.env.example +42 -16
- package/deploy/compose/PROTECTED_FILES.md +1 -0
- package/deploy/compose/README.md +1 -1
- package/deploy/compose/backup.sh +3 -1
- package/deploy/compose/clickhouse-config.xml +18 -0
- package/deploy/compose/docker-compose.yml +37 -13
- package/deploy/compose/gateway.json +12 -2
- package/deploy/compose/generate-env.ts +17 -1
- package/deploy/compose/init-db.sql +12 -0
- package/deploy/compose/restore.sh +1 -0
- package/deploy/compose/setup.sh +3 -1
- package/deploy/compose/uptime-check.sh +143 -0
- package/deploy/stack-manifests/v0.9.json +4 -4
- package/dist/{active-agent-R7QDYADX.js → active-agent-65SRKUVF.js} +2 -2
- package/dist/{active-agent-4XH2Q6KJ.js → active-agent-YLIAU6SX.js} +2 -2
- package/dist/{agentic-ontology-CHAWPTEY.js → agentic-ontology-VZWBROYO.js} +1 -1
- package/dist/{backfill-metadata-I6VR7JZ2.js → backfill-metadata-YUN6DXIE.js} +3 -3
- package/dist/{behaviors-YJ3HEQED.js → behaviors-4PGM7IJJ.js} +2 -2
- package/dist/bin/agentic-ontology-backfill.js +4 -4
- package/dist/bin/agentic-reflection-backfill.js +5 -5
- package/dist/bin/agentic-semantic-label.js +4 -4
- package/dist/bin/backfill-conversations.js +3 -3
- package/dist/bin/backfill-responses.js +3 -3
- package/dist/bin/backfill-vectors.js +4 -4
- package/dist/bin/bulk-sync-postgres.js +5 -5
- package/dist/bin/cleanup-stale-review-tasks.js +8 -8
- package/dist/bin/cli.js +30 -12
- package/dist/bin/exe-agent-config.js +1 -1
- package/dist/bin/exe-agent.js +6 -6
- package/dist/bin/exe-assign.js +4 -4
- package/dist/bin/exe-boot.js +15 -15
- package/dist/bin/exe-call.js +3 -3
- package/dist/bin/exe-cloud.js +3 -3
- package/dist/bin/exe-dispatch.js +8 -8
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +6 -6
- package/dist/bin/exe-forget.js +5 -5
- package/dist/bin/exe-gateway.js +38 -12
- package/dist/bin/exe-heartbeat.js +8 -8
- package/dist/bin/exe-kill.js +11 -11
- package/dist/bin/exe-launch-agent.js +15 -15
- package/dist/bin/exe-new-employee.js +5 -5
- package/dist/bin/exe-pending-messages.js +9 -9
- package/dist/bin/exe-pending-notifications.js +8 -8
- package/dist/bin/exe-pending-reviews.js +8 -8
- package/dist/bin/exe-rename.js +3 -3
- package/dist/bin/exe-review.js +10 -10
- package/dist/bin/exe-search.js +4 -4
- package/dist/bin/exe-session-cleanup.js +13 -13
- package/dist/bin/exe-settings.js +3 -3
- package/dist/bin/exe-start-codex.js +10 -10
- package/dist/bin/exe-start-opencode.js +7 -7
- package/dist/bin/exe-status.js +9 -9
- package/dist/bin/exe-team.js +2 -2
- package/dist/bin/git-sweep.js +8 -8
- package/dist/bin/graph-backfill.js +3 -3
- package/dist/bin/graph-export.js +4 -4
- package/dist/bin/import-history.js +4 -4
- package/dist/bin/install.js +5 -5
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +3 -3
- package/dist/bin/postgres-agentic-reflection-backfill.js +2 -2
- package/dist/bin/postgres-agentic-semantic-backfill.js +1 -1
- package/dist/bin/scan-tasks.js +8 -8
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +3 -3
- package/dist/bin/stack-update.js +1 -1
- package/dist/bin/vps-health-gate.js +1 -1
- package/dist/{capacity-monitor-XFMZSJDB.js → capacity-monitor-A6TMCY5F.js} +9 -9
- package/dist/{catchup-brief-D5IZFZDO.js → catchup-brief-TU4C22MJ.js} +10 -10
- package/dist/{chunk-F54CVIXL.js → chunk-222EGJ6Z.js} +1 -1
- package/dist/{chunk-6UY62EGD.js → chunk-2F7URV5H.js} +4 -4
- package/dist/{chunk-2DRWIXOO.js → chunk-2OERQW4L.js} +2 -2
- package/dist/{chunk-4GXXYDNU.js → chunk-3XGZAFHE.js} +36 -0
- package/dist/{chunk-BN3HRSEU.js → chunk-443YQ2FS.js} +2 -2
- package/dist/{chunk-5QKUR5KS.js → chunk-4UHKYQZJ.js} +1 -1
- package/dist/{chunk-QOY6CTHV.js → chunk-55VWU47L.js} +2 -2
- package/dist/{chunk-ACOW43IN.js → chunk-56NWZFB2.js} +1 -1
- package/dist/{chunk-UO3IEPSY.js → chunk-5ZTZ3SHF.js} +233 -333
- package/dist/{chunk-GKNYEJQ3.js → chunk-7DYKIMN2.js} +1 -1
- package/dist/{chunk-5G643UWZ.js → chunk-7EUYGWPH.js} +117 -8
- package/dist/{chunk-FXD53Q32.js → chunk-7F5MJSWJ.js} +3 -3
- package/dist/{chunk-2QNMGFIF.js → chunk-7WEP4DNC.js} +2 -2
- package/dist/{chunk-S5TTV7PC.js → chunk-A24RUKU6.js} +1 -1
- package/dist/{chunk-NEGJAEZ7.js → chunk-AAMUHY6Y.js} +3 -3
- package/dist/{chunk-46WQ76VA.js → chunk-AMGEPNUB.js} +1 -1
- package/dist/{chunk-HURS5JVX.js → chunk-BCREJ6FD.js} +21 -3
- package/dist/{chunk-S2T7CE4P.js → chunk-BMRLKOGT.js} +1 -1
- package/dist/{chunk-S4I3UITZ.js → chunk-BXLA6CQM.js} +1 -1
- package/dist/{chunk-JXJV64JW.js → chunk-D7DRYXDE.js} +1 -1
- package/dist/{chunk-5VOC35A3.js → chunk-DAE4I3UN.js} +1 -1
- package/dist/{chunk-R766IOBQ.js → chunk-DF67VZ2H.js} +1 -1
- package/dist/{chunk-HW46Q4AR.js → chunk-DZE2MBOW.js} +257 -10
- package/dist/{chunk-RTGN42GD.js → chunk-E6KXZF4B.js} +2 -2
- package/dist/{chunk-IFSAR5IX.js → chunk-EB3AAVAK.js} +5 -5
- package/dist/{chunk-PKIOJQ2N.js → chunk-EUS7TKVR.js} +1 -1
- package/dist/{chunk-T43SC2XX.js → chunk-FJQPH2W3.js} +2 -2
- package/dist/{chunk-GEFZHKEN.js → chunk-GJFS27NL.js} +5 -5
- package/dist/{chunk-KEFHCL4U.js → chunk-GT5E5PW6.js} +1 -1
- package/dist/{chunk-XPKACO5A.js → chunk-GYIPOKH6.js} +8 -8
- package/dist/chunk-I3MJHU76.js +225 -0
- package/dist/{chunk-2IMUAL3X.js → chunk-IEAXNG3H.js} +8 -8
- package/dist/{chunk-YJNRRQOG.js → chunk-ILTZBCLW.js} +2 -2
- package/dist/{chunk-SDQSOQOE.js → chunk-JEBWC4VU.js} +2 -2
- package/dist/{chunk-7X6QKJGM.js → chunk-JHEABI3I.js} +2 -2
- package/dist/{chunk-R2MZDZTQ.js → chunk-JUWC7V2I.js} +3 -3
- package/dist/{chunk-6I7O6YW3.js → chunk-OM3CETSN.js} +3 -3
- package/dist/{chunk-WEJ45ZFF.js → chunk-PBI526CO.js} +2 -2
- package/dist/{chunk-I22ZH3XF.js → chunk-PXO6SF6L.js} +1 -1
- package/dist/{chunk-B7NO5U7H.js → chunk-Q4GGIM3A.js} +1 -1
- package/dist/{chunk-I6474EQW.js → chunk-QG6IPAT6.js} +1 -1
- package/dist/{chunk-NO5GHSNU.js → chunk-QPU5QQLX.js} +4 -3
- package/dist/{chunk-4ANCHFE2.js → chunk-R6JBGFSE.js} +1 -1
- package/dist/{chunk-ALVYUOBW.js → chunk-RQJDO6LP.js} +1 -1
- package/dist/{chunk-BFLBZGPZ.js → chunk-S5KQLCYU.js} +1 -1
- package/dist/{chunk-NUUAYDD6.js → chunk-SRJLG6RC.js} +1 -1
- package/dist/{chunk-O6LFXATW.js → chunk-SURCM7EO.js} +3 -3
- package/dist/{chunk-CIANVJ3G.js → chunk-UVUA2DQM.js} +61 -6
- package/dist/{chunk-64DYFA5X.js → chunk-V224L2GJ.js} +3 -3
- package/dist/{chunk-W7OCXE2L.js → chunk-V24ZGSQW.js} +1 -1
- package/dist/{chunk-RSHVFBKD.js → chunk-V2BQL663.js} +8 -8
- package/dist/{chunk-JJHJOGYR.js → chunk-WYPNZALJ.js} +1 -1
- package/dist/{chunk-RSVJQ4E2.js → chunk-YTBT3SW2.js} +1 -1
- package/dist/{chunk-CUKIMXQ7.js → chunk-YTPLK6QP.js} +1 -1
- package/dist/{co-occurrence-EWVCCFOI.js → co-occurrence-FBP2GTER.js} +1 -1
- package/dist/{crdt-sync-TSO4O67N.js → crdt-sync-KFPZWAIE.js} +1 -1
- package/dist/{crm-webhook-WMAW6ZT2.js → crm-webhook-56OJDKXK.js} +2 -2
- package/dist/{cto-delegation-gate-YNWMQEQB.js → cto-delegation-gate-5WNDH4IL.js} +7 -7
- package/dist/{daemon-orchestration-5KUKQOZ4.js → daemon-orchestration-KYK662AN.js} +14 -10
- package/dist/{exe-drift-KP5RZCXA.js → exe-drift-C254MZW4.js} +2 -2
- package/dist/{exe-export-RAYK76SO.js → exe-export-S56FIA5P.js} +4 -4
- package/dist/{exe-import-SAJBGUN5.js → exe-import-7F7Y4I6T.js} +4 -4
- package/dist/{exe-key-W3CME65M.js → exe-key-U7TAND3I.js} +1 -1
- package/dist/{fast-db-init-5VDTKVKX.js → fast-db-init-6DG7B7NO.js} +1 -1
- package/dist/gateway/index.js +6 -6
- package/dist/{git-staleness-M7WLXBAA.js → git-staleness-FDYT34WP.js} +1 -1
- package/dist/{git-task-sweep-GED54WTZ.js → git-task-sweep-EERTURH7.js} +8 -8
- package/dist/{global-procedures-EYWKFVOO.js → global-procedures-74U75Y2I.js} +2 -2
- package/dist/{graph-auto-extract-B4W4BEOZ.js → graph-auto-extract-VUBFSL6D.js} +1 -1
- package/dist/hooks/bug-report-worker.js +9 -9
- package/dist/hooks/codex-stop-task-finalizer.js +9 -9
- package/dist/hooks/commit-complete.js +10 -10
- package/dist/hooks/error-recall.js +5 -5
- package/dist/hooks/exe-heartbeat-hook.js +2 -2
- package/dist/hooks/ingest.js +5 -5
- package/dist/hooks/instructions-loaded.js +3 -3
- package/dist/hooks/manifest.json +19 -19
- package/dist/hooks/notification.js +3 -3
- package/dist/hooks/post-compact.js +9 -9
- package/dist/hooks/post-tool-combined.js +4 -4
- package/dist/hooks/pre-compact.js +10 -10
- package/dist/hooks/pre-tool-use.js +13 -13
- package/dist/hooks/prompt-submit.js +19 -19
- package/dist/hooks/session-end.js +13 -13
- package/dist/hooks/session-start.js +28 -9
- package/dist/hooks/stop.js +13 -13
- package/dist/hooks/subagent-stop.js +9 -9
- package/dist/hooks/summary-worker.js +13 -13
- package/dist/import-conversations-FO4IQCOP.js +23 -0
- package/dist/index.js +15 -15
- package/dist/{installer-EYRABPEC.js → installer-MWLYK37L.js} +4 -4
- package/dist/{installer-WVPFKMDW.js → installer-XIP332UC.js} +4 -4
- package/dist/{installer-X6XJE2EA.js → installer-XZ4H2J3J.js} +4 -4
- package/dist/lib/cloud-sync.js +3 -3
- package/dist/lib/consolidation.js +4 -4
- package/dist/lib/database.js +1 -1
- package/dist/lib/db.js +1 -1
- package/dist/lib/employee-templates.js +3 -3
- package/dist/lib/employees.js +1 -1
- package/dist/lib/exe-daemon.js +65 -25
- package/dist/lib/hybrid-search.js +4 -4
- package/dist/lib/identity.js +1 -1
- package/dist/lib/messaging.js +8 -8
- package/dist/lib/reminders.js +2 -2
- package/dist/lib/schedules.js +4 -4
- package/dist/lib/session-registry.js +3 -3
- package/dist/lib/skill-learning.js +3 -3
- package/dist/lib/store.js +3 -3
- package/dist/lib/task-router.js +2 -2
- package/dist/lib/tasks.js +8 -8
- package/dist/lib/tmux-routing.js +7 -7
- package/dist/lib/token-spend.js +2 -2
- package/dist/mcp/register-tools.js +47 -46
- package/dist/mcp/server.js +48 -47
- package/dist/mcp/tools/complete-reminder.js +3 -3
- package/dist/mcp/tools/create-reminder.js +3 -3
- package/dist/mcp/tools/create-task.js +10 -10
- package/dist/mcp/tools/deactivate-behavior.js +4 -4
- package/dist/mcp/tools/list-reminders.js +3 -3
- package/dist/mcp/tools/list-tasks.js +10 -10
- package/dist/mcp/tools/send-message.js +10 -10
- package/dist/mcp/tools/update-task.js +9 -9
- package/dist/{mcp-http-config-L4U52ZAF.js → mcp-http-config-GYVAS5HQ.js} +2 -2
- package/dist/{memory-cards-I55OBMVE.js → memory-cards-HU5WIUTY.js} +1 -1
- package/dist/{memory-graph-extractor-6M6J5FNX.js → memory-graph-extractor-PNRAGL4V.js} +2 -2
- package/dist/{memory-poisoning-defense-UXB75NB7.js → memory-poisoning-defense-KBBWI6ZL.js} +1 -1
- package/dist/{memory-reflection-3BMVNA6T.js → memory-reflection-UP56KTJ5.js} +1 -1
- package/dist/{notifications-SCHILQCQ.js → notifications-VWAMI4ZE.js} +7 -7
- package/dist/{orchestration-events-RDW7BTCK.js → orchestration-events-7XAYQ2MT.js} +2 -2
- package/dist/{orchestrator-NCEFZF32.js → orchestrator-D7NWJTJO.js} +9 -9
- package/dist/{plan-limits-YE5WKMQM.js → plan-limits-EA3VBZJ2.js} +2 -2
- package/dist/{projection-worker-ENYZ7THQ.js → projection-worker-HNI2TOO3.js} +1 -1
- package/dist/{reranker-QFLVGVRT.js → reranker-M52JJADT.js} +1 -1
- package/dist/{review-polling-ZKYFETP3.js → review-polling-YT3BEKPV.js} +8 -8
- package/dist/runtime/index.js +10 -10
- package/dist/{session-events-XCNQDXF4.js → session-events-7EN6W4EX.js} +8 -8
- package/dist/{session-kill-telemetry-SPB6LEI5.js → session-kill-telemetry-XIFWDG3L.js} +2 -2
- package/dist/{session-scope-FEZQJMD4.js → session-scope-7F3JL2RJ.js} +7 -7
- package/dist/{setup-wizard-KUYMMP35.js → setup-wizard-OT5R6PJ6.js} +1 -1
- package/dist/{skill-refinement-QHOS6CGQ.js → skill-refinement-N5RINY42.js} +1 -1
- package/dist/{stack-update-UCIPCTBO.js → stack-update-SASYGDOB.js} +1 -1
- package/dist/{task-enforcement-HVY36QRD.js → task-enforcement-DCBYO3R6.js} +7 -7
- package/dist/{task-scope-ODSOEGTH.js → task-scope-NM2C2QZX.js} +7 -7
- package/dist/{tasks-crud-RIUHZJGR.js → tasks-crud-AVVOQKZY.js} +17 -7
- package/dist/{tasks-review-EBUVFQUJ.js → tasks-review-QNBO3D7U.js} +7 -7
- package/dist/{telemetry-upload-DFISOB2V.js → telemetry-upload-ZJ4UP2RP.js} +3 -3
- package/dist/{token-budget-6TTILQW7.js → token-budget-SPQB44ZI.js} +1 -1
- package/dist/{tool-telemetry-BNZJICWG.js → tool-telemetry-EIRCR2VO.js} +1 -1
- package/dist/tui/App.js +15 -15
- package/dist/{tui-data-UM6LR4EQ.js → tui-data-5B6YA4VV.js} +7 -7
- package/dist/{worker-gate-K5YTO2H5.js → worker-gate-WQV3FR4R.js} +1 -1
- package/dist/{workflow-engine-WUU5OZ3N.js → workflow-engine-TZKS5QB7.js} +2 -2
- package/dist/{worktree-XZBJQWQZ.js → worktree-KI3X6POI.js} +3 -3
- package/package.json +1 -1
- package/release-notes.json +52 -52
- /package/dist/{chunk-MQA6K7DH.js → chunk-3OZ7LXUY.js} +0 -0
- /package/dist/{chunk-KVOTLCAX.js → chunk-4B7JKVUT.js} +0 -0
- /package/dist/{chunk-HNXHUG7A.js → chunk-HUVQ2NUX.js} +0 -0
- /package/dist/{chunk-Y2B6MB3J.js → chunk-PN7MTAYN.js} +0 -0
- /package/dist/{chunk-54JMB5UI.js → chunk-Q3YGPFZH.js} +0 -0
- /package/dist/{chunk-WRVFZ433.js → chunk-QSWZI7NH.js} +0 -0
- /package/dist/{chunk-4AJYZFDE.js → chunk-V3CEFPKS.js} +0 -0
- /package/dist/{chunk-K77FHRYS.js → chunk-V3NHFF3Z.js} +0 -0
- /package/dist/{chunk-DXB3CB2O.js → chunk-ZPQ2RUIU.js} +0 -0
- /package/dist/{core-memory-NZOLAIOE.js → core-memory-3XHQZ5EI.js} +0 -0
- /package/dist/{wiki-acl-QYGMJDUT.js → wiki-acl-QSO37KYW.js} +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureWorktree
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-56NWZFB2.js";
|
|
4
4
|
import {
|
|
5
5
|
queueIntercom
|
|
6
6
|
} from "./chunk-QI4IXJN7.js";
|
|
7
7
|
import {
|
|
8
8
|
registerSession
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-Q4GGIM3A.js";
|
|
10
10
|
import {
|
|
11
11
|
getTransport
|
|
12
12
|
} from "./chunk-MVW62NIZ.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-CX6GL3ZJ.js";
|
|
16
16
|
import {
|
|
17
17
|
recordOrchestrationEventBestEffort
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-BCREJ6FD.js";
|
|
19
19
|
import {
|
|
20
20
|
getAgentRuntime,
|
|
21
21
|
normalizeCcModelName
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
PlanLimitError,
|
|
28
28
|
assertEmployeeLimitSync
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-GT5E5PW6.js";
|
|
30
30
|
import {
|
|
31
31
|
getSessionKey
|
|
32
32
|
} from "./chunk-CVYC6DUW.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-MP2AFCGL.js";
|
|
42
42
|
import {
|
|
43
43
|
ensureAgentSymlink
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-4UHKYQZJ.js";
|
|
45
45
|
import {
|
|
46
46
|
expandDualPrefixTools
|
|
47
47
|
} from "./chunk-HYZV25LY.js";
|
|
@@ -53,7 +53,7 @@ import {
|
|
|
53
53
|
isCoordinatorName,
|
|
54
54
|
loadEmployees,
|
|
55
55
|
loadEmployeesSync
|
|
56
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-3XGZAFHE.js";
|
|
57
57
|
import {
|
|
58
58
|
loadDeviceId
|
|
59
59
|
} from "./chunk-72DJ42IE.js";
|
|
@@ -490,7 +490,7 @@ async function createTaskCore(input) {
|
|
|
490
490
|
if (isCoordinatorSession) {
|
|
491
491
|
earlySessionScope = resolved;
|
|
492
492
|
} else {
|
|
493
|
-
const { getSessionProject } = await import("./session-scope-
|
|
493
|
+
const { getSessionProject } = await import("./session-scope-7F3JL2RJ.js");
|
|
494
494
|
const sessionProject = getSessionProject(resolved);
|
|
495
495
|
if (sessionProject && sessionProject !== input.projectName) {
|
|
496
496
|
scopeMismatchWarning = `session/project mismatch: session "${resolved}" owns "${sessionProject}" but task targets "${input.projectName}". Routed to default scope.`;
|
|
@@ -947,7 +947,7 @@ async function updateTaskStatus(input) {
|
|
|
947
947
|
} catch {
|
|
948
948
|
}
|
|
949
949
|
try {
|
|
950
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
950
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-VWAMI4ZE.js");
|
|
951
951
|
await writeNotification2({
|
|
952
952
|
agentId: reviewer,
|
|
953
953
|
agentRole: isCoordinatorName(reviewer) ? "COO" : "manager",
|
|
@@ -1334,7 +1334,7 @@ ${input.result}` : `\u26A0\uFE0F ${warning}`;
|
|
|
1334
1334
|
}
|
|
1335
1335
|
if (input.status === "done" || input.status === "needs_review") {
|
|
1336
1336
|
try {
|
|
1337
|
-
const { incrementSkillSuccess } = await import("./skill-refinement-
|
|
1337
|
+
const { incrementSkillSuccess } = await import("./skill-refinement-N5RINY42.js");
|
|
1338
1338
|
await incrementSkillSuccess(
|
|
1339
1339
|
String(row.assigned_to),
|
|
1340
1340
|
row.project_name ? String(row.project_name) : null
|
|
@@ -1476,6 +1476,246 @@ async function cleanOrphanedTaskFiles() {
|
|
|
1476
1476
|
await walkDir(EXE_TASKS_DIR);
|
|
1477
1477
|
return cleaned;
|
|
1478
1478
|
}
|
|
1479
|
+
async function readLatestCheckpoint(agentId) {
|
|
1480
|
+
const client = getClient();
|
|
1481
|
+
const result = await client.execute({
|
|
1482
|
+
sql: `SELECT checkpoint, checkpoint_count FROM tasks
|
|
1483
|
+
WHERE assigned_to = ?
|
|
1484
|
+
AND status IN ('in_progress', 'open')
|
|
1485
|
+
AND checkpoint IS NOT NULL
|
|
1486
|
+
ORDER BY updated_at DESC
|
|
1487
|
+
LIMIT 1`,
|
|
1488
|
+
args: [agentId]
|
|
1489
|
+
});
|
|
1490
|
+
if (result.rows.length === 0) return null;
|
|
1491
|
+
const row = result.rows[0];
|
|
1492
|
+
const checkpointJson = row.checkpoint;
|
|
1493
|
+
if (!checkpointJson) return null;
|
|
1494
|
+
try {
|
|
1495
|
+
return JSON.parse(String(checkpointJson));
|
|
1496
|
+
} catch {
|
|
1497
|
+
return null;
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
async function createTaskGroup(input) {
|
|
1501
|
+
const client = getClient();
|
|
1502
|
+
const id = crypto.randomUUID();
|
|
1503
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1504
|
+
await client.execute({
|
|
1505
|
+
sql: `INSERT INTO task_groups (id, title, coordinator, session_scope, project_name, timeout_minutes, on_partial_failure, created_at, updated_at)
|
|
1506
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`,
|
|
1507
|
+
args: [
|
|
1508
|
+
id,
|
|
1509
|
+
input.title,
|
|
1510
|
+
input.coordinator,
|
|
1511
|
+
input.sessionScope ?? null,
|
|
1512
|
+
input.projectName ?? null,
|
|
1513
|
+
input.timeoutMinutes ?? 120,
|
|
1514
|
+
input.onPartialFailure ?? "notify",
|
|
1515
|
+
now,
|
|
1516
|
+
now
|
|
1517
|
+
]
|
|
1518
|
+
});
|
|
1519
|
+
recordOrchestrationEventBestEffort({
|
|
1520
|
+
eventType: "task_group.created",
|
|
1521
|
+
source: "tasks-crud.createTaskGroup",
|
|
1522
|
+
agentId: input.coordinator,
|
|
1523
|
+
sessionScope: input.sessionScope ?? null,
|
|
1524
|
+
projectName: input.projectName ?? null,
|
|
1525
|
+
payload: { groupId: id, title: input.title, timeoutMinutes: input.timeoutMinutes ?? 120 }
|
|
1526
|
+
});
|
|
1527
|
+
return {
|
|
1528
|
+
id,
|
|
1529
|
+
title: input.title,
|
|
1530
|
+
coordinator: input.coordinator,
|
|
1531
|
+
sessionScope: input.sessionScope ?? null,
|
|
1532
|
+
projectName: input.projectName ?? null,
|
|
1533
|
+
timeoutMinutes: input.timeoutMinutes ?? 120,
|
|
1534
|
+
onPartialFailure: input.onPartialFailure ?? "notify",
|
|
1535
|
+
barrierFired: false,
|
|
1536
|
+
barrierFiredAt: null,
|
|
1537
|
+
aggregatedResult: null,
|
|
1538
|
+
createdAt: now,
|
|
1539
|
+
updatedAt: now
|
|
1540
|
+
};
|
|
1541
|
+
}
|
|
1542
|
+
async function getGroupStatus(groupId) {
|
|
1543
|
+
const client = getClient();
|
|
1544
|
+
const groupResult = await client.execute({
|
|
1545
|
+
sql: "SELECT id, title, barrier_fired, timeout_minutes, created_at FROM task_groups WHERE id = ?",
|
|
1546
|
+
args: [groupId]
|
|
1547
|
+
});
|
|
1548
|
+
if (groupResult.rows.length === 0) throw new Error(`Task group not found: ${groupId}`);
|
|
1549
|
+
const group = groupResult.rows[0];
|
|
1550
|
+
const tasksResult = await client.execute({
|
|
1551
|
+
sql: `SELECT status FROM tasks WHERE group_id = ?`,
|
|
1552
|
+
args: [groupId]
|
|
1553
|
+
});
|
|
1554
|
+
const total = tasksResult.rows.length;
|
|
1555
|
+
let completed = 0;
|
|
1556
|
+
let failed = 0;
|
|
1557
|
+
let pending = 0;
|
|
1558
|
+
for (const row of tasksResult.rows) {
|
|
1559
|
+
const status = String(row.status);
|
|
1560
|
+
if (status === "done" || status === "needs_review" || status === "closed") {
|
|
1561
|
+
completed++;
|
|
1562
|
+
} else if (status === "cancelled") {
|
|
1563
|
+
failed++;
|
|
1564
|
+
} else {
|
|
1565
|
+
pending++;
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
const createdAt = new Date(String(group.created_at)).getTime();
|
|
1569
|
+
const timeoutMs = Number(group.timeout_minutes) * 6e4;
|
|
1570
|
+
const timedOut = Date.now() - createdAt > timeoutMs;
|
|
1571
|
+
return {
|
|
1572
|
+
groupId,
|
|
1573
|
+
title: String(group.title),
|
|
1574
|
+
total,
|
|
1575
|
+
completed,
|
|
1576
|
+
failed,
|
|
1577
|
+
pending,
|
|
1578
|
+
barrierFired: Number(group.barrier_fired) === 1,
|
|
1579
|
+
timedOut
|
|
1580
|
+
};
|
|
1581
|
+
}
|
|
1582
|
+
async function getGroupResults(groupId) {
|
|
1583
|
+
const client = getClient();
|
|
1584
|
+
const groupCheck = await client.execute({
|
|
1585
|
+
sql: "SELECT id FROM task_groups WHERE id = ?",
|
|
1586
|
+
args: [groupId]
|
|
1587
|
+
});
|
|
1588
|
+
if (groupCheck.rows.length === 0) throw new Error(`Task group not found: ${groupId}`);
|
|
1589
|
+
const result = await client.execute({
|
|
1590
|
+
sql: `SELECT id, title, status, result FROM tasks WHERE group_id = ?`,
|
|
1591
|
+
args: [groupId]
|
|
1592
|
+
});
|
|
1593
|
+
return result.rows.map((r) => ({
|
|
1594
|
+
taskId: String(r.id),
|
|
1595
|
+
title: String(r.title),
|
|
1596
|
+
status: String(r.status),
|
|
1597
|
+
result: r.result != null ? String(r.result) : null
|
|
1598
|
+
}));
|
|
1599
|
+
}
|
|
1600
|
+
async function checkAndFireBarriers() {
|
|
1601
|
+
const client = getClient();
|
|
1602
|
+
const firedGroups = [];
|
|
1603
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
1604
|
+
const activeGroups = await client.execute({
|
|
1605
|
+
sql: `SELECT g.id, g.title, g.coordinator, g.timeout_minutes,
|
|
1606
|
+
g.on_partial_failure, g.session_scope, g.project_name, g.created_at
|
|
1607
|
+
FROM task_groups g
|
|
1608
|
+
WHERE g.barrier_fired = 0`,
|
|
1609
|
+
args: []
|
|
1610
|
+
});
|
|
1611
|
+
for (const group of activeGroups.rows) {
|
|
1612
|
+
const groupId = String(group.id);
|
|
1613
|
+
const coordinator = String(group.coordinator);
|
|
1614
|
+
const onPartialFailure = String(group.on_partial_failure);
|
|
1615
|
+
const sessionScope = group.session_scope != null ? String(group.session_scope) : null;
|
|
1616
|
+
const projectName = group.project_name != null ? String(group.project_name) : null;
|
|
1617
|
+
const taskResult = await client.execute({
|
|
1618
|
+
sql: `SELECT status, id, title, result FROM tasks WHERE group_id = ?`,
|
|
1619
|
+
args: [groupId]
|
|
1620
|
+
});
|
|
1621
|
+
const total = taskResult.rows.length;
|
|
1622
|
+
if (total === 0) continue;
|
|
1623
|
+
const terminal = taskResult.rows.filter((r) => {
|
|
1624
|
+
const s = String(r.status);
|
|
1625
|
+
return s === "done" || s === "needs_review" || s === "closed" || s === "cancelled";
|
|
1626
|
+
});
|
|
1627
|
+
const createdAt = new Date(String(group.created_at)).getTime();
|
|
1628
|
+
const timeoutMs = Number(group.timeout_minutes) * 6e4;
|
|
1629
|
+
const timedOut = Date.now() - createdAt > timeoutMs;
|
|
1630
|
+
const allTerminal = terminal.length === total;
|
|
1631
|
+
if (!allTerminal && !timedOut) continue;
|
|
1632
|
+
const succeeded = terminal.filter((r) => {
|
|
1633
|
+
const s = String(r.status);
|
|
1634
|
+
return s === "done" || s === "needs_review" || s === "closed";
|
|
1635
|
+
}).length;
|
|
1636
|
+
const cancelled = terminal.filter((r) => String(r.status) === "cancelled").length;
|
|
1637
|
+
const pending = total - terminal.length;
|
|
1638
|
+
const taskResults = taskResult.rows.map((r) => ({
|
|
1639
|
+
task_id: String(r.id),
|
|
1640
|
+
title: String(r.title),
|
|
1641
|
+
status: String(r.status),
|
|
1642
|
+
result: r.result != null ? String(r.result) : null
|
|
1643
|
+
}));
|
|
1644
|
+
const aggregatedResult = JSON.stringify({
|
|
1645
|
+
total,
|
|
1646
|
+
succeeded,
|
|
1647
|
+
cancelled,
|
|
1648
|
+
pending,
|
|
1649
|
+
timed_out: timedOut,
|
|
1650
|
+
tasks: taskResults
|
|
1651
|
+
});
|
|
1652
|
+
await client.execute({
|
|
1653
|
+
sql: `UPDATE task_groups SET barrier_fired = 1, barrier_fired_at = ?, aggregated_result = ?, updated_at = ? WHERE id = ?`,
|
|
1654
|
+
args: [now, aggregatedResult, now, groupId]
|
|
1655
|
+
});
|
|
1656
|
+
if (onPartialFailure === "cancel_remaining" && pending > 0) {
|
|
1657
|
+
const nonTerminal = taskResult.rows.filter((r) => {
|
|
1658
|
+
const s = String(r.status);
|
|
1659
|
+
return s !== "done" && s !== "needs_review" && s !== "closed" && s !== "cancelled";
|
|
1660
|
+
});
|
|
1661
|
+
for (const task of nonTerminal) {
|
|
1662
|
+
try {
|
|
1663
|
+
await client.execute({
|
|
1664
|
+
sql: "UPDATE tasks SET status = 'cancelled', result = ?, updated_at = ? WHERE id = ?",
|
|
1665
|
+
args: [`Cancelled by task group barrier (group: ${groupId})`, now, String(task.id)]
|
|
1666
|
+
});
|
|
1667
|
+
recordOrchestrationEventBestEffort({
|
|
1668
|
+
eventType: "task.cancelled",
|
|
1669
|
+
source: "tasks-crud.checkAndFireBarriers",
|
|
1670
|
+
taskId: String(task.id),
|
|
1671
|
+
agentId: null,
|
|
1672
|
+
sessionScope,
|
|
1673
|
+
projectName,
|
|
1674
|
+
payload: { reason: "barrier_cancel_remaining", groupId }
|
|
1675
|
+
});
|
|
1676
|
+
} catch {
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
const eventType = timedOut ? "task_group.timeout" : "task_group.barrier_fired";
|
|
1681
|
+
recordOrchestrationEventBestEffort({
|
|
1682
|
+
eventType,
|
|
1683
|
+
source: "tasks-crud.checkAndFireBarriers",
|
|
1684
|
+
agentId: coordinator,
|
|
1685
|
+
sessionScope,
|
|
1686
|
+
projectName,
|
|
1687
|
+
payload: {
|
|
1688
|
+
groupId,
|
|
1689
|
+
title: String(group.title),
|
|
1690
|
+
total,
|
|
1691
|
+
succeeded,
|
|
1692
|
+
cancelled,
|
|
1693
|
+
pending,
|
|
1694
|
+
timedOut,
|
|
1695
|
+
onPartialFailure
|
|
1696
|
+
}
|
|
1697
|
+
});
|
|
1698
|
+
if (cancelled > 0 || pending > 0) {
|
|
1699
|
+
recordOrchestrationEventBestEffort({
|
|
1700
|
+
eventType: "task_group.partial_failure",
|
|
1701
|
+
source: "tasks-crud.checkAndFireBarriers",
|
|
1702
|
+
agentId: coordinator,
|
|
1703
|
+
sessionScope,
|
|
1704
|
+
projectName,
|
|
1705
|
+
payload: {
|
|
1706
|
+
groupId,
|
|
1707
|
+
total,
|
|
1708
|
+
succeeded,
|
|
1709
|
+
cancelled,
|
|
1710
|
+
pending,
|
|
1711
|
+
onPartialFailure
|
|
1712
|
+
}
|
|
1713
|
+
});
|
|
1714
|
+
}
|
|
1715
|
+
firedGroups.push(groupId);
|
|
1716
|
+
}
|
|
1717
|
+
return firedGroups;
|
|
1718
|
+
}
|
|
1479
1719
|
async function checkTaskFileConsistency() {
|
|
1480
1720
|
const client = getClient();
|
|
1481
1721
|
let mismatches = 0;
|
|
@@ -1723,6 +1963,8 @@ function eventIcon(event) {
|
|
|
1723
1963
|
return "Orphan:";
|
|
1724
1964
|
case "subtasks_complete":
|
|
1725
1965
|
return "Subtasks done:";
|
|
1966
|
+
case "task_group_barrier":
|
|
1967
|
+
return "Task group:";
|
|
1726
1968
|
case "capacity_relaunch":
|
|
1727
1969
|
return "Relaunched:";
|
|
1728
1970
|
}
|
|
@@ -2463,7 +2705,7 @@ async function verifyPaneAtCapacity(sessionName) {
|
|
|
2463
2705
|
reason: `capture-pane failed: ${err instanceof Error ? err.message : String(err)}`
|
|
2464
2706
|
};
|
|
2465
2707
|
}
|
|
2466
|
-
const { isAtCapacity } = await import("./capacity-monitor-
|
|
2708
|
+
const { isAtCapacity } = await import("./capacity-monitor-A6TMCY5F.js");
|
|
2467
2709
|
if (!isAtCapacity(pane)) {
|
|
2468
2710
|
return {
|
|
2469
2711
|
atCapacity: false,
|
|
@@ -3263,6 +3505,11 @@ export {
|
|
|
3263
3505
|
ensureArchitectureDoc,
|
|
3264
3506
|
ensureGitignoreExe,
|
|
3265
3507
|
cleanOrphanedTaskFiles,
|
|
3508
|
+
readLatestCheckpoint,
|
|
3509
|
+
createTaskGroup,
|
|
3510
|
+
getGroupStatus,
|
|
3511
|
+
getGroupResults,
|
|
3512
|
+
checkAndFireBarriers,
|
|
3266
3513
|
checkTaskFileConsistency,
|
|
3267
3514
|
formatAge,
|
|
3268
3515
|
isStale,
|
|
@@ -11,13 +11,13 @@ import {
|
|
|
11
11
|
sessionScopeFilter,
|
|
12
12
|
updateTaskStatus,
|
|
13
13
|
writeNotification
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DZE2MBOW.js";
|
|
15
15
|
import {
|
|
16
16
|
getTransport
|
|
17
17
|
} from "./chunk-MVW62NIZ.js";
|
|
18
18
|
import {
|
|
19
19
|
recordOrchestrationEventBestEffort
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BCREJ6FD.js";
|
|
21
21
|
import {
|
|
22
22
|
getAgentRuntime
|
|
23
23
|
} from "./chunk-6RX2XEET.js";
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
isCoordinatorName,
|
|
34
34
|
isMultiInstance,
|
|
35
35
|
shouldAutoInstance
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3XGZAFHE.js";
|
|
37
37
|
import {
|
|
38
38
|
EXE_AI_DIR
|
|
39
39
|
} from "./chunk-WXW3XGWX.js";
|
|
@@ -159,7 +159,7 @@ async function dispatchTaskToEmployee(input) {
|
|
|
159
159
|
let crossProject = false;
|
|
160
160
|
if (input.projectName) {
|
|
161
161
|
try {
|
|
162
|
-
const { assertSessionScope } = await import("./session-scope-
|
|
162
|
+
const { assertSessionScope } = await import("./session-scope-7F3JL2RJ.js");
|
|
163
163
|
const check = assertSessionScope("dispatch_task", input.projectName);
|
|
164
164
|
if (check.reason === "cross_session_denied") {
|
|
165
165
|
crossProject = true;
|
|
@@ -500,7 +500,7 @@ async function updateTask(input) {
|
|
|
500
500
|
await markTaskNotificationsRead(taskFile);
|
|
501
501
|
if (input.status === "needs_review" && !isCoordinator) {
|
|
502
502
|
try {
|
|
503
|
-
const { writeNotification: writeNotification2 } = await import("./notifications-
|
|
503
|
+
const { writeNotification: writeNotification2 } = await import("./notifications-VWAMI4ZE.js");
|
|
504
504
|
await writeNotification2({
|
|
505
505
|
agentId: String(row.assigned_to),
|
|
506
506
|
agentRole: String(row.assigned_to),
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
listWorkflowDefinitions,
|
|
3
3
|
runWorkflow,
|
|
4
4
|
startWorkflow
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YTPLK6QP.js";
|
|
6
6
|
import {
|
|
7
7
|
initCRMBridge
|
|
8
8
|
} from "./chunk-ONKIWA3R.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-MP2AFCGL.js";
|
|
12
12
|
import {
|
|
13
13
|
getClient
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3XGZAFHE.js";
|
|
15
15
|
|
|
16
16
|
// src/gateway/router.ts
|
|
17
17
|
function matchesPlatform(msgPlatform, matchPlatform) {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V24ZGSQW.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter,
|
|
6
6
|
verifyPaneAtCapacity,
|
|
7
7
|
writeNotification
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-DZE2MBOW.js";
|
|
9
9
|
import {
|
|
10
10
|
listSessions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-Q4GGIM3A.js";
|
|
12
12
|
import {
|
|
13
13
|
getTransport
|
|
14
14
|
} from "./chunk-MVW62NIZ.js";
|
|
15
15
|
import {
|
|
16
16
|
recordOrchestrationEventBestEffort
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BCREJ6FD.js";
|
|
18
18
|
import {
|
|
19
19
|
getClient,
|
|
20
20
|
isCoordinatorName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3XGZAFHE.js";
|
|
22
22
|
|
|
23
23
|
// src/lib/capacity-monitor.ts
|
|
24
24
|
var CAPACITY_PATTERNS = [
|
|
@@ -3,30 +3,30 @@ import {
|
|
|
3
3
|
} from "./chunk-MLXJ5EZG.js";
|
|
4
4
|
import {
|
|
5
5
|
createTask
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EB3AAVAK.js";
|
|
7
7
|
import {
|
|
8
8
|
getActiveAgent
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BXLA6CQM.js";
|
|
10
10
|
import {
|
|
11
11
|
ensureEmployee,
|
|
12
12
|
logTaskDispatch,
|
|
13
13
|
resolveExeSession
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DZE2MBOW.js";
|
|
15
15
|
import {
|
|
16
16
|
recordOrchestrationEventBestEffort
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BCREJ6FD.js";
|
|
18
18
|
import {
|
|
19
19
|
getAgentRuntime
|
|
20
20
|
} from "./chunk-6RX2XEET.js";
|
|
21
21
|
import {
|
|
22
22
|
getLicenseSync
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-GT5E5PW6.js";
|
|
24
24
|
import {
|
|
25
25
|
getAgentContext
|
|
26
26
|
} from "./chunk-GJV3WDWM.js";
|
|
27
27
|
import {
|
|
28
28
|
isCoordinatorName
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3XGZAFHE.js";
|
|
30
30
|
|
|
31
31
|
// src/mcp/tools/create-task.ts
|
|
32
32
|
import { z } from "zod";
|
|
@@ -211,7 +211,7 @@ function registerCreateTask(server) {
|
|
|
211
211
|
session_scope: sessionScope,
|
|
212
212
|
created_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
213
213
|
}), "utf-8");
|
|
214
|
-
const { recordOrchestrationEventBestEffort: recordOE } = await import("./orchestration-events-
|
|
214
|
+
const { recordOrchestrationEventBestEffort: recordOE } = await import("./orchestration-events-7XAYQ2MT.js");
|
|
215
215
|
recordOE({
|
|
216
216
|
eventType: "signal.created",
|
|
217
217
|
source: "create-task.mcp",
|
|
@@ -243,7 +243,7 @@ function registerCreateTask(server) {
|
|
|
243
243
|
let projectConflictOpts = {};
|
|
244
244
|
try {
|
|
245
245
|
const { getClient } = await import("./lib/database.js");
|
|
246
|
-
const { sessionScopeFilter } = await import("./task-scope-
|
|
246
|
+
const { sessionScopeFilter } = await import("./task-scope-NM2C2QZX.js");
|
|
247
247
|
const client = getClient();
|
|
248
248
|
const scope = sessionScopeFilter();
|
|
249
249
|
const existing = await client.execute({
|