@fieldwangai/agentflow 0.1.160 → 0.1.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/lib/auth.mjs +231 -14
- package/bin/lib/catalog-flows.mjs +2 -0
- package/bin/lib/cli-auth-page.mjs +103 -0
- package/bin/lib/flow-dsl/codegen.mjs +23 -2
- package/bin/lib/flow-dsl/lint.mjs +44 -0
- package/bin/lib/flow-dsl/parser.mjs +68 -1
- package/bin/lib/marketplace-usage.mjs +218 -0
- package/bin/lib/marketplace.mjs +183 -3
- package/bin/lib/node-package-manifest.mjs +1 -1
- package/bin/lib/skill-runtime.mjs +6 -0
- package/bin/lib/spaces.mjs +200 -0
- package/bin/lib/table.mjs +2 -3
- package/bin/lib/ui-server.mjs +471 -84
- package/bin/lib/workspace-draft.mjs +74 -0
- package/bin/lib/workspace-routes.mjs +484 -4
- package/bin/lib/workspace-server.mjs +373 -30
- package/bin/lib/workspace-state.mjs +2 -1
- package/builtin/nodes/agent_subAgent.md +5 -1
- package/builtin/nodes/context_bundle.md +44 -0
- package/builtin/nodes/context_knowledge.md +29 -0
- package/builtin/nodes/context_skills.md +29 -0
- package/builtin/nodes/context_workspace.md +36 -0
- package/builtin/nodes/control_while.md +12 -5
- package/builtin/nodes/tool_git_worktree_load.md +4 -3
- package/builtin/pipelines/new/workspace.flow.js +1 -1
- package/builtin/web-ui/dist/assets/{WorkflowAssistantThread-Bfo9Ythw.js → WorkflowAssistantThread-DmhIgoD7.js} +1 -1
- package/builtin/web-ui/dist/assets/index-CI9J6Unt.js +873 -0
- package/builtin/web-ui/dist/assets/index-DY5vE7v1.css +1 -0
- package/builtin/web-ui/dist/index.html +2 -2
- package/package.json +5 -1
- package/shared/slot-types.js +1 -0
- package/skills/agentflow-author-flow/SKILL.md +81 -8
- package/skills/agentflow-author-flow/agents/openai.yaml +3 -3
- package/skills/agentflow-cli/SKILL.md +179 -27
- package/skills/agentflow-cli/agents/openai.yaml +2 -2
- package/skills/agentflow-cli/runtime/bin/lib/skill-runtime.mjs +14879 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/agent_subAgent.md +38 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/context_bundle.md +44 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/context_knowledge.md +29 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/context_skills.md +29 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/context_workspace.md +36 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_agent_toBool.md +26 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_anyOne.md +19 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_cancelled.md +26 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_cd_workspace.md +50 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_delay.md +31 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_end.md +13 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_if.md +21 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_interval_loop.md +55 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_load_mcp.md +24 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_load_skills.md +35 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_parse_json.md +25 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_start.md +13 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_subflow_call.md +27 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_toBool.md +27 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_user_workspace.md +24 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_wait_until.md +34 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/control_while.md +131 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_ascii.md +24 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_chart.md +32 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_code.md +39 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_html.md +32 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_image.md +36 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_markdown.md +24 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_mermaid.md +24 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_react_app.md +53 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/display_table.md +32 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/provide_bool.md +14 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/provide_file.md +14 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/provide_json.md +14 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/provide_password.md +14 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/provide_str.md +14 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_display_share_link.md +47 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_get_env.md +20 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_git_checkout.md +70 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_git_worktree_load.md +74 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_git_worktree_unload.md +52 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_gitlab_create_mr.md +114 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_jenkins_build.md +67 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_load_key.md +26 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_nodejs.md +52 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_print.md +21 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_save_key.md +26 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_set_run_env.md +38 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_user_ask.md +27 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_user_check.md +26 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_wecom_send_app_markdown.md +57 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/tool_wecom_send_group_markdown.md +45 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/workspace_one_click_task.md +44 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/workspace_run.md +16 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/workspace_scheduled_run.md +16 -0
- package/skills/agentflow-cli/runtime/builtin/nodes/workspace_subflow_input.md +14 -0
- package/skills/agentflow-cli/runtime/package.json +6 -0
- package/skills/agentflow-cli/scripts/agentflow-auth-store.mjs +113 -0
- package/skills/agentflow-cli/scripts/agentflow-cli.mjs +457 -28
- package/skills/agentflow-cli/scripts/agentflow-runtime.mjs +11 -4
- package/skills/agentflow-flow-add-instances/SKILL.md +2 -2
- package/skills/agentflow-flow-dsl/SKILL.md +73 -8
- package/skills/agentflow-flow-dsl/agents/openai.yaml +2 -2
- package/skills/agentflow-flow-dsl/references/node-calls.md +6 -2
- package/skills/agentflow-flow-dsl/references/subflow-authoring.md +34 -7
- package/skills/agentflow-flow-edit-node-fields/SKILL.md +3 -3
- package/skills/agentflow-flow-recipes/SKILL.md +1 -1
- package/skills/agentflow-flow-recipes/references/recipes.md +1 -2
- package/skills/agentflow-flow-sync-ui/SKILL.md +1 -1
- package/skills/agentflow-node-dsl/SKILL.md +5 -13
- package/skills/agentflow-node-reference/references/builtin-nodes.md +37 -5
- package/skills/agentflow-workspace-markdown/SKILL.md +1 -1
- package/builtin/web-ui/dist/assets/index-XbeI5foV.js +0 -872
- package/builtin/web-ui/dist/assets/index-e1omCEau.css +0 -1
- package/skills/agentflow-workspace-graph/SKILL.md +0 -85
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: Git Worktree Load
|
|
3
|
+
runtime: native
|
|
4
|
+
description: |
|
|
5
|
+
Create or reuse a Git worktree and expose it as the downstream workspace context.
|
|
6
|
+
|
|
7
|
+
- `repoPath` is required unless `gitContext.repoPath` is connected.
|
|
8
|
+
- `workspaceContext` is required so the node can preserve the previous execution context.
|
|
9
|
+
- `branch` is optional. When empty, AgentFlow creates a detached worktree at the current HEAD.
|
|
10
|
+
- `worktreePath` is optional. When empty, AgentFlow creates a managed execution worktree under `.workspace/agentflow/run-workspaces/`, separate from node temp files and durable `outputs/` artifacts.
|
|
11
|
+
- A `wait` checkpoint retains the execution worktree. The next run reuses the retained output path so loop state and code changes remain available while resuming.
|
|
12
|
+
- On terminal completion or stop, AgentFlow removes clean managed worktrees. Dirty worktrees are preserved with a warning instead of being force-deleted.
|
|
13
|
+
- Existing registered worktrees under the current flow workspace are managed by the same lifecycle policy.
|
|
14
|
+
- Existing registered worktrees outside the current flow workspace are reused and not removed automatically unless this run created them.
|
|
15
|
+
- Existing worktree paths are reused only when they are registered by `git worktree list` for the given repo.
|
|
16
|
+
- `pruneMissing` defaults to true. When Git has a registered worktree whose directory is missing, AgentFlow runs `git worktree prune` before adding it again.
|
|
17
|
+
- `force` defaults to false. When true, AgentFlow passes `--force` to `git worktree add`.
|
|
18
|
+
displayName: Load Worktree
|
|
19
|
+
input:
|
|
20
|
+
- type: node
|
|
21
|
+
name: prev
|
|
22
|
+
default: ""
|
|
23
|
+
- type: file
|
|
24
|
+
name: repoPath
|
|
25
|
+
default: ""
|
|
26
|
+
- type: text
|
|
27
|
+
name: branch
|
|
28
|
+
default: ""
|
|
29
|
+
- type: file
|
|
30
|
+
name: worktreePath
|
|
31
|
+
default: ""
|
|
32
|
+
- type: bool
|
|
33
|
+
name: pruneMissing
|
|
34
|
+
default: "true"
|
|
35
|
+
showOnNode: false
|
|
36
|
+
- type: bool
|
|
37
|
+
name: force
|
|
38
|
+
default: "false"
|
|
39
|
+
showOnNode: false
|
|
40
|
+
- type: text
|
|
41
|
+
name: gitContext
|
|
42
|
+
default: ""
|
|
43
|
+
required: true
|
|
44
|
+
showOnNode: true
|
|
45
|
+
- type: text
|
|
46
|
+
name: workspaceContext
|
|
47
|
+
default: ""
|
|
48
|
+
required: true
|
|
49
|
+
showOnNode: true
|
|
50
|
+
output:
|
|
51
|
+
- type: node
|
|
52
|
+
name: next
|
|
53
|
+
default: ""
|
|
54
|
+
- type: file
|
|
55
|
+
name: worktreePath
|
|
56
|
+
default: ""
|
|
57
|
+
- type: text
|
|
58
|
+
name: branch
|
|
59
|
+
default: ""
|
|
60
|
+
- type: text
|
|
61
|
+
name: commit
|
|
62
|
+
default: ""
|
|
63
|
+
- type: text
|
|
64
|
+
name: workspaceContext
|
|
65
|
+
default: ""
|
|
66
|
+
required: true
|
|
67
|
+
showOnNode: true
|
|
68
|
+
- type: text
|
|
69
|
+
name: gitContext
|
|
70
|
+
default: ""
|
|
71
|
+
required: true
|
|
72
|
+
showOnNode: true
|
|
73
|
+
---
|
|
74
|
+
Load a Git worktree from `${repoPath}` and switch downstream workspace context to it.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: Git Worktree Unload
|
|
3
|
+
runtime: native
|
|
4
|
+
description: |
|
|
5
|
+
Remove a Git worktree.
|
|
6
|
+
|
|
7
|
+
- `workspaceContext` is required. Its `cwd` is used as the worktree to remove.
|
|
8
|
+
- `repoPath`, `worktreePath` and `gitContext` are optional compatibility overrides.
|
|
9
|
+
- By default `force` is false; dirty worktrees fail instead of being removed.
|
|
10
|
+
- By default `prune` is true.
|
|
11
|
+
displayName: Unload Worktree
|
|
12
|
+
input:
|
|
13
|
+
- type: node
|
|
14
|
+
name: prev
|
|
15
|
+
default: ""
|
|
16
|
+
- type: file
|
|
17
|
+
name: repoPath
|
|
18
|
+
default: ""
|
|
19
|
+
- type: file
|
|
20
|
+
name: worktreePath
|
|
21
|
+
default: ""
|
|
22
|
+
- type: text
|
|
23
|
+
name: gitContext
|
|
24
|
+
default: ""
|
|
25
|
+
- type: text
|
|
26
|
+
name: workspaceContext
|
|
27
|
+
default: ""
|
|
28
|
+
required: true
|
|
29
|
+
showOnNode: true
|
|
30
|
+
- type: bool
|
|
31
|
+
name: force
|
|
32
|
+
default: "false"
|
|
33
|
+
- type: bool
|
|
34
|
+
name: prune
|
|
35
|
+
default: "true"
|
|
36
|
+
output:
|
|
37
|
+
- type: node
|
|
38
|
+
name: next
|
|
39
|
+
default: ""
|
|
40
|
+
- type: bool
|
|
41
|
+
name: removed
|
|
42
|
+
default: ""
|
|
43
|
+
- type: text
|
|
44
|
+
name: workspaceContext
|
|
45
|
+
default: ""
|
|
46
|
+
required: true
|
|
47
|
+
showOnNode: true
|
|
48
|
+
- type: text
|
|
49
|
+
name: message
|
|
50
|
+
default: ""
|
|
51
|
+
---
|
|
52
|
+
Remove Git worktree `${worktreePath}` from repository `${repoPath}`.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: GitLab Create MR
|
|
3
|
+
runtime: native
|
|
4
|
+
description: |
|
|
5
|
+
Create or reuse a GitLab merge request for the current branch.
|
|
6
|
+
|
|
7
|
+
- `gitContext` and `workspaceContext` can be connected from Git Checkout / Load Worktree.
|
|
8
|
+
- `repoPath` is optional. When empty, AgentFlow uses `gitContext.worktreePath`, `gitContext.repoPath`, or `workspaceContext.cwd`.
|
|
9
|
+
- `sourceBranch`, `targetBranch`, `title`, `description`, `draft`, and `labels` are optional. When empty, AgentFlow derives sensible defaults from git.
|
|
10
|
+
- `tokenEnv` is optional. Defaults to `GITLAB_TOKEN,GITLAB_PRIVATE_TOKEN`.
|
|
11
|
+
- `gitlabApiBase` is optional. When empty, AgentFlow uses `https://${gitContext.host}/api/v4`.
|
|
12
|
+
displayName: Create GitLab MR
|
|
13
|
+
input:
|
|
14
|
+
- type: node
|
|
15
|
+
name: prev
|
|
16
|
+
default: ""
|
|
17
|
+
- type: file
|
|
18
|
+
name: repoPath
|
|
19
|
+
default: ""
|
|
20
|
+
showOnNode: false
|
|
21
|
+
- type: text
|
|
22
|
+
name: gitContext
|
|
23
|
+
default: ""
|
|
24
|
+
showOnNode: true
|
|
25
|
+
- type: text
|
|
26
|
+
name: workspaceContext
|
|
27
|
+
default: ""
|
|
28
|
+
showOnNode: false
|
|
29
|
+
- type: text
|
|
30
|
+
name: sourceBranch
|
|
31
|
+
default: ""
|
|
32
|
+
showOnNode: false
|
|
33
|
+
- type: text
|
|
34
|
+
name: targetBranch
|
|
35
|
+
default: ""
|
|
36
|
+
showOnNode: false
|
|
37
|
+
- type: text
|
|
38
|
+
name: title
|
|
39
|
+
default: ""
|
|
40
|
+
showOnNode: false
|
|
41
|
+
- type: text
|
|
42
|
+
name: description
|
|
43
|
+
default: ""
|
|
44
|
+
showOnNode: false
|
|
45
|
+
- type: bool
|
|
46
|
+
name: draft
|
|
47
|
+
default: "false"
|
|
48
|
+
showOnNode: false
|
|
49
|
+
- type: text
|
|
50
|
+
name: labels
|
|
51
|
+
default: ""
|
|
52
|
+
showOnNode: false
|
|
53
|
+
- type: bool
|
|
54
|
+
name: push
|
|
55
|
+
default: "true"
|
|
56
|
+
showOnNode: false
|
|
57
|
+
- type: text
|
|
58
|
+
name: remote
|
|
59
|
+
default: "origin"
|
|
60
|
+
showOnNode: false
|
|
61
|
+
- type: text
|
|
62
|
+
name: tokenEnv
|
|
63
|
+
default: ""
|
|
64
|
+
showOnNode: false
|
|
65
|
+
- type: text
|
|
66
|
+
name: gitlabApiBase
|
|
67
|
+
default: ""
|
|
68
|
+
showOnNode: false
|
|
69
|
+
- type: bool
|
|
70
|
+
name: removeSourceBranch
|
|
71
|
+
default: "false"
|
|
72
|
+
showOnNode: false
|
|
73
|
+
- type: bool
|
|
74
|
+
name: squash
|
|
75
|
+
default: "false"
|
|
76
|
+
showOnNode: false
|
|
77
|
+
output:
|
|
78
|
+
- type: node
|
|
79
|
+
name: next
|
|
80
|
+
default: ""
|
|
81
|
+
- type: text
|
|
82
|
+
name: mrUrl
|
|
83
|
+
default: ""
|
|
84
|
+
required: true
|
|
85
|
+
- type: bool
|
|
86
|
+
name: created
|
|
87
|
+
default: ""
|
|
88
|
+
showOnNode: false
|
|
89
|
+
- type: text
|
|
90
|
+
name: mrIid
|
|
91
|
+
default: ""
|
|
92
|
+
showOnNode: false
|
|
93
|
+
- type: text
|
|
94
|
+
name: projectId
|
|
95
|
+
default: ""
|
|
96
|
+
showOnNode: false
|
|
97
|
+
- type: text
|
|
98
|
+
name: sourceBranch
|
|
99
|
+
default: ""
|
|
100
|
+
showOnNode: false
|
|
101
|
+
- type: text
|
|
102
|
+
name: targetBranch
|
|
103
|
+
default: ""
|
|
104
|
+
showOnNode: false
|
|
105
|
+
- type: text
|
|
106
|
+
name: title
|
|
107
|
+
default: ""
|
|
108
|
+
showOnNode: false
|
|
109
|
+
- type: text
|
|
110
|
+
name: message
|
|
111
|
+
default: ""
|
|
112
|
+
showOnNode: false
|
|
113
|
+
---
|
|
114
|
+
Create or reuse a GitLab merge request and output `${mrUrl}`.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: durable Jenkins build
|
|
3
|
+
runtime: native
|
|
4
|
+
description: |
|
|
5
|
+
Trigger one Jenkins job and durably monitor it until completion.
|
|
6
|
+
|
|
7
|
+
The node persists queue/build checkpoints and uses server-side deferred polling at `pollInterval`:
|
|
8
|
+
the Workspace request returns in a waiting state instead of keeping an HTTP request or worker asleep.
|
|
9
|
+
The AgentFlow server registry wakes the flow again and continues downstream after completion.
|
|
10
|
+
An existing queueId/buildNumber is reused after a run or AgentFlow server interruption,
|
|
11
|
+
so a resumed run does not trigger the job again. Jenkins FAILURE/ABORTED/TIMEOUT are business
|
|
12
|
+
outcomes and continue to downstream notification nodes. Authentication, configuration, and
|
|
13
|
+
repeated platform request errors fail the AgentFlow node.
|
|
14
|
+
|
|
15
|
+
Credentials are read from environment configuration. `credentialRef: team-ci` selects
|
|
16
|
+
`JENKINS_TEAM_CI_BASE_URL`, `JENKINS_TEAM_CI_USERNAME`, and `JENKINS_TEAM_CI_TOKEN`, falling
|
|
17
|
+
back to the standard `JENKINS_BASE_URL`, `JENKINS_USERNAME`, and `JENKINS_TOKEN` variables.
|
|
18
|
+
displayName: Jenkins Build
|
|
19
|
+
input:
|
|
20
|
+
- type: node
|
|
21
|
+
name: prev
|
|
22
|
+
default: ""
|
|
23
|
+
- type: text
|
|
24
|
+
name: job
|
|
25
|
+
default: ""
|
|
26
|
+
required: true
|
|
27
|
+
showOnNode: true
|
|
28
|
+
- type: text
|
|
29
|
+
name: parameters
|
|
30
|
+
default: "{}"
|
|
31
|
+
description: "Jenkins Job 参数 JSON object。"
|
|
32
|
+
showOnNode: true
|
|
33
|
+
- type: text
|
|
34
|
+
name: credentialRef
|
|
35
|
+
default: ""
|
|
36
|
+
description: "Project Deployment 中配置的 Jenkins 凭证引用;不在 flow.yaml 中填写 token。"
|
|
37
|
+
showOnNode: false
|
|
38
|
+
- type: text
|
|
39
|
+
name: pollInterval
|
|
40
|
+
default: "30s"
|
|
41
|
+
showOnNode: false
|
|
42
|
+
- type: text
|
|
43
|
+
name: timeout
|
|
44
|
+
default: "2h"
|
|
45
|
+
showOnNode: false
|
|
46
|
+
output:
|
|
47
|
+
- type: node
|
|
48
|
+
name: next
|
|
49
|
+
default: ""
|
|
50
|
+
- type: text
|
|
51
|
+
name: status
|
|
52
|
+
default: ""
|
|
53
|
+
required: true
|
|
54
|
+
showOnNode: true
|
|
55
|
+
- type: text
|
|
56
|
+
name: url
|
|
57
|
+
default: ""
|
|
58
|
+
required: true
|
|
59
|
+
description: "优先返回安装包 URL;没有安装包时返回 Jenkins Build URL。"
|
|
60
|
+
showOnNode: true
|
|
61
|
+
- type: text
|
|
62
|
+
name: qrUrl
|
|
63
|
+
default: ""
|
|
64
|
+
description: "解析到二维码时返回,否则为空。"
|
|
65
|
+
showOnNode: true
|
|
66
|
+
---
|
|
67
|
+
Trigger Jenkins job `${job}` with `${parameters}`, wait durably, then output `${status}`, `${url}`, and optional `${qrUrl}`.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:按 key 读取
|
|
3
|
+
runtime: none
|
|
4
|
+
palette: hidden
|
|
5
|
+
description: Load key-value from global storage
|
|
6
|
+
displayName: LoadKey
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
- type: text
|
|
12
|
+
name: key
|
|
13
|
+
default: ""
|
|
14
|
+
required: true
|
|
15
|
+
showOnNode: true
|
|
16
|
+
output:
|
|
17
|
+
- type: node
|
|
18
|
+
name: next
|
|
19
|
+
default: ""
|
|
20
|
+
- type: text
|
|
21
|
+
name: result
|
|
22
|
+
default: ""
|
|
23
|
+
required: true
|
|
24
|
+
showOnNode: true
|
|
25
|
+
---
|
|
26
|
+
${USER_PROMPT}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:执行 Node.js
|
|
3
|
+
runtime: native
|
|
4
|
+
description: |
|
|
5
|
+
Execute a Node.js script. The Workspace runtime spawns the command directly — no agent involved.
|
|
6
|
+
|
|
7
|
+
**Success/Failure:** Determined by the script process **exit code** — 0 = success, non-0 = failed.
|
|
8
|
+
**Result Output:** Script stdout becomes the `result` slot content (plain text, e.g. `console.log("hello")`).
|
|
9
|
+
When stdout is empty and the exit code is non-0, stderr is written to the failure message.
|
|
10
|
+
Do **not** wrap stdout in a JSON envelope.
|
|
11
|
+
|
|
12
|
+
**Script placeholders:** `script` (inline) or `scriptRef` (file) support `${}` placeholders —
|
|
13
|
+
`workspaceRoot` / `pipelineWorkspace` / `flowDir` (all three resolve to the scoped workspace root),
|
|
14
|
+
`cwd`, `nodeRunDir`, `nodeTmpDir`, `outputsDir`, `scriptRef`, plus every input and output slot name.
|
|
15
|
+
Values are auto shell-quoted, so do not add your own quotes.
|
|
16
|
+
Example: `script: node ${flowDir}/scripts/my-check.mjs --root ${workspaceRoot} --input ${todo}`
|
|
17
|
+
|
|
18
|
+
**Pin Path Constraint (Important):** File paths read/written by the script **must be passed via pins**;
|
|
19
|
+
never construct output paths inside the script.
|
|
20
|
+
- Input slots of type `file` are resolved from upstream connections; the script receives them as CLI args.
|
|
21
|
+
- Output slots of type `file` are resolved to absolute paths by the runtime; the script writes to them directly.
|
|
22
|
+
- Reference them with `${slotName}` in `script`, e.g. `--figma-tree ${figma_tree} --output ${restore_todolist}`.
|
|
23
|
+
- **Forbidden** to invent output paths inside the script — downstream nodes will not find the files.
|
|
24
|
+
|
|
25
|
+
**Scripts under `scripts/` must be referenced as `${flowDir}/scripts/xxx.mjs`.**
|
|
26
|
+
displayName: NodeJs
|
|
27
|
+
input:
|
|
28
|
+
- type: node
|
|
29
|
+
name: prev
|
|
30
|
+
default: ""
|
|
31
|
+
- type: text
|
|
32
|
+
name: workspaceContext
|
|
33
|
+
default: ""
|
|
34
|
+
required: true
|
|
35
|
+
showOnNode: true
|
|
36
|
+
- type: text
|
|
37
|
+
name: skillsContext
|
|
38
|
+
default: ""
|
|
39
|
+
- type: text
|
|
40
|
+
name: mcpContext
|
|
41
|
+
default: ""
|
|
42
|
+
output:
|
|
43
|
+
- type: node
|
|
44
|
+
name: next
|
|
45
|
+
default: ""
|
|
46
|
+
- type: text
|
|
47
|
+
name: result
|
|
48
|
+
default: ""
|
|
49
|
+
required: true
|
|
50
|
+
showOnNode: true
|
|
51
|
+
---
|
|
52
|
+
${USER_PROMPT}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:醒目输出
|
|
3
|
+
runtime: none
|
|
4
|
+
palette: hidden
|
|
5
|
+
description: Output content to user with special font style
|
|
6
|
+
displayName: Print
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
- type: text
|
|
12
|
+
name: content
|
|
13
|
+
default: ""
|
|
14
|
+
required: true
|
|
15
|
+
showOnNode: true
|
|
16
|
+
output:
|
|
17
|
+
- type: node
|
|
18
|
+
name: next
|
|
19
|
+
default: ""
|
|
20
|
+
---
|
|
21
|
+
Print `${content}` to the user.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:按 key 写入
|
|
3
|
+
runtime: none
|
|
4
|
+
palette: hidden
|
|
5
|
+
description: Save key-value pair to global storage
|
|
6
|
+
displayName: SaveKey
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
- type: text
|
|
12
|
+
name: key
|
|
13
|
+
default: ""
|
|
14
|
+
required: true
|
|
15
|
+
showOnNode: true
|
|
16
|
+
- type: text
|
|
17
|
+
name: value
|
|
18
|
+
default: ""
|
|
19
|
+
required: true
|
|
20
|
+
showOnNode: true
|
|
21
|
+
output:
|
|
22
|
+
- type: node
|
|
23
|
+
name: next
|
|
24
|
+
default: ""
|
|
25
|
+
---
|
|
26
|
+
${USER_PROMPT}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: set environment variables for the current run only
|
|
3
|
+
runtime: native
|
|
4
|
+
description: Set environment variables for downstream nodes in the current workspace run
|
|
5
|
+
displayName: Set Run Env
|
|
6
|
+
input:
|
|
7
|
+
- type: node
|
|
8
|
+
name: prev
|
|
9
|
+
default: ""
|
|
10
|
+
- type: text
|
|
11
|
+
name: key
|
|
12
|
+
default: ""
|
|
13
|
+
description: "单个环境变量名,例如 IMAP_USER。"
|
|
14
|
+
showOnNode: true
|
|
15
|
+
- type: text
|
|
16
|
+
name: value
|
|
17
|
+
default: ""
|
|
18
|
+
description: "单个环境变量值。"
|
|
19
|
+
showOnNode: true
|
|
20
|
+
- type: text
|
|
21
|
+
name: variables
|
|
22
|
+
default: ""
|
|
23
|
+
description: "批量设置,支持多行 KEY=VALUE 或 JSON object。"
|
|
24
|
+
showOnNode: false
|
|
25
|
+
output:
|
|
26
|
+
- type: node
|
|
27
|
+
name: next
|
|
28
|
+
default: ""
|
|
29
|
+
- type: text
|
|
30
|
+
name: keys
|
|
31
|
+
default: ""
|
|
32
|
+
showOnNode: false
|
|
33
|
+
- type: text
|
|
34
|
+
name: count
|
|
35
|
+
default: ""
|
|
36
|
+
showOnNode: false
|
|
37
|
+
---
|
|
38
|
+
Set environment variables for downstream nodes in this run only.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:用户选择(Switch 分支)
|
|
3
|
+
runtime: none
|
|
4
|
+
palette: hidden
|
|
5
|
+
description: 等待用户从多个选项中选择一个,流程暂停;按用户选择沿对应出边分支继续。每个 output 槽位对应一条分支,槽位的 description 作为选项文案。
|
|
6
|
+
displayName: UserAsk
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
- type: file
|
|
12
|
+
name: question
|
|
13
|
+
description: 要展示给用户的问题(Markdown 格式)
|
|
14
|
+
default: ""
|
|
15
|
+
required: true
|
|
16
|
+
showOnNode: true
|
|
17
|
+
output:
|
|
18
|
+
- type: node
|
|
19
|
+
name: option_0
|
|
20
|
+
description: 选项 0
|
|
21
|
+
default: ""
|
|
22
|
+
- type: node
|
|
23
|
+
name: option_1
|
|
24
|
+
description: 选项 1
|
|
25
|
+
default: ""
|
|
26
|
+
---
|
|
27
|
+
${USER_PROMPT}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:用户确认
|
|
3
|
+
runtime: none
|
|
4
|
+
palette: hidden
|
|
5
|
+
description: 等待用户确认,流程暂停。展示确认内容给用户,用户可编辑/AI修改后保存,回复 "继续" 后重启流程。
|
|
6
|
+
displayName: UserCheck
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
- type: file
|
|
12
|
+
name: content
|
|
13
|
+
description: 要展示给用户确认的内容(Markdown 格式)
|
|
14
|
+
default: ""
|
|
15
|
+
required: true
|
|
16
|
+
showOnNode: true
|
|
17
|
+
output:
|
|
18
|
+
- type: node
|
|
19
|
+
name: next
|
|
20
|
+
default: ""
|
|
21
|
+
- type: file
|
|
22
|
+
name: content
|
|
23
|
+
description: 用户确认后的内容(可能已编辑/AI修改)
|
|
24
|
+
default: ""
|
|
25
|
+
---
|
|
26
|
+
${USER_PROMPT}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: WeCom direct markdown message
|
|
3
|
+
runtime: native
|
|
4
|
+
description: Send Markdown message to WeCom users through an enterprise application
|
|
5
|
+
displayName: WeCom Direct Markdown
|
|
6
|
+
input:
|
|
7
|
+
- type: node
|
|
8
|
+
name: prev
|
|
9
|
+
default: ""
|
|
10
|
+
- type: text
|
|
11
|
+
name: markdown
|
|
12
|
+
default: ""
|
|
13
|
+
required: true
|
|
14
|
+
description: "企业微信应用消息 markdown.content。请输出企业微信 Markdown 正文,不要包裹 agentflow envelope 或额外解释;适合通知、告警、任务摘要等个人消息。"
|
|
15
|
+
showOnNode: true
|
|
16
|
+
- type: text
|
|
17
|
+
name: toUser
|
|
18
|
+
default: ""
|
|
19
|
+
required: true
|
|
20
|
+
description: "接收人企业微信 userid;多个用户用 | 分隔,@all 表示全部。"
|
|
21
|
+
showOnNode: true
|
|
22
|
+
- type: text
|
|
23
|
+
name: corpId
|
|
24
|
+
default: ""
|
|
25
|
+
showOnNode: false
|
|
26
|
+
- type: text
|
|
27
|
+
name: corpSecret
|
|
28
|
+
default: ""
|
|
29
|
+
showOnNode: false
|
|
30
|
+
- type: text
|
|
31
|
+
name: agentId
|
|
32
|
+
default: ""
|
|
33
|
+
showOnNode: false
|
|
34
|
+
- type: text
|
|
35
|
+
name: accessToken
|
|
36
|
+
default: ""
|
|
37
|
+
showOnNode: false
|
|
38
|
+
output:
|
|
39
|
+
- type: node
|
|
40
|
+
name: next
|
|
41
|
+
default: ""
|
|
42
|
+
- type: bool
|
|
43
|
+
name: sent
|
|
44
|
+
default: ""
|
|
45
|
+
showOnNode: true
|
|
46
|
+
- type: text
|
|
47
|
+
name: message
|
|
48
|
+
default: ""
|
|
49
|
+
showOnNode: false
|
|
50
|
+
- type: text
|
|
51
|
+
name: response
|
|
52
|
+
default: ""
|
|
53
|
+
showOnNode: false
|
|
54
|
+
---
|
|
55
|
+
Send `${markdown}` to one or more WeCom users (`${toUser}`) using a WeCom enterprise application.
|
|
56
|
+
|
|
57
|
+
If credential inputs are empty, AgentFlow reads `WECOM_CORP_ID`, `WECOM_APP_SECRET` / `WECOM_CORP_SECRET`, `WECOM_AGENT_ID`, and optionally `WECOM_TO_USER` from environment config.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: WeCom group robot markdown message
|
|
3
|
+
runtime: native
|
|
4
|
+
description: Send Markdown message to a WeCom group robot webhook
|
|
5
|
+
displayName: WeCom Group Chat Markdown
|
|
6
|
+
input:
|
|
7
|
+
- type: node
|
|
8
|
+
name: prev
|
|
9
|
+
default: ""
|
|
10
|
+
- type: text
|
|
11
|
+
name: markdown
|
|
12
|
+
default: ""
|
|
13
|
+
required: true
|
|
14
|
+
description: "企业微信机器人 markdown.content。请输出企业微信 Markdown 正文,不要包裹 agentflow envelope 或额外解释;支持标题、列表、链接、引用、代码等企业微信 Markdown 子集。"
|
|
15
|
+
showOnNode: true
|
|
16
|
+
- type: text
|
|
17
|
+
name: webhookUrl
|
|
18
|
+
default: ""
|
|
19
|
+
description: "企业微信群机器人完整 webhook 地址。可以只填 webhookKey。"
|
|
20
|
+
showOnNode: true
|
|
21
|
+
- type: text
|
|
22
|
+
name: webhookKey
|
|
23
|
+
default: ""
|
|
24
|
+
description: "企业微信群机器人 key,用于拼出 https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..."
|
|
25
|
+
showOnNode: false
|
|
26
|
+
output:
|
|
27
|
+
- type: node
|
|
28
|
+
name: next
|
|
29
|
+
default: ""
|
|
30
|
+
- type: bool
|
|
31
|
+
name: sent
|
|
32
|
+
default: ""
|
|
33
|
+
showOnNode: true
|
|
34
|
+
- type: text
|
|
35
|
+
name: message
|
|
36
|
+
default: ""
|
|
37
|
+
showOnNode: false
|
|
38
|
+
- type: text
|
|
39
|
+
name: response
|
|
40
|
+
default: ""
|
|
41
|
+
showOnNode: false
|
|
42
|
+
---
|
|
43
|
+
Send `${markdown}` to a WeCom group chat through a group robot webhook.
|
|
44
|
+
|
|
45
|
+
Use either `webhookUrl` or `webhookKey`. If both are empty, AgentFlow reads `WECOM_GROUP_WEBHOOK` / `WECOM_BOT_WEBHOOK` or `WECOM_GROUP_WEBHOOK_KEY` / `WECOM_BOT_KEY` from environment config.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:一键任务
|
|
3
|
+
runtime: native
|
|
4
|
+
type: agent
|
|
5
|
+
description: 输入任务描述,选择 Skills、workspace 上下文和输出类型后直接运行;等价于「Load Skills + 子 Agent + Display」的合并节点。
|
|
6
|
+
displayName: 一键任务
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
- type: text
|
|
12
|
+
name: skillKeys
|
|
13
|
+
default: ""
|
|
14
|
+
showOnNode: false
|
|
15
|
+
- type: bool
|
|
16
|
+
name: includeWorkspaceContext
|
|
17
|
+
default: "true"
|
|
18
|
+
showOnNode: false
|
|
19
|
+
- type: text
|
|
20
|
+
name: displayType
|
|
21
|
+
default: "markdown"
|
|
22
|
+
showOnNode: false
|
|
23
|
+
- type: text
|
|
24
|
+
name: knowledgeContext
|
|
25
|
+
default: ""
|
|
26
|
+
showOnNode: false
|
|
27
|
+
- type: text
|
|
28
|
+
name: workspaceContext
|
|
29
|
+
default: ""
|
|
30
|
+
showOnNode: false
|
|
31
|
+
output:
|
|
32
|
+
- type: node
|
|
33
|
+
name: next
|
|
34
|
+
default: ""
|
|
35
|
+
- type: text
|
|
36
|
+
name: content
|
|
37
|
+
default: ""
|
|
38
|
+
showOnNode: true
|
|
39
|
+
- type: text
|
|
40
|
+
name: displayType
|
|
41
|
+
default: "markdown"
|
|
42
|
+
showOnNode: false
|
|
43
|
+
---
|
|
44
|
+
输入任务,选择 Skills、workspace 上下文和输出类型后直接运行。
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
# 内置节点:Run
|
|
3
|
+
runtime: native
|
|
4
|
+
type: control
|
|
5
|
+
description: Workspace 图的运行入口。点击运行时,从本节点出发沿控制边选出子图并执行;本节点自身不产生输出。
|
|
6
|
+
displayName: Run
|
|
7
|
+
input:
|
|
8
|
+
- type: node
|
|
9
|
+
name: prev
|
|
10
|
+
default: ""
|
|
11
|
+
output:
|
|
12
|
+
- type: node
|
|
13
|
+
name: next
|
|
14
|
+
default: ""
|
|
15
|
+
---
|
|
16
|
+
Run the downstream workspace subgraph connected from this node.
|