@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.
- package/.turbo/turbo-build.log +240 -214
- package/AGENTS.md +19 -12
- package/CHANGELOG.md +84 -0
- package/dist/application/context-storage/index.d.ts +18 -0
- package/dist/application/context-storage/index.js +29 -0
- package/dist/application/index.d.ts +1 -0
- package/dist/application/index.js +662 -2
- package/dist/application/mcp/cliMcp.js +12 -2
- package/dist/application/mcp/common.d.ts +11 -1
- package/dist/application/mcp/common.js +12 -2
- package/dist/application/mcp/contractsMcp.d.ts +51 -0
- package/dist/application/mcp/contractsMcp.js +531 -0
- package/dist/application/mcp/contractsMcpResources.d.ts +7 -0
- package/dist/application/mcp/contractsMcpResources.js +124 -0
- package/dist/application/mcp/contractsMcpTools.d.ts +9 -0
- package/dist/application/mcp/contractsMcpTools.js +200 -0
- package/dist/application/mcp/contractsMcpTypes.d.ts +50 -0
- package/dist/application/mcp/contractsMcpTypes.js +1 -0
- package/dist/application/mcp/docsMcp.js +12 -2
- package/dist/application/mcp/index.d.ts +2 -0
- package/dist/application/mcp/index.js +635 -2
- package/dist/application/mcp/internalMcp.js +12 -2
- package/dist/application/mcp/providerRankingMcp.d.ts +46 -0
- package/dist/application/mcp/providerRankingMcp.js +494 -0
- package/dist/components/docs/DocsIndexPage.js +1 -1
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.d.ts +1 -0
- package/dist/components/docs/architecture/ArchitectureControlPlanePage.js +204 -0
- package/dist/components/docs/architecture/ArchitectureOverviewPage.js +17 -1
- package/dist/components/docs/architecture/index.d.ts +1 -0
- package/dist/components/docs/architecture/index.js +507 -289
- package/dist/components/docs/ecosystem/IntegrationsPage.js +6 -3
- package/dist/components/docs/ecosystem/PluginsPage.js +98 -98
- package/dist/components/docs/ecosystem/RegistryPage.js +39 -42
- package/dist/components/docs/ecosystem/TemplatesPage.js +26 -21
- package/dist/components/docs/ecosystem/ecosystem.docblocks.js +10 -10
- package/dist/components/docs/ecosystem/index.js +179 -174
- package/dist/components/docs/index.js +6795 -5376
- package/dist/components/docs/integrations/IntegrationsElevenLabsPage.js +2 -2
- package/dist/components/docs/integrations/IntegrationsGithubPage.d.ts +1 -0
- package/dist/components/docs/integrations/IntegrationsGithubPage.js +155 -0
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.d.ts +1 -0
- package/dist/components/docs/integrations/IntegrationsHealthRoutingPage.js +168 -0
- package/dist/components/docs/integrations/IntegrationsMistralPage.d.ts +1 -0
- package/dist/components/docs/integrations/IntegrationsMistralPage.js +203 -0
- package/dist/components/docs/integrations/IntegrationsOpenAIPage.js +2 -2
- package/dist/components/docs/integrations/IntegrationsOverviewPage.js +136 -9
- package/dist/components/docs/integrations/IntegrationsSlackPage.d.ts +1 -0
- package/dist/components/docs/integrations/IntegrationsSlackPage.js +161 -0
- package/dist/components/docs/integrations/IntegrationsSpecModelPage.js +72 -0
- package/dist/components/docs/integrations/IntegrationsTwilioPage.js +2 -2
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.d.ts +1 -0
- package/dist/components/docs/integrations/IntegrationsWhatsappMetaPage.js +157 -0
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.d.ts +1 -0
- package/dist/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +165 -0
- package/dist/components/docs/integrations/index.d.ts +6 -0
- package/dist/components/docs/integrations/index.js +1688 -492
- package/dist/index.js +8016 -6597
- package/dist/node/application/context-storage/index.js +28 -0
- package/dist/node/application/index.js +662 -2
- package/dist/node/application/mcp/cliMcp.js +12 -2
- package/dist/node/application/mcp/common.js +12 -2
- package/dist/node/application/mcp/contractsMcp.js +530 -0
- package/dist/node/application/mcp/contractsMcpResources.js +123 -0
- package/dist/node/application/mcp/contractsMcpTools.js +199 -0
- package/dist/node/application/mcp/contractsMcpTypes.js +0 -0
- package/dist/node/application/mcp/docsMcp.js +12 -2
- package/dist/node/application/mcp/index.js +635 -2
- package/dist/node/application/mcp/internalMcp.js +12 -2
- package/dist/node/application/mcp/providerRankingMcp.js +493 -0
- package/dist/node/components/docs/DocsIndexPage.js +1 -1
- package/dist/node/components/docs/architecture/ArchitectureControlPlanePage.js +203 -0
- package/dist/node/components/docs/architecture/ArchitectureOverviewPage.js +17 -1
- package/dist/node/components/docs/architecture/index.js +507 -289
- package/dist/node/components/docs/ecosystem/IntegrationsPage.js +6 -3
- package/dist/node/components/docs/ecosystem/PluginsPage.js +98 -98
- package/dist/node/components/docs/ecosystem/RegistryPage.js +39 -42
- package/dist/node/components/docs/ecosystem/TemplatesPage.js +26 -21
- package/dist/node/components/docs/ecosystem/ecosystem.docblocks.js +10 -10
- package/dist/node/components/docs/ecosystem/index.js +179 -174
- package/dist/node/components/docs/index.js +6795 -5376
- package/dist/node/components/docs/integrations/IntegrationsElevenLabsPage.js +2 -2
- package/dist/node/components/docs/integrations/IntegrationsGithubPage.js +154 -0
- package/dist/node/components/docs/integrations/IntegrationsHealthRoutingPage.js +167 -0
- package/dist/node/components/docs/integrations/IntegrationsMistralPage.js +202 -0
- package/dist/node/components/docs/integrations/IntegrationsOpenAIPage.js +2 -2
- package/dist/node/components/docs/integrations/IntegrationsOverviewPage.js +136 -9
- package/dist/node/components/docs/integrations/IntegrationsSlackPage.js +160 -0
- package/dist/node/components/docs/integrations/IntegrationsSpecModelPage.js +72 -0
- package/dist/node/components/docs/integrations/IntegrationsTwilioPage.js +2 -2
- package/dist/node/components/docs/integrations/IntegrationsWhatsappMetaPage.js +156 -0
- package/dist/node/components/docs/integrations/IntegrationsWhatsappTwilioPage.js +164 -0
- package/dist/node/components/docs/integrations/index.js +1688 -492
- package/dist/node/index.js +8016 -6597
- package/package.json +195 -25
- package/src/application/context-storage/index.ts +58 -0
- package/src/application/index.ts +1 -0
- package/src/application/mcp/common.ts +28 -1
- package/src/application/mcp/contractsMcp.ts +34 -0
- package/src/application/mcp/contractsMcpResources.ts +142 -0
- package/src/application/mcp/contractsMcpTools.ts +246 -0
- package/src/application/mcp/contractsMcpTypes.ts +47 -0
- package/src/application/mcp/index.ts +2 -0
- package/src/application/mcp/providerRankingMcp.ts +380 -0
- package/src/components/docs/DocsIndexPage.tsx +2 -1
- package/src/components/docs/architecture/ArchitectureControlPlanePage.tsx +136 -0
- package/src/components/docs/architecture/ArchitectureOverviewPage.tsx +13 -1
- package/src/components/docs/architecture/index.ts +1 -0
- package/src/components/docs/ecosystem/IntegrationsPage.tsx +4 -3
- package/src/components/docs/ecosystem/PluginsPage.tsx +68 -87
- package/src/components/docs/ecosystem/RegistryPage.tsx +35 -43
- package/src/components/docs/ecosystem/TemplatesPage.tsx +28 -21
- package/src/components/docs/ecosystem/ecosystem.docblocks.ts +12 -10
- package/src/components/docs/generated/docs-index._common.json +1119 -1
- package/src/components/docs/generated/docs-index.health.json +98 -0
- package/src/components/docs/generated/docs-index.manifest.json +15 -5
- package/src/components/docs/generated/docs-index.metrics.json +8 -0
- package/src/components/docs/generated/docs-index.platform-integrations.json +89 -1
- package/src/components/docs/generated/docs-index.video-api-showcase.json +26 -0
- package/src/components/docs/integrations/IntegrationsElevenLabsPage.tsx +2 -2
- package/src/components/docs/integrations/IntegrationsGithubPage.tsx +90 -0
- package/src/components/docs/integrations/IntegrationsHealthRoutingPage.tsx +112 -0
- package/src/components/docs/integrations/IntegrationsMistralPage.tsx +133 -0
- package/src/components/docs/integrations/IntegrationsOpenAIPage.tsx +2 -2
- package/src/components/docs/integrations/IntegrationsOverviewPage.tsx +108 -9
- package/src/components/docs/integrations/IntegrationsSlackPage.tsx +98 -0
- package/src/components/docs/integrations/IntegrationsSpecModelPage.tsx +59 -0
- package/src/components/docs/integrations/IntegrationsTwilioPage.tsx +2 -2
- package/src/components/docs/integrations/IntegrationsWhatsappMetaPage.tsx +90 -0
- package/src/components/docs/integrations/IntegrationsWhatsappTwilioPage.tsx +92 -0
- 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>
|
|
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
|
-
|
|
49
|
+
Marketplace manifest <ChevronRight size={16} />
|
|
49
50
|
</Link>
|
|
50
51
|
<Link href="/docs/ecosystem/templates" className="btn-ghost">
|
|
51
|
-
|
|
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">
|
|
9
|
+
<h1 className="text-4xl font-bold">Cursor marketplace plugins</h1>
|
|
10
10
|
<p className="text-muted-foreground text-lg">
|
|
11
|
-
|
|
12
|
-
and
|
|
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">
|
|
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>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<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">
|
|
40
|
+
<h2 className="text-2xl font-bold">Where plugin sources live</h2>
|
|
30
41
|
<p className="text-muted-foreground text-sm">
|
|
31
|
-
|
|
32
|
-
|
|
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="
|
|
36
|
-
filename="
|
|
37
|
-
code={`
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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">
|
|
58
|
+
<h2 className="text-2xl font-bold">Root marketplace manifest</h2>
|
|
101
59
|
<p className="text-muted-foreground text-sm">
|
|
102
|
-
|
|
103
|
-
|
|
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=".
|
|
65
|
+
filename=".cursor-plugin/marketplace.json"
|
|
108
66
|
code={`{
|
|
67
|
+
"name": "contractspec-marketplace",
|
|
109
68
|
"plugins": [
|
|
110
69
|
{
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
|
|
108
|
+
Author a plugin <ChevronRight size={16} />
|
|
128
109
|
</Link>
|
|
129
|
-
<Link href="/docs/ecosystem/
|
|
130
|
-
|
|
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">
|
|
9
|
+
<h1 className="text-4xl font-bold">Marketplace manifest</h1>
|
|
10
10
|
<p className="text-muted-foreground text-lg">
|
|
11
|
-
|
|
12
|
-
|
|
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">
|
|
17
|
+
<h2 className="text-2xl font-bold">Root manifest shape</h2>
|
|
18
18
|
<p className="text-muted-foreground text-sm">
|
|
19
|
-
|
|
20
|
-
|
|
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=".
|
|
24
|
+
filename=".cursor-plugin/marketplace.json"
|
|
25
25
|
code={`{
|
|
26
|
+
"name": "contractspec-marketplace",
|
|
26
27
|
"plugins": [
|
|
27
28
|
{
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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">
|
|
42
|
+
<h2 className="text-2xl font-bold">Per-plugin contract</h2>
|
|
50
43
|
<p className="text-muted-foreground text-sm">
|
|
51
|
-
|
|
44
|
+
Each plugin source must include a Cursor plugin manifest and
|
|
45
|
+
composable assets.
|
|
52
46
|
</p>
|
|
53
47
|
<CodeBlock
|
|
54
|
-
language="
|
|
55
|
-
filename="
|
|
56
|
-
code={`
|
|
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
|
-
|
|
59
|
-
|
|
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
|
|
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
|
|
18
|
+
<h2 className="text-2xl font-bold">Create a focused plugin</h2>
|
|
18
19
|
<p className="text-muted-foreground text-sm">
|
|
19
|
-
|
|
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="
|
|
24
|
-
code={`
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
35
|
-
<li>
|
|
36
|
-
<li>.
|
|
37
|
-
<li>README.md
|
|
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">
|
|
49
|
+
<h2 className="text-2xl font-bold">Validate before submission</h2>
|
|
43
50
|
<CodeBlock
|
|
44
51
|
language="bash"
|
|
45
|
-
filename="
|
|
46
|
-
code={
|
|
47
|
-
bun
|
|
52
|
+
filename="validate-marketplace-catalog"
|
|
53
|
+
code={`# Validate all plugins referenced by root marketplace manifest
|
|
54
|
+
bun run plugin:contractspec:validate
|
|
48
55
|
|
|
49
|
-
#
|
|
50
|
-
bun
|
|
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
|
-
|
|
68
|
+
Marketplace plugins <ChevronRight size={16} />
|
|
62
69
|
</Link>
|
|
63
70
|
<Link href="/docs/ecosystem/registry" className="btn-ghost">
|
|
64
|
-
|
|
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: '
|
|
8
|
-
summary:
|
|
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: `#
|
|
14
|
+
body: `# Marketplace plugins
|
|
14
15
|
|
|
15
|
-
ContractSpec
|
|
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:
|
|
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\
|
|
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: '
|
|
43
|
-
summary: '
|
|
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: '#
|
|
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
|
|