style: 项目重构

1.项目改名为kilostar(千星)
2.后端部分进行大规模重构
3.node功能进行大规模重新设计
This commit is contained in:
2026-05-11 15:29:16 +00:00
parent 2d8571dee3
commit ee9bbbf676
134 changed files with 2190 additions and 2503 deletions
+13 -13
View File
@@ -1,7 +1,7 @@
import pytest
from pretor.core.workflow.workflow import (
from kilostar.core.workflow_running_engine.workflow import (
WorkStep,
PretorWorkflow,
kilostarWorkflow,
WorkflowStatus,
LogicGate,
)
@@ -23,10 +23,10 @@ def test_work_step():
assert ws.status == "waiting"
def test_pretor_workflow_validation_success():
def test_kilostar_workflow_validation_success():
ws1 = WorkStep(step=1, name="s1", node="control_node", action="a1", desc="d1")
ws2 = WorkStep(step=2, name="s2", node="supervisory_node", action="a2", desc="d2")
wf = PretorWorkflow(
ws2 = WorkStep(step=2, name="s2", node="regulatory_node", action="a2", desc="d2")
wf = kilostarWorkflow(
title="wf1",
work_link=[ws1, ws2],
trace_id="t",
@@ -35,11 +35,11 @@ def test_pretor_workflow_validation_success():
assert wf.title == "wf1"
def test_pretor_workflow_validation_error_step_discontinuous():
def test_kilostar_workflow_validation_error_step_discontinuous():
ws1 = WorkStep(step=1, name="s1", node="control_node", action="a1", desc="d1")
ws2 = WorkStep(step=3, name="s3", node="supervisory_node", action="a2", desc="d2")
ws2 = WorkStep(step=3, name="s3", node="regulatory_node", action="a2", desc="d2")
with pytest.raises(ValueError, match="工作链步数不连续"):
PretorWorkflow(
kilostarWorkflow(
title="wf1",
work_link=[ws1, ws2],
trace_id="t",
@@ -47,14 +47,14 @@ def test_pretor_workflow_validation_error_step_discontinuous():
)
def test_pretor_workflow_validation_error_jump_out_of_bounds():
def test_kilostar_workflow_validation_error_jump_out_of_bounds():
lg = LogicGate(if_fail="jump_to_step_3", if_pass="continue")
ws1 = WorkStep(
step=1, name="s1", node="control_node", action="a1", desc="d1", logic_gate=lg
)
ws2 = WorkStep(step=2, name="s2", node="supervisory_node", action="a2", desc="d2")
ws2 = WorkStep(step=2, name="s2", node="regulatory_node", action="a2", desc="d2")
with pytest.raises(ValueError, match="跳转目标 Step 3 越界了"):
PretorWorkflow(
kilostarWorkflow(
title="wf1",
work_link=[ws1, ws2],
trace_id="t",
@@ -62,13 +62,13 @@ def test_pretor_workflow_validation_error_jump_out_of_bounds():
)
def test_pretor_workflow_validation_error_jump_format_error():
def test_kilostar_workflow_validation_error_jump_format_error():
lg = LogicGate(if_fail="jump_to_step_invalid", if_pass="continue")
ws1 = WorkStep(
step=1, name="s1", node="control_node", action="a1", desc="d1", logic_gate=lg
)
with pytest.raises(ValueError, match="LogicGate 格式错误"):
PretorWorkflow(
kilostarWorkflow(
title="wf1",
work_link=[ws1],
trace_id="t",