@mcp-com-ai/plugin-capability-graph 0.0.0-stage → 1.3.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/LICENSE +92 -0
- package/README.md +443 -2
- package/dist/canonical.d.ts +9 -0
- package/dist/classifier.d.ts +11 -0
- package/dist/commands.d.ts +9 -0
- package/dist/compiler.d.ts +9 -0
- package/dist/evaluation.d.ts +24 -0
- package/dist/execution-digests.d.ts +7 -0
- package/dist/execution-envelope.d.ts +19 -0
- package/dist/execution-preflight.d.ts +38 -0
- package/dist/executor.d.ts +21 -0
- package/dist/extensions.d.ts +100 -0
- package/dist/fact-audit.d.ts +34 -0
- package/dist/fact-closure.d.ts +41 -0
- package/dist/graphml.d.ts +2 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +315 -0
- package/dist/json-schema.d.ts +6 -0
- package/dist/openapi-document.d.ts +9 -0
- package/dist/planner.d.ts +14 -0
- package/dist/planning-gates.d.ts +10 -0
- package/dist/response-outcomes.d.ts +6 -0
- package/dist/runtime.d.ts +15 -0
- package/dist/runtime.js +5 -0
- package/dist/triggers.d.ts +15 -0
- package/dist/visualization-api.d.ts +3 -0
- package/dist/visualization-api.js +163 -0
- package/dist/visualization-assets.d.ts +2 -0
- package/dist/visualization-flow-cards.d.ts +26 -0
- package/dist/visualization-renderer.d.ts +2 -0
- package/dist/visualization-shared.d.ts +7 -0
- package/dist/visualization-types.d.ts +343 -0
- package/dist/visualization.d.ts +3 -0
- package/package.json +66 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { CapabilityGraphOperationNode, CapabilityGraphPlanningStepV1, CapabilityGraphV1 } from "@mcp-com-ai/core";
|
|
2
|
+
import type { CapabilityGraphVisualizationFlowCardsV1, CapabilityGraphVisualizationFlowInputHintV1, CapabilityGraphVisualizationFlowInputV1, CapabilityGraphVisualizationPlanTraceInputV1 } from "./visualization-types";
|
|
3
|
+
/**
|
|
4
|
+
* Project a generation-time plan trace into Flow Cards: one start card, one
|
|
5
|
+
* action card per planner step in planner order, and one outcome card.
|
|
6
|
+
*
|
|
7
|
+
* Cards are derived from the trace and graph only. Dependency levels and
|
|
8
|
+
* input hints are advisory presentation; they never reorder or alter the plan.
|
|
9
|
+
*/
|
|
10
|
+
export declare function projectFlowCards(graph: CapabilityGraphV1, input: CapabilityGraphVisualizationPlanTraceInputV1): CapabilityGraphVisualizationFlowCardsV1;
|
|
11
|
+
/**
|
|
12
|
+
* Step *j* depends on an earlier step *i* when *i* is the latest earlier
|
|
13
|
+
* producer of a fact *j* requires, when *i* removes a fact *j* requires or
|
|
14
|
+
* produces, or when *j* removes a fact *i* requires or produces. A fact no earlier step
|
|
15
|
+
* produced came from the initial state and creates no dependency.
|
|
16
|
+
*/
|
|
17
|
+
export declare function stepDependencies(steps: readonly CapabilityGraphPlanningStepV1[]): number[][];
|
|
18
|
+
export declare function dependencyLevels(dependencies: readonly number[][]): number[];
|
|
19
|
+
/**
|
|
20
|
+
* Advisory required-input hint for an operation step. Inputs count as
|
|
21
|
+
* possibly linked when an earlier step's operation has a planning-eligible
|
|
22
|
+
* operation link to this operation; which parameters it maps is unknown.
|
|
23
|
+
*/
|
|
24
|
+
export declare function flowInputHint(graph: CapabilityGraphV1, steps: readonly CapabilityGraphPlanningStepV1[], step: CapabilityGraphPlanningStepV1, operations: ReadonlyMap<string, CapabilityGraphOperationNode>): CapabilityGraphVisualizationFlowInputHintV1 | undefined;
|
|
25
|
+
/** Required parameters and required body property names; never credentials. */
|
|
26
|
+
export declare function requiredInputs(operation: CapabilityGraphOperationNode): CapabilityGraphVisualizationFlowInputV1[];
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { type CapabilityGraphVisualizationDocumentV1, type CapabilityGraphVisualizationRenderOptions } from "./visualization-types";
|
|
2
|
+
export declare function renderCapabilityGraphVisualizationHtml(document: CapabilityGraphVisualizationDocumentV1, options?: CapabilityGraphVisualizationRenderOptions): Promise<string>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PlanningFactV1 } from "@mcp-com-ai/core";
|
|
2
|
+
/** Helpers shared by the pure visualization projections. */
|
|
3
|
+
export declare function isTechnicalFact(fact: PlanningFactV1): boolean;
|
|
4
|
+
export declare function factKey(fact: PlanningFactV1): string;
|
|
5
|
+
export declare function copyFact(fact: PlanningFactV1): PlanningFactV1;
|
|
6
|
+
export declare function domId(identity: string): string;
|
|
7
|
+
export declare function searchText(values: readonly unknown[]): string;
|
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
import type { CapabilityGraphAuthorizationRequirement, CapabilityGraphBodyVariant, CapabilityGraphDiagnostic, CapabilityGraphEffects, CapabilityGraphInputDescriptor, CapabilityGraphOperationProvenance, CapabilityGraphOutputDescriptor, CapabilityGraphPlanningGateV1, CapabilityGraphPlanningOutcome, CapabilityGraphPlanningResultV1, CapabilityGraphPlanningStepV1, CapabilityGraphPlanningTransitionSourceV1, CapabilityGraphProvenance, CapabilityGraphSource, PlanningFactV1 } from "@mcp-com-ai/core";
|
|
2
|
+
import type { CapabilityGraphFactClosureV1, CapabilityGraphFactFindingV1 } from "./fact-closure";
|
|
3
|
+
type CapabilityGraphDiagnosticSeverity = CapabilityGraphDiagnostic["severity"];
|
|
4
|
+
export declare const CAPABILITY_GRAPH_VISUALIZATION_LIMITS: Readonly<{
|
|
5
|
+
maxInputBytes: number;
|
|
6
|
+
maxNodes: 5000;
|
|
7
|
+
maxEdges: 20000;
|
|
8
|
+
maxPlanningTransitions: 10000;
|
|
9
|
+
maxPlanningFacts: 10000;
|
|
10
|
+
maxStateRelations: 50000;
|
|
11
|
+
maxPlanTraceSteps: 1000;
|
|
12
|
+
maxDiagnostics: 2000;
|
|
13
|
+
maxOutputBytes: number;
|
|
14
|
+
}>;
|
|
15
|
+
export type CapabilityGraphVisualizationLimitName = keyof typeof CAPABILITY_GRAPH_VISUALIZATION_LIMITS;
|
|
16
|
+
export interface CapabilityGraphVisualizationLimitsV1 {
|
|
17
|
+
readonly maxInputBytes: number;
|
|
18
|
+
readonly maxNodes: number;
|
|
19
|
+
readonly maxEdges: number;
|
|
20
|
+
readonly maxPlanningTransitions: number;
|
|
21
|
+
readonly maxPlanningFacts: number;
|
|
22
|
+
readonly maxStateRelations: number;
|
|
23
|
+
readonly maxPlanTraceSteps: number;
|
|
24
|
+
readonly maxDiagnostics: number;
|
|
25
|
+
readonly maxOutputBytes: number;
|
|
26
|
+
}
|
|
27
|
+
export type CapabilityGraphVisualizationNodeKind = "capability" | "operation";
|
|
28
|
+
export type CapabilityGraphVisualizationItemKind = CapabilityGraphVisualizationNodeKind | "edge" | "transition" | "fact" | "plan-state" | "flow-card" | "diagnostic";
|
|
29
|
+
export interface CapabilityGraphVisualizationPointV1 {
|
|
30
|
+
readonly x: number;
|
|
31
|
+
readonly y: number;
|
|
32
|
+
}
|
|
33
|
+
export interface CapabilityGraphVisualizationNodeV1 {
|
|
34
|
+
readonly identity: string;
|
|
35
|
+
readonly graphId: string;
|
|
36
|
+
readonly domId: string;
|
|
37
|
+
readonly kind: CapabilityGraphVisualizationNodeKind;
|
|
38
|
+
readonly label: string;
|
|
39
|
+
readonly searchText: string;
|
|
40
|
+
readonly position: CapabilityGraphVisualizationPointV1;
|
|
41
|
+
readonly relatedIdentities: readonly string[];
|
|
42
|
+
readonly taxonomy: readonly string[];
|
|
43
|
+
readonly provenance: CapabilityGraphProvenance;
|
|
44
|
+
readonly description?: string;
|
|
45
|
+
readonly purpose?: string;
|
|
46
|
+
readonly method?: string;
|
|
47
|
+
readonly path?: string;
|
|
48
|
+
readonly useWhen?: readonly string[];
|
|
49
|
+
readonly avoidWhen?: readonly string[];
|
|
50
|
+
readonly inputs?: readonly CapabilityGraphInputDescriptor[];
|
|
51
|
+
readonly bodyVariants?: readonly CapabilityGraphBodyVariant[];
|
|
52
|
+
readonly outputs?: readonly CapabilityGraphOutputDescriptor[];
|
|
53
|
+
readonly effects?: CapabilityGraphEffects;
|
|
54
|
+
readonly authorization?: readonly CapabilityGraphAuthorizationRequirement[];
|
|
55
|
+
readonly prerequisites?: readonly string[];
|
|
56
|
+
readonly fieldProvenance?: CapabilityGraphOperationProvenance;
|
|
57
|
+
}
|
|
58
|
+
export interface CapabilityGraphVisualizationEdgeV1 {
|
|
59
|
+
readonly identity: string;
|
|
60
|
+
readonly graphId: string;
|
|
61
|
+
readonly domId: string;
|
|
62
|
+
readonly type: "capability-operation" | "operation-link";
|
|
63
|
+
readonly sourceIdentity: string;
|
|
64
|
+
readonly targetIdentity: string;
|
|
65
|
+
readonly path: string;
|
|
66
|
+
readonly label?: string;
|
|
67
|
+
readonly planningEligible: boolean;
|
|
68
|
+
readonly provenance: CapabilityGraphProvenance;
|
|
69
|
+
}
|
|
70
|
+
export interface CapabilityGraphVisualizationTransitionV1 {
|
|
71
|
+
readonly identity: string;
|
|
72
|
+
readonly graphId: string;
|
|
73
|
+
readonly domId: string;
|
|
74
|
+
readonly target: {
|
|
75
|
+
readonly kind: "operation" | "workflow";
|
|
76
|
+
readonly id: string;
|
|
77
|
+
};
|
|
78
|
+
readonly requires: readonly PlanningFactV1[];
|
|
79
|
+
readonly produces: readonly PlanningFactV1[];
|
|
80
|
+
readonly removes: readonly PlanningFactV1[];
|
|
81
|
+
readonly cost: number;
|
|
82
|
+
readonly gates: readonly CapabilityGraphPlanningGateV1[];
|
|
83
|
+
readonly sources: readonly CapabilityGraphPlanningTransitionSourceV1[];
|
|
84
|
+
readonly searchText: string;
|
|
85
|
+
}
|
|
86
|
+
export type CapabilityGraphVisualizationStateRelationKind = "requires" | "produces" | "removes";
|
|
87
|
+
export interface CapabilityGraphVisualizationFactNodeV1 {
|
|
88
|
+
readonly identity: string;
|
|
89
|
+
readonly domId: string;
|
|
90
|
+
readonly fact: PlanningFactV1;
|
|
91
|
+
readonly label: string;
|
|
92
|
+
readonly technical: boolean;
|
|
93
|
+
readonly position: CapabilityGraphVisualizationPointV1;
|
|
94
|
+
readonly producerIdentities: readonly string[];
|
|
95
|
+
readonly consumerIdentities: readonly string[];
|
|
96
|
+
readonly removerIdentities: readonly string[];
|
|
97
|
+
readonly searchText: string;
|
|
98
|
+
}
|
|
99
|
+
export interface CapabilityGraphVisualizationStateTransitionNodeV1 {
|
|
100
|
+
readonly identity: string;
|
|
101
|
+
readonly domId: string;
|
|
102
|
+
readonly transitionIdentity: string;
|
|
103
|
+
readonly label: string;
|
|
104
|
+
readonly position: CapabilityGraphVisualizationPointV1;
|
|
105
|
+
readonly searchText: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CapabilityGraphVisualizationStateRelationV1 {
|
|
108
|
+
readonly identity: string;
|
|
109
|
+
readonly domId: string;
|
|
110
|
+
readonly kind: CapabilityGraphVisualizationStateRelationKind;
|
|
111
|
+
readonly factIdentity: string;
|
|
112
|
+
readonly transitionIdentity: string;
|
|
113
|
+
readonly sourceIdentity: string;
|
|
114
|
+
readonly targetIdentity: string;
|
|
115
|
+
readonly path: string;
|
|
116
|
+
readonly sources: readonly CapabilityGraphPlanningTransitionSourceV1[];
|
|
117
|
+
}
|
|
118
|
+
export interface CapabilityGraphVisualizationBusinessStatesV1 {
|
|
119
|
+
readonly schemaVersion: "1";
|
|
120
|
+
readonly facts: readonly CapabilityGraphVisualizationFactNodeV1[];
|
|
121
|
+
readonly transitions: readonly CapabilityGraphVisualizationStateTransitionNodeV1[];
|
|
122
|
+
readonly relations: readonly CapabilityGraphVisualizationStateRelationV1[];
|
|
123
|
+
readonly layout: CapabilityGraphVisualizationLayoutV1;
|
|
124
|
+
readonly counts: {
|
|
125
|
+
readonly facts: number;
|
|
126
|
+
readonly businessFacts: number;
|
|
127
|
+
readonly technicalFacts: number;
|
|
128
|
+
readonly relations: number;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
export interface CapabilityGraphVisualizationPlanStateV1 {
|
|
132
|
+
readonly identity: string;
|
|
133
|
+
readonly domId: string;
|
|
134
|
+
readonly index: number;
|
|
135
|
+
readonly label: string;
|
|
136
|
+
readonly facts: readonly PlanningFactV1[];
|
|
137
|
+
readonly added: readonly PlanningFactV1[];
|
|
138
|
+
readonly removed: readonly PlanningFactV1[];
|
|
139
|
+
readonly transitionId?: string;
|
|
140
|
+
readonly target?: CapabilityGraphPlanningStepV1["target"];
|
|
141
|
+
}
|
|
142
|
+
export interface CapabilityGraphVisualizationPlanTraceV1 {
|
|
143
|
+
readonly schemaVersion: "1";
|
|
144
|
+
readonly outcome: CapabilityGraphPlanningOutcome;
|
|
145
|
+
readonly graphFingerprint: string;
|
|
146
|
+
readonly initialFacts: readonly PlanningFactV1[];
|
|
147
|
+
readonly goalFacts: readonly PlanningFactV1[];
|
|
148
|
+
readonly totalCost: number;
|
|
149
|
+
readonly states: readonly CapabilityGraphVisualizationPlanStateV1[];
|
|
150
|
+
readonly unsatisfiedGates: readonly CapabilityGraphPlanningGateV1[];
|
|
151
|
+
readonly diagnostics: readonly CapabilityGraphDiagnostic[];
|
|
152
|
+
}
|
|
153
|
+
export interface CapabilityGraphVisualizationPlanTraceInputV1 {
|
|
154
|
+
readonly initialFacts: readonly PlanningFactV1[];
|
|
155
|
+
readonly goalFacts: readonly PlanningFactV1[];
|
|
156
|
+
readonly result: CapabilityGraphPlanningResultV1;
|
|
157
|
+
/**
|
|
158
|
+
* Gate codes supplied to the planner. When present with `principalSupplied`,
|
|
159
|
+
* Flow Cards attribute waits to exact steps; otherwise they fall back to
|
|
160
|
+
* matching the result's unsatisfied gates.
|
|
161
|
+
*/
|
|
162
|
+
readonly satisfiedGates?: readonly string[];
|
|
163
|
+
readonly principalSupplied?: boolean;
|
|
164
|
+
}
|
|
165
|
+
export type CapabilityGraphVisualizationFlowCardKind = "start" | "action" | "outcome";
|
|
166
|
+
export interface CapabilityGraphVisualizationFlowWaitV1 {
|
|
167
|
+
readonly kind: CapabilityGraphPlanningGateV1["kind"];
|
|
168
|
+
readonly code: string;
|
|
169
|
+
readonly detail?: string;
|
|
170
|
+
}
|
|
171
|
+
export interface CapabilityGraphVisualizationFlowOtherwiseV1 {
|
|
172
|
+
readonly status: string;
|
|
173
|
+
readonly produces: readonly PlanningFactV1[];
|
|
174
|
+
readonly removes: readonly PlanningFactV1[];
|
|
175
|
+
}
|
|
176
|
+
export interface CapabilityGraphVisualizationFlowInputV1 {
|
|
177
|
+
readonly name: string;
|
|
178
|
+
readonly location: string;
|
|
179
|
+
}
|
|
180
|
+
export interface CapabilityGraphVisualizationFlowLinkSourceV1 {
|
|
181
|
+
readonly edgeIdentity: string;
|
|
182
|
+
readonly fromStep: number;
|
|
183
|
+
readonly label?: string;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Advisory required-input hint. Never a planning gate and never a claim about
|
|
187
|
+
* which parameter a Link maps: V1 graphs do not retain Link mappings.
|
|
188
|
+
*/
|
|
189
|
+
export interface CapabilityGraphVisualizationFlowInputHintV1 {
|
|
190
|
+
readonly status: "needs-input" | "may-be-linked";
|
|
191
|
+
readonly inputs: readonly CapabilityGraphVisualizationFlowInputV1[];
|
|
192
|
+
readonly links: readonly CapabilityGraphVisualizationFlowLinkSourceV1[];
|
|
193
|
+
}
|
|
194
|
+
/** Allowlisted declared event; descriptive only. */
|
|
195
|
+
export interface CapabilityGraphVisualizationTriggerV1 {
|
|
196
|
+
readonly id: string;
|
|
197
|
+
readonly kind: "webhook" | "callback";
|
|
198
|
+
readonly name: string;
|
|
199
|
+
readonly method: string;
|
|
200
|
+
readonly expression?: string;
|
|
201
|
+
readonly operationId?: string;
|
|
202
|
+
readonly purpose: string;
|
|
203
|
+
readonly produces: readonly PlanningFactV1[];
|
|
204
|
+
}
|
|
205
|
+
export interface CapabilityGraphVisualizationFlowCardV1 {
|
|
206
|
+
readonly identity: string;
|
|
207
|
+
readonly domId: string;
|
|
208
|
+
readonly kind: CapabilityGraphVisualizationFlowCardKind;
|
|
209
|
+
readonly label: string;
|
|
210
|
+
/** One-based planner step number for action cards. */
|
|
211
|
+
readonly step?: number;
|
|
212
|
+
/** Dependency level derived from declared facts; action cards only. */
|
|
213
|
+
readonly level?: number;
|
|
214
|
+
readonly dependsOn: readonly string[];
|
|
215
|
+
readonly transitionId?: string;
|
|
216
|
+
readonly target?: CapabilityGraphPlanningStepV1["target"];
|
|
217
|
+
readonly effectMode?: string;
|
|
218
|
+
readonly purpose?: string;
|
|
219
|
+
readonly requires: readonly PlanningFactV1[];
|
|
220
|
+
readonly produces: readonly PlanningFactV1[];
|
|
221
|
+
readonly removes: readonly PlanningFactV1[];
|
|
222
|
+
readonly waits: readonly CapabilityGraphVisualizationFlowWaitV1[];
|
|
223
|
+
/** Declared response outcomes shown as "Otherwise" branches; never planned. */
|
|
224
|
+
readonly otherwise?: readonly CapabilityGraphVisualizationFlowOtherwiseV1[];
|
|
225
|
+
readonly inputHint?: CapabilityGraphVisualizationFlowInputHintV1;
|
|
226
|
+
readonly initialFacts?: readonly PlanningFactV1[];
|
|
227
|
+
readonly goalFacts?: readonly PlanningFactV1[];
|
|
228
|
+
/** Start card only: declared triggers that signal an initial fact. */
|
|
229
|
+
readonly triggerIds?: readonly string[];
|
|
230
|
+
readonly outcome?: CapabilityGraphPlanningOutcome;
|
|
231
|
+
readonly diagnosticCodes?: readonly string[];
|
|
232
|
+
readonly searchText: string;
|
|
233
|
+
}
|
|
234
|
+
export interface CapabilityGraphVisualizationFlowCardsV1 {
|
|
235
|
+
readonly schemaVersion: "1";
|
|
236
|
+
readonly outcome: CapabilityGraphPlanningOutcome;
|
|
237
|
+
readonly levelCount: number;
|
|
238
|
+
readonly cards: readonly CapabilityGraphVisualizationFlowCardV1[];
|
|
239
|
+
}
|
|
240
|
+
export type CapabilityGraphVisualizationFactFindingV1 = CapabilityGraphFactFindingV1;
|
|
241
|
+
/** Static fact-closure findings; no planner run is involved. */
|
|
242
|
+
export type CapabilityGraphVisualizationFactAuditV1 = CapabilityGraphFactClosureV1;
|
|
243
|
+
export declare const CAPABILITY_GRAPH_VISUALIZATION_VIEWS: readonly ["topology", "business-states", "planning", "plan-trace", "flow-cards"];
|
|
244
|
+
export type CapabilityGraphVisualizationViewName = (typeof CAPABILITY_GRAPH_VISUALIZATION_VIEWS)[number];
|
|
245
|
+
export interface CapabilityGraphVisualizationDiagnosticV1 {
|
|
246
|
+
readonly identity: string;
|
|
247
|
+
readonly domId: string;
|
|
248
|
+
readonly code: string;
|
|
249
|
+
readonly severity: CapabilityGraphDiagnosticSeverity;
|
|
250
|
+
readonly message: string;
|
|
251
|
+
readonly pointer?: string;
|
|
252
|
+
readonly operationIdentity?: string;
|
|
253
|
+
}
|
|
254
|
+
export interface CapabilityGraphVisualizationFilterValuesV1 {
|
|
255
|
+
readonly taxonomy: readonly string[];
|
|
256
|
+
readonly methods: readonly string[];
|
|
257
|
+
readonly effects: readonly string[];
|
|
258
|
+
readonly provenanceKinds: readonly string[];
|
|
259
|
+
readonly diagnosticSeverities: readonly CapabilityGraphDiagnosticSeverity[];
|
|
260
|
+
readonly edgeTypes: readonly string[];
|
|
261
|
+
}
|
|
262
|
+
export interface CapabilityGraphVisualizationLayoutV1 {
|
|
263
|
+
readonly width: number;
|
|
264
|
+
readonly height: number;
|
|
265
|
+
readonly nodeWidth: number;
|
|
266
|
+
readonly nodeHeight: number;
|
|
267
|
+
}
|
|
268
|
+
export interface CapabilityGraphVisualizationCountsV1 {
|
|
269
|
+
readonly capabilities: number;
|
|
270
|
+
readonly operations: number;
|
|
271
|
+
readonly edges: number;
|
|
272
|
+
readonly planningTransitions: number;
|
|
273
|
+
readonly planningFacts: number;
|
|
274
|
+
readonly businessFacts: number;
|
|
275
|
+
readonly technicalFacts: number;
|
|
276
|
+
readonly stateRelations: number;
|
|
277
|
+
readonly diagnostics: number;
|
|
278
|
+
}
|
|
279
|
+
export interface CapabilityGraphVisualizationDocumentV1 {
|
|
280
|
+
readonly schemaVersion: "1";
|
|
281
|
+
readonly graphSchemaVersion: "1";
|
|
282
|
+
readonly graphFingerprint: string;
|
|
283
|
+
readonly source: CapabilityGraphSource;
|
|
284
|
+
readonly counts: CapabilityGraphVisualizationCountsV1;
|
|
285
|
+
readonly layout: CapabilityGraphVisualizationLayoutV1;
|
|
286
|
+
readonly nodes: readonly CapabilityGraphVisualizationNodeV1[];
|
|
287
|
+
readonly edges: readonly CapabilityGraphVisualizationEdgeV1[];
|
|
288
|
+
readonly planning?: {
|
|
289
|
+
readonly schemaVersion: "1";
|
|
290
|
+
readonly transitions: readonly CapabilityGraphVisualizationTransitionV1[];
|
|
291
|
+
};
|
|
292
|
+
readonly businessStates?: CapabilityGraphVisualizationBusinessStatesV1;
|
|
293
|
+
readonly planTrace?: CapabilityGraphVisualizationPlanTraceV1;
|
|
294
|
+
readonly flowCards?: CapabilityGraphVisualizationFlowCardsV1;
|
|
295
|
+
readonly factAudit?: CapabilityGraphVisualizationFactAuditV1;
|
|
296
|
+
readonly triggers?: readonly CapabilityGraphVisualizationTriggerV1[];
|
|
297
|
+
/** Present only when explicitly requested; the viewer default is topology. */
|
|
298
|
+
readonly initialView?: CapabilityGraphVisualizationViewName;
|
|
299
|
+
readonly diagnostics: readonly CapabilityGraphVisualizationDiagnosticV1[];
|
|
300
|
+
readonly filters: CapabilityGraphVisualizationFilterValuesV1;
|
|
301
|
+
}
|
|
302
|
+
export interface CapabilityGraphVisualizationSelectionV1 {
|
|
303
|
+
readonly kind: CapabilityGraphVisualizationItemKind;
|
|
304
|
+
readonly identity: string;
|
|
305
|
+
}
|
|
306
|
+
export interface CapabilityGraphVisualizationFilterStateV1 {
|
|
307
|
+
readonly query?: string;
|
|
308
|
+
readonly nodeKind?: CapabilityGraphVisualizationNodeKind;
|
|
309
|
+
readonly taxonomy?: string;
|
|
310
|
+
readonly method?: string;
|
|
311
|
+
readonly effect?: string;
|
|
312
|
+
readonly authorization?: "required" | "none";
|
|
313
|
+
readonly provenance?: string;
|
|
314
|
+
readonly diagnosticSeverity?: CapabilityGraphDiagnosticSeverity;
|
|
315
|
+
readonly edgeType?: string;
|
|
316
|
+
readonly planningEligibility?: "eligible" | "descriptive";
|
|
317
|
+
}
|
|
318
|
+
export interface CapabilityGraphVisualizationRenderOptions {
|
|
319
|
+
/** Tests and embedders may lower, but never raise, compiled safety ceilings. */
|
|
320
|
+
readonly limits?: Partial<CapabilityGraphVisualizationLimitsV1>;
|
|
321
|
+
/** Optional deterministic planner result to project as an exact state trace. */
|
|
322
|
+
readonly planTrace?: CapabilityGraphVisualizationPlanTraceInputV1;
|
|
323
|
+
/** Facts established outside the API; excluded from orphan findings. */
|
|
324
|
+
readonly clientVerifiedFacts?: readonly PlanningFactV1[];
|
|
325
|
+
readonly initialView?: CapabilityGraphVisualizationViewName;
|
|
326
|
+
}
|
|
327
|
+
export declare class CapabilityGraphVisualizationError extends Error {
|
|
328
|
+
readonly code: string;
|
|
329
|
+
readonly details?: Readonly<{
|
|
330
|
+
limit?: CapabilityGraphVisualizationLimitName;
|
|
331
|
+
count?: number;
|
|
332
|
+
maximum?: number;
|
|
333
|
+
path?: string;
|
|
334
|
+
}> | undefined;
|
|
335
|
+
constructor(code: string, message: string, details?: Readonly<{
|
|
336
|
+
limit?: CapabilityGraphVisualizationLimitName;
|
|
337
|
+
count?: number;
|
|
338
|
+
maximum?: number;
|
|
339
|
+
path?: string;
|
|
340
|
+
}> | undefined);
|
|
341
|
+
}
|
|
342
|
+
export declare function visualizationFactText(fact: PlanningFactV1): string;
|
|
343
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { type CapabilityGraphVisualizationDocumentV1, type CapabilityGraphVisualizationLimitsV1, type CapabilityGraphVisualizationRenderOptions } from "./visualization-types";
|
|
2
|
+
export declare function projectCapabilityGraphVisualization(value: unknown, options?: CapabilityGraphVisualizationRenderOptions): CapabilityGraphVisualizationDocumentV1;
|
|
3
|
+
export declare function effectiveVisualizationLimits(requested?: Partial<CapabilityGraphVisualizationLimitsV1>): CapabilityGraphVisualizationLimitsV1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,68 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-com-ai/plugin-capability-graph",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Compile OpenAPI documents into deterministic HAPI capability graphs.",
|
|
5
|
+
"license": "LRL-CL",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/mcp-com-ai/hapimcp"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://hapi.mcp.com.ai",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/mcp-com-ai/hapimcp"
|
|
13
|
+
},
|
|
14
|
+
"sponsor": {
|
|
15
|
+
"url": "https://go.rebelion.la/sponsors"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"module": "./dist/index.js",
|
|
19
|
+
"main": "./dist/index.js",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"hapi-build-source": "./src/index.ts",
|
|
25
|
+
"bun": "./dist/index.js",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./runtime": {
|
|
29
|
+
"types": "./dist/runtime.d.ts",
|
|
30
|
+
"hapi-build-source": "./src/runtime.ts",
|
|
31
|
+
"bun": "./dist/runtime.js",
|
|
32
|
+
"default": "./dist/runtime.js"
|
|
33
|
+
},
|
|
34
|
+
"./visualization": {
|
|
35
|
+
"types": "./dist/visualization-api.d.ts",
|
|
36
|
+
"hapi-build-source": "./src/visualization-api.ts",
|
|
37
|
+
"bun": "./dist/visualization-api.js",
|
|
38
|
+
"default": "./dist/visualization-api.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist",
|
|
43
|
+
"README.md"
|
|
44
|
+
],
|
|
45
|
+
"scripts": {
|
|
46
|
+
"typecheck": "bunx tsc --noEmit",
|
|
47
|
+
"test": "bun test",
|
|
48
|
+
"build": "bun ../../../scripts/build-package.ts ."
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@mcp-com-ai/core": "^1.1.0",
|
|
52
|
+
"@mcp-com-ai/plugin-sdk": "^1.1.0",
|
|
53
|
+
"yaml": "^2.8.2"
|
|
54
|
+
},
|
|
55
|
+
"keywords": [
|
|
56
|
+
"hapi",
|
|
57
|
+
"hapi-cli-plugin",
|
|
58
|
+
"openapi",
|
|
59
|
+
"capability-graph",
|
|
60
|
+
"mcp"
|
|
61
|
+
],
|
|
62
|
+
"engines": {
|
|
63
|
+
"bun": ">=1.3.0"
|
|
64
|
+
},
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
}
|
|
68
|
+
}
|