@contractspec/bundle.library 3.9.6 → 3.9.8
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 +238 -230
- package/CHANGELOG.md +88 -0
- package/dist/components/docs/DocsIndexPage.js +2 -2
- package/dist/components/docs/docsManifest.js +1 -1
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +40 -4
- package/dist/components/docs/getting-started/index.js +46 -10
- package/dist/components/docs/guides/GuideContractDrivenFormsPage.content.d.ts +3 -0
- package/dist/components/docs/guides/GuideContractDrivenFormsPage.content.js +95 -0
- package/dist/components/docs/guides/GuideContractDrivenFormsPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideContractDrivenFormsPage.js +95 -0
- package/dist/components/docs/guides/GuideSpecValidationTypingPage.js +1 -1
- package/dist/components/docs/guides/GuidesIndexPage.js +2 -2
- package/dist/components/docs/guides/guides.docblocks.js +3 -1
- package/dist/components/docs/guides/index.d.ts +1 -0
- package/dist/components/docs/guides/index.js +139 -44
- package/dist/components/docs/index.js +586 -266
- package/dist/components/docs/libraries/LibrariesApplicationShellPage.content.d.ts +16 -0
- package/dist/components/docs/libraries/LibrariesApplicationShellPage.content.js +148 -0
- package/dist/components/docs/libraries/LibrariesApplicationShellPage.d.ts +1 -0
- package/dist/components/docs/libraries/LibrariesApplicationShellPage.js +148 -0
- package/dist/components/docs/libraries/LibrariesDataViewsPage.js +13 -6
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +3 -3
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -1
- package/dist/components/docs/libraries/index.d.ts +1 -0
- package/dist/components/docs/libraries/index.js +217 -64
- package/dist/components/docs/specs/SpecsDataViewsPage.js +37 -1
- package/dist/components/docs/specs/index.js +37 -1
- package/dist/index.js +597 -277
- package/dist/libs/posthog/client.js +1 -1
- package/dist/node/components/docs/DocsIndexPage.js +2 -2
- package/dist/node/components/docs/docsManifest.js +1 -1
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +40 -4
- package/dist/node/components/docs/getting-started/index.js +46 -10
- package/dist/node/components/docs/guides/GuideContractDrivenFormsPage.content.js +94 -0
- package/dist/node/components/docs/guides/GuideContractDrivenFormsPage.js +94 -0
- package/dist/node/components/docs/guides/GuideSpecValidationTypingPage.js +1 -1
- package/dist/node/components/docs/guides/GuidesIndexPage.js +2 -2
- package/dist/node/components/docs/guides/guides.docblocks.js +3 -1
- package/dist/node/components/docs/guides/index.js +139 -44
- package/dist/node/components/docs/index.js +586 -266
- package/dist/node/components/docs/libraries/LibrariesApplicationShellPage.content.js +147 -0
- package/dist/node/components/docs/libraries/LibrariesApplicationShellPage.js +147 -0
- package/dist/node/components/docs/libraries/LibrariesDataViewsPage.js +13 -6
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +3 -3
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -1
- package/dist/node/components/docs/libraries/index.js +217 -64
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +37 -1
- package/dist/node/components/docs/specs/index.js +37 -1
- package/dist/node/index.js +597 -277
- package/dist/node/libs/posthog/client.js +1 -1
- package/package.json +71 -23
- package/src/components/docs/docsManifest.ts +22 -0
- package/src/components/docs/generated/docs-index._common.json +2008 -1699
- package/src/components/docs/generated/docs-index.agent-console.json +377 -377
- package/src/components/docs/generated/docs-index.ai-chat-assistant.json +17 -17
- package/src/components/docs/generated/docs-index.ai-chat.json +105 -105
- package/src/components/docs/generated/docs-index.ai-support-bot.json +9 -9
- package/src/components/docs/generated/docs-index.analytics-dashboard.json +169 -169
- package/src/components/docs/generated/docs-index.app-config.json +137 -137
- package/src/components/docs/generated/docs-index.artisan-knowledge-product.json +17 -17
- package/src/components/docs/generated/docs-index.artisan-payments-stripe.json +33 -33
- package/src/components/docs/generated/docs-index.audit-trail.json +49 -49
- package/src/components/docs/generated/docs-index.calendar-google.json +9 -9
- package/src/components/docs/generated/docs-index.content-generation.json +9 -9
- package/src/components/docs/generated/docs-index.control-plane.json +17 -17
- package/src/components/docs/generated/docs-index.crm-pipeline.json +161 -161
- package/src/components/docs/generated/docs-index.data-grid-showcase.json +25 -25
- package/src/components/docs/generated/docs-index.defineExample.json +9 -9
- package/src/components/docs/generated/docs-index.email-gmail.json +9 -9
- package/src/components/docs/generated/docs-index.feature-flags.json +217 -217
- package/src/components/docs/generated/docs-index.files.json +177 -177
- package/src/components/docs/generated/docs-index.generated.ts +20 -20
- package/src/components/docs/generated/docs-index.harness-lab.json +9 -9
- package/src/components/docs/generated/docs-index.health.json +97 -97
- package/src/components/docs/generated/docs-index.identity-rbac.json +313 -313
- package/src/components/docs/generated/docs-index.in-app-docs.json +9 -9
- package/src/components/docs/generated/docs-index.integration-hub.json +265 -265
- package/src/components/docs/generated/docs-index.integration-posthog.json +9 -9
- package/src/components/docs/generated/docs-index.integration-stripe.json +9 -9
- package/src/components/docs/generated/docs-index.integration-supabase.json +9 -9
- package/src/components/docs/generated/docs-index.jobs.json +137 -137
- package/src/components/docs/generated/docs-index.kb-update-pipeline.json +129 -129
- package/src/components/docs/generated/docs-index.knowledge-canon.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-ambient-coach.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-crm-onboarding.json +49 -49
- package/src/components/docs/generated/docs-index.learning-journey-duo-drills.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-platform-tour.json +49 -49
- package/src/components/docs/generated/docs-index.learning-journey-quest-challenges.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-registry.json +33 -33
- package/src/components/docs/generated/docs-index.learning-journey-studio-onboarding.json +49 -49
- package/src/components/docs/generated/docs-index.learning-journey-ui-coaching.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-ui-gamified.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-ui-onboarding.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey-ui-shared.json +9 -9
- package/src/components/docs/generated/docs-index.learning-journey.json +241 -241
- package/src/components/docs/generated/docs-index.learning-patterns.json +9 -9
- package/src/components/docs/generated/docs-index.lifecycle-cli.json +9 -9
- package/src/components/docs/generated/docs-index.lifecycle-dashboard.json +9 -9
- package/src/components/docs/generated/docs-index.locale-jurisdiction-gate.json +65 -65
- package/src/components/docs/generated/docs-index.marketplace.json +337 -337
- package/src/components/docs/generated/docs-index.meeting-recorder-providers.json +9 -9
- package/src/components/docs/generated/docs-index.meeting-recorder.json +49 -49
- package/src/components/docs/generated/docs-index.messaging-agent-actions.json +17 -17
- package/src/components/docs/generated/docs-index.metrics.json +201 -201
- package/src/components/docs/generated/docs-index.minimal.json +17 -17
- package/src/components/docs/generated/docs-index.mobile-demo-landing.json +41 -41
- package/src/components/docs/generated/docs-index.notifications.json +65 -65
- package/src/components/docs/generated/docs-index.openbanking-powens.json +9 -9
- package/src/components/docs/generated/docs-index.openbanking.json +65 -65
- package/src/components/docs/generated/docs-index.opencode-cli.json +17 -17
- package/src/components/docs/generated/docs-index.personalization.json +9 -9
- package/src/components/docs/generated/docs-index.platform-acp.json +137 -137
- package/src/components/docs/generated/docs-index.platform-agent.json +201 -201
- package/src/components/docs/generated/docs-index.platform-context.json +121 -121
- package/src/components/docs/generated/docs-index.platform-control-plane.json +321 -321
- package/src/components/docs/generated/docs-index.platform-database.json +89 -89
- package/src/components/docs/generated/docs-index.platform-docs.json +161 -161
- package/src/components/docs/generated/docs-index.platform-harness.json +177 -177
- package/src/components/docs/generated/docs-index.platform-integrations.json +329 -329
- package/src/components/docs/generated/docs-index.platform-knowledge.json +57 -57
- package/src/components/docs/generated/docs-index.platform-provider-ranking.json +217 -217
- package/src/components/docs/generated/docs-index.pocket-family-office.json +129 -129
- package/src/components/docs/generated/docs-index.policy-safe-knowledge-assistant.json +9 -9
- package/src/components/docs/generated/docs-index.product-intent.json +9 -9
- package/src/components/docs/generated/docs-index.project-management-sync.json +9 -9
- package/src/components/docs/generated/docs-index.saas-boilerplate.json +209 -209
- package/src/components/docs/generated/docs-index.service-business-os.json +193 -193
- package/src/components/docs/generated/docs-index.team-hub.json +185 -185
- package/src/components/docs/generated/docs-index.unknown.json +521 -521
- package/src/components/docs/generated/docs-index.versioned-knowledge-base.json +81 -81
- package/src/components/docs/generated/docs-index.video-api-showcase.json +33 -33
- package/src/components/docs/generated/docs-index.video-docs-terminal.json +9 -9
- package/src/components/docs/generated/docs-index.video-marketing-clip.json +9 -9
- package/src/components/docs/generated/docs-index.visualization-showcase.json +17 -17
- package/src/components/docs/generated/docs-index.voice-providers.json +9 -9
- package/src/components/docs/generated/docs-index.wealth-snapshot.json +153 -153
- package/src/components/docs/generated/docs-index.workflow-system.json +433 -433
- package/src/components/docs/generated/docs-index.workspace-cli.json +9 -9
- package/src/components/docs/getting-started/DataViewTutorialPage.tsx +40 -1
- package/src/components/docs/guides/GuideContractDrivenFormsPage.content.ts +98 -0
- package/src/components/docs/guides/GuideContractDrivenFormsPage.tsx +143 -0
- package/src/components/docs/guides/GuideSpecValidationTypingPage.tsx +2 -2
- package/src/components/docs/guides/GuidesIndexPage.tsx +7 -0
- package/src/components/docs/guides/guides.docblocks.ts +12 -0
- package/src/components/docs/guides/index.ts +1 -0
- package/src/components/docs/libraries/LibrariesApplicationShellPage.content.ts +170 -0
- package/src/components/docs/libraries/LibrariesApplicationShellPage.tsx +112 -0
- package/src/components/docs/libraries/LibrariesDataViewsPage.tsx +26 -5
- package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +9 -0
- package/src/components/docs/libraries/LibrariesOverviewPage.tsx +6 -0
- package/src/components/docs/libraries/index.ts +1 -0
- package/src/components/docs/specs/SpecsDataViewsPage.tsx +39 -3
- package/src/libs/posthog/client.ts +11 -9
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var c=Object.defineProperty;var
|
|
2
|
+
var c=Object.defineProperty;var i=(t)=>t;function p(t,o){this[t]=i.bind(null,o)}var l=(t,o)=>{for(var e in o)c(t,e,{get:o[e],enumerable:!0,configurable:!0,set:p.bind(o,e)})};var d=(t,o)=>()=>(t&&(o=t(t=0)),o);import s from"posthog-js";var T={CTA_INSTALL_CLICK:"cta_install_click",CTA_STUDIO_CLICK:"cta_studio_click",DOCS_QUICKSTART_VIEW:"docs_quickstart_view",COPY_COMMAND_CLICK:"copy_command_click",EXAMPLE_REPO_OPEN:"example_repo_open"},n=process.env.NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY,_=process.env.NEXT_PUBLIC_POSTHOG_HOST||"https://eu.posthog.com",r=()=>{if(typeof window>"u")return!1;let t=window.navigator,o=window,e=t.doNotTrack??t.msDoNotTrack??o.doNotTrack;return e!=="1"&&e!=="yes"},a=()=>!1;function C(){if(typeof window>"u")return;if(a())return;if(!n){console.warn("[PostHog] NEXT_PUBLIC_CONTRACTSPEC_POSTHOG_KEY is missing");return}if(!r())return;s.init(n,{api_host:_,autocapture:!0,capture_dead_clicks:!0,capture_performance:!0,capture_pageview:!0,capture_heatmaps:!0,capture_exceptions:!0,debug:!1})}function N(t,o){if(!n)return;if(a())return;if(!r())return;try{(globalThis.posthog??s)?.capture?.(t,o)}catch{return}}var y=s;export{n as posthogKey,_ as posthogHost,s as posthog,C as initPosthog,y as default,N as captureAnalyticsEvent,T as analyticsEventNames};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var m=Object.defineProperty;var h=(i)=>i;function f(i,o){this[i]=h.bind(null,o)}var S=(i,o)=>{for(var t in o)m(i,t,{get:o[t],enumerable:!0,configurable:!0,set:f.bind(o,t)})};var M=(i,o)=>()=>(i&&(o=i(i=0)),o);var c=[{key:"start",title:"Start",description:"Install ContractSpec, wire a first contract, and adopt it into an existing codebase."},{key:"core-model",title:"Core Model",description:"Learn how contracts, generated surfaces, policies, overlays, and safe regeneration fit together."},{key:"build",title:"Build",description:"Use practical guides, libraries, architecture patterns, and examples to ship real surfaces."},{key:"operate",title:"Operate",description:"Run the system safely with governance, auditability, tracing, and operator-grade controls."},{key:"integrations",title:"Integrations",description:"Connect models, messaging, storage, payments, search, and external systems through typed bindings."},{key:"reference",title:"Reference",description:"Search generated contract docs, inspect example packages, and navigate the system as source of truth."},{key:"studio",title:"Studio",description:"Understand what Studio adds on top of the open system and when to adopt it."}],n=[{href:"/docs",title:"Documentation",description:"OSS-first documentation for ContractSpec, the open spec system for AI-native software.",audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/start-here",title:"Start here",description:"The fastest path from install to your first contract and generated surface.",section:"start",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/installation",title:"Installation",description:"Install the CLI and core packages, then prepare a workspace for incremental adoption.",section:"start",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/hello-world",title:"Hello world",description:"Define a first operation, generate the surface, and verify the end-to-end loop.",section:"start",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/compatibility",title:"Compatibility",description:"Check the supported runtimes, package managers, and adoption assumptions before rollout.",section:"start",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/tools",title:"Developer tools",description:"Use the CLI, editors, and helper tooling that make the OSS workflow practical day to day.",section:"start",order:50,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/troubleshooting",title:"Troubleshooting",description:"Resolve the common installation, validation, and runtime mistakes you hit during first adoption.",section:"start",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs",title:"Contracts and specs",description:"Understand the spec model that drives generated surfaces, validation, policy, and safe regeneration.",section:"core-model",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/capabilities",title:"Capabilities",description:"Model commands, queries, presentations, and events as explicit contract surfaces.",section:"core-model",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/dataviews",title:"Data views",description:"Define queryable, presentable views that stay aligned with the rest of the system.",section:"core-model",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/workflows",title:"Workflows",description:"Compose multi-step behavior from typed contracts, policies, and runtime orchestration.",section:"core-model",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/policy",title:"Policy",description:"Apply consistent governance, access rules, and risk controls across every surface.",section:"core-model",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/overlays",title:"Overlays",description:"Customize generated surfaces safely without forking the system or breaking regeneration.",section:"core-model",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/module-bundles",title:"Module bundles",description:"Define AI-native surfaces as typed bundle specs that resolve into personalized, auditable runtime plans.",section:"core-model",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/connect",title:"ContractSpec Connect",description:"Guard coding-agent edits and shell actions with task-scoped context, plan packets, patch verdicts, and review packets.",section:"core-model",order:80,navTitle:"Connect",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/builder-control-plane",title:"Builder control plane",description:"Route multimodal authoring work through governed builder contracts, provider policies, readiness gates, and mobile review flows.",section:"core-model",order:90,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/contract-types",title:"Contract types",description:"Choose the right contract surface for the behavior you want to make explicit.",section:"core-model",order:100,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides",title:"Guides",description:"Follow concrete adoption paths for existing apps, generated docs, CI gating, and typed surfaces.",section:"build",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/nextjs-one-endpoint",title:"Adopt one endpoint in Next.js",description:"Start with one endpoint, one contract, and one generated surface in an existing Next.js app.",section:"build",order:20,navTitle:"Next.js endpoint",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/import-existing-codebases",title:"Import an existing codebase",description:"Stabilize a live codebase incrementally instead of rewriting it from scratch.",section:"build",order:30,navTitle:"Import existing code",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/spec-validation-and-typing",title:"Validation and typing",description:"Keep runtime validation and TypeScript types aligned from the same source definitions.",section:"build",order:40,navTitle:"Validation and typing",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/generate-docs-clients-schemas",title:"Generate docs, clients, and schemas",description:"Export stable docs and client-facing artifacts from the same contract layer.",section:"build",order:50,navTitle:"Generate docs and clients",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/docs-generation-pipeline",title:"Docs generation pipeline",description:"Feed generated docs into the public docs site without breaking source-of-truth ownership.",section:"build",order:60,navTitle:"Docs pipeline",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/first-module-bundle",title:"Build a first module bundle",description:"Define one bundle spec, resolve a personalized surface plan, and render it through the React host layer.",section:"build",order:65,navTitle:"First module bundle",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/host-builder-workbench",title:"Host the Builder workbench",description:"Load a Builder workspace snapshot, wire common commands, and keep runtime mode plus mobile review flows explicit.",section:"build",order:66,navTitle:"Host Builder workbench",primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/connect-in-a-repo",title:"Use Connect in a repo",description:"Enable Connect in workspace config, verify agent actions, and inspect local review and replay artifacts.",section:"build",order:67,navTitle:"Connect in a repo",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/libraries",title:"Libraries overview",description:"Navigate the core libraries, runtimes, and system packages that make up the open foundation.",section:"build",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/libraries/cross-platform-ui",title:"Cross-platform UI",description:"Understand how the presentation runtimes, ui-kit-web, ui-kit, and design-system stay aligned across React and React Native.",section:"build",order:71,audience:"oss",ctaMode:"oss-next"},{href:"/docs/architecture",title:"Architecture",description:"See how the spec layer, runtimes, integrations, and multi-surface outputs fit together.",section:"build",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/safety",title:"Operate safely",description:"Add auditability, migrations, policy controls, and trustworthy release behavior from the start.",section:"operate",order:10,navTitle:"Safety overview",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/ci-contract-diff-gating",title:"CI diff gating",description:"Use deterministic checks to block drift and risky changes before they reach production.",section:"operate",order:20,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/release-capsules",title:"Author release capsules",description:"Pair changesets with structured release capsules, generate release artifacts, and keep changelog plus docs surfaces aligned.",section:"operate",order:25,navTitle:"Release capsules",primaryNav:!0,audience:"operator",ctaMode:"reference"},{href:"/docs/safety/security-trust",title:"Security and trust",description:"Understand the trust model, artifact validation expectations, and operational boundaries.",section:"operate",order:30,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/auditing",title:"Audit trails",description:"Track changes, policy decisions, and operational actions with a clear evidence trail.",section:"operate",order:40,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/migrations",title:"Migrations",description:"Evolve schemas and data safely without abandoning the contract layer.",section:"operate",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/tenant-isolation",title:"Tenant isolation",description:"Keep tenant data, config, policies, and integrations separated at runtime.",section:"operate",order:60,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/knowledge",title:"Knowledge and context",description:"Bind trusted knowledge sources to the system without losing governance or isolation.",section:"operate",order:70,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/telemetry",title:"Telemetry",description:"Instrument surfaces, collect evidence, and keep observability aligned with the contract model.",section:"operate",order:80,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/workflow-monitoring",title:"Workflow monitoring",description:"Observe multi-step execution with enough context to understand failures and regressions.",section:"operate",order:90,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/ops/distributed-tracing",title:"Distributed tracing",description:"Trace contract execution across integrations, workflows, and generated surfaces.",section:"operate",order:100,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations",title:"Integrations overview",description:"Understand the binding model for external services, providers, and tenant-owned connections.",section:"integrations",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/spec-model",title:"Integration spec model",description:"Define what an integration provides before wiring it into an app or runtime.",section:"integrations",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/openai",title:"OpenAI integration",description:"Connect OpenAI through typed capabilities, explicit provider config, and governed runtime usage.",section:"integrations",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/mistral",title:"Mistral integration",description:"Use Mistral through the same provider contract model and runtime guardrails.",section:"integrations",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/qdrant",title:"Qdrant integration",description:"Store and retrieve knowledge embeddings with explicit provider configuration and ownership.",section:"integrations",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations/stripe",title:"Stripe integration",description:"Bind payments and billing behavior without smearing provider logic across the codebase.",section:"integrations",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/twilio",title:"Twilio integration",description:"Handle messaging and telephony through typed transport boundaries and explicit configuration.",section:"integrations",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/github",title:"GitHub integration",description:"Push execution context into GitHub workflows and automation surfaces without hidden glue.",section:"integrations",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/reference",title:"Contract reference",description:"Browse the generated reference index for public contract surfaces, versions, and examples.",section:"reference",order:10,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/examples",title:"Examples",description:"Explore runnable examples and use them as reference implementations for new systems.",section:"reference",order:20,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/studio",title:"Studio overview",description:"See what Studio adds on top of OSS ContractSpec and when a team should adopt the operating layer.",section:"studio",order:10,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/manifesto",title:"Manifesto",description:"Why ContractSpec is built as an open system, how incremental adoption works, and why Studio stays additive.",audience:"secondary"},{href:"/docs/intent/contract-first-api",title:"Contract-first API",description:"Use contracts as the durable source of truth for API behavior and generated surfaces.",audience:"secondary"},{href:"/docs/intent/spec-driven-development",title:"Spec-driven development",description:"See how explicit specs stabilize change across APIs, UI, data, and agent-facing surfaces.",audience:"secondary"},{href:"/docs/intent/deterministic-codegen",title:"Deterministic regeneration",description:"Understand safe regeneration, conflict boundaries, and why teams keep control of the output.",audience:"secondary"},{href:"/docs/intent/schema-validation-typescript",title:"Schema validation and TypeScript",description:"Keep schema, runtime validation, and TypeScript behavior aligned without duplicate work.",audience:"secondary"},{href:"/docs/intent/openapi-alternative",title:"OpenAPI alternative",description:"Compare a multi-surface contract system with API-only description tooling.",audience:"secondary"},{href:"/docs/intent/generate-client-from-schema",title:"Generate client from schema",description:"Generate client-facing artifacts from the same source that drives runtime behavior.",audience:"secondary"},{href:"/docs/comparison",title:"Comparison overview",description:"Compare ContractSpec with workflow engines, internal-tool builders, and enterprise orchestration products.",audience:"secondary"},{href:"/docs/comparison/workflow-engines",title:"Workflow engines",description:"Contrast a contract system with workflow-only orchestration approaches.",audience:"secondary"},{href:"/docs/comparison/internal-tool-builders",title:"Internal-tool builders",description:"Compare ContractSpec with builders that optimize for screens instead of durable system contracts.",audience:"secondary"},{href:"/docs/comparison/automation-platforms",title:"Automation platforms",description:"Compare automation-first tools with a system that owns explicit contracts and generated surfaces.",audience:"secondary"},{href:"/docs/comparison/windmill",title:"Windmill comparison",description:"Understand where Windmill fits and where ContractSpec solves a different class of system problem.",audience:"secondary"},{href:"/docs/comparison/enterprise-platforms",title:"Enterprise orchestrators",description:"Compare ContractSpec with enterprise platforms that centralize execution in a closed operating surface.",audience:"secondary"},{href:"/docs/ecosystem/templates",title:"Templates",description:"Use templates and starter systems as proof points and accelerators for OSS adoption.",audience:"secondary"},{href:"/docs/ecosystem/plugins",title:"Plugins",description:"Explore marketplace and editor integrations that support the OSS workflow.",audience:"secondary"},{href:"/docs/ecosystem/registry",title:"Registry",description:"Inspect registry and manifest concepts that help package reusable capability surfaces.",audience:"secondary"}];function I(i){return n.find((o)=>o.href===i)}function g(){return c.map((i)=>({...i,items:n.filter((o)=>o.section===i.key&&o.primaryNav).sort((o,t)=>(o.order??0)-(t.order??0))}))}function y(){return n.filter((i)=>i.primaryNav).sort((i,o)=>c.findIndex((t)=>t.key===i.section)-c.findIndex((t)=>t.key===o.section)||(i.order??0)-(o.order??0))}function D(i){let o=y(),t=o.findIndex((a)=>a.href===i);if(t<0)return{previous:null,next:null};return{previous:o[t-1]??null,next:o[t+1]??null}}function l(){return n.filter((i)=>i.audience==="secondary")}function p(){return g().map((i)=>({...i,featured:i.items.slice(0,3)}))}import{CodeBlock as v}from"@contractspec/lib.design-system";import s from"@contractspec/lib.ui-link";import{ArrowRight as d,Boxes as u,FileSearch as b,ShieldCheck as w,Waypoints as N}from"lucide-react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var k=[{title:"One system, many surfaces",body:"Define explicit contracts once, then keep APIs, UI, data, events, and agent-facing surfaces aligned.",icon:u},{title:"Incremental adoption",body:"Start with one endpoint, one workflow, or one unsafe module. You do not need a rewrite to begin.",icon:N},{title:"Operator-grade controls",body:"Carry policy, auditability, migrations, tracing, and integration boundaries forward with the same system model.",icon:w}],x=[{title:"ContractSpec Connect",body:"Guard coding-agent edits and commands with local-first context, plan packets, patch verdicts, and review packets.",specHref:"/docs/specs/connect",guideHref:"/docs/guides/connect-in-a-repo"},{title:"Module bundles",body:"Define AI-native surfaces as typed bundle specs that resolve into auditable runtime plans.",specHref:"/docs/specs/module-bundles",guideHref:"/docs/guides/first-module-bundle"},{title:"Builder control plane",body:"Coordinate multimodal authoring, provider routing, readiness, export, and mobile review through governed contracts.",specHref:"/docs/specs/builder-control-plane",guideHref:"/docs/guides/host-builder-workbench"}];function H(){let i=p(),o=l().slice(0,6);return r("div",{className:"space-y-12",children:[r("section",{className:"space-y-6",children:[e("p",{className:"editorial-kicker",children:"OSS documentation"}),e("h1",{className:"editorial-title max-w-5xl",children:"Build AI-native systems on explicit contracts, then add Studio when you want the operating layer."}),e("p",{className:"editorial-subtitle",children:"These docs are optimized for OSS adopters first. Learn the contract model, generate and govern surfaces safely, wire integrations, and run the system in production without giving up ownership of your code."}),r("div",{className:"flex flex-wrap gap-3",children:[r(s,{href:"/docs/getting-started/start-here",className:"btn-primary text-sm",children:["Start with OSS ",e(d,{size:16})]}),e(s,{href:"/docs/studio",className:"btn-ghost text-sm",children:"See what Studio adds"})]})]}),e("section",{className:"grid gap-5 md:grid-cols-3",children:k.map((t)=>{let a=t.icon;return r("article",{className:"editorial-panel space-y-3",children:[r("div",{className:"flex items-center gap-3",children:[e("div",{className:"rounded-full border border-border/80 bg-background/85 p-2",children:e(a,{size:18})}),e("h2",{className:"font-semibold text-xl",children:t.title})]}),e("p",{className:"editorial-copy text-sm",children:t.body})]},t.title)})}),r("section",{className:"space-y-5",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Implemented packs"}),e("h2",{className:"editorial-panel-title",children:"Use the three higher-order systems that are already wired"}),e("p",{className:"editorial-copy text-sm",children:"These pages are the canonical landing points for agent enforcement, AI-native surface composition, and Builder authoring. Each one now has a matching practical guide."})]}),e("div",{className:"grid gap-4 lg:grid-cols-3",children:x.map((t)=>r("article",{className:"editorial-panel space-y-4",children:[r("div",{children:[e("h3",{className:"font-semibold text-xl",children:t.title}),e("p",{className:"mt-2 text-muted-foreground text-sm leading-7",children:t.body})]}),r("div",{className:"flex flex-wrap gap-3",children:[r(s,{href:t.specHref,className:"btn-primary text-sm",children:["Open spec page ",e(d,{size:16})]}),e(s,{href:t.guideHref,className:"btn-ghost text-sm",children:"Read practical guide"})]})]},t.title))})]}),r("section",{className:"editorial-panel space-y-5",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Quick start"}),e("h2",{className:"editorial-panel-title",children:"Start with one contract"}),e("p",{className:"editorial-copy text-sm",children:"Use the CLI and core libraries to define one explicit capability, generate the surface, and validate the contract boundary before you expand."})]}),e(v,{language:"bash",filename:"docs-quick-start",code:`bun add -D contractspec
|
|
1
|
+
var m=Object.defineProperty;var h=(i)=>i;function f(i,o){this[i]=h.bind(null,o)}var S=(i,o)=>{for(var t in o)m(i,t,{get:o[t],enumerable:!0,configurable:!0,set:f.bind(o,t)})};var M=(i,o)=>()=>(i&&(o=i(i=0)),o);var c=[{key:"start",title:"Start",description:"Install ContractSpec, wire a first contract, and adopt it into an existing codebase."},{key:"core-model",title:"Core Model",description:"Learn how contracts, generated surfaces, policies, overlays, and safe regeneration fit together."},{key:"build",title:"Build",description:"Use practical guides, libraries, architecture patterns, and examples to ship real surfaces."},{key:"operate",title:"Operate",description:"Run the system safely with governance, auditability, tracing, and operator-grade controls."},{key:"integrations",title:"Integrations",description:"Connect models, messaging, storage, payments, search, and external systems through typed bindings."},{key:"reference",title:"Reference",description:"Search generated contract docs, inspect example packages, and navigate the system as source of truth."},{key:"studio",title:"Studio",description:"Understand what Studio adds on top of the open system and when to adopt it."}],n=[{href:"/docs",title:"Documentation",description:"OSS-first documentation for ContractSpec, the open spec system for AI-native software.",audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/start-here",title:"Start here",description:"The fastest path from install to your first contract and generated surface.",section:"start",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/installation",title:"Installation",description:"Install the CLI and core packages, then prepare a workspace for incremental adoption.",section:"start",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/hello-world",title:"Hello world",description:"Define a first operation, generate the surface, and verify the end-to-end loop.",section:"start",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/compatibility",title:"Compatibility",description:"Check the supported runtimes, package managers, and adoption assumptions before rollout.",section:"start",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/tools",title:"Developer tools",description:"Use the CLI, editors, and helper tooling that make the OSS workflow practical day to day.",section:"start",order:50,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/troubleshooting",title:"Troubleshooting",description:"Resolve the common installation, validation, and runtime mistakes you hit during first adoption.",section:"start",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs",title:"Contracts and specs",description:"Understand the spec model that drives generated surfaces, validation, policy, and safe regeneration.",section:"core-model",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/capabilities",title:"Capabilities",description:"Model commands, queries, presentations, and events as explicit contract surfaces.",section:"core-model",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/dataviews",title:"Data views",description:"Define queryable, presentable views that stay aligned with the rest of the system.",section:"core-model",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/workflows",title:"Workflows",description:"Compose multi-step behavior from typed contracts, policies, and runtime orchestration.",section:"core-model",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/policy",title:"Policy",description:"Apply consistent governance, access rules, and risk controls across every surface.",section:"core-model",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/overlays",title:"Overlays",description:"Customize generated surfaces safely without forking the system or breaking regeneration.",section:"core-model",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/module-bundles",title:"Module bundles",description:"Define AI-native surfaces as typed bundle specs that resolve into personalized, auditable runtime plans.",section:"core-model",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/connect",title:"ContractSpec Connect",description:"Guard coding-agent edits and shell actions with task-scoped context, plan packets, patch verdicts, and review packets.",section:"core-model",order:80,navTitle:"Connect",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/builder-control-plane",title:"Builder control plane",description:"Route multimodal authoring work through governed builder contracts, provider policies, readiness gates, and mobile review flows.",section:"core-model",order:90,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/contract-types",title:"Contract types",description:"Choose the right contract surface for the behavior you want to make explicit.",section:"core-model",order:100,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides",title:"Guides",description:"Follow concrete adoption paths for existing apps, generated docs, CI gating, and typed surfaces.",section:"build",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/nextjs-one-endpoint",title:"Adopt one endpoint in Next.js",description:"Start with one endpoint, one contract, and one generated surface in an existing Next.js app.",section:"build",order:20,navTitle:"Next.js endpoint",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/import-existing-codebases",title:"Import an existing codebase",description:"Stabilize a live codebase incrementally instead of rewriting it from scratch.",section:"build",order:30,navTitle:"Import existing code",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/spec-validation-and-typing",title:"Validation and typing",description:"Keep runtime validation and TypeScript types aligned from the same source definitions.",section:"build",order:40,navTitle:"Validation and typing",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/contract-driven-forms",title:"Build a contract-driven form",description:"Define schema-backed form data, fields, layout, policy, and submit actions as one reusable ContractSpec surface.",section:"build",order:45,navTitle:"Contract-driven forms",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/generate-docs-clients-schemas",title:"Generate docs, clients, and schemas",description:"Export stable docs and client-facing artifacts from the same contract layer.",section:"build",order:50,navTitle:"Generate docs and clients",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/docs-generation-pipeline",title:"Docs generation pipeline",description:"Feed generated docs into the public docs site without breaking source-of-truth ownership.",section:"build",order:60,navTitle:"Docs pipeline",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/first-module-bundle",title:"Build a first module bundle",description:"Define one bundle spec, resolve a personalized surface plan, and render it through the React host layer.",section:"build",order:65,navTitle:"First module bundle",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/host-builder-workbench",title:"Host the Builder workbench",description:"Load a Builder workspace snapshot, wire common commands, and keep runtime mode plus mobile review flows explicit.",section:"build",order:66,navTitle:"Host Builder workbench",primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/connect-in-a-repo",title:"Use Connect in a repo",description:"Enable Connect in workspace config, verify agent actions, and inspect local review and replay artifacts.",section:"build",order:67,navTitle:"Connect in a repo",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/libraries",title:"Libraries overview",description:"Navigate the core libraries, runtimes, and system packages that make up the open foundation.",section:"build",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/libraries/cross-platform-ui",title:"Cross-platform UI",description:"Understand how the presentation runtimes, ui-kit-web, ui-kit, and design-system stay aligned across React and React Native.",section:"build",order:71,audience:"oss",ctaMode:"oss-next"},{href:"/docs/libraries/application-shell",title:"Application shell",description:"Implement reusable app navigation with desktop sidebars, topbar breadcrumbs, command search, mobile adapters, and PageOutline section navigation.",section:"build",order:72,audience:"oss",ctaMode:"oss-next"},{href:"/docs/architecture",title:"Architecture",description:"See how the spec layer, runtimes, integrations, and multi-surface outputs fit together.",section:"build",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/safety",title:"Operate safely",description:"Add auditability, migrations, policy controls, and trustworthy release behavior from the start.",section:"operate",order:10,navTitle:"Safety overview",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/ci-contract-diff-gating",title:"CI diff gating",description:"Use deterministic checks to block drift and risky changes before they reach production.",section:"operate",order:20,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/release-capsules",title:"Author release capsules",description:"Pair changesets with structured release capsules, generate release artifacts, and keep changelog plus docs surfaces aligned.",section:"operate",order:25,navTitle:"Release capsules",primaryNav:!0,audience:"operator",ctaMode:"reference"},{href:"/docs/safety/security-trust",title:"Security and trust",description:"Understand the trust model, artifact validation expectations, and operational boundaries.",section:"operate",order:30,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/auditing",title:"Audit trails",description:"Track changes, policy decisions, and operational actions with a clear evidence trail.",section:"operate",order:40,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/migrations",title:"Migrations",description:"Evolve schemas and data safely without abandoning the contract layer.",section:"operate",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/tenant-isolation",title:"Tenant isolation",description:"Keep tenant data, config, policies, and integrations separated at runtime.",section:"operate",order:60,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/knowledge",title:"Knowledge and context",description:"Bind trusted knowledge sources to the system without losing governance or isolation.",section:"operate",order:70,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/telemetry",title:"Telemetry",description:"Instrument surfaces, collect evidence, and keep observability aligned with the contract model.",section:"operate",order:80,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/workflow-monitoring",title:"Workflow monitoring",description:"Observe multi-step execution with enough context to understand failures and regressions.",section:"operate",order:90,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/ops/distributed-tracing",title:"Distributed tracing",description:"Trace contract execution across integrations, workflows, and generated surfaces.",section:"operate",order:100,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations",title:"Integrations overview",description:"Understand the binding model for external services, providers, and tenant-owned connections.",section:"integrations",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/spec-model",title:"Integration spec model",description:"Define what an integration provides before wiring it into an app or runtime.",section:"integrations",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/openai",title:"OpenAI integration",description:"Connect OpenAI through typed capabilities, explicit provider config, and governed runtime usage.",section:"integrations",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/mistral",title:"Mistral integration",description:"Use Mistral through the same provider contract model and runtime guardrails.",section:"integrations",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/qdrant",title:"Qdrant integration",description:"Store and retrieve knowledge embeddings with explicit provider configuration and ownership.",section:"integrations",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations/stripe",title:"Stripe integration",description:"Bind payments and billing behavior without smearing provider logic across the codebase.",section:"integrations",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/twilio",title:"Twilio integration",description:"Handle messaging and telephony through typed transport boundaries and explicit configuration.",section:"integrations",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/github",title:"GitHub integration",description:"Push execution context into GitHub workflows and automation surfaces without hidden glue.",section:"integrations",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/reference",title:"Contract reference",description:"Browse the generated reference index for public contract surfaces, versions, and examples.",section:"reference",order:10,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/examples",title:"Examples",description:"Explore runnable examples and use them as reference implementations for new systems.",section:"reference",order:20,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/studio",title:"Studio overview",description:"See what Studio adds on top of OSS ContractSpec and when a team should adopt the operating layer.",section:"studio",order:10,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/manifesto",title:"Manifesto",description:"Why ContractSpec is built as an open system, how incremental adoption works, and why Studio stays additive.",audience:"secondary"},{href:"/docs/intent/contract-first-api",title:"Contract-first API",description:"Use contracts as the durable source of truth for API behavior and generated surfaces.",audience:"secondary"},{href:"/docs/intent/spec-driven-development",title:"Spec-driven development",description:"See how explicit specs stabilize change across APIs, UI, data, and agent-facing surfaces.",audience:"secondary"},{href:"/docs/intent/deterministic-codegen",title:"Deterministic regeneration",description:"Understand safe regeneration, conflict boundaries, and why teams keep control of the output.",audience:"secondary"},{href:"/docs/intent/schema-validation-typescript",title:"Schema validation and TypeScript",description:"Keep schema, runtime validation, and TypeScript behavior aligned without duplicate work.",audience:"secondary"},{href:"/docs/intent/openapi-alternative",title:"OpenAPI alternative",description:"Compare a multi-surface contract system with API-only description tooling.",audience:"secondary"},{href:"/docs/intent/generate-client-from-schema",title:"Generate client from schema",description:"Generate client-facing artifacts from the same source that drives runtime behavior.",audience:"secondary"},{href:"/docs/comparison",title:"Comparison overview",description:"Compare ContractSpec with workflow engines, internal-tool builders, and enterprise orchestration products.",audience:"secondary"},{href:"/docs/comparison/workflow-engines",title:"Workflow engines",description:"Contrast a contract system with workflow-only orchestration approaches.",audience:"secondary"},{href:"/docs/comparison/internal-tool-builders",title:"Internal-tool builders",description:"Compare ContractSpec with builders that optimize for screens instead of durable system contracts.",audience:"secondary"},{href:"/docs/comparison/automation-platforms",title:"Automation platforms",description:"Compare automation-first tools with a system that owns explicit contracts and generated surfaces.",audience:"secondary"},{href:"/docs/comparison/windmill",title:"Windmill comparison",description:"Understand where Windmill fits and where ContractSpec solves a different class of system problem.",audience:"secondary"},{href:"/docs/comparison/enterprise-platforms",title:"Enterprise orchestrators",description:"Compare ContractSpec with enterprise platforms that centralize execution in a closed operating surface.",audience:"secondary"},{href:"/docs/ecosystem/templates",title:"Templates",description:"Use templates and starter systems as proof points and accelerators for OSS adoption.",audience:"secondary"},{href:"/docs/ecosystem/plugins",title:"Plugins",description:"Explore marketplace and editor integrations that support the OSS workflow.",audience:"secondary"},{href:"/docs/ecosystem/registry",title:"Registry",description:"Inspect registry and manifest concepts that help package reusable capability surfaces.",audience:"secondary"}];function I(i){return n.find((o)=>o.href===i)}function g(){return c.map((i)=>({...i,items:n.filter((o)=>o.section===i.key&&o.primaryNav).sort((o,t)=>(o.order??0)-(t.order??0))}))}function y(){return n.filter((i)=>i.primaryNav).sort((i,o)=>c.findIndex((t)=>t.key===i.section)-c.findIndex((t)=>t.key===o.section)||(i.order??0)-(o.order??0))}function D(i){let o=y(),t=o.findIndex((a)=>a.href===i);if(t<0)return{previous:null,next:null};return{previous:o[t-1]??null,next:o[t+1]??null}}function l(){return n.filter((i)=>i.audience==="secondary")}function p(){return g().map((i)=>({...i,featured:i.items.slice(0,3)}))}import{CodeBlock as v}from"@contractspec/lib.design-system";import s from"@contractspec/lib.ui-link";import{ArrowRight as d,Boxes as u,FileSearch as b,ShieldCheck as w,Waypoints as N}from"lucide-react";import{jsx as e,jsxs as r}from"react/jsx-runtime";var k=[{title:"One system, many surfaces",body:"Define explicit contracts once, then keep APIs, UI, data, events, and agent-facing surfaces aligned.",icon:u},{title:"Incremental adoption",body:"Start with one endpoint, one workflow, or one unsafe module. You do not need a rewrite to begin.",icon:N},{title:"Operator-grade controls",body:"Carry policy, auditability, migrations, tracing, and integration boundaries forward with the same system model.",icon:w}],x=[{title:"ContractSpec Connect",body:"Guard coding-agent edits and commands with local-first context, plan packets, patch verdicts, and review packets.",specHref:"/docs/specs/connect",guideHref:"/docs/guides/connect-in-a-repo"},{title:"Module bundles",body:"Define AI-native surfaces as typed bundle specs that resolve into auditable runtime plans.",specHref:"/docs/specs/module-bundles",guideHref:"/docs/guides/first-module-bundle"},{title:"Builder control plane",body:"Coordinate multimodal authoring, provider routing, readiness, export, and mobile review through governed contracts.",specHref:"/docs/specs/builder-control-plane",guideHref:"/docs/guides/host-builder-workbench"}];function B(){let i=p(),o=l().slice(0,6);return r("div",{className:"space-y-12",children:[r("section",{className:"space-y-6",children:[e("p",{className:"editorial-kicker",children:"OSS documentation"}),e("h1",{className:"editorial-title max-w-5xl",children:"Build AI-native systems on explicit contracts, then add Studio when you want the operating layer."}),e("p",{className:"editorial-subtitle",children:"These docs are optimized for OSS adopters first. Learn the contract model, generate and govern surfaces safely, wire integrations, and run the system in production without giving up ownership of your code."}),r("div",{className:"flex flex-wrap gap-3",children:[r(s,{href:"/docs/getting-started/start-here",className:"btn-primary text-sm",children:["Start with OSS ",e(d,{size:16})]}),e(s,{href:"/docs/studio",className:"btn-ghost text-sm",children:"See what Studio adds"})]})]}),e("section",{className:"grid gap-5 md:grid-cols-3",children:k.map((t)=>{let a=t.icon;return r("article",{className:"editorial-panel space-y-3",children:[r("div",{className:"flex items-center gap-3",children:[e("div",{className:"rounded-full border border-border/80 bg-background/85 p-2",children:e(a,{size:18})}),e("h2",{className:"font-semibold text-xl",children:t.title})]}),e("p",{className:"editorial-copy text-sm",children:t.body})]},t.title)})}),r("section",{className:"space-y-5",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Implemented packs"}),e("h2",{className:"editorial-panel-title",children:"Use the three higher-order systems that are already wired"}),e("p",{className:"editorial-copy text-sm",children:"These pages are the canonical landing points for agent enforcement, AI-native surface composition, and Builder authoring. Each one now has a matching practical guide."})]}),e("div",{className:"grid gap-4 lg:grid-cols-3",children:x.map((t)=>r("article",{className:"editorial-panel space-y-4",children:[r("div",{children:[e("h3",{className:"font-semibold text-xl",children:t.title}),e("p",{className:"mt-2 text-muted-foreground text-sm leading-7",children:t.body})]}),r("div",{className:"flex flex-wrap gap-3",children:[r(s,{href:t.specHref,className:"btn-primary text-sm",children:["Open spec page ",e(d,{size:16})]}),e(s,{href:t.guideHref,className:"btn-ghost text-sm",children:"Read practical guide"})]})]},t.title))})]}),r("section",{className:"editorial-panel space-y-5",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Quick start"}),e("h2",{className:"editorial-panel-title",children:"Start with one contract"}),e("p",{className:"editorial-copy text-sm",children:"Use the CLI and core libraries to define one explicit capability, generate the surface, and validate the contract boundary before you expand."})]}),e(v,{language:"bash",filename:"docs-quick-start",code:`bun add -D contractspec
|
|
2
2
|
bun add @contractspec/lib.contracts-spec @contractspec/lib.schema
|
|
3
3
|
|
|
4
4
|
contractspec init
|
|
5
5
|
contractspec create --type operation
|
|
6
6
|
contractspec build src/contracts/mySpec.ts
|
|
7
|
-
contractspec validate src/contracts/mySpec.ts`})]}),r("section",{className:"space-y-5",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Primary path"}),e("h2",{className:"editorial-panel-title",children:"Move through the system in the right order"}),e("p",{className:"editorial-copy text-sm",children:"Start with onboarding, then learn the model, then build and operate with confidence. The primary docs path is intentionally shorter than the full route inventory."})]}),e("div",{className:"grid gap-5 lg:grid-cols-2",children:i.map((t)=>r("article",{className:"editorial-panel space-y-4",children:[r("div",{children:[e("p",{className:"editorial-kicker",children:t.title}),e("h3",{className:"mt-2 font-serif text-3xl tracking-[-0.03em]",children:t.title}),e("p",{className:"mt-3 text-muted-foreground text-sm leading-7",children:t.description})]}),e("div",{className:"space-y-3",children:t.featured.map((a)=>r(s,{href:a.href,className:"flex items-start justify-between gap-4 rounded-[22px] border border-border/70 bg-background/70 p-4 transition-colors hover:border-[color:rgb(162_79_42_/_0.45)]",children:[r("div",{children:[e("h4",{className:"font-semibold text-base",children:a.title}),e("p",{className:"mt-1 text-muted-foreground text-sm leading-6",children:a.description})]}),e(d,{className:"mt-1 shrink-0",size:16})]},a.href))})]},t.key))})]}),r("section",{className:"grid gap-5 lg:grid-cols-[1.2fr_0.8fr]",children:[r("article",{className:"editorial-panel space-y-4",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Reference and evidence"}),e("h2",{className:"editorial-panel-title",children:"Use generated docs and examples as proof, not just narrative copy"}),e("p",{className:"editorial-copy text-sm",children:"The reference index and example catalog stay close to the repo truth. Use them when you need exact public surfaces, not just the explanatory layer."})]}),r("div",{className:"grid gap-4 md:grid-cols-2",children:[r(s,{href:"/docs/reference",className:"docs-footer-link",children:[r("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[e(b,{size:16}),e("span",{children:"Reference index"})]}),e("p",{className:"text-muted-foreground text-sm",children:"Search generated contract docs, versions, tags, and visibility metadata."})]}),r(s,{href:"/docs/examples",className:"docs-footer-link",children:[r("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[e(u,{size:16}),e("span",{children:"Examples"})]}),e("p",{className:"text-muted-foreground text-sm",children:"Browse runnable examples and follow the reference routes back to their source artifacts."})]})]})]}),r("article",{className:"editorial-panel space-y-4",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Secondary reading"}),e("h2",{className:"editorial-panel-title",children:"Why ContractSpec"}),e("p",{className:"editorial-copy text-sm",children:"Positioning, comparisons, and philosophy remain available, but they no longer define the main docs path."})]}),e("div",{className:"flex flex-wrap gap-2",children:o.map((t)=>e(s,{href:t.href,className:"docs-chip-link",children:t.title},t.href))})]})]})]})}export{
|
|
7
|
+
contractspec validate src/contracts/mySpec.ts`})]}),r("section",{className:"space-y-5",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Primary path"}),e("h2",{className:"editorial-panel-title",children:"Move through the system in the right order"}),e("p",{className:"editorial-copy text-sm",children:"Start with onboarding, then learn the model, then build and operate with confidence. The primary docs path is intentionally shorter than the full route inventory."})]}),e("div",{className:"grid gap-5 lg:grid-cols-2",children:i.map((t)=>r("article",{className:"editorial-panel space-y-4",children:[r("div",{children:[e("p",{className:"editorial-kicker",children:t.title}),e("h3",{className:"mt-2 font-serif text-3xl tracking-[-0.03em]",children:t.title}),e("p",{className:"mt-3 text-muted-foreground text-sm leading-7",children:t.description})]}),e("div",{className:"space-y-3",children:t.featured.map((a)=>r(s,{href:a.href,className:"flex items-start justify-between gap-4 rounded-[22px] border border-border/70 bg-background/70 p-4 transition-colors hover:border-[color:rgb(162_79_42_/_0.45)]",children:[r("div",{children:[e("h4",{className:"font-semibold text-base",children:a.title}),e("p",{className:"mt-1 text-muted-foreground text-sm leading-6",children:a.description})]}),e(d,{className:"mt-1 shrink-0",size:16})]},a.href))})]},t.key))})]}),r("section",{className:"grid gap-5 lg:grid-cols-[1.2fr_0.8fr]",children:[r("article",{className:"editorial-panel space-y-4",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Reference and evidence"}),e("h2",{className:"editorial-panel-title",children:"Use generated docs and examples as proof, not just narrative copy"}),e("p",{className:"editorial-copy text-sm",children:"The reference index and example catalog stay close to the repo truth. Use them when you need exact public surfaces, not just the explanatory layer."})]}),r("div",{className:"grid gap-4 md:grid-cols-2",children:[r(s,{href:"/docs/reference",className:"docs-footer-link",children:[r("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[e(b,{size:16}),e("span",{children:"Reference index"})]}),e("p",{className:"text-muted-foreground text-sm",children:"Search generated contract docs, versions, tags, and visibility metadata."})]}),r(s,{href:"/docs/examples",className:"docs-footer-link",children:[r("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[e(u,{size:16}),e("span",{children:"Examples"})]}),e("p",{className:"text-muted-foreground text-sm",children:"Browse runnable examples and follow the reference routes back to their source artifacts."})]})]})]}),r("article",{className:"editorial-panel space-y-4",children:[r("div",{className:"space-y-2",children:[e("p",{className:"editorial-kicker",children:"Secondary reading"}),e("h2",{className:"editorial-panel-title",children:"Why ContractSpec"}),e("p",{className:"editorial-copy text-sm",children:"Positioning, comparisons, and philosophy remain available, but they no longer define the main docs path."})]}),e("div",{className:"flex flex-wrap gap-2",children:o.map((t)=>e(s,{href:t.href,className:"docs-chip-link",children:t.title},t.href))})]})]})]})}export{B as DocsIndexPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var n=Object.defineProperty;var a=(e)=>e;function c(e,t){this[e]=a.bind(null,t)}var l=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0,configurable:!0,set:c.bind(t,r)})};var u=(e,t)=>()=>(e&&(t=e(e=0)),t);var i=[{key:"start",title:"Start",description:"Install ContractSpec, wire a first contract, and adopt it into an existing codebase."},{key:"core-model",title:"Core Model",description:"Learn how contracts, generated surfaces, policies, overlays, and safe regeneration fit together."},{key:"build",title:"Build",description:"Use practical guides, libraries, architecture patterns, and examples to ship real surfaces."},{key:"operate",title:"Operate",description:"Run the system safely with governance, auditability, tracing, and operator-grade controls."},{key:"integrations",title:"Integrations",description:"Connect models, messaging, storage, payments, search, and external systems through typed bindings."},{key:"reference",title:"Reference",description:"Search generated contract docs, inspect example packages, and navigate the system as source of truth."},{key:"studio",title:"Studio",description:"Understand what Studio adds on top of the open system and when to adopt it."}],o=[{href:"/docs",title:"Documentation",description:"OSS-first documentation for ContractSpec, the open spec system for AI-native software.",audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/start-here",title:"Start here",description:"The fastest path from install to your first contract and generated surface.",section:"start",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/installation",title:"Installation",description:"Install the CLI and core packages, then prepare a workspace for incremental adoption.",section:"start",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/hello-world",title:"Hello world",description:"Define a first operation, generate the surface, and verify the end-to-end loop.",section:"start",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/compatibility",title:"Compatibility",description:"Check the supported runtimes, package managers, and adoption assumptions before rollout.",section:"start",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/tools",title:"Developer tools",description:"Use the CLI, editors, and helper tooling that make the OSS workflow practical day to day.",section:"start",order:50,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/troubleshooting",title:"Troubleshooting",description:"Resolve the common installation, validation, and runtime mistakes you hit during first adoption.",section:"start",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs",title:"Contracts and specs",description:"Understand the spec model that drives generated surfaces, validation, policy, and safe regeneration.",section:"core-model",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/capabilities",title:"Capabilities",description:"Model commands, queries, presentations, and events as explicit contract surfaces.",section:"core-model",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/dataviews",title:"Data views",description:"Define queryable, presentable views that stay aligned with the rest of the system.",section:"core-model",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/workflows",title:"Workflows",description:"Compose multi-step behavior from typed contracts, policies, and runtime orchestration.",section:"core-model",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/policy",title:"Policy",description:"Apply consistent governance, access rules, and risk controls across every surface.",section:"core-model",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/overlays",title:"Overlays",description:"Customize generated surfaces safely without forking the system or breaking regeneration.",section:"core-model",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/module-bundles",title:"Module bundles",description:"Define AI-native surfaces as typed bundle specs that resolve into personalized, auditable runtime plans.",section:"core-model",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/connect",title:"ContractSpec Connect",description:"Guard coding-agent edits and shell actions with task-scoped context, plan packets, patch verdicts, and review packets.",section:"core-model",order:80,navTitle:"Connect",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/builder-control-plane",title:"Builder control plane",description:"Route multimodal authoring work through governed builder contracts, provider policies, readiness gates, and mobile review flows.",section:"core-model",order:90,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/contract-types",title:"Contract types",description:"Choose the right contract surface for the behavior you want to make explicit.",section:"core-model",order:100,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides",title:"Guides",description:"Follow concrete adoption paths for existing apps, generated docs, CI gating, and typed surfaces.",section:"build",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/nextjs-one-endpoint",title:"Adopt one endpoint in Next.js",description:"Start with one endpoint, one contract, and one generated surface in an existing Next.js app.",section:"build",order:20,navTitle:"Next.js endpoint",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/import-existing-codebases",title:"Import an existing codebase",description:"Stabilize a live codebase incrementally instead of rewriting it from scratch.",section:"build",order:30,navTitle:"Import existing code",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/spec-validation-and-typing",title:"Validation and typing",description:"Keep runtime validation and TypeScript types aligned from the same source definitions.",section:"build",order:40,navTitle:"Validation and typing",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/generate-docs-clients-schemas",title:"Generate docs, clients, and schemas",description:"Export stable docs and client-facing artifacts from the same contract layer.",section:"build",order:50,navTitle:"Generate docs and clients",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/docs-generation-pipeline",title:"Docs generation pipeline",description:"Feed generated docs into the public docs site without breaking source-of-truth ownership.",section:"build",order:60,navTitle:"Docs pipeline",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/first-module-bundle",title:"Build a first module bundle",description:"Define one bundle spec, resolve a personalized surface plan, and render it through the React host layer.",section:"build",order:65,navTitle:"First module bundle",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/host-builder-workbench",title:"Host the Builder workbench",description:"Load a Builder workspace snapshot, wire common commands, and keep runtime mode plus mobile review flows explicit.",section:"build",order:66,navTitle:"Host Builder workbench",primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/connect-in-a-repo",title:"Use Connect in a repo",description:"Enable Connect in workspace config, verify agent actions, and inspect local review and replay artifacts.",section:"build",order:67,navTitle:"Connect in a repo",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/libraries",title:"Libraries overview",description:"Navigate the core libraries, runtimes, and system packages that make up the open foundation.",section:"build",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/libraries/cross-platform-ui",title:"Cross-platform UI",description:"Understand how the presentation runtimes, ui-kit-web, ui-kit, and design-system stay aligned across React and React Native.",section:"build",order:71,audience:"oss",ctaMode:"oss-next"},{href:"/docs/architecture",title:"Architecture",description:"See how the spec layer, runtimes, integrations, and multi-surface outputs fit together.",section:"build",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/safety",title:"Operate safely",description:"Add auditability, migrations, policy controls, and trustworthy release behavior from the start.",section:"operate",order:10,navTitle:"Safety overview",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/ci-contract-diff-gating",title:"CI diff gating",description:"Use deterministic checks to block drift and risky changes before they reach production.",section:"operate",order:20,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/release-capsules",title:"Author release capsules",description:"Pair changesets with structured release capsules, generate release artifacts, and keep changelog plus docs surfaces aligned.",section:"operate",order:25,navTitle:"Release capsules",primaryNav:!0,audience:"operator",ctaMode:"reference"},{href:"/docs/safety/security-trust",title:"Security and trust",description:"Understand the trust model, artifact validation expectations, and operational boundaries.",section:"operate",order:30,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/auditing",title:"Audit trails",description:"Track changes, policy decisions, and operational actions with a clear evidence trail.",section:"operate",order:40,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/migrations",title:"Migrations",description:"Evolve schemas and data safely without abandoning the contract layer.",section:"operate",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/tenant-isolation",title:"Tenant isolation",description:"Keep tenant data, config, policies, and integrations separated at runtime.",section:"operate",order:60,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/knowledge",title:"Knowledge and context",description:"Bind trusted knowledge sources to the system without losing governance or isolation.",section:"operate",order:70,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/telemetry",title:"Telemetry",description:"Instrument surfaces, collect evidence, and keep observability aligned with the contract model.",section:"operate",order:80,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/workflow-monitoring",title:"Workflow monitoring",description:"Observe multi-step execution with enough context to understand failures and regressions.",section:"operate",order:90,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/ops/distributed-tracing",title:"Distributed tracing",description:"Trace contract execution across integrations, workflows, and generated surfaces.",section:"operate",order:100,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations",title:"Integrations overview",description:"Understand the binding model for external services, providers, and tenant-owned connections.",section:"integrations",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/spec-model",title:"Integration spec model",description:"Define what an integration provides before wiring it into an app or runtime.",section:"integrations",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/openai",title:"OpenAI integration",description:"Connect OpenAI through typed capabilities, explicit provider config, and governed runtime usage.",section:"integrations",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/mistral",title:"Mistral integration",description:"Use Mistral through the same provider contract model and runtime guardrails.",section:"integrations",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/qdrant",title:"Qdrant integration",description:"Store and retrieve knowledge embeddings with explicit provider configuration and ownership.",section:"integrations",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations/stripe",title:"Stripe integration",description:"Bind payments and billing behavior without smearing provider logic across the codebase.",section:"integrations",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/twilio",title:"Twilio integration",description:"Handle messaging and telephony through typed transport boundaries and explicit configuration.",section:"integrations",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/github",title:"GitHub integration",description:"Push execution context into GitHub workflows and automation surfaces without hidden glue.",section:"integrations",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/reference",title:"Contract reference",description:"Browse the generated reference index for public contract surfaces, versions, and examples.",section:"reference",order:10,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/examples",title:"Examples",description:"Explore runnable examples and use them as reference implementations for new systems.",section:"reference",order:20,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/studio",title:"Studio overview",description:"See what Studio adds on top of OSS ContractSpec and when a team should adopt the operating layer.",section:"studio",order:10,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/manifesto",title:"Manifesto",description:"Why ContractSpec is built as an open system, how incremental adoption works, and why Studio stays additive.",audience:"secondary"},{href:"/docs/intent/contract-first-api",title:"Contract-first API",description:"Use contracts as the durable source of truth for API behavior and generated surfaces.",audience:"secondary"},{href:"/docs/intent/spec-driven-development",title:"Spec-driven development",description:"See how explicit specs stabilize change across APIs, UI, data, and agent-facing surfaces.",audience:"secondary"},{href:"/docs/intent/deterministic-codegen",title:"Deterministic regeneration",description:"Understand safe regeneration, conflict boundaries, and why teams keep control of the output.",audience:"secondary"},{href:"/docs/intent/schema-validation-typescript",title:"Schema validation and TypeScript",description:"Keep schema, runtime validation, and TypeScript behavior aligned without duplicate work.",audience:"secondary"},{href:"/docs/intent/openapi-alternative",title:"OpenAPI alternative",description:"Compare a multi-surface contract system with API-only description tooling.",audience:"secondary"},{href:"/docs/intent/generate-client-from-schema",title:"Generate client from schema",description:"Generate client-facing artifacts from the same source that drives runtime behavior.",audience:"secondary"},{href:"/docs/comparison",title:"Comparison overview",description:"Compare ContractSpec with workflow engines, internal-tool builders, and enterprise orchestration products.",audience:"secondary"},{href:"/docs/comparison/workflow-engines",title:"Workflow engines",description:"Contrast a contract system with workflow-only orchestration approaches.",audience:"secondary"},{href:"/docs/comparison/internal-tool-builders",title:"Internal-tool builders",description:"Compare ContractSpec with builders that optimize for screens instead of durable system contracts.",audience:"secondary"},{href:"/docs/comparison/automation-platforms",title:"Automation platforms",description:"Compare automation-first tools with a system that owns explicit contracts and generated surfaces.",audience:"secondary"},{href:"/docs/comparison/windmill",title:"Windmill comparison",description:"Understand where Windmill fits and where ContractSpec solves a different class of system problem.",audience:"secondary"},{href:"/docs/comparison/enterprise-platforms",title:"Enterprise orchestrators",description:"Compare ContractSpec with enterprise platforms that centralize execution in a closed operating surface.",audience:"secondary"},{href:"/docs/ecosystem/templates",title:"Templates",description:"Use templates and starter systems as proof points and accelerators for OSS adoption.",audience:"secondary"},{href:"/docs/ecosystem/plugins",title:"Plugins",description:"Explore marketplace and editor integrations that support the OSS workflow.",audience:"secondary"},{href:"/docs/ecosystem/registry",title:"Registry",description:"Inspect registry and manifest concepts that help package reusable capability surfaces.",audience:"secondary"}];function h(e){return o.find((t)=>t.href===e)}function d(){return i.map((e)=>({...e,items:o.filter((t)=>t.section===e.key&&t.primaryNav).sort((t,r)=>(t.order??0)-(r.order??0))}))}function p(){return o.filter((e)=>e.primaryNav).sort((e,t)=>i.findIndex((r)=>r.key===e.section)-i.findIndex((r)=>r.key===t.section)||(e.order??0)-(t.order??0))}function m(e){let t=p(),r=t.findIndex((s)=>s.href===e);if(r<0)return{previous:null,next:null};return{previous:t[r-1]??null,next:t[r+1]??null}}function g(){return o.filter((e)=>e.audience==="secondary")}function y(){return d().map((e)=>({...e,featured:e.items.slice(0,3)}))}export{g as getSecondaryDocsPages,p as getPrimaryDocsTraversal,d as getPrimaryDocsSections,h as getDocsPageByHref,m as getDocsNextPrevious,y as getDocsHomeSections,i as DOCS_PRIMARY_SECTIONS,o as DOCS_PAGES};
|
|
1
|
+
var n=Object.defineProperty;var a=(e)=>e;function c(e,t){this[e]=a.bind(null,t)}var l=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0,configurable:!0,set:c.bind(t,r)})};var u=(e,t)=>()=>(e&&(t=e(e=0)),t);var i=[{key:"start",title:"Start",description:"Install ContractSpec, wire a first contract, and adopt it into an existing codebase."},{key:"core-model",title:"Core Model",description:"Learn how contracts, generated surfaces, policies, overlays, and safe regeneration fit together."},{key:"build",title:"Build",description:"Use practical guides, libraries, architecture patterns, and examples to ship real surfaces."},{key:"operate",title:"Operate",description:"Run the system safely with governance, auditability, tracing, and operator-grade controls."},{key:"integrations",title:"Integrations",description:"Connect models, messaging, storage, payments, search, and external systems through typed bindings."},{key:"reference",title:"Reference",description:"Search generated contract docs, inspect example packages, and navigate the system as source of truth."},{key:"studio",title:"Studio",description:"Understand what Studio adds on top of the open system and when to adopt it."}],o=[{href:"/docs",title:"Documentation",description:"OSS-first documentation for ContractSpec, the open spec system for AI-native software.",audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/start-here",title:"Start here",description:"The fastest path from install to your first contract and generated surface.",section:"start",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/installation",title:"Installation",description:"Install the CLI and core packages, then prepare a workspace for incremental adoption.",section:"start",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/hello-world",title:"Hello world",description:"Define a first operation, generate the surface, and verify the end-to-end loop.",section:"start",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/compatibility",title:"Compatibility",description:"Check the supported runtimes, package managers, and adoption assumptions before rollout.",section:"start",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/tools",title:"Developer tools",description:"Use the CLI, editors, and helper tooling that make the OSS workflow practical day to day.",section:"start",order:50,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/getting-started/troubleshooting",title:"Troubleshooting",description:"Resolve the common installation, validation, and runtime mistakes you hit during first adoption.",section:"start",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs",title:"Contracts and specs",description:"Understand the spec model that drives generated surfaces, validation, policy, and safe regeneration.",section:"core-model",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/capabilities",title:"Capabilities",description:"Model commands, queries, presentations, and events as explicit contract surfaces.",section:"core-model",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/dataviews",title:"Data views",description:"Define queryable, presentable views that stay aligned with the rest of the system.",section:"core-model",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/workflows",title:"Workflows",description:"Compose multi-step behavior from typed contracts, policies, and runtime orchestration.",section:"core-model",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/policy",title:"Policy",description:"Apply consistent governance, access rules, and risk controls across every surface.",section:"core-model",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/overlays",title:"Overlays",description:"Customize generated surfaces safely without forking the system or breaking regeneration.",section:"core-model",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/module-bundles",title:"Module bundles",description:"Define AI-native surfaces as typed bundle specs that resolve into personalized, auditable runtime plans.",section:"core-model",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/specs/connect",title:"ContractSpec Connect",description:"Guard coding-agent edits and shell actions with task-scoped context, plan packets, patch verdicts, and review packets.",section:"core-model",order:80,navTitle:"Connect",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/specs/builder-control-plane",title:"Builder control plane",description:"Route multimodal authoring work through governed builder contracts, provider policies, readiness gates, and mobile review flows.",section:"core-model",order:90,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/contract-types",title:"Contract types",description:"Choose the right contract surface for the behavior you want to make explicit.",section:"core-model",order:100,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides",title:"Guides",description:"Follow concrete adoption paths for existing apps, generated docs, CI gating, and typed surfaces.",section:"build",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/nextjs-one-endpoint",title:"Adopt one endpoint in Next.js",description:"Start with one endpoint, one contract, and one generated surface in an existing Next.js app.",section:"build",order:20,navTitle:"Next.js endpoint",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/import-existing-codebases",title:"Import an existing codebase",description:"Stabilize a live codebase incrementally instead of rewriting it from scratch.",section:"build",order:30,navTitle:"Import existing code",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/spec-validation-and-typing",title:"Validation and typing",description:"Keep runtime validation and TypeScript types aligned from the same source definitions.",section:"build",order:40,navTitle:"Validation and typing",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/contract-driven-forms",title:"Build a contract-driven form",description:"Define schema-backed form data, fields, layout, policy, and submit actions as one reusable ContractSpec surface.",section:"build",order:45,navTitle:"Contract-driven forms",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/generate-docs-clients-schemas",title:"Generate docs, clients, and schemas",description:"Export stable docs and client-facing artifacts from the same contract layer.",section:"build",order:50,navTitle:"Generate docs and clients",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/docs-generation-pipeline",title:"Docs generation pipeline",description:"Feed generated docs into the public docs site without breaking source-of-truth ownership.",section:"build",order:60,navTitle:"Docs pipeline",primaryNav:!0,audience:"oss",ctaMode:"reference"},{href:"/docs/guides/first-module-bundle",title:"Build a first module bundle",description:"Define one bundle spec, resolve a personalized surface plan, and render it through the React host layer.",section:"build",order:65,navTitle:"First module bundle",primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/guides/host-builder-workbench",title:"Host the Builder workbench",description:"Load a Builder workspace snapshot, wire common commands, and keep runtime mode plus mobile review flows explicit.",section:"build",order:66,navTitle:"Host Builder workbench",primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/guides/connect-in-a-repo",title:"Use Connect in a repo",description:"Enable Connect in workspace config, verify agent actions, and inspect local review and replay artifacts.",section:"build",order:67,navTitle:"Connect in a repo",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/libraries",title:"Libraries overview",description:"Navigate the core libraries, runtimes, and system packages that make up the open foundation.",section:"build",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/libraries/cross-platform-ui",title:"Cross-platform UI",description:"Understand how the presentation runtimes, ui-kit-web, ui-kit, and design-system stay aligned across React and React Native.",section:"build",order:71,audience:"oss",ctaMode:"oss-next"},{href:"/docs/libraries/application-shell",title:"Application shell",description:"Implement reusable app navigation with desktop sidebars, topbar breadcrumbs, command search, mobile adapters, and PageOutline section navigation.",section:"build",order:72,audience:"oss",ctaMode:"oss-next"},{href:"/docs/architecture",title:"Architecture",description:"See how the spec layer, runtimes, integrations, and multi-surface outputs fit together.",section:"build",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/safety",title:"Operate safely",description:"Add auditability, migrations, policy controls, and trustworthy release behavior from the start.",section:"operate",order:10,navTitle:"Safety overview",primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/ci-contract-diff-gating",title:"CI diff gating",description:"Use deterministic checks to block drift and risky changes before they reach production.",section:"operate",order:20,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/guides/release-capsules",title:"Author release capsules",description:"Pair changesets with structured release capsules, generate release artifacts, and keep changelog plus docs surfaces aligned.",section:"operate",order:25,navTitle:"Release capsules",primaryNav:!0,audience:"operator",ctaMode:"reference"},{href:"/docs/safety/security-trust",title:"Security and trust",description:"Understand the trust model, artifact validation expectations, and operational boundaries.",section:"operate",order:30,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/auditing",title:"Audit trails",description:"Track changes, policy decisions, and operational actions with a clear evidence trail.",section:"operate",order:40,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/migrations",title:"Migrations",description:"Evolve schemas and data safely without abandoning the contract layer.",section:"operate",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/safety/tenant-isolation",title:"Tenant isolation",description:"Keep tenant data, config, policies, and integrations separated at runtime.",section:"operate",order:60,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/knowledge",title:"Knowledge and context",description:"Bind trusted knowledge sources to the system without losing governance or isolation.",section:"operate",order:70,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/telemetry",title:"Telemetry",description:"Instrument surfaces, collect evidence, and keep observability aligned with the contract model.",section:"operate",order:80,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/advanced/workflow-monitoring",title:"Workflow monitoring",description:"Observe multi-step execution with enough context to understand failures and regressions.",section:"operate",order:90,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/ops/distributed-tracing",title:"Distributed tracing",description:"Trace contract execution across integrations, workflows, and generated surfaces.",section:"operate",order:100,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations",title:"Integrations overview",description:"Understand the binding model for external services, providers, and tenant-owned connections.",section:"integrations",order:10,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/spec-model",title:"Integration spec model",description:"Define what an integration provides before wiring it into an app or runtime.",section:"integrations",order:20,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/openai",title:"OpenAI integration",description:"Connect OpenAI through typed capabilities, explicit provider config, and governed runtime usage.",section:"integrations",order:30,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/mistral",title:"Mistral integration",description:"Use Mistral through the same provider contract model and runtime guardrails.",section:"integrations",order:40,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/qdrant",title:"Qdrant integration",description:"Store and retrieve knowledge embeddings with explicit provider configuration and ownership.",section:"integrations",order:50,primaryNav:!0,audience:"operator",ctaMode:"oss-next"},{href:"/docs/integrations/stripe",title:"Stripe integration",description:"Bind payments and billing behavior without smearing provider logic across the codebase.",section:"integrations",order:60,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/twilio",title:"Twilio integration",description:"Handle messaging and telephony through typed transport boundaries and explicit configuration.",section:"integrations",order:70,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/integrations/github",title:"GitHub integration",description:"Push execution context into GitHub workflows and automation surfaces without hidden glue.",section:"integrations",order:80,primaryNav:!0,audience:"oss",ctaMode:"oss-next"},{href:"/docs/reference",title:"Contract reference",description:"Browse the generated reference index for public contract surfaces, versions, and examples.",section:"reference",order:10,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/examples",title:"Examples",description:"Explore runnable examples and use them as reference implementations for new systems.",section:"reference",order:20,primaryNav:!0,audience:"reference",ctaMode:"reference"},{href:"/docs/studio",title:"Studio overview",description:"See what Studio adds on top of OSS ContractSpec and when a team should adopt the operating layer.",section:"studio",order:10,primaryNav:!0,audience:"studio-bridge",ctaMode:"studio-bridge"},{href:"/docs/manifesto",title:"Manifesto",description:"Why ContractSpec is built as an open system, how incremental adoption works, and why Studio stays additive.",audience:"secondary"},{href:"/docs/intent/contract-first-api",title:"Contract-first API",description:"Use contracts as the durable source of truth for API behavior and generated surfaces.",audience:"secondary"},{href:"/docs/intent/spec-driven-development",title:"Spec-driven development",description:"See how explicit specs stabilize change across APIs, UI, data, and agent-facing surfaces.",audience:"secondary"},{href:"/docs/intent/deterministic-codegen",title:"Deterministic regeneration",description:"Understand safe regeneration, conflict boundaries, and why teams keep control of the output.",audience:"secondary"},{href:"/docs/intent/schema-validation-typescript",title:"Schema validation and TypeScript",description:"Keep schema, runtime validation, and TypeScript behavior aligned without duplicate work.",audience:"secondary"},{href:"/docs/intent/openapi-alternative",title:"OpenAPI alternative",description:"Compare a multi-surface contract system with API-only description tooling.",audience:"secondary"},{href:"/docs/intent/generate-client-from-schema",title:"Generate client from schema",description:"Generate client-facing artifacts from the same source that drives runtime behavior.",audience:"secondary"},{href:"/docs/comparison",title:"Comparison overview",description:"Compare ContractSpec with workflow engines, internal-tool builders, and enterprise orchestration products.",audience:"secondary"},{href:"/docs/comparison/workflow-engines",title:"Workflow engines",description:"Contrast a contract system with workflow-only orchestration approaches.",audience:"secondary"},{href:"/docs/comparison/internal-tool-builders",title:"Internal-tool builders",description:"Compare ContractSpec with builders that optimize for screens instead of durable system contracts.",audience:"secondary"},{href:"/docs/comparison/automation-platforms",title:"Automation platforms",description:"Compare automation-first tools with a system that owns explicit contracts and generated surfaces.",audience:"secondary"},{href:"/docs/comparison/windmill",title:"Windmill comparison",description:"Understand where Windmill fits and where ContractSpec solves a different class of system problem.",audience:"secondary"},{href:"/docs/comparison/enterprise-platforms",title:"Enterprise orchestrators",description:"Compare ContractSpec with enterprise platforms that centralize execution in a closed operating surface.",audience:"secondary"},{href:"/docs/ecosystem/templates",title:"Templates",description:"Use templates and starter systems as proof points and accelerators for OSS adoption.",audience:"secondary"},{href:"/docs/ecosystem/plugins",title:"Plugins",description:"Explore marketplace and editor integrations that support the OSS workflow.",audience:"secondary"},{href:"/docs/ecosystem/registry",title:"Registry",description:"Inspect registry and manifest concepts that help package reusable capability surfaces.",audience:"secondary"}];function m(e){return o.find((t)=>t.href===e)}function d(){return i.map((e)=>({...e,items:o.filter((t)=>t.section===e.key&&t.primaryNav).sort((t,r)=>(t.order??0)-(r.order??0))}))}function p(){return o.filter((e)=>e.primaryNav).sort((e,t)=>i.findIndex((r)=>r.key===e.section)-i.findIndex((r)=>r.key===t.section)||(e.order??0)-(t.order??0))}function h(e){let t=p(),r=t.findIndex((s)=>s.href===e);if(r<0)return{previous:null,next:null};return{previous:t[r-1]??null,next:t[r+1]??null}}function g(){return o.filter((e)=>e.audience==="secondary")}function y(){return d().map((e)=>({...e,featured:e.items.slice(0,3)}))}export{g as getSecondaryDocsPages,p as getPrimaryDocsTraversal,d as getPrimaryDocsSections,m as getDocsPageByHref,h as getDocsNextPrevious,y as getDocsHomeSections,i as DOCS_PRIMARY_SECTIONS,o as DOCS_PAGES};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var o=Object.defineProperty;var l=(a)=>a;function c(a,i){this[a]=l.bind(null,i)}var m=(a,i)=>{for(var n in i)o(a,n,{get:i[n],enumerable:!0,configurable:!0,set:c.bind(i,n)})};var p=(a,i)=>()=>(a&&(i=a(a=0)),i);import{CodeBlock as r}from"@contractspec/lib.design-system";import s from"@contractspec/lib.ui-link";import{ChevronRight as d}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";var u=`import { defineDataView } from '@contractspec/lib.contracts-spec/data-views';
|
|
2
2
|
import { ListTransactions } from './list-transactions';
|
|
3
3
|
|
|
4
4
|
export const TransactionHistory = defineDataView({
|
|
@@ -41,10 +41,46 @@ export const TransactionHistory = defineDataView({
|
|
|
41
41
|
{ key: 'account', label: 'Account', dataPath: 'account', sortable: true },
|
|
42
42
|
{ key: 'owner', label: 'Owner', dataPath: 'owner', sortable: true },
|
|
43
43
|
{ key: 'status', label: 'Status', dataPath: 'status', sortable: true },
|
|
44
|
+
{
|
|
45
|
+
key: 'amount',
|
|
46
|
+
label: 'Amount',
|
|
47
|
+
dataPath: 'amount',
|
|
48
|
+
sortable: true,
|
|
49
|
+
format: { type: 'currency', currency: 'EUR', rounded: true },
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
key: 'renewalDate',
|
|
53
|
+
label: 'Renewal',
|
|
54
|
+
dataPath: 'renewalDate',
|
|
55
|
+
format: { type: 'date', dateStyle: 'medium' },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'processingTime',
|
|
59
|
+
label: 'Processing time',
|
|
60
|
+
dataPath: 'processingMinutes',
|
|
61
|
+
format: { type: 'duration', unit: 'minute', display: 'digital' },
|
|
62
|
+
},
|
|
44
63
|
{ key: 'notes', label: 'Notes', dataPath: 'notes' },
|
|
45
64
|
],
|
|
65
|
+
filters: [
|
|
66
|
+
{ key: 'status', label: 'Status', field: 'status', type: 'enum' },
|
|
67
|
+
{
|
|
68
|
+
key: 'amount',
|
|
69
|
+
label: 'Amount',
|
|
70
|
+
field: 'amount',
|
|
71
|
+
type: 'currency',
|
|
72
|
+
valueMode: 'range',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: 'renewalDate',
|
|
76
|
+
label: 'Renewal',
|
|
77
|
+
field: 'renewalDate',
|
|
78
|
+
type: 'date',
|
|
79
|
+
valueMode: 'range',
|
|
80
|
+
},
|
|
81
|
+
],
|
|
46
82
|
},
|
|
47
|
-
});`;function
|
|
83
|
+
});`;function g(){return t("div",{className:"space-y-8",children:[t("div",{className:"space-y-4",children:[e("h1",{className:"font-bold text-4xl",children:"Display Data with DataViews"}),e("p",{className:"text-lg text-muted-foreground",children:"Define a filterable, sortable transaction history view that works across web and mobile without duplicating UI code."})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"1. Define the underlying query"}),e("p",{className:"text-muted-foreground",children:"First, create a query operation to fetch the data:"}),e(r,{language:"typescript",filename:"lib/specs/billing/list-transactions.ts",code:`import { defineQuery } from '@contractspec/lib.contracts-spec';
|
|
48
84
|
|
|
49
85
|
export const ListTransactions = defineQuery({
|
|
50
86
|
meta: {
|
|
@@ -57,7 +93,7 @@ export const ListTransactions = defineQuery({
|
|
|
57
93
|
output: /* array of transactions */,
|
|
58
94
|
},
|
|
59
95
|
policy: { auth: 'user' },
|
|
60
|
-
});`})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"2. Define the DataView spec"}),e("p",{className:"text-muted-foreground",children:"Wrap your query with presentation metadata:"}),e(
|
|
96
|
+
});`})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"2. Define the DataView spec"}),e("p",{className:"text-muted-foreground",children:"Wrap your query with presentation metadata:"}),e(r,{language:"typescript",filename:"lib/specs/billing/transaction-history.data-view.ts",code:u}),t("p",{className:"text-muted-foreground text-sm",children:["The live version of this pattern is available in the canonical"," ",e(s,{href:"/docs/examples/data-grid-showcase",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Data Grid Showcase"}),"."]})]}),t("div",{className:"space-y-4",children:[e("h2",{className:"font-bold text-2xl",children:"3. Render on the frontend"}),e("p",{className:"text-muted-foreground",children:"Use the runtime renderer in your React or React Native app:"}),e(r,{language:"tsx",filename:"app/dashboard/transactions/page.tsx",code:`'use client';
|
|
61
97
|
|
|
62
98
|
import { DataViewRenderer } from '@contractspec/lib.design-system';
|
|
63
99
|
import { TransactionHistory } from '@/lib/specs/billing/transaction-history.data-view';
|
|
@@ -82,4 +118,4 @@ export function TransactionsPage() {
|
|
|
82
118
|
/>
|
|
83
119
|
</div>
|
|
84
120
|
);
|
|
85
|
-
}`})]}),t("div",{className:"card-subtle space-y-4 p-6",children:[e("h3",{className:"font-bold",children:"Why DataViews?"}),t("ul",{className:"space-y-2 text-muted-foreground text-sm",children:[e("li",{children:"Same spec renders on web (React) and mobile (React Native)"}),e("li",{children:"Filters, sorting, and pagination handled automatically"}),e("li",{children:"Column visibility, pinning, resizing, and row expansion stay contract-driven"}),e("li",{children:"
|
|
121
|
+
}`})]}),t("div",{className:"card-subtle space-y-4 p-6",children:[e("h3",{className:"font-bold",children:"Why DataViews?"}),t("ul",{className:"space-y-2 text-muted-foreground text-sm",children:[e("li",{children:"Same spec renders on web (React) and mobile (React Native)"}),e("li",{children:"Filters, sorting, and pagination handled automatically"}),e("li",{children:"Column visibility, pinning, resizing, and row expansion stay contract-driven"}),e("li",{children:"Typed format rules for numbers, percent values, currency, dates, times, datetimes, and durations applied consistently"}),e("li",{children:"Export to CSV/PDF using the same spec"}),e("li",{children:"A/B test different layouts without touching the backend"})]})]}),t("div",{className:"flex items-center gap-4 pt-4",children:[t(s,{href:"/docs/libraries/data-views",className:"btn-primary",children:["DataView API Reference ",e(d,{size:16})]}),e(s,{href:"/docs/specs/workflows",className:"btn-ghost",children:"Next: Workflows"})]})]})}export{g as DataViewTutorialPage};
|