@hasna/loops 0.3.36 → 0.3.38

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 CHANGED
@@ -236,7 +236,8 @@ loops templates render bounded-agent-worker-verifier \
236
236
  --var projectPath=/path/to/repo \
237
237
  --var provider=codewith \
238
238
  --var authProfilePool=account004,account005 \
239
- --var sandbox=danger-full-access
239
+ --var sandbox=danger-full-access \
240
+ --var worktreeMode=required
240
241
  ```
241
242
 
242
243
  For event-driven task automation, `loops events handle todos-task` reads a
@@ -248,7 +249,8 @@ cat task-created-event.json | loops events handle todos-task \
248
249
  --provider codewith \
249
250
  --auth-profile-pool account004,account005,account006 \
250
251
  --permission-mode bypass \
251
- --sandbox danger-full-access
252
+ --sandbox danger-full-access \
253
+ --worktree-mode required
252
254
  ```
253
255
 
254
256
  For other Hasna apps that expose `@hasna/events` webhooks, use the generic
@@ -260,7 +262,8 @@ cat event.json | loops events handle generic \
260
262
  --auth-profile-pool account004,account005,account006 \
261
263
  --permission-mode bypass \
262
264
  --sandbox danger-full-access \
263
- --project-path /path/to/repo
265
+ --project-path /path/to/repo \
266
+ --worktree-mode required
264
267
  ```
265
268
 
266
269
  This is the intended deterministic-to-agentic path: a producer creates a todos
package/dist/cli/index.js CHANGED
@@ -5254,7 +5254,7 @@ function buildScriptInventoryReport(store, opts = {}) {
5254
5254
  // package.json
5255
5255
  var package_default = {
5256
5256
  name: "@hasna/loops",
5257
- version: "0.3.36",
5257
+ version: "0.3.38",
5258
5258
  description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
5259
5259
  type: "module",
5260
5260
  main: "dist/index.js",
@@ -4574,7 +4574,7 @@ function enableStartup(result) {
4574
4574
  // package.json
4575
4575
  var package_default = {
4576
4576
  name: "@hasna/loops",
4577
- version: "0.3.36",
4577
+ version: "0.3.38",
4578
4578
  description: "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
4579
4579
  type: "module",
4580
4580
  main: "dist/index.js",
package/docs/USAGE.md CHANGED
@@ -243,12 +243,14 @@ loops templates render bounded-agent-worker-verifier \
243
243
  --var sandbox=danger-full-access
244
244
  ```
245
245
 
246
- Task/event agent templates default to `worktreeMode=auto`. When `projectPath`
247
- is an existing git repository, OpenLoops inserts a `prepare-worktree` command
248
- step before the worker and runs the worker/verifier from a deterministic
249
- worktree under `~/.hasna/loops/worktrees/<repo>/<run>`. The generated agent
250
- target includes worktree metadata (`mode`, `cwd`, `path`, `branch`,
251
- `originalCwd`) so dry-runs and workflow inspection expose the exact checkout.
246
+ Repo-mutating task/event routes should set `worktreeMode=required` so the
247
+ workflow fails fast instead of falling back to the main checkout. When
248
+ `projectPath` is an existing git repository, OpenLoops inserts a
249
+ `prepare-worktree` command step before the worker and runs the worker/verifier
250
+ from a deterministic worktree under `~/.hasna/loops/worktrees/<repo>/<run>`.
251
+ The generated agent target includes worktree metadata (`mode`, `cwd`, `path`,
252
+ `branch`, `originalCwd`) so dry-runs and workflow inspection expose the exact
253
+ checkout.
252
254
 
253
255
  Use explicit main/default checkout mode only when the task truly requires it:
254
256
 
@@ -259,7 +261,8 @@ loops templates render todos-task-worker-verifier \
259
261
  --var worktreeMode=main
260
262
  ```
261
263
 
262
- Use `worktreeMode=required` when non-worktree execution should fail fast, or
264
+ Use `worktreeMode=auto` only for compatibility or mixed routes where a
265
+ non-git/non-mutating project is expected and the fallback is recorded. Use
263
266
  `worktreeMode=off` for non-git projects. `worktreeRoot` and
264
267
  `worktreeBranchPrefix` can override the storage root and branch prefix.
265
268
 
@@ -273,7 +276,7 @@ cat task-created-event.json | loops events handle todos-task \
273
276
  --auth-profile-pool account004,account005,account006 \
274
277
  --permission-mode bypass \
275
278
  --sandbox danger-full-access \
276
- --worktree-mode auto
279
+ --worktree-mode required
277
280
  ```
278
281
 
279
282
  Task routing is explicit opt-in. The handler skips the event without creating a
@@ -329,7 +332,7 @@ loops events drain todos-task \
329
332
  --max-active-per-project 1 \
330
333
  --max-active-per-project-group 4 \
331
334
  --max-active 12 \
332
- --worktree-mode auto \
335
+ --worktree-mode required \
333
336
  --evidence-dir /home/hasna/.hasna/loops/reports/task-drain
334
337
  ```
335
338
 
@@ -355,7 +358,8 @@ cat event.json | loops events handle generic \
355
358
  --auth-profile-pool account004,account005,account006 \
356
359
  --permission-mode bypass \
357
360
  --sandbox danger-full-access \
358
- --project-path /path/to/repo
361
+ --project-path /path/to/repo \
362
+ --worktree-mode required
359
363
  ```
360
364
 
361
365
  This is the intended deterministic-to-agentic path: a producer creates a todos
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hasna/loops",
3
- "version": "0.3.36",
3
+ "version": "0.3.38",
4
4
  "description": "Persistent local loop and workflow runner for deterministic commands and headless AI coding agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",