@contractspec/bundle.library 2.9.1 → 3.1.1

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 (130) hide show
  1. package/.turbo/turbo-build.log +240 -214
  2. package/AGENTS.md +19 -12
  3. package/CHANGELOG.md +84 -0
  4. package/dist/application/context-storage/index.d.ts +18 -0
  5. package/dist/application/context-storage/index.js +29 -0
  6. package/dist/application/index.d.ts +1 -0
  7. package/dist/application/index.js +662 -2
  8. package/dist/application/mcp/cliMcp.js +12 -2
  9. package/dist/application/mcp/common.d.ts +11 -1
  10. package/dist/application/mcp/common.js +12 -2
  11. package/dist/application/mcp/contractsMcp.d.ts +51 -0
  12. package/dist/application/mcp/contractsMcp.js +531 -0
  13. package/dist/application/mcp/contractsMcpResources.d.ts +7 -0
  14. package/dist/application/mcp/contractsMcpResources.js +124 -0
  15. package/dist/application/mcp/contractsMcpTools.d.ts +9 -0
  16. package/dist/application/mcp/contractsMcpTools.js +200 -0
  17. package/dist/application/mcp/contractsMcpTypes.d.ts +50 -0
  18. package/dist/application/mcp/contractsMcpTypes.js +1 -0
  19. package/dist/application/mcp/docsMcp.js +12 -2
  20. package/dist/application/mcp/index.d.ts +2 -0
  21. package/dist/application/mcp/index.js +635 -2
  22. package/dist/application/mcp/internalMcp.js +12 -2
  23. package/dist/application/mcp/providerRankingMcp.d.ts +46 -0
  24. package/dist/application/mcp/providerRankingMcp.js +494 -0
  25. package/dist/components/docs/DocsIndexPage.js +1 -1
  26. package/dist/components/docs/architecture/ArchitectureControlPlanePage.d.ts +1 -0
  27. package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +204 -0
  28. package/dist/components/docs/architecture/ArchitectureOverviewPage.js +17 -1
  29. package/dist/components/docs/architecture/index.d.ts +1 -0
  30. package/dist/components/docs/architecture/index.js +507 -289
  31. package/dist/components/docs/ecosystem/IntegrationsPage.js +6 -3
  32. package/dist/components/docs/ecosystem/PluginsPage.js +98 -98
  33. package/dist/components/docs/ecosystem/RegistryPage.js +39 -42
  34. package/dist/components/docs/ecosystem/TemplatesPage.js +26 -21
  35. package/dist/components/docs/ecosystem/ecosystem.docblocks.js +10 -10
  36. package/dist/components/docs/ecosystem/index.js +179 -174
  37. package/dist/components/docs/index.js +6795 -5376
  38. package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +2 -2
  39. package/dist/components/docs/integrations/IntegrationsGithubPage.d.ts +1 -0
  40. package/dist/components/docs/integrations/IntegrationsGithubPage.js +155 -0
  41. package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.d.ts +1 -0
  42. package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +168 -0
  43. package/dist/components/docs/integrations/IntegrationsMistralPage.d.ts +1 -0
  44. package/dist/components/docs/integrations/IntegrationsMistralPage.js +203 -0
  45. package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +2 -2
  46. package/dist/components/docs/integrations/IntegrationsOverviewPage.js +136 -9
  47. package/dist/components/docs/integrations/IntegrationsSlackPage.d.ts +1 -0
  48. package/dist/components/docs/integrations/IntegrationsSlackPage.js +161 -0
  49. package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +72 -0
  50. package/dist/components/docs/integrations/IntegrationsTwilioPage.js +2 -2
  51. package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.d.ts +1 -0
  52. package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +157 -0
  53. package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.d.ts +1 -0
  54. package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +165 -0
  55. package/dist/components/docs/integrations/index.d.ts +6 -0
  56. package/dist/components/docs/integrations/index.js +1688 -492
  57. package/dist/index.js +8016 -6597
  58. package/dist/node/application/context-storage/index.js +28 -0
  59. package/dist/node/application/index.js +662 -2
  60. package/dist/node/application/mcp/cliMcp.js +12 -2
  61. package/dist/node/application/mcp/common.js +12 -2
  62. package/dist/node/application/mcp/contractsMcp.js +530 -0
  63. package/dist/node/application/mcp/contractsMcpResources.js +123 -0
  64. package/dist/node/application/mcp/contractsMcpTools.js +199 -0
  65. package/dist/node/application/mcp/contractsMcpTypes.js +0 -0
  66. package/dist/node/application/mcp/docsMcp.js +12 -2
  67. package/dist/node/application/mcp/index.js +635 -2
  68. package/dist/node/application/mcp/internalMcp.js +12 -2
  69. package/dist/node/application/mcp/providerRankingMcp.js +493 -0
  70. package/dist/node/components/docs/DocsIndexPage.js +1 -1
  71. package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +203 -0
  72. package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +17 -1
  73. package/dist/node/components/docs/architecture/index.js +507 -289
  74. package/dist/node/components/docs/ecosystem/IntegrationsPage.js +6 -3
  75. package/dist/node/components/docs/ecosystem/PluginsPage.js +98 -98
  76. package/dist/node/components/docs/ecosystem/RegistryPage.js +39 -42
  77. package/dist/node/components/docs/ecosystem/TemplatesPage.js +26 -21
  78. package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +10 -10
  79. package/dist/node/components/docs/ecosystem/index.js +179 -174
  80. package/dist/node/components/docs/index.js +6795 -5376
  81. package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +2 -2
  82. package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +154 -0
  83. package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +167 -0
  84. package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +202 -0
  85. package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +2 -2
  86. package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +136 -9
  87. package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +160 -0
  88. package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +72 -0
  89. package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +2 -2
  90. package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +156 -0
  91. package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +164 -0
  92. package/dist/node/components/docs/integrations/index.js +1688 -492
  93. package/dist/node/index.js +8016 -6597
  94. package/package.json +195 -25
  95. package/src/application/context-storage/index.ts +58 -0
  96. package/src/application/index.ts +1 -0
  97. package/src/application/mcp/common.ts +28 -1
  98. package/src/application/mcp/contractsMcp.ts +34 -0
  99. package/src/application/mcp/contractsMcpResources.ts +142 -0
  100. package/src/application/mcp/contractsMcpTools.ts +246 -0
  101. package/src/application/mcp/contractsMcpTypes.ts +47 -0
  102. package/src/application/mcp/index.ts +2 -0
  103. package/src/application/mcp/providerRankingMcp.ts +380 -0
  104. package/src/components/docs/DocsIndexPage.tsx +2 -1
  105. package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +136 -0
  106. package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +13 -1
  107. package/src/components/docs/architecture/index.ts +1 -0
  108. package/src/components/docs/ecosystem/IntegrationsPage.tsx +4 -3
  109. package/src/components/docs/ecosystem/PluginsPage.tsx +68 -87
  110. package/src/components/docs/ecosystem/RegistryPage.tsx +35 -43
  111. package/src/components/docs/ecosystem/TemplatesPage.tsx +28 -21
  112. package/src/components/docs/ecosystem/ecosystem.docblocks.ts +12 -10
  113. package/src/components/docs/generated/docs-index._common.json +1119 -1
  114. package/src/components/docs/generated/docs-index.health.json +98 -0
  115. package/src/components/docs/generated/docs-index.manifest.json +15 -5
  116. package/src/components/docs/generated/docs-index.metrics.json +8 -0
  117. package/src/components/docs/generated/docs-index.platform-integrations.json +89 -1
  118. package/src/components/docs/generated/docs-index.video-api-showcase.json +26 -0
  119. package/src/components/docs/integrations/IntegrationsElevenLabsPage.tsx +2 -2
  120. package/src/components/docs/integrations/IntegrationsGithubPage.tsx +90 -0
  121. package/src/components/docs/integrations/IntegrationsHealthRoutingPage.tsx +112 -0
  122. package/src/components/docs/integrations/IntegrationsMistralPage.tsx +133 -0
  123. package/src/components/docs/integrations/IntegrationsOpenAIPage.tsx +2 -2
  124. package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +108 -9
  125. package/src/components/docs/integrations/IntegrationsSlackPage.tsx +98 -0
  126. package/src/components/docs/integrations/IntegrationsSpecModelPage.tsx +59 -0
  127. package/src/components/docs/integrations/IntegrationsTwilioPage.tsx +2 -2
  128. package/src/components/docs/integrations/IntegrationsWhatsappMetaPage.tsx +90 -0
  129. package/src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx +92 -0
  130. package/src/components/docs/integrations/index.ts +6 -0
package/AGENTS.md CHANGED
@@ -1,13 +1,15 @@
1
- # bundle.library
1
+ # AI Agent Guide — `@contractspec/bundle.library`
2
+
3
+ Scope: `packages/bundles/library/*`
2
4
 
3
5
  Shared library bundle with docs, templates, MCP servers, and common components.
4
6
 
5
7
  ## Quick Context
6
8
 
7
- - **Type**: Bundle (shared business logic)
9
+ - **Layer**: bundle
8
10
  - **Consumers**: `app.api-library`, `app.web-landing`, `app.web-studio`
9
11
 
10
- ## Key Directories
12
+ ## Architecture
11
13
 
12
14
  - `src/application/mcp/` — MCP server implementations
13
15
  - `src/components/docs/` — Documentation pages
@@ -16,18 +18,23 @@ Shared library bundle with docs, templates, MCP servers, and common components.
16
18
  - `src/hooks/studio/` — React hooks for GraphQL
17
19
  - `src/providers/auth/` — Authentication providers
18
20
 
19
- ## Exports
21
+ ## Public Exports
20
22
 
21
23
  Use subpath imports:
24
+
22
25
  ```typescript
23
- import { ... } from '@contractspec/bundle.library/components/docs';
24
- import { ... } from '@contractspec/bundle.library/hooks/studio';
26
+ import { ... } from "@contractspec/bundle.library/components/docs";
27
+ import { ... } from "@contractspec/bundle.library/hooks/studio";
25
28
  ```
26
29
 
27
- ## Commands
30
+ ## Guardrails
28
31
 
29
- ```bash
30
- bun build # Build bundle
31
- bun build:types # Type check
32
- bun lint # Lint code
33
- ```
32
+ - This bundle is consumed by multiple apps — breaking export changes cascade widely.
33
+ - MCP server implementations must stay transport-agnostic (the app layer wires the transport).
34
+ - Keep side effects behind explicit adapters; do not perform I/O at import time.
35
+
36
+ ## Local Commands
37
+
38
+ - Build: `bun run build`
39
+ - Types: `bun run build:types`
40
+ - Lint: `bun run lint`
package/CHANGELOG.md CHANGED
@@ -1,5 +1,89 @@
1
1
  # @contractspec/bundle.library
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f1a249b: Regenerate docs-index JSON files to reflect new provider-ranking, ACP, agent, context, and database contract documentation entries produced by the build.
8
+ - Updated dependencies [02c0cc5]
9
+ - @contractspec/lib.contracts-integrations@3.1.1
10
+ - @contractspec/lib.contracts-spec@3.1.1
11
+ - @contractspec/lib.design-system@3.1.1
12
+ - @contractspec/lib.knowledge@3.1.1
13
+ - @contractspec/module.context-storage@0.1.2
14
+ - @contractspec/lib.contracts-library@3.1.1
15
+ - @contractspec/lib.contracts-runtime-server-graphql@3.1.1
16
+ - @contractspec/lib.contracts-runtime-server-mcp@3.1.1
17
+ - @contractspec/lib.contracts-runtime-server-rest@3.1.1
18
+ - @contractspec/lib.example-shared-ui@3.1.1
19
+ - @contractspec/module.examples@3.1.1
20
+
21
+ ## 3.1.0
22
+
23
+ ### Minor Changes
24
+
25
+ - 28987eb: chore: upgrade dependencies
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [f2a4faf]
30
+ - Updated dependencies [28987eb]
31
+ - Updated dependencies [28987eb]
32
+ - @contractspec/lib.contracts-spec@3.1.0
33
+ - @contractspec/lib.contracts-runtime-server-graphql@3.1.0
34
+ - @contractspec/lib.contracts-runtime-server-rest@3.1.0
35
+ - @contractspec/lib.contracts-runtime-server-mcp@3.1.0
36
+ - @contractspec/lib.contracts-integrations@3.1.0
37
+ - @contractspec/lib.contracts-library@3.1.0
38
+ - @contractspec/lib.example-shared-ui@3.1.0
39
+ - @contractspec/lib.runtime-sandbox@2.1.0
40
+ - @contractspec/lib.design-system@3.1.0
41
+ - @contractspec/module.examples@3.1.0
42
+ - @contractspec/lib.ui-kit-web@3.1.0
43
+ - @contractspec/lib.knowledge@3.1.0
44
+ - @contractspec/lib.ui-link@3.1.0
45
+ - @contractspec/lib.logger@3.1.0
46
+ - @contractspec/lib.schema@3.1.0
47
+ - @contractspec/module.context-storage@0.1.1
48
+
49
+ ## 3.0.0
50
+
51
+ ### Major Changes
52
+
53
+ - b781ce6: feat: improve ai readiness
54
+
55
+ ### Patch Changes
56
+
57
+ - 0c438ac: Add architecture docs for the control-plane runtime and link the new page from the architecture overview and docs navigation.
58
+ - 95c27e4: Align ecosystem docs with the Cursor marketplace catalog model by documenting the root `.cursor-plugin/marketplace.json`, package-scoped plugin sources in `packages/apps-registry/cursor-marketplace`, and catalog-wide validation via `bun run plugin:contractspec:validate`.
59
+
60
+ Rename ecosystem navigation and docblocks from generic Plugin API and Registry wording to Marketplace Plugins, Authoring Templates, and Marketplace Manifest for consistent docs discoverability.
61
+
62
+ - 3aa6269: Expand the integrations docs with Mistral, Slack, GitHub, WhatsApp Meta, WhatsApp Twilio, and health transport routing pages.
63
+
64
+ Refresh the integrations overview/spec model and docs sidebar links so the new messaging and runtime guidance is discoverable from web-landing.
65
+
66
+ - Updated dependencies [7cbdb7f]
67
+ - Updated dependencies [c608804]
68
+ - Updated dependencies [e3bc858]
69
+ - Updated dependencies [b19ae0a]
70
+ - Updated dependencies [aa4a9c9]
71
+ - Updated dependencies [b781ce6]
72
+ - @contractspec/lib.contracts-spec@3.0.0
73
+ - @contractspec/lib.contracts-integrations@3.0.0
74
+ - @contractspec/lib.contracts-runtime-server-graphql@3.0.0
75
+ - @contractspec/lib.contracts-runtime-server-rest@3.0.0
76
+ - @contractspec/lib.contracts-runtime-server-mcp@3.0.0
77
+ - @contractspec/lib.contracts-library@3.0.0
78
+ - @contractspec/lib.example-shared-ui@3.0.0
79
+ - @contractspec/lib.runtime-sandbox@2.0.0
80
+ - @contractspec/lib.design-system@3.0.0
81
+ - @contractspec/module.examples@3.0.0
82
+ - @contractspec/lib.ui-kit-web@3.0.0
83
+ - @contractspec/lib.ui-link@3.0.0
84
+ - @contractspec/lib.logger@3.0.0
85
+ - @contractspec/lib.schema@3.0.0
86
+
3
87
  ## 2.9.1
4
88
 
5
89
  ### Patch Changes
@@ -0,0 +1,18 @@
1
+ import type { DatabaseProvider, EmbeddingProvider, VectorStoreProvider } from '@contractspec/lib.contracts-integrations';
2
+ import { DocumentProcessor, type VectorIndexConfig } from '@contractspec/lib.knowledge/ingestion';
3
+ import { ContextSnapshotPipeline, PostgresContextStorage } from '@contractspec/module.context-storage';
4
+ export interface ContextStorageServiceOptions {
5
+ database: DatabaseProvider;
6
+ schema?: string;
7
+ createTablesIfMissing?: boolean;
8
+ documentProcessor?: DocumentProcessor;
9
+ embeddingProvider?: EmbeddingProvider;
10
+ embeddingBatchSize?: number;
11
+ vectorStoreProvider?: VectorStoreProvider;
12
+ vectorIndex?: VectorIndexConfig;
13
+ }
14
+ export interface ContextStorageService {
15
+ store: PostgresContextStorage;
16
+ pipeline: ContextSnapshotPipeline;
17
+ }
18
+ export declare function createContextStorageService(options: ContextStorageServiceOptions): ContextStorageService;
@@ -0,0 +1,29 @@
1
+ // @bun
2
+ // src/application/context-storage/index.ts
3
+ import {
4
+ EmbeddingService,
5
+ VectorIndexer
6
+ } from "@contractspec/lib.knowledge/ingestion";
7
+ import {
8
+ ContextSnapshotPipeline,
9
+ PostgresContextStorage
10
+ } from "@contractspec/module.context-storage";
11
+ function createContextStorageService(options) {
12
+ const store = new PostgresContextStorage({
13
+ database: options.database,
14
+ schema: options.schema,
15
+ createTablesIfMissing: options.createTablesIfMissing
16
+ });
17
+ const embeddingService = options.embeddingProvider ? new EmbeddingService(options.embeddingProvider, options.embeddingBatchSize) : undefined;
18
+ const vectorIndexer = options.vectorStoreProvider && options.vectorIndex ? new VectorIndexer(options.vectorStoreProvider, options.vectorIndex) : undefined;
19
+ const pipeline = new ContextSnapshotPipeline({
20
+ store,
21
+ documentProcessor: options.documentProcessor,
22
+ embeddingService,
23
+ vectorIndexer
24
+ });
25
+ return { store, pipeline };
26
+ }
27
+ export {
28
+ createContextStorageService
29
+ };
@@ -1 +1,2 @@
1
1
  export * from './mcp';
2
+ export * from './context-storage';