@contractspec/example.agent-console 1.44.0
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/.turbo/turbo-build$colon$bundle.log +133 -0
- package/.turbo/turbo-build.log +134 -0
- package/CHANGELOG.md +212 -0
- package/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/agent/agent.entity.d.ts +55 -0
- package/dist/agent/agent.entity.d.ts.map +1 -0
- package/dist/agent/agent.entity.js +136 -0
- package/dist/agent/agent.entity.js.map +1 -0
- package/dist/agent/agent.enum.d.ts +18 -0
- package/dist/agent/agent.enum.d.ts.map +1 -0
- package/dist/agent/agent.enum.js +34 -0
- package/dist/agent/agent.enum.js.map +1 -0
- package/dist/agent/agent.event.d.ts +128 -0
- package/dist/agent/agent.event.d.ts.map +1 -0
- package/dist/agent/agent.event.js +210 -0
- package/dist/agent/agent.event.js.map +1 -0
- package/dist/agent/agent.handler.d.ts +100 -0
- package/dist/agent/agent.handler.d.ts.map +1 -0
- package/dist/agent/agent.handler.js +84 -0
- package/dist/agent/agent.handler.js.map +1 -0
- package/dist/agent/agent.operation.d.ts +471 -0
- package/dist/agent/agent.operation.d.ts.map +1 -0
- package/dist/agent/agent.operation.js +486 -0
- package/dist/agent/agent.operation.js.map +1 -0
- package/dist/agent/agent.presentation.d.ts +19 -0
- package/dist/agent/agent.presentation.d.ts.map +1 -0
- package/dist/agent/agent.presentation.js +89 -0
- package/dist/agent/agent.presentation.js.map +1 -0
- package/dist/agent/agent.schema.d.ts +401 -0
- package/dist/agent/agent.schema.d.ts.map +1 -0
- package/dist/agent/agent.schema.js +406 -0
- package/dist/agent/agent.schema.js.map +1 -0
- package/dist/agent/index.d.ts +8 -0
- package/dist/agent/index.js +9 -0
- package/dist/agent.feature.d.ts +12 -0
- package/dist/agent.feature.d.ts.map +1 -0
- package/dist/agent.feature.js +303 -0
- package/dist/agent.feature.js.map +1 -0
- package/dist/docs/agent-console.docblock.d.ts +1 -0
- package/dist/docs/agent-console.docblock.js +113 -0
- package/dist/docs/agent-console.docblock.js.map +1 -0
- package/dist/docs/index.d.ts +1 -0
- package/dist/docs/index.js +1 -0
- package/dist/example.d.ts +40 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +51 -0
- package/dist/example.js.map +1 -0
- package/dist/handlers/index.d.ts +4 -0
- package/dist/handlers/index.js +5 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +32 -0
- package/dist/presentations/index.d.ts +4 -0
- package/dist/presentations/index.js +5 -0
- package/dist/run/index.d.ts +8 -0
- package/dist/run/index.js +9 -0
- package/dist/run/run.entity.d.ts +82 -0
- package/dist/run/run.entity.d.ts.map +1 -0
- package/dist/run/run.entity.js +205 -0
- package/dist/run/run.entity.js.map +1 -0
- package/dist/run/run.enum.d.ts +22 -0
- package/dist/run/run.enum.d.ts.map +1 -0
- package/dist/run/run.enum.js +45 -0
- package/dist/run/run.enum.js.map +1 -0
- package/dist/run/run.event.d.ts +290 -0
- package/dist/run/run.event.d.ts.map +1 -0
- package/dist/run/run.event.js +434 -0
- package/dist/run/run.event.js.map +1 -0
- package/dist/run/run.handler.d.ts +203 -0
- package/dist/run/run.handler.d.ts.map +1 -0
- package/dist/run/run.handler.js +83 -0
- package/dist/run/run.handler.js.map +1 -0
- package/dist/run/run.operation.d.ts +720 -0
- package/dist/run/run.operation.d.ts.map +1 -0
- package/dist/run/run.operation.js +626 -0
- package/dist/run/run.operation.js.map +1 -0
- package/dist/run/run.presentation.d.ts +15 -0
- package/dist/run/run.presentation.d.ts.map +1 -0
- package/dist/run/run.presentation.js +65 -0
- package/dist/run/run.presentation.js.map +1 -0
- package/dist/run/run.schema.d.ts +416 -0
- package/dist/run/run.schema.d.ts.map +1 -0
- package/dist/run/run.schema.js +338 -0
- package/dist/run/run.schema.js.map +1 -0
- package/dist/shared/index.d.ts +4 -0
- package/dist/shared/index.js +5 -0
- package/dist/shared/mock-agents.d.ts +88 -0
- package/dist/shared/mock-agents.d.ts.map +1 -0
- package/dist/shared/mock-agents.js +94 -0
- package/dist/shared/mock-agents.js.map +1 -0
- package/dist/shared/mock-runs.d.ts +120 -0
- package/dist/shared/mock-runs.d.ts.map +1 -0
- package/dist/shared/mock-runs.js +118 -0
- package/dist/shared/mock-runs.js.map +1 -0
- package/dist/shared/mock-tools.d.ts +244 -0
- package/dist/shared/mock-tools.d.ts.map +1 -0
- package/dist/shared/mock-tools.js +181 -0
- package/dist/shared/mock-tools.js.map +1 -0
- package/dist/tool/index.d.ts +8 -0
- package/dist/tool/index.js +9 -0
- package/dist/tool/tool.entity.d.ts +42 -0
- package/dist/tool/tool.entity.d.ts.map +1 -0
- package/dist/tool/tool.entity.js +105 -0
- package/dist/tool/tool.entity.js.map +1 -0
- package/dist/tool/tool.enum.d.ts +18 -0
- package/dist/tool/tool.enum.d.ts.map +1 -0
- package/dist/tool/tool.enum.js +35 -0
- package/dist/tool/tool.enum.js.map +1 -0
- package/dist/tool/tool.event.d.ts +103 -0
- package/dist/tool/tool.event.d.ts.map +1 -0
- package/dist/tool/tool.event.js +159 -0
- package/dist/tool/tool.event.js.map +1 -0
- package/dist/tool/tool.handler.d.ts +315 -0
- package/dist/tool/tool.handler.d.ts.map +1 -0
- package/dist/tool/tool.handler.js +87 -0
- package/dist/tool/tool.handler.js.map +1 -0
- package/dist/tool/tool.operation.d.ts +411 -0
- package/dist/tool/tool.operation.d.ts.map +1 -0
- package/dist/tool/tool.operation.js +406 -0
- package/dist/tool/tool.operation.js.map +1 -0
- package/dist/tool/tool.presentation.d.ts +15 -0
- package/dist/tool/tool.presentation.d.ts.map +1 -0
- package/dist/tool/tool.presentation.js +65 -0
- package/dist/tool/tool.presentation.js.map +1 -0
- package/dist/tool/tool.schema.d.ts +218 -0
- package/dist/tool/tool.schema.d.ts.map +1 -0
- package/dist/tool/tool.schema.js +236 -0
- package/dist/tool/tool.schema.js.map +1 -0
- package/example.ts +1 -0
- package/package.json +123 -0
- package/src/agent/agent.entity.ts +137 -0
- package/src/agent/agent.enum.ts +31 -0
- package/src/agent/agent.event.ts +142 -0
- package/src/agent/agent.handler.ts +178 -0
- package/src/agent/agent.operation.ts +444 -0
- package/src/agent/agent.presentation.ts +81 -0
- package/src/agent/agent.schema.ts +214 -0
- package/src/agent/index.ts +67 -0
- package/src/agent.feature.ts +146 -0
- package/src/docs/agent-console.docblock.ts +97 -0
- package/src/docs/index.ts +1 -0
- package/src/example.ts +34 -0
- package/src/handlers/index.ts +27 -0
- package/src/index.ts +27 -0
- package/src/presentations/index.ts +26 -0
- package/src/run/index.ts +68 -0
- package/src/run/run.entity.ts +175 -0
- package/src/run/run.enum.ts +43 -0
- package/src/run/run.event.ts +264 -0
- package/src/run/run.handler.ts +138 -0
- package/src/run/run.operation.ts +524 -0
- package/src/run/run.presentation.ts +55 -0
- package/src/run/run.schema.ts +169 -0
- package/src/shared/index.ts +6 -0
- package/src/shared/mock-agents.ts +81 -0
- package/src/shared/mock-runs.ts +107 -0
- package/src/shared/mock-tools.ts +145 -0
- package/src/tool/index.ts +60 -0
- package/src/tool/tool.entity.ts +99 -0
- package/src/tool/tool.enum.ts +32 -0
- package/src/tool/tool.event.ts +119 -0
- package/src/tool/tool.handler.ts +154 -0
- package/src/tool/tool.operation.ts +366 -0
- package/src/tool/tool.presentation.ts +56 -0
- package/src/tool/tool.schema.ts +133 -0
- package/tsconfig.json +10 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsdown.config.js +7 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
//#region src/agent/agent.handler.d.ts
|
|
2
|
+
interface ListAgentsInput {
|
|
3
|
+
organizationId: string;
|
|
4
|
+
status?: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
5
|
+
modelProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
6
|
+
search?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
interface AgentSummary {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
status: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
16
|
+
modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
17
|
+
modelName: string;
|
|
18
|
+
version: string;
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
}
|
|
21
|
+
interface ListAgentsOutput {
|
|
22
|
+
items: AgentSummary[];
|
|
23
|
+
total: number;
|
|
24
|
+
hasMore: boolean;
|
|
25
|
+
}
|
|
26
|
+
interface GetAgentInput {
|
|
27
|
+
agentId: string;
|
|
28
|
+
includeTools?: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface AgentToolRef {
|
|
31
|
+
id: string;
|
|
32
|
+
name: string;
|
|
33
|
+
slug: string;
|
|
34
|
+
description: string;
|
|
35
|
+
category: string;
|
|
36
|
+
}
|
|
37
|
+
interface AgentWithTools {
|
|
38
|
+
id: string;
|
|
39
|
+
organizationId: string;
|
|
40
|
+
name: string;
|
|
41
|
+
slug: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
status: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
44
|
+
modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
45
|
+
modelName: string;
|
|
46
|
+
modelConfig?: Record<string, unknown>;
|
|
47
|
+
systemPrompt: string;
|
|
48
|
+
userPromptTemplate?: string;
|
|
49
|
+
toolIds?: string[];
|
|
50
|
+
toolChoice: 'auto' | 'required' | 'none';
|
|
51
|
+
maxIterations: number;
|
|
52
|
+
maxTokensPerRun?: number;
|
|
53
|
+
timeoutMs: number;
|
|
54
|
+
version: string;
|
|
55
|
+
tags?: string[];
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
updatedAt: Date;
|
|
58
|
+
tools?: AgentToolRef[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Mock handler for ListAgentsQuery.
|
|
62
|
+
*/
|
|
63
|
+
declare function mockListAgentsHandler(input: ListAgentsInput): Promise<ListAgentsOutput>;
|
|
64
|
+
/**
|
|
65
|
+
* Mock handler for GetAgentQuery.
|
|
66
|
+
*/
|
|
67
|
+
declare function mockGetAgentHandler(input: GetAgentInput): Promise<AgentWithTools>;
|
|
68
|
+
/**
|
|
69
|
+
* Mock handler for CreateAgentCommand.
|
|
70
|
+
*/
|
|
71
|
+
declare function mockCreateAgentHandler(input: {
|
|
72
|
+
organizationId: string;
|
|
73
|
+
name: string;
|
|
74
|
+
slug: string;
|
|
75
|
+
description?: string;
|
|
76
|
+
modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';
|
|
77
|
+
modelName: string;
|
|
78
|
+
systemPrompt: string;
|
|
79
|
+
}): Promise<{
|
|
80
|
+
id: string;
|
|
81
|
+
name: string;
|
|
82
|
+
slug: string;
|
|
83
|
+
status: "DRAFT";
|
|
84
|
+
}>;
|
|
85
|
+
/**
|
|
86
|
+
* Mock handler for UpdateAgentCommand.
|
|
87
|
+
*/
|
|
88
|
+
declare function mockUpdateAgentHandler(input: {
|
|
89
|
+
agentId: string;
|
|
90
|
+
name?: string;
|
|
91
|
+
status?: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';
|
|
92
|
+
}): Promise<{
|
|
93
|
+
id: string;
|
|
94
|
+
name: string;
|
|
95
|
+
status: "DRAFT" | "ACTIVE" | "PAUSED" | "ARCHIVED";
|
|
96
|
+
updatedAt: Date;
|
|
97
|
+
}>;
|
|
98
|
+
//#endregion
|
|
99
|
+
export { AgentSummary, AgentToolRef, AgentWithTools, GetAgentInput, ListAgentsInput, ListAgentsOutput, mockCreateAgentHandler, mockGetAgentHandler, mockListAgentsHandler, mockUpdateAgentHandler };
|
|
100
|
+
//# sourceMappingURL=agent.handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.handler.d.ts","names":[],"sources":["../../src/agent/agent.handler.ts"],"sourcesContent":[],"mappings":";UAMiB,eAAA;EAAA,cAAA,EAAA,MAAe;EASf,MAAA,CAAA,EAAA,OAAY,GAAA,QAShB,GAAA,QAAI,GAAA,UAAA;EAGA,aAAA,CAAA,EAAA,QAAgB,GAAA,WACxB,GAAA,QAAY,GAAA,SAAA,GAAA,QAAA;EAKJ,MAAA,CAAA,EAAA,MAAA;EAKA,KAAA,CAAA,EAAA,MAAA;EAQA,MAAA,CAAA,EAAA,MAAA;;AAmBJ,UAlDI,YAAA,CAkDJ;EACA,EAAA,EAAA,MAAA;EACH,IAAA,EAAA,MAAA;EAAY,IAAA,EAAA,MAAA;EAMA,WAAA,CAAA,EAAA,MAAA;EACb,MAAA,EAAA,OAAA,GAAA,QAAA,GAAA,QAAA,GAAA,UAAA;EACE,aAAA,EAAA,QAAA,GAAA,WAAA,GAAA,QAAA,GAAA,SAAA,GAAA,QAAA;EAAR,SAAA,EAAA,MAAA;EAAO,OAAA,EAAA,MAAA;EA2CY,SAAA,EA9FT,IA8FS;;AAEX,UA7FM,gBAAA,CA6FN;EAAR,KAAA,EA5FM,YA4FN,EAAA;EAAO,KAAA,EAAA,MAAA;EAoBY,OAAA,EAAA,OAAA;AAwBtB;UAnIiB,aAAA;;;;UAKA,YAAA;;;;;;;UAQA,cAAA;;;;;;;;;gBASD;;;;;;;;;;aAUH;aACA;UACH;;;;;iBAMY,qBAAA,QACb,kBACN,QAAQ;;;;iBA2CW,mBAAA,QACb,gBACN,QAAQ;;;;iBAoBW,sBAAA;;;;;;;;IAQrB;;;;;;;;;iBAgBqB,sBAAA;;;;IAIrB;;;;aAJ2C"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { MOCK_AGENTS } from "../shared/mock-agents.js";
|
|
2
|
+
import { MOCK_TOOLS } from "../shared/mock-tools.js";
|
|
3
|
+
|
|
4
|
+
//#region src/agent/agent.handler.ts
|
|
5
|
+
/**
|
|
6
|
+
* Mock handlers for Agent contracts.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Mock handler for ListAgentsQuery.
|
|
10
|
+
*/
|
|
11
|
+
async function mockListAgentsHandler(input) {
|
|
12
|
+
const { organizationId, status, modelProvider, search, limit = 20, offset = 0 } = input;
|
|
13
|
+
let filtered = MOCK_AGENTS.filter((a) => a.organizationId === organizationId);
|
|
14
|
+
if (status) filtered = filtered.filter((a) => a.status === status);
|
|
15
|
+
if (modelProvider) filtered = filtered.filter((a) => a.modelProvider === modelProvider);
|
|
16
|
+
if (search) {
|
|
17
|
+
const q = search.toLowerCase();
|
|
18
|
+
filtered = filtered.filter((a) => a.name.toLowerCase().includes(q) || a.description?.toLowerCase().includes(q) || a.tags?.some((t) => t.toLowerCase().includes(q)));
|
|
19
|
+
}
|
|
20
|
+
const total = filtered.length;
|
|
21
|
+
return {
|
|
22
|
+
items: filtered.slice(offset, offset + limit).map((a) => ({
|
|
23
|
+
id: a.id,
|
|
24
|
+
name: a.name,
|
|
25
|
+
slug: a.slug,
|
|
26
|
+
description: a.description,
|
|
27
|
+
status: a.status,
|
|
28
|
+
modelProvider: a.modelProvider,
|
|
29
|
+
modelName: a.modelName,
|
|
30
|
+
version: a.version,
|
|
31
|
+
createdAt: a.createdAt
|
|
32
|
+
})),
|
|
33
|
+
total,
|
|
34
|
+
hasMore: offset + limit < total
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Mock handler for GetAgentQuery.
|
|
39
|
+
*/
|
|
40
|
+
async function mockGetAgentHandler(input) {
|
|
41
|
+
const agent = MOCK_AGENTS.find((a) => a.id === input.agentId);
|
|
42
|
+
if (!agent) throw new Error("AGENT_NOT_FOUND");
|
|
43
|
+
const result = {
|
|
44
|
+
...agent,
|
|
45
|
+
toolIds: ["tool-1", "tool-2"]
|
|
46
|
+
};
|
|
47
|
+
if (input.includeTools) result.tools = MOCK_TOOLS.slice(0, 2).map((t) => ({
|
|
48
|
+
id: t.id,
|
|
49
|
+
name: t.name,
|
|
50
|
+
slug: t.slug,
|
|
51
|
+
description: t.description,
|
|
52
|
+
category: t.category
|
|
53
|
+
}));
|
|
54
|
+
return result;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Mock handler for CreateAgentCommand.
|
|
58
|
+
*/
|
|
59
|
+
async function mockCreateAgentHandler(input) {
|
|
60
|
+
if (MOCK_AGENTS.some((a) => a.organizationId === input.organizationId && a.slug === input.slug)) throw new Error("SLUG_EXISTS");
|
|
61
|
+
return {
|
|
62
|
+
id: `agent-${Date.now()}`,
|
|
63
|
+
name: input.name,
|
|
64
|
+
slug: input.slug,
|
|
65
|
+
status: "DRAFT"
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Mock handler for UpdateAgentCommand.
|
|
70
|
+
*/
|
|
71
|
+
async function mockUpdateAgentHandler(input) {
|
|
72
|
+
const agent = MOCK_AGENTS.find((a) => a.id === input.agentId);
|
|
73
|
+
if (!agent) throw new Error("AGENT_NOT_FOUND");
|
|
74
|
+
return {
|
|
75
|
+
id: agent.id,
|
|
76
|
+
name: input.name ?? agent.name,
|
|
77
|
+
status: input.status ?? agent.status,
|
|
78
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//#endregion
|
|
83
|
+
export { mockCreateAgentHandler, mockGetAgentHandler, mockListAgentsHandler, mockUpdateAgentHandler };
|
|
84
|
+
//# sourceMappingURL=agent.handler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.handler.js","names":["result: AgentWithTools"],"sources":["../../src/agent/agent.handler.ts"],"sourcesContent":["/**\n * Mock handlers for Agent contracts.\n */\nimport { MOCK_AGENTS } from '../shared/mock-agents';\nimport { MOCK_TOOLS } from '../shared/mock-tools';\n\nexport interface ListAgentsInput {\n organizationId: string;\n status?: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';\n modelProvider?: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';\n search?: string;\n limit?: number;\n offset?: number;\n}\n\nexport interface AgentSummary {\n id: string;\n name: string;\n slug: string;\n description?: string;\n status: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';\n modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';\n modelName: string;\n version: string;\n createdAt: Date;\n}\n\nexport interface ListAgentsOutput {\n items: AgentSummary[];\n total: number;\n hasMore: boolean;\n}\n\nexport interface GetAgentInput {\n agentId: string;\n includeTools?: boolean;\n}\n\nexport interface AgentToolRef {\n id: string;\n name: string;\n slug: string;\n description: string;\n category: string;\n}\n\nexport interface AgentWithTools {\n id: string;\n organizationId: string;\n name: string;\n slug: string;\n description?: string;\n status: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';\n modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';\n modelName: string;\n modelConfig?: Record<string, unknown>;\n systemPrompt: string;\n userPromptTemplate?: string;\n toolIds?: string[];\n toolChoice: 'auto' | 'required' | 'none';\n maxIterations: number;\n maxTokensPerRun?: number;\n timeoutMs: number;\n version: string;\n tags?: string[];\n createdAt: Date;\n updatedAt: Date;\n tools?: AgentToolRef[];\n}\n\n/**\n * Mock handler for ListAgentsQuery.\n */\nexport async function mockListAgentsHandler(\n input: ListAgentsInput\n): Promise<ListAgentsOutput> {\n const {\n organizationId,\n status,\n modelProvider,\n search,\n limit = 20,\n offset = 0,\n } = input;\n\n let filtered = MOCK_AGENTS.filter((a) => a.organizationId === organizationId);\n if (status) filtered = filtered.filter((a) => a.status === status);\n if (modelProvider)\n filtered = filtered.filter((a) => a.modelProvider === modelProvider);\n if (search) {\n const q = search.toLowerCase();\n filtered = filtered.filter(\n (a) =>\n a.name.toLowerCase().includes(q) ||\n a.description?.toLowerCase().includes(q) ||\n a.tags?.some((t) => t.toLowerCase().includes(q))\n );\n }\n\n const total = filtered.length;\n const items = filtered.slice(offset, offset + limit).map((a) => ({\n id: a.id,\n name: a.name,\n slug: a.slug,\n description: a.description,\n status: a.status,\n modelProvider: a.modelProvider,\n modelName: a.modelName,\n version: a.version,\n createdAt: a.createdAt,\n }));\n\n return { items, total, hasMore: offset + limit < total };\n}\n\n/**\n * Mock handler for GetAgentQuery.\n */\nexport async function mockGetAgentHandler(\n input: GetAgentInput\n): Promise<AgentWithTools> {\n const agent = MOCK_AGENTS.find((a) => a.id === input.agentId);\n if (!agent) throw new Error('AGENT_NOT_FOUND');\n\n const result: AgentWithTools = { ...agent, toolIds: ['tool-1', 'tool-2'] };\n if (input.includeTools) {\n result.tools = MOCK_TOOLS.slice(0, 2).map((t) => ({\n id: t.id,\n name: t.name,\n slug: t.slug,\n description: t.description,\n category: t.category,\n }));\n }\n return result;\n}\n\n/**\n * Mock handler for CreateAgentCommand.\n */\nexport async function mockCreateAgentHandler(input: {\n organizationId: string;\n name: string;\n slug: string;\n description?: string;\n modelProvider: 'OPENAI' | 'ANTHROPIC' | 'GOOGLE' | 'MISTRAL' | 'CUSTOM';\n modelName: string;\n systemPrompt: string;\n}) {\n const exists = MOCK_AGENTS.some(\n (a) => a.organizationId === input.organizationId && a.slug === input.slug\n );\n if (exists) throw new Error('SLUG_EXISTS');\n return {\n id: `agent-${Date.now()}`,\n name: input.name,\n slug: input.slug,\n status: 'DRAFT' as const,\n };\n}\n\n/**\n * Mock handler for UpdateAgentCommand.\n */\nexport async function mockUpdateAgentHandler(input: {\n agentId: string;\n name?: string;\n status?: 'DRAFT' | 'ACTIVE' | 'PAUSED' | 'ARCHIVED';\n}) {\n const agent = MOCK_AGENTS.find((a) => a.id === input.agentId);\n if (!agent) throw new Error('AGENT_NOT_FOUND');\n return {\n id: agent.id,\n name: input.name ?? agent.name,\n status: input.status ?? agent.status,\n updatedAt: new Date(),\n };\n}\n"],"mappings":";;;;;;;;;;AAyEA,eAAsB,sBACpB,OAC2B;CAC3B,MAAM,EACJ,gBACA,QACA,eACA,QACA,QAAQ,IACR,SAAS,MACP;CAEJ,IAAI,WAAW,YAAY,QAAQ,MAAM,EAAE,mBAAmB,eAAe;AAC7E,KAAI,OAAQ,YAAW,SAAS,QAAQ,MAAM,EAAE,WAAW,OAAO;AAClE,KAAI,cACF,YAAW,SAAS,QAAQ,MAAM,EAAE,kBAAkB,cAAc;AACtE,KAAI,QAAQ;EACV,MAAM,IAAI,OAAO,aAAa;AAC9B,aAAW,SAAS,QACjB,MACC,EAAE,KAAK,aAAa,CAAC,SAAS,EAAE,IAChC,EAAE,aAAa,aAAa,CAAC,SAAS,EAAE,IACxC,EAAE,MAAM,MAAM,MAAM,EAAE,aAAa,CAAC,SAAS,EAAE,CAAC,CACnD;;CAGH,MAAM,QAAQ,SAAS;AAavB,QAAO;EAAE,OAZK,SAAS,MAAM,QAAQ,SAAS,MAAM,CAAC,KAAK,OAAO;GAC/D,IAAI,EAAE;GACN,MAAM,EAAE;GACR,MAAM,EAAE;GACR,aAAa,EAAE;GACf,QAAQ,EAAE;GACV,eAAe,EAAE;GACjB,WAAW,EAAE;GACb,SAAS,EAAE;GACX,WAAW,EAAE;GACd,EAAE;EAEa;EAAO,SAAS,SAAS,QAAQ;EAAO;;;;;AAM1D,eAAsB,oBACpB,OACyB;CACzB,MAAM,QAAQ,YAAY,MAAM,MAAM,EAAE,OAAO,MAAM,QAAQ;AAC7D,KAAI,CAAC,MAAO,OAAM,IAAI,MAAM,kBAAkB;CAE9C,MAAMA,SAAyB;EAAE,GAAG;EAAO,SAAS,CAAC,UAAU,SAAS;EAAE;AAC1E,KAAI,MAAM,aACR,QAAO,QAAQ,WAAW,MAAM,GAAG,EAAE,CAAC,KAAK,OAAO;EAChD,IAAI,EAAE;EACN,MAAM,EAAE;EACR,MAAM,EAAE;EACR,aAAa,EAAE;EACf,UAAU,EAAE;EACb,EAAE;AAEL,QAAO;;;;;AAMT,eAAsB,uBAAuB,OAQ1C;AAID,KAHe,YAAY,MACxB,MAAM,EAAE,mBAAmB,MAAM,kBAAkB,EAAE,SAAS,MAAM,KACtE,CACW,OAAM,IAAI,MAAM,cAAc;AAC1C,QAAO;EACL,IAAI,SAAS,KAAK,KAAK;EACvB,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,QAAQ;EACT;;;;;AAMH,eAAsB,uBAAuB,OAI1C;CACD,MAAM,QAAQ,YAAY,MAAM,MAAM,EAAE,OAAO,MAAM,QAAQ;AAC7D,KAAI,CAAC,MAAO,OAAM,IAAI,MAAM,kBAAkB;AAC9C,QAAO;EACL,IAAI,MAAM;EACV,MAAM,MAAM,QAAQ,MAAM;EAC1B,QAAQ,MAAM,UAAU,MAAM;EAC9B,2BAAW,IAAI,MAAM;EACtB"}
|
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
import * as _contractspec_lib_schema664 from "@contractspec/lib.schema";
|
|
2
|
+
import * as _contractspec_lib_contracts25 from "@contractspec/lib.contracts";
|
|
3
|
+
|
|
4
|
+
//#region src/agent/agent.operation.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* CreateAgentCommand - Creates a new agent configuration.
|
|
7
|
+
*/
|
|
8
|
+
declare const CreateAgentCommand: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema664.SchemaModel<{
|
|
9
|
+
organizationId: {
|
|
10
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
name: {
|
|
14
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
slug: {
|
|
18
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
description: {
|
|
22
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
23
|
+
isOptional: true;
|
|
24
|
+
};
|
|
25
|
+
modelProvider: {
|
|
26
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string, string]>;
|
|
27
|
+
isOptional: false;
|
|
28
|
+
};
|
|
29
|
+
modelName: {
|
|
30
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
31
|
+
isOptional: false;
|
|
32
|
+
};
|
|
33
|
+
modelConfig: {
|
|
34
|
+
type: _contractspec_lib_schema664.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
35
|
+
isOptional: true;
|
|
36
|
+
};
|
|
37
|
+
systemPrompt: {
|
|
38
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
39
|
+
isOptional: false;
|
|
40
|
+
};
|
|
41
|
+
userPromptTemplate: {
|
|
42
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
43
|
+
isOptional: true;
|
|
44
|
+
};
|
|
45
|
+
toolIds: {
|
|
46
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
47
|
+
isArray: true;
|
|
48
|
+
isOptional: true;
|
|
49
|
+
};
|
|
50
|
+
toolChoice: {
|
|
51
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string]>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
maxIterations: {
|
|
55
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
58
|
+
maxTokensPerRun: {
|
|
59
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
60
|
+
isOptional: true;
|
|
61
|
+
};
|
|
62
|
+
timeoutMs: {
|
|
63
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
64
|
+
isOptional: true;
|
|
65
|
+
};
|
|
66
|
+
tags: {
|
|
67
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
68
|
+
isArray: true;
|
|
69
|
+
isOptional: true;
|
|
70
|
+
};
|
|
71
|
+
}>, _contractspec_lib_schema664.SchemaModel<{
|
|
72
|
+
id: {
|
|
73
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
74
|
+
isOptional: false;
|
|
75
|
+
};
|
|
76
|
+
name: {
|
|
77
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
78
|
+
isOptional: false;
|
|
79
|
+
};
|
|
80
|
+
slug: {
|
|
81
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
82
|
+
isOptional: false;
|
|
83
|
+
};
|
|
84
|
+
status: {
|
|
85
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
86
|
+
isOptional: false;
|
|
87
|
+
};
|
|
88
|
+
}>, {
|
|
89
|
+
ref: _contractspec_lib_contracts25.EventSpecMeta;
|
|
90
|
+
when: string;
|
|
91
|
+
}[]>;
|
|
92
|
+
/**
|
|
93
|
+
* UpdateAgentCommand - Updates an existing agent.
|
|
94
|
+
*/
|
|
95
|
+
declare const UpdateAgentCommand: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema664.SchemaModel<{
|
|
96
|
+
agentId: {
|
|
97
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
98
|
+
isOptional: false;
|
|
99
|
+
};
|
|
100
|
+
name: {
|
|
101
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
102
|
+
isOptional: true;
|
|
103
|
+
};
|
|
104
|
+
description: {
|
|
105
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
106
|
+
isOptional: true;
|
|
107
|
+
};
|
|
108
|
+
status: {
|
|
109
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
110
|
+
isOptional: true;
|
|
111
|
+
};
|
|
112
|
+
modelConfig: {
|
|
113
|
+
type: _contractspec_lib_schema664.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
114
|
+
isOptional: true;
|
|
115
|
+
};
|
|
116
|
+
systemPrompt: {
|
|
117
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
118
|
+
isOptional: true;
|
|
119
|
+
};
|
|
120
|
+
userPromptTemplate: {
|
|
121
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
122
|
+
isOptional: true;
|
|
123
|
+
};
|
|
124
|
+
toolIds: {
|
|
125
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
126
|
+
isArray: true;
|
|
127
|
+
isOptional: true;
|
|
128
|
+
};
|
|
129
|
+
toolChoice: {
|
|
130
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string]>;
|
|
131
|
+
isOptional: true;
|
|
132
|
+
};
|
|
133
|
+
maxIterations: {
|
|
134
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
135
|
+
isOptional: true;
|
|
136
|
+
};
|
|
137
|
+
maxTokensPerRun: {
|
|
138
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
139
|
+
isOptional: true;
|
|
140
|
+
};
|
|
141
|
+
timeoutMs: {
|
|
142
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
143
|
+
isOptional: true;
|
|
144
|
+
};
|
|
145
|
+
tags: {
|
|
146
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
147
|
+
isArray: true;
|
|
148
|
+
isOptional: true;
|
|
149
|
+
};
|
|
150
|
+
}>, _contractspec_lib_schema664.SchemaModel<{
|
|
151
|
+
id: {
|
|
152
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
153
|
+
isOptional: false;
|
|
154
|
+
};
|
|
155
|
+
name: {
|
|
156
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
157
|
+
isOptional: false;
|
|
158
|
+
};
|
|
159
|
+
status: {
|
|
160
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
161
|
+
isOptional: false;
|
|
162
|
+
};
|
|
163
|
+
updatedAt: {
|
|
164
|
+
type: _contractspec_lib_schema664.FieldType<Date, string>;
|
|
165
|
+
isOptional: false;
|
|
166
|
+
};
|
|
167
|
+
}>, {
|
|
168
|
+
key: string;
|
|
169
|
+
version: number;
|
|
170
|
+
stability: string;
|
|
171
|
+
owners: "@agent-console-team"[];
|
|
172
|
+
tags: string[];
|
|
173
|
+
when: string;
|
|
174
|
+
payload: _contractspec_lib_schema664.SchemaModel<{
|
|
175
|
+
id: {
|
|
176
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
177
|
+
isOptional: false;
|
|
178
|
+
};
|
|
179
|
+
name: {
|
|
180
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
181
|
+
isOptional: false;
|
|
182
|
+
};
|
|
183
|
+
slug: {
|
|
184
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
185
|
+
isOptional: false;
|
|
186
|
+
};
|
|
187
|
+
description: {
|
|
188
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
189
|
+
isOptional: true;
|
|
190
|
+
};
|
|
191
|
+
status: {
|
|
192
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
193
|
+
isOptional: false;
|
|
194
|
+
};
|
|
195
|
+
modelProvider: {
|
|
196
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string, string]>;
|
|
197
|
+
isOptional: false;
|
|
198
|
+
};
|
|
199
|
+
modelName: {
|
|
200
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
201
|
+
isOptional: false;
|
|
202
|
+
};
|
|
203
|
+
version: {
|
|
204
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
205
|
+
isOptional: false;
|
|
206
|
+
};
|
|
207
|
+
createdAt: {
|
|
208
|
+
type: _contractspec_lib_schema664.FieldType<Date, string>;
|
|
209
|
+
isOptional: false;
|
|
210
|
+
};
|
|
211
|
+
}>;
|
|
212
|
+
}[]>;
|
|
213
|
+
/**
|
|
214
|
+
* GetAgentQuery - Retrieves an agent by ID.
|
|
215
|
+
*/
|
|
216
|
+
declare const GetAgentQuery: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema664.SchemaModel<{
|
|
217
|
+
agentId: {
|
|
218
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
219
|
+
isOptional: false;
|
|
220
|
+
};
|
|
221
|
+
includeTools: {
|
|
222
|
+
type: _contractspec_lib_schema664.FieldType<boolean, boolean>;
|
|
223
|
+
isOptional: true;
|
|
224
|
+
};
|
|
225
|
+
}>, _contractspec_lib_schema664.SchemaModel<{
|
|
226
|
+
id: {
|
|
227
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
228
|
+
isOptional: false;
|
|
229
|
+
};
|
|
230
|
+
organizationId: {
|
|
231
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
232
|
+
isOptional: false;
|
|
233
|
+
};
|
|
234
|
+
name: {
|
|
235
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
236
|
+
isOptional: false;
|
|
237
|
+
};
|
|
238
|
+
slug: {
|
|
239
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
240
|
+
isOptional: false;
|
|
241
|
+
};
|
|
242
|
+
description: {
|
|
243
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
244
|
+
isOptional: true;
|
|
245
|
+
};
|
|
246
|
+
status: {
|
|
247
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
248
|
+
isOptional: false;
|
|
249
|
+
};
|
|
250
|
+
modelProvider: {
|
|
251
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string, string]>;
|
|
252
|
+
isOptional: false;
|
|
253
|
+
};
|
|
254
|
+
modelName: {
|
|
255
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
256
|
+
isOptional: false;
|
|
257
|
+
};
|
|
258
|
+
modelConfig: {
|
|
259
|
+
type: _contractspec_lib_schema664.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
260
|
+
isOptional: true;
|
|
261
|
+
};
|
|
262
|
+
systemPrompt: {
|
|
263
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
264
|
+
isOptional: false;
|
|
265
|
+
};
|
|
266
|
+
userPromptTemplate: {
|
|
267
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
268
|
+
isOptional: true;
|
|
269
|
+
};
|
|
270
|
+
toolIds: {
|
|
271
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
272
|
+
isArray: true;
|
|
273
|
+
isOptional: true;
|
|
274
|
+
};
|
|
275
|
+
toolChoice: {
|
|
276
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string]>;
|
|
277
|
+
isOptional: false;
|
|
278
|
+
};
|
|
279
|
+
maxIterations: {
|
|
280
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
281
|
+
isOptional: false;
|
|
282
|
+
};
|
|
283
|
+
maxTokensPerRun: {
|
|
284
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
285
|
+
isOptional: true;
|
|
286
|
+
};
|
|
287
|
+
timeoutMs: {
|
|
288
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
289
|
+
isOptional: false;
|
|
290
|
+
};
|
|
291
|
+
version: {
|
|
292
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
293
|
+
isOptional: false;
|
|
294
|
+
};
|
|
295
|
+
tags: {
|
|
296
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
297
|
+
isArray: true;
|
|
298
|
+
isOptional: true;
|
|
299
|
+
};
|
|
300
|
+
createdAt: {
|
|
301
|
+
type: _contractspec_lib_schema664.FieldType<Date, string>;
|
|
302
|
+
isOptional: false;
|
|
303
|
+
};
|
|
304
|
+
updatedAt: {
|
|
305
|
+
type: _contractspec_lib_schema664.FieldType<Date, string>;
|
|
306
|
+
isOptional: false;
|
|
307
|
+
};
|
|
308
|
+
tools: {
|
|
309
|
+
type: _contractspec_lib_schema664.SchemaModel<{
|
|
310
|
+
id: {
|
|
311
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
312
|
+
isOptional: false;
|
|
313
|
+
};
|
|
314
|
+
name: {
|
|
315
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
316
|
+
isOptional: false;
|
|
317
|
+
};
|
|
318
|
+
slug: {
|
|
319
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
320
|
+
isOptional: false;
|
|
321
|
+
};
|
|
322
|
+
description: {
|
|
323
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
324
|
+
isOptional: false;
|
|
325
|
+
};
|
|
326
|
+
category: {
|
|
327
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
328
|
+
isOptional: false;
|
|
329
|
+
};
|
|
330
|
+
}>;
|
|
331
|
+
isArray: true;
|
|
332
|
+
isOptional: true;
|
|
333
|
+
};
|
|
334
|
+
}>, undefined>;
|
|
335
|
+
/**
|
|
336
|
+
* ListAgentsQuery - Lists agents for an organization.
|
|
337
|
+
*/
|
|
338
|
+
declare const ListAgentsQuery: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema664.SchemaModel<{
|
|
339
|
+
organizationId: {
|
|
340
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
341
|
+
isOptional: false;
|
|
342
|
+
};
|
|
343
|
+
status: {
|
|
344
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
345
|
+
isOptional: true;
|
|
346
|
+
};
|
|
347
|
+
modelProvider: {
|
|
348
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string, string]>;
|
|
349
|
+
isOptional: true;
|
|
350
|
+
};
|
|
351
|
+
search: {
|
|
352
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
353
|
+
isOptional: true;
|
|
354
|
+
};
|
|
355
|
+
limit: {
|
|
356
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
357
|
+
isOptional: true;
|
|
358
|
+
defaultValue: number;
|
|
359
|
+
};
|
|
360
|
+
offset: {
|
|
361
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
362
|
+
isOptional: true;
|
|
363
|
+
defaultValue: number;
|
|
364
|
+
};
|
|
365
|
+
}>, _contractspec_lib_schema664.SchemaModel<{
|
|
366
|
+
items: {
|
|
367
|
+
type: _contractspec_lib_schema664.SchemaModel<{
|
|
368
|
+
id: {
|
|
369
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
370
|
+
isOptional: false;
|
|
371
|
+
};
|
|
372
|
+
name: {
|
|
373
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
374
|
+
isOptional: false;
|
|
375
|
+
};
|
|
376
|
+
slug: {
|
|
377
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
378
|
+
isOptional: false;
|
|
379
|
+
};
|
|
380
|
+
description: {
|
|
381
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
382
|
+
isOptional: true;
|
|
383
|
+
};
|
|
384
|
+
status: {
|
|
385
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string]>;
|
|
386
|
+
isOptional: false;
|
|
387
|
+
};
|
|
388
|
+
modelProvider: {
|
|
389
|
+
type: _contractspec_lib_schema664.EnumType<[string, string, string, string, string]>;
|
|
390
|
+
isOptional: false;
|
|
391
|
+
};
|
|
392
|
+
modelName: {
|
|
393
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
394
|
+
isOptional: false;
|
|
395
|
+
};
|
|
396
|
+
version: {
|
|
397
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
398
|
+
isOptional: false;
|
|
399
|
+
};
|
|
400
|
+
createdAt: {
|
|
401
|
+
type: _contractspec_lib_schema664.FieldType<Date, string>;
|
|
402
|
+
isOptional: false;
|
|
403
|
+
};
|
|
404
|
+
}>;
|
|
405
|
+
isArray: true;
|
|
406
|
+
isOptional: false;
|
|
407
|
+
};
|
|
408
|
+
total: {
|
|
409
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
410
|
+
isOptional: false;
|
|
411
|
+
};
|
|
412
|
+
hasMore: {
|
|
413
|
+
type: _contractspec_lib_schema664.FieldType<boolean, boolean>;
|
|
414
|
+
isOptional: false;
|
|
415
|
+
};
|
|
416
|
+
}>, undefined>;
|
|
417
|
+
/**
|
|
418
|
+
* AssignToolToAgentCommand - Assigns a tool to an agent.
|
|
419
|
+
*/
|
|
420
|
+
declare const AssignToolToAgentCommand: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema664.SchemaModel<{
|
|
421
|
+
agentId: {
|
|
422
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
423
|
+
isOptional: false;
|
|
424
|
+
};
|
|
425
|
+
toolId: {
|
|
426
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
427
|
+
isOptional: false;
|
|
428
|
+
};
|
|
429
|
+
config: {
|
|
430
|
+
type: _contractspec_lib_schema664.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
431
|
+
isOptional: true;
|
|
432
|
+
};
|
|
433
|
+
order: {
|
|
434
|
+
type: _contractspec_lib_schema664.FieldType<number, number>;
|
|
435
|
+
isOptional: true;
|
|
436
|
+
};
|
|
437
|
+
}>, _contractspec_lib_schema664.SchemaModel<{
|
|
438
|
+
agentToolId: {
|
|
439
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
440
|
+
isOptional: false;
|
|
441
|
+
};
|
|
442
|
+
agentId: {
|
|
443
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
444
|
+
isOptional: false;
|
|
445
|
+
};
|
|
446
|
+
toolId: {
|
|
447
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
448
|
+
isOptional: false;
|
|
449
|
+
};
|
|
450
|
+
}>, undefined>;
|
|
451
|
+
/**
|
|
452
|
+
* RemoveToolFromAgentCommand - Removes a tool from an agent.
|
|
453
|
+
*/
|
|
454
|
+
declare const RemoveToolFromAgentCommand: _contractspec_lib_contracts25.OperationSpec<_contractspec_lib_schema664.SchemaModel<{
|
|
455
|
+
agentId: {
|
|
456
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
457
|
+
isOptional: false;
|
|
458
|
+
};
|
|
459
|
+
toolId: {
|
|
460
|
+
type: _contractspec_lib_schema664.FieldType<string, string>;
|
|
461
|
+
isOptional: false;
|
|
462
|
+
};
|
|
463
|
+
}>, _contractspec_lib_schema664.SchemaModel<{
|
|
464
|
+
success: {
|
|
465
|
+
type: _contractspec_lib_schema664.FieldType<boolean, boolean>;
|
|
466
|
+
isOptional: false;
|
|
467
|
+
};
|
|
468
|
+
}>, undefined>;
|
|
469
|
+
//#endregion
|
|
470
|
+
export { AssignToolToAgentCommand, CreateAgentCommand, GetAgentQuery, ListAgentsQuery, RemoveToolFromAgentCommand, UpdateAgentCommand };
|
|
471
|
+
//# sourceMappingURL=agent.operation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent.operation.d.ts","names":[],"sources":["../../src/agent/agent.operation.ts"],"sourcesContent":[],"mappings":";;;;;;;cAmBa,kDAAkB,0CAAA;EAAlB,cAAA,EAAA;IAiFX,IAAA,EAAA,2BAAA,CAAA,SAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;;;;EAjF6B,CAAA;;;;;;+CAAA,OAAA,CAAA,MAAA,EAAA,OAAA,CAAA,QAAA,CAAA,MAAA,EAAA,OAAA,CAAA,CAAA;IAAA,UAAA,EAAA,IAAA;EAsFlB,CAAA;EA8EX,YAAA,EAAA;;;;;;;;;;;;;;;;EA9E6B,CAAA;;;;;;;;;;;;;;;;;;CAAA,CAAA,yCAAA,CAAA;EAmFlB,EAAA,EAAA;IA0DX,IAAA,EAnO6B,2BAAA,CAAA,SAmO7B,CAAA,MAAA,EAAA,MAAA,CAAA;;;EA1DwB,IAAA,EAAA;;;;;;;;;;;;;;;;;;;cAnFb,kDAAkB,0CAAA;;UA8E7B,2BAAA,CAAA;;;;;;;;;;;EAKwB,MAAA,EAAA;IA+Db,IAAA,sCAmEX,CAAA,CAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,CAAA,CAAA;IAAA,UAAA,EAAA,IAAA;;;;;;;IAnE0B,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;;;;;;;;;EAAA,CAAA;EAwEf,aAAA,EAAA;IAsEX,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;;;;;;;EAtEmC,SAAA,EAAA;;;;;IAAA,IAAA,uCAAA,CAAA,MAAA,EAAA,MAAA,CAAA;IA2ExB,OAAA,EAAA,IAAA;IA6CX,UAAA,EAAA,IAAA;;2CA7CqC,CAAA;EAAA,EAAA,EAAA;UArSR,2BAAA,CAAA;;EAqSQ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAlN1B,6CAAa,0CAAA;;UA0DxB,2BAAA,CAAA;;;;;;;;;UA1DwB,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA+Db,+CAAe,0CAAA;;UAmE1B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAnE0B,2BAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwEf,wDAAwB,0CAAA;;UAsEnC,2BAAA,CAAA;;;;;;;;;;;;;;;;;UAtEmC,2BAAA,CAAA;;;;;;;;;;;;;;;cA2ExB,0DAA0B,0CAAA;;UA6CrC,2BAAA,CAAA;;;;;;;;;UA7CqC,2BAAA,CAAA"}
|