diff --git a/.changeset/accumulator-output-types.md b/.changeset/accumulator-output-types.md deleted file mode 100644 index ac3b137..0000000 --- a/.changeset/accumulator-output-types.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -The validator now types a `for-each` or `while` accumulator from its loop body's output, so an accumulator that builds the wrong shape is reported as an error. It warns separately when the initial value, which the loop outputs if the body never runs, does not match the body's output. Type inference also flattens lists of arrays correctly, types empty literal arrays as arrays with no items, checks each member of a union and each tuple item against the target schema, and treats different JSON Schema types as disjoint. The `for-each` and `while` step descriptions now explain how to collect outputs without an accumulator and how to append to an array accumulator. diff --git a/.changeset/brighter-error-borders.md b/.changeset/brighter-error-borders.md deleted file mode 100644 index a669dcb..0000000 --- a/.changeset/brighter-error-borders.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Render error diagnostic borders with a brighter red in light mode. diff --git a/.changeset/configurable-strict-tool-calls.md b/.changeset/configurable-strict-tool-calls.md deleted file mode 100644 index c7ddfd4..0000000 --- a/.changeset/configurable-strict-tool-calls.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": minor ---- - -Add configurable `strictToolCalls` parameter to `generateWorkflowStream` and close step schemas with `additionalProperties: false` at every level diff --git a/.changeset/copy-theme-css-raw.md b/.changeset/copy-theme-css-raw.md deleted file mode 100644 index 4f33b39..0000000 --- a/.changeset/copy-theme-css-raw.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Copy theme.css as-is instead of running it through PostCSS, since consumers process it with their own Tailwind. Adds a test that verifies every `--rf-*` token has a corresponding `--color-*` bridge entry. diff --git a/.changeset/default-strict-tool-calls-false.md b/.changeset/default-strict-tool-calls-false.md deleted file mode 100644 index 1c5f1df..0000000 --- a/.changeset/default-strict-tool-calls-false.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -Default `strictToolCalls` to `false` for broader LLM provider compatibility diff --git a/.changeset/display-toolset-props.md b/.changeset/display-toolset-props.md deleted file mode 100644 index 05b1063..0000000 --- a/.changeset/display-toolset-props.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@remoraflow/core": minor -"@remoraflow/ui": minor ---- - -Add `DisplayToolSet` type with optional `displayName` and `displayDescription` per tool. The WorkflowViewer `tools` prop now accepts `DisplayToolSet`, rendering display overrides in place of real tool names and descriptions when provided. diff --git a/.changeset/export-running-execution-status.md b/.changeset/export-running-execution-status.md deleted file mode 100644 index 17e1c2c..0000000 --- a/.changeset/export-running-execution-status.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -Export `RunningExecutionStatus` type from the public API so consumers can narrow the running-state branch of `ExecutionState` diff --git a/.changeset/expression-autocomplete.md b/.changeset/expression-autocomplete.md deleted file mode 100644 index 7eb9ec4..0000000 --- a/.changeset/expression-autocomplete.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -"@remoraflow/core": minor -"@remoraflow/ui": minor ---- - -Add expression autocomplete to the workflow editor. The JMESPath and template inputs in `StepEditorPanel` now surface in-scope paths via a Command-based suggestion popover, including `[*].field` projections for arrays of objects. Custom expressions can still be typed freely. - -`@remoraflow/core` exports two new utilities for building the scope tree: `getExpressionScope(workflow, graph, tools, stepId)` returns the root identifiers in scope at a step (workflow input, predecessor step outputs, enclosing for-each loop variables) along with their JSON Schemas, and `enumerateSuggestions(scope)` flattens that into a list of suggested paths. Types `ScopeEntry` and `ExpressionSuggestion` are also exported. - -`@remoraflow/ui`'s `StepEditorPanel` accepts a new `expressionScope` prop that is provided to descendant `ExpressionEditor`s via context. `WorkflowViewer` wires this up automatically using the latest compiled graph. diff --git a/.changeset/extract-theme-vars-css.md b/.changeset/extract-theme-vars-css.md deleted file mode 100644 index 683d79c..0000000 --- a/.changeset/extract-theme-vars-css.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": minor ---- - -Add `@remoraflow/ui/theme-vars.css` export containing CSS custom properties (step tones, status colors, React Flow mappings, syntax highlighting) extracted from `theme.css`, so consumers can import variables independently of the Tailwind theme block. diff --git a/.changeset/faster-workflow-definition-schema.md b/.changeset/faster-workflow-definition-schema.md deleted file mode 100644 index bb3f356..0000000 --- a/.changeset/faster-workflow-definition-schema.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -The workflow definition schema is about twice as fast to build, because the union of step types is now built in one call instead of a chain of `.or()` and `.exclude()` calls. diff --git a/.changeset/fix-core-workspace-dep.md b/.changeset/fix-core-workspace-dep.md deleted file mode 100644 index 2d7924b..0000000 --- a/.changeset/fix-core-workspace-dep.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Fix @remoraflow/core resolving as uninstallable `workspace:*` for npm consumers by replacing the workspace protocol with a standard semver range managed by changesets. diff --git a/.changeset/fix-declaration-emit.md b/.changeset/fix-declaration-emit.md deleted file mode 100644 index c6593d7..0000000 --- a/.changeset/fix-declaration-emit.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@remoraflow/core": patch -"@remoraflow/ui": patch ---- - -Fix declaration emit so dist/schema.d.ts and dist/types.d.ts are generated, and resolve all type errors across the monorepo diff --git a/.changeset/fix-exports-point-to-dist.md b/.changeset/fix-exports-point-to-dist.md deleted file mode 100644 index 3ee0acc..0000000 --- a/.changeset/fix-exports-point-to-dist.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@remoraflow/core": patch -"@remoraflow/ui": patch ---- - -Fix package exports to point at built output in `dist/` instead of unpublished source files. Core's exports were a bare `./src/index.ts` (not in the tarball); UI had a `bun` condition with the same problem. Both now use only `import` and `types` conditions targeting `dist/`. diff --git a/.changeset/fix-fast-json-patch-node-import.md b/.changeset/fix-fast-json-patch-node-import.md deleted file mode 100644 index 58a9910..0000000 --- a/.changeset/fix-fast-json-patch-node-import.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -Fix a startup error in Node ESM ("Named export 'applyOperation' not found"): `fast-json-patch` is now imported through its default export. diff --git a/.changeset/fix-package-exports.md b/.changeset/fix-package-exports.md deleted file mode 100644 index b80053a..0000000 --- a/.changeset/fix-package-exports.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -Remove `bun` conditional export entries that pointed to source files (`./src/lib.ts`, `./src/executor/adapters/aws-lambda.ts`) not included in the published tarball. Under the bun runtime, Node-style conditional export resolution picked the `bun` condition first, causing `Cannot find module '@remoraflow/core'` errors for consumers installing from npm. The `import` condition (`./dist/...`) is now used for all runtimes. diff --git a/.changeset/fix-registry-import-rewrites.md b/.changeset/fix-registry-import-rewrites.md deleted file mode 100644 index 48d1277..0000000 --- a/.changeset/fix-registry-import-rewrites.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Fix three shadcn component registry bugs that broke installs: - -- The registry import-rewriter kept relative paths (e.g. `../../components/ui/combobox`) for any file shipped by the registry, including `registry:ui` files. shadcn relocates `registry:ui` files to the consumer's ui alias, so those sibling-relative imports failed to resolve after install. Imports that resolve under `components/ui/` or `lib/` are now always rewritten to the `@/` alias. -- Renamed the custom `combobox.tsx` ui primitive to `workflow-combobox.tsx` so it no longer overwrites the consumer's existing `ui/combobox.tsx` (shadcn's public registry has no combobox, so every consumer's combobox is a roll-your-own at that path). The exported `Combobox*` names from `@remoraflow/ui` are unchanged. -- The `workflow-step-detail-panel` registry item duplicated six files already shipped by `workflow-viewer`, so installing both produced two copies of every shared file. The panel item now declares `workflow-viewer` as a `registryDependencies` entry and ships no files of its own. diff --git a/.changeset/fix-switch-case-empty-targets.md b/.changeset/fix-switch-case-empty-targets.md deleted file mode 100644 index e41a4b1..0000000 --- a/.changeset/fix-switch-case-empty-targets.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Fix switch-case edges with empty `branchBodyStepId` targets in the graph layout. When a case's `branchBodyStepId` is `""` (e.g. from a newly-added case/default or after `clearChildRef`), the layout no longer emits an edge pointing at the non-existent node id `""`. diff --git a/.changeset/fix-wait-for-condition-forward-reference.md b/.changeset/fix-wait-for-condition-forward-reference.md deleted file mode 100644 index 58fd167..0000000 --- a/.changeset/fix-wait-for-condition-forward-reference.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -Fix false `JMESPATH_FORWARD_REFERENCE` warning when a step downstream of a `wait-for-condition` references a step in its `conditionStepId` body chain. The static analyzer now models the fact that the body chain runs at least once before control proceeds past the wait-for-condition, so its outputs are visible to subsequent steps. diff --git a/.changeset/move-highlighting-css-to-theme.md b/.changeset/move-highlighting-css-to-theme.md deleted file mode 100644 index f029243..0000000 --- a/.changeset/move-highlighting-css-to-theme.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Move syntax-highlighting CSS rules from styles.css to theme.css for better theme separation diff --git a/.changeset/prevent-view-mode-node-delete.md b/.changeset/prevent-view-mode-node-delete.md deleted file mode 100644 index 7874d07..0000000 --- a/.changeset/prevent-view-mode-node-delete.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Prevent node deletion in the workflow viewer when editing is disabled. React Flow's built-in delete-key handler removed selected nodes even in view mode; the delete key is now disabled and `remove` node changes are ignored unless `isEditing` is true. diff --git a/.changeset/proud-days-fetch.md b/.changeset/proud-days-fetch.md deleted file mode 100644 index aa30be7..0000000 --- a/.changeset/proud-days-fetch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": minor ---- - -Add `stepId` field to `ExecutionError` identifying which workflow step caused the failure, or `null` for errors outside step execution. diff --git a/.changeset/remove-styles-css-import.md b/.changeset/remove-styles-css-import.md deleted file mode 100644 index b245297..0000000 --- a/.changeset/remove-styles-css-import.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Remove styles.css side-effect import and package.json style field now that all styles live in theme.css diff --git a/.changeset/restore-demo-toolbar-borders.md b/.changeset/restore-demo-toolbar-borders.md deleted file mode 100644 index c793754..0000000 --- a/.changeset/restore-demo-toolbar-borders.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Restore theme-colored borders for demo toolbar buttons. diff --git a/.changeset/restore-tool-output-handle.md b/.changeset/restore-tool-output-handle.md deleted file mode 100644 index 76ecf4a..0000000 --- a/.changeset/restore-tool-output-handle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Show an output connection handle for disconnected workflow steps while editing so their control flow can be repaired in the visual editor. diff --git a/.changeset/schema-accepts-raw-settings.md b/.changeset/schema-accepts-raw-settings.md deleted file mode 100644 index c35c0e1..0000000 --- a/.changeset/schema-accepts-raw-settings.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": patch ---- - -`createWorkflowDefinitionSchema` now accepts partial `RemoraflowSettings` and resolves defaults internally, so callers no longer need to pre-resolve settings. diff --git a/.changeset/scope-ui-theme-styles.md b/.changeset/scope-ui-theme-styles.md deleted file mode 100644 index 2820264..0000000 --- a/.changeset/scope-ui-theme-styles.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Scope viewer border defaults to prevent host UI overrides. diff --git a/.changeset/show-tool-output-schema.md b/.changeset/show-tool-output-schema.md deleted file mode 100644 index b4aab63..0000000 --- a/.changeset/show-tool-output-schema.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": minor ---- - -Show a tool's output schema in the workflow editor. When editing a `tool-call` step, the params panel now displays the tool's declared `outputSchema` as JSON Schema below the inputs, so users can see what data will be available to downstream steps after the tool runs. diff --git a/.changeset/strip-undefined-keys.md b/.changeset/strip-undefined-keys.md deleted file mode 100644 index 518bb84..0000000 --- a/.changeset/strip-undefined-keys.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Fix spurious validation errors caused by undefined-valued keys in workflow definitions produced by the editor diff --git a/.changeset/switch-case-forwards-branch-output.md b/.changeset/switch-case-forwards-branch-output.md deleted file mode 100644 index bb13659..0000000 --- a/.changeset/switch-case-forwards-branch-output.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": minor ---- - -A `switch-case` step's output is now the value returned by its selected branch, instead of `null`. The validator types it as the union of the branch outputs. Field access on a union type no longer warns when every member of the union has the field. diff --git a/.changeset/v1-overhaul.md b/.changeset/v1-overhaul.md deleted file mode 100644 index a8f2f5c..0000000 --- a/.changeset/v1-overhaul.md +++ /dev/null @@ -1,117 +0,0 @@ ---- -"@remoraflow/core": major -"@remoraflow/ui": major ---- - -Full rewrite of both packages. Every public module has been replaced; there is no incremental migration path from 0.x. - -### Core architecture - -The entire `@remoraflow/core` source tree has been rewritten. The three top-level modules (`compiler/`, `executor/`, `generator/`) are replaced by six new ones: - -- **`execution/`** — workflow runner with pluggable execution engines, step executors, LLM middleware, approval policies, duration budgets, and user-intervention adapters. -- **`validation/`** — modular validation pipeline (syntax, control-flow, structural limits, tool references, tool inputs, expression syntax, variable references, output schemas) replacing the monolithic compiler pass system. -- **`generation/`** — workflow generation with output-schema contracts, stop conditions, and structured submission validation, replacing the old `generator/` module. -- **`schemistry/`** — JMESPath output-type inference, JSON Schema subset diagnostics, structural summarization, Standard Schema helpers, and template extraction, consolidated from utilities formerly scattered across `compiler/utils/`. -- **`audit/`** — static capability analysis of a workflow definition (tool-call provenance, input-space inference per tool). -- **`step-registry`** — centralized registry of step types, their nested chains, output schemas, and metadata, replacing ad-hoc step-type handling spread across the codebase. - -The old entry point `lib.ts` is replaced by `index.ts` re-exporting all six modules. - -### Schema and type system - -- Workflow definition schemas moved from `types.ts` to a dedicated `schema.ts` module. The schema is now the single source of truth for the workflow DSL; `types.ts` holds runtime configuration and tool types. -- The `Tool` type is rewritten to accept `@ai-sdk/provider-utils` `Schema`, Zod v3/v4, and Standard Schema for both input and output schemas via a `FlexibleSchema` union. Output schemas on tools are now a first-class concept. -- `RemoraflowSettings` (formerly `RemoraflowOptions`) is the unified configuration surface for duration policy, structural limits, and LLM defaults. - -### New step types - -- **`while`** — general-purpose condition-driven loop with an optional accumulator, complementing `for-each` for cases where the iteration count is not known ahead of time. -- **`request-intervention`** — replaces `ask-supervisor`. Supports both multiple-choice and free-response modes with adapter-level error handling. - -### Execution engines - -Three execution engines replace the single `DurableExecutionAdapter` model: - -- **In-memory** (default) — steps run in-process with no recording; a re-invoked run starts over. -- **Checkpointing** — records step results in a caller-supplied `CheckpointStore`; a re-invoked run skips completed steps but does not detect or recover from crashes. -- **Durable** — delegates step execution and sleep to a `DurableExecutionAdapter` so a host with its own journal can suspend and resume runs. Adapters ship for AWS Lambda Durable Execution SDK, Inngest, and Temporal. - -The old SQLite adapter is removed. - -### Execution runtime - -- Duration policy (`maxDurationSeconds`, `maxExecutionSeconds`, `maxWaitSeconds`, `maxSleepSeconds`, `maxStepExecutionSeconds`, `minPollIntervalSeconds`) is enforced at runtime, not just at validation time. All budgets survive a resume. -- `structuralLimits.maxLoopIterations` is enforced at runtime. A `for-each` or `while` step exceeding the limit fails with `LOOP_ITERATION_LIMIT_EXCEEDED` before any iteration runs. -- Durable step keys are derived from a step's path (e.g. `loop.2.callApi`) instead of a per-frame positional counter. -- Delays are durable: `sleep` checkpoints its wake-up deadline and serves only the time still owed on resume. -- `ExecutionState.status` gains `sleeping`, `awaiting-condition`, and `awaiting-input`. -- LLM middleware pipeline for prompt construction, tool-constraint enforcement, and output parsing. -- Approval-policy system for gating step execution. - -### Validation - -The monolithic compiler is replaced by a modular validation pipeline with discrete passes: - -1. Syntax validation (arktype schema parse) -2. Control-flow validation (reachability, cycle detection, nested-chain modelling) -3. Structural-limit validation -4. Tool-reference validation -5. Expression-syntax validation (JMESPath and template parsing) -6. Variable-reference validation (scope tracking with forward-reference detection) -7. Output-schema validation (return-type inference across control-flow branches) -8. Tool-input validation (type-checking tool inputs against declared schemas) -9. Tool-definition validation (asserting execution functions and output schemas exist) - -Each pass can emit diagnostics and optionally correct the definition. A pass marked `failureMode: "block"` halts the pipeline on error. - -`compileWorkflow` is removed. Use `validateWorkflowDefinition` instead. - -### Workflow generation - -- Callers can require an output schema and reject generated workflows that cannot satisfy the contract. -- Nested control-flow return types are inferred precisely (switch-case branch unions, loop accumulator types). -- Tool output schemas are provided to the generation model. -- Undeclared workflow submission fields are rejected; strict structured submissions are enforced. -- Detailed generation diagnostics are optionally observable. - -`generateWorkflow` and `createWorkflowGeneratorTool` are replaced by the new `generation/` module API. - -### Peer dependencies - -- AI SDK peer dependency bumped from `ai@^6.0.0` / `@ai-sdk/provider-utils@^4.0.0` to `ai@^7.0.0` / `@ai-sdk/provider-utils@^5.0.11`. - -### Core dependency changes - -- Removed: `@jmespath-community/jmespath`. -- Added: `jmespath`, `ajv`, `@ark/json-schema`, `@standard-community/standard-json`, `@standard-schema/spec`, `zod@^4.4.3`, `dedent`. - -### UI architecture - -`@remoraflow/ui` is rewritten around a data-driven step-UI registry that replaces per-step-type node components and param editors. - -- **Step-UI registry** (`step-ui/`) — each step type declares its label, icon, tone, fields, field order, and advanced/node-row configuration in a single `StepUi` spec. The registry drives all rendering: node content, editor panels, palette entries, and field diagnostics. Adding a new step type to the UI is now a single registry entry rather than a new node component, param editor, and palette entry. -- **Field system** (`editors/fields/`) — a typed `FieldSpec` with `FieldKind` discriminator (`expression`, `template-text`, `identifier`, `step-ref`, `tool-ref`, `tool-ref-list`, `json-schema`, `schema-map`, `expression-map`, `case-list`, `boolean`, `constant`) replaces the old per-step-type param components. -- **Generic node rendering** — per-step-type node components (`agent-loop-node`, `tool-call-node`, `for-each-node`, etc.) are replaced by a single `StepNode` driven by the registry's `nodeRows` and `headerRows` declarations. -- **Syntax highlighting** — JMESPath and template-interpolation syntax highlighting via CodeMirror language support and inline `HighlightedExpression` components. -- **Primitives** (`components/primitives/`) — shared layout, badge, code, diagnostics, field, and toggle-field primitives. -- **Layout module** (`layout/`) — measurement, constants, and types extracted from the monolithic `graph-layout.ts`. -- **Expression scope context** — `ExpressionScopeContext` provides in-scope variable paths to expression editors for autocomplete. -- **Design system** — new `theme.css` with CSS custom properties; all shadcn primitive re-exports removed from the public API (consumers import them from their own shadcn installation). - -### Breaking changes summary - -- Every import path from `@remoraflow/core` has changed. The entry point is now `index.ts`, not `lib.ts`. The `./adapters/aws-lambda` subpath export is removed. -- `compileWorkflow` → `validateWorkflowDefinition`. The return type, diagnostics shape, and context arguments are different. -- `executeWorkflow` / `executeWorkflowStream` → `runWorkflow` in `execution/`. Execution options, state shape, and streaming protocol are different. -- `generateWorkflow` / `createWorkflowGeneratorTool` → new `generation/` module API with different options and return types. -- `ask-supervisor` step type → `request-intervention`. -- `DurableContext` → `ExecutionContext`, `DurableExecutor` → `ExecutionRun`, `DurableExecutionAdapter` (KV store) → `CheckpointStore`. -- `DurableContext.waitFor` returns an async generator rather than a promise. -- `now()` and `uuid()` are removed from the execution context. -- `maxSleepSeconds` and `maxLLMPromptTokens` are removed from `ExecutionOptions`. Duration policy is configured via `RemoraflowSettings`. -- Step ids may no longer begin with `__` (reserved for internal checkpoint keys). -- AI SDK peer dependency: `ai@^6` → `ai@^7`, `@ai-sdk/provider-utils@^4` → `@ai-sdk/provider-utils@^5`. -- `@remoraflow/ui` no longer re-exports shadcn components (`Button`, `Dialog`, `Select`, `Command`, etc.). -- Per-step-type node components and param editors are removed. Custom rendering now goes through the step-UI registry. -- Checkpoint keys for in-flight durable runs change format, so a run mid-flight across this upgrade will restart rather than resume. diff --git a/.changeset/validate-function-arg-types.md b/.changeset/validate-function-arg-types.md deleted file mode 100644 index b2cc601..0000000 --- a/.changeset/validate-function-arg-types.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": minor ---- - -Validate JMESPath function argument types at workflow definition time, catching type mismatches like `join('', [str, number])` before execution diff --git a/.changeset/validate-jmespath-function-names.md b/.changeset/validate-jmespath-function-names.md deleted file mode 100644 index 51382d9..0000000 --- a/.changeset/validate-jmespath-function-names.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@remoraflow/core": patch -"@remoraflow/ui": patch ---- - -The validator now reports calls to JMESPath functions that do not exist, such as `append()`, instead of letting them fail at runtime. The list of JMESPath functions is exported as `JMESPATH_FUNCTION_NAMES`, and the UI's syntax highlighting uses it. diff --git a/.changeset/workflow-editor-tools.md b/.changeset/workflow-editor-tools.md deleted file mode 100644 index 4bafe6d..0000000 --- a/.changeset/workflow-editor-tools.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/core": minor ---- - -Workflow generation now edits a draft workflow in place instead of resubmitting the full definition on every attempt. The agent uses `write-workflow`, `read-workflow` (JMESPath), `edit-workflow` (JSON Patch), and `submit-workflow`. Write and edit return validation diagnostics without failing the tool call, edits also return the changed workflow, and both accept `submitIfValid` to submit a workflow that has no errors or warnings without a separate call. An edit that uses `replace` on a field that does not exist adds the field. When a required output schema is given and the workflow declares no `outputSchema`, the required schema is used. Tool calls whose top-level object or array arguments were sent as JSON strings are repaired. The generation instructions are marked as an Anthropic prompt-cache breakpoint. `step-end` diagnostic events now include each step's tool calls, with the input and error of failed calls. diff --git a/.changeset/yellow-warning-borders.md b/.changeset/yellow-warning-borders.md deleted file mode 100644 index 0bc60c6..0000000 --- a/.changeset/yellow-warning-borders.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remoraflow/ui": patch ---- - -Render warning diagnostic borders in yellow in light mode. diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 2b77986..1e0e984 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,151 @@ # @remoraflow/core +## 1.0.0 + +### Major Changes + +- 2f62a14: Full rewrite of both packages. Every public module has been replaced; there is no incremental migration path from 0.x. + + ### Core architecture + + The entire `@remoraflow/core` source tree has been rewritten. The three top-level modules (`compiler/`, `executor/`, `generator/`) are replaced by six new ones: + + - **`execution/`** — workflow runner with pluggable execution engines, step executors, LLM middleware, approval policies, duration budgets, and user-intervention adapters. + - **`validation/`** — modular validation pipeline (syntax, control-flow, structural limits, tool references, tool inputs, expression syntax, variable references, output schemas) replacing the monolithic compiler pass system. + - **`generation/`** — workflow generation with output-schema contracts, stop conditions, and structured submission validation, replacing the old `generator/` module. + - **`schemistry/`** — JMESPath output-type inference, JSON Schema subset diagnostics, structural summarization, Standard Schema helpers, and template extraction, consolidated from utilities formerly scattered across `compiler/utils/`. + - **`audit/`** — static capability analysis of a workflow definition (tool-call provenance, input-space inference per tool). + - **`step-registry`** — centralized registry of step types, their nested chains, output schemas, and metadata, replacing ad-hoc step-type handling spread across the codebase. + + The old entry point `lib.ts` is replaced by `index.ts` re-exporting all six modules. + + ### Schema and type system + + - Workflow definition schemas moved from `types.ts` to a dedicated `schema.ts` module. The schema is now the single source of truth for the workflow DSL; `types.ts` holds runtime configuration and tool types. + - The `Tool` type is rewritten to accept `@ai-sdk/provider-utils` `Schema`, Zod v3/v4, and Standard Schema for both input and output schemas via a `FlexibleSchema` union. Output schemas on tools are now a first-class concept. + - `RemoraflowSettings` (formerly `RemoraflowOptions`) is the unified configuration surface for duration policy, structural limits, and LLM defaults. + + ### New step types + + - **`while`** — general-purpose condition-driven loop with an optional accumulator, complementing `for-each` for cases where the iteration count is not known ahead of time. + - **`request-intervention`** — replaces `ask-supervisor`. Supports both multiple-choice and free-response modes with adapter-level error handling. + + ### Execution engines + + Three execution engines replace the single `DurableExecutionAdapter` model: + + - **In-memory** (default) — steps run in-process with no recording; a re-invoked run starts over. + - **Checkpointing** — records step results in a caller-supplied `CheckpointStore`; a re-invoked run skips completed steps but does not detect or recover from crashes. + - **Durable** — delegates step execution and sleep to a `DurableExecutionAdapter` so a host with its own journal can suspend and resume runs. Adapters ship for AWS Lambda Durable Execution SDK, Inngest, and Temporal. + + The old SQLite adapter is removed. + + ### Execution runtime + + - Duration policy (`maxDurationSeconds`, `maxExecutionSeconds`, `maxWaitSeconds`, `maxSleepSeconds`, `maxStepExecutionSeconds`, `minPollIntervalSeconds`) is enforced at runtime, not just at validation time. All budgets survive a resume. + - `structuralLimits.maxLoopIterations` is enforced at runtime. A `for-each` or `while` step exceeding the limit fails with `LOOP_ITERATION_LIMIT_EXCEEDED` before any iteration runs. + - Durable step keys are derived from a step's path (e.g. `loop.2.callApi`) instead of a per-frame positional counter. + - Delays are durable: `sleep` checkpoints its wake-up deadline and serves only the time still owed on resume. + - `ExecutionState.status` gains `sleeping`, `awaiting-condition`, and `awaiting-input`. + - LLM middleware pipeline for prompt construction, tool-constraint enforcement, and output parsing. + - Approval-policy system for gating step execution. + + ### Validation + + The monolithic compiler is replaced by a modular validation pipeline with discrete passes: + + 1. Syntax validation (arktype schema parse) + 2. Control-flow validation (reachability, cycle detection, nested-chain modelling) + 3. Structural-limit validation + 4. Tool-reference validation + 5. Expression-syntax validation (JMESPath and template parsing) + 6. Variable-reference validation (scope tracking with forward-reference detection) + 7. Output-schema validation (return-type inference across control-flow branches) + 8. Tool-input validation (type-checking tool inputs against declared schemas) + 9. Tool-definition validation (asserting execution functions and output schemas exist) + + Each pass can emit diagnostics and optionally correct the definition. A pass marked `failureMode: "block"` halts the pipeline on error. + + `compileWorkflow` is removed. Use `validateWorkflowDefinition` instead. + + ### Workflow generation + + - Callers can require an output schema and reject generated workflows that cannot satisfy the contract. + - Nested control-flow return types are inferred precisely (switch-case branch unions, loop accumulator types). + - Tool output schemas are provided to the generation model. + - Undeclared workflow submission fields are rejected; strict structured submissions are enforced. + - Detailed generation diagnostics are optionally observable. + + `generateWorkflow` and `createWorkflowGeneratorTool` are replaced by the new `generation/` module API. + + ### Peer dependencies + + - AI SDK peer dependency bumped from `ai@^6.0.0` / `@ai-sdk/provider-utils@^4.0.0` to `ai@^7.0.0` / `@ai-sdk/provider-utils@^5.0.11`. + + ### Core dependency changes + + - Removed: `@jmespath-community/jmespath`. + - Added: `jmespath`, `ajv`, `@ark/json-schema`, `@standard-community/standard-json`, `@standard-schema/spec`, `zod@^4.4.3`, `dedent`. + + ### UI architecture + + `@remoraflow/ui` is rewritten around a data-driven step-UI registry that replaces per-step-type node components and param editors. + + - **Step-UI registry** (`step-ui/`) — each step type declares its label, icon, tone, fields, field order, and advanced/node-row configuration in a single `StepUi` spec. The registry drives all rendering: node content, editor panels, palette entries, and field diagnostics. Adding a new step type to the UI is now a single registry entry rather than a new node component, param editor, and palette entry. + - **Field system** (`editors/fields/`) — a typed `FieldSpec` with `FieldKind` discriminator (`expression`, `template-text`, `identifier`, `step-ref`, `tool-ref`, `tool-ref-list`, `json-schema`, `schema-map`, `expression-map`, `case-list`, `boolean`, `constant`) replaces the old per-step-type param components. + - **Generic node rendering** — per-step-type node components (`agent-loop-node`, `tool-call-node`, `for-each-node`, etc.) are replaced by a single `StepNode` driven by the registry's `nodeRows` and `headerRows` declarations. + - **Syntax highlighting** — JMESPath and template-interpolation syntax highlighting via CodeMirror language support and inline `HighlightedExpression` components. + - **Primitives** (`components/primitives/`) — shared layout, badge, code, diagnostics, field, and toggle-field primitives. + - **Layout module** (`layout/`) — measurement, constants, and types extracted from the monolithic `graph-layout.ts`. + - **Expression scope context** — `ExpressionScopeContext` provides in-scope variable paths to expression editors for autocomplete. + - **Design system** — new `theme.css` with CSS custom properties; all shadcn primitive re-exports removed from the public API (consumers import them from their own shadcn installation). + + ### Breaking changes summary + + - Every import path from `@remoraflow/core` has changed. The entry point is now `index.ts`, not `lib.ts`. The `./adapters/aws-lambda` subpath export is removed. + - `compileWorkflow` → `validateWorkflowDefinition`. The return type, diagnostics shape, and context arguments are different. + - `executeWorkflow` / `executeWorkflowStream` → `runWorkflow` in `execution/`. Execution options, state shape, and streaming protocol are different. + - `generateWorkflow` / `createWorkflowGeneratorTool` → new `generation/` module API with different options and return types. + - `ask-supervisor` step type → `request-intervention`. + - `DurableContext` → `ExecutionContext`, `DurableExecutor` → `ExecutionRun`, `DurableExecutionAdapter` (KV store) → `CheckpointStore`. + - `DurableContext.waitFor` returns an async generator rather than a promise. + - `now()` and `uuid()` are removed from the execution context. + - `maxSleepSeconds` and `maxLLMPromptTokens` are removed from `ExecutionOptions`. Duration policy is configured via `RemoraflowSettings`. + - Step ids may no longer begin with `__` (reserved for internal checkpoint keys). + - AI SDK peer dependency: `ai@^6` → `ai@^7`, `@ai-sdk/provider-utils@^4` → `@ai-sdk/provider-utils@^5`. + - `@remoraflow/ui` no longer re-exports shadcn components (`Button`, `Dialog`, `Select`, `Command`, etc.). + - Per-step-type node components and param editors are removed. Custom rendering now goes through the step-UI registry. + - Checkpoint keys for in-flight durable runs change format, so a run mid-flight across this upgrade will restart rather than resume. + +### Minor Changes + +- 6787798: Add configurable `strictToolCalls` parameter to `generateWorkflowStream` and close step schemas with `additionalProperties: false` at every level +- 6d7242f: Add `DisplayToolSet` type with optional `displayName` and `displayDescription` per tool. The WorkflowViewer `tools` prop now accepts `DisplayToolSet`, rendering display overrides in place of real tool names and descriptions when provided. +- 3b663c3: Add expression autocomplete to the workflow editor. The JMESPath and template inputs in `StepEditorPanel` now surface in-scope paths via a Command-based suggestion popover, including `[*].field` projections for arrays of objects. Custom expressions can still be typed freely. + + `@remoraflow/core` exports two new utilities for building the scope tree: `getExpressionScope(workflow, graph, tools, stepId)` returns the root identifiers in scope at a step (workflow input, predecessor step outputs, enclosing for-each loop variables) along with their JSON Schemas, and `enumerateSuggestions(scope)` flattens that into a list of suggested paths. Types `ScopeEntry` and `ExpressionSuggestion` are also exported. + + `@remoraflow/ui`'s `StepEditorPanel` accepts a new `expressionScope` prop that is provided to descendant `ExpressionEditor`s via context. `WorkflowViewer` wires this up automatically using the latest compiled graph. + +- 367d847: Add `stepId` field to `ExecutionError` identifying which workflow step caused the failure, or `null` for errors outside step execution. +- 8c82c1c: A `switch-case` step's output is now the value returned by its selected branch, instead of `null`. The validator types it as the union of the branch outputs. Field access on a union type no longer warns when every member of the union has the field. +- b91807e: Validate JMESPath function argument types at workflow definition time, catching type mismatches like `join('', [str, number])` before execution +- 8c82c1c: Workflow generation now edits a draft workflow in place instead of resubmitting the full definition on every attempt. The agent uses `write-workflow`, `read-workflow` (JMESPath), `edit-workflow` (JSON Patch), and `submit-workflow`. Write and edit return validation diagnostics without failing the tool call, edits also return the changed workflow, and both accept `submitIfValid` to submit a workflow that has no errors or warnings without a separate call. An edit that uses `replace` on a field that does not exist adds the field. When a required output schema is given and the workflow declares no `outputSchema`, the required schema is used. Tool calls whose top-level object or array arguments were sent as JSON strings are repaired. The generation instructions are marked as an Anthropic prompt-cache breakpoint. `step-end` diagnostic events now include each step's tool calls, with the input and error of failed calls. + +### Patch Changes + +- 8c82c1c: The validator now types a `for-each` or `while` accumulator from its loop body's output, so an accumulator that builds the wrong shape is reported as an error. It warns separately when the initial value, which the loop outputs if the body never runs, does not match the body's output. Type inference also flattens lists of arrays correctly, types empty literal arrays as arrays with no items, checks each member of a union and each tuple item against the target schema, and treats different JSON Schema types as disjoint. The `for-each` and `while` step descriptions now explain how to collect outputs without an accumulator and how to append to an array accumulator. +- 1e20130: Default `strictToolCalls` to `false` for broader LLM provider compatibility +- a7bd38a: Export `RunningExecutionStatus` type from the public API so consumers can narrow the running-state branch of `ExecutionState` +- 8c82c1c: The workflow definition schema is about twice as fast to build, because the union of step types is now built in one call instead of a chain of `.or()` and `.exclude()` calls. +- 2305db8: Fix declaration emit so dist/schema.d.ts and dist/types.d.ts are generated, and resolve all type errors across the monorepo +- d97e5e4: Fix package exports to point at built output in `dist/` instead of unpublished source files. Core's exports were a bare `./src/index.ts` (not in the tarball); UI had a `bun` condition with the same problem. Both now use only `import` and `types` conditions targeting `dist/`. +- 3824523: Fix a startup error in Node ESM ("Named export 'applyOperation' not found"): `fast-json-patch` is now imported through its default export. +- 8c844da: Remove `bun` conditional export entries that pointed to source files (`./src/lib.ts`, `./src/executor/adapters/aws-lambda.ts`) not included in the published tarball. Under the bun runtime, Node-style conditional export resolution picked the `bun` condition first, causing `Cannot find module '@remoraflow/core'` errors for consumers installing from npm. The `import` condition (`./dist/...`) is now used for all runtimes. +- 1e8a513: Fix false `JMESPATH_FORWARD_REFERENCE` warning when a step downstream of a `wait-for-condition` references a step in its `conditionStepId` body chain. The static analyzer now models the fact that the body chain runs at least once before control proceeds past the wait-for-condition, so its outputs are visible to subsequent steps. +- be174fd: `createWorkflowDefinitionSchema` now accepts partial `RemoraflowSettings` and resolves defaults internally, so callers no longer need to pre-resolve settings. +- 8c82c1c: The validator now reports calls to JMESPath functions that do not exist, such as `append()`, instead of letting them fail at runtime. The list of JMESPath functions is exported as `JMESPATH_FUNCTION_NAMES`, and the UI's syntax highlighting uses it. + ## 0.11.0 ## 0.10.1 diff --git a/packages/core/package.json b/packages/core/package.json index 79e1e0b..43ea280 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@remoraflow/core", - "version": "0.11.0", + "version": "1.0.0", "description": "A workflow DSL for agents — compile, execute, and visualize agent workflows", "publishConfig": { "access": "public" diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 3fa1832..b3280fc 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -1,5 +1,178 @@ # @remoraflow/ui +## 1.0.0 + +### Major Changes + +- 2f62a14: Full rewrite of both packages. Every public module has been replaced; there is no incremental migration path from 0.x. + + ### Core architecture + + The entire `@remoraflow/core` source tree has been rewritten. The three top-level modules (`compiler/`, `executor/`, `generator/`) are replaced by six new ones: + + - **`execution/`** — workflow runner with pluggable execution engines, step executors, LLM middleware, approval policies, duration budgets, and user-intervention adapters. + - **`validation/`** — modular validation pipeline (syntax, control-flow, structural limits, tool references, tool inputs, expression syntax, variable references, output schemas) replacing the monolithic compiler pass system. + - **`generation/`** — workflow generation with output-schema contracts, stop conditions, and structured submission validation, replacing the old `generator/` module. + - **`schemistry/`** — JMESPath output-type inference, JSON Schema subset diagnostics, structural summarization, Standard Schema helpers, and template extraction, consolidated from utilities formerly scattered across `compiler/utils/`. + - **`audit/`** — static capability analysis of a workflow definition (tool-call provenance, input-space inference per tool). + - **`step-registry`** — centralized registry of step types, their nested chains, output schemas, and metadata, replacing ad-hoc step-type handling spread across the codebase. + + The old entry point `lib.ts` is replaced by `index.ts` re-exporting all six modules. + + ### Schema and type system + + - Workflow definition schemas moved from `types.ts` to a dedicated `schema.ts` module. The schema is now the single source of truth for the workflow DSL; `types.ts` holds runtime configuration and tool types. + - The `Tool` type is rewritten to accept `@ai-sdk/provider-utils` `Schema`, Zod v3/v4, and Standard Schema for both input and output schemas via a `FlexibleSchema` union. Output schemas on tools are now a first-class concept. + - `RemoraflowSettings` (formerly `RemoraflowOptions`) is the unified configuration surface for duration policy, structural limits, and LLM defaults. + + ### New step types + + - **`while`** — general-purpose condition-driven loop with an optional accumulator, complementing `for-each` for cases where the iteration count is not known ahead of time. + - **`request-intervention`** — replaces `ask-supervisor`. Supports both multiple-choice and free-response modes with adapter-level error handling. + + ### Execution engines + + Three execution engines replace the single `DurableExecutionAdapter` model: + + - **In-memory** (default) — steps run in-process with no recording; a re-invoked run starts over. + - **Checkpointing** — records step results in a caller-supplied `CheckpointStore`; a re-invoked run skips completed steps but does not detect or recover from crashes. + - **Durable** — delegates step execution and sleep to a `DurableExecutionAdapter` so a host with its own journal can suspend and resume runs. Adapters ship for AWS Lambda Durable Execution SDK, Inngest, and Temporal. + + The old SQLite adapter is removed. + + ### Execution runtime + + - Duration policy (`maxDurationSeconds`, `maxExecutionSeconds`, `maxWaitSeconds`, `maxSleepSeconds`, `maxStepExecutionSeconds`, `minPollIntervalSeconds`) is enforced at runtime, not just at validation time. All budgets survive a resume. + - `structuralLimits.maxLoopIterations` is enforced at runtime. A `for-each` or `while` step exceeding the limit fails with `LOOP_ITERATION_LIMIT_EXCEEDED` before any iteration runs. + - Durable step keys are derived from a step's path (e.g. `loop.2.callApi`) instead of a per-frame positional counter. + - Delays are durable: `sleep` checkpoints its wake-up deadline and serves only the time still owed on resume. + - `ExecutionState.status` gains `sleeping`, `awaiting-condition`, and `awaiting-input`. + - LLM middleware pipeline for prompt construction, tool-constraint enforcement, and output parsing. + - Approval-policy system for gating step execution. + + ### Validation + + The monolithic compiler is replaced by a modular validation pipeline with discrete passes: + + 1. Syntax validation (arktype schema parse) + 2. Control-flow validation (reachability, cycle detection, nested-chain modelling) + 3. Structural-limit validation + 4. Tool-reference validation + 5. Expression-syntax validation (JMESPath and template parsing) + 6. Variable-reference validation (scope tracking with forward-reference detection) + 7. Output-schema validation (return-type inference across control-flow branches) + 8. Tool-input validation (type-checking tool inputs against declared schemas) + 9. Tool-definition validation (asserting execution functions and output schemas exist) + + Each pass can emit diagnostics and optionally correct the definition. A pass marked `failureMode: "block"` halts the pipeline on error. + + `compileWorkflow` is removed. Use `validateWorkflowDefinition` instead. + + ### Workflow generation + + - Callers can require an output schema and reject generated workflows that cannot satisfy the contract. + - Nested control-flow return types are inferred precisely (switch-case branch unions, loop accumulator types). + - Tool output schemas are provided to the generation model. + - Undeclared workflow submission fields are rejected; strict structured submissions are enforced. + - Detailed generation diagnostics are optionally observable. + + `generateWorkflow` and `createWorkflowGeneratorTool` are replaced by the new `generation/` module API. + + ### Peer dependencies + + - AI SDK peer dependency bumped from `ai@^6.0.0` / `@ai-sdk/provider-utils@^4.0.0` to `ai@^7.0.0` / `@ai-sdk/provider-utils@^5.0.11`. + + ### Core dependency changes + + - Removed: `@jmespath-community/jmespath`. + - Added: `jmespath`, `ajv`, `@ark/json-schema`, `@standard-community/standard-json`, `@standard-schema/spec`, `zod@^4.4.3`, `dedent`. + + ### UI architecture + + `@remoraflow/ui` is rewritten around a data-driven step-UI registry that replaces per-step-type node components and param editors. + + - **Step-UI registry** (`step-ui/`) — each step type declares its label, icon, tone, fields, field order, and advanced/node-row configuration in a single `StepUi` spec. The registry drives all rendering: node content, editor panels, palette entries, and field diagnostics. Adding a new step type to the UI is now a single registry entry rather than a new node component, param editor, and palette entry. + - **Field system** (`editors/fields/`) — a typed `FieldSpec` with `FieldKind` discriminator (`expression`, `template-text`, `identifier`, `step-ref`, `tool-ref`, `tool-ref-list`, `json-schema`, `schema-map`, `expression-map`, `case-list`, `boolean`, `constant`) replaces the old per-step-type param components. + - **Generic node rendering** — per-step-type node components (`agent-loop-node`, `tool-call-node`, `for-each-node`, etc.) are replaced by a single `StepNode` driven by the registry's `nodeRows` and `headerRows` declarations. + - **Syntax highlighting** — JMESPath and template-interpolation syntax highlighting via CodeMirror language support and inline `HighlightedExpression` components. + - **Primitives** (`components/primitives/`) — shared layout, badge, code, diagnostics, field, and toggle-field primitives. + - **Layout module** (`layout/`) — measurement, constants, and types extracted from the monolithic `graph-layout.ts`. + - **Expression scope context** — `ExpressionScopeContext` provides in-scope variable paths to expression editors for autocomplete. + - **Design system** — new `theme.css` with CSS custom properties; all shadcn primitive re-exports removed from the public API (consumers import them from their own shadcn installation). + + ### Breaking changes summary + + - Every import path from `@remoraflow/core` has changed. The entry point is now `index.ts`, not `lib.ts`. The `./adapters/aws-lambda` subpath export is removed. + - `compileWorkflow` → `validateWorkflowDefinition`. The return type, diagnostics shape, and context arguments are different. + - `executeWorkflow` / `executeWorkflowStream` → `runWorkflow` in `execution/`. Execution options, state shape, and streaming protocol are different. + - `generateWorkflow` / `createWorkflowGeneratorTool` → new `generation/` module API with different options and return types. + - `ask-supervisor` step type → `request-intervention`. + - `DurableContext` → `ExecutionContext`, `DurableExecutor` → `ExecutionRun`, `DurableExecutionAdapter` (KV store) → `CheckpointStore`. + - `DurableContext.waitFor` returns an async generator rather than a promise. + - `now()` and `uuid()` are removed from the execution context. + - `maxSleepSeconds` and `maxLLMPromptTokens` are removed from `ExecutionOptions`. Duration policy is configured via `RemoraflowSettings`. + - Step ids may no longer begin with `__` (reserved for internal checkpoint keys). + - AI SDK peer dependency: `ai@^6` → `ai@^7`, `@ai-sdk/provider-utils@^4` → `@ai-sdk/provider-utils@^5`. + - `@remoraflow/ui` no longer re-exports shadcn components (`Button`, `Dialog`, `Select`, `Command`, etc.). + - Per-step-type node components and param editors are removed. Custom rendering now goes through the step-UI registry. + - Checkpoint keys for in-flight durable runs change format, so a run mid-flight across this upgrade will restart rather than resume. + +### Minor Changes + +- 6d7242f: Add `DisplayToolSet` type with optional `displayName` and `displayDescription` per tool. The WorkflowViewer `tools` prop now accepts `DisplayToolSet`, rendering display overrides in place of real tool names and descriptions when provided. +- 3b663c3: Add expression autocomplete to the workflow editor. The JMESPath and template inputs in `StepEditorPanel` now surface in-scope paths via a Command-based suggestion popover, including `[*].field` projections for arrays of objects. Custom expressions can still be typed freely. + + `@remoraflow/core` exports two new utilities for building the scope tree: `getExpressionScope(workflow, graph, tools, stepId)` returns the root identifiers in scope at a step (workflow input, predecessor step outputs, enclosing for-each loop variables) along with their JSON Schemas, and `enumerateSuggestions(scope)` flattens that into a list of suggested paths. Types `ScopeEntry` and `ExpressionSuggestion` are also exported. + + `@remoraflow/ui`'s `StepEditorPanel` accepts a new `expressionScope` prop that is provided to descendant `ExpressionEditor`s via context. `WorkflowViewer` wires this up automatically using the latest compiled graph. + +- d5ab5ea: Add `@remoraflow/ui/theme-vars.css` export containing CSS custom properties (step tones, status colors, React Flow mappings, syntax highlighting) extracted from `theme.css`, so consumers can import variables independently of the Tailwind theme block. +- 731af18: Show a tool's output schema in the workflow editor. When editing a `tool-call` step, the params panel now displays the tool's declared `outputSchema` as JSON Schema below the inputs, so users can see what data will be available to downstream steps after the tool runs. + +### Patch Changes + +- 2cac3bc: Render error diagnostic borders with a brighter red in light mode. +- 2cc1b15: Copy theme.css as-is instead of running it through PostCSS, since consumers process it with their own Tailwind. Adds a test that verifies every `--rf-*` token has a corresponding `--color-*` bridge entry. +- d540b2e: Fix @remoraflow/core resolving as uninstallable `workspace:*` for npm consumers by replacing the workspace protocol with a standard semver range managed by changesets. +- 2305db8: Fix declaration emit so dist/schema.d.ts and dist/types.d.ts are generated, and resolve all type errors across the monorepo +- d97e5e4: Fix package exports to point at built output in `dist/` instead of unpublished source files. Core's exports were a bare `./src/index.ts` (not in the tarball); UI had a `bun` condition with the same problem. Both now use only `import` and `types` conditions targeting `dist/`. +- 93ccb6d: Fix three shadcn component registry bugs that broke installs: + + - The registry import-rewriter kept relative paths (e.g. `../../components/ui/combobox`) for any file shipped by the registry, including `registry:ui` files. shadcn relocates `registry:ui` files to the consumer's ui alias, so those sibling-relative imports failed to resolve after install. Imports that resolve under `components/ui/` or `lib/` are now always rewritten to the `@/` alias. + - Renamed the custom `combobox.tsx` ui primitive to `workflow-combobox.tsx` so it no longer overwrites the consumer's existing `ui/combobox.tsx` (shadcn's public registry has no combobox, so every consumer's combobox is a roll-your-own at that path). The exported `Combobox*` names from `@remoraflow/ui` are unchanged. + - The `workflow-step-detail-panel` registry item duplicated six files already shipped by `workflow-viewer`, so installing both produced two copies of every shared file. The panel item now declares `workflow-viewer` as a `registryDependencies` entry and ships no files of its own. + +- de7f094: Fix switch-case edges with empty `branchBodyStepId` targets in the graph layout. When a case's `branchBodyStepId` is `""` (e.g. from a newly-added case/default or after `clearChildRef`), the layout no longer emits an edge pointing at the non-existent node id `""`. +- 85b8673: Move syntax-highlighting CSS rules from styles.css to theme.css for better theme separation +- e8b1ce1: Prevent node deletion in the workflow viewer when editing is disabled. React Flow's built-in delete-key handler removed selected nodes even in view mode; the delete key is now disabled and `remove` node changes are ignored unless `isEditing` is true. +- 2494402: Remove styles.css side-effect import and package.json style field now that all styles live in theme.css +- 480ce0a: Restore theme-colored borders for demo toolbar buttons. +- ae8608a: Show an output connection handle for disconnected workflow steps while editing so their control flow can be repaired in the visual editor. +- b774f10: Scope viewer border defaults to prevent host UI overrides. +- 669bb5b: Fix spurious validation errors caused by undefined-valued keys in workflow definitions produced by the editor +- 8c82c1c: The validator now reports calls to JMESPath functions that do not exist, such as `append()`, instead of letting them fail at runtime. The list of JMESPath functions is exported as `JMESPATH_FUNCTION_NAMES`, and the UI's syntax highlighting uses it. +- 7e90fd4: Render warning diagnostic borders in yellow in light mode. +- Updated dependencies [8c82c1c] +- Updated dependencies [6787798] +- Updated dependencies [1e20130] +- Updated dependencies [6d7242f] +- Updated dependencies [a7bd38a] +- Updated dependencies [3b663c3] +- Updated dependencies [8c82c1c] +- Updated dependencies [2305db8] +- Updated dependencies [d97e5e4] +- Updated dependencies [3824523] +- Updated dependencies [8c844da] +- Updated dependencies [1e8a513] +- Updated dependencies [367d847] +- Updated dependencies [be174fd] +- Updated dependencies [8c82c1c] +- Updated dependencies [2f62a14] +- Updated dependencies [b91807e] +- Updated dependencies [8c82c1c] +- Updated dependencies [8c82c1c] + - @remoraflow/core@1.0.0 + ## 0.11.0 ### Minor Changes diff --git a/packages/ui/package.json b/packages/ui/package.json index e224c42..a62d3c8 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@remoraflow/ui", - "version": "0.11.0", + "version": "1.0.0", "description": "React viewer components for Remora workflow visualization", "publishConfig": { "access": "public" @@ -42,7 +42,7 @@ "@codemirror/view": "^6.40.0", "@dagrejs/dagre": "^2.0.4", "@lezer/highlight": "^1.2.3", - "@remoraflow/core": "^0.11.0", + "@remoraflow/core": "^1.0.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "cmdk": "^1.1.1",