原计划建进共享 muse-dify 遇两阻塞:①muse 锁单工作区+create-tenant 抛错 ②HTTP 节点经 ssrf_proxy 打内网 worker 被 deny to_private_networks 拦(muse→:9501 实测403)。 创始人拍板给 game 单起隔离实例:独立 compose(game-dify)+错开端口(28080/28443/25003) +独立卷+新 SECRET_KEY,自有 ssrf 模板放行 gen worker,muse 零受扰(仍403)。 导入 DSL(0.1.5→0.6.0迁移完好)+发布+真跑:HTTP节点succeeded/worker返202/ worker日志'受理(202) userToken=<none>全局key回落'。凭据档回写 game-dify 端点+登录+ headless token 签发法(RSA/CSRF 绕过)。spike README/DSL 更新为已验证态。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
93 lines
3.2 KiB
YAML
93 lines
3.2 KiB
YAML
# dify workflow DSL —— 内测「游戏开发节点」形态 A / a-min
|
|
# ✅ 已验证:2026-07-08 真导入进 game 专属 dify(:28080)并发布跑通,HTTP 节点返 202。
|
|
# 导入时 dify 从本 DSL 版 0.1.5 迁到现版 0.6.0,三节点与 HTTP 节点 URL/body/超时全部完好。
|
|
# 前提(见 docs/内网凭据与端点.md「game 专属 dify 实例」段):
|
|
# ① 目标 IP 100.64.0.7 需与 dev worker 实际所在机一致(迁机同步改此处 + game ssrf 模板 gen_worker 放行);
|
|
# ② game ssrf_proxy 已放行该内网端点,否则节点跑出来是 403。
|
|
# 手搭/核对照 README「HTTP 游戏开发节点配置」一节。
|
|
app:
|
|
name: 游戏开发节点-形态A
|
|
description: 内测·把一句话创意组 §6.1 job 直连 cheap-worker :9501/generate,由 agentscope 生成小游戏(a-min:无 userToken、无回调,产物落 worker game_dir)
|
|
icon: "🎮"
|
|
icon_background: "#FFEAD5"
|
|
mode: workflow
|
|
use_icon_as_answer_icon: false
|
|
kind: app
|
|
version: 0.1.5
|
|
workflow:
|
|
conversation_variables: []
|
|
environment_variables: []
|
|
features: {}
|
|
graph:
|
|
edges:
|
|
- id: start-to-http
|
|
source: startNode
|
|
target: gameDevNode
|
|
sourceHandle: source
|
|
targetHandle: target
|
|
type: custom
|
|
- id: http-to-end
|
|
source: gameDevNode
|
|
target: endNode
|
|
sourceHandle: source
|
|
targetHandle: target
|
|
type: custom
|
|
nodes:
|
|
- id: startNode
|
|
type: custom
|
|
position: { x: 80, y: 240 }
|
|
data:
|
|
type: start
|
|
title: 开始
|
|
variables:
|
|
- variable: brief
|
|
label: 一句话创意
|
|
type: paragraph
|
|
required: true
|
|
max_length: 1000
|
|
- id: gameDevNode
|
|
type: custom
|
|
position: { x: 400, y: 240 }
|
|
data:
|
|
type: http-request
|
|
title: 游戏开发节点
|
|
desc: 组 §6.1 job POST 给 cheap-worker :9501/generate(握手级超时,只等 202)
|
|
method: post
|
|
url: http://100.64.0.7:9501/generate
|
|
authorization:
|
|
type: no-auth
|
|
config: null
|
|
headers: "Content-Type:application/json"
|
|
params: ""
|
|
body:
|
|
type: json
|
|
data: |
|
|
{
|
|
"job_id": "dify-{{#sys.workflow_run_id#}}",
|
|
"traceId": "dify-{{#sys.workflow_run_id#}}",
|
|
"tier": "cheap",
|
|
"kind": "generate",
|
|
"templateId": "generic",
|
|
"brief": "{{#start.brief#}}",
|
|
"model": "MiniMax-M2.7",
|
|
"gameId": "dify-{{#sys.workflow_run_id#}}",
|
|
"budget": { "maxYuan": 0.15, "maxLlmCalls": 8 },
|
|
"idempotency_key": "dify-{{#sys.workflow_run_id#}}",
|
|
"deadline_ms": 600000
|
|
}
|
|
timeout:
|
|
max_connect_timeout: 5
|
|
max_read_timeout: 10
|
|
max_write_timeout: 10
|
|
- id: endNode
|
|
type: custom
|
|
position: { x: 720, y: 240 }
|
|
data:
|
|
type: end
|
|
title: 结束
|
|
outputs:
|
|
- variable: accept_status
|
|
value_selector: [gameDevNode, status_code]
|
|
- variable: accept_body
|
|
value_selector: [gameDevNode, body]
|