tldr-experts 0.26.1 → 0.28.0
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 +156 -0
- package/README.md +2 -0
- package/dist/hooks/answer-capture.js +9 -9
- package/dist/hooks/budget-gate.js +9 -9
- package/dist/hooks/{chunk-jpp137mb.js → chunk-48ctk154.js} +3 -3
- package/dist/hooks/{chunk-41k19q8t.js → chunk-abswp1vt.js} +3 -2
- package/dist/hooks/{chunk-d0jhr5wh.js → chunk-c62y35wh.js} +3 -3
- package/dist/hooks/{chunk-0sy3tmfg.js → chunk-f6t1xc3f.js} +26 -3
- package/dist/hooks/{chunk-bznt6jb2.js → chunk-g7wz339n.js} +1 -1
- package/dist/hooks/{chunk-yre2scxn.js → chunk-hws2gnxj.js} +1 -1
- package/dist/hooks/{chunk-qzsxhsyj.js → chunk-khjm356r.js} +1 -1
- package/dist/hooks/{chunk-5stgwp3g.js → chunk-khy21x6e.js} +30 -12
- package/dist/hooks/{chunk-pwzy19er.js → chunk-kx45kt9n.js} +40 -6
- package/dist/hooks/{chunk-ka7768vx.js → chunk-q3d4xdhb.js} +1 -1
- package/dist/hooks/{chunk-t44983nq.js → chunk-tna1bz8r.js} +1 -1
- package/dist/hooks/{chunk-m1s8a6s0.js → chunk-veffvzw5.js} +2 -2
- package/dist/hooks/{chunk-bbrhs055.js → chunk-xhd77h0p.js} +26 -22
- package/dist/hooks/{chunk-n5bxz2cw.js → chunk-zrwq6r7k.js} +1 -1
- package/dist/hooks/{chunk-ezfvp5kx.js → chunk-zvxgdssb.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 +2364 -1178
- package/package.json +1 -1
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/skills/tldrx-plan/SKILL.md +16 -5
- package/stages/plan/stage.md +1 -0
- package/templates/questions.md +2 -0
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
STAGE_TUNING_DEFAULTS,
|
|
4
4
|
parseWorkflowGates,
|
|
5
5
|
readStageTuning
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-g7wz339n.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-f6t1xc3f.js";
|
|
16
16
|
|
|
17
17
|
// src/core/run/workflowPreset.ts
|
|
18
18
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
STAGE_TUNING_DEFAULTS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-g7wz339n.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-f6t1xc3f.js";
|
|
29
29
|
|
|
30
30
|
// src/hooks/lib/actor.ts
|
|
31
31
|
function currentActor() {
|
|
@@ -222,6 +222,16 @@ function hostTokenCeiling(budget, phaseId) {
|
|
|
222
222
|
return budget.ceiling_host_tokens ?? budget.ceiling_usd;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
// src/core/build/caps.ts
|
|
226
|
+
var MAX_ATTEMPTS = STAGE_TUNING_DEFAULTS.attempts;
|
|
227
|
+
var REVIEWER_SHARE = STAGE_TUNING_DEFAULTS.reviewerShare;
|
|
228
|
+
var REVIEWER_FLOOR_USD = 2;
|
|
229
|
+
var STORY_CAP_MULTIPLIER = STAGE_TUNING_DEFAULTS.storyCapMultiplier;
|
|
230
|
+
var STORY_CAP_FLOOR_USD = STAGE_TUNING_DEFAULTS.storyCapFloorUsd;
|
|
231
|
+
function shortBy(estimate, remaining) {
|
|
232
|
+
return Math.max(0.01, Math.ceil((estimate - remaining) * 100) / 100);
|
|
233
|
+
}
|
|
234
|
+
|
|
225
235
|
// src/core/budget/remainingWork.ts
|
|
226
236
|
import { existsSync as existsSync6, readFileSync as readFileSync6 } from "node:fs";
|
|
227
237
|
import { join as join6 } from "node:path";
|
|
@@ -794,6 +804,7 @@ function validateBudget(input) {
|
|
|
794
804
|
}
|
|
795
805
|
|
|
796
806
|
// src/core/plan/validatePlan.ts
|
|
807
|
+
var WAVES_FILE = "waves.yml";
|
|
797
808
|
var PLAN_BUDGET_FILE = "budget.yml";
|
|
798
809
|
|
|
799
810
|
// src/core/build/plan.ts
|
|
@@ -971,12 +982,11 @@ function looksLikeSpawnError(detail) {
|
|
|
971
982
|
}
|
|
972
983
|
|
|
973
984
|
// src/core/budget/remainingWork.ts
|
|
974
|
-
var
|
|
975
|
-
var
|
|
976
|
-
var
|
|
977
|
-
var
|
|
978
|
-
|
|
979
|
-
function developerAttemptDivisor(attempt, attempts = MAX_ATTEMPTS) {
|
|
985
|
+
var MAX_ATTEMPTS2 = STAGE_TUNING_DEFAULTS.attempts;
|
|
986
|
+
var REVIEWER_SHARE2 = STAGE_TUNING_DEFAULTS.reviewerShare;
|
|
987
|
+
var STORY_CAP_MULTIPLIER2 = STAGE_TUNING_DEFAULTS.storyCapMultiplier;
|
|
988
|
+
var STORY_CAP_FLOOR_USD2 = STAGE_TUNING_DEFAULTS.storyCapFloorUsd;
|
|
989
|
+
function developerAttemptDivisor(attempt, attempts = MAX_ATTEMPTS2) {
|
|
980
990
|
return attempt <= 1 ? 1 : attempts;
|
|
981
991
|
}
|
|
982
992
|
function remainingWork(input) {
|
|
@@ -1028,7 +1038,7 @@ function measure(input) {
|
|
|
1028
1038
|
const ids = new Set(all.map((story) => story.id));
|
|
1029
1039
|
const prices = progress.implicit ? new Map : loadPlanPrices(join6(input.runDir, PLAN_DIR), ids).prices;
|
|
1030
1040
|
const verdicts = reviewVerdictsByStory(input.runDir);
|
|
1031
|
-
const attempts = input.attempts ??
|
|
1041
|
+
const attempts = input.attempts ?? MAX_ATTEMPTS2;
|
|
1032
1042
|
const caps = new CapMath(input, prices, all.length);
|
|
1033
1043
|
const stories = [];
|
|
1034
1044
|
const blocked = [];
|
|
@@ -1112,9 +1122,9 @@ class CapMath {
|
|
|
1112
1122
|
return round2(Math.min(Math.max(derived, floor), this.maxBudgetUsd));
|
|
1113
1123
|
}
|
|
1114
1124
|
storyCeiling(price) {
|
|
1115
|
-
const declared = this.input.storyCapFloorUsd ??
|
|
1125
|
+
const declared = this.input.storyCapFloorUsd ?? STORY_CAP_FLOOR_USD2;
|
|
1116
1126
|
const floor = this.input.stageBudgetUsd > 0 ? Math.min(declared, this.input.stageBudgetUsd) : declared;
|
|
1117
|
-
return Math.max(price * (this.input.storyCapMultiplier ??
|
|
1127
|
+
return Math.max(price * (this.input.storyCapMultiplier ?? STORY_CAP_MULTIPLIER2), floor);
|
|
1118
1128
|
}
|
|
1119
1129
|
priceOf(storyId) {
|
|
1120
1130
|
const price = this.prices.get(storyId);
|
|
@@ -1126,10 +1136,10 @@ class CapMath {
|
|
|
1126
1136
|
return this.input.stageBudgetUsd <= 0 ? 1 : usd / this.input.stageBudgetUsd;
|
|
1127
1137
|
}
|
|
1128
1138
|
attempts() {
|
|
1129
|
-
return this.input.attempts ??
|
|
1139
|
+
return this.input.attempts ?? MAX_ATTEMPTS2;
|
|
1130
1140
|
}
|
|
1131
1141
|
reviewerShare() {
|
|
1132
|
-
return this.input.reviewerShare ??
|
|
1142
|
+
return this.input.reviewerShare ?? REVIEWER_SHARE2;
|
|
1133
1143
|
}
|
|
1134
1144
|
worstCaseShares() {
|
|
1135
1145
|
return Math.max(this.storyCount, 1) * this.attempts() * (1 + this.reviewerShare());
|
|
@@ -1235,18 +1245,12 @@ function wouldExceedHostTokens(budget, phaseId, spentTokens) {
|
|
|
1235
1245
|
};
|
|
1236
1246
|
}
|
|
1237
1247
|
|
|
1238
|
-
// src/core/
|
|
1239
|
-
var
|
|
1240
|
-
var REVIEWER_SHARE2 = STAGE_TUNING_DEFAULTS.reviewerShare;
|
|
1241
|
-
var STORY_CAP_MULTIPLIER2 = STAGE_TUNING_DEFAULTS.storyCapMultiplier;
|
|
1242
|
-
var STORY_CAP_FLOOR_USD2 = STAGE_TUNING_DEFAULTS.storyCapFloorUsd;
|
|
1243
|
-
function shortBy(estimate, remaining) {
|
|
1244
|
-
return Math.max(0.01, Math.ceil((estimate - remaining) * 100) / 100);
|
|
1245
|
-
}
|
|
1248
|
+
// src/core/budget/rebalance.ts
|
|
1249
|
+
var SETTLED = new Set(["done", "skipped"]);
|
|
1246
1250
|
|
|
1247
1251
|
// src/core/budget/budgetView.ts
|
|
1248
1252
|
function raiseCommand(runId, phaseId, amountUsd) {
|
|
1249
1253
|
return `tldrx budget raise ${phaseId} ${amountUsd.toFixed(2)} --run ${runId}`;
|
|
1250
1254
|
}
|
|
1251
1255
|
|
|
1252
|
-
export { currentActor, nowRfc3339, spentBasis, tallyOf, DEFAULT_ON_HOST_TOKENS_EXCEED, DEFAULT_ON_GRANT_EXCEED, DEFAULT_ECONOMY, economyFor, isHostTokens, validateRunBudget, asRunBudget, expertsDir, loadExperts, readExpertDomain, pathsIntersect, stackExpertNames, BUILD_PHASE2 as BUILD_PHASE, remainingWork, wouldExceed, wouldExceedHostTokens,
|
|
1256
|
+
export { currentActor, nowRfc3339, spentBasis, tallyOf, DEFAULT_ON_HOST_TOKENS_EXCEED, DEFAULT_ON_GRANT_EXCEED, DEFAULT_ECONOMY, economyFor, isHostTokens, validateRunBudget, asRunBudget, expertsDir, loadExperts, readExpertDomain, pathsIntersect, stackExpertNames, WAVES_FILE, BUILD_PHASE2 as BUILD_PHASE, shortBy, remainingWork, wouldExceed, wouldExceedHostTokens, raiseCommand };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PROJECT_FRAMEWORK_DIR,
|
|
3
3
|
PROJECT_WORK_DIR
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-f6t1xc3f.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,13 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
wouldBeContent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-zrwq6r7k.js";
|
|
5
5
|
import {
|
|
6
6
|
claimSourcesDeny,
|
|
7
7
|
claimSourcesEmptySectionDeny,
|
|
8
8
|
claimSourcesMalformedDeny,
|
|
9
9
|
claimSourcesUnresolvedDeny
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-q3d4xdhb.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-tna1bz8r.js";
|
|
20
|
+
import"./chunk-khjm356r.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-f6t1xc3f.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-zrwq6r7k.js";
|
|
5
5
|
import {
|
|
6
6
|
dodGateDeny,
|
|
7
7
|
dodGateInternalErrorDeny,
|
|
8
8
|
dodGateMissingBlockDeny,
|
|
9
9
|
dodGateRefusedCommandDeny
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-q3d4xdhb.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-tna1bz8r.js";
|
|
19
|
+
import"./chunk-khjm356r.js";
|
|
20
20
|
import {
|
|
21
21
|
DEFAULT_TIMEOUT_S,
|
|
22
22
|
buildStageDefaults
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-veffvzw5.js";
|
|
24
24
|
import {
|
|
25
25
|
loadRunView
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import"./chunk-
|
|
26
|
+
} from "./chunk-hws2gnxj.js";
|
|
27
|
+
import"./chunk-g7wz339n.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-f6t1xc3f.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-zrwq6r7k.js";
|
|
5
5
|
import {
|
|
6
6
|
noReAskDeny
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-q3d4xdhb.js";
|
|
8
8
|
import {
|
|
9
9
|
FactsStore
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-48ctk154.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-tna1bz8r.js";
|
|
19
|
+
import"./chunk-khjm356r.js";
|
|
20
|
+
import"./chunk-zvxgdssb.js";
|
|
21
21
|
import {
|
|
22
22
|
openBlocks,
|
|
23
23
|
parseQuestions
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-khy21x6e.js";
|
|
25
25
|
import {
|
|
26
26
|
factsPath,
|
|
27
27
|
locateWork
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-f6t1xc3f.js";
|
|
29
29
|
|
|
30
30
|
// src/hooks/no-reask.ts
|
|
31
31
|
import { existsSync, readFileSync } from "node:fs";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
questionsCard
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import"./chunk-
|
|
4
|
+
} from "./chunk-c62y35wh.js";
|
|
5
|
+
import"./chunk-48ctk154.js";
|
|
6
6
|
import {
|
|
7
7
|
allow,
|
|
8
8
|
readPayload,
|
|
9
9
|
runHook,
|
|
10
10
|
sessionContext
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import"./chunk-
|
|
11
|
+
} from "./chunk-tna1bz8r.js";
|
|
12
|
+
import"./chunk-khjm356r.js";
|
|
13
13
|
import {
|
|
14
14
|
RunStore,
|
|
15
15
|
closedByMachine,
|
|
@@ -20,27 +20,27 @@ import {
|
|
|
20
20
|
runSnapshot,
|
|
21
21
|
statusWithOutcome,
|
|
22
22
|
whatIsWaiting
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-kx45kt9n.js";
|
|
24
24
|
import {
|
|
25
25
|
expertsDir,
|
|
26
26
|
loadExperts,
|
|
27
27
|
pathsIntersect,
|
|
28
28
|
readExpertDomain,
|
|
29
29
|
stackExpertNames
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-xhd77h0p.js";
|
|
31
31
|
import {
|
|
32
32
|
isFinished
|
|
33
|
-
} from "./chunk-
|
|
34
|
-
import"./chunk-
|
|
33
|
+
} from "./chunk-abswp1vt.js";
|
|
34
|
+
import"./chunk-veffvzw5.js";
|
|
35
35
|
import {
|
|
36
36
|
openRunViews
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import"./chunk-
|
|
39
|
-
import"./chunk-
|
|
37
|
+
} from "./chunk-hws2gnxj.js";
|
|
38
|
+
import"./chunk-g7wz339n.js";
|
|
39
|
+
import"./chunk-zvxgdssb.js";
|
|
40
40
|
import {
|
|
41
41
|
openBlocks,
|
|
42
42
|
parseQuestions
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-khy21x6e.js";
|
|
44
44
|
import {
|
|
45
45
|
PROJECT_FRAMEWORK_DIR,
|
|
46
46
|
PROJECT_WORK_DIR,
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
isRecord,
|
|
51
51
|
listRunDirs,
|
|
52
52
|
parseYaml
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-f6t1xc3f.js";
|
|
54
54
|
|
|
55
55
|
// src/core/status/PendingItem.ts
|
|
56
56
|
function isPending(item) {
|
package/dist/hooks/statusline.js
CHANGED
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
bar,
|
|
4
4
|
runSnapshot
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import"./chunk-
|
|
7
|
-
import"./chunk-
|
|
8
|
-
import"./chunk-
|
|
9
|
-
import"./chunk-
|
|
10
|
-
import"./chunk-
|
|
11
|
-
import"./chunk-
|
|
12
|
-
import"./chunk-
|
|
5
|
+
} from "./chunk-kx45kt9n.js";
|
|
6
|
+
import"./chunk-xhd77h0p.js";
|
|
7
|
+
import"./chunk-abswp1vt.js";
|
|
8
|
+
import"./chunk-veffvzw5.js";
|
|
9
|
+
import"./chunk-hws2gnxj.js";
|
|
10
|
+
import"./chunk-g7wz339n.js";
|
|
11
|
+
import"./chunk-zvxgdssb.js";
|
|
12
|
+
import"./chunk-khy21x6e.js";
|
|
13
13
|
import {
|
|
14
14
|
findWorkspaceRoot,
|
|
15
15
|
runtime
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-f6t1xc3f.js";
|
|
17
17
|
|
|
18
18
|
// src/core/statusline/renderStatusLine.ts
|
|
19
19
|
var NO_SESSION_DATA = "[tldrx] no session data";
|