@lssm/example.agent-console 0.0.0-canary-20251225044228 → 0.0.0-canary-20251225052113
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 +11 -11
- package/.turbo/turbo-build.log +17 -17
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.operation.d.ts +115 -115
- package/dist/agent/agent.operation.d.ts.map +1 -1
- package/dist/agent/agent.operation.js +152 -4
- package/dist/agent/agent.operation.js.map +1 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.enum.d.ts +5 -5
- package/dist/run/run.event.d.ts +70 -70
- package/dist/run/run.operation.d.ts +174 -174
- package/dist/run/run.operation.d.ts.map +1 -1
- package/dist/run/run.operation.js +157 -5
- package/dist/run/run.operation.js.map +1 -1
- package/dist/run/run.schema.d.ts +99 -99
- package/dist/tool/tool.entity.d.ts +24 -24
- package/dist/tool/tool.enum.d.ts +4 -4
- package/dist/tool/tool.event.d.ts +24 -24
- package/dist/tool/tool.handler.d.ts.map +1 -1
- package/dist/tool/tool.operation.d.ts +100 -100
- package/dist/tool/tool.operation.d.ts.map +1 -1
- package/dist/tool/tool.operation.js +116 -3
- package/dist/tool/tool.operation.js.map +1 -1
- package/dist/tool/tool.presentation.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/agent/agent.operation.ts +132 -0
- package/src/run/run.operation.ts +131 -0
- package/src/tool/tool.operation.ts +97 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -57,6 +57,34 @@ const CreateAgentCommand = defineCommand({
|
|
|
57
57
|
when: "Agent is successfully created"
|
|
58
58
|
}],
|
|
59
59
|
audit: ["agent-console.agent.created"]
|
|
60
|
+
},
|
|
61
|
+
acceptance: {
|
|
62
|
+
scenarios: [{
|
|
63
|
+
key: "create-agent-happy-path",
|
|
64
|
+
given: ["User is authenticated", "Organization exists"],
|
|
65
|
+
when: ["User submits valid agent configuration"],
|
|
66
|
+
then: ["New agent is created with DRAFT status", "AgentCreated event is emitted"]
|
|
67
|
+
}, {
|
|
68
|
+
key: "create-agent-slug-conflict",
|
|
69
|
+
given: ["User is authenticated", "Agent with same slug exists"],
|
|
70
|
+
when: ["User submits agent with duplicate slug"],
|
|
71
|
+
then: ["SLUG_EXISTS error is returned with 409 status"]
|
|
72
|
+
}],
|
|
73
|
+
examples: [{
|
|
74
|
+
key: "basic-create",
|
|
75
|
+
input: {
|
|
76
|
+
name: "Support Assistant",
|
|
77
|
+
slug: "support-assistant",
|
|
78
|
+
modelProvider: "openai",
|
|
79
|
+
modelId: "gpt-4"
|
|
80
|
+
},
|
|
81
|
+
output: {
|
|
82
|
+
id: "agent-123",
|
|
83
|
+
name: "Support Assistant",
|
|
84
|
+
slug: "support-assistant",
|
|
85
|
+
status: "draft"
|
|
86
|
+
}
|
|
87
|
+
}]
|
|
60
88
|
}
|
|
61
89
|
});
|
|
62
90
|
/**
|
|
@@ -115,6 +143,33 @@ const UpdateAgentCommand = defineCommand({
|
|
|
115
143
|
payload: AgentSummaryModel
|
|
116
144
|
}],
|
|
117
145
|
audit: ["agent.updated"]
|
|
146
|
+
},
|
|
147
|
+
acceptance: {
|
|
148
|
+
scenarios: [{
|
|
149
|
+
key: "update-agent-happy-path",
|
|
150
|
+
given: ["Agent exists", "User owns the agent"],
|
|
151
|
+
when: ["User submits updated configuration"],
|
|
152
|
+
then: ["Agent is updated", "AgentUpdated event is emitted"]
|
|
153
|
+
}, {
|
|
154
|
+
key: "update-agent-not-found",
|
|
155
|
+
given: ["Agent does not exist"],
|
|
156
|
+
when: ["User attempts to update"],
|
|
157
|
+
then: ["AGENT_NOT_FOUND error is returned"]
|
|
158
|
+
}],
|
|
159
|
+
examples: [{
|
|
160
|
+
key: "update-name",
|
|
161
|
+
input: {
|
|
162
|
+
agentId: "agent-123",
|
|
163
|
+
name: "Updated Assistant",
|
|
164
|
+
systemPrompt: "You are a helpful assistant."
|
|
165
|
+
},
|
|
166
|
+
output: {
|
|
167
|
+
id: "agent-123",
|
|
168
|
+
name: "Updated Assistant",
|
|
169
|
+
status: "draft",
|
|
170
|
+
updatedAt: "2025-01-01T00:00:00Z"
|
|
171
|
+
}
|
|
172
|
+
}]
|
|
118
173
|
}
|
|
119
174
|
});
|
|
120
175
|
/**
|
|
@@ -153,7 +208,33 @@ const GetAgentQuery = defineQuery({
|
|
|
153
208
|
when: "Agent ID is invalid"
|
|
154
209
|
} }
|
|
155
210
|
},
|
|
156
|
-
policy: { auth: "user" }
|
|
211
|
+
policy: { auth: "user" },
|
|
212
|
+
acceptance: {
|
|
213
|
+
scenarios: [{
|
|
214
|
+
key: "get-agent-happy-path",
|
|
215
|
+
given: ["Agent exists"],
|
|
216
|
+
when: ["User requests agent by ID"],
|
|
217
|
+
then: ["Agent details are returned"]
|
|
218
|
+
}, {
|
|
219
|
+
key: "get-agent-with-tools",
|
|
220
|
+
given: ["Agent exists with assigned tools"],
|
|
221
|
+
when: ["User requests agent with includeTools=true"],
|
|
222
|
+
then: ["Agent details with tools list are returned"]
|
|
223
|
+
}],
|
|
224
|
+
examples: [{
|
|
225
|
+
key: "get-basic",
|
|
226
|
+
input: {
|
|
227
|
+
agentId: "agent-123",
|
|
228
|
+
includeTools: false
|
|
229
|
+
},
|
|
230
|
+
output: {
|
|
231
|
+
id: "agent-123",
|
|
232
|
+
name: "Support Assistant",
|
|
233
|
+
status: "active",
|
|
234
|
+
tools: []
|
|
235
|
+
}
|
|
236
|
+
}]
|
|
237
|
+
}
|
|
157
238
|
});
|
|
158
239
|
/**
|
|
159
240
|
* ListAgentsQuery - Lists agents for an organization.
|
|
@@ -220,7 +301,33 @@ const ListAgentsQuery = defineQuery({
|
|
|
220
301
|
}
|
|
221
302
|
})
|
|
222
303
|
},
|
|
223
|
-
policy: { auth: "user" }
|
|
304
|
+
policy: { auth: "user" },
|
|
305
|
+
acceptance: {
|
|
306
|
+
scenarios: [{
|
|
307
|
+
key: "list-agents-happy-path",
|
|
308
|
+
given: ["Organization has agents"],
|
|
309
|
+
when: ["User lists agents"],
|
|
310
|
+
then: ["Paginated list of agents is returned"]
|
|
311
|
+
}, {
|
|
312
|
+
key: "list-agents-filter-by-status",
|
|
313
|
+
given: ["Organization has agents with mixed statuses"],
|
|
314
|
+
when: ["User filters by status=active"],
|
|
315
|
+
then: ["Only active agents are returned"]
|
|
316
|
+
}],
|
|
317
|
+
examples: [{
|
|
318
|
+
key: "list-basic",
|
|
319
|
+
input: {
|
|
320
|
+
organizationId: "org-123",
|
|
321
|
+
limit: 10,
|
|
322
|
+
offset: 0
|
|
323
|
+
},
|
|
324
|
+
output: {
|
|
325
|
+
items: [],
|
|
326
|
+
total: 0,
|
|
327
|
+
hasMore: false
|
|
328
|
+
}
|
|
329
|
+
}]
|
|
330
|
+
}
|
|
224
331
|
});
|
|
225
332
|
/**
|
|
226
333
|
* AssignToolToAgentCommand - Assigns a tool to an agent.
|
|
@@ -287,7 +394,32 @@ const AssignToolToAgentCommand = defineCommand({
|
|
|
287
394
|
} }
|
|
288
395
|
},
|
|
289
396
|
policy: { auth: "user" },
|
|
290
|
-
sideEffects: { audit: ["agent.tool.assigned"] }
|
|
397
|
+
sideEffects: { audit: ["agent.tool.assigned"] },
|
|
398
|
+
acceptance: {
|
|
399
|
+
scenarios: [{
|
|
400
|
+
key: "assign-tool-happy-path",
|
|
401
|
+
given: ["Agent exists", "Tool exists and is not assigned"],
|
|
402
|
+
when: ["User assigns tool to agent"],
|
|
403
|
+
then: ["Tool is assigned", "Assignment ID is returned"]
|
|
404
|
+
}, {
|
|
405
|
+
key: "assign-tool-already-assigned",
|
|
406
|
+
given: ["Tool is already assigned to agent"],
|
|
407
|
+
when: ["User attempts to assign again"],
|
|
408
|
+
then: ["TOOL_ALREADY_ASSIGNED error is returned"]
|
|
409
|
+
}],
|
|
410
|
+
examples: [{
|
|
411
|
+
key: "assign-basic",
|
|
412
|
+
input: {
|
|
413
|
+
agentId: "agent-123",
|
|
414
|
+
toolId: "tool-456"
|
|
415
|
+
},
|
|
416
|
+
output: {
|
|
417
|
+
agentToolId: "at-789",
|
|
418
|
+
agentId: "agent-123",
|
|
419
|
+
toolId: "tool-456"
|
|
420
|
+
}
|
|
421
|
+
}]
|
|
422
|
+
}
|
|
291
423
|
});
|
|
292
424
|
/**
|
|
293
425
|
* RemoveToolFromAgentCommand - Removes a tool from an agent.
|
|
@@ -330,7 +462,23 @@ const RemoveToolFromAgentCommand = defineCommand({
|
|
|
330
462
|
})
|
|
331
463
|
},
|
|
332
464
|
policy: { auth: "user" },
|
|
333
|
-
sideEffects: { audit: ["agent.tool.removed"] }
|
|
465
|
+
sideEffects: { audit: ["agent.tool.removed"] },
|
|
466
|
+
acceptance: {
|
|
467
|
+
scenarios: [{
|
|
468
|
+
key: "remove-tool-happy-path",
|
|
469
|
+
given: ["Agent exists", "Tool is assigned to agent"],
|
|
470
|
+
when: ["User removes tool from agent"],
|
|
471
|
+
then: ["Tool is unassigned", "Success is returned"]
|
|
472
|
+
}],
|
|
473
|
+
examples: [{
|
|
474
|
+
key: "remove-basic",
|
|
475
|
+
input: {
|
|
476
|
+
agentId: "agent-123",
|
|
477
|
+
toolId: "tool-456"
|
|
478
|
+
},
|
|
479
|
+
output: { success: true }
|
|
480
|
+
}]
|
|
481
|
+
}
|
|
334
482
|
});
|
|
335
483
|
|
|
336
484
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.operation.js","names":[],"sources":["../../src/agent/agent.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { AgentStatusEnum, ModelProviderEnum } from './agent.enum';\nimport {\n AgentSummaryModel,\n AgentWithToolsModel,\n CreateAgentInputModel,\n UpdateAgentInputModel,\n} from './agent.schema';\nimport { AgentCreatedEvent } from './agent.event';\n\nconst OWNERS = ['@agent-console-team'] as const;\n\n/**\n * CreateAgentCommand - Creates a new agent configuration.\n */\nexport const CreateAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'create'],\n description: 'Creates a new AI agent configuration.',\n goal: 'Allow users to define new AI agents with specific models and tools.',\n context: 'Called from the agent builder UI when creating a new agent.',\n },\n io: {\n input: CreateAgentInputModel,\n output: defineSchemaModel({\n name: 'CreateAgentOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: AgentStatusEnum, isOptional: false },\n },\n }),\n errors: {\n SLUG_EXISTS: {\n description:\n 'An agent with this slug already exists in the organization',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n // name: 'agent.created',\n // version: 1,\n // payload: AgentSummaryModel,\n ref: AgentCreatedEvent.meta,\n when: 'Agent is successfully created',\n },\n ],\n audit: ['agent-console.agent.created'],\n },\n});\n\n/**\n * UpdateAgentCommand - Updates an existing agent.\n */\nexport const UpdateAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'update'],\n description: 'Updates an existing AI agent configuration.',\n goal: 'Allow users to modify agent settings and configuration.',\n context: 'Called from the agent settings UI.',\n },\n io: {\n input: UpdateAgentInputModel,\n output: defineSchemaModel({\n name: 'UpdateAgentOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n status: { type: AgentStatusEnum, isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n }),\n errors: {\n AGENT_NOT_FOUND: {\n description: 'The specified agent does not exist',\n http: 404,\n gqlCode: 'AGENT_NOT_FOUND',\n when: 'Agent ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'agent.updated',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'updated'],\n when: 'Agent is updated',\n payload: AgentSummaryModel,\n },\n ],\n audit: ['agent.updated'],\n },\n});\n\n/**\n * GetAgentQuery - Retrieves an agent by ID.\n */\nexport const GetAgentQuery = defineQuery({\n meta: {\n key: 'agent-console.agent.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'get'],\n description: 'Retrieves an agent by its ID.',\n goal: 'View detailed agent configuration.',\n context: 'Called when viewing agent details or editing.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n includeTools: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n }),\n output: AgentWithToolsModel,\n errors: {\n AGENT_NOT_FOUND: {\n description: 'The specified agent does not exist',\n http: 404,\n gqlCode: 'AGENT_NOT_FOUND',\n when: 'Agent ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\n/**\n * ListAgentsQuery - Lists agents for an organization.\n */\nexport const ListAgentsQuery = defineQuery({\n meta: {\n key: 'agent-console.agent.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'list'],\n description: 'Lists agents for an organization with optional filtering.',\n goal: 'Browse and search available agents.',\n context: 'Agent list/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListAgentsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n status: { type: AgentStatusEnum, isOptional: true },\n modelProvider: { type: ModelProviderEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListAgentsOutput',\n fields: {\n items: { type: AgentSummaryModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * AssignToolToAgentCommand - Assigns a tool to an agent.\n */\nexport const AssignToolToAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.assignTool',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'tool', 'assign'],\n description: 'Assigns a tool to an agent with optional configuration.',\n goal: 'Enable agents to use specific tools.',\n context: 'Agent configuration UI - tool selection.',\n },\n io: {\n input: defineSchemaModel({\n name: 'AssignToolToAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n config: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n }),\n output: defineSchemaModel({\n name: 'AssignToolToAgentOutput',\n fields: {\n agentToolId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n errors: {\n TOOL_ALREADY_ASSIGNED: {\n description: 'This tool is already assigned to the agent',\n http: 409,\n gqlCode: 'TOOL_ALREADY_ASSIGNED',\n when: 'Tool assignment already exists',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['agent.tool.assigned'] },\n});\n\n/**\n * RemoveToolFromAgentCommand - Removes a tool from an agent.\n */\nexport const RemoveToolFromAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.removeTool',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'tool', 'remove'],\n description: 'Removes a tool assignment from an agent.',\n goal: 'Disable specific tools for an agent.',\n context: 'Agent configuration UI - tool management.',\n },\n io: {\n input: defineSchemaModel({\n name: 'RemoveToolFromAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'RemoveToolFromAgentOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['agent.tool.removed'] },\n});\n"],"mappings":";;;;;;;AAWA,MAAM,SAAS,CAAC,sBAAsB;;;;AAKtC,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,SAAS,SAAS;EACzB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,IAAI;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACjE,MAAM;KAAE,MAAM,eAAe,gBAAgB;KAAE,YAAY;KAAO;IAClE,MAAM;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACnE,QAAQ;KAAE,MAAM;KAAiB,YAAY;KAAO;IACrD;GACF,CAAC;EACF,QAAQ,EACN,aAAa;GACX,aACE;GACF,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GAIE,KAAK,kBAAkB;GACvB,MAAM;GACP,CACF;EACD,OAAO,CAAC,8BAA8B;EACvC;CACF,CAAC;;;;AAKF,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW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E,MAAM,eAAe,cAAc;KAAE,YAAY;KAAM;IACjE;GACF,CAAC;EACF,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,aAAa;KACX,MAAM,eAAe,iBAAiB;KACtC,YAAY;KACb;IACD,SAAS;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACtE,QAAQ;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACtE;GACF,CAAC;EACF,QAAQ,EACN,uBAAuB;GACrB,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa,EAAE,OAAO,CAAC,sBAAsB,EAAE;CAChD,CAAC;;;;AAKF,MAAa,6BAA6B,cAAc;CACtD,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM;GAAC;GAAS;GAAQ;GAAS;EACjC,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO,kBAAkB;GACvB,MAAM;GACN,QAAQ;IACN,SAAS;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACtE,QAAQ;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACtE;GACF,CAAC;EACF,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ,EACN,SAAS;IAAE,MAAM,eAAe,SAAS;IAAE,YAAY;IAAO,EAC/D;GACF,CAAC;EACH;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa,EAAE,OAAO,CAAC,qBAAqB,EAAE;CAC/C,CAAC"}
|
|
1
|
+
{"version":3,"file":"agent.operation.js","names":[],"sources":["../../src/agent/agent.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { AgentStatusEnum, ModelProviderEnum } from './agent.enum';\nimport {\n AgentSummaryModel,\n AgentWithToolsModel,\n CreateAgentInputModel,\n UpdateAgentInputModel,\n} from './agent.schema';\nimport { AgentCreatedEvent } from './agent.event';\n\nconst OWNERS = ['@agent-console-team'] as const;\n\n/**\n * CreateAgentCommand - Creates a new agent configuration.\n */\nexport const CreateAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'create'],\n description: 'Creates a new AI agent configuration.',\n goal: 'Allow users to define new AI agents with specific models and tools.',\n context: 'Called from the agent builder UI when creating a new agent.',\n },\n io: {\n input: CreateAgentInputModel,\n output: defineSchemaModel({\n name: 'CreateAgentOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: AgentStatusEnum, isOptional: false },\n },\n }),\n errors: {\n SLUG_EXISTS: {\n description:\n 'An agent with this slug already exists in the organization',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n // name: 'agent.created',\n // version: 1,\n // payload: AgentSummaryModel,\n ref: AgentCreatedEvent.meta,\n when: 'Agent is successfully created',\n },\n ],\n audit: ['agent-console.agent.created'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'create-agent-happy-path',\n given: ['User is authenticated', 'Organization exists'],\n when: ['User submits valid agent configuration'],\n then: ['New agent is created with DRAFT status', 'AgentCreated event is emitted'],\n },\n {\n key: 'create-agent-slug-conflict',\n given: ['User is authenticated', 'Agent with same slug exists'],\n when: ['User submits agent with duplicate slug'],\n then: ['SLUG_EXISTS error is returned with 409 status'],\n },\n ],\n examples: [\n {\n key: 'basic-create',\n input: { name: 'Support Assistant', slug: 'support-assistant', modelProvider: 'openai', modelId: 'gpt-4' },\n output: { id: 'agent-123', name: 'Support Assistant', slug: 'support-assistant', status: 'draft' },\n },\n ],\n },\n});\n\n/**\n * UpdateAgentCommand - Updates an existing agent.\n */\nexport const UpdateAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'update'],\n description: 'Updates an existing AI agent configuration.',\n goal: 'Allow users to modify agent settings and configuration.',\n context: 'Called from the agent settings UI.',\n },\n io: {\n input: UpdateAgentInputModel,\n output: defineSchemaModel({\n name: 'UpdateAgentOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n status: { type: AgentStatusEnum, isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n }),\n errors: {\n AGENT_NOT_FOUND: {\n description: 'The specified agent does not exist',\n http: 404,\n gqlCode: 'AGENT_NOT_FOUND',\n when: 'Agent ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n key: 'agent.updated',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'updated'],\n when: 'Agent is updated',\n payload: AgentSummaryModel,\n },\n ],\n audit: ['agent.updated'],\n },\n acceptance: {\n scenarios: [\n {\n key: 'update-agent-happy-path',\n given: ['Agent exists', 'User owns the agent'],\n when: ['User submits updated configuration'],\n then: ['Agent is updated', 'AgentUpdated event is emitted'],\n },\n {\n key: 'update-agent-not-found',\n given: ['Agent does not exist'],\n when: ['User attempts to update'],\n then: ['AGENT_NOT_FOUND error is returned'],\n },\n ],\n examples: [\n {\n key: 'update-name',\n input: { agentId: 'agent-123', name: 'Updated Assistant', systemPrompt: 'You are a helpful assistant.' },\n output: { id: 'agent-123', name: 'Updated Assistant', status: 'draft', updatedAt: '2025-01-01T00:00:00Z' },\n },\n ],\n },\n});\n\n/**\n * GetAgentQuery - Retrieves an agent by ID.\n */\nexport const GetAgentQuery = defineQuery({\n meta: {\n key: 'agent-console.agent.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'get'],\n description: 'Retrieves an agent by its ID.',\n goal: 'View detailed agent configuration.',\n context: 'Called when viewing agent details or editing.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n includeTools: { type: ScalarTypeEnum.Boolean(), isOptional: true },\n },\n }),\n output: AgentWithToolsModel,\n errors: {\n AGENT_NOT_FOUND: {\n description: 'The specified agent does not exist',\n http: 404,\n gqlCode: 'AGENT_NOT_FOUND',\n when: 'Agent ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'get-agent-happy-path',\n given: ['Agent exists'],\n when: ['User requests agent by ID'],\n then: ['Agent details are returned'],\n },\n {\n key: 'get-agent-with-tools',\n given: ['Agent exists with assigned tools'],\n when: ['User requests agent with includeTools=true'],\n then: ['Agent details with tools list are returned'],\n },\n ],\n examples: [\n {\n key: 'get-basic',\n input: { agentId: 'agent-123', includeTools: false },\n output: { id: 'agent-123', name: 'Support Assistant', status: 'active', tools: [] },\n },\n ],\n },\n});\n\n/**\n * ListAgentsQuery - Lists agents for an organization.\n */\nexport const ListAgentsQuery = defineQuery({\n meta: {\n key: 'agent-console.agent.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'list'],\n description: 'Lists agents for an organization with optional filtering.',\n goal: 'Browse and search available agents.',\n context: 'Agent list/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListAgentsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n status: { type: AgentStatusEnum, isOptional: true },\n modelProvider: { type: ModelProviderEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListAgentsOutput',\n fields: {\n items: { type: AgentSummaryModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n acceptance: {\n scenarios: [\n {\n key: 'list-agents-happy-path',\n given: ['Organization has agents'],\n when: ['User lists agents'],\n then: ['Paginated list of agents is returned'],\n },\n {\n key: 'list-agents-filter-by-status',\n given: ['Organization has agents with mixed statuses'],\n when: ['User filters by status=active'],\n then: ['Only active agents are returned'],\n },\n ],\n examples: [\n {\n key: 'list-basic',\n input: { organizationId: 'org-123', limit: 10, offset: 0 },\n output: { items: [], total: 0, hasMore: false },\n },\n ],\n },\n});\n\n/**\n * AssignToolToAgentCommand - Assigns a tool to an agent.\n */\nexport const AssignToolToAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.assignTool',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'tool', 'assign'],\n description: 'Assigns a tool to an agent with optional configuration.',\n goal: 'Enable agents to use specific tools.',\n context: 'Agent configuration UI - tool selection.',\n },\n io: {\n input: defineSchemaModel({\n name: 'AssignToolToAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n config: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n order: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },\n },\n }),\n output: defineSchemaModel({\n name: 'AssignToolToAgentOutput',\n fields: {\n agentToolId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n errors: {\n TOOL_ALREADY_ASSIGNED: {\n description: 'This tool is already assigned to the agent',\n http: 409,\n gqlCode: 'TOOL_ALREADY_ASSIGNED',\n when: 'Tool assignment already exists',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['agent.tool.assigned'] },\n acceptance: {\n scenarios: [\n {\n key: 'assign-tool-happy-path',\n given: ['Agent exists', 'Tool exists and is not assigned'],\n when: ['User assigns tool to agent'],\n then: ['Tool is assigned', 'Assignment ID is returned'],\n },\n {\n key: 'assign-tool-already-assigned',\n given: ['Tool is already assigned to agent'],\n when: ['User attempts to assign again'],\n then: ['TOOL_ALREADY_ASSIGNED error is returned'],\n },\n ],\n examples: [\n {\n key: 'assign-basic',\n input: { agentId: 'agent-123', toolId: 'tool-456' },\n output: { agentToolId: 'at-789', agentId: 'agent-123', toolId: 'tool-456' },\n },\n ],\n },\n});\n\n/**\n * RemoveToolFromAgentCommand - Removes a tool from an agent.\n */\nexport const RemoveToolFromAgentCommand = defineCommand({\n meta: {\n key: 'agent-console.agent.removeTool',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['agent', 'tool', 'remove'],\n description: 'Removes a tool assignment from an agent.',\n goal: 'Disable specific tools for an agent.',\n context: 'Agent configuration UI - tool management.',\n },\n io: {\n input: defineSchemaModel({\n name: 'RemoveToolFromAgentInput',\n fields: {\n agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'RemoveToolFromAgentOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['agent.tool.removed'] },\n acceptance: {\n scenarios: [\n {\n key: 'remove-tool-happy-path',\n given: ['Agent exists', 'Tool is assigned to agent'],\n when: ['User removes tool from agent'],\n then: ['Tool is unassigned', 'Success is returned'],\n },\n ],\n examples: [\n {\n key: 'remove-basic',\n input: { agentId: 'agent-123', toolId: 'tool-456' },\n output: { success: true },\n },\n ],\n },\n});\n"],"mappings":";;;;;;;AAWA,MAAM,SAAS,CAAC,sBAAsB;;;;AAKtC,MAAa,qBAAqB,cAAc;CAC9C,MAAM;EACJ,KAAK;EACL,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,SAAS,SAAS;EACzB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,IAAI;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACjE,MAAM;KAAE,MAAM,eAAe,gBAAgB;KAAE,YAAY;KAAO;IAClE,MAAM;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACnE,QAAQ;KAAE,MAAM;KAAiB,YAAY;KAAO;IACrD;GACF,CAAC;EACF,QAAQ,EACN,aAAa;GACX,aACE;GACF,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;GAIE,KAAK,kBAAkB;GACvB,MAAM;GACP,CACF;EACD,OAAO,CAAC,8BAA8B;EACvC;CACD,YAAY;EACV,WAAW,CACT;GACE,KAAK;GACL,OAAO,CAAC,yBAAyB,sBAAsB;GACvD,MAAM,CAAC,yCAAyC;GAChD,MAAM,CAAC,0CAA0C,gCAAgC;GAClF,EACD;GACE,KAAK;GACL,OAAO,CAAC,yBAAyB,8BAA8B;GAC/D,MAAM,CAAC,yCAAyC;GAChD,MAAM,CAAC,gDAAgD;GACxD,CACF;EACD,UAAU,CACR;GACE,KAAK;GACL,OAAO;IAAE,MAAM;IAAqB,MAAM;IAAqB,eAAe;IAAU,SAAS;IAAS;GAC1G,QAAQ;IAAE,IAAI;IAAa,MAAM;IAAqB,MAAM;IAAqB,QAAQ;IAAS;GACnG,CACF;EACF;C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