@contractspec/bundle.library 3.8.12 → 3.9.0
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 +290 -282
- package/CHANGELOG.md +46 -0
- package/dist/application/index.js +11 -11
- package/dist/application/mcp/cliMcp.js +6 -6
- package/dist/application/mcp/cliMcp.onboarding.d.ts +4 -0
- package/dist/application/mcp/cliMcp.onboarding.js +2 -0
- package/dist/application/mcp/cliMcp.test.d.ts +1 -0
- package/dist/application/mcp/contractsMcp.js +2 -2
- package/dist/application/mcp/contractsMcp.test.d.ts +1 -0
- package/dist/application/mcp/contractsMcpAdoptionTools.d.ts +3 -0
- package/dist/application/mcp/contractsMcpAdoptionTools.js +2 -0
- package/dist/application/mcp/contractsMcpResources.js +1 -1
- package/dist/application/mcp/contractsMcpTools.js +1 -1
- package/dist/application/mcp/contractsMcpTypes.d.ts +16 -0
- package/dist/application/mcp/index.js +11 -11
- package/dist/components/docs/DocsIndexPage.js +1 -1
- package/dist/components/docs/docsManifest.js +1 -1
- package/dist/components/docs/examples/DocsExamplesPage.js +1 -17
- package/dist/components/docs/examples/ExampleShowcasePage.d.ts +1 -1
- package/dist/components/docs/examples/ExampleShowcasePage.js +2 -17
- package/dist/components/docs/examples/exampleShowcaseData.d.ts +2 -2
- package/dist/components/docs/examples/exampleShowcaseData.js +2 -17
- package/dist/components/docs/examples/exampleShowcaseData.test.d.ts +1 -0
- package/dist/components/docs/examples/index.js +2 -17
- package/dist/components/docs/getting-started/CLIPage.js +5 -4
- package/dist/components/docs/getting-started/DataViewTutorialPage.js +44 -67
- package/dist/components/docs/getting-started/StartHerePage.js +4 -2
- package/dist/components/docs/getting-started/index.js +56 -76
- package/dist/components/docs/guides/GuideConnectInRepoPage.js +29 -4
- package/dist/components/docs/guides/GuideHostBuilderWorkbenchPage.js +21 -6
- package/dist/components/docs/guides/GuideReleaseCapsulesPage.d.ts +1 -0
- package/dist/components/docs/guides/GuideReleaseCapsulesPage.js +16 -0
- package/dist/components/docs/guides/GuidesIndexPage.js +1 -1
- package/dist/components/docs/guides/index.d.ts +1 -0
- package/dist/components/docs/guides/index.js +93 -39
- package/dist/components/docs/index.js +572 -421
- package/dist/components/docs/libraries/LibrariesContractsPage.js +43 -18
- package/dist/components/docs/libraries/LibrariesDesignSystemPage.js +43 -31
- package/dist/components/docs/libraries/LibrariesOverviewPage.js +1 -1
- package/dist/components/docs/libraries/LibrariesUIKitPage.js +42 -16
- package/dist/components/docs/libraries/LibrariesUIKitWebPage.d.ts +1 -0
- package/dist/components/docs/libraries/LibrariesUIKitWebPage.js +47 -0
- package/dist/components/docs/libraries/index.d.ts +1 -0
- package/dist/components/docs/libraries/index.js +221 -113
- package/dist/components/docs/specs/SpecsBuilderControlPlanePage.js +18 -3
- package/dist/components/docs/specs/SpecsConnectPage.js +4 -2
- package/dist/components/docs/specs/SpecsDataViewsPage.js +39 -32
- package/dist/components/docs/specs/index.js +65 -41
- package/dist/index.js +583 -432
- package/dist/node/application/index.js +11 -11
- package/dist/node/application/mcp/cliMcp.js +6 -6
- package/dist/node/application/mcp/cliMcp.onboarding.js +1 -0
- package/dist/node/application/mcp/contractsMcp.js +2 -2
- package/dist/node/application/mcp/contractsMcpAdoptionTools.js +1 -0
- package/dist/node/application/mcp/contractsMcpResources.js +1 -1
- package/dist/node/application/mcp/contractsMcpTools.js +1 -1
- package/dist/node/application/mcp/index.js +11 -11
- package/dist/node/components/docs/DocsIndexPage.js +1 -1
- package/dist/node/components/docs/docsManifest.js +1 -1
- package/dist/node/components/docs/examples/DocsExamplesPage.js +1 -17
- package/dist/node/components/docs/examples/ExampleShowcasePage.js +2 -17
- package/dist/node/components/docs/examples/exampleShowcaseData.js +2 -17
- package/dist/node/components/docs/examples/index.js +2 -17
- package/dist/node/components/docs/getting-started/CLIPage.js +5 -4
- package/dist/node/components/docs/getting-started/DataViewTutorialPage.js +44 -67
- package/dist/node/components/docs/getting-started/StartHerePage.js +4 -2
- package/dist/node/components/docs/getting-started/index.js +56 -76
- package/dist/node/components/docs/guides/GuideConnectInRepoPage.js +29 -4
- package/dist/node/components/docs/guides/GuideHostBuilderWorkbenchPage.js +21 -6
- package/dist/node/components/docs/guides/GuideReleaseCapsulesPage.js +15 -0
- package/dist/node/components/docs/guides/GuidesIndexPage.js +1 -1
- package/dist/node/components/docs/guides/index.js +93 -39
- package/dist/node/components/docs/index.js +572 -421
- package/dist/node/components/docs/libraries/LibrariesContractsPage.js +43 -18
- package/dist/node/components/docs/libraries/LibrariesDesignSystemPage.js +43 -31
- package/dist/node/components/docs/libraries/LibrariesOverviewPage.js +1 -1
- package/dist/node/components/docs/libraries/LibrariesUIKitPage.js +42 -16
- package/dist/node/components/docs/libraries/LibrariesUIKitWebPage.js +46 -0
- package/dist/node/components/docs/libraries/index.js +221 -113
- package/dist/node/components/docs/specs/SpecsBuilderControlPlanePage.js +18 -3
- package/dist/node/components/docs/specs/SpecsConnectPage.js +4 -2
- package/dist/node/components/docs/specs/SpecsDataViewsPage.js +39 -32
- package/dist/node/components/docs/specs/index.js +65 -41
- package/dist/node/index.js +583 -432
- package/package.json +65 -16
- package/src/application/mcp/cliMcp.onboarding.ts +297 -0
- package/src/application/mcp/cliMcp.test.ts +99 -0
- package/src/application/mcp/cliMcp.ts +30 -3
- package/src/application/mcp/contractsMcp.test.ts +65 -0
- package/src/application/mcp/contractsMcpAdoptionTools.ts +131 -0
- package/src/application/mcp/contractsMcpResources.ts +49 -0
- package/src/application/mcp/contractsMcpTools.ts +2 -0
- package/src/application/mcp/contractsMcpTypes.ts +16 -0
- package/src/components/docs/docsManifest.ts +12 -0
- package/src/components/docs/examples/DocsExamplesPage.tsx +6 -14
- package/src/components/docs/examples/ExampleShowcasePage.tsx +22 -18
- package/src/components/docs/examples/exampleShowcaseData.test.ts +22 -0
- package/src/components/docs/examples/exampleShowcaseData.ts +75 -50
- package/src/components/docs/generated/docs-index._common.json +2008 -1691
- 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 -17
- 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 -217
- 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 -57
- package/src/components/docs/generated/docs-index.manifest.json +432 -432
- 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-tasks.json +33 -33
- 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 -185
- package/src/components/docs/generated/docs-index.platform-context.json +121 -105
- 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 -153
- 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 -185
- 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/CLIPage.tsx +10 -2
- package/src/components/docs/getting-started/DataViewTutorialPage.tsx +63 -70
- package/src/components/docs/getting-started/StartHerePage.tsx +10 -9
- package/src/components/docs/guides/GuideConnectInRepoPage.tsx +52 -3
- package/src/components/docs/guides/GuideHostBuilderWorkbenchPage.tsx +55 -6
- package/src/components/docs/guides/GuideReleaseCapsulesPage.tsx +147 -0
- package/src/components/docs/guides/GuidesIndexPage.tsx +7 -0
- package/src/components/docs/guides/index.ts +1 -0
- package/src/components/docs/libraries/LibrariesContractsPage.tsx +72 -27
- package/src/components/docs/libraries/LibrariesDesignSystemPage.tsx +67 -61
- package/src/components/docs/libraries/LibrariesOverviewPage.tsx +7 -1
- package/src/components/docs/libraries/LibrariesUIKitPage.tsx +63 -25
- package/src/components/docs/libraries/LibrariesUIKitWebPage.tsx +115 -0
- package/src/components/docs/libraries/index.ts +1 -0
- package/src/components/docs/specs/SpecsBuilderControlPlanePage.tsx +58 -3
- package/src/components/docs/specs/SpecsConnectPage.tsx +30 -0
- package/src/components/docs/specs/SpecsDataViewsPage.tsx +63 -42
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{CodeBlock as o}from"@contractspec/lib.design-system";import r from"@contractspec/lib.ui-link";import{jsx as e,jsxs as
|
|
2
|
+
import{CodeBlock as o}from"@contractspec/lib.design-system";import r from"@contractspec/lib.ui-link";import{jsx as e,jsxs as a}from"react/jsx-runtime";var i=[{title:"Managed",body:"Best when the team wants the platform to own setup, routing, readiness, API defaults, and mobile-safe operator flows."},{title:"Local",body:"Best for power users who want local-daemon registration, tenant-local execution providers, and tighter data-locality control."},{title:"Hybrid",body:"Best when some work should stay local while preview, review, export, or mobile operator flows still use managed coordination."}],n=["Bootstrap managed, local-daemon, or hybrid presets explicitly instead of inventing provider posture ad hoc per host.","Capture prompts, files, voice, and other inbound sources into a typed workspace instead of relying on a single chat transcript.","Fuse the sources into decisions, assumptions, and blueprint updates with provenance and approval memory.","Compile authoring work into execution lanes, then route the work to explicit provider profiles and runtime targets.","Create previews, run readiness gates, and record receipts before export becomes an operator action.","Keep mobile review parity so approvals, incidents, and patch proposals can be inspected away from the desktop workbench."],s=["local trust and lease posture for registered local runtimes","channel-action and comparison posture data in the shared Builder snapshot","preview, readiness, export, and mobile-review state derived from the same workspace snapshot"];function p(){return a("div",{className:"space-y-10",children:[a("section",{className:"space-y-3",children:[e("p",{className:"editorial-kicker",children:"Spec pack"}),e("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"Builder is a governed authoring control plane, not a frontier coding agent."}),a("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:["The implemented Builder stack sits across"," ",e("code",{children:"@contractspec/lib.builder-spec"}),","," ",e("code",{children:"@contractspec/lib.builder-runtime"}),","," ",e("code",{children:"@contractspec/lib.provider-spec"}),", and the reusable workbench/mobile modules. It orchestrates inputs, provider routing, readiness, and export decisions on top of the OSS ContractSpec foundation and the Studio operating layer."]})]}),a("section",{className:"editorial-proof-strip",children:[a("div",{className:"editorial-stat",children:[e("span",{className:"editorial-label",children:"What Builder owns"}),e("span",{className:"editorial-stat-value",children:"fusion, routing, readiness, export"})]}),e("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"Builder delegates synthesis and coding to external execution providers. Its job is to keep those runs policy-aware, provenance-rich, and usable from both desktop and mobile operator surfaces."})]}),a("section",{className:"editorial-panel space-y-5",children:[a("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Implemented stack and entrypoints"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"You can use the type surfaces directly in code, or start from the already wired workbench and mobile review routes in the public app shell."})]}),e(o,{language:"text",filename:"builder-stack",code:`Packages
|
|
3
3
|
- @contractspec/lib.builder-spec
|
|
4
4
|
- @contractspec/lib.builder-runtime
|
|
5
5
|
- @contractspec/lib.provider-spec
|
|
@@ -13,7 +13,22 @@ Web app routes
|
|
|
13
13
|
Operate API proxy
|
|
14
14
|
- /api/operate/builder/queries/builder.workspace.snapshot
|
|
15
15
|
- /api/operate/builder/commands/builder.blueprint.patch
|
|
16
|
-
- /api/operate/builder/commands/builder.export.execute`})]}),e("section",{className:"grid gap-4 md:grid-cols-3",children:i.map((
|
|
16
|
+
- /api/operate/builder/commands/builder.export.execute`})]}),e("section",{className:"grid gap-4 md:grid-cols-3",children:i.map((t)=>a("article",{className:"editorial-panel space-y-3",children:[e("h2",{className:"font-semibold text-xl",children:t.title}),e("p",{className:"text-muted-foreground text-sm leading-7",children:t.body})]},t.title))}),a("section",{className:"grid gap-5 lg:grid-cols-2",children:[a("article",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Typical Builder loop"}),e("ol",{className:"list-inside list-decimal space-y-3 text-muted-foreground text-sm leading-7",children:n.map((t)=>e("li",{children:t},t))})]}),a("article",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"What Builder should not become"}),a("ul",{className:"editorial-list",children:[a("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Not a competitor to specialized coding agents such as Codex or Claude Code."})]}),a("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Not a managed-only product that traps teams away from OSS-local runtime paths."})]}),a("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Not a hidden routing layer that obscures provider provenance, receipts, or runtime mode."})]}),a("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:"Not a desktop-only surface. Mobile review parity is part of the control-plane contract."})]})]})]})]}),a("section",{className:"editorial-panel space-y-5",children:[a("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Workspace config carries the current Builder defaults"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Builder setup is no longer just an app-shell concern. The shared workspace config now carries runtime mode, bootstrap preset, control plane API defaults, and local runtime registration metadata so the CLI, editors, and web shells resolve the same posture."})]}),e(o,{language:"json",filename:".contractsrc.json",code:`{
|
|
17
|
+
"builder": {
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"runtimeMode": "local",
|
|
20
|
+
"bootstrapPreset": "local_daemon_mvp",
|
|
21
|
+
"api": {
|
|
22
|
+
"baseUrl": "https://api.contractspec.io",
|
|
23
|
+
"controlPlaneTokenEnvVar": "CONTROL_PLANE_API_TOKEN"
|
|
24
|
+
},
|
|
25
|
+
"localRuntime": {
|
|
26
|
+
"runtimeId": "rt_local_daemon",
|
|
27
|
+
"grantedTo": "local:operator",
|
|
28
|
+
"providerIds": ["provider.codex", "provider.local.model"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}`})]}),a("section",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Operator posture stays visible"}),e("ul",{className:"editorial-list",children:s.map((t)=>a("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:t})]},t))})]}),a("section",{className:"editorial-panel space-y-5",children:[a("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Use the workbench UI as the host surface"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"The reusable module already exposes the desktop workbench shell. Your host app keeps control of action wiring, runtime mode selection, and approval flows."})]}),e(o,{language:"tsx",filename:"BuilderWorkbenchHost.tsx",code:`import { BuilderWorkbench, useBuilderWorkbenchState } from "@contractspec/module.builder-workbench";
|
|
17
32
|
|
|
18
33
|
const state = useBuilderWorkbenchState({
|
|
19
34
|
workspace: initialSnapshot.workspace,
|
|
@@ -31,4 +46,4 @@ const state = useBuilderWorkbenchState({
|
|
|
31
46
|
onRunReadiness={runReadiness}
|
|
32
47
|
onExecuteExport={executeExport}
|
|
33
48
|
selectedExportRuntimeMode="hybrid"
|
|
34
|
-
/>;`})]}),
|
|
49
|
+
/>;`})]}),a("section",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Read this with the Studio bridge in mind"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Builder is where the OSS foundation meets the richer operating layer. Use the Studio overview when you want the higher-level product posture and team workflows on top of these contracts."}),a("div",{className:"flex flex-wrap gap-3",children:[e(r,{href:"/docs/studio",className:"btn-primary",children:"Studio overview"}),e(r,{href:"/docs/architecture/control-plane",className:"btn-ghost",children:"Control-plane runtime"})]})]})]})}export{p as SpecsBuilderControlPlanePage};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{CodeBlock as c}from"@contractspec/lib.design-system";import n from"@contractspec/lib.ui-link";import{jsx as e,jsxs as t}from"react/jsx-runtime";var o=[{title:"ContextPack",body:"Projects the current repo state, impacted contracts, canon packs, policy bindings, and acceptance checks into one task-scoped envelope."},{title:"PlanPacket",body:"Compiles a candidate objective into ACP-aware steps plus explicit refs back to control-plane intent, plan compile, and plan verify contracts."},{title:"PatchVerdict",body:"Classifies one file edit or shell command as permit, rewrite, require_review, or deny, with runtime-linked control-plane state when available."},{title:"ReviewPacket",body:"Persists the evidence a human needs when Connect escalates, while keeping the local artifact trail authoritative in OSS mode."}],i=["Enable `connect` in `.contractsrc.json` and keep your protected, immutable, generated, and smoke-check policies explicit.","Run `contractspec connect context` and `contractspec connect plan` before risky work so the agent is operating on task-scoped evidence, not ambient repo assumptions.","Gate file and shell mutations through `contractspec connect verify` or the host hook commands instead of inventing editor-specific approval logic.","Inspect pending review packets locally first, then sync them to the Studio bridge only if your team wants centralized operator workflows.","Use replay and harness evaluation to prove whether a prior decision stayed safe when the workspace changed."],
|
|
2
|
+
import{CodeBlock as c}from"@contractspec/lib.design-system";import n from"@contractspec/lib.ui-link";import{jsx as e,jsxs as t}from"react/jsx-runtime";var o=[{title:"ContextPack",body:"Projects the current repo state, impacted contracts, canon packs, policy bindings, and acceptance checks into one task-scoped envelope."},{title:"PlanPacket",body:"Compiles a candidate objective into ACP-aware steps plus explicit refs back to control-plane intent, plan compile, and plan verify contracts."},{title:"PatchVerdict",body:"Classifies one file edit or shell command as permit, rewrite, require_review, or deny, with runtime-linked control-plane state when available."},{title:"ReviewPacket",body:"Persists the evidence a human needs when Connect escalates, while keeping the local artifact trail authoritative in OSS mode."}],i=["`.contractspec/adoption/catalog.json` mirrored from the bundled ContractSpec catalog","family-aware reuse recommendations for `ui`, `contracts`, `integrations`, `runtime`, `sharedLibs`, and `solutions`","verdict thresholds that can prefer workspace reuse, ContractSpec reuse, review, or explicit denial before a new implementation starts"],s=["Enable `connect` in `.contractsrc.json` and keep your protected, immutable, generated, and smoke-check policies explicit.","Run `contractspec connect context` and `contractspec connect plan` before risky work so the agent is operating on task-scoped evidence, not ambient repo assumptions.","Gate file and shell mutations through `contractspec connect verify` or the host hook commands instead of inventing editor-specific approval logic.","Inspect pending review packets locally first, then sync them to the Studio bridge only if your team wants centralized operator workflows.","Use replay and harness evaluation to prove whether a prior decision stayed safe when the workspace changed."],r=["Connect is not a second control plane or a second package family.","Verdicts are projections over existing `controlPlane.*`, ACP, workspace, and harness primitives.","Studio is optional for baseline enforcement. Local artifacts remain the OSS source of truth.","Destructive commands, protected paths, drift, and unknown impact stay visible instead of being hidden behind adapter magic."];function d(){return t("div",{className:"space-y-10",children:[t("section",{className:"space-y-3",children:[e("p",{className:"editorial-kicker",children:"Spec pack"}),e("h1",{className:"font-serif text-4xl tracking-[-0.04em] md:text-5xl",children:"ContractSpec Connect puts coding-agent actions behind explicit, local-first governance."}),e("p",{className:"max-w-3xl text-lg text-muted-foreground leading-8",children:"Connect is the adapter layer between agent-native actions and the existing ContractSpec stack. It reuses control-plane, ACP, workspace, knowledge, and harness primitives to explain what the agent is trying to do before a file edit or shell command lands."})]}),t("section",{className:"editorial-proof-strip",children:[t("div",{className:"editorial-stat",children:[e("span",{className:"editorial-label",children:"Authoritative surfaces"}),e("span",{className:"editorial-stat-value",children:"control plane, ACP, workspace, harness"})]}),e("p",{className:"max-w-2xl text-muted-foreground text-sm leading-7",children:"Connect stays narrow on purpose. It projects local evidence, maps its verdicts back to runtime semantics, and leaves the canonical system contracts where they already live."})]}),t("section",{className:"editorial-panel space-y-5",children:[t("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"What you use in practice"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"The CLI and the workspace service already implement the pack. The main workflow is local initialization, task projection, verification, then optional review sync."})]}),e(c,{language:"bash",filename:"contractspec-connect",code:`contractspec connect init --scope workspace
|
|
3
|
+
contractspec connect adoption sync --json
|
|
4
|
+
printf '{"goal":"Prefer an existing release helper before adding a new one"}' | contractspec connect adoption resolve --family sharedLibs --stdin --json
|
|
3
5
|
contractspec connect context --task refactor-docs --paths packages/libs/contracts-spec/src/control-plane/contracts.ts --json
|
|
4
6
|
printf '{"objective":"Document the control-plane contract surface","commands":["bun run typecheck"]}' | contractspec connect plan --task refactor-docs --stdin --json
|
|
5
7
|
printf '{"operation":"edit","path":"packages/libs/contracts-spec/src/control-plane/contracts.ts"}' | contractspec connect verify --task refactor-docs --tool acp.fs.access --stdin --json
|
|
6
8
|
printf 'bun run typecheck' | contractspec connect verify --task refactor-docs --tool acp.terminal.exec --stdin --json
|
|
7
9
|
contractspec connect review list --json
|
|
8
|
-
contractspec connect replay <decisionId> --json`})]}),t("section",{className:"space-y-5",children:[t("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"The four core artifacts"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Every Connect command is there to emit or inspect one of these reviewable objects under `.contractspec/connect/*`."})]}),e("div",{className:"grid gap-4 md:grid-cols-2",children:o.map((a)=>t("article",{className:"editorial-panel space-y-3",children:[e("h3",{className:"font-semibold text-xl",children:a.title}),e("p",{className:"text-muted-foreground text-sm leading-7",children:a.body})]},a.title))})]}),t("section",{className:"grid gap-5 lg:grid-cols-2",children:[t("article",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Adopt Connect in this order"}),e("ol",{className:"list-inside list-decimal space-y-3 text-muted-foreground text-sm leading-7",children:
|
|
10
|
+
contractspec connect replay <decisionId> --json`})]}),t("section",{className:"space-y-5",children:[t("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"The four core artifacts"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Every Connect command is there to emit or inspect one of these reviewable objects under `.contractspec/connect/*`."})]}),e("div",{className:"grid gap-4 md:grid-cols-2",children:o.map((a)=>t("article",{className:"editorial-panel space-y-3",children:[e("h3",{className:"font-semibold text-xl",children:a.title}),e("p",{className:"text-muted-foreground text-sm leading-7",children:a.body})]},a.title))})]}),t("section",{className:"editorial-panel space-y-5",children:[t("div",{className:"space-y-2",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Reuse-first adoption is part of the workflow"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Connect adoption keeps reuse guidance in the same local control surface. Before a new contract family, helper, or runtime abstraction lands, Connect can mirror the bundled catalog and resolve the best reuse candidate by family."})]}),e("ul",{className:"editorial-list",children:i.map((a)=>t("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:a})]},a))})]}),t("section",{className:"grid gap-5 lg:grid-cols-2",children:[t("article",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Adopt Connect in this order"}),e("ol",{className:"list-inside list-decimal space-y-3 text-muted-foreground text-sm leading-7",children:s.map((a)=>e("li",{children:a},a))})]}),t("article",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Boundaries that keep it trustworthy"}),e("ul",{className:"editorial-list",children:r.map((a)=>t("li",{children:[e("span",{className:"editorial-list-marker"}),e("span",{children:a})]},a))})]})]}),t("section",{className:"editorial-panel space-y-4",children:[e("h2",{className:"font-serif text-3xl tracking-[-0.03em]",children:"Where Connect fits in the rest of the docs"}),e("p",{className:"text-muted-foreground text-sm leading-7",children:"Read the control-plane runtime page when you want the underlying governance contracts, then use the Studio bridge only if your team wants centralized review queues on top of the OSS-local evidence path."}),t("div",{className:"flex flex-wrap gap-3",children:[e(n,{href:"/docs/architecture/control-plane",className:"btn-primary",children:"Control-plane runtime"}),e(n,{href:"/docs/studio",className:"btn-ghost",children:"Studio bridge"})]})]})]})}export{d as SpecsConnectPage};
|
|
@@ -1,42 +1,49 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import F from"@contractspec/lib.ui-link";import{ChevronRight as G}from"lucide-react";import{jsx as z,jsxs as B}from"react/jsx-runtime";var H=`import { defineDataView } from '@contractspec/lib.contracts-spec/data-views';
|
|
3
|
+
import { ListDataGridShowcaseRowsQuery } from '@contractspec/example.data-grid-showcase/contracts/data-grid-showcase.operation';
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const DataGridShowcaseDataView = defineDataView({
|
|
6
6
|
meta: {
|
|
7
|
-
key: '
|
|
7
|
+
key: 'examples.data-grid-showcase.table',
|
|
8
8
|
version: '1.0.0',
|
|
9
|
-
|
|
9
|
+
entity: 'account',
|
|
10
|
+
title: 'Data Grid Showcase Table',
|
|
11
|
+
description:
|
|
12
|
+
'Declarative DataViewSpec for the ContractSpec table showcase.',
|
|
13
|
+
domain: 'examples',
|
|
14
|
+
owners: ['@platform.core'],
|
|
15
|
+
tags: ['examples', 'table', 'data-grid'],
|
|
16
|
+
stability: 'experimental',
|
|
10
17
|
},
|
|
11
18
|
source: {
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
primary: {
|
|
20
|
+
key: ListDataGridShowcaseRowsQuery.meta.key,
|
|
21
|
+
version: ListDataGridShowcaseRowsQuery.meta.version,
|
|
22
|
+
},
|
|
14
23
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
view: {
|
|
25
|
+
kind: 'table',
|
|
26
|
+
executionMode: 'client',
|
|
27
|
+
selection: 'multiple',
|
|
28
|
+
columnVisibility: true,
|
|
29
|
+
columnResizing: true,
|
|
30
|
+
columnPinning: true,
|
|
31
|
+
rowExpansion: {
|
|
32
|
+
fields: ['notes', 'renewalDate', 'lastActivityAt'],
|
|
24
33
|
},
|
|
25
|
-
{
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
initialState: {
|
|
35
|
+
pageSize: 4,
|
|
36
|
+
hiddenColumns: ['notes'],
|
|
37
|
+
pinnedColumns: {
|
|
38
|
+
left: ['account'],
|
|
39
|
+
},
|
|
40
|
+
sorting: [{ field: 'arr', desc: true }],
|
|
30
41
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
pagination: {
|
|
38
|
-
type: 'cursor',
|
|
39
|
-
defaultPageSize: 50,
|
|
40
|
-
maxPageSize: 200,
|
|
42
|
+
fields: [
|
|
43
|
+
{ key: 'account', label: 'Account', dataPath: 'account', sortable: true },
|
|
44
|
+
{ key: 'owner', label: 'Owner', dataPath: 'owner', sortable: true },
|
|
45
|
+
{ key: 'status', label: 'Status', dataPath: 'status', sortable: true },
|
|
46
|
+
{ key: 'notes', label: 'Notes', dataPath: 'notes' },
|
|
47
|
+
],
|
|
41
48
|
},
|
|
42
|
-
})
|
|
49
|
+
});`;function N(){return B("div",{className:"space-y-8",children:[B("div",{className:"space-y-4",children:[z("h1",{className:"font-bold text-4xl",children:"DataViews"}),B("p",{className:"text-muted-foreground",children:["A ",z("strong",{children:"DataViewSpec"})," describes how data should be queried, filtered, sorted, and presented to users. Runtime adapters execute optimized database queries and serve list views, detail views, and search interfaces while respecting policy constraints."]})]}),B("div",{className:"space-y-4",children:[z("h2",{className:"font-bold text-2xl",children:"Core concepts"}),B("div",{className:"space-y-3",children:[B("div",{children:[z("h3",{className:"font-semibold text-lg",children:"Data sources"}),z("p",{className:"text-muted-foreground",children:"A DataView connects to one or more data sources\u2014databases, APIs, or other capabilities. You specify the source and the fields you want to expose."})]}),B("div",{children:[z("h3",{className:"font-semibold text-lg",children:"Filtering"}),z("p",{className:"text-muted-foreground",children:`Define filters that users can apply to narrow down results. Filters can be simple (e.g., "status equals 'active'") or complex (e.g., "created within the last 30 days AND assigned to current user").`})]}),B("div",{children:[z("h3",{className:"font-semibold text-lg",children:"Sorting"}),z("p",{className:"text-muted-foreground",children:"Specify which fields can be sorted and the default sort order. ContractSpec generates efficient database queries with proper indexes."})]}),B("div",{children:[z("h3",{className:"font-semibold text-lg",children:"Pagination"}),z("p",{className:"text-muted-foreground",children:"DataViews automatically support pagination to handle large datasets. You can configure page size limits and cursor-based or offset-based pagination."})]}),B("div",{children:[z("h3",{className:"font-semibold text-lg",children:"Aggregations"}),z("p",{className:"text-muted-foreground",children:"Compute aggregates like counts, sums, averages, and group-by operations. These are useful for dashboards and summary views."})]})]})]}),B("div",{className:"space-y-4",children:[z("h2",{className:"font-bold text-2xl",children:"Example DataViewSpec"}),B("p",{className:"text-muted-foreground",children:["Here is the canonical table contract used by the live"," ",z(F,{href:"/docs/examples/data-grid-showcase",className:"text-[color:var(--rust)] underline underline-offset-4",children:"Data Grid Showcase"}),":"]}),z("div",{className:"overflow-x-auto rounded-lg border border-border bg-background/50 p-4 font-mono text-muted-foreground text-sm",children:z("pre",{children:H})}),z("p",{className:"text-muted-foreground text-sm",children:"This one contract drives the DataView lane, while the same rows and controller also feed the raw web primitive, native-first primitive, and composed design-system demos."})]}),B("div",{className:"space-y-4",children:[z("h2",{className:"font-bold text-2xl",children:"Policy integration"}),B("p",{className:"text-muted-foreground",children:["DataViews automatically enforce"," ",z(F,{href:"/docs/specs/policy",className:"text-violet-400 hover:text-violet-300",children:"PolicySpecs"}),". If a user doesn't have permission to see certain fields, those fields are automatically filtered out or redacted. If a user can only see their own data, the query is automatically scoped."]}),z("p",{className:"text-muted-foreground",children:"This means you define the data view once, and it works correctly for all users based on their permissions\u2014no need to write separate queries for different roles."})]}),B("div",{className:"space-y-4",children:[z("h2",{className:"font-bold text-2xl",children:"Served outputs"}),z("p",{className:"text-muted-foreground",children:"From a DataViewSpec, ContractSpec serves:"}),B("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[B("li",{children:[z("strong",{children:"Database queries"})," \u2013 Optimized SQL or NoSQL queries executed at runtime"]}),B("li",{children:[z("strong",{children:"API endpoints"})," \u2013 RESTful or GraphQL endpoints for fetching data"]}),B("li",{children:[z("strong",{children:"UI components"})," \u2013 List views, tables, cards, and detail views"]}),B("li",{children:[z("strong",{children:"Search interfaces"})," \u2013 Full-text search with autocomplete"]}),B("li",{children:[z("strong",{children:"Export functions"})," \u2013 CSV, JSON, or Excel exports"]})]})]}),B("div",{className:"space-y-4",children:[z("h2",{className:"font-bold text-2xl",children:"Best practices"}),B("ul",{className:"list-inside list-disc space-y-2 text-muted-foreground",children:[z("li",{children:"Only expose fields that users actually need\u2014this improves performance and security."}),z("li",{children:"Use appropriate indexes for sortable and filterable fields."}),z("li",{children:"Set reasonable pagination limits to prevent performance issues."}),z("li",{children:"Use aggregations sparingly\u2014they can be expensive on large datasets."}),z("li",{children:"Test DataViews with realistic data volumes to ensure they perform well."})]})]}),B("div",{className:"flex items-center gap-4 pt-4",children:[z(F,{href:"/docs/specs/capabilities",className:"btn-ghost",children:"Previous: Capabilities"}),B(F,{href:"/docs/specs/workflows",className:"btn-primary",children:["Next: Workflows ",z(G,{size:16})]})]})]})}export{N as SpecsDataViewsPage};
|