@contractspec/example.agent-console 3.8.8 → 3.8.10
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.log +225 -222
- package/CHANGELOG.md +34 -0
- package/dist/agent/agent.entity.js +1 -127
- package/dist/agent/agent.enum.js +1 -25
- package/dist/agent/agent.event.js +1 -116
- package/dist/agent/agent.handler.js +1 -1030
- package/dist/agent/agent.operation.js +1 -735
- package/dist/agent/agent.presentation.js +1 -282
- package/dist/agent/agent.schema.js +1 -215
- package/dist/agent/agent.test-spec.js +1 -58
- package/dist/agent/index.js +1 -1248
- package/dist/agent.capability.js +1 -19
- package/dist/agent.feature.js +1 -305
- package/dist/browser/agent/agent.entity.js +1 -127
- package/dist/browser/agent/agent.enum.js +1 -25
- package/dist/browser/agent/agent.event.js +1 -116
- package/dist/browser/agent/agent.handler.js +1 -1030
- package/dist/browser/agent/agent.operation.js +1 -735
- package/dist/browser/agent/agent.presentation.js +1 -282
- package/dist/browser/agent/agent.schema.js +1 -215
- package/dist/browser/agent/agent.test-spec.js +1 -58
- package/dist/browser/agent/index.js +1 -1248
- package/dist/browser/agent.capability.js +1 -19
- package/dist/browser/agent.feature.js +1 -305
- package/dist/browser/docs/agent-console.docblock.js +5 -49
- package/dist/browser/docs/index.js +5 -49
- package/dist/browser/example.js +1 -41
- package/dist/browser/handlers/agent.handlers.js +6 -2143
- package/dist/browser/handlers/index.js +6 -2943
- package/dist/browser/index.js +14 -6828
- package/dist/browser/presentations/index.js +1 -693
- package/dist/browser/run/index.js +1 -1363
- package/dist/browser/run/run.entity.js +1 -160
- package/dist/browser/run/run.enum.js +1 -34
- package/dist/browser/run/run.event.js +1 -217
- package/dist/browser/run/run.handler.js +1 -919
- package/dist/browser/run/run.operation.js +1 -667
- package/dist/browser/run/run.presentation.js +1 -223
- package/dist/browser/run/run.schema.js +1 -179
- package/dist/browser/run/run.test-spec.js +1 -58
- package/dist/browser/seeders/index.js +2 -21
- package/dist/browser/shared/index.js +1 -626
- package/dist/browser/shared/mock-agents.js +1 -82
- package/dist/browser/shared/mock-runs.js +1 -113
- package/dist/browser/shared/mock-tools.js +1 -146
- package/dist/browser/tool/index.js +1 -949
- package/dist/browser/tool/tool.entity.js +1 -90
- package/dist/browser/tool/tool.enum.js +1 -26
- package/dist/browser/tool/tool.event.js +1 -99
- package/dist/browser/tool/tool.handler.js +1 -699
- package/dist/browser/tool/tool.operation.js +1 -482
- package/dist/browser/tool/tool.presentation.js +1 -188
- package/dist/browser/tool/tool.schema.js +1 -141
- package/dist/browser/tool/tool.test-spec.js +1 -58
- package/dist/browser/ui/AgentDashboard.js +1 -2527
- package/dist/browser/ui/AgentDashboard.visualizations.js +1 -217
- package/dist/browser/ui/AgentRunList.js +1 -482
- package/dist/browser/ui/AgentToolRegistry.js +1 -212
- package/dist/browser/ui/ExecutionConsoleHost.js +1 -0
- package/dist/browser/ui/hooks/index.js +1 -740
- package/dist/browser/ui/hooks/useAgentList.js +1 -55
- package/dist/browser/ui/hooks/useAgentMutations.js +1 -530
- package/dist/browser/ui/hooks/useRunList.js +1 -70
- package/dist/browser/ui/hooks/useToolList.js +1 -85
- package/dist/browser/ui/index.js +5 -3018
- package/dist/browser/ui/modals/AgentActionsModal.js +1 -304
- package/dist/browser/ui/modals/CreateAgentModal.js +1 -243
- package/dist/browser/ui/modals/index.js +1 -546
- package/dist/browser/ui/overlays/demo-overlays.js +1 -64
- package/dist/browser/ui/overlays/index.js +1 -64
- package/dist/browser/ui/renderers/agent-list.markdown.js +2 -64
- package/dist/browser/ui/renderers/agent-list.renderer.js +1 -180
- package/dist/browser/ui/renderers/dashboard.markdown.js +2 -288
- package/dist/browser/ui/renderers/index.js +5 -642
- package/dist/browser/ui/renderers/run-list.markdown.js +2 -50
- package/dist/browser/ui/renderers/tool-registry.markdown.js +2 -64
- package/dist/browser/ui/views/AgentListView.js +1 -165
- package/dist/browser/ui/views/RunDataTable.js +1 -326
- package/dist/browser/ui/views/RunListView.js +1 -479
- package/dist/browser/ui/views/ToolRegistryView.js +1 -209
- package/dist/browser/ui/views/index.js +1 -851
- package/dist/browser/ui/views/run-data-table.columns.js +1 -271
- package/dist/browser/ui/views/run-list.shared.js +1 -177
- package/dist/browser/visualizations/catalog.js +1 -134
- package/dist/browser/visualizations/index.js +1 -187
- package/dist/browser/visualizations/selectors.js +1 -181
- package/dist/docs/agent-console.docblock.js +5 -49
- package/dist/docs/index.js +5 -49
- package/dist/example.js +1 -41
- package/dist/handlers/agent.handlers.js +6 -2143
- package/dist/handlers/index.js +6 -2943
- package/dist/index.js +14 -6828
- package/dist/node/agent/agent.entity.js +1 -127
- package/dist/node/agent/agent.enum.js +1 -25
- package/dist/node/agent/agent.event.js +1 -116
- package/dist/node/agent/agent.handler.js +1 -1030
- package/dist/node/agent/agent.operation.js +1 -735
- package/dist/node/agent/agent.presentation.js +1 -282
- package/dist/node/agent/agent.schema.js +1 -215
- package/dist/node/agent/agent.test-spec.js +1 -58
- package/dist/node/agent/index.js +1 -1248
- package/dist/node/agent.capability.js +1 -19
- package/dist/node/agent.feature.js +1 -305
- package/dist/node/docs/agent-console.docblock.js +5 -49
- package/dist/node/docs/index.js +5 -49
- package/dist/node/example.js +1 -41
- package/dist/node/handlers/agent.handlers.js +6 -2143
- package/dist/node/handlers/index.js +6 -2943
- package/dist/node/index.js +14 -6828
- package/dist/node/presentations/index.js +1 -693
- package/dist/node/run/index.js +1 -1363
- package/dist/node/run/run.entity.js +1 -160
- package/dist/node/run/run.enum.js +1 -34
- package/dist/node/run/run.event.js +1 -217
- package/dist/node/run/run.handler.js +1 -919
- package/dist/node/run/run.operation.js +1 -667
- package/dist/node/run/run.presentation.js +1 -223
- package/dist/node/run/run.schema.js +1 -179
- package/dist/node/run/run.test-spec.js +1 -58
- package/dist/node/seeders/index.js +2 -21
- package/dist/node/shared/index.js +1 -626
- package/dist/node/shared/mock-agents.js +1 -82
- package/dist/node/shared/mock-runs.js +1 -113
- package/dist/node/shared/mock-tools.js +1 -146
- package/dist/node/tool/index.js +1 -949
- package/dist/node/tool/tool.entity.js +1 -90
- package/dist/node/tool/tool.enum.js +1 -26
- package/dist/node/tool/tool.event.js +1 -99
- package/dist/node/tool/tool.handler.js +1 -699
- package/dist/node/tool/tool.operation.js +1 -482
- package/dist/node/tool/tool.presentation.js +1 -188
- package/dist/node/tool/tool.schema.js +1 -141
- package/dist/node/tool/tool.test-spec.js +1 -58
- package/dist/node/ui/AgentDashboard.js +1 -2527
- package/dist/node/ui/AgentDashboard.visualizations.js +1 -217
- package/dist/node/ui/AgentRunList.js +1 -482
- package/dist/node/ui/AgentToolRegistry.js +1 -212
- package/dist/node/ui/ExecutionConsoleHost.js +1 -0
- package/dist/node/ui/hooks/index.js +1 -740
- package/dist/node/ui/hooks/useAgentList.js +1 -55
- package/dist/node/ui/hooks/useAgentMutations.js +1 -530
- package/dist/node/ui/hooks/useRunList.js +1 -70
- package/dist/node/ui/hooks/useToolList.js +1 -85
- package/dist/node/ui/index.js +5 -3018
- package/dist/node/ui/modals/AgentActionsModal.js +1 -304
- package/dist/node/ui/modals/CreateAgentModal.js +1 -243
- package/dist/node/ui/modals/index.js +1 -546
- package/dist/node/ui/overlays/demo-overlays.js +1 -64
- package/dist/node/ui/overlays/index.js +1 -64
- package/dist/node/ui/renderers/agent-list.markdown.js +2 -64
- package/dist/node/ui/renderers/agent-list.renderer.js +1 -180
- package/dist/node/ui/renderers/dashboard.markdown.js +2 -288
- package/dist/node/ui/renderers/index.js +5 -642
- package/dist/node/ui/renderers/run-list.markdown.js +2 -50
- package/dist/node/ui/renderers/tool-registry.markdown.js +2 -64
- package/dist/node/ui/views/AgentListView.js +1 -165
- package/dist/node/ui/views/RunDataTable.js +1 -326
- package/dist/node/ui/views/RunListView.js +1 -479
- package/dist/node/ui/views/ToolRegistryView.js +1 -209
- package/dist/node/ui/views/index.js +1 -851
- package/dist/node/ui/views/run-data-table.columns.js +1 -271
- package/dist/node/ui/views/run-list.shared.js +1 -177
- package/dist/node/visualizations/catalog.js +1 -134
- package/dist/node/visualizations/index.js +1 -187
- package/dist/node/visualizations/selectors.js +1 -181
- package/dist/presentations/index.js +1 -693
- package/dist/run/index.js +1 -1363
- package/dist/run/run.entity.js +1 -160
- package/dist/run/run.enum.js +1 -34
- package/dist/run/run.event.js +1 -217
- package/dist/run/run.handler.js +1 -919
- package/dist/run/run.operation.js +1 -667
- package/dist/run/run.presentation.js +1 -223
- package/dist/run/run.schema.js +1 -179
- package/dist/run/run.test-spec.js +1 -58
- package/dist/seeders/index.js +2 -21
- package/dist/shared/index.js +1 -626
- package/dist/shared/mock-agents.js +1 -82
- package/dist/shared/mock-runs.js +1 -113
- package/dist/shared/mock-tools.js +1 -146
- package/dist/tool/index.js +1 -949
- package/dist/tool/tool.entity.js +1 -90
- package/dist/tool/tool.enum.js +1 -26
- package/dist/tool/tool.event.js +1 -99
- package/dist/tool/tool.handler.js +1 -699
- package/dist/tool/tool.operation.js +1 -482
- package/dist/tool/tool.presentation.js +1 -188
- package/dist/tool/tool.schema.js +1 -141
- package/dist/tool/tool.test-spec.js +1 -58
- package/dist/ui/AgentDashboard.js +1 -2527
- package/dist/ui/AgentDashboard.visualizations.js +1 -217
- package/dist/ui/AgentRunList.js +1 -482
- package/dist/ui/AgentToolRegistry.js +1 -212
- package/dist/ui/ExecutionConsoleHost.d.ts +1 -0
- package/dist/ui/ExecutionConsoleHost.js +2 -0
- package/dist/ui/ExecutionConsoleHost.test.d.ts +1 -0
- package/dist/ui/hooks/index.js +1 -740
- package/dist/ui/hooks/useAgentList.js +1 -55
- package/dist/ui/hooks/useAgentMutations.js +1 -530
- package/dist/ui/hooks/useRunList.js +1 -70
- package/dist/ui/hooks/useToolList.js +1 -85
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.js +5 -3018
- package/dist/ui/modals/AgentActionsModal.js +1 -304
- package/dist/ui/modals/CreateAgentModal.js +1 -243
- package/dist/ui/modals/index.js +1 -546
- package/dist/ui/overlays/demo-overlays.js +1 -64
- package/dist/ui/overlays/index.js +1 -64
- package/dist/ui/renderers/agent-list.markdown.js +2 -64
- package/dist/ui/renderers/agent-list.renderer.js +1 -180
- package/dist/ui/renderers/dashboard.markdown.js +2 -288
- package/dist/ui/renderers/index.js +5 -642
- package/dist/ui/renderers/run-list.markdown.js +2 -50
- package/dist/ui/renderers/tool-registry.markdown.js +2 -64
- package/dist/ui/views/AgentListView.js +1 -165
- package/dist/ui/views/RunDataTable.js +1 -326
- package/dist/ui/views/RunListView.js +1 -479
- package/dist/ui/views/ToolRegistryView.js +1 -209
- package/dist/ui/views/index.js +1 -851
- package/dist/ui/views/run-data-table.columns.js +1 -271
- package/dist/ui/views/run-list.shared.js +1 -177
- package/dist/visualizations/catalog.js +1 -134
- package/dist/visualizations/index.js +1 -187
- package/dist/visualizations/selectors.js +1 -181
- package/package.json +29 -13
- package/src/ui/ExecutionConsoleHost.test.tsx +110 -0
- package/src/ui/ExecutionConsoleHost.tsx +14 -0
- package/src/ui/index.ts +1 -1
|
@@ -1,189 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { defineEnum } from "@contractspec/lib.schema";
|
|
4
|
-
var ToolCategoryEnum = defineEnum("ToolCategory", [
|
|
5
|
-
"RETRIEVAL",
|
|
6
|
-
"COMPUTATION",
|
|
7
|
-
"COMMUNICATION",
|
|
8
|
-
"INTEGRATION",
|
|
9
|
-
"UTILITY",
|
|
10
|
-
"CUSTOM"
|
|
11
|
-
]);
|
|
12
|
-
var ToolStatusEnum = defineEnum("ToolStatus", [
|
|
13
|
-
"DRAFT",
|
|
14
|
-
"ACTIVE",
|
|
15
|
-
"DEPRECATED",
|
|
16
|
-
"DISABLED"
|
|
17
|
-
]);
|
|
18
|
-
var ImplementationTypeEnum = defineEnum("ImplementationType", [
|
|
19
|
-
"http",
|
|
20
|
-
"function",
|
|
21
|
-
"workflow"
|
|
22
|
-
]);
|
|
23
|
-
|
|
24
|
-
// src/tool/tool.schema.ts
|
|
25
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
26
|
-
var ToolModel = defineSchemaModel({
|
|
27
|
-
name: "Tool",
|
|
28
|
-
description: "AI tool definition",
|
|
29
|
-
fields: {
|
|
30
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
31
|
-
organizationId: {
|
|
32
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
-
isOptional: false
|
|
34
|
-
},
|
|
35
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
36
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
38
|
-
category: { type: ToolCategoryEnum, isOptional: false },
|
|
39
|
-
status: { type: ToolStatusEnum, isOptional: false },
|
|
40
|
-
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },
|
|
41
|
-
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
42
|
-
implementationType: { type: ImplementationTypeEnum, isOptional: false },
|
|
43
|
-
implementationConfig: {
|
|
44
|
-
type: ScalarTypeEnum.JSONObject(),
|
|
45
|
-
isOptional: false
|
|
46
|
-
},
|
|
47
|
-
maxInvocationsPerMinute: {
|
|
48
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
49
|
-
isOptional: true
|
|
50
|
-
},
|
|
51
|
-
timeoutMs: {
|
|
52
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
53
|
-
isOptional: false,
|
|
54
|
-
defaultValue: 30000
|
|
55
|
-
},
|
|
56
|
-
version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
57
|
-
tags: {
|
|
58
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
59
|
-
isArray: true,
|
|
60
|
-
isOptional: true
|
|
61
|
-
},
|
|
62
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
63
|
-
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
var ToolSummaryModel = defineSchemaModel({
|
|
67
|
-
name: "ToolSummary",
|
|
68
|
-
description: "Summary of a tool for list views",
|
|
69
|
-
fields: {
|
|
70
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
71
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
72
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
73
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
74
|
-
category: { type: ToolCategoryEnum, isOptional: false },
|
|
75
|
-
status: { type: ToolStatusEnum, isOptional: false },
|
|
76
|
-
version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
77
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
var CreateToolInputModel = defineSchemaModel({
|
|
81
|
-
name: "CreateToolInput",
|
|
82
|
-
description: "Input for creating a tool",
|
|
83
|
-
fields: {
|
|
84
|
-
organizationId: {
|
|
85
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
-
isOptional: false
|
|
87
|
-
},
|
|
88
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
89
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
90
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
91
|
-
category: { type: ToolCategoryEnum, isOptional: true },
|
|
92
|
-
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },
|
|
93
|
-
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
94
|
-
implementationType: { type: ImplementationTypeEnum, isOptional: false },
|
|
95
|
-
implementationConfig: {
|
|
96
|
-
type: ScalarTypeEnum.JSONObject(),
|
|
97
|
-
isOptional: false
|
|
98
|
-
},
|
|
99
|
-
maxInvocationsPerMinute: {
|
|
100
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
101
|
-
isOptional: true
|
|
102
|
-
},
|
|
103
|
-
timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
104
|
-
tags: {
|
|
105
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
106
|
-
isArray: true,
|
|
107
|
-
isOptional: true
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
var UpdateToolInputModel = defineSchemaModel({
|
|
112
|
-
name: "UpdateToolInput",
|
|
113
|
-
description: "Input for updating a tool",
|
|
114
|
-
fields: {
|
|
115
|
-
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
116
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },
|
|
117
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
118
|
-
status: { type: ToolStatusEnum, isOptional: true },
|
|
119
|
-
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
120
|
-
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
121
|
-
implementationConfig: {
|
|
122
|
-
type: ScalarTypeEnum.JSONObject(),
|
|
123
|
-
isOptional: true
|
|
124
|
-
},
|
|
125
|
-
maxInvocationsPerMinute: {
|
|
126
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
127
|
-
isOptional: true
|
|
128
|
-
},
|
|
129
|
-
timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
130
|
-
tags: {
|
|
131
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
132
|
-
isArray: true,
|
|
133
|
-
isOptional: true
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
|
|
138
|
-
// src/tool/tool.presentation.ts
|
|
139
|
-
import {
|
|
140
|
-
definePresentation,
|
|
141
|
-
StabilityEnum
|
|
142
|
-
} from "@contractspec/lib.contracts-spec";
|
|
143
|
-
var ToolListPresentation = definePresentation({
|
|
144
|
-
meta: {
|
|
145
|
-
key: "agent-console.tool.list",
|
|
146
|
-
version: "1.0.0",
|
|
147
|
-
title: "Tool List",
|
|
148
|
-
description: "List view of AI tools with category, status, and version info",
|
|
149
|
-
goal: "Provide an overview of all available tools for agents.",
|
|
150
|
-
context: "Tool management dashboard.",
|
|
151
|
-
domain: "agent-console",
|
|
152
|
-
owners: ["@agent-console-team"],
|
|
153
|
-
tags: ["tool", "list", "dashboard"],
|
|
154
|
-
stability: StabilityEnum.Experimental
|
|
155
|
-
},
|
|
156
|
-
source: {
|
|
157
|
-
type: "component",
|
|
158
|
-
framework: "react",
|
|
159
|
-
componentKey: "ToolListView",
|
|
160
|
-
props: ToolSummaryModel
|
|
161
|
-
},
|
|
162
|
-
targets: ["react", "markdown", "application/json"],
|
|
163
|
-
policy: { flags: ["agent-console.enabled"] }
|
|
164
|
-
});
|
|
165
|
-
var ToolDetailPresentation = definePresentation({
|
|
166
|
-
meta: {
|
|
167
|
-
key: "agent-console.tool.detail",
|
|
168
|
-
version: "1.0.0",
|
|
169
|
-
title: "Tool Details",
|
|
170
|
-
description: "Detailed view of an AI tool with configuration and test panel",
|
|
171
|
-
goal: "Allow users to inspect and test a specific tool.",
|
|
172
|
-
context: "Detailed view of a tool.",
|
|
173
|
-
domain: "agent-console",
|
|
174
|
-
owners: ["@agent-console-team"],
|
|
175
|
-
tags: ["tool", "detail"],
|
|
176
|
-
stability: StabilityEnum.Experimental
|
|
177
|
-
},
|
|
178
|
-
source: {
|
|
179
|
-
type: "component",
|
|
180
|
-
framework: "react",
|
|
181
|
-
componentKey: "ToolDetailView"
|
|
182
|
-
},
|
|
183
|
-
targets: ["react", "markdown"],
|
|
184
|
-
policy: { flags: ["agent-console.enabled"] }
|
|
185
|
-
});
|
|
186
|
-
export {
|
|
187
|
-
ToolListPresentation,
|
|
188
|
-
ToolDetailPresentation
|
|
189
|
-
};
|
|
2
|
+
import{defineEnum as w}from"@contractspec/lib.schema";var k=w("ToolCategory",["RETRIEVAL","COMPUTATION","COMMUNICATION","INTEGRATION","UTILITY","CUSTOM"]),q=w("ToolStatus",["DRAFT","ACTIVE","DEPRECATED","DISABLED"]),x=w("ImplementationType",["http","function","workflow"]);import{defineSchemaModel as v,ScalarTypeEnum as j}from"@contractspec/lib.schema";var J=v({name:"Tool",description:"AI tool definition",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:k,isOptional:!1},status:{type:q,isOptional:!1},parametersSchema:{type:j.JSONObject(),isOptional:!1},outputSchema:{type:j.JSONObject(),isOptional:!0},implementationType:{type:x,isOptional:!1},implementationConfig:{type:j.JSONObject(),isOptional:!1},maxInvocationsPerMinute:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!1,defaultValue:30000},version:{type:j.NonEmptyString(),isOptional:!1},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1}}}),z=v({name:"ToolSummary",description:"Summary of a tool for list views",fields:{id:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:k,isOptional:!1},status:{type:q,isOptional:!1},version:{type:j.NonEmptyString(),isOptional:!1},createdAt:{type:j.DateTime(),isOptional:!1}}}),K=v({name:"CreateToolInput",description:"Input for creating a tool",fields:{organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:k,isOptional:!0},parametersSchema:{type:j.JSONObject(),isOptional:!1},outputSchema:{type:j.JSONObject(),isOptional:!0},implementationType:{type:x,isOptional:!1},implementationConfig:{type:j.JSONObject(),isOptional:!1},maxInvocationsPerMinute:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}}),L=v({name:"UpdateToolInput",description:"Input for updating a tool",fields:{toolId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!0},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!0},parametersSchema:{type:j.JSONObject(),isOptional:!0},outputSchema:{type:j.JSONObject(),isOptional:!0},implementationConfig:{type:j.JSONObject(),isOptional:!0},maxInvocationsPerMinute:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}});import{definePresentation as A,StabilityEnum as B}from"@contractspec/lib.contracts-spec";var R=A({meta:{key:"agent-console.tool.list",version:"1.0.0",title:"Tool List",description:"List view of AI tools with category, status, and version info",goal:"Provide an overview of all available tools for agents.",context:"Tool management dashboard.",domain:"agent-console",owners:["@agent-console-team"],tags:["tool","list","dashboard"],stability:B.Experimental},source:{type:"component",framework:"react",componentKey:"ToolListView",props:z},targets:["react","markdown","application/json"],policy:{flags:["agent-console.enabled"]}}),U=A({meta:{key:"agent-console.tool.detail",version:"1.0.0",title:"Tool Details",description:"Detailed view of an AI tool with configuration and test panel",goal:"Allow users to inspect and test a specific tool.",context:"Detailed view of a tool.",domain:"agent-console",owners:["@agent-console-team"],tags:["tool","detail"],stability:B.Experimental},source:{type:"component",framework:"react",componentKey:"ToolDetailView"},targets:["react","markdown"],policy:{flags:["agent-console.enabled"]}});export{R as ToolListPresentation,U as ToolDetailPresentation};
|
package/dist/tool/tool.schema.js
CHANGED
|
@@ -1,142 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { defineEnum } from "@contractspec/lib.schema";
|
|
4
|
-
var ToolCategoryEnum = defineEnum("ToolCategory", [
|
|
5
|
-
"RETRIEVAL",
|
|
6
|
-
"COMPUTATION",
|
|
7
|
-
"COMMUNICATION",
|
|
8
|
-
"INTEGRATION",
|
|
9
|
-
"UTILITY",
|
|
10
|
-
"CUSTOM"
|
|
11
|
-
]);
|
|
12
|
-
var ToolStatusEnum = defineEnum("ToolStatus", [
|
|
13
|
-
"DRAFT",
|
|
14
|
-
"ACTIVE",
|
|
15
|
-
"DEPRECATED",
|
|
16
|
-
"DISABLED"
|
|
17
|
-
]);
|
|
18
|
-
var ImplementationTypeEnum = defineEnum("ImplementationType", [
|
|
19
|
-
"http",
|
|
20
|
-
"function",
|
|
21
|
-
"workflow"
|
|
22
|
-
]);
|
|
23
|
-
|
|
24
|
-
// src/tool/tool.schema.ts
|
|
25
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
26
|
-
var ToolModel = defineSchemaModel({
|
|
27
|
-
name: "Tool",
|
|
28
|
-
description: "AI tool definition",
|
|
29
|
-
fields: {
|
|
30
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
31
|
-
organizationId: {
|
|
32
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
-
isOptional: false
|
|
34
|
-
},
|
|
35
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
36
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
37
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
38
|
-
category: { type: ToolCategoryEnum, isOptional: false },
|
|
39
|
-
status: { type: ToolStatusEnum, isOptional: false },
|
|
40
|
-
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },
|
|
41
|
-
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
42
|
-
implementationType: { type: ImplementationTypeEnum, isOptional: false },
|
|
43
|
-
implementationConfig: {
|
|
44
|
-
type: ScalarTypeEnum.JSONObject(),
|
|
45
|
-
isOptional: false
|
|
46
|
-
},
|
|
47
|
-
maxInvocationsPerMinute: {
|
|
48
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
49
|
-
isOptional: true
|
|
50
|
-
},
|
|
51
|
-
timeoutMs: {
|
|
52
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
53
|
-
isOptional: false,
|
|
54
|
-
defaultValue: 30000
|
|
55
|
-
},
|
|
56
|
-
version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
57
|
-
tags: {
|
|
58
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
59
|
-
isArray: true,
|
|
60
|
-
isOptional: true
|
|
61
|
-
},
|
|
62
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
63
|
-
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
var ToolSummaryModel = defineSchemaModel({
|
|
67
|
-
name: "ToolSummary",
|
|
68
|
-
description: "Summary of a tool for list views",
|
|
69
|
-
fields: {
|
|
70
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
71
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
72
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
73
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
74
|
-
category: { type: ToolCategoryEnum, isOptional: false },
|
|
75
|
-
status: { type: ToolStatusEnum, isOptional: false },
|
|
76
|
-
version: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
77
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
78
|
-
}
|
|
79
|
-
});
|
|
80
|
-
var CreateToolInputModel = defineSchemaModel({
|
|
81
|
-
name: "CreateToolInput",
|
|
82
|
-
description: "Input for creating a tool",
|
|
83
|
-
fields: {
|
|
84
|
-
organizationId: {
|
|
85
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
86
|
-
isOptional: false
|
|
87
|
-
},
|
|
88
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
|
|
89
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
90
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
91
|
-
category: { type: ToolCategoryEnum, isOptional: true },
|
|
92
|
-
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: false },
|
|
93
|
-
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
94
|
-
implementationType: { type: ImplementationTypeEnum, isOptional: false },
|
|
95
|
-
implementationConfig: {
|
|
96
|
-
type: ScalarTypeEnum.JSONObject(),
|
|
97
|
-
isOptional: false
|
|
98
|
-
},
|
|
99
|
-
maxInvocationsPerMinute: {
|
|
100
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
101
|
-
isOptional: true
|
|
102
|
-
},
|
|
103
|
-
timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
104
|
-
tags: {
|
|
105
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
106
|
-
isArray: true,
|
|
107
|
-
isOptional: true
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
var UpdateToolInputModel = defineSchemaModel({
|
|
112
|
-
name: "UpdateToolInput",
|
|
113
|
-
description: "Input for updating a tool",
|
|
114
|
-
fields: {
|
|
115
|
-
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
116
|
-
name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: true },
|
|
117
|
-
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
118
|
-
status: { type: ToolStatusEnum, isOptional: true },
|
|
119
|
-
parametersSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
120
|
-
outputSchema: { type: ScalarTypeEnum.JSONObject(), isOptional: true },
|
|
121
|
-
implementationConfig: {
|
|
122
|
-
type: ScalarTypeEnum.JSONObject(),
|
|
123
|
-
isOptional: true
|
|
124
|
-
},
|
|
125
|
-
maxInvocationsPerMinute: {
|
|
126
|
-
type: ScalarTypeEnum.Int_unsecure(),
|
|
127
|
-
isOptional: true
|
|
128
|
-
},
|
|
129
|
-
timeoutMs: { type: ScalarTypeEnum.Int_unsecure(), isOptional: true },
|
|
130
|
-
tags: {
|
|
131
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
132
|
-
isArray: true,
|
|
133
|
-
isOptional: true
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
export {
|
|
138
|
-
UpdateToolInputModel,
|
|
139
|
-
ToolSummaryModel,
|
|
140
|
-
ToolModel,
|
|
141
|
-
CreateToolInputModel
|
|
142
|
-
};
|
|
2
|
+
import{defineEnum as w}from"@contractspec/lib.schema";var k=w("ToolCategory",["RETRIEVAL","COMPUTATION","COMMUNICATION","INTEGRATION","UTILITY","CUSTOM"]),q=w("ToolStatus",["DRAFT","ACTIVE","DEPRECATED","DISABLED"]),x=w("ImplementationType",["http","function","workflow"]);import{defineSchemaModel as v,ScalarTypeEnum as j}from"@contractspec/lib.schema";var F=v({name:"Tool",description:"AI tool definition",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:k,isOptional:!1},status:{type:q,isOptional:!1},parametersSchema:{type:j.JSONObject(),isOptional:!1},outputSchema:{type:j.JSONObject(),isOptional:!0},implementationType:{type:x,isOptional:!1},implementationConfig:{type:j.JSONObject(),isOptional:!1},maxInvocationsPerMinute:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!1,defaultValue:30000},version:{type:j.NonEmptyString(),isOptional:!1},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1}}}),G=v({name:"ToolSummary",description:"Summary of a tool for list views",fields:{id:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:k,isOptional:!1},status:{type:q,isOptional:!1},version:{type:j.NonEmptyString(),isOptional:!1},createdAt:{type:j.DateTime(),isOptional:!1}}}),H=v({name:"CreateToolInput",description:"Input for creating a tool",fields:{organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},description:{type:j.String_unsecure(),isOptional:!1},category:{type:k,isOptional:!0},parametersSchema:{type:j.JSONObject(),isOptional:!1},outputSchema:{type:j.JSONObject(),isOptional:!0},implementationType:{type:x,isOptional:!1},implementationConfig:{type:j.JSONObject(),isOptional:!1},maxInvocationsPerMinute:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}}),J=v({name:"UpdateToolInput",description:"Input for updating a tool",fields:{toolId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.NonEmptyString(),isOptional:!0},description:{type:j.String_unsecure(),isOptional:!0},status:{type:q,isOptional:!0},parametersSchema:{type:j.JSONObject(),isOptional:!0},outputSchema:{type:j.JSONObject(),isOptional:!0},implementationConfig:{type:j.JSONObject(),isOptional:!0},maxInvocationsPerMinute:{type:j.Int_unsecure(),isOptional:!0},timeoutMs:{type:j.Int_unsecure(),isOptional:!0},tags:{type:j.String_unsecure(),isArray:!0,isOptional:!0}}});export{J as UpdateToolInputModel,G as ToolSummaryModel,F as ToolModel,H as CreateToolInputModel};
|
|
@@ -1,59 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import { defineTestSpec } from "@contractspec/lib.contracts-spec/tests";
|
|
4
|
-
var toolListTest = defineTestSpec({
|
|
5
|
-
meta: {
|
|
6
|
-
key: "test.agent.tool.list",
|
|
7
|
-
version: "1.0.0",
|
|
8
|
-
owners: ["@agent-console-team"],
|
|
9
|
-
description: "Test for listing tools",
|
|
10
|
-
stability: "stable",
|
|
11
|
-
tags: ["test"]
|
|
12
|
-
},
|
|
13
|
-
target: {
|
|
14
|
-
type: "operation",
|
|
15
|
-
operation: { key: "agent.tool.list", version: "1.0.0" }
|
|
16
|
-
},
|
|
17
|
-
scenarios: [
|
|
18
|
-
{
|
|
19
|
-
key: "success",
|
|
20
|
-
when: { operation: { key: "agent.tool.list" } },
|
|
21
|
-
then: [{ type: "expectOutput", match: {} }]
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
key: "error",
|
|
25
|
-
when: { operation: { key: "agent.tool.list" } },
|
|
26
|
-
then: [{ type: "expectError" }]
|
|
27
|
-
}
|
|
28
|
-
]
|
|
29
|
-
});
|
|
30
|
-
var toolGetTest = defineTestSpec({
|
|
31
|
-
meta: {
|
|
32
|
-
key: "test.agent.tool.get",
|
|
33
|
-
version: "1.0.0",
|
|
34
|
-
owners: ["@agent-console-team"],
|
|
35
|
-
description: "Test for getting tool",
|
|
36
|
-
stability: "stable",
|
|
37
|
-
tags: ["test"]
|
|
38
|
-
},
|
|
39
|
-
target: {
|
|
40
|
-
type: "operation",
|
|
41
|
-
operation: { key: "agent.tool.get", version: "1.0.0" }
|
|
42
|
-
},
|
|
43
|
-
scenarios: [
|
|
44
|
-
{
|
|
45
|
-
key: "success",
|
|
46
|
-
when: { operation: { key: "agent.tool.get" } },
|
|
47
|
-
then: [{ type: "expectOutput", match: {} }]
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
key: "error",
|
|
51
|
-
when: { operation: { key: "agent.tool.get" } },
|
|
52
|
-
then: [{ type: "expectError" }]
|
|
53
|
-
}
|
|
54
|
-
]
|
|
55
|
-
});
|
|
56
|
-
export {
|
|
57
|
-
toolListTest,
|
|
58
|
-
toolGetTest
|
|
59
|
-
};
|
|
2
|
+
import{defineTestSpec as g}from"@contractspec/lib.contracts-spec/tests";var j=g({meta:{key:"test.agent.tool.list",version:"1.0.0",owners:["@agent-console-team"],description:"Test for listing tools",stability:"stable",tags:["test"]},target:{type:"operation",operation:{key:"agent.tool.list",version:"1.0.0"}},scenarios:[{key:"success",when:{operation:{key:"agent.tool.list"}},then:[{type:"expectOutput",match:{}}]},{key:"error",when:{operation:{key:"agent.tool.list"}},then:[{type:"expectError"}]}]}),k=g({meta:{key:"test.agent.tool.get",version:"1.0.0",owners:["@agent-console-team"],description:"Test for getting tool",stability:"stable",tags:["test"]},target:{type:"operation",operation:{key:"agent.tool.get",version:"1.0.0"}},scenarios:[{key:"success",when:{operation:{key:"agent.tool.get"}},then:[{type:"expectOutput",match:{}}]},{key:"error",when:{operation:{key:"agent.tool.get"}},then:[{type:"expectError"}]}]});export{j as toolListTest,k as toolGetTest};
|