@vfarcic/dot-ai 1.0.3 → 1.1.0
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/README.md +1 -0
- package/dist/core/ai-provider.interface.d.ts +12 -8
- package/dist/core/ai-provider.interface.d.ts.map +1 -1
- package/dist/core/artifacthub.d.ts +1 -1
- package/dist/core/artifacthub.d.ts.map +1 -1
- package/dist/core/base-vector-service.d.ts +22 -9
- package/dist/core/base-vector-service.d.ts.map +1 -1
- package/dist/core/base-vector-service.js +106 -37
- package/dist/core/capabilities.d.ts.map +1 -1
- package/dist/core/capabilities.js +5 -2
- package/dist/core/capability-operations.d.ts +55 -7
- package/dist/core/capability-operations.d.ts.map +1 -1
- package/dist/core/capability-operations.js +1 -3
- package/dist/core/capability-scan-workflow.d.ts +64 -8
- package/dist/core/capability-scan-workflow.d.ts.map +1 -1
- package/dist/core/capability-scan-workflow.js +14 -13
- package/dist/core/capability-tools.d.ts +1 -1
- package/dist/core/capability-tools.d.ts.map +1 -1
- package/dist/core/capability-tools.js +1 -1
- package/dist/core/capability-vector-service.d.ts +3 -4
- package/dist/core/capability-vector-service.d.ts.map +1 -1
- package/dist/core/capability-vector-service.js +2 -2
- package/dist/core/command-executor.d.ts +3 -4
- package/dist/core/command-executor.d.ts.map +1 -1
- package/dist/core/command-executor.js +8 -4
- package/dist/core/crd-availability.d.ts +3 -5
- package/dist/core/crd-availability.d.ts.map +1 -1
- package/dist/core/crd-availability.js +8 -18
- package/dist/core/deploy-operation.d.ts +6 -5
- package/dist/core/deploy-operation.d.ts.map +1 -1
- package/dist/core/deploy-operation.js +16 -10
- package/dist/core/discovery.d.ts +6 -14
- package/dist/core/discovery.d.ts.map +1 -1
- package/dist/core/discovery.js +35 -51
- package/dist/core/embedding-service.d.ts.map +1 -1
- package/dist/core/embedding-service.js +1 -1
- package/dist/core/error-handling.d.ts +13 -13
- package/dist/core/error-handling.d.ts.map +1 -1
- package/dist/core/error-handling.js +2 -3
- package/dist/core/generic-session-manager.d.ts +2 -2
- package/dist/core/generic-session-manager.d.ts.map +1 -1
- package/dist/core/helm-types.d.ts +5 -5
- package/dist/core/helm-types.d.ts.map +1 -1
- package/dist/core/index.d.ts +4 -11
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +8 -14
- package/dist/core/knowledge-types.d.ts +114 -0
- package/dist/core/knowledge-types.d.ts.map +1 -0
- package/dist/core/knowledge-types.js +10 -0
- package/dist/core/memory.d.ts +12 -12
- package/dist/core/memory.d.ts.map +1 -1
- package/dist/core/mermaid-tools.d.ts +24 -1
- package/dist/core/mermaid-tools.d.ts.map +1 -1
- package/dist/core/mermaid-tools.js +10 -8
- package/dist/core/packaging.d.ts +23 -1
- package/dist/core/packaging.d.ts.map +1 -1
- package/dist/core/pattern-operations.d.ts +32 -9
- package/dist/core/pattern-operations.d.ts.map +1 -1
- package/dist/core/pattern-operations.js +17 -22
- package/dist/core/pattern-vector-service.d.ts +3 -4
- package/dist/core/pattern-vector-service.d.ts.map +1 -1
- package/dist/core/pattern-vector-service.js +2 -2
- package/dist/core/platform-utils.d.ts +2 -2
- package/dist/core/platform-utils.d.ts.map +1 -1
- package/dist/core/plugin-manager.d.ts +6 -2
- package/dist/core/plugin-manager.d.ts.map +1 -1
- package/dist/core/plugin-manager.js +9 -16
- package/dist/core/plugin-registry.d.ts +59 -0
- package/dist/core/plugin-registry.d.ts.map +1 -0
- package/dist/core/plugin-registry.js +80 -0
- package/dist/core/policy-operations.d.ts +101 -21
- package/dist/core/policy-operations.d.ts.map +1 -1
- package/dist/core/policy-operations.js +45 -47
- package/dist/core/policy-vector-service.d.ts +3 -4
- package/dist/core/policy-vector-service.d.ts.map +1 -1
- package/dist/core/policy-vector-service.js +2 -2
- package/dist/core/providers/host-provider.d.ts +1 -1
- package/dist/core/providers/host-provider.d.ts.map +1 -1
- package/dist/core/providers/host-provider.js +2 -2
- package/dist/core/providers/provider-debug-utils.d.ts +2 -2
- package/dist/core/providers/provider-debug-utils.d.ts.map +1 -1
- package/dist/core/providers/tool-utils.d.ts +10 -2
- package/dist/core/providers/tool-utils.d.ts.map +1 -1
- package/dist/core/providers/tool-utils.js +2 -2
- package/dist/core/providers/vercel-provider.d.ts.map +1 -1
- package/dist/core/providers/vercel-provider.js +29 -23
- package/dist/core/resource-tools.d.ts +29 -1
- package/dist/core/resource-tools.d.ts.map +1 -1
- package/dist/core/resource-vector-service.d.ts +3 -4
- package/dist/core/resource-vector-service.d.ts.map +1 -1
- package/dist/core/resource-vector-service.js +2 -2
- package/dist/core/schema.d.ts +15 -14
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/schema.js +32 -34
- package/dist/core/shared-prompt-loader.d.ts +1 -1
- package/dist/core/shared-prompt-loader.d.ts.map +1 -1
- package/dist/core/solution-cr.js +1 -1
- package/dist/core/solution-utils.d.ts +22 -3
- package/dist/core/solution-utils.d.ts.map +1 -1
- package/dist/core/solution-utils.js +1 -1
- package/dist/core/telemetry/client.d.ts +0 -6
- package/dist/core/telemetry/client.d.ts.map +1 -1
- package/dist/core/telemetry/client.js +6 -17
- package/dist/core/telemetry/config.js +1 -1
- package/dist/core/telemetry/index.d.ts +1 -1
- package/dist/core/telemetry/index.d.ts.map +1 -1
- package/dist/core/telemetry/index.js +1 -2
- package/dist/core/tracing/tool-tracing.d.ts +1 -1
- package/dist/core/tracing/tool-tracing.d.ts.map +1 -1
- package/dist/core/unified-creation-session.d.ts +15 -8
- package/dist/core/unified-creation-session.d.ts.map +1 -1
- package/dist/core/unified-creation-session.js +19 -19
- package/dist/core/unified-creation-types.d.ts +2 -2
- package/dist/core/unified-creation-types.d.ts.map +1 -1
- package/dist/core/visualization.d.ts +1 -1
- package/dist/core/visualization.d.ts.map +1 -1
- package/dist/core/workflow.d.ts +8 -5
- package/dist/core/workflow.d.ts.map +1 -1
- package/dist/evaluation/dataset-analyzer.d.ts +13 -7
- package/dist/evaluation/dataset-analyzer.d.ts.map +1 -1
- package/dist/evaluation/dataset-analyzer.js +1 -1
- package/dist/evaluation/datasets/loader.d.ts +2 -2
- package/dist/evaluation/datasets/loader.d.ts.map +1 -1
- package/dist/evaluation/eval-runner.js +7 -5
- package/dist/evaluation/evaluators/base-comparative.d.ts +1 -1
- package/dist/evaluation/evaluators/base-comparative.d.ts.map +1 -1
- package/dist/evaluation/evaluators/base-comparative.js +4 -3
- package/dist/evaluation/evaluators/base.d.ts +5 -5
- package/dist/evaluation/evaluators/base.d.ts.map +1 -1
- package/dist/evaluation/evaluators/capability-comparative.js +1 -1
- package/dist/evaluation/platform-synthesizer.d.ts.map +1 -1
- package/dist/interfaces/mcp.d.ts.map +1 -1
- package/dist/interfaces/mcp.js +26 -15
- package/dist/interfaces/openapi-generator.d.ts +116 -12
- package/dist/interfaces/openapi-generator.d.ts.map +1 -1
- package/dist/interfaces/openapi-generator.js +490 -199
- package/dist/interfaces/rest-api.d.ts +28 -6
- package/dist/interfaces/rest-api.d.ts.map +1 -1
- package/dist/interfaces/rest-api.js +436 -245
- package/dist/interfaces/rest-registry.d.ts +4 -4
- package/dist/interfaces/rest-registry.d.ts.map +1 -1
- package/dist/interfaces/rest-registry.js +6 -5
- package/dist/interfaces/rest-route-registry.d.ts +165 -0
- package/dist/interfaces/rest-route-registry.d.ts.map +1 -0
- package/dist/interfaces/rest-route-registry.js +230 -0
- package/dist/interfaces/routes/index.d.ts +22 -0
- package/dist/interfaces/routes/index.d.ts.map +1 -0
- package/dist/interfaces/routes/index.js +347 -0
- package/dist/interfaces/schemas/common.d.ts +177 -0
- package/dist/interfaces/schemas/common.d.ts.map +1 -0
- package/dist/interfaces/schemas/common.js +102 -0
- package/dist/interfaces/schemas/events.d.ts +131 -0
- package/dist/interfaces/schemas/events.d.ts.map +1 -0
- package/dist/interfaces/schemas/events.js +66 -0
- package/dist/interfaces/schemas/index.d.ts +21 -0
- package/dist/interfaces/schemas/index.d.ts.map +1 -0
- package/dist/interfaces/schemas/index.js +138 -0
- package/dist/interfaces/schemas/knowledge.d.ts +210 -0
- package/dist/interfaces/schemas/knowledge.d.ts.map +1 -0
- package/dist/interfaces/schemas/knowledge.js +117 -0
- package/dist/interfaces/schemas/logs.d.ts +82 -0
- package/dist/interfaces/schemas/logs.d.ts.map +1 -0
- package/dist/interfaces/schemas/logs.js +46 -0
- package/dist/interfaces/schemas/prompts.d.ts +191 -0
- package/dist/interfaces/schemas/prompts.d.ts.map +1 -0
- package/dist/interfaces/schemas/prompts.js +91 -0
- package/dist/interfaces/schemas/resources.d.ts +378 -0
- package/dist/interfaces/schemas/resources.d.ts.map +1 -0
- package/dist/interfaces/schemas/resources.js +173 -0
- package/dist/interfaces/schemas/sessions.d.ts +90 -0
- package/dist/interfaces/schemas/sessions.d.ts.map +1 -0
- package/dist/interfaces/schemas/sessions.js +56 -0
- package/dist/interfaces/schemas/tools.d.ts +194 -0
- package/dist/interfaces/schemas/tools.d.ts.map +1 -0
- package/dist/interfaces/schemas/tools.js +101 -0
- package/dist/interfaces/schemas/visualization.d.ts +373 -0
- package/dist/interfaces/schemas/visualization.d.ts.map +1 -0
- package/dist/interfaces/schemas/visualization.js +134 -0
- package/dist/mcp/server.js +5 -4
- package/dist/tools/answer-question.d.ts +1 -1
- package/dist/tools/answer-question.d.ts.map +1 -1
- package/dist/tools/answer-question.js +9 -8
- package/dist/tools/deploy-manifests.d.ts +4 -2
- package/dist/tools/deploy-manifests.d.ts.map +1 -1
- package/dist/tools/deploy-manifests.js +10 -6
- package/dist/tools/generate-manifests.d.ts.map +1 -1
- package/dist/tools/generate-manifests.js +28 -20
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +6 -1
- package/dist/tools/manage-knowledge.d.ts +77 -0
- package/dist/tools/manage-knowledge.d.ts.map +1 -0
- package/dist/tools/manage-knowledge.js +573 -0
- package/dist/tools/operate-analysis.d.ts +31 -2
- package/dist/tools/operate-analysis.d.ts.map +1 -1
- package/dist/tools/operate-execution.d.ts +2 -3
- package/dist/tools/operate-execution.d.ts.map +1 -1
- package/dist/tools/operate-execution.js +7 -7
- package/dist/tools/operate.d.ts +7 -2
- package/dist/tools/operate.d.ts.map +1 -1
- package/dist/tools/operate.js +2 -2
- package/dist/tools/organizational-data.d.ts +30 -4
- package/dist/tools/organizational-data.d.ts.map +1 -1
- package/dist/tools/organizational-data.js +24 -19
- package/dist/tools/project-setup/discovery.d.ts.map +1 -1
- package/dist/tools/project-setup/generate-scope.d.ts +1 -1
- package/dist/tools/project-setup/generate-scope.d.ts.map +1 -1
- package/dist/tools/project-setup/types.d.ts +1 -0
- package/dist/tools/project-setup/types.d.ts.map +1 -1
- package/dist/tools/prompts.d.ts +28 -2
- package/dist/tools/prompts.d.ts.map +1 -1
- package/dist/tools/query.d.ts +17 -3
- package/dist/tools/query.d.ts.map +1 -1
- package/dist/tools/query.js +1 -7
- package/dist/tools/recommend.d.ts +24 -6
- package/dist/tools/recommend.d.ts.map +1 -1
- package/dist/tools/recommend.js +18 -15
- package/dist/tools/remediate.d.ts +12 -3
- package/dist/tools/remediate.d.ts.map +1 -1
- package/dist/tools/remediate.js +22 -14
- package/dist/tools/version.d.ts +19 -5
- package/dist/tools/version.d.ts.map +1 -1
- package/dist/tools/version.js +106 -54
- package/package.json +11 -5
- package/prompts/knowledge-ask.md +29 -0
- package/dist/core/vector-db-service.d.ts +0 -108
- package/dist/core/vector-db-service.d.ts.map +0 -1
- package/dist/core/vector-db-service.js +0 -647
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Visualization Response Schemas
|
|
3
|
+
*
|
|
4
|
+
* Schemas for the /api/v1/visualize/:sessionId endpoint.
|
|
5
|
+
* PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/**
|
|
9
|
+
* Visualization types supported by the API
|
|
10
|
+
* PRD #320: Added 'diff' type for before/after comparisons
|
|
11
|
+
* PRD #328: Added 'bar-chart' type for metrics visualization
|
|
12
|
+
*/
|
|
13
|
+
export declare const VisualizationTypeSchema: z.ZodEnum<{
|
|
14
|
+
code: "code";
|
|
15
|
+
mermaid: "mermaid";
|
|
16
|
+
cards: "cards";
|
|
17
|
+
table: "table";
|
|
18
|
+
diff: "diff";
|
|
19
|
+
"bar-chart": "bar-chart";
|
|
20
|
+
}>;
|
|
21
|
+
export type VisualizationType = z.infer<typeof VisualizationTypeSchema>;
|
|
22
|
+
/**
|
|
23
|
+
* Code visualization content
|
|
24
|
+
*/
|
|
25
|
+
export declare const CodeContentSchema: z.ZodObject<{
|
|
26
|
+
language: z.ZodString;
|
|
27
|
+
code: z.ZodString;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
export type CodeContent = z.infer<typeof CodeContentSchema>;
|
|
30
|
+
/**
|
|
31
|
+
* Table visualization content
|
|
32
|
+
*/
|
|
33
|
+
export declare const TableContentSchema: z.ZodObject<{
|
|
34
|
+
headers: z.ZodArray<z.ZodString>;
|
|
35
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
export type TableContent = z.infer<typeof TableContentSchema>;
|
|
38
|
+
/**
|
|
39
|
+
* Card item in cards visualization
|
|
40
|
+
*/
|
|
41
|
+
export declare const CardItemSchema: z.ZodObject<{
|
|
42
|
+
id: z.ZodString;
|
|
43
|
+
title: z.ZodString;
|
|
44
|
+
description: z.ZodOptional<z.ZodString>;
|
|
45
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type CardItem = z.infer<typeof CardItemSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* Cards visualization content
|
|
50
|
+
*/
|
|
51
|
+
export declare const CardsContentSchema: z.ZodArray<z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
title: z.ZodString;
|
|
54
|
+
description: z.ZodOptional<z.ZodString>;
|
|
55
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
export type CardsContent = z.infer<typeof CardsContentSchema>;
|
|
58
|
+
/**
|
|
59
|
+
* Diff visualization content (PRD #320)
|
|
60
|
+
*/
|
|
61
|
+
export declare const DiffContentSchema: z.ZodObject<{
|
|
62
|
+
before: z.ZodObject<{
|
|
63
|
+
language: z.ZodString;
|
|
64
|
+
code: z.ZodString;
|
|
65
|
+
}, z.core.$strip>;
|
|
66
|
+
after: z.ZodObject<{
|
|
67
|
+
language: z.ZodString;
|
|
68
|
+
code: z.ZodString;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
}, z.core.$strip>;
|
|
71
|
+
export type DiffContent = z.infer<typeof DiffContentSchema>;
|
|
72
|
+
/**
|
|
73
|
+
* Bar chart data item (PRD #328)
|
|
74
|
+
*/
|
|
75
|
+
export declare const BarChartDataItemSchema: z.ZodObject<{
|
|
76
|
+
label: z.ZodString;
|
|
77
|
+
value: z.ZodNumber;
|
|
78
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
79
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
80
|
+
error: "error";
|
|
81
|
+
warning: "warning";
|
|
82
|
+
ok: "ok";
|
|
83
|
+
}>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type BarChartDataItem = z.infer<typeof BarChartDataItemSchema>;
|
|
86
|
+
/**
|
|
87
|
+
* Bar chart visualization content (PRD #328)
|
|
88
|
+
*/
|
|
89
|
+
export declare const BarChartContentSchema: z.ZodObject<{
|
|
90
|
+
data: z.ZodArray<z.ZodObject<{
|
|
91
|
+
label: z.ZodString;
|
|
92
|
+
value: z.ZodNumber;
|
|
93
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
95
|
+
error: "error";
|
|
96
|
+
warning: "warning";
|
|
97
|
+
ok: "ok";
|
|
98
|
+
}>>;
|
|
99
|
+
}, z.core.$strip>>;
|
|
100
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
101
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
102
|
+
horizontal: "horizontal";
|
|
103
|
+
vertical: "vertical";
|
|
104
|
+
}>>;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
export type BarChartContent = z.infer<typeof BarChartContentSchema>;
|
|
107
|
+
/**
|
|
108
|
+
* Visualization content union type
|
|
109
|
+
* Content varies based on visualization type
|
|
110
|
+
*/
|
|
111
|
+
export declare const VisualizationContentSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
112
|
+
language: z.ZodString;
|
|
113
|
+
code: z.ZodString;
|
|
114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
115
|
+
headers: z.ZodArray<z.ZodString>;
|
|
116
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
117
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
title: z.ZodString;
|
|
120
|
+
description: z.ZodOptional<z.ZodString>;
|
|
121
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
122
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
123
|
+
before: z.ZodObject<{
|
|
124
|
+
language: z.ZodString;
|
|
125
|
+
code: z.ZodString;
|
|
126
|
+
}, z.core.$strip>;
|
|
127
|
+
after: z.ZodObject<{
|
|
128
|
+
language: z.ZodString;
|
|
129
|
+
code: z.ZodString;
|
|
130
|
+
}, z.core.$strip>;
|
|
131
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
132
|
+
data: z.ZodArray<z.ZodObject<{
|
|
133
|
+
label: z.ZodString;
|
|
134
|
+
value: z.ZodNumber;
|
|
135
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
136
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
137
|
+
error: "error";
|
|
138
|
+
warning: "warning";
|
|
139
|
+
ok: "ok";
|
|
140
|
+
}>>;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
143
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
144
|
+
horizontal: "horizontal";
|
|
145
|
+
vertical: "vertical";
|
|
146
|
+
}>>;
|
|
147
|
+
}, z.core.$strip>]>;
|
|
148
|
+
export type VisualizationContent = z.infer<typeof VisualizationContentSchema>;
|
|
149
|
+
/**
|
|
150
|
+
* Individual visualization item
|
|
151
|
+
*/
|
|
152
|
+
export declare const VisualizationSchema: z.ZodObject<{
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
label: z.ZodString;
|
|
155
|
+
type: z.ZodEnum<{
|
|
156
|
+
code: "code";
|
|
157
|
+
mermaid: "mermaid";
|
|
158
|
+
cards: "cards";
|
|
159
|
+
table: "table";
|
|
160
|
+
diff: "diff";
|
|
161
|
+
"bar-chart": "bar-chart";
|
|
162
|
+
}>;
|
|
163
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
164
|
+
language: z.ZodString;
|
|
165
|
+
code: z.ZodString;
|
|
166
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
167
|
+
headers: z.ZodArray<z.ZodString>;
|
|
168
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
169
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
170
|
+
id: z.ZodString;
|
|
171
|
+
title: z.ZodString;
|
|
172
|
+
description: z.ZodOptional<z.ZodString>;
|
|
173
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
174
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
175
|
+
before: z.ZodObject<{
|
|
176
|
+
language: z.ZodString;
|
|
177
|
+
code: z.ZodString;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
after: z.ZodObject<{
|
|
180
|
+
language: z.ZodString;
|
|
181
|
+
code: z.ZodString;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
184
|
+
data: z.ZodArray<z.ZodObject<{
|
|
185
|
+
label: z.ZodString;
|
|
186
|
+
value: z.ZodNumber;
|
|
187
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
189
|
+
error: "error";
|
|
190
|
+
warning: "warning";
|
|
191
|
+
ok: "ok";
|
|
192
|
+
}>>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
195
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
196
|
+
horizontal: "horizontal";
|
|
197
|
+
vertical: "vertical";
|
|
198
|
+
}>>;
|
|
199
|
+
}, z.core.$strip>]>;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
export type Visualization = z.infer<typeof VisualizationSchema>;
|
|
202
|
+
/**
|
|
203
|
+
* Visualization endpoint response data
|
|
204
|
+
* PRD #320: Added toolsUsed for test validation
|
|
205
|
+
*/
|
|
206
|
+
export declare const VisualizationResponseDataSchema: z.ZodObject<{
|
|
207
|
+
title: z.ZodString;
|
|
208
|
+
visualizations: z.ZodArray<z.ZodObject<{
|
|
209
|
+
id: z.ZodString;
|
|
210
|
+
label: z.ZodString;
|
|
211
|
+
type: z.ZodEnum<{
|
|
212
|
+
code: "code";
|
|
213
|
+
mermaid: "mermaid";
|
|
214
|
+
cards: "cards";
|
|
215
|
+
table: "table";
|
|
216
|
+
diff: "diff";
|
|
217
|
+
"bar-chart": "bar-chart";
|
|
218
|
+
}>;
|
|
219
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
220
|
+
language: z.ZodString;
|
|
221
|
+
code: z.ZodString;
|
|
222
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
223
|
+
headers: z.ZodArray<z.ZodString>;
|
|
224
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
225
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
226
|
+
id: z.ZodString;
|
|
227
|
+
title: z.ZodString;
|
|
228
|
+
description: z.ZodOptional<z.ZodString>;
|
|
229
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
230
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
231
|
+
before: z.ZodObject<{
|
|
232
|
+
language: z.ZodString;
|
|
233
|
+
code: z.ZodString;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
after: z.ZodObject<{
|
|
236
|
+
language: z.ZodString;
|
|
237
|
+
code: z.ZodString;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
240
|
+
data: z.ZodArray<z.ZodObject<{
|
|
241
|
+
label: z.ZodString;
|
|
242
|
+
value: z.ZodNumber;
|
|
243
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
244
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
245
|
+
error: "error";
|
|
246
|
+
warning: "warning";
|
|
247
|
+
ok: "ok";
|
|
248
|
+
}>>;
|
|
249
|
+
}, z.core.$strip>>;
|
|
250
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
251
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
252
|
+
horizontal: "horizontal";
|
|
253
|
+
vertical: "vertical";
|
|
254
|
+
}>>;
|
|
255
|
+
}, z.core.$strip>]>;
|
|
256
|
+
}, z.core.$strip>>;
|
|
257
|
+
insights: z.ZodArray<z.ZodString>;
|
|
258
|
+
toolsUsed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
259
|
+
}, z.core.$strip>;
|
|
260
|
+
export type VisualizationResponseData = z.infer<typeof VisualizationResponseDataSchema>;
|
|
261
|
+
/**
|
|
262
|
+
* Full visualization endpoint response
|
|
263
|
+
*/
|
|
264
|
+
export declare const VisualizationResponseSchema: z.ZodObject<{
|
|
265
|
+
success: z.ZodLiteral<true>;
|
|
266
|
+
data: z.ZodObject<{
|
|
267
|
+
title: z.ZodString;
|
|
268
|
+
visualizations: z.ZodArray<z.ZodObject<{
|
|
269
|
+
id: z.ZodString;
|
|
270
|
+
label: z.ZodString;
|
|
271
|
+
type: z.ZodEnum<{
|
|
272
|
+
code: "code";
|
|
273
|
+
mermaid: "mermaid";
|
|
274
|
+
cards: "cards";
|
|
275
|
+
table: "table";
|
|
276
|
+
diff: "diff";
|
|
277
|
+
"bar-chart": "bar-chart";
|
|
278
|
+
}>;
|
|
279
|
+
content: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
280
|
+
language: z.ZodString;
|
|
281
|
+
code: z.ZodString;
|
|
282
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
283
|
+
headers: z.ZodArray<z.ZodString>;
|
|
284
|
+
rows: z.ZodArray<z.ZodArray<z.ZodString>>;
|
|
285
|
+
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
286
|
+
id: z.ZodString;
|
|
287
|
+
title: z.ZodString;
|
|
288
|
+
description: z.ZodOptional<z.ZodString>;
|
|
289
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
290
|
+
}, z.core.$strip>>, z.ZodObject<{
|
|
291
|
+
before: z.ZodObject<{
|
|
292
|
+
language: z.ZodString;
|
|
293
|
+
code: z.ZodString;
|
|
294
|
+
}, z.core.$strip>;
|
|
295
|
+
after: z.ZodObject<{
|
|
296
|
+
language: z.ZodString;
|
|
297
|
+
code: z.ZodString;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
300
|
+
data: z.ZodArray<z.ZodObject<{
|
|
301
|
+
label: z.ZodString;
|
|
302
|
+
value: z.ZodNumber;
|
|
303
|
+
max: z.ZodOptional<z.ZodNumber>;
|
|
304
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
305
|
+
error: "error";
|
|
306
|
+
warning: "warning";
|
|
307
|
+
ok: "ok";
|
|
308
|
+
}>>;
|
|
309
|
+
}, z.core.$strip>>;
|
|
310
|
+
unit: z.ZodOptional<z.ZodString>;
|
|
311
|
+
orientation: z.ZodOptional<z.ZodEnum<{
|
|
312
|
+
horizontal: "horizontal";
|
|
313
|
+
vertical: "vertical";
|
|
314
|
+
}>>;
|
|
315
|
+
}, z.core.$strip>]>;
|
|
316
|
+
}, z.core.$strip>>;
|
|
317
|
+
insights: z.ZodArray<z.ZodString>;
|
|
318
|
+
toolsUsed: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
319
|
+
}, z.core.$strip>;
|
|
320
|
+
error: z.ZodOptional<z.ZodUndefined>;
|
|
321
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
322
|
+
timestamp: z.ZodString;
|
|
323
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
324
|
+
version: z.ZodString;
|
|
325
|
+
}, z.core.$strip>>;
|
|
326
|
+
}, z.core.$strip>;
|
|
327
|
+
export type VisualizationResponse = z.infer<typeof VisualizationResponseSchema>;
|
|
328
|
+
/**
|
|
329
|
+
* Visualization endpoint error responses
|
|
330
|
+
*/
|
|
331
|
+
export declare const VisualizationNotFoundErrorSchema: z.ZodObject<{
|
|
332
|
+
success: z.ZodLiteral<false>;
|
|
333
|
+
data: z.ZodOptional<z.ZodUndefined>;
|
|
334
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
335
|
+
timestamp: z.ZodString;
|
|
336
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
337
|
+
version: z.ZodString;
|
|
338
|
+
}, z.core.$strip>>;
|
|
339
|
+
error: z.ZodObject<{
|
|
340
|
+
code: z.ZodLiteral<"SESSION_NOT_FOUND">;
|
|
341
|
+
message: z.ZodString;
|
|
342
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
343
|
+
}, z.core.$strip>;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
export declare const VisualizationServiceUnavailableErrorSchema: z.ZodObject<{
|
|
346
|
+
success: z.ZodLiteral<false>;
|
|
347
|
+
data: z.ZodOptional<z.ZodUndefined>;
|
|
348
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
349
|
+
timestamp: z.ZodString;
|
|
350
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
351
|
+
version: z.ZodString;
|
|
352
|
+
}, z.core.$strip>>;
|
|
353
|
+
error: z.ZodObject<{
|
|
354
|
+
code: z.ZodLiteral<"AI_NOT_CONFIGURED">;
|
|
355
|
+
message: z.ZodString;
|
|
356
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
357
|
+
}, z.core.$strip>;
|
|
358
|
+
}, z.core.$strip>;
|
|
359
|
+
export declare const VisualizationInternalErrorSchema: z.ZodObject<{
|
|
360
|
+
success: z.ZodLiteral<false>;
|
|
361
|
+
data: z.ZodOptional<z.ZodUndefined>;
|
|
362
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
363
|
+
timestamp: z.ZodString;
|
|
364
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
365
|
+
version: z.ZodString;
|
|
366
|
+
}, z.core.$strip>>;
|
|
367
|
+
error: z.ZodObject<{
|
|
368
|
+
code: z.ZodLiteral<"VISUALIZATION_ERROR">;
|
|
369
|
+
message: z.ZodString;
|
|
370
|
+
details: z.ZodOptional<z.ZodAny>;
|
|
371
|
+
}, z.core.$strip>;
|
|
372
|
+
}, z.core.$strip>;
|
|
373
|
+
//# sourceMappingURL=visualization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"visualization.d.ts","sourceRoot":"","sources":["../../../src/interfaces/schemas/visualization.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;;;GAIG;AACH,eAAO,MAAM,uBAAuB;;;;;;;EAOlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;iBAG5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;iBAKzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;kBAA0B,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;iBAG5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;iBAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;iBAIhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAOrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;GAGG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK1C,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAA+D,CAAC;AAExG,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;iBAM3C,CAAC;AAEH,eAAO,MAAM,0CAA0C;;;;;;;;;;;;;iBAMrD,CAAC;AAEH,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;iBAM3C,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Visualization Response Schemas
|
|
4
|
+
*
|
|
5
|
+
* Schemas for the /api/v1/visualize/:sessionId endpoint.
|
|
6
|
+
* PRD #354: REST API Route Registry with Auto-Generated OpenAPI and Test Fixtures
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.VisualizationInternalErrorSchema = exports.VisualizationServiceUnavailableErrorSchema = exports.VisualizationNotFoundErrorSchema = exports.VisualizationResponseSchema = exports.VisualizationResponseDataSchema = exports.VisualizationSchema = exports.VisualizationContentSchema = exports.BarChartContentSchema = exports.BarChartDataItemSchema = exports.DiffContentSchema = exports.CardsContentSchema = exports.CardItemSchema = exports.TableContentSchema = exports.CodeContentSchema = exports.VisualizationTypeSchema = void 0;
|
|
10
|
+
const zod_1 = require("zod");
|
|
11
|
+
const common_1 = require("./common");
|
|
12
|
+
/**
|
|
13
|
+
* Visualization types supported by the API
|
|
14
|
+
* PRD #320: Added 'diff' type for before/after comparisons
|
|
15
|
+
* PRD #328: Added 'bar-chart' type for metrics visualization
|
|
16
|
+
*/
|
|
17
|
+
exports.VisualizationTypeSchema = zod_1.z.enum([
|
|
18
|
+
'mermaid',
|
|
19
|
+
'cards',
|
|
20
|
+
'code',
|
|
21
|
+
'table',
|
|
22
|
+
'diff',
|
|
23
|
+
'bar-chart',
|
|
24
|
+
]);
|
|
25
|
+
/**
|
|
26
|
+
* Code visualization content
|
|
27
|
+
*/
|
|
28
|
+
exports.CodeContentSchema = zod_1.z.object({
|
|
29
|
+
language: zod_1.z.string().describe('Programming language for syntax highlighting'),
|
|
30
|
+
code: zod_1.z.string().describe('Code content'),
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Table visualization content
|
|
34
|
+
*/
|
|
35
|
+
exports.TableContentSchema = zod_1.z.object({
|
|
36
|
+
headers: zod_1.z.array(zod_1.z.string()).describe('Column headers'),
|
|
37
|
+
rows: zod_1.z.array(zod_1.z.array(zod_1.z.string())).describe('Table rows'),
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* Card item in cards visualization
|
|
41
|
+
*/
|
|
42
|
+
exports.CardItemSchema = zod_1.z.object({
|
|
43
|
+
id: zod_1.z.string().describe('Unique card identifier'),
|
|
44
|
+
title: zod_1.z.string().describe('Card title'),
|
|
45
|
+
description: zod_1.z.string().optional().describe('Card description'),
|
|
46
|
+
tags: zod_1.z.array(zod_1.z.string()).optional().describe('Tags/labels for the card'),
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Cards visualization content
|
|
50
|
+
*/
|
|
51
|
+
exports.CardsContentSchema = zod_1.z.array(exports.CardItemSchema);
|
|
52
|
+
/**
|
|
53
|
+
* Diff visualization content (PRD #320)
|
|
54
|
+
*/
|
|
55
|
+
exports.DiffContentSchema = zod_1.z.object({
|
|
56
|
+
before: exports.CodeContentSchema.describe('Code before changes'),
|
|
57
|
+
after: exports.CodeContentSchema.describe('Code after changes'),
|
|
58
|
+
});
|
|
59
|
+
/**
|
|
60
|
+
* Bar chart data item (PRD #328)
|
|
61
|
+
*/
|
|
62
|
+
exports.BarChartDataItemSchema = zod_1.z.object({
|
|
63
|
+
label: zod_1.z.string().describe('Data point label (e.g., "node-1", "kube-system")'),
|
|
64
|
+
value: zod_1.z.number().describe('Numeric value'),
|
|
65
|
+
max: zod_1.z.number().optional().describe('Maximum value for percentage calculation'),
|
|
66
|
+
status: zod_1.z.enum(['error', 'warning', 'ok']).optional().describe('Status for color-coding'),
|
|
67
|
+
});
|
|
68
|
+
/**
|
|
69
|
+
* Bar chart visualization content (PRD #328)
|
|
70
|
+
*/
|
|
71
|
+
exports.BarChartContentSchema = zod_1.z.object({
|
|
72
|
+
data: zod_1.z.array(exports.BarChartDataItemSchema).describe('Chart data points'),
|
|
73
|
+
unit: zod_1.z.string().optional().describe('Unit label (e.g., "Gi", "cores", "%")'),
|
|
74
|
+
orientation: zod_1.z.enum(['horizontal', 'vertical']).optional().describe('Chart orientation'),
|
|
75
|
+
});
|
|
76
|
+
/**
|
|
77
|
+
* Visualization content union type
|
|
78
|
+
* Content varies based on visualization type
|
|
79
|
+
*/
|
|
80
|
+
exports.VisualizationContentSchema = zod_1.z.union([
|
|
81
|
+
zod_1.z.string(), // mermaid diagram code
|
|
82
|
+
exports.CodeContentSchema, // code block
|
|
83
|
+
exports.TableContentSchema, // table
|
|
84
|
+
exports.CardsContentSchema, // array of cards
|
|
85
|
+
exports.DiffContentSchema, // diff view
|
|
86
|
+
exports.BarChartContentSchema, // bar chart
|
|
87
|
+
]);
|
|
88
|
+
/**
|
|
89
|
+
* Individual visualization item
|
|
90
|
+
*/
|
|
91
|
+
exports.VisualizationSchema = zod_1.z.object({
|
|
92
|
+
id: zod_1.z.string().describe('Unique visualization identifier'),
|
|
93
|
+
label: zod_1.z.string().describe('Display label'),
|
|
94
|
+
type: exports.VisualizationTypeSchema.describe('Visualization type'),
|
|
95
|
+
content: exports.VisualizationContentSchema.describe('Visualization content (varies by type)'),
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* Visualization endpoint response data
|
|
99
|
+
* PRD #320: Added toolsUsed for test validation
|
|
100
|
+
*/
|
|
101
|
+
exports.VisualizationResponseDataSchema = zod_1.z.object({
|
|
102
|
+
title: zod_1.z.string().describe('Title of the visualization'),
|
|
103
|
+
visualizations: zod_1.z.array(exports.VisualizationSchema).describe('Array of visualizations'),
|
|
104
|
+
insights: zod_1.z.array(zod_1.z.string()).describe('AI-generated insights about the data'),
|
|
105
|
+
toolsUsed: zod_1.z.array(zod_1.z.string()).optional().describe('Tools called during visualization generation'),
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* Full visualization endpoint response
|
|
109
|
+
*/
|
|
110
|
+
exports.VisualizationResponseSchema = (0, common_1.createSuccessResponseSchema)(exports.VisualizationResponseDataSchema);
|
|
111
|
+
/**
|
|
112
|
+
* Visualization endpoint error responses
|
|
113
|
+
*/
|
|
114
|
+
exports.VisualizationNotFoundErrorSchema = common_1.NotFoundErrorSchema.extend({
|
|
115
|
+
error: zod_1.z.object({
|
|
116
|
+
code: zod_1.z.literal('SESSION_NOT_FOUND'),
|
|
117
|
+
message: zod_1.z.string(),
|
|
118
|
+
details: zod_1.z.any().optional(),
|
|
119
|
+
}),
|
|
120
|
+
});
|
|
121
|
+
exports.VisualizationServiceUnavailableErrorSchema = common_1.ServiceUnavailableErrorSchema.extend({
|
|
122
|
+
error: zod_1.z.object({
|
|
123
|
+
code: zod_1.z.literal('AI_NOT_CONFIGURED'),
|
|
124
|
+
message: zod_1.z.string(),
|
|
125
|
+
details: zod_1.z.any().optional(),
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
exports.VisualizationInternalErrorSchema = common_1.InternalServerErrorSchema.extend({
|
|
129
|
+
error: zod_1.z.object({
|
|
130
|
+
code: zod_1.z.literal('VISUALIZATION_ERROR'),
|
|
131
|
+
message: zod_1.z.string(),
|
|
132
|
+
details: zod_1.z.any().optional(),
|
|
133
|
+
}),
|
|
134
|
+
});
|
package/dist/mcp/server.js
CHANGED
|
@@ -47,6 +47,7 @@ const mcp_js_1 = require("../interfaces/mcp.js");
|
|
|
47
47
|
const index_js_1 = require("../core/index.js");
|
|
48
48
|
const index_js_2 = require("../core/tracing/index.js");
|
|
49
49
|
const index_js_3 = require("../core/telemetry/index.js");
|
|
50
|
+
const plugin_registry_js_1 = require("../core/plugin-registry.js");
|
|
50
51
|
const fs_1 = require("fs");
|
|
51
52
|
const path_1 = __importDefault(require("path"));
|
|
52
53
|
const plugin_manager_js_1 = require("../core/plugin-manager.js");
|
|
@@ -98,7 +99,7 @@ async function main() {
|
|
|
98
99
|
fs.unlinkSync(testFile);
|
|
99
100
|
process.stderr.write(`Session directory validated: ${sessionDir}\n`);
|
|
100
101
|
}
|
|
101
|
-
catch
|
|
102
|
+
catch {
|
|
102
103
|
process.stderr.write(`FATAL: Session directory is not writable: ${sessionDir}\n`);
|
|
103
104
|
process.stderr.write('Solution: Fix directory permissions or use a different directory\n');
|
|
104
105
|
process.exit(1);
|
|
@@ -160,10 +161,10 @@ async function main() {
|
|
|
160
161
|
else {
|
|
161
162
|
process.stderr.write('No plugins configured (mount plugins.json at /etc/dot-ai/plugins.json to enable)\n');
|
|
162
163
|
}
|
|
163
|
-
// PRD #
|
|
164
|
-
// This
|
|
164
|
+
// PRD #359: Initialize unified plugin registry for all plugin tool invocations
|
|
165
|
+
// This replaces scattered plugin manager passing (telemetry, vector tools, etc.)
|
|
165
166
|
if (pluginConfigs.length > 0) {
|
|
166
|
-
(0,
|
|
167
|
+
(0, plugin_registry_js_1.initializePluginRegistry)(pluginManager);
|
|
167
168
|
}
|
|
168
169
|
// Create and configure MCP server
|
|
169
170
|
const mcpServer = new mcp_js_1.MCPServer(dotAI, {
|
|
@@ -23,7 +23,7 @@ export declare const ANSWERQUESTION_TOOL_INPUT_SCHEMA: {
|
|
|
23
23
|
export declare function handleAnswerQuestionTool(args: {
|
|
24
24
|
solutionId: string;
|
|
25
25
|
stage: 'required' | 'basic' | 'advanced' | 'open';
|
|
26
|
-
answers: Record<string,
|
|
26
|
+
answers: Record<string, unknown>;
|
|
27
27
|
interaction_id?: string;
|
|
28
28
|
}, dotAI: DotAI, logger: Logger, requestId: string): Promise<{
|
|
29
29
|
content: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"answer-question.d.ts","sourceRoot":"","sources":["../../src/tools/answer-question.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAuEhD,eAAO,MAAM,wBAAwB,mBAAmB,CAAC;AACzD,eAAO,MAAM,+BAA+B,8HAA4H,CAAC;AAGzK,eAAO,MAAM,gCAAgC;;;;;;;;;;CAK5C,CAAC;AAyhBF;;GAEG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,EAC1I,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAqVxD"}
|
|
@@ -140,7 +140,7 @@ function getCurrentStage(solution) {
|
|
|
140
140
|
const basicComplete = !hasBasic || solution.questions.basic.every((q) => q.answer !== undefined);
|
|
141
141
|
const advancedComplete = !hasAdvanced || solution.questions.advanced.every((q) => q.answer !== undefined);
|
|
142
142
|
// For Helm solutions, treat open as always complete (skip it)
|
|
143
|
-
const openComplete = isHelm || !hasOpen || solution.questions.open
|
|
143
|
+
const openComplete = isHelm || !hasOpen || solution.questions.open?.answer !== undefined;
|
|
144
144
|
// Determine current stage
|
|
145
145
|
if (!requiredComplete) {
|
|
146
146
|
// For Helm: skip open in nextStage calculation
|
|
@@ -257,11 +257,11 @@ function validateStageTransition(currentStage, requestedStage, solution) {
|
|
|
257
257
|
function getQuestionsForStage(solution, stage) {
|
|
258
258
|
switch (stage) {
|
|
259
259
|
case 'required':
|
|
260
|
-
return solution.questions.required || [];
|
|
260
|
+
return (solution.questions.required || []);
|
|
261
261
|
case 'basic':
|
|
262
|
-
return solution.questions.basic || [];
|
|
262
|
+
return (solution.questions.basic || []);
|
|
263
263
|
case 'advanced':
|
|
264
|
-
return solution.questions.advanced || [];
|
|
264
|
+
return (solution.questions.advanced || []);
|
|
265
265
|
case 'open':
|
|
266
266
|
return solution.questions.open ? [solution.questions.open] : [];
|
|
267
267
|
default:
|
|
@@ -310,7 +310,8 @@ function getStageGuidance(stage, isHelm = false) {
|
|
|
310
310
|
*/
|
|
311
311
|
async function analyzeResourceNeeds(currentSolution, openResponse, context, interaction_id) {
|
|
312
312
|
// Get available resources from solution or use defaults
|
|
313
|
-
const
|
|
313
|
+
const solutionWithResources = currentSolution;
|
|
314
|
+
const availableResources = solutionWithResources.availableResources || {
|
|
314
315
|
resources: [],
|
|
315
316
|
custom: []
|
|
316
317
|
};
|
|
@@ -318,7 +319,7 @@ async function analyzeResourceNeeds(currentSolution, openResponse, context, inte
|
|
|
318
319
|
const availableResourceTypes = [
|
|
319
320
|
...(availableResources.resources || []),
|
|
320
321
|
...(availableResources.custom || [])
|
|
321
|
-
].map((r) => r.kind || r);
|
|
322
|
+
].map((r) => (typeof r === 'object' ? r.kind : r) || r);
|
|
322
323
|
const analysisPrompt = (0, shared_prompt_loader_1.loadPrompt)('resource-analysis', {
|
|
323
324
|
current_solution: JSON.stringify(currentSolution, null, 2),
|
|
324
325
|
user_request: openResponse,
|
|
@@ -563,7 +564,7 @@ async function handleAnswerQuestionTool(args, dotAI, logger, requestId) {
|
|
|
563
564
|
// Handle open question
|
|
564
565
|
const openAnswer = args.answers.open;
|
|
565
566
|
if (openAnswer && solution.questions.open) {
|
|
566
|
-
solution.questions.open.answer = openAnswer;
|
|
567
|
+
solution.questions.open.answer = String(openAnswer);
|
|
567
568
|
}
|
|
568
569
|
}
|
|
569
570
|
else {
|
|
@@ -600,7 +601,7 @@ async function handleAnswerQuestionTool(args, dotAI, logger, requestId) {
|
|
|
600
601
|
solutionId: args.solutionId,
|
|
601
602
|
openAnswer
|
|
602
603
|
});
|
|
603
|
-
solution = await enhanceSolutionWithOpenAnswer(solution, openAnswer, { requestId, logger, dotAI }, args.interaction_id);
|
|
604
|
+
solution = await enhanceSolutionWithOpenAnswer(solution, String(openAnswer), { requestId, logger, dotAI }, args.interaction_id);
|
|
604
605
|
// Save enhanced solution
|
|
605
606
|
sessionManager.replaceSession(args.solutionId, solution);
|
|
606
607
|
logger.info('Enhanced solution saved', {
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
import { DotAI } from '../core/index';
|
|
7
7
|
import { Logger } from '../core/error-handling';
|
|
8
|
-
import type { PluginManager } from '../core/plugin-manager';
|
|
9
8
|
export declare const DEPLOYMANIFESTS_TOOL_NAME = "deployManifests";
|
|
10
9
|
export declare const DEPLOYMANIFESTS_TOOL_DESCRIPTION = "Deploy Kubernetes manifests from generated solution with kubectl apply --wait";
|
|
11
10
|
export declare const DEPLOYMANIFESTS_TOOL_INPUT_SCHEMA: {
|
|
@@ -16,10 +15,13 @@ export declare const DEPLOYMANIFESTS_TOOL_INPUT_SCHEMA: {
|
|
|
16
15
|
* Direct MCP tool handler for deployManifests functionality
|
|
17
16
|
* PRD #343: pluginManager required for kubectl operations
|
|
18
17
|
*/
|
|
18
|
+
/**
|
|
19
|
+
* PRD #359: Uses unified plugin registry for kubectl operations
|
|
20
|
+
*/
|
|
19
21
|
export declare function handleDeployManifestsTool(args: {
|
|
20
22
|
solutionId: string;
|
|
21
23
|
timeout?: number;
|
|
22
|
-
}, dotAI: DotAI, logger: Logger, requestId: string
|
|
24
|
+
}, dotAI: DotAI, logger: Logger, requestId: string): Promise<{
|
|
23
25
|
content: {
|
|
24
26
|
type: 'text';
|
|
25
27
|
text: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-manifests.d.ts","sourceRoot":"","sources":["../../src/tools/deploy-manifests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"deploy-manifests.d.ts","sourceRoot":"","sources":["../../src/tools/deploy-manifests.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAmChD,eAAO,MAAM,yBAAyB,oBAAoB,CAAC;AAC3D,eAAO,MAAM,gCAAgC,kFAAkF,CAAC;AAGhI,eAAO,MAAM,iCAAiC;;;CAG7C,CAAC;AAEF;;;GAGG;AACH;;GAEG;AACH,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,EAC9C,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;IAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAAC,CAsOxD"}
|