feat(flow-designer): the script node's form authors what the executor runs (framework#4278) - #3099
Merged
Merged
Conversation
… runs (framework#4278) The script flow node's designer form is hand-written here (the engine publishes no configSchema for it, deliberately) and had drifted from the executor: of four offered actionType options, `code` was a recognized no-op, `sms` / `notification` failed every run, the plural "Output variables" field was read by nothing — and the one path that runs real logic (function + inputs + outputVariable) could not be authored. - actionType now offers Call function (default) / Email / Slack — the executor's dispatch set (SCRIPT_BUILTIN_ACTION_TYPES + the invoke_function marker). The function-path fields are first-class. - The inline `script` body becomes render-only: hidden for new nodes, shown (with a not-executed warning) whenever a stored node carries one. The dead plural outputVariables field is removed; stored values surface in the Advanced (JSON) block. - A scalar select whose stored value was dropped from the options renders it as "<value> (deprecated)" instead of blanking it — the rule FlowObjectListField already applied to select cells. - flow-scope (data picker) and the flow simulator stop pretending the legacy outputVariables[] list binds variables — the engine never binds those names; only the singular outputVariable does. - New reconciliation test compares the hand-written script / subflow / decision groups bidirectionally against the executor-derived contracts @objectstack/spec/automation publishes for exactly this purpose, and the wait / connector_action / boundary_event groups against the FlowNodeSchema sibling blocks. `retiredKey()` tombstones are excluded from the contract key set, so a form field for a retired key fails loudly instead of false-passing — verified against the framework#4278 spec build: script/subflow/decision reconcile green, and the wait panel correctly fires on `waitEventConfig.timeoutMs` / `.onTimeout` (retired at spec 18, framework#4198), which the 18 bump must drop from the wait form. The spec-export panels feature-detect and skip on the installed rc.0 spec, arming themselves on the next bump. Verified in the preview gallery (?only=flow): the legacy code sample renders the stored body under "Code (not executed)", the function-path fields show by default, and the select offers exactly the three options. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ki9WjmmSY19koz9hNkeL1P
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
os-zhuang
marked this pull request as ready for review
July 31, 2026 06:36
…es-designer-forms-y1g7q0
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
framework#4278 的 objectui 半边(spec 半边:objectstack-ai/objectstack#4325)。
问题
script节点的表单只存在于本仓手写的FLOW_NODE_CONFIG(引擎有意不为它发布configSchema),且与执行器已经漂移:四个actionType选项里code是 no-op(内置运行时无服务端 JS 沙箱)、sms/notification每次运行必然失败(不在内置集合,被当函数名解析);复数「Output variables」无人读;而唯一真正执行逻辑的路径(function+inputs+outputVariable)完全无法授权。改动
SCRIPT_BUILTIN_ACTION_TYPES+invoke_function标记)。函数路径三字段成为一等公民。script正文改为仅存量渲染:新节点不再提供,存量值仍显示并附「不执行,请改用注册函数」提示;死键outputVariables删除,存量值落到 Advanced (JSON) 块。<value> (deprecated)选项而非空白——沿用 FlowObjectListField 对 select 单元格的既有规则。outputVariables[]会绑定变量——引擎从不绑定这些名字,只绑定单数outputVariable。flow-node-config.spec-reconciliation.test.ts:手写的script/subflow/decision组与 spec 发布的执行器派生契约做双向键集对账,wait/connector_action/boundary_event组与FlowNodeSchemasibling 块对账。retiredKey()墓碑不计入契约键集——已用 #4325 的 spec 构建验证:三个新面板对账全绿,且wait面板会在 spec 18 升版时准确点名waitEventConfig.timeoutMs/.onTimeout(framework#4198 已退役、表单尚未跟进)——这正是 ratchet 的本意,升版 PR 需一并删掉这两个字段。依赖新导出的面板 feature-detect,在当前 rc.0 下跳过、升版后自动激活。验证
?only=flow)浏览器实测:遗留 code 样例的存量正文以「Code (not executed)」渲染并带引导文案;函数路径字段默认展示;actionType 下拉精确等于三个选项;email 节点正常显示模板/收件人/模板变量。@object-ui/app-shellminor。🤖 Generated with Claude Code
https://claude.ai/code/session_01Ki9WjmmSY19koz9hNkeL1P
Generated by Claude Code