@mobrienv/autoloop-harness 0.7.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/dist/artifacts.d.ts +50 -0
- package/dist/artifacts.js +333 -0
- package/dist/artifacts.js.map +1 -0
- package/dist/config-helpers.d.ts +36 -0
- package/dist/config-helpers.js +427 -0
- package/dist/config-helpers.js.map +1 -0
- package/dist/coordination.d.ts +1 -0
- package/dist/coordination.js +126 -0
- package/dist/coordination.js.map +1 -0
- package/dist/display.d.ts +21 -0
- package/dist/display.js +177 -0
- package/dist/display.js.map +1 -0
- package/dist/emit.d.ts +21 -0
- package/dist/emit.js +243 -0
- package/dist/emit.js.map +1 -0
- package/dist/events.d.ts +56 -0
- package/dist/events.js +9 -0
- package/dist/events.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +272 -0
- package/dist/index.js.map +1 -0
- package/dist/iteration.d.ts +16 -0
- package/dist/iteration.js +153 -0
- package/dist/iteration.js.map +1 -0
- package/dist/metareview.d.ts +6 -0
- package/dist/metareview.js +104 -0
- package/dist/metareview.js.map +1 -0
- package/dist/metrics.d.ts +12 -0
- package/dist/metrics.js +177 -0
- package/dist/metrics.js.map +1 -0
- package/dist/parallel.d.ts +37 -0
- package/dist/parallel.js +242 -0
- package/dist/parallel.js.map +1 -0
- package/dist/pi-adapter.d.ts +1 -0
- package/dist/pi-adapter.js +220 -0
- package/dist/pi-adapter.js.map +1 -0
- package/dist/prompt.d.ts +46 -0
- package/dist/prompt.js +446 -0
- package/dist/prompt.js.map +1 -0
- package/dist/registry-bridge.d.ts +7 -0
- package/dist/registry-bridge.js +63 -0
- package/dist/registry-bridge.js.map +1 -0
- package/dist/scratchpad.d.ts +2 -0
- package/dist/scratchpad.js +65 -0
- package/dist/scratchpad.js.map +1 -0
- package/dist/stop.d.ts +5 -0
- package/dist/stop.js +81 -0
- package/dist/stop.js.map +1 -0
- package/dist/tools.d.ts +3 -0
- package/dist/tools.js +65 -0
- package/dist/tools.js.map +1 -0
- package/dist/types.d.ts +137 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/wave/finalize-wave.d.ts +9 -0
- package/dist/wave/finalize-wave.js +86 -0
- package/dist/wave/finalize-wave.js.map +1 -0
- package/dist/wave/launch-branches.d.ts +6 -0
- package/dist/wave/launch-branches.js +313 -0
- package/dist/wave/launch-branches.js.map +1 -0
- package/dist/wave/parse-objectives.d.ts +3 -0
- package/dist/wave/parse-objectives.js +32 -0
- package/dist/wave/parse-objectives.js.map +1 -0
- package/dist/wave/types.d.ts +43 -0
- package/dist/wave/types.js +2 -0
- package/dist/wave/types.js.map +1 -0
- package/dist/wave.d.ts +6 -0
- package/dist/wave.js +158 -0
- package/dist/wave.js.map +1 -0
- package/package.json +100 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run artifacts collection and formatting.
|
|
3
|
+
* Aggregates event counts, memory stats, guidance stats, commits,
|
|
4
|
+
* and document artifacts from journal lines.
|
|
5
|
+
*/
|
|
6
|
+
export interface DocumentArtifact {
|
|
7
|
+
path: string;
|
|
8
|
+
kind: string;
|
|
9
|
+
title: string;
|
|
10
|
+
missing: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface RunArtifacts {
|
|
13
|
+
runId: string;
|
|
14
|
+
preset: string;
|
|
15
|
+
status: string;
|
|
16
|
+
durationMs: number;
|
|
17
|
+
iterations: number;
|
|
18
|
+
events: {
|
|
19
|
+
total: number;
|
|
20
|
+
loop: number;
|
|
21
|
+
iteration: number;
|
|
22
|
+
backend: number;
|
|
23
|
+
review: number;
|
|
24
|
+
coordination: number;
|
|
25
|
+
operator: number;
|
|
26
|
+
routing: number;
|
|
27
|
+
errors: number;
|
|
28
|
+
};
|
|
29
|
+
artifacts: {
|
|
30
|
+
scratchpadEntries: number;
|
|
31
|
+
memoryLearnings: number;
|
|
32
|
+
memoryMeta: number;
|
|
33
|
+
memoryPreferences: number;
|
|
34
|
+
guidanceSent: number;
|
|
35
|
+
guidanceConsumed: number;
|
|
36
|
+
backpressure: number;
|
|
37
|
+
};
|
|
38
|
+
output: {
|
|
39
|
+
commits: number;
|
|
40
|
+
filesChanged: number;
|
|
41
|
+
journalSizeBytes: number;
|
|
42
|
+
};
|
|
43
|
+
documents: DocumentArtifact[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Collect aggregated artifacts from journal lines and filesystem.
|
|
47
|
+
*/
|
|
48
|
+
export declare function collectArtifacts(lines: string[], projectDir: string, workDir?: string): RunArtifacts;
|
|
49
|
+
/** Format RunArtifacts into a human-readable terminal string. */
|
|
50
|
+
export declare function formatArtifacts(a: RunArtifacts): string;
|
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run artifacts collection and formatting.
|
|
3
|
+
* Aggregates event counts, memory stats, guidance stats, commits,
|
|
4
|
+
* and document artifacts from journal lines.
|
|
5
|
+
*/
|
|
6
|
+
import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
|
|
7
|
+
import { extname, join } from "node:path";
|
|
8
|
+
import { decodeEvent } from "@mobrienv/autoloop-core";
|
|
9
|
+
import * as config from "@mobrienv/autoloop-core/config";
|
|
10
|
+
import { topicCategory } from "@mobrienv/autoloop-core/journal-format";
|
|
11
|
+
import * as memory from "@mobrienv/autoloop-core/memory";
|
|
12
|
+
/**
|
|
13
|
+
* Collect aggregated artifacts from journal lines and filesystem.
|
|
14
|
+
*/
|
|
15
|
+
export function collectArtifacts(lines, projectDir, workDir) {
|
|
16
|
+
const events = {
|
|
17
|
+
total: 0,
|
|
18
|
+
loop: 0,
|
|
19
|
+
iteration: 0,
|
|
20
|
+
backend: 0,
|
|
21
|
+
review: 0,
|
|
22
|
+
coordination: 0,
|
|
23
|
+
operator: 0,
|
|
24
|
+
routing: 0,
|
|
25
|
+
errors: 0,
|
|
26
|
+
};
|
|
27
|
+
let runId = "";
|
|
28
|
+
let preset = "";
|
|
29
|
+
let status = "unknown";
|
|
30
|
+
let startTs = "";
|
|
31
|
+
let endTs = "";
|
|
32
|
+
let maxIter = 0;
|
|
33
|
+
let scratchpadEntries = 0;
|
|
34
|
+
let guidanceSent = 0;
|
|
35
|
+
let guidanceConsumed = 0;
|
|
36
|
+
let backpressure = 0;
|
|
37
|
+
const commits = [];
|
|
38
|
+
let filesChanged = -1;
|
|
39
|
+
const documents = [];
|
|
40
|
+
const documentPaths = new Set();
|
|
41
|
+
for (const line of lines) {
|
|
42
|
+
const event = decodeEvent(line);
|
|
43
|
+
if (!event)
|
|
44
|
+
continue;
|
|
45
|
+
events.total++;
|
|
46
|
+
const cat = topicCategory(event.topic);
|
|
47
|
+
const key = cat === "error" ? "errors" : cat;
|
|
48
|
+
if (key in events) {
|
|
49
|
+
events[key]++;
|
|
50
|
+
}
|
|
51
|
+
// Track iteration count
|
|
52
|
+
if (event.iteration) {
|
|
53
|
+
const n = Number.parseInt(event.iteration, 10);
|
|
54
|
+
if (!Number.isNaN(n) && n > maxIter)
|
|
55
|
+
maxIter = n;
|
|
56
|
+
}
|
|
57
|
+
// Extract run metadata from loop.start
|
|
58
|
+
if (event.topic === "loop.start") {
|
|
59
|
+
if (event.run)
|
|
60
|
+
runId = event.run;
|
|
61
|
+
if (event.shape === "fields") {
|
|
62
|
+
preset = event.fields.preset ?? preset;
|
|
63
|
+
}
|
|
64
|
+
startTs = extractTs(event, line);
|
|
65
|
+
status = "active";
|
|
66
|
+
}
|
|
67
|
+
if (event.topic === "loop.complete") {
|
|
68
|
+
status = "completed";
|
|
69
|
+
endTs = extractTs(event, line);
|
|
70
|
+
}
|
|
71
|
+
if (event.topic === "loop.stop") {
|
|
72
|
+
status = "stopped";
|
|
73
|
+
endTs = extractTs(event, line);
|
|
74
|
+
}
|
|
75
|
+
// Scratchpad entries from iteration.finish
|
|
76
|
+
if (event.topic === "iteration.finish") {
|
|
77
|
+
scratchpadEntries++;
|
|
78
|
+
}
|
|
79
|
+
// Guidance tracking
|
|
80
|
+
if (event.topic === "operator.guidance")
|
|
81
|
+
guidanceSent++;
|
|
82
|
+
if (event.topic === "operator.guidance.consumed")
|
|
83
|
+
guidanceConsumed++;
|
|
84
|
+
// Backpressure from event.invalid
|
|
85
|
+
if (event.topic === "event.invalid")
|
|
86
|
+
backpressure++;
|
|
87
|
+
// Commits from slice.committed
|
|
88
|
+
if (event.topic === "slice.committed" && event.shape === "fields") {
|
|
89
|
+
const hash = event.fields.commit ?? event.fields.hash ?? "";
|
|
90
|
+
if (hash)
|
|
91
|
+
commits.push(hash);
|
|
92
|
+
const fc = event.fields.files_changed ?? event.fields.filesChanged ?? "";
|
|
93
|
+
if (fc) {
|
|
94
|
+
const n = Number.parseInt(fc, 10);
|
|
95
|
+
if (!Number.isNaN(n))
|
|
96
|
+
filesChanged = Math.max(filesChanged, 0) + n;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Document artifacts from artifact.created events
|
|
100
|
+
if (event.topic === "artifact.created" && event.shape === "fields") {
|
|
101
|
+
const docPath = event.fields.path ?? "";
|
|
102
|
+
if (docPath && !documentPaths.has(docPath)) {
|
|
103
|
+
documentPaths.add(docPath);
|
|
104
|
+
const resolvedDir = workDir ?? projectDir;
|
|
105
|
+
const fullPath = join(resolvedDir, docPath);
|
|
106
|
+
documents.push({
|
|
107
|
+
path: docPath,
|
|
108
|
+
kind: event.fields.kind ?? "other",
|
|
109
|
+
title: event.fields.title ?? docPath,
|
|
110
|
+
missing: !existsSync(fullPath),
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Fallback: scan for frontmatter if no artifact.created events found
|
|
116
|
+
if (documents.length === 0 && workDir) {
|
|
117
|
+
const scanned = scanFrontmatterArtifacts(workDir);
|
|
118
|
+
for (const doc of scanned) {
|
|
119
|
+
if (!documentPaths.has(doc.path)) {
|
|
120
|
+
documentPaths.add(doc.path);
|
|
121
|
+
documents.push(doc);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
// Memory stats
|
|
126
|
+
let memStats = { learnings: 0, meta: 0, preferences: 0 };
|
|
127
|
+
try {
|
|
128
|
+
const stats = memory.statsProject(projectDir, 8000);
|
|
129
|
+
memStats = {
|
|
130
|
+
learnings: stats.learnings,
|
|
131
|
+
meta: stats.meta,
|
|
132
|
+
preferences: stats.preferences,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
catch {
|
|
136
|
+
// memory file may not exist
|
|
137
|
+
}
|
|
138
|
+
// Journal file size
|
|
139
|
+
let journalSizeBytes = 0;
|
|
140
|
+
try {
|
|
141
|
+
const journalPath = config.resolveJournalFile(projectDir);
|
|
142
|
+
if (existsSync(journalPath)) {
|
|
143
|
+
journalSizeBytes = statSync(journalPath).size;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
catch {
|
|
147
|
+
// ignore
|
|
148
|
+
}
|
|
149
|
+
// Duration
|
|
150
|
+
let durationMs = 0;
|
|
151
|
+
if (startTs && endTs) {
|
|
152
|
+
const start = new Date(startTs).getTime();
|
|
153
|
+
const end = new Date(endTs).getTime();
|
|
154
|
+
if (!Number.isNaN(start) && !Number.isNaN(end)) {
|
|
155
|
+
durationMs = end - start;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return {
|
|
159
|
+
runId,
|
|
160
|
+
preset,
|
|
161
|
+
status,
|
|
162
|
+
durationMs,
|
|
163
|
+
iterations: maxIter,
|
|
164
|
+
events,
|
|
165
|
+
artifacts: {
|
|
166
|
+
scratchpadEntries,
|
|
167
|
+
memoryLearnings: memStats.learnings,
|
|
168
|
+
memoryMeta: memStats.meta,
|
|
169
|
+
memoryPreferences: memStats.preferences,
|
|
170
|
+
guidanceSent,
|
|
171
|
+
guidanceConsumed,
|
|
172
|
+
backpressure,
|
|
173
|
+
},
|
|
174
|
+
output: {
|
|
175
|
+
commits: commits.length,
|
|
176
|
+
filesChanged: filesChanged < 0 ? -1 : filesChanged,
|
|
177
|
+
journalSizeBytes,
|
|
178
|
+
},
|
|
179
|
+
documents,
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
/** Format RunArtifacts into a human-readable terminal string. */
|
|
183
|
+
export function formatArtifacts(a) {
|
|
184
|
+
const lines = [];
|
|
185
|
+
const statusNote = a.status === "active" ? " (run still active)" : "";
|
|
186
|
+
const presetLabel = a.preset
|
|
187
|
+
? ` (${a.preset}${a.status !== "unknown" ? `, ${a.status}` : ""})`
|
|
188
|
+
: "";
|
|
189
|
+
lines.push(`Run: ${a.runId}${presetLabel}${statusNote}`);
|
|
190
|
+
if (a.durationMs > 0) {
|
|
191
|
+
lines.push(`Duration: ${formatDuration(a.durationMs)} (${a.iterations} iterations)`);
|
|
192
|
+
}
|
|
193
|
+
else {
|
|
194
|
+
lines.push(`Iterations: ${a.iterations}`);
|
|
195
|
+
}
|
|
196
|
+
lines.push("");
|
|
197
|
+
lines.push("Events");
|
|
198
|
+
lines.push(` total ${a.events.total}`);
|
|
199
|
+
lines.push(` loop ${a.events.loop}`);
|
|
200
|
+
lines.push(` iteration ${a.events.iteration}`);
|
|
201
|
+
lines.push(` backend ${a.events.backend}`);
|
|
202
|
+
lines.push(` review ${a.events.review}`);
|
|
203
|
+
lines.push(` coordination ${a.events.coordination}`);
|
|
204
|
+
lines.push(` operator ${a.events.operator}`);
|
|
205
|
+
lines.push(` routing/wave ${a.events.routing}`);
|
|
206
|
+
lines.push(` errors ${a.events.errors}`);
|
|
207
|
+
lines.push("");
|
|
208
|
+
lines.push("Artifacts");
|
|
209
|
+
lines.push(` scratchpad ${a.artifacts.scratchpadEntries} entries`);
|
|
210
|
+
lines.push(` memory ${a.artifacts.memoryLearnings} learnings, ${a.artifacts.memoryMeta} meta, ${a.artifacts.memoryPreferences} preferences`);
|
|
211
|
+
lines.push(` guidance ${a.artifacts.guidanceSent} sent, ${a.artifacts.guidanceConsumed} consumed`);
|
|
212
|
+
lines.push(` backpressure ${a.artifacts.backpressure} rejected event${a.artifacts.backpressure === 1 ? "" : "s"}`);
|
|
213
|
+
lines.push("");
|
|
214
|
+
lines.push("Output");
|
|
215
|
+
lines.push(` commits ${a.output.commits}`);
|
|
216
|
+
lines.push(` files changed ${a.output.filesChanged < 0 ? "-" : String(a.output.filesChanged)}`);
|
|
217
|
+
lines.push(` journal size ${formatBytes(a.output.journalSizeBytes)}`);
|
|
218
|
+
if (a.documents.length > 0) {
|
|
219
|
+
lines.push("");
|
|
220
|
+
lines.push("Documents");
|
|
221
|
+
for (const doc of a.documents) {
|
|
222
|
+
const label = doc.missing ? " (missing)" : "";
|
|
223
|
+
const padPath = doc.path.padEnd(42);
|
|
224
|
+
lines.push(` ${padPath} ${doc.kind.padEnd(10)} "${doc.title}"${label}`);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return lines.join("\n");
|
|
228
|
+
}
|
|
229
|
+
function extractTs(event, line) {
|
|
230
|
+
if (event.shape === "fields") {
|
|
231
|
+
return event.fields.timestamp ?? event.fields.ts ?? "";
|
|
232
|
+
}
|
|
233
|
+
// Try raw line extraction for payload events
|
|
234
|
+
try {
|
|
235
|
+
const parsed = JSON.parse(line);
|
|
236
|
+
return String(parsed.timestamp ?? parsed.ts ?? "");
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
return "";
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function formatDuration(ms) {
|
|
243
|
+
const totalSec = Math.floor(ms / 1000);
|
|
244
|
+
const min = Math.floor(totalSec / 60);
|
|
245
|
+
const sec = totalSec % 60;
|
|
246
|
+
if (min === 0)
|
|
247
|
+
return `${sec}s`;
|
|
248
|
+
return `${min}m ${sec}s`;
|
|
249
|
+
}
|
|
250
|
+
function formatBytes(bytes) {
|
|
251
|
+
if (bytes === 0)
|
|
252
|
+
return "0 B";
|
|
253
|
+
if (bytes < 1024)
|
|
254
|
+
return `${bytes} B`;
|
|
255
|
+
const kb = bytes / 1024;
|
|
256
|
+
if (kb < 1024)
|
|
257
|
+
return `${kb.toFixed(1)} KB`;
|
|
258
|
+
const mb = kb / 1024;
|
|
259
|
+
return `${mb.toFixed(1)} MB`;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Scan a directory for .md files with autoloop frontmatter.
|
|
263
|
+
* Checks first 20 lines for `autoloop:` in YAML frontmatter.
|
|
264
|
+
*/
|
|
265
|
+
function scanFrontmatterArtifacts(dir) {
|
|
266
|
+
const results = [];
|
|
267
|
+
try {
|
|
268
|
+
scanDir(dir, dir, results, 0);
|
|
269
|
+
}
|
|
270
|
+
catch {
|
|
271
|
+
// ignore filesystem errors
|
|
272
|
+
}
|
|
273
|
+
return results;
|
|
274
|
+
}
|
|
275
|
+
function scanDir(baseDir, currentDir, results, depth) {
|
|
276
|
+
if (depth > 4)
|
|
277
|
+
return; // limit recursion depth
|
|
278
|
+
try {
|
|
279
|
+
const entries = readdirSync(currentDir, { withFileTypes: true });
|
|
280
|
+
for (const entry of entries) {
|
|
281
|
+
if (entry.name.startsWith(".") &&
|
|
282
|
+
depth === 0 &&
|
|
283
|
+
entry.name !== ".autoloop")
|
|
284
|
+
continue;
|
|
285
|
+
if (entry.name === "node_modules")
|
|
286
|
+
continue;
|
|
287
|
+
if (entry.isSymbolicLink())
|
|
288
|
+
continue;
|
|
289
|
+
const fullPath = join(currentDir, entry.name);
|
|
290
|
+
if (entry.isDirectory()) {
|
|
291
|
+
scanDir(baseDir, fullPath, results, depth + 1);
|
|
292
|
+
}
|
|
293
|
+
else if (entry.isFile() && extname(entry.name) === ".md") {
|
|
294
|
+
const doc = checkFrontmatter(baseDir, fullPath);
|
|
295
|
+
if (doc)
|
|
296
|
+
results.push(doc);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
catch {
|
|
301
|
+
// ignore permission errors etc.
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
function checkFrontmatter(baseDir, filePath) {
|
|
305
|
+
try {
|
|
306
|
+
const content = readFileSync(filePath, "utf-8");
|
|
307
|
+
const firstLines = content.split("\n").slice(0, 20).join("\n");
|
|
308
|
+
if (!firstLines.includes("autoloop:"))
|
|
309
|
+
return null;
|
|
310
|
+
// Must be in YAML frontmatter (between --- markers)
|
|
311
|
+
if (!firstLines.startsWith("---"))
|
|
312
|
+
return null;
|
|
313
|
+
const endIdx = firstLines.indexOf("---", 3);
|
|
314
|
+
if (endIdx < 0)
|
|
315
|
+
return null;
|
|
316
|
+
const fm = firstLines.slice(3, endIdx);
|
|
317
|
+
if (!fm.includes("autoloop:"))
|
|
318
|
+
return null;
|
|
319
|
+
// Extract kind from frontmatter
|
|
320
|
+
const kindMatch = fm.match(/kind:\s*(\S+)/);
|
|
321
|
+
const kind = kindMatch?.[1] ?? "other";
|
|
322
|
+
// Extract title from first heading after frontmatter
|
|
323
|
+
const afterFm = content.slice(endIdx + 3).trim();
|
|
324
|
+
const headingMatch = afterFm.match(/^#\s+(.+)/m);
|
|
325
|
+
const title = headingMatch?.[1]?.trim() ?? filePath.split("/").pop() ?? "";
|
|
326
|
+
const relPath = filePath.slice(baseDir.length + 1);
|
|
327
|
+
return { path: relPath, kind, title, missing: false };
|
|
328
|
+
}
|
|
329
|
+
catch {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
//# sourceMappingURL=artifacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../src/artifacts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,wCA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AAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as config from "@mobrienv/autoloop-core/config";
|
|
2
|
+
import * as topo from "@mobrienv/autoloop-core/topology";
|
|
3
|
+
import type { LoopContext, RunOptions } from "./types.js";
|
|
4
|
+
export declare function resolvePrompt(projectDir: string, cfg: config.Config, override: string | null): string;
|
|
5
|
+
export declare function resolveReviewPrompt(projectDir: string, cfg: config.Config): string;
|
|
6
|
+
export declare function readOptionalProjectFile(projectDir: string, relativePath: string): string;
|
|
7
|
+
export declare function resolveReviewEvery(cfg: config.Config, topoData: topo.Topology): number;
|
|
8
|
+
export declare function truthySetting(value: string): boolean;
|
|
9
|
+
export declare function ensureLayout(stateDir: string): void;
|
|
10
|
+
export declare function installRuntimeTools(loop: LoopContext): void;
|
|
11
|
+
export declare function resolveProcessKind(kind: string, command: string): string;
|
|
12
|
+
export declare function normalizePromptMode(value: string): string;
|
|
13
|
+
export declare function configListWithFallback(cfg: config.Config, key: string, fallback: string[]): string[];
|
|
14
|
+
export declare function injectClaudePermissions(command: string, args: string[]): string[];
|
|
15
|
+
export declare function processStringOverride(override: Record<string, unknown>, key: string, fallback: string): string;
|
|
16
|
+
export declare function processListOverride(override: Record<string, unknown>, key: string, fallback: string[]): string[];
|
|
17
|
+
export declare function processIntOverride(override: Record<string, unknown>, key: string, fallback: number): number;
|
|
18
|
+
export declare function claudeBackend(command: string): boolean;
|
|
19
|
+
export declare function nextRunId(path: string, cfg: config.Config): string;
|
|
20
|
+
export declare function iterationFieldForRun(journalFile: string, runId: string, iteration: string, topic: string, field: string): string;
|
|
21
|
+
export declare function ensureRenderRunId(journalFile: string): string;
|
|
22
|
+
export declare function absolutePath(path: string): string;
|
|
23
|
+
export declare function emptyFallback(text: string): string;
|
|
24
|
+
/**
|
|
25
|
+
* Resolve the journal file path for a specific run.
|
|
26
|
+
* Delegates to resolveRunJournalPath for run-scoped/worktree paths,
|
|
27
|
+
* falling back to the top-level journal.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveJournalFileForRun(projectDir: string, runId: string): {
|
|
30
|
+
journalFile: string;
|
|
31
|
+
runId: string;
|
|
32
|
+
};
|
|
33
|
+
export declare function buildLoopContext(projectDir: string, promptOverride: string | null, selfCommand: string, runOptions: RunOptions): LoopContext;
|
|
34
|
+
export declare function reloadLoop(loop: LoopContext): LoopContext;
|
|
35
|
+
export declare function applyRuntimeModeOverrides(loop: LoopContext): LoopContext;
|
|
36
|
+
export declare function initStore(loop: LoopContext): LoopContext;
|