@hasna/loops 0.3.47 → 0.3.49
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 +35 -3
- package/dist/cli/index.js +357 -349
- package/dist/daemon/index.js +223 -40
- package/dist/index.js +223 -58
- package/dist/lib/store.d.ts +13 -2
- package/dist/lib/store.js +206 -32
- package/dist/sdk/index.js +222 -39
- package/docs/USAGE.md +44 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ OpenLoops is a local CLI and daemon for persistent loops and workflows: schedule
|
|
|
5
5
|
It supports deterministic command loops, JSON-defined workflows, and guarded CLI adapters for headless coding agents:
|
|
6
6
|
|
|
7
7
|
- `claude`
|
|
8
|
-
- `
|
|
8
|
+
- `agent` (Cursor Agent CLI)
|
|
9
9
|
- `codewith exec`
|
|
10
10
|
- `aicopilot run`
|
|
11
11
|
- `opencode run`
|
|
@@ -315,6 +315,38 @@ loops routes show <work-item-id>
|
|
|
315
315
|
loops routes invocations
|
|
316
316
|
```
|
|
317
317
|
|
|
318
|
+
For Hasna OSS task-created routing, use a deterministic drain instead of tmux
|
|
319
|
+
dispatch:
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
loops routes schedule todos-task oss-task-route-drain \
|
|
323
|
+
--every 5m \
|
|
324
|
+
--todos-project "$HOME/.hasna/loops" \
|
|
325
|
+
--project-path-prefix /home/hasna/workspace/hasna/opensource \
|
|
326
|
+
--tags auto:route \
|
|
327
|
+
--provider codewith \
|
|
328
|
+
--auth-profile-pool account004,account005,account006 \
|
|
329
|
+
--add-dir "$HOME/.hasna/todos,$HOME/.hasna/loops" \
|
|
330
|
+
--project-group oss \
|
|
331
|
+
--max-dispatch 2 \
|
|
332
|
+
--scan-limit 5000 \
|
|
333
|
+
--max-active-per-project 1 \
|
|
334
|
+
--max-active-per-project-group 4 \
|
|
335
|
+
--max-active 12 \
|
|
336
|
+
--worktree-mode required \
|
|
337
|
+
--evidence-dir "$HOME/.hasna/loops/reports/oss-task-route-drain" \
|
|
338
|
+
--compact
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Only route tasks that explicitly opt in with `auto:route`, `route_enabled=true`,
|
|
342
|
+
or `automation.allowed=true`. Use Codewith account pools, required worktrees,
|
|
343
|
+
max-active throttles, and bounded evidence directories. Do not dispatch or paste
|
|
344
|
+
task prompts into tmux panes. Keep `--scan-limit` large enough for the local
|
|
345
|
+
ready-task backlog; otherwise low-priority or newly-created tasks can sit beyond
|
|
346
|
+
the scanned window. Generated one-shot task/event route workflow specs are
|
|
347
|
+
archived automatically when their workflow run reaches a terminal state;
|
|
348
|
+
workflow run history and manifests are preserved.
|
|
349
|
+
|
|
318
350
|
Workflow run manifests are written under
|
|
319
351
|
`.hasna/loops/runs/<project-slug>/<subject-key>/<run-id>/manifest.json`.
|
|
320
352
|
`subject-key` is a safe derived path segment, not the raw subject reference.
|
|
@@ -499,8 +531,8 @@ The adapters intentionally use provider command surfaces instead of pretending e
|
|
|
499
531
|
- Claude uses `claude -p --output-format json` and safe-mode/local setting sources by default.
|
|
500
532
|
- Codewith uses `codewith --ask-for-approval never exec --json --ephemeral --skip-git-repo-check`, with `--add-dir` for explicit extra writable directories.
|
|
501
533
|
- AI Copilot and OpenCode use `run --format json --pure`.
|
|
502
|
-
- Cursor is CLI-first for now via standalone `agent -p`
|
|
503
|
-
- Codex uses `codex exec --json --ephemeral --skip-git-repo-check`, with `--add-dir` for explicit extra writable directories where supported.
|
|
534
|
+
- Cursor is CLI-first for now via the standalone `agent -p` binary. OpenLoops no longer falls back to `cursor agent`; install the standalone Cursor Agent CLI so preflight and scheduled runs use the same executable.
|
|
535
|
+
- Codex uses `codex --ask-for-approval never exec --json --ephemeral --skip-git-repo-check`, with `--add-dir` for explicit extra writable directories where supported.
|
|
504
536
|
- Agent prompts are sent through child stdin instead of argv so prompt bodies do not appear in process listings.
|
|
505
537
|
- When `--account` or a step `account` is set, OpenLoops resolves `accounts env <profile> --tool <tool>` before spawning the target, strips inherited tool home/API-key variables, and applies the selected profile only to that process. Missing account profiles fail before the provider binary receives the prompt.
|
|
506
538
|
- `--auth-profile` and step `authProfile` are provider-native auth selectors. They currently apply to Codewith and are passed to Codewith as `--auth-profile <name>` before `exec`; they do not call OpenAccounts.
|