bareloop 0.32.0 → 0.34.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 +95 -0
- package/README.md +4 -1
- package/bareloop.context.md +163 -82
- package/package.json +1 -1
- package/src/authorflow.js +5 -3
- package/src/authorjob.js +3 -1
- package/src/authorrun.js +36 -8
- package/src/authorscout.js +10 -6
- package/src/bundlerun.js +266 -0
- package/src/cli.js +24 -352
- package/src/interviewrun.js +6 -4
- package/src/invoke.js +22 -0
- package/src/job.js +2 -2
- package/src/judged.js +27 -5
- package/src/kinds.js +1 -0
- package/src/ledger.js +3 -4
- package/src/monthly.js +112 -35
- package/src/panel/authorroutes.js +12 -2
- package/src/panel/authorsession.js +24 -4
- package/src/panel/server.js +18 -13
- package/src/planrun.js +10 -8
- package/src/providerrows.js +87 -1
- package/src/providers.js +4 -4
- package/src/run.js +7 -2
- package/src/runlist.js +94 -7
- package/src/source.js +8 -3
- package/src/u-watchdog.mjs +296 -0
- package/src/userrun.js +207 -65
- package/types/authorflow.d.ts +8 -2
- package/types/authorjob.d.ts +6 -1
- package/types/authorscout.d.ts +11 -2
- package/types/bundlerun.d.ts +26 -0
- package/types/invoke.d.ts +8 -0
- package/types/judged.d.ts +10 -3
- package/types/monthly.d.ts +57 -10
- package/types/panel/authorroutes.d.ts +15 -0
- package/types/planrun.d.ts +13 -1
- package/types/providerrows.d.ts +66 -0
- package/types/providers.d.ts +1 -2
- package/types/run.d.ts +14 -1
- package/types/runlist.d.ts +79 -3
- package/types/source.d.ts +8 -3
- package/types/userrun.d.ts +49 -0
package/types/userrun.d.ts
CHANGED
|
@@ -48,6 +48,11 @@ export type Deps = {
|
|
|
48
48
|
* even when `env` is injected; production never sets it.
|
|
49
49
|
*/
|
|
50
50
|
keysHome?: string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* the command this run was actually reached through (`src/invoke.js`);
|
|
53
|
+
* `src/cli.js` passes `'bareloop run-u'`, `scripts/run-u.mjs` passes none.
|
|
54
|
+
*/
|
|
55
|
+
invokedAs?: string | undefined;
|
|
51
56
|
out?: ((s: string) => void) | undefined;
|
|
52
57
|
err?: ((s: string) => void) | undefined;
|
|
53
58
|
/**
|
|
@@ -65,6 +70,45 @@ export type Deps = {
|
|
|
65
70
|
*/
|
|
66
71
|
runlistHome?: string | undefined;
|
|
67
72
|
};
|
|
73
|
+
/**
|
|
74
|
+
* The one-runner door's hand-in (`src/bundlerun.js`, the exported bundle's `bareloop run`):
|
|
75
|
+
* where a bundle run's books live and how it prints its own re-invocation. Set ONLY by
|
|
76
|
+
* that caller through `startRun`/`resumeRun` opts, in-process — `main`'s argv never builds
|
|
77
|
+
* it, so a local job cannot reach it. Absent, every use below is today's expression.
|
|
78
|
+
*/
|
|
79
|
+
export type BundleRun = {
|
|
80
|
+
/**
|
|
81
|
+
* the run id (also the `runs/<runid>` directory name)
|
|
82
|
+
*/
|
|
83
|
+
runid: string;
|
|
84
|
+
/**
|
|
85
|
+
* `<bundle>/runs/<runid>`: spine.jsonl, gate-audit.jsonl and close/ live here
|
|
86
|
+
*/
|
|
87
|
+
runDir: string;
|
|
88
|
+
/**
|
|
89
|
+
* the bare re-invocation prefix printed in resume hints (`bareloop run <bundle> --repo <path>`), no ceiling flags
|
|
90
|
+
*/
|
|
91
|
+
invoke: string;
|
|
92
|
+
/**
|
|
93
|
+
* the ceilings the person tightened on THIS leg; printed after `invoke` on every resume line except a money halt's (which never prints the exhausted `--budget`)
|
|
94
|
+
*/
|
|
95
|
+
tightened: {
|
|
96
|
+
budgetUsd?: number;
|
|
97
|
+
wallMin?: number;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* the bundle's SIGNED spec budgetUsd (the tightened leg ceiling is `spec.budgetUsd`); printed only, never enforced from here
|
|
101
|
+
*/
|
|
102
|
+
signedBudgetUsd: number;
|
|
103
|
+
/**
|
|
104
|
+
* the hash printed after `--approve` in those hints (the bundle's, not the run spec's)
|
|
105
|
+
*/
|
|
106
|
+
printApprove: string;
|
|
107
|
+
/**
|
|
108
|
+
* creates the run's tree (fresh worktree) and its books; the engine calls it once every $0 refusal has passed, so a refusal leaks nothing
|
|
109
|
+
*/
|
|
110
|
+
prepareTree: () => void;
|
|
111
|
+
};
|
|
68
112
|
export type RunOpts = {
|
|
69
113
|
/**
|
|
70
114
|
* the parsed, not-yet-validated job spec — read by
|
|
@@ -136,6 +180,10 @@ export type RunOpts = {
|
|
|
136
180
|
* how a "go edit the spec" hint should read
|
|
137
181
|
*/
|
|
138
182
|
specDesc?: string | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* set only by the bundle door (see `BundleRun`)
|
|
185
|
+
*/
|
|
186
|
+
bundle?: BundleRun | undefined;
|
|
139
187
|
deps?: Deps | undefined;
|
|
140
188
|
};
|
|
141
189
|
export type RunCtx = {
|
|
@@ -159,5 +207,6 @@ export type RunCtx = {
|
|
|
159
207
|
door: string | null;
|
|
160
208
|
decide: string | null;
|
|
161
209
|
text: string | null;
|
|
210
|
+
bundle?: BundleRun | undefined;
|
|
162
211
|
deps: Deps;
|
|
163
212
|
};
|