@jjanczur/tyran 0.1.46 → 0.1.48
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/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +62 -0
- package/README.md +1 -1
- package/hooks/hooks.json +1 -1
- package/hooks/scripts/secrets-gate.mjs +14 -8
- package/package.json +1 -1
- package/scripts/mistakes.mjs +3 -3
- package/templates/MISTAKES.md +1 -1
|
@@ -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.
|
|
14
|
+
"version": "0.1.48",
|
|
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.
|
|
3
|
+
"version": "0.1.48",
|
|
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,67 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.48 — 2026-09-25
|
|
4
|
+
|
|
5
|
+
### `mistakes.mjs` writes no em dash, and reads a rule whose dash a human fixed
|
|
6
|
+
|
|
7
|
+
Two bugs from one character, reported from a real install. `add` wrote every
|
|
8
|
+
entry heading as `## <date> — <title>` and `promote --law` wrote every rule
|
|
9
|
+
line with ` — MISTAKES.md entries ...`, so in a host repo whose gate rejects
|
|
10
|
+
U+2014 on added lines, every `add` and every `promote --law` turned the commit
|
|
11
|
+
red, and that repo's `MISTAKES.md` header had to tell people to fix the dash by
|
|
12
|
+
hand after each `add`.
|
|
13
|
+
|
|
14
|
+
The hand fix then caused the second bug. `RULE_EVIDENCE_RE` accepted only
|
|
15
|
+
U+2014, so a rule line whose dash had been turned into a hyphen no longer named
|
|
16
|
+
its signature: `fenceCarriesSignature` answered false and the next
|
|
17
|
+
`promote --law` wrote the same rule into `CLAUDE.md` a second time. Measured on
|
|
18
|
+
that repo: 4 of the 5 rules in its fence were invisible to the check, and
|
|
19
|
+
`promote --law --dry-run` offered a duplicate of one of them without the
|
|
20
|
+
"already carries this signature" notice.
|
|
21
|
+
|
|
22
|
+
Both writers now use a plain hyphen (` - `), and the evidence pattern accepts a
|
|
23
|
+
hyphen, an en dash or an em dash, because fences already in use hold rules with
|
|
24
|
+
the old character and with the hand-fixed one. Messages on stderr and in the
|
|
25
|
+
usage text keep their dashes; they never reach a file. `templates/MISTAKES.md`
|
|
26
|
+
and the rule-line example in `docs/self-improvement.md` (and its site copy)
|
|
27
|
+
show the new separator.
|
|
28
|
+
|
|
29
|
+
Four assertions that pinned U+2014 in written text now pin the hyphen; the
|
|
30
|
+
forged-heading test keeps its second em dash, which comes from the hostile
|
|
31
|
+
title, not from the template. Two new tests, each naming the mutant it kills:
|
|
32
|
+
M18 (U+2014 back in `renderEntry` or `ruleLineFor`) and M19 (`RULE_EVIDENCE_RE`
|
|
33
|
+
back to U+2014 only).
|
|
34
|
+
|
|
35
|
+
## 0.1.47 — 2026-09-19
|
|
36
|
+
|
|
37
|
+
### The secrets gate scans 10 MiB, and buys the time to do it
|
|
38
|
+
|
|
39
|
+
`MAX_PAYLOAD_BYTES` goes from 4 MiB to 10 MiB, together with what the number
|
|
40
|
+
depends on: `DEADLINE_MS` 7 s → 15 s, the scanner's own budget 5 s → 11 s and
|
|
41
|
+
the registered `timeout` 15 s → 30 s, the most a hook here may declare. The
|
|
42
|
+
old ceiling was true to its 7 s budget, and it made a finished change on a
|
|
43
|
+
real project — two 2.4 MB translation catalogs plus the code that used them —
|
|
44
|
+
into three commits and a chunked push, because the gate could not scan them
|
|
45
|
+
in one go.
|
|
46
|
+
|
|
47
|
+
Measured end to end through the real hook before the number was written
|
|
48
|
+
(8 cores, load average 3): copies of a 2.4 MB JSON catalog, 4 MiB / 3.14 s,
|
|
49
|
+
8 MiB / 5.99 s, 9.5 MiB / 7.45 s; base64 folded at 76 columns,
|
|
50
|
+
9.9 MiB / 6.97 s. The ceiling counts every object git would write, so 9.9 MiB
|
|
51
|
+
of catalog files arrived as 10,703,651 bytes in nine objects and was refused
|
|
52
|
+
in 0.08 s.
|
|
53
|
+
|
|
54
|
+
One cost the size made visible, recorded in `docs/hooks.md`: gitleaks 8.30.1
|
|
55
|
+
stops reading a single line that carries no newline, deterministically per
|
|
56
|
+
payload and chunking, exits 0 and reports the smaller count — 3 of 18 runs at
|
|
57
|
+
8 MiB of unbroken base64, 0 of 6 at 4 MiB, never with newlines. The coverage
|
|
58
|
+
check refuses such a scan rather than trusting it, which is unchanged and is
|
|
59
|
+
the point of that check.
|
|
60
|
+
|
|
61
|
+
The pins moved with the numbers: `tests/unit/hook-secrets-gate.test.mjs` pins
|
|
62
|
+
10,485,760 and 17,000 and sizes its oversized-report fixture from the constant
|
|
63
|
+
instead of a literal.
|
|
64
|
+
|
|
3
65
|
## 0.1.46 — 2026-08-22
|
|
4
66
|
|
|
5
67
|
### The wall is readable, and a question no longer costs a night
|
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:
|
|
332
|
+
it: 1715 unit tests, run with `node --test "tests/**/*.test.mjs"`.
|
|
333
333
|
|
|
334
334
|
## Documentation
|
|
335
335
|
|
package/hooks/hooks.json
CHANGED
|
@@ -71,13 +71,13 @@ import { fileURLToPath } from 'node:url';
|
|
|
71
71
|
import { PASS, field, main, runGate } from './hook-io.mjs';
|
|
72
72
|
|
|
73
73
|
/** This gate's own budget, half the `timeout` its hooks.json entry declares. */
|
|
74
|
-
export const DEADLINE_MS =
|
|
74
|
+
export const DEADLINE_MS = 15000;
|
|
75
75
|
|
|
76
76
|
/** Left unspent so a refusal can still be serialized after the last child. */
|
|
77
77
|
export const DEADLINE_MARGIN_MS = 1200;
|
|
78
78
|
|
|
79
79
|
/** No single child may hold the whole budget; several have to run. */
|
|
80
|
-
export const CHILD_BUDGET_MS =
|
|
80
|
+
export const CHILD_BUDGET_MS = 11000;
|
|
81
81
|
|
|
82
82
|
/** Cheap `git` queries. Generous next to a measured 24-75 ms. */
|
|
83
83
|
export const GIT_BUDGET_MS = 2000;
|
|
@@ -85,17 +85,23 @@ export const GIT_BUDGET_MS = 2000;
|
|
|
85
85
|
/**
|
|
86
86
|
* The most content this gate will assemble and scan.
|
|
87
87
|
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
88
|
+
* 10 MiB, against a 15 s deadline (hooks.json: 30 s, the most a hook here may
|
|
89
|
+
* register). The first figure here
|
|
90
|
+
* was 8 MB and it was never true: it came from timing `gitleaks stdin` in
|
|
91
|
+
* isolation (1.07 s) and ignored everything the gate spends BEFORE the scan —
|
|
92
|
+
* listing objects, reading them, and the git calls in front of both. Review
|
|
93
|
+
* measured the real ceiling inside the 7 s budget of that time at roughly
|
|
94
|
+
* 4.5 MB, and the constant sat at 4 MiB for the next rounds. It was raised
|
|
95
|
+
* together with the deadline, not instead of it, when 4 MiB forced a real
|
|
96
|
+
* project to split one finished change into several commits and pushes just
|
|
97
|
+
* to get its two 2.4 MB translation catalogs past the gate (measured
|
|
98
|
+
* end to end on that machine: see `docs/hooks.md`, "Costs that are deliberate").
|
|
93
99
|
*
|
|
94
100
|
* Past it the gate REFUSES rather than scanning a prefix: a partial scan that
|
|
95
101
|
* reports nothing is indistinguishable from a clean one, which is the defect
|
|
96
102
|
* this whole file exists to remove.
|
|
97
103
|
*/
|
|
98
|
-
export const MAX_PAYLOAD_BYTES =
|
|
104
|
+
export const MAX_PAYLOAD_BYTES = 10 * 1024 * 1024;
|
|
99
105
|
|
|
100
106
|
/** Bytes of a command we are willing to hand to the scanner as data. */
|
|
101
107
|
export const MAX_COMMAND_BYTES = 128 * 1024;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jjanczur/tyran",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.48",
|
|
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": {
|
package/scripts/mistakes.mjs
CHANGED
|
@@ -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)}
|
|
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 ? `
|
|
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`.
|
package/templates/MISTAKES.md
CHANGED
|
@@ -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>
|
|
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.
|