# =============================================================
# 5. TOPOLOGY (拓扑逻辑)
# 引用资源契约,编排 AI Native 业务流转状态机
# =============================================================
topology:
start_at: "node_validate"
nodes:
# 节点 1: 逻辑校验门
- id: "node_validate"
type: "LOGIC_GATE"
rules:
- { condition: "inputs.target_asin.length == 10", next: "call_market_skill" }
- { condition: "default", next: "terminate_error" }
# 节点 2: 执行技能(引用 Skills 域)
- id: "call_market_skill"
type: "SKILL_CALL"
config:
skill_ref: "amazon_realtime_data"
on_success: "node_ai_reasoning"
on_failure: "node_retry_logic"
# 节点 3: AI 推理(挂载 Knowledge 域)
- id: "node_ai_reasoning"
type: "AI_TASK"
config:
model: "gemini-2.0-flash"
knowledge_ref: "internal_market_trends"
prompt: |
结合知识库背景及实时数据 {{steps.call_market_skill.output}},
深度评估 ASIN {{inputs.target_asin}} 的市场机会。
on_success: "node_expert_hitl"
# 节点 4: HITL 人工审批(专家确权)
- id: "node_expert_hitl"
type: "HITL"
config:
assignee: "{{manifest.creator.me_id}}"
instruction: "AI 已完成逻辑推理,请针对 ROI 预测完成最终业务授权。"
ui_snapshot:
- "steps.node_ai_reasoning.output"
- "steps.call_market_skill.output.price"
on_success: "node_terminus"
# 节点 5: 逻辑终点
- id: "node_terminus"
type: "TERMINUS"
config:
artifact_ref: "selection_report_data"
data_source: "steps.node_ai_reasoning.output"