looply-cli 0.5.39 → 0.5.48
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/.src-hash +1 -1
- package/dist/account-standing.d.ts +23 -0
- package/dist/account-standing.d.ts.map +1 -0
- package/dist/account-standing.js +41 -0
- package/dist/account-standing.js.map +1 -0
- package/dist/autonomy-controller.d.ts.map +1 -1
- package/dist/autonomy-controller.js +6 -0
- package/dist/autonomy-controller.js.map +1 -1
- package/dist/autonomy-tick.d.ts.map +1 -1
- package/dist/autonomy-tick.js +20 -2
- package/dist/autonomy-tick.js.map +1 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +5 -0
- package/dist/bin.js.map +1 -1
- package/dist/branch-delivery-wiring.d.ts +56 -1
- package/dist/branch-delivery-wiring.d.ts.map +1 -1
- package/dist/branch-delivery-wiring.js +135 -26
- package/dist/branch-delivery-wiring.js.map +1 -1
- package/dist/branch-delivery.d.ts +20 -0
- package/dist/branch-delivery.d.ts.map +1 -1
- package/dist/branch-delivery.js +78 -6
- package/dist/branch-delivery.js.map +1 -1
- package/dist/canary-cmd.d.ts +42 -0
- package/dist/canary-cmd.d.ts.map +1 -0
- package/dist/canary-cmd.js +242 -0
- package/dist/canary-cmd.js.map +1 -0
- package/dist/canary-wiring.d.ts +31 -0
- package/dist/canary-wiring.d.ts.map +1 -0
- package/dist/canary-wiring.js +139 -0
- package/dist/canary-wiring.js.map +1 -0
- package/dist/canary.d.ts +123 -0
- package/dist/canary.d.ts.map +1 -0
- package/dist/canary.js +259 -0
- package/dist/canary.js.map +1 -0
- package/dist/checkout-deps.d.ts +6 -0
- package/dist/checkout-deps.d.ts.map +1 -1
- package/dist/checkout-deps.js +11 -0
- package/dist/checkout-deps.js.map +1 -1
- package/dist/checkout-leftovers.d.ts.map +1 -1
- package/dist/checkout-leftovers.js +28 -21
- package/dist/checkout-leftovers.js.map +1 -1
- package/dist/coordinator-state.d.ts.map +1 -1
- package/dist/coordinator-state.js +6 -4
- package/dist/coordinator-state.js.map +1 -1
- package/dist/daemon-cmd.d.ts.map +1 -1
- package/dist/daemon-cmd.js +76 -1
- package/dist/daemon-cmd.js.map +1 -1
- package/dist/deliver-cmd.d.ts +11 -0
- package/dist/deliver-cmd.d.ts.map +1 -1
- package/dist/deliver-cmd.js +23 -0
- package/dist/deliver-cmd.js.map +1 -1
- package/dist/environment-hold.d.ts +32 -1
- package/dist/environment-hold.d.ts.map +1 -1
- package/dist/environment-hold.js +52 -5
- package/dist/environment-hold.js.map +1 -1
- package/dist/feature-report.d.ts +4 -2
- package/dist/feature-report.d.ts.map +1 -1
- package/dist/feature-report.js +47 -6
- package/dist/feature-report.js.map +1 -1
- package/dist/gate-health.d.ts +7 -0
- package/dist/gate-health.d.ts.map +1 -1
- package/dist/gate-health.js +11 -1
- package/dist/gate-health.js.map +1 -1
- package/dist/git-driver.d.ts +5 -0
- package/dist/git-driver.d.ts.map +1 -1
- package/dist/git-driver.js +8 -0
- package/dist/git-driver.js.map +1 -1
- package/dist/goal-adaptive.d.ts +25 -1
- package/dist/goal-adaptive.d.ts.map +1 -1
- package/dist/goal-adaptive.js +42 -1
- package/dist/goal-adaptive.js.map +1 -1
- package/dist/goal-compile.d.ts.map +1 -1
- package/dist/goal-compile.js +16 -0
- package/dist/goal-compile.js.map +1 -1
- package/dist/goal-gap.d.ts +35 -3
- package/dist/goal-gap.d.ts.map +1 -1
- package/dist/goal-gap.js +110 -11
- package/dist/goal-gap.js.map +1 -1
- package/dist/grant-waiting-wiring.d.ts +17 -1
- package/dist/grant-waiting-wiring.d.ts.map +1 -1
- package/dist/grant-waiting-wiring.js +29 -2
- package/dist/grant-waiting-wiring.js.map +1 -1
- package/dist/heroku-cli.d.ts +13 -1
- package/dist/heroku-cli.d.ts.map +1 -1
- package/dist/heroku-cli.js +15 -0
- package/dist/heroku-cli.js.map +1 -1
- package/dist/machine-settings.d.ts +11 -0
- package/dist/machine-settings.d.ts.map +1 -1
- package/dist/machine-settings.js +41 -0
- package/dist/machine-settings.js.map +1 -1
- package/dist/outcome-audit.d.ts +150 -0
- package/dist/outcome-audit.d.ts.map +1 -0
- package/dist/outcome-audit.js +310 -0
- package/dist/outcome-audit.js.map +1 -0
- package/dist/parts-attribution.d.ts +38 -0
- package/dist/parts-attribution.d.ts.map +1 -0
- package/dist/parts-attribution.js +61 -0
- package/dist/parts-attribution.js.map +1 -0
- package/dist/project-terminal.d.ts +3 -1
- package/dist/project-terminal.d.ts.map +1 -1
- package/dist/project-terminal.js +37 -5
- package/dist/project-terminal.js.map +1 -1
- package/dist/provider-accounts.d.ts +5 -1
- package/dist/provider-accounts.d.ts.map +1 -1
- package/dist/provider-accounts.js +1 -0
- package/dist/provider-accounts.js.map +1 -1
- package/dist/pursuit-delivery.d.ts +5 -20
- package/dist/pursuit-delivery.d.ts.map +1 -1
- package/dist/pursuit-delivery.js +30 -2
- package/dist/pursuit-delivery.js.map +1 -1
- package/dist/pursuit-ending.d.ts.map +1 -1
- package/dist/pursuit-ending.js +10 -0
- package/dist/pursuit-ending.js.map +1 -1
- package/dist/qa-feedback.d.ts +110 -0
- package/dist/qa-feedback.d.ts.map +1 -0
- package/dist/qa-feedback.js +353 -0
- package/dist/qa-feedback.js.map +1 -0
- package/dist/run-cmd.d.ts.map +1 -1
- package/dist/run-cmd.js +90 -7
- package/dist/run-cmd.js.map +1 -1
- package/dist/run-refusal-marks.d.ts +8 -1
- package/dist/run-refusal-marks.d.ts.map +1 -1
- package/dist/run-refusal-marks.js +14 -1
- package/dist/run-refusal-marks.js.map +1 -1
- package/dist/self-update.d.ts +440 -0
- package/dist/self-update.d.ts.map +1 -0
- package/dist/self-update.js +1006 -0
- package/dist/self-update.js.map +1 -0
- package/dist/serve-cmd.d.ts +32 -1
- package/dist/serve-cmd.d.ts.map +1 -1
- package/dist/serve-cmd.js +162 -7
- package/dist/serve-cmd.js.map +1 -1
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +3 -0
- package/dist/serve.js.map +1 -1
- package/dist/server-client.d.ts +32 -1
- package/dist/server-client.d.ts.map +1 -1
- package/dist/server-client.js +28 -0
- package/dist/server-client.js.map +1 -1
- package/dist/setup-check-wiring.d.ts +31 -0
- package/dist/setup-check-wiring.d.ts.map +1 -0
- package/dist/setup-check-wiring.js +195 -0
- package/dist/setup-check-wiring.js.map +1 -0
- package/dist/setup-check.d.ts +228 -0
- package/dist/setup-check.d.ts.map +1 -0
- package/dist/setup-check.js +632 -0
- package/dist/setup-check.js.map +1 -0
- package/dist/signals.d.ts +13 -0
- package/dist/signals.d.ts.map +1 -1
- package/dist/signals.js +26 -1
- package/dist/signals.js.map +1 -1
- package/dist/ticket-attachments.d.ts +31 -1
- package/dist/ticket-attachments.d.ts.map +1 -1
- package/dist/ticket-attachments.js +232 -9
- package/dist/ticket-attachments.js.map +1 -1
- package/dist/watchdog-wiring.d.ts +151 -0
- package/dist/watchdog-wiring.d.ts.map +1 -0
- package/dist/watchdog-wiring.js +406 -0
- package/dist/watchdog-wiring.js.map +1 -0
- package/dist/watchdog.d.ts +124 -0
- package/dist/watchdog.d.ts.map +1 -0
- package/dist/watchdog.js +444 -0
- package/dist/watchdog.js.map +1 -0
- package/package.json +4 -4
package/dist/run-cmd.js
CHANGED
|
@@ -77,7 +77,9 @@ const goal_replay_1 = require("./goal-replay");
|
|
|
77
77
|
const branch_replay_1 = require("./branch-replay");
|
|
78
78
|
const run_base_2 = require("./run-base");
|
|
79
79
|
const round_records_1 = require("./round-records");
|
|
80
|
+
const parts_attribution_1 = require("./parts-attribution");
|
|
80
81
|
const goal_gap_1 = require("./goal-gap");
|
|
82
|
+
const qa_feedback_1 = require("./qa-feedback");
|
|
81
83
|
const adaptive_budget_1 = require("./adaptive-budget");
|
|
82
84
|
const visual_proof_run_1 = require("./visual-proof-run");
|
|
83
85
|
const bug_repro_1 = require("./bug-repro");
|
|
@@ -3527,7 +3529,24 @@ async function runLoop(opts) {
|
|
|
3527
3529
|
// A reproduced bug is met only when its test passes at this tree, run by the machine (`bug-repro.ts`).
|
|
3528
3530
|
// The ticket's images are named to the check too (LOO-B-2).
|
|
3529
3531
|
const seen = { ...i, goalText: (0, ticket_attachments_1.withAttachments)(i.goalText, cwd, `${bound.id}@${bound.version}`) };
|
|
3530
|
-
|
|
3532
|
+
/**
|
|
3533
|
+
* A SEND-BACK'S PROOFS are checked against this work's own changes (`qa-feedback.ts`): the files changed
|
|
3534
|
+
* from the merge base with the base branch to HEAD, read at this tree. Read only for a send-back; null
|
|
3535
|
+
* when the base or the diff could not be read (then a cited file must at least exist and hold the line).
|
|
3536
|
+
*/
|
|
3537
|
+
const qaProof = (0, qa_feedback_1.qaFeedbackOf)(bound.text) === null
|
|
3538
|
+
? undefined
|
|
3539
|
+
: {
|
|
3540
|
+
changedFiles: await (async () => {
|
|
3541
|
+
const base = (await (0, run_base_2.resolveBaseBranch)(git, config.run.baseBranch).catch(() => null))?.ref ?? null;
|
|
3542
|
+
const head = await git.headSha().catch(() => null);
|
|
3543
|
+
const from = base === null || head === null ? null : await git.mergeBase(base, head);
|
|
3544
|
+
return from === null || head === null ? null : await git.changedPathsBetween(from, head).catch(() => null);
|
|
3545
|
+
})(),
|
|
3546
|
+
readFile: (0, bug_repro_1.checkoutReader)(cwd),
|
|
3547
|
+
};
|
|
3548
|
+
const proofDeps = qaProof === undefined ? {} : { qaProof };
|
|
3549
|
+
const gap = await (0, goal_gap_1.evaluateGoalGap)(screenshots.length > 0 ? { ...seen, screenshots } : seen, Object.assign(proofDeps, { invoke: planAgent, timeoutMs: adaptiveBudget.checkMs }));
|
|
3531
3550
|
if (!gap.ok && gap.timedOut === true)
|
|
3532
3551
|
checkTimedOut = true;
|
|
3533
3552
|
return (0, bug_repro_1.evaluateWithReproduction)(gap, reproFor(goalId, bound.version), {
|
|
@@ -3715,6 +3734,10 @@ async function runLoop(opts) {
|
|
|
3715
3734
|
*/
|
|
3716
3735
|
await recordDelivery(scope, bound.version);
|
|
3717
3736
|
}
|
|
3737
|
+
// A bundle met in part delivers too: its "delivery" claim names the delivered commit, so a goal that builds on
|
|
3738
|
+
// it (the blocked ticket's answer, a dependent) is cut from that commit, not the branch tip (`cutPointFor`).
|
|
3739
|
+
if (adaptive.kind === 'partly-met')
|
|
3740
|
+
await recordDelivery(scope, bound.version);
|
|
3718
3741
|
if (adaptive.kind === 'planned') {
|
|
3719
3742
|
const at = Date.now();
|
|
3720
3743
|
const next = adaptive.revision;
|
|
@@ -3936,7 +3959,48 @@ async function runLoop(opts) {
|
|
|
3936
3959
|
? { runId: deliveringRunId, sha: deliveringSha, checks: Object.fromEntries(key2Saw.checks) }
|
|
3937
3960
|
: undefined;
|
|
3938
3961
|
// A split goal (RBB-B-209) delivers what this repository holds too, when its evidence held.
|
|
3939
|
-
const
|
|
3962
|
+
const delivered = said.terminal && (said.code === 'goal_satisfied' || said.code === 'sibling_change_required' || said.code === 'goal_partly_met') ? deliveryNow() : undefined;
|
|
3963
|
+
// A bundle met in part names which tickets this delivery is for (core `goal-parts.ts`).
|
|
3964
|
+
// 🔴 And whether an open ticket's work rides along: the plan steps of ANY revision or version whose commits the
|
|
3965
|
+
// delivered commit holds (`keptPartTitles`), by the ticket key each title starts with (`partsHeldBy`). Unknown
|
|
3966
|
+
// attribution holds it — review, never merged.
|
|
3967
|
+
const keptTitles = async () => {
|
|
3968
|
+
if (binding.kind !== 'bound')
|
|
3969
|
+
return null;
|
|
3970
|
+
if (deliveringSha === null)
|
|
3971
|
+
return null;
|
|
3972
|
+
const records = await (0, round_records_1.readRoundRecords)(stateDir, ledger_store_1.nodeLedgerFs).catch(() => null);
|
|
3973
|
+
// What the delivered commit adds on top of the base and the goals it declares it builds on (their delivered
|
|
3974
|
+
// commit, else their run branch). Anything git cannot answer is unknown. ORIGIN's base, not a local one that
|
|
3975
|
+
// may be ahead of it: a commit only local main has is not in what the pull request merges into.
|
|
3976
|
+
const localBase = (await (0, run_base_2.resolveBaseBranch)(git, config.run.baseBranch).catch(() => null))?.ref ?? null;
|
|
3977
|
+
const base = localBase === null ? null : await (0, parts_attribution_1.originBaseOf)(git, localBase);
|
|
3978
|
+
const claims = (0, lane_claims_1.readLaneClaims)(cwd);
|
|
3979
|
+
const depTips = (binding.goal.dependsOn ?? []).flatMap((d) => {
|
|
3980
|
+
const mine = claims.filter((c) => c.goalId === d);
|
|
3981
|
+
const delivery = [...mine].reverse().find((c) => c.kind === 'delivery');
|
|
3982
|
+
const branchClaim = [...mine].reverse().find((c) => c.kind === 'claims');
|
|
3983
|
+
return delivery !== undefined ? [delivery.commitSha] : branchClaim !== undefined ? [branchClaim.branch] : [];
|
|
3984
|
+
});
|
|
3985
|
+
const commits = base === null ? null : await git.commitsNotIn(deliveringSha, [base, ...depTips]).catch(() => null);
|
|
3986
|
+
return (0, parts_attribution_1.keptPartTitles)({
|
|
3987
|
+
items: queue.list(),
|
|
3988
|
+
delivered: key2Saw === null ? [] : [...key2Saw.delivered],
|
|
3989
|
+
rounds: records !== null && records.ok ? records.rounds : null,
|
|
3990
|
+
commits,
|
|
3991
|
+
aliases: (0, goal_replay_1.replayedAs)(projectStateDirPath, binding.goal.id),
|
|
3992
|
+
});
|
|
3993
|
+
};
|
|
3994
|
+
const kept = delivered !== undefined && adaptive.kind === 'partly-met' ? await keptTitles() : null;
|
|
3995
|
+
// Not knowable → held on every open ticket.
|
|
3996
|
+
const heldBy = delivered === undefined || adaptive.kind !== 'partly-met'
|
|
3997
|
+
? null
|
|
3998
|
+
: kept === null
|
|
3999
|
+
? adaptive.parts.filter((p) => !p.met).map((p) => p.ref)
|
|
4000
|
+
: (0, core_4.partsHeldBy)(adaptive.parts, kept);
|
|
4001
|
+
const delivery = delivered !== undefined && adaptive.kind === 'partly-met'
|
|
4002
|
+
? { ...delivered, parts: adaptive.parts, ...(heldBy === null ? {} : { partsHeldBy: heldBy }) }
|
|
4003
|
+
: delivered;
|
|
3940
4004
|
await releaseHold();
|
|
3941
4005
|
// The branch the controller will ask the lane about: the one that delivered (F20).
|
|
3942
4006
|
const refusedOn = deliveredOn;
|
|
@@ -4485,11 +4549,20 @@ async function runLoop(opts) {
|
|
|
4485
4549
|
let record;
|
|
4486
4550
|
try {
|
|
4487
4551
|
const treeSha = await git.headTreeSha();
|
|
4488
|
-
|
|
4552
|
+
/**
|
|
4553
|
+
* 🔴 THE INSTALLED VERSION, NOT `CLI_VERSION` (a constant '0.1.0' that never moves): keyed on that,
|
|
4554
|
+
* a new Looply reused the old one's answer — the very thing the version in the key is for.
|
|
4555
|
+
* The setup check (`setup-check.ts`) keys its record the same way, so the first goal reuses it.
|
|
4556
|
+
*/
|
|
4557
|
+
const key = (0, gate_health_1.baseHealthKey)(treeSha, steps, (0, daemon_cmd_1.installedCliVersion)());
|
|
4489
4558
|
record = (0, gate_health_1.readBaseHealth)(projectStateDirPath);
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4559
|
+
/**
|
|
4560
|
+
* Dependencies installed this run: what an earlier check of this base said was said without them —
|
|
4561
|
+
* unless it, too, ran with them installed AND found the base healthy (the setup check's throwaway
|
|
4562
|
+
* checkout does). A quarantined or red answer is never carried across an install: this run decides.
|
|
4563
|
+
*/
|
|
4564
|
+
if ((!depsInstalled || (record?.withDependencies === true && record.state === 'healthy')) && (0, gate_health_1.reusable)(record, key, Date.now())) {
|
|
4565
|
+
log(`base : the checks on this base were ${record.state} at ${record.checkedAt}${record.by === 'setup' ? ' (checked when the repository was set up)' : ''}`);
|
|
4493
4566
|
}
|
|
4494
4567
|
else {
|
|
4495
4568
|
log('base : running the checks on the unchanged base before the first round');
|
|
@@ -4506,7 +4579,17 @@ async function runLoop(opts) {
|
|
|
4506
4579
|
log(`base : the full output of the red "${step}" run is kept at ${at}`);
|
|
4507
4580
|
},
|
|
4508
4581
|
});
|
|
4509
|
-
record = {
|
|
4582
|
+
record = {
|
|
4583
|
+
version: 1,
|
|
4584
|
+
key,
|
|
4585
|
+
treeSha,
|
|
4586
|
+
baseSha: await git.headSha(),
|
|
4587
|
+
checkedAt: new Date().toISOString(),
|
|
4588
|
+
state: checked.state,
|
|
4589
|
+
steps: checked.steps,
|
|
4590
|
+
...(depsInstalled ? { withDependencies: true } : {}),
|
|
4591
|
+
by: 'run',
|
|
4592
|
+
};
|
|
4510
4593
|
try {
|
|
4511
4594
|
(0, gate_health_1.writeBaseHealth)(projectStateDirPath, record);
|
|
4512
4595
|
}
|