@adhd/agent-mcp 0.0.1
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/drizzle/0000_nifty_sasquatch.sql +55 -0
- package/drizzle/meta/0000_snapshot.json +387 -0
- package/drizzle/meta/_journal.json +13 -0
- package/package.json +51 -0
- package/src/clients/http-client.d.ts +24 -0
- package/src/clients/http-client.d.ts.map +1 -0
- package/src/clients/http-client.js +96 -0
- package/src/clients/http-client.js.map +1 -0
- package/src/clients/in-process.d.ts +27 -0
- package/src/clients/in-process.d.ts.map +1 -0
- package/src/clients/in-process.js +32 -0
- package/src/clients/in-process.js.map +1 -0
- package/src/clients/index.d.ts +7 -0
- package/src/clients/index.d.ts.map +1 -0
- package/src/clients/index.js +5 -0
- package/src/clients/index.js.map +1 -0
- package/src/clients/registry.d.ts +37 -0
- package/src/clients/registry.d.ts.map +1 -0
- package/src/clients/registry.js +125 -0
- package/src/clients/registry.js.map +1 -0
- package/src/clients/stdio-client.d.ts +16 -0
- package/src/clients/stdio-client.d.ts.map +1 -0
- package/src/clients/stdio-client.js +90 -0
- package/src/clients/stdio-client.js.map +1 -0
- package/src/clients/types.d.ts +14 -0
- package/src/clients/types.d.ts.map +1 -0
- package/src/clients/types.js +2 -0
- package/src/clients/types.js.map +1 -0
- package/src/db/client.d.ts +6 -0
- package/src/db/client.d.ts.map +1 -0
- package/src/db/client.js +19 -0
- package/src/db/client.js.map +1 -0
- package/src/db/migrate.d.ts +6 -0
- package/src/db/migrate.d.ts.map +1 -0
- package/src/db/migrate.js +12 -0
- package/src/db/migrate.js.map +1 -0
- package/src/db/schema.d.ts +733 -0
- package/src/db/schema.d.ts.map +1 -0
- package/src/db/schema.js +100 -0
- package/src/db/schema.js.map +1 -0
- package/src/engine/orchestrator.d.ts +24 -0
- package/src/engine/orchestrator.d.ts.map +1 -0
- package/src/engine/orchestrator.js +231 -0
- package/src/engine/orchestrator.js.map +1 -0
- package/src/engine/policy.d.ts +42 -0
- package/src/engine/policy.d.ts.map +1 -0
- package/src/engine/policy.js +45 -0
- package/src/engine/policy.js.map +1 -0
- package/src/engine/queue.d.ts +23 -0
- package/src/engine/queue.d.ts.map +1 -0
- package/src/engine/queue.js +45 -0
- package/src/engine/queue.js.map +1 -0
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -0
- package/src/index.js +51 -0
- package/src/index.js.map +1 -0
- package/src/logger.d.ts +11 -0
- package/src/logger.d.ts.map +1 -0
- package/src/logger.js +17 -0
- package/src/logger.js.map +1 -0
- package/src/providers/anthropic.d.ts +11 -0
- package/src/providers/anthropic.d.ts.map +1 -0
- package/src/providers/anthropic.js +133 -0
- package/src/providers/anthropic.js.map +1 -0
- package/src/providers/factory.d.ts +7 -0
- package/src/providers/factory.d.ts.map +1 -0
- package/src/providers/factory.js +21 -0
- package/src/providers/factory.js.map +1 -0
- package/src/providers/index.d.ts +6 -0
- package/src/providers/index.d.ts.map +1 -0
- package/src/providers/index.js +5 -0
- package/src/providers/index.js.map +1 -0
- package/src/providers/lmstudio.d.ts +8 -0
- package/src/providers/lmstudio.d.ts.map +1 -0
- package/src/providers/lmstudio.js +15 -0
- package/src/providers/lmstudio.js.map +1 -0
- package/src/providers/openai.d.ts +12 -0
- package/src/providers/openai.d.ts.map +1 -0
- package/src/providers/openai.js +129 -0
- package/src/providers/openai.js.map +1 -0
- package/src/providers/types.d.ts +32 -0
- package/src/providers/types.d.ts.map +1 -0
- package/src/providers/types.js +2 -0
- package/src/providers/types.js.map +1 -0
- package/src/server.d.ts +23 -0
- package/src/server.d.ts.map +1 -0
- package/src/server.js +539 -0
- package/src/server.js.map +1 -0
- package/src/store/agent-store.d.ts +12 -0
- package/src/store/agent-store.d.ts.map +1 -0
- package/src/store/agent-store.js +97 -0
- package/src/store/agent-store.js.map +1 -0
- package/src/store/index.d.ts +4 -0
- package/src/store/index.d.ts.map +1 -0
- package/src/store/index.js +4 -0
- package/src/store/index.js.map +1 -0
- package/src/store/session-store.d.ts +23 -0
- package/src/store/session-store.d.ts.map +1 -0
- package/src/store/session-store.js +152 -0
- package/src/store/session-store.js.map +1 -0
- package/src/store/task-store.d.ts +49 -0
- package/src/store/task-store.d.ts.map +1 -0
- package/src/store/task-store.js +154 -0
- package/src/store/task-store.js.map +1 -0
- package/src/tools/agent-crud.d.ts +13 -0
- package/src/tools/agent-crud.d.ts.map +1 -0
- package/src/tools/agent-crud.js +17 -0
- package/src/tools/agent-crud.js.map +1 -0
- package/src/tools/session.d.ts +21 -0
- package/src/tools/session.d.ts.map +1 -0
- package/src/tools/session.js +41 -0
- package/src/tools/session.js.map +1 -0
- package/src/tools/task.d.ts +38 -0
- package/src/tools/task.d.ts.map +1 -0
- package/src/tools/task.js +136 -0
- package/src/tools/task.js.map +1 -0
- package/src/types/agent.d.ts +2 -0
- package/src/types/agent.d.ts.map +1 -0
- package/src/types/agent.js +3 -0
- package/src/types/agent.js.map +1 -0
- package/src/types/execution.d.ts +2 -0
- package/src/types/execution.d.ts.map +1 -0
- package/src/types/execution.js +3 -0
- package/src/types/execution.js.map +1 -0
- package/src/types/index.d.ts +2 -0
- package/src/types/index.d.ts.map +1 -0
- package/src/types/index.js +2 -0
- package/src/types/index.js.map +1 -0
- package/src/types/mcp.d.ts +2 -0
- package/src/types/mcp.d.ts.map +1 -0
- package/src/types/mcp.js +3 -0
- package/src/types/mcp.js.map +1 -0
- package/src/types/message.d.ts +2 -0
- package/src/types/message.d.ts.map +1 -0
- package/src/types/message.js +3 -0
- package/src/types/message.js.map +1 -0
- package/src/types/session.d.ts +2 -0
- package/src/types/session.d.ts.map +1 -0
- package/src/types/session.js +3 -0
- package/src/types/session.js.map +1 -0
- package/src/types/task.d.ts +2 -0
- package/src/types/task.d.ts.map +1 -0
- package/src/types/task.js +3 -0
- package/src/types/task.js.map +1 -0
- package/src/utils/ids.d.ts +2 -0
- package/src/utils/ids.d.ts.map +1 -0
- package/src/utils/ids.js +5 -0
- package/src/utils/ids.js.map +1 -0
- package/src/utils/logger.d.ts +2 -0
- package/src/utils/logger.d.ts.map +1 -0
- package/src/utils/logger.js +5 -0
- package/src/utils/logger.js.map +1 -0
- package/src/utils/timestamps.d.ts +2 -0
- package/src/utils/timestamps.d.ts.map +1 -0
- package/src/utils/timestamps.js +4 -0
- package/src/utils/timestamps.js.map +1 -0
- package/src/validation/agent.d.ts +276 -0
- package/src/validation/agent.d.ts.map +1 -0
- package/src/validation/agent.js +94 -0
- package/src/validation/agent.js.map +1 -0
- package/src/validation/agents.d.ts +2 -0
- package/src/validation/agents.d.ts.map +1 -0
- package/src/validation/agents.js +3 -0
- package/src/validation/agents.js.map +1 -0
- package/src/validation/errors.d.ts +23 -0
- package/src/validation/errors.d.ts.map +1 -0
- package/src/validation/errors.js +33 -0
- package/src/validation/errors.js.map +1 -0
- package/src/validation/execution.d.ts +83 -0
- package/src/validation/execution.d.ts.map +1 -0
- package/src/validation/execution.js +23 -0
- package/src/validation/execution.js.map +1 -0
- package/src/validation/index.d.ts +8 -0
- package/src/validation/index.d.ts.map +1 -0
- package/src/validation/index.js +8 -0
- package/src/validation/index.js.map +1 -0
- package/src/validation/mcp.d.ts +43 -0
- package/src/validation/mcp.d.ts.map +1 -0
- package/src/validation/mcp.js +28 -0
- package/src/validation/mcp.js.map +1 -0
- package/src/validation/message.d.ts +46 -0
- package/src/validation/message.d.ts.map +1 -0
- package/src/validation/message.js +23 -0
- package/src/validation/message.js.map +1 -0
- package/src/validation/session.d.ts +49 -0
- package/src/validation/session.d.ts.map +1 -0
- package/src/validation/session.js +34 -0
- package/src/validation/session.js.map +1 -0
- package/src/validation/task.d.ts +94 -0
- package/src/validation/task.d.ts.map +1 -0
- package/src/validation/task.js +60 -0
- package/src/validation/task.js.map +1 -0
- package/src/validation/tasks.d.ts +2 -0
- package/src/validation/tasks.d.ts.map +1 -0
- package/src/validation/tasks.js +3 -0
- package/src/validation/tasks.js.map +1 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { logger } from "../logger.js";
|
|
2
|
+
import { createProvider } from "../providers/factory.js";
|
|
3
|
+
import { McpClientRegistry as McpClientRegistryCtor } from "../clients/registry.js";
|
|
4
|
+
import { ToolError } from "../validation/errors.js";
|
|
5
|
+
import { generateId } from "../utils/ids.js";
|
|
6
|
+
import { nowIso } from "../utils/timestamps.js";
|
|
7
|
+
/**
|
|
8
|
+
* `task` tool — runs a prompt against a session's agent.
|
|
9
|
+
*
|
|
10
|
+
* Mandatory order (per plan Gap 17):
|
|
11
|
+
* 1. Validate session exists and is active
|
|
12
|
+
* 2. Load snapshotted AgentDefinition
|
|
13
|
+
* 3. Create Task row
|
|
14
|
+
* 4. Build ExecutionContext
|
|
15
|
+
* 5. Create AbortController
|
|
16
|
+
* 6. Register cancellation
|
|
17
|
+
* 7. Build provider
|
|
18
|
+
* 8. Build per-task registry
|
|
19
|
+
* 9. Run orchestrator (background or sync)
|
|
20
|
+
*/
|
|
21
|
+
export async function taskTool(input, deps, callerContext) {
|
|
22
|
+
// 1. Validate session
|
|
23
|
+
const session = deps.sessionStore.read(input.session_id);
|
|
24
|
+
if (session.status !== "active") {
|
|
25
|
+
throw new ToolError("SESSION_CLOSED", `Session '${input.session_id}' is closed`);
|
|
26
|
+
}
|
|
27
|
+
// 2. Load snapshotted agent definition
|
|
28
|
+
const agentDefinition = deps.sessionStore.getAgentDefinition(input.session_id);
|
|
29
|
+
// 3. Create task row
|
|
30
|
+
const task = deps.taskStore.create({
|
|
31
|
+
sessionId: input.session_id,
|
|
32
|
+
prompt: input.prompt,
|
|
33
|
+
parentTaskId: callerContext?.taskId,
|
|
34
|
+
recursionDepth: (callerContext?.recursionDepth ?? -1) + 1,
|
|
35
|
+
});
|
|
36
|
+
// 4. Build execution context
|
|
37
|
+
const executionContext = {
|
|
38
|
+
taskId: task.id,
|
|
39
|
+
sessionId: input.session_id,
|
|
40
|
+
agentName: agentDefinition.name,
|
|
41
|
+
agentDefinition,
|
|
42
|
+
callingAgentName: callerContext?.agentName,
|
|
43
|
+
parentTaskId: callerContext?.taskId,
|
|
44
|
+
recursionDepth: (callerContext?.recursionDepth ?? -1) + 1,
|
|
45
|
+
toolCallCount: 0,
|
|
46
|
+
};
|
|
47
|
+
// 5. Create AbortController
|
|
48
|
+
const controller = new AbortController();
|
|
49
|
+
// 6. Register cancellation
|
|
50
|
+
deps.taskStore.registerCancellation(task.id, controller);
|
|
51
|
+
// 7. Build provider
|
|
52
|
+
const provider = createProvider(agentDefinition.provider);
|
|
53
|
+
// Build initial messages
|
|
54
|
+
const existingMessages = deps.sessionStore.getMessages(input.session_id);
|
|
55
|
+
const userMessage = {
|
|
56
|
+
id: generateId(),
|
|
57
|
+
sessionId: input.session_id,
|
|
58
|
+
role: "user",
|
|
59
|
+
content: input.prompt,
|
|
60
|
+
createdAt: nowIso(),
|
|
61
|
+
};
|
|
62
|
+
await deps.sessionStore.appendMessage(input.session_id, userMessage);
|
|
63
|
+
const messages = [...existingMessages, userMessage];
|
|
64
|
+
// Add system message if the agent has one
|
|
65
|
+
const allMessages = agentDefinition.systemPrompt
|
|
66
|
+
? [
|
|
67
|
+
{
|
|
68
|
+
id: generateId(),
|
|
69
|
+
sessionId: input.session_id,
|
|
70
|
+
role: "system",
|
|
71
|
+
content: agentDefinition.systemPrompt,
|
|
72
|
+
createdAt: nowIso(),
|
|
73
|
+
},
|
|
74
|
+
...messages,
|
|
75
|
+
]
|
|
76
|
+
: messages;
|
|
77
|
+
// 8. Build per-task registry
|
|
78
|
+
const registry = new McpClientRegistryCtor(
|
|
79
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
80
|
+
agentDefinition.mcpServers, deps.selfUrl, deps.inProcessDescriptors, deps.inProcessHandler, executionContext);
|
|
81
|
+
// 9. Run orchestrator
|
|
82
|
+
const runTask = async () => {
|
|
83
|
+
await deps.orchestrator.run({
|
|
84
|
+
executionContext,
|
|
85
|
+
messages: allMessages,
|
|
86
|
+
registry,
|
|
87
|
+
provider,
|
|
88
|
+
policy: deps.policy,
|
|
89
|
+
taskStore: deps.taskStore,
|
|
90
|
+
sessionStore: deps.sessionStore,
|
|
91
|
+
signal: controller.signal,
|
|
92
|
+
taskId: task.id,
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
if (input.background) {
|
|
96
|
+
// Enqueue for background execution — return immediately
|
|
97
|
+
deps.queue.enqueue(task.id, runTask);
|
|
98
|
+
logger.info({ taskId: task.id, sessionId: input.session_id }, "Task enqueued for background execution");
|
|
99
|
+
return {
|
|
100
|
+
task_id: task.id,
|
|
101
|
+
status: "pending",
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
// Synchronous execution — wait for completion
|
|
106
|
+
try {
|
|
107
|
+
await runTask();
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
// Orchestrator already updated the task status
|
|
111
|
+
// Return the current task state
|
|
112
|
+
}
|
|
113
|
+
const finalTask = deps.taskStore.read(task.id);
|
|
114
|
+
return {
|
|
115
|
+
task_id: finalTask.id,
|
|
116
|
+
status: finalTask.status,
|
|
117
|
+
result: finalTask.result,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export function taskList(input, deps) {
|
|
122
|
+
return deps.taskStore.list(input);
|
|
123
|
+
}
|
|
124
|
+
export function taskCancel(input, deps) {
|
|
125
|
+
const task = deps.taskStore.read(input.task_id); // throws TASK_NOT_FOUND
|
|
126
|
+
const cancellableStatuses = ["pending", "running"];
|
|
127
|
+
if (!cancellableStatuses.includes(task.status)) {
|
|
128
|
+
throw new ToolError("TASK_NOT_CANCELLABLE", `Task '${input.task_id}' has status '${task.status}' and cannot be cancelled`);
|
|
129
|
+
}
|
|
130
|
+
deps.taskStore.cancel(input.task_id);
|
|
131
|
+
return { success: true };
|
|
132
|
+
}
|
|
133
|
+
export function resultTool(input, deps) {
|
|
134
|
+
return deps.taskStore.read(input.task_id); // throws TASK_NOT_FOUND
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/agent.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/execution.ts"],"names":[],"mappings":"AACA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"execution.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/execution.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/mcp.ts"],"names":[],"mappings":"AACA,cAAc,sBAAsB,CAAC"}
|
package/src/types/mcp.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/mcp.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/message.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/message.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/session.ts"],"names":[],"mappings":"AACA,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/session.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/task.ts"],"names":[],"mappings":"AACA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/types/task.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/utils/ids.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,IAAI,MAAM,CAEnC"}
|
package/src/utils/ids.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/utils/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AAEpC,MAAM,UAAU,UAAU;IACtB,OAAO,MAAM,EAAE,CAAC;AACpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/utils/logger.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/utils/logger.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,0EAA0E;AAC1E,+BAA+B;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamps.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/utils/timestamps.ts"],"names":[],"mappings":"AAAA,wBAAgB,MAAM,IAAI,MAAM,CAE/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timestamps.js","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/utils/timestamps.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,MAAM;IAClB,OAAO,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const retryConfigSchema: z.ZodObject<{
|
|
3
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
4
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
5
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
6
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
7
|
+
}, z.core.$strip>;
|
|
8
|
+
export declare const providerConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
9
|
+
type: z.ZodLiteral<"anthropic">;
|
|
10
|
+
model: z.ZodString;
|
|
11
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
12
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
13
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
14
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
16
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
18
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
19
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
20
|
+
}, z.core.$strip>>;
|
|
21
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
22
|
+
type: z.ZodLiteral<"openai">;
|
|
23
|
+
model: z.ZodString;
|
|
24
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
25
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
26
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
27
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
30
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
31
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
32
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
33
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
34
|
+
}, z.core.$strip>>;
|
|
35
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
36
|
+
type: z.ZodLiteral<"lmstudio">;
|
|
37
|
+
model: z.ZodString;
|
|
38
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
39
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
40
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
41
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
42
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
43
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
45
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
46
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
47
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
48
|
+
}, z.core.$strip>>;
|
|
49
|
+
}, z.core.$strip>], "type">;
|
|
50
|
+
export type ProviderConfig = z.infer<typeof providerConfigSchema>;
|
|
51
|
+
export declare const agentPermissionsSchema: z.ZodObject<{
|
|
52
|
+
allowedAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
export type AgentPermissions = z.infer<typeof agentPermissionsSchema>;
|
|
55
|
+
export declare const agentDefinitionSchema: z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
description: z.ZodOptional<z.ZodString>;
|
|
58
|
+
version: z.ZodNumber;
|
|
59
|
+
provider: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
60
|
+
type: z.ZodLiteral<"anthropic">;
|
|
61
|
+
model: z.ZodString;
|
|
62
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
63
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
64
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
65
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
66
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
69
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>>;
|
|
72
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
73
|
+
type: z.ZodLiteral<"openai">;
|
|
74
|
+
model: z.ZodString;
|
|
75
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
76
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
77
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
78
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
80
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
81
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
82
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
83
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
84
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
87
|
+
type: z.ZodLiteral<"lmstudio">;
|
|
88
|
+
model: z.ZodString;
|
|
89
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
90
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
91
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
96
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
98
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
}, z.core.$strip>], "type">;
|
|
101
|
+
systemPrompt: z.ZodString;
|
|
102
|
+
mcpServers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
103
|
+
transport: z.ZodLiteral<"stdio">;
|
|
104
|
+
command: z.ZodString;
|
|
105
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
107
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
transport: z.ZodLiteral<"http">;
|
|
110
|
+
url: z.ZodString;
|
|
111
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
112
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
+
transport: z.ZodLiteral<"sse">;
|
|
115
|
+
url: z.ZodString;
|
|
116
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
117
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
}, z.core.$strip>], "transport">>>;
|
|
119
|
+
permissions: z.ZodDefault<z.ZodObject<{
|
|
120
|
+
allowedAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
maxToolLoops: z.ZodOptional<z.ZodNumber>;
|
|
123
|
+
createdAt: z.ZodString;
|
|
124
|
+
updatedAt: z.ZodString;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
export type AgentDefinition = z.infer<typeof agentDefinitionSchema>;
|
|
127
|
+
export declare const agentCreateInputSchema: z.ZodObject<{
|
|
128
|
+
name: z.ZodString;
|
|
129
|
+
description: z.ZodOptional<z.ZodString>;
|
|
130
|
+
provider: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
131
|
+
type: z.ZodLiteral<"anthropic">;
|
|
132
|
+
model: z.ZodString;
|
|
133
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
134
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
135
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
137
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
138
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
139
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
140
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
141
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
142
|
+
}, z.core.$strip>>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"openai">;
|
|
145
|
+
model: z.ZodString;
|
|
146
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
147
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
148
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
150
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
153
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
154
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
155
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
+
type: z.ZodLiteral<"lmstudio">;
|
|
159
|
+
model: z.ZodString;
|
|
160
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
161
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
162
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
163
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
164
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
165
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
166
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
167
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
168
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
169
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
170
|
+
}, z.core.$strip>>;
|
|
171
|
+
}, z.core.$strip>], "type">;
|
|
172
|
+
systemPrompt: z.ZodString;
|
|
173
|
+
mcpServers: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
174
|
+
transport: z.ZodLiteral<"stdio">;
|
|
175
|
+
command: z.ZodString;
|
|
176
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
177
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
178
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
+
transport: z.ZodLiteral<"http">;
|
|
181
|
+
url: z.ZodString;
|
|
182
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
183
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
transport: z.ZodLiteral<"sse">;
|
|
186
|
+
url: z.ZodString;
|
|
187
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
188
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
189
|
+
}, z.core.$strip>], "transport">>>;
|
|
190
|
+
permissions: z.ZodDefault<z.ZodObject<{
|
|
191
|
+
allowedAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
192
|
+
}, z.core.$strip>>;
|
|
193
|
+
maxToolLoops: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
}, z.core.$strip>;
|
|
195
|
+
export declare const agentUpdateInputSchema: z.ZodObject<{
|
|
196
|
+
name: z.ZodString;
|
|
197
|
+
patch: z.ZodObject<{
|
|
198
|
+
description: z.ZodOptional<z.ZodString>;
|
|
199
|
+
provider: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
200
|
+
type: z.ZodLiteral<"anthropic">;
|
|
201
|
+
model: z.ZodString;
|
|
202
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
203
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
204
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
205
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
206
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
208
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
209
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
210
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
211
|
+
}, z.core.$strip>>;
|
|
212
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
213
|
+
type: z.ZodLiteral<"openai">;
|
|
214
|
+
model: z.ZodString;
|
|
215
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
216
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
217
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
219
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
220
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
221
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
222
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
223
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
224
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
225
|
+
}, z.core.$strip>>;
|
|
226
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
227
|
+
type: z.ZodLiteral<"lmstudio">;
|
|
228
|
+
model: z.ZodString;
|
|
229
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
230
|
+
baseURL: z.ZodOptional<z.ZodString>;
|
|
231
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
retryConfig: z.ZodOptional<z.ZodObject<{
|
|
235
|
+
retries: z.ZodDefault<z.ZodNumber>;
|
|
236
|
+
minTimeout: z.ZodDefault<z.ZodNumber>;
|
|
237
|
+
maxTimeout: z.ZodDefault<z.ZodNumber>;
|
|
238
|
+
factor: z.ZodDefault<z.ZodNumber>;
|
|
239
|
+
}, z.core.$strip>>;
|
|
240
|
+
}, z.core.$strip>], "type">>;
|
|
241
|
+
systemPrompt: z.ZodOptional<z.ZodString>;
|
|
242
|
+
mcpServers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
243
|
+
transport: z.ZodLiteral<"stdio">;
|
|
244
|
+
command: z.ZodString;
|
|
245
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
246
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
247
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
249
|
+
transport: z.ZodLiteral<"http">;
|
|
250
|
+
url: z.ZodString;
|
|
251
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
252
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
254
|
+
transport: z.ZodLiteral<"sse">;
|
|
255
|
+
url: z.ZodString;
|
|
256
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
257
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
258
|
+
}, z.core.$strip>], "transport">>>;
|
|
259
|
+
permissions: z.ZodOptional<z.ZodObject<{
|
|
260
|
+
allowedAgents: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
261
|
+
}, z.core.$strip>>;
|
|
262
|
+
maxToolLoops: z.ZodOptional<z.ZodNumber>;
|
|
263
|
+
}, z.core.$strip>;
|
|
264
|
+
}, z.core.$strip>;
|
|
265
|
+
export declare const agentReadInputSchema: z.ZodObject<{
|
|
266
|
+
name: z.ZodString;
|
|
267
|
+
}, z.core.$strip>;
|
|
268
|
+
export declare const agentDeleteInputSchema: z.ZodObject<{
|
|
269
|
+
name: z.ZodString;
|
|
270
|
+
}, z.core.$strip>;
|
|
271
|
+
export declare const agentListInputSchema: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
|
|
272
|
+
export type AgentCreateInput = z.infer<typeof agentCreateInputSchema>;
|
|
273
|
+
export type AgentUpdateInput = z.infer<typeof agentUpdateInputSchema>;
|
|
274
|
+
export type AgentReadInput = z.infer<typeof agentReadInputSchema>;
|
|
275
|
+
export type AgentDeleteInput = z.infer<typeof agentDeleteInputSchema>;
|
|
276
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../../../../packages/ai/agent-mcp/src/validation/agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,iBAAiB;;;;;iBAK5B,CAAC;AAmCH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAI/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGlE,eAAO,MAAM,sBAAsB;;iBAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAGtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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