@fieldwangai/agentflow 0.1.146 → 0.1.149
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/README.md +7 -0
- package/README.zh-CN.md +6 -0
- package/bin/lib/flow-write.mjs +38 -0
- package/bin/lib/prd-workflow-collaboration.mjs +13 -0
- package/bin/lib/ui-server.mjs +95 -3
- package/builtin/web-ui/dist/assets/{WorkflowAssistantThread-Cb_pn3P2.js → WorkflowAssistantThread-DPbR2UaN.js} +1 -1
- package/builtin/web-ui/dist/assets/{index-DSG5MIRb.js → index-BSCpd5la.js} +134 -134
- package/builtin/web-ui/dist/assets/index-DZ328oSo.css +1 -0
- package/builtin/web-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/skills/agentflow-author-flow/SKILL.md +9 -3
- package/skills/agentflow-cli/SKILL.md +32 -1
- package/skills/agentflow-node-authoring/SKILL.md +57 -0
- package/builtin/web-ui/dist/assets/index-Bsx7D8Av.css +0 -1
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
@keyframes af-app-loading-slide { from { transform: translateX(-115%); } to { transform: translateX(250%); } }
|
|
31
31
|
@media (prefers-reduced-motion: reduce) { .af-app-loading__track span { width: 100%; animation: none; } }
|
|
32
32
|
</style>
|
|
33
|
-
<script type="module" crossorigin src="/assets/index-
|
|
34
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
33
|
+
<script type="module" crossorigin src="/assets/index-BSCpd5la.js"></script>
|
|
34
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DZ328oSo.css">
|
|
35
35
|
</head>
|
|
36
36
|
<body>
|
|
37
37
|
<div id="root">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fieldwangai/agentflow",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.149",
|
|
4
4
|
"description": "Orchestration system for long-running complex agent tasks using Cursor, OpenCode, Claude Code, or Codex as execution backends",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/agentflow.mjs",
|
|
@@ -3,7 +3,13 @@ name: agentflow-author-flow
|
|
|
3
3
|
description: Generate or revise an AgentFlow flow locally from a natural-language request, validate its flow.yaml, open a single-file platform-style preview, and publish it to personal, workspace, or team scope after user confirmation. Use when a user asks Codex, Cursor, Claude Code, or another coding agent to create, draw, preview, sync, upload, or publish an AgentFlow flow without using AI Composer or manually dragging nodes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Author an AgentFlow
|
|
6
|
+
# Author an AgentFlow Flow
|
|
7
|
+
|
|
8
|
+
This skill authors an executable **Flow/Pipeline** (`flow.yaml`). It does not
|
|
9
|
+
create, migrate, archive, or clean up product **Workflows**. A Workflow is the
|
|
10
|
+
TAPD-backed requirement entity addressed by `tapd:<id>` and is handled by
|
|
11
|
+
`agentflow-workflow-report`/`prd-flow` instead. A similar title or flow ID is
|
|
12
|
+
not evidence that the two resources are the same.
|
|
7
13
|
|
|
8
14
|
Turn the user's request into a locally reviewable Flow and handle the commands on their behalf. Do not ask the user to run preview or publish commands.
|
|
9
15
|
|
|
@@ -19,7 +25,7 @@ Read [prompt and handler checks](../../reference/flow-prompt-handler-check.md) w
|
|
|
19
25
|
|
|
20
26
|
## Workflow
|
|
21
27
|
|
|
22
|
-
1. Convert the request into a short node plan. Ask only for a business choice that materially changes behavior; do not ask for YAML details.
|
|
28
|
+
1. Confirm that the user wants an executable Flow/Pipeline, rather than a TAPD Workflow status/record. Convert the request into a short node plan. Ask only for a business choice that materially changes behavior; do not ask for YAML details.
|
|
23
29
|
2. Choose a stable lowercase flow ID using letters, digits, hyphens, or underscores.
|
|
24
30
|
3. Create the draft at `.workspace/agentflow/pipelines/<flow-id>/flow.yaml`. Start from the packaged `builtin/pipelines/new/flow.yaml` when available. Preserve any unrelated workspace files.
|
|
25
31
|
4. Build nodes from authoritative definitions. Never invent `definitionId`, slot order, slot type, handle index, or control semantics. Give every instance a unique position and keep the main path left-to-right.
|
|
@@ -27,7 +33,7 @@ Read [prompt and handler checks](../../reference/flow-prompt-handler-check.md) w
|
|
|
27
33
|
6. Generate and open the static preview with `agentflow flow preview <path-to-flow.yaml>`. In this repository, use `node bin/agentflow.mjs flow preview <path-to-flow.yaml>`. This command must exit after opening the generated `file://` HTML; do not start `agentflow ui` or another server.
|
|
28
34
|
7. Report the draft path and a compact node/edge summary, then wait for the user's visual confirmation. Do not write to the AgentFlow platform before confirmation unless the user explicitly requested direct publish without review.
|
|
29
35
|
8. Ask for `personal`, `workspace`, or `team` only if the user has not already chosen the destination. `team` means a workspace Flow shared as editor with the current account's active team.
|
|
30
|
-
9. Publish through the sibling `agentflow-cli` skill:
|
|
36
|
+
9. Publish through the sibling `agentflow-cli` skill. Publishing a Flow does not publish or update a Workflow:
|
|
31
37
|
|
|
32
38
|
```bash
|
|
33
39
|
node ../agentflow-cli/scripts/agentflow-cli.mjs publish-flow \
|
|
@@ -5,6 +5,23 @@ description: Direct AgentFlow platform operation through a bundled token-backed
|
|
|
5
5
|
|
|
6
6
|
# AgentFlow CLI
|
|
7
7
|
|
|
8
|
+
## Resource boundary: Flow/Pipeline vs Workflow
|
|
9
|
+
|
|
10
|
+
AgentFlow has two different resource families:
|
|
11
|
+
|
|
12
|
+
- **Flow/Pipeline**: an executable node graph backed by `flow.yaml`. The
|
|
13
|
+
`list-flows`, `publish-flow`, `get-graph`, `run`, and schedule commands in
|
|
14
|
+
this skill operate on this family.
|
|
15
|
+
- **Workflow**: a TAPD-derived product/requirement record addressed as
|
|
16
|
+
`tapd:<id>`. It is not a Flow/Pipeline and must be read or changed through
|
|
17
|
+
the `workflow-*` commands and the `agentflow-workflow-report` protocol.
|
|
18
|
+
|
|
19
|
+
Never infer that a Flow with a similar name is the corresponding Workflow.
|
|
20
|
+
Never archive, delete, disable, or replace a Flow as a way to clean up or
|
|
21
|
+
change Workflow data. Before any Flow write, show the exact `flowId`, source,
|
|
22
|
+
and destination; before any Workflow write, resolve the canonical `tapd:<id>`
|
|
23
|
+
reference and follow the Workflow skill's read/merge/concurrency rules.
|
|
24
|
+
|
|
8
25
|
Use this skill when the task is to operate AgentFlow itself from an AI agent. Do not configure or call MCP for this skill. Use the bundled CLI script instead:
|
|
9
26
|
|
|
10
27
|
```bash
|
|
@@ -71,6 +88,20 @@ List flows:
|
|
|
71
88
|
node skills/agentflow-cli/scripts/agentflow-cli.mjs list-flows
|
|
72
89
|
```
|
|
73
90
|
|
|
91
|
+
For local marketplace node authoring, use the packaged AgentFlow CLI (the
|
|
92
|
+
node-authoring workflow is documented in `agentflow-node-authoring`):
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
agentflow marketplace list --json
|
|
96
|
+
agentflow marketplace publish-node ./my-node --json
|
|
97
|
+
agentflow marketplace install-node MyFlow marketplace:my-node@1.0.0 --json
|
|
98
|
+
agentflow validate MyFlow --json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
These commands operate on the local workspace marketplace. They are usable
|
|
102
|
+
after any Agent CLI (Cursor, Codex, Claude Code, or OpenCode) has generated the
|
|
103
|
+
node package; no MCP server is required for publishing.
|
|
104
|
+
|
|
74
105
|
Publish a new local Flow after the user has reviewed it:
|
|
75
106
|
|
|
76
107
|
```bash
|
|
@@ -143,7 +174,7 @@ The only admin write exception is audited version-membership repair. Read its st
|
|
|
143
174
|
## Workflow
|
|
144
175
|
|
|
145
176
|
1. Check token availability with `config`.
|
|
146
|
-
2. Use `list-workspace` or `list-flows` to discover targets. Use `publish-flow` only after a local Flow has passed validation and the user has confirmed the preview.
|
|
177
|
+
2. Use `list-workspace` or `list-flows` to discover Flow/Pipeline targets only. Use `publish-flow` only after a local Flow has passed validation and the user has confirmed the preview.
|
|
147
178
|
3. Use `run` to start the flow. If the task needs the generated page/text, inspect returned `displayOutputs` or call `display-outputs`.
|
|
148
179
|
4. Use `status`, `list-run-by-workspace`, and `logs` when a run is active, failed, or needs debugging.
|
|
149
180
|
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentflow-node-authoring
|
|
3
|
+
description: >-
|
|
4
|
+
使用任意本地 Agent CLI(Cursor、Codex、Claude Code、OpenCode 等)生成、验证、预览、发布和安装 AgentFlow marketplace 节点。用户要求创建可复用节点、把本地节点发布到平台、或将节点安装进 Flow 时使用。
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AgentFlow Node Authoring
|
|
8
|
+
|
|
9
|
+
这是通用的 Skill,不绑定某一种 Agent。当前 Agent 负责生成文件和调用命令;AgentFlow CLI 负责校验、发布、安装和运行验证。
|
|
10
|
+
|
|
11
|
+
## 标准流程
|
|
12
|
+
|
|
13
|
+
1. 先读取 `agentflow-node-reference`,确认输入/输出槽位、handle 顺序和运行类型。
|
|
14
|
+
2. 在当前项目创建一个独立节点包目录,至少包含 `node.yaml`。运行脚本节点还应包含 `scripts/run.mjs`,并在 manifest 的 `runtime.entry` 指向它。
|
|
15
|
+
3. 用当前 Agent CLI 编写实现、README、prompt/implementation 文档和最小测试输入。
|
|
16
|
+
4. 做本地检查:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
agentflow marketplace publish-node <package-dir> --json
|
|
20
|
+
agentflow marketplace list --json
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
`publish-node` 会把包复制到当前 workspace 的 `.workspace/agentflow/marketplace/packages/nodes/<id>/<version>`;发布前应确保 `id`、`version`、`runtime`、`inputs`、`outputs` 完整。
|
|
24
|
+
|
|
25
|
+
5. 将节点安装到 Flow:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
agentflow marketplace install-node <FlowName> marketplace:<id>@<version> --json
|
|
29
|
+
agentflow validate <FlowName> --json
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
6. 启动本地 UI,在节点编辑器或 Flow 画布中确认节点卡片、端口和帮助文案;再用 `agentflow run` 或 UI 运行一个最小样例。
|
|
33
|
+
|
|
34
|
+
## Manifest 约束
|
|
35
|
+
|
|
36
|
+
- `id` 只使用小写字母、数字、`_`、`-`;版本使用完整 semver。
|
|
37
|
+
- `runtime.type` 使用已有 builtin definition(例如 `tool_nodejs` 或 `agent_subAgent`),不要伪造运行时类型。
|
|
38
|
+
- `inputs`/`outputs` 的顺序就是画布 handle 的顺序;新增或调整槽位后必须重新验证 Flow 连线。
|
|
39
|
+
- 每个槽位至少提供 `type` 和 `name`;用户需要填写的槽位设置 `required: true` 和 `showOnNode: true`。
|
|
40
|
+
- 脚本必须是可移植的 Node.js 实现,不要把本机绝对路径或密钥写入包。
|
|
41
|
+
|
|
42
|
+
## 权限与发布范围
|
|
43
|
+
|
|
44
|
+
- `marketplace publish-node` 是本地 workspace 市场发布,不等于 npm 或 Hub 发布。
|
|
45
|
+
- 普通用户只能覆盖自己拥有的同名节点;管理员可以治理所有者节点。
|
|
46
|
+
- 需要分享给团队时,发布到团队约定的 workspace 或由管理员安装;不要直接把测试包放进 `builtin/nodes`。
|
|
47
|
+
|
|
48
|
+
## Agent CLI 配合
|
|
49
|
+
|
|
50
|
+
Agent 可以使用自己擅长的 CLI 生成和修改节点;不要求调用 MCP。完成文件后统一通过 `agentflow` CLI 做确定性操作:
|
|
51
|
+
|
|
52
|
+
- `marketplace publish-node`:发布本地节点包
|
|
53
|
+
- `marketplace list`:确认节点版本和目录
|
|
54
|
+
- `marketplace install-node`:写入 Flow 的 marketplace 依赖
|
|
55
|
+
- `validate` / `run`:验证和执行
|
|
56
|
+
|
|
57
|
+
若 AgentFlow CLI 不在 PATH,可使用项目入口:`node bin/agentflow.mjs marketplace ...`。
|