@askexenow/exe-os 0.9.203 → 0.9.205
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/init-db.sql +162 -0
- package/deploy/stack-manifests/v0.9.json +45 -1
- package/dist/{active-agent-EFWC3HGP.js → active-agent-4RUP4VYK.js} +2 -2
- package/dist/{active-agent-NXX5Z3LX.js → active-agent-VEML3XMS.js} +2 -2
- package/dist/{agentic-ontology-JS6DPKQB.js → agentic-ontology-FNJAKZF5.js} +1 -1
- package/dist/{backfill-metadata-PTACRLYK.js → backfill-metadata-BT4RLVMZ.js} +3 -3
- package/dist/{behaviors-WDIKLZA3.js → behaviors-LCPNHP5Q.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 +12 -12
- package/dist/bin/exe-agent-config.js +1 -1
- package/dist/bin/exe-agent.js +3 -3
- 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 +5 -5
- package/dist/bin/exe-heartbeat.js +8 -8
- package/dist/bin/exe-kill.js +11 -11
- package/dist/bin/exe-launch-agent.js +9 -9
- 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/orchestration-metrics.js +4 -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/{capacity-monitor-TGSIL7W4.js → capacity-monitor-EPHJTSKF.js} +9 -9
- package/dist/{catchup-brief-ABL4NSAE.js → catchup-brief-HVITENL5.js} +10 -10
- package/dist/{chunk-25K6KNZ5.js → chunk-22GPB6FO.js} +58 -6
- package/dist/chunk-2THPPZF2.js +81 -0
- package/dist/{chunk-K3O4MWMS.js → chunk-3MHKTBHZ.js} +1 -0
- package/dist/{chunk-UY6RQK5F.js → chunk-3N4ZEPZI.js} +1 -1
- package/dist/{chunk-SN6Z3CBF.js → chunk-3PDZQICZ.js} +1 -1
- package/dist/{chunk-CGM6BIK3.js → chunk-3S3ERUUH.js} +1 -1
- package/dist/{chunk-5EW4GKGZ.js → chunk-434A3L6O.js} +1 -1
- package/dist/{chunk-BQ4U2SYC.js → chunk-4FNJPA5O.js} +1 -1
- package/dist/{chunk-O5RJH6GU.js → chunk-4RJD3GXL.js} +1 -1
- package/dist/{chunk-3K2BCD5Y.js → chunk-5HTEMMOJ.js} +21 -4
- package/dist/{chunk-SZDSQ3AW.js → chunk-6JORPKMR.js} +3 -3
- package/dist/{chunk-DAFEIA2M.js → chunk-6MOFCQFH.js} +124 -65
- package/dist/{chunk-K62M5FIM.js → chunk-6VVSXO3M.js} +4 -4
- package/dist/{chunk-SPMVTZ7Z.js → chunk-723DSUG3.js} +3 -3
- package/dist/{chunk-5POKNLFV.js → chunk-7DTEJAIC.js} +2 -2
- package/dist/{chunk-E66FQ7IN.js → chunk-7HIWJLXK.js} +1 -1
- package/dist/{chunk-IGRQE5Y5.js → chunk-BGLXECHT.js} +2 -2
- package/dist/{chunk-BYHFW5CT.js → chunk-COOX4FXM.js} +1 -1
- package/dist/{chunk-GZLGB72W.js → chunk-CXBLK3ZA.js} +1 -1
- package/dist/{chunk-MJNI3S5H.js → chunk-EDQ4GH2D.js} +2 -2
- package/dist/{chunk-GPK2WJXA.js → chunk-EF57I73W.js} +1 -1
- package/dist/{chunk-HXYL4QX6.js → chunk-EUMLEWXO.js} +2 -2
- package/dist/{chunk-RJCZY4BY.js → chunk-FMKD6N33.js} +86 -10
- package/dist/{chunk-RN6XYY7U.js → chunk-FYJCMGTD.js} +71 -0
- package/dist/{chunk-USQF2GGF.js → chunk-H7U7FPQF.js} +82 -6
- package/dist/{chunk-FMI7SCZJ.js → chunk-HLYNKMAG.js} +1 -1
- package/dist/{chunk-BGOQFJ2H.js → chunk-HMGIQNME.js} +3 -3
- package/dist/chunk-IR4L6K5L.js +147 -0
- package/dist/chunk-ITYWLFYC.js +609 -0
- package/dist/{chunk-FFECDA24.js → chunk-JUB74GFQ.js} +2 -2
- package/dist/{chunk-D4B6SVEC.js → chunk-MKOW4EXB.js} +1 -1
- package/dist/{chunk-XWM23YJO.js → chunk-MQX47XMP.js} +2 -2
- package/dist/{chunk-IXFE5R6T.js → chunk-MZ2BL3JP.js} +2 -2
- package/dist/{chunk-WGMHQVGX.js → chunk-O2JGR7EU.js} +83 -6
- package/dist/{chunk-BV3L2S54.js → chunk-P2ZIM765.js} +1 -1
- package/dist/{chunk-DEGQESR7.js → chunk-PHCK4KQW.js} +3 -3
- package/dist/{chunk-Y2W54BET.js → chunk-PXDR3UTB.js} +8 -8
- package/dist/{chunk-ETHQJXO3.js → chunk-PYLNOBNW.js} +1 -1
- package/dist/{chunk-HXNTQP4B.js → chunk-RN6DEMC7.js} +1 -1
- package/dist/{chunk-3WMXVABU.js → chunk-S4AXKNPT.js} +1 -1
- package/dist/{chunk-X2BTDYHZ.js → chunk-SEAFDIKF.js} +13 -1
- package/dist/{chunk-QLKRYO7O.js → chunk-TCBUBBTL.js} +8 -8
- package/dist/{chunk-ZQMOF6E7.js → chunk-THFFC43M.js} +1 -1
- package/dist/{chunk-XXHDXAZV.js → chunk-VG3VVFF5.js} +1 -1
- package/dist/{chunk-P4JQGT4Q.js → chunk-VH6WU3GK.js} +2 -2
- package/dist/{chunk-AH6MV6CC.js → chunk-W4BFBCZA.js} +3 -3
- package/dist/{chunk-PVVA5SY5.js → chunk-XSOKVFQ6.js} +14 -3
- package/dist/{chunk-JUTI2DXY.js → chunk-YCL4RHFY.js} +1 -1
- package/dist/{chunk-UXD5KOND.js → chunk-YGUWCJN2.js} +2 -2
- package/dist/{chunk-AUPGTF7I.js → chunk-YOXXZAOR.js} +2 -2
- package/dist/{chunk-GPNUPCTZ.js → chunk-YXHY5F34.js} +2 -2
- package/dist/{chunk-6FJ2TJYB.js → chunk-ZDK3M72Z.js} +1 -1
- package/dist/{chunk-6H6Q4MJC.js → chunk-ZIBSTUGU.js} +1 -1
- package/dist/{chunk-LIHR5DQF.js → chunk-ZXZJLVGD.js} +1 -1
- package/dist/{co-occurrence-A2SJL5AH.js → co-occurrence-TJRQ5V7W.js} +1 -1
- package/dist/{crdt-sync-SGAW6DJQ.js → crdt-sync-RI7XPXTI.js} +1 -1
- package/dist/{crm-webhook-FBENY6FW.js → crm-webhook-AVG4F2NB.js} +2 -2
- package/dist/{cto-delegation-gate-A53RLTJZ.js → cto-delegation-gate-ZTNJLSPO.js} +7 -7
- package/dist/{daemon-orchestration-3U3XXFG7.js → daemon-orchestration-AKICH7C5.js} +10 -10
- package/dist/{exe-drift-3OUOHWAI.js → exe-drift-BPVS4MOJ.js} +2 -2
- package/dist/{exe-export-AFXTJ63F.js → exe-export-LL4CXNLT.js} +4 -4
- package/dist/{exe-import-QRZBTBBG.js → exe-import-JNKAAJ5T.js} +4 -4
- package/dist/{exe-key-BXN7WPOX.js → exe-key-C5UQ77AT.js} +1 -1
- package/dist/{fast-db-init-YVJD4JT2.js → fast-db-init-UNK4BEEO.js} +1 -1
- package/dist/gateway/index.js +6 -6
- package/dist/{git-staleness-DBFCOX65.js → git-staleness-WTJFIPHH.js} +1 -1
- package/dist/{git-task-sweep-O5CH3MKA.js → git-task-sweep-PT3RIE6W.js} +8 -8
- package/dist/{global-procedures-SL2TTCED.js → global-procedures-ZPN7KZH5.js} +2 -2
- package/dist/{graph-auto-extract-JGNJ3BB7.js → graph-auto-extract-4M4J42NA.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 +29 -18
- package/dist/hooks/session-end.js +13 -13
- package/dist/hooks/session-start.js +30 -7
- 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/index.js +15 -15
- package/dist/{installer-TAPAEWRV.js → installer-3DE2IDUZ.js} +4 -4
- package/dist/{installer-5FI6CX62.js → installer-IYELX3KG.js} +4 -4
- package/dist/{installer-HNOVAUW6.js → installer-SCWIMZT7.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 +102 -27
- 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 +9 -1
- 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 +46 -46
- package/dist/mcp/server.js +47 -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-6UAI2FAV.js → mcp-http-config-EWIT2DEN.js} +2 -2
- package/dist/{memory-cards-PVPUQ7MX.js → memory-cards-W4VTTFYM.js} +1 -1
- package/dist/{memory-graph-extractor-RP7ZXDTE.js → memory-graph-extractor-A3HRDXY6.js} +2 -2
- package/dist/{memory-poisoning-defense-DDBUHHGB.js → memory-poisoning-defense-MH6QBXVT.js} +1 -1
- package/dist/{memory-reflection-HLR26FXG.js → memory-reflection-RUCTWMQ5.js} +1 -1
- package/dist/{notifications-GHNYYITD.js → notifications-6GRSVIP6.js} +7 -7
- package/dist/{orchestration-events-2SVPXMK2.js → orchestration-events-MSJVUR4T.js} +6 -2
- package/dist/{orchestrator-3BDZ6OUC.js → orchestrator-QQKU4VM2.js} +9 -9
- package/dist/{plan-limits-QBNFIU45.js → plan-limits-NKUSDF3I.js} +2 -2
- package/dist/{projection-worker-B7HHFYEG.js → projection-worker-UEG6I5DV.js} +1 -1
- package/dist/{reranker-B3BOGR3A.js → reranker-JTDM3MV2.js} +1 -1
- package/dist/{review-polling-RUXU45AK.js → review-polling-MWBVXHG3.js} +8 -8
- package/dist/runtime/index.js +10 -10
- package/dist/{session-events-ICZPUGJN.js → session-events-FRB3UYJG.js} +8 -8
- package/dist/{session-kill-telemetry-OGFLFTYX.js → session-kill-telemetry-GPZUHBCT.js} +2 -2
- package/dist/{session-scope-UJI35BLD.js → session-scope-7BZTNB2X.js} +7 -7
- package/dist/{setup-wizard-M6ZZ2VNM.js → setup-wizard-2INM4CSL.js} +1 -1
- package/dist/{skill-refinement-WZL35CMY.js → skill-refinement-7C7X42Z5.js} +1 -1
- package/dist/{task-enforcement-AYHKGR45.js → task-enforcement-VB5P45ZM.js} +7 -7
- package/dist/{task-scope-EYAOY6YX.js → task-scope-ULC62J6G.js} +7 -7
- package/dist/{tasks-crud-K3UGPCPT.js → tasks-crud-IBSTM6ID.js} +9 -7
- package/dist/{tasks-review-J6LTVVO5.js → tasks-review-P4MCKBDT.js} +7 -7
- package/dist/telemetry-upload-Y3CPHI7M.js +214 -0
- package/dist/{token-budget-XU2QZEWX.js → token-budget-CO74EBTY.js} +1 -1
- package/dist/{tool-telemetry-OE57ERK7.js → tool-telemetry-5PX7A6TX.js} +3 -1
- package/dist/tui/App.js +15 -15
- package/dist/{tui-data-32OEC3DH.js → tui-data-YAT6A36V.js} +7 -7
- package/dist/{worker-gate-UIGQCEUE.js → worker-gate-27O2WEYU.js} +1 -1
- package/dist/{workflow-engine-IY7KO7DU.js → workflow-engine-4T36KCTQ.js} +2 -2
- package/dist/{worktree-VIXR2Z4J.js → worktree-QTCOX6RV.js} +7 -1
- package/package.json +1 -1
- package/release-notes.json +95 -95
- package/dist/chunk-64WZEXXA.js +0 -64
- package/dist/chunk-L63IOJ5N.js +0 -69
- package/dist/chunk-ZGQH3V2F.js +0 -254
- /package/dist/{chunk-3GFR2TX6.js → chunk-AF7A5IQ5.js} +0 -0
- /package/dist/{chunk-7SY5JOLR.js → chunk-ATKMIQXP.js} +0 -0
- /package/dist/{chunk-KCWIOR55.js → chunk-GONOOIFL.js} +0 -0
- /package/dist/{chunk-QQN7MHQG.js → chunk-ONCFSN5C.js} +0 -0
- /package/dist/{chunk-Q3MRTJLA.js → chunk-WVNWAV36.js} +0 -0
- /package/dist/{chunk-RH5NYRQH.js → chunk-XJQASQPO.js} +0 -0
- /package/dist/{chunk-LJA6RQ3L.js → chunk-YKCH4T4T.js} +0 -0
- /package/dist/{core-memory-VZ4YJVMA.js → core-memory-3QGHBERR.js} +0 -0
- /package/dist/{wiki-acl-NUUPHYWC.js → wiki-acl-WCBKBLGQ.js} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3S3ERUUH.js";
|
|
4
4
|
import {
|
|
5
5
|
updateTask
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-O2JGR7EU.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureEmployee,
|
|
9
9
|
extractRootExe,
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
sessionScopeFilter,
|
|
15
15
|
strictSessionScopeFilter,
|
|
16
16
|
writeNotification
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-FMKD6N33.js";
|
|
18
18
|
import {
|
|
19
19
|
queueIntercom
|
|
20
20
|
} from "./chunk-QI4IXJN7.js";
|
|
21
21
|
import {
|
|
22
22
|
listSessions
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IR4L6K5L.js";
|
|
24
24
|
import {
|
|
25
25
|
getTransport
|
|
26
26
|
} from "./chunk-5YDHBZCO.js";
|
|
@@ -28,6 +28,9 @@ import {
|
|
|
28
28
|
listTmuxSessions,
|
|
29
29
|
parseContextPercentage
|
|
30
30
|
} from "./chunk-GZIAQYGI.js";
|
|
31
|
+
import {
|
|
32
|
+
recordOrchestrationEventBestEffort
|
|
33
|
+
} from "./chunk-ITYWLFYC.js";
|
|
31
34
|
import {
|
|
32
35
|
getAgentRuntime
|
|
33
36
|
} from "./chunk-6RX2XEET.js";
|
|
@@ -35,7 +38,7 @@ import {
|
|
|
35
38
|
baseAgentName,
|
|
36
39
|
isCoordinatorName,
|
|
37
40
|
shouldAutoInstance
|
|
38
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-3MHKTBHZ.js";
|
|
39
42
|
import {
|
|
40
43
|
loadConfigSync
|
|
41
44
|
} from "./chunk-WXW3XGWX.js";
|
|
@@ -257,6 +260,14 @@ async function checkSessionTTL(deps) {
|
|
|
257
260
|
agentId: entry.agentId,
|
|
258
261
|
reason: killReason
|
|
259
262
|
});
|
|
263
|
+
recordOrchestrationEventBestEffort({
|
|
264
|
+
eventType: killReason === "ttl_age" ? "session.ttl_kill" : "session.context_kill",
|
|
265
|
+
source: "daemon-orchestration.checkSessionTTL",
|
|
266
|
+
agentId: entry.agentId,
|
|
267
|
+
tmuxSession: entry.windowName,
|
|
268
|
+
sessionScope: entry.windowName.includes("-") ? entry.windowName.slice(entry.windowName.indexOf("-") + 1) : null,
|
|
269
|
+
payload: { ageHours: parseFloat(ageHours.toFixed(2)), contextPct, killReason }
|
|
270
|
+
});
|
|
260
271
|
deps.killSession(entry.windowName);
|
|
261
272
|
killed.push(entry.windowName);
|
|
262
273
|
}
|
|
@@ -356,6 +367,14 @@ async function pollIdleKill(deps, idleTickCounts, opts) {
|
|
|
356
367
|
reason: "idle",
|
|
357
368
|
ticksIdle: nextTicks
|
|
358
369
|
});
|
|
370
|
+
recordOrchestrationEventBestEffort({
|
|
371
|
+
eventType: "session.idle_kill",
|
|
372
|
+
source: "daemon-orchestration.pollIdleKill",
|
|
373
|
+
agentId: entry.agentId,
|
|
374
|
+
tmuxSession: entry.windowName,
|
|
375
|
+
sessionScope: entry.windowName.includes("-") ? entry.windowName.slice(entry.windowName.indexOf("-") + 1) : null,
|
|
376
|
+
payload: { ticksIdle: nextTicks }
|
|
377
|
+
});
|
|
359
378
|
deps.killSession(entry.windowName);
|
|
360
379
|
try {
|
|
361
380
|
const { execFileSync: verifyExec } = await import("child_process");
|
|
@@ -1532,6 +1551,12 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
1532
1551
|
const agentName = deps.parseAgentFromWorktreePath(wt.path);
|
|
1533
1552
|
if (!agentName) {
|
|
1534
1553
|
result.skipped.push({ path: wt.path, reason: "could not parse agent name" });
|
|
1554
|
+
recordOrchestrationEventBestEffort({
|
|
1555
|
+
eventType: "worktree.skipped",
|
|
1556
|
+
source: "daemon-orchestration.reapOrphanedWorktrees",
|
|
1557
|
+
severity: "warn",
|
|
1558
|
+
payload: { reason: "could not parse agent name" }
|
|
1559
|
+
});
|
|
1535
1560
|
continue;
|
|
1536
1561
|
}
|
|
1537
1562
|
if (liveAgents.has(agentName)) continue;
|
|
@@ -1540,6 +1565,12 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
1540
1565
|
const ageMs = nowMs - mtimeMs;
|
|
1541
1566
|
if (ageMs < WORKTREE_MIN_AGE_MS) {
|
|
1542
1567
|
result.skipped.push({ path: wt.path, reason: `too young (${Math.round(ageMs / 6e4)}m < 60m)` });
|
|
1568
|
+
recordOrchestrationEventBestEffort({
|
|
1569
|
+
eventType: "worktree.skipped",
|
|
1570
|
+
source: "daemon-orchestration.reapOrphanedWorktrees",
|
|
1571
|
+
agentId: agentName,
|
|
1572
|
+
payload: { reason: "too young", ageMinutes: Math.round(ageMs / 6e4) }
|
|
1573
|
+
});
|
|
1543
1574
|
continue;
|
|
1544
1575
|
}
|
|
1545
1576
|
if (deps.isWorktreeDirty(wt.path)) {
|
|
@@ -1549,6 +1580,13 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
1549
1580
|
`
|
|
1550
1581
|
);
|
|
1551
1582
|
result.skipped.push({ path: wt.path, reason: "uncommitted changes" });
|
|
1583
|
+
recordOrchestrationEventBestEffort({
|
|
1584
|
+
eventType: "worktree.skipped",
|
|
1585
|
+
source: "daemon-orchestration.reapOrphanedWorktrees",
|
|
1586
|
+
severity: "warn",
|
|
1587
|
+
agentId: agentName,
|
|
1588
|
+
payload: { reason: "uncommitted changes", ageHours: ageH2 }
|
|
1589
|
+
});
|
|
1552
1590
|
continue;
|
|
1553
1591
|
}
|
|
1554
1592
|
const ageH = Math.round(ageMs / 36e5);
|
|
@@ -1560,9 +1598,23 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
1560
1598
|
`[worktree-reaper] Pruned orphan worktree: ${wt.path} (agent: ${agentName}, age: ${ageH}h)
|
|
1561
1599
|
`
|
|
1562
1600
|
);
|
|
1601
|
+
recordOrchestrationEventBestEffort({
|
|
1602
|
+
eventType: "worktree.pruned",
|
|
1603
|
+
source: "daemon-orchestration.reapOrphanedWorktrees",
|
|
1604
|
+
agentId: agentName,
|
|
1605
|
+
payload: { branch: wt.branch, ageHours: ageH }
|
|
1606
|
+
});
|
|
1563
1607
|
result.pruned.push(wt.path);
|
|
1564
1608
|
} else {
|
|
1565
1609
|
result.skipped.push({ path: wt.path, reason: "git worktree remove failed" });
|
|
1610
|
+
recordOrchestrationEventBestEffort({
|
|
1611
|
+
eventType: "worktree.failed",
|
|
1612
|
+
source: "daemon-orchestration.reapOrphanedWorktrees",
|
|
1613
|
+
severity: "warn",
|
|
1614
|
+
agentId: agentName,
|
|
1615
|
+
errorCode: "git_worktree_remove_failed",
|
|
1616
|
+
payload: { branch: wt.branch, ageHours: ageH }
|
|
1617
|
+
});
|
|
1566
1618
|
}
|
|
1567
1619
|
}
|
|
1568
1620
|
}
|
|
@@ -1570,7 +1622,7 @@ async function reapOrphanedWorktrees(deps, nowMs = Date.now()) {
|
|
|
1570
1622
|
}
|
|
1571
1623
|
async function createWorktreeReaperRealDeps() {
|
|
1572
1624
|
const { getPaneCwd } = await import("./lib/tmux-status.js");
|
|
1573
|
-
const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-
|
|
1625
|
+
const { getGitRoot, isWorktreeDirty: isDirty } = await import("./worktree-QTCOX6RV.js");
|
|
1574
1626
|
const { statSync: statSync2 } = await import("fs");
|
|
1575
1627
|
const { basename } = await import("path");
|
|
1576
1628
|
return {
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// src/bin/fast-db-init.ts
|
|
2
|
+
async function fastDbInit() {
|
|
3
|
+
const { isInitialized, getClient, setExternalClient } = await import("./lib/database.js");
|
|
4
|
+
if (isInitialized()) {
|
|
5
|
+
return getClient();
|
|
6
|
+
}
|
|
7
|
+
const forceDirect = process.env.EXE_DB_DIRECT === "1" || process.env.EXE_DB_READONLY === "1" || process.env.EXE_SKIP_DAEMON === "1";
|
|
8
|
+
if (!forceDirect) {
|
|
9
|
+
try {
|
|
10
|
+
const { connectEmbedDaemon, sendDaemonRequest, isClientConnected, disconnectClient } = await import("./lib/exe-daemon-client.js");
|
|
11
|
+
const { deserializeResultSet } = await import("./daemon-protocol-XW2OLNBS.js");
|
|
12
|
+
await Promise.race([
|
|
13
|
+
connectEmbedDaemon(),
|
|
14
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error("Daemon socket timeout (2s)")), 2e3))
|
|
15
|
+
]);
|
|
16
|
+
if (isClientConnected()) {
|
|
17
|
+
const daemonClient = {
|
|
18
|
+
async execute(stmt) {
|
|
19
|
+
const sql = typeof stmt === "string" ? stmt : stmt.sql;
|
|
20
|
+
const args = typeof stmt === "string" ? [] : Array.isArray(stmt.args) ? stmt.args : [];
|
|
21
|
+
const resp = await sendDaemonRequest({ type: "db-execute", sql, args });
|
|
22
|
+
if (resp.error) throw new Error(String(resp.error));
|
|
23
|
+
if (resp.db) return deserializeResultSet(resp.db);
|
|
24
|
+
throw new Error("Unexpected daemon response");
|
|
25
|
+
},
|
|
26
|
+
async batch(stmts, mode) {
|
|
27
|
+
const statements = stmts.map((s) => {
|
|
28
|
+
const sql = typeof s === "string" ? s : s.sql;
|
|
29
|
+
const args = typeof s === "string" ? [] : Array.isArray(s.args) ? s.args : [];
|
|
30
|
+
return { sql, args };
|
|
31
|
+
});
|
|
32
|
+
const resp = await sendDaemonRequest({ type: "db-batch", statements, mode: mode ?? "deferred" });
|
|
33
|
+
if (resp.error) throw new Error(String(resp.error));
|
|
34
|
+
const batchResults = resp["db-batch"];
|
|
35
|
+
if (batchResults) return batchResults.map(deserializeResultSet);
|
|
36
|
+
throw new Error("Unexpected daemon batch response");
|
|
37
|
+
},
|
|
38
|
+
async transaction(_mode) {
|
|
39
|
+
throw new Error("Transactions not supported via daemon socket");
|
|
40
|
+
},
|
|
41
|
+
async executeMultiple(_sql) {
|
|
42
|
+
throw new Error("executeMultiple not supported via daemon socket");
|
|
43
|
+
},
|
|
44
|
+
async migrate(_stmts) {
|
|
45
|
+
throw new Error("migrate not supported via daemon socket");
|
|
46
|
+
},
|
|
47
|
+
sync() {
|
|
48
|
+
return Promise.resolve(void 0);
|
|
49
|
+
},
|
|
50
|
+
close() {
|
|
51
|
+
},
|
|
52
|
+
get closed() {
|
|
53
|
+
return false;
|
|
54
|
+
},
|
|
55
|
+
get protocol() {
|
|
56
|
+
return "file";
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
try {
|
|
60
|
+
await daemonClient.execute("SELECT 1");
|
|
61
|
+
} catch {
|
|
62
|
+
try {
|
|
63
|
+
disconnectClient();
|
|
64
|
+
} catch {
|
|
65
|
+
}
|
|
66
|
+
throw new Error("Daemon socket validation failed");
|
|
67
|
+
}
|
|
68
|
+
setExternalClient(daemonClient);
|
|
69
|
+
return daemonClient;
|
|
70
|
+
}
|
|
71
|
+
} catch {
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const { initStore } = await import("./lib/store.js");
|
|
75
|
+
await initStore({ lightweight: true });
|
|
76
|
+
return getClient();
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export {
|
|
80
|
+
fastDbInit
|
|
81
|
+
};
|
|
@@ -1394,6 +1394,7 @@ function getClient() {
|
|
|
1394
1394
|
async function initDaemonClient() {
|
|
1395
1395
|
if (process.env.DATABASE_URL && process.env.EXE_USE_POSTGRES === "1") return;
|
|
1396
1396
|
if (process.env.EXE_IS_DAEMON === "1") return;
|
|
1397
|
+
if (process.env.EXE_DB_READONLY === "1" || process.env.EXE_DB_DIRECT === "1" || process.env.EXE_SKIP_DAEMON === "1") return;
|
|
1397
1398
|
if (process.env.VITEST) return;
|
|
1398
1399
|
if (!_resilientClient) return;
|
|
1399
1400
|
if (_daemonClient) return;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
recordSessionKill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3S3ERUUH.js";
|
|
4
4
|
import {
|
|
5
5
|
sessionScopeFilter,
|
|
6
6
|
verifyPaneAtCapacity,
|
|
7
7
|
writeNotification
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FMKD6N33.js";
|
|
9
9
|
import {
|
|
10
10
|
listSessions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-IR4L6K5L.js";
|
|
12
12
|
import {
|
|
13
13
|
getTransport
|
|
14
14
|
} from "./chunk-5YDHBZCO.js";
|
|
15
|
+
import {
|
|
16
|
+
recordOrchestrationEventBestEffort
|
|
17
|
+
} from "./chunk-ITYWLFYC.js";
|
|
15
18
|
import {
|
|
16
19
|
getClient,
|
|
17
20
|
isCoordinatorName
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-3MHKTBHZ.js";
|
|
19
22
|
|
|
20
23
|
// src/lib/capacity-monitor.ts
|
|
21
24
|
var CAPACITY_PATTERNS = [
|
|
@@ -155,6 +158,13 @@ async function createOrRefreshResumeTask(agentId, projectDir, openTasks, session
|
|
|
155
158
|
sql: `UPDATE tasks SET context = ?, updated_at = ? WHERE id = ?`,
|
|
156
159
|
args: [context, now, taskId]
|
|
157
160
|
});
|
|
161
|
+
recordOrchestrationEventBestEffort({
|
|
162
|
+
eventType: "session.resumed",
|
|
163
|
+
source: "capacity-monitor.createOrRefreshResumeTask",
|
|
164
|
+
agentId,
|
|
165
|
+
taskId,
|
|
166
|
+
payload: { created: false, action: "refreshed" }
|
|
167
|
+
});
|
|
158
168
|
return { created: false, taskId };
|
|
159
169
|
}
|
|
160
170
|
const { createTask } = await import("./lib/tasks.js");
|
|
@@ -167,6 +177,13 @@ async function createOrRefreshResumeTask(agentId, projectDir, openTasks, session
|
|
|
167
177
|
context,
|
|
168
178
|
baseDir: projectDir
|
|
169
179
|
});
|
|
180
|
+
recordOrchestrationEventBestEffort({
|
|
181
|
+
eventType: "session.resumed",
|
|
182
|
+
source: "capacity-monitor.createOrRefreshResumeTask",
|
|
183
|
+
agentId,
|
|
184
|
+
taskId: task.id,
|
|
185
|
+
payload: { created: true, action: "created", openTaskCount: openTasks.length }
|
|
186
|
+
});
|
|
170
187
|
return { created: true, taskId: task.id };
|
|
171
188
|
}
|
|
172
189
|
async function pollCapacityDead() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isCrdtSyncEnabled
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YKCH4T4T.js";
|
|
4
4
|
import {
|
|
5
5
|
decryptSyncBlob,
|
|
6
6
|
encryptSyncBlob,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
loadEmployees,
|
|
13
13
|
registerBinSymlinks,
|
|
14
14
|
saveEmployees
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-3MHKTBHZ.js";
|
|
16
16
|
import {
|
|
17
17
|
loadDeviceId
|
|
18
18
|
} from "./chunk-72DJ42IE.js";
|
|
@@ -489,7 +489,7 @@ async function cloudSync(config) {
|
|
|
489
489
|
let pulled = 0;
|
|
490
490
|
if (pullResult.records.length > 0) {
|
|
491
491
|
if (isCrdtSyncEnabled()) {
|
|
492
|
-
const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-
|
|
492
|
+
const { initCrdtDoc, importExistingMemories, readAllMemories } = await import("./crdt-sync-RI7XPXTI.js");
|
|
493
493
|
initCrdtDoc();
|
|
494
494
|
importExistingMemories(
|
|
495
495
|
pullResult.records.map((rec) => ({
|