archondev 2.7.0 → 2.8.0
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 +57 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2827,7 +2827,7 @@ async function handleNewProject(cwd, _state) {
|
|
|
2827
2827
|
console.log(chalk5.bold("\u{1F389} Starting a new project? Great!\n"));
|
|
2828
2828
|
console.log(chalk5.dim("Answer as much or as little as you want \u2014 you can always refine later."));
|
|
2829
2829
|
console.log(chalk5.dim('Type "just start" or "skip" to use defaults.\n'));
|
|
2830
|
-
const initialResponse = await
|
|
2830
|
+
const initialResponse = await promptWithCommands("What do you want to do?");
|
|
2831
2831
|
if (!initialResponse.trim()) {
|
|
2832
2832
|
console.log(chalk5.yellow("\nNo response provided. Showing options...\n"));
|
|
2833
2833
|
await showNewProjectMenu(cwd);
|
|
@@ -2858,7 +2858,7 @@ async function handleNewProject(cwd, _state) {
|
|
|
2858
2858
|
console.log(` ${chalk5.cyan("2")}) ${chalk5.bold("Doing a specific task")} \u2014 fix, add, refactor, analyze`);
|
|
2859
2859
|
console.log(` ${chalk5.cyan("3")}) ${chalk5.bold("Just exploring")} \u2014 show me what ArchonDev can do`);
|
|
2860
2860
|
console.log();
|
|
2861
|
-
const clarification = await
|
|
2861
|
+
const clarification = await promptWithCommands("Enter choice (1-3)");
|
|
2862
2862
|
switch (clarification.trim()) {
|
|
2863
2863
|
case "1":
|
|
2864
2864
|
await runConversationalInterview(cwd, initialResponse);
|
|
@@ -2882,8 +2882,9 @@ async function showNewProjectMenu(cwd) {
|
|
|
2882
2882
|
console.log(` ${chalk5.cyan("2")}) ${chalk5.bold("Quick start")} \u2014 Just create basic governance files`);
|
|
2883
2883
|
console.log(` ${chalk5.cyan("3")}) ${chalk5.bold("Plan a task")} \u2014 Create an atom for a specific task`);
|
|
2884
2884
|
console.log(` ${chalk5.cyan("q")}) ${chalk5.dim("Quit")}`);
|
|
2885
|
+
console.log(chalk5.dim(' (Type "upgrade" or "help" anytime)'));
|
|
2885
2886
|
console.log();
|
|
2886
|
-
const choice = await
|
|
2887
|
+
const choice = await promptWithCommands("Enter choice");
|
|
2887
2888
|
switch (choice.toLowerCase()) {
|
|
2888
2889
|
case "1":
|
|
2889
2890
|
await runConversationalInterview(cwd, "");
|
|
@@ -3097,8 +3098,9 @@ async function handleAdaptExisting(cwd, state) {
|
|
|
3097
3098
|
console.log(` ${chalk5.cyan("3")}) ${chalk5.bold("Manual setup")} \u2014 Keep template files, customize manually`);
|
|
3098
3099
|
console.log(` ${chalk5.cyan("4")}) ${chalk5.bold("Just start working")} \u2014 Skip setup, use defaults`);
|
|
3099
3100
|
console.log(` ${chalk5.cyan("q")}) ${chalk5.dim("Quit")}`);
|
|
3101
|
+
console.log(chalk5.dim(' (Type "upgrade" or "help" anytime)'));
|
|
3100
3102
|
console.log();
|
|
3101
|
-
const choice = await
|
|
3103
|
+
const choice = await promptWithCommands("Enter choice");
|
|
3102
3104
|
switch (choice.toLowerCase()) {
|
|
3103
3105
|
case "1":
|
|
3104
3106
|
await analyzeAndAdapt(cwd);
|
|
@@ -3242,13 +3244,19 @@ async function showMainMenu() {
|
|
|
3242
3244
|
{ key: "5", label: "View status", action: () => viewStatus() },
|
|
3243
3245
|
{ key: "6", label: "Code Review", action: () => reviewCode() },
|
|
3244
3246
|
{ key: "7", label: "Settings & Preferences", action: () => settingsMenu() },
|
|
3247
|
+
{ key: "8", label: "Upgrade tier", action: async () => {
|
|
3248
|
+
const { showUpgradeMenu } = await import("./tier-selection-LQ7ZOBEK.js");
|
|
3249
|
+
await showUpgradeMenu();
|
|
3250
|
+
await showMainMenu();
|
|
3251
|
+
} },
|
|
3245
3252
|
{ key: "q", label: "Quit", action: async () => process.exit(0) }
|
|
3246
3253
|
];
|
|
3247
3254
|
for (const choice2 of choices) {
|
|
3248
3255
|
console.log(` ${chalk5.cyan(choice2.key)}) ${choice2.label}`);
|
|
3249
3256
|
}
|
|
3257
|
+
console.log(chalk5.dim(' (Type "upgrade" or "help" anytime)'));
|
|
3250
3258
|
console.log();
|
|
3251
|
-
const selected = await
|
|
3259
|
+
const selected = await promptWithCommands("Enter choice");
|
|
3252
3260
|
const choice = choices.find((c) => c.key === selected.toLowerCase());
|
|
3253
3261
|
if (choice) {
|
|
3254
3262
|
await choice.action();
|
|
@@ -3396,6 +3404,40 @@ async function reviewCode() {
|
|
|
3396
3404
|
}
|
|
3397
3405
|
await reviewCode();
|
|
3398
3406
|
}
|
|
3407
|
+
async function handleInSessionCommand(input) {
|
|
3408
|
+
const normalized = input.toLowerCase().trim();
|
|
3409
|
+
if (normalized === "upgrade" || normalized === "archon upgrade" || normalized === "pricing" || normalized === "archon pricing") {
|
|
3410
|
+
const { showUpgradeMenu } = await import("./tier-selection-LQ7ZOBEK.js");
|
|
3411
|
+
await showUpgradeMenu();
|
|
3412
|
+
return true;
|
|
3413
|
+
}
|
|
3414
|
+
if (normalized === "status" || normalized === "archon status") {
|
|
3415
|
+
const { status: status2 } = await import("./auth-ZWXKMI3Q.js");
|
|
3416
|
+
await status2();
|
|
3417
|
+
return true;
|
|
3418
|
+
}
|
|
3419
|
+
if (normalized === "help" || normalized === "?" || normalized === "archon help") {
|
|
3420
|
+
console.log();
|
|
3421
|
+
console.log(chalk5.bold("Available commands (type anytime):"));
|
|
3422
|
+
console.log(chalk5.dim(" upgrade \u2014 Switch to BYOK or Managed plan"));
|
|
3423
|
+
console.log(chalk5.dim(" status \u2014 Show login and tier status"));
|
|
3424
|
+
console.log(chalk5.dim(" keys \u2014 Manage API keys (BYOK tier)"));
|
|
3425
|
+
console.log(chalk5.dim(" quit / q \u2014 Exit ArchonDev"));
|
|
3426
|
+
console.log(chalk5.dim(" skip \u2014 Skip current question"));
|
|
3427
|
+
console.log();
|
|
3428
|
+
return true;
|
|
3429
|
+
}
|
|
3430
|
+
if (normalized === "keys" || normalized === "archon keys") {
|
|
3431
|
+
const { listKeys: listKeys2 } = await import("./keys-LHIUYDFT.js");
|
|
3432
|
+
await listKeys2();
|
|
3433
|
+
return true;
|
|
3434
|
+
}
|
|
3435
|
+
if (normalized === "quit" || normalized === "exit" || normalized === "q") {
|
|
3436
|
+
console.log(chalk5.dim("Goodbye!"));
|
|
3437
|
+
process.exit(0);
|
|
3438
|
+
}
|
|
3439
|
+
return false;
|
|
3440
|
+
}
|
|
3399
3441
|
function prompt(question) {
|
|
3400
3442
|
return new Promise((resolve) => {
|
|
3401
3443
|
const rl = readline.createInterface({
|
|
@@ -3408,6 +3450,16 @@ function prompt(question) {
|
|
|
3408
3450
|
});
|
|
3409
3451
|
});
|
|
3410
3452
|
}
|
|
3453
|
+
async function promptWithCommands(question) {
|
|
3454
|
+
while (true) {
|
|
3455
|
+
const answer = await prompt(question);
|
|
3456
|
+
const handled = await handleInSessionCommand(answer);
|
|
3457
|
+
if (!handled) {
|
|
3458
|
+
return answer;
|
|
3459
|
+
}
|
|
3460
|
+
console.log(chalk5.dim("(Returning to previous question...)\n"));
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3411
3463
|
function promptYesNo(question, defaultValue) {
|
|
3412
3464
|
return new Promise((resolve) => {
|
|
3413
3465
|
const rl = readline.createInterface({
|