Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
695ca94
improvement(workflows): a clean errorMessage on Function errors and t…
waleedlatif1 Nov 23, 2026
ae97162
chore(db): drop whitelabel_settings and rate_limit_bucket, remove the…
waleedlatif1 Nov 23, 2026
5b0fd08
fix(mothership): classify a cancel the worker reports as an explicit …
waleedlatif1 Nov 23, 2026
1d5919a
chore(cleanup): finish the whitelabel, Redis and self-hosted provider…
waleedlatif1 Nov 23, 2026
5860704
fix(models): stop resolving sim-auto to ollama outside the model rout…
waleedlatif1 Nov 23, 2026
0cf4e2b
improvement(workflow-code): reorganize the workflows-as-code docs wit…
waleedlatif1 Nov 23, 2026
90cca5e
feat(billing): card-required Pro free trial with a capped allowance (…
waleedlatif1 Nov 23, 2026
161199a
improvement(workflow-code): agent DX from the v8 benchmark, CLI conve…
waleedlatif1 Nov 23, 2026
05c8216
improvement(workflow-code): lean agent path for source get, params an…
waleedlatif1 Nov 23, 2026
39c1020
improvement(workflow-code): remove agent traps from table keys, Funct…
waleedlatif1 Nov 23, 2026
67857b4
fix(seo): link to rendered n8n import instructions (#10339)
waleedlatif1 Nov 23, 2026
4c65d95
improvement(workflow-code): recommend the batched edit loop in the ag…
waleedlatif1 Nov 23, 2026
4c7ad8c
fix(models): accept models ollama can serve and refuse a denied sim-a…
waleedlatif1 Nov 23, 2026
3b3c0b5
chore(config): retire the remaining NEXT_PUBLIC_* flag twins (#10342)
waleedlatif1 Nov 23, 2026
3257c89
improvement(workflow-code): adopt, troubleshooting and how-it-works d…
waleedlatif1 Nov 23, 2026
6e73e14
fix(models): route tagged ollama names that share a cloud prefix to o…
waleedlatif1 Nov 23, 2026
5a3d6d1
improvement(mothership): use the synced replay-end frame contract (#1…
waleedlatif1 Nov 23, 2026
1f56df3
docs(library): update n8n-alternatives (#10349)
waleedlatif1 Nov 23, 2026
25aaf8b
feat(library): Atlassian Service Accounts for AI Agents in Jira and C…
waleedlatif1 Nov 23, 2026
70f513c
feat(library): How Do You Build a Governed AI Agent for Greenhouse Re…
waleedlatif1 Nov 23, 2026
01188e2
improvement(sim-cli): upgrade commander 15, chalk 6 and babel 8 (#10350)
waleedlatif1 Nov 23, 2026
2310c5b
feat(library): How Do You Build a Governed AI Agent for ServiceNow IT…
waleedlatif1 Nov 23, 2026
73ca568
docs(library): update best-ai-agents-for-slack (#10346)
waleedlatif1 Nov 23, 2026
b627a8b
improvement(workflow-code): clean slate for workflows and workspace a…
waleedlatif1 Nov 23, 2026
3139326
improvement(mothership): shadow-check worker stream frames against th…
waleedlatif1 Nov 23, 2026
0e0d09c
improvement(workflow-code): source check type-checks with the pinned …
waleedlatif1 Nov 23, 2026
dbe0108
fix(workflow-code): keep one babel major so the app image builds (#10…
waleedlatif1 Nov 23, 2026
ce51264
fix(helm): validate the vLLM and LiteLLM base URLs as URIs (#10357)
waleedlatif1 Nov 24, 2026
9a2ea17
docs(self-hosting): note the retired NEXT_PUBLIC switch twins in the …
waleedlatif1 Nov 24, 2026
2aa5845
fix(billing): trial-aware usage card, personal-only trial credit base…
waleedlatif1 Nov 24, 2026
318135a
fix(models): accept local ollama models in fallback rows like the mod…
waleedlatif1 Nov 24, 2026
e392a93
fix(workflow-code): release review follow-ups for #10356 (#10362)
waleedlatif1 Nov 24, 2026
04dae2e
feat(library): How Do You Map AI Agent Governance Controls to ISO 420…
waleedlatif1 Nov 24, 2026
0e87cd9
ci: bump the actions group across 2 directories with 4 updates (#10363)
dependabot[bot] Nov 24, 2026
b24ff18
feat(library): n8n Pricing: Cloud, Self-Hosted, and Enterprise Costs …
waleedlatif1 Nov 24, 2026
8e08d21
feat(library): Salesforce Agentforce Pricing: What IT and Salesforce …
waleedlatif1 Nov 24, 2026
c27a9a9
feat(library): What Are the Best Glean Alternatives, and How Much Doe…
waleedlatif1 Nov 24, 2026
6afcff9
feat(library): Workato Pricing: Costs, Cost Drivers, and When AI Agen…
waleedlatif1 Nov 24, 2026
38d9b31
improvement(workflow-code): v9 benchmark findings (table row shape, r…
waleedlatif1 Nov 24, 2026
dc7c60f
fix(landing): align public compliance claims with audit status (#10369)
waleedlatif1 Nov 24, 2026
5bef3d8
fix(db): give push-managed databases the bytewise order_key collation…
waleedlatif1 Nov 24, 2026
fb8f6e4
fix(e2e): isolate markdown-viewer checks from a deleted fixture and W…
waleedlatif1 Nov 24, 2026
d07082a
fix(testing): time scaling checks by thread CPU time so a contended r…
waleedlatif1 Nov 24, 2026
6dfdd2c
improvement(landing): homepage FAQ for category questions and a start…
waleedlatif1 Nov 24, 2026
c53ae4b
fix(test): seed permission-import grants in index order so the 1M-row…
waleedlatif1 Nov 24, 2026
82b66b1
feat(slack): stream an Agent's tool-call timeline without its text (#…
waleedlatif1 Nov 24, 2026
66eaa70
improvement(workflow-code): round 11 audit — fix found bugs, remove d…
waleedlatif1 Nov 24, 2026
17b32fb
feat(billing): self-serve Enterprise billing — auto-pay, quarterly se…
waleedlatif1 Nov 24, 2026
fb545bd
fix(mothership): strip unknown resource owner keys and tighten contra…
waleedlatif1 Nov 24, 2026
63cfea1
fix(network): run the Bun-runtime gateway check in the integration ti…
waleedlatif1 Nov 24, 2026
f60e98d
fix(desktop): answer local-file consent dialogs through the shared cl…
waleedlatif1 Nov 24, 2026
b5f98c5
fix(desktop-browser): wait for a new tab's first page before calling …
waleedlatif1 Nov 24, 2026
9186be5
fix(scim): scope the managed-membership lock to workspaces the member…
waleedlatif1 Nov 24, 2026
b660380
fix(desktop-browser): wait for the first page before the action recor…
waleedlatif1 Nov 24, 2026
6b87cf8
feat(logs): record which deployment version of a child workflow ran (…
waleedlatif1 Nov 24, 2026
927594b
fix(desktop-e2e): let the user's click focus the page before reloadin…
waleedlatif1 Nov 24, 2026
7504567
fix(pricing): comparison table matches enforced limits, annual price …
waleedlatif1 Nov 24, 2026
9ded3fc
fix(billing): annual plans include a year of credits, plan switches r…
waleedlatif1 Nov 25, 2026
ca57a3b
improvement(desktop-e2e): one shared harness with a bounded quit, fla…
waleedlatif1 Nov 25, 2026
25952cf
fix(billing): Free plan shows the trial up front, search joins the ho…
waleedlatif1 Nov 25, 2026
51205e9
improvement(workflow-code): agent efficiency — typed child results, c…
waleedlatif1 Nov 25, 2026
f11df48
fix(ci): retry a failed job-status poll while http e2e jobs wait for …
waleedlatif1 Nov 25, 2026
05b5b4c
fix(emcn): a modal over a native surface takes keys as soon as it tak…
waleedlatif1 Nov 25, 2026
92c7057
fix(markdown-viewer): wait for ProseMirror's post-focus selection syn…
waleedlatif1 Nov 25, 2026
cfb0809
improvement(cli): primer names the child-workflow call and scopes the…
waleedlatif1 Nov 25, 2026
e4452fb
fix(desktop): a quit can no longer hang on a fatal main-process error…
waleedlatif1 Nov 25, 2026
84bfe5c
fix(schedules): re-examine stranded schedule claims within minutes in…
waleedlatif1 Nov 25, 2026
e49e733
fix(desktop): skip Electron's visibility listener on a destroyed wind…
waleedlatif1 Nov 25, 2026
43d2b8c
improvement(workflows): agent-benchmark fixes for JSON refs, export, …
waleedlatif1 Nov 25, 2026
48f7887
fix(workflow-code): scope the check's W_JSON_REF_UNTYPED to fields th…
waleedlatif1 Nov 25, 2026
bfba9db
improvement(tools): declare a read/write effect on every tool (#10401)
waleedlatif1 Nov 25, 2026
16add2e
feat(workflows): side-effect-free dry runs (#10402)
waleedlatif1 Nov 25, 2026
14316ca
chore(mothership): regenerate the tool catalog for the workflow-tests…
waleedlatif1 Nov 25, 2026
579c7cc
improvement(workflows): dry-run placeholders echo the writes they sta…
waleedlatif1 Nov 25, 2026
5fb4b27
fix(blocks): output conditions match what each operation's tool retur…
waleedlatif1 Nov 25, 2026
0a0febb
improvement(cli): say what is live after a deploy, and run a pinned d…
waleedlatif1 Nov 25, 2026
c1b862a
improvement(tools): dry-run placeholders echo what common write reque…
waleedlatif1 Nov 25, 2026
db3bced
feat(workflows): dry runs stub code's network writes instead of listi…
waleedlatif1 Nov 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .agents/skills/add-block/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,9 @@ Validate the block against every tool in `tools.access`:
tool must already be either a registered `InternalToolConfig.operation` or an absolute external
HTTP(S) `ToolConfig.request`. If transport needs to change, use the `add-tools` skill; never add a
same-origin `/api/...` hop or a `directExecution` property from the block.
8. **Verify every tool declares `effect`** — the block's catalog `effect` (and its per-operation
`operationEffects`) is derived from them, so a mislabelled tool misreports the block to agents
and Assistant. Fix the tool with the `add-tools` rules (Declaring the effect), never the block.

## Option Lists: `selectorKey` or `options`, never a per-block fetcher

Expand Down
7 changes: 7 additions & 0 deletions .agents/skills/add-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ Never point a tool at `/api/...`, construct an absolute URL back to Sim, declare
resources. A real external/browser route and an in-process tool may share the same operation, but
neither calls the other. Follow the full transport and handler rules in the `add-tools` skill.

Every tool declares `effect: 'read' | 'write'`, classified from the API docs you researched in Step 1
by the rules in `add-tools` → Declaring the effect. `bun run check:tool-effects` checks only that the
label agrees with the HTTP method (or carries a `// tool-effect:` reason); classifying POST and
in-process operations is on you.

**types.ts:**
```typescript
import type { ToolResponse } from '@/tools/types'
Expand Down Expand Up @@ -506,6 +511,7 @@ If creating V2 versions (API-aligned outputs):
- [ ] No tool points to `/api/...`, constructs a URL back to Sim, declares `request.internal` or a
`directExecution` property (fails `bun run check:tool-request-boundary`), or has an HTTP fallback for an in-process operation
- [ ] All params have correct visibility
- [ ] Every tool declares `effect` from its documented semantics; `bun run check:tool-effects` passes
- [ ] All nullable fields use `?? null`
- [ ] All optional outputs have `optional: true`
- [ ] Created `index.ts` barrel export
Expand Down Expand Up @@ -600,6 +606,7 @@ If creating V2 versions (API-aligned outputs):
- [ ] Verified `tools.config.params` correctly maps and coerces all param types
- [ ] Verified every tool output and `transformResponse` path against documented or live-verified JSON responses
- [ ] If any response schema remained unknown, explicitly told the user instead of guessing
- [ ] Ran the block in a workflow with `sim workflows run <workflowId> --dry`: each write is in `sideEffects.stubbed` (at most 50 entries; the rest are counted in `sideEffects.omitted.stubbed`) with the documented request where `request` is not `null` (null: the run could not vouch it was free of secrets, or could not build it once they were masked), and each read ran for real; a write absent from `stubbed` counts only if its block ran (not on an untaken branch or `--mock`ed) (send one write for real only with `--allow <block>` against a test resource)
- [ ] `{Service}BlockMeta` exported with at least 7 templates, each having `icon`, `title`, `prompt`, `modules`, `category`, and `tags`

## File Handling
Expand Down
67 changes: 67 additions & 0 deletions .agents/skills/add-tools/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const {serviceName}{Action}Tool: ToolConfig<
name: '{Service} {Action}', // Human readable
description: 'Brief description', // One sentence
version: '1.0.0',
effect: 'write', // 'read' only if it changes nothing outside Sim (see Declaring the effect)

// Required whenever the tool takes a saved credential — browser OAuth or service account
oauth: {
Expand Down Expand Up @@ -164,6 +165,7 @@ export const {serviceName}{Action}Tool: InternalToolConfig<
name: '{Service} {Action}',
description: 'Brief description',
version: '1.0.0',
effect: 'write', // `read` only once you have verified the operation changes nothing outside Sim
params: {
// Same canonical metadata as an external tool.
},
Expand All @@ -183,6 +185,69 @@ trusted `request.context` for authority, forwards `request.signal`, and returns
`Response` contract expected by the tool executor. It has no URL, method, request headers, fetch
fallback, or caller-controlled `_context` authority.

## Declaring the effect

Every tool declares `effect: 'read' | 'write'` (required by `ToolConfig`, so type-check fails a tool
without one). It is public catalog metadata: Assistant applies its read or write policy by it, and
`sim blocks get` and `sim workflows source params` show it to agents.
Labelling a write `read` is the one unsafe mistake, so classify from the provider's documented
semantics, never the name alone.

`read` means the call changes nothing outside Sim: no create, update, delete, send, post, trigger,
enqueue, consume, or mark-read; starts no asynchronous provider job or query execution (one with its own id that
can keep running), even a short-lived one; a synchronous read-only query is fine; leaves no run, conversation, history item, or other resource in an account; no contact data revealed for credits; no external delivery. Usage billing for the call
itself does not count. `write` is anything else.

**Contact reveals:** revealing a person's contact data (email, phone) for credits is `write`: an
email or phone finder, a person enrichment that returns an email or phone, and a domain search that
lists people's emails are `write` even over GET (carry `// tool-effect:`). Company/firmographic
lookups and verifications that only spend lookup credits are `read`: a company enrichment, a people
search that returns no email or phone, and an email verifier.

- `read`: GET/HEAD reads, and POST endpoints the docs define as search, query, list, get, lookup, or
verify; LLM, embedding, transcription, TTS, and media-generation calls that leave nothing in the
provider account; queries the server enforces as read-only (a read-only transaction or setting,
never a client-side screen alone).
- `write`: an effect that depends on the params (a `method` param or function-valued
`request.method` that can pick PUT/PATCH/DELETE or a mutating POST, raw SQL or Cypher the server
does not restrict to reads, a generic RPC or command); a GET whose `transformResponse` or
`postProcess` then writes; a read that consumes or acknowledges (a queue receive, mark-as-read);
media generation, transcription, crawls, exports, and research or agent runs that leave a job,
run, asset, or history item in the provider account; a chat that keeps a conversation; a reveal
or enrichment that creates a resource or delivers to a webhook; anything that saves to the
workspace. When unsure, `write`.
- PUT/PATCH/DELETE are `write`. A static GET/HEAD labelled `write`, or PUT/PATCH/DELETE labelled
`read`, fails the audit unless the `effect` line carries `// tool-effect: <reason>` on one of the
two lines above it; use it only for a genuine exception such as a GET that writes in `postProcess`.
- A factory that builds tools from definitions takes `effect` per definition and passes it through.
- Prove the labels with a dry run, against a test account or test resource (a `read` runs for real,
so a write mislabelled `read` is sent): put the block in a workflow and run
`sim workflows run <workflowId> --dry --input '{…}'`. Each `write` call must appear in the result's
`sideEffects.stubbed` with the request you expect (an HTTP tool's `method`, `url` and `body`, or an
in-process operation's input, credentials redacted), and each `read` must run for real and return
live data; a read listed there is labelled `write`. A write missing from `stubbed` may not have
been reached (an untaken branch, or a block answered by `--mock`), so first confirm its block ran
in the trace: a reached write is absent only when its block was `--allow`ed and sent it for real,
so a reached, unallowed write missing from `stubbed` is labelled `read`. `stubbed` keeps at most
50 entries and counts the rest in `sideEffects.omitted.stubbed`, so a write past the cap is
counted, not missing: test one tool per run, or few enough to fit. An entry's `request` is `null`
when the run cannot vouch that no secret remains in it, or cannot build it once secrets are
masked (a URL that is wholly a secret); then check the tool label alone and compare the request
fields only on entries that carry one.
- A dry run answers a `write` with a sample of its `outputs`. When downstream blocks read output the
request alone determines (a table write's `row.data`, a file write's requested name), declare a
pure `dryRunOutput(params)` returning just those fields; it gets params with secrets masked. It is
laid over the sample by the declared schema: field by field where an output declares `properties`,
item by item where an array declares `items` (undeclared fields are dropped), and whole anywhere
else, so return an undeclared shape (a `json` row) complete, with placeholders for what the request
cannot know. Never guess at what the provider or stored state would add (a collision suffix on a
file name, an id, a key resolved to an id, a default the provider picks): an id it would assign is
`dryRunId(kind, n)` from `@/tools/dry-run` (`dry_run_record_1`), and anything else is left out so
the sample stands. When the request builder normalises a param (parses a JSON string, builds rows
from objects), move that into a named helper the `body`/`operation.input` and the hook both call
(`appendSheetRows`, `parseHubSpotProperties`); never re-derive the request in the hook. Echoing a
secret is safe only because params arrive masked: never read credentials from anywhere else.

## Critical Rules for Parameters

### Visibility Options
Expand Down Expand Up @@ -606,6 +671,8 @@ If creating V2 tools (API-aligned outputs), use `_v2` suffix:
## Checklist Before Finishing

- [ ] All tool IDs use snake_case
- [ ] Every tool declares `effect`, classified by the rules in Declaring the effect, and
`bun run check:tool-effects` passes
- [ ] Chose exactly one boundary: registered `InternalToolConfig.operation` or absolute external
HTTP(S) `ToolConfig.request`
- [ ] No tool request points to `/api/...`, constructs a URL back to Sim, or declares
Expand Down
15 changes: 15 additions & 0 deletions .agents/skills/validate-integration/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,21 @@ For **every** tool file, check:
- [ ] Tool `description` is a concise one-liner describing what it does
- [ ] Tool `version` is set (`'1.0.0'` or `'2.0.0'` for V2)

### Effect
- [ ] Every tool declares `effect`, and the label matches the API docs, not the name (rules:
`add-tools` → Declaring the effect)
- [ ] Any `// tool-effect: <reason>` sits on a genuine verb/label exception, and
`bun run check:tool-effects` passes
- [ ] A dry run (`sim workflows run <workflowId> --dry --input '{…}'` on a workflow using the
block) lists every write operation in `sideEffects.stubbed` (at most 50 entries; the rest
are counted in `sideEffects.omitted.stubbed`) with the request the API docs expect where
`request` is not `null`, and every read runs for real; a write absent from `stubbed` counts
only if its block ran (not on an untaken branch or `--mock`ed) (rules: `add-tools` →
Declaring the effect)
- [ ] A write's `dryRunOutput`, where it declares one, echoes only what its request determines,
provider-assigned ids as `dryRunId(kind, n)`, and shares any param normalisation with the
request builder through a named helper (rules: `add-tools` → Declaring the effect)

### Params
- [ ] All required API params are marked `required: true`
- [ ] All optional API params are marked `required: false`
Expand Down
13 changes: 12 additions & 1 deletion .claude/rules/sim-workflow-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,17 @@ workspace directory).
| `apps/sim/blocks/sdk-names/<type>.json` | Frozen SDK builder names, one file per block type |
| `apps/sim/app/workspace/**/panel/components/code/` | The read-only Code tab |

Public docs live in `apps/docs/content/docs/workflows/code/`. The exit-code, diagnostic-code, limit
and per-kind layout tables of `exit-codes.mdx`, `diagnostics.mdx`, `limits.mdx` and `directory.mdx` sit between
`workflow-code-docs` markers and come from their owners (`source-exit-codes.ts`, SYNTAX.md and `workspace-code`'s
`diagnostics/codes.ts` TSDoc, the `*_LIMITS` constants, `WORKSPACE_KIND_SPECS`): edit the owner, then run
`bun run generate:workflow-code-docs` (`check:workflow-code-docs` fails on drift, a diagnostic code a page names that
no engine emits, a limit or diagnostic code with no docs entry, and a `typescript@x.y.z` pin other than the CLI's).
A limit also needs a label in the generator's `WORKFLOW_LIMIT_LABELS` or `WORKSPACE_LIMIT_LABELS`.
A new exit code also needs a `[#exit-<code>]` section in `troubleshooting.mdx`, which the same check requires
for every non-zero code `sourceExitCodeRows` lists. Behaviour a user relies on (identity, stale, the three-way rule,
promotion) is explained once, in `how-it-works.mdx`; change it there when an engine changes it.

Dependencies point one way: `packages/workflow-types` → `packages/workflow-code` →
`packages/workspace-code` and `packages/workflow-sdk` → the CLI and `apps/sim`. `check:boundaries` keeps both engines and `packages/table-cells` pure (no
Node built-ins, `eval`, `globalThis`, dynamic import): they run in the browser, the CLI and the
Expand Down Expand Up @@ -198,7 +209,7 @@ changed.
| `.sim/base.json` (workspace) | `version: 1` | Same policy |
| `workflow_source_meta` | `version: 1` | Same policy; a bump needs a data migration |
| Fingerprints | `sf1:` (workflow), `rf1:` (resource) | Any change to canonicalize or a kind's `canonical()` output changes every stored fingerprint and makes every checkout stale; treat it as a format change |
| SDK surface | `// @sim-sdk 1`, `SDK_MAJOR`, `OLDEST_SDK_MAJOR` | Compile refuses a newer major and reads down to the floor |
| SDK surface | `// @sim-sdk 1`, `SDK_MAJOR` | Compile refuses any major but the server's |
| `apps/sim/blocks/sdk-names/` | append-only | Never rename or remove a name |

Nothing upgrades an old version: a bump is a hard refusal until a migration exists. A lock or base
Expand Down
13 changes: 12 additions & 1 deletion .cursor/rules/sim-workflow-code.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ workspace directory).
| `apps/sim/blocks/sdk-names/<type>.json` | Frozen SDK builder names, one file per block type |
| `apps/sim/app/workspace/**/panel/components/code/` | The read-only Code tab |

Public docs live in `apps/docs/content/docs/workflows/code/`. The exit-code, diagnostic-code, limit
and per-kind layout tables of `exit-codes.mdx`, `diagnostics.mdx`, `limits.mdx` and `directory.mdx` sit between
`workflow-code-docs` markers and come from their owners (`source-exit-codes.ts`, SYNTAX.md and `workspace-code`'s
`diagnostics/codes.ts` TSDoc, the `*_LIMITS` constants, `WORKSPACE_KIND_SPECS`): edit the owner, then run
`bun run generate:workflow-code-docs` (`check:workflow-code-docs` fails on drift, a diagnostic code a page names that
no engine emits, a limit or diagnostic code with no docs entry, and a `typescript@x.y.z` pin other than the CLI's).
A limit also needs a label in the generator's `WORKFLOW_LIMIT_LABELS` or `WORKSPACE_LIMIT_LABELS`.
A new exit code also needs a `[#exit-<code>]` section in `troubleshooting.mdx`, which the same check requires
for every non-zero code `sourceExitCodeRows` lists. Behaviour a user relies on (identity, stale, the three-way rule,
promotion) is explained once, in `how-it-works.mdx`; change it there when an engine changes it.

Dependencies point one way: `packages/workflow-types` → `packages/workflow-code` →
`packages/workspace-code` and `packages/workflow-sdk` → the CLI and `apps/sim`. `check:boundaries` keeps both engines and `packages/table-cells` pure (no
Node built-ins, `eval`, `globalThis`, dynamic import): they run in the browser, the CLI and the
Expand Down Expand Up @@ -178,7 +189,7 @@ changed.
| `.sim/base.json` (workspace) | `version: 1` | Same policy |
| `workflow_source_meta` | `version: 1` | Same policy; a bump needs a data migration |
| Fingerprints | `sf1:` (workflow), `rf1:` (resource) | Any change to canonicalize or a kind's `canonical()` output changes every stored fingerprint and makes every checkout stale; treat it as a format change |
| SDK surface | `// @sim-sdk 1`, `SDK_MAJOR`, `OLDEST_SDK_MAJOR` | Compile refuses a newer major and reads down to the floor |
| SDK surface | `// @sim-sdk 1`, `SDK_MAJOR` | Compile refuses any major but the server's |
| `apps/sim/blocks/sdk-names/` | append-only | Never rename or remove a name |

Nothing upgrades an old version: a bump is a hard refusal until a migration exists. A lock or base
Expand Down
1 change: 1 addition & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ In addition, you will need to update the registries:
name: 'Pinecone Fetch',
description: 'Fetch vectors from Pinecone database',
version: '1.0.0',
effect: 'read', // 'write' unless it changes nothing outside Sim

// OAuth configuration (if applicable)
provider: 'pinecone', // ID of the OAuth provider
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ runs:
# under 300 MB, sat at 249 GB. Sticky disks bill at ~$0.51/GB-month.
- name: Set up Blacksmith builder
if: inputs.provider == '' || inputs.provider == 'blacksmith'
uses: useblacksmith/setup-docker-builder@06dd9c83a5d541274d2e3ac67625560979275267 # v2
uses: useblacksmith/setup-docker-builder@9657a6e02ca6445e6d6ce5ffaf370f4828dea50d # v2
with:
cache-key: ${{ steps.cache-key.outputs.value }}

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/http-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ wait_ready() {
case "$group" in
scim)
export NEXT_PUBLIC_FORCE_HOSTED=true
export BILLING_ENABLED=true NEXT_PUBLIC_BILLING_ENABLED=true
export BILLING_ENABLED=true
export ENTERPRISE_ENABLED=true
export SCIM_ENABLED=true
export SSO_ENABLED=true
Expand Down
21 changes: 17 additions & 4 deletions .github/scripts/wait-for-e2e-build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
# Blocks until this run's `build (e2e)` job finishes, so an e2e job can check out, install and
# migrate while the build runs instead of after it. Exits 0 only when that job succeeded; a failed,
# cancelled or skipped build, a missing or duplicated build job, or a failed API call exits non-zero.
# The job's own timeout bounds the wait.
# cancelled or skipped build, a missing or duplicated build job, or an API that keeps failing exits
# non-zero. A single failed poll (GitHub occasionally returns a truncated body) is retried on the next
# one. The job's own timeout bounds the wait.
#
# Usage: wait-for-e2e-build.sh (reads GITHUB_REPOSITORY and GITHUB_RUN_ID; needs `actions: read`)
set -euo pipefail
Expand All @@ -11,14 +12,26 @@ set -euo pipefail
: "${GITHUB_RUN_ID:?}"

poll_seconds=${E2E_BUILD_POLL_SECONDS:-10}
max_api_failures=3
api_failures=0
started=$SECONDS

while :; do
# `filter=latest` lists each job's latest attempt, so re-running only a failed e2e job still sees
# the build an earlier attempt finished. Called from ci.yml the name carries a `checks / ` prefix.
state=$(gh api --paginate "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs?filter=latest&per_page=100" \
if ! state=$(gh api --paginate "repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs?filter=latest&per_page=100" \
--jq '.jobs[] | select(.name == "build (e2e)" or (.name | endswith(" / build (e2e)")))
| "\(.status) \(.conclusion // "")"')
| "\(.status) \(.conclusion // "")"'); then
api_failures=$((api_failures + 1))
if [ "$api_failures" -ge "$max_api_failures" ]; then
echo "::error::Could not read this run's jobs $api_failures times in a row."
exit 1
fi
echo "::warning::Could not read this run's jobs; trying again."
sleep "$poll_seconds"
continue
fi
api_failures=0
matches=$(printf '%s' "$state" | grep -c . || true)
if [ "$matches" -ne 1 ]; then
echo "::error::Expected one build (e2e) job in this run, found $matches."
Expand Down
Loading
Loading