@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contractspec/bundle.library",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"clean": "rm -rf dist",
|
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
"node": "./dist/node/application/mcp/cliMcp.js",
|
|
49
49
|
"default": "./dist/application/mcp/cliMcp.js"
|
|
50
50
|
},
|
|
51
|
+
"./application/mcp/cliMcp.onboarding": {
|
|
52
|
+
"types": "./dist/application/mcp/cliMcp.onboarding.d.ts",
|
|
53
|
+
"bun": "./dist/application/mcp/cliMcp.onboarding.js",
|
|
54
|
+
"node": "./dist/node/application/mcp/cliMcp.onboarding.js",
|
|
55
|
+
"default": "./dist/application/mcp/cliMcp.onboarding.js"
|
|
56
|
+
},
|
|
51
57
|
"./application/mcp/common": {
|
|
52
58
|
"types": "./dist/application/mcp/common.d.ts",
|
|
53
59
|
"bun": "./dist/application/mcp/common.js",
|
|
@@ -60,6 +66,12 @@
|
|
|
60
66
|
"node": "./dist/node/application/mcp/contractsMcp.js",
|
|
61
67
|
"default": "./dist/application/mcp/contractsMcp.js"
|
|
62
68
|
},
|
|
69
|
+
"./application/mcp/contractsMcpAdoptionTools": {
|
|
70
|
+
"types": "./dist/application/mcp/contractsMcpAdoptionTools.d.ts",
|
|
71
|
+
"bun": "./dist/application/mcp/contractsMcpAdoptionTools.js",
|
|
72
|
+
"node": "./dist/node/application/mcp/contractsMcpAdoptionTools.js",
|
|
73
|
+
"default": "./dist/application/mcp/contractsMcpAdoptionTools.js"
|
|
74
|
+
},
|
|
63
75
|
"./application/mcp/contractsMcpResources": {
|
|
64
76
|
"types": "./dist/application/mcp/contractsMcpResources.d.ts",
|
|
65
77
|
"bun": "./dist/application/mcp/contractsMcpResources.js",
|
|
@@ -498,6 +510,12 @@
|
|
|
498
510
|
"node": "./dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js",
|
|
499
511
|
"default": "./dist/components/docs/guides/GuideNextjsOneEndpointPage.js"
|
|
500
512
|
},
|
|
513
|
+
"./components/docs/guides/GuideReleaseCapsulesPage": {
|
|
514
|
+
"types": "./dist/components/docs/guides/GuideReleaseCapsulesPage.d.ts",
|
|
515
|
+
"bun": "./dist/components/docs/guides/GuideReleaseCapsulesPage.js",
|
|
516
|
+
"node": "./dist/node/components/docs/guides/GuideReleaseCapsulesPage.js",
|
|
517
|
+
"default": "./dist/components/docs/guides/GuideReleaseCapsulesPage.js"
|
|
518
|
+
},
|
|
501
519
|
"./components/docs/guides/guides.docblocks": {
|
|
502
520
|
"types": "./dist/components/docs/guides/guides.docblocks.d.ts",
|
|
503
521
|
"bun": "./dist/components/docs/guides/guides.docblocks.js",
|
|
@@ -882,6 +900,12 @@
|
|
|
882
900
|
"node": "./dist/node/components/docs/libraries/LibrariesUIKitPage.js",
|
|
883
901
|
"default": "./dist/components/docs/libraries/LibrariesUIKitPage.js"
|
|
884
902
|
},
|
|
903
|
+
"./components/docs/libraries/LibrariesUIKitWebPage": {
|
|
904
|
+
"types": "./dist/components/docs/libraries/LibrariesUIKitWebPage.d.ts",
|
|
905
|
+
"bun": "./dist/components/docs/libraries/LibrariesUIKitWebPage.js",
|
|
906
|
+
"node": "./dist/node/components/docs/libraries/LibrariesUIKitWebPage.js",
|
|
907
|
+
"default": "./dist/components/docs/libraries/LibrariesUIKitWebPage.js"
|
|
908
|
+
},
|
|
885
909
|
"./components/docs/libraries/LibrariesWorkflowComposerPage": {
|
|
886
910
|
"types": "./dist/components/docs/libraries/LibrariesWorkflowComposerPage.d.ts",
|
|
887
911
|
"bun": "./dist/components/docs/libraries/LibrariesWorkflowComposerPage.js",
|
|
@@ -1902,25 +1926,26 @@
|
|
|
1902
1926
|
"react": "19.2.0"
|
|
1903
1927
|
},
|
|
1904
1928
|
"dependencies": {
|
|
1929
|
+
"@contractspec/bundle.workspace": "4.5.0",
|
|
1905
1930
|
"@apollo/client": "^4.1.7",
|
|
1906
1931
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
1907
1932
|
"@contractspec/lib.ai-providers": "3.7.13",
|
|
1908
|
-
"@contractspec/lib.contracts-spec": "5.
|
|
1909
|
-
"@contractspec/lib.contracts-library": "3.7.
|
|
1910
|
-
"@contractspec/lib.content-gen": "3.7.
|
|
1911
|
-
"@contractspec/lib.contracts-runtime-server-mcp": "3.7.
|
|
1912
|
-
"@contractspec/lib.design-system": "3.
|
|
1913
|
-
"@contractspec/lib.surface-runtime": "0.5.
|
|
1933
|
+
"@contractspec/lib.contracts-spec": "5.4.0",
|
|
1934
|
+
"@contractspec/lib.contracts-library": "3.7.20",
|
|
1935
|
+
"@contractspec/lib.content-gen": "3.7.20",
|
|
1936
|
+
"@contractspec/lib.contracts-runtime-server-mcp": "3.7.20",
|
|
1937
|
+
"@contractspec/lib.design-system": "3.10.0",
|
|
1938
|
+
"@contractspec/lib.surface-runtime": "0.5.20",
|
|
1914
1939
|
"@contractspec/lib.provider-ranking": "0.7.13",
|
|
1915
|
-
"@contractspec/lib.example-shared-ui": "6.0.
|
|
1916
|
-
"@contractspec/lib.knowledge": "3.7.
|
|
1940
|
+
"@contractspec/lib.example-shared-ui": "6.0.20",
|
|
1941
|
+
"@contractspec/lib.knowledge": "3.7.20",
|
|
1917
1942
|
"@contractspec/lib.logger": "3.7.13",
|
|
1918
1943
|
"@contractspec/lib.runtime-sandbox": "2.7.14",
|
|
1919
1944
|
"@contractspec/lib.schema": "3.7.14",
|
|
1920
|
-
"@contractspec/lib.ui-kit-web": "3.10.
|
|
1945
|
+
"@contractspec/lib.ui-kit-web": "3.10.1",
|
|
1921
1946
|
"@contractspec/lib.ui-link": "3.7.15",
|
|
1922
|
-
"@contractspec/module.context-storage": "0.7.
|
|
1923
|
-
"@contractspec/module.examples": "3.
|
|
1947
|
+
"@contractspec/module.context-storage": "0.7.19",
|
|
1948
|
+
"@contractspec/module.examples": "3.9.0",
|
|
1924
1949
|
"@dnd-kit/core": "^6.1.0",
|
|
1925
1950
|
"@dnd-kit/sortable": "^10.0.0",
|
|
1926
1951
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -1936,10 +1961,10 @@
|
|
|
1936
1961
|
"posthog-react-native": "^4.41.1",
|
|
1937
1962
|
"react-hook-form": "^7.72.1",
|
|
1938
1963
|
"zod": "^4.3.5",
|
|
1939
|
-
"@contractspec/lib.contracts-integrations": "3.8.
|
|
1940
|
-
"@contractspec/lib.contracts-runtime-server-rest": "3.7.
|
|
1941
|
-
"@contractspec/lib.contracts-runtime-server-graphql": "3.7.
|
|
1942
|
-
"@contractspec/lib.contracts-runtime-client-react": "3.9.
|
|
1964
|
+
"@contractspec/lib.contracts-integrations": "3.8.12",
|
|
1965
|
+
"@contractspec/lib.contracts-runtime-server-rest": "3.7.20",
|
|
1966
|
+
"@contractspec/lib.contracts-runtime-server-graphql": "3.7.20",
|
|
1967
|
+
"@contractspec/lib.contracts-runtime-client-react": "3.9.1"
|
|
1943
1968
|
},
|
|
1944
1969
|
"devDependencies": {
|
|
1945
1970
|
"@types/react": "~19.2.14",
|
|
@@ -1987,6 +2012,12 @@
|
|
|
1987
2012
|
"node": "./dist/node/application/mcp/cliMcp.js",
|
|
1988
2013
|
"default": "./dist/application/mcp/cliMcp.js"
|
|
1989
2014
|
},
|
|
2015
|
+
"./application/mcp/cliMcp.onboarding": {
|
|
2016
|
+
"types": "./dist/application/mcp/cliMcp.onboarding.d.ts",
|
|
2017
|
+
"bun": "./dist/application/mcp/cliMcp.onboarding.js",
|
|
2018
|
+
"node": "./dist/node/application/mcp/cliMcp.onboarding.js",
|
|
2019
|
+
"default": "./dist/application/mcp/cliMcp.onboarding.js"
|
|
2020
|
+
},
|
|
1990
2021
|
"./application/mcp/common": {
|
|
1991
2022
|
"types": "./dist/application/mcp/common.d.ts",
|
|
1992
2023
|
"bun": "./dist/application/mcp/common.js",
|
|
@@ -1999,6 +2030,12 @@
|
|
|
1999
2030
|
"node": "./dist/node/application/mcp/contractsMcp.js",
|
|
2000
2031
|
"default": "./dist/application/mcp/contractsMcp.js"
|
|
2001
2032
|
},
|
|
2033
|
+
"./application/mcp/contractsMcpAdoptionTools": {
|
|
2034
|
+
"types": "./dist/application/mcp/contractsMcpAdoptionTools.d.ts",
|
|
2035
|
+
"bun": "./dist/application/mcp/contractsMcpAdoptionTools.js",
|
|
2036
|
+
"node": "./dist/node/application/mcp/contractsMcpAdoptionTools.js",
|
|
2037
|
+
"default": "./dist/application/mcp/contractsMcpAdoptionTools.js"
|
|
2038
|
+
},
|
|
2002
2039
|
"./application/mcp/contractsMcpResources": {
|
|
2003
2040
|
"types": "./dist/application/mcp/contractsMcpResources.d.ts",
|
|
2004
2041
|
"bun": "./dist/application/mcp/contractsMcpResources.js",
|
|
@@ -2437,6 +2474,12 @@
|
|
|
2437
2474
|
"node": "./dist/node/components/docs/guides/GuideNextjsOneEndpointPage.js",
|
|
2438
2475
|
"default": "./dist/components/docs/guides/GuideNextjsOneEndpointPage.js"
|
|
2439
2476
|
},
|
|
2477
|
+
"./components/docs/guides/GuideReleaseCapsulesPage": {
|
|
2478
|
+
"types": "./dist/components/docs/guides/GuideReleaseCapsulesPage.d.ts",
|
|
2479
|
+
"bun": "./dist/components/docs/guides/GuideReleaseCapsulesPage.js",
|
|
2480
|
+
"node": "./dist/node/components/docs/guides/GuideReleaseCapsulesPage.js",
|
|
2481
|
+
"default": "./dist/components/docs/guides/GuideReleaseCapsulesPage.js"
|
|
2482
|
+
},
|
|
2440
2483
|
"./components/docs/guides/guides.docblocks": {
|
|
2441
2484
|
"types": "./dist/components/docs/guides/guides.docblocks.d.ts",
|
|
2442
2485
|
"bun": "./dist/components/docs/guides/guides.docblocks.js",
|
|
@@ -2821,6 +2864,12 @@
|
|
|
2821
2864
|
"node": "./dist/node/components/docs/libraries/LibrariesUIKitPage.js",
|
|
2822
2865
|
"default": "./dist/components/docs/libraries/LibrariesUIKitPage.js"
|
|
2823
2866
|
},
|
|
2867
|
+
"./components/docs/libraries/LibrariesUIKitWebPage": {
|
|
2868
|
+
"types": "./dist/components/docs/libraries/LibrariesUIKitWebPage.d.ts",
|
|
2869
|
+
"bun": "./dist/components/docs/libraries/LibrariesUIKitWebPage.js",
|
|
2870
|
+
"node": "./dist/node/components/docs/libraries/LibrariesUIKitWebPage.js",
|
|
2871
|
+
"default": "./dist/components/docs/libraries/LibrariesUIKitWebPage.js"
|
|
2872
|
+
},
|
|
2824
2873
|
"./components/docs/libraries/LibrariesWorkflowComposerPage": {
|
|
2825
2874
|
"types": "./dist/components/docs/libraries/LibrariesWorkflowComposerPage.d.ts",
|
|
2826
2875
|
"bun": "./dist/components/docs/libraries/LibrariesWorkflowComposerPage.js",
|
|
@@ -0,0 +1,297 @@
|
|
|
1
|
+
import { createNodeAdapters, onboarding } from '@contractspec/bundle.workspace';
|
|
2
|
+
import {
|
|
3
|
+
defineCommand,
|
|
4
|
+
definePrompt,
|
|
5
|
+
defineResourceTemplate,
|
|
6
|
+
installOp,
|
|
7
|
+
type OperationSpecRegistry,
|
|
8
|
+
type PromptRegistry,
|
|
9
|
+
type ResourceRegistry,
|
|
10
|
+
} from '@contractspec/lib.contracts-spec';
|
|
11
|
+
import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
12
|
+
import z from 'zod';
|
|
13
|
+
|
|
14
|
+
const ONBOARDING_TAGS = ['cli', 'mcp', 'onboarding'];
|
|
15
|
+
const ONBOARDING_OWNERS = ['@contractspec'];
|
|
16
|
+
|
|
17
|
+
function parseTrackIds(tracks: string | undefined) {
|
|
18
|
+
return tracks
|
|
19
|
+
?.split(',')
|
|
20
|
+
.map((track) => track.trim())
|
|
21
|
+
.filter(Boolean) as onboarding.OnboardingTrackId[] | undefined;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
async function buildPlan(args: { tracks?: string; example?: string } = {}) {
|
|
25
|
+
const adapters = createNodeAdapters({
|
|
26
|
+
cwd: process.cwd(),
|
|
27
|
+
silent: true,
|
|
28
|
+
});
|
|
29
|
+
return onboarding.buildOnboardingPlan(adapters, {
|
|
30
|
+
forcedExampleKey: args.example,
|
|
31
|
+
selectedTracks: parseTrackIds(args.tracks),
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function registerCliOnboardingResources(resources: ResourceRegistry) {
|
|
36
|
+
resources.register(
|
|
37
|
+
defineResourceTemplate({
|
|
38
|
+
meta: {
|
|
39
|
+
uriTemplate: 'onboarding://tracks',
|
|
40
|
+
title: 'Onboarding tracks',
|
|
41
|
+
description:
|
|
42
|
+
'Primary ContractSpec onboarding tracks exposed by the CLI.',
|
|
43
|
+
mimeType: 'application/json',
|
|
44
|
+
tags: ONBOARDING_TAGS,
|
|
45
|
+
},
|
|
46
|
+
input: z.object({}),
|
|
47
|
+
resolve: async () => ({
|
|
48
|
+
uri: 'onboarding://tracks',
|
|
49
|
+
mimeType: 'application/json',
|
|
50
|
+
data: JSON.stringify(onboarding.listOnboardingTracks(), null, 2),
|
|
51
|
+
}),
|
|
52
|
+
})
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
resources.register(
|
|
56
|
+
defineResourceTemplate({
|
|
57
|
+
meta: {
|
|
58
|
+
uriTemplate: 'onboarding://track/{id}',
|
|
59
|
+
title: 'Onboarding track',
|
|
60
|
+
description:
|
|
61
|
+
'Track-specific onboarding metadata and recommended commands.',
|
|
62
|
+
mimeType: 'application/json',
|
|
63
|
+
tags: ONBOARDING_TAGS,
|
|
64
|
+
},
|
|
65
|
+
input: z.object({ id: z.string() }),
|
|
66
|
+
resolve: async ({ id }) => ({
|
|
67
|
+
uri: `onboarding://track/${id}`,
|
|
68
|
+
mimeType: 'application/json',
|
|
69
|
+
data: JSON.stringify(
|
|
70
|
+
onboarding.getOnboardingTrack(id) ?? null,
|
|
71
|
+
null,
|
|
72
|
+
2
|
|
73
|
+
),
|
|
74
|
+
}),
|
|
75
|
+
})
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
resources.register(
|
|
79
|
+
defineResourceTemplate({
|
|
80
|
+
meta: {
|
|
81
|
+
uriTemplate: 'onboarding://artifacts/{id}{?tracks,example}',
|
|
82
|
+
title: 'Rendered onboarding artifact',
|
|
83
|
+
description:
|
|
84
|
+
'Render AGENTS.md or USAGE.md content for the current repo.',
|
|
85
|
+
mimeType: 'text/markdown',
|
|
86
|
+
tags: ONBOARDING_TAGS,
|
|
87
|
+
},
|
|
88
|
+
input: z.object({
|
|
89
|
+
example: z.string().optional(),
|
|
90
|
+
id: z.enum(['agent-guide', 'human-guide']),
|
|
91
|
+
tracks: z.string().optional(),
|
|
92
|
+
}),
|
|
93
|
+
resolve: async ({ example, id, tracks }) => {
|
|
94
|
+
const plan = await buildPlan({ example, tracks });
|
|
95
|
+
return {
|
|
96
|
+
uri: `onboarding://artifacts/${id}`,
|
|
97
|
+
mimeType: 'text/markdown',
|
|
98
|
+
data:
|
|
99
|
+
id === 'agent-guide'
|
|
100
|
+
? plan.guides.agentGuide
|
|
101
|
+
: plan.guides.humanGuide,
|
|
102
|
+
};
|
|
103
|
+
},
|
|
104
|
+
})
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function registerCliOnboardingPrompts(prompts: PromptRegistry) {
|
|
109
|
+
prompts.register(
|
|
110
|
+
definePrompt({
|
|
111
|
+
meta: {
|
|
112
|
+
key: 'cli.onboarding',
|
|
113
|
+
version: '1.0.0',
|
|
114
|
+
title: 'Plan a ContractSpec onboarding flow',
|
|
115
|
+
description:
|
|
116
|
+
'Suggest the right onboarding track and artifacts for a repo.',
|
|
117
|
+
tags: ONBOARDING_TAGS,
|
|
118
|
+
stability: 'beta',
|
|
119
|
+
owners: ONBOARDING_OWNERS,
|
|
120
|
+
},
|
|
121
|
+
args: [
|
|
122
|
+
{
|
|
123
|
+
name: 'goal',
|
|
124
|
+
description: 'Repository onboarding goal or focus area.',
|
|
125
|
+
required: false,
|
|
126
|
+
schema: z.string().optional(),
|
|
127
|
+
},
|
|
128
|
+
],
|
|
129
|
+
input: z.object({ goal: z.string().optional() }),
|
|
130
|
+
render: async ({ goal }) => [
|
|
131
|
+
{
|
|
132
|
+
type: 'text',
|
|
133
|
+
text: `Use onboarding://tracks and onboarding_suggestTracks-v1_0_0 before recommending repo-local ContractSpec adoption steps.${goal ? ` Goal: ${goal}.` : ''}`,
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
type: 'resource' as const,
|
|
137
|
+
uri: 'onboarding://tracks',
|
|
138
|
+
title: 'Tracks',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
})
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function registerCliOnboardingOps(registry: OperationSpecRegistry) {
|
|
146
|
+
const SuggestTracksInput = defineSchemaModel({
|
|
147
|
+
name: 'OnboardingSuggestTracksInput',
|
|
148
|
+
fields: {
|
|
149
|
+
example: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
150
|
+
tracks: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
151
|
+
},
|
|
152
|
+
});
|
|
153
|
+
const SuggestTracksOutput = defineSchemaModel({
|
|
154
|
+
name: 'OnboardingSuggestTracksOutput',
|
|
155
|
+
fields: {
|
|
156
|
+
nextCommands: {
|
|
157
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
158
|
+
isArray: true,
|
|
159
|
+
isOptional: false,
|
|
160
|
+
},
|
|
161
|
+
primaryTrack: {
|
|
162
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
163
|
+
isOptional: false,
|
|
164
|
+
},
|
|
165
|
+
reason: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
166
|
+
tracks: {
|
|
167
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
168
|
+
isArray: true,
|
|
169
|
+
isOptional: false,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
});
|
|
173
|
+
const RenderArtifactsOutput = defineSchemaModel({
|
|
174
|
+
name: 'OnboardingRenderArtifactOutput',
|
|
175
|
+
fields: {
|
|
176
|
+
content: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
177
|
+
primaryTrack: {
|
|
178
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
179
|
+
isOptional: false,
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
const NextCommandOutput = defineSchemaModel({
|
|
184
|
+
name: 'OnboardingNextCommandOutput',
|
|
185
|
+
fields: {
|
|
186
|
+
nextCommand: {
|
|
187
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
188
|
+
isOptional: false,
|
|
189
|
+
},
|
|
190
|
+
primaryTrack: {
|
|
191
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
192
|
+
isOptional: false,
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
installOp(
|
|
198
|
+
registry,
|
|
199
|
+
defineCommand({
|
|
200
|
+
meta: {
|
|
201
|
+
key: 'onboarding.suggestTracks',
|
|
202
|
+
version: '1.0.0',
|
|
203
|
+
stability: 'stable',
|
|
204
|
+
owners: ONBOARDING_OWNERS,
|
|
205
|
+
tags: ONBOARDING_TAGS,
|
|
206
|
+
description: 'Suggest the recommended ContractSpec onboarding tracks.',
|
|
207
|
+
goal: 'Help agents choose the right onboarding track before editing repo-local guides.',
|
|
208
|
+
context: 'Used inside the CLI MCP server.',
|
|
209
|
+
},
|
|
210
|
+
io: { input: SuggestTracksInput, output: SuggestTracksOutput },
|
|
211
|
+
policy: { auth: 'anonymous' },
|
|
212
|
+
}),
|
|
213
|
+
async ({ example, tracks }) => {
|
|
214
|
+
const plan = await buildPlan({ example, tracks });
|
|
215
|
+
return {
|
|
216
|
+
nextCommands: plan.nextCommands,
|
|
217
|
+
primaryTrack: plan.primaryTrack.id,
|
|
218
|
+
reason: plan.recommendations[0]?.reason ?? plan.primaryTrack.summary,
|
|
219
|
+
tracks: plan.recommendations.map(
|
|
220
|
+
(recommendation) => recommendation.track.id
|
|
221
|
+
),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
|
|
226
|
+
installOp(
|
|
227
|
+
registry,
|
|
228
|
+
defineCommand({
|
|
229
|
+
meta: {
|
|
230
|
+
key: 'onboarding.renderArtifacts',
|
|
231
|
+
version: '1.0.0',
|
|
232
|
+
stability: 'stable',
|
|
233
|
+
owners: ONBOARDING_OWNERS,
|
|
234
|
+
tags: ONBOARDING_TAGS,
|
|
235
|
+
description: 'Render onboarding artifacts for the current repo.',
|
|
236
|
+
goal: 'Provide AGENTS.md or USAGE.md content without mutating the repo.',
|
|
237
|
+
context: 'Used inside the CLI MCP server.',
|
|
238
|
+
},
|
|
239
|
+
io: {
|
|
240
|
+
input: defineSchemaModel({
|
|
241
|
+
name: 'OnboardingRenderArtifactInput',
|
|
242
|
+
fields: {
|
|
243
|
+
artifact: {
|
|
244
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
245
|
+
isOptional: false,
|
|
246
|
+
},
|
|
247
|
+
example: {
|
|
248
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
249
|
+
isOptional: true,
|
|
250
|
+
},
|
|
251
|
+
tracks: {
|
|
252
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
253
|
+
isOptional: true,
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
}),
|
|
257
|
+
output: RenderArtifactsOutput,
|
|
258
|
+
},
|
|
259
|
+
policy: { auth: 'anonymous' },
|
|
260
|
+
}),
|
|
261
|
+
async ({ artifact, example, tracks }) => {
|
|
262
|
+
const plan = await buildPlan({ example, tracks });
|
|
263
|
+
return {
|
|
264
|
+
content:
|
|
265
|
+
artifact === 'agent-guide'
|
|
266
|
+
? plan.guides.agentGuide
|
|
267
|
+
: plan.guides.humanGuide,
|
|
268
|
+
primaryTrack: plan.primaryTrack.id,
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
|
|
273
|
+
installOp(
|
|
274
|
+
registry,
|
|
275
|
+
defineCommand({
|
|
276
|
+
meta: {
|
|
277
|
+
key: 'onboarding.nextCommand',
|
|
278
|
+
version: '1.0.0',
|
|
279
|
+
stability: 'stable',
|
|
280
|
+
owners: ONBOARDING_OWNERS,
|
|
281
|
+
tags: ONBOARDING_TAGS,
|
|
282
|
+
description: 'Return the next recommended CLI command for onboarding.',
|
|
283
|
+
goal: 'Help agents choose the next onboarding command without mutating the repo.',
|
|
284
|
+
context: 'Used inside the CLI MCP server.',
|
|
285
|
+
},
|
|
286
|
+
io: { input: SuggestTracksInput, output: NextCommandOutput },
|
|
287
|
+
policy: { auth: 'anonymous' },
|
|
288
|
+
}),
|
|
289
|
+
async ({ example, tracks }) => {
|
|
290
|
+
const plan = await buildPlan({ example, tracks });
|
|
291
|
+
return {
|
|
292
|
+
nextCommand: plan.nextCommands[0] ?? 'contractspec onboard',
|
|
293
|
+
primaryTrack: plan.primaryTrack.id,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { describe, expect, it } from 'bun:test';
|
|
2
|
+
import { Elysia } from 'elysia';
|
|
3
|
+
import { createCliMcpHandler } from './cliMcp';
|
|
4
|
+
|
|
5
|
+
function createTestApp() {
|
|
6
|
+
return new Elysia().use(createCliMcpHandler('/mcp/cli'));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
async function mcpRequest(
|
|
10
|
+
method: string,
|
|
11
|
+
params: Record<string, unknown> = {}
|
|
12
|
+
) {
|
|
13
|
+
return createTestApp().handle(
|
|
14
|
+
new Request('http://localhost/mcp/cli', {
|
|
15
|
+
method: 'POST',
|
|
16
|
+
headers: {
|
|
17
|
+
accept: 'application/json',
|
|
18
|
+
'content-type': 'application/json',
|
|
19
|
+
},
|
|
20
|
+
body: JSON.stringify({
|
|
21
|
+
jsonrpc: '2.0',
|
|
22
|
+
id: 1,
|
|
23
|
+
method,
|
|
24
|
+
params,
|
|
25
|
+
}),
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
async function initialize() {
|
|
31
|
+
const response = await mcpRequest('initialize', {
|
|
32
|
+
protocolVersion: '2024-11-05',
|
|
33
|
+
capabilities: {},
|
|
34
|
+
clientInfo: { name: 'cli-mcp-test', version: '1.0.0' },
|
|
35
|
+
});
|
|
36
|
+
expect(response.status).toBe(200);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
describe('cli MCP handler', () => {
|
|
40
|
+
it('exposes onboarding resources, prompts, and tools', async () => {
|
|
41
|
+
await initialize();
|
|
42
|
+
|
|
43
|
+
const toolsResponse = await mcpRequest('tools/list');
|
|
44
|
+
const toolsBody = await toolsResponse.json();
|
|
45
|
+
const toolNames = toolsBody.result.tools.map(
|
|
46
|
+
(tool: { name: string }) => tool.name
|
|
47
|
+
);
|
|
48
|
+
expect(toolNames).toContain('cli_suggestCommand-v1_0_0');
|
|
49
|
+
expect(toolNames).toContain('onboarding_suggestTracks-v1_0_0');
|
|
50
|
+
expect(toolNames).toContain('onboarding_renderArtifacts-v1_0_0');
|
|
51
|
+
expect(toolNames).toContain('onboarding_nextCommand-v1_0_0');
|
|
52
|
+
|
|
53
|
+
const promptsResponse = await mcpRequest('prompts/list');
|
|
54
|
+
const promptsBody = await promptsResponse.json();
|
|
55
|
+
const promptNames = promptsBody.result.prompts.map(
|
|
56
|
+
(prompt: { name: string }) => prompt.name
|
|
57
|
+
);
|
|
58
|
+
expect(promptNames).toContain('cli_usage');
|
|
59
|
+
expect(promptNames).toContain('cli_onboarding');
|
|
60
|
+
|
|
61
|
+
const resourcesResponse = await mcpRequest('resources/list');
|
|
62
|
+
const resourcesBody = await resourcesResponse.json();
|
|
63
|
+
const resourceUris = (resourcesBody.result.resources ?? []).map(
|
|
64
|
+
(resource: { uri?: string; uriTemplate?: string }) =>
|
|
65
|
+
resource.uriTemplate ?? resource.uri
|
|
66
|
+
);
|
|
67
|
+
expect(resourceUris).toContain('cli://commands');
|
|
68
|
+
expect(resourceUris).toContain('onboarding://tracks');
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('renders onboarding artifacts and next-command guidance', async () => {
|
|
72
|
+
await initialize();
|
|
73
|
+
|
|
74
|
+
const artifactResponse = await mcpRequest('tools/call', {
|
|
75
|
+
name: 'onboarding_renderArtifacts-v1_0_0',
|
|
76
|
+
arguments: {
|
|
77
|
+
artifact: 'human-guide',
|
|
78
|
+
tracks: 'knowledge',
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
const artifactBody = await artifactResponse.json();
|
|
82
|
+
const artifactResult = JSON.parse(artifactBody.result.content[0].text);
|
|
83
|
+
expect(artifactResult.primaryTrack).toBe('knowledge');
|
|
84
|
+
expect(artifactResult.content).toContain('ContractSpec Repo Onboarding');
|
|
85
|
+
|
|
86
|
+
const nextCommandResponse = await mcpRequest('tools/call', {
|
|
87
|
+
name: 'onboarding_nextCommand-v1_0_0',
|
|
88
|
+
arguments: {
|
|
89
|
+
tracks: 'ai-agents',
|
|
90
|
+
},
|
|
91
|
+
});
|
|
92
|
+
const nextCommandBody = await nextCommandResponse.json();
|
|
93
|
+
const nextCommandResult = JSON.parse(
|
|
94
|
+
nextCommandBody.result.content[0].text
|
|
95
|
+
);
|
|
96
|
+
expect(nextCommandResult.primaryTrack).toBe('ai-agents');
|
|
97
|
+
expect(nextCommandResult.nextCommand).toContain('contractspec onboard');
|
|
98
|
+
});
|
|
99
|
+
});
|
|
@@ -12,6 +12,11 @@ import { defineSchemaModel, ScalarTypeEnum } from '@contractspec/lib.schema';
|
|
|
12
12
|
import path from 'path';
|
|
13
13
|
import z from 'zod';
|
|
14
14
|
import { appLogger } from '../../infrastructure/elysia/logger';
|
|
15
|
+
import {
|
|
16
|
+
registerCliOnboardingOps,
|
|
17
|
+
registerCliOnboardingPrompts,
|
|
18
|
+
registerCliOnboardingResources,
|
|
19
|
+
} from './cliMcp.onboarding';
|
|
15
20
|
import { createMcpElysiaHandler } from './common';
|
|
16
21
|
|
|
17
22
|
const CLI_DOC_PATHS = {
|
|
@@ -22,11 +27,11 @@ const CLI_DOC_PATHS = {
|
|
|
22
27
|
|
|
23
28
|
const CLI_DOC_FALLBACK = {
|
|
24
29
|
quickstart:
|
|
25
|
-
'# ContractSpec CLI quickstart\n\ncontractspec
|
|
30
|
+
'# ContractSpec CLI quickstart\n\ncontractspec quickstart\ncontractspec onboard\ncontractspec validate',
|
|
26
31
|
reference:
|
|
27
|
-
'# ContractSpec CLI reference\n\nKey commands: create,
|
|
32
|
+
'# ContractSpec CLI reference\n\nKey commands: onboard, create, generate, validate. See README for full options.',
|
|
28
33
|
readme:
|
|
29
|
-
'# ContractSpec CLI\n\nStabilize AI-generated code across API, DB, UI, events. Use create/
|
|
34
|
+
'# ContractSpec CLI\n\nStabilize AI-generated code across API, DB, UI, events. Use onboard/create/generate/validate commands.',
|
|
30
35
|
};
|
|
31
36
|
|
|
32
37
|
const CLI_DOC_TAGS = ['cli', 'mcp'];
|
|
@@ -108,6 +113,12 @@ function buildCliResources() {
|
|
|
108
113
|
input: z.object({}),
|
|
109
114
|
resolve: async () => {
|
|
110
115
|
const commands = [
|
|
116
|
+
{
|
|
117
|
+
command: 'contractspec onboard',
|
|
118
|
+
summary:
|
|
119
|
+
'Generate repo-local AGENTS.md and USAGE.md guidance plus recommended tracks.',
|
|
120
|
+
doc: 'cli://doc/quickstart',
|
|
121
|
+
},
|
|
111
122
|
{
|
|
112
123
|
command: 'contractspec create',
|
|
113
124
|
summary: 'Interactive wizard to author specs (with optional AI).',
|
|
@@ -136,6 +147,7 @@ function buildCliResources() {
|
|
|
136
147
|
})
|
|
137
148
|
);
|
|
138
149
|
|
|
150
|
+
registerCliOnboardingResources(resources);
|
|
139
151
|
return resources;
|
|
140
152
|
}
|
|
141
153
|
|
|
@@ -178,6 +190,7 @@ function buildCliPrompts() {
|
|
|
178
190
|
})
|
|
179
191
|
);
|
|
180
192
|
|
|
193
|
+
registerCliOnboardingPrompts(prompts);
|
|
181
194
|
return prompts;
|
|
182
195
|
}
|
|
183
196
|
|
|
@@ -224,6 +237,19 @@ function buildCliOps() {
|
|
|
224
237
|
installOp(registry, suggestSpec, async ({ goal, prefersAi }) => {
|
|
225
238
|
const lower = goal.toLowerCase();
|
|
226
239
|
|
|
240
|
+
if (
|
|
241
|
+
lower.includes('onboard') ||
|
|
242
|
+
lower.includes('start') ||
|
|
243
|
+
lower.includes('guide') ||
|
|
244
|
+
lower.includes('install')
|
|
245
|
+
) {
|
|
246
|
+
return {
|
|
247
|
+
command: 'contractspec onboard',
|
|
248
|
+
docUri: 'cli://doc/quickstart',
|
|
249
|
+
reason: 'Starts the CLI-first onboarding flow for the current repo.',
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
|
|
227
253
|
if (lower.includes('create') || lower.includes('new')) {
|
|
228
254
|
return {
|
|
229
255
|
command: prefersAi ? 'contractspec create --ai' : 'contractspec create',
|
|
@@ -258,6 +284,7 @@ function buildCliOps() {
|
|
|
258
284
|
};
|
|
259
285
|
});
|
|
260
286
|
|
|
287
|
+
registerCliOnboardingOps(registry);
|
|
261
288
|
return registry;
|
|
262
289
|
}
|
|
263
290
|
|