@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
@@ -0,0 +1,204 @@
1
+ // @bun
2
+ // src/components/docs/architecture/ArchitectureControlPlanePage.tsx
3
+ import { CodeBlock } from "@contractspec/lib.design-system";
4
+ import Link from "@contractspec/lib.ui-link";
5
+ import { ChevronRight } from "lucide-react";
6
+ import { jsxDEV } from "react/jsx-dev-runtime";
7
+ function ArchitectureControlPlanePage() {
8
+ return /* @__PURE__ */ jsxDEV("div", {
9
+ className: "space-y-8",
10
+ children: [
11
+ /* @__PURE__ */ jsxDEV("div", {
12
+ className: "space-y-4",
13
+ children: [
14
+ /* @__PURE__ */ jsxDEV("h1", {
15
+ className: "text-4xl font-bold",
16
+ children: "Control Plane Runtime"
17
+ }, undefined, false, undefined, this),
18
+ /* @__PURE__ */ jsxDEV("p", {
19
+ className: "text-muted-foreground",
20
+ children: "The control plane is the governance layer for agentic execution. It turns incoming intent into deterministic plans, enforces risk policy before side effects, and records replayable traces for audits."
21
+ }, undefined, false, undefined, this)
22
+ ]
23
+ }, undefined, true, undefined, this),
24
+ /* @__PURE__ */ jsxDEV("div", {
25
+ className: "space-y-4",
26
+ children: [
27
+ /* @__PURE__ */ jsxDEV("h2", {
28
+ className: "text-2xl font-bold",
29
+ children: "Canonical execution loop"
30
+ }, undefined, false, undefined, this),
31
+ /* @__PURE__ */ jsxDEV("ol", {
32
+ className: "text-muted-foreground list-inside list-decimal space-y-2",
33
+ children: [
34
+ /* @__PURE__ */ jsxDEV("li", {
35
+ children: "Accept intent and create execution identity + trace context."
36
+ }, undefined, false, undefined, this),
37
+ /* @__PURE__ */ jsxDEV("li", {
38
+ children: "Compile intent into a typed, deterministic plan DAG."
39
+ }, undefined, false, undefined, this),
40
+ /* @__PURE__ */ jsxDEV("li", {
41
+ children: "Verify plan against policy and risk rules."
42
+ }, undefined, false, undefined, this),
43
+ /* @__PURE__ */ jsxDEV("li", {
44
+ children: "Route into autonomous or assist mode based on verdict."
45
+ }, undefined, false, undefined, this),
46
+ /* @__PURE__ */ jsxDEV("li", {
47
+ children: "Execute steps with idempotent keys and explicit stage events."
48
+ }, undefined, false, undefined, this),
49
+ /* @__PURE__ */ jsxDEV("li", {
50
+ children: "Persist outcomes for replay, audits, and operator visibility."
51
+ }, undefined, false, undefined, this)
52
+ ]
53
+ }, undefined, true, undefined, this)
54
+ ]
55
+ }, undefined, true, undefined, this),
56
+ /* @__PURE__ */ jsxDEV("div", {
57
+ className: "space-y-4",
58
+ children: [
59
+ /* @__PURE__ */ jsxDEV("h2", {
60
+ className: "text-2xl font-bold",
61
+ children: "Contract surfaces (v1 baseline)"
62
+ }, undefined, false, undefined, this),
63
+ /* @__PURE__ */ jsxDEV("p", {
64
+ className: "text-muted-foreground",
65
+ children: [
66
+ "The runtime is contract-first. Commands, queries, events, and capabilities are explicit and versioned under",
67
+ /* @__PURE__ */ jsxDEV("code", {
68
+ children: " @contractspec/lib.contracts-spec"
69
+ }, undefined, false, undefined, this),
70
+ "."
71
+ ]
72
+ }, undefined, true, undefined, this),
73
+ /* @__PURE__ */ jsxDEV(CodeBlock, {
74
+ language: "text",
75
+ code: `Commands
76
+ - controlPlane.intent.submit
77
+ - controlPlane.plan.compile
78
+ - controlPlane.plan.verify
79
+ - controlPlane.execution.start
80
+ - controlPlane.execution.approve
81
+ - controlPlane.execution.reject
82
+ - controlPlane.execution.cancel
83
+ - controlPlane.skill.install
84
+ - controlPlane.skill.disable
85
+
86
+ Queries
87
+ - controlPlane.execution.get
88
+ - controlPlane.execution.list
89
+ - controlPlane.trace.get
90
+ - controlPlane.policy.explain
91
+ - controlPlane.skill.list
92
+ - controlPlane.skill.verify
93
+
94
+ Events
95
+ - controlPlane.intent.received
96
+ - controlPlane.plan.compiled
97
+ - controlPlane.plan.rejected
98
+ - controlPlane.execution.step.started
99
+ - controlPlane.execution.step.blocked
100
+ - controlPlane.execution.step.completed
101
+ - controlPlane.execution.completed
102
+ - controlPlane.execution.failed
103
+ - controlPlane.skill.installed
104
+ - controlPlane.skill.rejected
105
+
106
+ Capabilities
107
+ - control-plane.core
108
+ - control-plane.approval
109
+ - control-plane.audit
110
+ - control-plane.skill-registry
111
+ - control-plane.channel-runtime`
112
+ }, undefined, false, undefined, this)
113
+ ]
114
+ }, undefined, true, undefined, this),
115
+ /* @__PURE__ */ jsxDEV("div", {
116
+ className: "space-y-4",
117
+ children: [
118
+ /* @__PURE__ */ jsxDEV("h2", {
119
+ className: "text-2xl font-bold",
120
+ children: "Policy and safety posture"
121
+ }, undefined, false, undefined, this),
122
+ /* @__PURE__ */ jsxDEV("ul", {
123
+ className: "text-muted-foreground list-inside list-disc space-y-2",
124
+ children: [
125
+ /* @__PURE__ */ jsxDEV("li", {
126
+ children: "No side-effect action executes unless it comes from a compiled plan."
127
+ }, undefined, false, undefined, this),
128
+ /* @__PURE__ */ jsxDEV("li", {
129
+ children: "High-risk actions are blocked from autonomous mode in v1."
130
+ }, undefined, false, undefined, this),
131
+ /* @__PURE__ */ jsxDEV("li", {
132
+ children: "Approval commands provide explicit human-in-the-loop transitions."
133
+ }, undefined, false, undefined, this),
134
+ /* @__PURE__ */ jsxDEV("li", {
135
+ children: "Skill installation is modeled as governance-controlled operations."
136
+ }, undefined, false, undefined, this),
137
+ /* @__PURE__ */ jsxDEV("li", {
138
+ children: "Trace queries expose policy rationale and step outcomes for replay."
139
+ }, undefined, false, undefined, this)
140
+ ]
141
+ }, undefined, true, undefined, this)
142
+ ]
143
+ }, undefined, true, undefined, this),
144
+ /* @__PURE__ */ jsxDEV("div", {
145
+ className: "space-y-4",
146
+ children: [
147
+ /* @__PURE__ */ jsxDEV("h2", {
148
+ className: "text-2xl font-bold",
149
+ children: "Implementation map"
150
+ }, undefined, false, undefined, this),
151
+ /* @__PURE__ */ jsxDEV(CodeBlock, {
152
+ language: "text",
153
+ code: `packages/libs/contracts-spec/src/control-plane/
154
+ commands/
155
+ queries/
156
+ events/
157
+ capabilities/
158
+ contracts.ts
159
+ contracts.test.ts
160
+
161
+ packages/apps/web-landing/src/app/docs/architecture/control-plane/page.tsx
162
+ implementation_plan_controle_plane.md`
163
+ }, undefined, false, undefined, this)
164
+ ]
165
+ }, undefined, true, undefined, this),
166
+ /* @__PURE__ */ jsxDEV("div", {
167
+ className: "space-y-4",
168
+ children: [
169
+ /* @__PURE__ */ jsxDEV("h2", {
170
+ className: "text-2xl font-bold",
171
+ children: "What comes next"
172
+ }, undefined, false, undefined, this),
173
+ /* @__PURE__ */ jsxDEV("p", {
174
+ className: "text-muted-foreground",
175
+ children: "WS1 delivers the contract fabric. Next increments add planner/executor split, policy escalation, capability-bound authorization, signed skill compatibility checks, and full replay tooling."
176
+ }, undefined, false, undefined, this)
177
+ ]
178
+ }, undefined, true, undefined, this),
179
+ /* @__PURE__ */ jsxDEV("div", {
180
+ className: "flex items-center gap-4 pt-4",
181
+ children: [
182
+ /* @__PURE__ */ jsxDEV(Link, {
183
+ href: "/docs/architecture/integration-binding",
184
+ className: "btn-ghost",
185
+ children: "Previous: Integration Binding"
186
+ }, undefined, false, undefined, this),
187
+ /* @__PURE__ */ jsxDEV(Link, {
188
+ href: "/docs/safety/auditing",
189
+ className: "btn-primary",
190
+ children: [
191
+ "Audit Logs ",
192
+ /* @__PURE__ */ jsxDEV(ChevronRight, {
193
+ size: 16
194
+ }, undefined, false, undefined, this)
195
+ ]
196
+ }, undefined, true, undefined, this)
197
+ ]
198
+ }, undefined, true, undefined, this)
199
+ ]
200
+ }, undefined, true, undefined, this);
201
+ }
202
+ export {
203
+ ArchitectureControlPlanePage
204
+ };
@@ -16,7 +16,7 @@ function ArchitectureOverviewPage() {
16
16
  }, undefined, false, undefined, this),
17
17
  /* @__PURE__ */ jsxDEV("p", {
18
18
  className: "text-muted-foreground",
19
- children: "ContractSpec's architecture is built on a foundation of typed specifications served by runtime adapters. This section covers the core architectural concepts: app configuration, integration binding, and knowledge management."
19
+ children: "ContractSpec's architecture is built on a foundation of typed specifications served by runtime adapters. This section covers the core architectural concepts: app configuration, integration binding, control-plane governance, and knowledge management."
20
20
  }, undefined, false, undefined, this)
21
21
  ]
22
22
  }, undefined, true, undefined, this),
@@ -206,6 +206,17 @@ function ArchitectureOverviewPage() {
206
206
  " - Enforces policies on every operation"
207
207
  ]
208
208
  }, undefined, true, undefined, this),
209
+ /* @__PURE__ */ jsxDEV("li", {
210
+ children: [
211
+ /* @__PURE__ */ jsxDEV(Link, {
212
+ href: "/docs/architecture/control-plane",
213
+ className: "text-violet-400 hover:text-violet-300",
214
+ children: "Control Plane Runtime"
215
+ }, undefined, false, undefined, this),
216
+ " ",
217
+ "- Deterministic intent to plan to policy to execution loop"
218
+ ]
219
+ }, undefined, true, undefined, this),
209
220
  /* @__PURE__ */ jsxDEV("li", {
210
221
  children: [
211
222
  /* @__PURE__ */ jsxDEV("strong", {
@@ -429,6 +440,11 @@ function ArchitectureOverviewPage() {
429
440
  }, undefined, false, undefined, this)
430
441
  ]
431
442
  }, undefined, true, undefined, this),
443
+ /* @__PURE__ */ jsxDEV(Link, {
444
+ href: "/docs/architecture/control-plane",
445
+ className: "btn-ghost",
446
+ children: "Control Plane Runtime"
447
+ }, undefined, false, undefined, this),
432
448
  /* @__PURE__ */ jsxDEV(Link, {
433
449
  href: "/docs/integrations",
434
450
  className: "btn-ghost",
@@ -3,3 +3,4 @@ export { ArchitectureAppConfigPage } from './ArchitectureAppConfigPage';
3
3
  export { ArchitectureMultiTenancyPage } from './ArchitectureMultiTenancyPage';
4
4
  export { ArchitectureIntegrationBindingPage } from './ArchitectureIntegrationBindingPage';
5
5
  export { ArchitectureKnowledgeBindingPage } from './ArchitectureKnowledgeBindingPage';
6
+ export { ArchitectureControlPlanePage } from './ArchitectureControlPlanePage';