archondev 2.19.40 → 2.19.41
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.
|
@@ -5154,7 +5154,7 @@ ${conflictReport.blockerCount} blocking conflict(s) found.`));
|
|
|
5154
5154
|
});
|
|
5155
5155
|
if (isGovernanceViolation(executionResult.errorMessage)) {
|
|
5156
5156
|
const pathScopeViolation = isPathScopeGovernanceViolation(executionResult.errorMessage);
|
|
5157
|
-
if (pathScopeViolation) {
|
|
5157
|
+
if (pathScopeViolation && options.pathScopeAutoRecover !== false) {
|
|
5158
5158
|
const recovered = await attemptPathScopeAutoRecovery(
|
|
5159
5159
|
atom,
|
|
5160
5160
|
cwd,
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
EnvironmentConfigLoader,
|
|
57
57
|
EnvironmentValidator,
|
|
58
58
|
execute
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-AZ6Q26DN.js";
|
|
60
60
|
import {
|
|
61
61
|
cloudCancel,
|
|
62
62
|
cloudLogs,
|
|
@@ -3692,7 +3692,7 @@ async function handleAgentConversationInput(cwd, input) {
|
|
|
3692
3692
|
const { plan: plan3 } = await import("./plan-6FM5N36D.js");
|
|
3693
3693
|
await plan3(await withAllowedPathScope(cwd, enrichedRequest), { conversational: true });
|
|
3694
3694
|
console.log(chalk5.dim("\n> Starting implementation now...\n"));
|
|
3695
|
-
await continueWithCurrentTask(cwd);
|
|
3695
|
+
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
3696
3696
|
return true;
|
|
3697
3697
|
}
|
|
3698
3698
|
if (pendingProposalRequest && isPlanApprovalDirective(normalized)) {
|
|
@@ -3700,11 +3700,11 @@ async function handleAgentConversationInput(cwd, input) {
|
|
|
3700
3700
|
return true;
|
|
3701
3701
|
}
|
|
3702
3702
|
if (isExecutionDirective(normalized)) {
|
|
3703
|
-
await continueWithCurrentTask(cwd);
|
|
3703
|
+
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
3704
3704
|
return true;
|
|
3705
3705
|
}
|
|
3706
3706
|
if (isContinuationDirective(normalized)) {
|
|
3707
|
-
await continueWithCurrentTask(cwd);
|
|
3707
|
+
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
3708
3708
|
return true;
|
|
3709
3709
|
}
|
|
3710
3710
|
if (isRescopeBlockedDirective(normalized)) {
|
|
@@ -3733,7 +3733,7 @@ async function handleAgentConversationInput(cwd, input) {
|
|
|
3733
3733
|
const { plan: plan2 } = await import("./plan-6FM5N36D.js");
|
|
3734
3734
|
await plan2(await withAllowedPathScope(cwd, input), { conversational: true });
|
|
3735
3735
|
if (shouldAutoExecuteAfterPlanning(input)) {
|
|
3736
|
-
await continueWithCurrentTask(cwd);
|
|
3736
|
+
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
3737
3737
|
return true;
|
|
3738
3738
|
}
|
|
3739
3739
|
await showLatestPlannedAtom(cwd);
|
|
@@ -3894,12 +3894,8 @@ async function applyApprovedProposal(cwd) {
|
|
|
3894
3894
|
console.log(chalk5.dim("\n> Great. I will create the task from your approved request.\n"));
|
|
3895
3895
|
const { plan: plan2 } = await import("./plan-6FM5N36D.js");
|
|
3896
3896
|
await plan2(await withAllowedPathScope(cwd, approvedRequest), { conversational: true });
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
return;
|
|
3900
|
-
}
|
|
3901
|
-
await showLatestPlannedAtom(cwd);
|
|
3902
|
-
console.log(chalk5.dim('\nReply "execute atom" when you want implementation to start, or tell me what to change.'));
|
|
3897
|
+
console.log(chalk5.dim("\n> Approval received. Starting unattended execution for all READY atoms...\n"));
|
|
3898
|
+
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
3903
3899
|
}
|
|
3904
3900
|
async function provideAnalysisFirstPlan(cwd, request) {
|
|
3905
3901
|
console.log(chalk5.dim("\n> I analyzed your request and generated a recommendation + sample draft first.\n"));
|
|
@@ -4048,42 +4044,78 @@ function buildSampleCapsuleDraft(cwd, files, capsuleCount) {
|
|
|
4048
4044
|
chalk5.dim(" - Reflection Prompt: What changed in your understanding after this exercise?")
|
|
4049
4045
|
].join("\n");
|
|
4050
4046
|
}
|
|
4051
|
-
async function continueWithCurrentTask(cwd) {
|
|
4047
|
+
async function continueWithCurrentTask(cwd, options = {}) {
|
|
4052
4048
|
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-6FM5N36D.js");
|
|
4053
|
-
const atoms = await listLocalAtoms2();
|
|
4054
4049
|
const byMostRecent = (a, b) => {
|
|
4055
4050
|
const aTime = new Date(String(a.updatedAt ?? a.createdAt ?? "")).getTime() || 0;
|
|
4056
4051
|
const bTime = new Date(String(b.updatedAt ?? b.createdAt ?? "")).getTime() || 0;
|
|
4057
4052
|
return bTime - aTime;
|
|
4058
4053
|
};
|
|
4059
|
-
const
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4054
|
+
const { execute: execute2 } = await import("./execute-ELKKB64F.js");
|
|
4055
|
+
const runAllReady = options.runAllReady === true;
|
|
4056
|
+
const attempted = /* @__PURE__ */ new Set();
|
|
4057
|
+
let queueStarted = false;
|
|
4058
|
+
while (true) {
|
|
4059
|
+
const atoms = await listLocalAtoms2();
|
|
4060
|
+
const readyAtoms = atoms.filter((a) => a.status === "READY").sort(byMostRecent);
|
|
4061
|
+
if (readyAtoms.length === 0) {
|
|
4062
|
+
const inProgressAtoms = atoms.filter((a) => a.status === "IN_PROGRESS").sort(byMostRecent);
|
|
4063
|
+
if (inProgressAtoms.length > 0) {
|
|
4064
|
+
const current = inProgressAtoms[0];
|
|
4065
|
+
console.log(chalk5.yellow(`No READY atoms found. Current in-progress atom: ${current?.externalId}.`));
|
|
4066
|
+
console.log(chalk5.dim("Use `archon show <atom-id>` to inspect status, or plan a new task."));
|
|
4067
|
+
return;
|
|
4068
|
+
}
|
|
4069
|
+
const blockedByPath = atoms.filter((a) => a.status === "BLOCKED").sort(byMostRecent).find((a) => (a.errorMessage ?? "").toLowerCase().includes("outside the allowed paths"));
|
|
4070
|
+
if (blockedByPath) {
|
|
4071
|
+
console.log(chalk5.yellow(`No READY atoms found. Latest blocked atom: ${blockedByPath.externalId}.`));
|
|
4072
|
+
console.log(chalk5.dim('This atom is blocked by governance path scope. Tell me: "adjust this atom to allowed paths".'));
|
|
4073
|
+
return;
|
|
4074
|
+
}
|
|
4075
|
+
if (queueStarted && runAllReady) {
|
|
4076
|
+
console.log(chalk5.green("\nQueue execution complete. No READY atoms remain."));
|
|
4077
|
+
} else {
|
|
4078
|
+
console.log(chalk5.yellow("No pending atoms found. Tell me what to plan next."));
|
|
4079
|
+
}
|
|
4066
4080
|
return;
|
|
4067
4081
|
}
|
|
4068
|
-
const
|
|
4069
|
-
if (
|
|
4070
|
-
console.log(chalk5.yellow(
|
|
4071
|
-
console.log(chalk5.dim('This atom is blocked by governance path scope. Tell me: "adjust this atom to allowed paths".'));
|
|
4082
|
+
const nextAtom = readyAtoms[0];
|
|
4083
|
+
if (!nextAtom) {
|
|
4084
|
+
console.log(chalk5.yellow("No pending atoms found. Tell me what to plan next."));
|
|
4072
4085
|
return;
|
|
4073
4086
|
}
|
|
4074
|
-
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4087
|
+
if (runAllReady && attempted.has(nextAtom.externalId)) {
|
|
4088
|
+
console.log(chalk5.yellow(`Stopping queue execution: ${nextAtom.externalId} is still READY after an execution attempt.`));
|
|
4089
|
+
console.log(chalk5.dim("Inspect with `archon show <atom-id>` before continuing."));
|
|
4090
|
+
return;
|
|
4091
|
+
}
|
|
4092
|
+
attempted.add(nextAtom.externalId);
|
|
4093
|
+
queueStarted = true;
|
|
4094
|
+
if (runAllReady) {
|
|
4095
|
+
console.log(chalk5.dim(`
|
|
4096
|
+
Queue execution: running ${nextAtom.externalId}...
|
|
4097
|
+
`));
|
|
4098
|
+
} else {
|
|
4099
|
+
console.log(chalk5.dim(`
|
|
4083
4100
|
Continuing with ${nextAtom.externalId}...
|
|
4084
4101
|
`));
|
|
4085
|
-
|
|
4086
|
-
|
|
4102
|
+
}
|
|
4103
|
+
await execute2(nextAtom.externalId, {
|
|
4104
|
+
nonTerminating: true,
|
|
4105
|
+
pathScopeAutoRecover: false
|
|
4106
|
+
});
|
|
4107
|
+
if (!runAllReady) {
|
|
4108
|
+
return;
|
|
4109
|
+
}
|
|
4110
|
+
const refreshed = await listLocalAtoms2();
|
|
4111
|
+
const executedAtom = refreshed.find((a) => a.externalId === nextAtom.externalId);
|
|
4112
|
+
const status2 = executedAtom?.status ?? "UNKNOWN";
|
|
4113
|
+
if (status2 !== "DONE") {
|
|
4114
|
+
console.log(chalk5.yellow(`Queue execution paused at ${nextAtom.externalId} (status: ${status2}).`));
|
|
4115
|
+
console.log(chalk5.dim('Resolve this atom, then run "continue" to resume the queue.'));
|
|
4116
|
+
return;
|
|
4117
|
+
}
|
|
4118
|
+
}
|
|
4087
4119
|
}
|
|
4088
4120
|
async function replanLatestBlockedAtom(cwd) {
|
|
4089
4121
|
const { listLocalAtoms: listLocalAtoms2, plan: plan2 } = await import("./plan-6FM5N36D.js");
|
|
@@ -4264,7 +4296,7 @@ async function handlePostExploreAction(cwd, request, options = {}) {
|
|
|
4264
4296
|
await plan2(await withAllowedPathScope(cwd, request), { conversational: true });
|
|
4265
4297
|
if (options.agentMode) {
|
|
4266
4298
|
if (shouldAutoExecuteAfterPlanning(sourceInput)) {
|
|
4267
|
-
await continueWithCurrentTask(cwd);
|
|
4299
|
+
await continueWithCurrentTask(cwd, { runAllReady: true });
|
|
4268
4300
|
return;
|
|
4269
4301
|
}
|
|
4270
4302
|
await showLatestPlannedAtom(cwd);
|
|
@@ -4378,7 +4410,7 @@ async function executeNext() {
|
|
|
4378
4410
|
const atomId = await prompt("Enter atom ID to execute (or press Enter for first pending)");
|
|
4379
4411
|
const targetId = atomId.trim() || pendingAtoms[0]?.id;
|
|
4380
4412
|
if (targetId) {
|
|
4381
|
-
const { execute: execute2 } = await import("./execute-
|
|
4413
|
+
const { execute: execute2 } = await import("./execute-ELKKB64F.js");
|
|
4382
4414
|
await execute2(targetId, {});
|
|
4383
4415
|
} else {
|
|
4384
4416
|
console.log(chalk5.yellow("No atom to execute."));
|