archondev 2.8.0 → 2.8.1

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/README.md CHANGED
@@ -54,7 +54,8 @@ Copy governance files into any project. Works with your existing AI tools: **Cur
54
54
  | `archon` | Interactive mode — just run and follow prompts |
55
55
  | `archon init` | Initialize in your project |
56
56
  | `archon login` | Authenticate with ArchonDev (tier selection on first login) |
57
- | `archon pricing` | View and switch pricing tiers (Free, BYOK, Credits) |
57
+ | `archon upgrade` | Upgrade to BYOK (free unlimited) or Managed plan |
58
+ | `archon status` | Show login status and current tier |
58
59
  | `archon plan <description>` | Create a work item with AI planning (extracts and confirms multi-item requests) |
59
60
  | `archon execute <atom-id>` | Execute with quality gates |
60
61
  | `archon list` | List all work items |
@@ -102,12 +103,12 @@ Copy governance files into any project. Works with your existing AI tools: **Cur
102
103
 
103
104
  | Tier | Cost | What You Get |
104
105
  |------|------|--------------|
105
- | **Free** | $0 | Ultra-cheap models (GPT-5-nano, GPT-4.1-nano, Gemini 2.5 Flash-Lite) — $0 cost to us |
106
- | **Credits** | Pay as you go | All models, 10% service fee, deposit any amount |
107
- | **BYOK** (Bring Your Own Key) | $0 | Use your own API keys, unlimited usage |
106
+ | **Free** | $0 | Ultra-cheap models (GPT-5-nano, GPT-4.1-nano, Gemini 2.5 Flash-Lite) — limited usage |
107
+ | **BYOK** (Bring Your Own Key) | **$0** | Use your own API keys, **unlimited usage**, all models |
108
+ | **Managed Plan** | 10% fee | All models, we handle billing, no API key setup |
108
109
  | **Claude Subscription** *(coming soon)* | Your existing sub | Use Claude Pro/Max subscription instead of API keys |
109
110
 
110
- No subscriptions. No commitments. Start free.
111
+ No subscriptions. No commitments. Start free, upgrade anytime with `archon upgrade`.
111
112
 
112
113
  ### Claude Pro/Max Subscription Support (Coming Soon)
113
114
 
@@ -136,23 +137,33 @@ $ archon
136
137
  ArchonDev - AI-Powered Development Governance
137
138
  ────────────────────────────────────────────────
138
139
 
139
- Welcome to ArchonDev!
140
- Let's get you set up. First, we need to create your account.
140
+ Logged in as: you@example.com
141
+ Tier: Free (basic models)
141
142
 
142
- [Opens browser for GitHub/Google login]
143
-
144
- How would you like to use ArchonDev?
145
-
146
- 1) Free (basic models)
147
- 2) BYOK (Bring Your Own Key) - use your API keys
148
- 3) Credits (pay-as-you-go)
143
+ ⚠️ FREE TIER: Limited usage. Upgrade options:
144
+ • BYOK (FREE) - Unlimited usage with your own API keys
145
+ Managed Plan - Just 10% fee on AI costs, zero setup
146
+ → Run 'archon upgrade' to unlock unlimited access
149
147
 
150
148
  → What kind of project are you building?
151
149
  [AI asks natural follow-up questions based on your answers]
150
+ (Type "upgrade" or "help" anytime)
152
151
 
153
152
  ✓ Project initialized!
154
153
  ```
155
154
 
155
+ ### In-Session Commands
156
+
157
+ Type these anytime during interactive prompts:
158
+
159
+ | Command | Description |
160
+ |---------|-------------|
161
+ | `upgrade` | Open tier upgrade menu |
162
+ | `status` | Show login and tier info |
163
+ | `keys` | List configured API keys |
164
+ | `help` | Show available commands |
165
+ | `quit` | Exit ArchonDev |
166
+
156
167
  ## Cloud Execution
157
168
 
158
169
  Run AI agents in the cloud — close your laptop and get a PR when it's done.
@@ -2,10 +2,10 @@ import {
2
2
  login,
3
3
  logout,
4
4
  status
5
- } from "./chunk-IA3ENLBQ.js";
6
- import "./chunk-UG5MAS4X.js";
7
- import "./chunk-Y7DQ5XTU.js";
5
+ } from "./chunk-GVIS5PHD.js";
8
6
  import "./chunk-M4LGRTLC.js";
7
+ import "./chunk-XMQIIPTU.js";
8
+ import "./chunk-Y7DQ5XTU.js";
9
9
  import "./chunk-QGM4M3NI.js";
10
10
  export {
11
11
  login,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  login
3
- } from "./chunk-IA3ENLBQ.js";
3
+ } from "./chunk-GVIS5PHD.js";
4
4
  import {
5
5
  getApiUrl,
6
6
  getAuthToken,
@@ -1,17 +1,17 @@
1
+ import {
2
+ SUPABASE_ANON_KEY,
3
+ SUPABASE_URL
4
+ } from "./chunk-M4LGRTLC.js";
1
5
  import {
2
6
  handleTierSetup,
3
7
  promptTierSelection,
4
8
  updateUserTier
5
- } from "./chunk-UG5MAS4X.js";
9
+ } from "./chunk-XMQIIPTU.js";
6
10
  import {
7
11
  clearConfig,
8
12
  loadConfig,
9
13
  saveConfig
10
14
  } from "./chunk-Y7DQ5XTU.js";
11
- import {
12
- SUPABASE_ANON_KEY,
13
- SUPABASE_URL
14
- } from "./chunk-M4LGRTLC.js";
15
15
 
16
16
  // src/cli/auth.ts
17
17
  import { createClient } from "@supabase/supabase-js";
@@ -3,9 +3,6 @@ import {
3
3
  loadConfig,
4
4
  saveConfig
5
5
  } from "./chunk-Y7DQ5XTU.js";
6
- import {
7
- API_URL
8
- } from "./chunk-M4LGRTLC.js";
9
6
 
10
7
  // src/cli/tier-selection.ts
11
8
  import chalk from "chalk";
@@ -113,12 +110,14 @@ async function handleTierSetup(tier) {
113
110
  async function createCheckoutSession(amountCents) {
114
111
  const spinner = ora("Preparing checkout...").start();
115
112
  try {
116
- const config = await loadConfig();
117
- if (!config.accessToken || !config.userId) {
118
- spinner.fail("Not logged in");
113
+ const { ensureValidSession } = await import("./config-SU5Y6MKO.js");
114
+ const config = await ensureValidSession();
115
+ if (!config || !config.accessToken || !config.userId) {
116
+ spinner.fail("Not logged in. Please run `archon login` first.");
119
117
  return null;
120
118
  }
121
- const response = await fetch(`${API_URL}/api/checkout`, {
119
+ const apiUrl = getApiUrl(config);
120
+ const response = await fetch(`${apiUrl}/api/checkout`, {
122
121
  method: "POST",
123
122
  headers: {
124
123
  "Content-Type": "application/json",
@@ -129,6 +128,10 @@ async function createCheckoutSession(amountCents) {
129
128
  amountCents
130
129
  })
131
130
  });
131
+ if (response.status === 401) {
132
+ spinner.fail("Session expired. Please run `archon login` to re-authenticate.");
133
+ return null;
134
+ }
132
135
  const result = await response.json();
133
136
  if (!response.ok || !result.success) {
134
137
  spinner.fail(result.error?.error || "Failed to create checkout");
@@ -226,9 +229,10 @@ async function showUpgradeMenu() {
226
229
  var showTierSwitchMenu = showUpgradeMenu;
227
230
  async function updateUserTier(tier) {
228
231
  try {
229
- const config = await loadConfig();
230
- if (!config.accessToken) {
231
- return { success: false, error: "Not logged in" };
232
+ const { ensureValidSession } = await import("./config-SU5Y6MKO.js");
233
+ const config = await ensureValidSession();
234
+ if (!config || !config.accessToken) {
235
+ return { success: false, error: "Not logged in. Please run `archon login` first." };
232
236
  }
233
237
  const apiUrl = getApiUrl(config);
234
238
  const response = await fetch(`${apiUrl}/api/preferences`, {
@@ -240,8 +244,11 @@ async function updateUserTier(tier) {
240
244
  body: JSON.stringify({ tier })
241
245
  });
242
246
  if (!response.ok) {
243
- const text = await response.text();
244
- return { success: false, error: text };
247
+ const data = await response.json().catch(() => ({ error: "Unknown error" }));
248
+ if (response.status === 401) {
249
+ return { success: false, error: "Session expired. Please run `archon login` to re-authenticate." };
250
+ }
251
+ return { success: false, error: data.error || `Server error: ${response.status}` };
245
252
  }
246
253
  await saveConfig({ ...config, tier });
247
254
  return { success: true };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  execute
3
- } from "./chunk-IYZRHFAI.js";
3
+ } from "./chunk-LS2ZW5XA.js";
4
4
  import "./chunk-7RBN4OKO.js";
5
5
  import "./chunk-KAFR3QRD.js";
6
6
  import "./chunk-QN65APWL.js";
7
7
  import "./chunk-PQQ6SP4D.js";
8
- import "./chunk-Y7DQ5XTU.js";
9
8
  import "./chunk-M4LGRTLC.js";
9
+ import "./chunk-Y7DQ5XTU.js";
10
10
  import "./chunk-5EVHUDQX.js";
11
11
  import "./chunk-WH6IKTYF.js";
12
12
  import "./chunk-QGM4M3NI.js";
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  setPreference,
19
19
  showExecutionPreferences,
20
20
  showPreferences
21
- } from "./chunk-ZCWCSRCQ.js";
21
+ } from "./chunk-7INSG7ZE.js";
22
22
  import {
23
23
  parallelClean,
24
24
  parallelMerge,
@@ -34,7 +34,7 @@ import {
34
34
  cloudLogs,
35
35
  cloudStatus,
36
36
  execute
37
- } from "./chunk-IYZRHFAI.js";
37
+ } from "./chunk-LS2ZW5XA.js";
38
38
  import {
39
39
  list
40
40
  } from "./chunk-OG4SHBL5.js";
@@ -62,22 +62,22 @@ import {
62
62
  login,
63
63
  logout,
64
64
  status
65
- } from "./chunk-IA3ENLBQ.js";
65
+ } from "./chunk-GVIS5PHD.js";
66
+ import {
67
+ API_URL,
68
+ SUPABASE_ANON_KEY,
69
+ SUPABASE_URL
70
+ } from "./chunk-M4LGRTLC.js";
66
71
  import {
67
72
  handleTierSetup,
68
73
  promptTierSelection,
69
74
  updateUserTier
70
- } from "./chunk-UG5MAS4X.js";
75
+ } from "./chunk-XMQIIPTU.js";
71
76
  import {
72
77
  getAuthToken,
73
78
  loadConfig,
74
79
  saveConfig
75
80
  } from "./chunk-Y7DQ5XTU.js";
76
- import {
77
- API_URL,
78
- SUPABASE_ANON_KEY,
79
- SUPABASE_URL
80
- } from "./chunk-M4LGRTLC.js";
81
81
  import {
82
82
  init,
83
83
  isInitialized
@@ -3245,7 +3245,7 @@ async function showMainMenu() {
3245
3245
  { key: "6", label: "Code Review", action: () => reviewCode() },
3246
3246
  { key: "7", label: "Settings & Preferences", action: () => settingsMenu() },
3247
3247
  { key: "8", label: "Upgrade tier", action: async () => {
3248
- const { showUpgradeMenu } = await import("./tier-selection-LQ7ZOBEK.js");
3248
+ const { showUpgradeMenu } = await import("./tier-selection-X52UG44Y.js");
3249
3249
  await showUpgradeMenu();
3250
3250
  await showMainMenu();
3251
3251
  } },
@@ -3297,7 +3297,7 @@ async function listAtoms() {
3297
3297
  async function executeNext() {
3298
3298
  const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-67BMJFES.js");
3299
3299
  const { analyzeProject, getComplexityDescription, getModeDescription } = await import("./orchestration-X6LHSHBJ.js");
3300
- const { loadExecutionPreferences } = await import("./preferences-6J2UVWLQ.js");
3300
+ const { loadExecutionPreferences } = await import("./preferences-5E5XUH2E.js");
3301
3301
  const cwd = process.cwd();
3302
3302
  const atoms = await listLocalAtoms2();
3303
3303
  const pendingAtoms = atoms.filter((a) => a.status === "READY" || a.status === "IN_PROGRESS");
@@ -3330,7 +3330,7 @@ async function executeNext() {
3330
3330
  const atomId = await prompt("Enter atom ID to execute (or press Enter for first pending)");
3331
3331
  const targetId = atomId.trim() || pendingAtoms[0]?.id;
3332
3332
  if (targetId) {
3333
- const { execute: execute2 } = await import("./execute-WRRTXCHG.js");
3333
+ const { execute: execute2 } = await import("./execute-2R32XWT5.js");
3334
3334
  await execute2(targetId, {});
3335
3335
  } else {
3336
3336
  console.log(chalk5.yellow("No atom to execute."));
@@ -3344,11 +3344,11 @@ async function reportBug() {
3344
3344
  }
3345
3345
  }
3346
3346
  async function viewStatus() {
3347
- const { status: status2 } = await import("./auth-ZWXKMI3Q.js");
3347
+ const { status: status2 } = await import("./auth-277GWFW4.js");
3348
3348
  await status2();
3349
3349
  }
3350
3350
  async function settingsMenu() {
3351
- const { interactiveSettings } = await import("./preferences-6J2UVWLQ.js");
3351
+ const { interactiveSettings } = await import("./preferences-5E5XUH2E.js");
3352
3352
  await interactiveSettings();
3353
3353
  await showMainMenu();
3354
3354
  }
@@ -3407,12 +3407,12 @@ async function reviewCode() {
3407
3407
  async function handleInSessionCommand(input) {
3408
3408
  const normalized = input.toLowerCase().trim();
3409
3409
  if (normalized === "upgrade" || normalized === "archon upgrade" || normalized === "pricing" || normalized === "archon pricing") {
3410
- const { showUpgradeMenu } = await import("./tier-selection-LQ7ZOBEK.js");
3410
+ const { showUpgradeMenu } = await import("./tier-selection-X52UG44Y.js");
3411
3411
  await showUpgradeMenu();
3412
3412
  return true;
3413
3413
  }
3414
3414
  if (normalized === "status" || normalized === "archon status") {
3415
- const { status: status2 } = await import("./auth-ZWXKMI3Q.js");
3415
+ const { status: status2 } = await import("./auth-277GWFW4.js");
3416
3416
  await status2();
3417
3417
  return true;
3418
3418
  }
@@ -7525,11 +7525,11 @@ program.command("status").description("Show current user and project status").ac
7525
7525
  await status();
7526
7526
  });
7527
7527
  program.command("upgrade").description("Upgrade your tier (BYOK for free unlimited, or Managed plan)").action(async () => {
7528
- const { showUpgradeMenu } = await import("./tier-selection-LQ7ZOBEK.js");
7528
+ const { showUpgradeMenu } = await import("./tier-selection-X52UG44Y.js");
7529
7529
  await showUpgradeMenu();
7530
7530
  });
7531
7531
  program.command("pricing", { hidden: true }).action(async () => {
7532
- const { showUpgradeMenu } = await import("./tier-selection-LQ7ZOBEK.js");
7532
+ const { showUpgradeMenu } = await import("./tier-selection-X52UG44Y.js");
7533
7533
  await showUpgradeMenu();
7534
7534
  });
7535
7535
  program.command("init").description("Initialize ArchonDev in current project").option("--analyze", "Run enhanced analysis of codebase").option("--no-git", "Skip git initialization").action(async (options) => {
@@ -7,12 +7,12 @@ import {
7
7
  setPreference,
8
8
  showExecutionPreferences,
9
9
  showPreferences
10
- } from "./chunk-ZCWCSRCQ.js";
10
+ } from "./chunk-7INSG7ZE.js";
11
11
  import "./chunk-QN65APWL.js";
12
- import "./chunk-IA3ENLBQ.js";
13
- import "./chunk-UG5MAS4X.js";
14
- import "./chunk-Y7DQ5XTU.js";
12
+ import "./chunk-GVIS5PHD.js";
15
13
  import "./chunk-M4LGRTLC.js";
14
+ import "./chunk-XMQIIPTU.js";
15
+ import "./chunk-Y7DQ5XTU.js";
16
16
  import "./chunk-WH6IKTYF.js";
17
17
  import "./chunk-QGM4M3NI.js";
18
18
  export {
@@ -4,9 +4,8 @@ import {
4
4
  showTierSwitchMenu,
5
5
  showUpgradeMenu,
6
6
  updateUserTier
7
- } from "./chunk-UG5MAS4X.js";
7
+ } from "./chunk-XMQIIPTU.js";
8
8
  import "./chunk-Y7DQ5XTU.js";
9
- import "./chunk-M4LGRTLC.js";
10
9
  import "./chunk-QGM4M3NI.js";
11
10
  export {
12
11
  handleTierSetup,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archondev",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "Local-first AI-powered development governance system",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -8,14 +8,14 @@ import {
8
8
  AnthropicClient,
9
9
  getDefaultModel
10
10
  } from "./chunk-PQQ6SP4D.js";
11
- import {
12
- getAuthToken,
13
- loadConfig
14
- } from "./chunk-Y7DQ5XTU.js";
15
11
  import {
16
12
  SUPABASE_ANON_KEY,
17
13
  SUPABASE_URL
18
14
  } from "./chunk-M4LGRTLC.js";
15
+ import {
16
+ getAuthToken,
17
+ loadConfig
18
+ } from "./chunk-Y7DQ5XTU.js";
19
19
  import {
20
20
  ArchitectureParser
21
21
  } from "./chunk-5EVHUDQX.js";