@contractspec/example.agent-console 3.8.9 → 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 +18 -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 +26 -10
- package/src/ui/ExecutionConsoleHost.test.tsx +110 -0
- package/src/ui/ExecutionConsoleHost.tsx +14 -0
- package/src/ui/index.ts +1 -1
|
@@ -1,19 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
defineCapability,
|
|
4
|
-
StabilityEnum
|
|
5
|
-
} from "@contractspec/lib.contracts-spec";
|
|
6
|
-
var AgentCapability = defineCapability({
|
|
7
|
-
meta: {
|
|
8
|
-
key: "agent",
|
|
9
|
-
version: "1.0.0",
|
|
10
|
-
kind: "ui",
|
|
11
|
-
stability: StabilityEnum.Experimental,
|
|
12
|
-
description: "AI agent management and console capability",
|
|
13
|
-
owners: ["platform.core"],
|
|
14
|
-
tags: ["agent", "ai", "console"]
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
export {
|
|
18
|
-
AgentCapability
|
|
19
|
-
};
|
|
1
|
+
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};
|
|
@@ -1,305 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
defineVisualization,
|
|
4
|
-
VisualizationRegistry
|
|
5
|
-
} from "@contractspec/lib.contracts-spec/visualizations";
|
|
6
|
-
var RUN_LIST_REF = { key: "agent.run.list", version: "1.0.0" };
|
|
7
|
-
var META = {
|
|
8
|
-
version: "1.0.0",
|
|
9
|
-
domain: "ai-ops",
|
|
10
|
-
stability: "experimental",
|
|
11
|
-
owners: ["@example.agent-console"],
|
|
12
|
-
tags: ["agent-console", "visualization", "operations"]
|
|
13
|
-
};
|
|
14
|
-
var AgentRunStatusVisualization = defineVisualization({
|
|
15
|
-
meta: {
|
|
16
|
-
...META,
|
|
17
|
-
key: "agent-console.visualization.run-status",
|
|
18
|
-
title: "Run Status Breakdown",
|
|
19
|
-
description: "Distribution of run outcomes across the current sample.",
|
|
20
|
-
goal: "Make operational success and failure mix visible at a glance.",
|
|
21
|
-
context: "Agent operations overview."
|
|
22
|
-
},
|
|
23
|
-
source: { primary: RUN_LIST_REF, resultPath: "data" },
|
|
24
|
-
visualization: {
|
|
25
|
-
kind: "pie",
|
|
26
|
-
nameDimension: "status",
|
|
27
|
-
valueMeasure: "runs",
|
|
28
|
-
dimensions: [
|
|
29
|
-
{ key: "status", label: "Status", dataPath: "status", type: "category" }
|
|
30
|
-
],
|
|
31
|
-
measures: [
|
|
32
|
-
{ key: "runs", label: "Runs", dataPath: "runs", format: "number" }
|
|
33
|
-
],
|
|
34
|
-
table: { caption: "Run counts by status." }
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
var AgentRunActivityVisualization = defineVisualization({
|
|
38
|
-
meta: {
|
|
39
|
-
...META,
|
|
40
|
-
key: "agent-console.visualization.run-activity",
|
|
41
|
-
title: "Recent Run Activity",
|
|
42
|
-
description: "Daily run volume across the current sample.",
|
|
43
|
-
goal: "Show whether agent activity is rising or slowing down.",
|
|
44
|
-
context: "Operations trend monitoring."
|
|
45
|
-
},
|
|
46
|
-
source: { primary: RUN_LIST_REF, resultPath: "data" },
|
|
47
|
-
visualization: {
|
|
48
|
-
kind: "cartesian",
|
|
49
|
-
variant: "line",
|
|
50
|
-
xDimension: "day",
|
|
51
|
-
yMeasures: ["runs"],
|
|
52
|
-
dimensions: [{ key: "day", label: "Day", dataPath: "day", type: "time" }],
|
|
53
|
-
measures: [
|
|
54
|
-
{
|
|
55
|
-
key: "runs",
|
|
56
|
-
label: "Runs",
|
|
57
|
-
dataPath: "runs",
|
|
58
|
-
format: "number",
|
|
59
|
-
color: "#0f766e"
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
table: { caption: "Daily run counts." }
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
var AgentRunEfficiencyVisualization = defineVisualization({
|
|
66
|
-
meta: {
|
|
67
|
-
...META,
|
|
68
|
-
key: "agent-console.visualization.run-efficiency",
|
|
69
|
-
title: "Duration vs Tokens",
|
|
70
|
-
description: "Scatter chart comparing token consumption and runtime.",
|
|
71
|
-
goal: "Reveal outlier runs that are slow relative to their token usage.",
|
|
72
|
-
context: "Operational performance diagnostics."
|
|
73
|
-
},
|
|
74
|
-
source: { primary: RUN_LIST_REF, resultPath: "data" },
|
|
75
|
-
visualization: {
|
|
76
|
-
kind: "cartesian",
|
|
77
|
-
variant: "scatter",
|
|
78
|
-
xDimension: "totalTokens",
|
|
79
|
-
yMeasures: ["durationMs"],
|
|
80
|
-
dimensions: [
|
|
81
|
-
{
|
|
82
|
-
key: "totalTokens",
|
|
83
|
-
label: "Total Tokens",
|
|
84
|
-
dataPath: "totalTokens",
|
|
85
|
-
type: "number"
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
measures: [
|
|
89
|
-
{
|
|
90
|
-
key: "durationMs",
|
|
91
|
-
label: "Duration",
|
|
92
|
-
dataPath: "durationMs",
|
|
93
|
-
format: "duration",
|
|
94
|
-
color: "#7c3aed"
|
|
95
|
-
},
|
|
96
|
-
{
|
|
97
|
-
key: "estimatedCostUsd",
|
|
98
|
-
label: "Cost",
|
|
99
|
-
dataPath: "estimatedCostUsd",
|
|
100
|
-
format: "currency"
|
|
101
|
-
}
|
|
102
|
-
],
|
|
103
|
-
series: [
|
|
104
|
-
{
|
|
105
|
-
key: "runs",
|
|
106
|
-
label: "Runs",
|
|
107
|
-
measure: "durationMs",
|
|
108
|
-
type: "scatter",
|
|
109
|
-
color: "#7c3aed"
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
table: { caption: "Run duration versus token usage." }
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
var AgentVisualizationSpecs = [
|
|
116
|
-
AgentRunStatusVisualization,
|
|
117
|
-
AgentRunActivityVisualization,
|
|
118
|
-
AgentRunEfficiencyVisualization
|
|
119
|
-
];
|
|
120
|
-
var AgentVisualizationRegistry = new VisualizationRegistry([
|
|
121
|
-
...AgentVisualizationSpecs
|
|
122
|
-
]);
|
|
123
|
-
var AgentVisualizationRefs = AgentVisualizationSpecs.map((spec) => ({
|
|
124
|
-
key: spec.meta.key,
|
|
125
|
-
version: spec.meta.version
|
|
126
|
-
}));
|
|
127
|
-
|
|
128
|
-
// src/visualizations/selectors.ts
|
|
129
|
-
function dayKey(value) {
|
|
130
|
-
if (!value)
|
|
131
|
-
return "unknown";
|
|
132
|
-
return value.toISOString().slice(0, 10);
|
|
133
|
-
}
|
|
134
|
-
function createAgentVisualizationItems(runs) {
|
|
135
|
-
const statusCounts = new Map;
|
|
136
|
-
const activityCounts = new Map;
|
|
137
|
-
for (const run of runs) {
|
|
138
|
-
statusCounts.set(run.status, (statusCounts.get(run.status) ?? 0) + 1);
|
|
139
|
-
activityCounts.set(dayKey(run.startedAt ?? run.queuedAt), (activityCounts.get(dayKey(run.startedAt ?? run.queuedAt)) ?? 0) + 1);
|
|
140
|
-
}
|
|
141
|
-
return [
|
|
142
|
-
{
|
|
143
|
-
key: "run-status",
|
|
144
|
-
spec: AgentRunStatusVisualization,
|
|
145
|
-
data: {
|
|
146
|
-
data: Array.from(statusCounts.entries()).map(([status, count]) => ({
|
|
147
|
-
status,
|
|
148
|
-
runs: count
|
|
149
|
-
}))
|
|
150
|
-
},
|
|
151
|
-
title: "Run Status Breakdown",
|
|
152
|
-
description: "Completed, failed, running, and cancelled runs in the sample.",
|
|
153
|
-
height: 260
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
key: "run-activity",
|
|
157
|
-
spec: AgentRunActivityVisualization,
|
|
158
|
-
data: {
|
|
159
|
-
data: Array.from(activityCounts.entries()).sort(([left], [right]) => left.localeCompare(right)).map(([day, count]) => ({ day, runs: count }))
|
|
160
|
-
},
|
|
161
|
-
title: "Recent Run Activity",
|
|
162
|
-
description: "Daily run volume derived from run start times."
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
key: "run-efficiency",
|
|
166
|
-
spec: AgentRunEfficiencyVisualization,
|
|
167
|
-
data: {
|
|
168
|
-
data: runs.filter((run) => typeof run.durationMs === "number").map((run) => ({
|
|
169
|
-
totalTokens: run.totalTokens,
|
|
170
|
-
durationMs: run.durationMs ?? 0,
|
|
171
|
-
estimatedCostUsd: run.estimatedCostUsd
|
|
172
|
-
}))
|
|
173
|
-
},
|
|
174
|
-
title: "Duration vs Tokens",
|
|
175
|
-
description: "Operational scatter plot for spotting inefficient runs."
|
|
176
|
-
}
|
|
177
|
-
];
|
|
178
|
-
}
|
|
179
|
-
// src/agent.feature.ts
|
|
180
|
-
import { defineFeature } from "@contractspec/lib.contracts-spec";
|
|
181
|
-
var AgentConsoleFeature = defineFeature({
|
|
182
|
-
meta: {
|
|
183
|
-
key: "agent-console",
|
|
184
|
-
version: "1.0.0",
|
|
185
|
-
title: "AI Agent Console",
|
|
186
|
-
description: "AI agent orchestration with tools, runs, and logs management",
|
|
187
|
-
domain: "ai-ops",
|
|
188
|
-
owners: ["@agent-console-team"],
|
|
189
|
-
tags: ["ai", "agents", "orchestration"],
|
|
190
|
-
stability: "stable"
|
|
191
|
-
},
|
|
192
|
-
operations: [
|
|
193
|
-
{ key: "agent-console.agent.create", version: "1.0.0" },
|
|
194
|
-
{ key: "agent-console.agent.update", version: "1.0.0" },
|
|
195
|
-
{ key: "agent-console.agent.get", version: "1.0.0" },
|
|
196
|
-
{ key: "agent-console.agent.list", version: "1.0.0" },
|
|
197
|
-
{ key: "agent-console.agent.assignTool", version: "1.0.0" },
|
|
198
|
-
{ key: "agent-console.agent.removeTool", version: "1.0.0" },
|
|
199
|
-
{ key: "agent.tool.create", version: "1.0.0" },
|
|
200
|
-
{ key: "agent.tool.update", version: "1.0.0" },
|
|
201
|
-
{ key: "agent.tool.get", version: "1.0.0" },
|
|
202
|
-
{ key: "agent.tool.list", version: "1.0.0" },
|
|
203
|
-
{ key: "agent.tool.test", version: "1.0.0" },
|
|
204
|
-
{ key: "agent.run.execute", version: "1.0.0" },
|
|
205
|
-
{ key: "agent.run.cancel", version: "1.0.0" },
|
|
206
|
-
{ key: "agent.run.get", version: "1.0.0" },
|
|
207
|
-
{ key: "agent.run.list", version: "1.0.0" },
|
|
208
|
-
{ key: "agent.run.getSteps", version: "1.0.0" },
|
|
209
|
-
{ key: "agent.run.getLogs", version: "1.0.0" },
|
|
210
|
-
{ key: "agent.run.getMetrics", version: "1.0.0" }
|
|
211
|
-
],
|
|
212
|
-
events: [
|
|
213
|
-
{ key: "agent-console.agent.created", version: "1.0.0" },
|
|
214
|
-
{ key: "agent-console.agent.updated", version: "1.0.0" },
|
|
215
|
-
{ key: "agent-console.agent.toolAssigned", version: "1.0.0" },
|
|
216
|
-
{ key: "agent-console.agent.toolRemoved", version: "1.0.0" },
|
|
217
|
-
{ key: "agent.tool.created", version: "1.0.0" },
|
|
218
|
-
{ key: "agent.tool.updated", version: "1.0.0" },
|
|
219
|
-
{ key: "agent.tool.statusChanged", version: "1.0.0" },
|
|
220
|
-
{ key: "agent.run.started", version: "1.0.0" },
|
|
221
|
-
{ key: "agent.run.completed", version: "1.0.0" },
|
|
222
|
-
{ key: "agent.run.failed", version: "1.0.0" },
|
|
223
|
-
{ key: "agent.run.cancelled", version: "1.0.0" },
|
|
224
|
-
{ key: "agent.run.toolInvoked", version: "1.0.0" },
|
|
225
|
-
{ key: "agent.run.toolCompleted", version: "1.0.0" },
|
|
226
|
-
{ key: "agent.run.messageGenerated", version: "1.0.0" }
|
|
227
|
-
],
|
|
228
|
-
presentations: [
|
|
229
|
-
{ key: "agent-console.dashboard", version: "1.0.0" },
|
|
230
|
-
{ key: "agent-console.agent.viewList", version: "1.0.0" },
|
|
231
|
-
{ key: "agent-console.agent.detail", version: "1.0.0" },
|
|
232
|
-
{ key: "agent-console.run.list", version: "1.0.0" },
|
|
233
|
-
{ key: "agent-console.run.detail", version: "1.0.0" },
|
|
234
|
-
{ key: "agent-console.tool.list", version: "1.0.0" },
|
|
235
|
-
{ key: "agent-console.tool.detail", version: "1.0.0" }
|
|
236
|
-
],
|
|
237
|
-
opToPresentation: [
|
|
238
|
-
{
|
|
239
|
-
op: { key: "agent-console.agent.list", version: "1.0.0" },
|
|
240
|
-
pres: { key: "agent-console.agent.viewList", version: "1.0.0" }
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
op: { key: "agent-console.agent.get", version: "1.0.0" },
|
|
244
|
-
pres: { key: "agent-console.agent.detail", version: "1.0.0" }
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
op: { key: "agent.run.list", version: "1.0.0" },
|
|
248
|
-
pres: { key: "agent-console.run.list", version: "1.0.0" }
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
op: { key: "agent.run.get", version: "1.0.0" },
|
|
252
|
-
pres: { key: "agent-console.run.detail", version: "1.0.0" }
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
op: { key: "agent.tool.list", version: "1.0.0" },
|
|
256
|
-
pres: { key: "agent-console.tool.list", version: "1.0.0" }
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
op: { key: "agent.tool.get", version: "1.0.0" },
|
|
260
|
-
pres: { key: "agent-console.tool.detail", version: "1.0.0" }
|
|
261
|
-
}
|
|
262
|
-
],
|
|
263
|
-
presentationsTargets: [
|
|
264
|
-
{
|
|
265
|
-
key: "agent-console.dashboard",
|
|
266
|
-
version: "1.0.0",
|
|
267
|
-
targets: ["react", "markdown"]
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
key: "agent-console.agent.viewList",
|
|
271
|
-
version: "1.0.0",
|
|
272
|
-
targets: ["react", "markdown", "application/json"]
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
key: "agent-console.run.list",
|
|
276
|
-
version: "1.0.0",
|
|
277
|
-
targets: ["react", "markdown", "application/json"]
|
|
278
|
-
},
|
|
279
|
-
{
|
|
280
|
-
key: "agent-console.tool.list",
|
|
281
|
-
version: "1.0.0",
|
|
282
|
-
targets: ["react", "markdown", "application/json"]
|
|
283
|
-
}
|
|
284
|
-
],
|
|
285
|
-
visualizations: AgentVisualizationRefs,
|
|
286
|
-
capabilities: {
|
|
287
|
-
requires: [
|
|
288
|
-
{ key: "identity", version: "1.0.0" },
|
|
289
|
-
{ key: "audit-trail", version: "1.0.0" },
|
|
290
|
-
{ key: "jobs", version: "1.0.0" }
|
|
291
|
-
],
|
|
292
|
-
provides: [{ key: "agent", version: "1.0.0" }]
|
|
293
|
-
},
|
|
294
|
-
telemetry: [{ key: "agent-console.telemetry", version: "1.0.0" }],
|
|
295
|
-
jobs: [{ key: "agent-console.job.run-execution", version: "1.0.0" }],
|
|
296
|
-
docs: [
|
|
297
|
-
"docs.examples.agent-console.goal",
|
|
298
|
-
"docs.examples.agent-console.usage",
|
|
299
|
-
"docs.examples.agent-console.reference",
|
|
300
|
-
"docs.examples.agent-console.constraints"
|
|
301
|
-
]
|
|
302
|
-
});
|
|
303
|
-
export {
|
|
304
|
-
AgentConsoleFeature
|
|
305
|
-
};
|
|
1
|
+
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,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
|
|
3
|
-
var agentConsoleDocBlocks = [
|
|
4
|
-
{
|
|
5
|
-
id: "docs.examples.agent-console.goal",
|
|
6
|
-
title: "Agent Console — Goal",
|
|
7
|
-
summary: "AI agent ops console: tools, agents, runs, logs, and metrics.",
|
|
8
|
-
kind: "goal",
|
|
9
|
-
visibility: "public",
|
|
10
|
-
route: "/docs/examples/agent-console/goal",
|
|
11
|
-
tags: ["ai", "agents", "goal"],
|
|
12
|
-
body: `## Why it matters
|
|
1
|
+
import{registerDocBlocks as f}from"@contractspec/lib.contracts-spec/docs";var h=[{id:"docs.examples.agent-console.goal",title:"Agent Console — Goal",summary:"AI agent ops console: tools, agents, runs, logs, and metrics.",kind:"goal",visibility:"public",route:"/docs/examples/agent-console/goal",tags:["ai","agents","goal"],body:`## Why it matters
|
|
13
2
|
- Provides a regenerable agent operations surface with tool registry and run history.
|
|
14
3
|
- Prevents drift between tool schemas, agent configs, and execution logs.
|
|
15
4
|
|
|
@@ -19,17 +8,7 @@ var agentConsoleDocBlocks = [
|
|
|
19
8
|
|
|
20
9
|
## Success criteria
|
|
21
10
|
- Tool/agent/run specs regenerate UI/API/events cleanly.
|
|
22
|
-
- Logs/metrics stay aligned and PII is scoped.`
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "docs.examples.agent-console.usage",
|
|
26
|
-
title: "Agent Console — Usage",
|
|
27
|
-
summary: "How to operate, extend, and regenerate the agent console safely.",
|
|
28
|
-
kind: "usage",
|
|
29
|
-
visibility: "public",
|
|
30
|
-
route: "/docs/examples/agent-console/usage",
|
|
31
|
-
tags: ["ai", "agents", "usage"],
|
|
32
|
-
body: `## Canonical walkthrough
|
|
11
|
+
- Logs/metrics stay aligned and PII is scoped.`},{id:"docs.examples.agent-console.usage",title:"Agent Console — Usage",summary:"How to operate, extend, and regenerate the agent console safely.",kind:"usage",visibility:"public",route:"/docs/examples/agent-console/usage",tags:["ai","agents","usage"],body:`## Canonical walkthrough
|
|
33
12
|
1) Open the default sandbox route at \`/sandbox\` or \`/sandbox?template=agent-console\`.
|
|
34
13
|
2) Inspect seeded agents, tools, runs, and metrics from the deterministic demo runtime.
|
|
35
14
|
3) Create an agent, activate it, execute a run, and confirm the metrics update.
|
|
@@ -43,17 +22,7 @@ var agentConsoleDocBlocks = [
|
|
|
43
22
|
## Guardrails
|
|
44
23
|
- Emit events for run lifecycle; store logs with redaction where needed.
|
|
45
24
|
- Enforce tool input validation; avoid unsafe arbitrary code exec in handlers.
|
|
46
|
-
- Keep tenant/user scoping explicit for ops data and keep meetup demos offline-safe by default.`
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "docs.examples.agent-console.reference",
|
|
50
|
-
title: "Agent Console — Reference",
|
|
51
|
-
summary: "Entities, contracts, events, and presentations for the agent console.",
|
|
52
|
-
kind: "reference",
|
|
53
|
-
visibility: "public",
|
|
54
|
-
route: "/docs/examples/agent-console",
|
|
55
|
-
tags: ["ai", "agents", "reference"],
|
|
56
|
-
body: `## Entities
|
|
25
|
+
- Keep tenant/user scoping explicit for ops data and keep meetup demos offline-safe by default.`},{id:"docs.examples.agent-console.reference",title:"Agent Console — Reference",summary:"Entities, contracts, events, and presentations for the agent console.",kind:"reference",visibility:"public",route:"/docs/examples/agent-console",tags:["ai","agents","reference"],body:`## Entities
|
|
57
26
|
- Tool, Agent, AgentTool, Run, RunStep, RunLog, RunMetric.
|
|
58
27
|
|
|
59
28
|
## Contracts
|
|
@@ -68,17 +37,7 @@ var agentConsoleDocBlocks = [
|
|
|
68
37
|
## Notes
|
|
69
38
|
- Keep tool schemas explicit; enforce validation in spec.
|
|
70
39
|
- Use the seeded demo runtime for sandbox and markdown walkthroughs.
|
|
71
|
-
- Generate a replay bundle before demos or talks so the walkthrough has proof output ready.`
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "docs.examples.agent-console.constraints",
|
|
75
|
-
title: "Agent Console — Constraints & Safety",
|
|
76
|
-
summary: "Internal guardrails for tool/agent/run safety, PII, and regeneration.",
|
|
77
|
-
kind: "reference",
|
|
78
|
-
visibility: "internal",
|
|
79
|
-
route: "/docs/examples/agent-console/constraints",
|
|
80
|
-
tags: ["ai", "agents", "constraints", "internal"],
|
|
81
|
-
body: `## Constraints
|
|
40
|
+
- Generate a replay bundle before demos or talks so the walkthrough has proof output ready.`},{id:"docs.examples.agent-console.constraints",title:"Agent Console — Constraints & Safety",summary:"Internal guardrails for tool/agent/run safety, PII, and regeneration.",kind:"reference",visibility:"internal",route:"/docs/examples/agent-console/constraints",tags:["ai","agents","constraints","internal"],body:`## Constraints
|
|
82
41
|
- Tool schemas (inputs/outputs) must be explicit in spec; no arbitrary untyped payloads.
|
|
83
42
|
- Events to emit: tool.created, agent.created, run.started/completed/failed, tool.invoked.
|
|
84
43
|
- Regeneration must not loosen execution policies or logging without explicit spec diff.
|
|
@@ -90,7 +49,4 @@ var agentConsoleDocBlocks = [
|
|
|
90
49
|
## Verification
|
|
91
50
|
- Add fixtures for tool schema changes and run lifecycle.
|
|
92
51
|
- Ensure Audit/Notifications remain wired for runs; metrics collection unchanged.
|
|
93
|
-
- Use Feature Flags to gate risky tools; default safe/off.`
|
|
94
|
-
}
|
|
95
|
-
];
|
|
96
|
-
registerDocBlocks(agentConsoleDocBlocks);
|
|
52
|
+
- Use Feature Flags to gate risky tools; default safe/off.`}];f(h);
|
package/dist/node/docs/index.js
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { registerDocBlocks } from "@contractspec/lib.contracts-spec/docs";
|
|
3
|
-
var agentConsoleDocBlocks = [
|
|
4
|
-
{
|
|
5
|
-
id: "docs.examples.agent-console.goal",
|
|
6
|
-
title: "Agent Console — Goal",
|
|
7
|
-
summary: "AI agent ops console: tools, agents, runs, logs, and metrics.",
|
|
8
|
-
kind: "goal",
|
|
9
|
-
visibility: "public",
|
|
10
|
-
route: "/docs/examples/agent-console/goal",
|
|
11
|
-
tags: ["ai", "agents", "goal"],
|
|
12
|
-
body: `## Why it matters
|
|
1
|
+
import{registerDocBlocks as m}from"@contractspec/lib.contracts-spec/docs";var f=[{id:"docs.examples.agent-console.goal",title:"Agent Console — Goal",summary:"AI agent ops console: tools, agents, runs, logs, and metrics.",kind:"goal",visibility:"public",route:"/docs/examples/agent-console/goal",tags:["ai","agents","goal"],body:`## Why it matters
|
|
13
2
|
- Provides a regenerable agent operations surface with tool registry and run history.
|
|
14
3
|
- Prevents drift between tool schemas, agent configs, and execution logs.
|
|
15
4
|
|
|
@@ -19,17 +8,7 @@ var agentConsoleDocBlocks = [
|
|
|
19
8
|
|
|
20
9
|
## Success criteria
|
|
21
10
|
- Tool/agent/run specs regenerate UI/API/events cleanly.
|
|
22
|
-
- Logs/metrics stay aligned and PII is scoped.`
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
id: "docs.examples.agent-console.usage",
|
|
26
|
-
title: "Agent Console — Usage",
|
|
27
|
-
summary: "How to operate, extend, and regenerate the agent console safely.",
|
|
28
|
-
kind: "usage",
|
|
29
|
-
visibility: "public",
|
|
30
|
-
route: "/docs/examples/agent-console/usage",
|
|
31
|
-
tags: ["ai", "agents", "usage"],
|
|
32
|
-
body: `## Canonical walkthrough
|
|
11
|
+
- Logs/metrics stay aligned and PII is scoped.`},{id:"docs.examples.agent-console.usage",title:"Agent Console — Usage",summary:"How to operate, extend, and regenerate the agent console safely.",kind:"usage",visibility:"public",route:"/docs/examples/agent-console/usage",tags:["ai","agents","usage"],body:`## Canonical walkthrough
|
|
33
12
|
1) Open the default sandbox route at \`/sandbox\` or \`/sandbox?template=agent-console\`.
|
|
34
13
|
2) Inspect seeded agents, tools, runs, and metrics from the deterministic demo runtime.
|
|
35
14
|
3) Create an agent, activate it, execute a run, and confirm the metrics update.
|
|
@@ -43,17 +22,7 @@ var agentConsoleDocBlocks = [
|
|
|
43
22
|
## Guardrails
|
|
44
23
|
- Emit events for run lifecycle; store logs with redaction where needed.
|
|
45
24
|
- Enforce tool input validation; avoid unsafe arbitrary code exec in handlers.
|
|
46
|
-
- Keep tenant/user scoping explicit for ops data and keep meetup demos offline-safe by default.`
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id: "docs.examples.agent-console.reference",
|
|
50
|
-
title: "Agent Console — Reference",
|
|
51
|
-
summary: "Entities, contracts, events, and presentations for the agent console.",
|
|
52
|
-
kind: "reference",
|
|
53
|
-
visibility: "public",
|
|
54
|
-
route: "/docs/examples/agent-console",
|
|
55
|
-
tags: ["ai", "agents", "reference"],
|
|
56
|
-
body: `## Entities
|
|
25
|
+
- Keep tenant/user scoping explicit for ops data and keep meetup demos offline-safe by default.`},{id:"docs.examples.agent-console.reference",title:"Agent Console — Reference",summary:"Entities, contracts, events, and presentations for the agent console.",kind:"reference",visibility:"public",route:"/docs/examples/agent-console",tags:["ai","agents","reference"],body:`## Entities
|
|
57
26
|
- Tool, Agent, AgentTool, Run, RunStep, RunLog, RunMetric.
|
|
58
27
|
|
|
59
28
|
## Contracts
|
|
@@ -68,17 +37,7 @@ var agentConsoleDocBlocks = [
|
|
|
68
37
|
## Notes
|
|
69
38
|
- Keep tool schemas explicit; enforce validation in spec.
|
|
70
39
|
- Use the seeded demo runtime for sandbox and markdown walkthroughs.
|
|
71
|
-
- Generate a replay bundle before demos or talks so the walkthrough has proof output ready.`
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: "docs.examples.agent-console.constraints",
|
|
75
|
-
title: "Agent Console — Constraints & Safety",
|
|
76
|
-
summary: "Internal guardrails for tool/agent/run safety, PII, and regeneration.",
|
|
77
|
-
kind: "reference",
|
|
78
|
-
visibility: "internal",
|
|
79
|
-
route: "/docs/examples/agent-console/constraints",
|
|
80
|
-
tags: ["ai", "agents", "constraints", "internal"],
|
|
81
|
-
body: `## Constraints
|
|
40
|
+
- Generate a replay bundle before demos or talks so the walkthrough has proof output ready.`},{id:"docs.examples.agent-console.constraints",title:"Agent Console — Constraints & Safety",summary:"Internal guardrails for tool/agent/run safety, PII, and regeneration.",kind:"reference",visibility:"internal",route:"/docs/examples/agent-console/constraints",tags:["ai","agents","constraints","internal"],body:`## Constraints
|
|
82
41
|
- Tool schemas (inputs/outputs) must be explicit in spec; no arbitrary untyped payloads.
|
|
83
42
|
- Events to emit: tool.created, agent.created, run.started/completed/failed, tool.invoked.
|
|
84
43
|
- Regeneration must not loosen execution policies or logging without explicit spec diff.
|
|
@@ -90,7 +49,4 @@ var agentConsoleDocBlocks = [
|
|
|
90
49
|
## Verification
|
|
91
50
|
- Add fixtures for tool schema changes and run lifecycle.
|
|
92
51
|
- Ensure Audit/Notifications remain wired for runs; metrics collection unchanged.
|
|
93
|
-
- Use Feature Flags to gate risky tools; default safe/off.`
|
|
94
|
-
}
|
|
95
|
-
];
|
|
96
|
-
registerDocBlocks(agentConsoleDocBlocks);
|
|
52
|
+
- Use Feature Flags to gate risky tools; default safe/off.`}];m(f);
|
package/dist/node/example.js
CHANGED
|
@@ -1,41 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { defineExample } from "@contractspec/lib.contracts-spec";
|
|
3
|
-
var example = defineExample({
|
|
4
|
-
meta: {
|
|
5
|
-
key: "agent-console",
|
|
6
|
-
version: "1.0.0",
|
|
7
|
-
title: "Agent Console",
|
|
8
|
-
description: "AI agent ops console: tools, agents, runs, logs, and metrics (spec-first, regenerable).",
|
|
9
|
-
kind: "template",
|
|
10
|
-
visibility: "public",
|
|
11
|
-
stability: "beta",
|
|
12
|
-
owners: ["@platform.core"],
|
|
13
|
-
tags: ["ai", "agents", "tools", "orchestration"]
|
|
14
|
-
},
|
|
15
|
-
docs: {
|
|
16
|
-
rootDocId: "docs.examples.agent-console.reference",
|
|
17
|
-
goalDocId: "docs.examples.agent-console.goal",
|
|
18
|
-
usageDocId: "docs.examples.agent-console.usage",
|
|
19
|
-
constraintsDocId: "docs.examples.agent-console.constraints"
|
|
20
|
-
},
|
|
21
|
-
entrypoints: {
|
|
22
|
-
packageName: "@contractspec/example.agent-console",
|
|
23
|
-
feature: "./agent.feature",
|
|
24
|
-
presentations: "./presentations",
|
|
25
|
-
handlers: "./handlers",
|
|
26
|
-
docs: "./docs"
|
|
27
|
-
},
|
|
28
|
-
surfaces: {
|
|
29
|
-
templates: true,
|
|
30
|
-
sandbox: {
|
|
31
|
-
enabled: true,
|
|
32
|
-
modes: ["playground", "specs", "builder", "markdown", "evolution"]
|
|
33
|
-
},
|
|
34
|
-
studio: { enabled: true, installable: true },
|
|
35
|
-
mcp: { enabled: true }
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
var example_default = example;
|
|
39
|
-
export {
|
|
40
|
-
example_default as default
|
|
41
|
-
};
|
|
1
|
+
import{defineExample as g}from"@contractspec/lib.contracts-spec";var h=g({meta:{key:"agent-console",version:"1.0.0",title:"Agent Console",description:"AI agent ops console: tools, agents, runs, logs, and metrics (spec-first, regenerable).",kind:"template",visibility:"public",stability:"beta",owners:["@platform.core"],tags:["ai","agents","tools","orchestration"]},docs:{rootDocId:"docs.examples.agent-console.reference",goalDocId:"docs.examples.agent-console.goal",usageDocId:"docs.examples.agent-console.usage",constraintsDocId:"docs.examples.agent-console.constraints"},entrypoints:{packageName:"@contractspec/example.agent-console",feature:"./agent.feature",presentations:"./presentations",handlers:"./handlers",docs:"./docs"},surfaces:{templates:!0,sandbox:{enabled:!0,modes:["playground","specs","builder","markdown","evolution"]},studio:{enabled:!0,installable:!0},mcp:{enabled:!0}}}),q=h;export{q as default};
|