@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
package/dist/agent.capability.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
defineCapability,
|
|
5
|
-
StabilityEnum
|
|
6
|
-
} from "@contractspec/lib.contracts-spec";
|
|
7
|
-
var AgentCapability = defineCapability({
|
|
8
|
-
meta: {
|
|
9
|
-
key: "agent",
|
|
10
|
-
version: "1.0.0",
|
|
11
|
-
kind: "ui",
|
|
12
|
-
stability: StabilityEnum.Experimental,
|
|
13
|
-
description: "AI agent management and console capability",
|
|
14
|
-
owners: ["platform.core"],
|
|
15
|
-
tags: ["agent", "ai", "console"]
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
export {
|
|
19
|
-
AgentCapability
|
|
20
|
-
};
|
|
2
|
+
import{defineCapability as g,StabilityEnum as h}from"@contractspec/lib.contracts-spec";var k=g({meta:{key:"agent",version:"1.0.0",kind:"ui",stability:h.Experimental,description:"AI agent management and console capability",owners:["platform.core"],tags:["agent","ai","console"]}});export{k as AgentCapability};
|
package/dist/agent.feature.js
CHANGED
|
@@ -1,306 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
defineVisualization,
|
|
5
|
-
VisualizationRegistry
|
|
6
|
-
} from "@contractspec/lib.contracts-spec/visualizations";
|
|
7
|
-
var RUN_LIST_REF = { key: "agent.run.list", version: "1.0.0" };
|
|
8
|
-
var META = {
|
|
9
|
-
version: "1.0.0",
|
|
10
|
-
domain: "ai-ops",
|
|
11
|
-
stability: "experimental",
|
|
12
|
-
owners: ["@example.agent-console"],
|
|
13
|
-
tags: ["agent-console", "visualization", "operations"]
|
|
14
|
-
};
|
|
15
|
-
var AgentRunStatusVisualization = defineVisualization({
|
|
16
|
-
meta: {
|
|
17
|
-
...META,
|
|
18
|
-
key: "agent-console.visualization.run-status",
|
|
19
|
-
title: "Run Status Breakdown",
|
|
20
|
-
description: "Distribution of run outcomes across the current sample.",
|
|
21
|
-
goal: "Make operational success and failure mix visible at a glance.",
|
|
22
|
-
context: "Agent operations overview."
|
|
23
|
-
},
|
|
24
|
-
source: { primary: RUN_LIST_REF, resultPath: "data" },
|
|
25
|
-
visualization: {
|
|
26
|
-
kind: "pie",
|
|
27
|
-
nameDimension: "status",
|
|
28
|
-
valueMeasure: "runs",
|
|
29
|
-
dimensions: [
|
|
30
|
-
{ key: "status", label: "Status", dataPath: "status", type: "category" }
|
|
31
|
-
],
|
|
32
|
-
measures: [
|
|
33
|
-
{ key: "runs", label: "Runs", dataPath: "runs", format: "number" }
|
|
34
|
-
],
|
|
35
|
-
table: { caption: "Run counts by status." }
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
var AgentRunActivityVisualization = defineVisualization({
|
|
39
|
-
meta: {
|
|
40
|
-
...META,
|
|
41
|
-
key: "agent-console.visualization.run-activity",
|
|
42
|
-
title: "Recent Run Activity",
|
|
43
|
-
description: "Daily run volume across the current sample.",
|
|
44
|
-
goal: "Show whether agent activity is rising or slowing down.",
|
|
45
|
-
context: "Operations trend monitoring."
|
|
46
|
-
},
|
|
47
|
-
source: { primary: RUN_LIST_REF, resultPath: "data" },
|
|
48
|
-
visualization: {
|
|
49
|
-
kind: "cartesian",
|
|
50
|
-
variant: "line",
|
|
51
|
-
xDimension: "day",
|
|
52
|
-
yMeasures: ["runs"],
|
|
53
|
-
dimensions: [{ key: "day", label: "Day", dataPath: "day", type: "time" }],
|
|
54
|
-
measures: [
|
|
55
|
-
{
|
|
56
|
-
key: "runs",
|
|
57
|
-
label: "Runs",
|
|
58
|
-
dataPath: "runs",
|
|
59
|
-
format: "number",
|
|
60
|
-
color: "#0f766e"
|
|
61
|
-
}
|
|
62
|
-
],
|
|
63
|
-
table: { caption: "Daily run counts." }
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
var AgentRunEfficiencyVisualization = defineVisualization({
|
|
67
|
-
meta: {
|
|
68
|
-
...META,
|
|
69
|
-
key: "agent-console.visualization.run-efficiency",
|
|
70
|
-
title: "Duration vs Tokens",
|
|
71
|
-
description: "Scatter chart comparing token consumption and runtime.",
|
|
72
|
-
goal: "Reveal outlier runs that are slow relative to their token usage.",
|
|
73
|
-
context: "Operational performance diagnostics."
|
|
74
|
-
},
|
|
75
|
-
source: { primary: RUN_LIST_REF, resultPath: "data" },
|
|
76
|
-
visualization: {
|
|
77
|
-
kind: "cartesian",
|
|
78
|
-
variant: "scatter",
|
|
79
|
-
xDimension: "totalTokens",
|
|
80
|
-
yMeasures: ["durationMs"],
|
|
81
|
-
dimensions: [
|
|
82
|
-
{
|
|
83
|
-
key: "totalTokens",
|
|
84
|
-
label: "Total Tokens",
|
|
85
|
-
dataPath: "totalTokens",
|
|
86
|
-
type: "number"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
measures: [
|
|
90
|
-
{
|
|
91
|
-
key: "durationMs",
|
|
92
|
-
label: "Duration",
|
|
93
|
-
dataPath: "durationMs",
|
|
94
|
-
format: "duration",
|
|
95
|
-
color: "#7c3aed"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
key: "estimatedCostUsd",
|
|
99
|
-
label: "Cost",
|
|
100
|
-
dataPath: "estimatedCostUsd",
|
|
101
|
-
format: "currency"
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
series: [
|
|
105
|
-
{
|
|
106
|
-
key: "runs",
|
|
107
|
-
label: "Runs",
|
|
108
|
-
measure: "durationMs",
|
|
109
|
-
type: "scatter",
|
|
110
|
-
color: "#7c3aed"
|
|
111
|
-
}
|
|
112
|
-
],
|
|
113
|
-
table: { caption: "Run duration versus token usage." }
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
var AgentVisualizationSpecs = [
|
|
117
|
-
AgentRunStatusVisualization,
|
|
118
|
-
AgentRunActivityVisualization,
|
|
119
|
-
AgentRunEfficiencyVisualization
|
|
120
|
-
];
|
|
121
|
-
var AgentVisualizationRegistry = new VisualizationRegistry([
|
|
122
|
-
...AgentVisualizationSpecs
|
|
123
|
-
]);
|
|
124
|
-
var AgentVisualizationRefs = AgentVisualizationSpecs.map((spec) => ({
|
|
125
|
-
key: spec.meta.key,
|
|
126
|
-
version: spec.meta.version
|
|
127
|
-
}));
|
|
128
|
-
|
|
129
|
-
// src/visualizations/selectors.ts
|
|
130
|
-
function dayKey(value) {
|
|
131
|
-
if (!value)
|
|
132
|
-
return "unknown";
|
|
133
|
-
return value.toISOString().slice(0, 10);
|
|
134
|
-
}
|
|
135
|
-
function createAgentVisualizationItems(runs) {
|
|
136
|
-
const statusCounts = new Map;
|
|
137
|
-
const activityCounts = new Map;
|
|
138
|
-
for (const run of runs) {
|
|
139
|
-
statusCounts.set(run.status, (statusCounts.get(run.status) ?? 0) + 1);
|
|
140
|
-
activityCounts.set(dayKey(run.startedAt ?? run.queuedAt), (activityCounts.get(dayKey(run.startedAt ?? run.queuedAt)) ?? 0) + 1);
|
|
141
|
-
}
|
|
142
|
-
return [
|
|
143
|
-
{
|
|
144
|
-
key: "run-status",
|
|
145
|
-
spec: AgentRunStatusVisualization,
|
|
146
|
-
data: {
|
|
147
|
-
data: Array.from(statusCounts.entries()).map(([status, count]) => ({
|
|
148
|
-
status,
|
|
149
|
-
runs: count
|
|
150
|
-
}))
|
|
151
|
-
},
|
|
152
|
-
title: "Run Status Breakdown",
|
|
153
|
-
description: "Completed, failed, running, and cancelled runs in the sample.",
|
|
154
|
-
height: 260
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
key: "run-activity",
|
|
158
|
-
spec: AgentRunActivityVisualization,
|
|
159
|
-
data: {
|
|
160
|
-
data: Array.from(activityCounts.entries()).sort(([left], [right]) => left.localeCompare(right)).map(([day, count]) => ({ day, runs: count }))
|
|
161
|
-
},
|
|
162
|
-
title: "Recent Run Activity",
|
|
163
|
-
description: "Daily run volume derived from run start times."
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
key: "run-efficiency",
|
|
167
|
-
spec: AgentRunEfficiencyVisualization,
|
|
168
|
-
data: {
|
|
169
|
-
data: runs.filter((run) => typeof run.durationMs === "number").map((run) => ({
|
|
170
|
-
totalTokens: run.totalTokens,
|
|
171
|
-
durationMs: run.durationMs ?? 0,
|
|
172
|
-
estimatedCostUsd: run.estimatedCostUsd
|
|
173
|
-
}))
|
|
174
|
-
},
|
|
175
|
-
title: "Duration vs Tokens",
|
|
176
|
-
description: "Operational scatter plot for spotting inefficient runs."
|
|
177
|
-
}
|
|
178
|
-
];
|
|
179
|
-
}
|
|
180
|
-
// src/agent.feature.ts
|
|
181
|
-
import { defineFeature } from "@contractspec/lib.contracts-spec";
|
|
182
|
-
var AgentConsoleFeature = defineFeature({
|
|
183
|
-
meta: {
|
|
184
|
-
key: "agent-console",
|
|
185
|
-
version: "1.0.0",
|
|
186
|
-
title: "AI Agent Console",
|
|
187
|
-
description: "AI agent orchestration with tools, runs, and logs management",
|
|
188
|
-
domain: "ai-ops",
|
|
189
|
-
owners: ["@agent-console-team"],
|
|
190
|
-
tags: ["ai", "agents", "orchestration"],
|
|
191
|
-
stability: "stable"
|
|
192
|
-
},
|
|
193
|
-
operations: [
|
|
194
|
-
{ key: "agent-console.agent.create", version: "1.0.0" },
|
|
195
|
-
{ key: "agent-console.agent.update", version: "1.0.0" },
|
|
196
|
-
{ key: "agent-console.agent.get", version: "1.0.0" },
|
|
197
|
-
{ key: "agent-console.agent.list", version: "1.0.0" },
|
|
198
|
-
{ key: "agent-console.agent.assignTool", version: "1.0.0" },
|
|
199
|
-
{ key: "agent-console.agent.removeTool", version: "1.0.0" },
|
|
200
|
-
{ key: "agent.tool.create", version: "1.0.0" },
|
|
201
|
-
{ key: "agent.tool.update", version: "1.0.0" },
|
|
202
|
-
{ key: "agent.tool.get", version: "1.0.0" },
|
|
203
|
-
{ key: "agent.tool.list", version: "1.0.0" },
|
|
204
|
-
{ key: "agent.tool.test", version: "1.0.0" },
|
|
205
|
-
{ key: "agent.run.execute", version: "1.0.0" },
|
|
206
|
-
{ key: "agent.run.cancel", version: "1.0.0" },
|
|
207
|
-
{ key: "agent.run.get", version: "1.0.0" },
|
|
208
|
-
{ key: "agent.run.list", version: "1.0.0" },
|
|
209
|
-
{ key: "agent.run.getSteps", version: "1.0.0" },
|
|
210
|
-
{ key: "agent.run.getLogs", version: "1.0.0" },
|
|
211
|
-
{ key: "agent.run.getMetrics", version: "1.0.0" }
|
|
212
|
-
],
|
|
213
|
-
events: [
|
|
214
|
-
{ key: "agent-console.agent.created", version: "1.0.0" },
|
|
215
|
-
{ key: "agent-console.agent.updated", version: "1.0.0" },
|
|
216
|
-
{ key: "agent-console.agent.toolAssigned", version: "1.0.0" },
|
|
217
|
-
{ key: "agent-console.agent.toolRemoved", version: "1.0.0" },
|
|
218
|
-
{ key: "agent.tool.created", version: "1.0.0" },
|
|
219
|
-
{ key: "agent.tool.updated", version: "1.0.0" },
|
|
220
|
-
{ key: "agent.tool.statusChanged", version: "1.0.0" },
|
|
221
|
-
{ key: "agent.run.started", version: "1.0.0" },
|
|
222
|
-
{ key: "agent.run.completed", version: "1.0.0" },
|
|
223
|
-
{ key: "agent.run.failed", version: "1.0.0" },
|
|
224
|
-
{ key: "agent.run.cancelled", version: "1.0.0" },
|
|
225
|
-
{ key: "agent.run.toolInvoked", version: "1.0.0" },
|
|
226
|
-
{ key: "agent.run.toolCompleted", version: "1.0.0" },
|
|
227
|
-
{ key: "agent.run.messageGenerated", version: "1.0.0" }
|
|
228
|
-
],
|
|
229
|
-
presentations: [
|
|
230
|
-
{ key: "agent-console.dashboard", version: "1.0.0" },
|
|
231
|
-
{ key: "agent-console.agent.viewList", version: "1.0.0" },
|
|
232
|
-
{ key: "agent-console.agent.detail", version: "1.0.0" },
|
|
233
|
-
{ key: "agent-console.run.list", version: "1.0.0" },
|
|
234
|
-
{ key: "agent-console.run.detail", version: "1.0.0" },
|
|
235
|
-
{ key: "agent-console.tool.list", version: "1.0.0" },
|
|
236
|
-
{ key: "agent-console.tool.detail", version: "1.0.0" }
|
|
237
|
-
],
|
|
238
|
-
opToPresentation: [
|
|
239
|
-
{
|
|
240
|
-
op: { key: "agent-console.agent.list", version: "1.0.0" },
|
|
241
|
-
pres: { key: "agent-console.agent.viewList", version: "1.0.0" }
|
|
242
|
-
},
|
|
243
|
-
{
|
|
244
|
-
op: { key: "agent-console.agent.get", version: "1.0.0" },
|
|
245
|
-
pres: { key: "agent-console.agent.detail", version: "1.0.0" }
|
|
246
|
-
},
|
|
247
|
-
{
|
|
248
|
-
op: { key: "agent.run.list", version: "1.0.0" },
|
|
249
|
-
pres: { key: "agent-console.run.list", version: "1.0.0" }
|
|
250
|
-
},
|
|
251
|
-
{
|
|
252
|
-
op: { key: "agent.run.get", version: "1.0.0" },
|
|
253
|
-
pres: { key: "agent-console.run.detail", version: "1.0.0" }
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
op: { key: "agent.tool.list", version: "1.0.0" },
|
|
257
|
-
pres: { key: "agent-console.tool.list", version: "1.0.0" }
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
op: { key: "agent.tool.get", version: "1.0.0" },
|
|
261
|
-
pres: { key: "agent-console.tool.detail", version: "1.0.0" }
|
|
262
|
-
}
|
|
263
|
-
],
|
|
264
|
-
presentationsTargets: [
|
|
265
|
-
{
|
|
266
|
-
key: "agent-console.dashboard",
|
|
267
|
-
version: "1.0.0",
|
|
268
|
-
targets: ["react", "markdown"]
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
key: "agent-console.agent.viewList",
|
|
272
|
-
version: "1.0.0",
|
|
273
|
-
targets: ["react", "markdown", "application/json"]
|
|
274
|
-
},
|
|
275
|
-
{
|
|
276
|
-
key: "agent-console.run.list",
|
|
277
|
-
version: "1.0.0",
|
|
278
|
-
targets: ["react", "markdown", "application/json"]
|
|
279
|
-
},
|
|
280
|
-
{
|
|
281
|
-
key: "agent-console.tool.list",
|
|
282
|
-
version: "1.0.0",
|
|
283
|
-
targets: ["react", "markdown", "application/json"]
|
|
284
|
-
}
|
|
285
|
-
],
|
|
286
|
-
visualizations: AgentVisualizationRefs,
|
|
287
|
-
capabilities: {
|
|
288
|
-
requires: [
|
|
289
|
-
{ key: "identity", version: "1.0.0" },
|
|
290
|
-
{ key: "audit-trail", version: "1.0.0" },
|
|
291
|
-
{ key: "jobs", version: "1.0.0" }
|
|
292
|
-
],
|
|
293
|
-
provides: [{ key: "agent", version: "1.0.0" }]
|
|
294
|
-
},
|
|
295
|
-
telemetry: [{ key: "agent-console.telemetry", version: "1.0.0" }],
|
|
296
|
-
jobs: [{ key: "agent-console.job.run-execution", version: "1.0.0" }],
|
|
297
|
-
docs: [
|
|
298
|
-
"docs.examples.agent-console.goal",
|
|
299
|
-
"docs.examples.agent-console.usage",
|
|
300
|
-
"docs.examples.agent-console.reference",
|
|
301
|
-
"docs.examples.agent-console.constraints"
|
|
302
|
-
]
|
|
303
|
-
});
|
|
304
|
-
export {
|
|
305
|
-
AgentConsoleFeature
|
|
306
|
-
};
|
|
2
|
+
import{defineVisualization as s,VisualizationRegistry as c}from"@contractspec/lib.contracts-spec/visualizations";var a={key:"agent.run.list",version:"1.0.0"},u={version:"1.0.0",domain:"ai-ops",stability:"experimental",owners:["@example.agent-console"],tags:["agent-console","visualization","operations"]},i=s({meta:{...u,key:"agent-console.visualization.run-status",title:"Run Status Breakdown",description:"Distribution of run outcomes across the current sample.",goal:"Make operational success and failure mix visible at a glance.",context:"Agent operations overview."},source:{primary:a,resultPath:"data"},visualization:{kind:"pie",nameDimension:"status",valueMeasure:"runs",dimensions:[{key:"status",label:"Status",dataPath:"status",type:"category"}],measures:[{key:"runs",label:"Runs",dataPath:"runs",format:"number"}],table:{caption:"Run counts by status."}}}),m=s({meta:{...u,key:"agent-console.visualization.run-activity",title:"Recent Run Activity",description:"Daily run volume across the current sample.",goal:"Show whether agent activity is rising or slowing down.",context:"Operations trend monitoring."},source:{primary:a,resultPath:"data"},visualization:{kind:"cartesian",variant:"line",xDimension:"day",yMeasures:["runs"],dimensions:[{key:"day",label:"Day",dataPath:"day",type:"time"}],measures:[{key:"runs",label:"Runs",dataPath:"runs",format:"number",color:"#0f766e"}],table:{caption:"Daily run counts."}}}),d=s({meta:{...u,key:"agent-console.visualization.run-efficiency",title:"Duration vs Tokens",description:"Scatter chart comparing token consumption and runtime.",goal:"Reveal outlier runs that are slow relative to their token usage.",context:"Operational performance diagnostics."},source:{primary:a,resultPath:"data"},visualization:{kind:"cartesian",variant:"scatter",xDimension:"totalTokens",yMeasures:["durationMs"],dimensions:[{key:"totalTokens",label:"Total Tokens",dataPath:"totalTokens",type:"number"}],measures:[{key:"durationMs",label:"Duration",dataPath:"durationMs",format:"duration",color:"#7c3aed"},{key:"estimatedCostUsd",label:"Cost",dataPath:"estimatedCostUsd",format:"currency"}],series:[{key:"runs",label:"Runs",measure:"durationMs",type:"scatter",color:"#7c3aed"}],table:{caption:"Run duration versus token usage."}}}),f=[i,m,d],g=new c([...f]),p=f.map((e)=>({key:e.meta.key,version:e.meta.version}));function y(e){if(!e)return"unknown";return e.toISOString().slice(0,10)}function w(e){let n=new Map,o=new Map;for(let t of e)n.set(t.status,(n.get(t.status)??0)+1),o.set(y(t.startedAt??t.queuedAt),(o.get(y(t.startedAt??t.queuedAt))??0)+1);return[{key:"run-status",spec:i,data:{data:Array.from(n.entries()).map(([t,r])=>({status:t,runs:r}))},title:"Run Status Breakdown",description:"Completed, failed, running, and cancelled runs in the sample.",height:260},{key:"run-activity",spec:m,data:{data:Array.from(o.entries()).sort(([t],[r])=>t.localeCompare(r)).map(([t,r])=>({day:t,runs:r}))},title:"Recent Run Activity",description:"Daily run volume derived from run start times."},{key:"run-efficiency",spec:d,data:{data:e.filter((t)=>typeof t.durationMs==="number").map((t)=>({totalTokens:t.totalTokens,durationMs:t.durationMs??0,estimatedCostUsd:t.estimatedCostUsd}))},title:"Duration vs Tokens",description:"Operational scatter plot for spotting inefficient runs."}]}import{defineFeature as l}from"@contractspec/lib.contracts-spec";var M=l({meta:{key:"agent-console",version:"1.0.0",title:"AI Agent Console",description:"AI agent orchestration with tools, runs, and logs management",domain:"ai-ops",owners:["@agent-console-team"],tags:["ai","agents","orchestration"],stability:"stable"},operations:[{key:"agent-console.agent.create",version:"1.0.0"},{key:"agent-console.agent.update",version:"1.0.0"},{key:"agent-console.agent.get",version:"1.0.0"},{key:"agent-console.agent.list",version:"1.0.0"},{key:"agent-console.agent.assignTool",version:"1.0.0"},{key:"agent-console.agent.removeTool",version:"1.0.0"},{key:"agent.tool.create",version:"1.0.0"},{key:"agent.tool.update",version:"1.0.0"},{key:"agent.tool.get",version:"1.0.0"},{key:"agent.tool.list",version:"1.0.0"},{key:"agent.tool.test",version:"1.0.0"},{key:"agent.run.execute",version:"1.0.0"},{key:"agent.run.cancel",version:"1.0.0"},{key:"agent.run.get",version:"1.0.0"},{key:"agent.run.list",version:"1.0.0"},{key:"agent.run.getSteps",version:"1.0.0"},{key:"agent.run.getLogs",version:"1.0.0"},{key:"agent.run.getMetrics",version:"1.0.0"}],events:[{key:"agent-console.agent.created",version:"1.0.0"},{key:"agent-console.agent.updated",version:"1.0.0"},{key:"agent-console.agent.toolAssigned",version:"1.0.0"},{key:"agent-console.agent.toolRemoved",version:"1.0.0"},{key:"agent.tool.created",version:"1.0.0"},{key:"agent.tool.updated",version:"1.0.0"},{key:"agent.tool.statusChanged",version:"1.0.0"},{key:"agent.run.started",version:"1.0.0"},{key:"agent.run.completed",version:"1.0.0"},{key:"agent.run.failed",version:"1.0.0"},{key:"agent.run.cancelled",version:"1.0.0"},{key:"agent.run.toolInvoked",version:"1.0.0"},{key:"agent.run.toolCompleted",version:"1.0.0"},{key:"agent.run.messageGenerated",version:"1.0.0"}],presentations:[{key:"agent-console.dashboard",version:"1.0.0"},{key:"agent-console.agent.viewList",version:"1.0.0"},{key:"agent-console.agent.detail",version:"1.0.0"},{key:"agent-console.run.list",version:"1.0.0"},{key:"agent-console.run.detail",version:"1.0.0"},{key:"agent-console.tool.list",version:"1.0.0"},{key:"agent-console.tool.detail",version:"1.0.0"}],opToPresentation:[{op:{key:"agent-console.agent.list",version:"1.0.0"},pres:{key:"agent-console.agent.viewList",version:"1.0.0"}},{op:{key:"agent-console.agent.get",version:"1.0.0"},pres:{key:"agent-console.agent.detail",version:"1.0.0"}},{op:{key:"agent.run.list",version:"1.0.0"},pres:{key:"agent-console.run.list",version:"1.0.0"}},{op:{key:"agent.run.get",version:"1.0.0"},pres:{key:"agent-console.run.detail",version:"1.0.0"}},{op:{key:"agent.tool.list",version:"1.0.0"},pres:{key:"agent-console.tool.list",version:"1.0.0"}},{op:{key:"agent.tool.get",version:"1.0.0"},pres:{key:"agent-console.tool.detail",version:"1.0.0"}}],presentationsTargets:[{key:"agent-console.dashboard",version:"1.0.0",targets:["react","markdown"]},{key:"agent-console.agent.viewList",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"agent-console.run.list",version:"1.0.0",targets:["react","markdown","application/json"]},{key:"agent-console.tool.list",version:"1.0.0",targets:["react","markdown","application/json"]}],visualizations:p,capabilities:{requires:[{key:"identity",version:"1.0.0"},{key:"audit-trail",version:"1.0.0"},{key:"jobs",version:"1.0.0"}],provides:[{key:"agent",version:"1.0.0"}]},telemetry:[{key:"agent-console.telemetry",version:"1.0.0"}],jobs:[{key:"agent-console.job.run-execution",version:"1.0.0"}],docs:["docs.examples.agent-console.goal","docs.examples.agent-console.usage","docs.examples.agent-console.reference","docs.examples.agent-console.constraints"]});export{M as AgentConsoleFeature};
|
|
@@ -1,127 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
defineEntity,
|
|
4
|
-
defineEntityEnum,
|
|
5
|
-
field,
|
|
6
|
-
index
|
|
7
|
-
} from "@contractspec/lib.schema";
|
|
8
|
-
var AgentStatusEntityEnum = defineEntityEnum({
|
|
9
|
-
name: "AgentStatus",
|
|
10
|
-
values: ["DRAFT", "ACTIVE", "PAUSED", "ARCHIVED"],
|
|
11
|
-
description: "Lifecycle status of the agent"
|
|
12
|
-
});
|
|
13
|
-
var ModelProviderEntityEnum = defineEntityEnum({
|
|
14
|
-
name: "ModelProvider",
|
|
15
|
-
values: ["OPENAI", "ANTHROPIC", "GOOGLE", "MISTRAL", "CUSTOM"],
|
|
16
|
-
description: "AI model provider"
|
|
17
|
-
});
|
|
18
|
-
var AgentEntity = defineEntity({
|
|
19
|
-
name: "Agent",
|
|
20
|
-
schema: "agent_console",
|
|
21
|
-
description: "Represents an AI agent configuration with assigned tools and parameters.",
|
|
22
|
-
fields: {
|
|
23
|
-
id: field.id(),
|
|
24
|
-
organizationId: field.string({
|
|
25
|
-
description: "Organization that owns this agent"
|
|
26
|
-
}),
|
|
27
|
-
name: field.string({ description: "Agent name (1-100 chars)" }),
|
|
28
|
-
slug: field.string({
|
|
29
|
-
description: "URL-safe identifier (lowercase, numbers, hyphens)"
|
|
30
|
-
}),
|
|
31
|
-
description: field.string({
|
|
32
|
-
isOptional: true,
|
|
33
|
-
description: "Agent description (max 1000 chars)"
|
|
34
|
-
}),
|
|
35
|
-
status: field.enum("AgentStatus", { default: "DRAFT" }),
|
|
36
|
-
modelProvider: field.enum("ModelProvider", { default: "OPENAI" }),
|
|
37
|
-
modelName: field.string({
|
|
38
|
-
description: "Model identifier: 'gpt-4', 'claude-3-opus', etc."
|
|
39
|
-
}),
|
|
40
|
-
modelConfig: field.json({
|
|
41
|
-
isOptional: true,
|
|
42
|
-
description: "Model parameters: temperature, max_tokens, etc."
|
|
43
|
-
}),
|
|
44
|
-
systemPrompt: field.string({ description: "System prompt for the agent" }),
|
|
45
|
-
userPromptTemplate: field.string({
|
|
46
|
-
isOptional: true,
|
|
47
|
-
description: "Template for user prompts"
|
|
48
|
-
}),
|
|
49
|
-
toolIds: field.string({
|
|
50
|
-
isArray: true,
|
|
51
|
-
isOptional: true,
|
|
52
|
-
description: "IDs of assigned tools"
|
|
53
|
-
}),
|
|
54
|
-
toolChoice: field.string({
|
|
55
|
-
default: "auto",
|
|
56
|
-
description: "Tool selection mode: 'auto', 'required', 'none'"
|
|
57
|
-
}),
|
|
58
|
-
maxIterations: field.int({
|
|
59
|
-
default: 10,
|
|
60
|
-
description: "Maximum iterations per run"
|
|
61
|
-
}),
|
|
62
|
-
maxTokensPerRun: field.int({
|
|
63
|
-
isOptional: true,
|
|
64
|
-
description: "Maximum tokens per run"
|
|
65
|
-
}),
|
|
66
|
-
timeoutMs: field.int({
|
|
67
|
-
default: 120000,
|
|
68
|
-
description: "Execution timeout in milliseconds"
|
|
69
|
-
}),
|
|
70
|
-
version: field.string({ default: "1.0.0", description: "Agent version" }),
|
|
71
|
-
tags: field.string({
|
|
72
|
-
isArray: true,
|
|
73
|
-
isOptional: true,
|
|
74
|
-
description: "Tags for categorization"
|
|
75
|
-
}),
|
|
76
|
-
createdAt: field.createdAt(),
|
|
77
|
-
updatedAt: field.updatedAt(),
|
|
78
|
-
createdById: field.string({
|
|
79
|
-
isOptional: true,
|
|
80
|
-
description: "User who created this agent"
|
|
81
|
-
}),
|
|
82
|
-
tools: field.hasMany("Tool", {
|
|
83
|
-
description: "Tools assigned to this agent"
|
|
84
|
-
})
|
|
85
|
-
},
|
|
86
|
-
indexes: [
|
|
87
|
-
index.unique(["organizationId", "slug"]),
|
|
88
|
-
index.on(["organizationId", "status"]),
|
|
89
|
-
index.on(["modelProvider", "modelName"])
|
|
90
|
-
],
|
|
91
|
-
enums: [AgentStatusEntityEnum, ModelProviderEntityEnum]
|
|
92
|
-
});
|
|
93
|
-
var AgentToolEntity = defineEntity({
|
|
94
|
-
name: "AgentTool",
|
|
95
|
-
schema: "agent_console",
|
|
96
|
-
description: "Links an agent to its assigned tools with configuration.",
|
|
97
|
-
fields: {
|
|
98
|
-
id: field.id(),
|
|
99
|
-
agentId: field.foreignKey({ description: "Agent ID" }),
|
|
100
|
-
toolId: field.foreignKey({ description: "Tool ID" }),
|
|
101
|
-
config: field.json({
|
|
102
|
-
isOptional: true,
|
|
103
|
-
description: "Tool-specific configuration for this agent"
|
|
104
|
-
}),
|
|
105
|
-
order: field.int({
|
|
106
|
-
default: 0,
|
|
107
|
-
description: "Order of tool in agent tool list"
|
|
108
|
-
}),
|
|
109
|
-
isEnabled: field.boolean({
|
|
110
|
-
default: true,
|
|
111
|
-
description: "Whether tool is enabled for this agent"
|
|
112
|
-
}),
|
|
113
|
-
createdAt: field.createdAt(),
|
|
114
|
-
agent: field.belongsTo("Agent", ["agentId"], ["id"]),
|
|
115
|
-
tool: field.belongsTo("Tool", ["toolId"], ["id"])
|
|
116
|
-
},
|
|
117
|
-
indexes: [
|
|
118
|
-
index.unique(["agentId", "toolId"]),
|
|
119
|
-
index.on(["agentId", "order"])
|
|
120
|
-
]
|
|
121
|
-
});
|
|
122
|
-
export {
|
|
123
|
-
ModelProviderEntityEnum,
|
|
124
|
-
AgentToolEntity,
|
|
125
|
-
AgentStatusEntityEnum,
|
|
126
|
-
AgentEntity
|
|
127
|
-
};
|
|
1
|
+
import{defineEntity as z,defineEntityEnum as B,field as q,index as w}from"@contractspec/lib.schema";var C=B({name:"AgentStatus",values:["DRAFT","ACTIVE","PAUSED","ARCHIVED"],description:"Lifecycle status of the agent"}),D=B({name:"ModelProvider",values:["OPENAI","ANTHROPIC","GOOGLE","MISTRAL","CUSTOM"],description:"AI model provider"}),G=z({name:"Agent",schema:"agent_console",description:"Represents an AI agent configuration with assigned tools and parameters.",fields:{id:q.id(),organizationId:q.string({description:"Organization that owns this agent"}),name:q.string({description:"Agent name (1-100 chars)"}),slug:q.string({description:"URL-safe identifier (lowercase, numbers, hyphens)"}),description:q.string({isOptional:!0,description:"Agent description (max 1000 chars)"}),status:q.enum("AgentStatus",{default:"DRAFT"}),modelProvider:q.enum("ModelProvider",{default:"OPENAI"}),modelName:q.string({description:"Model identifier: 'gpt-4', 'claude-3-opus', etc."}),modelConfig:q.json({isOptional:!0,description:"Model parameters: temperature, max_tokens, etc."}),systemPrompt:q.string({description:"System prompt for the agent"}),userPromptTemplate:q.string({isOptional:!0,description:"Template for user prompts"}),toolIds:q.string({isArray:!0,isOptional:!0,description:"IDs of assigned tools"}),toolChoice:q.string({default:"auto",description:"Tool selection mode: 'auto', 'required', 'none'"}),maxIterations:q.int({default:10,description:"Maximum iterations per run"}),maxTokensPerRun:q.int({isOptional:!0,description:"Maximum tokens per run"}),timeoutMs:q.int({default:120000,description:"Execution timeout in milliseconds"}),version:q.string({default:"1.0.0",description:"Agent version"}),tags:q.string({isArray:!0,isOptional:!0,description:"Tags for categorization"}),createdAt:q.createdAt(),updatedAt:q.updatedAt(),createdById:q.string({isOptional:!0,description:"User who created this agent"}),tools:q.hasMany("Tool",{description:"Tools assigned to this agent"})},indexes:[w.unique(["organizationId","slug"]),w.on(["organizationId","status"]),w.on(["modelProvider","modelName"])],enums:[C,D]}),H=z({name:"AgentTool",schema:"agent_console",description:"Links an agent to its assigned tools with configuration.",fields:{id:q.id(),agentId:q.foreignKey({description:"Agent ID"}),toolId:q.foreignKey({description:"Tool ID"}),config:q.json({isOptional:!0,description:"Tool-specific configuration for this agent"}),order:q.int({default:0,description:"Order of tool in agent tool list"}),isEnabled:q.boolean({default:!0,description:"Whether tool is enabled for this agent"}),createdAt:q.createdAt(),agent:q.belongsTo("Agent",["agentId"],["id"]),tool:q.belongsTo("Tool",["toolId"],["id"])},indexes:[w.unique(["agentId","toolId"]),w.on(["agentId","order"])]});export{D as ModelProviderEntityEnum,H as AgentToolEntity,C as AgentStatusEntityEnum,G as AgentEntity};
|
|
@@ -1,25 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineEnum } from "@contractspec/lib.schema";
|
|
3
|
-
var AgentStatusEnum = defineEnum("AgentStatus", [
|
|
4
|
-
"DRAFT",
|
|
5
|
-
"ACTIVE",
|
|
6
|
-
"PAUSED",
|
|
7
|
-
"ARCHIVED"
|
|
8
|
-
]);
|
|
9
|
-
var ModelProviderEnum = defineEnum("ModelProvider", [
|
|
10
|
-
"OPENAI",
|
|
11
|
-
"ANTHROPIC",
|
|
12
|
-
"GOOGLE",
|
|
13
|
-
"MISTRAL",
|
|
14
|
-
"CUSTOM"
|
|
15
|
-
]);
|
|
16
|
-
var ToolChoiceEnum = defineEnum("ToolChoice", [
|
|
17
|
-
"auto",
|
|
18
|
-
"required",
|
|
19
|
-
"none"
|
|
20
|
-
]);
|
|
21
|
-
export {
|
|
22
|
-
ToolChoiceEnum,
|
|
23
|
-
ModelProviderEnum,
|
|
24
|
-
AgentStatusEnum
|
|
25
|
-
};
|
|
1
|
+
import{defineEnum as g}from"@contractspec/lib.schema";var k=g("AgentStatus",["DRAFT","ACTIVE","PAUSED","ARCHIVED"]),q=g("ModelProvider",["OPENAI","ANTHROPIC","GOOGLE","MISTRAL","CUSTOM"]),v=g("ToolChoice",["auto","required","none"]);export{v as ToolChoiceEnum,q as ModelProviderEnum,k as AgentStatusEnum};
|
|
@@ -1,116 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineEvent } from "@contractspec/lib.contracts-spec";
|
|
3
|
-
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
-
var OWNERS = ["@agent-console-team"];
|
|
5
|
-
var AgentCreatedPayload = defineSchemaModel({
|
|
6
|
-
name: "AgentCreatedPayload",
|
|
7
|
-
description: "Payload for agent created event",
|
|
8
|
-
fields: {
|
|
9
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
-
organizationId: {
|
|
11
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
12
|
-
isOptional: false
|
|
13
|
-
},
|
|
14
|
-
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
15
|
-
slug: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
16
|
-
modelProvider: {
|
|
17
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
18
|
-
isOptional: false
|
|
19
|
-
},
|
|
20
|
-
modelName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
-
toolCount: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
|
|
22
|
-
createdById: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
23
|
-
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
var AgentCreatedEvent = defineEvent({
|
|
27
|
-
meta: {
|
|
28
|
-
key: "agent-console.agent.created",
|
|
29
|
-
version: "1.0.0",
|
|
30
|
-
description: "A new AI agent was configured.",
|
|
31
|
-
stability: "stable",
|
|
32
|
-
owners: [...OWNERS],
|
|
33
|
-
tags: ["agent", "created"]
|
|
34
|
-
},
|
|
35
|
-
payload: AgentCreatedPayload
|
|
36
|
-
});
|
|
37
|
-
var AgentUpdatedPayload = defineSchemaModel({
|
|
38
|
-
name: "AgentUpdatedPayload",
|
|
39
|
-
description: "Payload for agent updated event",
|
|
40
|
-
fields: {
|
|
41
|
-
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
42
|
-
organizationId: {
|
|
43
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
44
|
-
isOptional: false
|
|
45
|
-
},
|
|
46
|
-
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
-
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
48
|
-
updatedFields: {
|
|
49
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
-
isArray: true,
|
|
51
|
-
isOptional: false
|
|
52
|
-
},
|
|
53
|
-
updatedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
var AgentUpdatedEvent = defineEvent({
|
|
57
|
-
meta: {
|
|
58
|
-
key: "agent-console.agent.updated",
|
|
59
|
-
version: "1.0.0",
|
|
60
|
-
description: "An AI agent configuration was updated.",
|
|
61
|
-
stability: "stable",
|
|
62
|
-
owners: [...OWNERS],
|
|
63
|
-
tags: ["agent", "updated"]
|
|
64
|
-
},
|
|
65
|
-
payload: AgentUpdatedPayload
|
|
66
|
-
});
|
|
67
|
-
var AgentToolAssignedPayload = defineSchemaModel({
|
|
68
|
-
name: "AgentToolAssignedPayload",
|
|
69
|
-
description: "Payload for agent tool assigned event",
|
|
70
|
-
fields: {
|
|
71
|
-
agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
72
|
-
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
73
|
-
agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
74
|
-
toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
75
|
-
assignedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
var AgentToolAssignedEvent = defineEvent({
|
|
79
|
-
meta: {
|
|
80
|
-
key: "agent-console.agent.toolAssigned",
|
|
81
|
-
version: "1.0.0",
|
|
82
|
-
description: "A tool was assigned to an agent.",
|
|
83
|
-
stability: "stable",
|
|
84
|
-
owners: [...OWNERS],
|
|
85
|
-
tags: ["agent", "tool", "assigned"]
|
|
86
|
-
},
|
|
87
|
-
payload: AgentToolAssignedPayload
|
|
88
|
-
});
|
|
89
|
-
var AgentToolRemovedPayload = defineSchemaModel({
|
|
90
|
-
name: "AgentToolRemovedPayload",
|
|
91
|
-
description: "Payload for agent tool removed event",
|
|
92
|
-
fields: {
|
|
93
|
-
agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
94
|
-
toolId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
95
|
-
agentName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
96
|
-
toolName: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
97
|
-
removedAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
var AgentToolRemovedEvent = defineEvent({
|
|
101
|
-
meta: {
|
|
102
|
-
key: "agent-console.agent.toolRemoved",
|
|
103
|
-
version: "1.0.0",
|
|
104
|
-
description: "A tool was removed from an agent.",
|
|
105
|
-
stability: "stable",
|
|
106
|
-
owners: [...OWNERS],
|
|
107
|
-
tags: ["agent", "tool", "removed"]
|
|
108
|
-
},
|
|
109
|
-
payload: AgentToolRemovedPayload
|
|
110
|
-
});
|
|
111
|
-
export {
|
|
112
|
-
AgentUpdatedEvent,
|
|
113
|
-
AgentToolRemovedEvent,
|
|
114
|
-
AgentToolAssignedEvent,
|
|
115
|
-
AgentCreatedEvent
|
|
116
|
-
};
|
|
1
|
+
import{defineEvent as k}from"@contractspec/lib.contracts-spec";import{defineSchemaModel as q,ScalarTypeEnum as j}from"@contractspec/lib.schema";var w=["@agent-console-team"],x=q({name:"AgentCreatedPayload",description:"Payload for agent created event",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.String_unsecure(),isOptional:!1},slug:{type:j.String_unsecure(),isOptional:!1},modelProvider:{type:j.String_unsecure(),isOptional:!1},modelName:{type:j.String_unsecure(),isOptional:!1},toolCount:{type:j.Int_unsecure(),isOptional:!1},createdById:{type:j.String_unsecure(),isOptional:!0},createdAt:{type:j.DateTime(),isOptional:!1}}}),H=k({meta:{key:"agent-console.agent.created",version:"1.0.0",description:"A new AI agent was configured.",stability:"stable",owners:[...w],tags:["agent","created"]},payload:x}),z=q({name:"AgentUpdatedPayload",description:"Payload for agent updated event",fields:{id:{type:j.String_unsecure(),isOptional:!1},organizationId:{type:j.String_unsecure(),isOptional:!1},name:{type:j.String_unsecure(),isOptional:!1},status:{type:j.String_unsecure(),isOptional:!1},updatedFields:{type:j.String_unsecure(),isArray:!0,isOptional:!1},updatedAt:{type:j.DateTime(),isOptional:!1}}}),I=k({meta:{key:"agent-console.agent.updated",version:"1.0.0",description:"An AI agent configuration was updated.",stability:"stable",owners:[...w],tags:["agent","updated"]},payload:z}),B=q({name:"AgentToolAssignedPayload",description:"Payload for agent tool assigned event",fields:{agentId:{type:j.String_unsecure(),isOptional:!1},toolId:{type:j.String_unsecure(),isOptional:!1},agentName:{type:j.String_unsecure(),isOptional:!1},toolName:{type:j.String_unsecure(),isOptional:!1},assignedAt:{type:j.DateTime(),isOptional:!1}}}),J=k({meta:{key:"agent-console.agent.toolAssigned",version:"1.0.0",description:"A tool was assigned to an agent.",stability:"stable",owners:[...w],tags:["agent","tool","assigned"]},payload:B}),D=q({name:"AgentToolRemovedPayload",description:"Payload for agent tool removed event",fields:{agentId:{type:j.String_unsecure(),isOptional:!1},toolId:{type:j.String_unsecure(),isOptional:!1},agentName:{type:j.String_unsecure(),isOptional:!1},toolName:{type:j.String_unsecure(),isOptional:!1},removedAt:{type:j.DateTime(),isOptional:!1}}}),K=k({meta:{key:"agent-console.agent.toolRemoved",version:"1.0.0",description:"A tool was removed from an agent.",stability:"stable",owners:[...w],tags:["agent","tool","removed"]},payload:D});export{I as AgentUpdatedEvent,K as AgentToolRemovedEvent,J as AgentToolAssignedEvent,H as AgentCreatedEvent};
|