@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,164 @@
1
+ // src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx
2
+ import Link from "@contractspec/lib.ui-link";
3
+ import { ChevronRight } from "lucide-react";
4
+ import { jsxDEV } from "react/jsx-dev-runtime";
5
+ function IntegrationsWhatsappTwilioPage() {
6
+ return /* @__PURE__ */ jsxDEV("div", {
7
+ className: "space-y-8",
8
+ children: [
9
+ /* @__PURE__ */ jsxDEV("div", {
10
+ className: "space-y-4",
11
+ children: [
12
+ /* @__PURE__ */ jsxDEV("h1", {
13
+ className: "text-4xl font-bold",
14
+ children: "WhatsApp Twilio"
15
+ }, undefined, false, undefined, this),
16
+ /* @__PURE__ */ jsxDEV("p", {
17
+ className: "text-muted-foreground",
18
+ children: "Twilio WhatsApp support provides a durable fallback channel with signature verification and outbox-backed outbound dispatch."
19
+ }, undefined, false, undefined, this)
20
+ ]
21
+ }, undefined, true, undefined, this),
22
+ /* @__PURE__ */ jsxDEV("div", {
23
+ className: "space-y-4",
24
+ children: [
25
+ /* @__PURE__ */ jsxDEV("h2", {
26
+ className: "text-2xl font-bold",
27
+ children: "Required secrets and config"
28
+ }, undefined, false, undefined, this),
29
+ /* @__PURE__ */ jsxDEV("div", {
30
+ className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
31
+ children: /* @__PURE__ */ jsxDEV("pre", {
32
+ children: `// secret payload
33
+ {
34
+ "accountSid": "AC123",
35
+ "authToken": "..."
36
+ }
37
+
38
+ // optional connection config
39
+ {
40
+ "fromNumber": "whatsapp:+15550002"
41
+ }`
42
+ }, undefined, false, undefined, this)
43
+ }, undefined, false, undefined, this)
44
+ ]
45
+ }, undefined, true, undefined, this),
46
+ /* @__PURE__ */ jsxDEV("div", {
47
+ className: "space-y-4",
48
+ children: [
49
+ /* @__PURE__ */ jsxDEV("h2", {
50
+ className: "text-2xl font-bold",
51
+ children: "Webhook ingress"
52
+ }, undefined, false, undefined, this),
53
+ /* @__PURE__ */ jsxDEV("ul", {
54
+ className: "text-muted-foreground list-inside list-disc space-y-2",
55
+ children: [
56
+ /* @__PURE__ */ jsxDEV("li", {
57
+ children: [
58
+ "Inbound Twilio form payloads are accepted on",
59
+ " ",
60
+ /* @__PURE__ */ jsxDEV("code", {
61
+ className: "bg-background/50 rounded px-2 py-1",
62
+ children: "/webhooks/whatsapp/twilio"
63
+ }, undefined, false, undefined, this),
64
+ "."
65
+ ]
66
+ }, undefined, true, undefined, this),
67
+ /* @__PURE__ */ jsxDEV("li", {
68
+ children: [
69
+ "Signatures are validated with",
70
+ " ",
71
+ /* @__PURE__ */ jsxDEV("code", {
72
+ className: "bg-background/50 rounded px-2 py-1",
73
+ children: "x-twilio-signature"
74
+ }, undefined, false, undefined, this),
75
+ " ",
76
+ "and the configured auth token."
77
+ ]
78
+ }, undefined, true, undefined, this),
79
+ /* @__PURE__ */ jsxDEV("li", {
80
+ children: [
81
+ "For deterministic verification, set the exact public webhook URL in",
82
+ " ",
83
+ /* @__PURE__ */ jsxDEV("code", {
84
+ className: "bg-background/50 rounded px-2 py-1",
85
+ children: "WHATSAPP_TWILIO_WEBHOOK_URL"
86
+ }, undefined, false, undefined, this),
87
+ "."
88
+ ]
89
+ }, undefined, true, undefined, this)
90
+ ]
91
+ }, undefined, true, undefined, this)
92
+ ]
93
+ }, undefined, true, undefined, this),
94
+ /* @__PURE__ */ jsxDEV("div", {
95
+ className: "space-y-4",
96
+ children: [
97
+ /* @__PURE__ */ jsxDEV("h2", {
98
+ className: "text-2xl font-bold",
99
+ children: "Workspace mapping"
100
+ }, undefined, false, undefined, this),
101
+ /* @__PURE__ */ jsxDEV("div", {
102
+ className: "bg-background/50 border-border text-muted-foreground overflow-x-auto rounded-lg border p-4 font-mono text-sm",
103
+ children: /* @__PURE__ */ jsxDEV("pre", {
104
+ children: `CHANNEL_WORKSPACE_MAP_WHATSAPP_TWILIO={"AC123":"workspace-acme"}`
105
+ }, undefined, false, undefined, this)
106
+ }, undefined, false, undefined, this)
107
+ ]
108
+ }, undefined, true, undefined, this),
109
+ /* @__PURE__ */ jsxDEV("div", {
110
+ className: "space-y-4",
111
+ children: [
112
+ /* @__PURE__ */ jsxDEV("h2", {
113
+ className: "text-2xl font-bold",
114
+ children: "Best practices"
115
+ }, undefined, false, undefined, this),
116
+ /* @__PURE__ */ jsxDEV("ul", {
117
+ className: "text-muted-foreground list-inside list-disc space-y-2",
118
+ children: [
119
+ /* @__PURE__ */ jsxDEV("li", {
120
+ children: "Use Twilio as fallback when Meta WhatsApp is your primary route."
121
+ }, undefined, false, undefined, this),
122
+ /* @__PURE__ */ jsxDEV("li", {
123
+ children: "Keep account SID mapping explicit to avoid tenant misrouting."
124
+ }, undefined, false, undefined, this),
125
+ /* @__PURE__ */ jsxDEV("li", {
126
+ children: [
127
+ "Protect internal dispatch endpoints with",
128
+ /* @__PURE__ */ jsxDEV("code", {
129
+ className: "bg-background/50 ml-1 rounded px-2 py-1",
130
+ children: "CHANNEL_DISPATCH_TOKEN"
131
+ }, undefined, false, undefined, this),
132
+ "."
133
+ ]
134
+ }, undefined, true, undefined, this)
135
+ ]
136
+ }, undefined, true, undefined, this)
137
+ ]
138
+ }, undefined, true, undefined, this),
139
+ /* @__PURE__ */ jsxDEV("div", {
140
+ className: "flex items-center gap-4 pt-4",
141
+ children: [
142
+ /* @__PURE__ */ jsxDEV(Link, {
143
+ href: "/docs/integrations/whatsapp-meta",
144
+ className: "btn-ghost",
145
+ children: "Previous: WhatsApp Meta"
146
+ }, undefined, false, undefined, this),
147
+ /* @__PURE__ */ jsxDEV(Link, {
148
+ href: "/docs/integrations/health-routing",
149
+ className: "btn-primary",
150
+ children: [
151
+ "Next: Health Routing ",
152
+ /* @__PURE__ */ jsxDEV(ChevronRight, {
153
+ size: 16
154
+ }, undefined, false, undefined, this)
155
+ ]
156
+ }, undefined, true, undefined, this)
157
+ ]
158
+ }, undefined, true, undefined, this)
159
+ ]
160
+ }, undefined, true, undefined, this);
161
+ }
162
+ export {
163
+ IntegrationsWhatsappTwilioPage
164
+ };