archondev 2.17.0 → 2.18.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 +1 -0
- package/dist/a11y-O35BAA25.js +14 -0
- package/dist/{auth-KUFS3PBS.js → auth-7AUNKGQW.js} +3 -3
- package/dist/bug-PH2E6GQT.js +13 -0
- package/dist/{chunk-HTJOCKVV.js → chunk-23IS6N63.js} +5 -5
- package/dist/{chunk-ER4ADSWH.js → chunk-2NSWZDP7.js} +1 -156
- package/dist/chunk-3ASILTFB.js +73 -0
- package/dist/{chunk-E7ZTIAQM.js → chunk-4KJJ6MSQ.js} +108 -258
- package/dist/{chunk-QGM4M3NI.js → chunk-4VNS5WPM.js} +5 -0
- package/dist/{chunk-DUJOT5B6.js → chunk-4VWKGOBQ.js} +7 -7
- package/dist/chunk-5CFGPXQ3.js +160 -0
- package/dist/chunk-67ZTMWP4.js +495 -0
- package/dist/{chunk-FGH2UX3E.js → chunk-BFPWDOMA.js} +1 -1
- package/dist/{chunk-LHCXE6UL.js → chunk-BKJISQXP.js} +5 -3
- package/dist/chunk-FWLLGLD5.js +353 -0
- package/dist/{chunk-BDPGWWQC.js → chunk-HGLPIM7J.js} +1 -1
- package/dist/{chunk-NIKN37AY.js → chunk-HJARQDQR.js} +1 -1
- package/dist/{chunk-WZIRUPMP.js → chunk-HKSVJWMI.js} +1 -1
- package/dist/{chunk-LPSS2U5V.js → chunk-JAWG5QX4.js} +65 -2
- package/dist/chunk-JF7JCK6H.js +485 -0
- package/dist/chunk-KY2HKRC2.js +175 -0
- package/dist/{chunk-2QIXLBAC.js → chunk-OQUWPU5F.js} +5 -3
- package/dist/{chunk-TRLP7RMZ.js → chunk-RPVPOUH3.js} +1 -1
- package/dist/{chunk-FA2GAZ7L.js → chunk-U2ZTHVDD.js} +1 -1
- package/dist/{chunk-LXXTCZ2Q.js → chunk-UFR2LX6G.js} +216 -14
- package/dist/{code-review-ORCNXANW.js → code-review-6MU4UE5M.js} +4 -4
- package/dist/{config-USLUSE4N.js → config-UARQV6FG.js} +1 -1
- package/dist/{constants-AHP5F7HW.js → constants-XDIWFFPN.js} +1 -1
- package/dist/execute-6SJL5POT.js +18 -0
- package/dist/geo-RP6HKLKZ.js +21 -0
- package/dist/index.js +917 -1823
- package/dist/{init-PSMJLDEZ.js → init-5RS332ZH.js} +1 -1
- package/dist/{interviewer-Q6PFSAGT.js → interviewer-Z7K4IZYG.js} +4 -4
- package/dist/{keys-SXJ6MKPY.js → keys-THCHXIFD.js} +1 -1
- package/dist/{keys-VLK3EWSN.js → keys-XE2D6I24.js} +2 -2
- package/dist/list-PCDSX4UI.js +17 -0
- package/dist/{manager-32P6ZZBP.js → manager-YSNTH2DG.js} +1 -1
- package/dist/models-UTFGCHAY.js +33 -0
- package/dist/{orchestration-X6LHSHBJ.js → orchestration-HIF3KP25.js} +1 -1
- package/dist/{parallel-WHFKRBPR.js → parallel-IRFNVIB6.js} +10 -6
- package/dist/{parser-4KJH2PT5.js → parser-BFHETZ5B.js} +1 -1
- package/dist/{plan-X77BUKNE.js → plan-RE5A3E2J.js} +6 -5
- package/dist/{preferences-TWEK2RWY.js → preferences-QAM5QKAQ.js} +5 -5
- package/dist/{review-T4ID2QUF.js → review-AUG6GIL6.js} +5 -5
- package/dist/seo-PMI42KRZ.js +10 -0
- package/dist/{tier-selection-Z2RFHZUX.js → tier-selection-2W6JWJUN.js} +2 -2
- package/dist/web-checks-4BSYXWDF.js +13 -0
- package/package.json +1 -1
- package/dist/bug-BJH4X5LI.js +0 -12
- package/dist/execute-73QW4ZEZ.js +0 -16
- package/dist/list-MMKB5TGX.js +0 -16
package/README.md
CHANGED
|
@@ -90,6 +90,7 @@ Copy governance files into any project. Works with your existing AI tools: **Cur
|
|
|
90
90
|
| `archon session resume [id]` | Resume session on another device |
|
|
91
91
|
| `archon execute ATOM --cloud` | Execute in cloud (creates PR when done) |
|
|
92
92
|
| `archon cloud status` | List cloud executions |
|
|
93
|
+
| `archon parallel cloud ATOM-001 ATOM-002` | Queue multiple atoms for cloud execution (Credits tier) |
|
|
93
94
|
| `archon index init [--local\|--cloud]` | Initialize semantic indexing |
|
|
94
95
|
| `archon index update [--cloud]` | Index changed files |
|
|
95
96
|
| `archon index search "query" [--cloud]` | Semantic code search |
|
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
login,
|
|
3
3
|
logout,
|
|
4
4
|
status
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-U2ZTHVDD.js";
|
|
6
|
+
import "./chunk-4VWKGOBQ.js";
|
|
7
7
|
import "./chunk-SUGIWSCB.js";
|
|
8
8
|
import "./chunk-M4LGRTLC.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-4VNS5WPM.js";
|
|
10
10
|
export {
|
|
11
11
|
login,
|
|
12
12
|
logout,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bugReport
|
|
3
|
+
} from "./chunk-OQUWPU5F.js";
|
|
4
|
+
import "./chunk-5CFGPXQ3.js";
|
|
5
|
+
import "./chunk-2NSWZDP7.js";
|
|
6
|
+
import "./chunk-HJARQDQR.js";
|
|
7
|
+
import "./chunk-UFR2LX6G.js";
|
|
8
|
+
import "./chunk-SUGIWSCB.js";
|
|
9
|
+
import "./chunk-M4LGRTLC.js";
|
|
10
|
+
import "./chunk-4VNS5WPM.js";
|
|
11
|
+
export {
|
|
12
|
+
bugReport
|
|
13
|
+
};
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
invalidateTierCache,
|
|
9
9
|
isFreeModel,
|
|
10
10
|
isValidModel
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UFR2LX6G.js";
|
|
12
12
|
import {
|
|
13
13
|
keyManager
|
|
14
14
|
} from "./chunk-RDG5BUED.js";
|
|
15
15
|
import {
|
|
16
16
|
login
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-U2ZTHVDD.js";
|
|
18
18
|
import {
|
|
19
19
|
getApiUrl,
|
|
20
20
|
getAuthToken,
|
|
@@ -964,7 +964,7 @@ async function setSmartRoutingMenu(profile, providers) {
|
|
|
964
964
|
"3": "google"
|
|
965
965
|
};
|
|
966
966
|
if (provChoice in providerMap) {
|
|
967
|
-
const newProvider = providerMap[provChoice];
|
|
967
|
+
const newProvider = providerMap[provChoice] ?? null;
|
|
968
968
|
await setTierPreference("provider", newProvider);
|
|
969
969
|
}
|
|
970
970
|
return;
|
|
@@ -1071,7 +1071,7 @@ async function manageApiKeys() {
|
|
|
1071
1071
|
if (removeIndex >= 0 && removeIndex < providers.length) {
|
|
1072
1072
|
const providerToRemove = providers[removeIndex];
|
|
1073
1073
|
if (providerToRemove) {
|
|
1074
|
-
const { removeKey } = await import("./keys-
|
|
1074
|
+
const { removeKey } = await import("./keys-XE2D6I24.js");
|
|
1075
1075
|
await removeKey(providerToRemove);
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
@@ -1079,7 +1079,7 @@ async function manageApiKeys() {
|
|
|
1079
1079
|
}
|
|
1080
1080
|
const provider = providerMap[choice];
|
|
1081
1081
|
if (provider) {
|
|
1082
|
-
const { addKey } = await import("./keys-
|
|
1082
|
+
const { addKey } = await import("./keys-XE2D6I24.js");
|
|
1083
1083
|
await addKey(provider);
|
|
1084
1084
|
}
|
|
1085
1085
|
}
|
|
@@ -1,159 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AnthropicClient,
|
|
3
|
-
generateId,
|
|
4
3
|
getDefaultModel
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
|
|
7
|
-
// src/core/atoms/types.ts
|
|
8
|
-
var ATOM_TRANSITIONS = {
|
|
9
|
-
DRAFT: ["READY"],
|
|
10
|
-
READY: ["IN_PROGRESS", "BLOCKED"],
|
|
11
|
-
IN_PROGRESS: ["TESTING", "FAILED"],
|
|
12
|
-
TESTING: ["DONE", "FAILED"],
|
|
13
|
-
DONE: [],
|
|
14
|
-
// Terminal state
|
|
15
|
-
FAILED: ["IN_PROGRESS", "BLOCKED"],
|
|
16
|
-
// Can retry or escalate
|
|
17
|
-
BLOCKED: ["READY"]
|
|
18
|
-
// Can unblock and retry
|
|
19
|
-
};
|
|
20
|
-
var MAX_RETRIES = 3;
|
|
21
|
-
|
|
22
|
-
// src/core/atoms/atoms.ts
|
|
23
|
-
var MAX_RETRIES2 = MAX_RETRIES;
|
|
24
|
-
var atomCounter = 0;
|
|
25
|
-
function generateAtomId() {
|
|
26
|
-
atomCounter++;
|
|
27
|
-
return `ATOM-${String(atomCounter).padStart(3, "0")}`;
|
|
28
|
-
}
|
|
29
|
-
function createAtom(input, context) {
|
|
30
|
-
const now = /* @__PURE__ */ new Date();
|
|
31
|
-
const externalId = generateAtomId();
|
|
32
|
-
return {
|
|
33
|
-
id: generateId("atom"),
|
|
34
|
-
externalId,
|
|
35
|
-
title: input.title,
|
|
36
|
-
description: input.description ?? null,
|
|
37
|
-
goals: input.goals ?? [],
|
|
38
|
-
acceptanceCriteria: input.acceptanceCriteria,
|
|
39
|
-
ownershipPaths: input.ownershipPaths ?? [],
|
|
40
|
-
status: "DRAFT",
|
|
41
|
-
priority: input.priority ?? 100,
|
|
42
|
-
plan: null,
|
|
43
|
-
diffContract: null,
|
|
44
|
-
retryCount: 0,
|
|
45
|
-
errorMessage: null,
|
|
46
|
-
tags: input.tags ?? [],
|
|
47
|
-
metadata: input.metadata ?? {},
|
|
48
|
-
context: context ?? {},
|
|
49
|
-
createdAt: now,
|
|
50
|
-
updatedAt: now
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function validateAtom(atom) {
|
|
54
|
-
const errors = [];
|
|
55
|
-
if (!atom.title || atom.title.trim() === "") {
|
|
56
|
-
errors.push({
|
|
57
|
-
field: "title",
|
|
58
|
-
message: "Title is required",
|
|
59
|
-
code: "REQUIRED"
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
if (!atom.acceptanceCriteria || atom.acceptanceCriteria.length === 0) {
|
|
63
|
-
errors.push({
|
|
64
|
-
field: "acceptanceCriteria",
|
|
65
|
-
message: "At least one acceptance criterion is required",
|
|
66
|
-
code: "REQUIRED"
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
atom.acceptanceCriteria.forEach((criterion, index) => {
|
|
70
|
-
if (typeof criterion !== "string" || criterion.trim() === "") {
|
|
71
|
-
errors.push({
|
|
72
|
-
field: `acceptanceCriteria[${index}]`,
|
|
73
|
-
message: "Acceptance criterion must be a non-empty string",
|
|
74
|
-
code: "INVALID_FORMAT"
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
if (atom.priority < 0) {
|
|
79
|
-
errors.push({
|
|
80
|
-
field: "priority",
|
|
81
|
-
message: "Priority must be a non-negative number",
|
|
82
|
-
code: "INVALID_VALUE"
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
const validStatuses = [
|
|
86
|
-
"DRAFT",
|
|
87
|
-
"READY",
|
|
88
|
-
"IN_PROGRESS",
|
|
89
|
-
"TESTING",
|
|
90
|
-
"DONE",
|
|
91
|
-
"FAILED",
|
|
92
|
-
"BLOCKED"
|
|
93
|
-
];
|
|
94
|
-
if (!validStatuses.includes(atom.status)) {
|
|
95
|
-
errors.push({
|
|
96
|
-
field: "status",
|
|
97
|
-
message: `Invalid status: ${atom.status}`,
|
|
98
|
-
code: "INVALID_VALUE"
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
valid: errors.length === 0,
|
|
103
|
-
errors
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
function validateTransition(currentStatus, newStatus) {
|
|
107
|
-
const allowedTransitions = ATOM_TRANSITIONS[currentStatus];
|
|
108
|
-
if (!allowedTransitions) {
|
|
109
|
-
return {
|
|
110
|
-
valid: false,
|
|
111
|
-
errors: [
|
|
112
|
-
{
|
|
113
|
-
field: "status",
|
|
114
|
-
message: `Unknown current status: ${currentStatus}`,
|
|
115
|
-
code: "INVALID_VALUE"
|
|
116
|
-
}
|
|
117
|
-
]
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
if (!allowedTransitions.includes(newStatus)) {
|
|
121
|
-
return {
|
|
122
|
-
valid: false,
|
|
123
|
-
errors: [
|
|
124
|
-
{
|
|
125
|
-
field: "status",
|
|
126
|
-
message: `Cannot transition from ${currentStatus} to ${newStatus}. Allowed: ${allowedTransitions.join(", ") || "none"}`,
|
|
127
|
-
code: "INVALID_TRANSITION"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
};
|
|
131
|
-
}
|
|
132
|
-
return { valid: true, errors: [] };
|
|
133
|
-
}
|
|
134
|
-
function transitionAtom(atom, newStatus, errorMessage) {
|
|
135
|
-
const validation = validateTransition(atom.status, newStatus);
|
|
136
|
-
if (!validation.valid) {
|
|
137
|
-
const error = validation.errors[0];
|
|
138
|
-
throw new Error(error?.message ?? "Invalid transition");
|
|
139
|
-
}
|
|
140
|
-
const now = /* @__PURE__ */ new Date();
|
|
141
|
-
const updates = {
|
|
142
|
-
status: newStatus,
|
|
143
|
-
updatedAt: now
|
|
144
|
-
};
|
|
145
|
-
if (newStatus === "FAILED") {
|
|
146
|
-
updates.retryCount = atom.retryCount + 1;
|
|
147
|
-
updates.errorMessage = errorMessage ?? null;
|
|
148
|
-
if (updates.retryCount >= MAX_RETRIES2) {
|
|
149
|
-
updates.status = "BLOCKED";
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
if (newStatus === "IN_PROGRESS" && atom.status === "FAILED") {
|
|
153
|
-
updates.errorMessage = null;
|
|
154
|
-
}
|
|
155
|
-
return { ...atom, ...updates };
|
|
156
|
-
}
|
|
4
|
+
} from "./chunk-HJARQDQR.js";
|
|
157
5
|
|
|
158
6
|
// src/agents/architect.ts
|
|
159
7
|
import { readFile } from "fs/promises";
|
|
@@ -367,8 +215,5 @@ var ArchitectAgent = class {
|
|
|
367
215
|
};
|
|
368
216
|
|
|
369
217
|
export {
|
|
370
|
-
createAtom,
|
|
371
|
-
validateAtom,
|
|
372
|
-
transitionAtom,
|
|
373
218
|
ArchitectAgent
|
|
374
219
|
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// src/cli/web-checks.ts
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
import { readFile, writeFile, mkdir } from "fs/promises";
|
|
4
|
+
import { join } from "path";
|
|
5
|
+
import yaml from "yaml";
|
|
6
|
+
var CONFIG_PATH = ".archon/config.yaml";
|
|
7
|
+
function ensureWebChecks(config) {
|
|
8
|
+
if (!config.webChecks) {
|
|
9
|
+
config.webChecks = {};
|
|
10
|
+
}
|
|
11
|
+
if (!config.webChecks.promptMode) {
|
|
12
|
+
config.webChecks.promptMode = "ask";
|
|
13
|
+
}
|
|
14
|
+
if (!config.webChecks.lastRun) {
|
|
15
|
+
config.webChecks.lastRun = {};
|
|
16
|
+
}
|
|
17
|
+
return config.webChecks;
|
|
18
|
+
}
|
|
19
|
+
async function loadLocalConfig(cwd) {
|
|
20
|
+
const configPath = join(cwd, CONFIG_PATH);
|
|
21
|
+
if (!existsSync(configPath)) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
const content = await readFile(configPath, "utf-8");
|
|
26
|
+
return yaml.parse(content) ?? {};
|
|
27
|
+
} catch {
|
|
28
|
+
return {};
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
async function saveLocalConfig(cwd, config) {
|
|
32
|
+
const configPath = join(cwd, CONFIG_PATH);
|
|
33
|
+
const archonDir = join(cwd, ".archon");
|
|
34
|
+
if (!existsSync(archonDir)) {
|
|
35
|
+
await mkdir(archonDir, { recursive: true });
|
|
36
|
+
}
|
|
37
|
+
await writeFile(configPath, yaml.stringify(config), "utf-8");
|
|
38
|
+
}
|
|
39
|
+
async function loadWebChecks(cwd) {
|
|
40
|
+
const config = await loadLocalConfig(cwd);
|
|
41
|
+
return ensureWebChecks(config);
|
|
42
|
+
}
|
|
43
|
+
async function setWebPromptMode(cwd, mode) {
|
|
44
|
+
const config = await loadLocalConfig(cwd);
|
|
45
|
+
const webChecks = ensureWebChecks(config);
|
|
46
|
+
webChecks.promptMode = mode;
|
|
47
|
+
await saveLocalConfig(cwd, config);
|
|
48
|
+
}
|
|
49
|
+
async function recordWebCheckResult(cwd, type, passed) {
|
|
50
|
+
const config = await loadLocalConfig(cwd);
|
|
51
|
+
const webChecks = ensureWebChecks(config);
|
|
52
|
+
if (!webChecks.lastRun) {
|
|
53
|
+
webChecks.lastRun = {};
|
|
54
|
+
}
|
|
55
|
+
webChecks.lastRun[type] = {
|
|
56
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
57
|
+
passed
|
|
58
|
+
};
|
|
59
|
+
await saveLocalConfig(cwd, config);
|
|
60
|
+
}
|
|
61
|
+
function formatWebCheckStatus(run) {
|
|
62
|
+
if (!run) return "Never run";
|
|
63
|
+
const date = new Date(run.timestamp);
|
|
64
|
+
const formatted = isNaN(date.getTime()) ? run.timestamp : `${date.toLocaleDateString()} ${date.toLocaleTimeString()}`;
|
|
65
|
+
return `${run.passed ? "Passed" : "Issues found"} \u2022 ${formatted}`;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export {
|
|
69
|
+
loadWebChecks,
|
|
70
|
+
setWebPromptMode,
|
|
71
|
+
recordWebCheckResult,
|
|
72
|
+
formatWebCheckStatus
|
|
73
|
+
};
|