Add reusable workflow starter templates - #3550
Open
AbigailDeng wants to merge 13 commits into
Open
Conversation
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.
Problem
Workflow Activity vNext needs reusable starter definitions that users can instantiate and edit. The original
enterprise_knowledge_assistantstarter only answered from context supplied with the run, so its canvas did not perform the Lark knowledge retrieval implied by the scenario.The intended contract is:
Lark is only the knowledge source. It is not the question channel or trigger.
Solution
workflow-templates/.enterprise_knowledge_assistant.yamlas a visible 12-step retrieval workflow using only existing workflow primitives and the existingnyxid_proxytool.data,sources, andmissing_fields.The four
nyxid_proxycallsites intentionally omitcapability. A reusable starter cannot embed one tenant'suser_service_idorendpoint_id; after instantiation, the existing admission flow must bind each callsite to the caller's exact connected Lark operation before the workflow can run.With the current primitives, the starter reads the single best eligible result per run. It does not use
foreachfor external reads because item-specificsub_param_argumentsare not re-evaluated per item today.Scope
workflow-templates/*.yamlassets only.Explicit non-goals:
Verification
Repository-independent YAML structure check:
ruby -e 'require "yaml"; doc=YAML.safe_load(File.read(ARGV.fetch(0)), [], [], false); steps=doc.fetch("steps"); external=steps.select { |s| s["type"] == "tool_call" }; abort "wrong template shape" unless doc["name"] == "enterprise_knowledge_assistant" && doc.fetch("roles").length == 4 && steps.length == 12 && steps.map { |s| s.fetch("id") }.uniq.length == 12 && external.length == 4 && external.all? { |s| s.dig("parameters", "tool") == "nyxid_proxy" } && steps.none? { |s| s.key?("capability") }; puts "yaml_ok roles=4 steps=12 external_calls=4 capabilities=unbound"' workflow-templates/enterprise_knowledge_assistant.yamlResult:
yaml_ok roles=4 steps=12 external_calls=4 capabilities=unbound.Repository parser, validator, authorization dependency compiler, and expression expansion check through a local one-off untracked harness:
Result: success; 4 external invocations, all
nyxid_proxy, all selectors unbound. The harness also expanded all four JSON argument templates with escaped sample values and parsed them successfully. Existing repository obsolete/complexity warnings were emitted; there were no errors.Final scope checks:
Result: clean diff; exactly 10 added YAML files; no changes outside
workflow-templates/.No frontend validation was run because the final diff contains no frontend changes. Full repository validation remains with GitHub CI.
A live Lark request was not executed locally because it requires a deployed runtime, the caller's connected Lark service, and exact operation selection during workflow admission.