@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.
Files changed (176) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +201 -166
  2. package/CHANGELOG.md +6 -6
  3. package/dist/agent/agent.contracts.d.ts +126 -126
  4. package/dist/agent/agent.contracts.js +336 -1
  5. package/dist/agent/agent.entity.d.ts +36 -36
  6. package/dist/agent/agent.entity.js +136 -1
  7. package/dist/agent/agent.enum.d.ts +4 -4
  8. package/dist/agent/agent.enum.js +34 -1
  9. package/dist/agent/agent.event.d.ts +31 -31
  10. package/dist/agent/agent.event.js +183 -1
  11. package/dist/agent/agent.handler.d.ts +1 -1
  12. package/dist/agent/agent.handler.js +83 -1
  13. package/dist/agent/agent.presentation.js +75 -1
  14. package/dist/agent/agent.schema.d.ts +95 -95
  15. package/dist/agent/agent.schema.js +407 -1
  16. package/dist/agent/index.js +9 -1
  17. package/dist/agent.feature.js +295 -1
  18. package/dist/docs/agent-console.docblock.js +69 -5
  19. package/dist/docs/index.js +1 -1
  20. package/dist/example.js +50 -1
  21. package/dist/handlers/index.js +5 -1
  22. package/dist/index.js +32 -1
  23. package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
  24. package/dist/libs/contracts/dist/client/index.js +5 -1
  25. package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
  26. package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
  27. package/dist/libs/contracts/dist/client/react/index.js +4 -1
  28. package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
  29. package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
  30. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  31. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  32. package/dist/libs/contracts/dist/docs/index.js +29 -1
  33. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  34. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  35. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  36. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  37. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  38. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  39. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  40. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  41. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  42. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  43. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  44. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  45. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  46. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  47. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  48. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  49. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  50. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  51. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  52. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  53. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  54. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  55. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  56. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  57. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  58. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  59. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  60. package/dist/libs/contracts/dist/events.js +10 -1
  61. package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
  62. package/dist/libs/contracts/dist/index.js +71 -1
  63. package/dist/libs/contracts/dist/install.js +2 -1
  64. package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
  65. package/dist/libs/contracts/dist/integrations/index.js +18 -1
  66. package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
  67. package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
  68. package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
  69. package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
  70. package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
  71. package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
  72. package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
  73. package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
  74. package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
  75. package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
  76. package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
  77. package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
  78. package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
  79. package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
  80. package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
  81. package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
  82. package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
  83. package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
  84. package/dist/libs/contracts/dist/jsonschema.js +1 -1
  85. package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
  86. package/dist/libs/contracts/dist/knowledge/index.js +7 -1
  87. package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
  88. package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
  89. package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
  90. package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
  91. package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
  92. package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
  93. package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
  94. package/dist/libs/contracts/dist/llm/exporters.js +19 -1
  95. package/dist/libs/contracts/dist/llm/index.js +2 -1
  96. package/dist/libs/contracts/dist/llm/prompts.js +1 -1
  97. package/dist/libs/contracts/dist/onboarding-base.js +196 -1
  98. package/dist/libs/contracts/dist/openapi.js +1 -1
  99. package/dist/libs/contracts/dist/ownership.js +21 -1
  100. package/dist/libs/contracts/dist/presentations.js +1 -1
  101. package/dist/libs/contracts/dist/presentations.v2.js +11 -1
  102. package/dist/libs/contracts/dist/prompt.js +1 -1
  103. package/dist/libs/contracts/dist/promptRegistry.js +1 -1
  104. package/dist/libs/contracts/dist/regenerator/index.js +1 -1
  105. package/dist/libs/contracts/dist/regenerator/service.js +6 -1
  106. package/dist/libs/contracts/dist/registry.js +2 -1
  107. package/dist/libs/contracts/dist/resources.js +1 -1
  108. package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
  109. package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
  110. package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
  111. package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -1
  112. package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
  113. package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
  114. package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
  115. package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
  116. package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
  117. package/dist/libs/contracts/dist/server/index.js +8 -1
  118. package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
  119. package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
  120. package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
  121. package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
  122. package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
  123. package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
  124. package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
  125. package/dist/libs/contracts/dist/server/rest-express.js +1 -1
  126. package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
  127. package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
  128. package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
  129. package/dist/libs/contracts/dist/spec.js +34 -1
  130. package/dist/libs/contracts/dist/telemetry/index.js +1 -1
  131. package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
  132. package/dist/libs/contracts/dist/tests/index.js +1 -1
  133. package/dist/libs/contracts/dist/tests/runner.js +2 -1
  134. package/dist/libs/contracts/dist/workflow/index.js +1 -1
  135. package/dist/libs/contracts/dist/workflow/runner.js +1 -1
  136. package/dist/libs/schema/dist/EnumType.js +56 -1
  137. package/dist/libs/schema/dist/FieldType.js +49 -1
  138. package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
  139. package/dist/libs/schema/dist/SchemaModel.js +39 -1
  140. package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
  141. package/dist/libs/schema/dist/entity/index.js +2 -1
  142. package/dist/libs/schema/dist/entity/types.js +1 -1
  143. package/dist/libs/schema/dist/index.js +6 -1
  144. package/dist/presentations/index.js +5 -1
  145. package/dist/run/index.js +9 -1
  146. package/dist/run/run.contracts.d.ts +175 -175
  147. package/dist/run/run.contracts.js +469 -1
  148. package/dist/run/run.entity.d.ts +56 -56
  149. package/dist/run/run.entity.js +205 -1
  150. package/dist/run/run.enum.d.ts +5 -5
  151. package/dist/run/run.enum.js +45 -1
  152. package/dist/run/run.event.d.ts +71 -71
  153. package/dist/run/run.event.js +389 -1
  154. package/dist/run/run.handler.js +82 -1
  155. package/dist/run/run.presentation.js +55 -1
  156. package/dist/run/run.schema.d.ts +99 -99
  157. package/dist/run/run.schema.js +339 -1
  158. package/dist/shared/index.js +5 -1
  159. package/dist/shared/mock-agents.js +93 -1
  160. package/dist/shared/mock-runs.js +117 -1
  161. package/dist/shared/mock-tools.js +180 -1
  162. package/dist/tool/index.js +9 -1
  163. package/dist/tool/tool.contracts.d.ts +101 -101
  164. package/dist/tool/tool.contracts.js +288 -1
  165. package/dist/tool/tool.entity.d.ts +24 -24
  166. package/dist/tool/tool.entity.js +105 -1
  167. package/dist/tool/tool.enum.d.ts +4 -4
  168. package/dist/tool/tool.enum.js +35 -1
  169. package/dist/tool/tool.event.d.ts +25 -25
  170. package/dist/tool/tool.event.js +145 -1
  171. package/dist/tool/tool.handler.d.ts +1 -1
  172. package/dist/tool/tool.handler.js +86 -1
  173. package/dist/tool/tool.presentation.js +55 -1
  174. package/dist/tool/tool.schema.d.ts +52 -52
  175. package/dist/tool/tool.schema.js +237 -1
  176. package/package.json +8 -8
@@ -1 +1,288 @@
1
- import{l as e}from"../libs/schema/dist/ScalarTypeEnum.js";import{n as t}from"../libs/schema/dist/SchemaModel.js";import"../libs/schema/dist/index.js";import{n,t as r}from"../libs/contracts/dist/spec.js";import{ToolCategoryEnum as i,ToolStatusEnum as a}from"./tool.enum.js";import{CreateToolInputModel as o,ToolModel as s,ToolSummaryModel as c,UpdateToolInputModel as l}from"./tool.schema.js";const u=[`agent-console-team`],d=r({meta:{name:`agent.tool.create`,version:1,stability:`stable`,owners:[...u],tags:[`tool`,`create`],description:`Creates a new AI tool definition.`,goal:`Allow users to define new tools that agents can use.`,context:`Called from the tool builder UI when creating a new tool.`},io:{input:o,output:t({name:`CreateToolOutput`,fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.NonEmptyString(),isOptional:!1},slug:{type:e.String_unsecure(),isOptional:!1},status:{type:a,isOptional:!1}}}),errors:{SLUG_EXISTS:{description:`A tool with this slug already exists in the organization`,http:409,gqlCode:`SLUG_EXISTS`,when:`Slug is already taken`}}},policy:{auth:`user`},sideEffects:{emits:[{name:`tool.created`,version:1,when:`Tool is successfully created`,payload:c}],audit:[`tool.created`]}}),f=r({meta:{name:`agent.tool.update`,version:1,stability:`stable`,owners:[...u],tags:[`tool`,`update`],description:`Updates an existing AI tool definition.`,goal:`Allow users to modify tool settings and configuration.`,context:`Called from the tool settings UI.`},io:{input:l,output:t({name:`UpdateToolOutput`,fields:{id:{type:e.String_unsecure(),isOptional:!1},name:{type:e.NonEmptyString(),isOptional:!1},status:{type:a,isOptional:!1},updatedAt:{type:e.DateTime(),isOptional:!1}}}),errors:{TOOL_NOT_FOUND:{description:`The specified tool does not exist`,http:404,gqlCode:`TOOL_NOT_FOUND`,when:`Tool ID is invalid`}}},policy:{auth:`user`},sideEffects:{emits:[{name:`tool.updated`,version:1,when:`Tool is updated`,payload:c}],audit:[`tool.updated`]}}),p=n({meta:{name:`agent.tool.get`,version:1,stability:`stable`,owners:[...u],tags:[`tool`,`get`],description:`Retrieves a tool by its ID.`,goal:`View detailed tool configuration.`,context:`Called when viewing tool details or editing.`},io:{input:t({name:`GetToolInput`,fields:{toolId:{type:e.String_unsecure(),isOptional:!1}}}),output:s,errors:{TOOL_NOT_FOUND:{description:`The specified tool does not exist`,http:404,gqlCode:`TOOL_NOT_FOUND`,when:`Tool ID is invalid`}}},policy:{auth:`user`}}),m=n({meta:{name:`agent.tool.list`,version:1,stability:`stable`,owners:[...u],tags:[`tool`,`list`],description:`Lists tools for an organization with optional filtering.`,goal:`Browse and search available tools.`,context:`Tool list/dashboard view.`},io:{input:t({name:`ListToolsInput`,fields:{organizationId:{type:e.String_unsecure(),isOptional:!1},category:{type:i,isOptional:!0},status:{type:a,isOptional:!0},search:{type:e.String_unsecure(),isOptional:!0},limit:{type:e.Int_unsecure(),isOptional:!0,defaultValue:20},offset:{type:e.Int_unsecure(),isOptional:!0,defaultValue:0}}}),output:t({name:`ListToolsOutput`,fields:{items:{type:c,isArray:!0,isOptional:!1},total:{type:e.Int_unsecure(),isOptional:!1},hasMore:{type:e.Boolean(),isOptional:!1}}})},policy:{auth:`user`}}),h=r({meta:{name:`agent.tool.test`,version:1,stability:`stable`,owners:[...u],tags:[`tool`,`test`],description:`Tests a tool with sample input to verify it works correctly.`,goal:`Validate tool configuration before deployment.`,context:`Tool builder UI - test panel.`},io:{input:t({name:`TestToolInput`,fields:{toolId:{type:e.String_unsecure(),isOptional:!1},testInput:{type:e.JSONObject(),isOptional:!1}}}),output:t({name:`TestToolOutput`,fields:{success:{type:e.Boolean(),isOptional:!1},output:{type:e.JSONObject(),isOptional:!0},error:{type:e.String_unsecure(),isOptional:!0},durationMs:{type:e.Int_unsecure(),isOptional:!1}}}),errors:{TOOL_NOT_FOUND:{description:`The specified tool does not exist`,http:404,gqlCode:`TOOL_NOT_FOUND`,when:`Tool ID is invalid`},TOOL_EXECUTION_ERROR:{description:`Tool execution failed`,http:500,gqlCode:`TOOL_EXECUTION_ERROR`,when:`Tool returns an error`}}},policy:{auth:`user`},sideEffects:{audit:[`tool.tested`]}});export{d as CreateToolCommand,p as GetToolQuery,m as ListToolsQuery,h as TestToolCommand,f as UpdateToolCommand};
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 _lssm_lib_schema98 from "@lssm/lib.schema";
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: _lssm_lib_schema98.EntityEnumDef;
7
+ declare const ToolCategoryEntityEnum: _lssm_lib_schema283.EntityEnumDef;
8
8
  /**
9
9
  * Tool status enum for entities.
10
10
  */
11
- declare const ToolStatusEntityEnum: _lssm_lib_schema98.EntityEnumDef;
11
+ declare const ToolStatusEntityEnum: _lssm_lib_schema283.EntityEnumDef;
12
12
  /**
13
13
  * Implementation type enum for entities.
14
14
  */
15
- declare const ImplementationTypeEntityEnum: _lssm_lib_schema98.EntityEnumDef;
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: _lssm_lib_schema98.EntitySpec<{
20
- id: _lssm_lib_schema98.EntityScalarField;
21
- organizationId: _lssm_lib_schema98.EntityScalarField;
22
- name: _lssm_lib_schema98.EntityScalarField;
23
- slug: _lssm_lib_schema98.EntityScalarField;
24
- description: _lssm_lib_schema98.EntityScalarField;
25
- category: _lssm_lib_schema98.EntityEnumField;
26
- status: _lssm_lib_schema98.EntityEnumField;
27
- parametersSchema: _lssm_lib_schema98.EntityScalarField;
28
- outputSchema: _lssm_lib_schema98.EntityScalarField;
29
- implementationType: _lssm_lib_schema98.EntityEnumField;
30
- implementationConfig: _lssm_lib_schema98.EntityScalarField;
31
- maxInvocationsPerMinute: _lssm_lib_schema98.EntityScalarField;
32
- timeoutMs: _lssm_lib_schema98.EntityScalarField;
33
- version: _lssm_lib_schema98.EntityScalarField;
34
- tags: _lssm_lib_schema98.EntityScalarField;
35
- createdAt: _lssm_lib_schema98.EntityScalarField;
36
- updatedAt: _lssm_lib_schema98.EntityScalarField;
37
- createdById: _lssm_lib_schema98.EntityScalarField;
38
- agents: _lssm_lib_schema98.EntityRelationField;
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 };
@@ -1 +1,105 @@
1
- import{i as e,n as t,r as n,t as r}from"../libs/schema/dist/entity/defineEntity.js";import"../libs/schema/dist/entity/index.js";const i=t({name:`ToolCategory`,values:[`RETRIEVAL`,`COMPUTATION`,`COMMUNICATION`,`INTEGRATION`,`UTILITY`,`CUSTOM`],description:`Category of tool`}),a=t({name:`ToolStatus`,values:[`DRAFT`,`ACTIVE`,`DEPRECATED`,`DISABLED`],description:`Status of tool`}),o=t({name:`ImplementationType`,values:[`http`,`function`,`workflow`],description:`How the tool is implemented`}),s=r({name:`Tool`,schema:`agent_console`,description:`An AI tool that can be used by agents.`,fields:{id:n.id(),organizationId:n.string({description:`Organization that owns this tool`}),name:n.string({description:`Tool name`}),slug:n.string({description:`URL-safe identifier`}),description:n.string({description:`Tool description`}),category:n.enum(`ToolCategory`,{default:`CUSTOM`}),status:n.enum(`ToolStatus`,{default:`DRAFT`}),parametersSchema:n.json({description:`JSON Schema for tool parameters`}),outputSchema:n.json({isOptional:!0,description:`JSON Schema for tool output`}),implementationType:n.enum(`ImplementationType`),implementationConfig:n.json({description:`Implementation configuration`}),maxInvocationsPerMinute:n.int({isOptional:!0,description:`Rate limit`}),timeoutMs:n.int({default:3e4,description:`Execution timeout`}),version:n.string({default:`1.0.0`,description:`Tool version`}),tags:n.string({isArray:!0,isOptional:!0,description:`Tags for categorization`}),createdAt:n.createdAt(),updatedAt:n.updatedAt(),createdById:n.string({isOptional:!0,description:`User who created this tool`}),agents:n.hasMany(`Agent`,{description:`Agents using this tool`})},indexes:[e.unique([`organizationId`,`slug`]),e.on([`organizationId`,`category`]),e.on([`organizationId`,`status`])],enums:[i,a,o]});export{o as ImplementationTypeEntityEnum,i as ToolCategoryEntityEnum,s as ToolEntity,a as ToolStatusEntityEnum};
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 };
@@ -1,17 +1,17 @@
1
- import * as _lssm_lib_schema850 from "@lssm/lib.schema";
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: _lssm_lib_schema850.EnumType<[string, string, string, string, string, string]>;
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: _lssm_lib_schema850.EnumType<[string, string, string, string]>;
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: _lssm_lib_schema850.EnumType<[string, string, string]>;
15
+ declare const ImplementationTypeEnum: _lssm_lib_schema306.EnumType<[string, string, string]>;
16
16
  //#endregion
17
17
  export { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum };
@@ -1 +1,35 @@
1
- import{r as e}from"../libs/schema/dist/EnumType.js";import"../libs/schema/dist/index.js";const t=e(`ToolCategory`,[`RETRIEVAL`,`COMPUTATION`,`COMMUNICATION`,`INTEGRATION`,`UTILITY`,`CUSTOM`]),n=e(`ToolStatus`,[`DRAFT`,`ACTIVE`,`DEPRECATED`,`DISABLED`]),r=e(`ImplementationType`,[`http`,`function`,`workflow`]);export{r as ImplementationTypeEnum,t as ToolCategoryEnum,n as ToolStatusEnum};
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 _lssm_lib_contracts4 from "@lssm/lib.contracts";
2
- import * as _lssm_lib_schema121 from "@lssm/lib.schema";
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: _lssm_lib_contracts4.EventSpec<_lssm_lib_schema121.SchemaModel<{
8
+ declare const ToolCreatedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema260.SchemaModel<{
9
9
  id: {
10
- type: _lssm_lib_schema121.FieldType<string, string>;
10
+ type: _lssm_lib_schema260.FieldType<string, string>;
11
11
  isOptional: false;
12
12
  };
13
13
  organizationId: {
14
- type: _lssm_lib_schema121.FieldType<string, string>;
14
+ type: _lssm_lib_schema260.FieldType<string, string>;
15
15
  isOptional: false;
16
16
  };
17
17
  name: {
18
- type: _lssm_lib_schema121.FieldType<string, string>;
18
+ type: _lssm_lib_schema260.FieldType<string, string>;
19
19
  isOptional: false;
20
20
  };
21
21
  slug: {
22
- type: _lssm_lib_schema121.FieldType<string, string>;
22
+ type: _lssm_lib_schema260.FieldType<string, string>;
23
23
  isOptional: false;
24
24
  };
25
25
  category: {
26
- type: _lssm_lib_schema121.FieldType<string, string>;
26
+ type: _lssm_lib_schema260.FieldType<string, string>;
27
27
  isOptional: false;
28
28
  };
29
29
  implementationType: {
30
- type: _lssm_lib_schema121.FieldType<string, string>;
30
+ type: _lssm_lib_schema260.FieldType<string, string>;
31
31
  isOptional: false;
32
32
  };
33
33
  createdById: {
34
- type: _lssm_lib_schema121.FieldType<string, string>;
34
+ type: _lssm_lib_schema260.FieldType<string, string>;
35
35
  isOptional: true;
36
36
  };
37
37
  createdAt: {
38
- type: _lssm_lib_schema121.FieldType<Date, string>;
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: _lssm_lib_contracts4.EventSpec<_lssm_lib_schema121.SchemaModel<{
45
+ declare const ToolUpdatedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema260.SchemaModel<{
46
46
  id: {
47
- type: _lssm_lib_schema121.FieldType<string, string>;
47
+ type: _lssm_lib_schema260.FieldType<string, string>;
48
48
  isOptional: false;
49
49
  };
50
50
  organizationId: {
51
- type: _lssm_lib_schema121.FieldType<string, string>;
51
+ type: _lssm_lib_schema260.FieldType<string, string>;
52
52
  isOptional: false;
53
53
  };
54
54
  name: {
55
- type: _lssm_lib_schema121.FieldType<string, string>;
55
+ type: _lssm_lib_schema260.FieldType<string, string>;
56
56
  isOptional: false;
57
57
  };
58
58
  status: {
59
- type: _lssm_lib_schema121.FieldType<string, string>;
59
+ type: _lssm_lib_schema260.FieldType<string, string>;
60
60
  isOptional: false;
61
61
  };
62
62
  updatedFields: {
63
- type: _lssm_lib_schema121.FieldType<string, string>;
63
+ type: _lssm_lib_schema260.FieldType<string, string>;
64
64
  isArray: true;
65
65
  isOptional: false;
66
66
  };
67
67
  updatedAt: {
68
- type: _lssm_lib_schema121.FieldType<Date, string>;
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: _lssm_lib_contracts4.EventSpec<_lssm_lib_schema121.SchemaModel<{
75
+ declare const ToolStatusChangedEvent: _lssm_lib_contracts6.EventSpec<_lssm_lib_schema260.SchemaModel<{
76
76
  id: {
77
- type: _lssm_lib_schema121.FieldType<string, string>;
77
+ type: _lssm_lib_schema260.FieldType<string, string>;
78
78
  isOptional: false;
79
79
  };
80
80
  organizationId: {
81
- type: _lssm_lib_schema121.FieldType<string, string>;
81
+ type: _lssm_lib_schema260.FieldType<string, string>;
82
82
  isOptional: false;
83
83
  };
84
84
  name: {
85
- type: _lssm_lib_schema121.FieldType<string, string>;
85
+ type: _lssm_lib_schema260.FieldType<string, string>;
86
86
  isOptional: false;
87
87
  };
88
88
  previousStatus: {
89
- type: _lssm_lib_schema121.FieldType<string, string>;
89
+ type: _lssm_lib_schema260.FieldType<string, string>;
90
90
  isOptional: false;
91
91
  };
92
92
  newStatus: {
93
- type: _lssm_lib_schema121.FieldType<string, string>;
93
+ type: _lssm_lib_schema260.FieldType<string, string>;
94
94
  isOptional: false;
95
95
  };
96
96
  changedAt: {
97
- type: _lssm_lib_schema121.FieldType<Date, string>;
97
+ type: _lssm_lib_schema260.FieldType<Date, string>;
98
98
  isOptional: false;
99
99
  };
100
100
  }>>;