@contractspec/bundle.library 3.8.4 → 3.8.5

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.
Files changed (90) hide show
  1. package/.turbo/turbo-build.log +126 -112
  2. package/CHANGELOG.md +6 -0
  3. package/dist/application/index.js +806 -131
  4. package/dist/application/mcp/cliMcp.js +21 -2
  5. package/dist/application/mcp/common.js +21 -2
  6. package/dist/application/mcp/common.test.d.ts +1 -0
  7. package/dist/application/mcp/contractsMcp.js +21 -2
  8. package/dist/application/mcp/docsMcp.catalog.d.ts +2 -0
  9. package/dist/application/mcp/docsMcp.catalog.js +382 -0
  10. package/dist/application/mcp/docsMcp.d.ts +5 -1
  11. package/dist/application/mcp/docsMcp.data.d.ts +85 -0
  12. package/dist/application/mcp/docsMcp.data.js +148 -0
  13. package/dist/application/mcp/docsMcp.js +776 -101
  14. package/dist/application/mcp/docsMcp.prompts.d.ts +3 -0
  15. package/dist/application/mcp/docsMcp.prompts.js +522 -0
  16. package/dist/application/mcp/docsMcp.reference.d.ts +24 -0
  17. package/dist/application/mcp/docsMcp.reference.js +236 -0
  18. package/dist/application/mcp/docsMcp.resources.d.ts +3 -0
  19. package/dist/application/mcp/docsMcp.resources.js +520 -0
  20. package/dist/application/mcp/docsMcp.test.d.ts +1 -0
  21. package/dist/application/mcp/docsMcp.tools.d.ts +3 -0
  22. package/dist/application/mcp/docsMcp.tools.js +519 -0
  23. package/dist/application/mcp/index.js +806 -131
  24. package/dist/application/mcp/internalMcp.js +21 -2
  25. package/dist/application/mcp/normalizeMcpRequest.d.ts +1 -0
  26. package/dist/application/mcp/normalizeMcpRequest.js +22 -0
  27. package/dist/application/mcp/providerRankingMcp.js +21 -2
  28. package/dist/features/index.js +15 -15
  29. package/dist/index.js +171 -171
  30. package/dist/node/application/index.js +806 -131
  31. package/dist/node/application/mcp/cliMcp.js +21 -2
  32. package/dist/node/application/mcp/common.js +21 -2
  33. package/dist/node/application/mcp/contractsMcp.js +21 -2
  34. package/dist/node/application/mcp/docsMcp.catalog.js +381 -0
  35. package/dist/node/application/mcp/docsMcp.data.js +147 -0
  36. package/dist/node/application/mcp/docsMcp.js +776 -101
  37. package/dist/node/application/mcp/docsMcp.prompts.js +521 -0
  38. package/dist/node/application/mcp/docsMcp.reference.js +235 -0
  39. package/dist/node/application/mcp/docsMcp.resources.js +519 -0
  40. package/dist/node/application/mcp/docsMcp.tools.js +518 -0
  41. package/dist/node/application/mcp/index.js +806 -131
  42. package/dist/node/application/mcp/internalMcp.js +21 -2
  43. package/dist/node/application/mcp/normalizeMcpRequest.js +21 -0
  44. package/dist/node/application/mcp/providerRankingMcp.js +21 -2
  45. package/dist/node/features/index.js +15 -15
  46. package/dist/node/index.js +171 -171
  47. package/dist/node/presentation/features/hooks/index.js +12 -12
  48. package/dist/node/presentation/features/hooks/useContractsRegistry.js +12 -12
  49. package/dist/node/presentation/features/index.js +12 -12
  50. package/dist/node/presentation/features/organisms/FeatureDataViewsList.js +12 -12
  51. package/dist/node/presentation/features/organisms/FeatureEventsList.js +12 -12
  52. package/dist/node/presentation/features/organisms/FeatureFormsList.js +12 -12
  53. package/dist/node/presentation/features/organisms/FeaturePresentationsList.js +12 -12
  54. package/dist/node/presentation/features/organisms/index.js +12 -12
  55. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +12 -12
  56. package/dist/node/presentation/features/templates/FeatureDataViewsTemplate/index.js +12 -12
  57. package/dist/node/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +12 -12
  58. package/dist/node/presentation/features/templates/FeatureEventsTemplate/index.js +12 -12
  59. package/dist/node/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +12 -12
  60. package/dist/node/presentation/features/templates/FeatureFormsTemplate/index.js +12 -12
  61. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +12 -12
  62. package/dist/node/presentation/features/templates/FeaturePresentationsTemplate/index.js +12 -12
  63. package/dist/presentation/features/hooks/index.js +12 -12
  64. package/dist/presentation/features/hooks/useContractsRegistry.js +12 -12
  65. package/dist/presentation/features/index.js +12 -12
  66. package/dist/presentation/features/organisms/FeatureDataViewsList.js +12 -12
  67. package/dist/presentation/features/organisms/FeatureEventsList.js +12 -12
  68. package/dist/presentation/features/organisms/FeatureFormsList.js +12 -12
  69. package/dist/presentation/features/organisms/FeaturePresentationsList.js +12 -12
  70. package/dist/presentation/features/organisms/index.js +12 -12
  71. package/dist/presentation/features/templates/FeatureDataViewsTemplate/FeatureDataViewsTemplate.js +12 -12
  72. package/dist/presentation/features/templates/FeatureDataViewsTemplate/index.js +12 -12
  73. package/dist/presentation/features/templates/FeatureEventsTemplate/FeatureEventsTemplate.js +12 -12
  74. package/dist/presentation/features/templates/FeatureEventsTemplate/index.js +12 -12
  75. package/dist/presentation/features/templates/FeatureFormsTemplate/FeatureFormsTemplate.js +12 -12
  76. package/dist/presentation/features/templates/FeatureFormsTemplate/index.js +12 -12
  77. package/dist/presentation/features/templates/FeaturePresentationsTemplate/FeaturePresentationsTemplate.js +12 -12
  78. package/dist/presentation/features/templates/FeaturePresentationsTemplate/index.js +12 -12
  79. package/package.json +85 -1
  80. package/src/application/mcp/common.test.ts +64 -0
  81. package/src/application/mcp/common.ts +5 -2
  82. package/src/application/mcp/docsMcp.catalog.ts +2 -0
  83. package/src/application/mcp/docsMcp.data.ts +196 -0
  84. package/src/application/mcp/docsMcp.prompts.ts +165 -0
  85. package/src/application/mcp/docsMcp.reference.ts +152 -0
  86. package/src/application/mcp/docsMcp.resources.ts +194 -0
  87. package/src/application/mcp/docsMcp.test.ts +148 -0
  88. package/src/application/mcp/docsMcp.tools.ts +183 -0
  89. package/src/application/mcp/docsMcp.ts +13 -177
  90. package/src/application/mcp/normalizeMcpRequest.ts +30 -0
@@ -25,6 +25,25 @@ var authLogger = new Logger({
25
25
  enableContext: true,
26
26
  enableColors: false
27
27
  });
28
+ // src/application/mcp/normalizeMcpRequest.ts
29
+ var REQUIRED_ACCEPT_TYPES = ["application/json", "text/event-stream"];
30
+ function canNormalizeAcceptHeader(acceptHeader) {
31
+ return !acceptHeader || acceptHeader.includes("*/*") || acceptHeader.includes("application/*") || REQUIRED_ACCEPT_TYPES.some((value) => acceptHeader.includes(value));
32
+ }
33
+ function normalizeMcpRequest(request) {
34
+ if (request.method !== "POST")
35
+ return request;
36
+ const acceptHeader = request.headers.get("accept");
37
+ if (!canNormalizeAcceptHeader(acceptHeader))
38
+ return request;
39
+ const missingTypes = REQUIRED_ACCEPT_TYPES.filter((value) => !acceptHeader?.includes(value));
40
+ if (missingTypes.length === 0)
41
+ return request;
42
+ const headers = new Headers(request.headers);
43
+ headers.set("accept", [acceptHeader, ...missingTypes].filter(Boolean).join(", "));
44
+ return new Request(request, { headers });
45
+ }
46
+
28
47
  // src/application/mcp/common.ts
29
48
  import { randomUUID } from "node:crypto";
30
49
  import { createMcpServer } from "@contractspec/lib.contracts-runtime-server-mcp/provider-mcp";
@@ -120,7 +139,7 @@ function createMcpElysiaHandler({
120
139
  stateful: false
121
140
  });
122
141
  try {
123
- return await state.transport.handleRequest(request);
142
+ return await state.transport.handleRequest(normalizeMcpRequest(request));
124
143
  } finally {
125
144
  await closeSessionState(state);
126
145
  }
@@ -156,7 +175,7 @@ function createMcpElysiaHandler({
156
175
  createdState = true;
157
176
  }
158
177
  try {
159
- const response = await state.transport.handleRequest(request);
178
+ const response = await state.transport.handleRequest(normalizeMcpRequest(request));
160
179
  const activeSessionId = state.transport.sessionId;
161
180
  if (activeSessionId && !sessions.has(activeSessionId)) {
162
181
  sessions.set(activeSessionId, state);
@@ -0,0 +1,21 @@
1
+ // src/application/mcp/normalizeMcpRequest.ts
2
+ var REQUIRED_ACCEPT_TYPES = ["application/json", "text/event-stream"];
3
+ function canNormalizeAcceptHeader(acceptHeader) {
4
+ return !acceptHeader || acceptHeader.includes("*/*") || acceptHeader.includes("application/*") || REQUIRED_ACCEPT_TYPES.some((value) => acceptHeader.includes(value));
5
+ }
6
+ function normalizeMcpRequest(request) {
7
+ if (request.method !== "POST")
8
+ return request;
9
+ const acceptHeader = request.headers.get("accept");
10
+ if (!canNormalizeAcceptHeader(acceptHeader))
11
+ return request;
12
+ const missingTypes = REQUIRED_ACCEPT_TYPES.filter((value) => !acceptHeader?.includes(value));
13
+ if (missingTypes.length === 0)
14
+ return request;
15
+ const headers = new Headers(request.headers);
16
+ headers.set("accept", [acceptHeader, ...missingTypes].filter(Boolean).join(", "));
17
+ return new Request(request, { headers });
18
+ }
19
+ export {
20
+ normalizeMcpRequest
21
+ };
@@ -25,6 +25,25 @@ var authLogger = new Logger({
25
25
  enableContext: true,
26
26
  enableColors: false
27
27
  });
28
+ // src/application/mcp/normalizeMcpRequest.ts
29
+ var REQUIRED_ACCEPT_TYPES = ["application/json", "text/event-stream"];
30
+ function canNormalizeAcceptHeader(acceptHeader) {
31
+ return !acceptHeader || acceptHeader.includes("*/*") || acceptHeader.includes("application/*") || REQUIRED_ACCEPT_TYPES.some((value) => acceptHeader.includes(value));
32
+ }
33
+ function normalizeMcpRequest(request) {
34
+ if (request.method !== "POST")
35
+ return request;
36
+ const acceptHeader = request.headers.get("accept");
37
+ if (!canNormalizeAcceptHeader(acceptHeader))
38
+ return request;
39
+ const missingTypes = REQUIRED_ACCEPT_TYPES.filter((value) => !acceptHeader?.includes(value));
40
+ if (missingTypes.length === 0)
41
+ return request;
42
+ const headers = new Headers(request.headers);
43
+ headers.set("accept", [acceptHeader, ...missingTypes].filter(Boolean).join(", "));
44
+ return new Request(request, { headers });
45
+ }
46
+
28
47
  // src/application/mcp/common.ts
29
48
  import { randomUUID } from "node:crypto";
30
49
  import { createMcpServer } from "@contractspec/lib.contracts-runtime-server-mcp/provider-mcp";
@@ -120,7 +139,7 @@ function createMcpElysiaHandler({
120
139
  stateful: false
121
140
  });
122
141
  try {
123
- return await state.transport.handleRequest(request);
142
+ return await state.transport.handleRequest(normalizeMcpRequest(request));
124
143
  } finally {
125
144
  await closeSessionState(state);
126
145
  }
@@ -156,7 +175,7 @@ function createMcpElysiaHandler({
156
175
  createdState = true;
157
176
  }
158
177
  try {
159
- const response = await state.transport.handleRequest(request);
178
+ const response = await state.transport.handleRequest(normalizeMcpRequest(request));
160
179
  const activeSessionId = state.transport.sessionId;
161
180
  if (activeSessionId && !sessions.has(activeSessionId)) {
162
181
  sessions.set(activeSessionId, state);
@@ -1,12 +1,3 @@
1
- // src/features/docs/docs.contracts.ts
2
- import {
3
- ContractReferenceQuery,
4
- DocSummaryModel,
5
- DocsIndexInput,
6
- DocsIndexOutput,
7
- DocsIndexQuery,
8
- DocsIndexQuery as DocsIndexQuery2
9
- } from "@contractspec/lib.contracts-spec/docs";
10
1
  // src/features/contracts-registry.ts
11
2
  import {
12
3
  EventRegistry,
@@ -17,11 +8,11 @@ import {
17
8
  } from "@contractspec/lib.contracts-spec/data-views";
18
9
  import {
19
10
  ContractReferenceDataView,
20
- ContractReferenceQuery as ContractReferenceQuery2,
11
+ ContractReferenceQuery,
21
12
  DocsGenerateCommand,
22
13
  DocsGeneratedEvent,
23
14
  DocsIndexDataView,
24
- DocsIndexQuery as DocsIndexQuery3,
15
+ DocsIndexQuery,
25
16
  DocsLayoutPresentation,
26
17
  DocsPublishCommand,
27
18
  DocsPublishedEvent,
@@ -43,7 +34,7 @@ import {
43
34
  var operationRegistry = null;
44
35
  function createContractSpecOperationRegistry() {
45
36
  const registry = new OperationSpecRegistry;
46
- registry.register(DocsIndexQuery3).register(ContractReferenceQuery2).register(DocsGenerateCommand).register(DocsPublishCommand);
37
+ registry.register(DocsIndexQuery).register(ContractReferenceQuery).register(DocsGenerateCommand).register(DocsPublishCommand);
47
38
  return registry;
48
39
  }
49
40
  function getContractSpecOperationRegistry() {
@@ -189,6 +180,15 @@ var DocsFeature = {
189
180
  }
190
181
  };
191
182
 
183
+ // src/features/docs/docs.contracts.ts
184
+ import {
185
+ ContractReferenceQuery as ContractReferenceQuery2,
186
+ DocSummaryModel,
187
+ DocsIndexInput,
188
+ DocsIndexOutput,
189
+ DocsIndexQuery as DocsIndexQuery2,
190
+ DocsIndexQuery as DocsIndexQuery3
191
+ } from "@contractspec/lib.contracts-spec/docs";
192
192
  // src/features/mcp.feature.ts
193
193
  var MCPFeature = {
194
194
  meta: {
@@ -296,7 +296,7 @@ export {
296
296
  getContractSpecFeatureRegistry,
297
297
  getContractSpecEventRegistry,
298
298
  getContractSpecDataViewRegistry,
299
- DocsIndexQuery as docsSearchSpec,
299
+ DocsIndexQuery2 as docsSearchSpec,
300
300
  createContractSpecPresentationRegistry,
301
301
  createContractSpecOperationRegistry,
302
302
  createContractSpecFormRegistry,
@@ -306,10 +306,10 @@ export {
306
306
  PresentationsFeature,
307
307
  MCPFeature,
308
308
  FeatureRegistry2 as FeatureRegistry,
309
- DocsIndexQuery2 as DocsIndexQuery,
309
+ DocsIndexQuery3 as DocsIndexQuery,
310
310
  DocsFeature,
311
311
  DocSummaryModel,
312
312
  DocsIndexOutput as DocSearchOutput,
313
313
  DocsIndexInput as DocSearchInput,
314
- ContractReferenceQuery
314
+ ContractReferenceQuery2 as ContractReferenceQuery
315
315
  };
@@ -1,12 +1,154 @@
1
- // src/features/docs/docs.contracts.ts
1
+ // src/features/contracts-registry.ts
2
+ import {
3
+ EventRegistry,
4
+ OperationSpecRegistry
5
+ } from "@contractspec/lib.contracts-spec";
2
6
  import {
7
+ DataViewRegistry
8
+ } from "@contractspec/lib.contracts-spec/data-views";
9
+ import {
10
+ ContractReferenceDataView,
3
11
  ContractReferenceQuery,
4
- DocSummaryModel,
5
- DocsIndexInput,
6
- DocsIndexOutput,
12
+ DocsGenerateCommand,
13
+ DocsGeneratedEvent,
14
+ DocsIndexDataView,
7
15
  DocsIndexQuery,
8
- DocsIndexQuery as DocsIndexQuery2
16
+ DocsLayoutPresentation,
17
+ DocsPublishCommand,
18
+ DocsPublishedEvent,
19
+ DocsReferencePagePresentation,
20
+ DocsSearchForm,
21
+ ExampleCatalogDataView
9
22
  } from "@contractspec/lib.contracts-spec/docs";
23
+ import { FormRegistry } from "@contractspec/lib.contracts-spec/forms";
24
+ import {
25
+ PresentationRegistry
26
+ } from "@contractspec/lib.contracts-spec/presentations";
27
+ import {
28
+ serializeDataViewSpec,
29
+ serializeEventSpec,
30
+ serializeFormSpec,
31
+ serializeOperationSpec,
32
+ serializePresentationSpec
33
+ } from "@contractspec/lib.contracts-spec/serialization";
34
+ var operationRegistry = null;
35
+ function createContractSpecOperationRegistry() {
36
+ const registry = new OperationSpecRegistry;
37
+ registry.register(DocsIndexQuery).register(ContractReferenceQuery).register(DocsGenerateCommand).register(DocsPublishCommand);
38
+ return registry;
39
+ }
40
+ function getContractSpecOperationRegistry() {
41
+ if (!operationRegistry) {
42
+ operationRegistry = createContractSpecOperationRegistry();
43
+ }
44
+ return operationRegistry;
45
+ }
46
+ function resolveOperationSpec(key, version) {
47
+ return getContractSpecOperationRegistry().get(key, version);
48
+ }
49
+ var eventRegistry = null;
50
+ function createContractSpecEventRegistry() {
51
+ const registry = new EventRegistry;
52
+ registry.register(DocsGeneratedEvent).register(DocsPublishedEvent);
53
+ return registry;
54
+ }
55
+ function getContractSpecEventRegistry() {
56
+ if (!eventRegistry) {
57
+ eventRegistry = createContractSpecEventRegistry();
58
+ }
59
+ return eventRegistry;
60
+ }
61
+ function resolveEventSpec(key, version) {
62
+ return getContractSpecEventRegistry().get(key, version);
63
+ }
64
+ var presentationRegistry = null;
65
+ function createContractSpecPresentationRegistry() {
66
+ const registry = new PresentationRegistry;
67
+ registry.register(DocsLayoutPresentation).register(DocsReferencePagePresentation);
68
+ return registry;
69
+ }
70
+ function getContractSpecPresentationRegistry() {
71
+ if (!presentationRegistry) {
72
+ presentationRegistry = createContractSpecPresentationRegistry();
73
+ }
74
+ return presentationRegistry;
75
+ }
76
+ function resolvePresentationSpec(key, version) {
77
+ return getContractSpecPresentationRegistry().get(key, version);
78
+ }
79
+ var dataViewRegistry = null;
80
+ function createContractSpecDataViewRegistry() {
81
+ const registry = new DataViewRegistry;
82
+ registry.register(DocsIndexDataView).register(ContractReferenceDataView).register(ExampleCatalogDataView);
83
+ return registry;
84
+ }
85
+ function getContractSpecDataViewRegistry() {
86
+ if (!dataViewRegistry) {
87
+ dataViewRegistry = createContractSpecDataViewRegistry();
88
+ }
89
+ return dataViewRegistry;
90
+ }
91
+ function resolveDataViewSpec(key, version) {
92
+ return getContractSpecDataViewRegistry().get(key, version);
93
+ }
94
+ var formRegistry = null;
95
+ function createContractSpecFormRegistry() {
96
+ const registry = new FormRegistry;
97
+ registry.register(DocsSearchForm);
98
+ return registry;
99
+ }
100
+ function getContractSpecFormRegistry() {
101
+ if (!formRegistry) {
102
+ formRegistry = createContractSpecFormRegistry();
103
+ }
104
+ return formRegistry;
105
+ }
106
+ function resolveFormSpec(key, _version) {
107
+ return getContractSpecFormRegistry().get(key);
108
+ }
109
+ function resolveSerializedOperationSpec(key, version) {
110
+ const spec = resolveOperationSpec(key, version);
111
+ return serializeOperationSpec(spec) ?? undefined;
112
+ }
113
+ function resolveSerializedEventSpec(key, version) {
114
+ const spec = resolveEventSpec(key, version);
115
+ return serializeEventSpec(spec) ?? undefined;
116
+ }
117
+ function resolveSerializedPresentationSpec(key, version) {
118
+ const spec = resolvePresentationSpec(key, version);
119
+ return serializePresentationSpec(spec) ?? undefined;
120
+ }
121
+ function resolveSerializedDataViewSpec(key, version) {
122
+ const spec = resolveDataViewSpec(key, version);
123
+ return serializeDataViewSpec(spec) ?? undefined;
124
+ }
125
+ function resolveSerializedFormSpec(key, version) {
126
+ const spec = resolveFormSpec(key, version);
127
+ return serializeFormSpec(spec) ?? undefined;
128
+ }
129
+ function resetContractSpecOperationRegistry() {
130
+ operationRegistry = null;
131
+ }
132
+ function resetContractSpecEventRegistry() {
133
+ eventRegistry = null;
134
+ }
135
+ function resetContractSpecPresentationRegistry() {
136
+ presentationRegistry = null;
137
+ }
138
+ function resetContractSpecDataViewRegistry() {
139
+ dataViewRegistry = null;
140
+ }
141
+ function resetContractSpecFormRegistry() {
142
+ formRegistry = null;
143
+ }
144
+ function resetAllContractSpecRegistries() {
145
+ resetContractSpecOperationRegistry();
146
+ resetContractSpecEventRegistry();
147
+ resetContractSpecPresentationRegistry();
148
+ resetContractSpecDataViewRegistry();
149
+ resetContractSpecFormRegistry();
150
+ }
151
+
10
152
  // src/components/docs/docsManifest.ts
11
153
  var DOCS_PRIMARY_SECTIONS = [
12
154
  {
@@ -6102,7 +6244,7 @@ function getExampleShowcaseData(key) {
6102
6244
  }
6103
6245
 
6104
6246
  // src/components/docs/examples/DocsExamplesPage.tsx
6105
- import { ExampleCatalogDataView } from "@contractspec/lib.contracts-spec/docs";
6247
+ import { ExampleCatalogDataView as ExampleCatalogDataView2 } from "@contractspec/lib.contracts-spec/docs";
6106
6248
  import {
6107
6249
  ButtonLink,
6108
6250
  DataViewList,
@@ -6132,9 +6274,9 @@ function DocsExamplesPage() {
6132
6274
  };
6133
6275
  }).sort((a, b) => a.title.localeCompare(b.title));
6134
6276
  const listSpec = {
6135
- ...ExampleCatalogDataView,
6277
+ ...ExampleCatalogDataView2,
6136
6278
  view: {
6137
- ...ExampleCatalogDataView.view,
6279
+ ...ExampleCatalogDataView2.view,
6138
6280
  kind: "list"
6139
6281
  }
6140
6282
  };
@@ -24019,8 +24161,8 @@ OTEL_TRACES_SAMPLER_ARG=0.1`
24019
24161
  }
24020
24162
  // src/components/docs/reference/DocsReferenceIndexClient.tsx
24021
24163
  import {
24022
- DocsIndexDataView,
24023
- DocsSearchForm
24164
+ DocsIndexDataView as DocsIndexDataView2,
24165
+ DocsSearchForm as DocsSearchForm2
24024
24166
  } from "@contractspec/lib.contracts-spec/docs";
24025
24167
  import {
24026
24168
  DataViewList as DataViewList2,
@@ -24071,7 +24213,7 @@ function DocsReferenceIndexClient({
24071
24213
  return matchesQuery(entry, query);
24072
24214
  });
24073
24215
  }, [filters, normalizedEntries]);
24074
- const searchForm = formRenderer.render(DocsSearchForm, {
24216
+ const searchForm = formRenderer.render(DocsSearchForm2, {
24075
24217
  defaultValues: {
24076
24218
  query: filters.query ?? "",
24077
24219
  visibility: filters.visibility ?? "",
@@ -24108,7 +24250,7 @@ function DocsReferenceIndexClient({
24108
24250
  children: searchForm
24109
24251
  }),
24110
24252
  /* @__PURE__ */ jsx105(DataViewList2, {
24111
- spec: DocsIndexDataView,
24253
+ spec: DocsIndexDataView2,
24112
24254
  items: filteredEntries,
24113
24255
  emptyState: /* @__PURE__ */ jsx105(Muted2, {
24114
24256
  children: "No reference docs match your filters."
@@ -24347,7 +24489,7 @@ function DocsMarkdownContent({ content }) {
24347
24489
  }
24348
24490
 
24349
24491
  // src/components/docs/reference/DocsReferenceContent.tsx
24350
- import { ContractReferenceDataView } from "@contractspec/lib.contracts-spec/docs";
24492
+ import { ContractReferenceDataView as ContractReferenceDataView2 } from "@contractspec/lib.contracts-spec/docs";
24351
24493
  import { DataViewRenderer } from "@contractspec/lib.design-system";
24352
24494
  import { VStack as VStack4 } from "@contractspec/lib.ui-kit-web/ui/stack";
24353
24495
  import { jsx as jsx108, jsxs as jsxs107 } from "react/jsx-runtime";
@@ -24386,11 +24528,11 @@ function DocsReferenceContent({
24386
24528
  }
24387
24529
  };
24388
24530
  const detailSpec = {
24389
- ...ContractReferenceDataView,
24531
+ ...ContractReferenceDataView2,
24390
24532
  meta: {
24391
- ...ContractReferenceDataView.meta,
24392
- title: entry.title ?? ContractReferenceDataView.meta.title,
24393
- description: summary ?? ContractReferenceDataView.meta.description
24533
+ ...ContractReferenceDataView2.meta,
24534
+ title: entry.title ?? ContractReferenceDataView2.meta.title,
24535
+ description: summary ?? ContractReferenceDataView2.meta.description
24394
24536
  }
24395
24537
  };
24396
24538
  return /* @__PURE__ */ jsxs107(VStack4, {
@@ -32192,157 +32334,6 @@ var contractspecBlueprint = {
32192
32334
  routes: contractspecRoutes,
32193
32335
  notes: "ContractSpec platform blueprint - defines the app's capabilities, features, and configuration."
32194
32336
  };
32195
- // src/features/contracts-registry.ts
32196
- import {
32197
- EventRegistry,
32198
- OperationSpecRegistry
32199
- } from "@contractspec/lib.contracts-spec";
32200
- import {
32201
- DataViewRegistry
32202
- } from "@contractspec/lib.contracts-spec/data-views";
32203
- import {
32204
- ContractReferenceDataView as ContractReferenceDataView2,
32205
- ContractReferenceQuery as ContractReferenceQuery2,
32206
- DocsGenerateCommand,
32207
- DocsGeneratedEvent,
32208
- DocsIndexDataView as DocsIndexDataView2,
32209
- DocsIndexQuery as DocsIndexQuery3,
32210
- DocsLayoutPresentation,
32211
- DocsPublishCommand,
32212
- DocsPublishedEvent,
32213
- DocsReferencePagePresentation,
32214
- DocsSearchForm as DocsSearchForm2,
32215
- ExampleCatalogDataView as ExampleCatalogDataView2
32216
- } from "@contractspec/lib.contracts-spec/docs";
32217
- import { FormRegistry } from "@contractspec/lib.contracts-spec/forms";
32218
- import {
32219
- PresentationRegistry
32220
- } from "@contractspec/lib.contracts-spec/presentations";
32221
- import {
32222
- serializeDataViewSpec,
32223
- serializeEventSpec,
32224
- serializeFormSpec,
32225
- serializeOperationSpec,
32226
- serializePresentationSpec
32227
- } from "@contractspec/lib.contracts-spec/serialization";
32228
- var operationRegistry = null;
32229
- function createContractSpecOperationRegistry() {
32230
- const registry = new OperationSpecRegistry;
32231
- registry.register(DocsIndexQuery3).register(ContractReferenceQuery2).register(DocsGenerateCommand).register(DocsPublishCommand);
32232
- return registry;
32233
- }
32234
- function getContractSpecOperationRegistry() {
32235
- if (!operationRegistry) {
32236
- operationRegistry = createContractSpecOperationRegistry();
32237
- }
32238
- return operationRegistry;
32239
- }
32240
- function resolveOperationSpec(key, version) {
32241
- return getContractSpecOperationRegistry().get(key, version);
32242
- }
32243
- var eventRegistry = null;
32244
- function createContractSpecEventRegistry() {
32245
- const registry = new EventRegistry;
32246
- registry.register(DocsGeneratedEvent).register(DocsPublishedEvent);
32247
- return registry;
32248
- }
32249
- function getContractSpecEventRegistry() {
32250
- if (!eventRegistry) {
32251
- eventRegistry = createContractSpecEventRegistry();
32252
- }
32253
- return eventRegistry;
32254
- }
32255
- function resolveEventSpec(key, version) {
32256
- return getContractSpecEventRegistry().get(key, version);
32257
- }
32258
- var presentationRegistry = null;
32259
- function createContractSpecPresentationRegistry() {
32260
- const registry = new PresentationRegistry;
32261
- registry.register(DocsLayoutPresentation).register(DocsReferencePagePresentation);
32262
- return registry;
32263
- }
32264
- function getContractSpecPresentationRegistry() {
32265
- if (!presentationRegistry) {
32266
- presentationRegistry = createContractSpecPresentationRegistry();
32267
- }
32268
- return presentationRegistry;
32269
- }
32270
- function resolvePresentationSpec(key, version) {
32271
- return getContractSpecPresentationRegistry().get(key, version);
32272
- }
32273
- var dataViewRegistry = null;
32274
- function createContractSpecDataViewRegistry() {
32275
- const registry = new DataViewRegistry;
32276
- registry.register(DocsIndexDataView2).register(ContractReferenceDataView2).register(ExampleCatalogDataView2);
32277
- return registry;
32278
- }
32279
- function getContractSpecDataViewRegistry() {
32280
- if (!dataViewRegistry) {
32281
- dataViewRegistry = createContractSpecDataViewRegistry();
32282
- }
32283
- return dataViewRegistry;
32284
- }
32285
- function resolveDataViewSpec(key, version) {
32286
- return getContractSpecDataViewRegistry().get(key, version);
32287
- }
32288
- var formRegistry = null;
32289
- function createContractSpecFormRegistry() {
32290
- const registry = new FormRegistry;
32291
- registry.register(DocsSearchForm2);
32292
- return registry;
32293
- }
32294
- function getContractSpecFormRegistry() {
32295
- if (!formRegistry) {
32296
- formRegistry = createContractSpecFormRegistry();
32297
- }
32298
- return formRegistry;
32299
- }
32300
- function resolveFormSpec(key, _version) {
32301
- return getContractSpecFormRegistry().get(key);
32302
- }
32303
- function resolveSerializedOperationSpec(key, version) {
32304
- const spec = resolveOperationSpec(key, version);
32305
- return serializeOperationSpec(spec) ?? undefined;
32306
- }
32307
- function resolveSerializedEventSpec(key, version) {
32308
- const spec = resolveEventSpec(key, version);
32309
- return serializeEventSpec(spec) ?? undefined;
32310
- }
32311
- function resolveSerializedPresentationSpec(key, version) {
32312
- const spec = resolvePresentationSpec(key, version);
32313
- return serializePresentationSpec(spec) ?? undefined;
32314
- }
32315
- function resolveSerializedDataViewSpec(key, version) {
32316
- const spec = resolveDataViewSpec(key, version);
32317
- return serializeDataViewSpec(spec) ?? undefined;
32318
- }
32319
- function resolveSerializedFormSpec(key, version) {
32320
- const spec = resolveFormSpec(key, version);
32321
- return serializeFormSpec(spec) ?? undefined;
32322
- }
32323
- function resetContractSpecOperationRegistry() {
32324
- operationRegistry = null;
32325
- }
32326
- function resetContractSpecEventRegistry() {
32327
- eventRegistry = null;
32328
- }
32329
- function resetContractSpecPresentationRegistry() {
32330
- presentationRegistry = null;
32331
- }
32332
- function resetContractSpecDataViewRegistry() {
32333
- dataViewRegistry = null;
32334
- }
32335
- function resetContractSpecFormRegistry() {
32336
- formRegistry = null;
32337
- }
32338
- function resetAllContractSpecRegistries() {
32339
- resetContractSpecOperationRegistry();
32340
- resetContractSpecEventRegistry();
32341
- resetContractSpecPresentationRegistry();
32342
- resetContractSpecDataViewRegistry();
32343
- resetContractSpecFormRegistry();
32344
- }
32345
-
32346
32337
  // src/features/docs.feature.ts
32347
32338
  var DocsFeature = {
32348
32339
  meta: {
@@ -32374,6 +32365,15 @@ var DocsFeature = {
32374
32365
  }
32375
32366
  };
32376
32367
 
32368
+ // src/features/docs/docs.contracts.ts
32369
+ import {
32370
+ ContractReferenceQuery as ContractReferenceQuery2,
32371
+ DocSummaryModel,
32372
+ DocsIndexInput,
32373
+ DocsIndexOutput,
32374
+ DocsIndexQuery as DocsIndexQuery2,
32375
+ DocsIndexQuery as DocsIndexQuery3
32376
+ } from "@contractspec/lib.contracts-spec/docs";
32377
32377
  // src/features/mcp.feature.ts
32378
32378
  var MCPFeature = {
32379
32379
  meta: {
@@ -32490,7 +32490,7 @@ export {
32490
32490
  getContractSpecFeatureRegistry,
32491
32491
  getContractSpecEventRegistry,
32492
32492
  getContractSpecDataViewRegistry,
32493
- DocsIndexQuery as docsSearchSpec,
32493
+ DocsIndexQuery2 as docsSearchSpec,
32494
32494
  createContractSpecPresentationRegistry,
32495
32495
  createContractSpecOperationRegistry,
32496
32496
  createContractSpecFormRegistry,
@@ -32625,7 +32625,7 @@ export {
32625
32625
  EcosystemIntegrationsPage,
32626
32626
  DocsReferencePage,
32627
32627
  DocsReferenceIndexPage,
32628
- DocsIndexQuery2 as DocsIndexQuery,
32628
+ DocsIndexQuery3 as DocsIndexQuery,
32629
32629
  DocsIndexPage,
32630
32630
  DocsFeature,
32631
32631
  DocsExamplesPage,
@@ -32638,7 +32638,7 @@ export {
32638
32638
  DOCS_PRIMARY_SECTIONS,
32639
32639
  DOCS_PAGES,
32640
32640
  ConversationList,
32641
- ContractReferenceQuery,
32641
+ ContractReferenceQuery2 as ContractReferenceQuery,
32642
32642
  ContractFirstApiPage,
32643
32643
  CompatibilityPage,
32644
32644
  ComparisonWorkflowEnginesPage,
@@ -1,12 +1,3 @@
1
- // src/features/docs/docs.contracts.ts
2
- import {
3
- ContractReferenceQuery,
4
- DocSummaryModel,
5
- DocsIndexInput,
6
- DocsIndexOutput,
7
- DocsIndexQuery,
8
- DocsIndexQuery as DocsIndexQuery2
9
- } from "@contractspec/lib.contracts-spec/docs";
10
1
  // src/features/contracts-registry.ts
11
2
  import {
12
3
  EventRegistry,
@@ -17,11 +8,11 @@ import {
17
8
  } from "@contractspec/lib.contracts-spec/data-views";
18
9
  import {
19
10
  ContractReferenceDataView,
20
- ContractReferenceQuery as ContractReferenceQuery2,
11
+ ContractReferenceQuery,
21
12
  DocsGenerateCommand,
22
13
  DocsGeneratedEvent,
23
14
  DocsIndexDataView,
24
- DocsIndexQuery as DocsIndexQuery3,
15
+ DocsIndexQuery,
25
16
  DocsLayoutPresentation,
26
17
  DocsPublishCommand,
27
18
  DocsPublishedEvent,
@@ -43,7 +34,7 @@ import {
43
34
  var operationRegistry = null;
44
35
  function createContractSpecOperationRegistry() {
45
36
  const registry = new OperationSpecRegistry;
46
- registry.register(DocsIndexQuery3).register(ContractReferenceQuery2).register(DocsGenerateCommand).register(DocsPublishCommand);
37
+ registry.register(DocsIndexQuery).register(ContractReferenceQuery).register(DocsGenerateCommand).register(DocsPublishCommand);
47
38
  return registry;
48
39
  }
49
40
  function getContractSpecOperationRegistry() {
@@ -189,6 +180,15 @@ var DocsFeature = {
189
180
  }
190
181
  };
191
182
 
183
+ // src/features/docs/docs.contracts.ts
184
+ import {
185
+ ContractReferenceQuery as ContractReferenceQuery2,
186
+ DocSummaryModel,
187
+ DocsIndexInput,
188
+ DocsIndexOutput,
189
+ DocsIndexQuery as DocsIndexQuery2,
190
+ DocsIndexQuery as DocsIndexQuery3
191
+ } from "@contractspec/lib.contracts-spec/docs";
192
192
  // src/features/mcp.feature.ts
193
193
  var MCPFeature = {
194
194
  meta: {