Repository navigation
v0.9.66: pro free trial, workflows as code clean slate, slack progress timelines, whitelabel cleanup - #10356
Open
waleedlatif1 wants to merge 78 commits into
Open
v0.9.66: pro free trial, workflows as code clean slate, slack progress timelines, whitelabel cleanup#10356waleedlatif1 wants to merge 78 commits into
waleedlatif1 wants to merge 78 commits into
Conversation
…able writes report ignored columns (#10328) Function blocks that fail now also output errorMessage, the thrown message without the line/code prefix, alongside the unchanged .error; it is declared as a typed error-only output that compile, lint, codegen and the executor read wherever .error is. Table writes return ignoredColumns, the keys they dropped because no column matched, with runtime write behaviour unchanged.
… abort rewrite (#10303) * chore(db): drop organization.whitelabel_settings and rate_limit_bucket * chore(next): remove the /api/copilot/chat/abort compatibility rewrite * chore: describe the Redis-only provider admission store and trim the 0470 header
…stop (#10329) A turn is cancelled when this node's abort signal fired or when the worker's terminal said cancelled. The worker sends a cancelled terminal only for a Stop, but when that Stop reached it another way (another Sim node, or the worker's own stop handling), live or replayed during recovery, this node's signal never fired. recordCancelled read only the signal, so a user Stop was logged at ERROR as "Stream cancelled with unknown abort reason" with an undefined reason, although finalize correctly reported an explicit stop. recordCancelled now takes AbortReason.WorkerTerminalStop when the signal is still live: that is the only other source of a cancelled verdict. Nothing aborts with it, so the controller, its listeners and the SSE close telemetry are unchanged. The start test's session mock now delegates to the real classifier.
… leftovers (#10331) * chore(cleanup): finish the whitelabel, Redis and self-hosted provider leftovers * chore(providers): share one unpriced-model builder across discovered providers
…er (#10332) * fix(models): stop resolving sim-auto to ollama outside the model router sim-auto is a pseudo-model that only the agent, router and evaluator handlers resolve, through the model router, at execution time. Every other provider lookup fell through to getProviderFromModel's unknown-model default and treated it as an Ollama model: - translate and guardrails offered Auto but never resolve it, so a run sent model sim-auto to provider ollama (or a provider allowlist refused it as ollama); editing validation accepted it there and the catalog advertised it - assertModelAllowed refused sim-auto as provider ollama under allowedModelProviders, while the client gate allowed it - the usage breakdown gave sim-auto rows the Ollama mark and merged BYOK sim-auto usage into the Ollama row - the editor's API-key reset, tool-usage control and attachment cap looked up ollama for it (hiding the tool-usage control for Auto), and the first two threw uncaught on a blacklisted model - getPiModelOptions and the router/evaluator serialization looked it up on every call, logging a provider warning each time Now: - getProviderFromModel throws an explicit error for sim-auto instead of answering ollama; the guardrails Vertex-credential check skips sim-auto so it cannot reach that throw - DEFAULT_BLOCK_MODEL (providers/default-model.ts, dependency-free) is the one source for the agent/router/evaluator default and the executor's DEFAULT_MODELs, which are what sim-auto falls back to - getSerializedModelProviderId becomes resolveModelProviderId: an unset, reference or sim-auto model answers as DEFAULT_BLOCK_MODEL, and it still never throws. The agent block (dropping its own special case) and the three editor call sites use it, so they no longer throw - getModelOptions no longer includes Auto; getModelOptionsWithAuto (router, evaluator) and getAgentModelOptions do. Editing validation reads one declarative MODEL_OPTION_SOURCES map instead of comparing option functions: only getModelOptions and getModelOptionsWithAuto fields are checked against the catalog, sim-auto is accepted only where the source offers Auto on hosted Sim, and a reference or {{ENV_VAR}} value is passed through (router and evaluator used to reject them). The agent's model field stays unvalidated, as before - assertModelAllowed skips the provider allowlist for sim-auto (the router gates each pool candidate) but still applies deniedModels - the usage breakdown attributes sim-auto to its own key, labelled Auto, in the model and BYOK dimensions; every other model is attributed as before * fix(models): keep the configured provider for editor decisions on a model The API-key reset and the attachment cap now read the provider a model value names as written. The serialization helper substitutes the default model for a reference or sim-auto, which dropped a reference's explicit namespace (so switching between models of that provider cleared the key) and gave sim-auto the default model's larger attachment cap, although Auto can route images to an inline-only provider. sim-auto and blacklisted models name no provider, so the key comparison treats them as their own value and the cap stays at the field's own size.
…h generated exit-code, diagnostic and limit references (#10334) Workflows and workspace as code docs move under /workflows/code as a tutorial, how-to pages and generated references; exit codes, diagnostics and limits are generated from the engine (check:workflow-code-docs fails on drift); /workflows/workspace-code redirects to /workflows/code/workspace; CI recipes for a PR plan comment and a scheduled drift job; quick fixes from the docs audit.
…10330) * feat(billing): card-required Pro free trial with a capped allowance New personal Pro subscribers get a 14-day trial at checkout with a card collected up front. The trial counts as Pro (features and Sim-hosted keys) under a fixed 2,000-credit allowance: no weekly refresh, no on-demand usage, no overage billing, and no team conversion until it converts. Each card and each account starts one trial; a reused card ends the trial at once so the card is charged. * fix(billing): settle trial card checks from claims, retry them, and cap trial credit grants * fix(billing): serialize trial claims per account and judge only Pro checkout trials * chore(db): format trial migration snapshot
…ntions, and an env-number audit (#10333) Primer and operations help cover skipped-block references, rejoining branches, loop/parallel item refs and run logs; v2 log detail leads with a failure summary; export notes nulled bindings; a root AGENTS.md pointer; NO_COLOR/TERM=dumb honoured; Node 22 floor; --summary-file plan/status Markdown for any CI, carried into suggested next commands; check:env-numbers fails raw numeric env reads that skip envNumber.
…d help, and typed Function results in JSON fields (#10335)
…ion results, resume ids and builder names (#10336)
…ent primer, help and docs (#10338)
…uto (#10341) * fix(models): accept models ollama can serve and refuse a denied sim-auto The editing validator rejected any model id outside the static catalog on the router, evaluator, translate and guardrails blocks. At runtime an id that no provider claims runs on Ollama, so a locally installed model (llama3.1:8b, user/model library names) could not be written by an edit, the workflow-state API or workflow-as-code, and replacing a workflow that already used one failed outright. Where Ollama can serve a model (reachable and not blacklisted), the validator now accepts an Ollama-shaped name that no provider claims, mirroring the runtime. Ids a provider claims, free text, and sim-auto are still rejected. Whether this deployment can reach Ollama is now one helper, isOllamaReachable, used by the chat and embedding model lists, the embedding client and the access-request catalog, which each restated it. resolveAutoModel now checks the configured sim-auto against the workspace's permission group before routing. A group that denied sim-auto still ran it as whichever pool or default model it allowed; the editor already hid Auto for such a group, and execution now refuses it the same way it refuses any other denied model. * fix(models): keep the ollama url check private and import mocks directly
* chore(config): retire the remaining NEXT_PUBLIC_* flag twins The browser now reads BILLING_ENABLED, E2B_ENABLED, SLACK_EXTENDED_SCOPES, DISABLE_INVITATIONS and DISABLE_PUBLIC_API through the deployment-shape projection, like the enterprise flags, instead of NEXT_PUBLIC_* twins that had to be kept in sync by hand. - env-flags: browser branches read the projected value (absent reads as off); add isE2bEnabled - deployment shape: project e2bEnabled, slackExtendedScopes, invitationsDisabled and publicApiDisabled (optional for rolling compatibility) - Pi block and usePermissionConfig read the deployment shape - env schema, Helm values, docs and e2e scripts drop the twins - sim-setup: remove the twin pairing and the E2B mismatch check; doctor now warns that a leftover twin does nothing and names its server variable * chore(helm): bump chart to 1.15.4
…ocs, slim sdk readme (#10343)
…llama (#10351) * fix(models): route tagged ollama names that share a cloud prefix to ollama findProviderFromModel matched provider patterns (/^gpt/, /^mistral/, /^claude/, ...) against any id that no namespace or catalog entry claimed. The browser registers the installed Ollama list, so the editor resolved a local model such as gpt-oss:20b or mistral:latest to Ollama, but the server never holds that list: execution fell through to the cloud pattern and sent the request to OpenAI or Mistral with the user's key, or failed on a missing one. Ollama lists every installed model as name:tag, and no cloud model id carries an Ollama tag, so a bare tagged name is now left unclaimed before patterns run and getProviderFromModel defaults it to Ollama, the same as every other local name. Namespaces and exact catalog ids still win first, so bedrock/...:0 and openrouter/...:free are unaffected. Saved workflows heal without a migration, and the editor, execution, permission checks and the editing validator now agree on the provider. getModelCapabilities re-implemented the pattern scan and kept reporting a cloud provider's capabilities for these names; it now falls back to findProviderFromModel so the two cannot disagree. * improvement(models): share the ollama model-name rule between the resolver and the validator
…0352) Sync the worker contracts: model-router candidate ids now start and end with a letter or digit and are not trimmed, and the replay-end frame's payload, kind, reasons and envelope live in mothership-stream-v1 as MothershipStreamV1ReplayEnd* instead of protocol's StreamReplayEnd. The run replay reader validates the frame against the synced kind and reason constants instead of a hand-kept copy, and logs a malformed frame with its zod issue paths. The frame stays outside the live run kinds; a contract test pins that the live parser rejects it. A model-router test runs the request body Sim builds through the synced ModelRouterRequest, so a tier id the worker would reject fails here first.
* docs(library): update n8n-alternatives * Pi Babysit: address PR #10349 feedback * Pi: # Task Fix repeated questions in ONE existing post: `apps/sim/conte... --------- Co-authored-by: Sim Pi Agent <pi@sim.ai>
…cruiting Operations? (#10347) Co-authored-by: Sim Pi Agent <pi@sim.ai>
* improvement(sim-cli): upgrade commander 15, chalk 6 and babel 8 - commander ^11.1.0 -> ^15.1.0 (sim-cli and the root docs generator that walks its command tree) - chalk 5.6.2 -> 6.0.1 (sim-cli) - @babel/parser and @babel/types 7.29.x -> 8.1.2 in workflow-code and workspace-code, and the root parser the audit scripts use, so the CLI bundle carries one parser copy; apps/sim keeps 7 for the executor's own parse of user function code - workflow-code: Babel 8 types a member's object as Expression | Super; add an isMemberAccess guard and type chain roots as MemberExpression['object']; drop the 'Import' callee hint case Babel 8 no longer produces - audits: read TSImportType.source (Babel 8 rename) and drop the Babel 7 Import-callee shapes * improvement(sim-cli): require node ^22.18.0 || >=24.11.0 to match bundled babel 8 and commander 15 - engines.node in sim-cli, workflow-code, workflow-sdk and workspace-code - README and CLI install docs state the new floor - the publish workflow smoke-tests the packed bundle on node 22.18.0, the floor
… Service Requests? (#10353) Co-authored-by: Sim Pi Agent <pi@sim.ai>
Co-authored-by: Sim Pi Agent <pi@sim.ai>
…e contract schemas (#10354) * improvement(mothership): shadow-check worker stream frames against the contract schemas Takes the regenerated mothership-stream-v1 contract, whose types are now inferred from zod schemas. Frames the worker sends this server (the live leg and the run replay) go through parseIngestedStreamEventEnvelope: the existing validator still decides every frame, and the contract schema runs beside it. A disagreement in either direction increments copilot.stream_contract.disagreements (direction, event type, capped kind/phase) and logs the zod issue paths, once per distinct disagreement per ten minutes; a failure of the check itself is logged under the same limit. Synthetic file-preview frames are skipped by their previewPhase. The browser and the outbox reader are unchanged. Tests pin a representative set of frames the validator accepts and the schema rejects, one per kind of gap. The run replay reader validates replay-end payloads with the synced MothershipStreamV1ReplayEndPayloadSchema instead of a local copy of the same shape, and the shadow reuses the contract parser's event-type set. * improvement(mothership): tighten the stream contract shadow's skip and dedupe The shadow skipped any accepted frame carrying a payload previewPhase, so a worker frame with a stray previewPhase hid its schema rejection. It now skips only a frame the contract check rejects, which is exactly one the validator accepted as a synthetic file-preview frame; the previewPhase test stays as the cheap prefilter. A test pins the stray-field case. The log dedupe is an lru-cache (max 256, ttl the ten-minute window, read against Date.now) instead of a hand-rolled TTL map, still reporting the repeats skipped since the last line. Takes the regenerated protocol contract, whose tool deadlines are positive integers, and documents the new metric recorder and direction type with TSDoc.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…c before the keyboard selection proof (#10391)
… both-renamed rule (#10395) * improvement(cli): the source primers name the child-workflow call and scope the both-renamed rule to one block * fix(cli): the primer retry example keeps waitBetweenTriesMs, which compileRetry requires
…#10396) * fix(desktop): a fatal main-process error can no longer hang a quit * fix(desktop): a window's late show after it closed no longer throws during quit * fix(desktop): only a committed quit skips the recovery prompt
…stead of seven days (#10397)
…subflow moves and rerun-from-block (#10399) * fix(workflow-code): print an inferred-text JSON ref as a template so upstream code edits cannot flip its storage A stored quoted token in a JSON field printed as the bare reference whenever refValueKind typed it a string, including when that type was only inferred from a Function's code or a child workflow's Response data. The printed source then left the field's storage to code in another block: an edit there that made the type unreadable compiled every unedited reader bare, so a string value broke the JSON at run time. The printer now prints a quoted token bare only when a declaration types it a string (refDeclaresString), and as t`${ref}` otherwise, which stores quoted whatever the code returns. The local check scoped W_JSON_REF_UNTYPED to blocks the lock does not bind, while the server reports it for any field that compiles differently than stored; it now reports it on any block the edit changed, including one an edit elsewhere makes compile differently. * fix(executor): a bare string reference in a JSON field splices as a JSON string A reference outside any string literal in JSON text (a Response body, table row data, an api body) spliced a string value raw, so `{"error": <check.message>}` produced invalid JSON for any message that was not itself JSON. Such a string now lands JSON-encoded; a string that already reads as one JSON value (an agent's JSON answer, a numeric env var) still splices as written, and a reference inside a string literal keeps its existing escaping. The api block's request retry params now say what they retry (timeouts, connection resets, 429 and 5xx, for GET/HEAD/PUT/DELETE unless non-idempotent retries are on), what fails at once (an unresolvable or refusing host, other 4xx), and that the block retry setting is separate and reruns the whole block after any failure. Their titles read "Request retries", "Request retry delay (ms)" and "Max request retry delay (ms)". * improvement(cli): self-sufficient workflow export, atomic subflow moves, documented table columns - `sim workflows export` keeps workspace bindings (table, knowledge base, child workflow ids) by default, so a table block prints its tableId; `--no-include-workspace-bindings` clears them for a copy to share. The stderr note pointing at `workflows outline` is gone. - Moving a block into or out of a loop or parallel removes the stored edges the move leaves crossing the boundary and names them in `warnings`, instead of recording them as skipped items that made `atomic` refuse the batch. Edges the batch itself asks for across a boundary are still refused. Operations help states this. - `tables create --schema` and `tables columns create --column` list every column field (required, unique, options, multiple, currencyCode, id, position) generated from the shape the server validates. * improvement(cli): make rerun-from-block a first-class run loop - A failed run (workflows run, runs get, runs wait) whose failure names a block now carries `next`: `sim workflows run <workflowId> --from-block <blockId> --source-run <runId>`, so an agent fixes the block, applies, and reruns only the failing part on that run's upstream outputs. Parallel-branch ids and ids outside the issued format get no command. - The raw hidden `--run` JSON flag is gone; the run selection is built only from --manual, --trigger, --mock-payload, --from-block, --source-run and --stop-after. - `workflows run --help` and the --from-block/--source-run descriptions say what the rerun reuses; both source primers name the rerun flags in Run and debug, within the 4096-byte budget. - paused-run.ts becomes run-next.ts now that it names the next command for failed runs too. * docs(workflow-code): describe the bare-reference splice rule the executor now applies * improvement(workflows): reuse the shared block label, drop the dead flag-hidden option, and align the splice docs * fix(workflows): address review on rerun hints, removed-edge warnings, retry delays and docs - A failed run's error carries rerunFromBlockId: the failed block, or the outermost loop or parallel holding it, since a run cannot start inside one. Execute reads it from the graph the run executed, Get workflow run from the saved draft. The CLI prints next from it instead of the failed block id, so a failure inside a loop no longer prints a rerun the server refuses. - Edge validation names why it dropped an edge (missing block, annotation-only, trigger target, scope); the removed-edge warning adds loop and parallel wiring advice only for a scope crossing. - backoffWithJitter never waits longer than maxMs: jitter at the cap only shortens the wait, so an api block's max request retry delay is a real maximum. - source check help: W_JSON_REF_UNTYPED scope sentence rewritten. - cross-kind integration expects a child-result text ref printed as t`${...}`. - Docs baseline hashes for the operations apply edge help fence. * test(utils): drop the retry test's redundant mock-restore hook * fix(api): keep rerunFromBlockId out of the resume response's error schema
…at store a reference anew (#10400) The offline check reported W_JSON_REF_UNTYPED on every untyped bare reference of a block whose digest changed since the get. Renaming a block's display name changes its key, so the block and every block reading it compiled to a new digest, and each untouched untyped reference in them was reported although its field stores exactly what it stored. The server compares per field, through the apply's renames, and stays quiet there. A get or apply now records in .sim/stored-edges.json the JSON fields of the printed source that hold untyped references (the text each stores and those references; CompileResult.untypedJsonFields), and the compile reads them back as CompileInput.storedUnreadUntypedFields beside the lock. Such a reference stays quiet while its field compiles to the same text through the lock's renames, as one the stored workflow holds does against `stored`. A field whose text changed, or a reference that was typed when printed (a Start input or a Function's code an edit changed), is reported. Without the record or the catalog the source was printed with, the check keeps the block-level rule; --strict still reports every one.
* improvement(tools): declare a read/write effect on every tool Every ToolConfig now declares `effect: 'read' | 'write'`. `read` means the tool changes nothing outside Sim, so a dry run may execute it; anything that creates, updates, deletes, sends, charges, triggers, persists, or depends on its params is `write`. It replaces `assistant.effect`, which Assistant's policy, binding, review, retry, and mothership payload now read from the tool. The label was seeded once across all 6,286 registered tools (3,555 read, 2,731 write): GET/HEAD read, PUT/PATCH/DELETE write, and POST and in-process operations from their documented semantics. Six GET tools that write after reading carry a `// tool-effect:` justification. check:tool-effects loads the registry and fails a tool without an effect, a static verb that contradicts its label without a justification, and a stale or unattributable justification. The label is public: generated tool metadata, the v2 tool and block catalogs (`sim blocks get`, `sim tools`), and the source block catalog (block `effect` and per-operation `operationEffects`, shown by `sim workflows source params`). * fix(tools): relabel side-effecting reads and tighten the effect definition `read` now means the call changes nothing outside Sim: no create, update, delete, send, post, trigger, enqueue, consume, or mark-read; no job, run, conversation, history item, or other resource left in an account; no credit-funded reveal; no external delivery. Usage billing for the call itself does not count. `write` is anything else, including input-dependent effects. The definition is stated the same way in ToolEffect, the v2 catalog schema (and OpenAPI), the source catalog types, check:tool-effects, the skills, and CLAUDE.md, and no longer promises dry-run behaviour that has not shipped. 54 tools move from read to write: provider jobs and runs (Firecrawl, Bright Data, Exa, Parallel, You.com research, Harmonic, LogRocket, Coda and Slack List exports, CloudFormation drift, CloudTrail Lake queries, NetSuite async batch reads), media generation and transcription that persist in the provider account (video, image, Higgsfield, ElevenLabs TTS/STS/SFX/isolation/STT, AssemblyAI), parse runs kept by Extend, Reducto, and Pulse, Apollo people reveals, Wiza reveals, Icypeas records, ChatCBI conversations, Fivetran setup tests, Slack reader DMs, Reddit mark-read, RevenueCat get-or-create, and Upstash EXPIRE/INCR/INCRBY. The five GET tools carry `// tool-effect:`. check:tool-effects also flags a read tool whose function-valued method can return PUT, PATCH, or DELETE. Unregistered access ids (model providers) count as write in the source catalog too, matching the block detail. * fix(tools): relabel contact reveals, RTR commands and mssql query as writes Revealing a person's contact data (email, phone) for credits is `write`; company/firmographic lookups and verifications that only spend lookup credits are `read`. ToolEffect, the v2 catalog schema (and OpenAPI), check:tool-effects, the add-tools, add-integration, and validate-integration skills, and CLAUDE.md now state it that way. 37 contact reveals move to write: Prospeo, ZoomInfo, Findymail, LeadMagic, Datagma, Dropcontact, Enrow, and Hunter email/phone finders and person enrichment, Hunter domain search, Firecrawl enrich, and the Enrich, RB2B, Sixtyfour, People Data Labs, and PitchBook person contact lookups. The 14 GET tools among them carry `// tool-effect:`. crowdstrike_execute_rtr_command is write: the read-tier eventlog family includes export and backup subcommands that write files on the host, and a queue_offline session enqueues commands. mssql_query is write: its only guard is the lexical read-only screen, with no server-enforced read-only transaction. The screen now also rejects NEXT VALUE FOR, which advances a sequence from inside a single SELECT. oracledb_query is write too: its read-only transaction does not bind a function with an autonomous transaction or a package such as UTL_HTTP called from the SELECT. * improvement(tools): simplify effect projection, policy input and rule text * improvement(tools): read tool metadata once in the review provider and drop a history phrase * fix(tools): starting a provider query or job is a write; operations of unregistered tools count as write * docs(tools): scope the job rule to asynchronous executions, not synchronous read-only queries
* feat(workflows): side-effect-free dry runs `sim workflows run --dry` (v2 execute `run.dry`, manual runs only) runs the saved draft without sending its writes. Every tool call not declared `read` (table writes, sends, HTTP calls, custom tools, and every MCP tool, which declares no effect) is answered with a placeholder shaped like the tool's outputs and listed in the run result's `sideEffects.stubbed` with the request it would have sent: an in-process operation's input or an HTTP call's method, URL and body, with the credentials the call resolved and the run's resolved secrets redacted. Reads, model calls, conditions and credential resolution run for real. Function blocks run their code and are listed in `sideEffects.unchecked`. Mothership and Pi blocks, which act outside the tool seam, and Human in the loop and Wait blocks, whose paused run would resume without the dry run, are answered whole. Dry runs are logged under the `test` trigger and are synchronous only (no stream, async or waitTimeoutSeconds). The interception is one check in `executeToolImplementation`, after credentials resolve and before dispatch, so block and Agent tool calls are covered alike. The policy rides on the execution context as `sideEffects`, which every child inherits: Workflow blocks, custom blocks, and workflows or custom blocks an Agent calls as tools, so a child's writes stay stubbed. `run.allowBlocks` (`--allow <block>`) sends one block's writes for real and lists them in `sideEffects.allowed`; `run.mocks` (`--mock <block>=<json|@file>`) answers a block with a fixed output through the existing mock seam, with or without `--dry`. Both resolve blocks by id, name or key like `--stop-after`. Workflow tests now answer the writes their mocks do not with the same placeholders. A failed dry run's `next` rerun keeps `--dry`. The source primers, `sim workflows source --help`, `run --help`, the CLI, build-and-run and coding-agent docs, and the integration skills now test with `--dry`. * fix(workflows): close dry-run escapes and secret exposure found in review A dry run now sends no externally visible write and keeps nothing beyond its own `test`-trigger log: - Test runs raise no workspace event (emitExecutionCompletedEvent) and are left out of alert-rule statistics (excludeEventlessExecutionsCondition), so a dry run never starts a Sim-trigger subscriber. - Test runs do not bump workflow.runCount or lastRunAt. - Agents read memory but write none under a side-effect policy (no turn session, no appended messages). - The policy decides a write before a hosted key is drawn, so a stubbed write spends no rate-limit slot; credential resolution still runs. - Files a dry run uploads to a provider Files API are deleted once the model call settles. - Custom blocks, on a canvas or called by an Agent (deployed_block_executor), are answered whole and never run, so nothing lands in the publisher's workspace and none of its internals reach the consumer. - Code (function_execute) runs for real for a Function block or an Agent and is listed unchecked with a reason naming the caller; Condition evaluation is not listed. - run.mocks requires run.dry. Allowed and mocked blocks are keyed by the run's own workflow and block; --allow on a Workflow or custom block is refused. - A tool's nested executeTool calls (postProcess) run in the caller's _context, so an allowed block's follow-up writes are allowed too; Pi's Sim tools carry the Pi block id. - A test run is refused as the source of a non-dry from-block run. - A failed dry run keeps its sideEffects, compacted inside the result's own error mapping; the run result and `runs get` report the dry run's allowed and mocked blocks (`dryRun`), so every `next` rerun keeps --dry, --allow and --mock (a workflow test's run keeps --dry). - sideEffects requests: MCP and custom tool calls are recorded by their arguments only (never envVars or other run context), password-field values are masked whatever the field is called, and the workspace's PII redaction is applied; a request that cannot be vouched for is null. Contract and CLI: mocks are typed as objects, `omitted` is counted per list, `allowed` is deduped per block and tool, blockId/block are null instead of empty, the policy is WriteStubPolicy with decideWrite/answerBlock and mocks live on it (block-mocks.ts and the service's testHooks param are gone), `--dry --async` says to drop --async, and the CLI's repeated-option collector and plain-object check are shared. The workflow-dir guide names `apply --dry-run` and `run --dry` apart, and the primer's run line is reworded; its other rewordings from the previous commit stay because the 4096-byte primer budget forces them. * fix(workflows): enforce dry-run guarantees at the state layer and stop persisting mocks - A test run (trigger test: dry runs and workflow tests) is never the source of a run that sends its writes: getExecutionStateForWorkflow refuses one unless the caller passes allowTestRun (only a dry run from a block does), and getLatestExecutionStateWithExecutionId skips them. This covers the v2 use case, the editor execute route (named and latest) and Copilot run_from_block/run_block, and replaces the per-surface check. - A test run is never resumed: resume admission refuses an execution logged under test, the CLI names no resume command for one, and workflow tests answer Human in the loop and Wait blocks whole like dry runs, so the pausingBlocks option is gone. - run.mocks are data: a field starting with _ (_pauseMetadata and other executor control fields) is refused, and so is a mock of a locked block or one inside a locked container. - Mock outputs are no longer persisted: the log records only allowed and mocked block ids. readWorkflowRun reads them from the execution data the status read already materialized (so they survive externalization), validated with the contract schema and gated like other execution data. The CLI rerun keeps --dry and --allow; --mock values are passed again. - Provider Files API uploads register their removal as soon as the provider names the file, the caller owns the list, and the try/finally starts before the first upload, so a dry or test run deletes every file that landed, including on a partial or Gemini processing failure. - A dry run never rejects a large inline response, so its result always carries sideEffects. - Nested tool calls inherit the caller's _context only under a side-effect policy. - Cleanups: one response-too-large mapping, request passed directly to answerUnsentWrite, one run-context param set, one log lookup for the source run, recordSettledRun reads the trigger from the LoggingSession, a TEST_TRIGGER constant, tool special cases in one declarative map, password fields indexed once from the registry, agent memory decided once, and toArray in the CLI. Allowing an Agent covers only its own tool calls (documented; the CLI notes when an allowed block sent nothing). * fix(workflows): treat mocks as data only and list every code execution in a dry run - One rule for mocks (run.mocks and workflow-test mockBlock): refuse any _ field and the output fields the trace span and bill are built from (cost, tokens, model, providerTiming, toolCalls, executionData, childTraceSpans, child workflow ids); block samples omit them too - List Condition expressions and While/Do While loop conditions under sideEffects.unchecked, once per block, via a new SideEffectPolicy.ranCode - Upload provider Files API attachments only after the cached-final early return - Keep a failed dry run's sideEffects when compacting its error output fails - Read the paused run's trigger in the same locked query; memoize getBlockByToolName and password params lazily; drop the test-only removals default; simplify answered-block and tool decisions; narrow the editor route try - Tests: durable-state check instead of sleep, specific refusals, positive controls, transport guard on the hosted-key test, success-path upload cleanup * test(mothership): record the run status's dryRun field in the content-delivery baseline * fix(workflows): redact before describing dry-run writes and keep memory reads - Build a stubbed write's request from params whose secrets are already masked (credential fields and password fields by field and value, collected at any depth, then the run's resolved secrets by its registry), so no builder transformation such as base64 document content can carry a secret; the payload pass and registry projection stay as defense in depth. - Authorize and check an MCP write against the server's tools (checkOnly) before answering it, so an unusable one fails in a dry run as it would live. - Let a dry run's Agent read its stored conversation (rich history and the memory retrieval tool) without opening a turn or writing memory. - CLI: refuse --mock __proto__, and count omitted entries in the dry-run summary. - Contract: run.mocks emits maxProperties 50; texts now say the rerun record keeps only mocked block ids while the log shows a mocked output redacted like any other block's. - Primer and guide name sideEffects.unchecked and warn that live runs write real data; integration skills mention the 50-entry cap and null requests. * fix(cli): keep the primer retry example compilable * fix(workflows): keep dry-run describe failures and MCP checks side-effect free * fix(mcp): a read-only discovery preserves the OAuth grant * fix(mcp): read-only discovery takes every shared-state guard best-effort discovery takes
…nd in for (#10404) * improvement(workflows): dry-run placeholders echo the writes they stand in for A stubbed write was answered with a generic sample of the tool's outputs, so a Function reading a dry-run table upsert's row.data.<field> got null and an agent testing its workflow concluded its logic was wrong. A tool may now declare a pure dryRunOutput(params) on its config: the outputs the request alone determines. It receives the params with every secret masked (as sideEffects.stubbed[].request is built), its result is redacted like that request, and the sample of the declared outputs fills whatever it leaves out (ids, nested fields, each array item from the sample's first). Tools without it keep the sample. Declared for table insert/upsert/update row (row.data echoes the written data; update keeps the named row id) and batch insert (rows and insertedCount), file write (requested name, text byte size), and knowledge create document (the document name as stored). Filter updates and deletes are left out: their outputs depend on stored state. * improvement(workflows): placeholders follow the declared output schema and redact once A dry-run echo was merged into the sample by the sample's value shape, so a table row declared as bare json came back with the generic sample keys (name: 'Sample Object', status: 'active') beside its data, and every batch row shared the id 'item_1'. The echo is now laid over the sample by the declared schema: field by field where an output declares properties, item by item where it declares array items, and whole anywhere else (an undeclared field is dropped). The table hooks return the row as the routes emit it (data, and placeholder id, position and timestamps, distinct per batch row) with no ignored columns; update's row holds only the fields it patches. Knowledge create echoes only the document name, and file write sizes its text with utf8ByteLength. Value-based masking replaced every occurrence of any string under a secret-named field, however short, so a one-letter reset_token column turned 'a@b.co' into '[REDACTED]@b.co' in the request and in what downstream blocks read; worse, a value masked inside a run secret left the rest of that secret unmatched by the registry. Values shorter than the repo's identifying-literal floor (isNonIdentifyingSecretLiteral) are now masked only by their field, password fields are masked by name like credential-named ones, and the registry projection runs before key and value masking. A stubbed write's request and echo are redacted in one pass, one PII call per write; when that pass cannot vouch for the pair, both are null. * docs(skills): describe the placeholder overlay for arrays and requested file names
…eployment version (#10411)
…ng code unchecked (#10412)
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.