archondev 2.16.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.
Files changed (55) hide show
  1. package/README.md +3 -0
  2. package/dist/a11y-O35BAA25.js +14 -0
  3. package/dist/auth-7AUNKGQW.js +14 -0
  4. package/dist/bug-PH2E6GQT.js +13 -0
  5. package/dist/{chunk-P4KDRIFM.js → chunk-23IS6N63.js} +6 -6
  6. package/dist/{chunk-ER4ADSWH.js → chunk-2NSWZDP7.js} +1 -156
  7. package/dist/chunk-3ASILTFB.js +73 -0
  8. package/dist/{chunk-DQE6E436.js → chunk-4KJJ6MSQ.js} +159 -274
  9. package/dist/{chunk-QGM4M3NI.js → chunk-4VNS5WPM.js} +5 -0
  10. package/dist/{chunk-NLW75APJ.js → chunk-4VWKGOBQ.js} +8 -8
  11. package/dist/{chunk-P666JE3G.js → chunk-54ATBLYE.js} +1 -1
  12. package/dist/chunk-5CFGPXQ3.js +160 -0
  13. package/dist/chunk-67ZTMWP4.js +495 -0
  14. package/dist/{chunk-FGH2UX3E.js → chunk-BFPWDOMA.js} +1 -1
  15. package/dist/{chunk-CJ3CFP52.js → chunk-BKJISQXP.js} +76 -24
  16. package/dist/chunk-FWLLGLD5.js +353 -0
  17. package/dist/{chunk-BDPGWWQC.js → chunk-HGLPIM7J.js} +1 -1
  18. package/dist/{chunk-NIKN37AY.js → chunk-HJARQDQR.js} +1 -1
  19. package/dist/{chunk-7NSVJFIZ.js → chunk-HKSVJWMI.js} +1 -1
  20. package/dist/{chunk-35AOCHTE.js → chunk-JAWG5QX4.js} +71 -4
  21. package/dist/chunk-JF7JCK6H.js +485 -0
  22. package/dist/chunk-KY2HKRC2.js +175 -0
  23. package/dist/{chunk-3JURZUY7.js → chunk-OQUWPU5F.js} +6 -4
  24. package/dist/{chunk-KMVMRFQ5.js → chunk-RPVPOUH3.js} +11 -1
  25. package/dist/{chunk-SVU7MLG6.js → chunk-SUGIWSCB.js} +24 -5
  26. package/dist/{chunk-JWY56A3X.js → chunk-U2ZTHVDD.js} +8 -12
  27. package/dist/{chunk-LXXTCZ2Q.js → chunk-UFR2LX6G.js} +216 -14
  28. package/dist/{code-review-ORCNXANW.js → code-review-6MU4UE5M.js} +4 -4
  29. package/dist/{config-BBQW726O.js → config-UARQV6FG.js} +3 -2
  30. package/dist/{constants-AHP5F7HW.js → constants-XDIWFFPN.js} +1 -1
  31. package/dist/execute-6SJL5POT.js +18 -0
  32. package/dist/geo-RP6HKLKZ.js +21 -0
  33. package/dist/index.js +929 -1843
  34. package/dist/{init-6EXMDCWC.js → init-5RS332ZH.js} +2 -2
  35. package/dist/{interviewer-SULVHQW6.js → interviewer-Z7K4IZYG.js} +6 -5
  36. package/dist/{keys-SXJ6MKPY.js → keys-THCHXIFD.js} +1 -1
  37. package/dist/{keys-5Y7KQAHI.js → keys-XE2D6I24.js} +4 -3
  38. package/dist/list-PCDSX4UI.js +17 -0
  39. package/dist/{manager-32P6ZZBP.js → manager-YSNTH2DG.js} +1 -1
  40. package/dist/models-UTFGCHAY.js +33 -0
  41. package/dist/{orchestration-X6LHSHBJ.js → orchestration-HIF3KP25.js} +1 -1
  42. package/dist/{parallel-4NN4ONOH.js → parallel-IRFNVIB6.js} +11 -7
  43. package/dist/{parser-4KJH2PT5.js → parser-BFHETZ5B.js} +1 -1
  44. package/dist/plan-RE5A3E2J.js +22 -0
  45. package/dist/{preferences-32J3GUTY.js → preferences-QAM5QKAQ.js} +6 -6
  46. package/dist/{review-T4ID2QUF.js → review-AUG6GIL6.js} +5 -5
  47. package/dist/seo-PMI42KRZ.js +10 -0
  48. package/dist/{tier-selection-3N4BZYWA.js → tier-selection-2W6JWJUN.js} +4 -3
  49. package/dist/web-checks-4BSYXWDF.js +13 -0
  50. package/package.json +1 -1
  51. package/dist/auth-2E4VORGY.js +0 -14
  52. package/dist/bug-KUMC6HSR.js +0 -11
  53. package/dist/execute-MAFSY5FY.js +0 -16
  54. package/dist/list-C224HUQ6.js +0 -16
  55. package/dist/plan-7DPVPUNK.js +0 -19
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 |
@@ -99,6 +100,8 @@ Copy governance files into any project. Works with your existing AI tools: **Cur
99
100
  | `archon cleanup run` | Execute cleanup tasks |
100
101
  | `archon cleanup auto [enable\|disable]` | Enable/disable auto cleanup on start |
101
102
 
103
+ **Tip:** Use `archon plan --edit` to adjust title and acceptance criteria before planning.
104
+
102
105
  ## Pricing
103
106
 
104
107
  | Tier | Cost | What You Get |
@@ -0,0 +1,14 @@
1
+ import {
2
+ a11yBadge,
3
+ a11yCheck,
4
+ a11yFix,
5
+ a11yPreDeploy
6
+ } from "./chunk-FWLLGLD5.js";
7
+ import "./chunk-3ASILTFB.js";
8
+ import "./chunk-4VNS5WPM.js";
9
+ export {
10
+ a11yBadge,
11
+ a11yCheck,
12
+ a11yFix,
13
+ a11yPreDeploy
14
+ };
@@ -0,0 +1,14 @@
1
+ import {
2
+ login,
3
+ logout,
4
+ status
5
+ } from "./chunk-U2ZTHVDD.js";
6
+ import "./chunk-4VWKGOBQ.js";
7
+ import "./chunk-SUGIWSCB.js";
8
+ import "./chunk-M4LGRTLC.js";
9
+ import "./chunk-4VNS5WPM.js";
10
+ export {
11
+ login,
12
+ logout,
13
+ status
14
+ };
@@ -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,18 +8,18 @@ import {
8
8
  invalidateTierCache,
9
9
  isFreeModel,
10
10
  isValidModel
11
- } from "./chunk-LXXTCZ2Q.js";
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-JWY56A3X.js";
17
+ } from "./chunk-U2ZTHVDD.js";
18
18
  import {
19
19
  getApiUrl,
20
20
  getAuthToken,
21
21
  loadConfig
22
- } from "./chunk-SVU7MLG6.js";
22
+ } from "./chunk-SUGIWSCB.js";
23
23
 
24
24
  // src/cli/preferences.ts
25
25
  import chalk from "chalk";
@@ -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-5Y7KQAHI.js");
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-5Y7KQAHI.js");
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-NIKN37AY.js";
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
+ };