@tea-agent/loop-agent 0.28.12-beta.1 → 0.28.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +46 -1
- package/README.md +3 -1
- package/dist/application/task-lifecycle/advance.js +21 -4
- package/dist/application/task-lifecycle/plan-transitions.js +17 -5
- package/dist/commands/import-prd.js +1 -1
- package/dist/commands/init.js +2 -2
- package/dist/shared/operator/capabilities.js +21 -0
- package/dist/worker/console/operator-actions.js +11 -0
- package/dist/worker/scheduler/cli.js +110 -5
- package/dist/worker/scheduler/clock-install/darwin-launchd.js +238 -0
- package/dist/worker/scheduler/clock-install/linux-systemd-user.js +224 -0
- package/dist/worker/scheduler/clock-install/types.js +1 -0
- package/dist/worker/scheduler/clock-install/win32-schtasks.js +172 -0
- package/dist/worker/scheduler/clock-install.js +284 -0
- package/dist/worker/scheduler/clock.js +420 -0
- package/dist/worker/scheduler/doctor.js +86 -1
- package/dist/worker/scheduler/index.js +2 -0
- package/dist/worker/scheduler/morning-window.js +31 -1
- package/dist/worker/scheduler/paths.js +8 -0
- package/docs/templates/init-managed-agents.md +3 -1
- package/package.json +1 -1
- package/skills/loop-agent/SKILL.md +3 -1
- package/skills/loop-agent/references/command-reference.md +9 -4
- package/skills/loop-agent/references/harness-policy.md +3 -1
|
@@ -42,7 +42,7 @@ loop-agent doctor
|
|
|
42
42
|
--accept-recommendations DIGEST \
|
|
43
43
|
--allowed-path "src/**" \
|
|
44
44
|
--forbidden-path ".harness/**" \
|
|
45
|
-
--verify "
|
|
45
|
+
--verify "<label>:<command>" \
|
|
46
46
|
--json
|
|
47
47
|
|
|
48
48
|
# 审查 gate.writeSet / gate.digest 后
|
|
@@ -55,6 +55,8 @@ loop-agent doctor
|
|
|
55
55
|
loop-agent plan complete PLAN_ID --summary "..."
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
`--verify` 命令应取项目 `AGENTS.md` / `docs/governance/verification-matrix.md` 登记的验证命令(不要假定 `npm run typecheck` 存在);`--verify` 可选,省略时自动从 package.json scripts 或既有 managed `task.json.verifyCommands` 推导建议。
|
|
59
|
+
|
|
58
60
|
首次 `task advance` 内部完成 create、PRD 归档、managed contract 投影、DAG 生成与 strict validate,并停在 writeSet gate;批准后同一命令长跑到稳定终态并做确定性 promotion/closeout。决策表与反模式见 `source-and-plan-practice.md`。
|
|
59
61
|
2. **Operator 工具**,用于 recovery、诊断、评测重放:
|
|
60
62
|
|
|
@@ -166,7 +168,7 @@ loop-agent examples copy <name> --output examples/<name>
|
|
|
166
168
|
loop-agent task advance <task-id> "Task Title" \
|
|
167
169
|
--prd path/to-prd.md \
|
|
168
170
|
--allowed-path "src/**" \
|
|
169
|
-
--verify "
|
|
171
|
+
--verify "<label>:<command>" \
|
|
170
172
|
--json
|
|
171
173
|
loop-agent task advance <task-id> --approve-gate "write-set-review:<digest>" --json
|
|
172
174
|
loop-agent task status <task-id> --json
|
|
@@ -218,7 +220,7 @@ loop-agent task advance <task-id> "标题" \
|
|
|
218
220
|
--prd <path-to-original-prd.md> \
|
|
219
221
|
--allowed-path "<glob>" \
|
|
220
222
|
--forbidden-path ".harness/**" \
|
|
221
|
-
--verify "
|
|
223
|
+
--verify "<label>:<command>" \
|
|
222
224
|
--json
|
|
223
225
|
```
|
|
224
226
|
|
|
@@ -566,6 +568,9 @@ agent-worker scheduler cancel <schedule-id> --repo <repo-root> [--reason <text>]
|
|
|
566
568
|
agent-worker scheduler harvest <schedule-id> --repo <repo-root> [--json]
|
|
567
569
|
agent-worker scheduler discard <schedule-id> --repo <repo-root> --reason <text> [--force] [--json]
|
|
568
570
|
agent-worker scheduler tick --repo <repo-root> [--json] # daemon/clock; not Operator Chat
|
|
571
|
+
agent-worker scheduler clock install --repo <repo-root> [--interval-sec 60] [--loop-agent-bin <path>] [--json] # OS timer; CLI-only
|
|
572
|
+
agent-worker scheduler clock status --repo <repo-root> [--json] # CLI-only
|
|
573
|
+
agent-worker scheduler clock uninstall --repo <repo-root> [--json] # CLI-only
|
|
569
574
|
agent-worker scheduler submit --repo <repo-root> --feature-id <id> --task-id <id> ... # low-level planning fact
|
|
570
575
|
agent-worker scheduler transition <schedule-id> --repo <repo-root> --to <status> ... # internal lifecycle
|
|
571
576
|
agent-worker console [--repo <repo-root>] [--port 8790] [--host 127.0.0.1] # Official 裸入口;repo 默认当前目录
|
|
@@ -596,7 +601,7 @@ agent-worker observe snapshot --repo <repo-root> # 输出 GlobalSnapshot JSON
|
|
|
596
601
|
- `task draft-followup` 会按全部 failure category 生成 TaskDraft 或人工行动卡:ProductBug/TestBug/FlakyTest/DependencyFailure 可批准;EnvFailure 连续两次后才生成 ENV-CHECK;Spec/Contract/Risk/Human/Unknown 只给行动卡。人工以 `feature approve-followup --dry-run` 预览,再带非空 `--owner` 批准 TaskDraft;行动卡不能批准。批准在 staging validation 后写 TaskSpec、graph、Ready/approval/event,原失败事实不改写,并有 rename/state/approval/index/event 回滚门禁。
|
|
597
602
|
- `task retry` 是失败 Task 的唯一重试入口。它会保留原有运行记录和 failure handoff,并让下一次 `batch run-ready` 使用新的 `workerRunId`;不要删除运行态文件或手动修改状态来重试。
|
|
598
603
|
- **推荐**裸入口 `agent-worker console`(repo 默认当前目录,默认 `127.0.0.1:8790`)提供 Operate + Inspect;`console serve` 是等价兼容入口。Inspect 路径为 `/inspect/#/...`,API 仍为根 `/api/**`。`observe serve` 为兼容入口(默认 `8787`,启动时 stderr 输出 `OBSERVE_SERVE_DEPRECATED`);`observe snapshot` 保留。Inspect/Observe 本身不会启动、暂停或重试 Task / Worker / DAG。
|
|
599
|
-
- Night Scheduler(本地夜间自治):白天 `admission prepare` 冻结 worktree + DAG writeSet gate;`scheduler add` 消费 gate 并预约 Task Pool `Queued`(不立即执行);`scheduler
|
|
604
|
+
- Night Scheduler(本地夜间自治):白天 `admission prepare` 冻结 worktree + DAG writeSet gate;`scheduler add` 消费 gate 并预约 Task Pool `Queued`(不立即执行);`scheduler clock install` 安装本机 user-level OS timer(launchd / systemd --user / schtasks)周期调用 `scheduler tick`;tick 写统一 Clock receipt,doctor/morning/status 可解释 missing/stale/error/busy/drift;成功后 `pending-harvest`,早晨 `scheduler harvest`(exact-base FF)或 `scheduler discard`;`report morning --window night` 与 Inspect `#/night` / Operate 夜间面板读取同一套 facts。Clock install/status/uninstall 为 CLI-only。
|
|
600
605
|
- 当前 Worker 仍是 v0(库 + CLI + dogfood);日间批处理未强制定时/CI 驱动;`report morning` 默认可从 Task Pool runs 汇总,并支持 `--window night` 投影 Scheduler facts。
|
|
601
606
|
|
|
602
607
|
### 查看 duration statistics / context usage
|
|
@@ -57,7 +57,7 @@ Minimum governed path:
|
|
|
57
57
|
loop-agent task advance <task-id> "Task Title" \
|
|
58
58
|
--prd <path-to-original-prd.md> \
|
|
59
59
|
--allowed-path "<glob>" \
|
|
60
|
-
--verify "
|
|
60
|
+
--verify "<label>:<command>" \
|
|
61
61
|
--json \
|
|
62
62
|
[--repo-root <target-repo>]
|
|
63
63
|
|
|
@@ -70,6 +70,8 @@ loop-agent task advance <task-id> \
|
|
|
70
70
|
loop-agent task status <task-id> --json [--repo-root <target-repo>]
|
|
71
71
|
```
|
|
72
72
|
|
|
73
|
+
The `--verify` command should reference verification commands registered in the project's `AGENTS.md` or its governance verification-matrix.md; do not assume `npm run typecheck` exists. `--verify` is optional; when omitted, suggestions are auto-derived from `package.json` scripts or existing managed `task.json.verifyCommands`.
|
|
74
|
+
|
|
73
75
|
`loop-agent` is the preferred global CLI. For self-hosting loop-agent development, the controller must be an installed npm-published package. Use `npm install -g @tea-agent/loop-agent@latest` for first install or intentional upgrades, then treat the installed version as frozen for the current task and record `npm list -g @tea-agent/loop-agent --depth=0`. Do not repeatedly fetch `npx @latest` inside DAG nodes, and do not use the current working tree's `npm link` or `npm run dev` to control tasks that may edit CLI, DAG runtime, executors, package metadata, or build output. Use `npm run dev -- <args>` only for source debugging and focused CLI development.
|
|
74
76
|
|
|
75
77
|
The npm package carries static capability assets: `skills/` (bundled in-package, containing `loop-agent` and `agent-worker`; `loop-agent init` mirrors them into the target project's `.agents/skills/`), `docs/templates/`, `docs/architecture/`, `docs/skills/`, `examples/`, `harness.json`, `AGENTS.md`, `README.md`, and `CHANGELOG.md`. `loop-agent init` creates `ai_workspace/loop-agent/` (the default governanceRoot) in the target project with `progress/`, `reports/`, `exec-plans/`, and `decisions/` directories plus their README files; the actual files under those directories belong to the target repository and are not shipped by the npm package.
|