feat(constraints): 操作约束抽取→注入 planner/worker 提示→总览管理
- 新表 task_constraints(allow/deny),CREATE TABLE IF NOT EXISTS 无需迁移 - 新工具 set_constraints:目标拆解器 round-0 先抽约束再拆目标、主 agent 运行时可补; 拆解器提示词要求约束自包含(把「当前目标」等指代替换成具体域名/端口) - constraintBlock 按最高优先级注入 planner+worker 系统提示;去偏:多样性/拓面显式服从约束 - 注入范围可配置(constraints_inject_planner/worker,默认都开,每轮读、即时生效) - 总览「约束管理」卡片 + CRUD 接口(增删改不通知 planner,下轮规划自然读到) - goals 提示词把抽约束步并入可编辑正文;旧库经 flag 守卫的一次性 reseed 追加新默认版本
This commit is contained in:
1 parent
d8f34cc79d
commit
27c3248844
19 files changed
+820
-15
No files matched your search
@@ -208,6 +208,15 @@ func goalDTOs(in []*db.Node) []GoalDTO {
|
||||
return out
|
||||
}
|
||||
|
||||
// ConstraintDTO is one operation constraint (allow/deny) for the 总览「约束管理」UI.
|
||||
type ConstraintDTO struct {
|
||||
ID string `json:"id"`
|
||||
Kind string `json:"kind"` // allow | deny
|
||||
Text string `json:"text"`
|
||||
Origin string `json:"origin,omitempty"`
|
||||
TS string `json:"ts,omitempty"`
|
||||
}
|
||||
|
||||
func taskNodeDTOs(in []*db.Node) []TaskNodeDTO {
|
||||
out := make([]TaskNodeDTO, 0, len(in))
|
||||
for _, n := range in {
|
||||
|
||||
Reference in new issue
Block a user