@askexenow/exe-os 0.9.330 → 0.9.332
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/{backfill-metadata-AVWHS332.js → backfill-metadata-FDQVVGRQ.js} +1 -1
- package/dist/{behaviors-ZV6HNI2M.js → behaviors-SAS6JALZ.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 +3 -3
- package/dist/bin/cli.js +6 -6
- package/dist/bin/deferred-daemon-restart.js +35 -35
- package/dist/bin/exe-assign.js +1 -1
- package/dist/bin/exe-boot.js +7 -7
- package/dist/bin/exe-cloud.js +3 -3
- package/dist/bin/exe-config-dump.js +0 -0
- package/dist/bin/exe-dispatch.js +3 -3
- package/dist/bin/exe-doctor.js +2 -2
- 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 +3 -3
- package/dist/bin/exe-kill.js +5 -5
- package/dist/bin/exe-launch-agent.js +6 -6
- package/dist/bin/exe-pending-messages.js +4 -4
- package/dist/bin/exe-pending-notifications.js +3 -3
- package/dist/bin/exe-pending-reviews.js +3 -3
- package/dist/bin/exe-review.js +4 -4
- package/dist/bin/exe-search.js +2 -2
- package/dist/bin/exe-session-cleanup.js +5 -5
- package/dist/bin/exe-settings.js +3 -3
- package/dist/bin/exe-start-codex.js +3 -3
- package/dist/bin/exe-start-opencode.js +3 -3
- package/dist/bin/exe-status.js +4 -4
- package/dist/bin/exe-team.js +1 -1
- package/dist/bin/git-sweep.js +3 -3
- 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 +35 -35
- 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 +3 -3
- package/dist/bin/setup.js +1 -1
- package/dist/bin/shard-migrate.js +1 -1
- package/dist/{capacity-monitor-VNAUNTTH.js → capacity-monitor-I6TX3OZA.js} +4 -4
- package/dist/{catchup-brief-2V6WXZGD.js → catchup-brief-RAZTRECT.js} +4 -4
- package/dist/{chunk-LKB2VIIV.js → chunk-267TDVN7.js} +1 -1
- package/dist/{chunk-7RDZDCWY.js → chunk-2ES3ACCO.js} +4 -4
- package/dist/{chunk-ZSMF37M6.js → chunk-3KAYKHVB.js} +64 -4
- package/dist/{chunk-UJRZD77V.js → chunk-3PHTJIC3.js} +1 -1
- package/dist/{chunk-QAYGX7KA.js → chunk-4X3VWI22.js} +1 -1
- package/dist/{chunk-GTCJU2RF.js → chunk-5CZ2ZH6L.js} +1 -1
- package/dist/{chunk-5JILQMRS.js → chunk-6AY7VXSF.js} +6 -6
- package/dist/{chunk-UX5YA6ZY.js → chunk-7YTO3LHB.js} +2 -2
- package/dist/{chunk-RY7UV6CU.js → chunk-B3ZUS3UU.js} +1 -1
- package/dist/{chunk-CPXFQBBN.js → chunk-BST5NSJC.js} +1 -1
- package/dist/{chunk-5IX2ZW6O.js → chunk-E5UHM2KN.js} +107 -0
- package/dist/{chunk-CERY66PJ.js → chunk-EC4O5ITE.js} +1 -1
- package/dist/{chunk-DSL5D3TH.js → chunk-FZQBWOIB.js} +2 -2
- package/dist/{chunk-U7ORCOJH.js → chunk-HG7ZX2UT.js} +75 -53
- package/dist/{chunk-YL5S6I3R.js → chunk-HRUI3Q42.js} +2 -2
- package/dist/{chunk-OR7JFLIL.js → chunk-IVN7UUKK.js} +6 -6
- package/dist/{chunk-JCBQQIUV.js → chunk-J53PHGGC.js} +1 -1
- package/dist/{chunk-TKG6LCSQ.js → chunk-JRRNRSZC.js} +1 -1
- package/dist/{chunk-GSFGVYCG.js → chunk-JRTJKLON.js} +2 -2
- package/dist/{chunk-D5SZ3U5L.js → chunk-KNLQAVLI.js} +37 -6
- package/dist/{chunk-MTX3FQRR.js → chunk-L6CLX2QF.js} +1 -1
- package/dist/{chunk-MNLSPTWM.js → chunk-LB5B4NJ6.js} +1 -1
- package/dist/{chunk-4NGPNH3F.js → chunk-M6E76DMO.js} +1 -1
- package/dist/{chunk-O6RMSGXQ.js → chunk-MPUIO6GF.js} +1 -1
- package/dist/{chunk-QVT4LNHH.js → chunk-N2J6FWMQ.js} +3 -3
- package/dist/{chunk-XDJEPGMF.js → chunk-NUPU7TRA.js} +1 -1
- package/dist/{chunk-N5ACQ7C2.js → chunk-OEA44GCC.js} +1 -1
- package/dist/{chunk-KKZPF6YI.js → chunk-OIMQGA62.js} +1 -1
- package/dist/{chunk-QXXG2MCZ.js → chunk-OXZHAERM.js} +29 -3
- package/dist/{chunk-OV7OFYIR.js → chunk-QGVXUTHX.js} +1 -1
- package/dist/{chunk-KCHIJUYX.js → chunk-QUZ4VK3R.js} +1 -1
- package/dist/{chunk-CCDQ6NIZ.js → chunk-RGBABIFH.js} +21 -3
- package/dist/{chunk-MTHQR76V.js → chunk-T5JJBIUB.js} +4 -4
- package/dist/{chunk-DDA7IAWM.js → chunk-TK7ZDWU3.js} +2 -2
- package/dist/{chunk-QOMCLPQI.js → chunk-TQM7RGOB.js} +2 -2
- package/dist/{chunk-6YONUN6T.js → chunk-TXUSQZLH.js} +11 -1
- package/dist/{chunk-MZ2MBZ3E.js → chunk-YDUS2DFZ.js} +1 -1
- package/dist/{chunk-ZWWHEX3Y.js → chunk-YFYUNROP.js} +1 -1
- package/dist/{chunk-EQCYEYCJ.js → chunk-ZJSH3L6R.js} +1 -1
- package/dist/{cleanup-graph-garbage-FD34BPLR.js → cleanup-graph-garbage-6QGLERF2.js} +1 -1
- package/dist/{crm-webhook-6YDLPLVH.js → crm-webhook-DHFRIRLN.js} +2 -2
- package/dist/{cto-delegation-gate-JMO6VVTO.js → cto-delegation-gate-Z7UVTVYO.js} +2 -2
- package/dist/{daemon-orchestration-U5HW7YT5.js → daemon-orchestration-XWDFUFJG.js} +6 -6
- package/dist/{documents-TXMACEEP.js → documents-OMKCMWR7.js} +2 -2
- package/dist/{dreaming-KJ4P52EC.js → dreaming-SDFWY5FY.js} +3 -3
- package/dist/{exe-export-PH23G3F7.js → exe-export-BY6IFTEP.js} +3 -3
- package/dist/{exe-import-QCAFH4AM.js → exe-import-55UKB2X7.js} +3 -3
- package/dist/{exe-key-XV4VACRP.js → exe-key-F3BM5GEW.js} +35 -35
- package/dist/{exe-snapshot-DDSSZ377.js → exe-snapshot-RGIJJ2ZX.js} +5 -5
- package/dist/{fast-db-init-6KBEZK66.js → fast-db-init-OZDG42SZ.js} +1 -1
- package/dist/gateway/index.js +6 -6
- package/dist/hooks/bug-report-worker.js +5 -5
- package/dist/hooks/codex-stop-task-finalizer.js +5 -5
- package/dist/hooks/commit-complete.js +5 -5
- package/dist/hooks/error-recall.js +7 -4
- 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 +3 -3
- package/dist/hooks/post-tool-combined.js +2 -2
- package/dist/hooks/pre-compact.js +4 -4
- package/dist/hooks/pre-tool-use.js +7 -7
- package/dist/hooks/prompt-submit.js +16 -16
- package/dist/hooks/session-end.js +6 -6
- package/dist/hooks/session-start.js +6 -6
- package/dist/hooks/stop.js +6 -6
- package/dist/hooks/subagent-stop.js +3 -3
- package/dist/hooks/summary-worker.js +6 -6
- package/dist/index.js +10 -10
- package/dist/{intercom-queue-4A7XH72M.js → intercom-queue-JFBMDV6J.js} +2 -2
- package/dist/lib/cloud-sync.js +3 -3
- package/dist/lib/consolidation.js +2 -2
- package/dist/lib/exe-daemon.js +28 -28
- package/dist/lib/hybrid-search.js +2 -2
- package/dist/lib/messaging.js +3 -3
- 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 +4 -4
- package/dist/lib/tmux-routing.js +2 -2
- package/dist/lib/token-spend.js +9 -3
- package/dist/mcp/register-tools.js +34 -34
- package/dist/mcp/server.js +35 -35
- package/dist/mcp/tools/create-task.js +5 -5
- package/dist/mcp/tools/deactivate-behavior.js +3 -3
- package/dist/mcp/tools/list-tasks.js +5 -5
- package/dist/mcp/tools/send-message.js +4 -4
- package/dist/mcp/tools/update-task.js +5 -5
- package/dist/{memory-cards-7Z66A6AF.js → memory-cards-7YIZUWSJ.js} +1 -1
- package/dist/{memory-pressure-watchdog-Z25XTMNY.js → memory-pressure-watchdog-MZWX4YIA.js} +3 -3
- package/dist/{notifications-3MIUQXX6.js → notifications-42Z4ZRNV.js} +2 -2
- package/dist/{orchestrator-IKRGCGWD.js → orchestrator-ALAA4P6M.js} +3 -3
- package/dist/{pipeline-router-BNKNM454.js → pipeline-router-F226AZRB.js} +1 -1
- package/dist/{projection-worker-RIOEZPKQ.js → projection-worker-UL2HHHPO.js} +1 -1
- package/dist/{reranker-H3TCF74O.js → reranker-G24KWZKH.js} +1 -1
- package/dist/{retrieval-health-3VRJMK47.js → retrieval-health-GFGXNPSN.js} +1 -1
- package/dist/{review-polling-FDHBFWSY.js → review-polling-REHBTRU6.js} +3 -3
- package/dist/runtime/index.js +4 -4
- package/dist/{session-events-GM2OUFON.js → session-events-F3DPBY4P.js} +3 -3
- package/dist/{session-kill-telemetry-XN6LYPWA.js → session-kill-telemetry-USNB6ND7.js} +3 -3
- package/dist/{session-scope-3OGEPOW7.js → session-scope-CJQE4LVB.js} +2 -2
- package/dist/{setup-wizard-ISCAH4EV.js → setup-wizard-S6XYW2WH.js} +1 -1
- package/dist/{skill-refinement-X4HZANPI.js → skill-refinement-XXYCXA2U.js} +1 -1
- package/dist/{task-enforcement-7GXGH6DB.js → task-enforcement-ZKB2VZ6W.js} +3 -3
- package/dist/{task-scope-J3OMPV5A.js → task-scope-CATQQNVX.js} +2 -2
- package/dist/{tasks-crud-NGMRLJH5.js → tasks-crud-RDWLWYWV.js} +2 -2
- package/dist/{tasks-notify-4OZXON6S.js → tasks-notify-CKT5A6WK.js} +3 -3
- package/dist/{tasks-review-U5QEKLNP.js → tasks-review-UXWXJ6H3.js} +2 -2
- package/dist/{telemetry-upload-QCM44FAE.js → telemetry-upload-UUJULBSV.js} +1 -1
- package/dist/tui/App.js +8 -8
- package/dist/{tui-data-YPS2SMWF.js → tui-data-7SQLIY2O.js} +2 -2
- package/dist/{worker-gate-M6OGQF7H.js → worker-gate-2O27EXUE.js} +1 -1
- package/dist/{workflow-engine-OVVJRMD2.js → workflow-engine-QGSEQV2Z.js} +2 -2
- package/package.json +1 -1
- package/release-notes.json +16 -15
- /package/dist/{chunk-ME3WDWL6.js → chunk-26GM62C3.js} +0 -0
- /package/dist/{chunk-KOQ6WZBS.js → chunk-3HIYBZ62.js} +0 -0
- /package/dist/{chunk-BPH6YPHA.js → chunk-BAXNI3A5.js} +0 -0
- /package/dist/{chunk-VV422PGC.js → chunk-CDVA67B2.js} +0 -0
- /package/dist/{chunk-NPAGBSEN.js → chunk-G3UK4TTT.js} +0 -0
- /package/dist/{chunk-N4G4M6LE.js → chunk-VYLDGF4D.js} +0 -0
- /package/dist/{chunk-YOOK5NOZ.js → chunk-YWIOFMHL.js} +0 -0
- /package/dist/{core-memory-YHACNEAS.js → core-memory-KMBRE2HU.js} +0 -0
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
exportOrchestration,
|
|
3
3
|
importOrchestration,
|
|
4
4
|
validatePackage
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-J53PHGGC.js";
|
|
6
6
|
import {
|
|
7
7
|
runDriftProbes
|
|
8
8
|
} from "./chunk-QQCZLNUC.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
ingestDocument,
|
|
15
15
|
listDocumentsByWorkspace,
|
|
16
16
|
updateChunksImportance
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-BST5NSJC.js";
|
|
18
18
|
import {
|
|
19
19
|
analyzeBlastRadius,
|
|
20
20
|
buildCodeContextIndex,
|
|
@@ -29,11 +29,11 @@ import {
|
|
|
29
29
|
} from "./chunk-ORU5LDIT.js";
|
|
30
30
|
import {
|
|
31
31
|
DreamingEngine
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MPUIO6GF.js";
|
|
33
33
|
import {
|
|
34
34
|
isRerankerAvailable,
|
|
35
35
|
rerankWithScores
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-3HIYBZ62.js";
|
|
37
37
|
import {
|
|
38
38
|
getEntityByName,
|
|
39
39
|
getEntityNeighbors,
|
|
@@ -44,10 +44,10 @@ import {
|
|
|
44
44
|
} from "./chunk-CRCB5S7I.js";
|
|
45
45
|
import {
|
|
46
46
|
AUTO_WAKE_MAX_RETRIES
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-T5JJBIUB.js";
|
|
48
48
|
import {
|
|
49
49
|
listRecentSessionEvents
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-B3ZUS3UU.js";
|
|
51
51
|
import {
|
|
52
52
|
DEFAULT_EXPLORE_DURATION_MS,
|
|
53
53
|
getPlayMode,
|
|
@@ -74,10 +74,10 @@ import {
|
|
|
74
74
|
} from "./chunk-32SXNM3G.js";
|
|
75
75
|
import {
|
|
76
76
|
createOrRefreshResumeTask
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-7YTO3LHB.js";
|
|
78
78
|
import {
|
|
79
79
|
registerUpdateTask
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-KNLQAVLI.js";
|
|
81
81
|
import {
|
|
82
82
|
registerCreateReminder
|
|
83
83
|
} from "./chunk-XWH7QGCU.js";
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
} from "./chunk-5EP4TCZ2.js";
|
|
90
90
|
import {
|
|
91
91
|
registerDeactivateBehavior
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-YFYUNROP.js";
|
|
93
93
|
import {
|
|
94
94
|
completeReminder,
|
|
95
95
|
createReminder,
|
|
@@ -97,31 +97,32 @@ import {
|
|
|
97
97
|
} from "./chunk-IJTCNN5I.js";
|
|
98
98
|
import {
|
|
99
99
|
registerSendMessage
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-3PHTJIC3.js";
|
|
101
101
|
import {
|
|
102
102
|
registerCreateTask
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-RGBABIFH.js";
|
|
104
104
|
import {
|
|
105
105
|
registerListTasks
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-OXZHAERM.js";
|
|
107
107
|
import {
|
|
108
108
|
TOKENS_PER_IDLE_MINUTE,
|
|
109
109
|
countKillsSince,
|
|
110
110
|
sumTokensSavedSince
|
|
111
|
-
} from "./chunk-
|
|
111
|
+
} from "./chunk-LB5B4NJ6.js";
|
|
112
112
|
import {
|
|
113
113
|
registerImportConversations
|
|
114
|
-
} from "./chunk-
|
|
114
|
+
} from "./chunk-L6CLX2QF.js";
|
|
115
115
|
import {
|
|
116
116
|
createSchedule,
|
|
117
117
|
parseHumanCron
|
|
118
|
-
} from "./chunk-
|
|
118
|
+
} from "./chunk-4X3VWI22.js";
|
|
119
119
|
import {
|
|
120
120
|
status
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-TK7ZDWU3.js";
|
|
122
122
|
import {
|
|
123
|
+
evaluateGlobalSpendCap,
|
|
123
124
|
getAgentSpend
|
|
124
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-E5UHM2KN.js";
|
|
125
126
|
import {
|
|
126
127
|
exportGraphHTML,
|
|
127
128
|
generateGraphReport
|
|
@@ -140,11 +141,11 @@ import {
|
|
|
140
141
|
formatReport,
|
|
141
142
|
runAudit,
|
|
142
143
|
shouldFixShards
|
|
143
|
-
} from "./chunk-
|
|
144
|
+
} from "./chunk-N2J6FWMQ.js";
|
|
144
145
|
import {
|
|
145
146
|
formatDegradations,
|
|
146
147
|
getRetrievalHealth
|
|
147
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-TXUSQZLH.js";
|
|
148
149
|
import {
|
|
149
150
|
hasFailures,
|
|
150
151
|
runHealth,
|
|
@@ -174,14 +175,14 @@ import {
|
|
|
174
175
|
cloudSync,
|
|
175
176
|
getCloudReuploadRequired,
|
|
176
177
|
markCloudReuploadRequired
|
|
177
|
-
} from "./chunk-
|
|
178
|
+
} from "./chunk-267TDVN7.js";
|
|
178
179
|
import {
|
|
179
180
|
createARecord
|
|
180
181
|
} from "./chunk-X2Z5GT3V.js";
|
|
181
182
|
import {
|
|
182
183
|
findSimilarTrajectories,
|
|
183
184
|
hashSignature
|
|
184
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-ZJSH3L6R.js";
|
|
185
186
|
import {
|
|
186
187
|
GHOST_BEHAVIOR_SQL,
|
|
187
188
|
deactivateBehavior,
|
|
@@ -190,13 +191,13 @@ import {
|
|
|
190
191
|
reactivateBehavior,
|
|
191
192
|
storeBehavior,
|
|
192
193
|
storeReflexBehavior
|
|
193
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-QUZ4VK3R.js";
|
|
194
195
|
import {
|
|
195
196
|
countUnconsolidated,
|
|
196
197
|
groupMemories,
|
|
197
198
|
runConsolidation,
|
|
198
199
|
selectUnconsolidated
|
|
199
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-EC4O5ITE.js";
|
|
200
201
|
import {
|
|
201
202
|
entityId,
|
|
202
203
|
mergeEntities
|
|
@@ -213,17 +214,17 @@ import {
|
|
|
213
214
|
} from "./chunk-5RACW3LX.js";
|
|
214
215
|
import {
|
|
215
216
|
updateTask
|
|
216
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-6AY7VXSF.js";
|
|
217
218
|
import {
|
|
218
219
|
fastDbInit
|
|
219
|
-
} from "./chunk-
|
|
220
|
+
} from "./chunk-G3UK4TTT.js";
|
|
220
221
|
import {
|
|
221
222
|
MAX_CONCURRENT_WORKERS
|
|
222
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-YDUS2DFZ.js";
|
|
223
224
|
import {
|
|
224
225
|
hybridSearch,
|
|
225
226
|
recentRecords
|
|
226
|
-
} from "./chunk-
|
|
227
|
+
} from "./chunk-IVN7UUKK.js";
|
|
227
228
|
import {
|
|
228
229
|
buildFtsMatch,
|
|
229
230
|
tokenizeForFts
|
|
@@ -233,7 +234,7 @@ import {
|
|
|
233
234
|
flushBatch,
|
|
234
235
|
initStore,
|
|
235
236
|
writeMemory
|
|
236
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-OIMQGA62.js";
|
|
237
238
|
import {
|
|
238
239
|
getActiveAgent
|
|
239
240
|
} from "./chunk-EOYVD5U3.js";
|
|
@@ -245,7 +246,7 @@ import {
|
|
|
245
246
|
sessionScopeFilter,
|
|
246
247
|
updateTaskStatus,
|
|
247
248
|
writeCheckpoint
|
|
248
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-3KAYKHVB.js";
|
|
249
250
|
import {
|
|
250
251
|
listSessions
|
|
251
252
|
} from "./chunk-3HMHSTHQ.js";
|
|
@@ -287,7 +288,7 @@ import {
|
|
|
287
288
|
isScheduledTrigger,
|
|
288
289
|
loadTriggers,
|
|
289
290
|
sanitizeParam
|
|
290
|
-
} from "./chunk-
|
|
291
|
+
} from "./chunk-VYLDGF4D.js";
|
|
291
292
|
import {
|
|
292
293
|
pushConversationToCRM
|
|
293
294
|
} from "./chunk-ML4S5SHZ.js";
|
|
@@ -514,7 +515,7 @@ function registerRecallMyMemory(server) {
|
|
|
514
515
|
}) => {
|
|
515
516
|
try {
|
|
516
517
|
if (!isInitialized()) {
|
|
517
|
-
const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-
|
|
518
|
+
const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-OZDG42SZ.js");
|
|
518
519
|
await fastDbInit2();
|
|
519
520
|
}
|
|
520
521
|
if (!recent && !query) {
|
|
@@ -1961,7 +1962,7 @@ function registerMemory(server) {
|
|
|
1961
1962
|
if (action === "core_get" || action === "core_set" || action === "core_delete") {
|
|
1962
1963
|
const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-AIK6FSYE.js");
|
|
1963
1964
|
const { agentId } = getActiveAgent2();
|
|
1964
|
-
const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-
|
|
1965
|
+
const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-KMBRE2HU.js");
|
|
1965
1966
|
if (action === "core_get") {
|
|
1966
1967
|
const entries = await getCoreMemory(agentId);
|
|
1967
1968
|
const block = formatCoreMemoryBlock(entries);
|
|
@@ -2013,7 +2014,7 @@ function registerMemory(server) {
|
|
|
2013
2014
|
if (!storeTrigger || !storeTriggerAction) {
|
|
2014
2015
|
return errorResult('memory action "store" with kind="reflex" requires trigger and trigger_action fields');
|
|
2015
2016
|
}
|
|
2016
|
-
const { formatReflexContent, storeReflexBehavior: storeReflexBehavior2 } = await import("./behaviors-
|
|
2017
|
+
const { formatReflexContent, storeReflexBehavior: storeReflexBehavior2 } = await import("./behaviors-SAS6JALZ.js");
|
|
2017
2018
|
const reflexText = formatReflexContent(storeTrigger, storeTriggerAction);
|
|
2018
2019
|
legacyArgs.text ??= reflexText;
|
|
2019
2020
|
legacyArgs.query ??= reflexText;
|
|
@@ -2709,7 +2710,7 @@ function registerResumeEmployee(server) {
|
|
|
2709
2710
|
},
|
|
2710
2711
|
async ({ agent_id, project_name }) => {
|
|
2711
2712
|
if (!isInitialized()) {
|
|
2712
|
-
const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-
|
|
2713
|
+
const { fastDbInit: fastDbInit2 } = await import("./fast-db-init-OZDG42SZ.js");
|
|
2713
2714
|
await fastDbInit2();
|
|
2714
2715
|
}
|
|
2715
2716
|
const client = getClient();
|
|
@@ -2735,7 +2736,7 @@ function registerResumeEmployee(server) {
|
|
|
2735
2736
|
};
|
|
2736
2737
|
}
|
|
2737
2738
|
try {
|
|
2738
|
-
const { isTmuxSessionAlive } = await import("./tasks-crud-
|
|
2739
|
+
const { isTmuxSessionAlive } = await import("./tasks-crud-RDWLWYWV.js");
|
|
2739
2740
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2740
2741
|
for (const row of openTasks.rows) {
|
|
2741
2742
|
const status2 = String(row.status);
|
|
@@ -2763,7 +2764,7 @@ function registerResumeEmployee(server) {
|
|
|
2763
2764
|
}
|
|
2764
2765
|
let checkpointInfo = "";
|
|
2765
2766
|
try {
|
|
2766
|
-
const { readLatestCheckpoint } = await import("./tasks-crud-
|
|
2767
|
+
const { readLatestCheckpoint } = await import("./tasks-crud-RDWLWYWV.js");
|
|
2767
2768
|
const checkpoint = await readLatestCheckpoint(agent_id);
|
|
2768
2769
|
if (checkpoint) {
|
|
2769
2770
|
const filesTouched = checkpoint.files_touched?.length > 0 ? checkpoint.files_touched.join(", ") : "none";
|
|
@@ -3179,7 +3180,7 @@ function registerTask(server) {
|
|
|
3179
3180
|
const missing2 = missingRequiredFields2(args, REQUIRED_FIELDS2.create_group);
|
|
3180
3181
|
if (missing2.length > 0) return errorResult2(`task action "create_group" missing required field(s): ${missing2.join(", ")}`);
|
|
3181
3182
|
try {
|
|
3182
|
-
const { createTaskGroup } = await import("./tasks-crud-
|
|
3183
|
+
const { createTaskGroup } = await import("./tasks-crud-RDWLWYWV.js");
|
|
3183
3184
|
const group = await createTaskGroup({
|
|
3184
3185
|
title: args.title,
|
|
3185
3186
|
coordinator: args.coordinator,
|
|
@@ -3198,7 +3199,7 @@ function registerTask(server) {
|
|
|
3198
3199
|
const missing2 = missingRequiredFields2(args, REQUIRED_FIELDS2.group_status);
|
|
3199
3200
|
if (missing2.length > 0) return errorResult2(`task action "group_status" missing required field(s): ${missing2.join(", ")}`);
|
|
3200
3201
|
try {
|
|
3201
|
-
const { getGroupStatus } = await import("./tasks-crud-
|
|
3202
|
+
const { getGroupStatus } = await import("./tasks-crud-RDWLWYWV.js");
|
|
3202
3203
|
const status2 = await getGroupStatus(args.group_id);
|
|
3203
3204
|
return { content: [{ type: "text", text: JSON.stringify(status2, null, 2) }] };
|
|
3204
3205
|
} catch (err) {
|
|
@@ -3210,7 +3211,7 @@ function registerTask(server) {
|
|
|
3210
3211
|
const missing2 = missingRequiredFields2(args, REQUIRED_FIELDS2.group_results);
|
|
3211
3212
|
if (missing2.length > 0) return errorResult2(`task action "group_results" missing required field(s): ${missing2.join(", ")}`);
|
|
3212
3213
|
try {
|
|
3213
|
-
const { getGroupResults } = await import("./tasks-crud-
|
|
3214
|
+
const { getGroupResults } = await import("./tasks-crud-RDWLWYWV.js");
|
|
3214
3215
|
const results = await getGroupResults(args.group_id);
|
|
3215
3216
|
return { content: [{ type: "text", text: JSON.stringify(results, null, 2) }] };
|
|
3216
3217
|
} catch (err) {
|
|
@@ -4101,7 +4102,7 @@ function registerDocument(server) {
|
|
|
4101
4102
|
const { action: _action, ...legacyArgs } = input;
|
|
4102
4103
|
if (action === "list" && (legacyArgs.workspace_id === void 0 || legacyArgs.workspace_id === null || legacyArgs.workspace_id === "")) {
|
|
4103
4104
|
try {
|
|
4104
|
-
const { resolveDefaultWorkspaceId, listWorkspaces } = await import("./documents-
|
|
4105
|
+
const { resolveDefaultWorkspaceId, listWorkspaces } = await import("./documents-OMKCMWR7.js");
|
|
4105
4106
|
const defaultId = await resolveDefaultWorkspaceId();
|
|
4106
4107
|
if (defaultId) {
|
|
4107
4108
|
legacyArgs.workspace_id = defaultId;
|
|
@@ -5128,7 +5129,7 @@ async function handleTrigger(limit) {
|
|
|
5128
5129
|
if (rows.rows.length === 0) {
|
|
5129
5130
|
return text3("No conversations found to re-process.");
|
|
5130
5131
|
}
|
|
5131
|
-
const { ingest } = await import("./pipeline-router-
|
|
5132
|
+
const { ingest } = await import("./pipeline-router-F226AZRB.js");
|
|
5132
5133
|
const results = [];
|
|
5133
5134
|
for (const row of rows.rows) {
|
|
5134
5135
|
const r = row;
|
|
@@ -5995,7 +5996,7 @@ async function handleCleanupGarbage(args) {
|
|
|
5995
5996
|
const doMerge = !garbageOnly;
|
|
5996
5997
|
let mod;
|
|
5997
5998
|
try {
|
|
5998
|
-
mod = await import("./cleanup-graph-garbage-
|
|
5999
|
+
mod = await import("./cleanup-graph-garbage-6QGLERF2.js");
|
|
5999
6000
|
} catch (err) {
|
|
6000
6001
|
return errorResult7(`cleanup_garbage: failed to load cleanup module \u2014 ${err instanceof Error ? err.message : String(err)}`);
|
|
6001
6002
|
}
|
|
@@ -6337,6 +6338,18 @@ function registerListEmployees(server) {
|
|
|
6337
6338
|
|
|
6338
6339
|
// src/mcp/tools/get-agent-spend.ts
|
|
6339
6340
|
import { z as z50 } from "zod";
|
|
6341
|
+
function renderGlobalSpendCap(status2) {
|
|
6342
|
+
const lines = ["", "## Global Spend Cap"];
|
|
6343
|
+
if (!status2.configured) {
|
|
6344
|
+
lines.push(`\u26A0\uFE0F ${status2.message}`);
|
|
6345
|
+
lines.push(`Current ${status2.period} tracked spend: $${status2.totalCostUSD.toFixed(2)}.`);
|
|
6346
|
+
return lines;
|
|
6347
|
+
}
|
|
6348
|
+
const prefix = status2.status === "over_cap" ? "\u{1F6A8}" : status2.status === "near_cap" ? "\u26A0\uFE0F" : "\u2705";
|
|
6349
|
+
lines.push(`${prefix} ${status2.message}`);
|
|
6350
|
+
lines.push(`Cap source: ${status2.source ?? "unknown"}.`);
|
|
6351
|
+
return lines;
|
|
6352
|
+
}
|
|
6340
6353
|
function registerGetAgentSpend(server) {
|
|
6341
6354
|
server.registerTool(
|
|
6342
6355
|
"get_agent_spend",
|
|
@@ -6350,7 +6363,12 @@ function registerGetAgentSpend(server) {
|
|
|
6350
6363
|
},
|
|
6351
6364
|
async ({ period, agent_id }) => {
|
|
6352
6365
|
try {
|
|
6353
|
-
|
|
6366
|
+
const allResults = await getAgentSpend(period);
|
|
6367
|
+
const capStatus = evaluateGlobalSpendCap(
|
|
6368
|
+
allResults.reduce((sum, r) => sum + r.costUSD, 0),
|
|
6369
|
+
period
|
|
6370
|
+
);
|
|
6371
|
+
let results = allResults;
|
|
6354
6372
|
if (agent_id) {
|
|
6355
6373
|
results = results.filter((r) => r.agentId === agent_id);
|
|
6356
6374
|
}
|
|
@@ -6359,7 +6377,10 @@ function registerGetAgentSpend(server) {
|
|
|
6359
6377
|
content: [
|
|
6360
6378
|
{
|
|
6361
6379
|
type: "text",
|
|
6362
|
-
text:
|
|
6380
|
+
text: [
|
|
6381
|
+
agent_id ? `No token spend found for agent "${agent_id}" in the last ${period}.` : `No token spend data found for the last ${period}.`,
|
|
6382
|
+
...renderGlobalSpendCap(capStatus)
|
|
6383
|
+
].join("\n")
|
|
6363
6384
|
}
|
|
6364
6385
|
]
|
|
6365
6386
|
};
|
|
@@ -6394,6 +6415,7 @@ function registerGetAgentSpend(server) {
|
|
|
6394
6415
|
`| **Total** | **${totalInput.toLocaleString()}** | **${totalOutput.toLocaleString()}** | **${totalCache.toLocaleString()}** | **${totalSessions}** | **$${totalCost.toFixed(2)}** |`
|
|
6395
6416
|
);
|
|
6396
6417
|
}
|
|
6418
|
+
lines.push(...renderGlobalSpendCap(capStatus));
|
|
6397
6419
|
return {
|
|
6398
6420
|
content: [{ type: "text", text: lines.join("\n") }]
|
|
6399
6421
|
};
|
|
@@ -6854,7 +6876,7 @@ async function getAgentSessionLoad() {
|
|
|
6854
6876
|
return { sessions: [], totalLive: 0, busySessions: 0, idleSessions: 0 };
|
|
6855
6877
|
}
|
|
6856
6878
|
const { getClient: getClient2 } = await import("./lib/database.js");
|
|
6857
|
-
const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-
|
|
6879
|
+
const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-CATQQNVX.js");
|
|
6858
6880
|
const client = getClient2();
|
|
6859
6881
|
const scope = sessionScopeFilter2();
|
|
6860
6882
|
for (const s of liveAgentSessions) {
|
|
@@ -7220,7 +7242,7 @@ async function cloudStatusText() {
|
|
|
7220
7242
|
if (lastReuploadedAt) lines.push(`- Last re-upload: ${lastReuploadedAt}`);
|
|
7221
7243
|
lines.push("");
|
|
7222
7244
|
try {
|
|
7223
|
-
const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-
|
|
7245
|
+
const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-GFGXNPSN.js");
|
|
7224
7246
|
const h = await getRetrievalHealth2();
|
|
7225
7247
|
lines.push(formatDegradations2(h.degradations, "Health / Degradations"));
|
|
7226
7248
|
lines.push("");
|
|
@@ -9685,7 +9707,7 @@ function buildHandlers5() {
|
|
|
9685
9707
|
}
|
|
9686
9708
|
async function handleDreaming(action, args) {
|
|
9687
9709
|
try {
|
|
9688
|
-
const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-
|
|
9710
|
+
const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-SDFWY5FY.js");
|
|
9689
9711
|
const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-AIK6FSYE.js");
|
|
9690
9712
|
const { getClient: getClient2 } = await import("./lib/database.js");
|
|
9691
9713
|
const agentId = args.agent_id ?? getActiveAgent2().agentId;
|
|
@@ -9844,7 +9866,7 @@ function registerConfig(server) {
|
|
|
9844
9866
|
}
|
|
9845
9867
|
if (action === "closeout") {
|
|
9846
9868
|
try {
|
|
9847
|
-
const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-
|
|
9869
|
+
const { DreamingEngine: DreamingEngine2 } = await import("./dreaming-SDFWY5FY.js");
|
|
9848
9870
|
const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-AIK6FSYE.js");
|
|
9849
9871
|
const { writeMemory: writeMemory2, flushBatch: flushBatch2 } = await import("./lib/store.js");
|
|
9850
9872
|
const { randomUUID: randomUUID2 } = await import("crypto");
|
|
@@ -10816,7 +10838,7 @@ Use /exe-forget to remove any that this supersedes.`;
|
|
|
10816
10838
|
}]
|
|
10817
10839
|
};
|
|
10818
10840
|
}
|
|
10819
|
-
const { bulkPurgeGhostBehaviors } = await import("./behaviors-
|
|
10841
|
+
const { bulkPurgeGhostBehaviors } = await import("./behaviors-SAS6JALZ.js");
|
|
10820
10842
|
const res = await bulkPurgeGhostBehaviors({ batchSize: 5e3, vacuum: true });
|
|
10821
10843
|
return {
|
|
10822
10844
|
content: [{
|
|
@@ -10927,7 +10949,7 @@ Use /exe-forget to remove any that this supersedes.`;
|
|
|
10927
10949
|
return { content: [{ type: "text", text: `Behavior not found: ${behavior_id}` }], isError: true };
|
|
10928
10950
|
}
|
|
10929
10951
|
const row2 = result4.rows[0];
|
|
10930
|
-
const { reactivateBehavior: reactivateBehavior2 } = await import("./behaviors-
|
|
10952
|
+
const { reactivateBehavior: reactivateBehavior2 } = await import("./behaviors-SAS6JALZ.js");
|
|
10931
10953
|
const wasReactivated = await reactivateBehavior2(behavior_id);
|
|
10932
10954
|
if (!wasReactivated) {
|
|
10933
10955
|
return { content: [{ type: "text", text: `Behavior ${behavior_id} is already active.` }] };
|
|
@@ -11448,7 +11470,7 @@ function registerWorkflowTool(server) {
|
|
|
11448
11470
|
getWorkflowInstance,
|
|
11449
11471
|
listWorkflowInstances,
|
|
11450
11472
|
approveWorkflowStep
|
|
11451
|
-
} = await import("./workflow-engine-
|
|
11473
|
+
} = await import("./workflow-engine-QGSEQV2Z.js");
|
|
11452
11474
|
try {
|
|
11453
11475
|
switch (input.action) {
|
|
11454
11476
|
case "create_workflow": {
|
|
@@ -13009,7 +13031,7 @@ function registerCliParityTools(server) {
|
|
|
13009
13031
|
const out = await runCommand("exe-os", ["cloud", "status"], 45e3);
|
|
13010
13032
|
let healthSection = "";
|
|
13011
13033
|
try {
|
|
13012
|
-
const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-
|
|
13034
|
+
const { getRetrievalHealth: getRetrievalHealth2, formatDegradations: formatDegradations2 } = await import("./retrieval-health-GFGXNPSN.js");
|
|
13013
13035
|
const h = await getRetrievalHealth2();
|
|
13014
13036
|
const lines = [
|
|
13015
13037
|
"",
|
|
@@ -14348,7 +14370,7 @@ async function handleOrchestrationHealth() {
|
|
|
14348
14370
|
async function handleWorkMap() {
|
|
14349
14371
|
try {
|
|
14350
14372
|
const { getAgentLivenessReport } = await import("./agent-heartbeat-I5UPGXAU.js");
|
|
14351
|
-
const { classifyRole } = await import("./session-kill-telemetry-
|
|
14373
|
+
const { classifyRole } = await import("./session-kill-telemetry-USNB6ND7.js");
|
|
14352
14374
|
const { buildSessionDeathSummary } = await import("./orchestration-health-read-EJWVUARG.js");
|
|
14353
14375
|
const { getPaneCwd } = await import("./lib/tmux-status.js");
|
|
14354
14376
|
const live = getAgentLivenessReport();
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
notifyParentExe,
|
|
6
6
|
resolveExeSession,
|
|
7
7
|
sendIntercom
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3KAYKHVB.js";
|
|
9
9
|
import {
|
|
10
10
|
getTransport
|
|
11
11
|
} from "./chunk-RMOBQ6A5.js";
|
|
@@ -68,7 +68,7 @@ async function dispatchTaskToEmployee(input) {
|
|
|
68
68
|
let crossProject = false;
|
|
69
69
|
if (input.projectName) {
|
|
70
70
|
try {
|
|
71
|
-
const { assertSessionScope } = await import("./session-scope-
|
|
71
|
+
const { assertSessionScope } = await import("./session-scope-CJQE4LVB.js");
|
|
72
72
|
const check = assertSessionScope("dispatch_task", input.projectName);
|
|
73
73
|
if (check.reason === "cross_session_denied") {
|
|
74
74
|
crossProject = true;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
buildStatusFilter,
|
|
9
9
|
buildWikiScopeFilter,
|
|
10
10
|
searchMemories
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OIMQGA62.js";
|
|
12
12
|
import {
|
|
13
13
|
blobToVector
|
|
14
14
|
} from "./chunk-OTVEIJUQ.js";
|
|
@@ -359,7 +359,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
359
359
|
let rerankerAvailable = false;
|
|
360
360
|
if (process.env.EXE_IS_DAEMON === "1") {
|
|
361
361
|
try {
|
|
362
|
-
const { isRerankerAvailable } = await import("./reranker-
|
|
362
|
+
const { isRerankerAvailable } = await import("./reranker-G24KWZKH.js");
|
|
363
363
|
rerankerAvailable = isRerankerAvailable();
|
|
364
364
|
} catch {
|
|
365
365
|
}
|
|
@@ -427,7 +427,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
427
427
|
]).catch(() => []),
|
|
428
428
|
includeStructuredCards ? (async () => {
|
|
429
429
|
try {
|
|
430
|
-
const { searchMemoryCards } = await import("./memory-cards-
|
|
430
|
+
const { searchMemoryCards } = await import("./memory-cards-7YIZUWSJ.js");
|
|
431
431
|
return await searchMemoryCards(effectiveQuery, agentId, fetchOptions);
|
|
432
432
|
} catch {
|
|
433
433
|
return [];
|
|
@@ -561,7 +561,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
561
561
|
try {
|
|
562
562
|
let rerankedRecords;
|
|
563
563
|
if (graphContextMap.size > 0) {
|
|
564
|
-
const { rerankWithContext } = await import("./reranker-
|
|
564
|
+
const { rerankWithContext } = await import("./reranker-G24KWZKH.js");
|
|
565
565
|
const candidates = merged.map((m) => ({
|
|
566
566
|
text: m.raw_text,
|
|
567
567
|
context: graphContextMap.get(m.id)
|
|
@@ -569,7 +569,7 @@ async function hybridSearch(queryText, agentId, options) {
|
|
|
569
569
|
const scored = await rerankWithContext(effectiveQuery, candidates, rerankReturnLimit);
|
|
570
570
|
rerankedRecords = scored.map((s) => merged[s.index]);
|
|
571
571
|
} else {
|
|
572
|
-
const { rerank } = await import("./reranker-
|
|
572
|
+
const { rerank } = await import("./reranker-G24KWZKH.js");
|
|
573
573
|
rerankedRecords = await rerank(effectiveQuery, merged, rerankReturnLimit);
|
|
574
574
|
}
|
|
575
575
|
if (rerankedRecords.length > 0) {
|
|
@@ -939,7 +939,7 @@ async function lightweightSearch(queryText, agentId, options) {
|
|
|
939
939
|
}
|
|
940
940
|
if (options?.includeStructuredCards !== true) return results;
|
|
941
941
|
try {
|
|
942
|
-
const { searchMemoryCards } = await import("./memory-cards-
|
|
942
|
+
const { searchMemoryCards } = await import("./memory-cards-7YIZUWSJ.js");
|
|
943
943
|
const cardResults = await searchMemoryCards(queryText, agentId, options);
|
|
944
944
|
if (cardResults.length > 0) {
|
|
945
945
|
return rrfMergeMulti([results, cardResults], limit, RRF_K, [1, 0.85]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
sessionScopeFilter
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3KAYKHVB.js";
|
|
4
4
|
|
|
5
5
|
// src/lib/git-task-sweep.ts
|
|
6
6
|
import { execSync } from "child_process";
|
|
@@ -238,7 +238,7 @@ async function sweepTasks(projectName, options = {}) {
|
|
|
238
238
|
}
|
|
239
239
|
if (!dryRun) {
|
|
240
240
|
try {
|
|
241
|
-
const { updateTaskStatus } = await import("./tasks-crud-
|
|
241
|
+
const { updateTaskStatus } = await import("./tasks-crud-RDWLWYWV.js");
|
|
242
242
|
await updateTaskStatus({
|
|
243
243
|
taskId: task.id,
|
|
244
244
|
status: "needs_review",
|
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateTask
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-6AY7VXSF.js";
|
|
4
4
|
import {
|
|
5
5
|
TASK_ALREADY_CLAIMED_PREFIX
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-3KAYKHVB.js";
|
|
7
|
+
import {
|
|
8
|
+
getAgentContext
|
|
9
|
+
} from "./chunk-GJV3WDWM.js";
|
|
10
|
+
import {
|
|
11
|
+
isCoordinatorName
|
|
12
|
+
} from "./chunk-BIM763ML.js";
|
|
7
13
|
|
|
8
14
|
// src/mcp/tools/update-task.ts
|
|
9
15
|
import { z } from "zod";
|
|
16
|
+
import { execFileSync } from "child_process";
|
|
17
|
+
function resolveCallerSessionForUpdate() {
|
|
18
|
+
const contextual = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || void 0;
|
|
19
|
+
if (contextual) return contextual;
|
|
20
|
+
if (getAgentContext()) return void 0;
|
|
21
|
+
if (process.env.VITEST === "true" || process.env.NODE_ENV === "test") return void 0;
|
|
22
|
+
try {
|
|
23
|
+
const session = execFileSync(
|
|
24
|
+
"tmux",
|
|
25
|
+
["display-message", "-p", "#{session_name}"],
|
|
26
|
+
{ encoding: "utf8", timeout: 1500 }
|
|
27
|
+
).trim();
|
|
28
|
+
return session || void 0;
|
|
29
|
+
} catch {
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
10
33
|
function registerUpdateTask(server) {
|
|
11
34
|
server.registerTool(
|
|
12
35
|
"update_task",
|
|
@@ -42,10 +65,18 @@ function registerUpdateTask(server) {
|
|
|
42
65
|
try {
|
|
43
66
|
const { getActiveAgent: getAgent } = await import("./active-agent-AIK6FSYE.js");
|
|
44
67
|
callerAgentId = getAgent().agentId;
|
|
45
|
-
|
|
46
|
-
callerSession = getAgentContext()?.sessionHint || process.env.EXE_SESSION_NAME || process.env.EXE_SESSION || void 0;
|
|
68
|
+
callerSession = resolveCallerSessionForUpdate();
|
|
47
69
|
} catch {
|
|
48
70
|
}
|
|
71
|
+
if (status === "in_progress" && callerAgentId && !isCoordinatorName(callerAgentId) && !callerSession && process.env.VITEST !== "true" && process.env.NODE_ENV !== "test") {
|
|
72
|
+
return {
|
|
73
|
+
content: [{
|
|
74
|
+
type: "text",
|
|
75
|
+
text: "Refusing to claim task without a concrete caller tmux session. Parallel employee instances require exact session binding (X-Exe-Session/EXE_SESSION) so one instance cannot claim another instance's assigned task/worktree. Reconnect MCP or use the task dispatch signal from the correct session."
|
|
76
|
+
}],
|
|
77
|
+
isError: true
|
|
78
|
+
};
|
|
79
|
+
}
|
|
49
80
|
let task;
|
|
50
81
|
try {
|
|
51
82
|
task = await updateTask({
|
|
@@ -86,10 +117,10 @@ File: ${task.taskFile}`;
|
|
|
86
117
|
if (isTerminal && task.reviewer) {
|
|
87
118
|
try {
|
|
88
119
|
const { notifyCoordinatorTaskCompletion } = await import("./lib/tmux-routing.js");
|
|
89
|
-
const { isCoordinatorName } = await import("./lib/employees.js");
|
|
120
|
+
const { isCoordinatorName: isCoordinatorName2 } = await import("./lib/employees.js");
|
|
90
121
|
const reviewer = String(task.reviewer);
|
|
91
122
|
const coordinatorSession = task.sessionScope;
|
|
92
|
-
if (coordinatorSession &&
|
|
123
|
+
if (coordinatorSession && isCoordinatorName2(reviewer)) {
|
|
93
124
|
notifyCoordinatorTaskCompletion(coordinatorSession, callerAgentId ?? "agent", task.title);
|
|
94
125
|
}
|
|
95
126
|
} catch {
|