@jjanczur/tyran 0.1.9 → 0.1.11

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.
@@ -135,3 +135,23 @@ Until it is committed there is a second hazard worth naming in your report: an
135
135
  agent that runs `git add -A` on a story branch sweeps the untracked `.tyran/`
136
136
  into that branch, and a four-way parallel run ends with four conflicting
137
137
  copies of the config. Stage explicit paths until this commit exists.
138
+
139
+ ## 7. Offer overnight mode — and say plainly what the operator must do
140
+
141
+ Overnight mode (`docs/overnight.md`) pauses autonomous work near the
142
+ subscription usage limit and resumes after the window resets. It is OFF by
143
+ default because its telemetry is a statusline the plugin cannot install:
144
+ `.claude/settings.json` in user scope is the operator's file, and the policy
145
+ gate refuses agents writing the in-repo one — so print the snippet with the
146
+ plugin path RESOLVED and let the human paste it:
147
+
148
+ ```json
149
+ { "statusLine": { "type": "command",
150
+ "command": "node <resolved-plugin-root>/scripts/statusline.mjs" } }
151
+ ```
152
+
153
+ Then show the `limits:` block to enable (`mode: 'pause'` — quoted, bare
154
+ `off`/`on` are YAML booleans) and note that `doctor --state` reports
155
+ `limit-telemetry-missing` if the pause is configured while the statusline is
156
+ not installed. Do not attempt the settings write yourself; the refusal is
157
+ the boundary working.
@@ -15,14 +15,18 @@ node "${CLAUDE_PLUGIN_ROOT}/scripts/journal.mjs" open-spawns "$J"
15
15
 
16
16
  Then report, in this order and no longer than a screen:
17
17
 
18
- 1. The progress line: `PROGRESS: NN% · X/Y tickets · phase: <name> · last merge: <sha>`.
19
- 2. **Agents with no report yet** — the ones from `open-spawns`. Say how long
18
+ 1. If `.tyran/state/paused-until.json` exists, the pause comes FIRST: which
19
+ window, when it resumes, and `node "${CLAUDE_PLUGIN_ROOT}/scripts/overnight.mjs" status`
20
+ output. Everything below it is context for a session that is deliberately
21
+ not working.
22
+ 2. The progress line: `PROGRESS: NN% · X/Y tickets · phase: <name> · last merge: <sha>`.
23
+ 3. **Agents with no report yet** — the ones from `open-spawns`. Say how long
20
24
  each has been open. An agent that has been running for an hour is the most
21
25
  useful thing on this screen and the easiest to overlook.
22
- 3. Open gates, and who is waiting on whom.
23
- 4. Any lease released by someone who did not hold it. The projection surfaces
26
+ 4. Open gates, and who is waiting on whom.
27
+ 5. Any lease released by someone who did not hold it. The projection surfaces
24
28
  these; they mean two agents believed they owned the same worktree.
25
- 5. The resume steps from the last checkpoint.
29
+ 6. The resume steps from the last checkpoint.
26
30
 
27
31
  If there is no journal, say exactly that and suggest `/tyran:setup`. Do not
28
32
  reconstruct a status from the git log — a plausible status is worse than none,
@@ -42,3 +42,23 @@ validation:
42
42
 
43
43
  # Files multiple agents may touch: append-only, serialized by the conductor.
44
44
  shared_zones: []
45
+
46
+ # Overnight mode — pause autonomous work near the subscription usage limits
47
+ # and resume after the window resets (docs/overnight.md). Requires the
48
+ # operator-installed statusline helper (scripts/statusline.mjs), which is the
49
+ # only place the platform exposes usage telemetry; without it the gate is
50
+ # silent and doctor says so.
51
+ #
52
+ # mode: off | warn | pause warn surfaces, never denies; pause winds down
53
+ # wait_max_hours: 5 reset further away than this = a LONG pause:
54
+ # notify and hold rather than silently waiting
55
+ # days (the weekly window). Within it: schedule
56
+ # the resume and say when.
57
+ # long_wait: hold | resume what the scheduler does beyond wait_max_hours
58
+ limits:
59
+ mode: 'off' # quoted — bare off is YAML for false
60
+ pause_at_percent: 97
61
+ weekly_pause_at_percent: 97
62
+ wait_max_hours: 5
63
+ long_wait: hold
64
+ resume_margin_minutes: 5