tldr-experts 0.18.2 → 0.18.3
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/CHANGELOG.md +104 -0
- package/README.md +1 -0
- package/dist/hooks/answer-capture.js +9 -9
- package/dist/hooks/budget-gate.js +9 -9
- package/dist/hooks/{chunk-c1h38et6.js → chunk-0sy3tmfg.js} +2 -3
- package/dist/hooks/{chunk-afttzftj.js → chunk-53wgfn01.js} +6 -6
- package/dist/hooks/{chunk-8ak5kwd5.js → chunk-5stgwp3g.js} +1 -1
- package/dist/hooks/{chunk-gx6qa496.js → chunk-6z5rmj0b.js} +3 -2
- package/dist/hooks/{chunk-4y3pk4n2.js → chunk-bznt6jb2.js} +1 -1
- package/dist/hooks/{chunk-vf992pfw.js → chunk-ezfvp5kx.js} +1 -1
- package/dist/hooks/{chunk-wx1jce1t.js → chunk-j5d0nard.js} +2 -2
- package/dist/hooks/{chunk-kwaqdq9w.js → chunk-jpp137mb.js} +3 -3
- package/dist/hooks/{chunk-2caxb41h.js → chunk-ka7768vx.js} +1 -1
- package/dist/hooks/{chunk-x00a2vaz.js → chunk-m1s8a6s0.js} +2 -2
- package/dist/hooks/{chunk-1v05a468.js → chunk-n5bxz2cw.js} +1 -1
- package/dist/hooks/{chunk-pday823f.js → chunk-qzsxhsyj.js} +1 -1
- package/dist/hooks/{chunk-2ym87z6d.js → chunk-t44983nq.js} +1 -1
- package/dist/hooks/{chunk-nf2j945p.js → chunk-tjx8g39f.js} +3 -3
- package/dist/hooks/{chunk-hwsng0xq.js → chunk-yre2scxn.js} +1 -1
- package/dist/hooks/claim-sources.js +5 -5
- package/dist/hooks/dod-gate.js +8 -8
- package/dist/hooks/no-reask.js +8 -8
- package/dist/hooks/session-start.js +13 -13
- package/dist/hooks/statusline.js +9 -9
- package/dist/tldrx.js +271 -77
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,109 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.18.3 — 2026-09-13
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- **A headless permission refusal now names its cure, a chained line is retried once with
|
|
8
|
+
the cure in front of the prompt, and the developer prompt lists the git verbs it holds
|
|
9
|
+
(#278).** Measured on two real unattended runs in one day: six refusals, sonnet AND opus
|
|
10
|
+
developers, with #271's "verbatim and alone" rule already in every prompt and explicit
|
|
11
|
+
operator notes saying the same. Every refused line was one of two shapes — a shell chain
|
|
12
|
+
(`git checkout -- f && sha256sum f && git status`, `scripts/gate/build.sh; echo "EXIT:$?"`,
|
|
13
|
+
`cmd > log 2>&1`, `diff <(…) | head`) or a git verb the developer does not hold
|
|
14
|
+
(`git checkout --`, `git status`, `git log`, `git rev-parse`) — and every one had the same
|
|
15
|
+
arc: no work since spawn, blocked after one attempt, a person reopens it, the same refusal
|
|
16
|
+
again. The ledger could not tell the two causes apart because it recorded both with #261's
|
|
17
|
+
one sentence, and a person reading it got the symptom (`was refused`) and not what would have
|
|
18
|
+
run. Three things move, one leaf each, none of them a second rule. The refused line is
|
|
19
|
+
CLASSIFIED (`build/refusalKind.ts`: `separator` when it chains commands, read through the
|
|
20
|
+
SAME tokenizer `splitArgv` runs every DoD command through, so a `;` inside quotes is an
|
|
21
|
+
argument there and here; `verb` when it is `git <verb>` alone and the verb is outside the
|
|
22
|
+
allowance, with the granted equivalent named where one exists — `checkout --` and
|
|
23
|
+
`checkout <path>` → `git restore <path>`, `reset -- <path>` and `reset HEAD <path>` → `git
|
|
24
|
+
restore --staged <path>`, and NONE invented for a branch switch or a `--hard`; `unknown` for
|
|
25
|
+
everything else, which keeps #261's sentence byte-identical there). The recorded reason
|
|
26
|
+
keeps #261's text as its base and appends `The cure: …` — on the gate's `blocked_reason`,
|
|
27
|
+
the story's review log and the handoff's `## Unknowns`, through one joiner. And a
|
|
28
|
+
`separator` refusal with no work in the tree is re-spawned ONCE within the same attempt,
|
|
29
|
+
the refused line and the rule as the prompt's first lines (`MAX_SEPARATOR_RETRIES = 1`,
|
|
30
|
+
pinned: the second refusal blocks, with the reason saying the cure was stated and refused
|
|
31
|
+
too); the retry's turn is a `run.yml` task row and an `agent.spawned` like any other, with
|
|
32
|
+
additive `retry: "separator-cure"` and `retry_after: <line>` on that spawn — never hidden.
|
|
33
|
+
`verb` and `unknown` are NEVER retried: a verb the allowance lacks will be lacking again,
|
|
34
|
+
and a cause the line does not show cannot be cured by restating it. Why the prompt moves
|
|
35
|
+
too: `developerTools()` granted `git restore` since #261 and nothing told the developer
|
|
36
|
+
which verbs it had, so a "mutate, observe RED, restore" story reached for the commonest one.
|
|
37
|
+
The verbs are now listed in the prompt from the one constant the grant is built from and the
|
|
38
|
+
classifier reads (`build/developerGrants.ts`), with `git restore <path>` named as the way to
|
|
39
|
+
put a file back — which moves the six frozen developer prompts in
|
|
40
|
+
`test/fixtures/build/golden/` by exactly those lines and nothing else (`*-events.txt`,
|
|
41
|
+
`*-run-tasks.txt`, `*-exit-codes.txt` are byte-identical: the fixture has no refusal).
|
|
42
|
+
- **A story no longer merges into its epic from the base it was cut from after a sibling moved
|
|
43
|
+
that epic (#268).** A wave runs its stories at `--parallel N` from one tip and merges them one
|
|
44
|
+
after another, so every story but the first merges from a base that is already behind — and
|
|
45
|
+
its DoD proved a tree without the sibling's work in it. Measured 2026-09-13 in a field
|
|
46
|
+
workspace: a dependent story finished green, hit `CONFLICT (content)` in a handler and two of
|
|
47
|
+
its tests at the merge, and settled `blocked` with verdict `n-a` and no reviewer run; the
|
|
48
|
+
prose note telling the developer to rebase does not make anything rebase, so a person did it
|
|
49
|
+
by hand, three times in one week. Build now measures the story branch against the epic tip
|
|
50
|
+
immediately before the merge and, when the epic has moved, merges the epic INTO the story in
|
|
51
|
+
the story's own worktree and re-runs the story's DoD on the result. **The cost, plainly: one
|
|
52
|
+
extra DoD per story, and only when the epic actually moved since that story's base** — the
|
|
53
|
+
re-run is charged on the story's HEAD moving, so a story whose base is current pays nothing
|
|
54
|
+
and emits nothing. **A conflict blocks the story and names the conflicting files**, merges
|
|
55
|
+
nothing, and leaves the worktree exactly where the developer left it (`git merge --abort` has
|
|
56
|
+
already run) — a half-applied merge is worse than a blocked story, and "merge conflict" with
|
|
57
|
+
no paths in it is the refusal that sends a person to a worktree the executor has since
|
|
58
|
+
pruned. It is a merge and never a rebase, for the reason the fast-forward path already gives:
|
|
59
|
+
rewriting a branch a developer has committed to is the move the run-id-in-branch-name rule
|
|
60
|
+
exists to prevent, and every rescued sha (#129) is a promise a rebase breaks. Whether the epic
|
|
61
|
+
moved comes from the existing `baseStateOf`/`commitsBetween` derivation, and a count git could
|
|
62
|
+
not take is NOT read as "did not move" (#273): it falls through to the merge, which writes
|
|
63
|
+
nothing when the branch really was current. A move that happens is one new event,
|
|
64
|
+
`story.base_updated` (§2.9) — the record that the extra DoD was paid, and for which commits.
|
|
65
|
+
- **A seed bullet over the claim cap no longer has its citation cut in half, and the refusal
|
|
66
|
+
stops naming a path that is not a file (#275).** Measured on 0.18.1 in a field workspace:
|
|
67
|
+
three seeds written the same day, every path in them verified with `test -e`, were refused by
|
|
68
|
+
`tldrx run new --seed` with `no such file: src/M… [src: .tldrx/seeds/<x>.md`. The mechanism is
|
|
69
|
+
a fold, not a missing file — `clean()` cut a 248-character bullet at 239, which landed INSIDE
|
|
70
|
+
its inline `[src: …]`; `renderSeed` then appended the importer's own token, whose `]` closed
|
|
71
|
+
the dangling marker, and the reader saw ONE file ref whose path was two citations glued
|
|
72
|
+
together. The cut now moves BACK to the start of the citation it would have split, so an
|
|
73
|
+
over-long bullet loses the citation it could not fit rather than half of it; the importer
|
|
74
|
+
cites the seed line on the rendered bullet anyway, so the provenance that matters survives.
|
|
75
|
+
Claims whose cut lands in prose are byte-identical, which is why the fix is the clip and not
|
|
76
|
+
the cap or a pre-measurement strip — those would rewrite short claims that are not broken.
|
|
77
|
+
The other half is the refusal, which was worth as much: an author can write an unterminated
|
|
78
|
+
`[src:` by hand and get the same fold with no clipping involved, so `run new` now says the
|
|
79
|
+
line carries an unterminated citation, that the path above is a fold and not a file to look
|
|
80
|
+
for, and quotes the bullet — and says nothing at all when it cannot read the line back,
|
|
81
|
+
rather than guessing. Where a string ends mid-citation is a question for the `[src:]` grammar
|
|
82
|
+
and only for it: `unclosedSrcMarker` and `foldsUnclosedSrcMarker` are new leaves in
|
|
83
|
+
`src/core/text/srcToken.ts`, and neither caller carries a regex of its own.
|
|
84
|
+
- **A `git rev-list --count` that FAILED counted as zero commits, and `--discard-pending`
|
|
85
|
+
deleted the implicit plan on that zero (#273).** `commitsBetween` returned `0` both when it
|
|
86
|
+
counted nothing and when git could not answer at all, so "there is nothing built on this
|
|
87
|
+
branch" and "I could not look" were one number — and the caller that reads it,
|
|
88
|
+
`rederiveImplicitPlan`, keeps the plan only when the count is ABOVE zero. The failure
|
|
89
|
+
therefore landed on the destructive side: measured here on a story branch carrying a real
|
|
90
|
+
developer commit, with the base ref removed so the count could not be taken, `tldrx next
|
|
91
|
+
--prepare --discard-pending` printed "re-derived 04-build/implicit-plan.yml (--discard-pending;
|
|
92
|
+
no evidence, and no commit on story/… beyond epic/…)" and wrote a new plan over the one the
|
|
93
|
+
work was done against.
|
|
94
|
+
`commitsBetween` now returns `number | null` and every caller decides what `null` means for
|
|
95
|
+
it: the plan is KEPT with the command that could not answer named, which is the direction
|
|
96
|
+
#272 already chose where the same zero would have deleted a branch. That strict sibling
|
|
97
|
+
`commitsAhead`, opened by #272 precisely to route around this, is collapsed back in — one
|
|
98
|
+
implementation per derivation (§7), so there is a single way this repo counts commits and it
|
|
99
|
+
is the safe one. The other two callers: a merge whose count failed is now reported as
|
|
100
|
+
`mergedEarlier` ("what it carried is not recoverable") instead of as an EMPTY merge, the
|
|
101
|
+
2026-08-30 "four stories merged" trap read backwards; and `baseStateOf` keeps answering
|
|
102
|
+
`current` — inaction is the right reading of a branch that cannot be measured, and the
|
|
103
|
+
ordinary case is a story branch that does not exist yet — but carries the reason in a new
|
|
104
|
+
`uncounted` field, so a branch that IS there and could not be placed says so in the dispatch
|
|
105
|
+
line instead of being silently treated as up to date.
|
|
106
|
+
|
|
3
107
|
## 0.18.2 — 2026-09-13
|
|
4
108
|
|
|
5
109
|
### Added
|
package/README.md
CHANGED
|
@@ -331,6 +331,7 @@ back on the registry is 0.3.0.
|
|
|
331
331
|
|
|
332
332
|
| Version | Date | Status | Contains |
|
|
333
333
|
|---|---|---|---|
|
|
334
|
+
| 0.18.3 | 2026-09-13 | `beta` | four fixes to the unattended build path, all measured on live runs: a headless permission refusal is now classified — a chained shell command, a git verb outside the developer's allowance, or neither — so a chained line gets one retry with the cure stated first, an ungranted verb names its granted equivalent, and the developer prompt now lists the git verbs it holds from the one constant the grant is built from, after six refusals in one day left a ledger that recorded the symptom and not the cause; a wave no longer merges a story into its epic from the base it was cut from once a sibling has moved that epic — the story is measured against the epic tip immediately before merge, the epic is merged into the story and its Definition of Done re-run only when the epic actually moved, and a conflict blocks the story naming the files rather than merging half of one; a seed bullet over the claim cap no longer has its citation cut in half, with the clip moving back to the citation's start instead; and a failed commit count is no longer read as zero, so `--discard-pending` can no longer delete a plan just because git could not answer. |
|
|
334
335
|
| 0.18.2 | 2026-09-13 | `beta` | three things measured on the first fully unattended run and on the live runs that followed it, one of them a regression 0.18.1 shipped hours earlier: `--ship merge` armed GitHub's auto-merge over a base that required nothing — the guard counted the checks the PR REPORTED while `--auto` waits on the base's REQUIREMENTS, so a proof run's pull request merged at 06:20:14 while all four of its checks finished between 06:21:38 and 06:24:56, and the record said `queued — GitHub merges when its checks pass`; ship now asks the base what it requires through rulesets and classic protection, names its three absences apart, and every unreadable answer arms nothing; the plan's per-story price had become a hard wall at 0.8x the planner's guess once 0.18.1 made those fields actually read, killing stories mid-flight at $1.28 and $3.25 against real costs an order of magnitude higher, so the ceiling is now `max(price x 3, $4.00)` derived at DISPATCH from the budget as it sits on disk — a run already in flight is covered without migrating anything — and, the half that carries the expensive end, a developer that dies on its cap with work in its tree commits it and lets the Definition of Done decide instead of parking the story, the same authority #271 gave a refused one; and the zero-touch recipe is written down where a person looks for it, seed file to backgrounded loop, on the README quick start and both documentation sites, with the honest boundary that this is the happy path without a person |
|
|
335
336
|
| 0.18.1 | 2026-09-13 | `beta` | five things a run could not survive on its own, every one measured on the unattended proof runs that followed 0.18.0 rather than reasoned about: a priced plan was never priced — the planner wrote `stories[].estimate_usd` and Build read only `per_phase_usd` + `spent_usd`, so every story got the same $5.40 cap while the plan said $28, and the contract now names the shape and the plan check refuses a budget.yml that does not carry it; a headless refusal under a host-tokens ceiling wrote nothing to the ledger, so `--until-done` relaunched over a refusal it could not see, and now writes its `budget.blocked` first; a developer that had committed its work and was then refused a compound verification command was blocked BEFORE the facilitator ran the Definition of Done, so the DoD now decides when there is work and the refusal is recorded either way, with the prompt saying to run each DoD command verbatim and alone because shell separators split a line into subcommands that each need their own grant; a workspace can declare `<slot>_scoped` DoD commands that run per story on the paths it touched with the full suite once per epic head, after the full suite was measured running three times per story attempt; and a cancelled run no longer leaves an epic branch that refuses the ordinary retry — `run cancel` releases it and Build renames aside an epic whose owner run is closed, while an open or unknown owner still refuses verbatim and an uncounted branch is never deleted |
|
|
336
337
|
| 0.18.0 | 2026-09-13 | `beta` | the release that lets an unattended run survive its own accidents and end somewhere, every item measured on live runs at 0.16.1 rather than reasoned about: a turn that wrote a lot of files could not be RECORDED — an `agent.result` whose `outputs` field held 3924 bytes of run-relative paths blew the 4096-byte event cap through a RAW append that never reached the capped seam, the throw landed one line after the try/catch built for exactly this and came out as exit 1, which `--retry-failed` does not retry since its branch keys on exit 5, so a loop told to survive two failures survived zero, and the epic branch had been cut on disk one line before the throw with the save after it, leaving the relaunch to read its own epic as a stranger's; `outputs` is now named by COUNT with the full list written beside the event rather than truncated, all four raw appends route through the capped seam at module scope, a throw while recording fails the STAGE with exit 5 saying how many of how many rows landed, the claim is saved the moment it is earned, and `capPayload` still knows its two fields BY NAME — a third growable field has to be taught to it deliberately or it is refused whole; Build entry now proves the Definition of Done can run IN A WORKTREE before a developer is paid, after 18 h from `run auto` to the first story that could run on one workspace, five relaunches, because the repo's `install:` named a file that existed in the human's checkout and was never committed and `git worktree` carries TRACKED FILES ONLY, so every story failed identically after the story was opened and immediately before the paid turn while the base pre-flight was green and right to be, measuring in the checkout where the file is — one throwaway worktree at the base sha, the install run inside it, each DoD command's first token resolved there, NEVER the suite, refusal exit 2 naming the exact path or binary, cached under an additive `worktree:` key narrowed by base sha, declaration hash and AGE (six hours for a green, because the row is a claim about an ENVIRONMENT that no sha contains; the base red's 30 minutes for a red), and costing zero where it could learn nothing; where the two readings could not be told apart it deliberately refuses LESS — a path named by a `dod` command after the first may be an artefact an earlier one builds, so that is an advisory and not a verdict; one blocked story no longer stops every later wave, after a loop told to build 8 stories built 5, never started 3, and reported the stage `done`, twice on the same run, because the parallel path asked only "did any story block" and `depends_on` appeared ZERO times in the Build executor — a story now runs when every one of its `depends_on` is `done`, one held back is `blocked` WITH the reason `dependency S7 blocked` (transitive for free) which is what the gate's `blocked_reason` and the continue note read, the stage line counts every story `waves.yml` scheduled rather than the rows the executor happened to hold, and a scheduled story with no outcome at all is named in `## Unknowns` instead of dropped, while `--parallel 1` is untouched on purpose — a story whose dependency blocked is still attempted there, and changing that would be a second change in the opposite direction; the spawned developer can now delete and rename paths in its own tree, after a story that was simply "delete an unused file" proved undoable — nothing in the allowance could unlink a path or take it out of the index, so every `git rm` came back needing approval nobody was there to give, the refused turn exited 0 with an envelope, the DoD ran green on an untouched tree and the reviewer faulted a diff that was never written, twice — the file-lifecycle git verbs are granted as index operations on the story's OWN tree (never a bare `rm`, `git push` still asserted absent), and a tool call refused for approval now BLOCKS the story at once with the command and why, reaching the story file, the handoff and the gate, so the next missing verb costs one attempt instead of two and nothing; that detector reads a structural field first and the English refusal sentence only as a fenced fallback, because pre-merge review measured the unfenced version reading a plain file-read of a document CONTAINING the phrase as a refusal — this very CHANGELOG is one of them — and a refusal carrying neither signal is a miss taken on purpose, with the sentence half depending on prose the host can change without notice; a fix-list finding now declares what it IS, after three stories with a green definition of done, a merged commit and an APPROVING reviewer settled `blocked`, each on a `fix-now` finding whose whole content was a stale docstring or a citation that did not resolve — the reviewer was not wrong and `severity` was never the vehicle (a free string NO consumer read, one render site under `src`), so a required `kind` splits behaviour from text: `correctness` and `security` hold the story exactly as before, a `docs`/`style` finding submitted `fix-now` is routed to `defer-with-log` with a `Normalised-from:` line, and because this makes a gate WEAKER on purpose the unblocking is priced — declaring a finding `docs` costs the SAME `[src: …]` citation that refuting one already costs, a `kind` that is absent or outside the enum is refused for free and indexed as a fault so it costs the story no attempt, a fix list already on disk with no `Kind:` line reads as not stated and not stated blocks, and the four reviewer-prompt goldens MOVED because the schema alone would have left a reviewer nobody told about the field; `run.yml` can finally explain its own `cost_usd` — a row read `input_tokens: 84, output_tokens: 37150, cost_usd: 1.98` for a 124 KB prompt while the provider reported 4,911,750 cache reads for that same turn, and across 101 transcripts in one workspace cache reads were 97.3% of the input side against a column that saw 0.002% of it — the counters were parsed on every turn and thrown away one function later, and the half the issue did not know about is that the executor path's `agent.result` emitted NO `usage` at all, so every Build and Watch turn lost all four counters and the whole Build was priced off zeroes (measured: zero `usage` lines across the four frozen goldens with ten `agent.result` among them); they are recorded additively and gated one at a time rather than both-or-nothing, `turnTokens` names them while deliberately reading neither so the exclusion is a decision on the record, nothing displayed changed — the dashboard and `tldrx cost` are byte-identical — and a row from before this reads absent, since nothing reconstructs a counter nobody wrote down; a gate about to sign itself is no longer sent as a Yes/No the owner cannot answer, after 3 of 3 questioned stages on two live workspaces sent the prompt 600 ms after the last answer and self-signed on the very next poll, so the one tap it invited ran `approve` on an already-approved gate and, because the in-wait approval fell between two notify windows, the bridge kept the prompt open and re-mentioned its owner every escalate tick for two hours — the release now asks the gate's CONDITIONS through the same re-evaluation the poll uses, extracted so neither can form a second opinion, sends nothing when there is no decision to take and says which stage and why on stdout instead of going quiet, and words a genuinely held gate from that one reading so a payload can no longer name four open questions beside `holding: "none"`; and three things a run could not do before: it can end in a pull request toward main on purpose, frozen at `run new --ship` with `push`, `pr` or `merge` into an additive `run.yml` block and not a sixth phase, pushed through the ONE push wrapper in the codebase with a PR that reports NO check left open and recorded as `merge: absent — no checks to wait on` because auto-merge over nothing to wait on is a merge now rather than a merge when green — pre-merge review caught the first version erasing a recorded merge failure with an empty string and exit 0, and the emitter dropped the whole block until it was taught the key; `questions_policy: recommended` answers a blocking question that carries its own `Recommended:` line and escalates the ones that do not, after 10 owner questions across two headless runs ($89.82 over 28 h and $26.38 over 5.6 h, the agents busy 4.9 h and 56 min of it) parked the loop on 9 that already held the pick in a parsed field, writing `decided_by: agent-default` as a THIRD value beside owner and driver because `owner` there would be an audit record lying in the dangerous direction, and never inventing a pick — no line, a letter naming no option, or a block marked irreversible or money escalates exactly as before; and `run auto --until-done [<n>]` relaunches the loop in-process after an exit it can do nothing else with, at most `n` times (default 5), after five hand relaunches and 18 h before a story ran — never over a person's exit 4, never over a budget block since nothing in-process moves a ceiling, never twice over the same last line, with the run id and the spend baseline pinned across relaunches so `--max-usd` still describes the one command a person typed; the epic-claim-at-cut half of that issue lives in the Build executor and is NOT fixed here |
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
conflictOf
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-tjx8g39f.js";
|
|
5
5
|
import {
|
|
6
6
|
FactsStore,
|
|
7
7
|
formatJaccard
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-jpp137mb.js";
|
|
9
9
|
import {
|
|
10
10
|
parseHookInput,
|
|
11
11
|
readStdin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-qzsxhsyj.js";
|
|
13
13
|
import {
|
|
14
14
|
EventLog,
|
|
15
15
|
PHASE_ID_RE
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-6z5rmj0b.js";
|
|
17
17
|
import {
|
|
18
18
|
PHASE_IDS
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import"./chunk-
|
|
21
|
-
import"./chunk-
|
|
19
|
+
} from "./chunk-m1s8a6s0.js";
|
|
20
|
+
import"./chunk-bznt6jb2.js";
|
|
21
|
+
import"./chunk-ezfvp5kx.js";
|
|
22
22
|
import {
|
|
23
23
|
ADVISORY_KEY,
|
|
24
24
|
MAX_FACT_CHARS,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
renderQuestionBlock,
|
|
29
29
|
replaceBlock,
|
|
30
30
|
serializeQuestions
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-5stgwp3g.js";
|
|
32
32
|
import {
|
|
33
33
|
ITERATION_ONLY_SLOT,
|
|
34
34
|
PROJECT_FRAMEWORK_DIR,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
isScopedTemplate,
|
|
39
39
|
parseYaml,
|
|
40
40
|
scopedSlotOf
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-0sy3tmfg.js";
|
|
42
42
|
|
|
43
43
|
// src/hooks/answer-capture.ts
|
|
44
44
|
import { existsSync as existsSync5 } from "fs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
budgetGateDeny
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ka7768vx.js";
|
|
5
5
|
import {
|
|
6
6
|
allow,
|
|
7
7
|
deny,
|
|
8
8
|
readPayload,
|
|
9
9
|
runHook,
|
|
10
10
|
toolInput
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import"./chunk-
|
|
11
|
+
} from "./chunk-t44983nq.js";
|
|
12
|
+
import"./chunk-qzsxhsyj.js";
|
|
13
13
|
import {
|
|
14
14
|
asRunBudget,
|
|
15
15
|
currentActor,
|
|
@@ -22,10 +22,10 @@ import {
|
|
|
22
22
|
validateRunBudget,
|
|
23
23
|
wouldExceed,
|
|
24
24
|
wouldExceedHostTokens
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-j5d0nard.js";
|
|
26
26
|
import {
|
|
27
27
|
EventLog
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-6z5rmj0b.js";
|
|
29
29
|
import {
|
|
30
30
|
cursorStage,
|
|
31
31
|
hostTokensIn,
|
|
@@ -34,18 +34,18 @@ import {
|
|
|
34
34
|
newestActiveRun,
|
|
35
35
|
renderRunEconomies,
|
|
36
36
|
runSpend
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import"./chunk-
|
|
37
|
+
} from "./chunk-yre2scxn.js";
|
|
38
|
+
import"./chunk-bznt6jb2.js";
|
|
39
39
|
import {
|
|
40
40
|
noteDeprecations
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-5stgwp3g.js";
|
|
42
42
|
import {
|
|
43
43
|
PROJECT_WORK_DIR,
|
|
44
44
|
findWorkspaceRoot,
|
|
45
45
|
locateWork,
|
|
46
46
|
parseYaml,
|
|
47
47
|
stageYamlPath
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-0sy3tmfg.js";
|
|
49
49
|
|
|
50
50
|
// src/hooks/budget-gate.ts
|
|
51
51
|
import { existsSync as existsSync2, readFileSync as readFileSync2, statSync } from "node:fs";
|
|
@@ -7742,8 +7742,7 @@ function splitArgv(command) {
|
|
|
7742
7742
|
if (/[\n\r]/.test(command))
|
|
7743
7743
|
return null;
|
|
7744
7744
|
const argv = [];
|
|
7745
|
-
const
|
|
7746
|
-
for (const match of command.matchAll(pattern)) {
|
|
7745
|
+
for (const match of command.matchAll(TOKEN_RE)) {
|
|
7747
7746
|
if (match[1] !== undefined || match[2] !== undefined) {
|
|
7748
7747
|
argv.push(match[1] ?? match[2] ?? "");
|
|
7749
7748
|
continue;
|
|
@@ -7755,7 +7754,7 @@ function splitArgv(command) {
|
|
|
7755
7754
|
}
|
|
7756
7755
|
return argv.length === 0 ? null : argv;
|
|
7757
7756
|
}
|
|
7758
|
-
|
|
7757
|
+
var TOKEN_RE = /"([^"]*)"|'([^']*)'|([^\s"']+)/g;
|
|
7759
7758
|
class DodCommandRefused extends Error {
|
|
7760
7759
|
}
|
|
7761
7760
|
async function runDodCommand(command, cwd, timeoutMs, allowed) {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
spentBasis,
|
|
9
9
|
tallyOf,
|
|
10
10
|
validateRunBudget
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-j5d0nard.js";
|
|
12
12
|
import {
|
|
13
13
|
EventLog,
|
|
14
14
|
OUTCOME_NOT_RECORDED,
|
|
@@ -21,12 +21,12 @@ import {
|
|
|
21
21
|
isTerminal,
|
|
22
22
|
stageAt,
|
|
23
23
|
validateRunFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-6z5rmj0b.js";
|
|
25
25
|
import {
|
|
26
26
|
cursorStage,
|
|
27
27
|
isAttendedByHostView,
|
|
28
28
|
openRunViews
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-yre2scxn.js";
|
|
30
30
|
import {
|
|
31
31
|
backupPathFor,
|
|
32
32
|
isAlive,
|
|
@@ -35,20 +35,20 @@ import {
|
|
|
35
35
|
workspaceRootOfRunDir,
|
|
36
36
|
writeAtomic,
|
|
37
37
|
yamlScalar
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-ezfvp5kx.js";
|
|
39
39
|
import {
|
|
40
40
|
isAdvisory,
|
|
41
41
|
noteDeprecations,
|
|
42
42
|
openBlocks,
|
|
43
43
|
parseQuestions
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-5stgwp3g.js";
|
|
45
45
|
import {
|
|
46
46
|
FRAMEWORK_ROOT,
|
|
47
47
|
PLAN_STATUSES,
|
|
48
48
|
listRunDirs,
|
|
49
49
|
parseYaml,
|
|
50
50
|
parseYamlRepairing
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-0sy3tmfg.js";
|
|
52
52
|
|
|
53
53
|
// src/core/statusline/runSnapshot.ts
|
|
54
54
|
import { existsSync as existsSync3, readFileSync as readFileSync4 } from "node:fs";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
GATE_POLICIES,
|
|
3
3
|
validateGatesPolicy,
|
|
4
4
|
validateStagePolicy
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-bznt6jb2.js";
|
|
6
6
|
import {
|
|
7
7
|
asDocument,
|
|
8
8
|
isRecord,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
requireString,
|
|
16
16
|
requireVersion,
|
|
17
17
|
result
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-0sy3tmfg.js";
|
|
19
19
|
|
|
20
20
|
// src/core/events/EventLog.ts
|
|
21
21
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
|
|
@@ -49,6 +49,7 @@ var EVENT_TYPES = [
|
|
|
49
49
|
"questions.policy_changed",
|
|
50
50
|
"story.reopened",
|
|
51
51
|
"story.base_fastforwarded",
|
|
52
|
+
"story.base_updated",
|
|
52
53
|
"story.review_retried",
|
|
53
54
|
"story.work_rescued",
|
|
54
55
|
"story.touches_widened",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PROJECT_FRAMEWORK_DIR,
|
|
3
3
|
PROJECT_WORK_DIR
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-0sy3tmfg.js";
|
|
5
5
|
|
|
6
6
|
// src/core/lock/workspaceLock.ts
|
|
7
7
|
import { existsSync as existsSync2, mkdirSync as mkdirSync2, openSync, readFileSync as readFileSync2, rmSync as rmSync2, writeSync, closeSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
STAGE_TUNING_DEFAULTS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-bznt6jb2.js";
|
|
4
4
|
import {
|
|
5
5
|
MAX_PLAN_STORIES,
|
|
6
6
|
MAX_STORIES_PER_WAVE,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
requireVersion,
|
|
26
26
|
requireVersion1,
|
|
27
27
|
result
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-0sy3tmfg.js";
|
|
29
29
|
|
|
30
30
|
// src/hooks/lib/actor.ts
|
|
31
31
|
function currentActor() {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
withWorkspaceLock,
|
|
4
4
|
workspaceRootOfFactsPath,
|
|
5
5
|
writeAtomic
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ezfvp5kx.js";
|
|
7
7
|
import {
|
|
8
8
|
FACT_CONFIDENCES,
|
|
9
9
|
FACT_DECIDERS,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
isLive,
|
|
16
16
|
isRetired,
|
|
17
17
|
noteDeprecations
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-5stgwp3g.js";
|
|
19
19
|
import {
|
|
20
20
|
SRC_PATTERNS,
|
|
21
21
|
asDocument,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
requireString,
|
|
29
29
|
requireVersion,
|
|
30
30
|
result
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-0sy3tmfg.js";
|
|
32
32
|
|
|
33
33
|
// src/core/facts/FactsStore.ts
|
|
34
34
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EMPTY_SECTION_RULE,
|
|
4
4
|
noneBullet,
|
|
5
5
|
srcRule
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-0sy3tmfg.js";
|
|
7
7
|
|
|
8
8
|
// src/hooks/lib/messages.ts
|
|
9
9
|
var GRAMMAR = "[src: <repo:path:line> | https://… | Q<n> | F<n> | $ <cmd> → exit <n> | graph:<node> | absent:<path>]";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
STAGE_TUNING_DEFAULTS,
|
|
4
4
|
parseWorkflowGates,
|
|
5
5
|
readStageTuning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-bznt6jb2.js";
|
|
7
7
|
import {
|
|
8
8
|
PROJECT_FRAMEWORK_DIR,
|
|
9
9
|
STAGES_DIR,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
isRecord,
|
|
13
13
|
loadWorkspace,
|
|
14
14
|
parseYaml
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-0sy3tmfg.js";
|
|
16
16
|
|
|
17
17
|
// src/core/run/workflowPreset.ts
|
|
18
18
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
findDuplicate
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-jpp137mb.js";
|
|
4
4
|
import {
|
|
5
5
|
evidencePath,
|
|
6
6
|
gateEvidencePath,
|
|
7
7
|
parseEvidence
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-6z5rmj0b.js";
|
|
9
9
|
import {
|
|
10
10
|
openBlocks,
|
|
11
11
|
parseQuestions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5stgwp3g.js";
|
|
13
13
|
|
|
14
14
|
// src/core/distill/distill.ts
|
|
15
15
|
var CONFLICT_THRESHOLD = 0.6;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
wouldBeContent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-n5bxz2cw.js";
|
|
5
5
|
import {
|
|
6
6
|
claimSourcesDeny,
|
|
7
7
|
claimSourcesEmptySectionDeny,
|
|
8
8
|
claimSourcesMalformedDeny,
|
|
9
9
|
claimSourcesUnresolvedDeny
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ka7768vx.js";
|
|
11
11
|
import {
|
|
12
12
|
allow,
|
|
13
13
|
deny,
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
postContext,
|
|
17
17
|
readPayload,
|
|
18
18
|
runHook
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import"./chunk-
|
|
19
|
+
} from "./chunk-t44983nq.js";
|
|
20
|
+
import"./chunk-qzsxhsyj.js";
|
|
21
21
|
import {
|
|
22
22
|
isHandoff,
|
|
23
23
|
loadWorkspace,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
toSrcContext,
|
|
26
26
|
validateCitations,
|
|
27
27
|
validateHandoff
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-0sy3tmfg.js";
|
|
29
29
|
|
|
30
30
|
// src/hooks/claim-sources.ts
|
|
31
31
|
await runHook("claim-sources", async () => {
|
package/dist/hooks/dod-gate.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
wouldBeContent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-n5bxz2cw.js";
|
|
5
5
|
import {
|
|
6
6
|
dodGateDeny,
|
|
7
7
|
dodGateInternalErrorDeny,
|
|
8
8
|
dodGateMissingBlockDeny,
|
|
9
9
|
dodGateRefusedCommandDeny
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ka7768vx.js";
|
|
11
11
|
import {
|
|
12
12
|
allow,
|
|
13
13
|
deny,
|
|
@@ -15,16 +15,16 @@ import {
|
|
|
15
15
|
filePathOf,
|
|
16
16
|
isWriteOrEdit,
|
|
17
17
|
readPayload
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import"./chunk-
|
|
18
|
+
} from "./chunk-t44983nq.js";
|
|
19
|
+
import"./chunk-qzsxhsyj.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_TIMEOUT_S,
|
|
22
22
|
buildStageDefaults
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-m1s8a6s0.js";
|
|
24
24
|
import {
|
|
25
25
|
loadRunView
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import"./chunk-
|
|
26
|
+
} from "./chunk-yre2scxn.js";
|
|
27
|
+
import"./chunk-bznt6jb2.js";
|
|
28
28
|
import {
|
|
29
29
|
DodCommandRefused,
|
|
30
30
|
loadWorkspace,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
readStory,
|
|
33
33
|
repoPath,
|
|
34
34
|
runDodCommand
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-0sy3tmfg.js";
|
|
36
36
|
|
|
37
37
|
// src/hooks/dod-gate.ts
|
|
38
38
|
import { basename, join } from "node:path";
|
package/dist/hooks/no-reask.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
wouldBeContent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-n5bxz2cw.js";
|
|
5
5
|
import {
|
|
6
6
|
noReAskDeny
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ka7768vx.js";
|
|
8
8
|
import {
|
|
9
9
|
FactsStore
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-jpp137mb.js";
|
|
11
11
|
import {
|
|
12
12
|
allow,
|
|
13
13
|
deny,
|
|
@@ -15,17 +15,17 @@ import {
|
|
|
15
15
|
isWriteOrEdit,
|
|
16
16
|
readPayload,
|
|
17
17
|
runHook
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import"./chunk-
|
|
20
|
-
import"./chunk-
|
|
18
|
+
} from "./chunk-t44983nq.js";
|
|
19
|
+
import"./chunk-qzsxhsyj.js";
|
|
20
|
+
import"./chunk-ezfvp5kx.js";
|
|
21
21
|
import {
|
|
22
22
|
openBlocks,
|
|
23
23
|
parseQuestions
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-5stgwp3g.js";
|
|
25
25
|
import {
|
|
26
26
|
factsPath,
|
|
27
27
|
locateWork
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-0sy3tmfg.js";
|
|
29
29
|
|
|
30
30
|
// src/hooks/no-reask.ts
|
|
31
31
|
import { existsSync, readFileSync } from "node:fs";
|