@lssm/example.agent-console 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
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 +201 -166
- 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
|
@@ -1 +1,288 @@
|
|
|
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 { defineCommand, defineQuery } from "../libs/contracts/dist/spec.js";
|
|
5
|
+
import { ToolCategoryEnum, ToolStatusEnum } from "./tool.enum.js";
|
|
6
|
+
import { CreateToolInputModel, ToolModel, ToolSummaryModel, UpdateToolInputModel } from "./tool.schema.js";
|
|
7
|
+
|
|
8
|
+
//#region src/tool/tool.contracts.ts
|
|
9
|
+
const OWNERS = ["agent-console-team"];
|
|
10
|
+
/**
|
|
11
|
+
* CreateToolCommand - Creates a new tool definition.
|
|
12
|
+
*/
|
|
13
|
+
const CreateToolCommand = defineCommand({
|
|
14
|
+
meta: {
|
|
15
|
+
name: "agent.tool.create",
|
|
16
|
+
version: 1,
|
|
17
|
+
stability: "stable",
|
|
18
|
+
owners: [...OWNERS],
|
|
19
|
+
tags: ["tool", "create"],
|
|
20
|
+
description: "Creates a new AI tool definition.",
|
|
21
|
+
goal: "Allow users to define new tools that agents can use.",
|
|
22
|
+
context: "Called from the tool builder UI when creating a new tool."
|
|
23
|
+
},
|
|
24
|
+
io: {
|
|
25
|
+
input: CreateToolInputModel,
|
|
26
|
+
output: defineSchemaModel({
|
|
27
|
+
name: "CreateToolOutput",
|
|
28
|
+
fields: {
|
|
29
|
+
id: {
|
|
30
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
31
|
+
isOptional: false
|
|
32
|
+
},
|
|
33
|
+
name: {
|
|
34
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
35
|
+
isOptional: false
|
|
36
|
+
},
|
|
37
|
+
slug: {
|
|
38
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
39
|
+
isOptional: false
|
|
40
|
+
},
|
|
41
|
+
status: {
|
|
42
|
+
type: ToolStatusEnum,
|
|
43
|
+
isOptional: false
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}),
|
|
47
|
+
errors: { SLUG_EXISTS: {
|
|
48
|
+
description: "A tool with this slug already exists in the organization",
|
|
49
|
+
http: 409,
|
|
50
|
+
gqlCode: "SLUG_EXISTS",
|
|
51
|
+
when: "Slug is already taken"
|
|
52
|
+
} }
|
|
53
|
+
},
|
|
54
|
+
policy: { auth: "user" },
|
|
55
|
+
sideEffects: {
|
|
56
|
+
emits: [{
|
|
57
|
+
name: "tool.created",
|
|
58
|
+
version: 1,
|
|
59
|
+
when: "Tool is successfully created",
|
|
60
|
+
payload: ToolSummaryModel
|
|
61
|
+
}],
|
|
62
|
+
audit: ["tool.created"]
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* UpdateToolCommand - Updates an existing tool.
|
|
67
|
+
*/
|
|
68
|
+
const UpdateToolCommand = defineCommand({
|
|
69
|
+
meta: {
|
|
70
|
+
name: "agent.tool.update",
|
|
71
|
+
version: 1,
|
|
72
|
+
stability: "stable",
|
|
73
|
+
owners: [...OWNERS],
|
|
74
|
+
tags: ["tool", "update"],
|
|
75
|
+
description: "Updates an existing AI tool definition.",
|
|
76
|
+
goal: "Allow users to modify tool settings and configuration.",
|
|
77
|
+
context: "Called from the tool settings UI."
|
|
78
|
+
},
|
|
79
|
+
io: {
|
|
80
|
+
input: UpdateToolInputModel,
|
|
81
|
+
output: defineSchemaModel({
|
|
82
|
+
name: "UpdateToolOutput",
|
|
83
|
+
fields: {
|
|
84
|
+
id: {
|
|
85
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
+
isOptional: false
|
|
87
|
+
},
|
|
88
|
+
name: {
|
|
89
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
90
|
+
isOptional: false
|
|
91
|
+
},
|
|
92
|
+
status: {
|
|
93
|
+
type: ToolStatusEnum,
|
|
94
|
+
isOptional: false
|
|
95
|
+
},
|
|
96
|
+
updatedAt: {
|
|
97
|
+
type: ScalarTypeEnum.DateTime(),
|
|
98
|
+
isOptional: false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}),
|
|
102
|
+
errors: { TOOL_NOT_FOUND: {
|
|
103
|
+
description: "The specified tool does not exist",
|
|
104
|
+
http: 404,
|
|
105
|
+
gqlCode: "TOOL_NOT_FOUND",
|
|
106
|
+
when: "Tool ID is invalid"
|
|
107
|
+
} }
|
|
108
|
+
},
|
|
109
|
+
policy: { auth: "user" },
|
|
110
|
+
sideEffects: {
|
|
111
|
+
emits: [{
|
|
112
|
+
name: "tool.updated",
|
|
113
|
+
version: 1,
|
|
114
|
+
when: "Tool is updated",
|
|
115
|
+
payload: ToolSummaryModel
|
|
116
|
+
}],
|
|
117
|
+
audit: ["tool.updated"]
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
/**
|
|
121
|
+
* GetToolQuery - Retrieves a tool by ID.
|
|
122
|
+
*/
|
|
123
|
+
const GetToolQuery = defineQuery({
|
|
124
|
+
meta: {
|
|
125
|
+
name: "agent.tool.get",
|
|
126
|
+
version: 1,
|
|
127
|
+
stability: "stable",
|
|
128
|
+
owners: [...OWNERS],
|
|
129
|
+
tags: ["tool", "get"],
|
|
130
|
+
description: "Retrieves a tool by its ID.",
|
|
131
|
+
goal: "View detailed tool configuration.",
|
|
132
|
+
context: "Called when viewing tool details or editing."
|
|
133
|
+
},
|
|
134
|
+
io: {
|
|
135
|
+
input: defineSchemaModel({
|
|
136
|
+
name: "GetToolInput",
|
|
137
|
+
fields: { toolId: {
|
|
138
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
139
|
+
isOptional: false
|
|
140
|
+
} }
|
|
141
|
+
}),
|
|
142
|
+
output: ToolModel,
|
|
143
|
+
errors: { TOOL_NOT_FOUND: {
|
|
144
|
+
description: "The specified tool does not exist",
|
|
145
|
+
http: 404,
|
|
146
|
+
gqlCode: "TOOL_NOT_FOUND",
|
|
147
|
+
when: "Tool ID is invalid"
|
|
148
|
+
} }
|
|
149
|
+
},
|
|
150
|
+
policy: { auth: "user" }
|
|
151
|
+
});
|
|
152
|
+
/**
|
|
153
|
+
* ListToolsQuery - Lists tools for an organization.
|
|
154
|
+
*/
|
|
155
|
+
const ListToolsQuery = defineQuery({
|
|
156
|
+
meta: {
|
|
157
|
+
name: "agent.tool.list",
|
|
158
|
+
version: 1,
|
|
159
|
+
stability: "stable",
|
|
160
|
+
owners: [...OWNERS],
|
|
161
|
+
tags: ["tool", "list"],
|
|
162
|
+
description: "Lists tools for an organization with optional filtering.",
|
|
163
|
+
goal: "Browse and search available tools.",
|
|
164
|
+
context: "Tool list/dashboard view."
|
|
165
|
+
},
|
|
166
|
+
io: {
|
|
167
|
+
input: defineSchemaModel({
|
|
168
|
+
name: "ListToolsInput",
|
|
169
|
+
fields: {
|
|
170
|
+
organizationId: {
|
|
171
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
172
|
+
isOptional: false
|
|
173
|
+
},
|
|
174
|
+
category: {
|
|
175
|
+
type: ToolCategoryEnum,
|
|
176
|
+
isOptional: true
|
|
177
|
+
},
|
|
178
|
+
status: {
|
|
179
|
+
type: ToolStatusEnum,
|
|
180
|
+
isOptional: true
|
|
181
|
+
},
|
|
182
|
+
search: {
|
|
183
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
184
|
+
isOptional: true
|
|
185
|
+
},
|
|
186
|
+
limit: {
|
|
187
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
188
|
+
isOptional: true,
|
|
189
|
+
defaultValue: 20
|
|
190
|
+
},
|
|
191
|
+
offset: {
|
|
192
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
193
|
+
isOptional: true,
|
|
194
|
+
defaultValue: 0
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}),
|
|
198
|
+
output: defineSchemaModel({
|
|
199
|
+
name: "ListToolsOutput",
|
|
200
|
+
fields: {
|
|
201
|
+
items: {
|
|
202
|
+
type: ToolSummaryModel,
|
|
203
|
+
isArray: true,
|
|
204
|
+
isOptional: false
|
|
205
|
+
},
|
|
206
|
+
total: {
|
|
207
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
208
|
+
isOptional: false
|
|
209
|
+
},
|
|
210
|
+
hasMore: {
|
|
211
|
+
type: ScalarTypeEnum.Boolean(),
|
|
212
|
+
isOptional: false
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
})
|
|
216
|
+
},
|
|
217
|
+
policy: { auth: "user" }
|
|
218
|
+
});
|
|
219
|
+
/**
|
|
220
|
+
* TestToolCommand - Tests a tool with sample input.
|
|
221
|
+
*/
|
|
222
|
+
const TestToolCommand = defineCommand({
|
|
223
|
+
meta: {
|
|
224
|
+
name: "agent.tool.test",
|
|
225
|
+
version: 1,
|
|
226
|
+
stability: "stable",
|
|
227
|
+
owners: [...OWNERS],
|
|
228
|
+
tags: ["tool", "test"],
|
|
229
|
+
description: "Tests a tool with sample input to verify it works correctly.",
|
|
230
|
+
goal: "Validate tool configuration before deployment.",
|
|
231
|
+
context: "Tool builder UI - test panel."
|
|
232
|
+
},
|
|
233
|
+
io: {
|
|
234
|
+
input: defineSchemaModel({
|
|
235
|
+
name: "TestToolInput",
|
|
236
|
+
fields: {
|
|
237
|
+
toolId: {
|
|
238
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
239
|
+
isOptional: false
|
|
240
|
+
},
|
|
241
|
+
testInput: {
|
|
242
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
243
|
+
isOptional: false
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}),
|
|
247
|
+
output: defineSchemaModel({
|
|
248
|
+
name: "TestToolOutput",
|
|
249
|
+
fields: {
|
|
250
|
+
success: {
|
|
251
|
+
type: ScalarTypeEnum.Boolean(),
|
|
252
|
+
isOptional: false
|
|
253
|
+
},
|
|
254
|
+
output: {
|
|
255
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
256
|
+
isOptional: true
|
|
257
|
+
},
|
|
258
|
+
error: {
|
|
259
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
260
|
+
isOptional: true
|
|
261
|
+
},
|
|
262
|
+
durationMs: {
|
|
263
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
264
|
+
isOptional: false
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}),
|
|
268
|
+
errors: {
|
|
269
|
+
TOOL_NOT_FOUND: {
|
|
270
|
+
description: "The specified tool does not exist",
|
|
271
|
+
http: 404,
|
|
272
|
+
gqlCode: "TOOL_NOT_FOUND",
|
|
273
|
+
when: "Tool ID is invalid"
|
|
274
|
+
},
|
|
275
|
+
TOOL_EXECUTION_ERROR: {
|
|
276
|
+
description: "Tool execution failed",
|
|
277
|
+
http: 500,
|
|
278
|
+
gqlCode: "TOOL_EXECUTION_ERROR",
|
|
279
|
+
when: "Tool returns an error"
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
policy: { auth: "user" },
|
|
284
|
+
sideEffects: { audit: ["tool.tested"] }
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
//#endregion
|
|
288
|
+
export { CreateToolCommand, GetToolQuery, ListToolsQuery, TestToolCommand, UpdateToolCommand };
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema283 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/tool/tool.entity.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tool category enum for entities.
|
|
6
6
|
*/
|
|
7
|
-
declare const ToolCategoryEntityEnum:
|
|
7
|
+
declare const ToolCategoryEntityEnum: _lssm_lib_schema283.EntityEnumDef;
|
|
8
8
|
/**
|
|
9
9
|
* Tool status enum for entities.
|
|
10
10
|
*/
|
|
11
|
-
declare const ToolStatusEntityEnum:
|
|
11
|
+
declare const ToolStatusEntityEnum: _lssm_lib_schema283.EntityEnumDef;
|
|
12
12
|
/**
|
|
13
13
|
* Implementation type enum for entities.
|
|
14
14
|
*/
|
|
15
|
-
declare const ImplementationTypeEntityEnum:
|
|
15
|
+
declare const ImplementationTypeEntityEnum: _lssm_lib_schema283.EntityEnumDef;
|
|
16
16
|
/**
|
|
17
17
|
* Tool entity - Represents an AI tool definition.
|
|
18
18
|
*/
|
|
19
|
-
declare const ToolEntity:
|
|
20
|
-
id:
|
|
21
|
-
organizationId:
|
|
22
|
-
name:
|
|
23
|
-
slug:
|
|
24
|
-
description:
|
|
25
|
-
category:
|
|
26
|
-
status:
|
|
27
|
-
parametersSchema:
|
|
28
|
-
outputSchema:
|
|
29
|
-
implementationType:
|
|
30
|
-
implementationConfig:
|
|
31
|
-
maxInvocationsPerMinute:
|
|
32
|
-
timeoutMs:
|
|
33
|
-
version:
|
|
34
|
-
tags:
|
|
35
|
-
createdAt:
|
|
36
|
-
updatedAt:
|
|
37
|
-
createdById:
|
|
38
|
-
agents:
|
|
19
|
+
declare const ToolEntity: _lssm_lib_schema283.EntitySpec<{
|
|
20
|
+
id: _lssm_lib_schema283.EntityScalarField;
|
|
21
|
+
organizationId: _lssm_lib_schema283.EntityScalarField;
|
|
22
|
+
name: _lssm_lib_schema283.EntityScalarField;
|
|
23
|
+
slug: _lssm_lib_schema283.EntityScalarField;
|
|
24
|
+
description: _lssm_lib_schema283.EntityScalarField;
|
|
25
|
+
category: _lssm_lib_schema283.EntityEnumField;
|
|
26
|
+
status: _lssm_lib_schema283.EntityEnumField;
|
|
27
|
+
parametersSchema: _lssm_lib_schema283.EntityScalarField;
|
|
28
|
+
outputSchema: _lssm_lib_schema283.EntityScalarField;
|
|
29
|
+
implementationType: _lssm_lib_schema283.EntityEnumField;
|
|
30
|
+
implementationConfig: _lssm_lib_schema283.EntityScalarField;
|
|
31
|
+
maxInvocationsPerMinute: _lssm_lib_schema283.EntityScalarField;
|
|
32
|
+
timeoutMs: _lssm_lib_schema283.EntityScalarField;
|
|
33
|
+
version: _lssm_lib_schema283.EntityScalarField;
|
|
34
|
+
tags: _lssm_lib_schema283.EntityScalarField;
|
|
35
|
+
createdAt: _lssm_lib_schema283.EntityScalarField;
|
|
36
|
+
updatedAt: _lssm_lib_schema283.EntityScalarField;
|
|
37
|
+
createdById: _lssm_lib_schema283.EntityScalarField;
|
|
38
|
+
agents: _lssm_lib_schema283.EntityRelationField;
|
|
39
39
|
}>;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { ImplementationTypeEntityEnum, ToolCategoryEntityEnum, ToolEntity, ToolStatusEntityEnum };
|
package/dist/tool/tool.entity.js
CHANGED
|
@@ -1 +1,105 @@
|
|
|
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/tool/tool.entity.ts
|
|
5
|
+
/**
|
|
6
|
+
* Tool category enum for entities.
|
|
7
|
+
*/
|
|
8
|
+
const ToolCategoryEntityEnum = defineEntityEnum({
|
|
9
|
+
name: "ToolCategory",
|
|
10
|
+
values: [
|
|
11
|
+
"RETRIEVAL",
|
|
12
|
+
"COMPUTATION",
|
|
13
|
+
"COMMUNICATION",
|
|
14
|
+
"INTEGRATION",
|
|
15
|
+
"UTILITY",
|
|
16
|
+
"CUSTOM"
|
|
17
|
+
],
|
|
18
|
+
description: "Category of tool"
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Tool status enum for entities.
|
|
22
|
+
*/
|
|
23
|
+
const ToolStatusEntityEnum = defineEntityEnum({
|
|
24
|
+
name: "ToolStatus",
|
|
25
|
+
values: [
|
|
26
|
+
"DRAFT",
|
|
27
|
+
"ACTIVE",
|
|
28
|
+
"DEPRECATED",
|
|
29
|
+
"DISABLED"
|
|
30
|
+
],
|
|
31
|
+
description: "Status of tool"
|
|
32
|
+
});
|
|
33
|
+
/**
|
|
34
|
+
* Implementation type enum for entities.
|
|
35
|
+
*/
|
|
36
|
+
const ImplementationTypeEntityEnum = defineEntityEnum({
|
|
37
|
+
name: "ImplementationType",
|
|
38
|
+
values: [
|
|
39
|
+
"http",
|
|
40
|
+
"function",
|
|
41
|
+
"workflow"
|
|
42
|
+
],
|
|
43
|
+
description: "How the tool is implemented"
|
|
44
|
+
});
|
|
45
|
+
/**
|
|
46
|
+
* Tool entity - Represents an AI tool definition.
|
|
47
|
+
*/
|
|
48
|
+
const ToolEntity = defineEntity({
|
|
49
|
+
name: "Tool",
|
|
50
|
+
schema: "agent_console",
|
|
51
|
+
description: "An AI tool that can be used by agents.",
|
|
52
|
+
fields: {
|
|
53
|
+
id: field.id(),
|
|
54
|
+
organizationId: field.string({ description: "Organization that owns this tool" }),
|
|
55
|
+
name: field.string({ description: "Tool name" }),
|
|
56
|
+
slug: field.string({ description: "URL-safe identifier" }),
|
|
57
|
+
description: field.string({ description: "Tool description" }),
|
|
58
|
+
category: field.enum("ToolCategory", { default: "CUSTOM" }),
|
|
59
|
+
status: field.enum("ToolStatus", { default: "DRAFT" }),
|
|
60
|
+
parametersSchema: field.json({ description: "JSON Schema for tool parameters" }),
|
|
61
|
+
outputSchema: field.json({
|
|
62
|
+
isOptional: true,
|
|
63
|
+
description: "JSON Schema for tool output"
|
|
64
|
+
}),
|
|
65
|
+
implementationType: field.enum("ImplementationType"),
|
|
66
|
+
implementationConfig: field.json({ description: "Implementation configuration" }),
|
|
67
|
+
maxInvocationsPerMinute: field.int({
|
|
68
|
+
isOptional: true,
|
|
69
|
+
description: "Rate limit"
|
|
70
|
+
}),
|
|
71
|
+
timeoutMs: field.int({
|
|
72
|
+
default: 3e4,
|
|
73
|
+
description: "Execution timeout"
|
|
74
|
+
}),
|
|
75
|
+
version: field.string({
|
|
76
|
+
default: "1.0.0",
|
|
77
|
+
description: "Tool version"
|
|
78
|
+
}),
|
|
79
|
+
tags: field.string({
|
|
80
|
+
isArray: true,
|
|
81
|
+
isOptional: true,
|
|
82
|
+
description: "Tags for categorization"
|
|
83
|
+
}),
|
|
84
|
+
createdAt: field.createdAt(),
|
|
85
|
+
updatedAt: field.updatedAt(),
|
|
86
|
+
createdById: field.string({
|
|
87
|
+
isOptional: true,
|
|
88
|
+
description: "User who created this tool"
|
|
89
|
+
}),
|
|
90
|
+
agents: field.hasMany("Agent", { description: "Agents using this tool" })
|
|
91
|
+
},
|
|
92
|
+
indexes: [
|
|
93
|
+
index.unique(["organizationId", "slug"]),
|
|
94
|
+
index.on(["organizationId", "category"]),
|
|
95
|
+
index.on(["organizationId", "status"])
|
|
96
|
+
],
|
|
97
|
+
enums: [
|
|
98
|
+
ToolCategoryEntityEnum,
|
|
99
|
+
ToolStatusEntityEnum,
|
|
100
|
+
ImplementationTypeEntityEnum
|
|
101
|
+
]
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
//#endregion
|
|
105
|
+
export { ImplementationTypeEntityEnum, ToolCategoryEntityEnum, ToolEntity, ToolStatusEntityEnum };
|
package/dist/tool/tool.enum.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema306 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/tool/tool.enum.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* Tool category enum.
|
|
6
6
|
*/
|
|
7
|
-
declare const ToolCategoryEnum:
|
|
7
|
+
declare const ToolCategoryEnum: _lssm_lib_schema306.EnumType<[string, string, string, string, string, string]>;
|
|
8
8
|
/**
|
|
9
9
|
* Tool status enum.
|
|
10
10
|
*/
|
|
11
|
-
declare const ToolStatusEnum:
|
|
11
|
+
declare const ToolStatusEnum: _lssm_lib_schema306.EnumType<[string, string, string, string]>;
|
|
12
12
|
/**
|
|
13
13
|
* Implementation type enum.
|
|
14
14
|
*/
|
|
15
|
-
declare const ImplementationTypeEnum:
|
|
15
|
+
declare const ImplementationTypeEnum: _lssm_lib_schema306.EnumType<[string, string, string]>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum };
|
package/dist/tool/tool.enum.js
CHANGED
|
@@ -1 +1,35 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { defineEnum } from "../libs/schema/dist/EnumType.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
|
|
4
|
+
//#region src/tool/tool.enum.ts
|
|
5
|
+
/**
|
|
6
|
+
* Tool category enum.
|
|
7
|
+
*/
|
|
8
|
+
const ToolCategoryEnum = defineEnum("ToolCategory", [
|
|
9
|
+
"RETRIEVAL",
|
|
10
|
+
"COMPUTATION",
|
|
11
|
+
"COMMUNICATION",
|
|
12
|
+
"INTEGRATION",
|
|
13
|
+
"UTILITY",
|
|
14
|
+
"CUSTOM"
|
|
15
|
+
]);
|
|
16
|
+
/**
|
|
17
|
+
* Tool status enum.
|
|
18
|
+
*/
|
|
19
|
+
const ToolStatusEnum = defineEnum("ToolStatus", [
|
|
20
|
+
"DRAFT",
|
|
21
|
+
"ACTIVE",
|
|
22
|
+
"DEPRECATED",
|
|
23
|
+
"DISABLED"
|
|
24
|
+
]);
|
|
25
|
+
/**
|
|
26
|
+
* Implementation type enum.
|
|
27
|
+
*/
|
|
28
|
+
const ImplementationTypeEnum = defineEnum("ImplementationType", [
|
|
29
|
+
"http",
|
|
30
|
+
"function",
|
|
31
|
+
"workflow"
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
export { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum };
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_contracts6 from "@lssm/lib.contracts";
|
|
2
|
+
import * as _lssm_lib_schema260 from "@lssm/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/tool/tool.event.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* ToolCreatedEvent - A new tool was created.
|
|
7
7
|
*/
|
|
8
|
-
declare const ToolCreatedEvent:
|
|
8
|
+
declare const ToolCreatedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema260.SchemaModel<{
|
|
9
9
|
id: {
|
|
10
|
-
type:
|
|
10
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
11
11
|
isOptional: false;
|
|
12
12
|
};
|
|
13
13
|
organizationId: {
|
|
14
|
-
type:
|
|
14
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
15
15
|
isOptional: false;
|
|
16
16
|
};
|
|
17
17
|
name: {
|
|
18
|
-
type:
|
|
18
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
19
19
|
isOptional: false;
|
|
20
20
|
};
|
|
21
21
|
slug: {
|
|
22
|
-
type:
|
|
22
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
23
23
|
isOptional: false;
|
|
24
24
|
};
|
|
25
25
|
category: {
|
|
26
|
-
type:
|
|
26
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
27
27
|
isOptional: false;
|
|
28
28
|
};
|
|
29
29
|
implementationType: {
|
|
30
|
-
type:
|
|
30
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
31
31
|
isOptional: false;
|
|
32
32
|
};
|
|
33
33
|
createdById: {
|
|
34
|
-
type:
|
|
34
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
35
35
|
isOptional: true;
|
|
36
36
|
};
|
|
37
37
|
createdAt: {
|
|
38
|
-
type:
|
|
38
|
+
type: _lssm_lib_schema260.FieldType<Date, string>;
|
|
39
39
|
isOptional: false;
|
|
40
40
|
};
|
|
41
41
|
}>>;
|
|
42
42
|
/**
|
|
43
43
|
* ToolUpdatedEvent - A tool was updated.
|
|
44
44
|
*/
|
|
45
|
-
declare const ToolUpdatedEvent:
|
|
45
|
+
declare const ToolUpdatedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema260.SchemaModel<{
|
|
46
46
|
id: {
|
|
47
|
-
type:
|
|
47
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
48
48
|
isOptional: false;
|
|
49
49
|
};
|
|
50
50
|
organizationId: {
|
|
51
|
-
type:
|
|
51
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
52
52
|
isOptional: false;
|
|
53
53
|
};
|
|
54
54
|
name: {
|
|
55
|
-
type:
|
|
55
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
56
56
|
isOptional: false;
|
|
57
57
|
};
|
|
58
58
|
status: {
|
|
59
|
-
type:
|
|
59
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
60
60
|
isOptional: false;
|
|
61
61
|
};
|
|
62
62
|
updatedFields: {
|
|
63
|
-
type:
|
|
63
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
64
64
|
isArray: true;
|
|
65
65
|
isOptional: false;
|
|
66
66
|
};
|
|
67
67
|
updatedAt: {
|
|
68
|
-
type:
|
|
68
|
+
type: _lssm_lib_schema260.FieldType<Date, string>;
|
|
69
69
|
isOptional: false;
|
|
70
70
|
};
|
|
71
71
|
}>>;
|
|
72
72
|
/**
|
|
73
73
|
* ToolStatusChangedEvent - A tool's status was changed.
|
|
74
74
|
*/
|
|
75
|
-
declare const ToolStatusChangedEvent:
|
|
75
|
+
declare const ToolStatusChangedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema260.SchemaModel<{
|
|
76
76
|
id: {
|
|
77
|
-
type:
|
|
77
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
78
78
|
isOptional: false;
|
|
79
79
|
};
|
|
80
80
|
organizationId: {
|
|
81
|
-
type:
|
|
81
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
82
82
|
isOptional: false;
|
|
83
83
|
};
|
|
84
84
|
name: {
|
|
85
|
-
type:
|
|
85
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
86
86
|
isOptional: false;
|
|
87
87
|
};
|
|
88
88
|
previousStatus: {
|
|
89
|
-
type:
|
|
89
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
90
90
|
isOptional: false;
|
|
91
91
|
};
|
|
92
92
|
newStatus: {
|
|
93
|
-
type:
|
|
93
|
+
type: _lssm_lib_schema260.FieldType<string, string>;
|
|
94
94
|
isOptional: false;
|
|
95
95
|
};
|
|
96
96
|
changedAt: {
|
|
97
|
-
type:
|
|
97
|
+
type: _lssm_lib_schema260.FieldType<Date, string>;
|
|
98
98
|
isOptional: false;
|
|
99
99
|
};
|
|
100
100
|
}>>;
|