Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
018e936
fix(sim-cli): SOURCE_DIR_BUSY help names the workflows source command…
waleedlatif1 Nov 21, 2026
4bb3f76
improvement(sim-cli): show the edit loop and its key flags in the sou…
waleedlatif1 Nov 21, 2026
f99bc38
fix(workflow-persistence): load blocks and subflows in insertion orde…
waleedlatif1 Nov 21, 2026
8d6605f
docs(self-hosting): realtime does not wait for migrations, so run the…
waleedlatif1 Nov 21, 2026
2698eab
improvement(sim-cli): teach renames, failures, retries and draft test…
waleedlatif1 Nov 21, 2026
dec7d71
docs(workflows): the code example acknowledges its webhook instead of…
waleedlatif1 Nov 21, 2026
eb4c5e5
fix(workflow-code): dry runs draw on the plan budget and take a plan …
waleedlatif1 Nov 21, 2026
e46874b
feat(workflows): a manual run's --stop-after and --from-block take a …
waleedlatif1 Nov 21, 2026
1da2959
fix(logs): a failed, cancelled or timed-out run records the input it …
waleedlatif1 Nov 21, 2026
ae7a6df
fix(workflow-code): the Code tab's source read takes a source read slot
waleedlatif1 Nov 21, 2026
7ad5049
improvement(sim-cli): hide autolayout infos from source output unless…
waleedlatif1 Nov 21, 2026
6acf9ca
fix(workflow-code): an offline check says secrets.ts does not declare…
waleedlatif1 Nov 21, 2026
db3d21a
perf(workflow-code): a source dry run checks the stored draft's deplo…
waleedlatif1 Nov 21, 2026
ac27b73
improvement(workflow-code): an unknown builder written short suggests…
waleedlatif1 Nov 21, 2026
60f2beb
feat(catalog): a legacy block hidden from the toolbar reads by its id…
waleedlatif1 Nov 21, 2026
ade7bdd
fix(workspace-source): a file delete is guarded by the revision its p…
waleedlatif1 Nov 21, 2026
53ed6fc
improvement(sim-cli): operations apply help documents edges, handles,…
waleedlatif1 Nov 21, 2026
a51494c
fix(sim-cli): workspace status counts and lints only what an apply se…
waleedlatif1 Nov 21, 2026
b4d64a0
fix(table): a managed rows write counts the keyless rows it keeps aga…
waleedlatif1 Nov 21, 2026
f12f655
fix(sim-cli): read a status finding's resource without assuming the w…
waleedlatif1 Nov 21, 2026
cf13725
feat(sim-cli): a workspace apply or promotion that wrote part of its …
waleedlatif1 Nov 21, 2026
09f9bd7
fix(table): a write that joins a table transaction keeps that transac…
waleedlatif1 Nov 21, 2026
58227b6
fix(sim-cli): workflows source apply and create print only the JSON w…
waleedlatif1 Nov 21, 2026
9cbfca7
perf(workspace-source): run a table plan's independent reads a few at…
waleedlatif1 Nov 21, 2026
9a2e2a8
feat(sim-cli): a source apply that deploys prints the URL of each web…
waleedlatif1 Nov 21, 2026
7f6438f
feat(sim-cli): on GitHub Actions, source findings become file annotat…
waleedlatif1 Nov 21, 2026
ab7d8de
feat(sim-cli): workflows run --dir maps a failed run to the source fi…
waleedlatif1 Nov 21, 2026
f0aec11
feat(tables): a table route given a workspace finds the table by its …
waleedlatif1 Nov 21, 2026
ff2f1b9
Merge remote-tracking branch 'origin/staging' into fix/workflow-code-…
waleedlatif1 Nov 21, 2026
2416652
improvement(workflow-code): block meta written among a block's params…
waleedlatif1 Nov 21, 2026
62361fa
improvement(workflows): two variables renamed in one apply are refuse…
waleedlatif1 Nov 21, 2026
03ba3bd
fix(workspace-source): staged blobs count against the payer's storage…
waleedlatif1 Nov 21, 2026
633af19
Merge remote-tracking branch 'origin/staging' into fix/workflow-code-…
waleedlatif1 Nov 21, 2026
4d58326
fix(docs): close the API-samples loopback fixture's connections after…
waleedlatif1 Nov 21, 2026
c8d0a80
fix(files): wait on the outcome, not a 50ms sleep, in the superseded-…
waleedlatif1 Nov 21, 2026
a0f482c
fix(extension): open a fresh connection for each API-context call in …
waleedlatif1 Nov 21, 2026
f2e82fe
chore(sim-cli): simplify the DX changes: one lock reader, shared list…
waleedlatif1 Nov 21, 2026
2729a0d
refactor(workflow-code): simplify the final server fixes
waleedlatif1 Nov 21, 2026
867a3b2
chore: cleanup pass on the DX changes: comments and test audit
waleedlatif1 Nov 21, 2026
e4ca018
chore(workflow-code): tighten comments and prove dry-run create charg…
waleedlatif1 Nov 21, 2026
2fba0c0
chore(sim-cli): keep the run failure site reader private to its module
waleedlatif1 Nov 21, 2026
26b1294
chore: regenerate MCP operations and shrink the test-patterns baseline
waleedlatif1 Nov 21, 2026
2cd44f5
Merge branch 'fix/workflow-code-final-dx' into fix/workflow-code-final
waleedlatif1 Nov 21, 2026
4608a7b
fix(workflow-code): a source create refused for want of a slot answer…
waleedlatif1 Nov 21, 2026
649b895
fix(workspace-source): a staged blob an apply wrote stops counting to…
waleedlatif1 Nov 21, 2026
3e725ea
fix(workflow-code): the Code tab's source read runs in a slot lane of…
waleedlatif1 Nov 21, 2026
33c4857
fix(sim-cli): workspace status drops only compile and lint findings f…
waleedlatif1 Nov 21, 2026
577feed
fix(tables): a table name missing from a workspace answers exactly as…
waleedlatif1 Nov 21, 2026
e5144c4
docs(cli): the CI recipe commits the directory after a partial apply …
waleedlatif1 Nov 21, 2026
53bf0d8
fix(sim-cli): GitHub annotations give each file's path from the repos…
waleedlatif1 Nov 21, 2026
da94b4b
fix(table): a managed rows write refuses the row limit only when it g…
waleedlatif1 Nov 21, 2026
c9f4fce
docs(workflow-persistence): creation order is stable only for rows a …
waleedlatif1 Nov 21, 2026
a2e6c36
fix(files): a content read never retries a superseded storage key, an…
waleedlatif1 Nov 21, 2026
2503fa7
test(extension): every fixture API call goes through one helper that …
waleedlatif1 Nov 21, 2026
959c33b
fix(sim-cli): a workspace apply's step summary says what it wrote, an…
waleedlatif1 Nov 21, 2026
93f914d
fix(sim-cli): run --dir maps only a block's failure, reads a line onl…
waleedlatif1 Nov 21, 2026
2bd8ed9
fix(docs): the CLI reference keeps a help table laid out in columns, …
waleedlatif1 Nov 21, 2026
2d13168
docs(sim-cli): the workspace primer names exit 15, and --trigger says…
waleedlatif1 Nov 21, 2026
bc35fb0
test(logs): drop the logging-session check that only restated a pass-…
waleedlatif1 Nov 21, 2026
e4b2ec5
fix(tables): a bulk action on a table named twice, by id and by name,…
waleedlatif1 Nov 21, 2026
4e83741
docs(tables): a row cursor is sent back under the table reference the…
waleedlatif1 Nov 21, 2026
fa1bf73
fix(workspace-source): staging renews the blobs a batch re-sent even …
waleedlatif1 Nov 21, 2026
938f364
fix(self-hosting): Compose starts realtime only after the migrations …
waleedlatif1 Nov 21, 2026
cadce1e
refactor(workflow-code): simplify the combined changes: one lane tabl…
waleedlatif1 Nov 21, 2026
7da1bfa
chore: cleanup pass on the combined changes: tests assert outcomes, n…
waleedlatif1 Nov 21, 2026
805e17a
fix(sim-cli): keep the annotation file narrowed, and type the status …
waleedlatif1 Nov 21, 2026
66cb3e3
test(api): the table concealment policies answer the shared table not…
waleedlatif1 Nov 21, 2026
0c498a2
chore(sim-cli): keep the GitHub Actions check private to its module
waleedlatif1 Nov 21, 2026
21e0fbe
test(tables): build the export test's principal with the typed factory
waleedlatif1 Nov 21, 2026
ab89ebe
docs: record the CLI pages' changed code examples (the CI recipe and …
waleedlatif1 Nov 21, 2026
869406b
fix(workspace-source): staging a consumed blob again is checked again…
waleedlatif1 Nov 21, 2026
745995e
fix(table): a managed rows write is checked against the row limit onl…
waleedlatif1 Nov 21, 2026
d77e8cb
fix(tables): a bulk action resolves and dedupes every table reference…
waleedlatif1 Nov 21, 2026
2360030
test(sim-cli): tests start outside a GitHub Actions job, whatever the…
waleedlatif1 Nov 21, 2026
60b79b1
fix(sim-cli): a machine-format source status annotates its findings i…
waleedlatif1 Nov 21, 2026
45d590a
fix(workspace-source): staging rechecks the workspace payer under its…
waleedlatif1 Nov 21, 2026
35f7ee4
fix(workspace-source): a knowledge write that fails partway still con…
waleedlatif1 Nov 21, 2026
f3206ab
docs(workspace-source): staging an applied blob again counts it again…
waleedlatif1 Nov 21, 2026
2f41f4b
fix(logs): a run that fails after its input stage, before it runs, re…
waleedlatif1 Nov 21, 2026
d7279f4
fix(logs): a completion that falls back to the cost-only log keeps th…
waleedlatif1 Nov 21, 2026
41c4ab3
fix(workflow-code): block meta written among block()'s params points …
waleedlatif1 Nov 21, 2026
7c11885
fix(sim-cli): webhook URLs after an apply name blocks by the saved lo…
waleedlatif1 Nov 21, 2026
705a065
docs(catalog): a sunset block whose id is a base type with a visible …
waleedlatif1 Nov 21, 2026
cd81e29
fix(tables): a table name that starts with tbl_ is still addressable …
waleedlatif1 Nov 21, 2026
4c94efa
docs(sim-cli): the workspace loop help names every deletion --allow-d…
waleedlatif1 Nov 21, 2026
26daa04
refactor(workflow-code): simplify the round's fixes: explicit blob co…
waleedlatif1 Nov 21, 2026
5db10cc
test(logs): type the restored block state in the input-stage failure …
waleedlatif1 Nov 21, 2026
b35d94b
docs(sim-cli): the group help's create example names the workspace th…
waleedlatif1 Nov 21, 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
2 changes: 1 addition & 1 deletion apps/docs/content/docs/api-reference/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Some endpoints return an unpaginated bounded inventory or a provider-specific pa

## Rate limits

V2 request limits apply to the credential and its user or workspace. Workflow execution also applies separate synchronous/asynchronous execution buckets, quota, and concurrency policy. Writing workflow source (applying it, a dry run, or creating a workflow from it) draws on one tighter budget of its own, 20 requests a minute with bursts of up to 40, on every plan. Plan and deployment configuration determine the other limits.
V2 request limits apply to the credential and its user or workspace. Workflow execution also applies separate synchronous/asynchronous execution buckets, quota, and concurrency policy. Writing workflow source (applying it, or creating a workflow from it) draws on one tighter budget of its own, 20 requests a minute with bursts of up to 40, on every plan. A dry run, which writes nothing, draws on the source plan budget the plan routes use instead, 30 requests a minute with bursts of up to 60. Plan and deployment configuration determine the other limits.

A rate-limited request returns `429`; `Retry-After` gives seconds to wait. Inspect [Billing status](/api-reference/billing/getBillingStatus) for a workspace's current credits and storage. Async mode does not bypass admission or usage limits.

Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/docs/cli/blocks.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ sim blocks get <blockId>

| Argument | Required | Description |
| --- | --- | --- |
| `blockId` | Yes | Block type identifier. An unversioned base type resolves to the newest visible version. The response echoes the resolved ID. |
| `blockId` | Yes | Block type identifier. An unversioned base type resolves to the newest visible version. The response echoes the resolved ID. A legacy or deprecated block (such as `starter`) is readable by its exact ID, and its description opens with the block that replaces it. |

</CommandTable>

Expand Down
134 changes: 78 additions & 56 deletions apps/docs/content/docs/cli/reference.mdx

Large diffs are not rendered by default.

12 changes: 8 additions & 4 deletions apps/docs/content/docs/cli/scripting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -207,16 +207,20 @@ The CLI resends a request the API answers `429` only when sending it twice is sa
| Code | `sim workspaces source apply` |
| --- | --- |
| `0` | Applied, or a dry run with no errors |
| `1` | The source has errors, changes were held back for a secret or credential the workspace cannot satisfy, or command/request failure |
| `1` | The source has errors, every change it would write was held back for a secret or credential the workspace cannot satisfy (nothing was written), or command/request failure |
| `5` | A resource changed since the directory was read (`409 SOURCE_STALE`): get it again into a fresh directory, reapply the edit, and retry |
| `6` | A resource (a workflow or its folder, a table) is locked (`423`); a locked block exits `1` (`E_APPLY_LOCKED_BLOCK`) |
| `7` | The directory is over the size limits (`413`) |
| `8` | The apply stopped part-way: what was written is saved into the directory; apply again |
| `9` | Still rate limited (`429`) after the CLI's retries; nothing was written |
| `10` | Busy, retry: another apply is writing the workspace (`409 SOURCE_BUSY`), or another `sim workspaces source` command is using the same directory (`SOURCE_DIR_BUSY`); nothing was written: run the command again once the other finished |
| `13` | `AUTH_REQUIRED`: not logged in, or the server refused the credential; nothing was sent |
| `14` | Run without `--yes` and with no terminal to ask: the plan was printed with no errors and nothing was written; run the same command with `--yes` |
| `15` | Written in part: changes that use a declared secret with no value, or a credential key nothing binds to, were held back and the rest was applied and saved; set the secret or connect the credential, then apply again (a promotion with `--to` too) |
| `130` | Interrupted (Ctrl-C). A write already sent is finished and saved into the directory first, waiting up to 60s for its answer; a second Ctrl-C, or no answer by then, stops at once and prints that it may have been written and how to check |

Earlier CLI releases exited `1` when an apply held changes back, whether or not it wrote the rest. A script that reads `1` as "held back" should test for `15` too.

Both waits default to 3600 seconds; `--wait-timeout 0` waits indefinitely. `SIM_TIMEOUT_SECONDS` independently bounds one API request. A timeout does not cancel the underlying run or operation.

A synchronous or followed workflow run prints its result before exiting 1 for failure/cancellation. A paused run is not failed and can return 0; use `runs wait` or inspect status if your script requires completion. Fetching a failed run or listing runs only reports their state.
Expand Down Expand Up @@ -377,7 +381,7 @@ exit "$status"

## Workspace source in CI

Keep a [workspace source directory](/workflows/workspace-code) in a repository, `.sim/` included, and let CI plan each pull request and apply each merge. The dry run exits `1` on errors and `5` when the workspace changed since the committed base; `check` downloads the block catalog once on a fresh runner.
Keep a [workspace source directory](/workflows/workspace-code) in a repository, `.sim/` included, and let CI plan each pull request and apply each merge. The dry run exits `1` on errors and `5` when the workspace changed since the committed base; `check` downloads the block catalog once on a fresh runner. On GitHub Actions (`GITHUB_ACTIONS=true`), every source command also annotates each error and warning at its file and line, so they show inline on the pull request, and `apply` (a dry run too) appends its plan and errors to the job's step summary.

```yaml title=".github/workflows/sim-workspace.yml"
on:
Expand Down Expand Up @@ -410,7 +414,7 @@ jobs:
- run: sim workspaces source apply --dir workspace --dry-run
- if: github.event_name == 'push'
run: sim workspaces source apply --dir workspace --yes
- if: github.event_name == 'push'
- if: ${{ !cancelled() && github.event_name == 'push' }}
run: |
git add -A workspace
if ! git diff --cached --quiet; then
Expand All @@ -420,7 +424,7 @@ jobs:
fi
```

`check` runs first because it is offline and fast, and it regenerates `.sim/sdk/workspace.d.ts`, so the `tsc` step after it types resources the pull request adds. A workspace API key can apply tables, rows, knowledge bases, files, custom tools, MCP servers and credential bindings. Workflows, skills, secrets and deployments need a member's personal API key, and deployments need an admin. Apply rewrites files under the directory (each `.sim/base.json`, ids it allocated, values the server normalized), and the next apply compares with them, so the last step commits them back to the branch; `[skip ci]` keeps that commit from running the job again. Where the branch is protected, run `sim workspaces source get --dir workspace` on a new branch instead and open a pull request. After merging two branches that each applied, a dry run with no changes means the files match the workspace. Exit `5` means a resource changed since this branch's base: get the workspace into a fresh directory and carry the edit over. Exit `10` means another apply is writing the workspace (or another command is using the directory), so retry; the `concurrency` key keeps two runs of this job from overlapping.
`check` runs first because it is offline and fast, and it regenerates `.sim/sdk/workspace.d.ts`, so the `tsc` step after it types resources the pull request adds. A workspace API key can apply tables, rows, knowledge bases, files, custom tools, MCP servers and credential bindings. Workflows, skills, secrets and deployments need a member's personal API key, and deployments need an admin. Apply rewrites files under the directory (each `.sim/base.json`, ids it allocated, values the server normalized), and the next apply compares with them, so the last step commits them back to the branch; `[skip ci]` keeps that commit from running the job again. That step runs even when the apply failed (`!cancelled()`), because an apply can fail having written part of its plan: exit `15` means it held back changes that use a secret with no value or a credential nothing binds to and applied the rest, and exit `8` means it stopped part-way. Either way the directory records what was written, so committing it keeps the next run from being refused as stale (exit `5`) for resources this run wrote; the job still fails, so set the secret, connect the credential or fix the failure, and push again. Where the branch is protected, run `sim workspaces source get --dir workspace` on a new branch instead and open a pull request. After merging two branches that each applied, a dry run with no changes means the files match the workspace. Exit `5` means a resource changed since this branch's base: get the workspace into a fresh directory and carry the edit over. Exit `10` means another apply is writing the workspace (or another command is using the directory), so retry; the `concurrency` key keeps two runs of this job from overlapping.

To promote the same directory to a second workspace, add a step with `--to` before the step that commits the files back:

Expand Down
Loading
Loading