archondev 2.3.0 → 2.5.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/README.md +31 -4
- package/dist/{auth-R6G5RDJE.js → auth-5BOORBOL.js} +3 -3
- package/dist/{bug-IT4C6HIG.js → bug-H5MPQY5W.js} +3 -3
- package/dist/{chunk-5HVYNCLT.js → chunk-7RBN4OKO.js} +5 -5
- package/dist/{chunk-BBAUT4M5.js → chunk-F6QIFTI3.js} +5 -3
- package/dist/{chunk-HGO4UUAC.js → chunk-IYZRHFAI.js} +8 -8
- package/dist/{chunk-VKM3HAHW.js → chunk-JP3OY4G2.js} +1 -1
- package/dist/{chunk-5IQKC2TD.js → chunk-KAFR3QRD.js} +1 -1
- package/dist/{chunk-QSYKKPFF.js → chunk-KIHBDIEP.js} +1 -1
- package/dist/{chunk-GLBVZOBA.js → chunk-KIZ5ZICU.js} +1 -1
- package/dist/{chunk-7FJ4ATJE.js → chunk-OG4SHBL5.js} +1 -1
- package/dist/{chunk-A7QU6JC6.js → chunk-PQQ6SP4D.js} +3 -1
- package/dist/chunk-QN65APWL.js +126 -0
- package/dist/{chunk-2BPIPDFV.js → chunk-SGGLAY6G.js} +5 -5
- package/dist/chunk-UYKPA2DF.js +673 -0
- package/dist/{chunk-SMR7JQK6.js → chunk-WH6IKTYF.js} +1 -125
- package/dist/{chunk-XP7PNLXG.js → chunk-ZP75P65T.js} +6 -6
- package/dist/{code-review-FSTYDHNG.js → code-review-G4OFEIVT.js} +2 -2
- package/dist/execute-WRRTXCHG.js +15 -0
- package/dist/index.js +1331 -788
- package/dist/interviewer-7BZBAROX.js +278 -0
- package/dist/{keys-76UFD2QR.js → keys-LHIUYDFT.js} +3 -2
- package/dist/list-OYZ2UPXI.js +14 -0
- package/dist/manager-SRY4XRUT.js +9 -0
- package/dist/parallel-BWE6T3SJ.js +24 -0
- package/dist/{plan-TVTKS655.js → plan-67BMJFES.js} +5 -4
- package/dist/{preferences-VY6WPI6V.js → preferences-DRR4A76D.js} +6 -5
- package/dist/{review-QV4TQM2Z.js → review-XDUNVTOK.js} +3 -3
- package/dist/{tier-selection-JYMYBIRV.js → tier-selection-YPES45QY.js} +2 -2
- package/package.json +1 -1
- package/dist/chunk-OI4K3RYO.js +0 -248
- package/dist/execute-6D6USH33.js +0 -14
- package/dist/list-XZ42CNFC.js +0 -13
- package/dist/parallel-IC6FLPSK.js +0 -19
- package/dist/{chunk-C5TDNTNC.js → chunk-DHGQPKIV.js} +3 -3
package/README.md
CHANGED
|
@@ -121,10 +121,37 @@ This works similarly to how Claude Code allows subscription-based access. We're
|
|
|
121
121
|
|
|
122
122
|
## How It Works
|
|
123
123
|
|
|
124
|
-
1. **
|
|
125
|
-
2. **AI
|
|
126
|
-
3. **
|
|
127
|
-
4. **
|
|
124
|
+
1. **Login & Choose Tier** — Create account, pick FREE/BYOK/Credits
|
|
125
|
+
2. **AI Interview** — Natural conversation about your project (or skip to defaults)
|
|
126
|
+
3. **Define Your Rules** — ARCHITECTURE.md with boundaries and invariants
|
|
127
|
+
4. **AI Reads Rules First** — Every session starts by understanding your architecture
|
|
128
|
+
5. **Changes Are Validated** — Quality gates check code before it's applied
|
|
129
|
+
6. **Learnings Persist** — Insights saved for future sessions
|
|
130
|
+
|
|
131
|
+
## First Run Experience
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
$ archon
|
|
135
|
+
|
|
136
|
+
ArchonDev - AI-Powered Development Governance
|
|
137
|
+
────────────────────────────────────────────────
|
|
138
|
+
|
|
139
|
+
Welcome to ArchonDev!
|
|
140
|
+
Let's get you set up. First, we need to create your account.
|
|
141
|
+
|
|
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)
|
|
149
|
+
|
|
150
|
+
→ What kind of project are you building?
|
|
151
|
+
[AI asks natural follow-up questions based on your answers]
|
|
152
|
+
|
|
153
|
+
✓ Project initialized!
|
|
154
|
+
```
|
|
128
155
|
|
|
129
156
|
## Cloud Execution
|
|
130
157
|
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
login,
|
|
3
3
|
logout,
|
|
4
4
|
status
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-M4LGRTLC.js";
|
|
5
|
+
} from "./chunk-SGGLAY6G.js";
|
|
6
|
+
import "./chunk-DHGQPKIV.js";
|
|
8
7
|
import "./chunk-Y7DQ5XTU.js";
|
|
8
|
+
import "./chunk-M4LGRTLC.js";
|
|
9
9
|
import "./chunk-QGM4M3NI.js";
|
|
10
10
|
export {
|
|
11
11
|
login,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bugReport
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-KIZ5ZICU.js";
|
|
4
|
+
import "./chunk-KAFR3QRD.js";
|
|
5
|
+
import "./chunk-PQQ6SP4D.js";
|
|
6
6
|
import "./chunk-Y7DQ5XTU.js";
|
|
7
7
|
import "./chunk-QGM4M3NI.js";
|
|
8
8
|
export {
|
|
@@ -2,20 +2,20 @@ import {
|
|
|
2
2
|
ArchitectAgent,
|
|
3
3
|
createAtom,
|
|
4
4
|
validateAtom
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
KeyManager
|
|
8
|
-
} from "./chunk-SMR7JQK6.js";
|
|
5
|
+
} from "./chunk-KAFR3QRD.js";
|
|
9
6
|
import {
|
|
10
7
|
AnthropicClient,
|
|
11
8
|
getDefaultModel
|
|
12
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PQQ6SP4D.js";
|
|
13
10
|
import {
|
|
14
11
|
isAuthenticated
|
|
15
12
|
} from "./chunk-Y7DQ5XTU.js";
|
|
16
13
|
import {
|
|
17
14
|
ArchitectureParser
|
|
18
15
|
} from "./chunk-5EVHUDQX.js";
|
|
16
|
+
import {
|
|
17
|
+
KeyManager
|
|
18
|
+
} from "./chunk-WH6IKTYF.js";
|
|
19
19
|
|
|
20
20
|
// src/cli/plan.ts
|
|
21
21
|
import chalk from "chalk";
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
KeyValidator
|
|
3
|
-
|
|
4
|
-
} from "./chunk-SMR7JQK6.js";
|
|
2
|
+
KeyValidator
|
|
3
|
+
} from "./chunk-QN65APWL.js";
|
|
5
4
|
import {
|
|
6
5
|
loadConfig,
|
|
7
6
|
saveConfig
|
|
8
7
|
} from "./chunk-Y7DQ5XTU.js";
|
|
8
|
+
import {
|
|
9
|
+
keyManager
|
|
10
|
+
} from "./chunk-WH6IKTYF.js";
|
|
9
11
|
|
|
10
12
|
// src/cli/keys.ts
|
|
11
13
|
import chalk from "chalk";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SUPABASE_ANON_KEY,
|
|
3
|
-
SUPABASE_URL
|
|
4
|
-
} from "./chunk-M4LGRTLC.js";
|
|
5
1
|
import {
|
|
6
2
|
loadAtom
|
|
7
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-7RBN4OKO.js";
|
|
8
4
|
import {
|
|
9
5
|
transitionAtom
|
|
10
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KAFR3QRD.js";
|
|
11
7
|
import {
|
|
12
8
|
AnthropicClient,
|
|
13
9
|
getDefaultModel
|
|
14
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PQQ6SP4D.js";
|
|
15
11
|
import {
|
|
16
12
|
getAuthToken,
|
|
17
13
|
loadConfig
|
|
18
14
|
} from "./chunk-Y7DQ5XTU.js";
|
|
15
|
+
import {
|
|
16
|
+
SUPABASE_ANON_KEY,
|
|
17
|
+
SUPABASE_URL
|
|
18
|
+
} from "./chunk-M4LGRTLC.js";
|
|
19
19
|
import {
|
|
20
20
|
ArchitectureParser
|
|
21
21
|
} from "./chunk-5EVHUDQX.js";
|
|
@@ -4815,7 +4815,7 @@ function createPrompt() {
|
|
|
4815
4815
|
}
|
|
4816
4816
|
async function execute(atomId, options) {
|
|
4817
4817
|
if (options.parallel && options.parallel.length > 0) {
|
|
4818
|
-
const { parallelExecute } = await import("./parallel-
|
|
4818
|
+
const { parallelExecute } = await import("./parallel-BWE6T3SJ.js");
|
|
4819
4819
|
const allAtomIds = [atomId, ...options.parallel];
|
|
4820
4820
|
await parallelExecute(allAtomIds);
|
|
4821
4821
|
return;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
// src/agents/clients/anthropic.ts
|
|
2
|
+
import Anthropic from "@anthropic-ai/sdk";
|
|
3
|
+
|
|
1
4
|
// src/utils/index.ts
|
|
2
5
|
function sleep(ms) {
|
|
3
6
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -10,7 +13,6 @@ function generateId(prefix) {
|
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
// src/agents/clients/anthropic.ts
|
|
13
|
-
import Anthropic from "@anthropic-ai/sdk";
|
|
14
16
|
var MAX_RETRIES = 3;
|
|
15
17
|
var RETRY_DELAY_MS = 1e3;
|
|
16
18
|
var MODEL_PRICING = {
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// src/core/keys/validator.ts
|
|
2
|
+
var KeyValidator = class {
|
|
3
|
+
async validateKey(provider, apiKey) {
|
|
4
|
+
switch (provider) {
|
|
5
|
+
case "anthropic":
|
|
6
|
+
return this.validateAnthropicKey(apiKey);
|
|
7
|
+
case "openai":
|
|
8
|
+
return this.validateOpenAIKey(apiKey);
|
|
9
|
+
case "google":
|
|
10
|
+
return this.validateGoogleKey(apiKey);
|
|
11
|
+
default:
|
|
12
|
+
return { valid: false, error: `Unknown provider: ${provider}`, provider };
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
async validateAnthropicKey(apiKey) {
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch("https://api.anthropic.com/v1/messages", {
|
|
18
|
+
method: "POST",
|
|
19
|
+
headers: {
|
|
20
|
+
"Content-Type": "application/json",
|
|
21
|
+
"x-api-key": apiKey,
|
|
22
|
+
"anthropic-version": "2023-06-01"
|
|
23
|
+
},
|
|
24
|
+
body: JSON.stringify({
|
|
25
|
+
model: "claude-3-haiku-20240307",
|
|
26
|
+
max_tokens: 1,
|
|
27
|
+
messages: [{ role: "user", content: "Hi" }]
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
if (response.status === 401) {
|
|
31
|
+
return {
|
|
32
|
+
valid: false,
|
|
33
|
+
error: "Invalid API key. Please check your Anthropic API key.",
|
|
34
|
+
provider: "anthropic"
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
if (response.status === 400) {
|
|
38
|
+
const data = await response.json();
|
|
39
|
+
if (data.error?.message?.includes("credit")) {
|
|
40
|
+
return {
|
|
41
|
+
valid: false,
|
|
42
|
+
error: "API key valid but no credits. Please add credits to your Anthropic account.",
|
|
43
|
+
provider: "anthropic"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (response.ok || response.status === 429 || response.status === 404) {
|
|
48
|
+
return { valid: true, provider: "anthropic" };
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
valid: true,
|
|
52
|
+
provider: "anthropic"
|
|
53
|
+
};
|
|
54
|
+
} catch (error) {
|
|
55
|
+
return {
|
|
56
|
+
valid: false,
|
|
57
|
+
error: `Connection error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
58
|
+
provider: "anthropic"
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async validateOpenAIKey(apiKey) {
|
|
63
|
+
try {
|
|
64
|
+
const response = await fetch("https://api.openai.com/v1/models", {
|
|
65
|
+
method: "GET",
|
|
66
|
+
headers: {
|
|
67
|
+
Authorization: `Bearer ${apiKey}`
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
if (response.status === 401) {
|
|
71
|
+
return {
|
|
72
|
+
valid: false,
|
|
73
|
+
error: "Invalid API key. Please check your OpenAI API key.",
|
|
74
|
+
provider: "openai"
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
if (response.ok) {
|
|
78
|
+
return { valid: true, provider: "openai" };
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
valid: false,
|
|
82
|
+
error: `Validation failed with status ${response.status}`,
|
|
83
|
+
provider: "openai"
|
|
84
|
+
};
|
|
85
|
+
} catch (error) {
|
|
86
|
+
return {
|
|
87
|
+
valid: false,
|
|
88
|
+
error: `Connection error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
89
|
+
provider: "openai"
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async validateGoogleKey(apiKey) {
|
|
94
|
+
try {
|
|
95
|
+
const response = await fetch(
|
|
96
|
+
`https://generativelanguage.googleapis.com/v1/models?key=${apiKey}`,
|
|
97
|
+
{ method: "GET" }
|
|
98
|
+
);
|
|
99
|
+
if (response.status === 400 || response.status === 401 || response.status === 403) {
|
|
100
|
+
return {
|
|
101
|
+
valid: false,
|
|
102
|
+
error: "Invalid API key. Please check your Google AI API key.",
|
|
103
|
+
provider: "google"
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (response.ok) {
|
|
107
|
+
return { valid: true, provider: "google" };
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
valid: false,
|
|
111
|
+
error: `Validation failed with status ${response.status}`,
|
|
112
|
+
provider: "google"
|
|
113
|
+
};
|
|
114
|
+
} catch (error) {
|
|
115
|
+
return {
|
|
116
|
+
valid: false,
|
|
117
|
+
error: `Connection error: ${error instanceof Error ? error.message : "Unknown error"}`,
|
|
118
|
+
provider: "google"
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export {
|
|
125
|
+
KeyValidator
|
|
126
|
+
};
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
handleTierSetup,
|
|
3
3
|
promptTierSelection,
|
|
4
4
|
updateUserTier
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
SUPABASE_ANON_KEY,
|
|
8
|
-
SUPABASE_URL
|
|
9
|
-
} from "./chunk-M4LGRTLC.js";
|
|
5
|
+
} from "./chunk-DHGQPKIV.js";
|
|
10
6
|
import {
|
|
11
7
|
clearConfig,
|
|
12
8
|
loadConfig,
|
|
13
9
|
saveConfig
|
|
14
10
|
} 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";
|