Skip to content

Commit e2fecc8

Browse files
authored
v0.7.28: rich markdown editor improvements, autosave in files, helm improvements
2 parents 067d3b0 + 2cfa040 commit e2fecc8

120 files changed

Lines changed: 6103 additions & 462 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.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
description: Gate a block's visibility — ship an unreleased block as a preview (hidden until revealed via AppConfig/env), reveal it to admins/orgs, GA it, or kill-switch a shipped block
3+
argument-hint: <block-type>
4+
---
5+
6+
# Add Block Preview Skill
7+
8+
You manage **block visibility gating** in Sim — hiding blocks from every discovery surface (toolbar, cmd+K search, copilot @-mentions, agent tool picker, mothership VFS/metadata/tools, Access Control list, public docs/catalog) while **never** gating execution of already-placed instances.
9+
10+
## The model
11+
12+
Three levers, evaluated in `apps/sim/lib/core/config/block-visibility.ts` and folded into the registry accessors (`apps/sim/blocks/registry.ts`):
13+
14+
1. **`preview: true`** on the `BlockConfig` (static, in code) — the block is default-hidden EVERYWHERE (hosted, self-hosted, dev, SSR) until revealed. Fail-closed.
15+
2. **The hosted `block-visibility` AppConfig document** — per-block rule keyed by the existing block type:
16+
17+
```jsonc
18+
{
19+
"<block-type>": {
20+
"enabled": false, // required. true = GA (visible to everyone)
21+
"orgIds": ["org_..."], // optional allowlist clauses (any match reveals)
22+
"userIds": ["user_..."],
23+
"adminEnabled": true // platform admins (user.role === 'admin')
24+
}
25+
}
26+
```
27+
28+
3. **`PREVIEW_BLOCKS` env** (comma-separated block types) — the off-AppConfig reveal path for self-hosters and local dev.
29+
30+
A revealed block that is not globally GA (`enabled !== true`, or env-revealed) renders with a **" (Preview)"** name suffix on discovery surfaces. `getBlock()` stays pure, so placed instances keep their canonical name and always execute.
31+
32+
## Lifecycle of a preview block
33+
34+
1. **Author** the block normally (`/add-block` etc.) and set `preview: true` on its `BlockConfig`. **Ship no `BlockMeta` and no docs until GA**`check-block-registry` deliberately skips preview blocks in meta coverage, and `generate-docs` skips them at every gate.
35+
2. **Local dev:** set `PREVIEW_BLOCKS=<block-type>` in your env to see it (with the suffix).
36+
3. **Merge/deploy.** The block's code is live everywhere but visible nowhere — no AppConfig rule exists and self-hosters have no env entry.
37+
4. **Hosted preview:** add a rule to the `block-visibility` AppConfig document and start a deployment (no code deploy):
38+
- Admins only: `{ "enabled": false, "adminEnabled": true }`
39+
- Design-partner org: `{ "enabled": false, "orgIds": ["org_123"] }`
40+
- GA via config (code cleanup pending): `{ "enabled": true }` — suffix disappears everywhere within ~30s (AppConfig TTL) + client refetch.
41+
42+
Same runbook as `feature-flags`: edit the hosted document, `aws appconfig start-deployment` with the `sim-<env>-fast` strategy (see the infra README).
43+
5. **GA cleanup:** delete `preview: true` from the block (now visible to self-hosters on their next upgrade), add its `BlockMeta` + regen docs, and drop the AppConfig entry. For a v2 upgrade, this is also when v1 gets `hideFromToolbar: true` (the superseded-version paradigm).
44+
45+
## Kill switch (shipped blocks)
46+
47+
To pull an already-GA block from discovery surfaces on hosted (incident, deprecation): add `{ "<block-type>": { "enabled": false } }` to the document. Allowlist clauses can carve out exceptions. **Execution is NOT stopped** — workflows already using the block keep running; the kill switch only prevents new placement/discovery.
48+
49+
## Invariants (do not violate)
50+
51+
- **Execution is never gated.** The executor, serializer, drop-naming, and `isBlockTypeAccessControlExempt` resolve via pure `getBlock`. Do not add visibility checks to execution paths.
52+
- **Clone-not-remove:** gated blocks stay in `getAllBlocks()` output as clones with `hideFromToolbar: true``.find`-by-type consumers rely on this. Never filter them out.
53+
- **Keys are registry block types.** Never `custom_block_*` (parse drops them — custom blocks have their own enabled/disabled lifecycle).
54+
- **The shared hidden-predicate is `isHiddenUnder`** (`apps/sim/blocks/visibility/context.ts`). Never restate the preview/disabled rule inline at a new consumer.
55+
- **Process-global caches stay ungated.** `getStaticComponentFiles` (VFS) and `getExposedIntegrationTools` build the ungated universe; per-viewer filtering happens at stamp/consumer time. Never move gating into a shared builder.
56+
- Gating is **surface hiding, not secrecy** — the full config ships in the client JS bundle. Anything truly secret cannot be a registered block.
57+
58+
## Tests
59+
60+
Evaluation semantics: `apps/sim/lib/core/config/block-visibility.test.ts`. Registry projection: `apps/sim/blocks/visibility/visibility.test.ts`. When gating behavior changes, extend those — mock `isPlatformAdmin` for the admin clause; use the local `withAppConfig` harness.
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
---
2+
description: Gate a block's visibility — ship an unreleased block as a preview (hidden until revealed via AppConfig/env), reveal it to admins/orgs, GA it, or kill-switch a shipped block
3+
argument-hint: <block-type>
4+
---
5+
6+
# Add Block Preview Skill
7+
8+
You manage **block visibility gating** in Sim — hiding blocks from every discovery surface (toolbar, cmd+K search, copilot @-mentions, agent tool picker, mothership VFS/metadata/tools, Access Control list, public docs/catalog) while **never** gating execution of already-placed instances.
9+
10+
## The model
11+
12+
Three levers, evaluated in `apps/sim/lib/core/config/block-visibility.ts` and folded into the registry accessors (`apps/sim/blocks/registry.ts`):
13+
14+
1. **`preview: true`** on the `BlockConfig` (static, in code) — the block is default-hidden EVERYWHERE (hosted, self-hosted, dev, SSR) until revealed. Fail-closed.
15+
2. **The hosted `block-visibility` AppConfig document** — per-block rule keyed by the existing block type:
16+
17+
```jsonc
18+
{
19+
"<block-type>": {
20+
"enabled": false, // required. true = GA (visible to everyone)
21+
"orgIds": ["org_..."], // optional allowlist clauses (any match reveals)
22+
"userIds": ["user_..."],
23+
"adminEnabled": true // platform admins (user.role === 'admin')
24+
}
25+
}
26+
```
27+
28+
3. **`PREVIEW_BLOCKS` env** (comma-separated block types) — the off-AppConfig reveal path for self-hosters and local dev.
29+
30+
A revealed block that is not globally GA (`enabled !== true`, or env-revealed) renders with a **" (Preview)"** name suffix on discovery surfaces. `getBlock()` stays pure, so placed instances keep their canonical name and always execute.
31+
32+
## Lifecycle of a preview block
33+
34+
1. **Author** the block normally (`/add-block` etc.) and set `preview: true` on its `BlockConfig`. **Ship no `BlockMeta` and no docs until GA**`check-block-registry` deliberately skips preview blocks in meta coverage, and `generate-docs` skips them at every gate.
35+
2. **Local dev:** set `PREVIEW_BLOCKS=<block-type>` in your env to see it (with the suffix).
36+
3. **Merge/deploy.** The block's code is live everywhere but visible nowhere — no AppConfig rule exists and self-hosters have no env entry.
37+
4. **Hosted preview:** add a rule to the `block-visibility` AppConfig document and start a deployment (no code deploy):
38+
- Admins only: `{ "enabled": false, "adminEnabled": true }`
39+
- Design-partner org: `{ "enabled": false, "orgIds": ["org_123"] }`
40+
- GA via config (code cleanup pending): `{ "enabled": true }` — suffix disappears everywhere within ~30s (AppConfig TTL) + client refetch.
41+
42+
Same runbook as `feature-flags`: edit the hosted document, `aws appconfig start-deployment` with the `sim-<env>-fast` strategy (see the infra README).
43+
5. **GA cleanup:** delete `preview: true` from the block (now visible to self-hosters on their next upgrade), add its `BlockMeta` + regen docs, and drop the AppConfig entry. For a v2 upgrade, this is also when v1 gets `hideFromToolbar: true` (the superseded-version paradigm).
44+
45+
## Kill switch (shipped blocks)
46+
47+
To pull an already-GA block from discovery surfaces on hosted (incident, deprecation): add `{ "<block-type>": { "enabled": false } }` to the document. Allowlist clauses can carve out exceptions. **Execution is NOT stopped** — workflows already using the block keep running; the kill switch only prevents new placement/discovery.
48+
49+
## Invariants (do not violate)
50+
51+
- **Execution is never gated.** The executor, serializer, drop-naming, and `isBlockTypeAccessControlExempt` resolve via pure `getBlock`. Do not add visibility checks to execution paths.
52+
- **Clone-not-remove:** gated blocks stay in `getAllBlocks()` output as clones with `hideFromToolbar: true``.find`-by-type consumers rely on this. Never filter them out.
53+
- **Keys are registry block types.** Never `custom_block_*` (parse drops them — custom blocks have their own enabled/disabled lifecycle).
54+
- **The shared hidden-predicate is `isHiddenUnder`** (`apps/sim/blocks/visibility/context.ts`). Never restate the preview/disabled rule inline at a new consumer.
55+
- **Process-global caches stay ungated.** `getStaticComponentFiles` (VFS) and `getExposedIntegrationTools` build the ungated universe; per-viewer filtering happens at stamp/consumer time. Never move gating into a shared builder.
56+
- Gating is **surface hiding, not secrecy** — the full config ships in the client JS bundle. Anything truly secret cannot be a registered block.
57+
58+
## Tests
59+
60+
Evaluation semantics: `apps/sim/lib/core/config/block-visibility.test.ts`. Registry projection: `apps/sim/blocks/visibility/visibility.test.ts`. When gating behavior changes, extend those — mock `isPlatformAdmin` for the admin clause; use the local `withAppConfig` harness.

apps/docs/components/icons.tsx

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3687,6 +3687,62 @@ export const SakanaIcon = (props: SVGProps<SVGSVGElement>) => (
36873687
</svg>
36883688
)
36893689

3690+
export function MetaIcon(props: SVGProps<SVGSVGElement>) {
3691+
const id = useId()
3692+
const gradient1Id = `meta_gradient_1_${id}`
3693+
const gradient2Id = `meta_gradient_2_${id}`
3694+
3695+
return (
3696+
<svg
3697+
{...props}
3698+
height='1em'
3699+
viewBox='0 -48.28 287.56 287.56'
3700+
width='1em'
3701+
xmlns='http://www.w3.org/2000/svg'
3702+
>
3703+
<title>Meta</title>
3704+
<defs>
3705+
<linearGradient
3706+
id={gradient1Id}
3707+
x1='61'
3708+
x2='259'
3709+
y1='117'
3710+
y2='127'
3711+
gradientUnits='userSpaceOnUse'
3712+
>
3713+
<stop offset='0' stopColor='#0064e1' />
3714+
<stop offset='0.4' stopColor='#0064e1' />
3715+
<stop offset='0.83' stopColor='#0073ee' />
3716+
<stop offset='1' stopColor='#0082fb' />
3717+
</linearGradient>
3718+
<linearGradient
3719+
id={gradient2Id}
3720+
x1='45'
3721+
x2='45'
3722+
y1='139'
3723+
y2='66'
3724+
gradientUnits='userSpaceOnUse'
3725+
>
3726+
<stop offset='0' stopColor='#0082fb' />
3727+
<stop offset='1' stopColor='#0064e0' />
3728+
</linearGradient>
3729+
</defs>
3730+
<path
3731+
d='m31.06,125.96c0,10.98 2.41,19.41 5.56,24.51 4.13,6.68 10.29,9.51 16.57,9.51 8.1,0 15.51-2.01 29.79-21.76 11.44-15.83 24.92-38.05 33.99-51.98l15.36-23.6c10.67-16.39 23.02-34.61 37.18-46.96 11.56-10.08 24.03-15.68 36.58-15.68 21.07,0 41.14,12.21 56.5,35.11 16.81,25.08 24.97,56.67 24.97,89.27 0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75l0-31.02c17.63,0 22.03-16.2 22.03-34.74 0-26.42-6.16-55.74-19.73-76.69-9.63-14.86-22.11-23.94-35.84-23.94-14.85,0-26.8,11.2-40.23,31.17-7.14,10.61-14.47,23.54-22.7,38.13l-9.06,16.05c-18.2,32.27-22.81,39.62-31.91,51.75-15.95,21.24-29.57,29.29-47.5,29.29-21.27,0-34.72-9.21-43.05-23.09-6.8-11.31-10.14-26.15-10.14-43.06z'
3732+
fill='#0081fb'
3733+
/>
3734+
<path
3735+
d='m24.49,37.3c14.24-21.95 34.79-37.3 58.36-37.3 13.65,0 27.22,4.04 41.39,15.61 15.5,12.65 32.02,33.48 52.63,67.81l7.39,12.32c17.84,29.72 27.99,45.01 33.93,52.22 7.64,9.26 12.99,12.02 19.94,12.02 17.63,0 22.03-16.2 22.03-34.74l27.4-.86c0,19.38-3.82,33.62-10.32,44.87-6.28,10.88-18.52,21.75-39.11,21.75-12.8,0-24.14-2.78-36.68-14.61-9.64-9.08-20.91-25.21-29.58-39.71l-25.79-43.08c-12.94-21.62-24.81-37.74-31.68-45.04-7.39-7.85-16.89-17.33-32.05-17.33-12.27,0-22.69,8.61-31.41,21.78z'
3736+
fill={`url(#${gradient1Id})`}
3737+
/>
3738+
<path
3739+
d='m82.35,31.23c-12.27,0-22.69,8.61-31.41,21.78-12.33,18.61-19.88,46.33-19.88,72.95 0,10.98 2.41,19.41 5.56,24.51l-26.48,17.44c-6.8-11.31-10.14-26.15-10.14-43.06 0-30.75 8.44-62.8 24.49-87.55 14.24-21.95 34.79-37.3 58.36-37.3z'
3740+
fill={`url(#${gradient2Id})`}
3741+
/>
3742+
</svg>
3743+
)
3744+
}
3745+
36903746
export function GeminiIcon(props: SVGProps<SVGSVGElement>) {
36913747
const id = useId()
36923748
const gradientId = `gemini_gradient_${id}`
@@ -5572,6 +5628,27 @@ export function SshIcon(props: SVGProps<SVGSVGElement>) {
55725628
)
55735629
}
55745630

5631+
export function SshTerminalIcon(props: SVGProps<SVGSVGElement>) {
5632+
return (
5633+
<svg
5634+
{...props}
5635+
xmlns='http://www.w3.org/2000/svg'
5636+
width='16'
5637+
height='14'
5638+
viewBox='0 0 16 14'
5639+
fill='none'
5640+
>
5641+
<path
5642+
d='M3 0C1.34 0 0 1.34 0 3V11C0 12.66 1.34 14 3 14H13C14.66 14 16 12.66 16 11V3C16 1.34 14.66 0 13 0H3ZM1 3C1 1.9 1.9 1 3 1H13C14.1 1 15 1.9 15 3V4H1V3ZM1 5H15V11C15 12.1 14.1 13 13 13H3C1.9 13 1 12.1 1 11V5Z'
5643+
fill='currentColor'
5644+
/>
5645+
<circle cx='3.5' cy='2.5' r='0.75' fill='currentColor' />
5646+
<circle cx='5.75' cy='2.5' r='0.75' fill='currentColor' />
5647+
<circle cx='8' cy='2.5' r='0.75' fill='currentColor' />
5648+
</svg>
5649+
)
5650+
}
5651+
55755652
export function SftpIcon(props: SVGProps<SVGSVGElement>) {
55765653
return (
55775654
<svg

apps/docs/content/docs/en/integrations/ashby.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,7 @@ Trigger workflow when a new application is submitted
11091109
|`currentInterviewStage` | object | currentInterviewStage output from the tool |
11101110
|`id` | string | Current interview stage UUID |
11111111
|`title` | string | Current interview stage title |
1112+
|`stageType` | string | Current interview stage type \(e.g., Lead, Applied, Interview, Offer\) |
11121113
|`job` | object | job output from the tool |
11131114
|`id` | string | Job UUID |
11141115
|`title` | string | Job title |
@@ -1163,6 +1164,7 @@ Trigger workflow when a candidate is hired
11631164
|`currentInterviewStage` | object | currentInterviewStage output from the tool |
11641165
|`id` | string | Current interview stage UUID |
11651166
|`title` | string | Current interview stage title |
1167+
|`stageType` | string | Current interview stage type \(e.g., Lead, Applied, Interview, Offer\) |
11661168
|`job` | object | job output from the tool |
11671169
|`id` | string | Job UUID |
11681170
|`title` | string | Job title |
@@ -1204,6 +1206,7 @@ Trigger workflow when a candidate changes interview stages
12041206
|`currentInterviewStage` | object | currentInterviewStage output from the tool |
12051207
|`id` | string | Current interview stage UUID |
12061208
|`title` | string | Current interview stage title |
1209+
|`stageType` | string | Current interview stage type \(e.g., Lead, Applied, Interview, Offer\) |
12071210
|`job` | object | job output from the tool |
12081211
|`id` | string | Job UUID |
12091212
|`title` | string | Job title |
@@ -1231,7 +1234,7 @@ Trigger workflow when a new job is created
12311234
|`title` | string | Job title |
12321235
|`confidential` | boolean | Whether the job is confidential |
12331236
|`status` | string | Job status \(Open, Closed, Draft, Archived\) |
1234-
|`employmentType` | string | Employment type \(Full-time, Part-time, etc.\) |
1237+
|`employmentType` | string | Employment type \(FullTime, PartTime, Intern, Contract\) |
12351238

12361239

12371240
---
@@ -1254,8 +1257,8 @@ Trigger workflow when a new offer is created
12541257
| `offer` | object | offer output from the tool |
12551258
|`id` | string | Offer UUID |
12561259
|`applicationId` | string | Associated application UUID |
1257-
|`acceptanceStatus` | string | Offer acceptance status \(Accepted, Declined, Pending, Created, Cancelled, WaitingOnResponse\) |
1258-
|`offerStatus` | string | Offer process status \(WaitingOnApprovalStart, WaitingOnOfferApproval, WaitingOnCandidateResponse, CandidateAccepted, CandidateRejected, OfferCancelled\) |
1260+
|`acceptanceStatus` | string | Offer acceptance status \(Accepted, Declined, Pending, Created, Cancelled\) |
1261+
|`offerStatus` | string | Offer process status \(WaitingOnApprovalStart, WaitingOnOfferApproval, WaitingOnApprovalDefinition, WaitingOnCandidateResponse, CandidateRejected, CandidateAccepted, OfferCancelled\) |
12591262
|`decidedAt` | string | Offer decision timestamp \(ISO 8601\). Typically null at creation; populated after candidate responds. |
12601263
|`latestVersion` | object | latestVersion output from the tool |
12611264
|`id` | string | Latest offer version UUID |

apps/docs/content/docs/en/integrations/gitlab.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,6 +882,7 @@ Trigger workflow when an issue is opened, updated, or closed in GitLab
882882
|`description` | string | Issue description |
883883
|`confidential` | boolean | Whether the issue is confidential |
884884
|`url` | string | Issue URL |
885+
|`work_item_type` | string | Work item type \(e.g. Issue, Incident, Task\); GitLab 17.2+ only |
885886

886887

887888
---
@@ -912,7 +913,8 @@ Trigger workflow when a merge request is opened, updated, or merged in GitLab
912913
|`action` | string | Action \(open, close, reopen, update, merge, etc.\) |
913914
|`source_branch` | string | Source branch |
914915
|`target_branch` | string | Target branch |
915-
|`merge_status` | string | Merge status |
916+
|`merge_status` | string | Merge status \(deprecated by GitLab\) |
917+
|`detailed_merge_status` | string | Detailed merge status |
916918
|`draft` | boolean | Whether the merge request is a draft |
917919
|`url` | string | Merge request URL |
918920

apps/docs/content/docs/en/integrations/gmail.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ Triggers when new emails are received in Gmail (requires Gmail credentials)
351351
|`date` | string | Email date in ISO format |
352352
|`bodyText` | string | Plain text email body |
353353
|`bodyHtml` | string | HTML email body |
354-
|`labels` | string | Email labels array |
354+
|`labels` | array | Email labels array |
355355
|`hasAttachments` | boolean | Whether email has attachments |
356356
|`attachments` | file[] | Array of email attachments as files \(if includeAttachments is enabled\) |
357357
| `timestamp` | string | Event timestamp |

apps/pii/requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Test-only deps. Unit tests need requirements.txt + this file (no models);
22
# integration tests additionally need the models baked into the docker images
33
# (see tests/test_integration.py).
4-
pytest==8.4.1
4+
pytest==9.0.3
55
httpx==0.28.1

apps/pii/requirements-gliner.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@
66
# torch is pinned in the Dockerfile instead: the CPU and CUDA targets install
77
# the same version from different wheel indexes.
88
gliner==0.2.27
9-
transformers==4.56.2
10-
huggingface_hub==0.35.3
9+
transformers==5.3.0
10+
huggingface_hub==1.3.0

apps/sim/.env.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,19 @@ API_ENCRYPTION_KEY=your_api_encryption_key # Use `openssl rand -hex 32` to gener
9393
# S3_ENDPOINT= # Custom endpoint for S3-compatible storage (Cloudflare R2, MinIO, Backblaze B2). Leave unset for AWS S3
9494
# S3_FORCE_PATH_STYLE=true # Required for MinIO/Ceph RGW. Leave unset for AWS S3 and R2
9595

96+
# Azure Blob Storage takes precedence over S3 if both are configured
97+
# AZURE_ACCOUNT_NAME= # Azure storage account name
98+
# AZURE_ACCOUNT_KEY= # Azure storage account key
99+
# AZURE_CONNECTION_STRING= # Alternative to account name/key
100+
# AZURE_STORAGE_CONTAINER_NAME= # General workspace files container
101+
# AZURE_STORAGE_KB_CONTAINER_NAME= # Knowledge base documents
102+
# AZURE_STORAGE_EXECUTION_FILES_CONTAINER_NAME= # Workflow execution files
103+
# AZURE_STORAGE_CHAT_CONTAINER_NAME= # Deployed chat assets
104+
# AZURE_STORAGE_COPILOT_CONTAINER_NAME= # Copilot attachments
105+
# AZURE_STORAGE_PROFILE_PICTURES_CONTAINER_NAME= # User profile pictures
106+
# AZURE_STORAGE_OG_IMAGES_CONTAINER_NAME= # OpenGraph preview images (falls back to AZURE_STORAGE_CONTAINER_NAME)
107+
# AZURE_STORAGE_WORKSPACE_LOGOS_CONTAINER_NAME= # Workspace logos (falls back to AZURE_STORAGE_CONTAINER_NAME)
108+
96109
# Admin API (Optional - for self-hosted GitOps)
97110
# ADMIN_API_KEY= # Use `openssl rand -hex 32` to generate. Enables admin API for workflow export/import.
98111
# Usage: curl -H "x-admin-key: your_key" https://your-instance/api/v1/admin/workspaces

0 commit comments

Comments
 (0)