@jjanczur/tyran 0.1.47 → 0.1.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.
@@ -11,7 +11,7 @@
11
11
  {
12
12
  "name": "tyran",
13
13
  "description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
14
- "version": "0.1.47",
14
+ "version": "0.1.49",
15
15
  "source": "./",
16
16
  "author": {
17
17
  "name": "Jacek Janczura",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tyran",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "A task conductor for Claude Code: multi-agent orchestration with an enforced evidence contract, repo-specific learning, and update-safe local evolution.",
5
5
  "author": {
6
6
  "name": "Jacek Janczura",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.49 — 2026-11-14
4
+
5
+ ### `limits.mode: warn` no longer writes a pause marker that blocks the whole repo
6
+
7
+ Reported from a real install running `warn`. One Claude account reached 100%
8
+ of its weekly window. The wall watcher (`limitSweep`, run by the board's timer
9
+ and by `overnight.mjs watch-limit`) then wrote `.tyran/state/paused-until.json`
10
+ with a resume five days out. The marker is per repo, the account is per
11
+ session, and `usage-gate` denies on the marker alone, so every unattended
12
+ session in the repo was refused, including sessions on accounts that still had
13
+ quota. It held for several minutes, until someone removed the marker by hand.
14
+
15
+ The cause was one condition. `limitSweep` skipped `mode: off` and treated
16
+ every other mode as `pause`. It now writes a marker only under `pause` and
17
+ returns `reason: 'limits-warn'` under `warn`. `watch-limit` refuses to start
18
+ under `warn` with the same message it gives under `off`, because it would have
19
+ nothing to do.
20
+
21
+ Still open: `usage-gate` reads `warn` only when NO marker exists. A marker
22
+ already on disk, from `pause` mode or from 0.1.48, still binds every
23
+ unattended session under `warn` until `overnight.mjs cancel --clear` removes
24
+ it. The fix is in `hooks/scripts/`, which is KERNEL in this repo, so it is a
25
+ human edit and is not in this release.
26
+
27
+ One new test: a wall under `warn` writes no marker, journals nothing and sends
28
+ no notification. Its mutant (the 0.1.48 `=== 'off'` condition) goes red.
29
+
30
+ ## 0.1.48 — 2026-09-25
31
+
32
+ ### `mistakes.mjs` writes no em dash, and reads a rule whose dash a human fixed
33
+
34
+ Two bugs from one character, reported from a real install. `add` wrote every
35
+ entry heading as `## <date> — <title>` and `promote --law` wrote every rule
36
+ line with ` — MISTAKES.md entries ...`, so in a host repo whose gate rejects
37
+ U+2014 on added lines, every `add` and every `promote --law` turned the commit
38
+ red, and that repo's `MISTAKES.md` header had to tell people to fix the dash by
39
+ hand after each `add`.
40
+
41
+ The hand fix then caused the second bug. `RULE_EVIDENCE_RE` accepted only
42
+ U+2014, so a rule line whose dash had been turned into a hyphen no longer named
43
+ its signature: `fenceCarriesSignature` answered false and the next
44
+ `promote --law` wrote the same rule into `CLAUDE.md` a second time. Measured on
45
+ that repo: 4 of the 5 rules in its fence were invisible to the check, and
46
+ `promote --law --dry-run` offered a duplicate of one of them without the
47
+ "already carries this signature" notice.
48
+
49
+ Both writers now use a plain hyphen (` - `), and the evidence pattern accepts a
50
+ hyphen, an en dash or an em dash, because fences already in use hold rules with
51
+ the old character and with the hand-fixed one. Messages on stderr and in the
52
+ usage text keep their dashes; they never reach a file. `templates/MISTAKES.md`
53
+ and the rule-line example in `docs/self-improvement.md` (and its site copy)
54
+ show the new separator.
55
+
56
+ Four assertions that pinned U+2014 in written text now pin the hyphen; the
57
+ forged-heading test keeps its second em dash, which comes from the hostile
58
+ title, not from the template. Two new tests, each naming the mutant it kills:
59
+ M18 (U+2014 back in `renderEntry` or `ruleLineFor`) and M19 (`RULE_EVIDENCE_RE`
60
+ back to U+2014 only).
61
+
3
62
  ## 0.1.47 — 2026-09-19
4
63
 
5
64
  ### The secrets gate scans 10 MiB, and buys the time to do it
package/README.md CHANGED
@@ -329,7 +329,7 @@ enforces the cap (3947 of 5000 characters). What each one assumes, when it
329
329
  fires and who invokes it, is in
330
330
  [skills and agents](https://jjanczur.github.io/tyran/skills/); the prompts
331
331
  themselves are in [`skills/`](skills/) and [`agents/`](agents/). Behind all of
332
- it: 1713 unit tests, run with `node --test "tests/**/*.test.mjs"`.
332
+ it: 1716 unit tests, run with `node --test "tests/**/*.test.mjs"`.
333
333
 
334
334
  ## Documentation
335
335
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjanczur/tyran",
3
- "version": "0.1.47",
3
+ "version": "0.1.49",
4
4
  "description": "Command-line scripts for the Tyran task conductor (doctor, journal, schema, and repo tooling) for CI and terminals outside Claude Code. Installing this package does NOT install the Claude Code plugin — add that separately with `/plugin marketplace add jjanczur/tyran` inside Claude Code.",
5
5
  "type": "module",
6
6
  "engines": {
@@ -323,7 +323,7 @@ export function renderEntry(entry) {
323
323
  } = entry;
324
324
  const bullets = FIELDS.map(([key, label]) => `- **${label}:** ${clean(entry[key] ?? '')}`);
325
325
  return [
326
- `## ${clean(date)} — ${clean(title)}`,
326
+ `## ${clean(date)} - ${clean(title)}`,
327
327
  '',
328
328
  ...bullets,
329
329
  `- **Signature:** \`${clean(signature)}\` · initiative \`${clean(initiative)}\` · ` +
@@ -488,7 +488,7 @@ export function fenceRules(text) {
488
488
  * and the only way to disagree well is to be able to read what it cost.
489
489
  */
490
490
  export function ruleLineFor({ rule, signature, count, dates }) {
491
- const pointer = dates.length > 0 ? ` — ${MISTAKES_FILE} entries ${dates.join(', ')}` : '';
491
+ const pointer = dates.length > 0 ? ` - ${MISTAKES_FILE} entries ${dates.join(', ')}` : '';
492
492
  return `- ${clean(rule)} (\`${clean(signature)}\`, ${count} occurrences${pointer})`;
493
493
  }
494
494
 
@@ -496,7 +496,7 @@ export function ruleLineFor({ rule, signature, count, dates }) {
496
496
  * The evidence parenthetical `ruleLineFor` writes, anchored where it writes it.
497
497
  * Whitespace after it is tolerated; a rule's human text is not searched.
498
498
  */
499
- const RULE_EVIDENCE_RE = /\(`([a-z0-9]+(?:-[a-z0-9]+)*)`, \d+ occurrences(?: — [^`)]*)?\)$/;
499
+ const RULE_EVIDENCE_RE = /\(`([a-z0-9]+(?:-[a-z0-9]+)*)`, \d+ occurrences(?: [-\u2013\u2014] [^`)]*)?\)$/;
500
500
 
501
501
  /**
502
502
  * The signature a rule line's MACHINE-WRITTEN evidence names, or `null`.
@@ -774,6 +774,11 @@ export function wallOf(reading) {
774
774
  export function limitSweep(repo, { nowMs = Date.now(), readTranscript = readTranscriptRejection, notify = notifyDesktop } = {}) {
775
775
  const limits = readLimitsFile(repo);
776
776
  if (limits === null || limits.mode === 'off') return { action: 'none', reason: 'limits-off' };
777
+ // `warn` never pauses, and the marker IS a pause: the gate denies on its
778
+ // presence alone. The line above was the only check until 0.1.49, so a repo on
779
+ // `warn` that hit the wall on ONE account got a repo-wide marker, and every
780
+ // unsupervised session in it was refused, on accounts with quota left too.
781
+ if (limits.mode !== 'pause') return { action: 'none', reason: 'limits-warn' };
777
782
  if (checkStop(repo).stopped) return { action: 'none', reason: 'stop-brake' };
778
783
 
779
784
  // An existing marker means the gate already saw this, or a previous sweep
@@ -839,9 +844,9 @@ export function limitSweep(repo, { nowMs = Date.now(), readTranscript = readTran
839
844
 
840
845
  function doWatchLimit(repo, flags) {
841
846
  const limits = readLimitsFile(repo);
842
- if (limits.mode === 'off') {
847
+ if (limits.mode !== 'pause') {
843
848
  console.error(
844
- 'overnight: limits.mode is "off" in .tyran/config.yaml — nothing to watch for.\n' +
849
+ `overnight: limits.mode is "${limits.mode}" in .tyran/config.yaml — only "pause" pauses, so nothing to watch for.\n` +
845
850
  ' set limits.mode: pause to have the wall detected and the resume armed.',
846
851
  );
847
852
  process.exit(1);
@@ -6,7 +6,7 @@ edit it by hand whenever a root cause here is wrong. Nothing overwrites it.
6
6
 
7
7
  Every entry has the same five bullets:
8
8
 
9
- ## <YYYY-MM-DD> — <one line: what broke, in a reader's words>
9
+ ## <YYYY-MM-DD> - <one line: what broke, in a reader's words>
10
10
 
11
11
  - **What happened:** the observable failure, not the diagnosis.
12
12
  - **Root cause:** the mechanism. "I forgot" is not a root cause.