@lssm/example.agent-console 0.0.0-canary-20251217063201 → 0.0.0-canary-20251217073102
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$bundle.log +201 -166
- package/CHANGELOG.md +6 -6
- package/dist/agent/agent.contracts.d.ts +126 -126
- package/dist/agent/agent.contracts.js +336 -1
- package/dist/agent/agent.entity.d.ts +36 -36
- package/dist/agent/agent.entity.js +136 -1
- package/dist/agent/agent.enum.d.ts +4 -4
- package/dist/agent/agent.enum.js +34 -1
- package/dist/agent/agent.event.d.ts +31 -31
- package/dist/agent/agent.event.js +183 -1
- package/dist/agent/agent.handler.d.ts +1 -1
- package/dist/agent/agent.handler.js +83 -1
- package/dist/agent/agent.presentation.js +75 -1
- package/dist/agent/agent.schema.d.ts +95 -95
- package/dist/agent/agent.schema.js +407 -1
- package/dist/agent/index.js +9 -1
- package/dist/agent.feature.js +295 -1
- package/dist/docs/agent-console.docblock.js +69 -5
- package/dist/docs/index.js +1 -1
- package/dist/example.js +50 -1
- package/dist/handlers/index.js +5 -1
- package/dist/index.js +32 -1
- package/dist/libs/contracts/dist/capabilities/openbanking.js +88 -1
- package/dist/libs/contracts/dist/client/index.js +5 -1
- package/dist/libs/contracts/dist/client/react/feature-render.js +2 -1
- package/dist/libs/contracts/dist/client/react/form-render.js +4 -1
- package/dist/libs/contracts/dist/client/react/index.js +4 -1
- package/dist/libs/contracts/dist/contract-registry/index.js +1 -1
- package/dist/libs/contracts/dist/contract-registry/schemas.js +60 -1
- package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
- package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
- package/dist/libs/contracts/dist/docs/index.js +29 -1
- package/dist/libs/contracts/dist/docs/presentations.js +71 -1
- package/dist/libs/contracts/dist/docs/registry.js +44 -1
- package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
- package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
- package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
- package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
- package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
- package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
- package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
- package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
- package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
- package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
- package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
- package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
- package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
- package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
- package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
- package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
- package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
- package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
- package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
- package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
- package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
- package/dist/libs/contracts/dist/events.js +10 -1
- package/dist/libs/contracts/dist/experiments/evaluator.js +1 -1
- package/dist/libs/contracts/dist/index.js +71 -1
- package/dist/libs/contracts/dist/install.js +2 -1
- package/dist/libs/contracts/dist/integrations/contracts.js +377 -1
- package/dist/libs/contracts/dist/integrations/index.js +18 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/accounts.js +228 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/balances.js +159 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/index.js +3 -1
- package/dist/libs/contracts/dist/integrations/openbanking/contracts/transactions.js +210 -1
- package/dist/libs/contracts/dist/integrations/openbanking/models.js +242 -1
- package/dist/libs/contracts/dist/integrations/openbanking/telemetry.js +13 -1
- package/dist/libs/contracts/dist/integrations/providers/elevenlabs.js +52 -1
- package/dist/libs/contracts/dist/integrations/providers/gcs-storage.js +75 -1
- package/dist/libs/contracts/dist/integrations/providers/gmail.js +87 -1
- package/dist/libs/contracts/dist/integrations/providers/google-calendar.js +66 -1
- package/dist/libs/contracts/dist/integrations/providers/index.js +11 -1
- package/dist/libs/contracts/dist/integrations/providers/mistral.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/postmark.js +68 -1
- package/dist/libs/contracts/dist/integrations/providers/powens.js +116 -1
- package/dist/libs/contracts/dist/integrations/providers/qdrant.js +73 -1
- package/dist/libs/contracts/dist/integrations/providers/registry.js +10 -1
- package/dist/libs/contracts/dist/integrations/providers/stripe.js +83 -1
- package/dist/libs/contracts/dist/integrations/providers/twilio-sms.js +61 -1
- package/dist/libs/contracts/dist/jsonschema.js +1 -1
- package/dist/libs/contracts/dist/knowledge/contracts.js +306 -1
- package/dist/libs/contracts/dist/knowledge/index.js +7 -1
- package/dist/libs/contracts/dist/knowledge/spaces/email-threads.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-docs.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/financial-overview.js +38 -1
- package/dist/libs/contracts/dist/knowledge/spaces/index.js +6 -1
- package/dist/libs/contracts/dist/knowledge/spaces/product-canon.js +34 -1
- package/dist/libs/contracts/dist/knowledge/spaces/support-faq.js +37 -1
- package/dist/libs/contracts/dist/knowledge/spaces/uploaded-docs.js +34 -1
- package/dist/libs/contracts/dist/llm/exporters.js +19 -1
- package/dist/libs/contracts/dist/llm/index.js +2 -1
- package/dist/libs/contracts/dist/llm/prompts.js +1 -1
- package/dist/libs/contracts/dist/onboarding-base.js +196 -1
- package/dist/libs/contracts/dist/openapi.js +1 -1
- package/dist/libs/contracts/dist/ownership.js +21 -1
- package/dist/libs/contracts/dist/presentations.js +1 -1
- package/dist/libs/contracts/dist/presentations.v2.js +11 -1
- package/dist/libs/contracts/dist/prompt.js +1 -1
- package/dist/libs/contracts/dist/promptRegistry.js +1 -1
- package/dist/libs/contracts/dist/regenerator/index.js +1 -1
- package/dist/libs/contracts/dist/regenerator/service.js +6 -1
- package/dist/libs/contracts/dist/registry.js +2 -1
- package/dist/libs/contracts/dist/resources.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/EnumType.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/FieldType.js +49 -1
- package/dist/libs/contracts/dist/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/contracts/dist/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/contracts/dist/schema/dist/entity/defineEntity.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/entity/index.js +2 -1
- package/dist/libs/contracts/dist/schema/dist/entity/types.js +1 -1
- package/dist/libs/contracts/dist/schema/dist/index.js +6 -1
- package/dist/libs/contracts/dist/server/graphql-pothos.js +6 -1
- package/dist/libs/contracts/dist/server/index.js +8 -1
- package/dist/libs/contracts/dist/server/mcp/createMcpServer.js +4 -1
- package/dist/libs/contracts/dist/server/mcp/registerPresentations.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerPrompts.js +1 -1
- package/dist/libs/contracts/dist/server/mcp/registerResources.js +2 -1
- package/dist/libs/contracts/dist/server/mcp/registerTools.js +1 -1
- package/dist/libs/contracts/dist/server/provider-mcp.js +1 -1
- package/dist/libs/contracts/dist/server/rest-elysia.js +1 -1
- package/dist/libs/contracts/dist/server/rest-express.js +1 -1
- package/dist/libs/contracts/dist/server/rest-generic.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-app.js +1 -1
- package/dist/libs/contracts/dist/server/rest-next-pages.js +1 -1
- package/dist/libs/contracts/dist/spec.js +34 -1
- package/dist/libs/contracts/dist/telemetry/index.js +1 -1
- package/dist/libs/contracts/dist/telemetry/tracker.js +1 -1
- package/dist/libs/contracts/dist/tests/index.js +1 -1
- package/dist/libs/contracts/dist/tests/runner.js +2 -1
- package/dist/libs/contracts/dist/workflow/index.js +1 -1
- package/dist/libs/contracts/dist/workflow/runner.js +1 -1
- package/dist/libs/schema/dist/EnumType.js +56 -1
- package/dist/libs/schema/dist/FieldType.js +49 -1
- package/dist/libs/schema/dist/ScalarTypeEnum.js +236 -1
- package/dist/libs/schema/dist/SchemaModel.js +39 -1
- package/dist/libs/schema/dist/entity/defineEntity.js +236 -1
- package/dist/libs/schema/dist/entity/index.js +2 -1
- package/dist/libs/schema/dist/entity/types.js +1 -1
- package/dist/libs/schema/dist/index.js +6 -1
- package/dist/presentations/index.js +5 -1
- package/dist/run/index.js +9 -1
- package/dist/run/run.contracts.d.ts +175 -175
- package/dist/run/run.contracts.js +469 -1
- package/dist/run/run.entity.d.ts +56 -56
- package/dist/run/run.entity.js +205 -1
- package/dist/run/run.enum.d.ts +5 -5
- package/dist/run/run.enum.js +45 -1
- package/dist/run/run.event.d.ts +71 -71
- package/dist/run/run.event.js +389 -1
- package/dist/run/run.handler.js +82 -1
- package/dist/run/run.presentation.js +55 -1
- package/dist/run/run.schema.d.ts +99 -99
- package/dist/run/run.schema.js +339 -1
- package/dist/shared/index.js +5 -1
- package/dist/shared/mock-agents.js +93 -1
- package/dist/shared/mock-runs.js +117 -1
- package/dist/shared/mock-tools.js +180 -1
- package/dist/tool/index.js +9 -1
- package/dist/tool/tool.contracts.d.ts +101 -101
- package/dist/tool/tool.contracts.js +288 -1
- package/dist/tool/tool.entity.d.ts +24 -24
- package/dist/tool/tool.entity.js +105 -1
- package/dist/tool/tool.enum.d.ts +4 -4
- package/dist/tool/tool.enum.js +35 -1
- package/dist/tool/tool.event.d.ts +25 -25
- package/dist/tool/tool.event.js +145 -1
- package/dist/tool/tool.handler.d.ts +1 -1
- package/dist/tool/tool.handler.js +86 -1
- package/dist/tool/tool.presentation.js +55 -1
- package/dist/tool/tool.schema.d.ts +52 -52
- package/dist/tool/tool.schema.js +237 -1
- package/package.json +8 -8
package/dist/tool/tool.event.js
CHANGED
|
@@ -1 +1,145 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { ScalarTypeEnum } from "../libs/schema/dist/ScalarTypeEnum.js";
|
|
2
|
+
import "../libs/schema/dist/index.js";
|
|
3
|
+
import { defineSchemaModel } from "../libs/contracts/dist/schema/dist/SchemaModel.js";
|
|
4
|
+
import { defineEvent } from "../libs/contracts/dist/events.js";
|
|
5
|
+
import "../libs/contracts/dist/index.js";
|
|
6
|
+
|
|
7
|
+
//#region src/tool/tool.event.ts
|
|
8
|
+
/**
|
|
9
|
+
* Payload for tool created event.
|
|
10
|
+
*/
|
|
11
|
+
const ToolCreatedPayload = defineSchemaModel({
|
|
12
|
+
name: "ToolCreatedPayload",
|
|
13
|
+
description: "Payload for tool created event",
|
|
14
|
+
fields: {
|
|
15
|
+
id: {
|
|
16
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
17
|
+
isOptional: false
|
|
18
|
+
},
|
|
19
|
+
organizationId: {
|
|
20
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
+
isOptional: false
|
|
22
|
+
},
|
|
23
|
+
name: {
|
|
24
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
25
|
+
isOptional: false
|
|
26
|
+
},
|
|
27
|
+
slug: {
|
|
28
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
+
isOptional: false
|
|
30
|
+
},
|
|
31
|
+
category: {
|
|
32
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
+
isOptional: false
|
|
34
|
+
},
|
|
35
|
+
implementationType: {
|
|
36
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
37
|
+
isOptional: false
|
|
38
|
+
},
|
|
39
|
+
createdById: {
|
|
40
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
41
|
+
isOptional: true
|
|
42
|
+
},
|
|
43
|
+
createdAt: {
|
|
44
|
+
type: ScalarTypeEnum.DateTime(),
|
|
45
|
+
isOptional: false
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
/**
|
|
50
|
+
* ToolCreatedEvent - A new tool was created.
|
|
51
|
+
*/
|
|
52
|
+
const ToolCreatedEvent = defineEvent({
|
|
53
|
+
name: "agent.tool.created",
|
|
54
|
+
version: 1,
|
|
55
|
+
description: "A new AI tool was created.",
|
|
56
|
+
payload: ToolCreatedPayload
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* Payload for tool updated event.
|
|
60
|
+
*/
|
|
61
|
+
const ToolUpdatedPayload = defineSchemaModel({
|
|
62
|
+
name: "ToolUpdatedPayload",
|
|
63
|
+
description: "Payload for tool updated event",
|
|
64
|
+
fields: {
|
|
65
|
+
id: {
|
|
66
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
67
|
+
isOptional: false
|
|
68
|
+
},
|
|
69
|
+
organizationId: {
|
|
70
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
71
|
+
isOptional: false
|
|
72
|
+
},
|
|
73
|
+
name: {
|
|
74
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
75
|
+
isOptional: false
|
|
76
|
+
},
|
|
77
|
+
status: {
|
|
78
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
79
|
+
isOptional: false
|
|
80
|
+
},
|
|
81
|
+
updatedFields: {
|
|
82
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
83
|
+
isArray: true,
|
|
84
|
+
isOptional: false
|
|
85
|
+
},
|
|
86
|
+
updatedAt: {
|
|
87
|
+
type: ScalarTypeEnum.DateTime(),
|
|
88
|
+
isOptional: false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
/**
|
|
93
|
+
* ToolUpdatedEvent - A tool was updated.
|
|
94
|
+
*/
|
|
95
|
+
const ToolUpdatedEvent = defineEvent({
|
|
96
|
+
name: "agent.tool.updated",
|
|
97
|
+
version: 1,
|
|
98
|
+
description: "An AI tool configuration was updated.",
|
|
99
|
+
payload: ToolUpdatedPayload
|
|
100
|
+
});
|
|
101
|
+
/**
|
|
102
|
+
* Payload for tool status changed event.
|
|
103
|
+
*/
|
|
104
|
+
const ToolStatusChangedPayload = defineSchemaModel({
|
|
105
|
+
name: "ToolStatusChangedPayload",
|
|
106
|
+
description: "Payload for tool status changed event",
|
|
107
|
+
fields: {
|
|
108
|
+
id: {
|
|
109
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
110
|
+
isOptional: false
|
|
111
|
+
},
|
|
112
|
+
organizationId: {
|
|
113
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
114
|
+
isOptional: false
|
|
115
|
+
},
|
|
116
|
+
name: {
|
|
117
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
118
|
+
isOptional: false
|
|
119
|
+
},
|
|
120
|
+
previousStatus: {
|
|
121
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
122
|
+
isOptional: false
|
|
123
|
+
},
|
|
124
|
+
newStatus: {
|
|
125
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
126
|
+
isOptional: false
|
|
127
|
+
},
|
|
128
|
+
changedAt: {
|
|
129
|
+
type: ScalarTypeEnum.DateTime(),
|
|
130
|
+
isOptional: false
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
/**
|
|
135
|
+
* ToolStatusChangedEvent - A tool's status was changed.
|
|
136
|
+
*/
|
|
137
|
+
const ToolStatusChangedEvent = defineEvent({
|
|
138
|
+
name: "agent.tool.statusChanged",
|
|
139
|
+
version: 1,
|
|
140
|
+
description: "An AI tool status was changed (activated, deprecated, disabled).",
|
|
141
|
+
payload: ToolStatusChangedPayload
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
//#endregion
|
|
145
|
+
export { ToolCreatedEvent, ToolStatusChangedEvent, ToolUpdatedEvent };
|
|
@@ -293,7 +293,7 @@ declare function mockUpdateToolHandler(input: {
|
|
|
293
293
|
}): Promise<{
|
|
294
294
|
id: string;
|
|
295
295
|
name: string;
|
|
296
|
-
status: "
|
|
296
|
+
status: "DRAFT" | "ACTIVE" | "DEPRECATED" | "DISABLED";
|
|
297
297
|
updatedAt: Date;
|
|
298
298
|
}>;
|
|
299
299
|
/**
|
|
@@ -1 +1,86 @@
|
|
|
1
|
-
import{MOCK_TOOLS
|
|
1
|
+
import { MOCK_TOOLS } from "../shared/mock-tools.js";
|
|
2
|
+
|
|
3
|
+
//#region src/tool/tool.handler.ts
|
|
4
|
+
/**
|
|
5
|
+
* Mock handlers for Tool contracts.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Mock handler for ListToolsQuery.
|
|
9
|
+
*/
|
|
10
|
+
async function mockListToolsHandler(input) {
|
|
11
|
+
const { organizationId, category, status, search, limit = 20, offset = 0 } = input;
|
|
12
|
+
let filtered = MOCK_TOOLS.filter((t) => t.organizationId === organizationId);
|
|
13
|
+
if (category) filtered = filtered.filter((t) => t.category === category);
|
|
14
|
+
if (status) filtered = filtered.filter((t) => t.status === status);
|
|
15
|
+
if (search) {
|
|
16
|
+
const q = search.toLowerCase();
|
|
17
|
+
filtered = filtered.filter((t) => t.name.toLowerCase().includes(q) || t.description.toLowerCase().includes(q));
|
|
18
|
+
}
|
|
19
|
+
const total = filtered.length;
|
|
20
|
+
return {
|
|
21
|
+
items: filtered.slice(offset, offset + limit).map((t) => ({
|
|
22
|
+
id: t.id,
|
|
23
|
+
name: t.name,
|
|
24
|
+
slug: t.slug,
|
|
25
|
+
description: t.description,
|
|
26
|
+
category: t.category,
|
|
27
|
+
status: t.status,
|
|
28
|
+
version: t.version,
|
|
29
|
+
createdAt: t.createdAt
|
|
30
|
+
})),
|
|
31
|
+
total,
|
|
32
|
+
hasMore: offset + limit < total
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Mock handler for GetToolQuery.
|
|
37
|
+
*/
|
|
38
|
+
async function mockGetToolHandler(input) {
|
|
39
|
+
const tool = MOCK_TOOLS.find((t) => t.id === input.toolId);
|
|
40
|
+
if (!tool) throw new Error("TOOL_NOT_FOUND");
|
|
41
|
+
return tool;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Mock handler for CreateToolCommand.
|
|
45
|
+
*/
|
|
46
|
+
async function mockCreateToolHandler(input) {
|
|
47
|
+
if (MOCK_TOOLS.some((t) => t.organizationId === input.organizationId && t.slug === input.slug)) throw new Error("SLUG_EXISTS");
|
|
48
|
+
return {
|
|
49
|
+
id: `tool-${Date.now()}`,
|
|
50
|
+
name: input.name,
|
|
51
|
+
slug: input.slug,
|
|
52
|
+
status: "DRAFT"
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Mock handler for UpdateToolCommand.
|
|
57
|
+
*/
|
|
58
|
+
async function mockUpdateToolHandler(input) {
|
|
59
|
+
const tool = MOCK_TOOLS.find((t) => t.id === input.toolId);
|
|
60
|
+
if (!tool) throw new Error("TOOL_NOT_FOUND");
|
|
61
|
+
return {
|
|
62
|
+
id: tool.id,
|
|
63
|
+
name: input.name ?? tool.name,
|
|
64
|
+
status: input.status ?? tool.status,
|
|
65
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Mock handler for TestToolCommand.
|
|
70
|
+
*/
|
|
71
|
+
async function mockTestToolHandler(input) {
|
|
72
|
+
if (!MOCK_TOOLS.find((t) => t.id === input.toolId)) throw new Error("TOOL_NOT_FOUND");
|
|
73
|
+
const startTime = Date.now();
|
|
74
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
75
|
+
return {
|
|
76
|
+
success: true,
|
|
77
|
+
output: {
|
|
78
|
+
result: "Test successful",
|
|
79
|
+
input: input.testInput
|
|
80
|
+
},
|
|
81
|
+
durationMs: Date.now() - startTime
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//#endregion
|
|
86
|
+
export { mockCreateToolHandler, mockGetToolHandler, mockListToolsHandler, mockTestToolHandler, mockUpdateToolHandler };
|
|
@@ -1 +1,55 @@
|
|
|
1
|
-
import{ToolSummaryModel
|
|
1
|
+
import { ToolSummaryModel } from "./tool.schema.js";
|
|
2
|
+
|
|
3
|
+
//#region src/tool/tool.presentation.ts
|
|
4
|
+
/**
|
|
5
|
+
* Presentation for displaying a list of tools.
|
|
6
|
+
*/
|
|
7
|
+
const ToolListPresentation = {
|
|
8
|
+
meta: {
|
|
9
|
+
name: "agent-console.tool.list",
|
|
10
|
+
version: 1,
|
|
11
|
+
description: "List view of AI tools with category, status, and version info",
|
|
12
|
+
domain: "agent-console",
|
|
13
|
+
owners: ["@agent-console-team"],
|
|
14
|
+
tags: [
|
|
15
|
+
"tool",
|
|
16
|
+
"list",
|
|
17
|
+
"dashboard"
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
source: {
|
|
21
|
+
type: "component",
|
|
22
|
+
framework: "react",
|
|
23
|
+
componentKey: "ToolListView",
|
|
24
|
+
props: ToolSummaryModel
|
|
25
|
+
},
|
|
26
|
+
targets: [
|
|
27
|
+
"react",
|
|
28
|
+
"markdown",
|
|
29
|
+
"application/json"
|
|
30
|
+
],
|
|
31
|
+
policy: { flags: ["agent-console.enabled"] }
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Presentation for tool detail view.
|
|
35
|
+
*/
|
|
36
|
+
const ToolDetailPresentation = {
|
|
37
|
+
meta: {
|
|
38
|
+
name: "agent-console.tool.detail",
|
|
39
|
+
version: 1,
|
|
40
|
+
description: "Detailed view of an AI tool with configuration and test panel",
|
|
41
|
+
domain: "agent-console",
|
|
42
|
+
owners: ["@agent-console-team"],
|
|
43
|
+
tags: ["tool", "detail"]
|
|
44
|
+
},
|
|
45
|
+
source: {
|
|
46
|
+
type: "component",
|
|
47
|
+
framework: "react",
|
|
48
|
+
componentKey: "ToolDetailView"
|
|
49
|
+
},
|
|
50
|
+
targets: ["react", "markdown"],
|
|
51
|
+
policy: { flags: ["agent-console.enabled"] }
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
//#endregion
|
|
55
|
+
export { ToolDetailPresentation, ToolListPresentation };
|
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _lssm_lib_schema831 from "@lssm/lib.schema";
|
|
2
2
|
|
|
3
3
|
//#region src/tool/tool.schema.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* AI tool definition.
|
|
6
6
|
*/
|
|
7
|
-
declare const ToolModel:
|
|
7
|
+
declare const ToolModel: _lssm_lib_schema831.SchemaModel<{
|
|
8
8
|
id: {
|
|
9
|
-
type:
|
|
9
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
10
10
|
isOptional: false;
|
|
11
11
|
};
|
|
12
12
|
organizationId: {
|
|
13
|
-
type:
|
|
13
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
14
14
|
isOptional: false;
|
|
15
15
|
};
|
|
16
16
|
name: {
|
|
17
|
-
type:
|
|
17
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
18
18
|
isOptional: false;
|
|
19
19
|
};
|
|
20
20
|
slug: {
|
|
21
|
-
type:
|
|
21
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
22
22
|
isOptional: false;
|
|
23
23
|
};
|
|
24
24
|
description: {
|
|
25
|
-
type:
|
|
25
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
26
26
|
isOptional: false;
|
|
27
27
|
};
|
|
28
28
|
category: {
|
|
29
|
-
type:
|
|
29
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string, string, string, string]>;
|
|
30
30
|
isOptional: false;
|
|
31
31
|
};
|
|
32
32
|
status: {
|
|
33
|
-
type:
|
|
33
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string, string]>;
|
|
34
34
|
isOptional: false;
|
|
35
35
|
};
|
|
36
36
|
parametersSchema: {
|
|
37
|
-
type:
|
|
37
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
38
38
|
isOptional: false;
|
|
39
39
|
};
|
|
40
40
|
outputSchema: {
|
|
41
|
-
type:
|
|
41
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
42
42
|
isOptional: true;
|
|
43
43
|
};
|
|
44
44
|
implementationType: {
|
|
45
|
-
type:
|
|
45
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string]>;
|
|
46
46
|
isOptional: false;
|
|
47
47
|
};
|
|
48
48
|
implementationConfig: {
|
|
49
|
-
type:
|
|
49
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
50
50
|
isOptional: false;
|
|
51
51
|
};
|
|
52
52
|
maxInvocationsPerMinute: {
|
|
53
|
-
type:
|
|
53
|
+
type: _lssm_lib_schema831.FieldType<number, number>;
|
|
54
54
|
isOptional: true;
|
|
55
55
|
};
|
|
56
56
|
timeoutMs: {
|
|
57
|
-
type:
|
|
57
|
+
type: _lssm_lib_schema831.FieldType<number, number>;
|
|
58
58
|
isOptional: false;
|
|
59
59
|
defaultValue: number;
|
|
60
60
|
};
|
|
61
61
|
version: {
|
|
62
|
-
type:
|
|
62
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
63
63
|
isOptional: false;
|
|
64
64
|
};
|
|
65
65
|
tags: {
|
|
66
|
-
type:
|
|
66
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
67
67
|
isArray: true;
|
|
68
68
|
isOptional: true;
|
|
69
69
|
};
|
|
70
70
|
createdAt: {
|
|
71
|
-
type:
|
|
71
|
+
type: _lssm_lib_schema831.FieldType<Date, string>;
|
|
72
72
|
isOptional: false;
|
|
73
73
|
};
|
|
74
74
|
updatedAt: {
|
|
75
|
-
type:
|
|
75
|
+
type: _lssm_lib_schema831.FieldType<Date, string>;
|
|
76
76
|
isOptional: false;
|
|
77
77
|
};
|
|
78
78
|
}>;
|
|
79
79
|
/**
|
|
80
80
|
* Summary of a tool for list views.
|
|
81
81
|
*/
|
|
82
|
-
declare const ToolSummaryModel:
|
|
82
|
+
declare const ToolSummaryModel: _lssm_lib_schema831.SchemaModel<{
|
|
83
83
|
id: {
|
|
84
|
-
type:
|
|
84
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
85
85
|
isOptional: false;
|
|
86
86
|
};
|
|
87
87
|
name: {
|
|
88
|
-
type:
|
|
88
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
89
89
|
isOptional: false;
|
|
90
90
|
};
|
|
91
91
|
slug: {
|
|
92
|
-
type:
|
|
92
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
93
93
|
isOptional: false;
|
|
94
94
|
};
|
|
95
95
|
description: {
|
|
96
|
-
type:
|
|
96
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
97
97
|
isOptional: false;
|
|
98
98
|
};
|
|
99
99
|
category: {
|
|
100
|
-
type:
|
|
100
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string, string, string, string]>;
|
|
101
101
|
isOptional: false;
|
|
102
102
|
};
|
|
103
103
|
status: {
|
|
104
|
-
type:
|
|
104
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string, string]>;
|
|
105
105
|
isOptional: false;
|
|
106
106
|
};
|
|
107
107
|
version: {
|
|
108
|
-
type:
|
|
108
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
109
109
|
isOptional: false;
|
|
110
110
|
};
|
|
111
111
|
createdAt: {
|
|
112
|
-
type:
|
|
112
|
+
type: _lssm_lib_schema831.FieldType<Date, string>;
|
|
113
113
|
isOptional: false;
|
|
114
114
|
};
|
|
115
115
|
}>;
|
|
116
116
|
/**
|
|
117
117
|
* Input for creating a tool.
|
|
118
118
|
*/
|
|
119
|
-
declare const CreateToolInputModel:
|
|
119
|
+
declare const CreateToolInputModel: _lssm_lib_schema831.SchemaModel<{
|
|
120
120
|
organizationId: {
|
|
121
|
-
type:
|
|
121
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
122
122
|
isOptional: false;
|
|
123
123
|
};
|
|
124
124
|
name: {
|
|
125
|
-
type:
|
|
125
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
126
126
|
isOptional: false;
|
|
127
127
|
};
|
|
128
128
|
slug: {
|
|
129
|
-
type:
|
|
129
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
130
130
|
isOptional: false;
|
|
131
131
|
};
|
|
132
132
|
description: {
|
|
133
|
-
type:
|
|
133
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
134
134
|
isOptional: false;
|
|
135
135
|
};
|
|
136
136
|
category: {
|
|
137
|
-
type:
|
|
137
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string, string, string, string]>;
|
|
138
138
|
isOptional: true;
|
|
139
139
|
};
|
|
140
140
|
parametersSchema: {
|
|
141
|
-
type:
|
|
141
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
142
142
|
isOptional: false;
|
|
143
143
|
};
|
|
144
144
|
outputSchema: {
|
|
145
|
-
type:
|
|
145
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
146
146
|
isOptional: true;
|
|
147
147
|
};
|
|
148
148
|
implementationType: {
|
|
149
|
-
type:
|
|
149
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string]>;
|
|
150
150
|
isOptional: false;
|
|
151
151
|
};
|
|
152
152
|
implementationConfig: {
|
|
153
|
-
type:
|
|
153
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
154
154
|
isOptional: false;
|
|
155
155
|
};
|
|
156
156
|
maxInvocationsPerMinute: {
|
|
157
|
-
type:
|
|
157
|
+
type: _lssm_lib_schema831.FieldType<number, number>;
|
|
158
158
|
isOptional: true;
|
|
159
159
|
};
|
|
160
160
|
timeoutMs: {
|
|
161
|
-
type:
|
|
161
|
+
type: _lssm_lib_schema831.FieldType<number, number>;
|
|
162
162
|
isOptional: true;
|
|
163
163
|
};
|
|
164
164
|
tags: {
|
|
165
|
-
type:
|
|
165
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
166
166
|
isArray: true;
|
|
167
167
|
isOptional: true;
|
|
168
168
|
};
|
|
@@ -170,45 +170,45 @@ declare const CreateToolInputModel: _lssm_lib_schema144.SchemaModel<{
|
|
|
170
170
|
/**
|
|
171
171
|
* Input for updating a tool.
|
|
172
172
|
*/
|
|
173
|
-
declare const UpdateToolInputModel:
|
|
173
|
+
declare const UpdateToolInputModel: _lssm_lib_schema831.SchemaModel<{
|
|
174
174
|
toolId: {
|
|
175
|
-
type:
|
|
175
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
176
176
|
isOptional: false;
|
|
177
177
|
};
|
|
178
178
|
name: {
|
|
179
|
-
type:
|
|
179
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
180
180
|
isOptional: true;
|
|
181
181
|
};
|
|
182
182
|
description: {
|
|
183
|
-
type:
|
|
183
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
184
184
|
isOptional: true;
|
|
185
185
|
};
|
|
186
186
|
status: {
|
|
187
|
-
type:
|
|
187
|
+
type: _lssm_lib_schema831.EnumType<[string, string, string, string]>;
|
|
188
188
|
isOptional: true;
|
|
189
189
|
};
|
|
190
190
|
parametersSchema: {
|
|
191
|
-
type:
|
|
191
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
192
192
|
isOptional: true;
|
|
193
193
|
};
|
|
194
194
|
outputSchema: {
|
|
195
|
-
type:
|
|
195
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
196
196
|
isOptional: true;
|
|
197
197
|
};
|
|
198
198
|
implementationConfig: {
|
|
199
|
-
type:
|
|
199
|
+
type: _lssm_lib_schema831.FieldType<Record<string, unknown>, Record<string, unknown>>;
|
|
200
200
|
isOptional: true;
|
|
201
201
|
};
|
|
202
202
|
maxInvocationsPerMinute: {
|
|
203
|
-
type:
|
|
203
|
+
type: _lssm_lib_schema831.FieldType<number, number>;
|
|
204
204
|
isOptional: true;
|
|
205
205
|
};
|
|
206
206
|
timeoutMs: {
|
|
207
|
-
type:
|
|
207
|
+
type: _lssm_lib_schema831.FieldType<number, number>;
|
|
208
208
|
isOptional: true;
|
|
209
209
|
};
|
|
210
210
|
tags: {
|
|
211
|
-
type:
|
|
211
|
+
type: _lssm_lib_schema831.FieldType<string, string>;
|
|
212
212
|
isArray: true;
|
|
213
213
|
isOptional: true;
|
|
214
214
|
};
|