bareloop 0.47.0 → 0.48.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 +47 -0
- package/README.md +12 -9
- package/bareloop.context.md +68 -46
- package/bin/bareloop.mjs +2 -0
- package/package.json +1 -1
- package/src/bundle.js +36 -9
- package/src/bundleref.js +103 -0
- package/src/bundlerun.js +134 -17
- package/src/cli.js +135 -142
- package/src/config.js +1 -1
- package/src/draftspend.js +88 -34
- package/src/interviewrun.js +11 -11
- package/src/invoke.js +3 -2
- package/src/launcher.js +142 -34
- package/src/learn.js +34 -20
- package/src/learnstore.js +30 -14
- package/src/panel/authorsession.js +4 -12
- package/src/panel/index.html +44 -12
- package/src/panel/runroutes.js +28 -14
- package/src/panel/server.js +74 -121
- package/src/prompts.js +50 -0
- package/src/reuse.js +1 -1
- package/src/runexport.js +162 -0
- package/src/runfiles.js +65 -0
- package/src/runlist.js +72 -0
- package/src/userrun.js +17 -13
- package/types/bundle.d.ts +16 -0
- package/types/bundleref.d.ts +63 -0
- package/types/bundlerun.d.ts +10 -3
- package/types/cli.d.ts +2 -1
- package/types/draftspend.d.ts +7 -23
- package/types/launcher.d.ts +57 -4
- package/types/learn.d.ts +29 -15
- package/types/learnstore.d.ts +31 -10
- package/types/panel/server.d.ts +9 -4
- package/types/prompts.d.ts +21 -0
- package/types/reuse.d.ts +3 -0
- package/types/runexport.d.ts +58 -0
- package/types/runfiles.d.ts +40 -0
- package/types/runlist.d.ts +55 -0
package/types/runlist.d.ts
CHANGED
|
@@ -88,6 +88,29 @@ export function appendNeedsRemoved(runid: string, opts?: {
|
|
|
88
88
|
export function readNeedsRemovals(opts?: {
|
|
89
89
|
home?: string;
|
|
90
90
|
}): Map<string, number>;
|
|
91
|
+
/**
|
|
92
|
+
* @typedef {{ type: 'exported', runid: string, job: string, bundle: string, bundleHash: string, at: string }} ExportedRow
|
|
93
|
+
* RULED 2026-10-25 (PRD v1.114): `bareloop export` appends ONE of these per bundle it makes, so `bareloop run` can find the bundle by the
|
|
94
|
+
* run's name. Not a run, a claim or an event: {@link readRunList} ignores it (it has a `type`), so the monthly limit, the run counter and the
|
|
95
|
+
* scheduler never see it. Nothing is rewritten.
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Append one {@link ExportedRow}. THROWS on IO failure.
|
|
99
|
+
* @param {Omit<ExportedRow, 'type'>} row
|
|
100
|
+
* @param {{ home?: string }} [opts]
|
|
101
|
+
* @returns {void}
|
|
102
|
+
*/
|
|
103
|
+
export function appendExported(row: Omit<ExportedRow, "type">, opts?: {
|
|
104
|
+
home?: string;
|
|
105
|
+
}): void;
|
|
106
|
+
/**
|
|
107
|
+
* Every `exported` row, in file order (a re-export of the same run is a later row). An absent file is an empty list.
|
|
108
|
+
* @param {{ home?: string }} [opts]
|
|
109
|
+
* @returns {ExportedRow[]}
|
|
110
|
+
*/
|
|
111
|
+
export function readExported(opts?: {
|
|
112
|
+
home?: string;
|
|
113
|
+
}): ExportedRow[];
|
|
91
114
|
/**
|
|
92
115
|
* @typedef {{ type: 'leg-start', runid: string, leg: number, pid?: number, capUsd?: number, at: string }} LegStart
|
|
93
116
|
* A resumed run's NEW claim (P5-R, hamr 2026-10-02: one run, one id, one row): appended beside the run's row
|
|
@@ -206,6 +229,25 @@ export function backfillRuns(dir: string, opts?: {
|
|
|
206
229
|
* @returns {string}
|
|
207
230
|
*/
|
|
208
231
|
export function formatRunRow(row: RunRow): string;
|
|
232
|
+
/**
|
|
233
|
+
* @param {any} r
|
|
234
|
+
* @returns {number}
|
|
235
|
+
*/
|
|
236
|
+
export function atMs(r: any): number;
|
|
237
|
+
/**
|
|
238
|
+
* A run's name for a person: `job (run-N)`, N from {@link runNumbers}. The ONE spelling (the panel, `bareloop export` and `bareloop run` all print it).
|
|
239
|
+
* @param {string} job @param {number|undefined} n
|
|
240
|
+
* @returns {string}
|
|
241
|
+
*/
|
|
242
|
+
export function runNameOf(job: string, n: number | undefined): string;
|
|
243
|
+
/**
|
|
244
|
+
* The ONE owner of run names (P6 item 7): runs of the same job (`row.job`) are numbered oldest `at` first, 1-based
|
|
245
|
+
* (ties keep file order). A resume is one row, so it counts once; died and stopped runs are rows too. Every view
|
|
246
|
+
* reads this number — the page never counts on its own.
|
|
247
|
+
* @param {any[]} rows
|
|
248
|
+
* @returns {Map<string, number>} runid → N
|
|
249
|
+
*/
|
|
250
|
+
export function runNumbers(rows: any[]): Map<string, number>;
|
|
209
251
|
export const DIED_MTIME_MS: number;
|
|
210
252
|
export const MAX_BACKFILL_DEPTH: 6;
|
|
211
253
|
/**
|
|
@@ -248,6 +290,19 @@ export type RunEvent = {
|
|
|
248
290
|
spendComplete?: boolean;
|
|
249
291
|
leg?: number;
|
|
250
292
|
};
|
|
293
|
+
/**
|
|
294
|
+
* RULED 2026-10-25 (PRD v1.114): `bareloop export` appends ONE of these per bundle it makes, so `bareloop run` can find the bundle by the
|
|
295
|
+
* run's name. Not a run, a claim or an event: {@link readRunList} ignores it (it has a `type`), so the monthly limit, the run counter and the
|
|
296
|
+
* scheduler never see it. Nothing is rewritten.
|
|
297
|
+
*/
|
|
298
|
+
export type ExportedRow = {
|
|
299
|
+
type: "exported";
|
|
300
|
+
runid: string;
|
|
301
|
+
job: string;
|
|
302
|
+
bundle: string;
|
|
303
|
+
bundleHash: string;
|
|
304
|
+
at: string;
|
|
305
|
+
};
|
|
251
306
|
/**
|
|
252
307
|
* A resumed run's NEW claim (P5-R, hamr 2026-10-02: one run, one id, one row): appended beside the run's row
|
|
253
308
|
* instead of a second row. {@link readRunList} folds it into the row.
|