@fieldwangai/agentflow 0.1.79 → 0.1.81
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/locales/en.json +4 -4
- package/bin/lib/locales/zh.json +4 -4
- package/bin/lib/ui-server.mjs +16 -2
- package/builtin/nodes/tool_display_share_link.md +6 -6
- package/builtin/nodes/tool_wecom_send_app_markdown.md +3 -3
- package/builtin/nodes/tool_wecom_send_group_markdown.md +2 -2
- package/builtin/web-ui/dist/assets/index-CVdxKCZm.css +1 -0
- package/builtin/web-ui/dist/assets/index-DCmFClSj.js +297 -0
- package/builtin/web-ui/dist/index.html +2 -2
- package/package.json +1 -1
- package/builtin/web-ui/dist/assets/index-C7Z_ECuU.css +0 -1
- package/builtin/web-ui/dist/assets/index-CWUR5Ocs.js +0 -297
package/bin/lib/locales/en.json
CHANGED
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
"description": "Create or reuse a GitLab merge request for the current branch and output its URL"
|
|
291
291
|
},
|
|
292
292
|
"tool_wecom_send_group_markdown": {
|
|
293
|
-
"displayName": "WeCom Group Markdown",
|
|
294
|
-
"description": "Send a Markdown message through a WeCom group robot webhook"
|
|
293
|
+
"displayName": "WeCom Group Chat Markdown",
|
|
294
|
+
"description": "Send a Markdown message to a group chat through a WeCom group robot webhook"
|
|
295
295
|
},
|
|
296
296
|
"tool_wecom_send_app_markdown": {
|
|
297
|
-
"displayName": "WeCom
|
|
298
|
-
"description": "Send a Markdown message to users through a WeCom enterprise application"
|
|
297
|
+
"displayName": "WeCom Direct Markdown",
|
|
298
|
+
"description": "Send a Markdown message to one or more users through a WeCom enterprise application"
|
|
299
299
|
},
|
|
300
300
|
"tool_display_share_link": {
|
|
301
301
|
"displayName": "Display Share Link",
|
package/bin/lib/locales/zh.json
CHANGED
|
@@ -290,12 +290,12 @@
|
|
|
290
290
|
"description": "为当前分支创建或复用 GitLab Merge Request,并输出 MR 链接"
|
|
291
291
|
},
|
|
292
292
|
"tool_wecom_send_group_markdown": {
|
|
293
|
-
"displayName": "
|
|
294
|
-
"description": "通过企业微信群机器人 webhook 发送 Markdown
|
|
293
|
+
"displayName": "企业微信群聊 Markdown",
|
|
294
|
+
"description": "通过企业微信群机器人 webhook 发送 Markdown 到群聊"
|
|
295
295
|
},
|
|
296
296
|
"tool_wecom_send_app_markdown": {
|
|
297
|
-
"displayName": "
|
|
298
|
-
"description": "通过企业微信应用消息接口发送 Markdown
|
|
297
|
+
"displayName": "企业微信个人 Markdown",
|
|
298
|
+
"description": "通过企业微信应用消息接口发送 Markdown 给个人或多个用户"
|
|
299
299
|
},
|
|
300
300
|
"tool_display_share_link": {
|
|
301
301
|
"displayName": "展示分享链接",
|
package/bin/lib/ui-server.mjs
CHANGED
|
@@ -2029,6 +2029,17 @@ function displayShareOutputUrl(shareId, baseUrl = "") {
|
|
|
2029
2029
|
}
|
|
2030
2030
|
}
|
|
2031
2031
|
|
|
2032
|
+
function requestPublicBaseUrl(req) {
|
|
2033
|
+
const origin = String(req?.headers?.origin || "").trim();
|
|
2034
|
+
if (/^https?:\/\//i.test(origin)) return origin;
|
|
2035
|
+
const forwardedHost = String(req?.headers?.["x-forwarded-host"] || "").split(",")[0].trim();
|
|
2036
|
+
const host = forwardedHost || String(req?.headers?.host || "").trim();
|
|
2037
|
+
if (!host) return "";
|
|
2038
|
+
const forwardedProto = String(req?.headers?.["x-forwarded-proto"] || "").split(",")[0].trim();
|
|
2039
|
+
const proto = /^https?$/i.test(forwardedProto) ? forwardedProto.toLowerCase() : "http";
|
|
2040
|
+
return `${proto}://${host}`;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2032
2043
|
function normalizeRunEnvKey(key) {
|
|
2033
2044
|
const text = String(key || "").trim();
|
|
2034
2045
|
return /^[A-Za-z_][A-Za-z0-9_]*$/.test(text) ? text : "";
|
|
@@ -5074,6 +5085,8 @@ async function runWorkspaceGraph(root, scopedRoot, payload, userCtx = {}, opts =
|
|
|
5074
5085
|
env.AGENTFLOW_PUBLIC_BASE_URL ||
|
|
5075
5086
|
env.AGENTFLOW_BASE_URL ||
|
|
5076
5087
|
env.PUBLIC_BASE_URL ||
|
|
5088
|
+
payload.requestBaseUrl ||
|
|
5089
|
+
payload.requestOrigin ||
|
|
5077
5090
|
"";
|
|
5078
5091
|
|
|
5079
5092
|
const graphPath = workspaceGraphPath(scopedRoot);
|
|
@@ -6787,6 +6800,7 @@ export function startUiServer({
|
|
|
6787
6800
|
};
|
|
6788
6801
|
if (wantsStream) {
|
|
6789
6802
|
const graphPath = workspaceGraphPath(scoped.root);
|
|
6803
|
+
const runPayload = { ...payload, requestBaseUrl: requestPublicBaseUrl(req) };
|
|
6790
6804
|
res.writeHead(200, {
|
|
6791
6805
|
"Content-Type": "application/x-ndjson; charset=utf-8",
|
|
6792
6806
|
"Cache-Control": "no-cache",
|
|
@@ -6796,7 +6810,7 @@ export function startUiServer({
|
|
|
6796
6810
|
try { res.write(JSON.stringify(event) + "\n"); } catch (_) {}
|
|
6797
6811
|
};
|
|
6798
6812
|
try {
|
|
6799
|
-
const result = await runWorkspaceGraph(root, scoped.root,
|
|
6813
|
+
const result = await runWorkspaceGraph(root, scoped.root, runPayload, userCtx, {
|
|
6800
6814
|
onEvent: writeEvent,
|
|
6801
6815
|
signal: controller.signal,
|
|
6802
6816
|
onActiveChild: setActiveChild,
|
|
@@ -6835,7 +6849,7 @@ export function startUiServer({
|
|
|
6835
6849
|
return;
|
|
6836
6850
|
}
|
|
6837
6851
|
try {
|
|
6838
|
-
const result = await runWorkspaceGraph(root, scoped.root, payload, userCtx, {
|
|
6852
|
+
const result = await runWorkspaceGraph(root, scoped.root, { ...payload, requestBaseUrl: requestPublicBaseUrl(req) }, userCtx, {
|
|
6839
6853
|
signal: controller.signal,
|
|
6840
6854
|
onActiveChild: setActiveChild,
|
|
6841
6855
|
});
|
|
@@ -9,22 +9,22 @@ input:
|
|
|
9
9
|
- type: text
|
|
10
10
|
name: title
|
|
11
11
|
default: ""
|
|
12
|
-
description: "
|
|
12
|
+
description: "可选。分享页标题;只影响打开分享页后的页面标题,不影响输出 URL。为空时使用 AgentFlow Display。"
|
|
13
13
|
showOnNode: true
|
|
14
14
|
- type: text
|
|
15
15
|
name: layout
|
|
16
16
|
default: "single"
|
|
17
|
-
description: "
|
|
18
|
-
showOnNode:
|
|
17
|
+
description: "可选。分享页布局:single、gallery、slides、document、canvas。通常保持默认 single。"
|
|
18
|
+
showOnNode: false
|
|
19
19
|
- type: text
|
|
20
20
|
name: nodeIds
|
|
21
21
|
default: ""
|
|
22
|
-
description: "可选。逗号或空格分隔的 Display 节点 ID
|
|
22
|
+
description: "可选。逗号或空格分隔的 Display 节点 ID;为空时自动分享连接到本节点的上游 Display 节点。"
|
|
23
23
|
showOnNode: false
|
|
24
24
|
- type: text
|
|
25
25
|
name: baseUrl
|
|
26
26
|
default: ""
|
|
27
|
-
description: "
|
|
27
|
+
description: "可选。分享站点地址,例如 https://agentflow.example.com;为空时优先使用环境变量,其次使用当前访问地址。"
|
|
28
28
|
showOnNode: false
|
|
29
29
|
output:
|
|
30
30
|
- type: node
|
|
@@ -43,4 +43,4 @@ output:
|
|
|
43
43
|
default: ""
|
|
44
44
|
showOnNode: false
|
|
45
45
|
---
|
|
46
|
-
Create a share link for connected Display nodes.
|
|
46
|
+
Create a share link for connected Display nodes. Connect a Display node to this node, optionally set title, and use the url output.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
# Built-in node: WeCom
|
|
2
|
+
# Built-in node: WeCom direct markdown message
|
|
3
3
|
description: Send Markdown message to WeCom users through an enterprise application
|
|
4
|
-
displayName: WeCom
|
|
4
|
+
displayName: WeCom Direct Markdown
|
|
5
5
|
input:
|
|
6
6
|
- type: node
|
|
7
7
|
name: prev
|
|
@@ -51,6 +51,6 @@ output:
|
|
|
51
51
|
default: ""
|
|
52
52
|
showOnNode: false
|
|
53
53
|
---
|
|
54
|
-
Send `${markdown}` to `${toUser}` using a WeCom enterprise application.
|
|
54
|
+
Send `${markdown}` to one or more WeCom users (`${toUser}`) using a WeCom enterprise application.
|
|
55
55
|
|
|
56
56
|
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.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
# Built-in node: WeCom group robot markdown message
|
|
3
3
|
description: Send Markdown message to a WeCom group robot webhook
|
|
4
|
-
displayName: WeCom Group Markdown
|
|
4
|
+
displayName: WeCom Group Chat Markdown
|
|
5
5
|
input:
|
|
6
6
|
- type: node
|
|
7
7
|
name: prev
|
|
@@ -39,6 +39,6 @@ output:
|
|
|
39
39
|
default: ""
|
|
40
40
|
showOnNode: false
|
|
41
41
|
---
|
|
42
|
-
Send `${markdown}` to a WeCom group robot.
|
|
42
|
+
Send `${markdown}` to a WeCom group chat through a group robot webhook.
|
|
43
43
|
|
|
44
44
|
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.
|