archondev 2.19.44 → 2.19.47
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 +55 -3
- package/package.json +5 -2
package/dist/index.js
CHANGED
|
@@ -3770,6 +3770,10 @@ async function runAgentMode(cwd, state) {
|
|
|
3770
3770
|
async function handleAgentConversationInput(cwd, input) {
|
|
3771
3771
|
const normalized = input.trim().toLowerCase();
|
|
3772
3772
|
if (!normalized) return false;
|
|
3773
|
+
if (isFileLocationQuestion(normalized)) {
|
|
3774
|
+
await answerLatestOutputLocation(cwd);
|
|
3775
|
+
return true;
|
|
3776
|
+
}
|
|
3773
3777
|
if (pendingAnalysisToAtomRequest && isCreateAtomDirective(normalized)) {
|
|
3774
3778
|
const request = pendingAnalysisToAtomRequest;
|
|
3775
3779
|
pendingAnalysisToAtomRequest = null;
|
|
@@ -4101,6 +4105,9 @@ Approved analysis context:
|
|
|
4101
4105
|
- Treat these files as source inputs (read-only) unless the user explicitly asks to edit them.
|
|
4102
4106
|
- Write capsule output to a new dedicated file within allowed architecture paths.`;
|
|
4103
4107
|
}
|
|
4108
|
+
function isGeneratedCapsuleOutputPath(path2) {
|
|
4109
|
+
return /(?:sample-capsule|capsule-output(?:\.[\w-]+)?)\.md$/i.test(path2);
|
|
4110
|
+
}
|
|
4104
4111
|
function collectMarkdownFiles(cwd) {
|
|
4105
4112
|
const results = [];
|
|
4106
4113
|
const queue = ["."];
|
|
@@ -4124,7 +4131,11 @@ function collectMarkdownFiles(cwd) {
|
|
|
4124
4131
|
continue;
|
|
4125
4132
|
}
|
|
4126
4133
|
if (entry.isFile() && entry.name.toLowerCase().endsWith(".md")) {
|
|
4127
|
-
|
|
4134
|
+
const normalizedRel = relative(cwd, join6(cwd, rel)).replace(/\\/g, "/");
|
|
4135
|
+
if (isGeneratedCapsuleOutputPath(normalizedRel)) {
|
|
4136
|
+
continue;
|
|
4137
|
+
}
|
|
4138
|
+
results.push(normalizedRel);
|
|
4128
4139
|
}
|
|
4129
4140
|
}
|
|
4130
4141
|
}
|
|
@@ -4204,6 +4215,14 @@ async function continueWithCurrentTask(cwd, options = {}) {
|
|
|
4204
4215
|
const atoms = await listLocalAtoms2();
|
|
4205
4216
|
const readyAtoms = atoms.filter((a) => a.status === "READY" && (!scopeIds || scopeIds.has(a.externalId))).sort(byMostRecent);
|
|
4206
4217
|
if (readyAtoms.length === 0) {
|
|
4218
|
+
if (scopeIds && scopeIds.size > 0) {
|
|
4219
|
+
if (queueStarted && runAllReady) {
|
|
4220
|
+
console.log(chalk6.green("\nQueue execution complete for this approved task scope."));
|
|
4221
|
+
} else {
|
|
4222
|
+
console.log(chalk6.yellow("No READY atoms found for this approved task scope."));
|
|
4223
|
+
}
|
|
4224
|
+
return;
|
|
4225
|
+
}
|
|
4207
4226
|
const inProgressAtoms = atoms.filter((a) => a.status === "IN_PROGRESS").sort(byMostRecent);
|
|
4208
4227
|
if (inProgressAtoms.length > 0) {
|
|
4209
4228
|
const current = inProgressAtoms[0];
|
|
@@ -4219,8 +4238,6 @@ async function continueWithCurrentTask(cwd, options = {}) {
|
|
|
4219
4238
|
}
|
|
4220
4239
|
if (queueStarted && runAllReady) {
|
|
4221
4240
|
console.log(chalk6.green("\nQueue execution complete. No READY atoms remain."));
|
|
4222
|
-
} else if (scopeIds && scopeIds.size > 0) {
|
|
4223
|
-
console.log(chalk6.yellow("No READY atoms found for this approved task scope."));
|
|
4224
4241
|
} else {
|
|
4225
4242
|
console.log(chalk6.yellow("No pending atoms found. Tell me what to plan next."));
|
|
4226
4243
|
}
|
|
@@ -4353,6 +4370,10 @@ async function showMainMenu() {
|
|
|
4353
4370
|
async function handleFreeformJourneyInput(cwd, input) {
|
|
4354
4371
|
const freeform = input.trim();
|
|
4355
4372
|
if (!freeform) return false;
|
|
4373
|
+
if (isFileLocationQuestion(freeform)) {
|
|
4374
|
+
await answerLatestOutputLocation(cwd);
|
|
4375
|
+
return true;
|
|
4376
|
+
}
|
|
4356
4377
|
if (isExecutionDirective(freeform) || isContinuationDirective(freeform)) {
|
|
4357
4378
|
await continueWithCurrentTask(cwd);
|
|
4358
4379
|
return true;
|
|
@@ -4413,6 +4434,37 @@ function extractActionableFollowUpFromExplore(input) {
|
|
|
4413
4434
|
}
|
|
4414
4435
|
return trimmed;
|
|
4415
4436
|
}
|
|
4437
|
+
function isFileLocationQuestion(input) {
|
|
4438
|
+
const normalized = normalizeDirectiveInput(input);
|
|
4439
|
+
if (!normalized) return false;
|
|
4440
|
+
return /\b(where is|where are|show|which|what)\b/.test(normalized) && /\b(file|files|output|outputs|modified|changed|written|saved)\b/.test(normalized);
|
|
4441
|
+
}
|
|
4442
|
+
async function answerLatestOutputLocation(cwd) {
|
|
4443
|
+
const { listLocalAtoms: listLocalAtoms2 } = await import("./plan-I3P6U2ZM.js");
|
|
4444
|
+
const atoms = await listLocalAtoms2();
|
|
4445
|
+
const latestDone = atoms.filter((atom) => atom.status === "DONE").sort((a, b) => {
|
|
4446
|
+
const aTime = new Date(String(a.updatedAt ?? a.createdAt ?? "")).getTime() || 0;
|
|
4447
|
+
const bTime = new Date(String(b.updatedAt ?? b.createdAt ?? "")).getTime() || 0;
|
|
4448
|
+
return bTime - aTime;
|
|
4449
|
+
})[0];
|
|
4450
|
+
if (!latestDone) {
|
|
4451
|
+
console.log(chalk6.yellow("No completed task found yet, so there is no output file to show."));
|
|
4452
|
+
return;
|
|
4453
|
+
}
|
|
4454
|
+
const files = latestDone.plan?.files_to_modify ?? [];
|
|
4455
|
+
if (files.length === 0) {
|
|
4456
|
+
console.log(chalk6.yellow(`Latest completed atom is ${latestDone.externalId}, but it has no recorded output paths.`));
|
|
4457
|
+
return;
|
|
4458
|
+
}
|
|
4459
|
+
console.log(chalk6.green(`Latest output file(s) from ${latestDone.externalId}:`));
|
|
4460
|
+
for (const file of files) {
|
|
4461
|
+
console.log(chalk6.dim(` - ${file}`));
|
|
4462
|
+
}
|
|
4463
|
+
const firstPath = files[0];
|
|
4464
|
+
if (firstPath) {
|
|
4465
|
+
console.log(chalk6.dim(`Absolute path: ${join6(cwd, firstPath)}`));
|
|
4466
|
+
}
|
|
4467
|
+
}
|
|
4416
4468
|
function containsActionIntent(input) {
|
|
4417
4469
|
const normalized = input.trim().toLowerCase();
|
|
4418
4470
|
if (!normalized) return false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archondev",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.47",
|
|
4
4
|
"description": "Local-first AI-powered development governance system",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -22,9 +22,12 @@
|
|
|
22
22
|
"typecheck": "tsc --noEmit",
|
|
23
23
|
"pretest": "pnpm rebuild better-sqlite3",
|
|
24
24
|
"test": "vitest run",
|
|
25
|
+
"test:ux": "vitest run src/cli/start-ux.test.ts src/cli/journey-choices.test.ts src/cli/plan.test.ts",
|
|
25
26
|
"test:watch": "vitest",
|
|
26
27
|
"lint": "eslint src --ext .ts",
|
|
27
|
-
"
|
|
28
|
+
"gate:transcripts": "./scripts/transcript-smoke.sh",
|
|
29
|
+
"gate:release": "./scripts/release-gate.sh",
|
|
30
|
+
"prepublishOnly": "npm run gate:release"
|
|
28
31
|
},
|
|
29
32
|
"keywords": [
|
|
30
33
|
"ai",
|