@codeyam/codeyam-cli 0.1.15 → 0.1.16

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 (44) hide show
  1. package/analyzer-template/.build-info.json +6 -6
  2. package/analyzer-template/log.txt +3 -3
  3. package/codeyam-cli/src/commands/editor.js +68 -7
  4. package/codeyam-cli/src/commands/editor.js.map +1 -1
  5. package/codeyam-cli/src/commands/init.js +1 -0
  6. package/codeyam-cli/src/commands/init.js.map +1 -1
  7. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +62 -1
  8. package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
  9. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +57 -0
  10. package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -1
  11. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +41 -0
  12. package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -1
  13. package/codeyam-cli/src/utils/editorAudit.js +24 -0
  14. package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
  15. package/codeyam-cli/src/utils/install-skills.js +5 -0
  16. package/codeyam-cli/src/utils/install-skills.js.map +1 -1
  17. package/codeyam-cli/src/utils/scenarioCoverage.js +4 -1
  18. package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -1
  19. package/codeyam-cli/src/utils/scenariosManifest.js +6 -0
  20. package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -1
  21. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +40 -0
  22. package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -1
  23. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +92 -21
  24. package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -1
  25. package/codeyam-cli/src/webserver/app/lib/clientErrors.js +7 -1
  26. package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -1
  27. package/codeyam-cli/src/webserver/build/client/assets/{editor.entity.(_sha)-B7xQ9Sjy.js → editor.entity.(_sha)-DN5ouXAl.js} +14 -14
  28. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-oepecPae.js +41 -0
  29. package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.dev-CUobbQdQ.js → entity._sha.scenarios._scenarioId.dev-KTQuL0aj.js} +1 -1
  30. package/codeyam-cli/src/webserver/build/client/assets/{manifest-5d53342d.js → manifest-389033be.js} +1 -1
  31. package/codeyam-cli/src/webserver/build/server/assets/{analysisRunner-DcJSnBCE.js → analysisRunner-D_1MSYeW.js} +1 -1
  32. package/codeyam-cli/src/webserver/build/server/assets/{index-CEaDhUiv.js → index-ckWaCf_v.js} +1 -1
  33. package/codeyam-cli/src/webserver/build/server/assets/{init-DA7guOrE.js → init-ld124R4Z.js} +2 -2
  34. package/codeyam-cli/src/webserver/build/server/assets/{server-build-juyiY2m6.js → server-build-DzzNZGv_.js} +100 -100
  35. package/codeyam-cli/src/webserver/build/server/index.js +1 -1
  36. package/codeyam-cli/src/webserver/build-info.json +5 -5
  37. package/codeyam-cli/src/webserver/idleDetector.js +41 -8
  38. package/codeyam-cli/src/webserver/idleDetector.js.map +1 -1
  39. package/codeyam-cli/src/webserver/scripts/journalCapture.ts +36 -0
  40. package/codeyam-cli/src/webserver/terminalServer.js +4 -4
  41. package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
  42. package/codeyam-cli/templates/codeyam-editor-reference.md +214 -0
  43. package/package.json +1 -1
  44. package/codeyam-cli/src/webserver/build/client/assets/editorPreview-CxmrE6AF.js +0 -41
@@ -1,10 +1,10 @@
1
1
  {
2
- "buildTimestamp": "2026-03-18T20:56:41.501Z",
3
- "buildTime": 1773867401501,
4
- "gitCommit": "3328e60080cd05630588c6f1b139c2caffcb164a",
2
+ "buildTimestamp": "2026-03-19T01:18:46.592Z",
3
+ "buildTime": 1773883126592,
4
+ "gitCommit": "27da20c7d41586bf9567c2e2ac63312ba9fb9057",
5
5
  "nodeVersion": "v20.20.1",
6
6
  "contentHash": "b046e014847d5b02d10d6795839ccd0d5117627cbd0be413260824610596a63d",
7
- "buildNumber": 1100,
8
- "semanticVersion": "0.1.1100",
9
- "version": "0.1.1100 (2026-03-18T20:56+b046e01)"
7
+ "buildNumber": 1104,
8
+ "semanticVersion": "0.1.1104",
9
+ "version": "0.1.1104 (2026-03-19T01:18+b046e01)"
10
10
  }
@@ -1,7 +1,7 @@
1
1
 
2
- [3/18/2026, 8:56:41 PM] > codeyam-combo@1.0.0 mergeDependencies
3
- [3/18/2026, 8:56:41 PM] > node ./scripts/mergePackageJsonFiles.cjs
2
+ [3/19/2026, 1:18:46 AM] > codeyam-combo@1.0.0 mergeDependencies
3
+ [3/19/2026, 1:18:46 AM] > node ./scripts/mergePackageJsonFiles.cjs
4
4
 
5
5
 
6
- [3/18/2026, 8:56:41 PM] Merged dependencies into root package.json
6
+ [3/19/2026, 1:18:46 AM] Merged dependencies into root package.json
7
7
 
@@ -810,6 +810,7 @@ function printCycleOverview(root, state) {
810
810
  console.log(chalk.green('Start now: ') + chalk.bold('codeyam editor 1'));
811
811
  console.log(chalk.dim(' If the user already described what they want, pass it: codeyam editor 1 --prompt "their message"'));
812
812
  }
813
+ console.log(chalk.dim('If stuck on CLI commands, scenarios, or debugging, read: .codeyam/docs/editor-reference.md'));
813
814
  console.log();
814
815
  }
815
816
  // ─── Step 1: Plan ─────────────────────────────────────────────────────
@@ -2675,6 +2676,14 @@ async function handleRegister(jsonArg) {
2675
2676
  console.log(chalk.red(` → ${err}`));
2676
2677
  }
2677
2678
  console.log(chalk.yellow(' The screenshot may show an error screen instead of the actual component.'));
2679
+ // Provide actionable debugging hints for HTTP/API errors
2680
+ const hasApiResponseError = data.clientErrors.some((e) => e.includes('API response error:'));
2681
+ const hasHttpError = data.clientErrors.some((e) => e.includes('HTTP error:'));
2682
+ if (hasHttpError || hasApiResponseError) {
2683
+ console.log(chalk.yellow(' To debug: look at the "API response error" lines above — they show the exact API endpoint'));
2684
+ console.log(chalk.yellow(' that failed and what the server returned. Then check the scenario seed data to ensure'));
2685
+ console.log(chalk.yellow(' all IDs referenced in the URL exist in the seed, and that the route is correct.'));
2686
+ }
2678
2687
  console.log(chalk.yellow(' Fix the issue and re-register this scenario.'));
2679
2688
  }
2680
2689
  if (!res.ok) {
@@ -2988,18 +2997,48 @@ function printAuditGateFailures(data) {
2988
2997
  if (!s)
2989
2998
  return;
2990
2999
  const issues = [];
2991
- if (s.componentsMissing > 0)
3000
+ if (s.componentsMissing > 0) {
2992
3001
  issues.push(`${s.componentsMissing} component(s) missing scenarios`);
2993
- if (s.componentsWithErrors > 0)
3002
+ const missing = (data.components || []).filter((c) => c.status === 'missing');
3003
+ for (const c of missing) {
3004
+ issues.push(` → ${c.name}${c.filePath ? ` (${c.filePath})` : ''}`);
3005
+ }
3006
+ }
3007
+ if (s.componentsWithErrors > 0) {
2994
3008
  issues.push(`${s.componentsWithErrors} component(s) with client errors (browser API or runtime errors in captured scenarios)`);
2995
- if (s.functionsMissing > 0)
3009
+ const withErrors = (data.components || []).filter((c) => c.status === 'has_errors');
3010
+ for (const c of withErrors) {
3011
+ issues.push(` → ${c.name}${c.filePath ? ` (${c.filePath})` : ''}`);
3012
+ }
3013
+ }
3014
+ if (s.functionsMissing > 0) {
2996
3015
  issues.push(`${s.functionsMissing} function(s) missing test files`);
2997
- if (s.functionsFailing > 0)
3016
+ const missing = (data.functions || []).filter((f) => f.status === 'missing');
3017
+ for (const f of missing) {
3018
+ issues.push(` → ${f.name}${f.filePath ? ` (${f.filePath})` : ''}`);
3019
+ }
3020
+ }
3021
+ if (s.functionsFailing > 0) {
2998
3022
  issues.push(`${s.functionsFailing} function(s) with failing tests`);
2999
- if (s.functionsRunnerError > 0)
3023
+ const failing = (data.functions || []).filter((f) => f.status === 'failing');
3024
+ for (const f of failing) {
3025
+ issues.push(` → ${f.name}${f.testFile ? ` (${f.testFile})` : ''}`);
3026
+ }
3027
+ }
3028
+ if (s.functionsRunnerError > 0) {
3000
3029
  issues.push(`${s.functionsRunnerError} function(s) with test runner errors (the runner crashed — not a test failure)`);
3001
- if (s.functionsNameMismatch > 0)
3030
+ const runnerErrors = (data.functions || []).filter((f) => f.status === 'runner_error');
3031
+ for (const f of runnerErrors) {
3032
+ issues.push(` → ${f.name}${f.testFile ? ` (${f.testFile})` : ''}`);
3033
+ }
3034
+ }
3035
+ if (s.functionsNameMismatch > 0) {
3002
3036
  issues.push(`${s.functionsNameMismatch} function(s) with test name mismatch`);
3037
+ const mismatch = (data.functions || []).filter((f) => f.status === 'name_mismatch');
3038
+ for (const f of mismatch) {
3039
+ issues.push(` → ${f.name}${f.testFile ? ` (${f.testFile})` : ''}`);
3040
+ }
3041
+ }
3003
3042
  if (s.missingFromGlossary > 0)
3004
3043
  issues.push(`${s.missingFromGlossary} file(s) with scenarios not in glossary`);
3005
3044
  if (s.incompleteEntities > 0)
@@ -3083,6 +3122,11 @@ async function handleAudit() {
3083
3122
  console.log();
3084
3123
  // Components
3085
3124
  if (components.length > 0) {
3125
+ // Build name frequency map for disambiguation
3126
+ const componentNameCounts = new Map();
3127
+ for (const c of components) {
3128
+ componentNameCounts.set(c.name, (componentNameCounts.get(c.name) || 0) + 1);
3129
+ }
3086
3130
  console.log(chalk.bold('Components (scenarios):'));
3087
3131
  for (const c of components) {
3088
3132
  const icon = c.status === 'ok' ? chalk.green('✓') : chalk.red('✗');
@@ -3096,7 +3140,11 @@ async function handleAudit() {
3096
3140
  else {
3097
3141
  detail = chalk.red(' — no scenarios registered');
3098
3142
  }
3099
- console.log(` ${icon} ${c.name}${detail}`);
3143
+ // Show file path for failing components always, for OK only when name is ambiguous
3144
+ const isDuplicate = (componentNameCounts.get(c.name) || 0) > 1;
3145
+ const showPath = c.status !== 'ok' || isDuplicate;
3146
+ const pathSuffix = showPath && c.filePath ? chalk.dim(` (${c.filePath})`) : '';
3147
+ console.log(` ${icon} ${c.name}${pathSuffix}${detail}`);
3100
3148
  if (c.clientErrors && c.clientErrors.length > 0) {
3101
3149
  for (const err of c.clientErrors.slice(0, 3)) {
3102
3150
  console.log(chalk.red(` → ${err}`));
@@ -3211,6 +3259,19 @@ async function handleAudit() {
3211
3259
  console.log(chalk.yellow(' Re-register these scenarios to capture updated screenshots.'));
3212
3260
  console.log();
3213
3261
  }
3262
+ // Duplicate glossary names (warning, not a failure)
3263
+ const duplicateNames = data.duplicateNames || [];
3264
+ if (duplicateNames.length > 0) {
3265
+ console.log(chalk.bold('Duplicate names in glossary (confusing for audit):'));
3266
+ for (const dn of duplicateNames) {
3267
+ console.log(` ${chalk.yellow('⚠')} "${dn.name}" appears ${dn.filePaths.length} times:`);
3268
+ for (const fp of dn.filePaths) {
3269
+ console.log(` ${fp}`);
3270
+ }
3271
+ }
3272
+ console.log(chalk.yellow(' Fix: remove duplicate entries or rename them to be unique in .codeyam/glossary.json'));
3273
+ console.log();
3274
+ }
3214
3275
  // Summary
3215
3276
  const allOk = summary.allPassing;
3216
3277
  if (allOk) {