archondev 2.19.11 → 2.19.13
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/index.js +130 -47
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3947,11 +3947,25 @@ async function handleContinueSession(cwd, state) {
|
|
|
3947
3947
|
if (response.trim()) {
|
|
3948
3948
|
const handled = await handleFreeformJourneyInput(cwd, response);
|
|
3949
3949
|
if (handled) {
|
|
3950
|
+
await continueConversationLoop(cwd);
|
|
3950
3951
|
return;
|
|
3951
3952
|
}
|
|
3952
3953
|
}
|
|
3953
3954
|
await showMainMenu();
|
|
3954
3955
|
}
|
|
3956
|
+
async function continueConversationLoop(cwd) {
|
|
3957
|
+
while (true) {
|
|
3958
|
+
const response = await promptWithCommands("Anything else? (press Enter for options)", { allowMultiline: true });
|
|
3959
|
+
if (!response.trim()) {
|
|
3960
|
+
await showMainMenu();
|
|
3961
|
+
return;
|
|
3962
|
+
}
|
|
3963
|
+
const handled = await handleFreeformJourneyInput(cwd, response);
|
|
3964
|
+
if (!handled) {
|
|
3965
|
+
console.log(chalk6.yellow("I did not catch that. Try describing your goal in one sentence."));
|
|
3966
|
+
}
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3955
3969
|
function checkForHandoff(cwd) {
|
|
3956
3970
|
try {
|
|
3957
3971
|
const currentContextPath = join6(cwd, ".archon", "current_context.md");
|
|
@@ -3979,54 +3993,54 @@ function checkForHandoff(cwd) {
|
|
|
3979
3993
|
}
|
|
3980
3994
|
async function showMainMenu() {
|
|
3981
3995
|
const cwd = process.cwd();
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3996
|
+
while (true) {
|
|
3997
|
+
const state = detectProjectState(cwd);
|
|
3998
|
+
console.log(chalk6.bold("What would you like to do?\n"));
|
|
3999
|
+
if (state.isWebProject) {
|
|
4000
|
+
const { loadWebChecks, formatWebCheckStatus } = await import("./web-checks-4BSYXWDF.js");
|
|
4001
|
+
const prefs = await loadWebChecks(cwd);
|
|
4002
|
+
console.log(chalk6.dim("Web checks status:"));
|
|
4003
|
+
console.log(chalk6.dim(` A11y: ${formatWebCheckStatus(prefs.lastRun?.a11y)}`));
|
|
4004
|
+
console.log(chalk6.dim(` SEO: ${formatWebCheckStatus(prefs.lastRun?.seo)}`));
|
|
4005
|
+
console.log(chalk6.dim(` GEO: ${formatWebCheckStatus(prefs.lastRun?.geo)}`));
|
|
4006
|
+
console.log();
|
|
4007
|
+
}
|
|
4008
|
+
const choices = [
|
|
4009
|
+
{ key: "1", label: "Plan a new task", action: () => planTask() },
|
|
4010
|
+
{ key: "2", label: "List atoms", action: () => listAtoms() },
|
|
4011
|
+
{ key: "3", label: "Execute next atom", action: () => executeNext() },
|
|
4012
|
+
{ key: "4", label: "Report a bug", action: () => reportBug() },
|
|
4013
|
+
{ key: "5", label: "View status", action: () => viewStatus() },
|
|
4014
|
+
{ key: "6", label: "Code Review", action: () => reviewCode() },
|
|
4015
|
+
...state.isWebProject ? [{ key: "w", label: "Web checks (SEO/GEO/A11y)", action: async () => {
|
|
4016
|
+
await showWebChecksMenu();
|
|
4017
|
+
} }] : [],
|
|
4018
|
+
{ key: "7", label: "Settings & Preferences", action: () => settingsMenu() },
|
|
4019
|
+
{ key: "8", label: "Upgrade tier", action: async () => {
|
|
4020
|
+
const { showUpgradeMenu } = await import("./tier-selection-XFBM4SZ4.js");
|
|
4021
|
+
await showUpgradeMenu();
|
|
4022
|
+
} },
|
|
4023
|
+
{ key: "q", label: "Quit", action: async () => process.exit(0) }
|
|
4024
|
+
];
|
|
4025
|
+
for (const choice2 of choices) {
|
|
4026
|
+
console.log(` ${chalk6.cyan(choice2.key)}) ${choice2.label}`);
|
|
4027
|
+
}
|
|
4028
|
+
console.log(chalk6.dim(' (Type "/" for quick commands, or "upgrade"/"help" anytime)'));
|
|
3991
4029
|
console.log();
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
{ key: "7", label: "Settings & Preferences", action: () => settingsMenu() },
|
|
4005
|
-
{ key: "8", label: "Upgrade tier", action: async () => {
|
|
4006
|
-
const { showUpgradeMenu } = await import("./tier-selection-XFBM4SZ4.js");
|
|
4007
|
-
await showUpgradeMenu();
|
|
4008
|
-
await showMainMenu();
|
|
4009
|
-
} },
|
|
4010
|
-
{ key: "q", label: "Quit", action: async () => process.exit(0) }
|
|
4011
|
-
];
|
|
4012
|
-
for (const choice2 of choices) {
|
|
4013
|
-
console.log(` ${chalk6.cyan(choice2.key)}) ${choice2.label}`);
|
|
4014
|
-
}
|
|
4015
|
-
console.log(chalk6.dim(' (Type "upgrade" or "help" anytime)'));
|
|
4016
|
-
console.log();
|
|
4017
|
-
const selected = await promptWithCommands("Tell me what you want to do (or enter a shortcut)", { allowMultiline: true });
|
|
4018
|
-
const choice = choices.find((c) => c.key === selected.toLowerCase());
|
|
4019
|
-
if (choice) {
|
|
4020
|
-
await choice.action();
|
|
4021
|
-
} else if (selected.trim()) {
|
|
4022
|
-
const handled = await handleFreeformJourneyInput(cwd, selected.trim());
|
|
4023
|
-
if (!handled) {
|
|
4024
|
-
console.log(chalk6.yellow("I did not catch that. Try describing your goal in one sentence."));
|
|
4025
|
-
await showMainMenu();
|
|
4030
|
+
const selected = await promptWithCommands("Tell me what you want to do (or enter a shortcut)", { allowMultiline: true });
|
|
4031
|
+
const choice = choices.find((c) => c.key === selected.toLowerCase());
|
|
4032
|
+
if (choice) {
|
|
4033
|
+
await choice.action();
|
|
4034
|
+
continue;
|
|
4035
|
+
}
|
|
4036
|
+
if (selected.trim()) {
|
|
4037
|
+
const handled = await handleFreeformJourneyInput(cwd, selected.trim());
|
|
4038
|
+
if (!handled) {
|
|
4039
|
+
console.log(chalk6.yellow("I did not catch that. Try describing your goal in one sentence."));
|
|
4040
|
+
}
|
|
4041
|
+
continue;
|
|
4026
4042
|
}
|
|
4027
|
-
} else {
|
|
4028
4043
|
console.log(chalk6.yellow("Invalid choice. Please try again."));
|
|
4029
|
-
await showMainMenu();
|
|
4030
4044
|
}
|
|
4031
4045
|
}
|
|
4032
4046
|
async function handleFreeformJourneyInput(cwd, input) {
|
|
@@ -4230,7 +4244,6 @@ async function viewStatus() {
|
|
|
4230
4244
|
async function settingsMenu() {
|
|
4231
4245
|
const { interactiveSettings } = await import("./preferences-4V4C7MVD.js");
|
|
4232
4246
|
await interactiveSettings();
|
|
4233
|
-
await showMainMenu();
|
|
4234
4247
|
}
|
|
4235
4248
|
async function reviewCode() {
|
|
4236
4249
|
const cwd = process.cwd();
|
|
@@ -4279,7 +4292,6 @@ async function reviewCode() {
|
|
|
4279
4292
|
break;
|
|
4280
4293
|
}
|
|
4281
4294
|
case "b":
|
|
4282
|
-
await showMainMenu();
|
|
4283
4295
|
return;
|
|
4284
4296
|
default:
|
|
4285
4297
|
if (raw.trim()) {
|
|
@@ -4294,6 +4306,16 @@ async function reviewCode() {
|
|
|
4294
4306
|
}
|
|
4295
4307
|
async function handleInSessionCommand(input) {
|
|
4296
4308
|
const normalized = input.toLowerCase().trim();
|
|
4309
|
+
if (normalized === "/" || normalized === "/help") {
|
|
4310
|
+
showSlashCommandMenu();
|
|
4311
|
+
return true;
|
|
4312
|
+
}
|
|
4313
|
+
if (normalized.startsWith("/")) {
|
|
4314
|
+
const slashHandled = await handleSlashCommand(input.trim());
|
|
4315
|
+
if (slashHandled) {
|
|
4316
|
+
return true;
|
|
4317
|
+
}
|
|
4318
|
+
}
|
|
4297
4319
|
if (normalized === "upgrade" || normalized === "archon upgrade" || normalized === "pricing" || normalized === "archon pricing") {
|
|
4298
4320
|
const { showUpgradeMenu } = await import("./tier-selection-XFBM4SZ4.js");
|
|
4299
4321
|
await showUpgradeMenu();
|
|
@@ -4326,6 +4348,67 @@ async function handleInSessionCommand(input) {
|
|
|
4326
4348
|
}
|
|
4327
4349
|
return false;
|
|
4328
4350
|
}
|
|
4351
|
+
function showSlashCommandMenu() {
|
|
4352
|
+
console.log();
|
|
4353
|
+
console.log(chalk6.bold("Quick Commands"));
|
|
4354
|
+
console.log(chalk6.dim(" /plan <task> Create a plan from a one-line task"));
|
|
4355
|
+
console.log(chalk6.dim(" /list List atoms"));
|
|
4356
|
+
console.log(chalk6.dim(" /execute Execute next atom"));
|
|
4357
|
+
console.log(chalk6.dim(" /review Open code review menu"));
|
|
4358
|
+
console.log(chalk6.dim(" /status Show account/status"));
|
|
4359
|
+
console.log(chalk6.dim(" /settings Open settings & preferences"));
|
|
4360
|
+
console.log(chalk6.dim(" /upgrade Open tier upgrade menu"));
|
|
4361
|
+
console.log(chalk6.dim(" /quit Exit ArchonDev"));
|
|
4362
|
+
console.log();
|
|
4363
|
+
}
|
|
4364
|
+
async function handleSlashCommand(input) {
|
|
4365
|
+
const trimmed = input.trim();
|
|
4366
|
+
if (!trimmed.startsWith("/")) {
|
|
4367
|
+
return false;
|
|
4368
|
+
}
|
|
4369
|
+
const parts = trimmed.split(/\s+/);
|
|
4370
|
+
const command = parts[0]?.toLowerCase() ?? "";
|
|
4371
|
+
const arg = parts.slice(1).join(" ").trim();
|
|
4372
|
+
switch (command) {
|
|
4373
|
+
case "/plan": {
|
|
4374
|
+
const { plan: plan2 } = await import("./plan-AR6Y4QUD.js");
|
|
4375
|
+
if (arg) {
|
|
4376
|
+
await plan2(arg, {});
|
|
4377
|
+
} else {
|
|
4378
|
+
const description = await promptWithCommands("Describe what you want to build", { allowMultiline: true });
|
|
4379
|
+
if (description.trim()) {
|
|
4380
|
+
await plan2(description, {});
|
|
4381
|
+
}
|
|
4382
|
+
}
|
|
4383
|
+
return true;
|
|
4384
|
+
}
|
|
4385
|
+
case "/list":
|
|
4386
|
+
await listAtoms();
|
|
4387
|
+
return true;
|
|
4388
|
+
case "/execute":
|
|
4389
|
+
await executeNext();
|
|
4390
|
+
return true;
|
|
4391
|
+
case "/review":
|
|
4392
|
+
await reviewCode();
|
|
4393
|
+
return true;
|
|
4394
|
+
case "/status":
|
|
4395
|
+
await viewStatus();
|
|
4396
|
+
return true;
|
|
4397
|
+
case "/settings":
|
|
4398
|
+
await settingsMenu();
|
|
4399
|
+
return true;
|
|
4400
|
+
case "/upgrade": {
|
|
4401
|
+
const { showUpgradeMenu } = await import("./tier-selection-XFBM4SZ4.js");
|
|
4402
|
+
await showUpgradeMenu();
|
|
4403
|
+
return true;
|
|
4404
|
+
}
|
|
4405
|
+
case "/quit":
|
|
4406
|
+
case "/exit":
|
|
4407
|
+
console.log(chalk6.dim("Goodbye!"));
|
|
4408
|
+
process.exit(0);
|
|
4409
|
+
}
|
|
4410
|
+
return false;
|
|
4411
|
+
}
|
|
4329
4412
|
function prompt(question) {
|
|
4330
4413
|
return new Promise((resolve) => {
|
|
4331
4414
|
const rl = readline.createInterface({
|