@askexenow/exe-os 0.9.215 → 0.9.217
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/docker-compose.yml +1 -1
- package/dist/{backfill-metadata-PZTWTG35.js → backfill-metadata-I6VR7JZ2.js} +1 -1
- package/dist/{behaviors-KL2G7ZJ7.js → behaviors-YJ3HEQED.js} +3 -1
- 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 +1 -1
- package/dist/bin/cleanup-stale-review-tasks.js +2 -2
- package/dist/bin/cli.js +4 -4
- package/dist/bin/exe-assign.js +1 -1
- package/dist/bin/exe-boot.js +3 -3
- package/dist/bin/exe-dispatch.js +2 -2
- package/dist/bin/exe-doctor.js +1 -1
- package/dist/bin/exe-export-behaviors.js +4 -4
- package/dist/bin/exe-forget.js +3 -3
- package/dist/bin/exe-gateway.js +4 -4
- package/dist/bin/exe-heartbeat.js +2 -2
- package/dist/bin/exe-kill.js +3 -3
- package/dist/bin/exe-launch-agent.js +5 -5
- package/dist/bin/exe-pending-messages.js +3 -3
- package/dist/bin/exe-pending-notifications.js +2 -2
- package/dist/bin/exe-pending-reviews.js +2 -2
- package/dist/bin/exe-review.js +3 -3
- package/dist/bin/exe-search.js +2 -2
- package/dist/bin/exe-session-cleanup.js +5 -5
- package/dist/bin/exe-start-codex.js +3 -3
- package/dist/bin/exe-start-opencode.js +3 -3
- package/dist/bin/exe-status.js +3 -3
- package/dist/bin/exe-team.js +1 -1
- package/dist/bin/git-sweep.js +2 -2
- package/dist/bin/graph-backfill.js +1 -1
- package/dist/bin/graph-export.js +2 -2
- package/dist/bin/import-history.js +1 -1
- 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 +2 -2
- package/dist/bin/shard-migrate.js +1 -1
- package/dist/{capacity-monitor-2BQAYPLD.js → capacity-monitor-XFMZSJDB.js} +2 -2
- package/dist/{catchup-brief-DASTJDLI.js → catchup-brief-D5IZFZDO.js} +3 -3
- package/dist/{chunk-TBNDW7US.js → chunk-2DRWIXOO.js} +1 -1
- package/dist/{chunk-VNP3SECD.js → chunk-4ANCHFE2.js} +1 -1
- package/dist/{chunk-YWLO73DO.js → chunk-5G643UWZ.js} +14 -4
- package/dist/{chunk-JFH5WWP7.js → chunk-64DYFA5X.js} +2 -2
- package/dist/{chunk-YXYJG5JX.js → chunk-6UY62EGD.js} +4 -4
- package/dist/{chunk-PUGYDZ4H.js → chunk-7X6QKJGM.js} +2 -2
- package/dist/{chunk-NJTIAI5G.js → chunk-BFLBZGPZ.js} +10 -1
- package/dist/{chunk-HZB5RFJI.js → chunk-BN3HRSEU.js} +1 -1
- package/dist/{chunk-NUMRCSLX.js → chunk-CUKIMXQ7.js} +1 -1
- package/dist/{chunk-34QPI5EB.js → chunk-FXD53Q32.js} +2 -2
- package/dist/{chunk-CCKNE7II.js → chunk-GEFZHKEN.js} +1 -1
- package/dist/{chunk-545RHWVW.js → chunk-GKNYEJQ3.js} +1 -1
- package/dist/{chunk-6GSACZON.js → chunk-HW46Q4AR.js} +4 -4
- package/dist/{chunk-IN5UEMCT.js → chunk-IFSAR5IX.js} +3 -3
- package/dist/{chunk-47N7BTNW.js → chunk-NEGJAEZ7.js} +1 -1
- package/dist/{chunk-F6T67NYS.js → chunk-O6LFXATW.js} +1 -1
- package/dist/{chunk-5U6UANGP.js → chunk-PKIOJQ2N.js} +1 -1
- package/dist/{chunk-NWLHYYHG.js → chunk-QOY6CTHV.js} +1 -1
- package/dist/{chunk-J7GQ24E3.js → chunk-R2MZDZTQ.js} +1 -1
- package/dist/{chunk-BR6IZFIL.js → chunk-RSHVFBKD.js} +4 -4
- package/dist/{chunk-AJJKDHAD.js → chunk-RTGN42GD.js} +1 -1
- package/dist/{chunk-AI4WYA6P.js → chunk-S2T7CE4P.js} +1 -1
- package/dist/{chunk-MUPXVKIR.js → chunk-SDQSOQOE.js} +2 -2
- package/dist/{chunk-XDDBA7QE.js → chunk-T43SC2XX.js} +1 -1
- package/dist/{chunk-VEA2GFDK.js → chunk-UO3IEPSY.js} +675 -586
- package/dist/{chunk-GSBNSF67.js → chunk-WEJ45ZFF.js} +1 -1
- package/dist/{chunk-H6IQFGIG.js → chunk-XPKACO5A.js} +3 -3
- package/dist/{chunk-3FBZNRRS.js → chunk-YJNRRQOG.js} +2 -2
- package/dist/{crm-webhook-6EPM6GCJ.js → crm-webhook-WMAW6ZT2.js} +2 -2
- package/dist/{cto-delegation-gate-BU6HH4CY.js → cto-delegation-gate-YNWMQEQB.js} +1 -1
- package/dist/{daemon-orchestration-R2MVQ4CF.js → daemon-orchestration-5KUKQOZ4.js} +3 -3
- package/dist/{exe-export-KEL4ZR25.js → exe-export-RAYK76SO.js} +1 -1
- package/dist/{exe-import-ICJYV22F.js → exe-import-SAJBGUN5.js} +1 -1
- package/dist/{fast-db-init-6D433NQO.js → fast-db-init-5VDTKVKX.js} +1 -1
- package/dist/gateway/index.js +5 -5
- package/dist/{git-task-sweep-VIGVG2RY.js → git-task-sweep-GED54WTZ.js} +2 -2
- package/dist/hooks/bug-report-worker.js +3 -3
- package/dist/hooks/codex-stop-task-finalizer.js +3 -3
- package/dist/hooks/commit-complete.js +4 -4
- 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 +2 -2
- package/dist/hooks/post-tool-combined.js +2 -2
- package/dist/hooks/pre-compact.js +3 -3
- package/dist/hooks/pre-tool-use.js +6 -6
- package/dist/hooks/prompt-submit.js +10 -10
- package/dist/hooks/session-end.js +152 -20
- package/dist/hooks/session-start.js +4 -4
- package/dist/hooks/stop.js +5 -5
- package/dist/hooks/subagent-stop.js +2 -2
- package/dist/hooks/summary-worker.js +5 -5
- package/dist/index.js +8 -8
- package/dist/lib/consolidation.js +2 -2
- package/dist/lib/exe-daemon.js +27 -12
- package/dist/lib/hybrid-search.js +2 -2
- package/dist/lib/messaging.js +2 -2
- package/dist/lib/schedules.js +2 -2
- package/dist/lib/skill-learning.js +2 -2
- package/dist/lib/store.js +1 -1
- package/dist/lib/tasks.js +2 -2
- package/dist/lib/tmux-routing.js +1 -1
- package/dist/mcp/register-tools.js +24 -24
- package/dist/mcp/server.js +25 -25
- package/dist/mcp/tools/create-task.js +3 -3
- package/dist/mcp/tools/deactivate-behavior.js +2 -2
- package/dist/mcp/tools/list-tasks.js +3 -3
- package/dist/mcp/tools/send-message.js +3 -3
- package/dist/mcp/tools/update-task.js +3 -3
- package/dist/{notifications-TNSU4SCZ.js → notifications-SCHILQCQ.js} +1 -1
- package/dist/{orchestrator-EYAPHOOD.js → orchestrator-NCEFZF32.js} +2 -2
- package/dist/{reranker-7P6436GV.js → reranker-QFLVGVRT.js} +1 -1
- package/dist/{review-polling-5ZEWTFQL.js → review-polling-ZKYFETP3.js} +2 -2
- package/dist/runtime/index.js +3 -3
- package/dist/{session-events-ZYNOWIQL.js → session-events-XCNQDXF4.js} +2 -2
- package/dist/{session-scope-UCFA2CJP.js → session-scope-FEZQJMD4.js} +1 -1
- package/dist/{task-enforcement-XYQN7VBA.js → task-enforcement-HVY36QRD.js} +1 -1
- package/dist/{task-scope-52IDTSYX.js → task-scope-ODSOEGTH.js} +1 -1
- package/dist/{tasks-crud-ZRB2UNNB.js → tasks-crud-RIUHZJGR.js} +1 -1
- package/dist/{tasks-review-DZGRPBMN.js → tasks-review-EBUVFQUJ.js} +1 -1
- package/dist/tui/App.js +7 -7
- package/dist/{tui-data-XLI7YZ75.js → tui-data-UM6LR4EQ.js} +1 -1
- package/dist/{worker-gate-ZS6IY5HM.js → worker-gate-K5YTO2H5.js} +1 -1
- package/dist/{workflow-engine-KWRAUF7M.js → workflow-engine-WUU5OZ3N.js} +2 -2
- package/package.json +1 -1
- package/release-notes.json +68 -68
- /package/dist/{chunk-Z3O6UJUX.js → chunk-2IMUAL3X.js} +0 -0
- /package/dist/{chunk-6457MEIK.js → chunk-4AJYZFDE.js} +0 -0
- /package/dist/{chunk-2333X7A7.js → chunk-DXB3CB2O.js} +0 -0
- /package/dist/{chunk-OLU3B6B7.js → chunk-KVOTLCAX.js} +0 -0
- /package/dist/{chunk-COGICIAL.js → chunk-MQA6K7DH.js} +0 -0
- /package/dist/{core-memory-LN22LDJA.js → core-memory-NZOLAIOE.js} +0 -0
- /package/dist/{exe-key-ZJMUM57I.js → exe-key-W3CME65M.js} +0 -0
- /package/dist/{skill-refinement-CYK53LCM.js → skill-refinement-QHOS6CGQ.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listRecentSessionEvents
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PKIOJQ2N.js";
|
|
4
4
|
import {
|
|
5
5
|
AUTO_WAKE_MAX_RETRIES
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5G643UWZ.js";
|
|
7
7
|
import {
|
|
8
8
|
isRerankerAvailable,
|
|
9
9
|
rerankWithScores
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KVOTLCAX.js";
|
|
11
11
|
import {
|
|
12
12
|
getEntityByName,
|
|
13
13
|
getEntityNeighbors,
|
|
@@ -52,10 +52,10 @@ import {
|
|
|
52
52
|
} from "./chunk-XHTOAJYD.js";
|
|
53
53
|
import {
|
|
54
54
|
createOrRefreshResumeTask
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-GEFZHKEN.js";
|
|
56
56
|
import {
|
|
57
57
|
registerUpdateTask
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-64DYFA5X.js";
|
|
59
59
|
import {
|
|
60
60
|
registerCreateReminder
|
|
61
61
|
} from "./chunk-I6474EQW.js";
|
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
} from "./chunk-R766IOBQ.js";
|
|
68
68
|
import {
|
|
69
69
|
registerDeactivateBehavior
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-NEGJAEZ7.js";
|
|
71
71
|
import {
|
|
72
72
|
completeReminder,
|
|
73
73
|
createReminder,
|
|
@@ -85,13 +85,13 @@ import {
|
|
|
85
85
|
} from "./chunk-2QNMGFIF.js";
|
|
86
86
|
import {
|
|
87
87
|
registerSendMessage
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-WEJ45ZFF.js";
|
|
89
89
|
import {
|
|
90
90
|
registerCreateTask
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-XPKACO5A.js";
|
|
92
92
|
import {
|
|
93
93
|
registerListTasks
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-2DRWIXOO.js";
|
|
95
95
|
import {
|
|
96
96
|
TOKENS_PER_IDLE_MINUTE,
|
|
97
97
|
countKillsSince,
|
|
@@ -100,10 +100,10 @@ import {
|
|
|
100
100
|
import {
|
|
101
101
|
createSchedule,
|
|
102
102
|
parseHumanCron
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-BN3HRSEU.js";
|
|
104
104
|
import {
|
|
105
105
|
status
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-FXD53Q32.js";
|
|
107
107
|
import {
|
|
108
108
|
getAgentSpend
|
|
109
109
|
} from "./chunk-RSVJQ4E2.js";
|
|
@@ -122,7 +122,7 @@ import {
|
|
|
122
122
|
fixShards,
|
|
123
123
|
formatReport,
|
|
124
124
|
runAudit
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-YJNRRQOG.js";
|
|
126
126
|
import {
|
|
127
127
|
runHealthCheck
|
|
128
128
|
} from "./chunk-RAV23DU2.js";
|
|
@@ -154,19 +154,20 @@ import {
|
|
|
154
154
|
import {
|
|
155
155
|
findSimilarTrajectories,
|
|
156
156
|
hashSignature
|
|
157
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-RTGN42GD.js";
|
|
158
158
|
import {
|
|
159
159
|
deactivateBehavior,
|
|
160
160
|
listBehaviorsByDomain,
|
|
161
161
|
listSharedSkills,
|
|
162
|
+
reactivateBehavior,
|
|
162
163
|
storeBehavior
|
|
163
|
-
} from "./chunk-
|
|
164
|
+
} from "./chunk-BFLBZGPZ.js";
|
|
164
165
|
import {
|
|
165
166
|
countUnconsolidated,
|
|
166
167
|
groupMemories,
|
|
167
168
|
runConsolidation,
|
|
168
169
|
selectUnconsolidated
|
|
169
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-QOY6CTHV.js";
|
|
170
171
|
import {
|
|
171
172
|
embed
|
|
172
173
|
} from "./chunk-OUHHUKPC.js";
|
|
@@ -177,17 +178,17 @@ import {
|
|
|
177
178
|
} from "./chunk-GD4VXNXO.js";
|
|
178
179
|
import {
|
|
179
180
|
updateTask
|
|
180
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-IFSAR5IX.js";
|
|
181
182
|
import {
|
|
182
183
|
fastDbInit
|
|
183
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-4AJYZFDE.js";
|
|
184
185
|
import {
|
|
185
186
|
MAX_CONCURRENT_WORKERS
|
|
186
|
-
} from "./chunk-
|
|
187
|
+
} from "./chunk-4ANCHFE2.js";
|
|
187
188
|
import {
|
|
188
189
|
hybridSearch,
|
|
189
190
|
recentRecords
|
|
190
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-RSHVFBKD.js";
|
|
191
192
|
import {
|
|
192
193
|
attachDocumentMetadata,
|
|
193
194
|
flushBatch,
|
|
@@ -195,7 +196,7 @@ import {
|
|
|
195
196
|
reserveVersions,
|
|
196
197
|
vectorToBlob,
|
|
197
198
|
writeMemory
|
|
198
|
-
} from "./chunk-
|
|
199
|
+
} from "./chunk-2IMUAL3X.js";
|
|
199
200
|
import {
|
|
200
201
|
extractKeywords,
|
|
201
202
|
keywordsToString
|
|
@@ -210,7 +211,7 @@ import {
|
|
|
210
211
|
sessionScopeFilter,
|
|
211
212
|
updateTaskStatus,
|
|
212
213
|
writeCheckpoint
|
|
213
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-HW46Q4AR.js";
|
|
214
215
|
import {
|
|
215
216
|
listSessions
|
|
216
217
|
} from "./chunk-B7NO5U7H.js";
|
|
@@ -246,7 +247,7 @@ import {
|
|
|
246
247
|
isScheduledTrigger,
|
|
247
248
|
loadTriggers,
|
|
248
249
|
sanitizeParam
|
|
249
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-DXB3CB2O.js";
|
|
250
251
|
import {
|
|
251
252
|
pushConversationToCRM
|
|
252
253
|
} from "./chunk-ONKIWA3R.js";
|
|
@@ -1581,7 +1582,7 @@ function registerMemory(server) {
|
|
|
1581
1582
|
if (action === "core_get" || action === "core_set" || action === "core_delete") {
|
|
1582
1583
|
const { getActiveAgent: getActiveAgent2 } = await import("./active-agent-4XH2Q6KJ.js");
|
|
1583
1584
|
const { agentId } = getActiveAgent2();
|
|
1584
|
-
const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-
|
|
1585
|
+
const { getCoreMemory, setCoreMemory, deleteCoreMemory, formatCoreMemoryBlock } = await import("./core-memory-NZOLAIOE.js");
|
|
1585
1586
|
if (action === "core_get") {
|
|
1586
1587
|
const entries = await getCoreMemory(agentId);
|
|
1587
1588
|
const block = formatCoreMemoryBlock(entries);
|
|
@@ -2306,7 +2307,7 @@ function registerResumeEmployee(server) {
|
|
|
2306
2307
|
};
|
|
2307
2308
|
}
|
|
2308
2309
|
try {
|
|
2309
|
-
const { isTmuxSessionAlive } = await import("./tasks-crud-
|
|
2310
|
+
const { isTmuxSessionAlive } = await import("./tasks-crud-RIUHZJGR.js");
|
|
2310
2311
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
2311
2312
|
for (const row of openTasks.rows) {
|
|
2312
2313
|
const status2 = String(row.status);
|
|
@@ -3073,11 +3074,73 @@ function registerIdentity(server) {
|
|
|
3073
3074
|
});
|
|
3074
3075
|
}
|
|
3075
3076
|
|
|
3077
|
+
// src/mcp/tools/reactivate-behavior.ts
|
|
3078
|
+
import { z as z24 } from "zod";
|
|
3079
|
+
function registerReactivateBehavior(server) {
|
|
3080
|
+
server.registerTool(
|
|
3081
|
+
"reactivate_behavior",
|
|
3082
|
+
{
|
|
3083
|
+
title: "Reactivate Behavior",
|
|
3084
|
+
description: "Re-enable a previously deactivated behavior by setting active = 1. RESTRICTED: only coordinator or founder sessions can use this. Use list_behaviors to find the behavior ID first.",
|
|
3085
|
+
inputSchema: {
|
|
3086
|
+
behavior_id: z24.string().describe("UUID of the behavior to reactivate")
|
|
3087
|
+
}
|
|
3088
|
+
},
|
|
3089
|
+
async ({ behavior_id }) => {
|
|
3090
|
+
const caller = getActiveAgent();
|
|
3091
|
+
const allowed = canCoordinate(caller.agentId, caller.agentRole);
|
|
3092
|
+
if (!allowed) {
|
|
3093
|
+
return {
|
|
3094
|
+
content: [{
|
|
3095
|
+
type: "text",
|
|
3096
|
+
text: `Permission denied. Only the coordinator or founder sessions can reactivate behaviors. You are "${caller.agentId}".`
|
|
3097
|
+
}],
|
|
3098
|
+
isError: true
|
|
3099
|
+
};
|
|
3100
|
+
}
|
|
3101
|
+
const client = getClient();
|
|
3102
|
+
const result3 = await client.execute({
|
|
3103
|
+
sql: `SELECT id, agent_id, content, domain, priority, active FROM behaviors WHERE id = ?`,
|
|
3104
|
+
args: [behavior_id]
|
|
3105
|
+
});
|
|
3106
|
+
if (result3.rows.length === 0) {
|
|
3107
|
+
return {
|
|
3108
|
+
content: [{
|
|
3109
|
+
type: "text",
|
|
3110
|
+
text: `Behavior not found: ${behavior_id}`
|
|
3111
|
+
}],
|
|
3112
|
+
isError: true
|
|
3113
|
+
};
|
|
3114
|
+
}
|
|
3115
|
+
const row = result3.rows[0];
|
|
3116
|
+
const wasReactivated = await reactivateBehavior(behavior_id);
|
|
3117
|
+
if (!wasReactivated) {
|
|
3118
|
+
return {
|
|
3119
|
+
content: [{
|
|
3120
|
+
type: "text",
|
|
3121
|
+
text: `Behavior ${behavior_id} is already active.`
|
|
3122
|
+
}]
|
|
3123
|
+
};
|
|
3124
|
+
}
|
|
3125
|
+
return {
|
|
3126
|
+
content: [{
|
|
3127
|
+
type: "text",
|
|
3128
|
+
text: `Reactivated behavior for ${row.agent_id}.
|
|
3129
|
+
ID: ${row.id}
|
|
3130
|
+
Domain: ${row.domain ?? "none"}
|
|
3131
|
+
Priority: ${row.priority}
|
|
3132
|
+
Content: ${row.content}`
|
|
3133
|
+
}]
|
|
3134
|
+
};
|
|
3135
|
+
}
|
|
3136
|
+
);
|
|
3137
|
+
}
|
|
3138
|
+
|
|
3076
3139
|
// src/mcp/tools/document.ts
|
|
3077
|
-
import { z as
|
|
3140
|
+
import { z as z30 } from "zod";
|
|
3078
3141
|
|
|
3079
3142
|
// src/mcp/tools/ingest-document.ts
|
|
3080
|
-
import { z as
|
|
3143
|
+
import { z as z25 } from "zod";
|
|
3081
3144
|
|
|
3082
3145
|
// src/lib/documents.ts
|
|
3083
3146
|
import crypto3 from "crypto";
|
|
@@ -3343,18 +3406,18 @@ function registerIngestDocument(server) {
|
|
|
3343
3406
|
title: "Ingest Document",
|
|
3344
3407
|
description: "Bulk-upload a document and its chunks to wiki memory in a single round-trip. Lazily creates the workspace if missing. Falls back to NULL vectors when the embedding daemon is offline (backfill job will fill them later).",
|
|
3345
3408
|
inputSchema: {
|
|
3346
|
-
workspace_id:
|
|
3347
|
-
filename:
|
|
3348
|
-
mime:
|
|
3349
|
-
source_type:
|
|
3350
|
-
user_id:
|
|
3351
|
-
chunks:
|
|
3352
|
-
text:
|
|
3353
|
-
char_offset:
|
|
3354
|
-
page_number:
|
|
3355
|
-
metadata:
|
|
3409
|
+
workspace_id: z25.string().describe("Workspace UUID or slug \u2014 created lazily if not found"),
|
|
3410
|
+
filename: z25.string().describe("Document filename"),
|
|
3411
|
+
mime: z25.string().optional().describe("MIME type (e.g. application/pdf)"),
|
|
3412
|
+
source_type: z25.enum(["upload", "url", "manual", "paste"]).optional().describe("How the document was added"),
|
|
3413
|
+
user_id: z25.string().optional().describe("AnythingLLM User.id (uploader). Null = shared."),
|
|
3414
|
+
chunks: z25.array(z25.object({
|
|
3415
|
+
text: z25.string(),
|
|
3416
|
+
char_offset: z25.number().optional(),
|
|
3417
|
+
page_number: z25.number().optional(),
|
|
3418
|
+
metadata: z25.record(z25.string(), z25.unknown()).optional()
|
|
3356
3419
|
})).describe("Document chunks to ingest"),
|
|
3357
|
-
document_metadata:
|
|
3420
|
+
document_metadata: z25.record(z25.string(), z25.unknown()).optional().describe("Optional metadata stored on the document row")
|
|
3358
3421
|
}
|
|
3359
3422
|
},
|
|
3360
3423
|
async (input) => {
|
|
@@ -3386,7 +3449,7 @@ function registerIngestDocument(server) {
|
|
|
3386
3449
|
}
|
|
3387
3450
|
|
|
3388
3451
|
// src/mcp/tools/list-documents.ts
|
|
3389
|
-
import { z as
|
|
3452
|
+
import { z as z26 } from "zod";
|
|
3390
3453
|
function registerListDocuments(server) {
|
|
3391
3454
|
server.registerTool(
|
|
3392
3455
|
"list_documents",
|
|
@@ -3394,9 +3457,9 @@ function registerListDocuments(server) {
|
|
|
3394
3457
|
title: "List Documents",
|
|
3395
3458
|
description: "List documents in a wiki workspace, newest first, with chunk counts. Paginated via limit/offset.",
|
|
3396
3459
|
inputSchema: {
|
|
3397
|
-
workspace_id:
|
|
3398
|
-
limit:
|
|
3399
|
-
offset:
|
|
3460
|
+
workspace_id: z26.string().describe("Workspace id (UUID). Use resolveWorkspace / ingest_document to create one."),
|
|
3461
|
+
limit: z26.number().int().positive().optional().describe(`Max rows to return (default ${DEFAULT_LIST_LIMIT}).`),
|
|
3462
|
+
offset: z26.number().int().nonnegative().optional().describe("Rows to skip (default 0).")
|
|
3400
3463
|
}
|
|
3401
3464
|
},
|
|
3402
3465
|
async ({ workspace_id, limit, offset }) => {
|
|
@@ -3418,7 +3481,7 @@ function registerListDocuments(server) {
|
|
|
3418
3481
|
}
|
|
3419
3482
|
|
|
3420
3483
|
// src/mcp/tools/purge-document.ts
|
|
3421
|
-
import { z as
|
|
3484
|
+
import { z as z27 } from "zod";
|
|
3422
3485
|
function registerPurgeDocument(server) {
|
|
3423
3486
|
server.registerTool(
|
|
3424
3487
|
"purge_document",
|
|
@@ -3426,7 +3489,7 @@ function registerPurgeDocument(server) {
|
|
|
3426
3489
|
title: "Purge Document",
|
|
3427
3490
|
description: "Delete a wiki document and all its chunks in a single transaction. Idempotent: non-existent document returns deleted_chunks=0.",
|
|
3428
3491
|
inputSchema: {
|
|
3429
|
-
document_id:
|
|
3492
|
+
document_id: z27.string().describe("Document id (UUID) to purge.")
|
|
3430
3493
|
}
|
|
3431
3494
|
},
|
|
3432
3495
|
async ({ document_id }) => {
|
|
@@ -3451,7 +3514,7 @@ function registerPurgeDocument(server) {
|
|
|
3451
3514
|
}
|
|
3452
3515
|
|
|
3453
3516
|
// src/mcp/tools/set-document-importance.ts
|
|
3454
|
-
import { z as
|
|
3517
|
+
import { z as z28 } from "zod";
|
|
3455
3518
|
function registerSetDocumentImportance(server) {
|
|
3456
3519
|
server.registerTool(
|
|
3457
3520
|
"set_document_importance",
|
|
@@ -3459,8 +3522,8 @@ function registerSetDocumentImportance(server) {
|
|
|
3459
3522
|
title: "Set Document Importance",
|
|
3460
3523
|
description: `Bulk-update importance (${MIN_IMPORTANCE}-${MAX_IMPORTANCE}) on all chunks of a wiki document. Higher = surfaces earlier in search.`,
|
|
3461
3524
|
inputSchema: {
|
|
3462
|
-
document_id:
|
|
3463
|
-
importance:
|
|
3525
|
+
document_id: z28.string().describe("Document id (UUID)."),
|
|
3526
|
+
importance: z28.number().int().min(MIN_IMPORTANCE).max(MAX_IMPORTANCE).describe(`Importance score ${MIN_IMPORTANCE}-${MAX_IMPORTANCE} (inclusive).`)
|
|
3464
3527
|
}
|
|
3465
3528
|
},
|
|
3466
3529
|
async ({ document_id, importance }) => {
|
|
@@ -3478,7 +3541,7 @@ function registerSetDocumentImportance(server) {
|
|
|
3478
3541
|
}
|
|
3479
3542
|
|
|
3480
3543
|
// src/mcp/tools/rerank-documents.ts
|
|
3481
|
-
import { z as
|
|
3544
|
+
import { z as z29 } from "zod";
|
|
3482
3545
|
var MAX_CANDIDATES = 50;
|
|
3483
3546
|
function registerRerankDocuments(server) {
|
|
3484
3547
|
server.registerTool(
|
|
@@ -3487,14 +3550,14 @@ function registerRerankDocuments(server) {
|
|
|
3487
3550
|
title: "Rerank Documents",
|
|
3488
3551
|
description: "Score candidate texts against a query using the local Jina Reranker v3 cross-encoder. Returns candidates sorted by relevance with per-item scores and original indices. Useful for agent tool selection, pointwise re-ranking, or any flow that already has candidates and only needs scoring.",
|
|
3489
3552
|
inputSchema: {
|
|
3490
|
-
query:
|
|
3491
|
-
candidates:
|
|
3553
|
+
query: z29.string().min(1, "query must not be empty").describe("The query to score candidates against."),
|
|
3554
|
+
candidates: z29.array(z29.string()).min(1, "candidates must contain at least one text").max(
|
|
3492
3555
|
MAX_CANDIDATES,
|
|
3493
3556
|
`candidates may contain at most ${MAX_CANDIDATES} items`
|
|
3494
3557
|
).describe(
|
|
3495
3558
|
`Ordered list of candidate texts to score (up to ${MAX_CANDIDATES}).`
|
|
3496
3559
|
),
|
|
3497
|
-
top_k:
|
|
3560
|
+
top_k: z29.coerce.number().int().positive().optional().describe(
|
|
3498
3561
|
"Max number of top-ranked results to return. Omit to return all candidates scored and sorted."
|
|
3499
3562
|
)
|
|
3500
3563
|
}
|
|
@@ -3562,26 +3625,26 @@ function registerDocument(server) {
|
|
|
3562
3625
|
title: "Document",
|
|
3563
3626
|
description: "Consolidated document domain tool. Actions: ingest, list, purge, set_importance, rerank. Legacy document tools remain available during migration.",
|
|
3564
3627
|
inputSchema: {
|
|
3565
|
-
action:
|
|
3566
|
-
workspace_id:
|
|
3567
|
-
filename:
|
|
3568
|
-
mime:
|
|
3569
|
-
source_type:
|
|
3570
|
-
user_id:
|
|
3571
|
-
chunks:
|
|
3572
|
-
text:
|
|
3573
|
-
char_offset:
|
|
3574
|
-
page_number:
|
|
3575
|
-
metadata:
|
|
3628
|
+
action: z30.enum(["ingest", "list", "purge", "set_importance", "rerank"]).describe("Document operation to perform"),
|
|
3629
|
+
workspace_id: z30.string().optional().describe("Workspace UUID or slug"),
|
|
3630
|
+
filename: z30.string().optional().describe("Document filename for action=ingest"),
|
|
3631
|
+
mime: z30.string().optional().describe("MIME type for action=ingest"),
|
|
3632
|
+
source_type: z30.enum(["upload", "url", "manual", "paste"]).optional().describe("Source type for action=ingest"),
|
|
3633
|
+
user_id: z30.string().optional().describe("Uploader user ID for action=ingest"),
|
|
3634
|
+
chunks: z30.array(z30.object({
|
|
3635
|
+
text: z30.string(),
|
|
3636
|
+
char_offset: z30.number().optional(),
|
|
3637
|
+
page_number: z30.number().optional(),
|
|
3638
|
+
metadata: z30.record(z30.string(), z30.unknown()).optional()
|
|
3576
3639
|
})).optional().describe("Document chunks for action=ingest"),
|
|
3577
|
-
document_metadata:
|
|
3578
|
-
document_id:
|
|
3579
|
-
importance:
|
|
3580
|
-
query:
|
|
3581
|
-
candidates:
|
|
3582
|
-
top_k:
|
|
3583
|
-
limit:
|
|
3584
|
-
offset:
|
|
3640
|
+
document_metadata: z30.record(z30.string(), z30.unknown()).optional().describe("Document metadata for action=ingest"),
|
|
3641
|
+
document_id: z30.string().optional().describe("Document ID for purge/set_importance"),
|
|
3642
|
+
importance: z30.number().int().min(1).max(10).optional().describe("Importance for action=set_importance"),
|
|
3643
|
+
query: z30.string().optional().describe("Query for action=rerank"),
|
|
3644
|
+
candidates: z30.array(z30.string()).optional().describe("Candidate texts for action=rerank"),
|
|
3645
|
+
top_k: z30.coerce.number().int().positive().optional().describe("Top K for action=rerank"),
|
|
3646
|
+
limit: z30.number().int().positive().optional().describe("Limit for action=list"),
|
|
3647
|
+
offset: z30.number().int().nonnegative().optional().describe("Offset for action=list")
|
|
3585
3648
|
}
|
|
3586
3649
|
},
|
|
3587
3650
|
async (input, extra) => {
|
|
@@ -3607,10 +3670,10 @@ function registerDocument(server) {
|
|
|
3607
3670
|
}
|
|
3608
3671
|
|
|
3609
3672
|
// src/mcp/tools/gateway.ts
|
|
3610
|
-
import { z as
|
|
3673
|
+
import { z as z35 } from "zod";
|
|
3611
3674
|
|
|
3612
3675
|
// src/mcp/tools/send-whatsapp.ts
|
|
3613
|
-
import { z as
|
|
3676
|
+
import { z as z31 } from "zod";
|
|
3614
3677
|
import { existsSync, readFileSync } from "fs";
|
|
3615
3678
|
import { homedir } from "os";
|
|
3616
3679
|
import { join } from "path";
|
|
@@ -3744,9 +3807,9 @@ function registerSendWhatsapp(server) {
|
|
|
3744
3807
|
title: "Send WhatsApp",
|
|
3745
3808
|
description: "Send a WhatsApp message to one or more recipients. Recipients can be phone numbers or names (looked up in CRM).",
|
|
3746
3809
|
inputSchema: {
|
|
3747
|
-
recipients:
|
|
3748
|
-
message:
|
|
3749
|
-
account:
|
|
3810
|
+
recipients: z31.array(z31.string()).describe("Names to look up in CRM, or phone numbers directly"),
|
|
3811
|
+
message: z31.string().describe("Message text to send"),
|
|
3812
|
+
account: z31.string().optional().describe(
|
|
3750
3813
|
"Which WhatsApp account to send from (e.g., 'lenny'). Falls back to default account."
|
|
3751
3814
|
)
|
|
3752
3815
|
}
|
|
@@ -3828,30 +3891,30 @@ function registerSendWhatsapp(server) {
|
|
|
3828
3891
|
}
|
|
3829
3892
|
|
|
3830
3893
|
// src/mcp/tools/query-conversations.ts
|
|
3831
|
-
import { z as
|
|
3894
|
+
import { z as z33 } from "zod";
|
|
3832
3895
|
|
|
3833
3896
|
// src/lib/unified-query.ts
|
|
3834
|
-
import { z as
|
|
3897
|
+
import { z as z32 } from "zod";
|
|
3835
3898
|
var PaginationSchema = {
|
|
3836
|
-
limit:
|
|
3837
|
-
offset:
|
|
3899
|
+
limit: z32.coerce.number().int().min(1).max(100).optional().describe("Max results to return (default 25, max 100)"),
|
|
3900
|
+
offset: z32.coerce.number().int().min(0).optional().describe("Number of results to skip for pagination")
|
|
3838
3901
|
};
|
|
3839
3902
|
var DateRangeSchema = {
|
|
3840
|
-
date_from:
|
|
3841
|
-
date_to:
|
|
3903
|
+
date_from: z32.string().optional().describe("Filter records created/updated after this ISO date (inclusive)"),
|
|
3904
|
+
date_to: z32.string().optional().describe("Filter records created/updated before this ISO date (inclusive)")
|
|
3842
3905
|
};
|
|
3843
3906
|
var TextSearchSchema = {
|
|
3844
|
-
text_search:
|
|
3907
|
+
text_search: z32.string().optional().describe("Full-text search across relevant fields")
|
|
3845
3908
|
};
|
|
3846
3909
|
var SortSchema = {
|
|
3847
|
-
sort_by:
|
|
3848
|
-
sort_order:
|
|
3910
|
+
sort_by: z32.string().optional().describe("Field to sort by (tool-specific, default varies)"),
|
|
3911
|
+
sort_order: z32.enum(["asc", "desc"]).optional().describe("Sort direction (default desc)")
|
|
3849
3912
|
};
|
|
3850
3913
|
var SourceFilterSchema = {
|
|
3851
|
-
source:
|
|
3914
|
+
source: z32.string().optional().describe("Filter by data source/platform")
|
|
3852
3915
|
};
|
|
3853
3916
|
var StructuredFiltersSchema = {
|
|
3854
|
-
structured_filters:
|
|
3917
|
+
structured_filters: z32.record(z32.string(), z32.unknown()).optional().describe(
|
|
3855
3918
|
"Structured field filters: { field: value } for equality, or { field: { op: 'gt'|'lt'|'gte'|'lte'|'contains'|'neq', value: ... } }"
|
|
3856
3919
|
)
|
|
3857
3920
|
};
|
|
@@ -3930,13 +3993,13 @@ function registerQueryConversations(server) {
|
|
|
3930
3993
|
title: "Query Conversations",
|
|
3931
3994
|
description: "Search across all adapter messages by content, sender, date range, or platform. Returns messages with source attribution (platform, sender, timestamp).",
|
|
3932
3995
|
inputSchema: {
|
|
3933
|
-
query:
|
|
3934
|
-
sender:
|
|
3935
|
-
platform:
|
|
3936
|
-
after:
|
|
3937
|
-
before:
|
|
3938
|
-
channel_id:
|
|
3939
|
-
thread_id:
|
|
3996
|
+
query: z33.string().optional().describe("Full-text search query across message content and responses"),
|
|
3997
|
+
sender: z33.string().optional().describe("Filter by sender ID or name (partial match)"),
|
|
3998
|
+
platform: z33.string().optional().describe("Filter by platform: whatsapp, signal, telegram, discord, imessage, slack, email, webchat"),
|
|
3999
|
+
after: z33.string().optional().describe("Filter messages after this ISO 8601 date (alias for date_from)"),
|
|
4000
|
+
before: z33.string().optional().describe("Filter messages before this ISO 8601 date (alias for date_to)"),
|
|
4001
|
+
channel_id: z33.string().optional().describe("Filter by channel/chat ID"),
|
|
4002
|
+
thread_id: z33.string().optional().describe("Filter by conversation thread ID"),
|
|
3940
4003
|
...DateRangeSchema,
|
|
3941
4004
|
...SortSchema,
|
|
3942
4005
|
...PaginationSchema
|
|
@@ -4047,10 +4110,10 @@ function registerQueryConversations(server) {
|
|
|
4047
4110
|
}
|
|
4048
4111
|
|
|
4049
4112
|
// src/mcp/tools/query-company-brain.ts
|
|
4050
|
-
import { z as
|
|
4113
|
+
import { z as z34 } from "zod";
|
|
4051
4114
|
var FETCH_TIMEOUT_MS = 1e4;
|
|
4052
|
-
var QUERY_SCOPE =
|
|
4053
|
-
var QUERY_ACTION =
|
|
4115
|
+
var QUERY_SCOPE = z34.enum(["raw", "crm", "wiki", "memory", "gateway", "all", "cross"]);
|
|
4116
|
+
var QUERY_ACTION = z34.enum(["search", "list_sources", "sql"]);
|
|
4054
4117
|
var LOCAL_GATEWAY_HTTP_HOSTS = /^(localhost|127\.0\.0\.1|::1|exe-gateway|gateway)$/i;
|
|
4055
4118
|
function assertSecureGatewayUrlForToken(gatewayUrl, authToken) {
|
|
4056
4119
|
if (!authToken) return;
|
|
@@ -4086,10 +4149,10 @@ function registerQueryCompanyBrain(server) {
|
|
|
4086
4149
|
description: "Search the Company Brain \u2014 queries across all data (raw events, wiki docs, agent memories, gateway messages).",
|
|
4087
4150
|
inputSchema: {
|
|
4088
4151
|
action: QUERY_ACTION.default("search").describe("search = search exe-db; list_sources = list available sources; sql = run read-only SQL through gateway"),
|
|
4089
|
-
query:
|
|
4090
|
-
sql:
|
|
4152
|
+
query: z34.string().optional().describe("Search text. Required for action=search."),
|
|
4153
|
+
sql: z34.string().optional().describe("Read-only SELECT/WITH SQL. Required for action=sql."),
|
|
4091
4154
|
scope: QUERY_SCOPE.default("all").describe("Which data scope to search/read (raw, crm, wiki, memory, gateway, all)"),
|
|
4092
|
-
source:
|
|
4155
|
+
source: z34.string().optional().describe("Filter raw events by source (shopify, asana, etc.)"),
|
|
4093
4156
|
...PaginationSchema,
|
|
4094
4157
|
...DateRangeSchema,
|
|
4095
4158
|
...SortSchema
|
|
@@ -4285,22 +4348,22 @@ function registerGateway(server) {
|
|
|
4285
4348
|
title: "Gateway",
|
|
4286
4349
|
description: "Consolidated gateway/customer communication tool. Actions: send_whatsapp, query_conversations, query_company_brain. Legacy gateway tools remain available during migration.",
|
|
4287
4350
|
inputSchema: {
|
|
4288
|
-
action:
|
|
4289
|
-
recipients:
|
|
4290
|
-
message:
|
|
4291
|
-
account:
|
|
4292
|
-
query:
|
|
4293
|
-
sender:
|
|
4294
|
-
platform:
|
|
4295
|
-
after:
|
|
4296
|
-
before:
|
|
4297
|
-
channel_id:
|
|
4298
|
-
thread_id:
|
|
4299
|
-
limit:
|
|
4300
|
-
scope:
|
|
4301
|
-
source:
|
|
4302
|
-
auth_token:
|
|
4303
|
-
user_id:
|
|
4351
|
+
action: z35.enum(["send_whatsapp", "query_conversations", "query_company_brain"]).describe("Gateway operation to perform"),
|
|
4352
|
+
recipients: z35.array(z35.string()).optional().describe("Names or phone numbers for action=send_whatsapp"),
|
|
4353
|
+
message: z35.string().optional().describe("WhatsApp message text"),
|
|
4354
|
+
account: z35.string().optional().describe("WhatsApp account name"),
|
|
4355
|
+
query: z35.string().optional().describe("Search query"),
|
|
4356
|
+
sender: z35.string().optional().describe("Conversation sender filter"),
|
|
4357
|
+
platform: z35.string().optional().describe("Conversation platform filter"),
|
|
4358
|
+
after: z35.string().optional().describe("Conversation lower date bound"),
|
|
4359
|
+
before: z35.string().optional().describe("Conversation upper date bound"),
|
|
4360
|
+
channel_id: z35.string().optional().describe("Conversation channel filter"),
|
|
4361
|
+
thread_id: z35.string().optional().describe("Conversation thread filter"),
|
|
4362
|
+
limit: z35.coerce.number().int().min(1).max(100).optional().describe("Max results"),
|
|
4363
|
+
scope: z35.enum(["raw", "wiki", "memory", "gateway", "all"]).optional().describe("Company Brain scope"),
|
|
4364
|
+
source: z35.string().optional().describe("Company Brain raw event source filter"),
|
|
4365
|
+
auth_token: z35.string().optional().describe("GoTrue JWT for user authentication"),
|
|
4366
|
+
user_id: z35.string().optional().describe("GoTrue user ID (admin lookup fallback)")
|
|
4304
4367
|
}
|
|
4305
4368
|
}, async (input, extra) => {
|
|
4306
4369
|
const action = input.action;
|
|
@@ -4339,10 +4402,10 @@ function registerGateway(server) {
|
|
|
4339
4402
|
}
|
|
4340
4403
|
|
|
4341
4404
|
// src/mcp/tools/graph.ts
|
|
4342
|
-
import { z as
|
|
4405
|
+
import { z as z42 } from "zod";
|
|
4343
4406
|
|
|
4344
4407
|
// src/mcp/tools/get-entity-neighbors.ts
|
|
4345
|
-
import { z as
|
|
4408
|
+
import { z as z36 } from "zod";
|
|
4346
4409
|
function registerGetEntityNeighbors(server) {
|
|
4347
4410
|
server.registerTool(
|
|
4348
4411
|
"get_entity_neighbors",
|
|
@@ -4350,8 +4413,8 @@ function registerGetEntityNeighbors(server) {
|
|
|
4350
4413
|
title: "Get Entity Neighbors",
|
|
4351
4414
|
description: "Get connected entities for a given entity name. Returns neighbors with relationship types, directions, and weights.",
|
|
4352
4415
|
inputSchema: {
|
|
4353
|
-
entity_name:
|
|
4354
|
-
as_of:
|
|
4416
|
+
entity_name: z36.string().describe("Name of the entity to find neighbors for"),
|
|
4417
|
+
as_of: z36.string().optional().describe("ISO 8601 timestamp for time-travel. Returns only relationships valid at that point in time.")
|
|
4355
4418
|
}
|
|
4356
4419
|
},
|
|
4357
4420
|
async ({ entity_name, as_of }) => {
|
|
@@ -4419,7 +4482,7 @@ function registerGetEntityNeighbors(server) {
|
|
|
4419
4482
|
}
|
|
4420
4483
|
|
|
4421
4484
|
// src/mcp/tools/get-hot-entities.ts
|
|
4422
|
-
import { z as
|
|
4485
|
+
import { z as z37 } from "zod";
|
|
4423
4486
|
var PERIOD_MS = {
|
|
4424
4487
|
"24h": 24 * 60 * 60 * 1e3,
|
|
4425
4488
|
"7d": 7 * 24 * 60 * 60 * 1e3,
|
|
@@ -4432,8 +4495,8 @@ function registerGetHotEntities(server) {
|
|
|
4432
4495
|
title: "Get Hot Entities",
|
|
4433
4496
|
description: "Get trending entities \u2014 those with the most new relationships in a time period. Surfaces what's most active in the knowledge graph.",
|
|
4434
4497
|
inputSchema: {
|
|
4435
|
-
period:
|
|
4436
|
-
limit:
|
|
4498
|
+
period: z37.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to look back"),
|
|
4499
|
+
limit: z37.number().int().min(1).max(50).default(10).describe("Max entities to return")
|
|
4437
4500
|
}
|
|
4438
4501
|
},
|
|
4439
4502
|
async ({ period, limit, since: sinceInput }) => {
|
|
@@ -4488,7 +4551,7 @@ function registerGetHotEntities(server) {
|
|
|
4488
4551
|
}
|
|
4489
4552
|
|
|
4490
4553
|
// src/mcp/tools/get-graph-stats.ts
|
|
4491
|
-
import { z as
|
|
4554
|
+
import { z as z38 } from "zod";
|
|
4492
4555
|
function registerGetGraphStats(server) {
|
|
4493
4556
|
server.registerTool(
|
|
4494
4557
|
"get_graph_stats",
|
|
@@ -4496,7 +4559,7 @@ function registerGetGraphStats(server) {
|
|
|
4496
4559
|
title: "Get Graph Stats",
|
|
4497
4560
|
description: "Get knowledge graph summary statistics: entity count, relationship count, and entity type breakdown.",
|
|
4498
4561
|
inputSchema: {
|
|
4499
|
-
_dummy:
|
|
4562
|
+
_dummy: z38.string().optional().describe("Unused \u2014 no input required")
|
|
4500
4563
|
}
|
|
4501
4564
|
},
|
|
4502
4565
|
async () => {
|
|
@@ -4536,7 +4599,7 @@ function registerGetGraphStats(server) {
|
|
|
4536
4599
|
}
|
|
4537
4600
|
|
|
4538
4601
|
// src/mcp/tools/export-graph.ts
|
|
4539
|
-
import { z as
|
|
4602
|
+
import { z as z39 } from "zod";
|
|
4540
4603
|
function registerExportGraph(server) {
|
|
4541
4604
|
server.registerTool(
|
|
4542
4605
|
"export_graph",
|
|
@@ -4544,7 +4607,7 @@ function registerExportGraph(server) {
|
|
|
4544
4607
|
title: "Export Graph",
|
|
4545
4608
|
description: "Export the knowledge graph as a markdown report (inline) or an interactive HTML visualization (writes file, returns path).",
|
|
4546
4609
|
inputSchema: {
|
|
4547
|
-
format:
|
|
4610
|
+
format: z39.enum(["html", "markdown"]).default("markdown").describe("Export format: markdown (inline) or html (file)")
|
|
4548
4611
|
}
|
|
4549
4612
|
},
|
|
4550
4613
|
async ({ format: format2 }) => {
|
|
@@ -4593,7 +4656,7 @@ Open in a browser to explore interactively.`
|
|
|
4593
4656
|
}
|
|
4594
4657
|
|
|
4595
4658
|
// src/mcp/tools/merge-entities.ts
|
|
4596
|
-
import { z as
|
|
4659
|
+
import { z as z40 } from "zod";
|
|
4597
4660
|
function registerMergeEntities(server) {
|
|
4598
4661
|
server.registerTool(
|
|
4599
4662
|
"merge_entities",
|
|
@@ -4601,10 +4664,10 @@ function registerMergeEntities(server) {
|
|
|
4601
4664
|
title: "Merge Entities",
|
|
4602
4665
|
description: 'Merge duplicate GraphRAG entities. Moves all relationships and memory links from source to target entity, registers source name as alias, deletes source. Use when "Lenny" and "Leonard" should be the same entity.',
|
|
4603
4666
|
inputSchema: {
|
|
4604
|
-
source_name:
|
|
4605
|
-
source_type:
|
|
4606
|
-
target_name:
|
|
4607
|
-
target_type:
|
|
4667
|
+
source_name: z40.string().describe("Name of the entity to merge FROM (will be deleted)"),
|
|
4668
|
+
source_type: z40.string().describe('Entity type (e.g., "person", "company", "product")'),
|
|
4669
|
+
target_name: z40.string().describe("Name of the entity to merge INTO (will be kept)"),
|
|
4670
|
+
target_type: z40.string().describe("Entity type of the target")
|
|
4608
4671
|
}
|
|
4609
4672
|
},
|
|
4610
4673
|
async ({ source_name, source_type, target_name, target_type }) => {
|
|
@@ -4649,7 +4712,7 @@ function registerMergeEntities(server) {
|
|
|
4649
4712
|
}
|
|
4650
4713
|
|
|
4651
4714
|
// src/mcp/tools/find-similar-trajectories.ts
|
|
4652
|
-
import { z as
|
|
4715
|
+
import { z as z41 } from "zod";
|
|
4653
4716
|
function registerFindSimilarTrajectories(server) {
|
|
4654
4717
|
server.registerTool(
|
|
4655
4718
|
"find_similar_trajectories",
|
|
@@ -4657,7 +4720,7 @@ function registerFindSimilarTrajectories(server) {
|
|
|
4657
4720
|
title: "Find Similar Trajectories",
|
|
4658
4721
|
description: 'Find past task trajectories that match a described tool sequence. Input a comma-separated tool sequence (e.g. "Read, Edit, Bash, Read") to find similar past workflows.',
|
|
4659
4722
|
inputSchema: {
|
|
4660
|
-
description:
|
|
4723
|
+
description: z41.string().describe(
|
|
4661
4724
|
'Tool sequence to match \u2014 comma-separated tool names (e.g. "Read, Grep, Edit, Bash:npm, Bash:git")'
|
|
4662
4725
|
)
|
|
4663
4726
|
}
|
|
@@ -4761,24 +4824,24 @@ function registerGraph(server) {
|
|
|
4761
4824
|
title: "Graph",
|
|
4762
4825
|
description: "Consolidated GraphRAG tool. Actions: query_relationships, entity_neighbors, hot_entities, stats, export, merge_entities, similar_trajectories.",
|
|
4763
4826
|
inputSchema: {
|
|
4764
|
-
action:
|
|
4765
|
-
query:
|
|
4766
|
-
entity:
|
|
4767
|
-
entity_id:
|
|
4768
|
-
from_entity:
|
|
4769
|
-
to_entity:
|
|
4770
|
-
source_id:
|
|
4771
|
-
target_id:
|
|
4772
|
-
entity_type:
|
|
4773
|
-
project_name:
|
|
4774
|
-
relationship_type:
|
|
4775
|
-
since:
|
|
4776
|
-
as_of:
|
|
4777
|
-
limit:
|
|
4778
|
-
depth:
|
|
4779
|
-
output_path:
|
|
4780
|
-
format:
|
|
4781
|
-
min_count:
|
|
4827
|
+
action: z42.enum(["query_relationships", "entity_neighbors", "hot_entities", "stats", "export", "merge_entities", "similar_trajectories"]).describe("Graph operation"),
|
|
4828
|
+
query: z42.string().optional().describe("Query text for relationship or trajectory search"),
|
|
4829
|
+
entity: z42.string().optional().describe("Entity name for entity_neighbors"),
|
|
4830
|
+
entity_id: z42.string().optional().describe("Entity id for entity_neighbors/merge"),
|
|
4831
|
+
from_entity: z42.string().optional().describe("Source entity for relationship query"),
|
|
4832
|
+
to_entity: z42.string().optional().describe("Target entity for relationship query"),
|
|
4833
|
+
source_id: z42.string().optional().describe("Source entity id for merge_entities"),
|
|
4834
|
+
target_id: z42.string().optional().describe("Target entity id for merge_entities"),
|
|
4835
|
+
entity_type: z42.string().optional().describe("Entity type filter"),
|
|
4836
|
+
project_name: z42.string().optional().describe("Project filter"),
|
|
4837
|
+
relationship_type: z42.string().optional().describe("Relationship type filter"),
|
|
4838
|
+
since: z42.string().optional().describe("ISO lower-bound timestamp"),
|
|
4839
|
+
as_of: z42.string().optional().describe("ISO 8601 timestamp for time-travel queries. Returns relationships valid at that point in time. Omit for current relationships only."),
|
|
4840
|
+
limit: z42.coerce.number().int().min(1).max(200).optional().describe("Result limit"),
|
|
4841
|
+
depth: z42.coerce.number().int().min(1).max(3).optional().describe("Neighbor traversal depth"),
|
|
4842
|
+
output_path: z42.string().optional().describe("Path for export_graph output"),
|
|
4843
|
+
format: z42.enum(["json", "graphml"]).optional().describe("Export format"),
|
|
4844
|
+
min_count: z42.coerce.number().int().min(1).optional().describe("Minimum count for hot_entities")
|
|
4782
4845
|
}
|
|
4783
4846
|
}, async (input, extra) => {
|
|
4784
4847
|
const action = input.action;
|
|
@@ -4804,10 +4867,10 @@ function registerGraph(server) {
|
|
|
4804
4867
|
}
|
|
4805
4868
|
|
|
4806
4869
|
// src/mcp/tools/config.ts
|
|
4807
|
-
import { z as
|
|
4870
|
+
import { z as z69 } from "zod";
|
|
4808
4871
|
|
|
4809
4872
|
// src/mcp/tools/set-agent-config.ts
|
|
4810
|
-
import { z as
|
|
4873
|
+
import { z as z43 } from "zod";
|
|
4811
4874
|
function registerSetAgentConfig(server) {
|
|
4812
4875
|
server.registerTool(
|
|
4813
4876
|
"set_agent_config",
|
|
@@ -4815,11 +4878,11 @@ function registerSetAgentConfig(server) {
|
|
|
4815
4878
|
title: "Set Agent Config",
|
|
4816
4879
|
description: "Set or view per-agent runtime, model, and MCP configuration. Controls which runtime (claude, codex, opencode), model, and MCP servers each agent uses when dispatched. COO-only. Omit runtime/model to view current config for an agent or all agents. Pass mcps to restrict which MCP servers an agent loads (exe-os always included).",
|
|
4817
4880
|
inputSchema: {
|
|
4818
|
-
agent_id:
|
|
4819
|
-
runtime:
|
|
4820
|
-
model:
|
|
4821
|
-
reasoning_effort:
|
|
4822
|
-
mcps:
|
|
4881
|
+
agent_id: z43.string().optional().describe("Agent name, or 'default' for org-wide default. Omit to view all agents."),
|
|
4882
|
+
runtime: z43.string().optional().describe(`Runtime: ${Object.keys(KNOWN_RUNTIMES).join(", ")}`),
|
|
4883
|
+
model: z43.string().optional().describe("Model name (e.g. claude-opus-4, gpt-5.4, anthropic/claude-sonnet-4-6)"),
|
|
4884
|
+
reasoning_effort: z43.string().optional().describe("Codex reasoning effort: low, medium, high, xhigh. Per-agent override for thinking/reasoning depth."),
|
|
4885
|
+
mcps: z43.array(z43.string()).optional().describe("MCP server allowlist. Only these servers load for this agent. exe-os always included. Omit to load all MCPs.")
|
|
4823
4886
|
}
|
|
4824
4887
|
},
|
|
4825
4888
|
async ({ agent_id, runtime, model, reasoning_effort, mcps }) => {
|
|
@@ -4936,7 +4999,7 @@ function registerSetAgentConfig(server) {
|
|
|
4936
4999
|
}
|
|
4937
5000
|
|
|
4938
5001
|
// src/mcp/tools/list-employees.ts
|
|
4939
|
-
import { z as
|
|
5002
|
+
import { z as z44 } from "zod";
|
|
4940
5003
|
function registerListEmployees(server) {
|
|
4941
5004
|
server.registerTool(
|
|
4942
5005
|
"list_employees",
|
|
@@ -4944,7 +5007,7 @@ function registerListEmployees(server) {
|
|
|
4944
5007
|
title: "List Employees",
|
|
4945
5008
|
description: "List all AI employees in the organization with their role, runtime, and model configuration. Use to see who's on the team and how they're configured.",
|
|
4946
5009
|
inputSchema: {
|
|
4947
|
-
role:
|
|
5010
|
+
role: z44.string().optional().describe("Filter by role (case-insensitive)")
|
|
4948
5011
|
}
|
|
4949
5012
|
},
|
|
4950
5013
|
async ({ role }) => {
|
|
@@ -5000,7 +5063,7 @@ function registerListEmployees(server) {
|
|
|
5000
5063
|
}
|
|
5001
5064
|
|
|
5002
5065
|
// src/mcp/tools/get-agent-spend.ts
|
|
5003
|
-
import { z as
|
|
5066
|
+
import { z as z45 } from "zod";
|
|
5004
5067
|
function estimateCost(input, output, cacheRead) {
|
|
5005
5068
|
const inputCost = input / 1e6 * 15;
|
|
5006
5069
|
const outputCost = output / 1e6 * 75;
|
|
@@ -5014,8 +5077,8 @@ function registerGetAgentSpend(server) {
|
|
|
5014
5077
|
title: "Get Agent Spend",
|
|
5015
5078
|
description: "Get per-agent token spend attribution. Shows input, output, and cache tokens consumed by each agent over a time period, with estimated cost.",
|
|
5016
5079
|
inputSchema: {
|
|
5017
|
-
period:
|
|
5018
|
-
agent_id:
|
|
5080
|
+
period: z45.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to query"),
|
|
5081
|
+
agent_id: z45.string().optional().describe("Filter to a specific agent (e.g. 'tom', 'yoshi')")
|
|
5019
5082
|
}
|
|
5020
5083
|
},
|
|
5021
5084
|
async ({ period, agent_id }) => {
|
|
@@ -5079,7 +5142,7 @@ function registerGetAgentSpend(server) {
|
|
|
5079
5142
|
}
|
|
5080
5143
|
|
|
5081
5144
|
// src/mcp/tools/list-agent-sessions.ts
|
|
5082
|
-
import { z as
|
|
5145
|
+
import { z as z46 } from "zod";
|
|
5083
5146
|
function registerListAgentSessions(server) {
|
|
5084
5147
|
server.registerTool(
|
|
5085
5148
|
"list_agent_sessions",
|
|
@@ -5087,7 +5150,7 @@ function registerListAgentSessions(server) {
|
|
|
5087
5150
|
title: "List Agent Sessions",
|
|
5088
5151
|
description: "List all registered agent sessions with their agent ID, project, PID, and registration time.",
|
|
5089
5152
|
inputSchema: {
|
|
5090
|
-
_placeholder:
|
|
5153
|
+
_placeholder: z46.string().optional().describe("No input required")
|
|
5091
5154
|
}
|
|
5092
5155
|
},
|
|
5093
5156
|
async () => {
|
|
@@ -5133,7 +5196,7 @@ function registerListAgentSessions(server) {
|
|
|
5133
5196
|
}
|
|
5134
5197
|
|
|
5135
5198
|
// src/mcp/tools/get-session-kills.ts
|
|
5136
|
-
import { z as
|
|
5199
|
+
import { z as z47 } from "zod";
|
|
5137
5200
|
var PERIOD_MS2 = {
|
|
5138
5201
|
"24h": 24 * 60 * 60 * 1e3,
|
|
5139
5202
|
"7d": 7 * 24 * 60 * 60 * 1e3,
|
|
@@ -5149,7 +5212,7 @@ function registerGetSessionKills(server) {
|
|
|
5149
5212
|
title: "Get Session Kills",
|
|
5150
5213
|
description: "Get session kill telemetry: how many idle/TTL sessions were killed, tokens saved, and estimated cost savings over a time period.",
|
|
5151
5214
|
inputSchema: {
|
|
5152
|
-
period:
|
|
5215
|
+
period: z47.enum(["24h", "7d", "30d"]).default("7d").describe("Time period to query")
|
|
5153
5216
|
}
|
|
5154
5217
|
},
|
|
5155
5218
|
async ({ period }) => {
|
|
@@ -5188,7 +5251,7 @@ function registerGetSessionKills(server) {
|
|
|
5188
5251
|
}
|
|
5189
5252
|
|
|
5190
5253
|
// src/mcp/tools/get-daemon-health.ts
|
|
5191
|
-
import { z as
|
|
5254
|
+
import { z as z48 } from "zod";
|
|
5192
5255
|
|
|
5193
5256
|
// src/lib/mcp-health.ts
|
|
5194
5257
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
|
@@ -5223,7 +5286,7 @@ function registerGetDaemonHealth(server) {
|
|
|
5223
5286
|
title: "Get Daemon Health",
|
|
5224
5287
|
description: "Check the embedding daemon (exed) health: whether it's running, its PID, uptime, and requests served.",
|
|
5225
5288
|
inputSchema: {
|
|
5226
|
-
_placeholder:
|
|
5289
|
+
_placeholder: z48.string().optional().describe("No input required")
|
|
5227
5290
|
}
|
|
5228
5291
|
},
|
|
5229
5292
|
async () => {
|
|
@@ -5302,7 +5365,7 @@ function registerGetDaemonHealth(server) {
|
|
|
5302
5365
|
}
|
|
5303
5366
|
|
|
5304
5367
|
// src/mcp/tools/mcp-ping.ts
|
|
5305
|
-
import { z as
|
|
5368
|
+
import { z as z49 } from "zod";
|
|
5306
5369
|
function registerMcpPing(server) {
|
|
5307
5370
|
server.registerTool(
|
|
5308
5371
|
"mcp_ping",
|
|
@@ -5310,7 +5373,7 @@ function registerMcpPing(server) {
|
|
|
5310
5373
|
title: "MCP Ping",
|
|
5311
5374
|
description: "Safe local MCP synthetic probe: daemon liveness plus privacy-safe transport/session summary.",
|
|
5312
5375
|
inputSchema: {
|
|
5313
|
-
_placeholder:
|
|
5376
|
+
_placeholder: z49.string().optional().describe("No input required")
|
|
5314
5377
|
}
|
|
5315
5378
|
},
|
|
5316
5379
|
async () => {
|
|
@@ -5343,7 +5406,7 @@ function registerMcpPing(server) {
|
|
|
5343
5406
|
}
|
|
5344
5407
|
|
|
5345
5408
|
// src/mcp/tools/get-auto-wake-status.ts
|
|
5346
|
-
import { z as
|
|
5409
|
+
import { z as z50 } from "zod";
|
|
5347
5410
|
function registerGetAutoWakeStatus(server) {
|
|
5348
5411
|
server.registerTool(
|
|
5349
5412
|
"get_auto_wake_status",
|
|
@@ -5351,7 +5414,7 @@ function registerGetAutoWakeStatus(server) {
|
|
|
5351
5414
|
title: "Get Auto-Wake Status",
|
|
5352
5415
|
description: "Check auto-wake status: orphaned tasks (assigned agent has no running session), tasks blocked by auto-wake retry limit, and session activity.",
|
|
5353
5416
|
inputSchema: {
|
|
5354
|
-
_placeholder:
|
|
5417
|
+
_placeholder: z50.string().optional().describe("No input required")
|
|
5355
5418
|
}
|
|
5356
5419
|
},
|
|
5357
5420
|
async () => {
|
|
@@ -5430,7 +5493,7 @@ function registerGetAutoWakeStatus(server) {
|
|
|
5430
5493
|
}
|
|
5431
5494
|
|
|
5432
5495
|
// src/mcp/tools/get-worker-gate.ts
|
|
5433
|
-
import { z as
|
|
5496
|
+
import { z as z51 } from "zod";
|
|
5434
5497
|
import { readdirSync, existsSync as existsSync3 } from "fs";
|
|
5435
5498
|
import path4 from "path";
|
|
5436
5499
|
var WORKER_PID_DIR = path4.join(EXE_AI_DIR, "worker-pids");
|
|
@@ -5477,7 +5540,7 @@ async function getAgentSessionLoad() {
|
|
|
5477
5540
|
return { sessions: [], totalLive: 0, busySessions: 0, idleSessions: 0 };
|
|
5478
5541
|
}
|
|
5479
5542
|
const { getClient: getClient2 } = await import("./lib/database.js");
|
|
5480
|
-
const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-
|
|
5543
|
+
const { sessionScopeFilter: sessionScopeFilter2 } = await import("./task-scope-ODSOEGTH.js");
|
|
5481
5544
|
const client = getClient2();
|
|
5482
5545
|
const scope = sessionScopeFilter2();
|
|
5483
5546
|
for (const s of liveAgentSessions) {
|
|
@@ -5508,7 +5571,7 @@ function registerGetWorkerGate(server) {
|
|
|
5508
5571
|
title: "Get Worker Gate",
|
|
5509
5572
|
description: "Check worker concurrency gate and agent session utilization. Reports embed/summary worker slots AND live agent sessions with task load. Idle sessions (alive tmux, zero tasks) are excluded from the effective session count \u2014 they should not block new dispatches.",
|
|
5510
5573
|
inputSchema: {
|
|
5511
|
-
_placeholder:
|
|
5574
|
+
_placeholder: z51.string().optional().describe("No input required")
|
|
5512
5575
|
}
|
|
5513
5576
|
},
|
|
5514
5577
|
async () => {
|
|
@@ -5565,7 +5628,7 @@ function registerGetWorkerGate(server) {
|
|
|
5565
5628
|
}
|
|
5566
5629
|
|
|
5567
5630
|
// src/mcp/tools/run-memory-audit.ts
|
|
5568
|
-
import { z as
|
|
5631
|
+
import { z as z52 } from "zod";
|
|
5569
5632
|
function registerRunMemoryAudit(server) {
|
|
5570
5633
|
server.registerTool(
|
|
5571
5634
|
"run_memory_audit",
|
|
@@ -5573,10 +5636,10 @@ function registerRunMemoryAudit(server) {
|
|
|
5573
5636
|
title: "Run Memory Audit",
|
|
5574
5637
|
description: "Run a memory health audit: total counts, per-agent breakdown, null vectors, duplicates, FTS sync status, bloated records, and conflict detection (contradictory/superseded memories). Pass fix=true to apply repairs (delete duplicates, chunk bloated records, rebuild FTS, archive unreadable shards).",
|
|
5575
5638
|
inputSchema: {
|
|
5576
|
-
agent_id:
|
|
5577
|
-
project_name:
|
|
5578
|
-
fix:
|
|
5579
|
-
dry_run:
|
|
5639
|
+
agent_id: z52.string().optional().describe("Filter audit to a specific agent"),
|
|
5640
|
+
project_name: z52.string().optional().describe("Filter audit to a specific project"),
|
|
5641
|
+
fix: z52.boolean().optional().default(false).describe("Apply fixes: delete duplicates, chunk bloated records, rebuild FTS, archive shards"),
|
|
5642
|
+
dry_run: z52.boolean().optional().default(false).describe("Preview fixes without applying them")
|
|
5580
5643
|
}
|
|
5581
5644
|
},
|
|
5582
5645
|
async ({ agent_id, project_name, fix, dry_run }) => {
|
|
@@ -5666,7 +5729,7 @@ ${mode} Complete.`);
|
|
|
5666
5729
|
}
|
|
5667
5730
|
|
|
5668
5731
|
// src/mcp/tools/run-consolidation.ts
|
|
5669
|
-
import { z as
|
|
5732
|
+
import { z as z53 } from "zod";
|
|
5670
5733
|
function registerRunConsolidation(server) {
|
|
5671
5734
|
server.registerTool(
|
|
5672
5735
|
"run_consolidation",
|
|
@@ -5674,7 +5737,7 @@ function registerRunConsolidation(server) {
|
|
|
5674
5737
|
title: "Run Consolidation",
|
|
5675
5738
|
description: "Run memory consolidation \u2014 synthesizes unconsolidated memories into meta-insights. Use dry_run=true (default) to preview without executing.",
|
|
5676
5739
|
inputSchema: {
|
|
5677
|
-
dry_run:
|
|
5740
|
+
dry_run: z53.boolean().default(true).describe("Preview mode \u2014 show what would be consolidated without doing it")
|
|
5678
5741
|
}
|
|
5679
5742
|
},
|
|
5680
5743
|
async ({ dry_run }) => {
|
|
@@ -5742,7 +5805,7 @@ function registerRunConsolidation(server) {
|
|
|
5742
5805
|
}
|
|
5743
5806
|
|
|
5744
5807
|
// src/mcp/tools/cloud-sync.ts
|
|
5745
|
-
import { z as
|
|
5808
|
+
import { z as z54 } from "zod";
|
|
5746
5809
|
function result(text3, isError = false) {
|
|
5747
5810
|
return { content: [{ type: "text", text: text3 }], ...isError ? { isError: true } : {} };
|
|
5748
5811
|
}
|
|
@@ -5823,9 +5886,9 @@ function registerCloudSync(server) {
|
|
|
5823
5886
|
title: "Cloud Sync",
|
|
5824
5887
|
description: "Consolidated Exe Cloud tool. Supports read-only status, normal sync-now, and explicitly confirmed post-key-rotation re-upload. Does not reveal recovery phrases and does not rotate keys.",
|
|
5825
5888
|
inputSchema: {
|
|
5826
|
-
action:
|
|
5827
|
-
force:
|
|
5828
|
-
confirm_local_db_source_of_truth:
|
|
5889
|
+
action: z54.enum(["status", "sync", "reupload"]).default("sync").describe("Cloud operation. status is read-only; sync is normal sync-now; reupload repairs cloud after key rotation."),
|
|
5890
|
+
force: z54.boolean().default(false).describe("Reserved for sync compatibility; normal cloud sync already runs when requested."),
|
|
5891
|
+
confirm_local_db_source_of_truth: z54.string().optional().describe('Required for action=reupload. Must exactly equal "LOCAL DB IS SOURCE OF TRUTH".')
|
|
5829
5892
|
}
|
|
5830
5893
|
},
|
|
5831
5894
|
async ({ action = "sync", confirm_local_db_source_of_truth }) => {
|
|
@@ -5897,7 +5960,7 @@ function registerCloudSync(server) {
|
|
|
5897
5960
|
}
|
|
5898
5961
|
|
|
5899
5962
|
// src/mcp/tools/orchestration-phase.ts
|
|
5900
|
-
import { z as
|
|
5963
|
+
import { z as z55 } from "zod";
|
|
5901
5964
|
function render(info, prefix) {
|
|
5902
5965
|
return [
|
|
5903
5966
|
prefix,
|
|
@@ -5916,8 +5979,8 @@ function registerOrchestrationPhase(server) {
|
|
|
5916
5979
|
title: "Orchestration Phase",
|
|
5917
5980
|
description: "View or change the customer-owned orchestration maturity phase. MCP parity for `exe-os org phase`, `exe-os org unlock executives`, and `exe-os org unlock parallel`. This is a recommendation layer, not a blocker; it never exposes recovery phrases or secrets.",
|
|
5918
5981
|
inputSchema: {
|
|
5919
|
-
action:
|
|
5920
|
-
phase:
|
|
5982
|
+
action: z55.enum(["status", "set", "unlock_executives", "unlock_parallel"]).default("status"),
|
|
5983
|
+
phase: z55.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Phase to set when action='set'.")
|
|
5921
5984
|
}
|
|
5922
5985
|
},
|
|
5923
5986
|
async ({ action = "status", phase }) => {
|
|
@@ -5957,7 +6020,7 @@ function registerOrchestrationPhase(server) {
|
|
|
5957
6020
|
}
|
|
5958
6021
|
|
|
5959
6022
|
// src/mcp/tools/backup-vps.ts
|
|
5960
|
-
import { z as
|
|
6023
|
+
import { z as z56 } from "zod";
|
|
5961
6024
|
|
|
5962
6025
|
// src/lib/vps-backup.ts
|
|
5963
6026
|
import { createCipheriv, createDecipheriv, randomBytes } from "crypto";
|
|
@@ -6282,43 +6345,43 @@ function registerBackupVps(server) {
|
|
|
6282
6345
|
{
|
|
6283
6346
|
title: "VPS Backup",
|
|
6284
6347
|
description: "Run VPS Postgres backup/restore workflows and check status.",
|
|
6285
|
-
inputSchema:
|
|
6286
|
-
|
|
6287
|
-
action:
|
|
6288
|
-
databaseUrl:
|
|
6289
|
-
encryptionKeyB64:
|
|
6348
|
+
inputSchema: z56.discriminatedUnion("action", [
|
|
6349
|
+
z56.object({
|
|
6350
|
+
action: z56.literal("backup"),
|
|
6351
|
+
databaseUrl: z56.string().min(1).describe("Postgres DATABASE_URL to dump from"),
|
|
6352
|
+
encryptionKeyB64: z56.string().min(1).max(4096).optional().describe(
|
|
6290
6353
|
"Base64 AES-256 key (defaults to local master key if omitted)"
|
|
6291
6354
|
),
|
|
6292
|
-
r2Bucket:
|
|
6293
|
-
r2Endpoint:
|
|
6294
|
-
r2AccessKeyId:
|
|
6295
|
-
r2SecretAccessKey:
|
|
6355
|
+
r2Bucket: z56.string().min(1).describe("R2 bucket name"),
|
|
6356
|
+
r2Endpoint: z56.string().min(1).describe("R2 endpoint URL"),
|
|
6357
|
+
r2AccessKeyId: z56.string().min(1).describe("R2 access key ID"),
|
|
6358
|
+
r2SecretAccessKey: z56.string().min(1).describe("R2 secret access key")
|
|
6296
6359
|
}),
|
|
6297
|
-
|
|
6298
|
-
action:
|
|
6299
|
-
databaseUrl:
|
|
6300
|
-
backupKey:
|
|
6301
|
-
encryptionKeyB64:
|
|
6360
|
+
z56.object({
|
|
6361
|
+
action: z56.literal("restore"),
|
|
6362
|
+
databaseUrl: z56.string().min(1).describe("Target Postgres DATABASE_URL for restore"),
|
|
6363
|
+
backupKey: z56.string().min(1).describe("R2 object key to restore from"),
|
|
6364
|
+
encryptionKeyB64: z56.string().min(1).max(4096).optional().describe(
|
|
6302
6365
|
"Base64 AES-256 key (defaults to local master key if omitted)"
|
|
6303
6366
|
),
|
|
6304
|
-
r2Bucket:
|
|
6305
|
-
r2Endpoint:
|
|
6306
|
-
r2AccessKeyId:
|
|
6307
|
-
r2SecretAccessKey:
|
|
6367
|
+
r2Bucket: z56.string().min(1).describe("R2 bucket name"),
|
|
6368
|
+
r2Endpoint: z56.string().min(1).describe("R2 endpoint URL"),
|
|
6369
|
+
r2AccessKeyId: z56.string().min(1).describe("R2 access key ID"),
|
|
6370
|
+
r2SecretAccessKey: z56.string().min(1).describe("R2 secret access key")
|
|
6308
6371
|
}),
|
|
6309
|
-
|
|
6310
|
-
action:
|
|
6311
|
-
r2Bucket:
|
|
6312
|
-
r2Endpoint:
|
|
6313
|
-
r2AccessKeyId:
|
|
6314
|
-
r2SecretAccessKey:
|
|
6372
|
+
z56.object({
|
|
6373
|
+
action: z56.literal("list"),
|
|
6374
|
+
r2Bucket: z56.string().min(1).describe("R2 bucket name"),
|
|
6375
|
+
r2Endpoint: z56.string().min(1).describe("R2 endpoint URL"),
|
|
6376
|
+
r2AccessKeyId: z56.string().min(1).describe("R2 access key ID"),
|
|
6377
|
+
r2SecretAccessKey: z56.string().min(1).describe("R2 secret access key")
|
|
6315
6378
|
}),
|
|
6316
|
-
|
|
6317
|
-
action:
|
|
6318
|
-
r2Bucket:
|
|
6319
|
-
r2Endpoint:
|
|
6320
|
-
r2AccessKeyId:
|
|
6321
|
-
r2SecretAccessKey:
|
|
6379
|
+
z56.object({
|
|
6380
|
+
action: z56.literal("health"),
|
|
6381
|
+
r2Bucket: z56.string().min(1).describe("R2 bucket name"),
|
|
6382
|
+
r2Endpoint: z56.string().min(1).describe("R2 endpoint URL"),
|
|
6383
|
+
r2AccessKeyId: z56.string().min(1).describe("R2 access key ID"),
|
|
6384
|
+
r2SecretAccessKey: z56.string().min(1).describe("R2 secret access key")
|
|
6322
6385
|
})
|
|
6323
6386
|
])
|
|
6324
6387
|
},
|
|
@@ -6456,7 +6519,7 @@ async function resolveEncryptionKey(providedB64) {
|
|
|
6456
6519
|
}
|
|
6457
6520
|
|
|
6458
6521
|
// src/mcp/tools/deploy-client.ts
|
|
6459
|
-
import { z as
|
|
6522
|
+
import { z as z57 } from "zod";
|
|
6460
6523
|
import { execFile } from "child_process";
|
|
6461
6524
|
import { promisify } from "util";
|
|
6462
6525
|
import path5 from "path";
|
|
@@ -6629,12 +6692,12 @@ function registerDeployClient(server) {
|
|
|
6629
6692
|
title: "Deploy Client",
|
|
6630
6693
|
description: "Provision a Hostinger VPS and deploy exe-os for a client. Creates VPS, waits for ready state, runs Ansible playbook, verifies health.",
|
|
6631
6694
|
inputSchema: {
|
|
6632
|
-
client_name:
|
|
6633
|
-
domain:
|
|
6634
|
-
region:
|
|
6635
|
-
plan:
|
|
6636
|
-
ssl_email:
|
|
6637
|
-
user_id:
|
|
6695
|
+
client_name: z57.string().min(1).describe("Client name (used for hostname and identification)"),
|
|
6696
|
+
domain: z57.string().min(1).describe("Domain name for the deployment (e.g., client.exe.ai)"),
|
|
6697
|
+
region: z57.string().default("jakarta").describe("VPS region (default: jakarta)"),
|
|
6698
|
+
plan: z57.string().default("kvm-2").describe("Hostinger VPS plan (default: kvm-2)"),
|
|
6699
|
+
ssl_email: z57.string().email().describe("Email for Let's Encrypt SSL certificate"),
|
|
6700
|
+
user_id: z57.string().min(1).describe("User/customer ID for inventory tracking")
|
|
6638
6701
|
}
|
|
6639
6702
|
},
|
|
6640
6703
|
async ({ client_name, domain, region, plan, ssl_email, user_id }) => {
|
|
@@ -6795,7 +6858,7 @@ function buildInventoryRecord(params) {
|
|
|
6795
6858
|
}
|
|
6796
6859
|
|
|
6797
6860
|
// src/mcp/tools/get-license-status.ts
|
|
6798
|
-
import { z as
|
|
6861
|
+
import { z as z58 } from "zod";
|
|
6799
6862
|
var FEATURES = [
|
|
6800
6863
|
"cloud_sync",
|
|
6801
6864
|
"external_agents",
|
|
@@ -6809,7 +6872,7 @@ function registerGetLicenseStatus(server) {
|
|
|
6809
6872
|
title: "Get License Status",
|
|
6810
6873
|
description: "Get current license status: plan, validity, feature gates, limits, and expiry.",
|
|
6811
6874
|
inputSchema: {
|
|
6812
|
-
_dummy:
|
|
6875
|
+
_dummy: z58.string().optional().describe("Unused \u2014 no input required")
|
|
6813
6876
|
}
|
|
6814
6877
|
},
|
|
6815
6878
|
async () => {
|
|
@@ -6866,7 +6929,7 @@ import path6 from "path";
|
|
|
6866
6929
|
import { randomBytes as randomBytes2, randomUUID } from "crypto";
|
|
6867
6930
|
import { createRequire } from "module";
|
|
6868
6931
|
import { pathToFileURL } from "url";
|
|
6869
|
-
import { z as
|
|
6932
|
+
import { z as z59 } from "zod";
|
|
6870
6933
|
var prismaPromise = null;
|
|
6871
6934
|
function loadPrisma() {
|
|
6872
6935
|
if (!prismaPromise) {
|
|
@@ -6899,10 +6962,10 @@ function registerCreateLicense(server) {
|
|
|
6899
6962
|
title: "Create License",
|
|
6900
6963
|
description: "Generate an exe_sk_* license key for a user. Stores in billing.licenses. Returns the key to give to the customer.",
|
|
6901
6964
|
inputSchema: {
|
|
6902
|
-
email:
|
|
6903
|
-
name:
|
|
6904
|
-
plan:
|
|
6905
|
-
expires_in_days:
|
|
6965
|
+
email: z59.string().email().describe("Customer email address"),
|
|
6966
|
+
name: z59.string().optional().describe("Customer name"),
|
|
6967
|
+
plan: z59.enum(["free", "pro", "team", "agency", "enterprise"]).default("pro").describe("License plan tier"),
|
|
6968
|
+
expires_in_days: z59.number().int().positive().default(365).describe("Days until expiration (default 365)")
|
|
6906
6969
|
}
|
|
6907
6970
|
},
|
|
6908
6971
|
async ({ email, name, plan, expires_in_days }) => {
|
|
@@ -6957,7 +7020,7 @@ import os2 from "os";
|
|
|
6957
7020
|
import path7 from "path";
|
|
6958
7021
|
import { createRequire as createRequire2 } from "module";
|
|
6959
7022
|
import { pathToFileURL as pathToFileURL2 } from "url";
|
|
6960
|
-
import { z as
|
|
7023
|
+
import { z as z60 } from "zod";
|
|
6961
7024
|
var prismaPromise2 = null;
|
|
6962
7025
|
function loadPrisma2() {
|
|
6963
7026
|
if (!prismaPromise2) {
|
|
@@ -6987,7 +7050,7 @@ function registerListLicenses(server) {
|
|
|
6987
7050
|
title: "List Licenses",
|
|
6988
7051
|
description: "List all issued licenses with status (active/expired/revoked). Optionally filter by plan.",
|
|
6989
7052
|
inputSchema: {
|
|
6990
|
-
plan:
|
|
7053
|
+
plan: z60.enum(["free", "pro", "team", "agency", "enterprise"]).optional().describe("Filter by plan tier (omit for all)")
|
|
6991
7054
|
}
|
|
6992
7055
|
},
|
|
6993
7056
|
async ({ plan }) => {
|
|
@@ -7037,7 +7100,7 @@ function registerListLicenses(server) {
|
|
|
7037
7100
|
}
|
|
7038
7101
|
|
|
7039
7102
|
// src/mcp/tools/activate-license.ts
|
|
7040
|
-
import { z as
|
|
7103
|
+
import { z as z61 } from "zod";
|
|
7041
7104
|
function registerActivateLicense(server) {
|
|
7042
7105
|
server.registerTool(
|
|
7043
7106
|
"activate_license",
|
|
@@ -7045,7 +7108,7 @@ function registerActivateLicense(server) {
|
|
|
7045
7108
|
title: "Activate License",
|
|
7046
7109
|
description: "Activate an exe_sk_* license key on this device. Writes to ~/.exe-os/license.key, validates against Postgres, and caches the result.",
|
|
7047
7110
|
inputSchema: {
|
|
7048
|
-
key:
|
|
7111
|
+
key: z61.string().startsWith("exe_sk_").describe("License key (exe_sk_*)")
|
|
7049
7112
|
}
|
|
7050
7113
|
},
|
|
7051
7114
|
async ({ key }) => {
|
|
@@ -7091,15 +7154,15 @@ Key saved to ~/.exe-os/license.key. Device ID: ${deviceId}`);
|
|
|
7091
7154
|
}
|
|
7092
7155
|
|
|
7093
7156
|
// src/mcp/tools/create-trigger.ts
|
|
7094
|
-
import { z as
|
|
7095
|
-
var conditionSchema =
|
|
7096
|
-
field:
|
|
7097
|
-
op:
|
|
7098
|
-
value:
|
|
7157
|
+
import { z as z62 } from "zod";
|
|
7158
|
+
var conditionSchema = z62.object({
|
|
7159
|
+
field: z62.string().describe("Dot-path field to evaluate, e.g., 'stage' or 'amount'"),
|
|
7160
|
+
op: z62.enum(["eq", "neq", "gt", "lt", "gte", "lte", "contains", "not_contains"]).describe("Comparison operator"),
|
|
7161
|
+
value: z62.string().or(z62.number()).or(z62.boolean()).describe("Value to compare against")
|
|
7099
7162
|
});
|
|
7100
|
-
var actionSchema =
|
|
7101
|
-
type:
|
|
7102
|
-
params:
|
|
7163
|
+
var actionSchema = z62.object({
|
|
7164
|
+
type: z62.enum(["send_whatsapp", "send_message", "create_task", "mcp_tool"]).describe("Action type to execute"),
|
|
7165
|
+
params: z62.record(z62.string(), z62.string()).describe(
|
|
7103
7166
|
"Action parameters. Supports {{record.field}} templates for dynamic values."
|
|
7104
7167
|
)
|
|
7105
7168
|
});
|
|
@@ -7110,18 +7173,18 @@ function registerCreateTrigger(server) {
|
|
|
7110
7173
|
title: "Create Trigger",
|
|
7111
7174
|
description: "Create a CRM event trigger or scheduled automation. When matching events occur (e.g., Deal.updated with stage=won), configured actions fire automatically (send_whatsapp, create_task, etc.).",
|
|
7112
7175
|
inputSchema: {
|
|
7113
|
-
name:
|
|
7114
|
-
event:
|
|
7176
|
+
name: z62.string().describe("Human-readable trigger name"),
|
|
7177
|
+
event: z62.string().describe(
|
|
7115
7178
|
'CRM event to match, e.g., "Deal.updated", "Order.created", "*" for all'
|
|
7116
7179
|
),
|
|
7117
|
-
conditions:
|
|
7118
|
-
actions:
|
|
7119
|
-
project:
|
|
7120
|
-
enabled:
|
|
7121
|
-
schedule:
|
|
7180
|
+
conditions: z62.array(conditionSchema).default([]).describe("Conditions that must all match (AND logic)"),
|
|
7181
|
+
actions: z62.array(actionSchema).min(1).describe("Actions to execute when trigger fires"),
|
|
7182
|
+
project: z62.string().optional().describe("Scope trigger to a specific project"),
|
|
7183
|
+
enabled: z62.boolean().default(true).describe("Whether trigger is active"),
|
|
7184
|
+
schedule: z62.string().optional().describe(
|
|
7122
7185
|
'Cron schedule for time-based triggers, e.g., "0 9 * * *" or "Monday 9am"'
|
|
7123
7186
|
),
|
|
7124
|
-
query:
|
|
7187
|
+
query: z62.string().optional().describe(
|
|
7125
7188
|
"CRM GraphQL query to run on schedule (required if schedule is set)"
|
|
7126
7189
|
)
|
|
7127
7190
|
}
|
|
@@ -7201,7 +7264,7 @@ Enabled: ${trigger.enabled}` + scheduleInfo;
|
|
|
7201
7264
|
}
|
|
7202
7265
|
|
|
7203
7266
|
// src/mcp/tools/list-triggers.ts
|
|
7204
|
-
import { z as
|
|
7267
|
+
import { z as z63 } from "zod";
|
|
7205
7268
|
function registerListTriggers(server) {
|
|
7206
7269
|
server.registerTool(
|
|
7207
7270
|
"list_triggers",
|
|
@@ -7209,7 +7272,7 @@ function registerListTriggers(server) {
|
|
|
7209
7272
|
title: "List Triggers",
|
|
7210
7273
|
description: "List configured CRM event triggers and scheduled automations.",
|
|
7211
7274
|
inputSchema: {
|
|
7212
|
-
project:
|
|
7275
|
+
project: z63.string().optional().describe("Filter triggers by project name")
|
|
7213
7276
|
}
|
|
7214
7277
|
},
|
|
7215
7278
|
async ({ project }) => {
|
|
@@ -7244,7 +7307,7 @@ function registerListTriggers(server) {
|
|
|
7244
7307
|
}
|
|
7245
7308
|
|
|
7246
7309
|
// src/mcp/tools/apply-starter-pack.ts
|
|
7247
|
-
import { z as
|
|
7310
|
+
import { z as z64 } from "zod";
|
|
7248
7311
|
|
|
7249
7312
|
// src/automation/starter-packs/index.ts
|
|
7250
7313
|
import { readFileSync as readFileSync3, readdirSync as readdirSync2, existsSync as existsSync5 } from "fs";
|
|
@@ -7426,17 +7489,17 @@ function registerApplyStarterPack(server) {
|
|
|
7426
7489
|
title: "Apply Starter Pack",
|
|
7427
7490
|
description: "Apply an industry starter pack to a project. Sets up CRM custom objects, pre-wired automation triggers, and wiki seed content. When the pack creates a Client COO (e.g. distribution) and agent_name, company_name, founder_name are all provided, also provisions the COO identity, roster entry, and feedback-loop behavior. Available packs: distribution. More coming.",
|
|
7428
7491
|
inputSchema: {
|
|
7429
|
-
industry:
|
|
7492
|
+
industry: z64.string().describe(
|
|
7430
7493
|
'Industry pack to apply (e.g., "distribution"). Use without args to list available packs.'
|
|
7431
7494
|
),
|
|
7432
|
-
project:
|
|
7433
|
-
agent_name:
|
|
7495
|
+
project: z64.string().describe("Project name to scope the triggers to"),
|
|
7496
|
+
agent_name: z64.string().optional().describe(
|
|
7434
7497
|
"Optional. Lowercase alphanumeric name for the Client COO agent. Required (alongside company_name and founder_name) to provision a COO."
|
|
7435
7498
|
),
|
|
7436
|
-
company_name:
|
|
7499
|
+
company_name: z64.string().optional().describe(
|
|
7437
7500
|
"Optional. The client company the COO serves. Required to provision a COO."
|
|
7438
7501
|
),
|
|
7439
|
-
founder_name:
|
|
7502
|
+
founder_name: z64.string().optional().describe(
|
|
7440
7503
|
"Optional. The founder the COO reports to. Required to provision a COO."
|
|
7441
7504
|
)
|
|
7442
7505
|
}
|
|
@@ -7581,7 +7644,7 @@ ${err.message}`
|
|
|
7581
7644
|
}
|
|
7582
7645
|
|
|
7583
7646
|
// src/mcp/tools/load-skill.ts
|
|
7584
|
-
import { z as
|
|
7647
|
+
import { z as z65 } from "zod";
|
|
7585
7648
|
import { readFileSync as readFileSync4, readdirSync as readdirSync3, statSync } from "fs";
|
|
7586
7649
|
import path10 from "path";
|
|
7587
7650
|
import { homedir as homedir3 } from "os";
|
|
@@ -7611,7 +7674,7 @@ function registerLoadSkill(server) {
|
|
|
7611
7674
|
title: "Load Skill",
|
|
7612
7675
|
description: "Load domain-specific guidance into your context. Use when you need specialized knowledge for a task (e.g., load_skill('seo') before doing SEO work, load_skill('code-reviewer') before reviewing code). Pass skill_name='list' to see all available skills.",
|
|
7613
7676
|
inputSchema: {
|
|
7614
|
-
skill_name:
|
|
7677
|
+
skill_name: z65.string().describe(
|
|
7615
7678
|
"Skill to load (e.g. 'seo', 'code-reviewer', 'frontend-design'). Pass 'list' to see all available skills."
|
|
7616
7679
|
)
|
|
7617
7680
|
}
|
|
@@ -7668,7 +7731,7 @@ ${available.map((s) => `- ${s}`).join("\n")}` : "\n\nNo skills found in ~/.claud
|
|
|
7668
7731
|
// src/mcp/tools/export-orchestration.ts
|
|
7669
7732
|
import { mkdirSync as mkdirSync2, writeFileSync as writeFileSync4 } from "fs";
|
|
7670
7733
|
import path11 from "path";
|
|
7671
|
-
import { z as
|
|
7734
|
+
import { z as z66 } from "zod";
|
|
7672
7735
|
function registerExportOrchestration(server) {
|
|
7673
7736
|
server.registerTool(
|
|
7674
7737
|
"export_orchestration",
|
|
@@ -7676,7 +7739,7 @@ function registerExportOrchestration(server) {
|
|
|
7676
7739
|
title: "Export Orchestration",
|
|
7677
7740
|
description: "Export roster, identities, behaviors, and customer procedures to a JSON package.",
|
|
7678
7741
|
inputSchema: {
|
|
7679
|
-
output_path:
|
|
7742
|
+
output_path: z66.string().describe("File path to write the JSON package")
|
|
7680
7743
|
}
|
|
7681
7744
|
},
|
|
7682
7745
|
async ({ output_path }) => {
|
|
@@ -7707,7 +7770,7 @@ function registerExportOrchestration(server) {
|
|
|
7707
7770
|
|
|
7708
7771
|
// src/mcp/tools/import-orchestration.ts
|
|
7709
7772
|
import { readFileSync as readFileSync5 } from "fs";
|
|
7710
|
-
import { z as
|
|
7773
|
+
import { z as z67 } from "zod";
|
|
7711
7774
|
function registerImportOrchestration(server) {
|
|
7712
7775
|
server.registerTool(
|
|
7713
7776
|
"import_orchestration",
|
|
@@ -7715,8 +7778,8 @@ function registerImportOrchestration(server) {
|
|
|
7715
7778
|
title: "Import Orchestration",
|
|
7716
7779
|
description: "Import roster, identities, behaviors, and procedures from an orchestration package. Restricted to coordinator/founder.",
|
|
7717
7780
|
inputSchema: {
|
|
7718
|
-
package_path:
|
|
7719
|
-
merge_strategy:
|
|
7781
|
+
package_path: z67.string().describe("Path to the orchestration package JSON file"),
|
|
7782
|
+
merge_strategy: z67.enum(["replace", "merge"]).default("merge").describe("How to apply the package: both strategies are additive-only \u2014 existing data is never deleted or overwritten")
|
|
7720
7783
|
}
|
|
7721
7784
|
},
|
|
7722
7785
|
async ({ package_path, merge_strategy }) => {
|
|
@@ -7756,7 +7819,7 @@ function registerImportOrchestration(server) {
|
|
|
7756
7819
|
}
|
|
7757
7820
|
|
|
7758
7821
|
// src/mcp/tools/global-procedure.ts
|
|
7759
|
-
import { z as
|
|
7822
|
+
import { z as z68 } from "zod";
|
|
7760
7823
|
function registerCompanyProcedureTool(server, toolName) {
|
|
7761
7824
|
server.registerTool(
|
|
7762
7825
|
toolName,
|
|
@@ -7764,12 +7827,12 @@ function registerCompanyProcedureTool(server, toolName) {
|
|
|
7764
7827
|
title: "Company Procedure",
|
|
7765
7828
|
description: "Manage company procedures (customer-owned Layer 0 rules) that supersede identity, expertise, and experience. Actions: store (create new, restricted), list (view all, open), deactivate (soft-delete, restricted).",
|
|
7766
7829
|
inputSchema: {
|
|
7767
|
-
action:
|
|
7768
|
-
title:
|
|
7769
|
-
content:
|
|
7770
|
-
priority:
|
|
7771
|
-
domain:
|
|
7772
|
-
procedure_id:
|
|
7830
|
+
action: z68.enum(["store", "list", "deactivate"]).describe("Action to perform"),
|
|
7831
|
+
title: z68.string().optional().describe("Short title for the procedure (store)"),
|
|
7832
|
+
content: z68.string().max(500).optional().describe("The procedure content \u2014 clear, actionable instruction (store)"),
|
|
7833
|
+
priority: z68.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default). p1 = standard. p2 = nice-to-have."),
|
|
7834
|
+
domain: z68.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security"),
|
|
7835
|
+
procedure_id: z68.string().optional().describe("UUID of the company procedure (deactivate)")
|
|
7773
7836
|
}
|
|
7774
7837
|
},
|
|
7775
7838
|
async ({ action, title, content, priority, domain, procedure_id }) => {
|
|
@@ -7965,45 +8028,45 @@ function registerConfig(server) {
|
|
|
7965
8028
|
title: "Config",
|
|
7966
8029
|
description: "Consolidated COO/admin tool for runtime config, system health, licensing, triggers, orchestration import/export, and company procedures.",
|
|
7967
8030
|
inputSchema: {
|
|
7968
|
-
action:
|
|
7969
|
-
agent_id:
|
|
7970
|
-
role:
|
|
7971
|
-
runtime:
|
|
7972
|
-
model:
|
|
7973
|
-
reasoning_effort:
|
|
7974
|
-
dry_run:
|
|
7975
|
-
fix:
|
|
7976
|
-
verbose:
|
|
7977
|
-
project_name:
|
|
7978
|
-
since:
|
|
7979
|
-
limit:
|
|
7980
|
-
output_path:
|
|
7981
|
-
input_path:
|
|
7982
|
-
strategy:
|
|
7983
|
-
license_key:
|
|
7984
|
-
email:
|
|
7985
|
-
plan:
|
|
7986
|
-
name:
|
|
7987
|
-
event:
|
|
7988
|
-
conditions:
|
|
7989
|
-
actions:
|
|
7990
|
-
enabled:
|
|
7991
|
-
schedule:
|
|
7992
|
-
query:
|
|
7993
|
-
skill_name:
|
|
7994
|
-
pack_name:
|
|
7995
|
-
title:
|
|
7996
|
-
content:
|
|
7997
|
-
priority:
|
|
7998
|
-
domain:
|
|
7999
|
-
procedure_id:
|
|
8000
|
-
subaction:
|
|
8001
|
-
max_clusters:
|
|
8002
|
-
force:
|
|
8003
|
-
cloud_action:
|
|
8004
|
-
confirm_local_db_source_of_truth:
|
|
8005
|
-
domain_name:
|
|
8006
|
-
phase:
|
|
8031
|
+
action: z69.enum(Object.keys(ACTION_TO_TOOL2)).describe("Admin/config operation"),
|
|
8032
|
+
agent_id: z69.string().optional().describe("Agent id for set_agent_config/agent_spend/session queries/hire"),
|
|
8033
|
+
role: z69.string().optional().describe("Role template for action=hire: coo, cto, cmo, gm, principal-engineer, content-specialist, ai-specialist, staff-code-reviewer"),
|
|
8034
|
+
runtime: z69.string().optional().describe("Runtime for set_agent_config"),
|
|
8035
|
+
model: z69.string().optional().describe("Model for set_agent_config"),
|
|
8036
|
+
reasoning_effort: z69.string().optional().describe("Reasoning effort for Codex agents"),
|
|
8037
|
+
dry_run: z69.boolean().optional().describe("Preview without applying where supported"),
|
|
8038
|
+
fix: z69.boolean().optional().describe("Apply fixes for memory_audit where supported"),
|
|
8039
|
+
verbose: z69.boolean().optional().describe("Verbose output where supported"),
|
|
8040
|
+
project_name: z69.string().optional().describe("Project filter/name"),
|
|
8041
|
+
since: z69.string().optional().describe("ISO lower-bound timestamp"),
|
|
8042
|
+
limit: z69.coerce.number().optional().describe("Result limit"),
|
|
8043
|
+
output_path: z69.string().optional().describe("Output path for export/backup"),
|
|
8044
|
+
input_path: z69.string().optional().describe("Input path for import_orchestration"),
|
|
8045
|
+
strategy: z69.enum(["merge", "replace"]).optional().describe("Import strategy; replace must still be additive-only per platform rules"),
|
|
8046
|
+
license_key: z69.string().optional().describe("License key for activation/status"),
|
|
8047
|
+
email: z69.string().optional().describe("Customer email for license creation"),
|
|
8048
|
+
plan: z69.string().optional().describe("License plan"),
|
|
8049
|
+
name: z69.string().optional().describe("Trigger/starter pack/procedure/client name"),
|
|
8050
|
+
event: z69.string().optional().describe("Trigger event"),
|
|
8051
|
+
conditions: z69.array(z69.record(z69.string(), z69.unknown())).optional().describe("Trigger conditions"),
|
|
8052
|
+
actions: z69.array(z69.record(z69.string(), z69.unknown())).optional().describe("Trigger actions"),
|
|
8053
|
+
enabled: z69.boolean().optional().describe("Trigger enabled flag"),
|
|
8054
|
+
schedule: z69.string().optional().describe("Trigger schedule"),
|
|
8055
|
+
query: z69.string().optional().describe("Trigger query or filter"),
|
|
8056
|
+
skill_name: z69.string().optional().describe("Skill name for load_skill"),
|
|
8057
|
+
pack_name: z69.string().optional().describe("Starter pack name"),
|
|
8058
|
+
title: z69.string().optional().describe("Procedure title"),
|
|
8059
|
+
content: z69.string().optional().describe("Procedure content"),
|
|
8060
|
+
priority: z69.enum(["p0", "p1", "p2"]).optional().describe("Procedure priority"),
|
|
8061
|
+
domain: z69.string().optional().describe("Procedure domain"),
|
|
8062
|
+
procedure_id: z69.string().optional().describe("Procedure id for deactivate"),
|
|
8063
|
+
subaction: z69.enum(["store", "list", "deactivate"]).optional().describe("Nested action for company_procedure/global_procedure"),
|
|
8064
|
+
max_clusters: z69.coerce.number().optional().describe("Consolidation max clusters"),
|
|
8065
|
+
force: z69.boolean().optional().describe("Force operation where supported"),
|
|
8066
|
+
cloud_action: z69.enum(["status", "sync", "reupload"]).optional().describe("Nested operation for action=cloud_sync"),
|
|
8067
|
+
confirm_local_db_source_of_truth: z69.string().optional().describe("Required for cloud_action=reupload; must exactly equal LOCAL DB IS SOURCE OF TRUTH"),
|
|
8068
|
+
domain_name: z69.string().optional().describe("Client deployment domain"),
|
|
8069
|
+
phase: z69.enum(["phase_1_coo", "phase_2_executives", "phase_3_parallel_org", "1", "2", "3"]).optional().describe("Orchestration phase for orchestration_phase action")
|
|
8007
8070
|
}
|
|
8008
8071
|
}, async (input, extra) => {
|
|
8009
8072
|
const action = input.action;
|
|
@@ -8091,10 +8154,10 @@ You are ${employeeName}. Role: ${role}.`, "utf-8");
|
|
|
8091
8154
|
}
|
|
8092
8155
|
|
|
8093
8156
|
// src/mcp/tools/wiki.ts
|
|
8094
|
-
import { z as
|
|
8157
|
+
import { z as z72 } from "zod";
|
|
8095
8158
|
|
|
8096
8159
|
// src/mcp/tools/list-wiki-pages.ts
|
|
8097
|
-
import { z as
|
|
8160
|
+
import { z as z70 } from "zod";
|
|
8098
8161
|
var FETCH_TIMEOUT_MS2 = 1e4;
|
|
8099
8162
|
function registerListWikiPages(server) {
|
|
8100
8163
|
server.registerTool(
|
|
@@ -8103,8 +8166,8 @@ function registerListWikiPages(server) {
|
|
|
8103
8166
|
title: "List Wiki Pages",
|
|
8104
8167
|
description: "List documents in an exe-wiki workspace. Optionally filter by folder.",
|
|
8105
8168
|
inputSchema: {
|
|
8106
|
-
workspace:
|
|
8107
|
-
folder:
|
|
8169
|
+
workspace: z70.string().describe('Wiki workspace slug (e.g., "hygo")'),
|
|
8170
|
+
folder: z70.string().optional().describe("Filter by folder path")
|
|
8108
8171
|
}
|
|
8109
8172
|
},
|
|
8110
8173
|
async ({ workspace, folder }) => {
|
|
@@ -8193,7 +8256,7 @@ function registerListWikiPages(server) {
|
|
|
8193
8256
|
}
|
|
8194
8257
|
|
|
8195
8258
|
// src/mcp/tools/get-wiki-page.ts
|
|
8196
|
-
import { z as
|
|
8259
|
+
import { z as z71 } from "zod";
|
|
8197
8260
|
var FETCH_TIMEOUT_MS3 = 1e4;
|
|
8198
8261
|
function registerGetWikiPage(server) {
|
|
8199
8262
|
server.registerTool(
|
|
@@ -8202,9 +8265,9 @@ function registerGetWikiPage(server) {
|
|
|
8202
8265
|
title: "Get Wiki Page",
|
|
8203
8266
|
description: "Read a wiki page by document ID or title. Returns content, metadata, and folder path. Use title search when you know the page name but not the ID.",
|
|
8204
8267
|
inputSchema: {
|
|
8205
|
-
workspace:
|
|
8206
|
-
document_id:
|
|
8207
|
-
title:
|
|
8268
|
+
workspace: z71.string().describe('Wiki workspace slug (e.g., "hygo")'),
|
|
8269
|
+
document_id: z71.string().optional().describe("Specific document ID (exact lookup)"),
|
|
8270
|
+
title: z71.string().optional().describe("Search by title (fuzzy match)")
|
|
8208
8271
|
}
|
|
8209
8272
|
},
|
|
8210
8273
|
async ({ workspace, document_id, title }) => {
|
|
@@ -8386,15 +8449,15 @@ function registerWiki(server) {
|
|
|
8386
8449
|
title: "Wiki",
|
|
8387
8450
|
description: "Consolidated wiki domain tool. Actions: list, get. Wiki writes flow through raw data ingestion/projection into the curated wiki store; direct create/update MCP tools have been removed.",
|
|
8388
8451
|
inputSchema: {
|
|
8389
|
-
action:
|
|
8390
|
-
workspace:
|
|
8391
|
-
title:
|
|
8392
|
-
content:
|
|
8393
|
-
folder:
|
|
8394
|
-
document_id:
|
|
8395
|
-
mode:
|
|
8396
|
-
section:
|
|
8397
|
-
user_id:
|
|
8452
|
+
action: z72.enum(["list", "get"]).describe("Wiki read operation. Writes use raw-data ingestion/projection, not direct MCP writes."),
|
|
8453
|
+
workspace: z72.string().optional().describe("Wiki workspace slug"),
|
|
8454
|
+
title: z72.string().optional().describe("Fuzzy page title lookup for get"),
|
|
8455
|
+
content: z72.string().optional().describe("Reserved; wiki writes use raw-data ingestion/projection"),
|
|
8456
|
+
folder: z72.string().optional().describe("Optional folder path for list"),
|
|
8457
|
+
document_id: z72.string().optional().describe("Document ID for get"),
|
|
8458
|
+
mode: z72.enum(["replace", "append"]).optional().describe("Reserved; direct wiki updates are removed"),
|
|
8459
|
+
section: z72.string().optional().describe("Reserved; direct wiki updates are removed"),
|
|
8460
|
+
user_id: z72.string().optional().describe("User ID for ACL enforcement. When set, workspace access is checked against wiki_acl table.")
|
|
8398
8461
|
}
|
|
8399
8462
|
},
|
|
8400
8463
|
async (input, extra) => {
|
|
@@ -8428,7 +8491,7 @@ function registerWiki(server) {
|
|
|
8428
8491
|
}
|
|
8429
8492
|
|
|
8430
8493
|
// src/mcp/tools/behavior.ts
|
|
8431
|
-
import { z as
|
|
8494
|
+
import { z as z73 } from "zod";
|
|
8432
8495
|
function rowToBehavior2(r) {
|
|
8433
8496
|
return {
|
|
8434
8497
|
id: String(r.id),
|
|
@@ -8452,21 +8515,21 @@ function registerBehavior(server) {
|
|
|
8452
8515
|
"behavior",
|
|
8453
8516
|
{
|
|
8454
8517
|
title: "Behavior",
|
|
8455
|
-
description: "Manage behavioral patterns, corrections, and reusable procedures for employees. Actions: store (create new), list (query existing), audit (creation context), deactivate (soft-delete, restricted), purge (hard-delete inactive, restricted).",
|
|
8518
|
+
description: "Manage behavioral patterns, corrections, and reusable procedures for employees. Actions: store (create new), list (query existing), audit (creation context), deactivate (soft-delete, restricted), reactivate (re-enable deactivated, restricted), purge (hard-delete inactive, restricted).",
|
|
8456
8519
|
inputSchema: {
|
|
8457
|
-
action:
|
|
8458
|
-
content:
|
|
8459
|
-
domain:
|
|
8460
|
-
priority:
|
|
8461
|
-
agent_id:
|
|
8462
|
-
project_name:
|
|
8463
|
-
behavior_id:
|
|
8464
|
-
shared_skills:
|
|
8465
|
-
device_scoped:
|
|
8466
|
-
limit:
|
|
8467
|
-
offset:
|
|
8468
|
-
older_than_days:
|
|
8469
|
-
dry_run:
|
|
8520
|
+
action: z73.enum(["store", "list", "deactivate", "reactivate", "audit", "purge"]).describe("Action to perform"),
|
|
8521
|
+
content: z73.string().max(500).optional().describe("The behavioral instruction \u2014 one clear sentence (store)"),
|
|
8522
|
+
domain: z73.string().optional().describe("Category: workflow, code-style, tool-use, communication, architecture, testing"),
|
|
8523
|
+
priority: z73.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always included. p1 = standard (default). p2 = nice-to-have."),
|
|
8524
|
+
agent_id: z73.string().optional().describe("Employee name. Defaults to current agent. Pass 'all' to list everyone's (list only)."),
|
|
8525
|
+
project_name: z73.string().optional().describe("Defaults to current project. Pass 'global' for a behavior that applies everywhere (store)."),
|
|
8526
|
+
behavior_id: z73.string().optional().describe("UUID of the behavior (deactivate)"),
|
|
8527
|
+
shared_skills: z73.boolean().optional().describe("When true with action=list, include skills (domain='skill') from ALL agents. Default: false."),
|
|
8528
|
+
device_scoped: z73.boolean().optional().describe("When true, behavior only loads on this device. Default false (global \u2014 loads everywhere). (store)"),
|
|
8529
|
+
limit: z73.coerce.number().int().min(1).max(500).optional().describe("Max rows for list/purge preview. Default 100 for list, 500 for purge."),
|
|
8530
|
+
offset: z73.coerce.number().int().min(0).optional().describe("Pagination offset for list. Default 0."),
|
|
8531
|
+
older_than_days: z73.coerce.number().int().min(0).optional().describe("For purge: only hard-delete inactive behaviors older than this many days. Default 30."),
|
|
8532
|
+
dry_run: z73.boolean().optional().default(true).describe("For purge: preview by default; set false to permanently delete matching inactive behaviors.")
|
|
8470
8533
|
}
|
|
8471
8534
|
},
|
|
8472
8535
|
async ({ action, content, domain, priority, agent_id, project_name, behavior_id, shared_skills, device_scoped, limit, offset, older_than_days, dry_run }) => {
|
|
@@ -8715,6 +8778,31 @@ Use /exe-forget to remove any that this supersedes.`;
|
|
|
8715
8778
|
content: [{ type: "text", text: `Purged ${ids.length} inactive behavior(s).` }]
|
|
8716
8779
|
};
|
|
8717
8780
|
}
|
|
8781
|
+
if (action === "reactivate") {
|
|
8782
|
+
const caller2 = getActiveAgent();
|
|
8783
|
+
if (!canCoordinate(caller2.agentId, caller2.agentRole)) {
|
|
8784
|
+
return { content: [{ type: "text", text: `Permission denied. Only coordinator or founder can reactivate behaviors. You are "${caller2.agentId}".` }], isError: true };
|
|
8785
|
+
}
|
|
8786
|
+
if (!behavior_id) {
|
|
8787
|
+
return { content: [{ type: "text", text: "Missing required field: behavior_id is required for reactivate action." }], isError: true };
|
|
8788
|
+
}
|
|
8789
|
+
const client2 = getClient();
|
|
8790
|
+
const result4 = await client2.execute({ sql: "SELECT id, agent_id, content, domain, priority FROM behaviors WHERE id = ?", args: [behavior_id] });
|
|
8791
|
+
if (result4.rows.length === 0) {
|
|
8792
|
+
return { content: [{ type: "text", text: `Behavior not found: ${behavior_id}` }], isError: true };
|
|
8793
|
+
}
|
|
8794
|
+
const row2 = result4.rows[0];
|
|
8795
|
+
const { reactivateBehavior: reactivateBehavior2 } = await import("./behaviors-YJ3HEQED.js");
|
|
8796
|
+
const wasReactivated = await reactivateBehavior2(behavior_id);
|
|
8797
|
+
if (!wasReactivated) {
|
|
8798
|
+
return { content: [{ type: "text", text: `Behavior ${behavior_id} is already active.` }] };
|
|
8799
|
+
}
|
|
8800
|
+
return { content: [{ type: "text", text: `Reactivated behavior for ${row2.agent_id}.
|
|
8801
|
+
ID: ${row2.id}
|
|
8802
|
+
Domain: ${row2.domain ?? "none"}
|
|
8803
|
+
Priority: ${row2.priority}
|
|
8804
|
+
Content: ${row2.content}` }] };
|
|
8805
|
+
}
|
|
8718
8806
|
const caller = getActiveAgent();
|
|
8719
8807
|
const allowed = canCoordinate(caller.agentId, caller.agentRole);
|
|
8720
8808
|
if (!allowed) {
|
|
@@ -8774,7 +8862,7 @@ Content: ${row.content}`
|
|
|
8774
8862
|
}
|
|
8775
8863
|
|
|
8776
8864
|
// src/mcp/tools/reminder.ts
|
|
8777
|
-
import { z as
|
|
8865
|
+
import { z as z74 } from "zod";
|
|
8778
8866
|
function registerReminder(server) {
|
|
8779
8867
|
server.registerTool(
|
|
8780
8868
|
"reminder",
|
|
@@ -8782,11 +8870,11 @@ function registerReminder(server) {
|
|
|
8782
8870
|
title: "Reminder",
|
|
8783
8871
|
description: "Manage reminders for the founder. Shown in the boot brief every session. Actions: create (set new), list (view active), complete (mark done).",
|
|
8784
8872
|
inputSchema: {
|
|
8785
|
-
action:
|
|
8786
|
-
text:
|
|
8787
|
-
due_date:
|
|
8788
|
-
reminder_id:
|
|
8789
|
-
include_completed:
|
|
8873
|
+
action: z74.enum(["create", "list", "complete"]).describe("Action to perform"),
|
|
8874
|
+
text: z74.string().optional().describe("What to remind about (create)"),
|
|
8875
|
+
due_date: z74.string().optional().describe("Optional due date \u2014 ISO date (2026-04-01) or null for persistent (create)"),
|
|
8876
|
+
reminder_id: z74.string().optional().describe("Reminder UUID or text substring to match (complete)"),
|
|
8877
|
+
include_completed: z74.boolean().optional().default(false).describe("Include completed reminders (list)")
|
|
8790
8878
|
}
|
|
8791
8879
|
},
|
|
8792
8880
|
async ({ action, text: text3, due_date, reminder_id, include_completed }) => {
|
|
@@ -8839,7 +8927,7 @@ function registerReminder(server) {
|
|
|
8839
8927
|
}
|
|
8840
8928
|
|
|
8841
8929
|
// src/mcp/tools/store-global-procedure.ts
|
|
8842
|
-
import { z as
|
|
8930
|
+
import { z as z75 } from "zod";
|
|
8843
8931
|
function registerStoreGlobalProcedure(server) {
|
|
8844
8932
|
server.registerTool(
|
|
8845
8933
|
"store_global_procedure",
|
|
@@ -8847,10 +8935,10 @@ function registerStoreGlobalProcedure(server) {
|
|
|
8847
8935
|
title: "Store Company Procedure (use global_procedure instead)",
|
|
8848
8936
|
description: "DEPRECATED \u2014 use global_procedure with action='store'. Create a company procedure (customer-owned Layer 0 rule). RESTRICTED: only coordinator or founder sessions.",
|
|
8849
8937
|
inputSchema: {
|
|
8850
|
-
title:
|
|
8851
|
-
content:
|
|
8852
|
-
priority:
|
|
8853
|
-
domain:
|
|
8938
|
+
title: z75.string().describe("Short title for the procedure"),
|
|
8939
|
+
content: z75.string().max(500).describe("The procedure content \u2014 clear, actionable instruction"),
|
|
8940
|
+
priority: z75.enum(["p0", "p1", "p2"]).optional().describe("Priority tier. p0 = always (default)."),
|
|
8941
|
+
domain: z75.string().optional().describe("Category: workflow, code-style, communication, architecture, testing, security")
|
|
8854
8942
|
}
|
|
8855
8943
|
},
|
|
8856
8944
|
async ({ title, content, priority, domain }) => {
|
|
@@ -8922,7 +9010,7 @@ ${lines.join("\n\n")}`
|
|
|
8922
9010
|
}
|
|
8923
9011
|
|
|
8924
9012
|
// src/mcp/tools/deactivate-global-procedure.ts
|
|
8925
|
-
import { z as
|
|
9013
|
+
import { z as z76 } from "zod";
|
|
8926
9014
|
function registerDeactivateGlobalProcedure(server) {
|
|
8927
9015
|
server.registerTool(
|
|
8928
9016
|
"deactivate_global_procedure",
|
|
@@ -8930,7 +9018,7 @@ function registerDeactivateGlobalProcedure(server) {
|
|
|
8930
9018
|
title: "Deactivate Company Procedure (use global_procedure instead)",
|
|
8931
9019
|
description: "DEPRECATED \u2014 use global_procedure with action='deactivate'. Soft-delete a company procedure. RESTRICTED: only coordinator or founder sessions.",
|
|
8932
9020
|
inputSchema: {
|
|
8933
|
-
procedure_id:
|
|
9021
|
+
procedure_id: z76.string().describe("UUID of the company procedure to deactivate")
|
|
8934
9022
|
}
|
|
8935
9023
|
},
|
|
8936
9024
|
async ({ procedure_id }) => {
|
|
@@ -8985,7 +9073,7 @@ Content: ${row.content}`
|
|
|
8985
9073
|
}
|
|
8986
9074
|
|
|
8987
9075
|
// src/mcp/tools/store-decision.ts
|
|
8988
|
-
import { z as
|
|
9076
|
+
import { z as z77 } from "zod";
|
|
8989
9077
|
import crypto4 from "crypto";
|
|
8990
9078
|
function registerStoreDecision(server) {
|
|
8991
9079
|
server.registerTool(
|
|
@@ -8994,13 +9082,13 @@ function registerStoreDecision(server) {
|
|
|
8994
9082
|
title: "Store Decision",
|
|
8995
9083
|
description: "Store an authoritative decision keyed by domain. Use this when a decision is made that should be canonical \u2014 future lookups via get_decision return the latest decision for that domain. Supports supersession chains.",
|
|
8996
9084
|
inputSchema: {
|
|
8997
|
-
domain:
|
|
9085
|
+
domain: z77.string().describe(
|
|
8998
9086
|
"Domain key, e.g. 'auth-strategy', 'db-migration-approach', 'api-versioning'"
|
|
8999
9087
|
),
|
|
9000
|
-
decision:
|
|
9001
|
-
rationale:
|
|
9002
|
-
supersedes:
|
|
9003
|
-
project_name:
|
|
9088
|
+
decision: z77.string().describe("The decision text \u2014 what was decided"),
|
|
9089
|
+
rationale: z77.string().optional().describe("Why this decision was made \u2014 constraints, trade-offs, context"),
|
|
9090
|
+
supersedes: z77.string().optional().describe("UUID of the decision this supersedes (previous decision for this domain)"),
|
|
9091
|
+
project_name: z77.string().optional().describe("Project name")
|
|
9004
9092
|
}
|
|
9005
9093
|
},
|
|
9006
9094
|
async ({ domain, decision, rationale, supersedes, project_name }) => {
|
|
@@ -9067,7 +9155,7 @@ Supersedes: ${supersedes}` : ""}`
|
|
|
9067
9155
|
}
|
|
9068
9156
|
|
|
9069
9157
|
// src/mcp/tools/get-decision.ts
|
|
9070
|
-
import { z as
|
|
9158
|
+
import { z as z78 } from "zod";
|
|
9071
9159
|
function registerGetDecision(server) {
|
|
9072
9160
|
server.registerTool(
|
|
9073
9161
|
"get_decision",
|
|
@@ -9075,7 +9163,7 @@ function registerGetDecision(server) {
|
|
|
9075
9163
|
title: "Get Decision",
|
|
9076
9164
|
description: "Retrieve the latest authoritative decision for a domain. Returns the current active decision and the supersession history.",
|
|
9077
9165
|
inputSchema: {
|
|
9078
|
-
domain:
|
|
9166
|
+
domain: z78.string().describe(
|
|
9079
9167
|
"Domain key to look up, e.g. 'auth-strategy', 'db-migration-approach'"
|
|
9080
9168
|
)
|
|
9081
9169
|
}
|
|
@@ -9138,7 +9226,7 @@ function registerGetDecision(server) {
|
|
|
9138
9226
|
}
|
|
9139
9227
|
|
|
9140
9228
|
// src/mcp/tools/people-roster.ts
|
|
9141
|
-
import { z as
|
|
9229
|
+
import { z as z79 } from "zod";
|
|
9142
9230
|
|
|
9143
9231
|
// src/lib/people.ts
|
|
9144
9232
|
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
@@ -9185,10 +9273,10 @@ function registerAddPerson(server) {
|
|
|
9185
9273
|
title: "Add Person",
|
|
9186
9274
|
description: "Add or update a key human in the people roster. Used for co-founders, partners, customers \u2014 anyone agents need to know about.",
|
|
9187
9275
|
inputSchema: {
|
|
9188
|
-
name:
|
|
9189
|
-
role:
|
|
9190
|
-
relationship:
|
|
9191
|
-
notes:
|
|
9276
|
+
name: z79.string().describe("Person's name"),
|
|
9277
|
+
role: z79.string().describe("Their role (e.g. co-founder, customer, partner)"),
|
|
9278
|
+
relationship: z79.string().describe("Relationship to the organization (e.g. co-founder, early adopter, investor)"),
|
|
9279
|
+
notes: z79.string().optional().describe("Additional context about this person")
|
|
9192
9280
|
}
|
|
9193
9281
|
},
|
|
9194
9282
|
async ({ name, role, relationship, notes }) => {
|
|
@@ -9234,7 +9322,7 @@ function registerGetPerson(server) {
|
|
|
9234
9322
|
title: "Get Person",
|
|
9235
9323
|
description: "Look up a specific person by name from the people roster.",
|
|
9236
9324
|
inputSchema: {
|
|
9237
|
-
name:
|
|
9325
|
+
name: z79.string().describe("Person's name to look up")
|
|
9238
9326
|
}
|
|
9239
9327
|
},
|
|
9240
9328
|
async ({ name }) => {
|
|
@@ -9258,7 +9346,7 @@ Notes: ${person.notes}` : ""}`
|
|
|
9258
9346
|
}
|
|
9259
9347
|
|
|
9260
9348
|
// src/mcp/tools/crm.ts
|
|
9261
|
-
import { z as
|
|
9349
|
+
import { z as z80 } from "zod";
|
|
9262
9350
|
|
|
9263
9351
|
// src/lib/exe-db-read.ts
|
|
9264
9352
|
import path13 from "path";
|
|
@@ -9328,10 +9416,10 @@ function registerCrm(server) {
|
|
|
9328
9416
|
title: "CRM",
|
|
9329
9417
|
description: "Read-only CRM access from exe-db crm schema. Actions: list_people, get_person, list_tables, describe_table.",
|
|
9330
9418
|
inputSchema: {
|
|
9331
|
-
action:
|
|
9332
|
-
id:
|
|
9333
|
-
query:
|
|
9334
|
-
table:
|
|
9419
|
+
action: z80.enum(["list_people", "get_person", "list_tables", "describe_table"]).describe("CRM read operation"),
|
|
9420
|
+
id: z80.string().optional().describe("CRM row/person id for get_person"),
|
|
9421
|
+
query: z80.string().optional().describe("Text search for list_people/get_person"),
|
|
9422
|
+
table: z80.string().optional().describe("crm schema table name for describe_table"),
|
|
9335
9423
|
...PaginationSchema,
|
|
9336
9424
|
...DateRangeSchema,
|
|
9337
9425
|
...TextSearchSchema,
|
|
@@ -9431,7 +9519,7 @@ function registerCrm(server) {
|
|
|
9431
9519
|
}
|
|
9432
9520
|
|
|
9433
9521
|
// src/mcp/tools/raw-data.ts
|
|
9434
|
-
import { z as
|
|
9522
|
+
import { z as z81 } from "zod";
|
|
9435
9523
|
function text2(content, isError = false) {
|
|
9436
9524
|
return { content: [{ type: "text", text: content }], ...isError ? { isError: true } : {} };
|
|
9437
9525
|
}
|
|
@@ -9440,14 +9528,14 @@ function registerRawData(server) {
|
|
|
9440
9528
|
title: "Raw Data",
|
|
9441
9529
|
description: "Read-only access to exe-db raw.raw_events landing pad. Actions: list_sources, query, get. Results are capped because raw payloads can consume many tokens.",
|
|
9442
9530
|
inputSchema: {
|
|
9443
|
-
action:
|
|
9444
|
-
id:
|
|
9445
|
-
source:
|
|
9446
|
-
event_type:
|
|
9447
|
-
query:
|
|
9448
|
-
processed:
|
|
9531
|
+
action: z81.enum(["list_sources", "query", "get"]).describe("Raw data read operation"),
|
|
9532
|
+
id: z81.string().optional().describe("raw.raw_events id for action=get"),
|
|
9533
|
+
source: z81.string().optional().describe("Filter by raw source"),
|
|
9534
|
+
event_type: z81.string().optional().describe("Filter by event_type"),
|
|
9535
|
+
query: z81.string().optional().describe("Search payload/metadata text"),
|
|
9536
|
+
processed: z81.boolean().optional().describe("Filter processed_at IS NULL/NOT NULL"),
|
|
9449
9537
|
...PaginationSchema,
|
|
9450
|
-
include_payload:
|
|
9538
|
+
include_payload: z81.boolean().optional().describe("Include full payload JSON. Default false to save tokens."),
|
|
9451
9539
|
...DateRangeSchema,
|
|
9452
9540
|
...SortSchema,
|
|
9453
9541
|
...StructuredFiltersSchema
|
|
@@ -9522,9 +9610,9 @@ function registerRawData(server) {
|
|
|
9522
9610
|
}
|
|
9523
9611
|
|
|
9524
9612
|
// src/mcp/tools/company-actions.ts
|
|
9525
|
-
import { z as
|
|
9613
|
+
import { z as z82 } from "zod";
|
|
9526
9614
|
var FETCH_TIMEOUT_MS4 = 15e3;
|
|
9527
|
-
var ACTION =
|
|
9615
|
+
var ACTION = z82.enum(["list_connectors", "describe_connector", "preview", "execute", "list_runs", "get_run"]);
|
|
9528
9616
|
function format(payload) {
|
|
9529
9617
|
return ["# Company Actions", "", JSON.stringify(payload, null, 2)].join("\n");
|
|
9530
9618
|
}
|
|
@@ -9536,13 +9624,13 @@ function registerCompanyActions(server) {
|
|
|
9536
9624
|
description: "Preview and execute external connector actions (Asana, WhatsApp) through exe-gateway with audit/safety gates.",
|
|
9537
9625
|
inputSchema: {
|
|
9538
9626
|
action: ACTION.describe("list_connectors, describe_connector, preview, execute, list_runs, get_run"),
|
|
9539
|
-
connector:
|
|
9540
|
-
connector_ref:
|
|
9541
|
-
operation:
|
|
9542
|
-
payload:
|
|
9543
|
-
idempotency_key:
|
|
9544
|
-
confirm_token:
|
|
9545
|
-
run_id:
|
|
9627
|
+
connector: z82.string().optional().describe("Connector to use, e.g. asana, whatsapp, airtable, notion"),
|
|
9628
|
+
connector_ref: z82.string().optional().describe("Exact connector ref from list_connectors when connector names overlap"),
|
|
9629
|
+
operation: z82.string().optional().describe("Connector operation, e.g. create_task or send_message"),
|
|
9630
|
+
payload: z82.record(z82.string(), z82.unknown()).optional().describe("Operation payload"),
|
|
9631
|
+
idempotency_key: z82.string().optional().describe("Stable key to prevent duplicate execution"),
|
|
9632
|
+
confirm_token: z82.string().optional().describe("Optional future approval token"),
|
|
9633
|
+
run_id: z82.string().optional().describe("Run id for get_run")
|
|
9546
9634
|
}
|
|
9547
9635
|
},
|
|
9548
9636
|
async (input) => {
|
|
@@ -9587,8 +9675,8 @@ function registerCompanyActions(server) {
|
|
|
9587
9675
|
}
|
|
9588
9676
|
|
|
9589
9677
|
// src/mcp/tools/workflow.ts
|
|
9590
|
-
import { z as
|
|
9591
|
-
var ACTION2 =
|
|
9678
|
+
import { z as z83 } from "zod";
|
|
9679
|
+
var ACTION2 = z83.enum([
|
|
9592
9680
|
"create_workflow",
|
|
9593
9681
|
"start_workflow",
|
|
9594
9682
|
"get_workflow_status",
|
|
@@ -9596,23 +9684,23 @@ var ACTION2 = z82.enum([
|
|
|
9596
9684
|
"list_workflows",
|
|
9597
9685
|
"list_instances"
|
|
9598
9686
|
]);
|
|
9599
|
-
var StepSchema =
|
|
9600
|
-
name:
|
|
9601
|
-
type:
|
|
9602
|
-
action:
|
|
9603
|
-
type:
|
|
9604
|
-
params:
|
|
9605
|
-
requires_approval:
|
|
9687
|
+
var StepSchema = z83.object({
|
|
9688
|
+
name: z83.string().describe("Human-readable step name"),
|
|
9689
|
+
type: z83.enum(["execute_action", "wait_for_approval", "conditional"]).describe("Step type"),
|
|
9690
|
+
action: z83.object({
|
|
9691
|
+
type: z83.enum(["send_whatsapp", "send_message", "create_task", "update_wiki", "mcp_tool"]),
|
|
9692
|
+
params: z83.record(z83.string(), z83.string()),
|
|
9693
|
+
requires_approval: z83.boolean().optional()
|
|
9606
9694
|
}).optional().describe("Action to execute (for execute_action steps)"),
|
|
9607
|
-
connector:
|
|
9608
|
-
operation:
|
|
9609
|
-
payload:
|
|
9610
|
-
condition:
|
|
9611
|
-
expression:
|
|
9612
|
-
then_step:
|
|
9613
|
-
else_step:
|
|
9695
|
+
connector: z83.string().optional().describe("Connector name (e.g., asana, whatsapp)"),
|
|
9696
|
+
operation: z83.string().optional().describe("Connector operation (e.g., create_task)"),
|
|
9697
|
+
payload: z83.record(z83.string(), z83.unknown()).optional().describe("Operation payload"),
|
|
9698
|
+
condition: z83.object({
|
|
9699
|
+
expression: z83.string().describe("Expression like '{{step.1.result.status}} == completed'"),
|
|
9700
|
+
then_step: z83.number().optional(),
|
|
9701
|
+
else_step: z83.number().optional()
|
|
9614
9702
|
}).optional().describe("Condition for conditional steps"),
|
|
9615
|
-
approval_message:
|
|
9703
|
+
approval_message: z83.string().optional().describe("Message shown when waiting for approval")
|
|
9616
9704
|
});
|
|
9617
9705
|
function registerWorkflowTool(server) {
|
|
9618
9706
|
server.registerTool(
|
|
@@ -9622,14 +9710,14 @@ function registerWorkflowTool(server) {
|
|
|
9622
9710
|
description: "Create, run, and manage multi-step workflows that chain actions with approval gates. Steps reference previous outputs via {{step.N.result}}. Actions: create_workflow, start_workflow, get_workflow_status, approve_workflow_step, list_workflows, list_instances.",
|
|
9623
9711
|
inputSchema: {
|
|
9624
9712
|
action: ACTION2.describe("create_workflow | start_workflow | get_workflow_status | approve_workflow_step | list_workflows | list_instances"),
|
|
9625
|
-
name:
|
|
9626
|
-
description:
|
|
9627
|
-
steps:
|
|
9628
|
-
definition_id:
|
|
9629
|
-
instance_id:
|
|
9630
|
-
context:
|
|
9631
|
-
approved:
|
|
9632
|
-
status_filter:
|
|
9713
|
+
name: z83.string().optional().describe("Workflow name (for create_workflow)"),
|
|
9714
|
+
description: z83.string().optional().describe("Workflow description (for create_workflow)"),
|
|
9715
|
+
steps: z83.array(StepSchema).optional().describe("Workflow steps (for create_workflow)"),
|
|
9716
|
+
definition_id: z83.string().optional().describe("Workflow definition ID (for start_workflow)"),
|
|
9717
|
+
instance_id: z83.string().optional().describe("Workflow instance ID (for get_workflow_status, approve_workflow_step)"),
|
|
9718
|
+
context: z83.record(z83.string(), z83.unknown()).optional().describe("Initial context/record (for start_workflow)"),
|
|
9719
|
+
approved: z83.boolean().optional().describe("Approve (true) or reject (false) the step (for approve_workflow_step)"),
|
|
9720
|
+
status_filter: z83.string().optional().describe("Filter instances by status (for list_instances)")
|
|
9633
9721
|
}
|
|
9634
9722
|
},
|
|
9635
9723
|
async (input) => {
|
|
@@ -9642,7 +9730,7 @@ function registerWorkflowTool(server) {
|
|
|
9642
9730
|
getWorkflowInstance,
|
|
9643
9731
|
listWorkflowInstances,
|
|
9644
9732
|
approveWorkflowStep
|
|
9645
|
-
} = await import("./workflow-engine-
|
|
9733
|
+
} = await import("./workflow-engine-WUU5OZ3N.js");
|
|
9646
9734
|
try {
|
|
9647
9735
|
switch (input.action) {
|
|
9648
9736
|
case "create_workflow": {
|
|
@@ -9765,7 +9853,7 @@ function formatInstanceStatus(inst, def) {
|
|
|
9765
9853
|
}
|
|
9766
9854
|
|
|
9767
9855
|
// src/mcp/tools/file-copy.ts
|
|
9768
|
-
import { z as
|
|
9856
|
+
import { z as z84 } from "zod";
|
|
9769
9857
|
import { copyFileSync, existsSync as existsSync8, lstatSync, mkdirSync as mkdirSync3, realpathSync, statSync as statSync2 } from "fs";
|
|
9770
9858
|
import path14 from "path";
|
|
9771
9859
|
import os4 from "os";
|
|
@@ -9830,9 +9918,9 @@ function registerFileCopy(server) {
|
|
|
9830
9918
|
title: "File Copy",
|
|
9831
9919
|
description: "Copy a file from source to destination without streaming through the LLM. Saves tokens for literal file copies.",
|
|
9832
9920
|
inputSchema: {
|
|
9833
|
-
source:
|
|
9834
|
-
destination:
|
|
9835
|
-
overwrite:
|
|
9921
|
+
source: z84.string().describe("Source file path (absolute or relative to cwd)"),
|
|
9922
|
+
destination: z84.string().describe("Destination file path (absolute or relative to cwd)"),
|
|
9923
|
+
overwrite: z84.boolean().optional().default(false).describe("Overwrite destination if it exists")
|
|
9836
9924
|
}
|
|
9837
9925
|
},
|
|
9838
9926
|
async ({ source, destination, overwrite }) => {
|
|
@@ -9926,17 +10014,17 @@ function registerFileCopy(server) {
|
|
|
9926
10014
|
}
|
|
9927
10015
|
|
|
9928
10016
|
// src/mcp/tools/create-bug-report.ts
|
|
9929
|
-
import { z as
|
|
10017
|
+
import { z as z85 } from "zod";
|
|
9930
10018
|
import crypto5 from "crypto";
|
|
9931
10019
|
import { mkdir as mkdir2, writeFile as writeFile2 } from "fs/promises";
|
|
9932
10020
|
import path15 from "path";
|
|
9933
|
-
var CLASSIFICATION =
|
|
10021
|
+
var CLASSIFICATION = z85.enum([
|
|
9934
10022
|
"upstream_bug",
|
|
9935
10023
|
"customer_customization",
|
|
9936
10024
|
"emergency_hotfix",
|
|
9937
10025
|
"unclear"
|
|
9938
10026
|
]);
|
|
9939
|
-
var SEVERITY =
|
|
10027
|
+
var SEVERITY = z85.enum(["p0", "p1", "p2", "p3"]);
|
|
9940
10028
|
function slugify(input) {
|
|
9941
10029
|
return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "bug-report";
|
|
9942
10030
|
}
|
|
@@ -10024,23 +10112,23 @@ function registerCreateBugReport(server) {
|
|
|
10024
10112
|
title: "Create Bug Report",
|
|
10025
10113
|
description: "Classify and file an exe-os issue as upstream_bug, customer_customization, emergency_hotfix, or unclear. Writes a local report, stores memory, and optionally sends to AskExe support when a support endpoint is configured. IMPORTANT: Before filing, use diagnostics(action='healthcheck') and review orchestration metrics (exe-os-orchestration-metrics --since 1h) to include evidence in your report. Metrics are auto-attached to every bug report.",
|
|
10026
10114
|
inputSchema: {
|
|
10027
|
-
title:
|
|
10115
|
+
title: z85.string().min(3).describe("Short descriptive title"),
|
|
10028
10116
|
classification: CLASSIFICATION.describe(
|
|
10029
10117
|
"upstream_bug = platform defect; customer_customization = local preference; emergency_hotfix = temporary local patch; unclear = needs maintainer triage"
|
|
10030
10118
|
),
|
|
10031
10119
|
severity: SEVERITY.default("p2").describe("p0 critical \u2192 p3 low"),
|
|
10032
|
-
summary:
|
|
10033
|
-
customer_impact:
|
|
10034
|
-
reproduction_steps:
|
|
10035
|
-
expected:
|
|
10036
|
-
actual:
|
|
10037
|
-
files_changed:
|
|
10038
|
-
workaround:
|
|
10039
|
-
local_patch_diff:
|
|
10040
|
-
product:
|
|
10041
|
-
package_version:
|
|
10042
|
-
project_name:
|
|
10043
|
-
send_upstream:
|
|
10120
|
+
summary: z85.string().min(10).describe("What happened and why it matters"),
|
|
10121
|
+
customer_impact: z85.string().optional().describe("How this affects the customer/founder"),
|
|
10122
|
+
reproduction_steps: z85.array(z85.string()).optional().describe("Steps to reproduce"),
|
|
10123
|
+
expected: z85.string().optional().describe("Expected behavior"),
|
|
10124
|
+
actual: z85.string().optional().describe("Actual behavior"),
|
|
10125
|
+
files_changed: z85.array(z85.string()).optional().describe("Files changed or suspected"),
|
|
10126
|
+
workaround: z85.string().optional().describe("Temporary local workaround/hotfix, if any"),
|
|
10127
|
+
local_patch_diff: z85.string().optional().describe("Small local diff or patch summary"),
|
|
10128
|
+
product: z85.string().optional().describe("Product this bug is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
|
|
10129
|
+
package_version: z85.string().optional().describe("Installed package version"),
|
|
10130
|
+
project_name: z85.string().optional().describe("Project/customer context"),
|
|
10131
|
+
send_upstream: z85.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint")
|
|
10044
10132
|
}
|
|
10045
10133
|
},
|
|
10046
10134
|
async ({
|
|
@@ -10179,17 +10267,17 @@ Upstream status: ${upstreamStatus}`
|
|
|
10179
10267
|
}
|
|
10180
10268
|
|
|
10181
10269
|
// src/mcp/tools/create-feature-request.ts
|
|
10182
|
-
import { z as
|
|
10270
|
+
import { z as z86 } from "zod";
|
|
10183
10271
|
import crypto6 from "crypto";
|
|
10184
10272
|
import { mkdir as mkdir3, writeFile as writeFile3 } from "fs/promises";
|
|
10185
10273
|
import path16 from "path";
|
|
10186
|
-
var CATEGORY =
|
|
10274
|
+
var CATEGORY = z86.enum([
|
|
10187
10275
|
"upstream_feature",
|
|
10188
10276
|
"local_customization",
|
|
10189
10277
|
"integration",
|
|
10190
10278
|
"unclear"
|
|
10191
10279
|
]);
|
|
10192
|
-
var PRIORITY =
|
|
10280
|
+
var PRIORITY = z86.enum(["p0", "p1", "p2", "p3"]);
|
|
10193
10281
|
function slugify2(input) {
|
|
10194
10282
|
return input.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 80) || "feature-request";
|
|
10195
10283
|
}
|
|
@@ -10257,20 +10345,20 @@ function registerCreateFeatureRequest(server) {
|
|
|
10257
10345
|
title: "Create Feature Request",
|
|
10258
10346
|
description: "File a feature request for exe-os: upstream_feature (requires platform changes), local_customization (configurable in customer layers), integration (third-party), or unclear. Writes a local report, stores memory, and optionally sends to AskExe.",
|
|
10259
10347
|
inputSchema: {
|
|
10260
|
-
title:
|
|
10348
|
+
title: z86.string().min(3).describe("Short descriptive title"),
|
|
10261
10349
|
category: CATEGORY.describe(
|
|
10262
10350
|
"upstream_feature = platform capability change; local_customization = configurable in customer layers; integration = third-party connector; unclear = needs product triage"
|
|
10263
10351
|
),
|
|
10264
10352
|
priority: PRIORITY.default("p2").describe("p0 critical \u2192 p3 low"),
|
|
10265
|
-
description:
|
|
10266
|
-
use_case:
|
|
10267
|
-
current_workaround:
|
|
10268
|
-
proposed_solution:
|
|
10269
|
-
business_impact:
|
|
10270
|
-
product:
|
|
10271
|
-
package_version:
|
|
10272
|
-
project_name:
|
|
10273
|
-
send_upstream:
|
|
10353
|
+
description: z86.string().min(10).describe("What capability is needed and why"),
|
|
10354
|
+
use_case: z86.string().optional().describe("Concrete scenario where this feature would be used"),
|
|
10355
|
+
current_workaround: z86.string().optional().describe("How the need is currently addressed, if at all"),
|
|
10356
|
+
proposed_solution: z86.string().optional().describe("Suggested implementation approach"),
|
|
10357
|
+
business_impact: z86.string().optional().describe("Impact on business/workflow if this ships"),
|
|
10358
|
+
product: z86.string().optional().describe("Product this feature is for: exe-os, exe-create, exe-wiki, exe-gateway, exe-crm, exe-build. Defaults to exe-os."),
|
|
10359
|
+
package_version: z86.string().optional().describe("Installed package version"),
|
|
10360
|
+
project_name: z86.string().optional().describe("Project/customer context"),
|
|
10361
|
+
send_upstream: z86.boolean().default(true).describe("Attempt to POST to configured AskExe support endpoint")
|
|
10274
10362
|
}
|
|
10275
10363
|
},
|
|
10276
10364
|
async ({
|
|
@@ -10385,7 +10473,7 @@ Upstream status: ${upstreamStatus}`
|
|
|
10385
10473
|
}
|
|
10386
10474
|
|
|
10387
10475
|
// src/mcp/tools/support.ts
|
|
10388
|
-
import { z as
|
|
10476
|
+
import { z as z87 } from "zod";
|
|
10389
10477
|
function formatRows(rows, mode) {
|
|
10390
10478
|
const lines = [`exe-os support ${mode}`, ""];
|
|
10391
10479
|
for (const row of rows) {
|
|
@@ -10426,7 +10514,7 @@ function registerSupportTools(server) {
|
|
|
10426
10514
|
title: "Support Test",
|
|
10427
10515
|
description: "End-to-end support intake smoke test. Files a clearly marked test report upstream and auto-closes it on AskExe machines with admin credentials.",
|
|
10428
10516
|
inputSchema: {
|
|
10429
|
-
project:
|
|
10517
|
+
project: z87.string().default("support-smoke").describe("Customer/project name, e.g. hygo")
|
|
10430
10518
|
}
|
|
10431
10519
|
},
|
|
10432
10520
|
async ({ project }) => {
|
|
@@ -10444,8 +10532,8 @@ function registerSupportTools(server) {
|
|
|
10444
10532
|
title: "My Bug Reports",
|
|
10445
10533
|
description: "List bug reports you've filed, scoped to your license. Shows status (open/triaged/fixed/closed), severity, and fixed_version so you know when to update.",
|
|
10446
10534
|
inputSchema: {
|
|
10447
|
-
status:
|
|
10448
|
-
limit:
|
|
10535
|
+
status: z87.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("all").describe("Filter by status. Default: all"),
|
|
10536
|
+
limit: z87.number().min(1).max(50).default(25).describe("Max results")
|
|
10449
10537
|
}
|
|
10450
10538
|
},
|
|
10451
10539
|
async ({ status: status2, limit }) => {
|
|
@@ -10510,8 +10598,8 @@ function registerSupportTools(server) {
|
|
|
10510
10598
|
title: "My Feature Requests",
|
|
10511
10599
|
description: "List feature requests you've filed, scoped to your license. Shows status (open/planned/in_progress/shipped/closed), priority, and shipped_version so you know when to update.",
|
|
10512
10600
|
inputSchema: {
|
|
10513
|
-
status:
|
|
10514
|
-
limit:
|
|
10601
|
+
status: z87.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("all").describe("Filter by status. Default: all"),
|
|
10602
|
+
limit: z87.number().min(1).max(50).default(25).describe("Max results")
|
|
10515
10603
|
}
|
|
10516
10604
|
},
|
|
10517
10605
|
async ({ status: status2, limit }) => {
|
|
@@ -10579,7 +10667,7 @@ import { existsSync as existsSync9 } from "fs";
|
|
|
10579
10667
|
import { dirname, join as join2, parse as pathParse } from "path";
|
|
10580
10668
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
10581
10669
|
import { promisify as promisify2 } from "util";
|
|
10582
|
-
import { z as
|
|
10670
|
+
import { z as z88 } from "zod";
|
|
10583
10671
|
function findPackageRoot() {
|
|
10584
10672
|
let dir = dirname(fileURLToPath2(import.meta.url));
|
|
10585
10673
|
const { root } = pathParse(dir);
|
|
@@ -10624,12 +10712,12 @@ function registerCliParityTools(server) {
|
|
|
10624
10712
|
title: "Doctor",
|
|
10625
10713
|
description: "Run exe-os doctor audit. Defaults to read-only diagnostics; optional dry-run/fix flags mirror CLI.",
|
|
10626
10714
|
inputSchema: {
|
|
10627
|
-
agent:
|
|
10628
|
-
project:
|
|
10629
|
-
verbose:
|
|
10630
|
-
conflicts:
|
|
10631
|
-
dry_run:
|
|
10632
|
-
fix:
|
|
10715
|
+
agent: z88.string().optional(),
|
|
10716
|
+
project: z88.string().optional(),
|
|
10717
|
+
verbose: z88.boolean().default(false),
|
|
10718
|
+
conflicts: z88.boolean().default(false),
|
|
10719
|
+
dry_run: z88.boolean().default(false),
|
|
10720
|
+
fix: z88.boolean().default(false)
|
|
10633
10721
|
}
|
|
10634
10722
|
}, async ({ agent, project, verbose, conflicts, dry_run, fix }) => {
|
|
10635
10723
|
const args = [];
|
|
@@ -10646,9 +10734,9 @@ function registerCliParityTools(server) {
|
|
|
10646
10734
|
title: "Rename Employee",
|
|
10647
10735
|
description: "Rename an employee using the same path as `exe-os rename <old> <new>`. Use for customer roster/identity renames.",
|
|
10648
10736
|
inputSchema: {
|
|
10649
|
-
old_name:
|
|
10650
|
-
new_name:
|
|
10651
|
-
dry_run:
|
|
10737
|
+
old_name: z88.string().min(1),
|
|
10738
|
+
new_name: z88.string().min(1),
|
|
10739
|
+
dry_run: z88.boolean().default(false)
|
|
10652
10740
|
}
|
|
10653
10741
|
}, async ({ old_name, new_name, dry_run }) => {
|
|
10654
10742
|
if (dry_run) {
|
|
@@ -10661,7 +10749,7 @@ function registerCliParityTools(server) {
|
|
|
10661
10749
|
server.registerTool("status_brief", {
|
|
10662
10750
|
title: "Status Brief",
|
|
10663
10751
|
description: "Return current employee/tmux status. Mirrors `exe-status` and supports optional deep view for one employee.",
|
|
10664
|
-
inputSchema: { employee:
|
|
10752
|
+
inputSchema: { employee: z88.string().optional() }
|
|
10665
10753
|
}, async ({ employee }) => {
|
|
10666
10754
|
const text3 = await status(employee);
|
|
10667
10755
|
return result2(text3, { ok: true, employee: employee ?? null });
|
|
@@ -10669,7 +10757,7 @@ function registerCliParityTools(server) {
|
|
|
10669
10757
|
server.registerTool("pending_work_summary", {
|
|
10670
10758
|
title: "Pending Work Summary",
|
|
10671
10759
|
description: "Return pending reviews, messages, and notifications using the same summaries as the CLI tools.",
|
|
10672
|
-
inputSchema: { agent:
|
|
10760
|
+
inputSchema: { agent: z88.string().optional() }
|
|
10673
10761
|
}, async ({ agent }) => {
|
|
10674
10762
|
const settled = await Promise.allSettled([
|
|
10675
10763
|
runCommand("exe-pending-reviews", [], 3e4),
|
|
@@ -10693,7 +10781,7 @@ function registerCliParityTools(server) {
|
|
|
10693
10781
|
server.registerTool("key_rotation_preflight", {
|
|
10694
10782
|
title: "Key Rotation Preflight",
|
|
10695
10783
|
description: "Dry-run key rotation/update preflight. No destructive changes.",
|
|
10696
|
-
inputSchema: { mode:
|
|
10784
|
+
inputSchema: { mode: z88.enum(["rotate", "update"]).default("rotate") }
|
|
10697
10785
|
}, async ({ mode }) => {
|
|
10698
10786
|
const out = await runCommand("exe-os", ["key", mode, "--dry-run"], 6e4);
|
|
10699
10787
|
return result2(out.text, { ok: out.ok, command: out.command, mode }, !out.ok);
|
|
@@ -10712,11 +10800,11 @@ function registerCliParityTools(server) {
|
|
|
10712
10800
|
title: "Stack Update Check",
|
|
10713
10801
|
description: "Plan/check a customer stack update without applying Docker changes. Mirrors `exe-os stack-update --check`.",
|
|
10714
10802
|
inputSchema: {
|
|
10715
|
-
target:
|
|
10716
|
-
manifest:
|
|
10717
|
-
compose_file:
|
|
10718
|
-
env_file:
|
|
10719
|
-
deployment_persona:
|
|
10803
|
+
target: z88.string().optional(),
|
|
10804
|
+
manifest: z88.string().optional(),
|
|
10805
|
+
compose_file: z88.string().optional(),
|
|
10806
|
+
env_file: z88.string().optional(),
|
|
10807
|
+
deployment_persona: z88.enum(["customer", "askexe-control-plane"]).default("customer")
|
|
10720
10808
|
}
|
|
10721
10809
|
}, async ({ target, manifest, compose_file, env_file, deployment_persona }) => {
|
|
10722
10810
|
const args = ["stack-update", "--check", "--deployment-persona", deployment_persona];
|
|
@@ -10738,8 +10826,8 @@ function registerCliParityTools(server) {
|
|
|
10738
10826
|
}
|
|
10739
10827
|
|
|
10740
10828
|
// src/mcp/tools/get-session-events.ts
|
|
10741
|
-
import { z as
|
|
10742
|
-
var EVENT_TYPE =
|
|
10829
|
+
import { z as z89 } from "zod";
|
|
10830
|
+
var EVENT_TYPE = z89.enum([
|
|
10743
10831
|
"user_prompt",
|
|
10744
10832
|
"assistant_response",
|
|
10745
10833
|
"tool_call",
|
|
@@ -10769,11 +10857,11 @@ function registerGetSessionEvents(server) {
|
|
|
10769
10857
|
title: "Get Session Events",
|
|
10770
10858
|
description: "Return exact recent chronological user prompts, assistant responses, and tool calls from the append-only session journal. Use this when asked what happened last, not semantic memory search.",
|
|
10771
10859
|
inputSchema: {
|
|
10772
|
-
agent_id:
|
|
10773
|
-
session_id:
|
|
10860
|
+
agent_id: z89.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
|
|
10861
|
+
session_id: z89.string().optional().describe("Optional exact runtime session id."),
|
|
10774
10862
|
event_type: EVENT_TYPE.optional().describe("Filter to one event type."),
|
|
10775
|
-
project_name:
|
|
10776
|
-
limit:
|
|
10863
|
+
project_name: z89.string().optional().describe("Optional project filter. Pass 'all' for all projects."),
|
|
10864
|
+
limit: z89.number().int().min(1).max(100).default(20).describe("Number of events to return.")
|
|
10777
10865
|
}
|
|
10778
10866
|
},
|
|
10779
10867
|
async ({ agent_id, session_id, event_type, project_name, limit }) => {
|
|
@@ -10809,8 +10897,8 @@ function registerGetLastAssistantResponse(server) {
|
|
|
10809
10897
|
title: "Get Last Assistant Response",
|
|
10810
10898
|
description: "Return the exact last assistant response for an agent from the session event journal. Use for 'what was the last thing you said?'",
|
|
10811
10899
|
inputSchema: {
|
|
10812
|
-
agent_id:
|
|
10813
|
-
project_name:
|
|
10900
|
+
agent_id: z89.string().optional().describe("Agent to inspect. Defaults to active agent. COO/CTO may inspect others."),
|
|
10901
|
+
project_name: z89.string().optional().describe("Optional project filter. Pass 'all' for all projects.")
|
|
10814
10902
|
}
|
|
10815
10903
|
},
|
|
10816
10904
|
async ({ agent_id, project_name }) => {
|
|
@@ -10840,7 +10928,7 @@ function registerGetLastAssistantResponse(server) {
|
|
|
10840
10928
|
}
|
|
10841
10929
|
|
|
10842
10930
|
// src/mcp/tools/code-context.ts
|
|
10843
|
-
import { z as
|
|
10931
|
+
import { z as z90 } from "zod";
|
|
10844
10932
|
function errorResult10(text3) {
|
|
10845
10933
|
return { content: [{ type: "text", text: text3 }], isError: true };
|
|
10846
10934
|
}
|
|
@@ -10852,20 +10940,20 @@ function registerCodeContext(server) {
|
|
|
10852
10940
|
title: "Code Context",
|
|
10853
10941
|
description: "Persistent codebase context engine with semantic vector search. One consolidated tool to avoid MCP bloat. Actions: index (structural only), index_embed (structural + vector embeddings), search (semantic+lexical hybrid), trace, blast_radius, stats. Search uses RRF fusion of Jina v5 embeddings (cosine similarity) + lexical scoring. Falls back to lexical if daemon unavailable.",
|
|
10854
10942
|
inputSchema: {
|
|
10855
|
-
action:
|
|
10856
|
-
project_root:
|
|
10857
|
-
query:
|
|
10858
|
-
symbol:
|
|
10859
|
-
file_path:
|
|
10860
|
-
force:
|
|
10861
|
-
limit:
|
|
10862
|
-
offset:
|
|
10863
|
-
refresh_index:
|
|
10864
|
-
languages:
|
|
10865
|
-
paths:
|
|
10866
|
-
depth:
|
|
10867
|
-
max_files:
|
|
10868
|
-
lexical_only:
|
|
10943
|
+
action: z90.enum(["index", "index_embed", "search", "trace", "blast_radius", "stats"]).describe("Code context operation. index_embed = index + generate embeddings for semantic search."),
|
|
10944
|
+
project_root: z90.string().optional().describe("Repository root. Defaults to current working directory."),
|
|
10945
|
+
query: z90.string().optional().describe("Natural language search query (e.g. 'authentication logic', 'database migration'). Semantic search finds conceptual matches, not just keywords."),
|
|
10946
|
+
symbol: z90.string().optional().describe("Symbol/function/class/type name for trace or blast_radius"),
|
|
10947
|
+
file_path: z90.string().optional().describe("File path for blast_radius"),
|
|
10948
|
+
force: z90.boolean().optional().describe("Force rebuild before answering"),
|
|
10949
|
+
limit: z90.coerce.number().int().min(1).max(100).optional().describe("Max results"),
|
|
10950
|
+
offset: z90.coerce.number().int().min(0).optional().describe("Search pagination offset"),
|
|
10951
|
+
refresh_index: z90.boolean().optional().describe("Refresh/rebuild index before searching"),
|
|
10952
|
+
languages: z90.array(z90.string()).optional().describe('Language filters, e.g. ["python", "typescript"]'),
|
|
10953
|
+
paths: z90.array(z90.string()).optional().describe("Path/glob filters"),
|
|
10954
|
+
depth: z90.coerce.number().int().min(1).max(5).optional().describe("Dependent traversal depth for blast_radius"),
|
|
10955
|
+
max_files: z90.coerce.number().int().min(1).max(1e4).optional().describe("Max code files to index"),
|
|
10956
|
+
lexical_only: z90.boolean().optional().describe("Force lexical-only search (skip vector similarity). Default: false \u2014 uses semantic hybrid search.")
|
|
10869
10957
|
}
|
|
10870
10958
|
}, async ({ action, project_root, query, symbol, file_path, force, limit, offset, refresh_index, languages, paths, depth, max_files, lexical_only }) => {
|
|
10871
10959
|
const opts = { projectRoot: project_root, force, maxFiles: max_files };
|
|
@@ -10948,9 +11036,9 @@ function registerCodeContext(server) {
|
|
|
10948
11036
|
}
|
|
10949
11037
|
|
|
10950
11038
|
// src/mcp/tools/support-inbox.ts
|
|
10951
|
-
import { z as
|
|
11039
|
+
import { z as z91 } from "zod";
|
|
10952
11040
|
var DEFAULT_ENDPOINT = "https://api.askexe.com/admin/support/bug-reports";
|
|
10953
|
-
var STATUS =
|
|
11041
|
+
var STATUS = z91.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
|
|
10954
11042
|
function adminToken() {
|
|
10955
11043
|
return process.env.ASKEXE_SUPPORT_ADMIN_TOKEN || process.env.EXE_SUPPORT_ADMIN_TOKEN;
|
|
10956
11044
|
}
|
|
@@ -10989,9 +11077,9 @@ function registerListBugReports(server) {
|
|
|
10989
11077
|
title: "List Bug Reports",
|
|
10990
11078
|
description: "AskExe-internal only: list incoming customer bug reports from the support inbox.",
|
|
10991
11079
|
inputSchema: {
|
|
10992
|
-
status:
|
|
10993
|
-
severity:
|
|
10994
|
-
limit:
|
|
11080
|
+
status: z91.enum(["all", "open", "triaged", "fixed", "closed", "wontfix"]).default("open"),
|
|
11081
|
+
severity: z91.enum(["p0", "p1", "p2", "p3"]).optional(),
|
|
11082
|
+
limit: z91.number().int().min(1).max(100).default(25)
|
|
10995
11083
|
}
|
|
10996
11084
|
},
|
|
10997
11085
|
async ({ status: status2, severity, limit }) => {
|
|
@@ -11010,7 +11098,7 @@ function registerGetBugReport(server) {
|
|
|
11010
11098
|
{
|
|
11011
11099
|
title: "Get Bug Report",
|
|
11012
11100
|
description: "AskExe-internal only: fetch one customer bug report with full markdown payload.",
|
|
11013
|
-
inputSchema: { id:
|
|
11101
|
+
inputSchema: { id: z91.string().min(8) }
|
|
11014
11102
|
},
|
|
11015
11103
|
async ({ id }) => {
|
|
11016
11104
|
const data = await requestJson(`${endpoint()}/${encodeURIComponent(id)}`);
|
|
@@ -11025,12 +11113,12 @@ function registerTriageBugReport(server) {
|
|
|
11025
11113
|
title: "Triage Bug Report",
|
|
11026
11114
|
description: "AskExe-internal only: update bug report status and link task/commit/release metadata.",
|
|
11027
11115
|
inputSchema: {
|
|
11028
|
-
id:
|
|
11116
|
+
id: z91.string().min(8),
|
|
11029
11117
|
status: STATUS.optional(),
|
|
11030
|
-
triage_notes:
|
|
11031
|
-
linked_task_id:
|
|
11032
|
-
linked_commit:
|
|
11033
|
-
fixed_version:
|
|
11118
|
+
triage_notes: z91.string().optional(),
|
|
11119
|
+
linked_task_id: z91.string().optional(),
|
|
11120
|
+
linked_commit: z91.string().optional(),
|
|
11121
|
+
fixed_version: z91.string().optional()
|
|
11034
11122
|
}
|
|
11035
11123
|
},
|
|
11036
11124
|
async ({ id, status: status2, triage_notes, linked_task_id, linked_commit, fixed_version }) => {
|
|
@@ -11043,7 +11131,7 @@ function registerTriageBugReport(server) {
|
|
|
11043
11131
|
}
|
|
11044
11132
|
);
|
|
11045
11133
|
}
|
|
11046
|
-
var FEATURE_STATUS =
|
|
11134
|
+
var FEATURE_STATUS = z91.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
|
|
11047
11135
|
function featureEndpoint() {
|
|
11048
11136
|
return endpoint().replace(/\/bug-reports\/?$/, "/feature-requests");
|
|
11049
11137
|
}
|
|
@@ -11054,9 +11142,9 @@ function registerListFeatureRequests(server) {
|
|
|
11054
11142
|
title: "List Feature Requests",
|
|
11055
11143
|
description: "AskExe-internal only: list incoming customer feature requests from the support inbox.",
|
|
11056
11144
|
inputSchema: {
|
|
11057
|
-
status:
|
|
11058
|
-
priority:
|
|
11059
|
-
limit:
|
|
11145
|
+
status: z91.enum(["all", "open", "planned", "in_progress", "shipped", "closed", "wontdo"]).default("open"),
|
|
11146
|
+
priority: z91.enum(["p0", "p1", "p2", "p3"]).optional(),
|
|
11147
|
+
limit: z91.number().int().min(1).max(100).default(25)
|
|
11060
11148
|
}
|
|
11061
11149
|
},
|
|
11062
11150
|
async ({ status: status2, priority, limit }) => {
|
|
@@ -11075,7 +11163,7 @@ function registerGetFeatureRequest(server) {
|
|
|
11075
11163
|
{
|
|
11076
11164
|
title: "Get Feature Request",
|
|
11077
11165
|
description: "AskExe-internal only: fetch one customer feature request with full payload.",
|
|
11078
|
-
inputSchema: { id:
|
|
11166
|
+
inputSchema: { id: z91.string().min(8) }
|
|
11079
11167
|
},
|
|
11080
11168
|
async ({ id }) => {
|
|
11081
11169
|
const data = await requestJson(`${featureEndpoint()}/${encodeURIComponent(id)}`);
|
|
@@ -11090,11 +11178,11 @@ function registerTriageFeatureRequest(server) {
|
|
|
11090
11178
|
title: "Triage Feature Request",
|
|
11091
11179
|
description: "AskExe-internal only: update feature request status, response notes, and version metadata.",
|
|
11092
11180
|
inputSchema: {
|
|
11093
|
-
id:
|
|
11181
|
+
id: z91.string().min(8),
|
|
11094
11182
|
status: FEATURE_STATUS.optional(),
|
|
11095
|
-
response_notes:
|
|
11096
|
-
target_version:
|
|
11097
|
-
shipped_version:
|
|
11183
|
+
response_notes: z91.string().optional(),
|
|
11184
|
+
target_version: z91.string().optional(),
|
|
11185
|
+
shipped_version: z91.string().optional()
|
|
11098
11186
|
}
|
|
11099
11187
|
},
|
|
11100
11188
|
async ({ id, status: status2, response_notes, target_version, shipped_version }) => {
|
|
@@ -11109,11 +11197,11 @@ function registerTriageFeatureRequest(server) {
|
|
|
11109
11197
|
}
|
|
11110
11198
|
|
|
11111
11199
|
// src/mcp/tools/update-support.ts
|
|
11112
|
-
import { z as
|
|
11200
|
+
import { z as z92 } from "zod";
|
|
11113
11201
|
import { readdir, readFile as readFile2, writeFile as writeFile4 } from "fs/promises";
|
|
11114
11202
|
import path17 from "path";
|
|
11115
|
-
var BUG_STATUS =
|
|
11116
|
-
var FEATURE_STATUS2 =
|
|
11203
|
+
var BUG_STATUS = z92.enum(["open", "triaged", "fixed", "closed", "wontfix"]);
|
|
11204
|
+
var FEATURE_STATUS2 = z92.enum(["open", "planned", "in_progress", "shipped", "closed", "wontdo"]);
|
|
11117
11205
|
async function findReportFile(dir, id) {
|
|
11118
11206
|
try {
|
|
11119
11207
|
const files = await readdir(dir);
|
|
@@ -11189,11 +11277,11 @@ function registerUpdateBugReport(server) {
|
|
|
11189
11277
|
title: "Update Bug Report",
|
|
11190
11278
|
description: "Update the status of a previously filed bug report. Updates local markdown file, stores a memory, and POSTs the change to AskExe support. Statuses: open \u2192 triaged \u2192 fixed \u2192 closed \u2192 wontfix.",
|
|
11191
11279
|
inputSchema: {
|
|
11192
|
-
id:
|
|
11280
|
+
id: z92.string().min(8).describe("Bug report ID (UUID or first 8 chars)"),
|
|
11193
11281
|
status: BUG_STATUS.describe("New status"),
|
|
11194
|
-
fix_version:
|
|
11195
|
-
notes:
|
|
11196
|
-
send_upstream:
|
|
11282
|
+
fix_version: z92.string().optional().describe("Version that fixes this bug (e.g. '0.9.161')"),
|
|
11283
|
+
notes: z92.string().optional().describe("Update notes \u2014 why this status change"),
|
|
11284
|
+
send_upstream: z92.boolean().default(true).describe("POST update to AskExe support endpoint")
|
|
11197
11285
|
}
|
|
11198
11286
|
},
|
|
11199
11287
|
async ({ id, status: status2, fix_version, notes, send_upstream }) => {
|
|
@@ -11281,11 +11369,11 @@ function registerUpdateFeatureRequest(server) {
|
|
|
11281
11369
|
title: "Update Feature Request",
|
|
11282
11370
|
description: "Update the status of a previously filed feature request. Updates local markdown file, stores a memory, and POSTs the change to AskExe support. Statuses: open \u2192 planned \u2192 in_progress \u2192 shipped \u2192 closed \u2192 wontdo.",
|
|
11283
11371
|
inputSchema: {
|
|
11284
|
-
id:
|
|
11372
|
+
id: z92.string().min(8).describe("Feature request ID (UUID or first 8 chars)"),
|
|
11285
11373
|
status: FEATURE_STATUS2.describe("New status"),
|
|
11286
|
-
shipped_version:
|
|
11287
|
-
notes:
|
|
11288
|
-
send_upstream:
|
|
11374
|
+
shipped_version: z92.string().optional().describe("Version that ships this feature (e.g. '0.9.170')"),
|
|
11375
|
+
notes: z92.string().optional().describe("Update notes \u2014 why this status change"),
|
|
11376
|
+
send_upstream: z92.boolean().default(true).describe("POST update to AskExe support endpoint")
|
|
11289
11377
|
}
|
|
11290
11378
|
},
|
|
11291
11379
|
async ({ id, status: status2, shipped_version, notes, send_upstream }) => {
|
|
@@ -11368,7 +11456,7 @@ Upstream status: ${upstreamStatus}`
|
|
|
11368
11456
|
}
|
|
11369
11457
|
|
|
11370
11458
|
// src/mcp/tools/import-conversations.ts
|
|
11371
|
-
import { z as
|
|
11459
|
+
import { z as z93 } from "zod";
|
|
11372
11460
|
import crypto7 from "crypto";
|
|
11373
11461
|
import { readFile as readFile3, readdir as readdir2, stat } from "fs/promises";
|
|
11374
11462
|
import path18 from "path";
|
|
@@ -11416,12 +11504,12 @@ function registerImportConversations(server) {
|
|
|
11416
11504
|
title: "Import Conversations",
|
|
11417
11505
|
description: "Import conversation history from ChatGPT, Claude, or generic exports. Parses conversations, extracts keywords and graph entities, stores as memories. Supports conversations.json (ChatGPT), Claude JSON export, markdown files, and generic JSON arrays. Deduplicates by content hash.",
|
|
11418
11506
|
inputSchema: {
|
|
11419
|
-
path:
|
|
11420
|
-
format:
|
|
11421
|
-
project_name:
|
|
11422
|
-
dry_run:
|
|
11423
|
-
force:
|
|
11424
|
-
max_memories:
|
|
11507
|
+
path: z93.string().describe("File path or directory to import from"),
|
|
11508
|
+
format: z93.enum(["chatgpt", "claude", "generic", "markdown", "auto"]).default("auto").describe("Conversation format. 'auto' detects from content."),
|
|
11509
|
+
project_name: z93.string().optional().describe("Project name for memory scoping"),
|
|
11510
|
+
dry_run: z93.boolean().default(false).describe("Parse and report counts without storing"),
|
|
11511
|
+
force: z93.boolean().default(false).describe("Override the 50K memory safety cap"),
|
|
11512
|
+
max_memories: z93.number().optional().describe("Custom memory cap (default 50000)")
|
|
11425
11513
|
}
|
|
11426
11514
|
},
|
|
11427
11515
|
async ({ path: inputPath, format: format2, project_name, dry_run, force, max_memories }) => {
|
|
@@ -11568,7 +11656,7 @@ Files: ${files.length} | Conversations: ${totalConversations} | Format: ${allDet
|
|
|
11568
11656
|
}
|
|
11569
11657
|
|
|
11570
11658
|
// src/mcp/tools/decision.ts
|
|
11571
|
-
import { z as
|
|
11659
|
+
import { z as z94 } from "zod";
|
|
11572
11660
|
function buildHandlers6() {
|
|
11573
11661
|
const tools = /* @__PURE__ */ new Map();
|
|
11574
11662
|
const fake = {
|
|
@@ -11592,12 +11680,12 @@ function registerDecision(server) {
|
|
|
11592
11680
|
title: "Decision",
|
|
11593
11681
|
description: "Store or retrieve authoritative decisions. Actions: store (persist a decision by domain), get (look up a decision by domain/query).",
|
|
11594
11682
|
inputSchema: {
|
|
11595
|
-
action:
|
|
11596
|
-
domain:
|
|
11597
|
-
decision:
|
|
11598
|
-
rationale:
|
|
11599
|
-
query:
|
|
11600
|
-
limit:
|
|
11683
|
+
action: z94.enum(["store", "get"]).describe("Decision operation"),
|
|
11684
|
+
domain: z94.string().optional().describe("Decision domain (e.g. 'architecture', 'hiring')"),
|
|
11685
|
+
decision: z94.string().optional().describe("Decision text for action=store"),
|
|
11686
|
+
rationale: z94.string().optional().describe("Why this decision was made (action=store)"),
|
|
11687
|
+
query: z94.string().optional().describe("Search query for action=get"),
|
|
11688
|
+
limit: z94.coerce.number().optional().describe("Max results for action=get")
|
|
11601
11689
|
}
|
|
11602
11690
|
},
|
|
11603
11691
|
async (input, extra) => {
|
|
@@ -11613,7 +11701,7 @@ function registerDecision(server) {
|
|
|
11613
11701
|
}
|
|
11614
11702
|
|
|
11615
11703
|
// src/mcp/tools/session.ts
|
|
11616
|
-
import { z as
|
|
11704
|
+
import { z as z95 } from "zod";
|
|
11617
11705
|
function buildHandlers7() {
|
|
11618
11706
|
const tools = /* @__PURE__ */ new Map();
|
|
11619
11707
|
const fake = {
|
|
@@ -11637,9 +11725,9 @@ function registerSession(server) {
|
|
|
11637
11725
|
title: "Session",
|
|
11638
11726
|
description: "Session inspection tools. Actions: events (get session event log), last_response (get the most recent assistant response text).",
|
|
11639
11727
|
inputSchema: {
|
|
11640
|
-
action:
|
|
11641
|
-
session_id:
|
|
11642
|
-
limit:
|
|
11728
|
+
action: z95.enum(["events", "last_response"]).describe("Session operation"),
|
|
11729
|
+
session_id: z95.string().optional().describe("Session ID for action=events"),
|
|
11730
|
+
limit: z95.coerce.number().optional().describe("Max events for action=events")
|
|
11643
11731
|
}
|
|
11644
11732
|
},
|
|
11645
11733
|
async (input, extra) => {
|
|
@@ -11655,7 +11743,7 @@ function registerSession(server) {
|
|
|
11655
11743
|
}
|
|
11656
11744
|
|
|
11657
11745
|
// src/mcp/tools/support-consolidated.ts
|
|
11658
|
-
import { z as
|
|
11746
|
+
import { z as z96 } from "zod";
|
|
11659
11747
|
function buildHandlers8() {
|
|
11660
11748
|
const tools = /* @__PURE__ */ new Map();
|
|
11661
11749
|
const fake = {
|
|
@@ -11701,7 +11789,7 @@ function registerSupportConsolidated(server) {
|
|
|
11701
11789
|
title: "Support",
|
|
11702
11790
|
description: "Bug reports, feature requests, and support system. Actions: create_bug, create_feature, update_bug, update_feature, list_my_bugs, list_my_features, list_bugs, get_bug, triage_bug, list_features, get_feature, triage_feature, health, test, send_telemetry. Use 'product' param to file bugs for any AskExe product (exe-os, exe-create, exe-wiki, etc.).",
|
|
11703
11791
|
inputSchema: {
|
|
11704
|
-
action:
|
|
11792
|
+
action: z96.enum([
|
|
11705
11793
|
"create_bug",
|
|
11706
11794
|
"create_feature",
|
|
11707
11795
|
"update_bug",
|
|
@@ -11718,28 +11806,28 @@ function registerSupportConsolidated(server) {
|
|
|
11718
11806
|
"test",
|
|
11719
11807
|
"send_telemetry"
|
|
11720
11808
|
]).describe("Support operation"),
|
|
11721
|
-
title:
|
|
11722
|
-
description:
|
|
11723
|
-
steps_to_reproduce:
|
|
11724
|
-
expected_behavior:
|
|
11725
|
-
actual_behavior:
|
|
11726
|
-
severity:
|
|
11727
|
-
product:
|
|
11728
|
-
use_case:
|
|
11729
|
-
proposed_solution:
|
|
11730
|
-
priority:
|
|
11731
|
-
id:
|
|
11732
|
-
status:
|
|
11733
|
-
classification:
|
|
11734
|
-
resolution:
|
|
11735
|
-
notes:
|
|
11736
|
-
triage_notes:
|
|
11737
|
-
linked_task_id:
|
|
11738
|
-
linked_commit:
|
|
11739
|
-
fixed_version:
|
|
11740
|
-
shipped_version:
|
|
11741
|
-
limit:
|
|
11742
|
-
since_hours:
|
|
11809
|
+
title: z96.string().optional().describe("Bug/feature title"),
|
|
11810
|
+
description: z96.string().optional().describe("Bug/feature description"),
|
|
11811
|
+
steps_to_reproduce: z96.string().optional().describe("Steps to reproduce (bugs)"),
|
|
11812
|
+
expected_behavior: z96.string().optional().describe("Expected behavior (bugs)"),
|
|
11813
|
+
actual_behavior: z96.string().optional().describe("Actual behavior (bugs)"),
|
|
11814
|
+
severity: z96.string().optional().describe("Severity: p0/p1/p2/p3"),
|
|
11815
|
+
product: z96.string().optional().describe("Product: exe-os (default), exe-create, exe-wiki, exe-gateway, exe-crm, exe-build"),
|
|
11816
|
+
use_case: z96.string().optional().describe("Use case (features)"),
|
|
11817
|
+
proposed_solution: z96.string().optional().describe("Proposed solution (features)"),
|
|
11818
|
+
priority: z96.string().optional().describe("Priority (features)"),
|
|
11819
|
+
id: z96.string().optional().describe("Bug/feature ID for get/triage"),
|
|
11820
|
+
status: z96.string().optional().describe("Filter by status"),
|
|
11821
|
+
classification: z96.string().optional().describe("Triage classification"),
|
|
11822
|
+
resolution: z96.string().optional().describe("Triage resolution"),
|
|
11823
|
+
notes: z96.string().optional().describe("Triage notes (mapped to triage_notes for bug/feature triage)"),
|
|
11824
|
+
triage_notes: z96.string().optional().describe("Triage notes (legacy field name)"),
|
|
11825
|
+
linked_task_id: z96.string().optional().describe("Linked task ID for triage"),
|
|
11826
|
+
linked_commit: z96.string().optional().describe("Linked commit hash for triage"),
|
|
11827
|
+
fixed_version: z96.string().optional().describe("Version that fixes this bug"),
|
|
11828
|
+
shipped_version: z96.string().optional().describe("Version that ships this feature (features only)"),
|
|
11829
|
+
limit: z96.coerce.number().optional().describe("Max results"),
|
|
11830
|
+
since_hours: z96.coerce.number().optional().describe("Telemetry window in hours for send_telemetry")
|
|
11743
11831
|
}
|
|
11744
11832
|
},
|
|
11745
11833
|
async (input, extra) => {
|
|
@@ -11831,7 +11919,7 @@ function registerSupportConsolidated(server) {
|
|
|
11831
11919
|
}
|
|
11832
11920
|
|
|
11833
11921
|
// src/mcp/tools/diagnostics.ts
|
|
11834
|
-
import { z as
|
|
11922
|
+
import { z as z97 } from "zod";
|
|
11835
11923
|
function buildHandlers9() {
|
|
11836
11924
|
const tools = /* @__PURE__ */ new Map();
|
|
11837
11925
|
const fake = {
|
|
@@ -11852,17 +11940,17 @@ function registerDiagnostics(server) {
|
|
|
11852
11940
|
title: "Diagnostics",
|
|
11853
11941
|
description: `System diagnostics and admin operations. Actions: ${toolNames.join(", ")}. Covers health checks, update status, cloud status, key management, employee rename, semantic tool discovery (tool_search), identity drift detection (drift), agent liveness monitoring (agent_liveness), and agent memory reassignment (merge_agent_memories).`,
|
|
11854
11942
|
inputSchema: {
|
|
11855
|
-
action:
|
|
11943
|
+
action: z97.string().describe(`Diagnostic operation: ${toolNames.join(", ")}`),
|
|
11856
11944
|
// Pass-through params used by various sub-tools
|
|
11857
|
-
agent_id:
|
|
11858
|
-
name:
|
|
11859
|
-
new_name:
|
|
11860
|
-
query:
|
|
11861
|
-
format:
|
|
11862
|
-
limit:
|
|
11863
|
-
from_agent_id:
|
|
11864
|
-
to_agent_id:
|
|
11865
|
-
dry_run:
|
|
11945
|
+
agent_id: z97.string().optional().describe("Agent to probe (drift). Defaults to all agents."),
|
|
11946
|
+
name: z97.string().optional().describe("Employee name (rename_employee)"),
|
|
11947
|
+
new_name: z97.string().optional().describe("New employee name (rename_employee)"),
|
|
11948
|
+
query: z97.string().optional().describe("Search/filter query, or natural language for tool_search"),
|
|
11949
|
+
format: z97.string().optional().describe("Output format"),
|
|
11950
|
+
limit: z97.coerce.number().int().min(1).max(100).optional().describe("Max results for tool_search (default 20)"),
|
|
11951
|
+
from_agent_id: z97.string().optional().describe("Source agent ID to merge from (merge_agent_memories)"),
|
|
11952
|
+
to_agent_id: z97.string().optional().describe("Target agent ID to merge into (merge_agent_memories)"),
|
|
11953
|
+
dry_run: z97.boolean().optional().default(true).describe("Preview mode \u2014 show count without changing (merge_agent_memories). Default: true")
|
|
11866
11954
|
}
|
|
11867
11955
|
},
|
|
11868
11956
|
async (input, extra) => {
|
|
@@ -12272,6 +12360,7 @@ function registerAllTools(server, license, hasKey) {
|
|
|
12272
12360
|
gate("registerStoreBehavior", registerStoreBehavior);
|
|
12273
12361
|
gate("registerListBehaviors", registerListBehaviors);
|
|
12274
12362
|
gate("registerDeactivateBehavior", registerDeactivateBehavior);
|
|
12363
|
+
gate("registerReactivateBehavior", registerReactivateBehavior);
|
|
12275
12364
|
gate("registerCreateReminder", registerCreateReminder);
|
|
12276
12365
|
gate("registerListReminders", registerListReminders);
|
|
12277
12366
|
gate("registerCompleteReminder", registerCompleteReminder);
|