@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,136 @@
1
+ import { CodeBlock } from '@contractspec/lib.design-system';
2
+ import Link from '@contractspec/lib.ui-link';
3
+ import { ChevronRight } from 'lucide-react';
4
+
5
+ export function ArchitectureControlPlanePage() {
6
+ return (
7
+ <div className="space-y-8">
8
+ <div className="space-y-4">
9
+ <h1 className="text-4xl font-bold">Control Plane Runtime</h1>
10
+ <p className="text-muted-foreground">
11
+ The control plane is the governance layer for agentic execution. It
12
+ turns incoming intent into deterministic plans, enforces risk policy
13
+ before side effects, and records replayable traces for audits.
14
+ </p>
15
+ </div>
16
+
17
+ <div className="space-y-4">
18
+ <h2 className="text-2xl font-bold">Canonical execution loop</h2>
19
+ <ol className="text-muted-foreground list-inside list-decimal space-y-2">
20
+ <li>Accept intent and create execution identity + trace context.</li>
21
+ <li>Compile intent into a typed, deterministic plan DAG.</li>
22
+ <li>Verify plan against policy and risk rules.</li>
23
+ <li>Route into autonomous or assist mode based on verdict.</li>
24
+ <li>Execute steps with idempotent keys and explicit stage events.</li>
25
+ <li>Persist outcomes for replay, audits, and operator visibility.</li>
26
+ </ol>
27
+ </div>
28
+
29
+ <div className="space-y-4">
30
+ <h2 className="text-2xl font-bold">Contract surfaces (v1 baseline)</h2>
31
+ <p className="text-muted-foreground">
32
+ The runtime is contract-first. Commands, queries, events, and
33
+ capabilities are explicit and versioned under
34
+ <code> @contractspec/lib.contracts-spec</code>.
35
+ </p>
36
+ <CodeBlock
37
+ language="text"
38
+ code={`Commands
39
+ - controlPlane.intent.submit
40
+ - controlPlane.plan.compile
41
+ - controlPlane.plan.verify
42
+ - controlPlane.execution.start
43
+ - controlPlane.execution.approve
44
+ - controlPlane.execution.reject
45
+ - controlPlane.execution.cancel
46
+ - controlPlane.skill.install
47
+ - controlPlane.skill.disable
48
+
49
+ Queries
50
+ - controlPlane.execution.get
51
+ - controlPlane.execution.list
52
+ - controlPlane.trace.get
53
+ - controlPlane.policy.explain
54
+ - controlPlane.skill.list
55
+ - controlPlane.skill.verify
56
+
57
+ Events
58
+ - controlPlane.intent.received
59
+ - controlPlane.plan.compiled
60
+ - controlPlane.plan.rejected
61
+ - controlPlane.execution.step.started
62
+ - controlPlane.execution.step.blocked
63
+ - controlPlane.execution.step.completed
64
+ - controlPlane.execution.completed
65
+ - controlPlane.execution.failed
66
+ - controlPlane.skill.installed
67
+ - controlPlane.skill.rejected
68
+
69
+ Capabilities
70
+ - control-plane.core
71
+ - control-plane.approval
72
+ - control-plane.audit
73
+ - control-plane.skill-registry
74
+ - control-plane.channel-runtime`}
75
+ />
76
+ </div>
77
+
78
+ <div className="space-y-4">
79
+ <h2 className="text-2xl font-bold">Policy and safety posture</h2>
80
+ <ul className="text-muted-foreground list-inside list-disc space-y-2">
81
+ <li>
82
+ No side-effect action executes unless it comes from a compiled plan.
83
+ </li>
84
+ <li>High-risk actions are blocked from autonomous mode in v1.</li>
85
+ <li>
86
+ Approval commands provide explicit human-in-the-loop transitions.
87
+ </li>
88
+ <li>
89
+ Skill installation is modeled as governance-controlled operations.
90
+ </li>
91
+ <li>
92
+ Trace queries expose policy rationale and step outcomes for replay.
93
+ </li>
94
+ </ul>
95
+ </div>
96
+
97
+ <div className="space-y-4">
98
+ <h2 className="text-2xl font-bold">Implementation map</h2>
99
+ <CodeBlock
100
+ language="text"
101
+ code={`packages/libs/contracts-spec/src/control-plane/
102
+ commands/
103
+ queries/
104
+ events/
105
+ capabilities/
106
+ contracts.ts
107
+ contracts.test.ts
108
+
109
+ packages/apps/web-landing/src/app/docs/architecture/control-plane/page.tsx
110
+ implementation_plan_controle_plane.md`}
111
+ />
112
+ </div>
113
+
114
+ <div className="space-y-4">
115
+ <h2 className="text-2xl font-bold">What comes next</h2>
116
+ <p className="text-muted-foreground">
117
+ WS1 delivers the contract fabric. Next increments add planner/executor
118
+ split, policy escalation, capability-bound authorization, signed skill
119
+ compatibility checks, and full replay tooling.
120
+ </p>
121
+ </div>
122
+
123
+ <div className="flex items-center gap-4 pt-4">
124
+ <Link
125
+ href="/docs/architecture/integration-binding"
126
+ className="btn-ghost"
127
+ >
128
+ Previous: Integration Binding
129
+ </Link>
130
+ <Link href="/docs/safety/auditing" className="btn-primary">
131
+ Audit Logs <ChevronRight size={16} />
132
+ </Link>
133
+ </div>
134
+ </div>
135
+ );
136
+ }
@@ -16,7 +16,7 @@ export function ArchitectureOverviewPage() {
16
16
  ContractSpec's architecture is built on a foundation of typed
17
17
  specifications served by runtime adapters. This section covers the
18
18
  core architectural concepts: app configuration, integration binding,
19
- and knowledge management.
19
+ control-plane governance, and knowledge management.
20
20
  </p>
21
21
  </div>
22
22
 
@@ -146,6 +146,15 @@ export function ArchitectureOverviewPage() {
146
146
  <strong>Policy Decision Point (PDP)</strong> - Enforces policies
147
147
  on every operation
148
148
  </li>
149
+ <li>
150
+ <Link
151
+ href="/docs/architecture/control-plane"
152
+ className="text-violet-400 hover:text-violet-300"
153
+ >
154
+ Control Plane Runtime
155
+ </Link>{' '}
156
+ - Deterministic intent to plan to policy to execution loop
157
+ </li>
149
158
  <li>
150
159
  <strong>Presentation Runtime</strong> - React and React Native
151
160
  renderers
@@ -256,6 +265,9 @@ export function ArchitectureOverviewPage() {
256
265
  <Link href="/docs/architecture/app-config" className="btn-primary">
257
266
  App Configuration <ChevronRight size={16} />
258
267
  </Link>
268
+ <Link href="/docs/architecture/control-plane" className="btn-ghost">
269
+ Control Plane Runtime
270
+ </Link>
259
271
  <Link href="/docs/integrations" className="btn-ghost">
260
272
  Integrations
261
273
  </Link>
@@ -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';
@@ -34,7 +34,8 @@ bun add -D @contractspec/lib.plugin.example-generator`}
34
34
  <ul className="text-muted-foreground space-y-2 text-sm">
35
35
  <li>Payments: Stripe</li>
36
36
  <li>Email: Postmark, Gmail</li>
37
- <li>Voice: ElevenLabs</li>
37
+ <li>AI: OpenAI, Mistral</li>
38
+ <li>Voice: ElevenLabs, Mistral</li>
38
39
  <li>Vector DB: Qdrant</li>
39
40
  <li>Storage: GCS</li>
40
41
  </ul>
@@ -45,10 +46,10 @@ bun add -D @contractspec/lib.plugin.example-generator`}
45
46
 
46
47
  <div className="flex items-center gap-4 pt-4">
47
48
  <Link href="/docs/ecosystem/registry" className="btn-primary">
48
- Registry resolution <ChevronRight size={16} />
49
+ Marketplace manifest <ChevronRight size={16} />
49
50
  </Link>
50
51
  <Link href="/docs/ecosystem/templates" className="btn-ghost">
51
- Plugin templates
52
+ Authoring templates
52
53
  </Link>
53
54
  </div>
54
55
  </div>
@@ -6,128 +6,109 @@ export function EcosystemPluginsPage() {
6
6
  return (
7
7
  <div className="space-y-8">
8
8
  <div className="space-y-3">
9
- <h1 className="text-4xl font-bold">Plugin API</h1>
9
+ <h1 className="text-4xl font-bold">Cursor marketplace plugins</h1>
10
10
  <p className="text-muted-foreground text-lg">
11
- Extend ContractSpec with generators, validators, adapters, formatters,
12
- and registry resolvers.
11
+ ContractSpec ships a focused Cursor marketplace catalog for the
12
+ product and key libraries.
13
13
  </p>
14
14
  </div>
15
15
 
16
16
  <div className="card-subtle space-y-4 p-6">
17
- <h2 className="text-2xl font-bold">Core capabilities</h2>
17
+ <h2 className="text-2xl font-bold">Catalog at a glance</h2>
18
18
  <ul className="text-muted-foreground space-y-2 text-sm">
19
- <li>Generators for code, docs, and schemas.</li>
20
- <li>Validators for policy checks and compliance gates.</li>
21
- <li>Adapters for framework and runtime integration.</li>
22
- <li>Formatters and diff renderers for deterministic output.</li>
23
- <li>Registry resolvers for local and remote plugin discovery.</li>
19
+ <li>
20
+ <code>contractspec</code> - Product-level workflow and release
21
+ guardrails.
22
+ </li>
23
+ <li>
24
+ <code>contractspec-contracts-spec</code> -
25
+ <code>@contractspec/lib.contracts-spec</code> governance.
26
+ </li>
27
+ <li>
28
+ <code>contractspec-contracts-integrations</code> -
29
+ <code>@contractspec/lib.contracts-integrations</code> governance.
30
+ </li>
31
+ <li>
32
+ <code>contractspec-ai-agent</code> -
33
+ <code>@contractspec/lib.ai-agent</code> orchestration guardrails.
34
+ </li>
24
35
  </ul>
25
36
  </div>
26
37
 
27
38
  <div className="space-y-6">
28
39
  <div className="space-y-3">
29
- <h2 className="text-2xl font-bold">Plugin interface</h2>
40
+ <h2 className="text-2xl font-bold">Where plugin sources live</h2>
30
41
  <p className="text-muted-foreground text-sm">
31
- Define capabilities and lifecycle hooks in a single plugin
32
- entrypoint.
42
+ Marketplace plugin sources are kept in a dedicated package so they
43
+ can evolve with the monorepo safely.
33
44
  </p>
34
45
  <CodeBlock
35
- language="typescript"
36
- filename="plugin.ts"
37
- code={`import type {
38
- ContractSpecPlugin,
39
- PluginContext,
40
- GeneratorCapability,
41
- } from "@contractspec/lib.plugins";
42
-
43
- export const MarkdownGeneratorPlugin: ContractSpecPlugin = {
44
- meta: {
45
- id: "markdown-generator",
46
- version: "1.0.0",
47
- type: "generator",
48
- provides: ["docs"],
49
- },
50
- register(context: PluginContext) {
51
- const generator: GeneratorCapability = {
52
- id: "markdown",
53
- description: "Generate Markdown docs",
54
- generate: async (specs) => {
55
- // Implementation...
56
- },
57
- };
58
-
59
- context.generators.register(generator);
60
- },
61
- };`}
62
- />
63
- </div>
64
-
65
- <div className="space-y-3">
66
- <h2 className="text-2xl font-bold">Lifecycle hooks</h2>
67
- <p className="text-muted-foreground text-sm">
68
- Use lifecycle hooks to configure, validate, and dispose resources.
69
- </p>
70
- <CodeBlock
71
- language="typescript"
72
- filename="lifecycle.ts"
73
- code={`export const MarkdownGeneratorPlugin: ContractSpecPlugin = {
74
- meta: {
75
- id: "markdown-generator",
76
- version: "1.0.0",
77
- type: "generator",
78
- provides: ["docs"],
79
- },
80
- register(context) {
81
- // Register capabilities
82
- },
83
- configure(options, context) {
84
- // Optional: apply workspace configuration
85
- },
86
- validate(specs, context) {
87
- // Optional: add validation checks
88
- },
89
- generate(specs, context) {
90
- // Required: emit outputs
91
- },
92
- dispose() {
93
- // Optional: cleanup
94
- },
95
- };`}
46
+ language="text"
47
+ filename="catalog-layout"
48
+ code={`packages/apps-registry/cursor-marketplace/
49
+ plugins/
50
+ contractspec/
51
+ contractspec-contracts-spec/
52
+ contractspec-contracts-integrations/
53
+ contractspec-ai-agent/`}
96
54
  />
97
55
  </div>
98
56
 
99
57
  <div className="space-y-3">
100
- <h2 className="text-2xl font-bold">Register a plugin</h2>
58
+ <h2 className="text-2xl font-bold">Root marketplace manifest</h2>
101
59
  <p className="text-muted-foreground text-sm">
102
- Configure plugins in <code>.contractsrc.json</code> to load them in
103
- the CLI and runtime.
60
+ Cursor submission reads <code>.cursor-plugin/marketplace.json</code>{' '}
61
+ at repository root and resolves each plugin source path.
104
62
  </p>
105
63
  <CodeBlock
106
64
  language="json"
107
- filename=".contractsrc.json"
65
+ filename=".cursor-plugin/marketplace.json"
108
66
  code={`{
67
+ "name": "contractspec-marketplace",
109
68
  "plugins": [
110
69
  {
111
- "id": "markdown-generator",
112
- "package": "@contractspec/plugin.markdown",
113
- "capabilities": ["generator"],
114
- "options": {
115
- "outputDir": "./docs/generated",
116
- "format": "table"
117
- }
70
+ "name": "contractspec",
71
+ "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec"
72
+ },
73
+ {
74
+ "name": "contractspec-contracts-spec",
75
+ "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-contracts-spec"
76
+ },
77
+ {
78
+ "name": "contractspec-contracts-integrations",
79
+ "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-contracts-integrations"
80
+ },
81
+ {
82
+ "name": "contractspec-ai-agent",
83
+ "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-ai-agent"
118
84
  }
119
85
  ]
120
86
  }`}
121
87
  />
122
88
  </div>
89
+
90
+ <div className="space-y-3">
91
+ <h2 className="text-2xl font-bold">Validation gate</h2>
92
+ <p className="text-muted-foreground text-sm">
93
+ Validate all marketplace plugins before publishing.
94
+ </p>
95
+ <CodeBlock
96
+ language="bash"
97
+ filename="validate-marketplace"
98
+ code={`bun run plugin:contractspec:validate
99
+
100
+ # Optional when offline
101
+ SKIP_PLUGIN_NETWORK_CHECK=1 bun run plugin:contractspec:validate`}
102
+ />
103
+ </div>
123
104
  </div>
124
105
 
125
106
  <div className="flex items-center gap-4 pt-4">
126
107
  <Link href="/docs/ecosystem/templates" className="btn-primary">
127
- Plugin templates <ChevronRight size={16} />
108
+ Author a plugin <ChevronRight size={16} />
128
109
  </Link>
129
- <Link href="/docs/ecosystem/integrations" className="btn-ghost">
130
- Integrations
110
+ <Link href="/docs/ecosystem/registry" className="btn-ghost">
111
+ Manifest details
131
112
  </Link>
132
113
  </div>
133
114
  </div>
@@ -6,70 +6,62 @@ export function EcosystemRegistryPage() {
6
6
  return (
7
7
  <div className="space-y-8">
8
8
  <div className="space-y-3">
9
- <h1 className="text-4xl font-bold">Registry resolution</h1>
9
+ <h1 className="text-4xl font-bold">Marketplace manifest</h1>
10
10
  <p className="text-muted-foreground text-lg">
11
- Resolve plugins from local workspaces, npm packages, or remote
12
- registries.
11
+ ContractSpec publishes a multi-plugin Cursor marketplace catalog from
12
+ a single root manifest.
13
13
  </p>
14
14
  </div>
15
15
 
16
16
  <div className="card-subtle space-y-4 p-6">
17
- <h2 className="text-2xl font-bold">Resolution order</h2>
17
+ <h2 className="text-2xl font-bold">Root manifest shape</h2>
18
18
  <p className="text-muted-foreground text-sm">
19
- Control where ContractSpec loads plugins and how versions are
20
- resolved.
19
+ Cursor reads <code>.cursor-plugin/marketplace.json</code> at
20
+ repository root and resolves each plugin source path.
21
21
  </p>
22
22
  <CodeBlock
23
23
  language="json"
24
- filename=".contractsrc.json"
24
+ filename=".cursor-plugin/marketplace.json"
25
25
  code={`{
26
+ "name": "contractspec-marketplace",
26
27
  "plugins": [
27
28
  {
28
- "id": "markdown-generator",
29
- "package": "@contractspec/plugin.markdown-generator",
30
- "capabilities": ["generator"],
31
- "options": {
32
- "outputDir": "./docs/generated",
33
- "format": "table"
34
- }
35
- }
36
- ],
37
- "pluginRegistry": {
38
- "resolutionOrder": ["workspace", "npm", "remote"],
39
- "allowPrerelease": false,
40
- "sources": {
41
- "remote": "https://registry.contractspec.io"
29
+ "name": "contractspec",
30
+ "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec"
31
+ },
32
+ {
33
+ "name": "contractspec-contracts-spec",
34
+ "source": "packages/apps-registry/cursor-marketplace/plugins/contractspec-contracts-spec"
42
35
  }
43
- }
36
+ ]
44
37
  }`}
45
38
  />
46
39
  </div>
47
40
 
48
41
  <div className="card-subtle space-y-4 p-6">
49
- <h2 className="text-2xl font-bold">Custom registry resolvers</h2>
42
+ <h2 className="text-2xl font-bold">Per-plugin contract</h2>
50
43
  <p className="text-muted-foreground text-sm">
51
- Register resolver plugins to load plugins from private registries.
44
+ Each plugin source must include a Cursor plugin manifest and
45
+ composable assets.
52
46
  </p>
53
47
  <CodeBlock
54
- language="typescript"
55
- filename="registry-resolver.ts"
56
- code={`import type { RegistryResolverPlugin } from "@contractspec/lib.plugins";
48
+ language="text"
49
+ filename="plugin-layout"
50
+ code={`plugins/<plugin-name>/
51
+ .cursor-plugin/plugin.json
52
+ rules/
53
+ commands/
54
+ agents/
55
+ skills/
56
+ .mcp.json`}
57
+ />
58
+ <CodeBlock
59
+ language="bash"
60
+ filename="validate-catalog"
61
+ code={`bun run plugin:contractspec:validate
57
62
 
58
- export const PrivateRegistryResolver: RegistryResolverPlugin = {
59
- meta: {
60
- id: "private-registry",
61
- version: "1.0.0",
62
- type: "registryResolver",
63
- provides: ["private-registry"],
64
- },
65
- resolve: async (request) => {
66
- // Fetch plugin package metadata from private registry
67
- const result = await fetch(
68
- "https://registry.acme.io/" + request.package
69
- );
70
- return result.json();
71
- },
72
- };`}
63
+ # Optional in offline environments
64
+ SKIP_PLUGIN_NETWORK_CHECK=1 bun run plugin:contractspec:validate`}
73
65
  />
74
66
  </div>
75
67
 
@@ -78,7 +70,7 @@ export const PrivateRegistryResolver: RegistryResolverPlugin = {
78
70
  Integrations <ChevronRight size={16} />
79
71
  </Link>
80
72
  <Link href="/docs/ecosystem/templates" className="btn-ghost">
81
- Plugin templates
73
+ Plugin authoring templates
82
74
  </Link>
83
75
  </div>
84
76
  </div>
@@ -7,47 +7,54 @@ export function EcosystemTemplatesPage() {
7
7
  return (
8
8
  <div className="space-y-8">
9
9
  <div className="space-y-3">
10
- <h1 className="text-4xl font-bold">Plugin templates</h1>
10
+ <h1 className="text-4xl font-bold">Plugin authoring templates</h1>
11
11
  <p className="text-muted-foreground text-lg">
12
- Scaffold new plugins with create-contractspec-plugin.
12
+ Scaffold focused Cursor plugins for ContractSpec product and core
13
+ libraries.
13
14
  </p>
14
15
  </div>
15
16
 
16
17
  <div className="card-subtle space-y-4 p-6">
17
- <h2 className="text-2xl font-bold">Create a new plugin</h2>
18
+ <h2 className="text-2xl font-bold">Create a focused plugin</h2>
18
19
  <p className="text-muted-foreground text-sm">
19
- Generate a plugin scaffold with tests, documentation, and CI wiring.
20
+ Start from a scoped domain and keep each plugin aligned to one product
21
+ or library surface.
20
22
  </p>
21
23
  <CodeBlock
22
24
  language="bash"
23
- filename="create-plugin"
24
- code={`bunx create-contractspec-plugin create \\
25
- --name markdown-generator \\
26
- --description "Markdown docs generator" \\
27
- --author "Your name"`}
25
+ filename="catalog-authoring-layout"
26
+ code={`packages/apps-registry/cursor-marketplace/
27
+ plugins/
28
+ <plugin-name>/
29
+ .cursor-plugin/plugin.json
30
+ rules/
31
+ commands/
32
+ agents/
33
+ skills/
34
+ .mcp.json`}
28
35
  />
29
36
  </div>
30
37
 
31
38
  <div className="card-subtle space-y-4 p-6">
32
39
  <h2 className="text-2xl font-bold">Template outputs</h2>
33
40
  <ul className="text-muted-foreground space-y-2 text-sm">
34
- <li>src/generator.ts, src/types.ts, src/config.ts</li>
35
- <li>tests/ with sample fixtures</li>
36
- <li>.github/workflows/ci.yml</li>
37
- <li>README.md with usage instructions</li>
41
+ <li>.cursor-plugin/plugin.json with plugin metadata and paths</li>
42
+ <li>rules/, commands/, agents/, and skills/ content directories</li>
43
+ <li>.mcp.json with all MCP server declarations used by the plugin</li>
44
+ <li>README.md describing scope and governance boundaries</li>
38
45
  </ul>
39
46
  </div>
40
47
 
41
48
  <div className="card-subtle space-y-4 p-6">
42
- <h2 className="text-2xl font-bold">Publish and install</h2>
49
+ <h2 className="text-2xl font-bold">Validate before submission</h2>
43
50
  <CodeBlock
44
51
  language="bash"
45
- filename="publish-plugin"
46
- code={`bun run build
47
- bun publish
52
+ filename="validate-marketplace-catalog"
53
+ code={`# Validate all plugins referenced by root marketplace manifest
54
+ bun run plugin:contractspec:validate
48
55
 
49
- # install in a ContractSpec workspace
50
- bun add @contractspec/integration.markdown-generator`}
56
+ # Optional in offline environments
57
+ SKIP_PLUGIN_NETWORK_CHECK=1 bun run plugin:contractspec:validate`}
51
58
  />
52
59
  </div>
53
60
 
@@ -58,10 +65,10 @@ bun add @contractspec/integration.markdown-generator`}
58
65
 
59
66
  <div className="flex items-center gap-4 pt-4">
60
67
  <Link href="/docs/ecosystem/plugins" className="btn-primary">
61
- Plugin API <ChevronRight size={16} />
68
+ Marketplace plugins <ChevronRight size={16} />
62
69
  </Link>
63
70
  <Link href="/docs/ecosystem/registry" className="btn-ghost">
64
- Registry resolution
71
+ Marketplace manifest
65
72
  </Link>
66
73
  </div>
67
74
  </div>
@@ -4,15 +4,16 @@ import { registerDocBlocks } from '@contractspec/lib.contracts-spec/docs';
4
4
  const ecosystemDocBlocks: DocBlock[] = [
5
5
  {
6
6
  id: 'docs.ecosystem.plugins',
7
- title: 'Plugin API',
8
- summary: 'Build generators, validators, adapters, and registry resolvers.',
7
+ title: 'Marketplace plugins',
8
+ summary:
9
+ 'Focused Cursor marketplace plugins for product and core libraries.',
9
10
  kind: 'usage',
10
11
  visibility: 'public',
11
12
  route: '/docs/ecosystem/plugins',
12
13
  tags: ['ecosystem', 'plugins', 'extensions'],
13
- body: `# Plugin API
14
+ body: `# Marketplace plugins
14
15
 
15
- ContractSpec plugins extend the platform with generators, validators, adapters, formatters, and registry resolvers. Define capabilities in code, register them through configuration, and ship reusable packages.`,
16
+ ContractSpec ships a focused Cursor marketplace catalog with plugins for the product and key libraries. Plugin sources live in \`packages/apps-registry/cursor-marketplace/plugins/*\`, while the root manifest at \`.cursor-plugin/marketplace.json\` drives submission.`,
16
17
  },
17
18
  {
18
19
  id: 'docs.ecosystem.integrations',
@@ -28,24 +29,25 @@ Reference integrations demonstrate how to extend ContractSpec with real-world pl
28
29
  },
29
30
  {
30
31
  id: 'docs.ecosystem.templates',
31
- title: 'Plugin templates',
32
- summary: 'Scaffold new plugins with create-contractspec-plugin.',
32
+ title: 'Plugin authoring templates',
33
+ summary:
34
+ 'Author focused plugins with a consistent marketplace-ready layout.',
33
35
  kind: 'usage',
34
36
  visibility: 'public',
35
37
  route: '/docs/ecosystem/templates',
36
38
  tags: ['ecosystem', 'templates'],
37
- body: '# Plugin templates\n\nUse `create-contractspec-plugin` to scaffold a new plugin package with tests, documentation, and CI wiring.',
39
+ body: '# Plugin authoring templates\n\nCreate each plugin under `packages/apps-registry/cursor-marketplace/plugins/<plugin-name>/` and include `.cursor-plugin/plugin.json`, `rules/`, `commands/`, `agents/`, `skills/`, and `.mcp.json`.',
38
40
  },
39
41
 
40
42
  {
41
43
  id: 'docs.ecosystem.registry',
42
- title: 'Registry resolution',
43
- summary: 'Discover plugins locally or from remote registries.',
44
+ title: 'Marketplace manifest',
45
+ summary: 'Manage and validate root marketplace entries for all plugins.',
44
46
  kind: 'usage',
45
47
  visibility: 'public',
46
48
  route: '/docs/ecosystem/registry',
47
49
  tags: ['ecosystem', 'registry'],
48
- body: '# Registry resolution\n\nPlugins can be resolved from local workspaces, npm packages, or remote registries. Configure resolution order in `.contractsrc.json` and use registry resolver plugins for custom sources.',
50
+ body: '# Marketplace manifest\n\nKeep all plugin entries in `.cursor-plugin/marketplace.json` and validate them with `bun run plugin:contractspec:validate` before submission.',
49
51
  },
50
52
  ];
51
53