Skip to content

Commit 4372841

Browse files
authored
v0.5.60: invitation flow improvements, chat fixes, a2a improvements, additional copilot actions
2 parents 5e8c843 + 929d0d0 commit 4372841

File tree

304 files changed

+38642
-5515
lines changed

Some content is hidden

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

304 files changed

+38642
-5515
lines changed

.claude/commands/add-block.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -351,14 +351,16 @@ Enables AI-assisted field generation.
351351

352352
## Tools Configuration
353353

354-
### Simple Tool Selector
354+
**Preferred:** Use tool names directly as dropdown option IDs to avoid switch cases:
355355
```typescript
356-
tools: {
357-
access: ['service_create', 'service_read', 'service_update'],
358-
config: {
359-
tool: (params) => `service_${params.operation}`,
360-
},
361-
}
356+
// Dropdown options use tool IDs directly
357+
options: [
358+
{ label: 'Create', id: 'service_create' },
359+
{ label: 'Read', id: 'service_read' },
360+
]
361+
362+
// Tool selector just returns the operation value
363+
tool: (params) => params.operation,
362364
```
363365

364366
### With Parameter Transformation
@@ -577,6 +579,17 @@ export const ServiceBlock: BlockConfig = {
577579

578580
See the `/add-trigger` skill for creating triggers.
579581

582+
## Icon Requirement
583+
584+
If the icon doesn't already exist in `@/components/icons.tsx`, **do NOT search for it yourself**. After completing the block, ask the user to provide the SVG:
585+
586+
```
587+
The block is complete, but I need an icon for {Service}.
588+
Please provide the SVG and I'll convert it to a React component.
589+
590+
You can usually find this in the service's brand/press kit page, or copy it from their website.
591+
```
592+
580593
## Checklist Before Finishing
581594

582595
- [ ] All subBlocks have `id`, `title` (except switch), and `type`
@@ -588,4 +601,5 @@ See the `/add-trigger` skill for creating triggers.
588601
- [ ] Tools.config.tool returns correct tool ID
589602
- [ ] Outputs match tool outputs
590603
- [ ] Block registered in registry.ts
604+
- [ ] If icon missing: asked user to provide SVG
591605
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread

.claude/commands/add-integration.md

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,26 @@ export function {Service}Icon(props: SVGProps<SVGSVGElement>) {
226226
fill="none"
227227
xmlns="http://www.w3.org/2000/svg"
228228
>
229-
{/* SVG paths from brand assets */}
229+
{/* SVG paths from user-provided SVG */}
230230
</svg>
231231
)
232232
}
233233
```
234234

235-
### Finding Icons
236-
1. Check the service's brand/press kit page
237-
2. Download SVG logo
238-
3. Convert to React component
239-
4. Ensure it accepts and spreads props
235+
### Getting Icons
236+
**Do NOT search for icons yourself.** At the end of implementation, ask the user to provide the SVG:
237+
238+
```
239+
I've completed the integration. Before I can add the icon, please provide the SVG for {Service}.
240+
You can usually find this in the service's brand/press kit page, or copy it from their website.
241+
242+
Paste the SVG code here and I'll convert it to a React component.
243+
```
244+
245+
Once the user provides the SVG:
246+
1. Extract the SVG paths/content
247+
2. Create a React component that spreads props
248+
3. Ensure viewBox is preserved from the original SVG
240249

241250
## Step 5: Create Triggers (Optional)
242251

@@ -405,6 +414,7 @@ If creating V2 versions (API-aligned outputs):
405414
- [ ] If triggers: spread trigger subBlocks with `getTrigger()`
406415

407416
### Icon
417+
- [ ] Asked user to provide SVG
408418
- [ ] Added icon to `components/icons.tsx`
409419
- [ ] Icon spreads props correctly
410420

@@ -433,11 +443,18 @@ You: I'll add the Stripe integration. Let me:
433443
1. First, research the Stripe API using Context7
434444
2. Create the tools for key operations (payments, subscriptions, etc.)
435445
3. Create the block with operation dropdown
436-
4. Add the Stripe icon
437-
5. Register everything
438-
6. Generate docs
446+
4. Register everything
447+
5. Generate docs
448+
6. Ask you for the Stripe icon SVG
439449
440450
[Proceed with implementation...]
451+
452+
[After completing steps 1-5...]
453+
454+
I've completed the Stripe integration. Before I can add the icon, please provide the SVG for Stripe.
455+
You can usually find this in the service's brand/press kit page, or copy it from their website.
456+
457+
Paste the SVG code here and I'll convert it to a React component.
441458
```
442459

443460
## Common Gotchas

.claude/commands/add-trigger.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,53 @@ All fields automatically have:
552552
- `mode: 'trigger'` - Only shown in trigger mode
553553
- `condition: { field: 'selectedTriggerId', value: triggerId }` - Only shown when this trigger is selected
554554

555+
## Trigger Outputs & Webhook Input Formatting
556+
557+
### Important: Two Sources of Truth
558+
559+
There are two related but separate concerns:
560+
561+
1. **Trigger `outputs`** - Schema/contract defining what fields SHOULD be available. Used by UI for tag dropdown.
562+
2. **`formatWebhookInput`** - Implementation that transforms raw webhook payload into actual data. Located in `apps/sim/lib/webhooks/utils.server.ts`.
563+
564+
**These MUST be aligned.** The fields returned by `formatWebhookInput` should match what's defined in trigger `outputs`. If they differ:
565+
- Tag dropdown shows fields that don't exist (broken variable resolution)
566+
- Or actual data has fields not shown in dropdown (users can't discover them)
567+
568+
### When to Add a formatWebhookInput Handler
569+
570+
- **Simple providers**: If the raw webhook payload structure already matches your outputs, you don't need a handler. The generic fallback returns `body` directly.
571+
- **Complex providers**: If you need to transform, flatten, extract nested data, compute fields, or handle conditional logic, add a handler.
572+
573+
### Adding a Handler
574+
575+
In `apps/sim/lib/webhooks/utils.server.ts`, add a handler block:
576+
577+
```typescript
578+
if (foundWebhook.provider === '{service}') {
579+
// Transform raw webhook body to match trigger outputs
580+
return {
581+
eventType: body.type,
582+
resourceId: body.data?.id || '',
583+
timestamp: body.created_at,
584+
resource: body.data,
585+
}
586+
}
587+
```
588+
589+
**Key rules:**
590+
- Return fields that match your trigger `outputs` definition exactly
591+
- No wrapper objects like `webhook: { data: ... }` or `{service}: { ... }`
592+
- No duplication (don't spread body AND add individual fields)
593+
- Use `null` for missing optional data, not empty objects with empty strings
594+
595+
### Verify Alignment
596+
597+
Run the alignment checker:
598+
```bash
599+
bunx scripts/check-trigger-alignment.ts {service}
600+
```
601+
555602
## Trigger Outputs
556603

557604
Trigger outputs use the same schema as block outputs (NOT tool outputs).
@@ -649,6 +696,11 @@ export const {service}WebhookTrigger: TriggerConfig = {
649696
- [ ] Added `delete{Service}Webhook` function to `provider-subscriptions.ts`
650697
- [ ] Added provider to `cleanupExternalWebhook` function
651698
699+
### Webhook Input Formatting
700+
- [ ] Added handler in `apps/sim/lib/webhooks/utils.server.ts` (if custom formatting needed)
701+
- [ ] Handler returns fields matching trigger `outputs` exactly
702+
- [ ] Run `bunx scripts/check-trigger-alignment.ts {service}` to verify alignment
703+
652704
### Testing
653705
- [ ] Run `bun run type-check` to verify no TypeScript errors
654706
- [ ] Restart dev server to pick up new triggers

.github/workflows/i18n.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
name: 'Auto-translate Documentation'
22

33
on:
4-
push:
5-
branches: [ staging ]
6-
paths:
7-
- 'apps/docs/content/docs/en/**'
8-
- 'apps/docs/i18n.json'
4+
schedule:
5+
# Run every Sunday at midnight UTC
6+
- cron: '0 0 * * 0'
7+
workflow_dispatch: # Allow manual triggers
98

109
permissions:
1110
contents: write
@@ -20,6 +19,7 @@ jobs:
2019
- name: Checkout repository
2120
uses: actions/checkout@v4
2221
with:
22+
ref: staging
2323
token: ${{ secrets.GH_PAT }}
2424
fetch-depth: 0
2525

@@ -68,12 +68,11 @@ jobs:
6868
title: "feat(i18n): update translations"
6969
body: |
7070
## Summary
71-
Automated translation updates triggered by changes to documentation.
72-
73-
This PR was automatically created after content changes were made, updating translations for all supported languages using Lingo.dev AI translation engine.
74-
75-
**Original trigger**: ${{ github.event.head_commit.message }}
76-
**Commit**: ${{ github.sha }}
71+
Automated weekly translation updates for documentation.
72+
73+
This PR was automatically created by the scheduled weekly i18n workflow, updating translations for all supported languages using Lingo.dev AI translation engine.
74+
75+
**Triggered**: Weekly scheduled run
7776
**Workflow**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
7877
7978
## Type of Change
@@ -107,7 +106,7 @@ jobs:
107106
## Screenshots/Videos
108107
<!-- Translation changes are text-based - no visual changes expected -->
109108
<!-- Reviewers should check the documentation site renders correctly for all languages -->
110-
branch: auto-translate/staging-merge-${{ github.run_id }}
109+
branch: auto-translate/weekly-${{ github.run_id }}
111110
base: staging
112111
labels: |
113112
i18n
@@ -145,6 +144,8 @@ jobs:
145144
bun install --frozen-lockfile
146145
147146
- name: Build documentation to verify translations
147+
env:
148+
DATABASE_URL: postgresql://dummy:dummy@localhost:5432/dummy
148149
run: |
149150
cd apps/docs
150151
bun run build
@@ -153,7 +154,7 @@ jobs:
153154
run: |
154155
cd apps/docs
155156
echo "## Translation Status Report" >> $GITHUB_STEP_SUMMARY
156-
echo "**Triggered by merge to staging branch**" >> $GITHUB_STEP_SUMMARY
157+
echo "**Weekly scheduled translation run**" >> $GITHUB_STEP_SUMMARY
157158
echo "" >> $GITHUB_STEP_SUMMARY
158159
159160
en_count=$(find content/docs/en -name "*.mdx" | wc -l)

0 commit comments

Comments
 (0)