新增:ekb agent rules 命令,列出企业所有审核规则
- api/agent.py 增加 list_rules / save_rule / update_rule 封装 - 新增 commands/agent/rule_list.py,支持 --full 展开截断字段 - 注册 rules 子命令,更新命令树和 CLAUDE.md API 路径
This commit is contained in:
1 parent
468b13437a
commit
fd41415d83
5 files changed
+95
-5
No files matched your search
@@ -13,3 +13,17 @@ def get_agent(client: EkbClient, agent_id: str) -> dict:
|
||||
|
||||
def save_agent(client: EkbClient, payload: dict) -> dict:
|
||||
return client.post("/engine/hab/agent/save", payload)
|
||||
|
||||
|
||||
def list_rules(client: EkbClient, page: int = 1, size: int = 1000) -> dict:
|
||||
return client.get("/engine/hab/agent/rule/list", page=page, size=size)
|
||||
|
||||
|
||||
def save_rule(client: EkbClient, payload: dict) -> dict:
|
||||
"""新建规则:payload 包含 purpose / description / level"""
|
||||
return client.post("/engine/hab/agent/rule/save", payload)
|
||||
|
||||
|
||||
def update_rule(client: EkbClient, payload: dict) -> dict:
|
||||
"""更新规则:payload 包含 id / code / purpose / description / level"""
|
||||
return client.post("/engine/hab/agent/rule/update", payload)
|
||||
Reference in new issue
Block a user