Loading...
Loading...
Run the full Stitch SDK generation pipeline. Use when a new tool is added, or the SDK needs to be regenerated end-to-end.
npx skill4agent add google-labs-code/stitch-sdk stitch-sdk-pipeline[!IMPORTANT] Stage 2 is the only step requiring agent intelligence. All other stages are deterministic scripts. For Stage 2, use theskill.stitch-sdk-domain-design
STITCH_API_KEYbunstitch-sdk/// turbo
npm run capturetools/listpackages/sdk/generated/tools-manifest.jsonstitch-sdk.lockpackages/sdk/generated/tools-manifest.jsoninputSchemaoutputSchematools-manifest.jsonstitch-sdk-domain-designtools-manifest.jsonpackages/sdk/generated/domain-map.jsontools-manifest.jsonscripts/ir-schema.tspackages/sdk/generated/domain-map.jsondomain-map.jsonir-schema.tsgenerate-sdk.ts// turbo
npm run generateoutputSchemapackages/sdk/generated/src/packages/sdk/generated/src/*.tsstitch-sdk.lockdomain-map.json// turbo
npm run buildpackages/sdk/packages/sdk/dist/// turbo
npm run testcallTool// turbo
npm run test:scriptsbun:testnpm run test:e2eSTITCH_API_KEYGEMINI_API_KEYlive.test.tsai-sdk-e2e.test.tsstitchTools().stitch/preview/// turbo
npm run validate:generatedstitch-sdk.lock[!IMPORTANT] Always run after Stage 3 (Generate). If you run Capture (Stage 1) then Validate without re-generating, the hashes will mismatch because the manifest hash changed.
packages/sdk/src/index.tspackages/sdk/generated/src/packages/sdk/src/spec/errors.tspackages/sdk/src/spec/client.tsstitch-sdk-usagestitch-sdk-readmestitchTools()toolDefinitionsstitch-sdk-developmentstitch-sdk-domain-designstitch-sdk-pipelinered-green-yellowindex.tsStitchConfigSchemaStitchErrorCodepackages/sdk/src/client.tspackages/sdk/src/proxy/npm run pipeline| Scenario | Start from |
|---|---|
| New tool added to MCP server | Stage 1 |
| Need to change how a tool maps to a method | Stage 2 |
Changed | Stage 3 |
Changed code in | Stage 4 |
| Just want to verify everything works | Stage 5 |
| Changed AI SDK tools adapter or tool definitions | Stage 5 |
| Public API surface changed | Stage 9 |
| File | Location | Role |
|---|---|---|
| | Raw MCP tool schemas (Stage 1 output) |
| | IR: tool → class → method mappings (Stage 2 output) |
| | Generated JSON Schema tool definitions for AI SDK |
| | |
| | Zod schema defining valid IR structure |
| | TypeScript types for JSON Schema |
| | ts-morph codegen (Stage 3) |
| | Integrity hashes for drift detection |
| | Stitch HTML parser (Tailwind config + font extraction) |
| | SWC AST validator for generated React components |