@ai-dossier/sched 0.68.2-next.548.1 → 0.68.2

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.
Files changed (2) hide show
  1. package/README.md +3 -48
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -380,51 +380,7 @@ This applies to `issue:<n>` unit dispatch (`dispatchAssignments`). `batch:<id>`
380
380
  through a separate pass with its own claim/reconcile logic — see
381
381
  [Batch dispatch (#523)](#batch-dispatch-523) below.
382
382
 
383
- ### Supervised deployment (#679, #945)
384
-
385
- **The way to run the engine is `ai-dossier sched service install`** (run it from the project's
386
- checkout). The engine is safe to kill at any instant, but it cannot restart itself — the service is
387
- what makes it come back by itself, so no session ever has to start, stop or babysit it.
388
-
389
- ```bash
390
- ai-dossier sched service install [--alert-issue <n>] # systemd user unit; cron watchdog if no systemd
391
- ai-dossier sched service status # supervised? engine live? heartbeat?
392
- ai-dossier sched service uninstall
393
- ```
394
-
395
- - **systemd** (default when a user manager is running): writes
396
- `~/.config/systemd/user/dossier-sched-<project>.service` — `Restart=always` (a clean exit, such as
397
- a graceful stop, comes back too) with **crash-loop bounds**: exponential `RestartSec` backoff
398
- (10 s up to 300 s, systemd >= 254; older versions keep 10 s) and `StartLimitBurst=10` per
399
- `StartLimitIntervalSec=600` — past that the unit is left `failed` for an operator
400
- (`systemctl --user reset-failed <unit>`); `KillMode=process`, `WorkingDirectory` = the project's
401
- **main checkout** (never a linked worktree; validated against `--project`, override with
402
- `--repo-dir`), and the node/nvm `PATH` at install time (absolute entries only). Install refuses
403
- node / entry-point / repo paths that are missing, relative, or under a temp or `worktrees/`
404
- directory, and warns that an nvm node path must be re-pinned (re-run `install`) after a node
405
- upgrade. It runs `sched start --auto-upgrade` (opt out with `--no-auto-upgrade`); **note that in
406
- the continuous loop `--auto-upgrade` only journals `engine-stale` — the running engine keeps the
407
- code it started with until it restarts** (the actual `npm i -g` is the cron/`--once` path).
408
- Output goes to the journal (`journalctl --user -u <unit>`) and the durable trail is the
409
- project's `events.jsonl`. Run `loginctl enable-linger $USER` once so it starts at boot without a
410
- login. Re-running `install` is idempotent; a changed unit is restarted (agents keep running).
411
- - **cron fallback** (no systemd): a tagged crontab block with `@reboot` and a per-minute
412
- `sched ensure-running` watchdog (`%` is escaped for cron). The watchdog starts a detached engine
413
- (output to `<sched-dir>/engine.log`) when no live engine holds the lease, after raising the
414
- once-per-episode stale-lease alert; a healthy minute does nothing (no `gh` call). Restarts back
415
- off exponentially while the engine keeps dying: at a 60 s cadence the first restarts are
416
- immediate, then gaps of 2, 4, 8 … minutes up to 30, and a live engine resets it. The existing
417
- crontab is read strictly — only "no crontab for <user>" counts as empty; any other `crontab -l`
418
- failure aborts the install and changes nothing. The engine takes the lease atomically, so two
419
- watchdogs — or a watchdog plus the systemd unit — never run two engines. To stop the engine on
420
- purpose under the watchdog: `sched ensure-running --disable` (`--enable` to resume).
421
- - **Crash alerts are deduplicated:** repeats of the same alert kind within an hour are ONE tracking
422
- comment on `--alert-issue`, edited with a repeat count, not a comment per restart.
423
- - `install` / `uninstall` exit non-zero and print `✗` when anything failed (systemctl, crontab).
424
- `--no-activate` renders the unit / cron block without calling `systemctl` or `crontab` and says
425
- plainly that nothing is installed; `--print` prints it.
426
-
427
- The manual shapes below remain valid, and explain the rules the service encodes.
383
+ ### Supervised deployment (#679)
428
384
 
429
385
  Two supported shapes, one rule: **dispatched agents must outlive the tick or engine that
430
386
  spawned them.** Agents are spawned detached and unref'd precisely so they survive a sched
@@ -514,7 +470,6 @@ Only SIGINT had a handler, so a SIGTERM/SIGHUP (another session's restart, a clo
514
470
  terminal) killed the engine with no line and no lease release. That is now logged; if the
515
471
  2026-09-29 cause was SIGKILL/OOM, the missing `engine-exit` plus the stale lease is now the
516
472
  documented signature (`journalctl -k` for the OOM window).
517
-
518
473
  ### Restart never discards work (#945, #940)
519
474
 
520
475
  Before the engine respawns an agent onto a worktree that already exists — a batch **tail**, a
@@ -565,8 +520,8 @@ last pushed head while local work exists, the engine does **not** respawn. Rows
565
520
  fields (the engine's own post-landing gate rows) and clean rows are never evidence; an older dirty
566
521
  row is superseded by a newer clean or failed one. It blocks the batch `tail-dirty-worktree`, with the evidence and the
567
522
  rescue ref in the journal and `sched status`. Commit or discard the work in the worktree, then
568
- `sched resume --batch <id>`. A tail that left only unpushed commits is respawned, told to resume
569
- from the rescue ref. `sched resume --batch` deliberately does NOT re-run this guard: by resuming, the operator has looked at the worktree.
523
+ `sched resume --batch <id>`. A tail that left only unpushed commits is respawned, told to resume
524
+ from the rescue ref. `sched resume --batch` deliberately does NOT re-run this guard: by resuming, the operator has looked at the worktree.
570
525
 
571
526
  ### Zombie-run fencing (#504)
572
527
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-dossier/sched",
3
- "version": "0.68.2-next.548.1",
3
+ "version": "0.68.2",
4
4
  "description": "Deterministic scheduler for multi-agent coding workflows: queue work, orchestrate parallel agents, verify completion, and recover stalled runs.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,8 +43,8 @@
43
43
  "registry": "https://registry.npmjs.org"
44
44
  },
45
45
  "dependencies": {
46
- "@ai-dossier/core": "1.14.4-next.548.1",
47
- "@ai-dossier/worktree-pool": "0.7.5-next.548.1"
46
+ "@ai-dossier/core": "^1.13.0",
47
+ "@ai-dossier/worktree-pool": "^0.7.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/node": "^24.10.0",