Skip to content

Commit a28f8c1

Browse files
committed
Merge origin/staging into improvement/emcn-chrome-consolidation
Reconciles staging's props-driven ChipModalFooter/ChipConfirmModal refactor (#4905) with this branch's chip-chrome consolidation: - chip-modal internals render Cancel/dismiss as bare default chips ('filled' is no longer a public Chip variant); footer action variant unions narrowed to 'primary' | 'destructive' - consumers take staging's footer/header/ChipConfirmModal structure plus this branch's ChipModalField bodies and chrome - staging features kept intact: stable column ids (#4898), async CSV imports (#4927), mothership v0.2 file-viewer refactor (#4923), toast redesign (#4909), suggested skills (#4912) - integration-skills-section 'Added' chip changed to the bare default variant to satisfy the new Chip API
2 parents 0cf5314 + 209501e commit a28f8c1

1,062 files changed

Lines changed: 100899 additions & 16120 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/add-block/SKILL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,14 @@ export const {Service}BlockMeta = {
651651
alsoIntegrations: ['slack'], // Other blocks referenced in the prompt (optional)
652652
},
653653
],
654+
skills: [ // Optional but strongly encouraged
655+
{
656+
name: 'summarize-thread', // kebab-case, becomes the created skill's name
657+
description: 'One line: what it does and when to use it.',
658+
content:
659+
'# Summarize Thread\n\n...\n\n## Steps\n1. ...\n\n## Output\n...', // markdown
660+
},
661+
],
654662
} as const satisfies BlockMeta
655663
```
656664

@@ -665,6 +673,16 @@ export const {Service}BlockMeta = {
665673
- **`alsoIntegrations`** names other block types (e.g. `'slack'`, `'linear'`) referenced in the template prompt — helps the catalog surface this template when those blocks are selected
666674
- Place the export **after** the main `{Service}Block` export, at the very bottom of the file
667675

676+
#### `skills` — curated, ready-to-add agent skills
677+
678+
`skills` is an optional array of `SuggestedSkill` (`{ name, description, content }`) shown on the integration's detail page; users click **Add** to create the skill in their workspace. Aim for 3–5 skills for mainstream services, 2–3 for niche/low-level ones.
679+
680+
- **`name`** — kebab-case, lowercase letters/numbers/hyphens, ≤ 64 chars, unique within the integration, verb-led (e.g. `summarize-thread`).
681+
- **`description`** — one line, ≤ 1024 chars: what it does and when to use it.
682+
- **`content`** — markdown instructions for the agent (literal `\n` for newlines): a `# Title`, then `## Steps` and an output/guidance section. Keep ~600–2000 chars.
683+
- **Ground every skill in operations the block actually exposes.** Cross-check each skill's steps against the block's `tools.access` list — never describe an action the integration cannot perform (e.g. "receive messages" when the block only sends).
684+
- **Skills MUST be derived from real, popular use cases found online — never invented.** Before adding a skill, web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles). If you cannot source a use case as something people genuinely do with the service, do not add it. Do not hallucinate skills.
685+
668686
### Register in the blocksMeta object
669687

670688
After adding `{Service}BlockMeta` to the block file, register it in `apps/sim/blocks/registry.ts`:
@@ -888,6 +906,7 @@ All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MU
888906
- [ ] Outputs match tool outputs
889907
- [ ] Block registered in `registry.ts` blocks object (alphabetically)
890908
- [ ] `{Service}BlockMeta` exported at bottom of block file with `tags` and `templates`
909+
- [ ] `skills` added to `{Service}BlockMeta`, each grounded in the block's `tools.access` and derived from a real online-sourced use case (not invented)
891910
- [ ] `BlockMeta` imported from `@/blocks/types` alongside `BlockConfig`
892911
- [ ] Block meta registered in `registry.ts` blocksMeta object (alphabetically)
893912
- [ ] If icon missing: asked user to provide SVG

.agents/skills/validate-integration/SKILL.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,12 @@ For **each tool** in `tools.access`:
207207
- [ ] `authMode` is set correctly (`AuthMode.OAuth` or `AuthMode.ApiKey`)
208208
- [ ] Block is registered in `blocks/registry.ts` alphabetically
209209

210+
### BlockMeta Skills (catalog)
211+
- [ ] `{Service}BlockMeta.skills` is present (3–5 for mainstream services, 2–3 for niche/low-level)
212+
- [ ] **Every skill is grounded** — its steps only use operations the block exposes in `tools.access`; flag any skill that implies an unsupported action (e.g. "receive messages" when the block only sends)
213+
- [ ] **Every skill is real, not hallucinated** — web-search the service and confirm each skill maps to a popular use case attested online (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles). Rewrite or remove any skill you cannot source as something people genuinely do with the service.
214+
- [ ] Each skill has a kebab-case `name` (≤64 chars, unique), a one-line `description`, and markdown `content` with `# Title` + `## Steps` + an output/guidance section
215+
210216
### Block Inputs
211217
- [ ] `inputs` section lists all subBlock params that the block accepts
212218
- [ ] Input types match the subBlock types

.claude/commands/add-block.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,11 +807,25 @@ export const {Service}BlockMeta = {
807807
},
808808
// ... at least 6 more
809809
],
810+
skills: [ // SuggestedSkill[] — 3–5 mainstream, 2–3 niche
811+
{
812+
name: 'summarize-thread', // kebab-case, ≤64 chars, unique, verb-led
813+
description: 'One line: what it does and when to use it.', // ≤1024 chars
814+
content:
815+
'# Summarize Thread\n\n...\n\n## Steps\n1. ...\n\n## Output\n...', // markdown
816+
},
817+
// ... more
818+
],
810819
} as const satisfies BlockMeta
811820
```
812821

813822
Derive templates from the service's real use cases. Each prompt should name a concrete trigger, transformation, and output — not a generic description of what the service does.
814823

824+
`skills` are curated, ready-to-add agent skills shown on the integration's detail page (users click **Add** to create them in their workspace). Two hard rules:
825+
826+
- **Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
827+
- **Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
828+
815829
## Checklist Before Finishing
816830

817831
- [ ] `integrationType` is set to the correct `IntegrationType` enum value
@@ -831,6 +845,7 @@ Derive templates from the service's real use cases. Each prompt should name a co
831845
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`
832846
- [ ] Timestamps and complex inputs have `wandConfig` enabled
833847
- [ ] Exported `{Service}BlockMeta` with at least 7 templates
848+
- [ ] `skills` added to `{Service}BlockMeta`, each grounded in `tools.access` and sourced from a real online use case (not invented)
834849

835850
## Final Validation (Required)
836851

.claude/commands/validate-integration.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ For **each tool** in `tools.access`:
197197
- [ ] Has at least 7 templates, each with `icon`, `title`, `prompt`, `modules`, `category`, and `tags`
198198
- [ ] Prompts describe concrete use cases, not generic descriptions of what the service does
199199
- [ ] `alsoIntegrations` is set on any template whose prompt references another service
200+
- [ ] `skills` present (3–5 mainstream, 2–3 niche), each grounded in `tools.access` — flag any skill implying an unsupported action
201+
- [ ] **Each skill is real, not hallucinated** — web-search and confirm it maps to a popular use case attested online (vendor use-case pages, official docs describing the workflow, reputable "top automations" articles); rewrite/remove any you cannot source
200202

201203
### Block Inputs
202204
- [ ] `inputs` section lists all subBlock params that the block accepts

.cursor/commands/add-block.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,47 @@ Use `wandConfig` for fields that are hard to fill out manually, such as timestam
793793

794794
All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MUST use `snake_case` (e.g., `x_create_tweet`, `slack_send_message`). Never use camelCase or PascalCase.
795795

796+
## BlockMeta (Required)
797+
798+
Every block file must export a `{Service}BlockMeta` alongside the block — **minimum 7 templates**. Look at existing examples in `apps/sim/blocks/blocks/` (e.g. `browser_use.ts`, `google_sheets.ts`) for the pattern.
799+
800+
```typescript
801+
import type { BlockMeta } from '@/blocks/types'
802+
803+
export const {Service}BlockMeta = {
804+
tags: ['tag1', 'tag2'], // IntegrationTag[]
805+
templates: [
806+
{
807+
icon: {Service}Icon,
808+
title: '{Service} <use-case>', // 2–5 words
809+
prompt: 'Build a workflow that...', // specific use case, 1–3 sentences
810+
modules: ['agent', 'workflows'], // 'agent' | 'workflows' | 'tables' | 'files' | 'scheduled' | 'knowledge-base'
811+
category: 'operations', // 'operations' | 'marketing' | 'sales' | 'engineering' | 'productivity' | 'support' | 'popular'
812+
tags: ['automation'],
813+
alsoIntegrations: ['slack'], // optional — other block IDs referenced in the prompt
814+
featured: true, // optional
815+
},
816+
// ... at least 6 more
817+
],
818+
skills: [ // SuggestedSkill[] — 3–5 mainstream, 2–3 niche
819+
{
820+
name: 'summarize-thread', // kebab-case, ≤64 chars, unique, verb-led
821+
description: 'One line: what it does and when to use it.', // ≤1024 chars
822+
content:
823+
'# Summarize Thread\n\n...\n\n## Steps\n1. ...\n\n## Output\n...', // markdown
824+
},
825+
// ... more
826+
],
827+
} as const satisfies BlockMeta
828+
```
829+
830+
Derive templates from the service's real use cases. Each prompt should name a concrete trigger, transformation, and output — not a generic description of what the service does.
831+
832+
`skills` are curated, ready-to-add agent skills shown on the integration's detail page (users click **Add** to create them in their workspace). Two hard rules:
833+
834+
- **Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
835+
- **Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
836+
796837
## Checklist Before Finishing
797838

798839
- [ ] `integrationType` is set to the correct `IntegrationType` enum value
@@ -811,6 +852,8 @@ All tool IDs referenced in `tools.access` and returned by `tools.config.tool` MU
811852
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread
812853
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`
813854
- [ ] Timestamps and complex inputs have `wandConfig` enabled
855+
- [ ] Exported `{Service}BlockMeta` with at least 7 templates
856+
- [ ] `skills` added to `{Service}BlockMeta`, each grounded in `tools.access` and sourced from a real online use case (not invented)
814857

815858
## Final Validation (Required)
816859

.cursor/commands/validate-integration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ For **each tool** in `tools.access`:
187187
- [ ] `authMode` is set correctly (`AuthMode.OAuth` or `AuthMode.ApiKey`)
188188
- [ ] Block is registered in `blocks/registry.ts` alphabetically
189189

190+
### BlockMeta
191+
- [ ] `{Service}BlockMeta` is exported in the same file as the block
192+
- [ ] Has at least 7 templates, each with `icon`, `title`, `prompt`, `modules`, `category`, and `tags`
193+
- [ ] Prompts describe concrete use cases, not generic descriptions of what the service does
194+
- [ ] `alsoIntegrations` is set on any template whose prompt references another service
195+
- [ ] `skills` present (3–5 mainstream, 2–3 niche), each grounded in `tools.access` — flag any skill implying an unsupported action
196+
- [ ] **Each skill is real, not hallucinated** — web-search and confirm it maps to a popular use case attested online (vendor use-case pages, official docs describing the workflow, reputable "top automations" articles); rewrite/remove any you cannot source
197+
190198
### Block Inputs
191199
- [ ] `inputs` section lists all subBlock params that the block accepts
192200
- [ ] Input types match the subBlock types

.github/CODEOWNERS

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
# Client-side stream consumption, hydration, and reconnect.
2525
/apps/sim/app/workspace/*/home/hooks/index.ts @simstudioai/mothership
2626
/apps/sim/app/workspace/*/home/hooks/use-chat.ts @simstudioai/mothership
27-
/apps/sim/app/workspace/*/home/hooks/use-file-preview-sessions.ts @simstudioai/mothership
27+
/apps/sim/app/workspace/*/home/hooks/preview/ @simstudioai/mothership
28+
/apps/sim/app/workspace/*/home/hooks/stream/ @simstudioai/mothership
2829
/apps/sim/hooks/queries/tasks.ts @simstudioai/mothership

.github/workflows/migrations.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,15 @@ jobs:
3535
- name: Install dependencies
3636
run: bun install --frozen-lockfile
3737

38-
- name: Apply migrations
38+
- name: Apply database schema changes
3939
working-directory: ./packages/db
4040
env:
4141
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || github.ref == 'refs/heads/dev' && secrets.DEV_DATABASE_URL || secrets.STAGING_DATABASE_URL }}
42-
run: bun run ./scripts/migrate.ts
42+
run: |
43+
if [ "${{ github.ref }}" = "refs/heads/dev" ]; then
44+
echo "Dev environment detected — pushing schema with drizzle-kit (db:push)"
45+
bun run db:push --force
46+
else
47+
echo "Applying versioned migrations (db:migrate)"
48+
bun run ./scripts/migrate.ts
49+
fi

0 commit comments

Comments
 (0)