archondev 2.19.45 → 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.
Files changed (2) hide show
  1. package/dist/index.js +47 -1
  2. 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
- results.push(relative(cwd, join6(cwd, rel)).replace(/\\/g, "/"));
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
  }
@@ -4359,6 +4370,10 @@ async function showMainMenu() {
4359
4370
  async function handleFreeformJourneyInput(cwd, input) {
4360
4371
  const freeform = input.trim();
4361
4372
  if (!freeform) return false;
4373
+ if (isFileLocationQuestion(freeform)) {
4374
+ await answerLatestOutputLocation(cwd);
4375
+ return true;
4376
+ }
4362
4377
  if (isExecutionDirective(freeform) || isContinuationDirective(freeform)) {
4363
4378
  await continueWithCurrentTask(cwd);
4364
4379
  return true;
@@ -4419,6 +4434,37 @@ function extractActionableFollowUpFromExplore(input) {
4419
4434
  }
4420
4435
  return trimmed;
4421
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
+ }
4422
4468
  function containsActionIntent(input) {
4423
4469
  const normalized = input.trim().toLowerCase();
4424
4470
  if (!normalized) return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archondev",
3
- "version": "2.19.45",
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
- "prepublishOnly": "npm run build && npm run test"
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",