@lssm/example.agent-console 0.0.0-canary-20251221193616 → 0.0.0-canary-20251223010757
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 +127 -379
- package/.turbo/turbo-build.log +128 -380
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.entity.d.ts +36 -36
- package/dist/agent/agent.entity.d.ts.map +1 -1
- package/dist/agent/agent.entity.js +40 -40
- package/dist/agent/agent.entity.js.map +1 -1
- package/dist/agent/agent.enum.d.ts +4 -4
- package/dist/agent/agent.enum.d.ts.map +1 -1
- package/dist/agent/agent.enum.js +4 -4
- package/dist/agent/agent.enum.js.map +1 -1
- package/dist/agent/agent.event.d.ts +30 -30
- package/dist/agent/agent.event.d.ts.map +1 -1
- package/dist/agent/agent.event.js +31 -33
- package/dist/agent/agent.event.js.map +1 -1
- package/dist/agent/agent.operation.d.ts +125 -125
- package/dist/agent/agent.operation.js +35 -36
- package/dist/agent/agent.operation.js.map +1 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/agent/agent.schema.d.ts.map +1 -1
- package/dist/agent/agent.schema.js +77 -77
- package/dist/agent/agent.schema.js.map +1 -1
- package/dist/docs/agent-console.docblock.js +1 -2
- package/dist/docs/agent-console.docblock.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.entity.js +62 -62
- package/dist/run/run.entity.js.map +1 -1
- package/dist/run/run.enum.js +5 -5
- package/dist/run/run.enum.js.map +1 -1
- package/dist/run/run.event.d.ts +70 -70
- package/dist/run/run.event.js +71 -73
- package/dist/run/run.event.js.map +1 -1
- package/dist/run/run.operation.d.ts +1 -1
- package/dist/run/run.operation.js +57 -58
- package/dist/run/run.operation.js.map +1 -1
- package/dist/run/run.schema.js +65 -65
- package/dist/run/run.schema.js.map +1 -1
- package/dist/tool/tool.entity.js +27 -27
- package/dist/tool/tool.entity.js.map +1 -1
- package/dist/tool/tool.enum.js +4 -4
- package/dist/tool/tool.enum.js.map +1 -1
- package/dist/tool/tool.event.d.ts +1 -1
- package/dist/tool/tool.event.js +25 -27
- package/dist/tool/tool.event.js.map +1 -1
- package/dist/tool/tool.handler.d.ts.map +1 -1
- package/dist/tool/tool.operation.d.ts +1 -1
- package/dist/tool/tool.operation.js +28 -29
- package/dist/tool/tool.operation.js.map +1 -1
- package/dist/tool/tool.schema.js +44 -44
- package/dist/tool/tool.schema.js.map +1 -1
- package/package.json +9 -9
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js +0 -6
- package/dist/libs/contracts/dist/_virtual/rolldown_runtime.js.map +0 -1
- package/dist/libs/contracts/dist/capabilities/index.js +0 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +0 -89
- package/dist/libs/contracts/dist/capabilities/openbanking.js.map +0 -1
- package/dist/libs/contracts/dist/client/index.js +0 -5
- package/dist/libs/contracts/dist/client/react/feature-render.js +0 -3
- package/dist/libs/contracts/dist/client/react/form-render.js +0 -5
- package/dist/libs/contracts/dist/client/react/index.js +0 -4
- package/dist/libs/contracts/dist/contract-registry/index.js +0 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +0 -61
- package/dist/libs/contracts/dist/contract-registry/schemas.js.map +0 -1
- package/dist/libs/contracts/dist/data-views/data-views.js +0 -7
- package/dist/libs/contracts/dist/data-views/data-views.js.map +0 -1
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +0 -17
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/index.js +0 -25
- package/dist/libs/contracts/dist/docs/meta.docs.js +0 -30
- package/dist/libs/contracts/dist/docs/meta.docs.js.map +0 -1
- package/dist/libs/contracts/dist/docs/presentations.js +0 -72
- package/dist/libs/contracts/dist/docs/presentations.js.map +0 -1
- package/dist/libs/contracts/dist/docs/registry.js +0 -45
- package/dist/libs/contracts/dist/docs/registry.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +0 -81
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +0 -58
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +0 -17
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +0 -358
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +0 -38
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +0 -17
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +0 -21
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +0 -49
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +0 -80
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +0 -85
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +0 -46
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +0 -68
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +0 -41
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +0 -70
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +0 -48
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +0 -63
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +0 -156
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +0 -21
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +0 -102
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +0 -21
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js.map +0 -1
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js +0 -97
- package/dist/libs/contracts/dist/docs/tech-contracts.docs.js.map +0 -1
- package/dist/libs/contracts/dist/events.js +0 -11
- package/dist/libs/contracts/dist/events.js.map +0 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +0 -1
- package/dist/libs/contracts/dist/features.js +0 -7
- package/dist/libs/contracts/dist/features.js.map +0 -1
- package/dist/libs/contracts/dist/forms/forms.js +0 -1
- package/dist/libs/contracts/dist/index.js +0 -88
- package/dist/libs/contracts/dist/index.js.map +0 -1
- package/dist/libs/contracts/dist/install.js +0 -2
- package/dist/libs/contracts/dist/integrations/index.js +0 -18
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +0 -228
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +0 -159
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +0 -3
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +0 -210
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +0 -241
- package/dist/libs/contracts/dist/integrations/openbanking/models.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +0 -14
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/operations.js +0 -377
- package/dist/libs/contracts/dist/integrations/operations.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +0 -53
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +0 -76
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +0 -88
- package/dist/libs/contracts/dist/integrations/providers/gmail.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +0 -67
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +0 -11
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +0 -69
- package/dist/libs/contracts/dist/integrations/providers/mistral.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +0 -69
- package/dist/libs/contracts/dist/integrations/providers/postmark.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +0 -117
- package/dist/libs/contracts/dist/integrations/providers/powens.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +0 -74
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +0 -10
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +0 -84
- package/dist/libs/contracts/dist/integrations/providers/stripe.js.map +0 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +0 -62
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js.map +0 -1
- package/dist/libs/contracts/dist/jsonschema.js +0 -1
- package/dist/libs/contracts/dist/knowledge/index.js +0 -7
- package/dist/libs/contracts/dist/knowledge/operations.js +0 -306
- package/dist/libs/contracts/dist/knowledge/operations.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +0 -35
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +0 -35
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +0 -39
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +0 -6
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +0 -35
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +0 -38
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js.map +0 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +0 -35
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js.map +0 -1
- package/dist/libs/contracts/dist/llm/exporters.js +0 -21
- package/dist/libs/contracts/dist/llm/exporters.js.map +0 -1
- package/dist/libs/contracts/dist/llm/index.js +0 -2
- package/dist/libs/contracts/dist/llm/prompts.js +0 -1
- package/dist/libs/contracts/dist/onboarding-base.js +0 -196
- package/dist/libs/contracts/dist/onboarding-base.js.map +0 -1
- package/dist/libs/contracts/dist/openapi.js +0 -1
- package/dist/libs/contracts/dist/operations/index.js +0 -2
- package/dist/libs/contracts/dist/operations/operation.js +0 -35
- package/dist/libs/contracts/dist/operations/operation.js.map +0 -1
- package/dist/libs/contracts/dist/operations/registry.js +0 -8
- package/dist/libs/contracts/dist/operations/registry.js.map +0 -1
- package/dist/libs/contracts/dist/ownership.js +0 -24
- package/dist/libs/contracts/dist/ownership.js.map +0 -1
- package/dist/libs/contracts/dist/presentations/index.js +0 -2
- package/dist/libs/contracts/dist/presentations/presentations.js +0 -8
- package/dist/libs/contracts/dist/presentations/presentations.js.map +0 -1
- package/dist/libs/contracts/dist/presentations/transform-engine.js +0 -12
- package/dist/libs/contracts/dist/presentations/transform-engine.js.map +0 -1
- package/dist/libs/contracts/dist/prompt.js +0 -1
- package/dist/libs/contracts/dist/promptRegistry.js +0 -1
- package/dist/libs/contracts/dist/regenerator/index.js +0 -1
- package/dist/libs/contracts/dist/regenerator/service.js +0 -7
- package/dist/libs/contracts/dist/regenerator/service.js.map +0 -1
- package/dist/libs/contracts/dist/registry-utils.js +0 -24
- package/dist/libs/contracts/dist/registry-utils.js.map +0 -1
- package/dist/libs/contracts/dist/resources.js +0 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +0 -3874
- package/dist/libs/contracts/dist/schema/dist/index.js.map +0 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +0 -6
- package/dist/libs/contracts/dist/server/index.js +0 -8
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +0 -4
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +0 -3
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +0 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +0 -2
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +0 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +0 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +0 -1
- package/dist/libs/contracts/dist/server/rest-express.js +0 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +0 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +0 -1
- package/dist/libs/contracts/dist/telemetry/index.js +0 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +0 -1
- package/dist/libs/contracts/dist/tests/index.js +0 -1
- package/dist/libs/contracts/dist/tests/runner.js +0 -2
- package/dist/libs/contracts/dist/workflow/index.js +0 -2
- package/dist/libs/contracts/dist/workflow/runner.js +0 -1
- package/dist/libs/contracts/dist/workflow/spec.js +0 -7
- package/dist/libs/contracts/dist/workflow/spec.js.map +0 -1
- package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js +0 -122
- package/dist/libs/contracts/dist/workspace-config/contractsrc-schema.js.map +0 -1
- package/dist/libs/contracts/dist/workspace-config/index.js +0 -1
- package/dist/libs/schema/dist/index.js +0 -4922
- package/dist/libs/schema/dist/index.js.map +0 -1
package/dist/tool/tool.event.js
CHANGED
|
@@ -1,46 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { defineEvent } from "../libs/contracts/dist/events.js";
|
|
4
|
-
import "../libs/contracts/dist/index.js";
|
|
1
|
+
import { ScalarTypeEnum } from "@lssm/lib.schema";
|
|
2
|
+
import { defineEvent, defineSchemaModel as defineSchemaModel$1 } from "@lssm/lib.contracts";
|
|
5
3
|
|
|
6
4
|
//#region src/tool/tool.event.ts
|
|
7
5
|
/**
|
|
8
6
|
* Payload for tool created event.
|
|
9
7
|
*/
|
|
10
|
-
const ToolCreatedPayload =
|
|
8
|
+
const ToolCreatedPayload = defineSchemaModel$1({
|
|
11
9
|
name: "ToolCreatedPayload",
|
|
12
10
|
description: "Payload for tool created event",
|
|
13
11
|
fields: {
|
|
14
12
|
id: {
|
|
15
|
-
type:
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
16
14
|
isOptional: false
|
|
17
15
|
},
|
|
18
16
|
organizationId: {
|
|
19
|
-
type:
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
20
18
|
isOptional: false
|
|
21
19
|
},
|
|
22
20
|
name: {
|
|
23
|
-
type:
|
|
21
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
24
22
|
isOptional: false
|
|
25
23
|
},
|
|
26
24
|
slug: {
|
|
27
|
-
type:
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
28
26
|
isOptional: false
|
|
29
27
|
},
|
|
30
28
|
category: {
|
|
31
|
-
type:
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
32
30
|
isOptional: false
|
|
33
31
|
},
|
|
34
32
|
implementationType: {
|
|
35
|
-
type:
|
|
33
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
36
34
|
isOptional: false
|
|
37
35
|
},
|
|
38
36
|
createdById: {
|
|
39
|
-
type:
|
|
37
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
40
38
|
isOptional: true
|
|
41
39
|
},
|
|
42
40
|
createdAt: {
|
|
43
|
-
type:
|
|
41
|
+
type: ScalarTypeEnum.DateTime(),
|
|
44
42
|
isOptional: false
|
|
45
43
|
}
|
|
46
44
|
}
|
|
@@ -57,33 +55,33 @@ const ToolCreatedEvent = defineEvent({
|
|
|
57
55
|
/**
|
|
58
56
|
* Payload for tool updated event.
|
|
59
57
|
*/
|
|
60
|
-
const ToolUpdatedPayload =
|
|
58
|
+
const ToolUpdatedPayload = defineSchemaModel$1({
|
|
61
59
|
name: "ToolUpdatedPayload",
|
|
62
60
|
description: "Payload for tool updated event",
|
|
63
61
|
fields: {
|
|
64
62
|
id: {
|
|
65
|
-
type:
|
|
63
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
66
64
|
isOptional: false
|
|
67
65
|
},
|
|
68
66
|
organizationId: {
|
|
69
|
-
type:
|
|
67
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
70
68
|
isOptional: false
|
|
71
69
|
},
|
|
72
70
|
name: {
|
|
73
|
-
type:
|
|
71
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
74
72
|
isOptional: false
|
|
75
73
|
},
|
|
76
74
|
status: {
|
|
77
|
-
type:
|
|
75
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
78
76
|
isOptional: false
|
|
79
77
|
},
|
|
80
78
|
updatedFields: {
|
|
81
|
-
type:
|
|
79
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
82
80
|
isArray: true,
|
|
83
81
|
isOptional: false
|
|
84
82
|
},
|
|
85
83
|
updatedAt: {
|
|
86
|
-
type:
|
|
84
|
+
type: ScalarTypeEnum.DateTime(),
|
|
87
85
|
isOptional: false
|
|
88
86
|
}
|
|
89
87
|
}
|
|
@@ -100,32 +98,32 @@ const ToolUpdatedEvent = defineEvent({
|
|
|
100
98
|
/**
|
|
101
99
|
* Payload for tool status changed event.
|
|
102
100
|
*/
|
|
103
|
-
const ToolStatusChangedPayload =
|
|
101
|
+
const ToolStatusChangedPayload = defineSchemaModel$1({
|
|
104
102
|
name: "ToolStatusChangedPayload",
|
|
105
103
|
description: "Payload for tool status changed event",
|
|
106
104
|
fields: {
|
|
107
105
|
id: {
|
|
108
|
-
type:
|
|
106
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
109
107
|
isOptional: false
|
|
110
108
|
},
|
|
111
109
|
organizationId: {
|
|
112
|
-
type:
|
|
110
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
113
111
|
isOptional: false
|
|
114
112
|
},
|
|
115
113
|
name: {
|
|
116
|
-
type:
|
|
114
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
117
115
|
isOptional: false
|
|
118
116
|
},
|
|
119
117
|
previousStatus: {
|
|
120
|
-
type:
|
|
118
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
121
119
|
isOptional: false
|
|
122
120
|
},
|
|
123
121
|
newStatus: {
|
|
124
|
-
type:
|
|
122
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
125
123
|
isOptional: false
|
|
126
124
|
},
|
|
127
125
|
changedAt: {
|
|
128
|
-
type:
|
|
126
|
+
type: ScalarTypeEnum.DateTime(),
|
|
129
127
|
isOptional: false
|
|
130
128
|
}
|
|
131
129
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.event.js","names":["defineSchemaModel"
|
|
1
|
+
{"version":3,"file":"tool.event.js","names":["defineSchemaModel"],"sources":["../../src/tool/tool.event.ts"],"sourcesContent":["import { defineEvent, defineSchemaModel } from '@lssm/lib.contracts';\nimport { ScalarTypeEnum } from '@lssm/lib.schema';\n\n/**\n * Payload for tool created event.\n */\nconst ToolCreatedPayload = defineSchemaModel({\n name: 'ToolCreatedPayload',\n description: 'Payload for tool created event',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n category: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n implementationType: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n createdById: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolCreatedEvent - A new tool was created.\n */\nexport const ToolCreatedEvent = defineEvent({\n name: 'agent.tool.created',\n version: 1,\n description: 'A new AI tool was created.',\n payload: ToolCreatedPayload,\n});\n\n/**\n * Payload for tool updated event.\n */\nconst ToolUpdatedPayload = defineSchemaModel({\n name: 'ToolUpdatedPayload',\n description: 'Payload for tool updated event',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n updatedFields: {\n type: ScalarTypeEnum.String_unsecure(),\n isArray: true,\n isOptional: false,\n },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolUpdatedEvent - A tool was updated.\n */\nexport const ToolUpdatedEvent = defineEvent({\n name: 'agent.tool.updated',\n version: 1,\n description: 'An AI tool configuration was updated.',\n payload: ToolUpdatedPayload,\n});\n\n/**\n * Payload for tool status changed event.\n */\nconst ToolStatusChangedPayload = defineSchemaModel({\n name: 'ToolStatusChangedPayload',\n description: 'Payload for tool status changed event',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n previousStatus: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n newStatus: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n changedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n});\n\n/**\n * ToolStatusChangedEvent - A tool's status was changed.\n */\nexport const ToolStatusChangedEvent = defineEvent({\n name: 'agent.tool.statusChanged',\n version: 1,\n description:\n 'An AI tool status was changed (activated, deprecated, disabled).',\n payload: ToolStatusChangedPayload,\n});\n"],"mappings":";;;;;;;AAMA,MAAM,qBAAqBA,oBAAkB;CAC3C,MAAM;CACN,aAAa;CACb,QAAQ;EACN,IAAI;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACjE,gBAAgB;GACd,MAAM,eAAe,iBAAiB;GACtC,YAAY;GACb;EACD,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,MAAM;GAAE,MAAM,eAAe,iBAAiB;GAAE,YAAY;GAAO;EACnE,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;GAAO;EAClE;CACF,CAAC;;;;AAKF,MAAa,yBAAyB,YAAY;CAChD,MAAM;CACN,SAAS;CACT,aACE;CACF,SAAS;CACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.handler.d.ts","names":[],"sources":["../../src/tool/tool.handler.ts"],"sourcesContent":[],"mappings":";UAKiB,cAAA;EAAA,cAAA,EAAA,MAAc;EAed,QAAA,CAAA,EAAA,WAAW,GAAA,aAcX,GAAA,eAAA,GAAA,aAAA,GAAA,SAAA,GAAA,QAAA;EAGA,MAAA,CAAA,EAAA,OAAA,GAAe,QAAA,
|
|
1
|
+
{"version":3,"file":"tool.handler.d.ts","names":[],"sources":["../../src/tool/tool.handler.ts"],"sourcesContent":[],"mappings":";UAKiB,cAAA;EAAA,cAAA,EAAA,MAAc;EAed,QAAA,CAAA,EAAA,WAAW,GAAA,aAcX,GAAA,eAAA,GAAA,aAAA,GAAA,SAAA,GAAA,QAAA;EAGA,MAAA,CAAA,EAAA,OAAA,GAAe,QAAA,GAAA,YACvB,GAAW,UAAA;EAQE,MAAA,CAAA,EAAA,MAAA;EACb,KAAA,CAAA,EAAA,MAAA;EACE,MAAA,CAAA,EAAA,MAAA;;AAAD,UA5BO,WAAA,CA4BP;EAwCY,EAAA,EAAA,MAAA;;;;;;;aAtDT;;UAGI,eAAA;SACR;EAkDyD,KAAA,EAAA,MAAA;EAAA,OAAA,EAAA,OAAA;AASlE;AAsBA;AAkBA;;iBA3FsB,oBAAA,QACb,iBACN,QAAQ;;;;iBAwCW,kBAAA;;IAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS5C,qBAAA;;;;;;IAMrB;;;;;;;;;iBAgBqB,qBAAA;;;;IAIrB;;;;aAJ0C;;;;;iBAkBrB,mBAAA;;aAET;IACZ"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { E5, K5 } from "../libs/schema/dist/index.js";
|
|
2
|
-
import { defineCommand, defineQuery } from "../libs/contracts/dist/operations/operation.js";
|
|
3
|
-
import "../libs/contracts/dist/operations/index.js";
|
|
4
1
|
import { ToolCategoryEnum, ToolStatusEnum } from "./tool.enum.js";
|
|
5
2
|
import { CreateToolInputModel, ToolModel, ToolSummaryModel, UpdateToolInputModel } from "./tool.schema.js";
|
|
3
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
|
|
4
|
+
import { defineCommand, defineQuery } from "@lssm/lib.contracts/operations";
|
|
6
5
|
|
|
7
6
|
//#region src/tool/tool.operation.ts
|
|
8
7
|
const OWNERS = ["agent-console-team"];
|
|
@@ -22,19 +21,19 @@ const CreateToolCommand = defineCommand({
|
|
|
22
21
|
},
|
|
23
22
|
io: {
|
|
24
23
|
input: CreateToolInputModel,
|
|
25
|
-
output:
|
|
24
|
+
output: defineSchemaModel({
|
|
26
25
|
name: "CreateToolOutput",
|
|
27
26
|
fields: {
|
|
28
27
|
id: {
|
|
29
|
-
type:
|
|
28
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
29
|
isOptional: false
|
|
31
30
|
},
|
|
32
31
|
name: {
|
|
33
|
-
type:
|
|
32
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
34
33
|
isOptional: false
|
|
35
34
|
},
|
|
36
35
|
slug: {
|
|
37
|
-
type:
|
|
36
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
38
37
|
isOptional: false
|
|
39
38
|
},
|
|
40
39
|
status: {
|
|
@@ -77,15 +76,15 @@ const UpdateToolCommand = defineCommand({
|
|
|
77
76
|
},
|
|
78
77
|
io: {
|
|
79
78
|
input: UpdateToolInputModel,
|
|
80
|
-
output:
|
|
79
|
+
output: defineSchemaModel({
|
|
81
80
|
name: "UpdateToolOutput",
|
|
82
81
|
fields: {
|
|
83
82
|
id: {
|
|
84
|
-
type:
|
|
83
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
85
84
|
isOptional: false
|
|
86
85
|
},
|
|
87
86
|
name: {
|
|
88
|
-
type:
|
|
87
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
89
88
|
isOptional: false
|
|
90
89
|
},
|
|
91
90
|
status: {
|
|
@@ -93,7 +92,7 @@ const UpdateToolCommand = defineCommand({
|
|
|
93
92
|
isOptional: false
|
|
94
93
|
},
|
|
95
94
|
updatedAt: {
|
|
96
|
-
type:
|
|
95
|
+
type: ScalarTypeEnum.DateTime(),
|
|
97
96
|
isOptional: false
|
|
98
97
|
}
|
|
99
98
|
}
|
|
@@ -131,10 +130,10 @@ const GetToolQuery = defineQuery({
|
|
|
131
130
|
context: "Called when viewing tool details or editing."
|
|
132
131
|
},
|
|
133
132
|
io: {
|
|
134
|
-
input:
|
|
133
|
+
input: defineSchemaModel({
|
|
135
134
|
name: "GetToolInput",
|
|
136
135
|
fields: { toolId: {
|
|
137
|
-
type:
|
|
136
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
138
137
|
isOptional: false
|
|
139
138
|
} }
|
|
140
139
|
}),
|
|
@@ -163,11 +162,11 @@ const ListToolsQuery = defineQuery({
|
|
|
163
162
|
context: "Tool list/dashboard view."
|
|
164
163
|
},
|
|
165
164
|
io: {
|
|
166
|
-
input:
|
|
165
|
+
input: defineSchemaModel({
|
|
167
166
|
name: "ListToolsInput",
|
|
168
167
|
fields: {
|
|
169
168
|
organizationId: {
|
|
170
|
-
type:
|
|
169
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
171
170
|
isOptional: false
|
|
172
171
|
},
|
|
173
172
|
category: {
|
|
@@ -179,22 +178,22 @@ const ListToolsQuery = defineQuery({
|
|
|
179
178
|
isOptional: true
|
|
180
179
|
},
|
|
181
180
|
search: {
|
|
182
|
-
type:
|
|
181
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
183
182
|
isOptional: true
|
|
184
183
|
},
|
|
185
184
|
limit: {
|
|
186
|
-
type:
|
|
185
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
187
186
|
isOptional: true,
|
|
188
187
|
defaultValue: 20
|
|
189
188
|
},
|
|
190
189
|
offset: {
|
|
191
|
-
type:
|
|
190
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
192
191
|
isOptional: true,
|
|
193
192
|
defaultValue: 0
|
|
194
193
|
}
|
|
195
194
|
}
|
|
196
195
|
}),
|
|
197
|
-
output:
|
|
196
|
+
output: defineSchemaModel({
|
|
198
197
|
name: "ListToolsOutput",
|
|
199
198
|
fields: {
|
|
200
199
|
items: {
|
|
@@ -203,11 +202,11 @@ const ListToolsQuery = defineQuery({
|
|
|
203
202
|
isOptional: false
|
|
204
203
|
},
|
|
205
204
|
total: {
|
|
206
|
-
type:
|
|
205
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
207
206
|
isOptional: false
|
|
208
207
|
},
|
|
209
208
|
hasMore: {
|
|
210
|
-
type:
|
|
209
|
+
type: ScalarTypeEnum.Boolean(),
|
|
211
210
|
isOptional: false
|
|
212
211
|
}
|
|
213
212
|
}
|
|
@@ -230,36 +229,36 @@ const TestToolCommand = defineCommand({
|
|
|
230
229
|
context: "Tool builder UI - test panel."
|
|
231
230
|
},
|
|
232
231
|
io: {
|
|
233
|
-
input:
|
|
232
|
+
input: defineSchemaModel({
|
|
234
233
|
name: "TestToolInput",
|
|
235
234
|
fields: {
|
|
236
235
|
toolId: {
|
|
237
|
-
type:
|
|
236
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
238
237
|
isOptional: false
|
|
239
238
|
},
|
|
240
239
|
testInput: {
|
|
241
|
-
type:
|
|
240
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
242
241
|
isOptional: false
|
|
243
242
|
}
|
|
244
243
|
}
|
|
245
244
|
}),
|
|
246
|
-
output:
|
|
245
|
+
output: defineSchemaModel({
|
|
247
246
|
name: "TestToolOutput",
|
|
248
247
|
fields: {
|
|
249
248
|
success: {
|
|
250
|
-
type:
|
|
249
|
+
type: ScalarTypeEnum.Boolean(),
|
|
251
250
|
isOptional: false
|
|
252
251
|
},
|
|
253
252
|
output: {
|
|
254
|
-
type:
|
|
253
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
255
254
|
isOptional: true
|
|
256
255
|
},
|
|
257
256
|
error: {
|
|
258
|
-
type:
|
|
257
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
259
258
|
isOptional: true
|
|
260
259
|
},
|
|
261
260
|
durationMs: {
|
|
262
|
-
type:
|
|
261
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
263
262
|
isOptional: false
|
|
264
263
|
}
|
|
265
264
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.operation.js","names":["defineSchemaModel","ScalarTypeEnum"],"sources":["../../src/tool/tool.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { ToolCategoryEnum, ToolStatusEnum } from './tool.enum';\nimport {\n CreateToolInputModel,\n ToolModel,\n ToolSummaryModel,\n UpdateToolInputModel,\n} from './tool.schema';\n\nconst OWNERS = ['agent-console-team'] as const;\n\n/**\n * CreateToolCommand - Creates a new tool definition.\n */\nexport const CreateToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'create'],\n description: 'Creates a new AI tool definition.',\n goal: 'Allow users to define new tools that agents can use.',\n context: 'Called from the tool builder UI when creating a new tool.',\n },\n io: {\n input: CreateToolInputModel,\n output: defineSchemaModel({\n name: 'CreateToolOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n },\n }),\n errors: {\n SLUG_EXISTS: {\n description: 'A tool with this slug already exists in the organization',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'tool.created',\n version: 1,\n when: 'Tool is successfully created',\n payload: ToolSummaryModel,\n },\n ],\n audit: ['tool.created'],\n },\n});\n\n/**\n * UpdateToolCommand - Updates an existing tool.\n */\nexport const UpdateToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'update'],\n description: 'Updates an existing AI tool definition.',\n goal: 'Allow users to modify tool settings and configuration.',\n context: 'Called from the tool settings UI.',\n },\n io: {\n input: UpdateToolInputModel,\n output: defineSchemaModel({\n name: 'UpdateToolOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n }),\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'tool.updated',\n version: 1,\n when: 'Tool is updated',\n payload: ToolSummaryModel,\n },\n ],\n audit: ['tool.updated'],\n },\n});\n\n/**\n * GetToolQuery - Retrieves a tool by ID.\n */\nexport const GetToolQuery = defineQuery({\n meta: {\n name: 'agent.tool.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'get'],\n description: 'Retrieves a tool by its ID.',\n goal: 'View detailed tool configuration.',\n context: 'Called when viewing tool details or editing.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetToolInput',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: ToolModel,\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\n/**\n * ListToolsQuery - Lists tools for an organization.\n */\nexport const ListToolsQuery = defineQuery({\n meta: {\n name: 'agent.tool.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'list'],\n description: 'Lists tools for an organization with optional filtering.',\n goal: 'Browse and search available tools.',\n context: 'Tool list/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListToolsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n category: { type: ToolCategoryEnum, isOptional: true },\n status: { type: ToolStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListToolsOutput',\n fields: {\n items: { type: ToolSummaryModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * TestToolCommand - Tests a tool with sample input.\n */\nexport const TestToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.test',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'test'],\n description: 'Tests a tool with sample input to verify it works correctly.',\n goal: 'Validate tool configuration before deployment.',\n context: 'Tool builder UI - test panel.',\n },\n io: {\n input: defineSchemaModel({\n name: 'TestToolInput',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n testInput: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'TestToolOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n }),\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n TOOL_EXECUTION_ERROR: {\n description: 'Tool execution failed',\n http: 500,\n gqlCode: 'TOOL_EXECUTION_ERROR',\n when: 'Tool returns an error',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['tool.tested'] },\n});\n"],"mappings":";;;;;;;AAUA,MAAM,SAAS,CAAC,qBAAqB;;;;AAKrC,MAAa,oBAAoB,cAAc;CAC7C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,QAAQ,SAAS;EACxB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQA,GAAkB;GACxB,MAAM;GACN,QAAQ;IACN,IAAI;KAAE,MAAMC,GAAe,iBAAiB;KAAE,YAAY;KAAO;IACjE,MAAM;KAAE,MAAMA,GAAe,gBAAgB;KAAE,YAAY;KAAO;IAClE,MAAM;KAAE,MAAMA,GAAe,iBAAiB;KAAE,YAAY;KAAO;IACnE,QAAQ;KAAE,MAAM;KAAgB,YAAY;KAAO;IACpD;GACF,CAAC;EACF,QAAQ,EACN,aAAa;GACX,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF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A,GAAe,YAAY;KAAE,YAAY;KAAO;IACpE;GACF,CAAC;EACF,QAAQD,GAAkB;GACxB,MAAM;GACN,QAAQ;IACN,SAAS;KAAE,MAAMC,GAAe,SAAS;KAAE,YAAY;KAAO;IAC9D,QAAQ;KAAE,MAAMA,GAAe,YAAY;KAAE,YAAY;KAAM;IAC/D,OAAO;KAAE,MAAMA,GAAe,iBAAiB;KAAE,YAAY;KAAM;IACnE,YAAY;KAAE,MAAMA,GAAe,cAAc;KAAE,YAAY;KAAO;IACvE;GACF,CAAC;EACF,QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,sBAAsB;IACpB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa,EAAE,OAAO,CAAC,cAAc,EAAE;CACxC,CAAC"}
|
|
1
|
+
{"version":3,"file":"tool.operation.js","names":[],"sources":["../../src/tool/tool.operation.ts"],"sourcesContent":["import { defineCommand, defineQuery } from '@lssm/lib.contracts/operations';\nimport { defineSchemaModel, ScalarTypeEnum } from '@lssm/lib.schema';\nimport { ToolCategoryEnum, ToolStatusEnum } from './tool.enum';\nimport {\n CreateToolInputModel,\n ToolModel,\n ToolSummaryModel,\n UpdateToolInputModel,\n} from './tool.schema';\n\nconst OWNERS = ['agent-console-team'] as const;\n\n/**\n * CreateToolCommand - Creates a new tool definition.\n */\nexport const CreateToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.create',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'create'],\n description: 'Creates a new AI tool definition.',\n goal: 'Allow users to define new tools that agents can use.',\n context: 'Called from the tool builder UI when creating a new tool.',\n },\n io: {\n input: CreateToolInputModel,\n output: defineSchemaModel({\n name: 'CreateToolOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n },\n }),\n errors: {\n SLUG_EXISTS: {\n description: 'A tool with this slug already exists in the organization',\n http: 409,\n gqlCode: 'SLUG_EXISTS',\n when: 'Slug is already taken',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'tool.created',\n version: 1,\n when: 'Tool is successfully created',\n payload: ToolSummaryModel,\n },\n ],\n audit: ['tool.created'],\n },\n});\n\n/**\n * UpdateToolCommand - Updates an existing tool.\n */\nexport const UpdateToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.update',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'update'],\n description: 'Updates an existing AI tool definition.',\n goal: 'Allow users to modify tool settings and configuration.',\n context: 'Called from the tool settings UI.',\n },\n io: {\n input: UpdateToolInputModel,\n output: defineSchemaModel({\n name: 'UpdateToolOutput',\n fields: {\n id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n status: { type: ToolStatusEnum, isOptional: false },\n updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },\n },\n }),\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: {\n emits: [\n {\n name: 'tool.updated',\n version: 1,\n when: 'Tool is updated',\n payload: ToolSummaryModel,\n },\n ],\n audit: ['tool.updated'],\n },\n});\n\n/**\n * GetToolQuery - Retrieves a tool by ID.\n */\nexport const GetToolQuery = defineQuery({\n meta: {\n name: 'agent.tool.get',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'get'],\n description: 'Retrieves a tool by its ID.',\n goal: 'View detailed tool configuration.',\n context: 'Called when viewing tool details or editing.',\n },\n io: {\n input: defineSchemaModel({\n name: 'GetToolInput',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n }),\n output: ToolModel,\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n },\n },\n policy: { auth: 'user' },\n});\n\n/**\n * ListToolsQuery - Lists tools for an organization.\n */\nexport const ListToolsQuery = defineQuery({\n meta: {\n name: 'agent.tool.list',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'list'],\n description: 'Lists tools for an organization with optional filtering.',\n goal: 'Browse and search available tools.',\n context: 'Tool list/dashboard view.',\n },\n io: {\n input: defineSchemaModel({\n name: 'ListToolsInput',\n fields: {\n organizationId: {\n type: ScalarTypeEnum.String_unsecure(),\n isOptional: false,\n },\n category: { type: ToolCategoryEnum, isOptional: true },\n status: { type: ToolStatusEnum, isOptional: true },\n search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n limit: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 20,\n },\n offset: {\n type: ScalarTypeEnum.Int_unsecure(),\n isOptional: true,\n defaultValue: 0,\n },\n },\n }),\n output: defineSchemaModel({\n name: 'ListToolsOutput',\n fields: {\n items: { type: ToolSummaryModel, isArray: true, isOptional: false },\n total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n },\n }),\n },\n policy: { auth: 'user' },\n});\n\n/**\n * TestToolCommand - Tests a tool with sample input.\n */\nexport const TestToolCommand = defineCommand({\n meta: {\n name: 'agent.tool.test',\n version: 1,\n stability: 'stable',\n owners: [...OWNERS],\n tags: ['tool', 'test'],\n description: 'Tests a tool with sample input to verify it works correctly.',\n goal: 'Validate tool configuration before deployment.',\n context: 'Tool builder UI - test panel.',\n },\n io: {\n input: defineSchemaModel({\n name: 'TestToolInput',\n fields: {\n toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n testInput: { type: ScalarTypeEnum.JSONObject(), isOptional: false },\n },\n }),\n output: defineSchemaModel({\n name: 'TestToolOutput',\n fields: {\n success: { type: ScalarTypeEnum.Boolean(), isOptional: false },\n output: { type: ScalarTypeEnum.JSONObject(), isOptional: true },\n error: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },\n durationMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },\n },\n }),\n errors: {\n TOOL_NOT_FOUND: {\n description: 'The specified tool does not exist',\n http: 404,\n gqlCode: 'TOOL_NOT_FOUND',\n when: 'Tool ID is invalid',\n },\n TOOL_EXECUTION_ERROR: {\n description: 'Tool execution failed',\n http: 500,\n gqlCode: 'TOOL_EXECUTION_ERROR',\n when: 'Tool returns an error',\n },\n },\n },\n policy: { auth: 'user' },\n sideEffects: { audit: ['tool.tested'] },\n});\n"],"mappings":";;;;;;AAUA,MAAM,SAAS,CAAC,qBAAqB;;;;AAKrC,MAAa,oBAAoB,cAAc;CAC7C,MAAM;EACJ,MAAM;EACN,SAAS;EACT,WAAW;EACX,QAAQ,CAAC,GAAG,OAAO;EACnB,MAAM,CAAC,QAAQ,SAAS;EACxB,aAAa;EACb,MAAM;EACN,SAAS;EACV;CACD,IAAI;EACF,OAAO;EACP,QAAQ,kBAAkB;GACxB,MAAM;GACN,QAAQ;IACN,IAAI;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACjE,MAAM;KAAE,MAAM,eAAe,gBAAgB;KAAE,YAAY;KAAO;IAClE,MAAM;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAO;IACnE,QAAQ;KAAE,MAAM;KAAgB,YAAY;KAAO;IACpD;GACF,CAAC;EACF,QAAQ,EACN,aAAa;GACX,aAAa;GACb,MAAM;GACN,SAAS;GACT,MAAM;GACP,EACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa;EACX,OAAO,CACL;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xB,MAAM;GACN,QAAQ;IACN,SAAS;KAAE,MAAM,eAAe,SAAS;KAAE,YAAY;KAAO;IAC9D,QAAQ;KAAE,MAAM,eAAe,YAAY;KAAE,YAAY;KAAM;IAC/D,OAAO;KAAE,MAAM,eAAe,iBAAiB;KAAE,YAAY;KAAM;IACnE,YAAY;KAAE,MAAM,eAAe,cAAc;KAAE,YAAY;KAAO;IACvE;GACF,CAAC;EACF,QAAQ;GACN,gBAAgB;IACd,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACD,sBAAsB;IACpB,aAAa;IACb,MAAM;IACN,SAAS;IACT,MAAM;IACP;GACF;EACF;CACD,QAAQ,EAAE,MAAM,QAAQ;CACxB,aAAa,EAAE,OAAO,CAAC,cAAc,EAAE;CACxC,CAAC"}
|
package/dist/tool/tool.schema.js
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { E5, K5 } from "../libs/schema/dist/index.js";
|
|
2
1
|
import { ImplementationTypeEnum, ToolCategoryEnum, ToolStatusEnum } from "./tool.enum.js";
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@lssm/lib.schema";
|
|
3
3
|
|
|
4
4
|
//#region src/tool/tool.schema.ts
|
|
5
5
|
/**
|
|
6
6
|
* AI tool definition.
|
|
7
7
|
*/
|
|
8
|
-
const ToolModel =
|
|
8
|
+
const ToolModel = defineSchemaModel({
|
|
9
9
|
name: "Tool",
|
|
10
10
|
description: "AI tool definition",
|
|
11
11
|
fields: {
|
|
12
12
|
id: {
|
|
13
|
-
type:
|
|
13
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
14
14
|
isOptional: false
|
|
15
15
|
},
|
|
16
16
|
organizationId: {
|
|
17
|
-
type:
|
|
17
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
18
18
|
isOptional: false
|
|
19
19
|
},
|
|
20
20
|
name: {
|
|
21
|
-
type:
|
|
21
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
22
22
|
isOptional: false
|
|
23
23
|
},
|
|
24
24
|
slug: {
|
|
25
|
-
type:
|
|
25
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
26
26
|
isOptional: false
|
|
27
27
|
},
|
|
28
28
|
description: {
|
|
29
|
-
type:
|
|
29
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
30
30
|
isOptional: false
|
|
31
31
|
},
|
|
32
32
|
category: {
|
|
@@ -38,11 +38,11 @@ const ToolModel = K5({
|
|
|
38
38
|
isOptional: false
|
|
39
39
|
},
|
|
40
40
|
parametersSchema: {
|
|
41
|
-
type:
|
|
41
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
42
42
|
isOptional: false
|
|
43
43
|
},
|
|
44
44
|
outputSchema: {
|
|
45
|
-
type:
|
|
45
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
46
46
|
isOptional: true
|
|
47
47
|
},
|
|
48
48
|
implementationType: {
|
|
@@ -50,33 +50,33 @@ const ToolModel = K5({
|
|
|
50
50
|
isOptional: false
|
|
51
51
|
},
|
|
52
52
|
implementationConfig: {
|
|
53
|
-
type:
|
|
53
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
54
54
|
isOptional: false
|
|
55
55
|
},
|
|
56
56
|
maxInvocationsPerMinute: {
|
|
57
|
-
type:
|
|
57
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
58
58
|
isOptional: true
|
|
59
59
|
},
|
|
60
60
|
timeoutMs: {
|
|
61
|
-
type:
|
|
61
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
62
62
|
isOptional: false,
|
|
63
63
|
defaultValue: 3e4
|
|
64
64
|
},
|
|
65
65
|
version: {
|
|
66
|
-
type:
|
|
66
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
67
67
|
isOptional: false
|
|
68
68
|
},
|
|
69
69
|
tags: {
|
|
70
|
-
type:
|
|
70
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
71
71
|
isArray: true,
|
|
72
72
|
isOptional: true
|
|
73
73
|
},
|
|
74
74
|
createdAt: {
|
|
75
|
-
type:
|
|
75
|
+
type: ScalarTypeEnum.DateTime(),
|
|
76
76
|
isOptional: false
|
|
77
77
|
},
|
|
78
78
|
updatedAt: {
|
|
79
|
-
type:
|
|
79
|
+
type: ScalarTypeEnum.DateTime(),
|
|
80
80
|
isOptional: false
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -84,24 +84,24 @@ const ToolModel = K5({
|
|
|
84
84
|
/**
|
|
85
85
|
* Summary of a tool for list views.
|
|
86
86
|
*/
|
|
87
|
-
const ToolSummaryModel =
|
|
87
|
+
const ToolSummaryModel = defineSchemaModel({
|
|
88
88
|
name: "ToolSummary",
|
|
89
89
|
description: "Summary of a tool for list views",
|
|
90
90
|
fields: {
|
|
91
91
|
id: {
|
|
92
|
-
type:
|
|
92
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
93
93
|
isOptional: false
|
|
94
94
|
},
|
|
95
95
|
name: {
|
|
96
|
-
type:
|
|
96
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
97
97
|
isOptional: false
|
|
98
98
|
},
|
|
99
99
|
slug: {
|
|
100
|
-
type:
|
|
100
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
101
101
|
isOptional: false
|
|
102
102
|
},
|
|
103
103
|
description: {
|
|
104
|
-
type:
|
|
104
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
105
105
|
isOptional: false
|
|
106
106
|
},
|
|
107
107
|
category: {
|
|
@@ -113,11 +113,11 @@ const ToolSummaryModel = K5({
|
|
|
113
113
|
isOptional: false
|
|
114
114
|
},
|
|
115
115
|
version: {
|
|
116
|
-
type:
|
|
116
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
117
117
|
isOptional: false
|
|
118
118
|
},
|
|
119
119
|
createdAt: {
|
|
120
|
-
type:
|
|
120
|
+
type: ScalarTypeEnum.DateTime(),
|
|
121
121
|
isOptional: false
|
|
122
122
|
}
|
|
123
123
|
}
|
|
@@ -125,24 +125,24 @@ const ToolSummaryModel = K5({
|
|
|
125
125
|
/**
|
|
126
126
|
* Input for creating a tool.
|
|
127
127
|
*/
|
|
128
|
-
const CreateToolInputModel =
|
|
128
|
+
const CreateToolInputModel = defineSchemaModel({
|
|
129
129
|
name: "CreateToolInput",
|
|
130
130
|
description: "Input for creating a tool",
|
|
131
131
|
fields: {
|
|
132
132
|
organizationId: {
|
|
133
|
-
type:
|
|
133
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
134
134
|
isOptional: false
|
|
135
135
|
},
|
|
136
136
|
name: {
|
|
137
|
-
type:
|
|
137
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
138
138
|
isOptional: false
|
|
139
139
|
},
|
|
140
140
|
slug: {
|
|
141
|
-
type:
|
|
141
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
142
142
|
isOptional: false
|
|
143
143
|
},
|
|
144
144
|
description: {
|
|
145
|
-
type:
|
|
145
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
146
146
|
isOptional: false
|
|
147
147
|
},
|
|
148
148
|
category: {
|
|
@@ -150,11 +150,11 @@ const CreateToolInputModel = K5({
|
|
|
150
150
|
isOptional: true
|
|
151
151
|
},
|
|
152
152
|
parametersSchema: {
|
|
153
|
-
type:
|
|
153
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
154
154
|
isOptional: false
|
|
155
155
|
},
|
|
156
156
|
outputSchema: {
|
|
157
|
-
type:
|
|
157
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
158
158
|
isOptional: true
|
|
159
159
|
},
|
|
160
160
|
implementationType: {
|
|
@@ -162,19 +162,19 @@ const CreateToolInputModel = K5({
|
|
|
162
162
|
isOptional: false
|
|
163
163
|
},
|
|
164
164
|
implementationConfig: {
|
|
165
|
-
type:
|
|
165
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
166
166
|
isOptional: false
|
|
167
167
|
},
|
|
168
168
|
maxInvocationsPerMinute: {
|
|
169
|
-
type:
|
|
169
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
170
170
|
isOptional: true
|
|
171
171
|
},
|
|
172
172
|
timeoutMs: {
|
|
173
|
-
type:
|
|
173
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
174
174
|
isOptional: true
|
|
175
175
|
},
|
|
176
176
|
tags: {
|
|
177
|
-
type:
|
|
177
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
178
178
|
isArray: true,
|
|
179
179
|
isOptional: true
|
|
180
180
|
}
|
|
@@ -183,20 +183,20 @@ const CreateToolInputModel = K5({
|
|
|
183
183
|
/**
|
|
184
184
|
* Input for updating a tool.
|
|
185
185
|
*/
|
|
186
|
-
const UpdateToolInputModel =
|
|
186
|
+
const UpdateToolInputModel = defineSchemaModel({
|
|
187
187
|
name: "UpdateToolInput",
|
|
188
188
|
description: "Input for updating a tool",
|
|
189
189
|
fields: {
|
|
190
190
|
toolId: {
|
|
191
|
-
type:
|
|
191
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
192
192
|
isOptional: false
|
|
193
193
|
},
|
|
194
194
|
name: {
|
|
195
|
-
type:
|
|
195
|
+
type: ScalarTypeEnum.NonEmptyString(),
|
|
196
196
|
isOptional: true
|
|
197
197
|
},
|
|
198
198
|
description: {
|
|
199
|
-
type:
|
|
199
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
200
200
|
isOptional: true
|
|
201
201
|
},
|
|
202
202
|
status: {
|
|
@@ -204,27 +204,27 @@ const UpdateToolInputModel = K5({
|
|
|
204
204
|
isOptional: true
|
|
205
205
|
},
|
|
206
206
|
parametersSchema: {
|
|
207
|
-
type:
|
|
207
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
208
208
|
isOptional: true
|
|
209
209
|
},
|
|
210
210
|
outputSchema: {
|
|
211
|
-
type:
|
|
211
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
212
212
|
isOptional: true
|
|
213
213
|
},
|
|
214
214
|
implementationConfig: {
|
|
215
|
-
type:
|
|
215
|
+
type: ScalarTypeEnum.JSONObject(),
|
|
216
216
|
isOptional: true
|
|
217
217
|
},
|
|
218
218
|
maxInvocationsPerMinute: {
|
|
219
|
-
type:
|
|
219
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
220
220
|
isOptional: true
|
|
221
221
|
},
|
|
222
222
|
timeoutMs: {
|
|
223
|
-
type:
|
|
223
|
+
type: ScalarTypeEnum.Int_unsecure(),
|
|
224
224
|
isOptional: true
|
|
225
225
|
},
|
|
226
226
|
tags: {
|
|
227
|
-
type:
|
|
227
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
228
228
|
isArray: true,
|
|
229
229
|
isOptional: true
|
|
230
230
|
}
|