@on-par/factory-cli 0.9.14-next.9 → 0.9.14
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/cli/cost-json.d.ts +9 -2
- package/dist/cli/cost-json.d.ts.map +1 -1
- package/dist/cli/cost-json.js +29 -2
- package/dist/cli/cost-json.js.map +1 -1
- package/dist/cli/daemon-load.d.ts +14 -0
- package/dist/cli/daemon-load.d.ts.map +1 -0
- package/dist/cli/daemon-load.js +75 -0
- package/dist/cli/daemon-load.js.map +1 -0
- package/dist/cli/daemon.d.ts +5 -1
- package/dist/cli/daemon.d.ts.map +1 -1
- package/dist/cli/daemon.js +15 -4
- package/dist/cli/daemon.js.map +1 -1
- package/dist/cli/doctor-config.d.ts.map +1 -1
- package/dist/cli/doctor-config.js +15 -1
- package/dist/cli/doctor-config.js.map +1 -1
- package/dist/cli/doctor-health.d.ts +1 -0
- package/dist/cli/doctor-health.d.ts.map +1 -1
- package/dist/cli/doctor-health.js +5 -3
- package/dist/cli/doctor-health.js.map +1 -1
- package/dist/cli/doctor-verify.d.ts +32 -0
- package/dist/cli/doctor-verify.d.ts.map +1 -0
- package/dist/cli/doctor-verify.js +126 -0
- package/dist/cli/doctor-verify.js.map +1 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +12 -10
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +12 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +31 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/json-contract.d.ts +24 -0
- package/dist/cli/json-contract.d.ts.map +1 -1
- package/dist/cli/json-contract.js +24 -1
- package/dist/cli/json-contract.js.map +1 -1
- package/dist/cli/land-pr.d.ts.map +1 -1
- package/dist/cli/land-pr.js +22 -18
- package/dist/cli/land-pr.js.map +1 -1
- package/dist/cli/lane-heartbeat.d.ts +7 -0
- package/dist/cli/lane-heartbeat.d.ts.map +1 -0
- package/dist/cli/lane-heartbeat.js +33 -0
- package/dist/cli/lane-heartbeat.js.map +1 -0
- package/dist/cli/lane-park-comment.d.ts +19 -0
- package/dist/cli/lane-park-comment.d.ts.map +1 -0
- package/dist/cli/lane-park-comment.js +27 -0
- package/dist/cli/lane-park-comment.js.map +1 -0
- package/dist/cli/lane-pause.d.ts +19 -0
- package/dist/cli/lane-pause.d.ts.map +1 -0
- package/dist/cli/lane-pause.js +56 -0
- package/dist/cli/lane-pause.js.map +1 -0
- package/dist/cli/notify.d.ts +37 -0
- package/dist/cli/notify.d.ts.map +1 -0
- package/dist/cli/notify.js +95 -0
- package/dist/cli/notify.js.map +1 -0
- package/dist/cli/program-advanced.d.ts.map +1 -1
- package/dist/cli/program-advanced.js +13 -1
- package/dist/cli/program-advanced.js.map +1 -1
- package/dist/cli/program-run-work.d.ts.map +1 -1
- package/dist/cli/program-run-work.js +2 -0
- package/dist/cli/program-run-work.js.map +1 -1
- package/dist/cli/program-setup.d.ts.map +1 -1
- package/dist/cli/program-setup.js +2 -1
- package/dist/cli/program-setup.js.map +1 -1
- package/dist/cli/queue-merged-closing-pr.d.ts +5 -0
- package/dist/cli/queue-merged-closing-pr.d.ts.map +1 -0
- package/dist/cli/queue-merged-closing-pr.js +70 -0
- package/dist/cli/queue-merged-closing-pr.js.map +1 -0
- package/dist/cli/queue-preflight.d.ts +7 -0
- package/dist/cli/queue-preflight.d.ts.map +1 -1
- package/dist/cli/queue-preflight.js +54 -11
- package/dist/cli/queue-preflight.js.map +1 -1
- package/dist/cli/run-lane-decompose.d.ts +12 -0
- package/dist/cli/run-lane-decompose.d.ts.map +1 -0
- package/dist/cli/run-lane-decompose.js +27 -0
- package/dist/cli/run-lane-decompose.js.map +1 -0
- package/dist/cli/run-lane.d.ts +17 -3
- package/dist/cli/run-lane.d.ts.map +1 -1
- package/dist/cli/run-lane.js +46 -89
- package/dist/cli/run-lane.js.map +1 -1
- package/dist/cli/run.d.ts +1 -0
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +30 -1
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/runs.d.ts +1 -1
- package/dist/cli/runs.d.ts.map +1 -1
- package/dist/cli/runs.js +8 -10
- package/dist/cli/runs.js.map +1 -1
- package/dist/cli/ship-steps.d.ts +1 -0
- package/dist/cli/ship-steps.d.ts.map +1 -1
- package/dist/cli/ship-steps.js +4 -1
- package/dist/cli/ship-steps.js.map +1 -1
- package/dist/cli/ship.d.ts +2 -0
- package/dist/cli/ship.d.ts.map +1 -1
- package/dist/cli/ship.js +1 -0
- package/dist/cli/ship.js.map +1 -1
- package/dist/cli/status.d.ts.map +1 -1
- package/dist/cli/status.js +61 -30
- package/dist/cli/status.js.map +1 -1
- package/dist/cli/steer.d.ts +1 -0
- package/dist/cli/steer.d.ts.map +1 -1
- package/dist/cli/steer.js +55 -28
- package/dist/cli/steer.js.map +1 -1
- package/dist/cli/steerability-report.d.ts +1 -1
- package/dist/cli/steerability-report.d.ts.map +1 -1
- package/dist/cli/steerability-report.js +4 -7
- package/dist/cli/steerability-report.js.map +1 -1
- package/dist/cli/supervise.d.ts +1 -0
- package/dist/cli/supervise.d.ts.map +1 -1
- package/dist/cli/supervise.js +10 -3
- package/dist/cli/supervise.js.map +1 -1
- package/dist/cli/worktree-keep.d.ts +18 -0
- package/dist/cli/worktree-keep.d.ts.map +1 -0
- package/dist/cli/worktree-keep.js +47 -0
- package/dist/cli/worktree-keep.js.map +1 -0
- package/dist/cli/worktree-reap.d.ts.map +1 -1
- package/dist/cli/worktree-reap.js +5 -3
- package/dist/cli/worktree-reap.js.map +1 -1
- package/package.json +4 -4
- package/schemas/cost.schema.json +39 -1
- package/schemas/daemon-status.schema.json +44 -1
- package/schemas/logs-line.schema.json +10 -0
package/dist/cli/index.js
CHANGED
|
@@ -62,6 +62,7 @@ import { DeepCheckError, createDeepModelRunner, runIssueCheck } from './ready-ch
|
|
|
62
62
|
import { childRunSucceeded, formatChildRunSummary, runChildrenInOrder } from './run-children.js';
|
|
63
63
|
import { readRunFlagOverrides, recordDraftPrFlag } from './run-flags.js';
|
|
64
64
|
import { runStalenessGuard } from './staleness.js';
|
|
65
|
+
import { runWorktreeKeep, runWorktreeRelease } from './worktree-keep.js';
|
|
65
66
|
import { gcWorktreeSandbox, reapParkedLane, reapPrlessShip } from './worktree-reap.js';
|
|
66
67
|
const DEFAULT_CONFIG_LOADERS = {
|
|
67
68
|
loadModelsConfig,
|
|
@@ -1947,6 +1948,28 @@ export async function cmdWorktreeGc(opts) {
|
|
|
1947
1948
|
const report = opts.dryRun ? await run() : await withGitLock(repoRoot, () => withFileLock(paths.gitLock, run));
|
|
1948
1949
|
console.log(internalOps.formatGcReport(report));
|
|
1949
1950
|
}
|
|
1951
|
+
/** `factory worktree keep <issue>` (#3318): protect the lane worktree from GC while finishing by hand. */
|
|
1952
|
+
export async function cmdWorktreeKeep(issueArg, opts) {
|
|
1953
|
+
const issue = parseIssueArg(issueArg);
|
|
1954
|
+
const repoRoot = await getRepoRoot();
|
|
1955
|
+
const paths = getFactoryPaths(repoRoot);
|
|
1956
|
+
const ghRepo = await getGitHubRepo();
|
|
1957
|
+
const branchPrefix = branchPrefixOrExit(opts.branchPrefix);
|
|
1958
|
+
await runWorktreeKeep(issue, { reason: opts.reason }, {
|
|
1959
|
+
keepsFile: paths.worktreeKeeps,
|
|
1960
|
+
worktreePath: (n) => worktreePathFor(repoRoot, ghRepo, n, branchPrefix),
|
|
1961
|
+
withLock: (fn) => withFileLock(paths.gitLock, fn),
|
|
1962
|
+
});
|
|
1963
|
+
}
|
|
1964
|
+
/** `factory worktree release <issue>` (#3318): drop the issue's keep record. */
|
|
1965
|
+
export async function cmdWorktreeRelease(issueArg) {
|
|
1966
|
+
const issue = parseIssueArg(issueArg);
|
|
1967
|
+
const paths = getFactoryPaths(await getRepoRoot());
|
|
1968
|
+
await runWorktreeRelease(issue, {
|
|
1969
|
+
keepsFile: paths.worktreeKeeps,
|
|
1970
|
+
withLock: (fn) => withFileLock(paths.gitLock, fn),
|
|
1971
|
+
});
|
|
1972
|
+
}
|
|
1950
1973
|
/** `factory reset <issue...>` (#1787): wipes an issue's local state; see reset.ts. */
|
|
1951
1974
|
export async function cmdReset(issues, opts) {
|
|
1952
1975
|
let nums;
|
|
@@ -2207,6 +2230,8 @@ export async function cmdUnpark(issueArg, opts = {}) {
|
|
|
2207
2230
|
try {
|
|
2208
2231
|
const [owner, repo] = (await getGitHubRepo()).split('/');
|
|
2209
2232
|
result = await runUnpark({
|
|
2233
|
+
keepsFile: getFactoryPaths(await getRepoRoot()).worktreeKeeps,
|
|
2234
|
+
warn: (msg) => console.error(styleText('yellow', `factory: ${msg}`)),
|
|
2210
2235
|
client: createOctokitQueueClient(getOctokit()),
|
|
2211
2236
|
owner,
|
|
2212
2237
|
repo,
|
|
@@ -2598,6 +2623,7 @@ export function laneQueueDeps(queue, lane) {
|
|
|
2598
2623
|
releaseIssue: (issue, outcome) => queue.release(issue, outcome),
|
|
2599
2624
|
heartbeat: (issue) => queue.heartbeat(issue),
|
|
2600
2625
|
countRemaining: async () => (await queue.list(lane)).length,
|
|
2626
|
+
queueChildren: (parent, children) => queue.enqueueAfter(lane, parent, children),
|
|
2601
2627
|
};
|
|
2602
2628
|
}
|
|
2603
2629
|
export { preflightQueuedIssue };
|
|
@@ -2764,9 +2790,10 @@ export async function superviseLoop(deps) {
|
|
|
2764
2790
|
else {
|
|
2765
2791
|
pct = reading.pct;
|
|
2766
2792
|
source = reading.source;
|
|
2793
|
+
let detail = reading.detail;
|
|
2767
2794
|
if (cycle > 1 || !now) {
|
|
2768
2795
|
while (pct >= resumeAt) {
|
|
2769
|
-
writeLine(`[factory] supervise: trailing usage (${source}) ${Math.round(pct * 100)}% >= resume gate ${Math.round(resumeAt * 100)}% — waiting ${pollMs / 1000}s`);
|
|
2796
|
+
writeLine(`[factory] supervise: trailing usage (${source}) ${Math.round(pct * 100)}% >= resume gate ${Math.round(resumeAt * 100)}% (${detail}) — waiting ${pollMs / 1000}s`);
|
|
2770
2797
|
await sleep(pollMs);
|
|
2771
2798
|
reading = await readUsageFn();
|
|
2772
2799
|
if (reading === null) {
|
|
@@ -2777,6 +2804,7 @@ export async function superviseLoop(deps) {
|
|
|
2777
2804
|
}
|
|
2778
2805
|
pct = reading.pct;
|
|
2779
2806
|
source = reading.source;
|
|
2807
|
+
detail = reading.detail;
|
|
2780
2808
|
}
|
|
2781
2809
|
}
|
|
2782
2810
|
}
|
|
@@ -3135,6 +3163,8 @@ export const PROGRAM_HANDLERS = {
|
|
|
3135
3163
|
cmdDaemonLogs,
|
|
3136
3164
|
cmdSelfUpdateCheck,
|
|
3137
3165
|
cmdWorktreeGc,
|
|
3166
|
+
cmdWorktreeKeep,
|
|
3167
|
+
cmdWorktreeRelease,
|
|
3138
3168
|
cmdReset,
|
|
3139
3169
|
cmdSupervise: runSupervise,
|
|
3140
3170
|
cmdStop,
|