@open-tomato/rafa 0.14.0 → 0.16.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/README.md +31 -1
- package/dist/cli.js +16158 -12213
- package/dist/describe-wbn759vf.js +13 -0
- package/dist/effort/store/index.js +4 -2
- package/dist/index-1vtd5fr7.js +13296 -0
- package/dist/{index-96pz9023.js → index-6cw1n0qy.js} +56 -394
- package/dist/index-kph6p7rp.js +19506 -0
- package/dist/{index-p96zrptw.js → index-krjzghpz.js} +6 -4
- package/dist/index-n3rw8rhr.js +397 -0
- package/dist/index-p901zs2p.js +124 -0
- package/dist/{index-g9kvby04.js → index-q491ekzm.js} +10 -26
- package/dist/index-qzhpqmfy.js +234 -0
- package/dist/index.js +40 -11643
- package/dist/plan/index.js +5 -3
- package/package.json +1 -1
|
@@ -1,395 +1,33 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var DECLARATION_BLOCK = /\{([^{}]*)\}$/;
|
|
32
|
-
var ENTRY_TOKEN = /^([A-Za-z_][A-Za-z0-9_-]*)=(.*)$/;
|
|
33
|
-
var FULL_MODEL_NAME = /^claude-[a-z0-9][a-z0-9.-]*$/;
|
|
34
|
-
var AGENT_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
35
|
-
function isAgentName(value) {
|
|
36
|
-
return AGENT_NAME.test(value);
|
|
37
|
-
}
|
|
38
|
-
var TOOL_NAME = /^[A-Za-z][A-Za-z0-9_-]*$/;
|
|
39
|
-
var SKILL_NAME = /^[A-Za-z0-9][A-Za-z0-9_-]*$/;
|
|
40
|
-
var BUDGET_FLAG = "--max-budget-usd";
|
|
41
|
-
var BUDGET_VALUE = /^(?:0|[1-9]\d{0,5})(?:\.\d{1,6})?$/;
|
|
42
|
-
function parseBudgetUsd(value) {
|
|
43
|
-
if (!BUDGET_VALUE.test(value))
|
|
44
|
-
return null;
|
|
45
|
-
const usd = Number(value);
|
|
46
|
-
return usd > 0 ? usd : null;
|
|
47
|
-
}
|
|
48
|
-
function isEffortLevel(value) {
|
|
49
|
-
return EFFORT_LEVELS.includes(value);
|
|
50
|
-
}
|
|
51
|
-
function isModelValue(value) {
|
|
52
|
-
if (MODEL_ALIASES.includes(value))
|
|
53
|
-
return true;
|
|
54
|
-
return FULL_MODEL_NAME.test(value);
|
|
55
|
-
}
|
|
56
|
-
function parseToolList(value) {
|
|
57
|
-
const parts = value.split(",");
|
|
58
|
-
if (parts.length === 0)
|
|
59
|
-
return null;
|
|
60
|
-
const tools = [];
|
|
61
|
-
for (const part of parts) {
|
|
62
|
-
if (!TOOL_NAME.test(part))
|
|
63
|
-
return null;
|
|
64
|
-
if (!tools.includes(part))
|
|
65
|
-
tools.push(part);
|
|
66
|
-
}
|
|
67
|
-
return tools;
|
|
68
|
-
}
|
|
69
|
-
function parseSkillList(value) {
|
|
70
|
-
const parts = value.split(",");
|
|
71
|
-
if (parts.length === 0)
|
|
72
|
-
return null;
|
|
73
|
-
const skills = [];
|
|
74
|
-
for (const part of parts) {
|
|
75
|
-
if (!SKILL_NAME.test(part))
|
|
76
|
-
return null;
|
|
77
|
-
if (!skills.includes(part))
|
|
78
|
-
skills.push(part);
|
|
79
|
-
}
|
|
80
|
-
return skills;
|
|
81
|
-
}
|
|
82
|
-
function unusableValue(key, token) {
|
|
83
|
-
return { reason: "unusable-value", key, text: token };
|
|
84
|
-
}
|
|
85
|
-
function isDeclarationKey(key) {
|
|
86
|
-
return DECLARATION_KEYS.includes(key);
|
|
87
|
-
}
|
|
88
|
-
function tokenise(body) {
|
|
89
|
-
const trimmed = body.trim();
|
|
90
|
-
if (trimmed.length === 0)
|
|
91
|
-
return [];
|
|
92
|
-
return trimmed.split(/\s+/);
|
|
93
|
-
}
|
|
94
|
-
function readBlock(raw, body) {
|
|
95
|
-
const entries = [];
|
|
96
|
-
const extras = [];
|
|
97
|
-
const issues = [];
|
|
98
|
-
const seen = new Set;
|
|
99
|
-
let agent = null;
|
|
100
|
-
let model = null;
|
|
101
|
-
let effort = null;
|
|
102
|
-
let budget = null;
|
|
103
|
-
let tools = null;
|
|
104
|
-
let skills = null;
|
|
105
|
-
for (const token of tokenise(body)) {
|
|
106
|
-
const match = token.match(ENTRY_TOKEN);
|
|
107
|
-
const key = match?.[1];
|
|
108
|
-
const value = match?.[2];
|
|
109
|
-
if (key === undefined || value === undefined) {
|
|
110
|
-
issues.push({ reason: "stray-token", key: "", text: token });
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
113
|
-
const entry = { key, value };
|
|
114
|
-
entries.push(entry);
|
|
115
|
-
if (!isDeclarationKey(key)) {
|
|
116
|
-
extras.push(entry);
|
|
117
|
-
continue;
|
|
118
|
-
}
|
|
119
|
-
if (seen.has(key)) {
|
|
120
|
-
issues.push({ reason: "duplicate-key", key, text: token });
|
|
121
|
-
continue;
|
|
122
|
-
}
|
|
123
|
-
seen.add(key);
|
|
124
|
-
if (key === "agent") {
|
|
125
|
-
if (AGENT_NAME.test(value))
|
|
126
|
-
agent = value;
|
|
127
|
-
else
|
|
128
|
-
issues.push(unusableValue(key, token));
|
|
129
|
-
continue;
|
|
130
|
-
}
|
|
131
|
-
if (key === "model") {
|
|
132
|
-
if (isModelValue(value))
|
|
133
|
-
model = value;
|
|
134
|
-
else
|
|
135
|
-
issues.push(unusableValue(key, token));
|
|
136
|
-
continue;
|
|
137
|
-
}
|
|
138
|
-
if (key === "effort") {
|
|
139
|
-
if (isEffortLevel(value))
|
|
140
|
-
effort = value;
|
|
141
|
-
else
|
|
142
|
-
issues.push(unusableValue(key, token));
|
|
143
|
-
continue;
|
|
144
|
-
}
|
|
145
|
-
if (key === "budget") {
|
|
146
|
-
const usd = parseBudgetUsd(value);
|
|
147
|
-
if (usd === null)
|
|
148
|
-
issues.push(unusableValue(key, token));
|
|
149
|
-
else
|
|
150
|
-
budget = usd;
|
|
151
|
-
continue;
|
|
152
|
-
}
|
|
153
|
-
if (key === "tools") {
|
|
154
|
-
const parsed = parseToolList(value);
|
|
155
|
-
if (parsed === null)
|
|
156
|
-
issues.push(unusableValue(key, token));
|
|
157
|
-
else
|
|
158
|
-
tools = parsed;
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
const named = parseSkillList(value);
|
|
162
|
-
if (named === null)
|
|
163
|
-
issues.push(unusableValue(key, token));
|
|
164
|
-
else
|
|
165
|
-
skills = named;
|
|
166
|
-
}
|
|
167
|
-
if (seen.size === 0)
|
|
168
|
-
return null;
|
|
169
|
-
return {
|
|
170
|
-
raw,
|
|
171
|
-
entries,
|
|
172
|
-
extras,
|
|
173
|
-
issues,
|
|
174
|
-
agent,
|
|
175
|
-
model,
|
|
176
|
-
effort,
|
|
177
|
-
budget,
|
|
178
|
-
tools,
|
|
179
|
-
skills
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
function parseTaskDeclaration(taskText) {
|
|
183
|
-
const trimmed = taskText.trimEnd();
|
|
184
|
-
const match = trimmed.match(DECLARATION_BLOCK);
|
|
185
|
-
const raw = match?.[0];
|
|
186
|
-
const body = match?.[1];
|
|
187
|
-
if (raw === undefined || body === undefined) {
|
|
188
|
-
return { text: taskText, declaration: null };
|
|
189
|
-
}
|
|
190
|
-
const before = trimmed.slice(0, trimmed.length - raw.length).trimEnd();
|
|
191
|
-
if (before.length === 0)
|
|
192
|
-
return { text: taskText, declaration: null };
|
|
193
|
-
const declaration = readBlock(raw, body);
|
|
194
|
-
if (declaration === null)
|
|
195
|
-
return { text: taskText, declaration: null };
|
|
196
|
-
return { text: before, declaration };
|
|
197
|
-
}
|
|
198
|
-
function stripTaskDeclaration(taskText) {
|
|
199
|
-
return parseTaskDeclaration(taskText).text;
|
|
200
|
-
}
|
|
201
|
-
function budgetArgs(budget) {
|
|
202
|
-
return budget === null ? [] : [BUDGET_FLAG, String(budget)];
|
|
203
|
-
}
|
|
204
|
-
function resolveDeclarationFlags(declaration, agentDeclaresEffort) {
|
|
205
|
-
if (declaration === null)
|
|
206
|
-
return { args: [], suppressed: [] };
|
|
207
|
-
const { agent, effort } = declaration;
|
|
208
|
-
const isPresent = (key) => declaration[key] !== null;
|
|
209
|
-
const budget = budgetArgs(declaration.budget);
|
|
210
|
-
if (agent !== null) {
|
|
211
|
-
if (effort === null || agentDeclaresEffort(agent)) {
|
|
212
|
-
return { args: ["--agent", agent, ...budget], suppressed: GRANULAR_KEYS.filter(isPresent) };
|
|
213
|
-
}
|
|
214
|
-
return {
|
|
215
|
-
args: ["--agent", agent, "--effort", effort, ...budget],
|
|
216
|
-
suppressed: AGENT_OWNED_KEYS.filter(isPresent)
|
|
217
|
-
};
|
|
218
|
-
}
|
|
219
|
-
const args = [];
|
|
220
|
-
if (declaration.model !== null)
|
|
221
|
-
args.push("--model", declaration.model);
|
|
222
|
-
if (declaration.effort !== null)
|
|
223
|
-
args.push("--effort", declaration.effort);
|
|
224
|
-
args.push(...budget);
|
|
225
|
-
if (declaration.tools !== null) {
|
|
226
|
-
args.push("--tools", declaration.tools.join(","));
|
|
227
|
-
}
|
|
228
|
-
return { args, suppressed: [] };
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
// src/config-sections.ts
|
|
232
|
-
function isMapping(value) {
|
|
233
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
234
|
-
}
|
|
235
|
-
function describeValue(value) {
|
|
236
|
-
if (typeof value === "string")
|
|
237
|
-
return JSON.stringify(value);
|
|
238
|
-
if (value === null)
|
|
239
|
-
return "null";
|
|
240
|
-
if (Array.isArray(value))
|
|
241
|
-
return "a list";
|
|
242
|
-
if (typeof value === "object")
|
|
243
|
-
return "a mapping";
|
|
244
|
-
return String(value);
|
|
245
|
-
}
|
|
246
|
-
function messageOf(error) {
|
|
247
|
-
return error instanceof Error ? error.message : String(error);
|
|
248
|
-
}
|
|
249
|
-
var CONFIG_VERSIONS = [1];
|
|
250
|
-
var STORE_BACKENDS = ["sqlite", "ndjson"];
|
|
251
|
-
var INJECT_MODES = ["full", "stage", "task"];
|
|
252
|
-
var OUTPUT_MODES = ["text", "json"];
|
|
253
|
-
var CLAUDE_SETTING_SOURCES = ["user", "project", "local"];
|
|
254
|
-
var PR_PROVIDERS = ["gh", "none"];
|
|
255
|
-
var RELEASE_AUTO = "auto";
|
|
256
|
-
function accepted(value) {
|
|
257
|
-
return { value, problems: [], extras: [] };
|
|
258
|
-
}
|
|
259
|
-
function refused(at, raw, expected) {
|
|
260
|
-
const problem = `${at.label} is ${describeValue(raw)}, expected ${expected}`;
|
|
261
|
-
return { value: undefined, problems: [problem], extras: [] };
|
|
262
|
-
}
|
|
263
|
-
function refusedWith(problems) {
|
|
264
|
-
return { value: undefined, problems, extras: [] };
|
|
265
|
-
}
|
|
266
|
-
function mapReading(reading, map) {
|
|
267
|
-
return reading.value === undefined ? { ...reading, value: undefined } : { ...reading, value: map(reading.value) };
|
|
268
|
-
}
|
|
269
|
-
function below(at, step) {
|
|
270
|
-
return { label: `${at.label}${step}`, key: `${at.key}${step}` };
|
|
271
|
-
}
|
|
272
|
-
function oneOf(values) {
|
|
273
|
-
const expected = `one of: ${values.join(", ")}`;
|
|
274
|
-
return (raw, at) => {
|
|
275
|
-
const hit = values.find((value) => value === raw);
|
|
276
|
-
return hit === undefined ? refused(at, raw, expected) : accepted(hit);
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
function text(expected) {
|
|
280
|
-
return (raw, at) => typeof raw === "string" && raw.trim() !== "" ? accepted(raw) : refused(at, raw, expected);
|
|
281
|
-
}
|
|
282
|
-
var flag = (raw, at) => typeof raw === "boolean" ? accepted(raw) : refused(at, raw, "true or false");
|
|
283
|
-
var mergeMethod = oneOf(MERGE_METHODS);
|
|
284
|
-
var usdAmount = (raw, at) => {
|
|
285
|
-
const usd = typeof raw === "number" ? parseBudgetUsd(String(raw)) : null;
|
|
286
|
-
return usd === null ? refused(at, raw, "a number of US dollars above zero, at most six digits either side of the point") : accepted(usd);
|
|
287
|
-
};
|
|
288
|
-
var issueNumber = (raw, at) => typeof raw === "number" && Number.isSafeInteger(raw) && raw > 0 ? accepted(raw) : refused(at, raw, "an issue number, a whole number above zero");
|
|
289
|
-
var releaseEnabled = (raw, at) => typeof raw === "boolean" || raw === RELEASE_AUTO ? accepted(raw) : refused(at, raw, `true, false or ${RELEASE_AUTO}`);
|
|
290
|
-
var GITHUB_LOGIN = /^[A-Za-z0-9][A-Za-z0-9-]*(?:\[bot\])?$/;
|
|
291
|
-
function isGitHubLogin(value) {
|
|
292
|
-
return typeof value === "string" && GITHUB_LOGIN.test(value);
|
|
293
|
-
}
|
|
294
|
-
var githubLogin = (raw, at) => isGitHubLogin(raw) ? accepted(raw) : refused(at, raw, "a GitHub login");
|
|
295
|
-
function listOf(item, expected) {
|
|
296
|
-
return (raw, at) => {
|
|
297
|
-
if (!Array.isArray(raw))
|
|
298
|
-
return refused(at, raw, `a list of ${expected}`);
|
|
299
|
-
const readings = raw.map((entry, index) => item(entry, below(at, `[${index}]`)));
|
|
300
|
-
const problems = readings.flatMap((reading) => reading.problems);
|
|
301
|
-
const extras = readings.flatMap((reading) => reading.extras);
|
|
302
|
-
if (problems.length > 0)
|
|
303
|
-
return { value: undefined, problems, extras };
|
|
304
|
-
const values = readings.flatMap((reading) => reading.value === undefined ? [] : [reading.value]);
|
|
305
|
-
return { value: Object.freeze(values), problems, extras };
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
function subsetOf(values) {
|
|
309
|
-
const expected = `a comma-separated subset of: ${values.join(", ")}`;
|
|
310
|
-
return (raw, at) => {
|
|
311
|
-
if (typeof raw !== "string")
|
|
312
|
-
return refused(at, raw, expected);
|
|
313
|
-
const named = [];
|
|
314
|
-
for (const entry of raw.split(",")) {
|
|
315
|
-
const hit = values.find((value) => value === entry.trim());
|
|
316
|
-
if (hit === undefined || named.includes(hit))
|
|
317
|
-
return refused(at, raw, expected);
|
|
318
|
-
named.push(hit);
|
|
319
|
-
}
|
|
320
|
-
return accepted(Object.freeze(named));
|
|
321
|
-
};
|
|
322
|
-
}
|
|
323
|
-
var itemText = text("a non-empty string");
|
|
324
|
-
function readKeyedItem(shape, raw, at) {
|
|
325
|
-
const choices = shape.kinds.join(", ");
|
|
326
|
-
if (!isMapping(raw))
|
|
327
|
-
return refused(at, raw, `a mapping naming one of: ${choices}`);
|
|
328
|
-
const entries = Object.entries(raw);
|
|
329
|
-
const kinds = shape.kinds.filter((kind2) => entries.some(([name]) => name === kind2));
|
|
330
|
-
const [kind] = kinds;
|
|
331
|
-
if (kind === undefined)
|
|
332
|
-
return refusedWith([`${at.label} names none of: ${choices}`]);
|
|
333
|
-
if (kinds.length > 1) {
|
|
334
|
-
const named2 = kinds.join(" and ");
|
|
335
|
-
return refusedWith([`${at.label} names ${named2}, expected exactly one of: ${choices}`]);
|
|
336
|
-
}
|
|
337
|
-
const optionalKeys = shape.optionalFor(kind);
|
|
338
|
-
const problems = [];
|
|
339
|
-
const extras = [];
|
|
340
|
-
const optional = new Map;
|
|
341
|
-
let named;
|
|
342
|
-
for (const [name, value] of entries) {
|
|
343
|
-
if (name !== kind && !optionalKeys.includes(name)) {
|
|
344
|
-
extras.push({ key: `${at.key}.${name}`, value });
|
|
345
|
-
continue;
|
|
346
|
-
}
|
|
347
|
-
if (name !== kind && value === null)
|
|
348
|
-
continue;
|
|
349
|
-
const reading = itemText(value, below(at, `.${name}`));
|
|
350
|
-
problems.push(...reading.problems);
|
|
351
|
-
if (reading.value === undefined)
|
|
352
|
-
continue;
|
|
353
|
-
if (name === kind)
|
|
354
|
-
named = reading.value;
|
|
355
|
-
else
|
|
356
|
-
optional.set(name, reading.value);
|
|
357
|
-
}
|
|
358
|
-
return problems.length > 0 || named === undefined ? { value: undefined, problems, extras } : { value: { kind, named, optional }, problems, extras };
|
|
359
|
-
}
|
|
360
|
-
var PREREQUISITE_KINDS = ["tool", "env", "service", "lsp"];
|
|
361
|
-
var REQUIRED_ITEM_KEYS = [...PREREQUISITE_KINDS, "probe"];
|
|
362
|
-
var OPTIONAL_ITEM_KEYS = [...REQUIRED_ITEM_KEYS, "reason"];
|
|
363
|
-
var requiredPrerequisite = (raw, at) => {
|
|
364
|
-
const shape = { kinds: PREREQUISITE_KINDS, optionalFor: () => ["probe"] };
|
|
365
|
-
return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
|
|
366
|
-
kind: item.kind,
|
|
367
|
-
name: item.named,
|
|
368
|
-
probe: item.optional.get("probe") ?? null
|
|
369
|
-
}));
|
|
370
|
-
};
|
|
371
|
-
var optionalPrerequisite = (raw, at) => {
|
|
372
|
-
const shape = { kinds: PREREQUISITE_KINDS, optionalFor: () => ["probe", "reason"] };
|
|
373
|
-
return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
|
|
374
|
-
kind: item.kind,
|
|
375
|
-
name: item.named,
|
|
376
|
-
probe: item.optional.get("probe") ?? null,
|
|
377
|
-
reason: item.optional.get("reason") ?? null
|
|
378
|
-
}));
|
|
379
|
-
};
|
|
380
|
-
var MODULE_SOURCE_KINDS = ["npm", "github", "path"];
|
|
381
|
-
var MODULE_SOURCE_KEYS = [...MODULE_SOURCE_KINDS, "ref"];
|
|
382
|
-
var moduleSource = (raw, at) => {
|
|
383
|
-
const shape = {
|
|
384
|
-
kinds: MODULE_SOURCE_KINDS,
|
|
385
|
-
optionalFor: (kind) => kind === "github" ? ["ref"] : []
|
|
386
|
-
};
|
|
387
|
-
return mapReading(readKeyedItem(shape, raw, at), (item) => Object.freeze({
|
|
388
|
-
kind: item.kind,
|
|
389
|
-
location: item.named,
|
|
390
|
-
ref: item.optional.get("ref") ?? null
|
|
391
|
-
}));
|
|
392
|
-
};
|
|
2
|
+
import {
|
|
3
|
+
CLAUDE_SETTING_SOURCES,
|
|
4
|
+
CONFIG_VERSIONS,
|
|
5
|
+
INJECT_MODES,
|
|
6
|
+
MODULE_SOURCE_KEYS,
|
|
7
|
+
OPTIONAL_ITEM_KEYS,
|
|
8
|
+
OUTPUT_MODES,
|
|
9
|
+
PR_PROVIDERS,
|
|
10
|
+
RELEASE_AUTO,
|
|
11
|
+
REQUIRED_ITEM_KEYS,
|
|
12
|
+
STORE_BACKENDS,
|
|
13
|
+
dayCount,
|
|
14
|
+
describeValue,
|
|
15
|
+
flag,
|
|
16
|
+
githubLogin,
|
|
17
|
+
isMapping,
|
|
18
|
+
issueNumber,
|
|
19
|
+
listOf,
|
|
20
|
+
mergeMethod,
|
|
21
|
+
messageOf,
|
|
22
|
+
moduleSource,
|
|
23
|
+
oneOf,
|
|
24
|
+
optionalPrerequisite,
|
|
25
|
+
releaseEnabled,
|
|
26
|
+
requiredPrerequisite,
|
|
27
|
+
subsetOf,
|
|
28
|
+
text,
|
|
29
|
+
usdAmount
|
|
30
|
+
} from "./index-n3rw8rhr.js";
|
|
393
31
|
|
|
394
32
|
// src/config-schema.ts
|
|
395
33
|
import { join } from "path";
|
|
@@ -421,7 +59,11 @@ var CONFIG_DEFAULTS = Object.freeze({
|
|
|
421
59
|
releaseEnabled: RELEASE_AUTO,
|
|
422
60
|
releaseVersionFile: "package.json",
|
|
423
61
|
releaseChangelog: "CHANGELOG.md",
|
|
424
|
-
releaseHeading: "## {version} \u2014 {date}, {title}"
|
|
62
|
+
releaseHeading: "## {version} \u2014 {date}, {title}",
|
|
63
|
+
cleanupStaleDays: 30,
|
|
64
|
+
cleanupWorktreeIdleDays: 7,
|
|
65
|
+
cleanupKeep: Object.freeze([]),
|
|
66
|
+
dangerousAcceptStaleRefs: false
|
|
425
67
|
});
|
|
426
68
|
var directory = text("a directory path");
|
|
427
69
|
var trackerKind = text("a tracker kind name");
|
|
@@ -496,6 +138,22 @@ var SETTINGS = {
|
|
|
496
138
|
key: "release.heading",
|
|
497
139
|
read: text("a changelog heading template"),
|
|
498
140
|
cli: false
|
|
141
|
+
},
|
|
142
|
+
cleanupStaleDays: { key: "cleanup.staleDays", read: dayCount, cli: false },
|
|
143
|
+
cleanupWorktreeIdleDays: {
|
|
144
|
+
key: "cleanup.worktreeIdleDays",
|
|
145
|
+
read: dayCount,
|
|
146
|
+
cli: false
|
|
147
|
+
},
|
|
148
|
+
cleanupKeep: {
|
|
149
|
+
key: "cleanup.keep",
|
|
150
|
+
read: listOf(text("a glob pattern"), "glob patterns"),
|
|
151
|
+
cli: false
|
|
152
|
+
},
|
|
153
|
+
dangerousAcceptStaleRefs: {
|
|
154
|
+
key: "dangerous.acceptStaleRefs",
|
|
155
|
+
read: flag,
|
|
156
|
+
cli: false
|
|
499
157
|
}
|
|
500
158
|
};
|
|
501
159
|
var SETTING_NAMES = Object.keys(SETTINGS);
|
|
@@ -590,7 +248,11 @@ function readLayer(rawOf, atOf) {
|
|
|
590
248
|
releaseEnabled: read("releaseEnabled"),
|
|
591
249
|
releaseVersionFile: read("releaseVersionFile"),
|
|
592
250
|
releaseChangelog: read("releaseChangelog"),
|
|
593
|
-
releaseHeading: read("releaseHeading")
|
|
251
|
+
releaseHeading: read("releaseHeading"),
|
|
252
|
+
cleanupStaleDays: read("cleanupStaleDays"),
|
|
253
|
+
cleanupWorktreeIdleDays: read("cleanupWorktreeIdleDays"),
|
|
254
|
+
cleanupKeep: read("cleanupKeep"),
|
|
255
|
+
dangerousAcceptStaleRefs: read("dangerousAcceptStaleRefs")
|
|
594
256
|
};
|
|
595
257
|
return { layer, problems, extras };
|
|
596
258
|
}
|
|
@@ -863,4 +525,4 @@ function activeOutputMode() {
|
|
|
863
525
|
return activeMode;
|
|
864
526
|
}
|
|
865
527
|
|
|
866
|
-
export {
|
|
528
|
+
export { CONFIG_FILE, CONFIG_DEFAULTS, SETTINGS, ConfigError, configFilePath, parseConfigText, resolveConfig, createTextOutput, activeOutput, activeOutputMode, RAFA_BLOCK_KINDS, isRafaBlockKind, readRafaBlocks };
|