@hasna/loops 0.3.50 → 0.3.52
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/README.md +20 -3
- package/dist/cli/index.js +369 -38
- package/dist/daemon/index.js +2 -2
- package/dist/index.js +333 -27
- package/dist/lib/store.js +1 -1
- package/dist/lib/templates.d.ts +13 -0
- package/dist/sdk/index.js +1 -1
- package/docs/USAGE.md +22 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -306,9 +306,11 @@ loops templates create-workflow custom-report \
|
|
|
306
306
|
Use `--source builtin`, `--source custom`, or `--source all` on
|
|
307
307
|
`list`, `show`, `render`, and `create-workflow` when automation needs an
|
|
308
308
|
explicit source. Custom template ids and names cannot override built-ins.
|
|
309
|
-
Custom templates fail closed for `danger-full-access
|
|
310
|
-
|
|
311
|
-
|
|
309
|
+
Custom templates fail closed for `danger-full-access`, dangerous passthrough
|
|
310
|
+
arguments, and implicit Codewith/Codex full-access defaults. If a custom
|
|
311
|
+
Codewith/Codex template uses `permissionMode: "bypass"`, it must also set
|
|
312
|
+
`sandbox` to `workspace-write` or `read-only`. Use built-in templates with
|
|
313
|
+
explicit break-glass handling for emergency workflows that need full access.
|
|
312
314
|
|
|
313
315
|
For event-driven task automation, `loops events handle todos-task` reads a
|
|
314
316
|
Hasna event envelope from stdin or `HASNA_EVENT_JSON`, records a
|
|
@@ -317,6 +319,7 @@ into a deduped one-shot workflow loop when route capacity allows:
|
|
|
317
319
|
|
|
318
320
|
```bash
|
|
319
321
|
cat task-created-event.json | loops events handle todos-task \
|
|
322
|
+
--template task-lifecycle \
|
|
320
323
|
--provider codewith \
|
|
321
324
|
--auth-profile-pool account004,account005,account006 \
|
|
322
325
|
--permission-mode bypass \
|
|
@@ -326,6 +329,19 @@ cat task-created-event.json | loops events handle todos-task \
|
|
|
326
329
|
--worktree-mode required
|
|
327
330
|
```
|
|
328
331
|
|
|
332
|
+
By default, `todos-task` routes use `todos-task-worker-verifier` for backwards
|
|
333
|
+
compatibility. Use `--template task-lifecycle` to run the full triage ->
|
|
334
|
+
planner -> worker -> verifier lifecycle. The route rejects unrelated templates
|
|
335
|
+
such as `pr-review` so a todos task cannot accidentally use the wrong contract.
|
|
336
|
+
The lifecycle template adds deterministic gates after triage and planning. If
|
|
337
|
+
either step marks the task blocked, omits its contextual
|
|
338
|
+
`openloops:triage=go task=<id> event=<event-id>` /
|
|
339
|
+
`openloops:planner=go task=<id> event=<event-id>` marker comment, or the task
|
|
340
|
+
is no-auto/manual/approval-required, the worker step is not started. Use
|
|
341
|
+
`--triage-auth-profile`, `--planner-auth-profile`, `--worker-auth-profile`, and
|
|
342
|
+
`--verifier-auth-profile` when exact Codewith profiles are needed, or use
|
|
343
|
+
`--auth-profile-pool` for deterministic role rotation.
|
|
344
|
+
|
|
329
345
|
For other Hasna apps that expose `@hasna/events` webhooks, use the generic
|
|
330
346
|
handler:
|
|
331
347
|
|
|
@@ -381,6 +397,7 @@ dispatch:
|
|
|
381
397
|
loops routes schedule todos-task oss-task-route-drain \
|
|
382
398
|
--every 5m \
|
|
383
399
|
--todos-project "$HOME/.hasna/loops" \
|
|
400
|
+
--template task-lifecycle \
|
|
384
401
|
--project-path-prefix /home/hasna/workspace/hasna/opensource \
|
|
385
402
|
--tags auto:route \
|
|
386
403
|
--provider codewith \
|