mirror of
https://github.com/simstudioai/sim.git
synced 2026-11-22 05:07:51 +08:00
staging
658
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
293ec1b7e1 |
improvement(workflow-code): server hardening, flaky test root causes, and agent DX across the source loop (#10287)
Server: dry runs charged to the plan budget and slot, create-from-source answers 429 when slots are full, the Code tab has its own slot lane, staged blobs count against the payer's storage quota (consumed on apply, never renewed by reads), file deletes carry a revision precondition, row limits refuse only growth, joined table transactions keep their timeouts, and blocks/edges/subflows load in a stable created_at,ctid order. DX: group help for the source loop, a primer covering renames, failures and test runs, JSON-only output, run errors mapped back to source file and line, --stop-after/--from-block by name, webhook URLs after deploy, GitHub Actions annotations and step summary, exit 15 for a partial write, table names on every table route, status that agrees with the dry run, and quieter output. Flaky tests fixed at the root (keep-alive races, sleep-based waits). Migration 0469 adds a nullable staged_blob.consumed_at. |
||
|
|
8bc0ce281e |
fix(sim-cli): publish when bundled packages change, complete third-party licenses, and fix docs drift (#10279)
The CLI republishes when any package it bundles changes (trigger paths derived from the bundle's real dependency graph and guarded by a new check:sim-cli-bundle audit), THIRD_PARTY_LICENSES lists every bundled package, and sim-cli is released as 2.3.0. Workspace apply keeps a tool code file the server reprinted as stored() and warns, outline prints block ids as sent, and the scripting exit tables, SDK README, code page and git provenance docs match the CLI. |
||
|
|
825a419194 |
chore(cleanup): simplify what the Redis, config and removal changes left behind (#10286)
* chore(cleanup): simplify what the Redis, config and removal changes left behind * docs: name every Search and Redis requirement precisely |
||
|
|
7a902fc425 |
improvement(ci): drop the e2e build's persistent compiler cache (#10281)
* improvement(ci): drop the e2e build's persistent compiler cache * fix(ci): turn the build filesystem cache off explicitly, since Next enables it by default * chore(ci): drop the dead build-cache prune mode and document the compiler cache removal |
||
|
|
534c8ba79a |
chore(mothership): take the worker's typed stream contract, own telemetry names in Sim, and rename go-era names to worker (#10273)
* chore(mothership): take the worker's typed stream and pruned telemetry contracts, and rename go-era names to worker * fix(mothership): keep the persisted goRoute recovery key, drop the write-only trace collector and dead _serviceCost output Recovery rows keep the goRoute key every deployed Sim parses, so a rollback or mixed-version deploy still takes over in-flight runs; workerRoute is the in-memory name only. Also removes TraceCollector and its span plumbing (nothing read it), the _serviceCost tool output no reader consumes, Go-era span data fallbacks (pending, tool_call_id), the Go-only billing replay live test, and takes the worker contract's removal of the async tool status by owning it in async-runs. * improvement(mothership): type the subagent span guard from the contract's span data * improvement(mothership): own Sim's telemetry names, map the goRoute recovery key in one place, and simplify the stream contract types - Move the trace span, attribute, attribute-value, event and metric name tables out of generated/ into lib/mothership/observability/ as Sim-owned code; the worker no longer syncs them. CODEOWNERS keeps them with the mothership team. - StreamRecoveryConfigSchema reads the persisted goRoute key as workerRoute, and persistedStreamRecoveryConfig writes it back as goRoute, so no caller names the stored key. - Derive SyntheticFilePreviewEventEnvelope and EnvelopeToStreamEvent from MothershipStreamV1Envelope, drop a duplicate doc comment, and replace a nested ternary in applyStreamEvent with plain branches. * chore(mothership): sync the worker's simplified stream contract * chore(mothership): carry the worker renames into the chat routes staging moved * test(mothership): compare the admitted run's recovery with the persisted goRoute shape * chore(mothership): drop the dead vfs snapshot contract and point protocol docs at the worker catalog * chore(mothership): sync the worker's consolidated billing contracts |
||
|
|
754a28ebf7 |
fix(executor): a loop whose condition cannot be evaluated fails instead of ending early as success (#10282)
Counted loops (for, forEach, count-driven doWhile) decide continuation natively instead of evaluating <loop.index> < N in the isolated VM, so a sandbox failure can no longer truncate them. A while/doWhile condition that cannot be evaluated (user error, VM error result, VM rejection, unresolved reference) now fails the loop with a visible, secret-projected error and loop error log instead of returning false and reporting success. User errors are attributed to the user, and the failure is marked logged so the engine does not log it twice. |
||
|
|
dfff8c3451 |
refactor(workflow-code): simplify the source dir lock release and drop casts from the QA fixes (#10276)
Removes the source directory lock and uninstalls its interrupt release in one synchronous step (replacing three layered fixes), types the block rename rewrite by its input, writes the column strip without a cast, builds the loop fixture from a parameter, and folds a few single-use helpers. Behaviour is unchanged apart from the lock never being left half removed. |
||
|
|
85ea094e7a |
chore(redis): require Redis and remove the no-Redis fallbacks (#10272)
* chore(redis): require Redis and remove the configuration fallbacks * chore(redis): remove the remaining no-Redis paths across the app, realtime, setup and deploy config * fix(redis): resolve rate-limit storage lazily and address review findings * improvement(redis): address review threads and simplify the leftovers of the fallback removal * fix(redis): keep unit tests off a real Redis and update integration tests for lazy channels * chore(redis): drop stale fallback references after rebasing |
||
|
|
6787693efb |
fix(workflow-code): staging QA fixes for runtime, promote, workspace and CLI source (#10262)
* fix(workflows): match child selected outputs by normalized block name in sync runs findChildSpanOutput compared the normalized span name with the caller's raw block ref, so a capitalised or spaced child block name was silently omitted while the parent and streaming paths matched it. * fix(executor): a join condition inside a loop reads the branch that ran this iteration resolveSourceBlockId took the first incoming block whose state said executed, and a block state keeps that flag across loop iterations, so the edge drawn first won. It now reads executedBlocks, which the loop clears between iterations. * fix(workflows): an operations-batch block rename rewrites references to the block The ops path (Copilot, API, sim workflows operations apply) only set block.name, leaving <oldname.field> references dangling, so runs emitted the raw template. The reference rewrite moves to lib/workflows/references/block-rename.ts and the editor rename, workflow import, and ops rename all use it; the editor store's inline copy (unescaped regex, stateful global test) is gone. * fix(workflows): coerce a numeric-string loop iterations or parallel count on the ops path An operations batch stored iterations: "3" or count: "2" as a string, which the loader then reset to its default (1 iterations, 5 branches) with no error. A numeric string is now stored as its number, as slider inputs coerce; any other value is an input validation error that keeps the current count, so --atomic refuses it. * test(executor): use the central tools mock in the loop join test; shrink the explicit-any baseline * fix(workspace-source): a promotion deletes what the directory deleted since the last one A resource the promotion record holds that the directory no longer declares stays in the base, so the apply plans its delete and refuses it without --allow-delete, as an apply to the directory's own workspace does. Only resources no promotion left in the target are named W_PROMOTE_DELETES_TARGET_ONLY. * fix(sim-cli): the promotion stale hint no longer suggests deleting the record Deleting .sim/targets/<id>.json made the next promotion overwrite every change made in the target since, rows its workflows wrote included, while the hint read as keeping the target's version. The hint now offers only the flows that keep the target's data and says what deleting the record does. * fix(table): a source reshape strips a dropped column's cells in its own transaction The strip ran after commit in the background and moved the managed rows' version after the apply recorded it, so the next status reported server row drift and a delete of the table was refused as stale. For a managed table the strip now commits with the reshape, so the recorded version holds it. * fix(workspace-source): name-taken, table-folder and credential findings say what to do A workflow create refused for a taken name gets its file and a hint, without the use case's 'or in another folder', which a directory cannot express; the workspace guide's exit table names E_NAME_TAKEN. E_TABLE_FOLDER and E_KB_FOLDER name the folders create command, and the credential finding no longer reads 'has no a slack credential'. * fix(sim-cli): a stale resource is not printed as kept, and promotion drift hints the target The plan line of a resource refused as stale said 'kept as the server has it'; it now says the edit is refused as stale. A promotion's W_SERVER_CHANGED pointed at a get of the directory's own workspace; it now names a get of the target. * fix(workspace-source): a real apply lists each finding of a written workflow once A workflow's commit runs its pipeline again and re-reported every finding its plan had found, so a real apply listed each warning twice. A write's finding now replaces the plan's (matched without the block id the commit gave it). * fix(sim-cli): a workspace get says why it skipped a resource A table over 10,000 rows (or any resource the get cannot read as source) was only counted in the result, with the reason in .sim/skipped.json. The get now prints each skipped resource with its reason. * fix(workspace-source): a stale workflow folder gets the hint every other kind's stale finding has The workflow pipeline's E_APPLY_STALE carried its single-directory advice in the message and no hint; a workspace plan now reports it as staleFinding does for every other kind, naming the folder and the get to run. * fix(sim-cli): a delete refused for want of --allow-delete is not printed as unchanged * test(workspace-source): wait for the column strip with sleep * fix(workflow-code): tie a falsy-valued variable rename by its moved references * fix(sim-cli): prune only function files the CLI recorded writing * fix(sim-cli): status leaves out function files no codeFile() names and drops the stale plan line * fix(workflow-code): lay out a block moved into or out of a loop or parallel * fix(workflows): word the variable rename hint so its first step can work * fix(workflow-code): refuse an unknown dropdown option on an edited block in check and apply alike * fix(sim-cli): release the directory lock when Ctrl-C ends a deferred write * fix(sim-cli): leave a codeFile() path with a NUL byte to the compile's E_CODE_FILE_PATH * fix(sim-cli): say the truncation marker leaves out the info findings a result hides * fix(sim-cli): count every compile finding a check fails on, past the per-code cap * chore(rules): load the workflow-code rule for the folders wave 2 moved its code into * fix(workflow-code): reword the renamed-block hint, which an apply that keeps the id already follows * fix(sim-cli): pin the deploy an apply names as its next step to the draft it saved * fix(sim-cli): deploy nothing after a no-op apply whose draft the live version already matches * fix(workflows): say what a block bound to when its claimed lock id is ignored * fix(workflow-code): report the code-file total-size cap once, on the file that crosses it * docs(cli): regenerate the CLI reference * fix(workspace-code): keep target-only resources on promote --allow-delete; delete them only with --delete-target-only Plain --allow-delete on a promotion now deletes only what the promotion record proves the directory deleted. Resources only the target holds stay out of the base, so the server keeps them and names each (W_UNDECLARED, with a promotion hint). --delete-target-only, which needs --to and --allow-delete, opts into deleting them. A target-only delete the apply held back is no longer written into the promotion record, where it read as a directory delete on the next promotion. * fix(table): strip a source apply's dropped managed columns once, under a row-scaled timeout The in-transaction strip ran once per dropped column under withLockedTable's 10 s default statement timeout. reshape now collects the dropped column ids and strips them in one pass with stripDroppedColumnData, which scales the statement and idle timeouts per row as the sibling column rewrites do. The carried-over non-null assertion on the row filter is gone. * fix(sim-cli): workspace status and apply leave out function files no codeFile() names readWorkspaceDir drops each file under a workflow folder's functions/ that neither its workflow.ts nor its lock names, through the same codeFilePaths rule the workflow directory status uses. A workspace status no longer reports such a file as a local change (exit 11 forever), names it on the 'Not named by any codeFile()' line, and an apply no longer sends that folder whole for it. * fix(workflow-code): refuse an unknown dropdown option only on a field the edit sets, and not on deployment-shaped options offline The server now passes the fields its value gate judges (changedSubBlockFields) into the shared refusal rule, so a stored out-of-options value written bare again on an edited block is no longer refused. The catalog marks options a registry function derives from deployment settings (optionsVary); the CLI's offline check keeps a value outside them a warning, since its cached catalog may have been built under other settings, and leaves the verdict to the server. * fix(workspace-source): match a re-reported finding by block key, keeping the block id when it names no key The write-time finding dedup dropped blockId from the key outright, so two findings that differed only in the block they named by id merged into one. * fix(workflows): accept only a whole loop iterations or parallel count of at least 1 on the ops path containerCount took whatever Number() accepted, so "1e3", "0x10", "2.5", "-1" and "0" (and the numbers -1 and 2.5) were stored silently. They are now refused as input validation errors, the bound source compile holds a count to. * fix(workflow-code): keep omitted compile findings as one counted entry per code and block Reporter.omitted kept one object per warning past the caps. It now counts them per code and block, so what a compile keeps stays bounded by the blocks it reads; the CLI check sums the counts. * test(workspace-source): scope the racing authorize spy to its own workspace and tool The spy edited its tool on any delete authorize call, so a test that timed out with the spy still installed could edit the tool of whichever test ran next. * fix(workspace-source): charge a workspace dry run to the plan budget, not the write budget A workspace apply with ?dryRun=true writes nothing and runs what a plan runs, yet drew one write unit per workflow folder from the 40-token bucket real applies share, so the preview of a 61-workflow apply left the apply waiting about two minutes. The route's new sourceApply policy charges a dry run to the source-plan bucket the status plan route uses and a real apply to the write bucket, each still per folder sent with its files and capped at the smaller bucket. * fix(workspace-source): type the block fields findingIdentity reads off a workflow finding * chore(audits): shrink the non-null assertion baseline after the column strip lost its `!` * fix(sim-cli): keep a deployment-shaped option warning unraised under the default strict mode The optionsVary exemption skipped the edit refusal but the strict raise still turned W_UNKNOWN_OPTION into an error on a new block. Listed, withheld and omitted findings now all skip the strict raise when the option varies by deployment. * fix(workflows): refuse a falsy loop iterations or parallel count on add and nested edit The add and nested-edit paths guarded on a truthy value, so 0, false, null and '' skipped containerCount and saved the default. They now check presence, as the top-level edit does. * fix(workflow-code): find a falsy-valued variable's readers by resolved block, so a reader renamed in the same edit still ties the rename * fix(sim-cli): status leaves a recorded function file no codeFile() names out of deletions while it is on disk * fix(workflows): write a renamed block's new name into references literally, not as a replace pattern * fix(workspace-source): scope a taken workflow name to its folder, and hint a taken file name be renamed locally * test(workflows,workspace-source): assert the stored out-of-options value after apply, and the strip without polling * test(workflows): match the added loop by shape, which the loose state type allows * fix(sim-cli): count an omitted refusable finding as an error where the apply would refuse it A check listed the first 20 refused findings of one code as errors but counted the rest the caps left out as warnings, so an edited code file with 25 missing references reported 20 errors. The compile now keeps a refusable omitted finding's file and field, and the check judges it with the same refusal rule as a listed one. * fix(workspace-source): hint a file path's folder that a Sim folder holds be renamed as a folder * test(workspace-source): fail the dropped-column strip test when the seeded column is missing * fix(sim-cli): an interrupt after a command released its directory lock leaves the next command's lock The lock's interrupt release stayed installed while the command removed the folders it created, and it removed the lock path by name. A second command could take the lock in that window, and an interrupt then deleted the second command's lock. The release targets the lock only until this command removes it. * fix(workflows): an operations-batch block rename rewrites a loop's or parallel's collection and conditions renameBlock rewrote references only in sub-blocks, so a loop iterating <fetch.items> kept the old name after Fetch was renamed and failed at run time. It now also rewrites the collection, while and do-while conditions a loop or parallel holds in data, which the loop and parallel records are rebuilt from. * test(workflows): set the loop fixture's collection and conditions without a type cast * fix(sim-cli): an interrupt removes the directory lock only while it still names this command Clearing a flag after the async rm left a window: once the folder was gone, another command could create the lock before the flag was set, and an interrupt then deleted it. The interrupt release now reads the lock's owner record and removes the lock only when it names this process and host (before the record is written, the lock is this command's by construction). * fix(sim-cli): uninstall the lock's interrupt release even when removing the lock fails |
||
|
|
e6f6a0f36f |
improvement(config): derive enterprise flags from one registry, add REGISTRATION_MODE, merge vLLM and LiteLLM (#10271)
* improvement(config): derive enterprise flags from one registry and merge the vLLM and LiteLLM providers * improvement(auth): replace the three signup toggles with REGISTRATION_MODE * fix(config): address review findings * fix(setup): advise the registration mode in effect; refresh docs fence sizes * improvement(config): simplify the registry and registration seams; retire the sandbox readiness marker * fix(config): expose the registration mode through getRegistrationMode * chore(docs): refresh the compatibility baseline after rebasing * fix(providers): use static log messages in the self-hosted core; document registration helpers |
||
|
|
287a110ebf |
chore(cleanup): remove dead chart options, the playground and legacy chat routes; contract retired DB objects (#10269)
* chore(cleanup): remove dead chart options, the playground and legacy chat routes; contract retired DB objects * fix(cleanup): address review findings * fix(emcn): drop the folder title and selection callback nothing reads * fix(egress): name both allowlists in the removed-variable startup error * chore(docs): refresh the compatibility baseline for changed pages * improvement(cleanup): drop dead folder plumbing and stale names left by the removals |
||
|
|
2edb436dc8 |
chore(mothership): take the remaining contracts from the worker and drop the Go contract generators (#10264)
* chore(mothership): take the remaining contracts from the worker and drop the Go contract generators The Go copilot is being removed from the mothership repo. The eight contracts Sim generated from its JSON (stream, billing protocol, vfs snapshot, trace and metric names) are now worker-owned TypeScript copied in by the worker's contracts:sync, so the eight json2ts sync scripts and the mship:generate umbrella go. The base tool catalog moves to the worker's packages/contracts, and mship-tools:generate reads it there. * chore(mothership): point the pi sandbox note at the moved mothership sandbox * chore(mothership): drop the unused json2ts dependency and keep the ship note's catalog path a placeholder * fix(mothership): type the auto-model router call from the worker's model-router contract The worker now serves POST /api/model-router again (mothership D116); only the Go service did, so every sim-auto block has fallen back to its default model since the cutover. The resolver takes its request and response types from the synced contract instead of a hand-kept copy. |
||
|
|
0a61e14e15 |
improvement(models): retire deep research, refresh model lifecycle, pricing, and reseller catalogs (#10255)
* improvement(models): remove the retired Gemini Deep Research path * improvement(models): refresh model lifecycle, pricing, and reseller catalogs * fix(models): mirror reseller capabilities and lifecycle, add missing long-context tiers * fix(models): keep retired models from claiming structured outputs on the catalog pages * fix(providers): bill cached prompt tokens at the cached rate for Chat Completions providers * fix(providers): type the Groq client mock in the cache billing test * fix(providers): expect per-call metering in settled Z.ai streams and keep meter types local * chore(audits): shrink baselines for the removed deep research code |
||
|
|
8d8606e546 |
chore(scripts): enforce generate/check pairs and regenerate every artifact with bun run generate (#10254)
* chore(scripts): enforce generate/check pairs and regenerate every artifact with bun run generate * fix(scripts): keep the generator audit from flagging its own test input * fix(scripts): order docs before deployment config and gate the pre-push regenerate on a clean tree |
||
|
|
1d1ff5bf7b | chore(sdk): generate the SDK fixture catalog from a script and add a generate-all umbrella (#10253) | ||
|
|
c34a82f627 |
chore(whitelabeling): remove whitelabeling and its branding plumbing (#10246)
* chore(whitelabeling): remove whitelabeling and its branding plumbing * fix(whitelabeling): complete session policy test input and shrink non-null baseline |
||
|
|
170279a066 |
improvement(ci): start http e2e jobs beside the e2e build (#10244)
* improvement(ci): start http e2e jobs beside the e2e build * fix(ci): bound the wait-script test's child process |
||
|
|
26caf900ca |
refactor(workflow-code): source pipeline plan/commit split, one findings bound, CLI source-dir split (#10238)
Wave 2 of the workflows and workspace as code cleanup: plan/preview/commit stages bound to the planning principal, one diagnostics module and answer bound, CLI source-dir split with typed refusals and a command lock, @sim/table-cells, plus review fixes (plan writes nothing, functions/ pruning limited to lock-named code files, local refusals never read as unreachable). |
||
|
|
9ca9ace469 |
feat(diff): render diffs with Pierre diffs and share one syntax palette (#10234)
* feat(diff): render code diffs in diff embeds with Pierre diffs Code diffs in ```diff fences now render through @pierre/diffs: syntax highlighting by file type, word-level changes, and per-file headers for multi-file git diffs, themed with Sim's surface and badge tokens. Our parser still validates the fence and resolves sim: sources; its hunks are written back out as a well-formed patch, so agent diffs without hunk line numbers keep working with line numbers hidden and hunk headings shown. DiffView keeps only the side-by-side document comparison, which Pierre does not cover. * feat(diff): one diff renderer and one syntax palette across Sim Workflow comparison field diffs now render through Pierre too, on the full before and after text: syntax highlighted by field (code language, JSON, prose), word-level changes, and expandable folds. The hand-rolled line engine in text-diff-lines.ts and its test are gone; the size guard, the one-sided cap and the expand-all control stay. Both diff surfaces render through SimFileDiff, which owns the theme, the +/- markers and Sim's change colors. Diffs color code like Code does: the Prism palette in code.css is now --code-token-* variables, and the Shiki scope mapping docs already maintained moved into emcn (syntax-theme.ts) so docs and the app share it. Docs output is byte-identical and Prism code blocks are pixel-identical. Embed polish: hunk separators show only the heading, diffs without line numbers keep their first heading, and the patch conversion moved to lib/diff/patch.ts with tests. * fix(diff): keep a hunk header's own line positions A numbered hunk that only inserts or only deletes has no line carrying the empty side's position, so it was re-derived from the previous hunk and the header pointed at the wrong lines. The parser now keeps the header's starts and the patch conversion emits them verbatim, inventing positions only for diffs written without line numbers. * chore(audits): drop baseline entries for the removed text-diff-lines * fix(diff): address review findings on the diff renderers - Render a diff's lines in the order they were written: Pierre's similarity realignment could split one written change into several blocks. - Show line numbers only when every hunk has them, so positions invented for an unnumbered hunk never appear in a mixed diff. - Highlight code fields through an explicit map of the languages blocks offer, adding TypeScript (Daytona) and keeping shell as bash. - Say "Only line endings changed" when normalizing line endings leaves a changed value with no visible difference, instead of an empty diff. - Watch the syntax theme's folder in docs watch mode, since an editor's atomic save ends a watch on the file itself. * fix(diff): resolve a code field's language from either version A removed block's language exists only in the base version, and an empty saved language short-circuited the lookup, so both fell back to JavaScript or to no highlighting. The language now comes from the target values, then the base values, then the field default, through a Map so only the listed languages can match. |
||
|
|
892d8d8b5a | improvement(ci): run the large permission import e2e beside organization search (#10225) | ||
|
|
bc8f09ccb1 |
feat(workflow-code): workflows and workspace as code (#10129)
* test: type the MCP base address the concealment check compares
* fix(workspace-code): check file path collisions on a segment tree, not a map of every prefix
Keeping every folder prefix of every path still held about a million prefix strings for
20,000 deep paths. A tree of folded segments costs one fold per segment and holds each
segment once, so the depth cap is no longer needed.
* refactor: drop the exports of isSuspiciousCharacter and readFolderWritten, used only in their files
* docs(workflow-code): CI needs a personal key; document workspace-key E_APPLY_FORBIDDEN and --only
workflows.source.apply and create deny workspace API keys, so the CI guidance now asks for a
personal API key or an OAuth login. Workspace as code names the kinds a workspace key cannot
write (workflows, skills, secrets, deployments), the E_APPLY_FORBIDDEN refusal, and narrowing
an apply with --only.
* docs(workflow-code): link the code pages from workflows, CLI, getting started, API and MCP
Adds a For coding agents section to Workflows as code (get, edit, check, status, apply, starting
from .sim/AGENTS.md), a prefer-source note on the API build guide, and an MCP section on editing
a whole workflow with getWorkflowSource and applyWorkflowSource.
* docs(self-hosting): document the WORKFLOW_CODE preview flag
Adds a Preview features section with WORKFLOW_CODE and links it from the in-preview callouts on
the workflows and workspace as code pages.
* feat(workflow-code): Code tab header with Preview label, CLI copy and docs; Download as code
The Code tab gets a title row: a Preview badge, a button copying
sim workflows source get <workflowId> --dir ./<workflow-name-slug>, and a link to the docs.
The workflow menu gains Download as code beside Export workflow, saving the draft as the
single TypeScript file the Code tab shows (function code inline). The download revalidates the
cached source by ETag first, so an edit since the tab last read is never missed.
* chore(rules): load the workflow-code rule for the v2 source routes, contracts and staging cleanup
* feat(llms): list workflows as code in llms.txt
* docs(cli): workflows and workspaces as code in the README, help epilogue and source group descriptions
Adds a README section (get, check, status, diff, apply and the coding-agent loop), a source get
example to the root help, and describes both source groups as read and apply, marked (preview)
while the server flag gates them. Regenerating the CLI docs changes nothing: the pages list each
command, not group descriptions or the root epilogue.
* test(workspace-source): a re-run adopting a stopped MCP replace with stored() headers still needs an admin
A workspace key re-running an interrupted replace is refused with E_APPLY_FORBIDDEN, the
owner's re-run finishes it, and a read-only member's get prints the adopted server's
literal headers as stored().
* feat(workflow-code): roll the workflow-code flag out by organization, workspace or user
Every source use case, the Code tab layout and useFeatureFlag now evaluate
workflow-code against the workspace, its organization and the acting user,
so AppConfig orgIds/workspaceIds/userIds allowlists take effect. Adds the
rollout plan to the workflow-code design doc.
* feat(mothership): grant the workflow-code entitlement where the source commands run
computeEntitlements now sends workflow-code to the worker for a workspace or
organization chat whose rollout has the flag on, ahead of the worker's
ENTITLEMENTS enum (the wire accepts any name). The CLI inventory marks every
workflows source and workspaces source command with entitlement: workflow-code
so the worker can hide them once it reads the field.
* docs(api): say how workspace source blobs are staged, and that dryRun previews
The applyWorkspaceSource description pointed MCP readers at Stage Workspace
Source Blobs, a multipart route MCP does not expose; it now names the CLI and
the blob upload route. The MCP write tool no longer claims no write can be
previewed: the source applies take dryRun.
* feat(analytics): record workflow source reads and dry runs, and workspace source applies
Adds workflow_source_read, workflow_source_dry_run and workspace_source_applied
beside workflow_source_applied: same attribution, kinds and counts only. A
refused dry run is now a dry-run event, never an apply.
* docs(workflows): commit written.json and point workspace CI to its own section
* test: read the MCP server URL as nullable in the stopped-replace check
* test(workflow-code): resolve the workspace before the flag in the HEAD 403 check
The flag now needs the workspace's organization, so the read routes resolve
the workspace first; the test gives them one to resolve.
* test(analytics): one workspace_source_applied per apply, refused, partial or committed
Busy, rejected and partial applies each record exactly one event with their
outcome, the committed retry one more, and a dry run none.
* fix(cli): resend a rate-limited GET even when its response body is lost
Cancelling an errored body rejects, so a 429 whose body was lost threw the raw
stream error instead of resending.
* fix(tests): order the workspace source "nothing was written" snapshots by id
The snapshots compared before and after a refused apply selected rows with no
ORDER BY, so their order was whichever index the planner chose: on the
workflow table the sort, unique-name and workspace_id indexes each return a
workspace's rows in a different order. Once autovacuum analyzed the table
between the two reads the plan could change, and the cross-kind test failed
with equal rows in a different order. Forcing the second read off index scans
reproduced the exact failure; ordering by id makes the comparison
plan-independent.
* refactor(source): one vocabulary for the fingerprint of what the server stores
PlannedChange.serverFingerprint is storedFingerprint and KindAdapter.fingerprintNow is
storedFingerprintNow; the workflow adapter's currentFingerprint() is readStoredFingerprint;
the sf1: helper in print-stored is storedSourceFingerprint, beside the kinds' rf1:
storedFingerprint; the workflow apply's local and EvaluatedSource field are storedFingerprint,
as source-commit already named it. The 409 wire field currentFingerprint is unchanged.
* fix(workflow-sdk): the workspace runtime exports defineSecrets and defineCredentials
secrets.d.ts and credentials.d.ts declare them and the cookbook imports them, but the
runtime entry did not export them, so running such a file failed with 'export not found'
instead of SimSdkNotExecutable. codeFile now re-exports core's stub, as tool.d.ts declares.
A test keeps the runtime's exports equal to every value the declarations declare.
* fix(workspace-source): re-scan deletes for new users under the apply lease
The plan's in-use scan ran before the lease, so an apply that saved a workflow
using a resource another apply was about to delete went unseen: the deleting
apply took the lease and deleted anyway. The apply now scans its deletes again
once it holds the lease and refuses (E_APPLY_STALE, nothing written) a delete
that a workflow the plan did not find now uses; a scan timeout still fails
closed.
* fix(cli): take a stale source-directory lock over safely, never through a link
Two commands that found one lock stale could both remove it: the later one's
removal deleted the live lock the first had taken, admitting two writers. A
takeover now claims the stale lock folder it removes (only one command can) and
checks it is still stale first, so a lock that replaced it is left alone.
The lock path also bypassed the source directory's symlink checks: a .sim or
command.lock that is a link was followed. Both are now refused
(SOURCE_SYMLINK) before the lock is created, read or removed.
* fix(cli): workflow commands in a workspace folder hold the workspace directory lock
A single-workflow apply, create or get inside workflows/<key>/ of a workspace
directory rewrites the workspace's written record and base, but took no lock, so
it could interleave with a workspace command (or another folder's) and lose a
record. These commands now hold the workspace directory's command lock for the
whole command, refused like a workspace command (SOURCE_DIR_BUSY, exit 10)
with nothing read or written.
* fix(cli): status recommends commands in its own scope, with --allow-delete for dropped data
The command workspaces source status recommended dropped the scope it was asked
for: status --only tables suggested an apply of every kind, and a status pointed
at a workspace with --workspace suggested one at the profile's. Every
recommended command now carries --only and, when the target is not the
profile's default, --workspace.
It also asked for --allow-delete only for whole-resource deletes, so an update
that drops a column was suggested without it and refused. It now uses the same
destructive count the apply prints.
* fix(cli): an apply that reprints a tool as stored() removes its old code file
When the server keeps a tool's code as stored() (it holds a credential), the
apply reprints tools/<key>.ts without tools/<key>.js, but saving the answer
left the old .js and its digest behind, so the next apply failed with
E_TOOL_CODE. Saving an apply now removes, from disk and the written record,
every text file the directory sent for a reprinted resource that the reprint no
longer holds (workflow folders keep pruning by lock).
* refactor(table): move cell value rules into @sim/workspace-code/table-cells
The per-type coerce/validate/salvage/equality rules, the row loops (required
cells, coercion policy, batch unique scan) and the pure date, currency, ttl and
select helpers move from apps/sim/lib/table into the workspace-code package
(timezone helpers into @sim/utils/timezone). The column-type registry spreads
CELL_RULES into each definition and validation.ts delegates, so there is one
implementation. The workspace source table adapter refuses declared rows with
refusedTableRows, which the CLI can now run offline.
* feat(sim-cli): workspaces source check validates table rows files offline
Each tables/<key>.rows.jsonl (managed or seed) is read against its declaration
and checked with the write's own rules (refusedTableRows): a malformed line, an
undeclared column, a managed key two lines share, an empty required cell, a
unique value two rows share, a value its column's type or options cannot hold.
Each is an E_TABLE_ROWS error at its line.
* fix(workspace-source): credential adoption never takes a credential from a key bound outside source
* test(workspace-code): assert linear growth, not a wall-clock budget, for hostile inputs
The file-grouping test asserted 20,000 deep paths group within 6 s and took 7.2 s
on a CI runner. It now counts the characters case folding reads at depth 100 and
400 (about 4x linear, 15x for the per-prefix fold it guards against), which no
machine load changes. The two compile tests with a 3 s budget (JWT pattern,
numeric precision) now compare the fastest of three runs at n and 4n: reverting
either fix gives about 15x against a bound of 9.
* fix(table): a seed reshape refuses a table that gained rows since the plan saw it empty
* fix(table): a keyed row write inside a reshape runs at the bulk-write statement timeout
* fix(workspace-source): hold the apply lease from before the plan, not only the writes
An apply planned before taking the lease, so another apply could write between
its plan and its writes: the first then wrote half of itself and failed
(E_NAME_TAKEN, E_APPLY_STALE), or deleted a resource a workflow had just
started using, because its in-use check had run before the other apply's save.
A non-dry-run apply now takes the lease first and plans and writes under it, so
a second apply is refused SOURCE_BUSY before it reads anything. This replaces
the post-lease in-use re-scan, which covered only deletes. Dry runs still take
no lease; the per-write lease confirm and stored-fingerprint re-checks stay for
UI edits, which the lease does not order.
* fix(workspace-code): literal-secret findings carry a span but no code frame
E_MCP_LITERAL_SECRET, E_DEPLOY_SECRET, W_TOOL_LITERAL_SECRET and the workflow
W_LITERAL_SECRET framed the line holding the secret, echoing it over v2 and MCP.
They keep their span; the finding cap and the server locator drop the frame too.
* fix(workspace-source): a secret declared without a description records no base entry, so it is never falsely stale
* test(workflow-code): time hostile inputs with Date.now, repeated past the clock's resolution
The package has no Node or DOM types, so performance is not declared. Each
growth timing now repeats the work until it spans 25 ms, so millisecond steps
do not swing the ratio.
* fix(workspace-code): an env reference or helper call is never read as an object
headers: env.TOKEN parsed with no finding into a header named $env, and
defineTable(column.string()) reported the encoding's $call/args fields. Both
now get one finding that names the value and how to write the object.
* feat(workflow-code): mixed-script block names, workflow inputs, env hint target
- E_LOOKALIKE_NAME also refuses a block name with a word mixing Latin with
Cyrillic, Greek, Armenian or Cherokee letters (Unicode script property, no
confusables table), naming the code point; W_ when the block is stored.
- startInputs and INPUT_TRIGGER_TYPES (shared with apps/sim) read a workflow's
Start trigger inputs; W_CHILD_INPUT_UNKNOWN and W_CHILD_NO_START join the
vocabulary for the CLI's offline child-call check.
- CompileInput.envDeclaredIn points a W_ENV_UNKNOWN hint at secrets.ts.
* feat(sim-cli): workspaces source check covers skills, child inputs and workspace.d.ts
- skill('<key>') is checked against skills/ like every other kind; a key with
a non-ASCII letter names its code point and script.
- A child workflow call is checked against the child's Start trigger in the
same directory (W_CHILD_INPUT_UNKNOWN, raised on new blocks; W_CHILD_NO_START).
- A get keeps the server's resource manifest beside workspace.d.ts, and check
regenerates workspace.d.ts from it and the directory's declarations, typing
new keys and each workflow's inputs without a request.
- Did-you-mean hints on E_MAT_UNKNOWN_RESOURCE, W_TABLE_UNKNOWN_COLUMN and
W_ENV_UNKNOWN (which points at secrets.ts); a warning raised to an error no
longer says it is kept as written.
- check --help lists every kind it checks.
* fix(workspace-code): check the option cap before a linear duplicate scan; pin a duplicate column to itself
A select's repeated-option scan was quadratic and ran before the maxOptions cap:
80k options took 7 s per parse (now ~0.1 s). E_TABLE_DUPLICATE_COLUMN spanned the
whole defineTable argument instead of the second column.
* perf(workspace-code): group a status's changed files in linear time; key server findings by code
localResourceChanges copied the kind's array per file: 40k files took 3.3 s.
SERVER_FINDINGS is now checked against WorkspaceDiagnosticCode.
* perf(workflow-code): print a fill in linear time by advancing an offset
printFill re-spread the remaining parts for every content/separator pair, so a
number-only array printed in quadratic time (40k numbers took 17.5 s). The rest
of the fill is now queued as the same parts from a later offset.
* fix(workflow-code): refuse a tool param or operation option the builder pins
A tool builder's fixed params and the operation option overwrote the method's
pin silently, so the tool stored an operation the method contradicts and printed
back as raw(). Report E_FIXED_PARAM, as the block path does.
* refactor(workflow-code): look a tool's builder up once
toolBuilderPath found the builder, returned its path, and compileToolCall looked
it up again behind an early return that could not fire.
* fix(workspace-code): cap knowledge document findings apart from knowledge.ts's own
Document findings were uncapped and counted against the field reporter's
100-finding budget, so the declaration's own findings became E_LIMIT_EXCEEDED.
The field reporter now counts only what it appends.
* fix(workspace-source): a workflow delete is fingerprinted only once its live triggers are counted
* fix(workflow-code): exclude a retyped block from rename inference by its own id
A retype matched by lock ident (or against a prev block the canvas renamed)
excluded the prev block under the new key, not the one it retyped, so another
new block of the old type could inherit the old id, its run history and its
webhook. Record the retyped prev id and exclude that.
* fix(workspaces): a key claim that loses a concurrent race refuses with 409 or retries, never a raw 23505
claimResourceKey read the key with select-for-update, but an unheld key has no row to lock, so a
concurrent get (allocation) or claim could insert first and the plain insert failed with a unique
violation on either index, surfacing as a 500. The insert now skips on conflict and the claim
re-reads the committed winner: kept, ResourceKeyTakenError, or a retry that replaces a key the
resource was allocated meanwhile. Rebinding deletes and re-inserts so it shares the same path.
* perf(workflow-code): push identity group keys instead of re-spreading the group
Each push copied the whole group, quadratic when many unmatched blocks share a
type and parent.
* fix(workflow-sdk): new on a runtime export throws SimSdkNotExecutable; one stub for both entries
The Proxy target was an arrow function, which has no [[Construct]], so the
construct trap never ran and new t() threw a TypeError. The workspace runtime
re-declared notExecutable and seven identical functions; both entries now share
the stub in not-executable.ts.
* feat(workflow-code): x.error compiles in the handler of an onError edge
The executor returns { error: <message> } as a failed block's output when an
error edge leaves it (BlockExecutor errorOutput, block-executor.ts:738-740,
returned at :868-877). Compile accepted no such path, so the INDEX promise of
${x.error} failed with W_UNKNOWN_OUTPUT_PATH. Now x.error checks once the edges
are known: accepted with an error edge, refused with a hint to wire onError
without one. Block<O> types error in the SDK, INDEX says how the handler reads
it, and the integrations cookbook shows it.
* fix(workflow-code): compile stored() in a loop or parallel's meta.extra
The printer writes a container param holding a detected credential as stored()
under meta.extra, but compileContainer passed no keep callback, so the print
failed to compile. Keep the stored value as a regular block's extra does.
* fix(workflow-sdk): never embed a dotfile from the cookbook
WORKSPACE_COOKBOOK embedded every file on disk under cookbook/workspace, so a
.DS_Store or editor swap file would be written into every user's example
directory. The listing now lives in embedded-files.ts, shared with the drift test.
* docs(knowledge): say why an upload's processing relay is safe on every surface
* perf(workflow-code): read each node's successors once in the cycle check
stronglyConnected called successors on every step of a frame, and the caller
maps the node's whole outgoing list each time, so a block wired to many targets
cost O(deg^2). Read them once when the frame is pushed.
* perf(workflow-code): test a restored inactive value with withStoredValue
staysInactiveWithPrev rebuilt the block's whole activity inputs (every param,
the modes, the ids deploy reads) for each inactive id on each pass. Build them
once per pass and swap the one value in, tracking the pass's restores.
* fix(workflow-code): keep collapsed on inputFormat fields whose id stays inline
Canonicalize drops the editor's collapsed flag from every field, but materialize
restored it only for fields whose id moved to the lock, so a field with a shared
or missing name lost it whenever the list changed.
* feat(sim-cli): no login exits 13 with AUTH_REQUIRED
Not logged in, an OAuth login that expired and cannot refresh, and a 401 from
the server exited 1 with CLI_ERROR, the same as a source with errors. They now
exit 13 (AUTH_REQUIRED_EXIT_CODE) with the code AUTH_REQUIRED (a 401 keeps the
server's code when it sends one). A status still falls back to the local view
without a login, and its note now reads as sentences.
* fix(workflow-code): write a subflow collection holding a $sim object back unwrapped
Canonicalize and compile wrap an object with its own $sim key as a literal node,
but materialize wrote forEachItems and distribution raw into block.data and the
loops and parallels maps, so after any config change the executor iterated the
wrappers. Unwrap literal nodes there, and say so in jsonField's TSDoc.
* fix(sim-cli): source diff filters resolve against --dir; cancellation and 413 keep their exit
- diff ./, an absolute path or a path from the current directory selected
nothing and printed "No local changes."; filters now resolve against --dir and
one that selects no file is refused (SOURCE_PATH_UNMATCHED).
- A cancelled request carries REQUEST_CANCELLED, so status no longer reports it
as an unreachable server; noAnswer() is the one copy of that predicate.
- workflows/workspaces source status and diff map a 413 to exit 7, as get does.
* fix(workspace-source): holding a change for one credential key keeps another key's unreachable refusal
* fix(sim-cli): an apply drops the written.json entries of the resources it deleted
The record kept every deleted resource's files, so status reported the delete
forever (exit 11) and recreating the key made get refuse with SOURCE_LOCAL_EDITS.
An entry is dropped only when its file is gone and the returned base no longer
holds the resource or blob, so a held or failed delete stays retryable.
* fix(workspace-source): a chat auth type source cannot name leaves the deployment out instead of reading as public
* perf(workflow-code): bucket wiring and order dependencies by scope once per print
Each scope's wiring rescanned the members of every enclosing scope and refiltered
their edges by edgeScope, and each scope's declaration order was handed every
dependency in the workflow: O(scopes x blocks). Bucket edges by the scope they
print in, and dependencies by the scope they order, in one pass.
* fix(workspace-source): file creates of one name check every key they may take, and a lost key claim refuses the create
* perf(workflow-code): memoize buildFieldIndex and group pair members in one pass
The index was rebuilt for every block in print and compile and for every tool,
and each canonical pair rescanned every subBlock for its members: O(pairs x
subBlocks) per call. Group the members once, and memoize the read-only index by
block, trigger mode and pinned ids.
* refactor(workflow-code): sort compiled edges with canonicalize's compareEdges
Compile kept its own copy of the comparator, and the CWM edge order is hashed
(canonicalHash), so two copies could drift.
* chore(workspace-source): unexport WorkspaceSourceChange, used only in its own file
* docs(workflow-code): move compileRegularBlock's TSDoc onto it
It sat above BlockShape's own TSDoc, documenting nothing.
* fix(workspace-source): the staging sweep removes objects before their rows, keeping a row whose object survived
* docs(workflow-code): describe LoopSpec as canonicalize reads it
The TSDoc said the spec is the loops map's config and that canonicalize never
fills defaults; loopSpec reads block.data first, never takes the map's count,
and falls back to a for loop of 5.
* refactor(workflow-code): stop exporting ConfigItem
Nothing imports it; it is only printedConfig's item type.
* refactor(workflow-code): read pinned values and the catalog block once
compileMetaParams rebuilt the map of every stored value once per pinned id, and
needsTodo looked the catalog block up twice though collectParams already holds it.
* fix(table): a reshape resolves each column update to its id, so a by-name swap renames both
* fix(workspace-source): a get leaves out a secret named __proto__ instead of printing an unapplyable secrets.ts
secrets.ts printed every stored secret, but the declaration reader refuses a
__proto__ key, so after a get the whole file stopped applying. The secret is
now listed in skipped.json with the reason; MCP header names the reader refuses
already round-trip-fail into skipped.
* perf(sim-cli): a status past one dry run prunes its whole read instead of walking the directory again
When the workflow folders exceed one dry run, status read the directory a
second time: a second walk, read and hash of every file. It now prunes the
unchanged folders from the read it already made.
* perf(sim-cli): workspaces source apply walks the directory once, inside its lock
assertWorkspaceDir walked every kind folder outside the lock before
readWorkspaceDir walked it again; the apply now checks the read it made and
runs the full check only to refuse. orphanedWorkflowFiles groups the answer's
paths by folder once instead of per lock, assertBaseWorkspace reuses
baseWorkspaceOf, and printPlan no longer shadows counts.
* fix(sim-cli): --only reads past an empty segment instead of refusing an unnamed kind
* refactor(workspace-code): un-export four unused types, name the skill locator apart from a line's offset, fix two TSDocs
* feat(workspace-source): an existing column becomes required in the same apply as the managed rows that fill it
* perf(workspace-source): list MCP servers' tools concurrently while planning tool references
* perf(workflows): a batched source read prints its workflows concurrently
* fix(workflow-types): hold a container's edges to the handle they leave from
A loop or parallel's start handle connects only into the container, and any other
handle never does. The shared scope rule ignored the handle, so the editing engine
kept a start edge to a block extracted from the loop (and an end edge to a block
moved into it): edges the canvas never draws and workflow source refuses
(E_EDGE_SCOPE), so such a workflow could not be applied back from its own source.
* fix(editing): refuse an error edge from a block with no error output
The engine accepted an 'error' handle on any block, so a trigger or a loop or
parallel container could store an error edge the canvas has no port for and
source cannot write (E_ERROR_PORT_UNSUPPORTED). It now follows the source
catalog's errorPort rule.
* fix(editing): normalize row ids only on fields declared as row lists
Row-id normalization keyed on the subblock id alone, so any field that shares an
id with a table field (supabase's JSON code 'params', 'metrics', 'headers',
'variables') was coerced to a row list: a JSON object or code text was replaced
by [] and the value lost. It now applies only where the block declares the id as
a row-list type.
* fix(workflow-code): keep the pair member a trigger-mode pair's mode does not select
Deploy reads every member of a trigger-mode pair, so the inactive-param restore
never brought back the member the mode does not select. An unchanged apply of a
block toggled into trigger mode dropped that member's stored value, and editing
the selected member dropped the other one. The pair's value is now its
mode-selected member's, and the other members keep their stored values, as on
the canvas.
* fix(workflow-code): write only the subflow config fields an edit changes
Canonicalize fills a loop's count (5) and the collection and conditions the
subflow map holds when block.data omits them; a changed config wrote all of them
back, so renaming the block a loop condition reads also stored count, collection
and condition fields nobody edited. Fields equal to the stored config keep their
stored spelling, absence included.
* fix(workflow-source): compile a block renamed in source against the block it continues
Compile matched the stored block by key, while materialize keeps a renamed
block's id through its ident (lock-ident). Renaming a block in source therefore
refused its stored() secret (E_STORED_VALUE_MISSING), turned a stored cycle into
E_EDGE_CYCLE, and reset fields source never writes (a note's color) to their
defaults. compileSource re-keys the stored model to the source's renames and
compiles again.
* refactor(sim-cli): name what source helpers do and fix their docs
- mergedGitattributes merges .gitignore too: withMissingLines.
- isMissing reads the code through errorCode, not a cast.
- workflows source check calls workspaceFolderOf directly.
- Exit codes 5, 6 and 7 document workspaces source as well.
- workflows source resources lists MCP servers; any source get writes it.
- Two TSDocs a reflow mangled.
* perf(workflow-persistence): read only live in-workspace graph rows in a batch load
loadWorkflowsFromNormalizedTablesRaw read every block, edge and subflow row of every requested id,
then dropped the ones outside the workspace, and kept archived workflows the read snapshot
discarded afterwards. Each graph query now filters by the live in-workspace ids as a subquery.
Measured on 100 live + 300 archived workflows of 30 blocks: loadWorkflowReadSnapshots median
579ms -> 151ms.
* perf(workflows): one credential lookup for a batch load's block migrations
loadWorkflowsFromNormalizedTables ran each workflow's block migrations serially inside the
REPEATABLE READ snapshot, and the credential-id migration queried once per workflow holding a
legacy account id. The batch now prefetches the credential ids for every workflow's legacy ids in
one query, and only queries again for an id a migration surfaces that the prefetch did not ask
about, so the result is unchanged: N serial round trips become one.
* fix(api): one ETag revalidation path; tagged v2 bodies are revalidated, and cached per request
- ifNoneMatchSatisfied was copied in the internal and v2 JSON builders; definition.ts now owns
entityTagMatches and notModifiedResponse.
- The v2 builder answered a tagged 200 and its 304 with private, no-store, which forbids keeping
the body the ETag exists to revalidate. Both now say private, no-cache, as the internal one did.
- The v2 validated-body LRU was keyed by the tag alone and served across principals and inputs,
though present() reads the parsed request. It is keyed by tag and parsed request now, and
entityTag documents that it must be a strong validator of the result for every caller.
- The internal builder's HEAD branch re-checked a missing authorize() that definition-time
validation already refuses; it captures the authorize phase once instead.
* fix(workflow-sdk): codegen uses its layout helpers; INDEX.md lists legacy builders only when there are some
- generate.ts builds block, models and index paths from layout.ts; blockTypesFile
leaves the barrel; layout.ts reads TOOL_NAMESPACE.
- @when names both fields of an and clause.
- typecheckSdkDirectory spreads SOURCE_COMPILER_OPTIONS.
- The cookbook declares ORDERS_API_KEY, which its tool reads, and says a new
query string updates an MCP server in place; column.ttl() says one per table.
- Doc fixes: arrayOf, declaredBlockTypes order, core.d.ts names tsc.
* fix(schedules): a written zero is an invalid schedule field, not a missing one
The reason classifier read fields through getSubBlockValue (value || ''), so a numeric 0 counted
as empty. It now checks undefined, null and '' explicitly.
* docs(environment): state the non-empty invariant both env paths share
* chore(scripts): name the pure package an offender is in, not always workflow-code
* refactor(chat-deployments): one identifier-ownership check, and one live-chat read per replace pre-check
* refactor(workflows): the code tab names its directory with the shared slugify
* refactor: keep types no other module imports private
* refactor(workflows): drop the field-by-field source apply presenter
The response schema already strips the result's internal fields, so both routes present the
result as it is.
* refactor(workspace): the workflow-code flag is required of every flags producer
* refactor(utils): one mapWithConcurrency, with documented failure semantics
apps/sim had its own mapWithConcurrency next to @sim/utils/concurrency's, with different failure
semantics: it rejected through Promise.all as soon as one item failed while its other workers kept
starting items nobody awaited. Every caller now uses the @sim/utils one: after a failure no item
starts, and the first failure is thrown once the running items settle, so nothing the batch began
is still running when the caller handles it. mapSettledWithConcurrency (attempt every item, keep
each outcome) moves alongside it. createConcurrencyLimit, MATERIALIZE_CONCURRENCY and
waitWithAbort stay in apps/sim.
* perf(workspace-source): a knowledge plan never downloads a document named in neither the base nor the directory
* docs(workspace-code): CI commits back what apply rewrote, tsc step, Gmail provider
- The scripting.mdx CI job runs tsc after check (which regenerates
workspace.d.ts), and on merge commits back the files the apply rewrote, with
[skip ci] and contents: write; a protected branch opens a pull request instead.
- workspace-code.mdx says what check now covers (skills, child inputs, rows,
workspace.d.ts).
- The cookbook credentials.ts shows Gmail's provider id, google-email (the id
apps/sim/lib/oauth/oauth.ts registers for Gmail).
- The docs baseline records the changed CI fence.
* docs(cli): regenerate the CLI reference for the check help and exit 13
* test(api): the source catalog's tagged 200 is private, no-cache
* fix(workspace-source): a renamed or name-taken stored() tool reports only that, not a missing stored tool
* fix(workspace-source): a deleted chat's base no longer records its password variable
* fix(table): reshape audit entries name columns, never their ids
* refactor(workflows): drop the never-filled SourcePlan.notes, share the stale message, and read a rename's folder from the loaded workflow
* refactor(source): one managed-row key, one tool-input field list, and no unreachable fallbacks
* docs(source): gated manifest sections, the required-column 400, carried tags and the manifest limit
* chore(source): regenerate the v2 OpenAPI and MCP operations for the documentation changes
* test(workspace-code): bound the option-cap and status-grouping fixes by n vs 4n growth, not wall clock
The ratio helper is exported from @sim/workflow-code/scaling.test-helpers so
other packages' scaling tests share it.
* fix(workflow-code): x.error is a string in a JSON field
The executor's error output is the failure message, so a reference to it in a
JSON body (response, API body) is stored quoted, as compile and print decide
through refValueKind; bare, a message would break the JSON.
* refactor(workspace-code): rowKeyText reads any cell value, so the table row writer shares it
* chore: drop the apply wire type no module reads, and shrink the non-null baseline the batch load cleared
* test(workspace-source): the cookbook apply test holds the Gmail credential the cookbook declares
* fix(workflow-code): keep a stored field the printer left out as inactive
Compile fills an omitted param with its default, then keeps the stored value only
when the field is inactive, judged with the default in place. A standalone
advanced field runs once non-empty, so a stored '' choice (cloudflare's 'Active
only' certificate filter) read as active under the default and every apply
replaced it with 'all'. Inactivity is now judged with the stored value.
* refactor(utils): point the merged mapWithConcurrency callers at @sim/utils
* test(workflow-source): prove canvas, JSON API and source stay in lockstep
A seeded fuzz applies random sequences of real editing-engine operations (add,
delete, move, edit fields, connect, disconnect, insert into and extract from
loops and parallels, rename, enable, retype, trigger and advanced mode, loop
config, variables) to corpus workflows, then asserts the source of the result
applies back as a no-op and one random source edit changes exactly that field.
Failures shrink to a one-minimal edit list. Every registry block type is added
(or, for legacy and single-instance types, edited) with non-default values in
each subblock kind it has. Each divergence fixed on this branch keeps a minimal
regression. The integration suite runs the full stack on Postgres: JSON write,
editing operations, source get and apply, JSON read, and a canvas-built workflow
against the one created from its source.
* chore: drop exports the cell-rule move left unused; move the timezone baseline entry
* chore(audits): count staging's new integration double-cast in the merged ratchet
* test(workflow-source): satisfy the audits in the fidelity suites
* test(workspaces): wait with the shared sleep helper
* fix(cli): recover a command lock abandoned before its owner was recorded
The takeover claim inside the lock refreshed the lock folder's mtime before
the staleness re-check, so a lock with no owner.json never read as stale and
every command returned SOURCE_DIR_BUSY. Judge an unrecorded lock's age from
the sighting taken before the claim, and guard against a replacement lock by
checking the folder is still the one seen (dev/ino) and still stale.
* chore(helm): bump chart to 1.11.22 for the source-staging cleanup cron
* fix(workspace-source): match managed row keys after their column's coercion
planRows compared declared key cells with stored ones before coercing them,
so a number key written as "007" counted the stored row 7 as removed and the
apply refused without --allow-delete, though the keyed write coerces "007"
to 7 and matches it. Coerce the declared key with the key column's cell rule
(the reject policy a keyed write uses) before matching.
* fix(workflow-code): print a JSON code field in meta.extra as its stored text
An advanced JSON code field the serializer still forwards under an operation that
hides it prints under meta.extra, which compile reads verbatim. It printed as an
object literal, so compile stored a native object and an unchanged apply rewrote
the stored text (minified, or not at all equal when it held references). It now
prints as text there; only a builder param takes the literal form.
* fix(workflow-source): keep a block keyed __proto__ in the lock and hints
buildLockFromState, hintsFromSourceMeta and printStoredSource assigned by bracket,
so a block whose name normalizes to __proto__ set the prototype instead of an
entry: it vanished from the lock, and renaming it in source lost its identity
(compile treated it as new and reset its unwritten fields).
* test(workflow-source): regressions from the long fidelity run
A JSON field forwarded under a hiding operation, a block keyed __proto__, and the
by-design collision-key refusal the fuzz now leaves out.
* fix(cli): workspaces source status and diff refuse a directory holding no workspace source
A mistyped --dir, an empty directory, the wrong working directory (--dir
defaults to .) or a workflow folder read as clean: status exited 0 after a
dry run of no kinds, and diff printed "No local changes.". They now refuse
it with the reason and the get to run, as apply and check do.
* fix(cli): status recommends the get that restores a removed kind folder, not an apply
Removing a managed kind's folder or root file (tables/, secrets.ts) stops
managing the kind: an apply leaves its resources alone. status reported its
recorded files as deleted and recommended apply --yes, which wrote nothing, so
the next status said the same thing again (exit 11 forever) while get refused
to write the files back. When every local change is in such a kind, status now
recommends get --only <folders> --force, which restores them, and says how to
delete the resources instead.
* fix(utils): mapWithConcurrency throws the first failure in time
The shared helper threw the failure of the lowest-numbered slot, so a slow
slot-0 error masked an earlier one from another slot. The apps/sim helper it
replaced (Promise.all) threw the first failure, and the TSDoc still promises
that.
* fix(cli): workspace source commands handle a directory no one may write
Every workspace source command takes the directory's lock by creating
.sim/command.lock, so in a read-only checkout status, diff and apply --dry-run
crashed with a raw EACCES stack trace. Commands that only read (status, diff,
a dry run) now run without the lock there, since nothing can rewrite the
directory; get, check and apply are refused as SOURCE_DIR_UNWRITABLE with the
reason.
* fix(cli): status refuses a broken .sim/written.json instead of calling every file created
A merge conflict that leaves markers in .sim/written.json (two branches that
each applied) made status read every file as created and recommend an apply.
It now refuses with SOURCE_WRITTEN_INVALID and names the get that rewrites the
record. A broken .sim/base.json names its way out too (SOURCE_BASE_INVALID).
* docs(cli): status and diff help name exit 7, and the workflow guide exit 13
status and diff exit 7 when the server refuses the source as too large (413),
as exit-codes.ts documents, but their help listed only 0, 11, 12 and 1. The
workflow directory's .sim/AGENTS.md now names exit 13 (not logged in) as the
workspace guide does. CLI docs regenerated.
* fix(executor): splice already-escaped values into JSON strings as written
Escaping every reference landing inside a JSON string literal fixed values that
broke the JSON (quotes, newlines, stray backslashes), but it also re-escaped
values that were already valid string content. A deployed workflow whose env
var holds a key with literal \n escapes, or that escaped a value in a Function
block to work around the old bug, now sent backslash-n instead of a newline.
Only a value that would break the literal is escaped now; one that is already
valid string content splices raw, exactly as before.
* fix(table): write every row's cancellation when one write fails
cancelWorkflowGroupRuns cancels every row's queued jobs, then writes each row's
cancelled status. The shared mapWithConcurrency starts nothing after a failure,
so one failed write left the later rows of the page 'running' with no job behind
them; the apps/sim helper it replaced still wrote them. The writes now all
settle before the first failure is thrown.
* fix(cli): count a workflow changed only on the server as unchanged in workspace status
The status dry run sends every workflow folder whole to detect drift, so the server plans an
update for a folder edited only in Sim. An apply sends that folder by its base and leaves it
unchanged, so the status plan line said 'Applying would: 1 update' for an apply that changes
nothing.
* fix(cli): an interrupted source command releases the directory lock
Ctrl-C during a workspace source command left .sim/command.lock behind. A
later command takes a lock over only when its owner ran on the same host, so
one left in a folder shared with a dev container or another machine stayed
until removed by hand (exit 10 every time). The lock is now removed on
SIGINT/SIGTERM before the signal ends the process, as a staged write's folder
already is.
* test(workspace-source): a key-claim failure trigger left by a killed run no longer breaks the next one
* fix(e2e): expire the workflow source e2e session in UTC
session.expires_at is a timestamp without a zone that the app reads as UTC. now() writes the
database's local time, so on a Postgres west of UTC the one-hour session was already expired
and the canvas-route check got 401.
* fix(cli): get keeps a directory bound to its workspace when its base does not parse
get decided which workspace a directory belongs to only from a base that
parsed cleanly, so one this CLI refuses (a field a later CLI added, a bad
fingerprint) read as no base: get then used the profile's workspace, and
--workspace naming another one was not refused (SOURCE_OTHER_WORKSPACE). It now
reads workspaceId as leniently as apply and status do.
* fix(cli): print nested source apply results as JSON in text output
`sim workflows source apply --output text` printed the modified blocks as
`modified [object Object]`.
* test(workflow-code): alternate small and large runs in the growth check so machine load slows both sides
* fix(workspace-source): in-use scan reads the live deployment version
A delete of a resource that a deployed workflow's live version still uses,
while its draft no longer does, now warns W_RESOURCE_IN_USE naming the
live version, unless the same apply publishes the draft or undeploys it.
* fix(workspace-source): class a refused apply by the errors that refuse it
The rejected error counted and classed every error, including those of
changes the plan holds back, which refuse nothing. The plan now returns
the refusing errors (plan-level plus non-held changes) and the error
classes from those.
* fix(workspace-source): a key taken after a committed write reports the write
A key claim that found the key held by another live resource after the
write committed threw, dropping the written resource from applied. write()
now returns it with E_NAME_TAKEN; the apply records it as applied, keeps
the base entry unchanged, and stops so no later write resolves the key to
the other resource.
* test(workspace-source): per-process source slot refuses past its cap with 429
* fix(cli): check table row columns when the row holds a non-string reference
Compiled row data stores a non-string reference bare ("n": <score.value>), which JSON.parse
refuses, so check skipped the whole row: an unknown column or select option in any row writing a
number, boolean or object output went unreported. Parse it as a JSON field instead.
* feat(workflow-code): hint api for http.request and fn for javascript.* builders
An agent guessing the HTTP request block as http.request got E_UNKNOWN_BUILDER with no hint:
no edit distance reaches api.
* docs(workflow-code): correct workspace-key, rows, written.json and create claims; fill agent-guide gaps
- credentials bind with a workspace API key; secrets and deployments do not (guide, CI docs, API description)
- table rows are source when a table opts in; list rows.jsonl and the limits
- .sim/written.json is committed, not gitignored; drop stale tsc sizes; exit 9
- a created-not-yet directory has no base: create --dry-run, not status
- guide: api is the HTTP block, W_* print as error in check, self-hosted apiKey, promote setup
* test(workspace-source): a key-claim failure trigger left by a killed run no longer breaks the next one
* test(workflow-code): alternate small and large runs in the growth check so machine load slows both sides
* test(workflow-code): time the block-cap round trip by thread CPU, so machine load cannot fail it
* fix(workflow-code): never print a credential through the response body form
The response(name, { body, status, headers }) form printed its fields'
stored values verbatim, so a response block holding a detected credential
(an Authorization header, a token in the body) printed the secret into the
file while W_LITERAL_SECRET claimed it printed as stored(). Such a block now
keeps its own params, where the field prints as stored(), and compile warns
W_LITERAL_SECRET when source writes one in the form.
* fix(workflow-code): check agent tool calls the way blocks are checked
compileToolCall accepted any builder as a tool (api.tool, condition.tool,
trigger.gmail.tool.poller), stored any param key unchecked, and never warned
about a literal secret, though print writes these tools as raw(tool) and
warns W_LITERAL_SECRET. A tool call now needs a builder with a tool form
(E_UNKNOWN_BUILDER), each param must be one its tool type declares
(E_UNKNOWN_PARAM with a did-you-mean, W_FIELD_NOT_APPLICABLE for another
operation's), and a literal secret warns as on a block.
SYNTAX.md and core.d.ts no longer document agent.tool() or
runWorkflow.tool(): neither is typed, and print writes such tools as
raw(tool).
* fix(workflow-code): refuse stored() and codeFile() in a loop or parallel config
compileConfig dropped any config value that was not a plain value, so
loop.forEach('L', { collection: stored() }) or a codeFile() condition
compiled silently to a loop with no collection or condition. Both are now
E_UNSUPPORTED_SYNTAX with the form to write instead.
* fix(workflow-code): give every compile finding a hint that names its fix
E_TARGET_TRIGGER, E_ERROR_PORT_UNSUPPORTED (a loop or parallel has none:
wire onError from its children), E_UNKNOWN_BRANCH in meta.branches (lists
the branches), W_VALUE_KIND (the literal form the field takes) and
E_UNKNOWN_IDENTIFIER for undefined, NaN and Infinity had no hint. The test
catalog's loop and parallel now have no error port, like the real catalog.
* fix(table): keep batch rows that keep a unique value in the DB check
batchUpdateRows excluded every batch row from each unique column's DB check and
compared the rest by the values it read before taking the value locks. A row the
batch leaves alone could take the value from a concurrent edit after that read,
so both it and the batch's writer stored the same unique value. Each column's DB
check now skips only the batch rows that rewrite that column.
* docs(tables): say add-column refuses a required column rows leave empty
* fix(cli): Ctrl-C during an apply write names what it may have done
An interrupt while the apply request was in flight exited 130 silently, so
nobody learned the write may have landed. The lock's interrupt handler (which
already releases the lock) now prints the same next step a lost answer gets,
then ends with the signal.
* fix(cli): a status without a login recommends sim login
With no login on the profile, status shows the local view (the server is
treated as unreachable) and its note says to log in, but next was
apply --dry-run, which only exits 13. next is now the login, then status again,
for workflows and workspaces alike.
* fix(cli): check offline with no cached catalog names the get that caches it
A fresh clone checked while the server could not be reached failed with the
raw "Could not reach …" and no next step. It is now CATALOG_NOT_CACHED (exit
1) naming sim workspaces source get, as a check with no credentials already
is; no login keeps its AUTH_REQUIRED refusal (exit 13, naming sim login).
* fix(workflow-code): keep meta.retry within the bounds the loader pins it to
Persistence saves a retry policy verbatim but loads it clamped (2-5 tries,
0-5000 ms, whole numbers), and canonicalize kept a well-formed policy raw.
A file writing maxTries: 10 stored 10, read back as 5, and every re-apply
of the unchanged file showed a retry change. Compile now refuses an
out-of-range policy with a hint naming the bounds, and canonicalize pins
the numbers as the loader does, so a printed policy always compiles back
unchanged.
* Revert "fix(workflow-types): hold a container's edges to the handle they leave from"
This reverts commit
|
||
|
|
8ea9ffc07b |
feat(mcp): add code mode to the Sim MCP server (#10204)
* feat(mcp): add code mode to the Sim MCP server * fix(mcp): stop queued code-mode calls at run end, bound error output, and type union bodies * fix(mcp): render closed empty objects as Record<string, never> * fix(mcp): render tuples and open objects in generated contract types |
||
|
|
cda94995e5 |
feat(usage): serve organization activity from an hourly rollup (#10200)
* feat(usage): serve organization activity from an hourly rollup * fix(usage): type the rollup marking hook, bump the chart version * fix(usage): address review: replica lag, retention marks, deferred chats, bounded housekeeping * fix(usage): measure replica lag with the pass's own lease as heartbeat |
||
|
|
ad8ff86014 |
feat(search): manage sources and permission uploads through the CLI (#10197)
* feat(search): manage sources and permission uploads through the CLI * fix(search): align source operations and complete CLI imports * fix(cli): preserve upload errors and support early Node 20 * fix(cli): retain structured upload errors and retry guidance |
||
|
|
bc48d10a68 |
fix(integrations): close follow-ups from the integration validation audits (#10183)
* fix(integrations): close follow-ups from the integration validation audits * fix(integrations): type the polymarket activity test params * fix(integrations): stub fetch for every spotify library test * fix(integrations): migrate kalshi create and amend to the v2 order api, address review * fix(integrations): keep the kalshi book-side helper module-private * fix(integrations): route kalshi cancels by ticker and harden the read-first order writes * fix(integrations): keep every legacy kalshi order key on v1 write outputs |
||
|
|
dcc536973e |
fix(integrations): validate polymarket, kalshi, sftp, ssh, smtp, jupyter and temporal (#10181)
* fix(integrations): validate polymarket, kalshi, sftp, ssh, smtp, jupyter and temporal * fix(integrations): honor negative position filters, type the new tests, and prove STARTTLS against a real SMTP server * fix(sftp): decode each escape run once and join upload names without decoding again * fix(sftp): reject a trailing parent segment in remote paths * fix(integrations): ignore null and empty timestamps in Kalshi settlements and Polymarket activity * fix(polymarket): reject a non-numeric activity timestamp and keep start=0 as full history * fix(polymarket): mark the next-page cursor output nullable * chore(integrations): regenerate artifacts after rebase |
||
|
|
1997d0a1a5 |
fix(integrations): validate spotify, buffer (#10175)
* fix(integrations): validate spotify, buffer * fix(integrations): cap spotify playlist items limit at 50 and drop buffer tests for rejected output enums * fix(integrations): keep spotify get playlist tracks on the read endpoint that serves any public playlist * fix(integrations): batch spotify library requests up to each tool's old id limit, restore playlist tracks limit, list new buffer channel actions * fix(integrations): honor cancellation in later spotify library batches, report the exact rejected id range, reject unknown follow types * fix(integrations): reject spotify uris of another type, fail on invalid library check chunks, describe partial batch failures * chore(integrations): regenerate artifacts after rebase |
||
|
|
a24b401b45 |
fix(integrations): validate ashby (#10167)
* fix(integrations): validate ashby * fix(integrations): type the ashby test helpers against the tool's own params * fix(integrations): send ashby get_job's flag only when it is a boolean and shrink the test-types baseline |
||
|
|
41b11cd4f8 |
fix(gitlab): scale group discovery and permission-aware search (#10138)
* fix(gitlab): scale group discovery and permission-aware search * fix(gitlab): validate combined permission uploads before saving * fix(gitlab): clarify byte limits and use browser file fixtures |
||
|
|
7e7a0c82ba | fix(ci): restore ESM checks and synchronize docs searches (#10139) | ||
|
|
d54ce94e95 | improvement(ci): reuse bounded compiler state for acceptance builds (#10127) | ||
|
|
9a8b002d70 |
improvement(ci): scope reviewed root audits to their checks (#10121)
* improvement(ci): scope reviewed root audits to their checks * chore(ci): clarify audit-only runner allocation |
||
|
|
165c3db6ec |
fix(library): attribute sim counts by clause and table row, not capitalized words (#10115)
* fix(library): attribute sim counts by clause and table row, not capitalized words * fix(library): handle colon lists, parenthetical comparisons, relative clauses, prefixes, and linked names in sim-count * fix(library): keep sim relative clauses attached, anchor parenthetical comparisons to sim, and detect pipe-less table rows * fix(library): remove sim-count comparison asides for any subject and keep counted openers * fix(library): keep sim-count comparison spans inside their sentence * refactor(library): read sim-count comparisons as their own clauses instead of deleting them * fix(library): split sim-count contrasts nested in comparisons, keep count lists together, and end sentences before closing quotes * fix(library): start sim-count clauses only at a new capitalized subject and tell count lists from new clauses * fix(library): check sim claims in feature-first table cells and treat digit product names as new subjects * docs(library): describe sim-count table cells and new-subject clauses accurately |
||
|
|
9b8d72d10c |
improvement(library): check sim's integration counts against the catalog (#10113)
* improvement(library): hold sim's integration, action, and trigger counts to the catalog in check:library-content * fix(library): match bold and title-cased sim counts, and track code fences by length |
||
|
|
77ce46129a |
fix(resume): capture pause block names and keep the resume page off the execution snapshot (#10104)
* fix(resume): stop shipping the execution snapshot to the resume page * improvement(resume): capture pause block names at pause time and keep display reads off the snapshot |
||
|
|
1dc07deea6 |
fix(integrations): validate dynamics 365, zoho desk, rippling, okta, sailpoint and snowflake (#10072)
* fix(integrations): sweep2 v2 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(integrations): address review on dynamics 365, okta, rippling, zoho desk and snowflake - dynamics 365: blank canvas Outcome falls back to won - okta: list_user_groups pages with after/limit and returns nextCursor/hasMore - rippling: nextCursor output inlined (nullable) so docs list it; create record rejects blank data; cursor placeholder names the query cursor - zoho desk: restore sharedDepartments maxItems 10 on update_ticket - test types: narrow the okta url builder and snowflake mapper in new tests * fix(okta): mark list_user_groups nullable group fields as nullable * chore: regenerate tool metadata and mapper baseline after rebase * fix(microsoft-dynamics-365): render owner type and id on agent tool rows List Owners and Assign Record read ownerType/ownerId, which are block-only fields a tool row never rendered or stored, so every agent, Pi and HITL call failed with 'Owner type is required'. Mark both user-only so rows store them; canvas behavior is unchanged. * chore: regenerate tool metadata after rebase * fix(microsoft-dynamics-365): keep a blank close outcome failing instead of assuming won * chore: regenerate tool metadata and mapper baseline after merging staging |
||
|
|
5729416ca6 |
fix(blocks): read the mapper operation from the tool-call context in j–z blocks (#10078)
* fix(integrations): sweep2 m4 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(blocks): type the sweep2 m4 mapper tests and stripe JSON spreads for test-types * fix(rocketlane): send only the saved time source when a tool call also names another * chore: regenerate tool metadata and mapper baseline after merging staging |
||
|
|
a86f4c2e44 |
fix(blocks): read the mapper operation from the tool-call context in internal and a–i blocks (#10077)
* fix(integrations): sweep2 m3 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(blocks): keep tool-row conflictTarget, parse affinity rank/winRate args, fix CI type and canonical-id checks Table upsert keeps a tool row's conflictTarget when conflictColumn is unset; affinity parses model rank/winRate through the same numeric validation; instantly treats a whitespace interestValue as empty on tool calls; file reads the model folderPath via its canonical folderRef; dub's mapper context is optional; buffer test typing; shrink the test-types baseline for ashby. * fix(blocks): fall back to model args for empty carousel media, blank share emails, and boolean enabled filters * chore: shrink the mapper-operation baseline after rebasing onto staging * fix(blocks): keep a numeric zero table limit and drop the model authType when disabling sharing * fix(blocks): send one folder target on File append/edit tool calls On a tool call the mapper result is spread over the merged row and model params, so a model folderPaths survived beside the row's folderPath (or the model's own folderPath) and the file contract refused the pair. Clear whichever folder arg the resolved target did not set. * chore: regenerate tool metadata and mapper baseline after merging staging |
||
|
|
41c840c581 |
fix(blocks): read the mapper operation from the tool-call context in google, microsoft and atlassian blocks (#10076)
* fix(integrations): sweep2 m2 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(integrations): resolve referenced files in the legacy slides image source and keep empty trello descriptions on tool calls * fix(trello): drop blank card descriptions again so a cleared saved field never erases one * chore: re-ratchet the mapper-operation baseline onto staging * chore: regenerate tool metadata and mapper baseline after merging staging |
||
|
|
2ed6201b7a |
fix(integrations): validate github, gitlab, linear, slack, pagerduty, incident.io, sentry and datadog (#10071)
* fix(integrations): sweep2 v1 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * fix(incidentio): keep the creator mapper module-private * refactor: simplify and clean up the sweep changes * fix(integrations): address v1 review findings and CI failures - keep the Linear project-status tool's display name so its docs anchor survives - pass Slack's comma-separated ID lists through the workflow-block mapper - reject '..' segments in GitHub content paths; only exact dot-segment GitLab ids - reject non-array commits in Sentry release create - mark nullable outputs (Linear dueDate/status, GitHub latest commit v2) - align descriptions with the vendor contracts (incident.io, Slack, GitHub, Linear) - drop a dead credential fallback the canonical-param check flags; fix test types * fix(integrations): keep latest-commit v2 docs, mark Linear project lifecycle timestamps nullable Inline the v2 commit output so the docs generator still documents it, and shrink the unused-exports baseline now that COMMIT_DATA_OUTPUT_PROPERTIES is imported. * chore: regenerate tool metadata and mapper baseline after rebase onto staging |
||
|
|
0ea25f479e |
fix(integrations): validate twilio, sendgrid, resend, mailgun, discord, telegram and whatsapp (#10073)
* fix(integrations): sweep2 v3 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(integrations): address v3 review findings - twilio: trim account SID and From number once, mark sender/recipient outputs nullable, make From optional on the block when a Messaging Service is used - discord: truncate fractional limits, reject more than one message cursor, mark nullable outputs - telegram: only keep spoiler spans, drop NUL so input cannot alias a protected segment, mark optional animation fields, fall back to model poll options when the stored field is blank - resend: clamp list limit to 1-100, sentence covers segment or audience, nullable broadcast outputs - mailgun: clamp events limit to 300 - twilio voice: nextPageToken nullable - fix test-types errors in twilio and whatsapp tests * fix(integrations): clamp twilio voice page size, mark discord user avatar nullable * fix(discord): match get_user output nullability to the User object * chore: regenerate tool metadata and mapper-operation baseline after rebase |
||
|
|
c7abe25a67 |
fix(integrations): validate shopify, brex, ramp, zoom, calendly, cal.com, typeform, webflow and wordpress (#10074)
* fix(integrations): sweep2 v4 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(integrations): address v4 review findings - wordpress: reject unparseable term IDs instead of dropping them, map date explicitly, type search ids as number | string - typeform: keep filename whitespace when building the file download URL - brex: reject a limit buffer percentage outside Brex's 0-100 integer range - calcom: type bookingUrl, hidden and ownerId on event type responses - tests: call tool builders through ToolConfig instead of a type assertion |
||
|
|
43aac9244b |
fix(blocks): read the mapper operation from the tool-call context in aws and infra blocks (#10075)
* fix(integrations): sweep2 m1 — read the mapper operation from the tool-call context and validate integrations against vendor specs * chore: regenerate tool metadata, docs and ratchet baselines * refactor: simplify and clean up the sweep changes * fix(blocks): keep model format, recursive and extended statistics on tool calls - tinybird append: fall back to the model's format before the csv default - sftp mkdir: fall back to the model's recursive before the default - cloudwatch get_metric_statistics: accept and normalize extendedStatistics from either source - azure data explorer ingest: an explicitly disabled Run in background stays off - cloudwatch/codepipeline tests: narrow the mapper so test-types passes |
||
|
|
41a5f38fd4 |
fix(blocks): read the mapper operation from the tool-call context and ratchet raw reads (#10070)
* fix(blocks): read the mapper operation from the tool-call context and ratchet raw reads A block's tools.config.params mapper gets the operation only as context.operation on a tool call (Agent tool rows, Pi, Human v2), so branches on params.operation take the no-operation path there. Add mapperOperation(params, context), move the mappers that already fell back to context onto it, and add check:mapper-operation, a per-file ratchet over the remaining raw reads (505 in 173 files) so they can only shrink. * fix(blocks): return an empty string from mapperOperation when no operation is set * fix(audits): track helper argument positions, destructured rests, helper results, and shadowed names in check:mapper-operation; drop _operation strips * fix(audits): refuse to raise the mapper-operation baseline and alias only helper results that carry their input * fix(audits): follow local copies when deciding whether a helper returns its params |
||
|
|
bc438fc0f8 |
fix(realtime): keep admin block locks out of write-role graph replaces (#10062)
* fix(realtime): keep admin block locks out of write-role graph replaces batch-add-blocks and replace-state (realtime) and every HTTP state-replace door wrote workflow_blocks.locked from the payload, so a write member could clear an admin-only lock and then edit or delete the block. A shared helper now keeps protected blocks, their incoming edges and loop config as stored during a full replace and writes every other block unlocked; batch-add skips protected blocks and blocks nested under a locked ancestor and never writes the lock flag. * fix(realtime): guard locked loop config and re-sync clients when locks win batch-add-blocks loops/parallels and subflow updates could rewrite a locked container's config. When persistence keeps lock-protected state over a payload, the room is told to reload instead of receiving the rejected payload. * fix(realtime): cascade orphaned locked children and keep preserved edge ids A replace that removes an unlocked container now removes its locked children too, matching a direct delete, instead of saving a dangling parentId. Preserved protected edges win by id, so a retargeted edge cannot duplicate one and abort the save. Skipped subflow updates re-sync the room like the other lock-reconciled writes. * fix(realtime): refuse whole pasted subtrees under a locked ancestor batch-add-blocks checks each added block against the graph as it will land, so a rejected container's new children and loop/parallel config are refused with it, and an edge refused for targeting a locked block re-syncs the room. |
||
|
|
77c9e26cee | improvement(egress): route workspace requests through the organization's egress gateway (#10040) | ||
|
|
4b4a78bc28 |
fix(files): keep Markdown tables readable while scrolling (#10041)
* fix(files): keep Markdown tables readable while scrolling * fix(files): track Markdown overlays during table scrolling * fix(files): contain wrapped inline code in WebKit * fix(files): preserve short Markdown table layout * fix(files): clean up Markdown fixtures after API failures |
||
|
|
e4d8673b27 |
fix(integrations): address release review findings on the integration sweep (#10039)
* fix(integrations): validate Asana limits, Intercom snooze times, and Mailchimp template ids, clamp Airtable page size, accept Mailchimp batch arrays, and keep the Mailchimp email type option on update * fix(integrations): resolve the tool-call operation in the QuickBooks, SAP Concur, Attio, Intercom, Notion, Box, and HubSpot mappers * refactor(integrations): share the Intercom params mapper, reuse the boolean and JSON input helpers, and drop duplicated test helpers * fix(mailchimp): leave the email type option unchanged when its stored value is null * fix(integrations): seed the Mailchimp email type option per operation and tighten presence checks for Intercom, Airtable, Dropbox, and QuickBooks inputs * fix(integrations): seed the Mailchimp email type option from the operation's first option and validate the Intercom ticket snooze on tool calls * fix(mailchimp): seed the email type option per operation, keep Keep current outside create, and default an unset create value to true * fix(integrations): lead the Intercom role and Pipedrive deal status with No change in agent tool rows * fix(integrations): parse the Mailchimp update email type option like create, drop its block-level required, and keep a zero Asana limit for validation * fix(asana): treat a whitespace-only limit field as blank on tool calls |
||
|
|
7246075ba2 |
fix(integrations): validate monday, asana, clickup, airtable, notion, supabase, amplitude, box, docusign, and dropbox (#10030)
* fix(monday): expose items_page cursor pagination on get items * fix(asana): send assignee/offset on task lists, add search limit, keep agent args in the block mapper * fix(clickup): keep model args on agent tool calls, add task date filters and lastPage * fix(airtable): accept already-parsed JSON inputs on tool calls and add list records pagination, page size, and view * fix(notion): split long text into 2000-char rich text objects and paginate read page content * fix(supabase): accept PostgREST-form and multi-column order-by, read primary/foreign keys from PostgREST OpenAPI markers * fix(amplitude): send the second segmentation group-by as a repeated g and add the e2 second event * fix(box): request the fields Box omits by default, add marker pagination for folder listings, keep the agent's folder name, and guard path ids * fix(docusign): page envelope and template lists, ignore missing signing anchors, and guard envelope path ids * fix(dropbox): read the nested existing shared link and page list folder and search with cursors * fix(integrations): keep per-operation pagination values from leaking across operations and keep blank canvas custom field values * fix(docusign): note that freeform signing can be disabled per account * chore(docs): regenerate integration docs, catalog, and tool metadata * chore(notion): replace non-null assertions in tests and shrink the explicit-any baseline * fix(integrations): fail loudly on partial Notion reads, validate Asana limits and assignee, accept cursor-only Dropbox paging, normalize Supabase order modifiers, and mark nullable pagination outputs * fix(box): mark nextMarker nullable |
||
|
|
56893cb622 |
fix(integrations): validate zendesk, pipedrive, and intercom against vendor specs (#10028)
* fix(zendesk): align search, merge, and bulk update requests with the Support API and expose missing block fields * fix(pipedrive): move activity writes and pipeline listing to API v2, send lead visible_to as a string, guard path ids * fix(intercom): snooze via the manage-conversation endpoint, coerce snoozed_until, guard path ids, add user/lead recipient types * fix(integrations): default Intercom message recipients to a documented type, accept boolean done on Pipedrive updates, keep the Pipedrive file_type output * chore(docs): regenerate integration docs, catalog, and tool metadata * chore(lint): shrink the explicit-any baseline * fix(integrations): keep quoted Zendesk search text, require org names on create, validate Intercom snooze timestamps, and tighten Pipedrive outputs * fix(intercom): label the message recipient id for users, leads, and contacts |