@fieldwangai/agentflow 0.1.159 → 0.1.162

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.
Files changed (118) hide show
  1. package/bin/lib/auth.mjs +231 -14
  2. package/bin/lib/catalog-flows.mjs +12 -1
  3. package/bin/lib/cli-auth-page.mjs +103 -0
  4. package/bin/lib/control-while.mjs +336 -0
  5. package/bin/lib/flow-dsl/codegen.mjs +74 -11
  6. package/bin/lib/flow-dsl/ir.mjs +33 -2
  7. package/bin/lib/flow-dsl/lint.mjs +128 -3
  8. package/bin/lib/flow-dsl/parser.mjs +168 -4
  9. package/bin/lib/marketplace.mjs +10 -2
  10. package/bin/lib/node-package-manifest.mjs +7 -2
  11. package/bin/lib/node-ui-kit.mjs +156 -0
  12. package/bin/lib/paths.mjs +2 -0
  13. package/bin/lib/skill-runtime.mjs +6 -0
  14. package/bin/lib/table.mjs +2 -3
  15. package/bin/lib/ui-server.mjs +220 -17
  16. package/bin/lib/workspace-draft.mjs +74 -0
  17. package/bin/lib/workspace-flow-store.mjs +11 -2
  18. package/bin/lib/workspace-graph-merge.mjs +3 -0
  19. package/bin/lib/workspace-routes.mjs +307 -5
  20. package/bin/lib/workspace-server.mjs +598 -11
  21. package/bin/pipeline/validate-flow.mjs +3 -3
  22. package/builtin/nodes/control_parse_json.md +25 -0
  23. package/builtin/nodes/control_subflow_call.md +27 -0
  24. package/builtin/nodes/control_while.md +124 -0
  25. package/builtin/nodes/provide_json.md +14 -0
  26. package/builtin/nodes/workspace_subflow_input.md +14 -0
  27. package/builtin/pipelines/new/workspace.flow.js +1 -1
  28. package/builtin/pipelines/subflow-preview/workspace.flow.js +29 -0
  29. package/builtin/pipelines/subflow-preview/workspace.layout.json +38 -0
  30. package/builtin/pipelines/subflow-preview/workspace.nodes.json +19 -0
  31. package/builtin/pipelines/subflow-preview/workspace.state.json +93 -0
  32. package/builtin/pipelines/while-subflow-preview/workspace.flow.js +55 -0
  33. package/builtin/pipelines/while-subflow-preview/workspace.layout.json +66 -0
  34. package/builtin/pipelines/while-subflow-preview/workspace.nodes.json +49 -0
  35. package/builtin/pipelines/while-subflow-preview/workspace.state.json +194 -0
  36. package/builtin/web-ui/dist/assets/{WorkflowAssistantThread-CY19DsYq.js → WorkflowAssistantThread-CTrXOZ00.js} +1 -1
  37. package/builtin/web-ui/dist/assets/index-5uJFccdX.css +1 -0
  38. package/builtin/web-ui/dist/assets/index-BeUfNQRL.js +873 -0
  39. package/builtin/web-ui/dist/index.html +2 -2
  40. package/package.json +6 -1
  41. package/reference/flow-control-capabilities.md +41 -16
  42. package/shared/slot-types.js +58 -0
  43. package/skills/agentflow-author-flow/SKILL.md +81 -8
  44. package/skills/agentflow-author-flow/agents/openai.yaml +3 -3
  45. package/skills/agentflow-cli/SKILL.md +130 -25
  46. package/skills/agentflow-cli/agents/openai.yaml +2 -2
  47. package/skills/agentflow-cli/runtime/bin/lib/skill-runtime.mjs +14765 -0
  48. package/skills/agentflow-cli/runtime/builtin/nodes/agent_subAgent.md +34 -0
  49. package/skills/agentflow-cli/runtime/builtin/nodes/control_agent_toBool.md +26 -0
  50. package/skills/agentflow-cli/runtime/builtin/nodes/control_anyOne.md +19 -0
  51. package/skills/agentflow-cli/runtime/builtin/nodes/control_cancelled.md +26 -0
  52. package/skills/agentflow-cli/runtime/builtin/nodes/control_cd_workspace.md +50 -0
  53. package/skills/agentflow-cli/runtime/builtin/nodes/control_delay.md +31 -0
  54. package/skills/agentflow-cli/runtime/builtin/nodes/control_end.md +13 -0
  55. package/skills/agentflow-cli/runtime/builtin/nodes/control_if.md +21 -0
  56. package/skills/agentflow-cli/runtime/builtin/nodes/control_interval_loop.md +55 -0
  57. package/skills/agentflow-cli/runtime/builtin/nodes/control_load_mcp.md +24 -0
  58. package/skills/agentflow-cli/runtime/builtin/nodes/control_load_skills.md +35 -0
  59. package/skills/agentflow-cli/runtime/builtin/nodes/control_parse_json.md +25 -0
  60. package/skills/agentflow-cli/runtime/builtin/nodes/control_start.md +13 -0
  61. package/skills/agentflow-cli/runtime/builtin/nodes/control_subflow_call.md +27 -0
  62. package/skills/agentflow-cli/runtime/builtin/nodes/control_toBool.md +27 -0
  63. package/skills/agentflow-cli/runtime/builtin/nodes/control_user_workspace.md +24 -0
  64. package/skills/agentflow-cli/runtime/builtin/nodes/control_wait_until.md +34 -0
  65. package/skills/agentflow-cli/runtime/builtin/nodes/control_while.md +124 -0
  66. package/skills/agentflow-cli/runtime/builtin/nodes/display_ascii.md +24 -0
  67. package/skills/agentflow-cli/runtime/builtin/nodes/display_chart.md +32 -0
  68. package/skills/agentflow-cli/runtime/builtin/nodes/display_code.md +39 -0
  69. package/skills/agentflow-cli/runtime/builtin/nodes/display_html.md +32 -0
  70. package/skills/agentflow-cli/runtime/builtin/nodes/display_image.md +36 -0
  71. package/skills/agentflow-cli/runtime/builtin/nodes/display_markdown.md +24 -0
  72. package/skills/agentflow-cli/runtime/builtin/nodes/display_mermaid.md +24 -0
  73. package/skills/agentflow-cli/runtime/builtin/nodes/display_react_app.md +53 -0
  74. package/skills/agentflow-cli/runtime/builtin/nodes/display_table.md +32 -0
  75. package/skills/agentflow-cli/runtime/builtin/nodes/provide_bool.md +14 -0
  76. package/skills/agentflow-cli/runtime/builtin/nodes/provide_file.md +14 -0
  77. package/skills/agentflow-cli/runtime/builtin/nodes/provide_json.md +14 -0
  78. package/skills/agentflow-cli/runtime/builtin/nodes/provide_password.md +14 -0
  79. package/skills/agentflow-cli/runtime/builtin/nodes/provide_str.md +14 -0
  80. package/skills/agentflow-cli/runtime/builtin/nodes/tool_display_share_link.md +47 -0
  81. package/skills/agentflow-cli/runtime/builtin/nodes/tool_get_env.md +20 -0
  82. package/skills/agentflow-cli/runtime/builtin/nodes/tool_git_checkout.md +70 -0
  83. package/skills/agentflow-cli/runtime/builtin/nodes/tool_git_worktree_load.md +73 -0
  84. package/skills/agentflow-cli/runtime/builtin/nodes/tool_git_worktree_unload.md +52 -0
  85. package/skills/agentflow-cli/runtime/builtin/nodes/tool_gitlab_create_mr.md +114 -0
  86. package/skills/agentflow-cli/runtime/builtin/nodes/tool_jenkins_build.md +67 -0
  87. package/skills/agentflow-cli/runtime/builtin/nodes/tool_load_key.md +26 -0
  88. package/skills/agentflow-cli/runtime/builtin/nodes/tool_nodejs.md +52 -0
  89. package/skills/agentflow-cli/runtime/builtin/nodes/tool_print.md +21 -0
  90. package/skills/agentflow-cli/runtime/builtin/nodes/tool_save_key.md +26 -0
  91. package/skills/agentflow-cli/runtime/builtin/nodes/tool_set_run_env.md +38 -0
  92. package/skills/agentflow-cli/runtime/builtin/nodes/tool_user_ask.md +27 -0
  93. package/skills/agentflow-cli/runtime/builtin/nodes/tool_user_check.md +26 -0
  94. package/skills/agentflow-cli/runtime/builtin/nodes/tool_wecom_send_app_markdown.md +57 -0
  95. package/skills/agentflow-cli/runtime/builtin/nodes/tool_wecom_send_group_markdown.md +45 -0
  96. package/skills/agentflow-cli/runtime/builtin/nodes/workspace_one_click_task.md +44 -0
  97. package/skills/agentflow-cli/runtime/builtin/nodes/workspace_run.md +16 -0
  98. package/skills/agentflow-cli/runtime/builtin/nodes/workspace_scheduled_run.md +16 -0
  99. package/skills/agentflow-cli/runtime/builtin/nodes/workspace_subflow_input.md +14 -0
  100. package/skills/agentflow-cli/runtime/package.json +6 -0
  101. package/skills/agentflow-cli/scripts/agentflow-auth-store.mjs +113 -0
  102. package/skills/agentflow-cli/scripts/agentflow-cli.mjs +393 -28
  103. package/skills/agentflow-cli/scripts/agentflow-runtime.mjs +11 -4
  104. package/skills/agentflow-flow-add-instances/SKILL.md +2 -2
  105. package/skills/agentflow-flow-dsl/SKILL.md +83 -10
  106. package/skills/agentflow-flow-dsl/agents/openai.yaml +2 -2
  107. package/skills/agentflow-flow-dsl/references/node-calls.md +3 -0
  108. package/skills/agentflow-flow-dsl/references/subflow-authoring.md +230 -0
  109. package/skills/agentflow-flow-edit-node-fields/SKILL.md +3 -3
  110. package/skills/agentflow-flow-recipes/SKILL.md +1 -1
  111. package/skills/agentflow-flow-recipes/references/recipes.md +1 -2
  112. package/skills/agentflow-flow-sync-ui/SKILL.md +1 -1
  113. package/skills/agentflow-node-dsl/SKILL.md +44 -13
  114. package/skills/agentflow-node-reference/references/builtin-nodes.md +25 -0
  115. package/skills/agentflow-workspace-markdown/SKILL.md +1 -1
  116. package/builtin/web-ui/dist/assets/index-B9ppXv7e.css +0 -1
  117. package/builtin/web-ui/dist/assets/index-CdEQWRrp.js +0 -872
  118. package/skills/agentflow-workspace-graph/SKILL.md +0 -85
@@ -0,0 +1,39 @@
1
+ ---
2
+ # 内置节点:代码展示
3
+ runtime: native
4
+ description: Display source code with language highlighting, line numbers, copy, wrap, and download controls; passes content downstream as text
5
+ displayName: Code Display
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: content
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ - type: text
16
+ name: language
17
+ default: ""
18
+ description: Syntax language such as javascript, typescript, python, kotlin, java, shell, json, yaml, html, css, or sql
19
+ showOnNode: false
20
+ - type: text
21
+ name: fileName
22
+ default: ""
23
+ description: Optional file name used when downloading
24
+ showOnNode: false
25
+ - type: bool
26
+ name: wrap
27
+ default: "false"
28
+ description: Wrap long source lines by default
29
+ showOnNode: false
30
+ output:
31
+ - type: text
32
+ name: content
33
+ default: ""
34
+ showOnNode: true
35
+ - type: node
36
+ name: next
37
+ default: ""
38
+ ---
39
+ ${content}
@@ -0,0 +1,32 @@
1
+ ---
2
+ # Built-in node: HTML Display
3
+ runtime: native
4
+ description: Display HTML content in workspace canvas; passes HTML downstream as text
5
+ displayName: HTML Display
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: content
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ - type: file
16
+ name: filePath
17
+ default: ""
18
+ showOnNode: false
19
+ - type: text
20
+ name: workspaceContext
21
+ default: ""
22
+ showOnNode: false
23
+ output:
24
+ - type: text
25
+ name: content
26
+ default: ""
27
+ showOnNode: true
28
+ - type: node
29
+ name: next
30
+ default: ""
31
+ ---
32
+ ${content}
@@ -0,0 +1,36 @@
1
+ ---
2
+ # Built-in node: Image Display
3
+ runtime: native
4
+ description: Display an image URL, data URL, or image path in workspace canvas; passes source downstream as text
5
+ displayName: Image Display
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: src
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ - type: file
16
+ name: filePath
17
+ default: ""
18
+ showOnNode: false
19
+ - type: text
20
+ name: alt
21
+ default: ""
22
+ showOnNode: false
23
+ - type: text
24
+ name: workspaceContext
25
+ default: ""
26
+ showOnNode: false
27
+ output:
28
+ - type: text
29
+ name: src
30
+ default: ""
31
+ showOnNode: true
32
+ - type: node
33
+ name: next
34
+ default: ""
35
+ ---
36
+ ${src}
@@ -0,0 +1,24 @@
1
+ ---
2
+ # 内置节点:Markdown 展示
3
+ runtime: native
4
+ description: Display Markdown content in workspace canvas; passes content downstream as text
5
+ displayName: Markdown Display
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: content
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ output:
16
+ - type: text
17
+ name: content
18
+ default: ""
19
+ showOnNode: true
20
+ - type: node
21
+ name: next
22
+ default: ""
23
+ ---
24
+ ${content}
@@ -0,0 +1,24 @@
1
+ ---
2
+ # 内置节点:Mermaid 展示
3
+ runtime: native
4
+ description: Display Mermaid diagram source in workspace canvas; passes diagram source downstream as text
5
+ displayName: Mermaid Display
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: content
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ output:
16
+ - type: text
17
+ name: content
18
+ default: ""
19
+ showOnNode: true
20
+ - type: node
21
+ name: next
22
+ default: ""
23
+ ---
24
+ ${content}
@@ -0,0 +1,53 @@
1
+ ---
2
+ # Built-in node: React App Display
3
+ runtime: native
4
+ description: Display a small React project in a sandboxed workspace iframe and pass the project JSON downstream
5
+ displayName: React App
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: content
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ - type: file
16
+ name: filePath
17
+ default: ""
18
+ showOnNode: false
19
+ - type: text
20
+ name: workspaceContext
21
+ default: ""
22
+ showOnNode: false
23
+ output:
24
+ - type: text
25
+ name: content
26
+ default: ""
27
+ showOnNode: true
28
+ - type: node
29
+ name: next
30
+ default: ""
31
+ ---
32
+ {
33
+ "title": "React App",
34
+ "entry": "src/App.jsx",
35
+ "packageJson": {
36
+ "scripts": {
37
+ "dev": "vite --host 0.0.0.0",
38
+ "build": "vite build"
39
+ },
40
+ "dependencies": {
41
+ "@vitejs/plugin-react": "latest",
42
+ "vite": "latest",
43
+ "react": "latest",
44
+ "react-dom": "latest"
45
+ },
46
+ "devDependencies": {}
47
+ },
48
+ "files": {
49
+ "src/App.jsx": "export default function App() {\\n return (\\n <main>\\n <h1>React App</h1>\\n <p>Ask an Agent to replace this with a React project.</p>\\n </main>\\n );\\n}\\n",
50
+ "src/styles.css": "body { margin: 0; background: #111112; color: #f4f0ff; font-family: Inter, system-ui, sans-serif; }\\nmain { min-height: 100vh; padding: 24px; }\\nh1 { margin: 0 0 8px; font-size: 28px; }\\np { margin: 0; color: rgba(244, 240, 255, 0.68); }\\n"
51
+ },
52
+ "inputs": {}
53
+ }
@@ -0,0 +1,32 @@
1
+ ---
2
+ # Built-in node: Table Display
3
+ runtime: native
4
+ description: Display table data in workspace canvas; accepts JSON, Markdown table, CSV, or TSV and passes the text downstream
5
+ displayName: Table Display
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: content
12
+ default: ""
13
+ required: true
14
+ showOnNode: true
15
+ - type: file
16
+ name: filePath
17
+ default: ""
18
+ showOnNode: false
19
+ - type: text
20
+ name: workspaceContext
21
+ default: ""
22
+ showOnNode: false
23
+ output:
24
+ - type: text
25
+ name: content
26
+ default: ""
27
+ showOnNode: true
28
+ - type: node
29
+ name: next
30
+ default: ""
31
+ ---
32
+ ${content}
@@ -0,0 +1,14 @@
1
+ ---
2
+ # 内置节点:直接提供布尔值
3
+ runtime: native
4
+ description: Provide a boolean value directly, value will be passed to downstream as true or false
5
+ displayName: Boolean
6
+ input: []
7
+ output:
8
+ - type: bool
9
+ name: value
10
+ default: "false"
11
+ required: true
12
+ showOnNode: true
13
+ ---
14
+ ${USER_PROMPT}
@@ -0,0 +1,14 @@
1
+ ---
2
+ # 内置节点:直接提供文件
3
+ runtime: native
4
+ description: Provide file path or content directly, value will be passed to downstream as-is
5
+ displayName: File
6
+ input: []
7
+ output:
8
+ - type: file
9
+ name: value
10
+ default: ""
11
+ required: true
12
+ showOnNode: true
13
+ ---
14
+ ${USER_PROMPT}
@@ -0,0 +1,14 @@
1
+ ---
2
+ # 内置节点:直接提供 JSON
3
+ runtime: native
4
+ type: provide
5
+ description: 提供经过校验的 JSON 值,输出可以直接连接 json 类型输入。
6
+ displayName: JSON
7
+ output:
8
+ - type: json
9
+ name: value
10
+ default: "null"
11
+ required: true
12
+ showOnNode: true
13
+ ---
14
+ ${USER_PROMPT}
@@ -0,0 +1,14 @@
1
+ ---
2
+ # Built-in node: directly provide a hidden password/secret value
3
+ runtime: native
4
+ description: Provide a secret text value without showing it on the node card
5
+ displayName: Password
6
+ input: []
7
+ output:
8
+ - type: text
9
+ name: value
10
+ default: ""
11
+ required: true
12
+ showOnNode: true
13
+ ---
14
+ ${USER_PROMPT}
@@ -0,0 +1,14 @@
1
+ ---
2
+ # 内置节点:直接提供文本
3
+ runtime: native
4
+ description: Provide a text value directly, value will be passed to downstream as-is
5
+ displayName: String
6
+ input: []
7
+ output:
8
+ - type: text
9
+ name: value
10
+ default: ""
11
+ required: true
12
+ showOnNode: true
13
+ ---
14
+ ${USER_PROMPT}
@@ -0,0 +1,47 @@
1
+ ---
2
+ # Built-in node: create share link for Display nodes
3
+ runtime: native
4
+ description: Create a public share link for upstream Display nodes
5
+ displayName: Display Share Link
6
+ input:
7
+ - type: node
8
+ name: prev
9
+ default: ""
10
+ - type: text
11
+ name: title
12
+ default: ""
13
+ description: "可选。分享页标题;只影响打开分享页后的页面标题,不影响输出 URL。为空时使用 AgentFlow Display。"
14
+ showOnNode: true
15
+ - type: text
16
+ name: layout
17
+ default: "single"
18
+ description: "可选。分享页布局:single、gallery、slides、document、canvas。通常保持默认 single。"
19
+ showOnNode: false
20
+ - type: text
21
+ name: nodeIds
22
+ default: ""
23
+ description: "可选。逗号或空格分隔的 Display 节点 ID;为空时自动分享连接到本节点的上游 Display 节点。"
24
+ showOnNode: false
25
+ - type: text
26
+ name: baseUrl
27
+ default: ""
28
+ description: "可选。分享站点地址,例如 https://agentflow.example.com;为空时优先使用环境变量,其次使用当前访问地址。"
29
+ showOnNode: false
30
+ output:
31
+ - type: node
32
+ name: next
33
+ default: ""
34
+ - type: text
35
+ name: url
36
+ default: ""
37
+ showOnNode: true
38
+ - type: text
39
+ name: shareId
40
+ default: ""
41
+ showOnNode: false
42
+ - type: text
43
+ name: expiresAt
44
+ default: ""
45
+ showOnNode: false
46
+ ---
47
+ Create a share link for connected Display nodes. Connect a Display node to this node, optionally set title, and use the url output.
@@ -0,0 +1,20 @@
1
+ ---
2
+ # 内置节点:按 key 读取环境/配置
3
+ runtime: none
4
+ palette: hidden
5
+ description: Get environment variable value
6
+ displayName: GetEnv
7
+ input:
8
+ - type: text
9
+ name: key
10
+ default: ""
11
+ required: true
12
+ showOnNode: true
13
+ output:
14
+ - type: text
15
+ name: value
16
+ default: ""
17
+ required: true
18
+ showOnNode: true
19
+ ---
20
+ ${USER_PROMPT}
@@ -0,0 +1,70 @@
1
+ ---
2
+ # 内置节点:Git Checkout
3
+ runtime: native
4
+ description: |
5
+ Clone or update a Git repository and expose it as a workspace context for downstream nodes.
6
+
7
+ - `repoUrl` is required.
8
+ - `targetDir` may be absolute or relative to the current workspace context.
9
+ - If `targetDir` is empty, the repository is cloned into `${pipelineWorkspace}/.workspace/agentflow/git-repos/<repo-name>`. For user pipelines, `${pipelineWorkspace}` follows the Admin Settings AgentFlow Data Root.
10
+ - Set `includeSubmodules` to `true` to clone/update Git submodules recursively.
11
+ - The `workspaceContext` output can be connected to CD Workspace, Load Skills, agent, or tool nodes.
12
+ - The `gitContext` output can be connected to Worktree, GitLab MR, or other Git nodes.
13
+ displayName: Git Checkout
14
+ input:
15
+ - type: node
16
+ name: prev
17
+ default: ""
18
+ - type: text
19
+ name: repoUrl
20
+ default: ""
21
+ required: true
22
+ showOnNode: true
23
+ - type: text
24
+ name: branch
25
+ default: ""
26
+ - type: text
27
+ name: targetDir
28
+ default: ""
29
+ - type: bool
30
+ name: pullIfExists
31
+ default: "true"
32
+ - type: bool
33
+ name: includeSubmodules
34
+ default: "false"
35
+ - type: text
36
+ name: remote
37
+ default: "origin"
38
+ - type: text
39
+ name: workspaceContext
40
+ default: ""
41
+ required: true
42
+ showOnNode: true
43
+ output:
44
+ - type: node
45
+ name: next
46
+ default: ""
47
+ - type: file
48
+ name: repoPath
49
+ default: ""
50
+ - type: text
51
+ name: branch
52
+ default: ""
53
+ - type: text
54
+ name: commit
55
+ default: ""
56
+ - type: bool
57
+ name: changed
58
+ default: ""
59
+ - type: text
60
+ name: workspaceContext
61
+ default: ""
62
+ required: true
63
+ showOnNode: true
64
+ - type: text
65
+ name: gitContext
66
+ default: ""
67
+ required: true
68
+ showOnNode: true
69
+ ---
70
+ Clone or update `${repoUrl}` and output workspace/git contexts for the checked-out repository.
@@ -0,0 +1,73 @@
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 temporary worktree under the current run temp directory.
11
+ - A worktree created by this node during the current Workspace run is removed when the run finishes or is stopped, even when `worktreePath` is explicitly set.
12
+ - Existing registered worktrees under the current flow workspace are also removed after the run, covering leftovers from previous interrupted runs.
13
+ - Existing registered worktrees outside the current flow workspace are reused and not removed automatically unless this run created them.
14
+ - Existing worktree paths are reused only when they are registered by `git worktree list` for the given repo.
15
+ - `pruneMissing` defaults to true. When Git has a registered worktree whose directory is missing, AgentFlow runs `git worktree prune` before adding it again.
16
+ - `force` defaults to false. When true, AgentFlow passes `--force` to `git worktree add`.
17
+ displayName: Load Worktree
18
+ input:
19
+ - type: node
20
+ name: prev
21
+ default: ""
22
+ - type: file
23
+ name: repoPath
24
+ default: ""
25
+ - type: text
26
+ name: branch
27
+ default: ""
28
+ - type: file
29
+ name: worktreePath
30
+ default: ""
31
+ - type: bool
32
+ name: pruneMissing
33
+ default: "true"
34
+ showOnNode: false
35
+ - type: bool
36
+ name: force
37
+ default: "false"
38
+ showOnNode: false
39
+ - type: text
40
+ name: gitContext
41
+ default: ""
42
+ required: true
43
+ showOnNode: true
44
+ - type: text
45
+ name: workspaceContext
46
+ default: ""
47
+ required: true
48
+ showOnNode: true
49
+ output:
50
+ - type: node
51
+ name: next
52
+ default: ""
53
+ - type: file
54
+ name: worktreePath
55
+ default: ""
56
+ - type: text
57
+ name: branch
58
+ default: ""
59
+ - type: text
60
+ name: commit
61
+ default: ""
62
+ - type: text
63
+ name: workspaceContext
64
+ default: ""
65
+ required: true
66
+ showOnNode: true
67
+ - type: text
68
+ name: gitContext
69
+ default: ""
70
+ required: true
71
+ showOnNode: true
72
+ ---
73
+ 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}`.