@fieldwangai/agentflow 0.1.32 → 0.1.34
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/catalog-flows.mjs +7 -2
- package/bin/lib/composer-node-schema.mjs +7 -7
- package/bin/lib/composer-planner.mjs +5 -5
- package/bin/lib/git-worktree.mjs +263 -0
- package/bin/lib/gitlab-mr.mjs +174 -0
- package/bin/lib/locales/en.json +27 -7
- package/bin/lib/locales/zh.json +26 -6
- package/bin/lib/marketplace.mjs +106 -2
- package/bin/lib/paths.mjs +5 -1
- package/bin/lib/scheduler.mjs +8 -3
- package/bin/lib/ui-server.mjs +284 -13
- package/bin/pipeline/build-node-prompt.mjs +27 -1
- package/bin/pipeline/pre-process-node.mjs +216 -39
- package/bin/pipeline/validate-flow.mjs +7 -17
- package/builtin/nodes/agent_subAgent.md +2 -0
- package/builtin/nodes/control_agent_toBool.md +4 -0
- package/builtin/nodes/control_cancelled.md +8 -4
- package/builtin/nodes/control_cd_workspace.md +2 -0
- package/builtin/nodes/control_delay.md +9 -0
- package/builtin/nodes/control_toBool.md +6 -2
- package/builtin/nodes/control_user_workspace.md +2 -0
- package/builtin/nodes/control_wait_until.md +9 -0
- package/builtin/nodes/display_html.md +31 -0
- package/builtin/nodes/display_image.md +35 -0
- package/builtin/nodes/provide_bool.md +13 -0
- package/builtin/nodes/provide_file.md +2 -0
- package/builtin/nodes/provide_str.md +2 -0
- package/builtin/nodes/tool_get_env.md +4 -0
- package/builtin/nodes/tool_git_checkout.md +14 -2
- package/builtin/nodes/tool_git_worktree_load.md +59 -0
- package/builtin/nodes/tool_git_worktree_unload.md +51 -0
- package/builtin/nodes/tool_gitlab_create_mr.md +113 -0
- package/builtin/nodes/tool_load_key.md +4 -0
- package/builtin/nodes/tool_nodejs.md +4 -0
- package/builtin/nodes/tool_print.md +2 -0
- package/builtin/nodes/tool_save_key.md +4 -0
- package/builtin/nodes/tool_user_ask.md +3 -1
- package/builtin/nodes/tool_user_check.md +3 -1
- package/builtin/web-ui/dist/assets/index-B1j_UaHw.js +202 -0
- package/builtin/web-ui/dist/assets/index-ChiTnW0H.css +1 -0
- package/builtin/web-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/builtin/nodes/control_deadline.md +0 -32
- package/builtin/web-ui/dist/assets/index-D0Tkhqr6.css +0 -1
- package/builtin/web-ui/dist/assets/index-DyhW5chp.js +0 -197
|
@@ -8,6 +8,7 @@ description: |
|
|
|
8
8
|
- If `targetDir` is empty, the repository is cloned into `${pipelineWorkspace}/.workspace/agentflow/git-repos/<repo-name>`.
|
|
9
9
|
- Set `includeSubmodules` to `true` to clone/update Git submodules recursively.
|
|
10
10
|
- The `workspaceContext` output can be connected to CD Workspace, Load Skills, agent, or tool nodes.
|
|
11
|
+
- The `gitContext` output can be connected to Worktree, GitLab MR, or other Git nodes.
|
|
11
12
|
displayName: Git Checkout
|
|
12
13
|
input:
|
|
13
14
|
- type: node
|
|
@@ -21,7 +22,6 @@ input:
|
|
|
21
22
|
- type: text
|
|
22
23
|
name: branch
|
|
23
24
|
default: ""
|
|
24
|
-
showOnNode: true
|
|
25
25
|
- type: text
|
|
26
26
|
name: targetDir
|
|
27
27
|
default: ""
|
|
@@ -31,9 +31,14 @@ input:
|
|
|
31
31
|
- type: bool
|
|
32
32
|
name: includeSubmodules
|
|
33
33
|
default: "false"
|
|
34
|
+
- type: text
|
|
35
|
+
name: remote
|
|
36
|
+
default: "origin"
|
|
34
37
|
- type: text
|
|
35
38
|
name: workspaceContext
|
|
36
39
|
default: ""
|
|
40
|
+
required: true
|
|
41
|
+
showOnNode: true
|
|
37
42
|
output:
|
|
38
43
|
- type: node
|
|
39
44
|
name: next
|
|
@@ -53,5 +58,12 @@ output:
|
|
|
53
58
|
- type: text
|
|
54
59
|
name: workspaceContext
|
|
55
60
|
default: ""
|
|
61
|
+
required: true
|
|
62
|
+
showOnNode: true
|
|
63
|
+
- type: text
|
|
64
|
+
name: gitContext
|
|
65
|
+
default: ""
|
|
66
|
+
required: true
|
|
67
|
+
showOnNode: true
|
|
56
68
|
---
|
|
57
|
-
Clone or update `${repoUrl}` and output
|
|
69
|
+
Clone or update `${repoUrl}` and output workspace/git contexts for the checked-out repository.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: Git Worktree Load
|
|
3
|
+
description: |
|
|
4
|
+
Create or reuse a Git worktree and expose it as the downstream workspace context.
|
|
5
|
+
|
|
6
|
+
- `repoPath` is required unless `gitContext.repoPath` is connected.
|
|
7
|
+
- `workspaceContext` is required so the node can preserve the previous execution context.
|
|
8
|
+
- `branch` is optional. When empty, AgentFlow creates a detached worktree at the current HEAD.
|
|
9
|
+
- `worktreePath` is optional. When empty, AgentFlow creates a path under `${pipelineWorkspace}/.workspace/agentflow/worktrees`.
|
|
10
|
+
- Existing worktree paths are reused only when they are registered by `git worktree list` for the given repo.
|
|
11
|
+
displayName: Load Worktree
|
|
12
|
+
input:
|
|
13
|
+
- type: node
|
|
14
|
+
name: prev
|
|
15
|
+
default: ""
|
|
16
|
+
- type: file
|
|
17
|
+
name: repoPath
|
|
18
|
+
default: ""
|
|
19
|
+
- type: text
|
|
20
|
+
name: branch
|
|
21
|
+
default: ""
|
|
22
|
+
- type: file
|
|
23
|
+
name: worktreePath
|
|
24
|
+
default: ""
|
|
25
|
+
- type: text
|
|
26
|
+
name: gitContext
|
|
27
|
+
default: ""
|
|
28
|
+
required: true
|
|
29
|
+
showOnNode: true
|
|
30
|
+
- type: text
|
|
31
|
+
name: workspaceContext
|
|
32
|
+
default: ""
|
|
33
|
+
required: true
|
|
34
|
+
showOnNode: true
|
|
35
|
+
output:
|
|
36
|
+
- type: node
|
|
37
|
+
name: next
|
|
38
|
+
default: ""
|
|
39
|
+
- type: file
|
|
40
|
+
name: worktreePath
|
|
41
|
+
default: ""
|
|
42
|
+
- type: text
|
|
43
|
+
name: branch
|
|
44
|
+
default: ""
|
|
45
|
+
- type: text
|
|
46
|
+
name: commit
|
|
47
|
+
default: ""
|
|
48
|
+
- type: text
|
|
49
|
+
name: workspaceContext
|
|
50
|
+
default: ""
|
|
51
|
+
required: true
|
|
52
|
+
showOnNode: true
|
|
53
|
+
- type: text
|
|
54
|
+
name: gitContext
|
|
55
|
+
default: ""
|
|
56
|
+
required: true
|
|
57
|
+
showOnNode: true
|
|
58
|
+
---
|
|
59
|
+
Load a Git worktree from `${repoPath}` and switch downstream workspace context to it.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: Git Worktree Unload
|
|
3
|
+
description: |
|
|
4
|
+
Remove a Git worktree.
|
|
5
|
+
|
|
6
|
+
- `workspaceContext` is required. Its `cwd` is used as the worktree to remove.
|
|
7
|
+
- `repoPath`, `worktreePath` and `gitContext` are optional compatibility overrides.
|
|
8
|
+
- By default `force` is false; dirty worktrees fail instead of being removed.
|
|
9
|
+
- By default `prune` is true.
|
|
10
|
+
displayName: Unload Worktree
|
|
11
|
+
input:
|
|
12
|
+
- type: node
|
|
13
|
+
name: prev
|
|
14
|
+
default: ""
|
|
15
|
+
- type: file
|
|
16
|
+
name: repoPath
|
|
17
|
+
default: ""
|
|
18
|
+
- type: file
|
|
19
|
+
name: worktreePath
|
|
20
|
+
default: ""
|
|
21
|
+
- type: text
|
|
22
|
+
name: gitContext
|
|
23
|
+
default: ""
|
|
24
|
+
- type: text
|
|
25
|
+
name: workspaceContext
|
|
26
|
+
default: ""
|
|
27
|
+
required: true
|
|
28
|
+
showOnNode: true
|
|
29
|
+
- type: bool
|
|
30
|
+
name: force
|
|
31
|
+
default: "false"
|
|
32
|
+
- type: bool
|
|
33
|
+
name: prune
|
|
34
|
+
default: "true"
|
|
35
|
+
output:
|
|
36
|
+
- type: node
|
|
37
|
+
name: next
|
|
38
|
+
default: ""
|
|
39
|
+
- type: bool
|
|
40
|
+
name: removed
|
|
41
|
+
default: ""
|
|
42
|
+
- type: text
|
|
43
|
+
name: workspaceContext
|
|
44
|
+
default: ""
|
|
45
|
+
required: true
|
|
46
|
+
showOnNode: true
|
|
47
|
+
- type: text
|
|
48
|
+
name: message
|
|
49
|
+
default: ""
|
|
50
|
+
---
|
|
51
|
+
Remove Git worktree `${worktreePath}` from repository `${repoPath}`.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
# Built-in node: GitLab Create MR
|
|
3
|
+
description: |
|
|
4
|
+
Create or reuse a GitLab merge request for the current branch.
|
|
5
|
+
|
|
6
|
+
- `gitContext` and `workspaceContext` can be connected from Git Checkout / Load Worktree.
|
|
7
|
+
- `repoPath` is optional. When empty, AgentFlow uses `gitContext.worktreePath`, `gitContext.repoPath`, or `workspaceContext.cwd`.
|
|
8
|
+
- `sourceBranch`, `targetBranch`, `title`, `description`, `draft`, and `labels` are optional. When empty, AgentFlow derives sensible defaults from git.
|
|
9
|
+
- `tokenEnv` is optional. Defaults to `GITLAB_TOKEN,GITLAB_PRIVATE_TOKEN`.
|
|
10
|
+
- `gitlabApiBase` is optional. When empty, AgentFlow uses `https://${gitContext.host}/api/v4`.
|
|
11
|
+
displayName: Create GitLab MR
|
|
12
|
+
input:
|
|
13
|
+
- type: node
|
|
14
|
+
name: prev
|
|
15
|
+
default: ""
|
|
16
|
+
- type: file
|
|
17
|
+
name: repoPath
|
|
18
|
+
default: ""
|
|
19
|
+
showOnNode: false
|
|
20
|
+
- type: text
|
|
21
|
+
name: gitContext
|
|
22
|
+
default: ""
|
|
23
|
+
showOnNode: true
|
|
24
|
+
- type: text
|
|
25
|
+
name: workspaceContext
|
|
26
|
+
default: ""
|
|
27
|
+
showOnNode: false
|
|
28
|
+
- type: text
|
|
29
|
+
name: sourceBranch
|
|
30
|
+
default: ""
|
|
31
|
+
showOnNode: false
|
|
32
|
+
- type: text
|
|
33
|
+
name: targetBranch
|
|
34
|
+
default: ""
|
|
35
|
+
showOnNode: false
|
|
36
|
+
- type: text
|
|
37
|
+
name: title
|
|
38
|
+
default: ""
|
|
39
|
+
showOnNode: false
|
|
40
|
+
- type: text
|
|
41
|
+
name: description
|
|
42
|
+
default: ""
|
|
43
|
+
showOnNode: false
|
|
44
|
+
- type: bool
|
|
45
|
+
name: draft
|
|
46
|
+
default: "false"
|
|
47
|
+
showOnNode: false
|
|
48
|
+
- type: text
|
|
49
|
+
name: labels
|
|
50
|
+
default: ""
|
|
51
|
+
showOnNode: false
|
|
52
|
+
- type: bool
|
|
53
|
+
name: push
|
|
54
|
+
default: "true"
|
|
55
|
+
showOnNode: false
|
|
56
|
+
- type: text
|
|
57
|
+
name: remote
|
|
58
|
+
default: "origin"
|
|
59
|
+
showOnNode: false
|
|
60
|
+
- type: text
|
|
61
|
+
name: tokenEnv
|
|
62
|
+
default: ""
|
|
63
|
+
showOnNode: false
|
|
64
|
+
- type: text
|
|
65
|
+
name: gitlabApiBase
|
|
66
|
+
default: ""
|
|
67
|
+
showOnNode: false
|
|
68
|
+
- type: bool
|
|
69
|
+
name: removeSourceBranch
|
|
70
|
+
default: "false"
|
|
71
|
+
showOnNode: false
|
|
72
|
+
- type: bool
|
|
73
|
+
name: squash
|
|
74
|
+
default: "false"
|
|
75
|
+
showOnNode: false
|
|
76
|
+
output:
|
|
77
|
+
- type: node
|
|
78
|
+
name: next
|
|
79
|
+
default: ""
|
|
80
|
+
- type: text
|
|
81
|
+
name: mrUrl
|
|
82
|
+
default: ""
|
|
83
|
+
required: true
|
|
84
|
+
- type: bool
|
|
85
|
+
name: created
|
|
86
|
+
default: ""
|
|
87
|
+
showOnNode: false
|
|
88
|
+
- type: text
|
|
89
|
+
name: mrIid
|
|
90
|
+
default: ""
|
|
91
|
+
showOnNode: false
|
|
92
|
+
- type: text
|
|
93
|
+
name: projectId
|
|
94
|
+
default: ""
|
|
95
|
+
showOnNode: false
|
|
96
|
+
- type: text
|
|
97
|
+
name: sourceBranch
|
|
98
|
+
default: ""
|
|
99
|
+
showOnNode: false
|
|
100
|
+
- type: text
|
|
101
|
+
name: targetBranch
|
|
102
|
+
default: ""
|
|
103
|
+
showOnNode: false
|
|
104
|
+
- type: text
|
|
105
|
+
name: title
|
|
106
|
+
default: ""
|
|
107
|
+
showOnNode: false
|
|
108
|
+
- type: text
|
|
109
|
+
name: message
|
|
110
|
+
default: ""
|
|
111
|
+
showOnNode: false
|
|
112
|
+
---
|
|
113
|
+
Create or reuse a GitLab merge request and output `${mrUrl}`.
|
|
@@ -9,6 +9,8 @@ input:
|
|
|
9
9
|
- type: text
|
|
10
10
|
name: key
|
|
11
11
|
default: ""
|
|
12
|
+
required: true
|
|
13
|
+
showOnNode: true
|
|
12
14
|
output:
|
|
13
15
|
- type: node
|
|
14
16
|
name: next
|
|
@@ -16,5 +18,7 @@ output:
|
|
|
16
18
|
- type: text
|
|
17
19
|
name: result
|
|
18
20
|
default: ""
|
|
21
|
+
required: true
|
|
22
|
+
showOnNode: true
|
|
19
23
|
---
|
|
20
24
|
${USER_PROMPT}
|
|
@@ -33,6 +33,8 @@ input:
|
|
|
33
33
|
- type: text
|
|
34
34
|
name: workspaceContext
|
|
35
35
|
default: ""
|
|
36
|
+
required: true
|
|
37
|
+
showOnNode: true
|
|
36
38
|
- type: text
|
|
37
39
|
name: skillsContext
|
|
38
40
|
default: ""
|
|
@@ -43,5 +45,7 @@ output:
|
|
|
43
45
|
- type: text
|
|
44
46
|
name: result
|
|
45
47
|
default: ""
|
|
48
|
+
required: true
|
|
49
|
+
showOnNode: true
|
|
46
50
|
---
|
|
47
51
|
${USER_PROMPT}
|
|
@@ -10,6 +10,8 @@ input:
|
|
|
10
10
|
name: content
|
|
11
11
|
description: 要展示给用户确认的内容(Markdown 格式)
|
|
12
12
|
default: ""
|
|
13
|
+
required: true
|
|
14
|
+
showOnNode: true
|
|
13
15
|
output:
|
|
14
16
|
- type: node
|
|
15
17
|
name: next
|
|
@@ -19,4 +21,4 @@ output:
|
|
|
19
21
|
description: 用户确认后的内容(可能已编辑/AI修改)
|
|
20
22
|
default: ""
|
|
21
23
|
---
|
|
22
|
-
${USER_PROMPT}
|
|
24
|
+
${USER_PROMPT}
|