Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
6e5a6b5
feat: Implement Project.uploadImage for direct REST upload
davideast Apr 8, 2026
c547219
feat: implement design system tools and refactor inferTheme to use rules
davideast Apr 8, 2026
9385b5d
feat: use existing resources in bug bash and fix ENAMETOOLONG in asse…
davideast Apr 8, 2026
14c538c
fix(sdk): resolve test mock data leak and remove deprecated fleet wor…
davideast Apr 8, 2026
21c1317
feat: implement secure DownloadAssetsHandler and fix TypeScript errors
davideast Apr 8, 2026
db4ea31
chore: remove unwanted image fixture from tracking
davideast Apr 8, 2026
955097d
feat: expose fileMode, tempDir, assetsSubdir options in DownloadAsset…
davideast Apr 8, 2026
72100a3
fix: use z.input for DownloadAssetsInput to allow optional defaults i…
davideast Apr 8, 2026
82049f7
fix: resolve CI tsc error and CodeQL network-data-written-to-file alert
davideast Apr 8, 2026
db3d47e
fix: add domhandler@5.0.3 as devDep so tsc can resolve import type in CI
davideast Apr 8, 2026
8ecb98b
test(sdk): fix fetch mock type error in client tests
davideast Apr 17, 2026
6b0bae3
feat(sdk): enhance proxy, virtual tools, and download handler
davideast Apr 17, 2026
ad3c493
feat: add exploratory REST support for projects and sessions in SDK
davideast Apr 22, 2026
68d8c30
feat: enrich downloadAssets trace results and decouple contracts
davideast Apr 22, 2026
d5525d9
fix: align design system test mock with handler's theme.designMd data…
davideast Apr 22, 2026
6cfaf89
refactor: remove inferTheme, syncTheme, themePrompt, createSessionRES…
davideast Apr 22, 2026
7617179
chore: clean virtual tool exports, update PR documentation
davideast Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .agents/skills/stitch-sdk-usage/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,38 @@ const screens = await ds.apply([
]);
```

## Uploading Images

Upload an existing image file (PNG, JPG, JPEG, WEBP) to create a screen directly from a mockup or asset.

```typescript
import { stitch } from '@google/stitch-sdk';

const project = stitch.project("your-project-id");

// Upload a local image file
const [screen] = await project.uploadImage('./mockup.png', {
title: 'Home Screen',
});

console.log(screen.id);
const html = await screen.getHtml();
const imageUrl = await screen.getImage();
```

The method reads the file from disk and posts it directly to the Stitch REST API — no output token constraints apply (unlike agent-driven MCP calls).

**Supported formats:** `.png`, `.jpg`, `.jpeg`, `.webp`

**Options:**
| Option | Type | Default | Description |
|---|---|---|---|
| `title` | `string` | — | Display title for the created screen |
| `createScreenInstances` | `boolean` | `true` | Whether to add the screen to the canvas |

**Throws** `StitchError` with codes: `NOT_FOUND` (file not found), `UNKNOWN_ERROR` (unsupported format or upload failure), `AUTH_FAILED` (invalid API key).


## Generating and Iterating on Screens

```typescript
Expand Down Expand Up @@ -150,12 +182,15 @@ Error codes: `AUTH_FAILED`, `NOT_FOUND`, `PERMISSION_DENIED`, `RATE_LIMITED`, `N
| `generate(prompt, deviceType?)` | `Promise<Screen>` | Generate a screen from a text prompt |
| `screens()` | `Promise<Screen[]>` | List all screens in the project |
| `getScreen(screenId)` | `Promise<Screen>` | Retrieve a specific screen by ID |
| `uploadImage(filePath, opts?)` | `Promise<Screen[]>` | Upload an image file and create a screen from it |
| `createDesignSystem(designSystem)` | `Promise<DesignSystem>` | Create a design system for this project |
| `listDesignSystems()` | `Promise<DesignSystem[]>` | List all design systems |
| `designSystem(id)` | `DesignSystem` | Reference by ID (no API call) |

`deviceType`: `"MOBILE"` | `"DESKTOP"` | `"TABLET"` | `"AGNOSTIC"`

`uploadImage` supported formats: `.png` `.jpg` `.jpeg` `.webp`

### DesignSystem Class

| Method | Returns | Description |
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/fleet-analyze.yml

This file was deleted.

75 changes: 0 additions & 75 deletions .github/workflows/fleet-dispatch.yml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/fleet-label.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/fleet-merge.yml

This file was deleted.

37 changes: 0 additions & 37 deletions .github/workflows/jules-merge-conflicts.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ dist
*.log
gen
.stitch/
packages/sdk/test/temp_assets
*.tgz
PR.md
Loading
Loading