Add planner tools, model, executor and UI support for data nodes#408
Conversation
There was a problem hiding this comment.
💡 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".
| 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 |
There was a problem hiding this comment.
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 👍 / 👎.
| params=params, | ||
| action_schemas=action_schemas, | ||
| ) | ||
| updates["params"] = cleaned_params | ||
| updates["out_params_schema"] = _build_data_node_output_schema(cleaned_params.get("schema")) |
There was a problem hiding this comment.
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 👍 / 👎.
Motivation
out_params_schema, execute to a runtime payload, and be editable in the web UI.schema/datasetthrough the existing param-filtering and validation flows.Description
DATA_PARAM_FIELDSandDATA_NODE_FIELDS, implemented_build_data_node_output_schema, and addedadd_data_nodeandupdate_data_nodeplanner tools which sanitize params (via_filter_supported_params), setout_params_schema, validate references, and register these tools with the agent; also updated the planning prompt to documentadd_data_nodeusage (velvetflow/planner/structure.py).type == "data"inNodevalidation and added aDataNodedataclass, and updated verification rules to acceptschema/datasetparams (velvetflow/models.py,velvetflow/verification/node_rules.py).datanodes was added so executing adatanode returns a payload withschemaanddataset, and binding checks were extended to allow__from__references into non-action nodes when anout_params_schemaprovides the requested path (velvetflow/executor/dynamic_executor.py,velvetflow/bindings.py).dataoption to the add-node menu, defaultdatanode creation increateDefaultNode, abuildDataNodeOutputSchemahelper, a dedicatedopenDataNodeDialogeditor for schema/dataset editing, canvas color fordatanodes, and improveddescribeNodeoutput inference fromout_params_schema(webapp/index.html,webapp/js/core.js,webapp/js/dialogs.js,webapp/js/canvas.js,velvetflow/visualization.py).Testing
Codex Task