@askexenow/exe-os 0.9.326 → 0.9.327
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/dist/{anthropic-auth-EIGM3FAZ.js → anthropic-auth-S7HEBGUG.js} +1 -1
- package/dist/{backfill-metadata-CE35JGTX.js → backfill-metadata-G4NYR2AR.js} +1 -1
- package/dist/{behaviors-HZ6BIOGX.js → behaviors-MJHQQHA3.js} +2 -2
- package/dist/bin/agentic-ontology-backfill.js +1 -1
- package/dist/bin/agentic-reflection-backfill.js +1 -1
- package/dist/bin/agentic-semantic-label.js +1 -1
- package/dist/bin/backfill-conversations.js +1 -1
- package/dist/bin/backfill-responses.js +1 -1
- package/dist/bin/backfill-vectors.js +2 -2
- package/dist/bin/bulk-sync-postgres.js +3 -3
- package/dist/bin/cleanup-stale-review-tasks.js +4 -4
- package/dist/bin/cli.js +6 -6
- package/dist/bin/deferred-daemon-restart.js +36 -36
- package/dist/bin/exe-assign.js +1 -1
- package/dist/bin/exe-boot.js +8 -8
- package/dist/bin/exe-cloud.js +3 -3
- package/dist/bin/exe-dispatch.js +4 -4
- package/dist/bin/exe-doctor.js +3 -3
- package/dist/bin/exe-export-behaviors.js +4 -4
- package/dist/bin/exe-forget.js +3 -3
- package/dist/bin/exe-gateway.js +5 -5
- package/dist/bin/exe-heartbeat.js +4 -4
- package/dist/bin/exe-kill.js +6 -6
- package/dist/bin/exe-launch-agent.js +7 -7
- package/dist/bin/exe-pending-messages.js +5 -5
- package/dist/bin/exe-pending-notifications.js +4 -4
- package/dist/bin/exe-pending-reviews.js +4 -4
- package/dist/bin/exe-review.js +5 -5
- package/dist/bin/exe-search.js +2 -2
- package/dist/bin/exe-session-cleanup.js +7 -7
- package/dist/bin/exe-settings.js +3 -3
- package/dist/bin/exe-start-codex.js +4 -4
- package/dist/bin/exe-start-opencode.js +3 -3
- package/dist/bin/exe-status.js +5 -5
- package/dist/bin/exe-team.js +1 -1
- package/dist/bin/git-sweep.js +5 -5
- package/dist/bin/graph-backfill.js +1 -1
- package/dist/bin/graph-export.js +2 -2
- package/dist/bin/import-history.js +2 -2
- package/dist/bin/install.js +59 -38
- package/dist/bin/intercom-check.js +4 -4
- package/dist/bin/mcp-sessions.js +2 -2
- package/dist/bin/orchestration-metrics.js +1 -1
- package/dist/bin/scan-tasks.js +4 -4
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +1 -1
- package/dist/{capacity-monitor-HVWEYDCG.js → capacity-monitor-VMKR23KP.js} +5 -5
- package/dist/{catchup-brief-YYEVWAZN.js → catchup-brief-VKI6KS2Y.js} +5 -5
- package/dist/{chunk-VCQNILOK.js → chunk-26MWYEOV.js} +3 -3
- package/dist/{chunk-SG6N2YPV.js → chunk-2STMA5XS.js} +1 -1
- package/dist/{chunk-E6TB5MMR.js → chunk-3ZM6ETUZ.js} +3 -3
- package/dist/{chunk-VDHLCILZ.js → chunk-4C6HNTC3.js} +4 -4
- package/dist/{chunk-7A3E5ZWF.js → chunk-4MHWV4OP.js} +1 -1
- package/dist/{chunk-O4FGIGAS.js → chunk-4RRSCGBI.js} +1 -1
- package/dist/{chunk-6APWOKOT.js → chunk-4TATUT6T.js} +1 -1
- package/dist/{chunk-LFRFAGV2.js → chunk-5BVVHNYL.js} +1 -1
- package/dist/{chunk-RULJKRL7.js → chunk-5H46HNHN.js} +7 -7
- package/dist/{chunk-5QYY6QIP.js → chunk-6NM5LLKK.js} +2 -2
- package/dist/{chunk-MDMYOY6A.js → chunk-6PFVY2IQ.js} +40 -6
- package/dist/{chunk-3COTSHKH.js → chunk-7V5EBDP4.js} +1 -1
- package/dist/{chunk-4YDFTZTH.js → chunk-B2GZO7GQ.js} +1 -1
- package/dist/{chunk-FDNYBZPT.js → chunk-CFWPUWBR.js} +1 -1
- package/dist/{chunk-AKQJILJK.js → chunk-CVQLACEJ.js} +1 -1
- package/dist/{chunk-WA6X7HFB.js → chunk-D6WLF65C.js} +2 -2
- package/dist/{chunk-MPF33E6Q.js → chunk-DQBB4E5A.js} +6 -6
- package/dist/{chunk-RXMYEWEC.js → chunk-E2ZJFHUE.js} +1 -1
- package/dist/{chunk-ZDPQTWYD.js → chunk-HNWJAA6M.js} +5 -5
- package/dist/{chunk-4O7Y6WQX.js → chunk-I5P6HMIR.js} +55 -55
- package/dist/{chunk-V4HBRYKM.js → chunk-JE3LZC4F.js} +1 -1
- package/dist/{chunk-3EA2MF23.js → chunk-JKUG5ENJ.js} +7 -7
- package/dist/{chunk-HAQUN74P.js → chunk-K5VC65BV.js} +2 -2
- package/dist/{chunk-I5YP6SUP.js → chunk-KDIX5B6B.js} +1 -1
- package/dist/{chunk-F4PFF7ZI.js → chunk-KXEGPANT.js} +1 -1
- package/dist/{chunk-H6WYBKVG.js → chunk-NAWS3DP6.js} +56 -0
- package/dist/{chunk-POAG6MGC.js → chunk-OA7JEC62.js} +1 -1
- package/dist/{chunk-LBG3TRZX.js → chunk-Q34ZIJDB.js} +1 -1
- package/dist/{chunk-HO5VLDK4.js → chunk-Q5H6BGUN.js} +1 -1
- package/dist/{chunk-YUFM7I7D.js → chunk-QRWK4SCC.js} +2 -2
- package/dist/{chunk-2G7MNOP2.js → chunk-RDRZYP2F.js} +1 -1
- package/dist/{chunk-F7DI6PDD.js → chunk-SSIW3H6B.js} +1 -1
- package/dist/{chunk-4IVWTJDR.js → chunk-TFR447JP.js} +1 -1
- package/dist/{chunk-BNCE4226.js → chunk-TTXESWLS.js} +37 -15
- package/dist/{chunk-CF2PNIN2.js → chunk-UA6BK6MR.js} +2 -2
- package/dist/{chunk-4TXRUGPA.js → chunk-VGMACSEV.js} +4 -1
- package/dist/{chunk-6QTLUPXB.js → chunk-WBOMQSIL.js} +1 -1
- package/dist/{chunk-FYWV3S2F.js → chunk-WFWAGITG.js} +1 -1
- package/dist/{chunk-FKE5HFPR.js → chunk-X23SNB2L.js} +2 -2
- package/dist/{chunk-KYWTZG2U.js → chunk-X4PBMDEL.js} +2 -2
- package/dist/{chunk-ZOMG6FSE.js → chunk-X4QOQGKK.js} +1 -1
- package/dist/{chunk-MMGYRA3H.js → chunk-Z5YHUF4U.js} +1 -1
- package/dist/{cleanup-graph-garbage-IGWP3WQY.js → cleanup-graph-garbage-BIHVTX6G.js} +1 -1
- package/dist/{crm-webhook-QSZYCR6W.js → crm-webhook-JAPAWSFX.js} +2 -2
- package/dist/{cto-delegation-gate-7WG3YIKI.js → cto-delegation-gate-HUYNJDR3.js} +3 -3
- package/dist/{daemon-orchestration-TPZS2O7J.js → daemon-orchestration-2C3IFP24.js} +7 -7
- package/dist/{documents-HTJ5JWXT.js → documents-KD4P3KK3.js} +2 -2
- package/dist/{dreaming-Q3C57VM7.js → dreaming-IILRKU2T.js} +4 -4
- package/dist/{exe-export-OEXUIYKT.js → exe-export-25LGMRBD.js} +3 -3
- package/dist/{exe-import-GEBZ6BIU.js → exe-import-OZRUFUCZ.js} +3 -3
- package/dist/{exe-key-HUYZOUI6.js → exe-key-22QBJYEZ.js} +36 -36
- package/dist/{exe-snapshot-PZ2IFXI6.js → exe-snapshot-XQHMEKWY.js} +6 -6
- package/dist/{fast-db-init-RQLJQFJG.js → fast-db-init-YMAULA2T.js} +1 -1
- package/dist/gateway/index.js +6 -6
- package/dist/hooks/bug-report-worker.js +6 -6
- package/dist/hooks/codex-stop-task-finalizer.js +6 -6
- package/dist/hooks/commit-complete.js +6 -6
- package/dist/hooks/error-recall.js +2 -2
- package/dist/hooks/ingest.js +2 -2
- package/dist/hooks/instructions-loaded.js +1 -1
- package/dist/hooks/manifest.json +18 -18
- package/dist/hooks/notification.js +1 -1
- package/dist/hooks/post-compact.js +4 -4
- package/dist/hooks/post-tool-combined.js +2 -2
- package/dist/hooks/pre-compact.js +5 -5
- package/dist/hooks/pre-tool-use.js +64 -14
- package/dist/hooks/prompt-submit.js +15 -15
- package/dist/hooks/session-end.js +7 -7
- package/dist/hooks/session-start.js +15 -10
- package/dist/hooks/stop.js +7 -7
- package/dist/hooks/subagent-stop.js +41 -17
- package/dist/hooks/summary-worker.js +7 -7
- package/dist/index.js +11 -11
- package/dist/{intercom-queue-4B2S5UR5.js → intercom-queue-ICTUFK7B.js} +3 -3
- package/dist/lib/cloud-sync.js +3 -3
- package/dist/lib/consolidation.js +3 -3
- package/dist/lib/exe-daemon.js +34 -34
- package/dist/lib/hybrid-search.js +2 -2
- package/dist/lib/messaging.js +4 -4
- package/dist/lib/schedules.js +2 -2
- package/dist/lib/skill-learning.js +3 -3
- package/dist/lib/store.js +1 -1
- package/dist/lib/tasks.js +5 -5
- package/dist/lib/tmux-routing.js +3 -3
- package/dist/mcp/register-tools.js +35 -35
- package/dist/mcp/server.js +36 -36
- package/dist/mcp/tools/create-task.js +6 -6
- package/dist/mcp/tools/deactivate-behavior.js +3 -3
- package/dist/mcp/tools/list-tasks.js +6 -6
- package/dist/mcp/tools/send-message.js +5 -5
- package/dist/mcp/tools/update-task.js +6 -6
- package/dist/{memory-cards-NCNSZRNK.js → memory-cards-LUEGLUID.js} +1 -1
- package/dist/{memory-pressure-watchdog-UX4XMMP6.js → memory-pressure-watchdog-TW64VHUL.js} +4 -4
- package/dist/{notifications-O2GZIMSH.js → notifications-EASXB2JE.js} +3 -3
- package/dist/{orchestrator-5JIQZQ5G.js → orchestrator-4SXBCLQV.js} +4 -4
- package/dist/{pipeline-router-JMKG24IL.js → pipeline-router-3SFCDHEK.js} +1 -1
- package/dist/{projection-worker-UCMUBSR3.js → projection-worker-G7RGIGRS.js} +1 -1
- package/dist/{reranker-NDRQJ3W6.js → reranker-CSBCUD3K.js} +1 -1
- package/dist/{retrieval-health-RWWVBLYS.js → retrieval-health-CIGIAIPO.js} +2 -2
- package/dist/{review-polling-3XGQGAZT.js → review-polling-TT7AJ5G3.js} +4 -4
- package/dist/runtime/index.js +5 -5
- package/dist/{self-query-router-EJ3ZWUOK.js → self-query-router-TWBB22QR.js} +2 -2
- package/dist/{session-events-RYV6U25T.js → session-events-XFBSFPQ4.js} +4 -4
- package/dist/{session-kill-telemetry-PDV5AT74.js → session-kill-telemetry-F3U42ZOH.js} +4 -4
- package/dist/{session-scope-EWPUHO7C.js → session-scope-SFJKNTYS.js} +3 -3
- package/dist/{setup-wizard-ZZUNU3YM.js → setup-wizard-J6IU42MO.js} +1 -1
- package/dist/{skill-refinement-TU54OAT7.js → skill-refinement-32URPZ6C.js} +1 -1
- package/dist/{task-enforcement-BIOCLX7K.js → task-enforcement-H7PIZQ32.js} +4 -4
- package/dist/{task-scope-SUWJ7NLW.js → task-scope-TJKJNOIY.js} +3 -3
- package/dist/{tasks-crud-ZFTYVPD3.js → tasks-crud-DH7KNBNH.js} +3 -3
- package/dist/{tasks-notify-VXHGONXH.js → tasks-notify-MXKDKJCJ.js} +4 -4
- package/dist/{tasks-review-MUHMWDLT.js → tasks-review-YWYNSD7S.js} +3 -3
- package/dist/{telemetry-upload-4NCZC5IX.js → telemetry-upload-6NWWX5TW.js} +1 -1
- package/dist/tui/App.js +9 -9
- package/dist/{tui-data-235ICHCM.js → tui-data-AURSEMGY.js} +3 -3
- package/dist/{worker-gate-CEVF4IZZ.js → worker-gate-TKGFTWNW.js} +1 -1
- package/dist/{workflow-engine-AGYTVD5E.js → workflow-engine-5GGI26XG.js} +2 -2
- package/dist/{worktree-B6YQISX7.js → worktree-XZRXYDOZ.js} +1 -1
- package/dist/{worktree-sweep-SEYVSPLG.js → worktree-sweep-PRRFGQD4.js} +2 -2
- package/package.json +1 -1
- package/release-notes.json +20 -22
- /package/dist/{chunk-WN5XF24Y.js → chunk-EXWHDHHZ.js} +0 -0
- /package/dist/{chunk-QGJAR4HP.js → chunk-IE2R3NJO.js} +0 -0
- /package/dist/{chunk-O5JGX347.js → chunk-LUNBOAYW.js} +0 -0
- /package/dist/{chunk-4WAJZ2HV.js → chunk-MPIYQUJS.js} +0 -0
- /package/dist/{chunk-XFMHIDL4.js → chunk-TADPFDZ4.js} +0 -0
- /package/dist/{chunk-NUVHBQM3.js → chunk-XZBQ6QJB.js} +0 -0
- /package/dist/{core-memory-3PQC5CJG.js → core-memory-MIS5DKJ4.js} +0 -0
|
@@ -5,14 +5,14 @@ import "../chunk-SH45SJQW.js";
|
|
|
5
5
|
import {
|
|
6
6
|
hybridSearch,
|
|
7
7
|
lightweightSearch
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-JKUG5ENJ.js";
|
|
9
9
|
import "../chunk-AB4PAQYK.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveHookSearchEnabled
|
|
12
12
|
} from "../chunk-KWOAM7TA.js";
|
|
13
13
|
import {
|
|
14
14
|
initStore
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-JE3LZC4F.js";
|
|
16
16
|
import "../chunk-CHCA3ZM2.js";
|
|
17
17
|
import "../chunk-OTVEIJUQ.js";
|
|
18
18
|
import "../chunk-IWZHYCNV.js";
|
package/dist/hooks/ingest.js
CHANGED
|
@@ -12,7 +12,7 @@ import "../chunk-SH45SJQW.js";
|
|
|
12
12
|
import {
|
|
13
13
|
registerWorkerPid,
|
|
14
14
|
tryAcquireWorkerSlot
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-Q34ZIJDB.js";
|
|
16
16
|
import {
|
|
17
17
|
getActiveAgent
|
|
18
18
|
} from "../chunk-PQ5Y34JU.js";
|
|
@@ -377,7 +377,7 @@ Your output files must start with: exe/output/${agent.agentId}-`
|
|
|
377
377
|
if (cpDaemonReady()) {
|
|
378
378
|
const { initStore: cpInit } = await import("../lib/store.js");
|
|
379
379
|
await cpInit();
|
|
380
|
-
const { writeCheckpoint } = await import("../tasks-crud-
|
|
380
|
+
const { writeCheckpoint } = await import("../tasks-crud-DH7KNBNH.js");
|
|
381
381
|
await writeCheckpoint({
|
|
382
382
|
taskId: taskData.taskId,
|
|
383
383
|
step: `auto_checkpoint_${counter.total}`,
|
|
@@ -74,7 +74,7 @@ process.stdin.on("end", async () => {
|
|
|
74
74
|
pass = false;
|
|
75
75
|
}
|
|
76
76
|
try {
|
|
77
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
77
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
78
78
|
await fastDbInit();
|
|
79
79
|
const { getClient } = await import("../lib/database.js");
|
|
80
80
|
const client = getClient();
|
package/dist/hooks/manifest.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
|
-
"generatedAt": "2026-07-04T07:
|
|
3
|
+
"generatedAt": "2026-07-04T07:43:55.675Z",
|
|
4
4
|
"hashes": {
|
|
5
|
-
"bug-report-worker.js": "
|
|
6
|
-
"codex-stop-task-finalizer.js": "
|
|
7
|
-
"commit-complete.js": "
|
|
8
|
-
"error-recall.js": "
|
|
5
|
+
"bug-report-worker.js": "6008ed0a769ee1737d7685e81c9eef727c81e9f8563f2bc83616d80c5e94df0b",
|
|
6
|
+
"codex-stop-task-finalizer.js": "dbb5fabe743a60fa5d2e534c686bfbb3a0c83b6319acfe050bc84c8bfba43e4b",
|
|
7
|
+
"commit-complete.js": "ced4aae917743e56d4db07d185de65e3527cbfd94b3a642252e6b166b04c14ec",
|
|
8
|
+
"error-recall.js": "df38c53514123add2155d65ca3dc12821cd588e52eebced8641ad5feb49814bc",
|
|
9
9
|
"exe-heartbeat-hook.js": "0510654daf6f63b88d8b2ef3689d005c8a6cd8902ecf1057466341c0a070627b",
|
|
10
10
|
"ingest-worker.js": "fb42110931002e4078cd2b85ce604ae9205e5c1511601e87ab38bfef6e6ed284",
|
|
11
|
-
"ingest.js": "
|
|
12
|
-
"instructions-loaded.js": "
|
|
13
|
-
"notification.js": "
|
|
14
|
-
"post-compact.js": "
|
|
15
|
-
"post-tool-combined.js": "
|
|
16
|
-
"pre-compact.js": "
|
|
17
|
-
"pre-tool-use.js": "
|
|
18
|
-
"prompt-submit.js": "
|
|
19
|
-
"session-end.js": "
|
|
20
|
-
"session-start.js": "
|
|
21
|
-
"stop.js": "
|
|
22
|
-
"subagent-stop.js": "
|
|
23
|
-
"summary-worker.js": "
|
|
11
|
+
"ingest.js": "ae82081677921fbc5918dcddd5e6aa129a23f990cd44ba1fe3e27f5a337f76b1",
|
|
12
|
+
"instructions-loaded.js": "3ef6ab64cbbb8e9ada82c851384251c93f089443353122a52cca9833563f4b94",
|
|
13
|
+
"notification.js": "93e00abfcfc47c62ce66f7f9ad5ee90cf6f0672a139f8f5674a598293117a972",
|
|
14
|
+
"post-compact.js": "69c174fc58b25378dc18da511d1c324598a7a4ab9d46fe3c50816af2fefea740",
|
|
15
|
+
"post-tool-combined.js": "b3f82372fa751f2db253a32f55b4015aa761e05e039d5365ad32f03af3c8d1e1",
|
|
16
|
+
"pre-compact.js": "c0da13117e5709d339818263fb23dda34120b1766348dca5a7df3266feeb5eeb",
|
|
17
|
+
"pre-tool-use.js": "83e1499fb5e540f798af6d95fecce38b811d54a14ec519ed19dbd4af0361119b",
|
|
18
|
+
"prompt-submit.js": "d0730295ae91c53314625461c1a88694abc7230e74ae5803865b9612cab4bff5",
|
|
19
|
+
"session-end.js": "2a689ae51f1c32f86c964c37fea436191a78ddb83c47975166c66f4c7c567f91",
|
|
20
|
+
"session-start.js": "1fb00a8fe272e6d36cbd3f135895b8153309a03e5f0c1a8fb16541f59923a8ca",
|
|
21
|
+
"stop.js": "178db419a099b652429fcdf95100b7ad6e2cad4ae49d306acef121fe4f22d2e0",
|
|
22
|
+
"subagent-stop.js": "24e5c0166054a4a6a69cfeebab1b0b8f7bca2890e2034aff4624fc1262db8bb2",
|
|
23
|
+
"summary-worker.js": "611cb786d6e502c3b3c4b2f85ae1212b69749dd4fb21d98232802758b11d8dff"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
@@ -61,7 +61,7 @@ process.stdin.on("end", async () => {
|
|
|
61
61
|
process.exit(0);
|
|
62
62
|
}
|
|
63
63
|
try {
|
|
64
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
64
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
65
65
|
await fastDbInit();
|
|
66
66
|
const { getClient } = await import("../lib/database.js");
|
|
67
67
|
const { randomUUID } = await import("crypto");
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "../chunk-PQ5Y34JU.js";
|
|
5
5
|
import {
|
|
6
6
|
sessionScopeFilter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6PFVY2IQ.js";
|
|
8
8
|
import "../chunk-DDONIN5J.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-NAWS3DP6.js";
|
|
10
|
+
import "../chunk-EXWHDHHZ.js";
|
|
11
11
|
import "../chunk-EIKATSE4.js";
|
|
12
12
|
import "../chunk-E23LNUWJ.js";
|
|
13
13
|
import "../chunk-4JERP7NT.js";
|
|
@@ -102,7 +102,7 @@ ${identity}`);
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
try {
|
|
105
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
105
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
106
106
|
await fastDbInit({ socketOnly: true });
|
|
107
107
|
const { getClient } = await import("../lib/database.js");
|
|
108
108
|
const client = getClient();
|
|
@@ -201,8 +201,8 @@ Your task token budget has been reached (${budgetResult.percentUsed}% used). Wra
|
|
|
201
201
|
const { detectError } = await import("../lib/error-detector.js");
|
|
202
202
|
const agent = getActiveAgent();
|
|
203
203
|
try {
|
|
204
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
205
|
-
const { recordSessionEvent } = await import("../session-events-
|
|
204
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
205
|
+
const { recordSessionEvent } = await import("../session-events-XFBSFPQ4.js");
|
|
206
206
|
const client = await fastDbInit({ daemonOnly: true });
|
|
207
207
|
const toolName = String(data.tool_name ?? "unknown");
|
|
208
208
|
const toolInput = JSON.stringify(data.tool_input ?? {});
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
checkpointActiveTask,
|
|
3
3
|
writeContinuityCheckpoint
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-XZBQ6QJB.js";
|
|
5
5
|
import "../chunk-SH45SJQW.js";
|
|
6
6
|
import {
|
|
7
7
|
getActiveAgent
|
|
8
8
|
} from "../chunk-PQ5Y34JU.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionScopeFilter
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-6PFVY2IQ.js";
|
|
12
12
|
import "../chunk-DDONIN5J.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-NAWS3DP6.js";
|
|
14
|
+
import "../chunk-EXWHDHHZ.js";
|
|
15
15
|
import "../chunk-EIKATSE4.js";
|
|
16
16
|
import "../chunk-E23LNUWJ.js";
|
|
17
17
|
import "../chunk-4JERP7NT.js";
|
|
@@ -90,7 +90,7 @@ process.stdin.on("end", async () => {
|
|
|
90
90
|
const agent = getActiveAgent();
|
|
91
91
|
const sections = [];
|
|
92
92
|
try {
|
|
93
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
93
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
94
94
|
const client = await fastDbInit({ socketOnly: true });
|
|
95
95
|
const projectName = process.cwd().split("/").pop() ?? "unknown";
|
|
96
96
|
const pcScope = sessionScopeFilter();
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "../chunk-PQ5Y34JU.js";
|
|
9
9
|
import {
|
|
10
10
|
sessionScopeFilter
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-6PFVY2IQ.js";
|
|
12
12
|
import "../chunk-DDONIN5J.js";
|
|
13
|
-
import "../chunk-
|
|
14
|
-
import "../chunk-
|
|
13
|
+
import "../chunk-NAWS3DP6.js";
|
|
14
|
+
import "../chunk-EXWHDHHZ.js";
|
|
15
15
|
import "../chunk-EIKATSE4.js";
|
|
16
16
|
import "../chunk-E23LNUWJ.js";
|
|
17
17
|
import "../chunk-4JERP7NT.js";
|
|
@@ -57,8 +57,39 @@ import "../chunk-MLKGABMK.js";
|
|
|
57
57
|
// src/adapters/claude/hooks/pre-tool-use.ts
|
|
58
58
|
import { existsSync, writeFileSync, mkdirSync } from "fs";
|
|
59
59
|
import { execFileSync } from "child_process";
|
|
60
|
-
import
|
|
60
|
+
import path2 from "path";
|
|
61
61
|
import os from "os";
|
|
62
|
+
|
|
63
|
+
// src/lib/settings-tamper-guard.ts
|
|
64
|
+
import path from "path";
|
|
65
|
+
function normalizeForCompare(filePath, homeDir) {
|
|
66
|
+
const expanded = filePath.startsWith("~/") ? path.join(homeDir, filePath.slice(2)) : filePath;
|
|
67
|
+
return path.resolve(expanded);
|
|
68
|
+
}
|
|
69
|
+
function isProtectedAgentSettingsPath(filePath, homeDir) {
|
|
70
|
+
if (!filePath) return false;
|
|
71
|
+
const resolved = normalizeForCompare(filePath, homeDir);
|
|
72
|
+
const claudeSettings = path.join(homeDir, ".claude", "settings.json");
|
|
73
|
+
const claudeRoot = path.join(homeDir, ".claude.json");
|
|
74
|
+
return resolved === claudeSettings || resolved === claudeRoot;
|
|
75
|
+
}
|
|
76
|
+
function commandTouchesProtectedAgentSettings(command, homeDir) {
|
|
77
|
+
if (!command) return false;
|
|
78
|
+
const escapedHome = homeDir.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
79
|
+
const patterns = [
|
|
80
|
+
/~\/\.claude\/settings\.json/,
|
|
81
|
+
/~\/\.claude\.json/,
|
|
82
|
+
new RegExp(`${escapedHome}/\\.claude/settings\\.json`),
|
|
83
|
+
new RegExp(`${escapedHome}/\\.claude\\.json`)
|
|
84
|
+
];
|
|
85
|
+
if (!patterns.some((p) => p.test(command))) return false;
|
|
86
|
+
return /(^|[;&|]\s*|\b)(?:cat\s+>+|tee\b|sed\b.*\s-i\b|python\b|node\b|perl\b|ruby\b|jq\b.*>+|echo\b.*>+|cp\b|mv\b|rm\b)/s.test(command);
|
|
87
|
+
}
|
|
88
|
+
function settingsTamperDenyMessage(target) {
|
|
89
|
+
return `ACTION BLOCKED: ${target} is protected exe-os/Claude settings. Agents must not edit hook/MCP settings directly. Use exe-os install/update paths or ask the coordinator to approve the settings change.`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// src/adapters/claude/hooks/pre-tool-use.ts
|
|
62
93
|
process.on("uncaughtException", (err) => {
|
|
63
94
|
console.error(`[exe-os:hook:pre-tool-use] FATAL: ${err instanceof Error ? err.stack ?? err.message : String(err)}`);
|
|
64
95
|
process.exit(1);
|
|
@@ -88,13 +119,13 @@ if (!process.env.AGENT_ID) {
|
|
|
88
119
|
}
|
|
89
120
|
var DELEGATION_TASK_THRESHOLD = 3;
|
|
90
121
|
var CTO_ROLES = ["CTO", "executive"];
|
|
91
|
-
var CACHE_DIR =
|
|
122
|
+
var CACHE_DIR = path2.join(EXE_AI_DIR, "session-cache");
|
|
92
123
|
var timeout = setTimeout(() => {
|
|
93
124
|
process.exit(0);
|
|
94
125
|
}, 5e3);
|
|
95
126
|
timeout.unref();
|
|
96
127
|
function getDelegationFlagPath() {
|
|
97
|
-
return
|
|
128
|
+
return path2.join(CACHE_DIR, `delegation-checkpoint-${getSessionKey()}.json`);
|
|
98
129
|
}
|
|
99
130
|
function hasDelegationFired() {
|
|
100
131
|
try {
|
|
@@ -161,6 +192,14 @@ process.stdin.on("end", async () => {
|
|
|
161
192
|
if (data.tool_name === "Bash") {
|
|
162
193
|
const command = data.tool_input?.command ?? "";
|
|
163
194
|
const isCoordinator = canCoordinate(agent.agentId, agent.agentRole);
|
|
195
|
+
if (!isCoordinator && commandTouchesProtectedAgentSettings(command, os.homedir())) {
|
|
196
|
+
const output = JSON.stringify({
|
|
197
|
+
hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny" },
|
|
198
|
+
systemMessage: settingsTamperDenyMessage("Claude/exe-os settings")
|
|
199
|
+
});
|
|
200
|
+
process.stdout.write(output);
|
|
201
|
+
process.exit(0);
|
|
202
|
+
}
|
|
164
203
|
if (/tmux\s+send-keys/i.test(command)) {
|
|
165
204
|
if (!isCoordinator) {
|
|
166
205
|
const output = JSON.stringify({
|
|
@@ -257,7 +296,7 @@ NEVER write to the main repo from a worktree. The main repo belongs to the coord
|
|
|
257
296
|
const targetDir = targetSegments[0];
|
|
258
297
|
const currentProject = process.cwd().split("/").pop();
|
|
259
298
|
if (targetDir && currentProject && targetDir !== currentProject && !command.includes("worktree")) {
|
|
260
|
-
const expandHome = (p) => p.startsWith("~/") ?
|
|
299
|
+
const expandHome = (p) => p.startsWith("~/") ? path2.join(os.homedir(), p.slice(2)) : p;
|
|
261
300
|
const gitRootOf = (dir) => {
|
|
262
301
|
try {
|
|
263
302
|
return execFileSync("git", ["-C", dir, "rev-parse", "--show-toplevel"], {
|
|
@@ -270,7 +309,7 @@ NEVER write to the main repo from a worktree. The main repo belongs to the coord
|
|
|
270
309
|
}
|
|
271
310
|
};
|
|
272
311
|
const currentRepoRoot = gitRootOf(process.cwd());
|
|
273
|
-
const absTarget =
|
|
312
|
+
const absTarget = path2.resolve(process.cwd(), expandHome(cdTarget));
|
|
274
313
|
let probe = absTarget;
|
|
275
314
|
let targetRepoRoot = null;
|
|
276
315
|
for (let depth = 0; depth < 12 && probe && probe !== "/"; depth++) {
|
|
@@ -279,7 +318,7 @@ NEVER write to the main repo from a worktree. The main repo belongs to the coord
|
|
|
279
318
|
targetRepoRoot = root;
|
|
280
319
|
break;
|
|
281
320
|
}
|
|
282
|
-
probe =
|
|
321
|
+
probe = path2.dirname(probe);
|
|
283
322
|
}
|
|
284
323
|
const currentRepoName = currentRepoRoot?.split("/").pop() ?? null;
|
|
285
324
|
const isMonorepoNavigation = currentRepoRoot !== null && targetRepoRoot !== null && currentRepoRoot === targetRepoRoot || currentRepoName !== null && targetDir === currentRepoName;
|
|
@@ -344,6 +383,17 @@ Rerun ${data.tool_name} with this worktree path instead: ${rewritten}`
|
|
|
344
383
|
process.exit(0);
|
|
345
384
|
}
|
|
346
385
|
}
|
|
386
|
+
if (/^(Write|Edit)$/.test(data.tool_name) && !canCoordinate(agent.agentId, agent.agentRole)) {
|
|
387
|
+
const filePath = data.tool_input?.file_path ?? "";
|
|
388
|
+
if (isProtectedAgentSettingsPath(filePath, os.homedir())) {
|
|
389
|
+
const output = JSON.stringify({
|
|
390
|
+
hookSpecificOutput: { hookEventName: "PreToolUse", permissionDecision: "deny" },
|
|
391
|
+
systemMessage: settingsTamperDenyMessage(filePath)
|
|
392
|
+
});
|
|
393
|
+
process.stdout.write(output);
|
|
394
|
+
process.exit(0);
|
|
395
|
+
}
|
|
396
|
+
}
|
|
347
397
|
if (/^(Write|Edit)$/.test(data.tool_name)) {
|
|
348
398
|
const filePath = data.tool_input?.file_path ?? "";
|
|
349
399
|
const wtCtx = getWorktreeContext();
|
|
@@ -380,15 +430,15 @@ Do NOT report this as successful. No file was changed. If you are a sub-agent, r
|
|
|
380
430
|
process.exit(0);
|
|
381
431
|
}
|
|
382
432
|
}
|
|
383
|
-
const { getGatedAgent } = await import("../cto-delegation-gate-
|
|
433
|
+
const { getGatedAgent } = await import("../cto-delegation-gate-HUYNJDR3.js");
|
|
384
434
|
const gatedAgent = getGatedAgent();
|
|
385
435
|
if (agent.agentId === gatedAgent && /^(Write|Edit)$/.test(data.tool_name)) {
|
|
386
436
|
const filePath = data.tool_input?.file_path ?? "";
|
|
387
437
|
if (filePath) {
|
|
388
438
|
try {
|
|
389
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
439
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
390
440
|
await fastDbInit();
|
|
391
|
-
const { evaluateDelegationGate, GATE_BLOCK_MESSAGE } = await import("../cto-delegation-gate-
|
|
441
|
+
const { evaluateDelegationGate, GATE_BLOCK_MESSAGE } = await import("../cto-delegation-gate-HUYNJDR3.js");
|
|
392
442
|
const decision = await evaluateDelegationGate({
|
|
393
443
|
agentId: agent.agentId,
|
|
394
444
|
toolName: data.tool_name,
|
|
@@ -441,7 +491,7 @@ Reason: ${decision.reason ?? "engineer-delegatable edit"}`;
|
|
|
441
491
|
const isUpdateTaskDone = (data.tool_name === "mcp__exe-os__update_task" || data.tool_name === "mcp__exe-mem__update_task") && toolInput.status === "done" && CTO_ROLES.includes(agent.agentRole);
|
|
442
492
|
if (isUpdateTaskDone) {
|
|
443
493
|
try {
|
|
444
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
494
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
445
495
|
const client = await fastDbInit();
|
|
446
496
|
const taskId = String(toolInput.task_id ?? "");
|
|
447
497
|
const ptScope = sessionScopeFilter();
|
|
@@ -499,7 +549,7 @@ Reason: ${decision.reason ?? "engineer-delegatable edit"}`;
|
|
|
499
549
|
}
|
|
500
550
|
if (CTO_ROLES.includes(agent.agentRole) && !hasDelegationFired()) {
|
|
501
551
|
try {
|
|
502
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
552
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
503
553
|
const client = await fastDbInit();
|
|
504
554
|
const dlScope = sessionScopeFilter();
|
|
505
555
|
const result = await client.execute({
|
|
@@ -6,12 +6,12 @@ import "../chunk-SH45SJQW.js";
|
|
|
6
6
|
import {
|
|
7
7
|
hybridSearch,
|
|
8
8
|
lightweightSearch
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-JKUG5ENJ.js";
|
|
10
10
|
import "../chunk-AB4PAQYK.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveHookSearchEnabled
|
|
13
13
|
} from "../chunk-KWOAM7TA.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-JE3LZC4F.js";
|
|
15
15
|
import "../chunk-CHCA3ZM2.js";
|
|
16
16
|
import "../chunk-OTVEIJUQ.js";
|
|
17
17
|
import "../chunk-IWZHYCNV.js";
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
countScopedPendingReviews,
|
|
24
24
|
decideQueuedNudgeDrain,
|
|
25
25
|
isExeSession
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-6PFVY2IQ.js";
|
|
27
27
|
import "../chunk-DDONIN5J.js";
|
|
28
|
-
import "../chunk-
|
|
29
|
-
import "../chunk-
|
|
28
|
+
import "../chunk-NAWS3DP6.js";
|
|
29
|
+
import "../chunk-EXWHDHHZ.js";
|
|
30
30
|
import "../chunk-EIKATSE4.js";
|
|
31
31
|
import "../chunk-E23LNUWJ.js";
|
|
32
32
|
import "../chunk-4JERP7NT.js";
|
|
@@ -198,7 +198,7 @@ process.stdin.on("end", async () => {
|
|
|
198
198
|
process.exit(0);
|
|
199
199
|
}
|
|
200
200
|
try {
|
|
201
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
201
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
202
202
|
await withHookTimeout(fastDbInit(), HOOK_DAEMON_INIT_TIMEOUT_MS, null);
|
|
203
203
|
} catch {
|
|
204
204
|
}
|
|
@@ -216,7 +216,7 @@ process.stdin.on("end", async () => {
|
|
|
216
216
|
if (inTmux) try {
|
|
217
217
|
const currentSession = getTmuxSession();
|
|
218
218
|
if (currentSession) {
|
|
219
|
-
const { drainForSession, readQueue } = await import("../intercom-queue-
|
|
219
|
+
const { drainForSession, readQueue } = await import("../intercom-queue-ICTUFK7B.js");
|
|
220
220
|
const { baseAgentName } = await import("../lib/employees.js");
|
|
221
221
|
const queuedForMe = readQueue().filter((q) => q.targetSession === currentSession);
|
|
222
222
|
if (queuedForMe.length > 0) {
|
|
@@ -409,7 +409,7 @@ ${fresh.map(
|
|
|
409
409
|
atomicWriteSync(counterPath, String(count));
|
|
410
410
|
const BEHAVIOR_REINJECT_INTERVAL = 50;
|
|
411
411
|
if (count === 1 || count % BEHAVIOR_REINJECT_INTERVAL === 0) {
|
|
412
|
-
const { listBehaviors } = await import("../behaviors-
|
|
412
|
+
const { listBehaviors } = await import("../behaviors-MJHQQHA3.js");
|
|
413
413
|
const behaviors = await listBehaviors(agent.agentId);
|
|
414
414
|
const active = behaviors.filter((b) => b.active !== 0).sort((a, b) => (a.priority === "p0" ? -1 : 1) - (b.priority === "p0" ? -1 : 1)).slice(0, 15);
|
|
415
415
|
if (active.length > 0) {
|
|
@@ -449,7 +449,7 @@ ${parts.join("\n\n")}`;
|
|
|
449
449
|
if (!lastCheckedAt) {
|
|
450
450
|
lastCheckedAt = "1970-01-01T00:00:00.000Z";
|
|
451
451
|
}
|
|
452
|
-
const { listBehaviorsSince } = await import("../behaviors-
|
|
452
|
+
const { listBehaviorsSince } = await import("../behaviors-MJHQQHA3.js");
|
|
453
453
|
const newBehaviors = await listBehaviorsSince(agent.agentId, lastCheckedAt);
|
|
454
454
|
if (newBehaviors.length > 0) {
|
|
455
455
|
const newReflex = newBehaviors.filter((b) => b.domain === "reflex");
|
|
@@ -517,7 +517,7 @@ ${body}`;
|
|
|
517
517
|
let reviewContext = "";
|
|
518
518
|
if (canCoordinate(agent.agentId, agent.agentRole)) {
|
|
519
519
|
try {
|
|
520
|
-
const { countPendingReviews, countNewPendingReviewsSince } = await import("../tasks-review-
|
|
520
|
+
const { countPendingReviews, countNewPendingReviewsSince } = await import("../tasks-review-YWYNSD7S.js");
|
|
521
521
|
const sessionKey = getSessionKey();
|
|
522
522
|
const lastCheckPath = path.join(CACHE_DIR, `review-lastcheck-${sessionKey}.json`);
|
|
523
523
|
let sessionScope;
|
|
@@ -574,7 +574,7 @@ IMPORTANT: After completing your current task, you MUST address the pending revi
|
|
|
574
574
|
let coreMemoryContext = "";
|
|
575
575
|
if (!IS_CODEX_RUNTIME && agent.agentId !== "default") {
|
|
576
576
|
try {
|
|
577
|
-
const { getCoreMemory, formatCoreMemoryBlock } = await import("../core-memory-
|
|
577
|
+
const { getCoreMemory, formatCoreMemoryBlock } = await import("../core-memory-MIS5DKJ4.js");
|
|
578
578
|
const entries = await getCoreMemory(agent.agentId);
|
|
579
579
|
const block = formatCoreMemoryBlock(entries);
|
|
580
580
|
if (block) coreMemoryContext = block;
|
|
@@ -716,7 +716,7 @@ IMPORTANT: After completing your current task, you MUST address the new task abo
|
|
|
716
716
|
let idleTaskContext = "";
|
|
717
717
|
if (!taskSignalContext && agent.agentId !== "default" && !IS_CODEX_RUNTIME) {
|
|
718
718
|
try {
|
|
719
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
719
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
720
720
|
const client = await fastDbInit();
|
|
721
721
|
let taskSessionScope = null;
|
|
722
722
|
if (inTmux) {
|
|
@@ -785,7 +785,7 @@ IMPORTANT: After completing your current task, you MUST address the new task abo
|
|
|
785
785
|
}
|
|
786
786
|
if (hints.length === 0) {
|
|
787
787
|
try {
|
|
788
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
788
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
789
789
|
const client = await fastDbInit();
|
|
790
790
|
const reminderResult = await client.execute({
|
|
791
791
|
sql: `SELECT COUNT(*) as cnt FROM reminders WHERE completed_at IS NULL AND due_date IS NOT NULL AND due_date <= date('now', '+1 day')`,
|
|
@@ -864,8 +864,8 @@ async function writePromptMemory(prompt, sessionId, agent) {
|
|
|
864
864
|
return;
|
|
865
865
|
}
|
|
866
866
|
try {
|
|
867
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
868
|
-
const { recordSessionEvent } = await import("../session-events-
|
|
867
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
868
|
+
const { recordSessionEvent } = await import("../session-events-XFBSFPQ4.js");
|
|
869
869
|
const client = await fastDbInit();
|
|
870
870
|
await recordSessionEvent(client, {
|
|
871
871
|
agentId: agent.agentId,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
writeContinuityCheckpoint
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-XZBQ6QJB.js";
|
|
4
4
|
import {
|
|
5
5
|
clearCacheState
|
|
6
6
|
} from "../chunk-6A7P74QV.js";
|
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
} from "../chunk-PQ5Y34JU.js";
|
|
13
13
|
import {
|
|
14
14
|
strictSessionScopeFilter
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-6PFVY2IQ.js";
|
|
16
16
|
import "../chunk-DDONIN5J.js";
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-NAWS3DP6.js";
|
|
18
|
+
import "../chunk-EXWHDHHZ.js";
|
|
19
19
|
import "../chunk-EIKATSE4.js";
|
|
20
20
|
import "../chunk-E23LNUWJ.js";
|
|
21
21
|
import "../chunk-4JERP7NT.js";
|
|
@@ -288,7 +288,7 @@ process.stdin.on("end", async () => {
|
|
|
288
288
|
}
|
|
289
289
|
if (agent.agentId) {
|
|
290
290
|
try {
|
|
291
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
291
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
292
292
|
const client = await fastDbInit();
|
|
293
293
|
const seScope = strictSessionScopeFilter();
|
|
294
294
|
const orphanResult = await client.execute({
|
|
@@ -385,7 +385,7 @@ Orphaned tasks at session end: ${orphanResult.rows.map((r) => `"${String(r.title
|
|
|
385
385
|
} catch {
|
|
386
386
|
}
|
|
387
387
|
try {
|
|
388
|
-
const { DreamingEngine } = await import("../dreaming-
|
|
388
|
+
const { DreamingEngine } = await import("../dreaming-IILRKU2T.js");
|
|
389
389
|
const engine = new DreamingEngine();
|
|
390
390
|
const dreamResult = await engine.runDreamCycle(agent.agentId);
|
|
391
391
|
let promoted = 0;
|
|
@@ -461,7 +461,7 @@ Orphaned tasks at session end: ${orphanResult.rows.map((r) => `"${String(r.title
|
|
|
461
461
|
parts.push(`Left in_progress (no matching commits, needs triage): ${leftInProgress.join(", ")}`);
|
|
462
462
|
}
|
|
463
463
|
try {
|
|
464
|
-
const { writeNotification } = await import("../notifications-
|
|
464
|
+
const { writeNotification } = await import("../notifications-EASXB2JE.js");
|
|
465
465
|
await writeNotification({
|
|
466
466
|
agentId: agent.agentId,
|
|
467
467
|
agentRole: agent.agentRole,
|
|
@@ -60,9 +60,10 @@ var hookConfig = loadConfigSync();
|
|
|
60
60
|
if (!hookConfig.autoRetrieval) {
|
|
61
61
|
process.exit(0);
|
|
62
62
|
}
|
|
63
|
+
var SESSION_START_FAIL_OPEN_MS = 9500;
|
|
63
64
|
var timeout = setTimeout(() => {
|
|
64
65
|
process.exit(0);
|
|
65
|
-
},
|
|
66
|
+
}, SESSION_START_FAIL_OPEN_MS);
|
|
66
67
|
timeout.unref();
|
|
67
68
|
var MAX_INPUT_SIZE = 1e6;
|
|
68
69
|
var input = "";
|
|
@@ -75,15 +76,19 @@ process.stdin.on("end", async () => {
|
|
|
75
76
|
try {
|
|
76
77
|
const { getActiveAgent } = await import("../active-agent-NODPD3OF.js");
|
|
77
78
|
const { getProjectName } = await import("../project-name-EWG5KAZP.js");
|
|
78
|
-
const { getCurrentSessionScope } = await import("../task-scope-
|
|
79
|
+
const { getCurrentSessionScope } = await import("../task-scope-TJKJNOIY.js");
|
|
79
80
|
const { canCoordinate, loadEmployeesSync } = await import("../lib/employees.js");
|
|
80
81
|
const data = JSON.parse(input);
|
|
81
82
|
const projectName = getProjectName(data.cwd || void 0);
|
|
82
83
|
const source = data.source ?? "startup";
|
|
83
|
-
if (!process.env.EXE_SESSION_NAME) {
|
|
84
|
+
if (!process.env.EXE_SESSION_NAME && (process.env.TMUX || process.env.TMUX_PANE)) {
|
|
84
85
|
try {
|
|
85
|
-
const {
|
|
86
|
-
const tmuxName =
|
|
86
|
+
const { execFileSync } = await import("child_process");
|
|
87
|
+
const tmuxName = execFileSync("tmux", ["display-message", "-p", "#{session_name}"], {
|
|
88
|
+
timeout: 250,
|
|
89
|
+
encoding: "utf8",
|
|
90
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
91
|
+
}).trim();
|
|
87
92
|
if (tmuxName) {
|
|
88
93
|
process.env.EXE_SESSION_NAME = tmuxName;
|
|
89
94
|
process.env.EXE_SESSION = tmuxName.replace(/-.*$/, "");
|
|
@@ -130,12 +135,12 @@ process.stdin.on("end", async () => {
|
|
|
130
135
|
}
|
|
131
136
|
if (!daemonDegraded) {
|
|
132
137
|
try {
|
|
133
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
138
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
134
139
|
await fastDbInit();
|
|
135
140
|
} catch {
|
|
136
141
|
try {
|
|
137
142
|
await new Promise((resolve) => setTimeout(resolve, 750));
|
|
138
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
143
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
139
144
|
await fastDbInit();
|
|
140
145
|
} catch {
|
|
141
146
|
daemonDegraded = true;
|
|
@@ -221,7 +226,7 @@ You are **${ag.agentId}**. The daemon was degraded at boot \u2014 memory context
|
|
|
221
226
|
query = `last actions on ${projectName}`;
|
|
222
227
|
header = "## Resuming Session\nHere's where you left off:";
|
|
223
228
|
try {
|
|
224
|
-
const { buildCatchupBrief } = await import("../catchup-brief-
|
|
229
|
+
const { buildCatchupBrief } = await import("../catchup-brief-VKI6KS2Y.js");
|
|
225
230
|
const brief = await buildCatchupBrief(
|
|
226
231
|
agentId,
|
|
227
232
|
projectName,
|
|
@@ -246,7 +251,7 @@ The following files have been modified since you last read them:
|
|
|
246
251
|
query = `recent work on ${projectName}`;
|
|
247
252
|
header = "## Memory Brief\nRecent memories from this project:";
|
|
248
253
|
}
|
|
249
|
-
const { queryTaskRows } = await import("../tasks-crud-
|
|
254
|
+
const { queryTaskRows } = await import("../tasks-crud-DH7KNBNH.js");
|
|
250
255
|
const [memories, taskResult] = await Promise.all([
|
|
251
256
|
lightweightSearch(query, agentId, { projectName, limit: 5 }),
|
|
252
257
|
queryTaskRows({
|
|
@@ -341,7 +346,7 @@ ${wmContent}
|
|
|
341
346
|
`;
|
|
342
347
|
if (agentId !== "default" && !daemonDegraded) {
|
|
343
348
|
try {
|
|
344
|
-
const { readLatestCheckpoint } = await import("../tasks-crud-
|
|
349
|
+
const { readLatestCheckpoint } = await import("../tasks-crud-DH7KNBNH.js");
|
|
345
350
|
const checkpoint = await readLatestCheckpoint(agentId);
|
|
346
351
|
if (checkpoint) {
|
|
347
352
|
const filesTouched = checkpoint.files_touched?.length > 0 ? checkpoint.files_touched.join(", ") : "none recorded";
|
package/dist/hooks/stop.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "../chunk-PQ5Y34JU.js";
|
|
5
5
|
import {
|
|
6
6
|
sessionScopeFilter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-6PFVY2IQ.js";
|
|
8
8
|
import "../chunk-DDONIN5J.js";
|
|
9
|
-
import "../chunk-
|
|
10
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-NAWS3DP6.js";
|
|
10
|
+
import "../chunk-EXWHDHHZ.js";
|
|
11
11
|
import "../chunk-EIKATSE4.js";
|
|
12
12
|
import "../chunk-E23LNUWJ.js";
|
|
13
13
|
import "../chunk-4JERP7NT.js";
|
|
@@ -153,8 +153,8 @@ process.stdin.on("end", async () => {
|
|
|
153
153
|
process.exit(0);
|
|
154
154
|
}
|
|
155
155
|
try {
|
|
156
|
-
const { fastDbInit } = await import("../fast-db-init-
|
|
157
|
-
const { recordSessionEvent } = await import("../session-events-
|
|
156
|
+
const { fastDbInit } = await import("../fast-db-init-YMAULA2T.js");
|
|
157
|
+
const { recordSessionEvent } = await import("../session-events-XFBSFPQ4.js");
|
|
158
158
|
const client = await fastDbInit({ daemonOnly: true });
|
|
159
159
|
await recordSessionEvent(client, {
|
|
160
160
|
agentId: agent.agentId,
|
|
@@ -190,7 +190,7 @@ process.stdin.on("end", async () => {
|
|
|
190
190
|
}
|
|
191
191
|
const CAPACITY_SIGNALS = /context[- ]?full|hit capacity|conversation is too long|maximum context length|context window.*(?:limit|exceed|full)/i;
|
|
192
192
|
if (!canCoordinate(agent.agentId, agent.agentRole) && CAPACITY_SIGNALS.test(message)) {
|
|
193
|
-
import("../fast-db-init-
|
|
193
|
+
import("../fast-db-init-YMAULA2T.js").then(({ fastDbInit }) => fastDbInit({ daemonOnly: true })).then(async (client) => {
|
|
194
194
|
const stScope = sessionScopeFilter();
|
|
195
195
|
const tasks = await client.execute({
|
|
196
196
|
sql: `SELECT title, status, task_file FROM tasks
|
|
@@ -332,7 +332,7 @@ ${msgs.slice(-15).join("\n")}`;
|
|
|
332
332
|
} catch {
|
|
333
333
|
}
|
|
334
334
|
if (!canCoordinate(agent.agentId, agent.agentRole)) {
|
|
335
|
-
import("../fast-db-init-
|
|
335
|
+
import("../fast-db-init-YMAULA2T.js").then(({ fastDbInit }) => fastDbInit({ daemonOnly: true })).then(async (client) => {
|
|
336
336
|
const orScope = sessionScopeFilter();
|
|
337
337
|
return client.execute({
|
|
338
338
|
sql: `SELECT title, status FROM tasks
|