Skip to content

Add planner tools, model, executor and UI support for data nodes#408

Merged
zhongkaifu merged 7 commits into
mainfrom
codex/add-data-node-type-with-schema-support
Jan 26, 2026
Merged

Add planner tools, model, executor and UI support for data nodes#408
zhongkaifu merged 7 commits into
mainfrom
codex/add-data-node-type-with-schema-support

Conversation

@zhongkaifu
Copy link
Copy Markdown
Owner

Motivation

  • Enable the planner/LLM agent to create and update inline dataset nodes that expose schema-aware outputs for downstream bindings and visualization.
  • Ensure data nodes are first-class: validated at plan-time, produce out_params_schema, execute to a runtime payload, and be editable in the web UI.
  • Prevent param-stripping by allowing schema/dataset through the existing param-filtering and validation flows.

Description

  • Planner: added DATA_PARAM_FIELDS and DATA_NODE_FIELDS, implemented _build_data_node_output_schema, and added add_data_node and update_data_node planner tools which sanitize params (via _filter_supported_params), set out_params_schema, validate references, and register these tools with the agent; also updated the planning prompt to document add_data_node usage (velvetflow/planner/structure.py).
  • Models & validation: allowed node type == "data" in Node validation and added a DataNode dataclass, and updated verification rules to accept schema/dataset params (velvetflow/models.py, velvetflow/verification/node_rules.py).
  • Executor & bindings: runtime support for data nodes was added so executing a data node returns a payload with schema and dataset, and binding checks were extended to allow __from__ references into non-action nodes when an out_params_schema provides the requested path (velvetflow/executor/dynamic_executor.py, velvetflow/bindings.py).
  • Web UI & visualization: added data option to the add-node menu, default data node creation in createDefaultNode, a buildDataNodeOutputSchema helper, a dedicated openDataNodeDialog editor for schema/dataset editing, canvas color for data nodes, and improved describeNode output inference from out_params_schema (webapp/index.html, webapp/js/core.js, webapp/js/dialogs.js, webapp/js/canvas.js, velvetflow/visualization.py).

Testing

  • Automated tests: none were executed in this rollout (no unit/integration tests run).
  • Validation: changes were implemented and committed; code paths for planner tools, model validation, executor handling, and UI hooks were added to their respective modules and updated consistently.

Codex Task

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cb8c454996

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread velvetflow/bindings.py
Comment on lines +704 to 708
if output_schema and field_path and self._schema_has_path(output_schema, field_path):
return
if output_schema and not field_path:
return
return
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject invalid from paths for data nodes

When a non-action node has out_params_schema, this branch returns even if the requested field_path is not in the schema. That means result_of.<dataNode>.missingField passes validation and only fails later at runtime when _get_from_context raises a KeyError. This is a regression from the stated goal (“allow … when out_params_schema provides the requested path”): it should error when the schema exists but the path is absent, otherwise broken bindings slip through plan-time checks and crash execution.

Useful? React with 👍 / 👎.

Comment on lines +2227 to +2231
params=params,
action_schemas=action_schemas,
)
updates["params"] = cleaned_params
updates["out_params_schema"] = _build_data_node_output_schema(cleaned_params.get("schema"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve data schema when updating only dataset

update_data_node recomputes out_params_schema from cleaned_params.get("schema") whenever any params are provided. If a caller updates only dataset (leaving schema omitted), cleaned_params contains no schema and the computed out_params_schema becomes an empty object, erasing the existing field definitions. This breaks downstream bindings that target fields in dataset and removes output inference in the UI, even though the schema was not meant to change.

Useful? React with 👍 / 👎.

@zhongkaifu zhongkaifu merged commit eae05bf into main Jan 26, 2026
1 check failed
@zhongkaifu zhongkaifu deleted the codex/add-data-node-type-with-schema-support branch January 26, 2026 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant