looply-cli 0.5.51 → 0.5.53
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/account-connect.d.ts +2 -1
- package/dist/account-connect.d.ts.map +1 -1
- package/dist/account-connect.js.map +1 -1
- package/dist/adaptive-budget.d.ts +6 -0
- package/dist/adaptive-budget.d.ts.map +1 -1
- package/dist/adaptive-budget.js +9 -0
- package/dist/adaptive-budget.js.map +1 -1
- package/dist/autonomy-controller.d.ts.map +1 -1
- package/dist/autonomy-controller.js +19 -0
- package/dist/autonomy-controller.js.map +1 -1
- package/dist/base-check-turns.d.ts +38 -0
- package/dist/base-check-turns.d.ts.map +1 -0
- package/dist/base-check-turns.js +118 -0
- package/dist/base-check-turns.js.map +1 -0
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +32 -2
- package/dist/bin.js.map +1 -1
- package/dist/branch-delivery.d.ts +48 -1
- package/dist/branch-delivery.d.ts.map +1 -1
- package/dist/branch-delivery.js +203 -4
- package/dist/branch-delivery.js.map +1 -1
- package/dist/bug-repro.d.ts +89 -9
- package/dist/bug-repro.d.ts.map +1 -1
- package/dist/bug-repro.js +242 -14
- package/dist/bug-repro.js.map +1 -1
- package/dist/checkout-carry.d.ts +31 -0
- package/dist/checkout-carry.d.ts.map +1 -1
- package/dist/checkout-carry.js +98 -3
- package/dist/checkout-carry.js.map +1 -1
- package/dist/checkout-deps.d.ts +2 -0
- package/dist/checkout-deps.d.ts.map +1 -1
- package/dist/checkout-deps.js +2 -0
- package/dist/checkout-deps.js.map +1 -1
- package/dist/daemon-cmd.d.ts +1 -1
- package/dist/daemon-cmd.d.ts.map +1 -1
- package/dist/daemon-cmd.js +10 -3
- package/dist/daemon-cmd.js.map +1 -1
- package/dist/fresh-gates.d.ts.map +1 -1
- package/dist/fresh-gates.js +13 -0
- package/dist/fresh-gates.js.map +1 -1
- package/dist/gate-health.d.ts +2 -0
- package/dist/gate-health.d.ts.map +1 -1
- package/dist/gate-health.js +41 -4
- package/dist/gate-health.js.map +1 -1
- package/dist/goal-adaptive.d.ts +45 -3
- package/dist/goal-adaptive.d.ts.map +1 -1
- package/dist/goal-adaptive.js +104 -16
- package/dist/goal-adaptive.js.map +1 -1
- package/dist/goal-already-met.d.ts +62 -0
- package/dist/goal-already-met.d.ts.map +1 -0
- package/dist/goal-already-met.js +95 -0
- package/dist/goal-already-met.js.map +1 -0
- package/dist/goal-execution-evidence.d.ts +7 -1
- package/dist/goal-execution-evidence.d.ts.map +1 -1
- package/dist/goal-execution-evidence.js +12 -1
- package/dist/goal-execution-evidence.js.map +1 -1
- package/dist/goal-gap.d.ts +48 -5
- package/dist/goal-gap.d.ts.map +1 -1
- package/dist/goal-gap.js +103 -13
- package/dist/goal-gap.js.map +1 -1
- package/dist/integration-deps.d.ts.map +1 -1
- package/dist/integration-deps.js +18 -0
- package/dist/integration-deps.js.map +1 -1
- package/dist/machine-settings.d.ts +9 -0
- package/dist/machine-settings.d.ts.map +1 -1
- package/dist/machine-settings.js +35 -2
- package/dist/machine-settings.js.map +1 -1
- package/dist/output-gist.d.ts +40 -0
- package/dist/output-gist.d.ts.map +1 -0
- package/dist/output-gist.js +107 -0
- package/dist/output-gist.js.map +1 -0
- package/dist/plan-recovery.d.ts +14 -3
- package/dist/plan-recovery.d.ts.map +1 -1
- package/dist/plan-recovery.js +24 -6
- package/dist/plan-recovery.js.map +1 -1
- package/dist/provider-accounts.d.ts +0 -6
- package/dist/provider-accounts.d.ts.map +1 -1
- package/dist/provider-accounts.js +0 -6
- package/dist/provider-accounts.js.map +1 -1
- package/dist/pursuit-ending.d.ts.map +1 -1
- package/dist/pursuit-ending.js +11 -0
- package/dist/pursuit-ending.js.map +1 -1
- package/dist/quarantine-report.d.ts +32 -0
- package/dist/quarantine-report.d.ts.map +1 -0
- package/dist/quarantine-report.js +75 -0
- package/dist/quarantine-report.js.map +1 -0
- package/dist/round-runner.d.ts +13 -2
- package/dist/round-runner.d.ts.map +1 -1
- package/dist/round-runner.js +5 -1
- package/dist/round-runner.js.map +1 -1
- package/dist/run-cmd.d.ts.map +1 -1
- package/dist/run-cmd.js +84 -11
- package/dist/run-cmd.js.map +1 -1
- package/dist/self-update.d.ts.map +1 -1
- package/dist/self-update.js +5 -15
- package/dist/self-update.js.map +1 -1
- package/dist/serve-cmd.d.ts +9 -0
- package/dist/serve-cmd.d.ts.map +1 -1
- package/dist/serve-cmd.js +45 -1
- package/dist/serve-cmd.js.map +1 -1
- package/dist/serve-log.d.ts +52 -0
- package/dist/serve-log.d.ts.map +1 -0
- package/dist/serve-log.js +146 -0
- package/dist/serve-log.js.map +1 -0
- package/dist/serve.d.ts +7 -7
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +11 -15
- package/dist/serve.js.map +1 -1
- package/dist/server-client.d.ts +14 -2
- package/dist/server-client.d.ts.map +1 -1
- package/dist/server-client.js +24 -2
- package/dist/server-client.js.map +1 -1
- package/dist/setup-check-wiring.d.ts +8 -0
- package/dist/setup-check-wiring.d.ts.map +1 -1
- package/dist/setup-check-wiring.js +78 -22
- package/dist/setup-check-wiring.js.map +1 -1
- package/dist/setup-check.d.ts +4 -0
- package/dist/setup-check.d.ts.map +1 -1
- package/dist/setup-check.js +70 -3
- package/dist/setup-check.js.map +1 -1
- package/dist/steady-log.d.ts +48 -0
- package/dist/steady-log.d.ts.map +1 -0
- package/dist/steady-log.js +100 -0
- package/dist/steady-log.js.map +1 -0
- package/dist/verify-cmd.d.ts +0 -2
- package/dist/verify-cmd.d.ts.map +1 -1
- package/dist/verify-cmd.js +0 -5
- package/dist/verify-cmd.js.map +1 -1
- package/dist/workspace-builds.d.ts +153 -0
- package/dist/workspace-builds.d.ts.map +1 -0
- package/dist/workspace-builds.js +347 -0
- package/dist/workspace-builds.js.map +1 -0
- package/dist/workspace-quarantine.d.ts +36 -2
- package/dist/workspace-quarantine.d.ts.map +1 -1
- package/dist/workspace-quarantine.js +53 -0
- package/dist/workspace-quarantine.js.map +1 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +11 -3
- package/dist/workspace.js.map +1 -1
- package/package.json +2 -2
- package/win/contained-node.cjs +110 -1
- package/dist/.src-hash +0 -1
package/dist/run-cmd.js
CHANGED
|
@@ -29,6 +29,7 @@ const control_file_1 = require("./control-file");
|
|
|
29
29
|
const git_driver_1 = require("./git-driver");
|
|
30
30
|
const untrusted_gate_1 = require("./untrusted-gate");
|
|
31
31
|
const checkout_deps_1 = require("./checkout-deps");
|
|
32
|
+
const workspace_builds_1 = require("./workspace-builds");
|
|
32
33
|
const model_transport_1 = require("./model-transport");
|
|
33
34
|
const agent_envelope_1 = require("./agent-envelope");
|
|
34
35
|
const provider_limit_1 = require("./provider-limit");
|
|
@@ -73,6 +74,7 @@ const planner_timeouts_1 = require("./planner-timeouts");
|
|
|
73
74
|
const plan_recovery_1 = require("./plan-recovery");
|
|
74
75
|
const goal_execution_evidence_1 = require("./goal-execution-evidence");
|
|
75
76
|
const goal_reproof_1 = require("./goal-reproof");
|
|
77
|
+
const goal_already_met_1 = require("./goal-already-met");
|
|
76
78
|
const goal_replay_1 = require("./goal-replay");
|
|
77
79
|
const branch_replay_1 = require("./branch-replay");
|
|
78
80
|
const run_base_2 = require("./run-base");
|
|
@@ -794,6 +796,8 @@ async function runLoop(opts) {
|
|
|
794
796
|
...(withQuarantine ? { quarantineFor: (cmd) => gateQuarantine.get(cmd) ?? null } : {}),
|
|
795
797
|
substituteFor: (cmd) => gateSubstitute.get(cmd) ?? null,
|
|
796
798
|
});
|
|
799
|
+
/** What Looply built in this checkout, built again before a round's checks when the round changed it. */
|
|
800
|
+
const workspaceBuilds = (0, workspace_builds_1.workspaceRebuilds)(cwd, (0, checkout_deps_1.checkoutDepsFs)(cwd), log);
|
|
797
801
|
const ledger = new ledger_store_1.LedgerStore(stateDir, ledger_store_1.nodeLedgerFs);
|
|
798
802
|
const queue = new queue_store_1.QueueStore(stateDir, ledger_store_1.nodeLedgerFs);
|
|
799
803
|
const evidence = new evidence_cache_1.EvidenceCache(stateDir, ledger_store_1.nodeLedgerFs);
|
|
@@ -2656,7 +2660,7 @@ async function runLoop(opts) {
|
|
|
2656
2660
|
const boundGoal = opts.goalId === undefined ? undefined : goals.get(opts.goalId);
|
|
2657
2661
|
const accountScope = {
|
|
2658
2662
|
projectId: projectId === 'local' ? null : projectId,
|
|
2659
|
-
requesterRef:
|
|
2663
|
+
requesterRef: requesterRefOf(boundGoal),
|
|
2660
2664
|
};
|
|
2661
2665
|
const withFinalMessage = (invoke, role = 'implementer') => builtIn
|
|
2662
2666
|
? (0, agent_envelope_1.unwrapping)((0, provider_limit_1.waitingOutProviderLimits)(invoke, {
|
|
@@ -2881,7 +2885,7 @@ async function runLoop(opts) {
|
|
|
2881
2885
|
let compileTimedOut = false;
|
|
2882
2886
|
let checkTimedOut = false;
|
|
2883
2887
|
// RBB-B-218: the step check's own tier, and whether a pass this run checked nothing in time.
|
|
2884
|
-
const verifyKey = binding.kind === 'bound' ? (0,
|
|
2888
|
+
const verifyKey = binding.kind === 'bound' ? (0, adaptive_budget_1.verifyTimeoutKey)(binding.goal.id, binding.goal.version) : null;
|
|
2885
2889
|
const verifyTier = (0, verify_cmd_2.verifierTierFor)(verifyKey === null ? 0 : (0, planner_timeouts_1.plannerTimeoutsFor)(projectStateDirPath, verifyKey));
|
|
2886
2890
|
let verifyTimedOut = false;
|
|
2887
2891
|
/**
|
|
@@ -3619,7 +3623,10 @@ async function runLoop(opts) {
|
|
|
3619
3623
|
isAncestor: (a, of) => git.isAncestor(a, of),
|
|
3620
3624
|
changedPathsBetween: (from, to) => git.changedPathsBetween(from, to),
|
|
3621
3625
|
runGates: async (paths) => {
|
|
3622
|
-
const
|
|
3626
|
+
const rebuilt = workspaceBuilds.before();
|
|
3627
|
+
const gate = await (0, gate_1.runGate)({ steps: [...rebuilt, ...config.gates], changedPaths: paths, runner: gateRunnerHere(true) });
|
|
3628
|
+
if (rebuilt.length > 0)
|
|
3629
|
+
workspaceBuilds.after(gate.steps);
|
|
3623
3630
|
reproofVerdict = gate.verdict;
|
|
3624
3631
|
return gate.steps;
|
|
3625
3632
|
},
|
|
@@ -3680,13 +3687,55 @@ async function runLoop(opts) {
|
|
|
3680
3687
|
])),
|
|
3681
3688
|
};
|
|
3682
3689
|
}
|
|
3683
|
-
|
|
3690
|
+
if (confirmed.ok)
|
|
3691
|
+
return { ok: true };
|
|
3692
|
+
return confirmed.nothingDelivered === true
|
|
3693
|
+
? { ok: false, reason: confirmed.because, nothingDelivered: true }
|
|
3694
|
+
: { ok: false, reason: confirmed.because };
|
|
3684
3695
|
},
|
|
3696
|
+
/**
|
|
3697
|
+
* KEY 2 FOR A GOAL THAT HAD NOTHING TO DO (`goal-already-met.ts`): the check's pointers exist here, this
|
|
3698
|
+
* commit is in the remote's base branch, and the gates — run now, with the pointed-at files as the changed
|
|
3699
|
+
* paths — pass every required step. Never asked for a carried commit: that is somebody's delivered work.
|
|
3700
|
+
*/
|
|
3701
|
+
...(judged.kind === 'carried'
|
|
3702
|
+
? {}
|
|
3703
|
+
: {
|
|
3704
|
+
confirmAlreadyMet: async (head, where) => {
|
|
3705
|
+
const outcome = await (0, goal_already_met_1.confirmAlreadyMet)(head, where, {
|
|
3706
|
+
readFile: (0, bug_repro_1.checkoutReader)(cwd),
|
|
3707
|
+
baseRef: async () => {
|
|
3708
|
+
const local = (await (0, run_base_2.resolveBaseBranch)(git, config.run.baseBranch).catch(() => null))?.ref ?? null;
|
|
3709
|
+
return local === null ? null : (0, parts_attribution_1.originBaseOf)(git, local);
|
|
3710
|
+
},
|
|
3711
|
+
isAncestor: (a, of) => git.isAncestor(a, of),
|
|
3712
|
+
runGates: async (paths) => {
|
|
3713
|
+
log('goal : nothing needed changing — running the gates at the current tree to check the code is sound as it is');
|
|
3714
|
+
const rebuilt = workspaceBuilds.before();
|
|
3715
|
+
const gate = await (0, gate_1.runGate)({ steps: [...rebuilt, ...config.gates], changedPaths: [...paths], runner: gateRunnerHere(true) });
|
|
3716
|
+
if (rebuilt.length > 0)
|
|
3717
|
+
workspaceBuilds.after(gate.steps);
|
|
3718
|
+
return { steps: gate.steps, blocked: gate.verdict === 'blocked' };
|
|
3719
|
+
},
|
|
3720
|
+
requiredSteps: (0, effective_gates_1.deliveryRequired)(config.gates),
|
|
3721
|
+
});
|
|
3722
|
+
log(`goal : ${outcome.ok ? `already in the code (${outcome.where.join(', ')}), and the gates pass as it is` : `not shown to be already in the code — ${outcome.reason}`}`);
|
|
3723
|
+
return outcome.ok
|
|
3724
|
+
? { ok: true }
|
|
3725
|
+
: outcome.unknown === true
|
|
3726
|
+
? { ok: false, reason: outcome.reason, unknown: true }
|
|
3727
|
+
: { ok: false, reason: outcome.reason };
|
|
3728
|
+
},
|
|
3729
|
+
}),
|
|
3685
3730
|
stillAuthoritative: () => freshAuthority(goalId, bound.version, bound.text),
|
|
3686
3731
|
});
|
|
3687
3732
|
// M3-2: the adaptive plan's answer is checked and recorded the same way; a plan
|
|
3688
3733
|
// with every step refused is no decision, not an empty revision.
|
|
3689
3734
|
let adaptiveChecked = null;
|
|
3735
|
+
// What the goal check said is missing, in the run log — it was written nowhere (`gapLogLines`).
|
|
3736
|
+
if (adaptive.kind === 'planned' || adaptive.kind === 'budget-exhausted')
|
|
3737
|
+
for (const l of (0, goal_adaptive_1.gapLogLines)(adaptive.gaps))
|
|
3738
|
+
log(l);
|
|
3690
3739
|
if (adaptive.kind === 'planned') {
|
|
3691
3740
|
const adaptiveAt = await git.headTreeSha().catch(() => null);
|
|
3692
3741
|
adaptiveChecked = adaptive.steps.ok ? await (0, compile_check_1.checkCompiledPlan)(adaptive.steps.steps, compileReaders, adaptiveAt) : null;
|
|
@@ -4193,6 +4242,8 @@ async function runLoop(opts) {
|
|
|
4193
4242
|
// just wrote, so it runs inside the boundary with Looply's own runtime
|
|
4194
4243
|
// rather than as the daemon with the machine's.
|
|
4195
4244
|
gateRunner: gateRunnerHere(true),
|
|
4245
|
+
// The workspace packages Looply built here, built again when a round changed them (`workspace-builds.ts`).
|
|
4246
|
+
workspaceBuilds,
|
|
4196
4247
|
// ASKED EVERY ROUND, NEVER CACHED. ~0.6 s against a 45-minute agent
|
|
4197
4248
|
// ceiling, and asking each time is what makes the three-round bound mean
|
|
4198
4249
|
// anything — and what lets a machine that recovers mid-run carry on.
|
|
@@ -4534,14 +4585,27 @@ async function runLoop(opts) {
|
|
|
4534
4585
|
let depsInstalled = false;
|
|
4535
4586
|
const dependenciesBeforeFirstRound = async () => {
|
|
4536
4587
|
const plan = (0, checkout_deps_1.dependencyInstallPlan)(config.gates, (0, checkout_deps_1.checkoutDepsFs)(cwd));
|
|
4537
|
-
if (plan.length
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4588
|
+
if (plan.length > 0) {
|
|
4589
|
+
const out = await (0, checkout_deps_1.installDependencies)({ plan, runner: (0, untrusted_gate_1.makeUntrustedGateRunner)(cwd, { network: 'internet-client' }), log });
|
|
4590
|
+
if (out.kind === 'failed') {
|
|
4591
|
+
log(`deps : ${out.because}`);
|
|
4592
|
+
return { ok: false, because: out.because };
|
|
4593
|
+
}
|
|
4594
|
+
depsInstalled = out.kind === 'installed';
|
|
4595
|
+
}
|
|
4596
|
+
/**
|
|
4597
|
+
* THEN THE WORKSPACE'S OWN PACKAGES THE CHECKS IMPORT, built when their entry points are not here
|
|
4598
|
+
* (`workspace-builds.ts`): contained and offline, with the gates' own runner. A failed build is a
|
|
4599
|
+
* machine fault the goal waits on, in the build's own words; a base check said without the build
|
|
4600
|
+
* is not reused (`depsInstalled`), exactly as for an install.
|
|
4601
|
+
*/
|
|
4602
|
+
const built = await (0, workspace_builds_1.buildWorkspacePackages)({ plan: (0, workspace_builds_1.workspaceBuildPlan)((0, checkout_deps_1.checkoutDepsFs)(cwd), cwd), runner: (0, untrusted_gate_1.makeUntrustedGateRunner)(cwd), log, checkout: cwd });
|
|
4603
|
+
if (built.kind === 'failed') {
|
|
4604
|
+
log(`build : ${built.because}`);
|
|
4605
|
+
return { ok: false, because: built.because };
|
|
4543
4606
|
}
|
|
4544
|
-
|
|
4607
|
+
if (built.kind === 'built')
|
|
4608
|
+
depsInstalled = true;
|
|
4545
4609
|
return { ok: true };
|
|
4546
4610
|
};
|
|
4547
4611
|
const baseHealthBeforeFirstRound = async () => {
|
|
@@ -5170,4 +5234,13 @@ async function runLoop(opts) {
|
|
|
5170
5234
|
(0, workspace_1.clearCreationMarker)(stateDir);
|
|
5171
5235
|
}
|
|
5172
5236
|
}
|
|
5237
|
+
/**
|
|
5238
|
+
* Who asked for the work a run is bound to (`requestedBy.ref` on its goal), or null — the requester an
|
|
5239
|
+
* account's owners may allow (`provider-accounts.ts`). Read here, in the composition root, so the
|
|
5240
|
+
* account store itself stays goal-blind (`goal-wiring.spec.ts`).
|
|
5241
|
+
*/
|
|
5242
|
+
function requesterRefOf(goal) {
|
|
5243
|
+
const ref = goal?.requestedBy?.ref;
|
|
5244
|
+
return typeof ref === 'string' && ref !== '' ? ref : null;
|
|
5245
|
+
}
|
|
5173
5246
|
//# sourceMappingURL=run-cmd.js.map
|