@lssm/example.agent-console 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217072406
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 +271 -237
- package/.turbo/turbo-build.log +272 -48
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.contracts.d.ts +126 -126
- package/dist/agent/agent.contracts.js +336 -1
- package/dist/agent/agent.entity.d.ts +36 -36
- package/dist/agent/agent.entity.js +136 -1
- package/dist/agent/agent.enum.d.ts +4 -4
- package/dist/agent/agent.enum.js +34 -1
- package/dist/agent/agent.event.d.ts +31 -31
- package/dist/agent/agent.event.js +183 -1
- package/dist/agent/agent.handler.d.ts +1 -1
- package/dist/agent/agent.handler.js +83 -1
- package/dist/agent/agent.presentation.js +75 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/agent/agent.schema.js +407 -1
- package/dist/agent/index.js +9 -1
- package/dist/agent.feature.js +295 -1
- package/dist/docs/agent-console.docblock.js +69 -5
- package/dist/docs/index.js +1 -1
- package/dist/example.js +50 -1
- package/dist/handlers/index.js +5 -1
- package/dist/index.js +32 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +10 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +71 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +19 -1
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +1 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +1 -1
- package/dist/libs/contracts/dist/regenerator/service.js +6 -1
- package/dist/libs/contracts/dist/registry.js +2 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +34 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +2 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/schema/dist/EnumType.js +56 -1
- package/dist/libs/schema/dist/FieldType.js +49 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
- package/dist/libs/schema/dist/entity/index.js +2 -1
- package/dist/libs/schema/dist/entity/types.js +1 -1
- package/dist/libs/schema/dist/index.js +6 -1
- package/dist/presentations/index.js +5 -1
- package/dist/run/index.js +9 -1
- package/dist/run/run.contracts.d.ts +175 -175
- package/dist/run/run.contracts.js +469 -1
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.entity.js +205 -1
- package/dist/run/run.enum.d.ts +5 -5
- package/dist/run/run.enum.js +45 -1
- package/dist/run/run.event.d.ts +71 -71
- package/dist/run/run.event.js +389 -1
- package/dist/run/run.handler.js +82 -1
- package/dist/run/run.presentation.js +55 -1
- package/dist/run/run.schema.d.ts +99 -99
- package/dist/run/run.schema.js +339 -1
- package/dist/shared/index.js +5 -1
- package/dist/shared/mock-agents.js +93 -1
- package/dist/shared/mock-runs.js +117 -1
- package/dist/shared/mock-tools.js +180 -1
- package/dist/tool/index.js +9 -1
- package/dist/tool/tool.contracts.d.ts +101 -101
- package/dist/tool/tool.contracts.js +288 -1
- package/dist/tool/tool.entity.d.ts +24 -24
- package/dist/tool/tool.entity.js +105 -1
- package/dist/tool/tool.enum.d.ts +4 -4
- package/dist/tool/tool.enum.js +35 -1
- package/dist/tool/tool.event.d.ts +25 -25
- package/dist/tool/tool.event.js +145 -1
- package/dist/tool/tool.handler.d.ts +1 -1
- package/dist/tool/tool.handler.js +86 -1
- package/dist/tool/tool.presentation.js +55 -1
- package/dist/tool/tool.schema.d.ts +52 -52
- package/dist/tool/tool.schema.js +237 -1
- package/package.json +8 -8
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1 +1,336 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import { defineSchemaModel } from "../libs/schema/dist/SchemaModel.js";
|
|
3
|
+
import "../libs/schema/dist/index.js";
|
|
4
|
+
import { AgentStatusEnum, ModelProviderEnum } from "./agent.enum.js";
|
|
5
|
+
import { AgentSummaryModel, AgentWithToolsModel, CreateAgentInputModel, UpdateAgentInputModel } from "./agent.schema.js";
|
|
6
|
+
import { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
|
|
7
|
+
import { AgentCreatedEvent } from "./agent.event.js";
|
|
8
|
+
|
|
9
|
+
//#region src/agent/agent.contracts.ts
|
|
10
|
+
const OWNERS = ["@agent-console-team"];
|
|
11
|
+
/**
|
|
12
|
+
* CreateAgentCommand - Creates a new agent configuration.
|
|
13
|
+
*/
|
|
14
|
+
const CreateAgentCommand = defineCommand({
|
|
15
|
+
meta: {
|
|
16
|
+
name: "agent.agent.create",
|
|
17
|
+
version: 1,
|
|
18
|
+
stability: "stable",
|
|
19
|
+
owners: [...OWNERS],
|
|
20
|
+
tags: ["agent", "create"],
|
|
21
|
+
description: "Creates a new AI agent configuration.",
|
|
22
|
+
goal: "Allow users to define new AI agents with specific models and tools.",
|
|
23
|
+
context: "Called from the agent builder UI when creating a new agent."
|
|
24
|
+
},
|
|
25
|
+
io: {
|
|
26
|
+
input: CreateAgentInputModel,
|
|
27
|
+
output: defineSchemaModel({
|
|
28
|
+
name: "CreateAgentOutput",
|
|
29
|
+
fields: {
|
|
30
|
+
id: {
|
|
31
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
32
|
+
isOptional: false
|
|
33
|
+
},
|
|
34
|
+
name: {
|
|
35
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
36
|
+
isOptional: false
|
|
37
|
+
},
|
|
38
|
+
slug: {
|
|
39
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
40
|
+
isOptional: false
|
|
41
|
+
},
|
|
42
|
+
status: {
|
|
43
|
+
type: AgentStatusEnum,
|
|
44
|
+
isOptional: false
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}),
|
|
48
|
+
errors: { SLUG_EXISTS: {
|
|
49
|
+
description: "An agent with this slug already exists in the organization",
|
|
50
|
+
http: 409,
|
|
51
|
+
gqlCode: "SLUG_EXISTS",
|
|
52
|
+
when: "Slug is already taken"
|
|
53
|
+
} }
|
|
54
|
+
},
|
|
55
|
+
policy: { auth: "user" },
|
|
56
|
+
sideEffects: {
|
|
57
|
+
emits: [{
|
|
58
|
+
ref: AgentCreatedEvent,
|
|
59
|
+
when: "Agent is successfully created"
|
|
60
|
+
}],
|
|
61
|
+
audit: ["agent.created"]
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
/**
|
|
65
|
+
* UpdateAgentCommand - Updates an existing agent.
|
|
66
|
+
*/
|
|
67
|
+
const UpdateAgentCommand = defineCommand({
|
|
68
|
+
meta: {
|
|
69
|
+
name: "agent.agent.update",
|
|
70
|
+
version: 1,
|
|
71
|
+
stability: "stable",
|
|
72
|
+
owners: [...OWNERS],
|
|
73
|
+
tags: ["agent", "update"],
|
|
74
|
+
description: "Updates an existing AI agent configuration.",
|
|
75
|
+
goal: "Allow users to modify agent settings and configuration.",
|
|
76
|
+
context: "Called from the agent settings UI."
|
|
77
|
+
},
|
|
78
|
+
io: {
|
|
79
|
+
input: UpdateAgentInputModel,
|
|
80
|
+
output: defineSchemaModel({
|
|
81
|
+
name: "UpdateAgentOutput",
|
|
82
|
+
fields: {
|
|
83
|
+
id: {
|
|
84
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
85
|
+
isOptional: false
|
|
86
|
+
},
|
|
87
|
+
name: {
|
|
88
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
89
|
+
isOptional: false
|
|
90
|
+
},
|
|
91
|
+
status: {
|
|
92
|
+
type: AgentStatusEnum,
|
|
93
|
+
isOptional: false
|
|
94
|
+
},
|
|
95
|
+
updatedAt: {
|
|
96
|
+
type: ScalarTypeEnum.DateTime(),
|
|
97
|
+
isOptional: false
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}),
|
|
101
|
+
errors: { AGENT_NOT_FOUND: {
|
|
102
|
+
description: "The specified agent does not exist",
|
|
103
|
+
http: 404,
|
|
104
|
+
gqlCode: "AGENT_NOT_FOUND",
|
|
105
|
+
when: "Agent ID is invalid"
|
|
106
|
+
} }
|
|
107
|
+
},
|
|
108
|
+
policy: { auth: "user" },
|
|
109
|
+
sideEffects: {
|
|
110
|
+
emits: [{
|
|
111
|
+
name: "agent.updated",
|
|
112
|
+
version: 1,
|
|
113
|
+
when: "Agent is updated",
|
|
114
|
+
payload: AgentSummaryModel
|
|
115
|
+
}],
|
|
116
|
+
audit: ["agent.updated"]
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
/**
|
|
120
|
+
* GetAgentQuery - Retrieves an agent by ID.
|
|
121
|
+
*/
|
|
122
|
+
const GetAgentQuery = defineQuery({
|
|
123
|
+
meta: {
|
|
124
|
+
name: "agent.agent.get",
|
|
125
|
+
version: 1,
|
|
126
|
+
stability: "stable",
|
|
127
|
+
owners: [...OWNERS],
|
|
128
|
+
tags: ["agent", "get"],
|
|
129
|
+
description: "Retrieves an agent by its ID.",
|
|
130
|
+
goal: "View detailed agent configuration.",
|
|
131
|
+
context: "Called when viewing agent details or editing."
|
|
132
|
+
},
|
|
133
|
+
io: {
|
|
134
|
+
input: defineSchemaModel({
|
|
135
|
+
name: "GetAgentInput",
|
|
136
|
+
fields: {
|
|
137
|
+
agentId: {
|
|
138
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
139
|
+
isOptional: false
|
|
140
|
+
},
|
|
141
|
+
includeTools: {
|
|
142
|
+
type: ScalarTypeEnum.Boolean(),
|
|
143
|
+
isOptional: true
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}),
|
|
147
|
+
output: AgentWithToolsModel,
|
|
148
|
+
errors: { AGENT_NOT_FOUND: {
|
|
149
|
+
description: "The specified agent does not exist",
|
|
150
|
+
http: 404,
|
|
151
|
+
gqlCode: "AGENT_NOT_FOUND",
|
|
152
|
+
when: "Agent ID is invalid"
|
|
153
|
+
} }
|
|
154
|
+
},
|
|
155
|
+
policy: { auth: "user" }
|
|
156
|
+
});
|
|
157
|
+
/**
|
|
158
|
+
* ListAgentsQuery - Lists agents for an organization.
|
|
159
|
+
*/
|
|
160
|
+
const ListAgentsQuery = defineQuery({
|
|
161
|
+
meta: {
|
|
162
|
+
name: "agent.agent.list",
|
|
163
|
+
version: 1,
|
|
164
|
+
stability: "stable",
|
|
165
|
+
owners: [...OWNERS],
|
|
166
|
+
tags: ["agent", "list"],
|
|
167
|
+
description: "Lists agents for an organization with optional filtering.",
|
|
168
|
+
goal: "Browse and search available agents.",
|
|
169
|
+
context: "Agent list/dashboard view."
|
|
170
|
+
},
|
|
171
|
+
io: {
|
|
172
|
+
input: defineSchemaModel({
|
|
173
|
+
name: "ListAgentsInput",
|
|
174
|
+
fields: {
|
|
175
|
+
organizationId: {
|
|
176
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
177
|
+
isOptional: false
|
|
178
|
+
},
|
|
179
|
+
status: {
|
|
180
|
+
type: AgentStatusEnum,
|
|
181
|
+
isOptional: true
|
|
182
|
+
},
|
|
183
|
+
modelProvider: {
|
|
184
|
+
type: ModelProviderEnum,
|
|
185
|
+
isOptional: true
|
|
186
|
+
},
|
|
187
|
+
search: {
|
|
188
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
189
|
+
isOptional: true
|
|
190
|
+
},
|
|
191
|
+
limit: {
|
|
192
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
193
|
+
isOptional: true,
|
|
194
|
+
defaultValue: 20
|
|
195
|
+
},
|
|
196
|
+
offset: {
|
|
197
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
198
|
+
isOptional: true,
|
|
199
|
+
defaultValue: 0
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}),
|
|
203
|
+
output: defineSchemaModel({
|
|
204
|
+
name: "ListAgentsOutput",
|
|
205
|
+
fields: {
|
|
206
|
+
items: {
|
|
207
|
+
type: AgentSummaryModel,
|
|
208
|
+
isArray: true,
|
|
209
|
+
isOptional: false
|
|
210
|
+
},
|
|
211
|
+
total: {
|
|
212
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
213
|
+
isOptional: false
|
|
214
|
+
},
|
|
215
|
+
hasMore: {
|
|
216
|
+
type: ScalarTypeEnum.Boolean(),
|
|
217
|
+
isOptional: false
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
})
|
|
221
|
+
},
|
|
222
|
+
policy: { auth: "user" }
|
|
223
|
+
});
|
|
224
|
+
/**
|
|
225
|
+
* AssignToolToAgentCommand - Assigns a tool to an agent.
|
|
226
|
+
*/
|
|
227
|
+
const AssignToolToAgentCommand = defineCommand({
|
|
228
|
+
meta: {
|
|
229
|
+
name: "agent.agent.assignTool",
|
|
230
|
+
version: 1,
|
|
231
|
+
stability: "stable",
|
|
232
|
+
owners: [...OWNERS],
|
|
233
|
+
tags: [
|
|
234
|
+
"agent",
|
|
235
|
+
"tool",
|
|
236
|
+
"assign"
|
|
237
|
+
],
|
|
238
|
+
description: "Assigns a tool to an agent with optional configuration.",
|
|
239
|
+
goal: "Enable agents to use specific tools.",
|
|
240
|
+
context: "Agent configuration UI - tool selection."
|
|
241
|
+
},
|
|
242
|
+
io: {
|
|
243
|
+
input: defineSchemaModel({
|
|
244
|
+
name: "AssignToolToAgentInput",
|
|
245
|
+
fields: {
|
|
246
|
+
agentId: {
|
|
247
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
248
|
+
isOptional: false
|
|
249
|
+
},
|
|
250
|
+
toolId: {
|
|
251
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
252
|
+
isOptional: false
|
|
253
|
+
},
|
|
254
|
+
config: {
|
|
255
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
256
|
+
isOptional: true
|
|
257
|
+
},
|
|
258
|
+
order: {
|
|
259
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
260
|
+
isOptional: true
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}),
|
|
264
|
+
output: defineSchemaModel({
|
|
265
|
+
name: "AssignToolToAgentOutput",
|
|
266
|
+
fields: {
|
|
267
|
+
agentToolId: {
|
|
268
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
269
|
+
isOptional: false
|
|
270
|
+
},
|
|
271
|
+
agentId: {
|
|
272
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
273
|
+
isOptional: false
|
|
274
|
+
},
|
|
275
|
+
toolId: {
|
|
276
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
277
|
+
isOptional: false
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}),
|
|
281
|
+
errors: { TOOL_ALREADY_ASSIGNED: {
|
|
282
|
+
description: "This tool is already assigned to the agent",
|
|
283
|
+
http: 409,
|
|
284
|
+
gqlCode: "TOOL_ALREADY_ASSIGNED",
|
|
285
|
+
when: "Tool assignment already exists"
|
|
286
|
+
} }
|
|
287
|
+
},
|
|
288
|
+
policy: { auth: "user" },
|
|
289
|
+
sideEffects: { audit: ["agent.tool.assigned"] }
|
|
290
|
+
});
|
|
291
|
+
/**
|
|
292
|
+
* RemoveToolFromAgentCommand - Removes a tool from an agent.
|
|
293
|
+
*/
|
|
294
|
+
const RemoveToolFromAgentCommand = defineCommand({
|
|
295
|
+
meta: {
|
|
296
|
+
name: "agent.agent.removeTool",
|
|
297
|
+
version: 1,
|
|
298
|
+
stability: "stable",
|
|
299
|
+
owners: [...OWNERS],
|
|
300
|
+
tags: [
|
|
301
|
+
"agent",
|
|
302
|
+
"tool",
|
|
303
|
+
"remove"
|
|
304
|
+
],
|
|
305
|
+
description: "Removes a tool assignment from an agent.",
|
|
306
|
+
goal: "Disable specific tools for an agent.",
|
|
307
|
+
context: "Agent configuration UI - tool management."
|
|
308
|
+
},
|
|
309
|
+
io: {
|
|
310
|
+
input: defineSchemaModel({
|
|
311
|
+
name: "RemoveToolFromAgentInput",
|
|
312
|
+
fields: {
|
|
313
|
+
agentId: {
|
|
314
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
315
|
+
isOptional: false
|
|
316
|
+
},
|
|
317
|
+
toolId: {
|
|
318
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
319
|
+
isOptional: false
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}),
|
|
323
|
+
output: defineSchemaModel({
|
|
324
|
+
name: "RemoveToolFromAgentOutput",
|
|
325
|
+
fields: { success: {
|
|
326
|
+
type: ScalarTypeEnum.Boolean(),
|
|
327
|
+
isOptional: false
|
|
328
|
+
} }
|
|
329
|
+
})
|
|
330
|
+
},
|
|
331
|
+
policy: { auth: "user" },
|
|
332
|
+
sideEffects: { audit: ["agent.tool.removed"] }
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
//#endregion
|
|
336
|
+
export { AssignToolToAgentCommand, CreateAgentCommand, GetAgentQuery, ListAgentsQuery, RemoveToolFromAgentCommand, UpdateAgentCommand };
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema174 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/agent/agent.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Agent status for lifecycle management.
|
|
6
6
|
*/
|
|
7
|
-
declare const AgentStatusEntityEnum:
|
|
7
|
+
declare const AgentStatusEntityEnum: _lssm_lib_schema174.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Agent model provider.
|
|
10
10
|
*/
|
|
11
|
-
declare const ModelProviderEntityEnum:
|
|
11
|
+
declare const ModelProviderEntityEnum: _lssm_lib_schema174.EntityEnumDef;
|
|
12
12
|
/**
|
|
13
13
|
* Agent entity - Represents an AI agent configuration.
|
|
14
14
|
*/
|
|
15
|
-
declare const AgentEntity:
|
|
16
|
-
id:
|
|
17
|
-
organizationId:
|
|
18
|
-
name:
|
|
19
|
-
slug:
|
|
20
|
-
description:
|
|
21
|
-
status:
|
|
22
|
-
modelProvider:
|
|
23
|
-
modelName:
|
|
24
|
-
modelConfig:
|
|
25
|
-
systemPrompt:
|
|
26
|
-
userPromptTemplate:
|
|
27
|
-
toolIds:
|
|
28
|
-
toolChoice:
|
|
29
|
-
maxIterations:
|
|
30
|
-
maxTokensPerRun:
|
|
31
|
-
timeoutMs:
|
|
32
|
-
version:
|
|
33
|
-
tags:
|
|
34
|
-
createdAt:
|
|
35
|
-
updatedAt:
|
|
36
|
-
createdById:
|
|
37
|
-
tools:
|
|
15
|
+
declare const AgentEntity: _lssm_lib_schema174.EntitySpec<{
|
|
16
|
+
id: _lssm_lib_schema174.EntityScalarField;
|
|
17
|
+
organizationId: _lssm_lib_schema174.EntityScalarField;
|
|
18
|
+
name: _lssm_lib_schema174.EntityScalarField;
|
|
19
|
+
slug: _lssm_lib_schema174.EntityScalarField;
|
|
20
|
+
description: _lssm_lib_schema174.EntityScalarField;
|
|
21
|
+
status: _lssm_lib_schema174.EntityEnumField;
|
|
22
|
+
modelProvider: _lssm_lib_schema174.EntityEnumField;
|
|
23
|
+
modelName: _lssm_lib_schema174.EntityScalarField;
|
|
24
|
+
modelConfig: _lssm_lib_schema174.EntityScalarField;
|
|
25
|
+
systemPrompt: _lssm_lib_schema174.EntityScalarField;
|
|
26
|
+
userPromptTemplate: _lssm_lib_schema174.EntityScalarField;
|
|
27
|
+
toolIds: _lssm_lib_schema174.EntityScalarField;
|
|
28
|
+
toolChoice: _lssm_lib_schema174.EntityScalarField;
|
|
29
|
+
maxIterations: _lssm_lib_schema174.EntityScalarField;
|
|
30
|
+
maxTokensPerRun: _lssm_lib_schema174.EntityScalarField;
|
|
31
|
+
timeoutMs: _lssm_lib_schema174.EntityScalarField;
|
|
32
|
+
version: _lssm_lib_schema174.EntityScalarField;
|
|
33
|
+
tags: _lssm_lib_schema174.EntityScalarField;
|
|
34
|
+
createdAt: _lssm_lib_schema174.EntityScalarField;
|
|
35
|
+
updatedAt: _lssm_lib_schema174.EntityScalarField;
|
|
36
|
+
createdById: _lssm_lib_schema174.EntityScalarField;
|
|
37
|
+
tools: _lssm_lib_schema174.EntityRelationField;
|
|
38
38
|
}>;
|
|
39
39
|
/**
|
|
40
40
|
* AgentTool join entity - Links agents to their assigned tools.
|
|
41
41
|
*/
|
|
42
|
-
declare const AgentToolEntity:
|
|
43
|
-
id:
|
|
44
|
-
agentId:
|
|
45
|
-
toolId:
|
|
46
|
-
config:
|
|
47
|
-
order:
|
|
48
|
-
isEnabled:
|
|
49
|
-
createdAt:
|
|
50
|
-
agent:
|
|
51
|
-
tool:
|
|
42
|
+
declare const AgentToolEntity: _lssm_lib_schema174.EntitySpec<{
|
|
43
|
+
id: _lssm_lib_schema174.EntityScalarField;
|
|
44
|
+
agentId: _lssm_lib_schema174.EntityScalarField;
|
|
45
|
+
toolId: _lssm_lib_schema174.EntityScalarField;
|
|
46
|
+
config: _lssm_lib_schema174.EntityScalarField;
|
|
47
|
+
order: _lssm_lib_schema174.EntityScalarField;
|
|
48
|
+
isEnabled: _lssm_lib_schema174.EntityScalarField;
|
|
49
|
+
createdAt: _lssm_lib_schema174.EntityScalarField;
|
|
50
|
+
agent: _lssm_lib_schema174.EntityRelationField;
|
|
51
|
+
tool: _lssm_lib_schema174.EntityRelationField;
|
|
52
52
|
}>;
|
|
53
53
|
//#endregion
|
|
54
54
|
export { AgentEntity, AgentStatusEntityEnum, AgentToolEntity, ModelProviderEntityEnum };
|
|
@@ -1 +1,136 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineEntity, defineEntityEnum, field, index } from "../libs/schema/dist/entity/defineEntity.js";
|
|
2
|
+
import "../libs/schema/dist/entity/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/agent/agent.entity.ts
|
|
5
|
+
/**
|
|
6
|
+
* Agent status for lifecycle management.
|
|
7
|
+
*/
|
|
8
|
+
const AgentStatusEntityEnum = defineEntityEnum({
|
|
9
|
+
name: "AgentStatus",
|
|
10
|
+
values: [
|
|
11
|
+
"DRAFT",
|
|
12
|
+
"ACTIVE",
|
|
13
|
+
"PAUSED",
|
|
14
|
+
"ARCHIVED"
|
|
15
|
+
],
|
|
16
|
+
description: "Lifecycle status of the agent"
|
|
17
|
+
});
|
|
18
|
+
/**
|
|
19
|
+
* Agent model provider.
|
|
20
|
+
*/
|
|
21
|
+
const ModelProviderEntityEnum = defineEntityEnum({
|
|
22
|
+
name: "ModelProvider",
|
|
23
|
+
values: [
|
|
24
|
+
"OPENAI",
|
|
25
|
+
"ANTHROPIC",
|
|
26
|
+
"GOOGLE",
|
|
27
|
+
"MISTRAL",
|
|
28
|
+
"CUSTOM"
|
|
29
|
+
],
|
|
30
|
+
description: "AI model provider"
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Agent entity - Represents an AI agent configuration.
|
|
34
|
+
*/
|
|
35
|
+
const AgentEntity = defineEntity({
|
|
36
|
+
name: "Agent",
|
|
37
|
+
schema: "agent_console",
|
|
38
|
+
description: "Represents an AI agent configuration with assigned tools and parameters.",
|
|
39
|
+
fields: {
|
|
40
|
+
id: field.id(),
|
|
41
|
+
organizationId: field.string({ description: "Organization that owns this agent" }),
|
|
42
|
+
name: field.string({ description: "Agent name (1-100 chars)" }),
|
|
43
|
+
slug: field.string({ description: "URL-safe identifier (lowercase, numbers, hyphens)" }),
|
|
44
|
+
description: field.string({
|
|
45
|
+
isOptional: true,
|
|
46
|
+
description: "Agent description (max 1000 chars)"
|
|
47
|
+
}),
|
|
48
|
+
status: field.enum("AgentStatus", { default: "DRAFT" }),
|
|
49
|
+
modelProvider: field.enum("ModelProvider", { default: "OPENAI" }),
|
|
50
|
+
modelName: field.string({ description: "Model identifier: 'gpt-4', 'claude-3-opus', etc." }),
|
|
51
|
+
modelConfig: field.json({
|
|
52
|
+
isOptional: true,
|
|
53
|
+
description: "Model parameters: temperature, max_tokens, etc."
|
|
54
|
+
}),
|
|
55
|
+
systemPrompt: field.string({ description: "System prompt for the agent" }),
|
|
56
|
+
userPromptTemplate: field.string({
|
|
57
|
+
isOptional: true,
|
|
58
|
+
description: "Template for user prompts"
|
|
59
|
+
}),
|
|
60
|
+
toolIds: field.string({
|
|
61
|
+
isArray: true,
|
|
62
|
+
isOptional: true,
|
|
63
|
+
description: "IDs of assigned tools"
|
|
64
|
+
}),
|
|
65
|
+
toolChoice: field.string({
|
|
66
|
+
default: "auto",
|
|
67
|
+
description: "Tool selection mode: 'auto', 'required', 'none'"
|
|
68
|
+
}),
|
|
69
|
+
maxIterations: field.int({
|
|
70
|
+
default: 10,
|
|
71
|
+
description: "Maximum iterations per run"
|
|
72
|
+
}),
|
|
73
|
+
maxTokensPerRun: field.int({
|
|
74
|
+
isOptional: true,
|
|
75
|
+
description: "Maximum tokens per run"
|
|
76
|
+
}),
|
|
77
|
+
timeoutMs: field.int({
|
|
78
|
+
default: 12e4,
|
|
79
|
+
description: "Execution timeout in milliseconds"
|
|
80
|
+
}),
|
|
81
|
+
version: field.string({
|
|
82
|
+
default: "1.0.0",
|
|
83
|
+
description: "Agent version"
|
|
84
|
+
}),
|
|
85
|
+
tags: field.string({
|
|
86
|
+
isArray: true,
|
|
87
|
+
isOptional: true,
|
|
88
|
+
description: "Tags for categorization"
|
|
89
|
+
}),
|
|
90
|
+
createdAt: field.createdAt(),
|
|
91
|
+
updatedAt: field.updatedAt(),
|
|
92
|
+
createdById: field.string({
|
|
93
|
+
isOptional: true,
|
|
94
|
+
description: "User who created this agent"
|
|
95
|
+
}),
|
|
96
|
+
tools: field.hasMany("Tool", { description: "Tools assigned to this agent" })
|
|
97
|
+
},
|
|
98
|
+
indexes: [
|
|
99
|
+
index.unique(["organizationId", "slug"]),
|
|
100
|
+
index.on(["organizationId", "status"]),
|
|
101
|
+
index.on(["modelProvider", "modelName"])
|
|
102
|
+
],
|
|
103
|
+
enums: [AgentStatusEntityEnum, ModelProviderEntityEnum]
|
|
104
|
+
});
|
|
105
|
+
/**
|
|
106
|
+
* AgentTool join entity - Links agents to their assigned tools.
|
|
107
|
+
*/
|
|
108
|
+
const AgentToolEntity = defineEntity({
|
|
109
|
+
name: "AgentTool",
|
|
110
|
+
schema: "agent_console",
|
|
111
|
+
description: "Links an agent to its assigned tools with configuration.",
|
|
112
|
+
fields: {
|
|
113
|
+
id: field.id(),
|
|
114
|
+
agentId: field.foreignKey({ description: "Agent ID" }),
|
|
115
|
+
toolId: field.foreignKey({ description: "Tool ID" }),
|
|
116
|
+
config: field.json({
|
|
117
|
+
isOptional: true,
|
|
118
|
+
description: "Tool-specific configuration for this agent"
|
|
119
|
+
}),
|
|
120
|
+
order: field.int({
|
|
121
|
+
default: 0,
|
|
122
|
+
description: "Order of tool in agent tool list"
|
|
123
|
+
}),
|
|
124
|
+
isEnabled: field.boolean({
|
|
125
|
+
default: true,
|
|
126
|
+
description: "Whether tool is enabled for this agent"
|
|
127
|
+
}),
|
|
128
|
+
createdAt: field.createdAt(),
|
|
129
|
+
agent: field.belongsTo("Agent", ["agentId"], ["id"]),
|
|
130
|
+
tool: field.belongsTo("Tool", ["toolId"], ["id"])
|
|
131
|
+
},
|
|
132
|
+
indexes: [index.unique(["agentId", "toolId"]), index.on(["agentId", "order"])]
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
export { AgentEntity, AgentStatusEntityEnum, AgentToolEntity, ModelProviderEntityEnum };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema268 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/agent/agent.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Agent status enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const AgentStatusEnum:
|
|
7
|
+
declare const AgentStatusEnum: _lssm_lib_schema268.EnumType<[string, string, string, string]>;
|
|
8
8
|
/**
|
|
9
9
|
* Model provider enum.
|
|
10
10
|
*/
|
|
11
|
-
declare const ModelProviderEnum:
|
|
11
|
+
declare const ModelProviderEnum: _lssm_lib_schema268.EnumType<[string, string, string, string, string]>;
|
|
12
12
|
/**
|
|
13
13
|
* Tool choice mode enum.
|
|
14
14
|
*/
|
|
15
|
-
declare const ToolChoiceEnum:
|
|
15
|
+
declare const ToolChoiceEnum: _lssm_lib_schema268.EnumType<[string, string, string]>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { AgentStatusEnum, ModelProviderEnum, ToolChoiceEnum };
|
package/dist/agent/agent.enum.js
CHANGED
|
@@ -1 +1,34 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineEnum } from "../libs/schema/dist/EnumType.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/agent/agent.enum.ts
|
|
5
|
+
/**
|
|
6
|
+
* Agent status enum.
|
|
7
|
+
*/
|
|
8
|
+
const AgentStatusEnum = defineEnum("AgentStatus", [
|
|
9
|
+
"DRAFT",
|
|
10
|
+
"ACTIVE",
|
|
11
|
+
"PAUSED",
|
|
12
|
+
"ARCHIVED"
|
|
13
|
+
]);
|
|
14
|
+
/**
|
|
15
|
+
* Model provider enum.
|
|
16
|
+
*/
|
|
17
|
+
const ModelProviderEnum = defineEnum("ModelProvider", [
|
|
18
|
+
"OPENAI",
|
|
19
|
+
"ANTHROPIC",
|
|
20
|
+
"GOOGLE",
|
|
21
|
+
"MISTRAL",
|
|
22
|
+
"CUSTOM"
|
|
23
|
+
]);
|
|
24
|
+
/**
|
|
25
|
+
* Tool choice mode enum.
|
|
26
|
+
*/
|
|
27
|
+
const ToolChoiceEnum = defineEnum("ToolChoice", [
|
|
28
|
+
"auto",
|
|
29
|
+
"required",
|
|
30
|
+
"none"
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
//#endregion
|
|
34
|
+
export { AgentStatusEnum, ModelProviderEnum, ToolChoiceEnum };
|