@eldrforge/kodrdriv 1.2.26 → 1.2.28

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 (79) hide show
  1. package/AI-FRIENDLY-LOGGING-GUIDE.md +237 -0
  2. package/AI-LOGGING-MIGRATION-COMPLETE.md +371 -0
  3. package/ALREADY-PUBLISHED-PACKAGES-FIX.md +264 -0
  4. package/AUDIT-BRANCHES-PROGRESS-FIX.md +90 -0
  5. package/AUDIT-EXAMPLE-OUTPUT.md +113 -0
  6. package/CHECKPOINT-RECOVERY-FIX.md +450 -0
  7. package/LOGGING-MIGRATION-STATUS.md +186 -0
  8. package/PARALLEL-PUBLISH-FIXES-IMPLEMENTED.md +405 -0
  9. package/PARALLEL-PUBLISH-IMPROVEMENTS-IMPLEMENTED.md +439 -0
  10. package/PARALLEL-PUBLISH-QUICK-REFERENCE.md +375 -0
  11. package/PARALLEL_EXECUTION_FIX.md +2 -2
  12. package/PUBLISH_IMPROVEMENTS_IMPLEMENTED.md +294 -0
  13. package/VERSION-AUDIT-FIX.md +333 -0
  14. package/dist/application.js +6 -6
  15. package/dist/application.js.map +1 -1
  16. package/dist/arguments.js +43 -13
  17. package/dist/arguments.js.map +1 -1
  18. package/dist/commands/audio-commit.js +18 -18
  19. package/dist/commands/audio-commit.js.map +1 -1
  20. package/dist/commands/audio-review.js +32 -32
  21. package/dist/commands/audio-review.js.map +1 -1
  22. package/dist/commands/clean.js +9 -9
  23. package/dist/commands/clean.js.map +1 -1
  24. package/dist/commands/commit.js +20 -20
  25. package/dist/commands/commit.js.map +1 -1
  26. package/dist/commands/development.js +91 -90
  27. package/dist/commands/development.js.map +1 -1
  28. package/dist/commands/link.js +36 -36
  29. package/dist/commands/link.js.map +1 -1
  30. package/dist/commands/publish.js +345 -225
  31. package/dist/commands/publish.js.map +1 -1
  32. package/dist/commands/release.js +14 -14
  33. package/dist/commands/release.js.map +1 -1
  34. package/dist/commands/review.js +15 -17
  35. package/dist/commands/review.js.map +1 -1
  36. package/dist/commands/select-audio.js +5 -5
  37. package/dist/commands/select-audio.js.map +1 -1
  38. package/dist/commands/tree.js +75 -34
  39. package/dist/commands/tree.js.map +1 -1
  40. package/dist/commands/unlink.js +39 -39
  41. package/dist/commands/unlink.js.map +1 -1
  42. package/dist/commands/updates.js +150 -14
  43. package/dist/commands/updates.js.map +1 -1
  44. package/dist/commands/versions.js +14 -13
  45. package/dist/commands/versions.js.map +1 -1
  46. package/dist/constants.js +1 -1
  47. package/dist/content/diff.js +5 -5
  48. package/dist/content/diff.js.map +1 -1
  49. package/dist/content/files.js +2 -2
  50. package/dist/content/files.js.map +1 -1
  51. package/dist/content/log.js +3 -3
  52. package/dist/content/log.js.map +1 -1
  53. package/dist/execution/CommandValidator.js +6 -6
  54. package/dist/execution/CommandValidator.js.map +1 -1
  55. package/dist/execution/DynamicTaskPool.js +33 -10
  56. package/dist/execution/DynamicTaskPool.js.map +1 -1
  57. package/dist/execution/RecoveryManager.js +99 -21
  58. package/dist/execution/RecoveryManager.js.map +1 -1
  59. package/dist/execution/TreeExecutionAdapter.js +65 -48
  60. package/dist/execution/TreeExecutionAdapter.js.map +1 -1
  61. package/dist/main.js +2 -2
  62. package/dist/main.js.map +1 -1
  63. package/dist/util/checkpointManager.js +4 -4
  64. package/dist/util/checkpointManager.js.map +1 -1
  65. package/dist/util/dependencyGraph.js +2 -2
  66. package/dist/util/dependencyGraph.js.map +1 -1
  67. package/dist/util/fileLock.js +1 -1
  68. package/dist/util/fileLock.js.map +1 -1
  69. package/dist/util/general.js +148 -15
  70. package/dist/util/general.js.map +1 -1
  71. package/dist/util/interactive.js +2 -2
  72. package/dist/util/interactive.js.map +1 -1
  73. package/dist/util/performance.js.map +1 -1
  74. package/dist/util/safety.js +13 -13
  75. package/dist/util/safety.js.map +1 -1
  76. package/dist/utils/branchState.js +567 -0
  77. package/dist/utils/branchState.js.map +1 -0
  78. package/package.json +1 -1
  79. package/scripts/update-test-log-assertions.js +73 -0
@@ -61,25 +61,23 @@ const getReviewFilesInDirectory = async (directoryPath)=>{
61
61
  const selectFilesForProcessing = async (reviewFiles, senditMode)=>{
62
62
  const logger = getLogger();
63
63
  if (senditMode) {
64
- logger.info(`Auto-selecting all ${reviewFiles.length} files for processing (--sendit mode)`);
64
+ logger.info(`REVIEW_AUTO_SELECT: Auto-selecting all files for processing | Mode: sendit | File Count: ${reviewFiles.length} | Confirmation: automatic`);
65
65
  return reviewFiles;
66
66
  }
67
67
  // Check if we're in an interactive environment
68
68
  if (!isTTYSafe()) {
69
- logger.warn(`Non-interactive environment detected, selecting all files for processing`);
69
+ logger.warn(`REVIEW_NON_INTERACTIVE_SELECT: Non-interactive environment detected | Action: Selecting all files | Mode: non-interactive`);
70
70
  return reviewFiles;
71
71
  }
72
- logger.info(`\nšŸ“ File Selection Phase`);
73
- logger.info(`Found ${reviewFiles.length} files to review. Select which ones to process:`);
74
- logger.info(`[c] Confirm this file for processing`);
75
- logger.info(`[s] Skip this file`);
76
- logger.info(`[a] Abort the entire review process`);
72
+ logger.info(`\nREVIEW_SELECTION_PHASE: Starting file selection phase | File Count: ${reviewFiles.length} | Purpose: Choose files to process`);
73
+ logger.info(`REVIEW_SELECTION_FILES: Found files to review | Count: ${reviewFiles.length} | Action: Select files for processing`);
74
+ logger.info(`REVIEW_SELECTION_OPTIONS: File selection options available | [c]=Confirm | [s]=Skip | [a]=Abort`);
77
75
  logger.info(``);
78
76
  const selectedFiles = [];
79
77
  let shouldAbort = false;
80
78
  for(let i = 0; i < reviewFiles.length; i++){
81
79
  const filePath = reviewFiles[i];
82
- logger.info(`File ${i + 1}/${reviewFiles.length}: ${filePath}`);
80
+ logger.info(`REVIEW_SELECTION_FILE: File for review | Progress: ${i + 1}/${reviewFiles.length} | File: ${filePath}`);
83
81
  const choice = await getUserChoice(`Select action for this file:`, [
84
82
  {
85
83
  key: 'c',
@@ -95,14 +93,14 @@ const selectFilesForProcessing = async (reviewFiles, senditMode)=>{
95
93
  }
96
94
  ]);
97
95
  if (choice === 'a') {
98
- logger.info(`šŸ›‘ Aborting review process as requested`);
96
+ logger.info(`REVIEW_ABORTED: User aborted review process | Action: Aborting | Reason: User request`);
99
97
  shouldAbort = true;
100
98
  break;
101
99
  } else if (choice === 'c') {
102
100
  selectedFiles.push(filePath);
103
- logger.info(`āœ… File selected for processing: ${filePath}`);
101
+ logger.info(`REVIEW_FILE_SELECTED: File selected for processing | File: ${filePath} | Action: Will be processed`);
104
102
  } else if (choice === 's') {
105
- logger.info(`ā­ļø File skipped: ${filePath}`);
103
+ logger.info(`REVIEW_FILE_SKIPPED: File skipped during selection | File: ${filePath} | Action: Will not be processed`);
106
104
  }
107
105
  }
108
106
  if (shouldAbort) {
@@ -128,7 +126,7 @@ const createSecureTempFile = async ()=>{
128
126
  const W_OK = 2; // fs.constants.W_OK value
129
127
  await fs.access(tmpDir, W_OK);
130
128
  } catch (error) {
131
- logger.error(`Temp directory not writable: ${tmpDir}`);
129
+ logger.error(`TEMP_DIR_NOT_WRITABLE: Temporary directory is not writable | Directory: ${tmpDir} | Impact: Cannot create temp files`);
132
130
  throw new FileOperationError(`Temp directory not writable: ${error.message}`, tmpDir, error);
133
131
  }
134
132
  const tmpFilePath = path__default.join(tmpDir, `kodrdriv_review_${Date.now()}_${Math.random().toString(36).substring(7)}.md`);
@@ -139,7 +137,7 @@ const createSecureTempFile = async ()=>{
139
137
  logger.debug(`Created secure temp file: ${tmpFilePath}`);
140
138
  return tmpFilePath;
141
139
  } catch (error) {
142
- logger.error(`Failed to create temp file: ${error.message}`);
140
+ logger.error(`TEMP_FILE_CREATE_FAILED: Unable to create temporary file | Error: ${error.message} | Impact: Cannot proceed with review`);
143
141
  throw new FileOperationError(`Failed to create temp file: ${error.message}`, 'temporary file', error);
144
142
  }
145
143
  };
@@ -152,7 +150,7 @@ const cleanupTempFile = async (filePath)=>{
152
150
  } catch (error) {
153
151
  // Only ignore ENOENT (file not found) errors, log others
154
152
  if (error.code !== 'ENOENT') {
155
- logger.warn(`Failed to cleanup temp file ${filePath}: ${error.message}`);
153
+ logger.warn(`TEMP_FILE_CLEANUP_FAILED: Unable to cleanup temporary file | File: ${filePath} | Error: ${error.message} | Impact: File may remain`);
156
154
  // Don't throw here to avoid masking the main operation
157
155
  }
158
156
  }
@@ -387,7 +385,7 @@ const processSingleReview = async (reviewNote, runConfig, outputDirectory)=>{
387
385
  }
388
386
  }
389
387
  // Analyze review note for issues using OpenAI
390
- logger.info('šŸ¤– Analyzing review note for project issues...');
388
+ logger.info('REVIEW_ANALYSIS_STARTING: Analyzing review note for project issues | Source: review note | Purpose: Identify actionable issues');
391
389
  logger.debug('Context summary:');
392
390
  logger.debug(' - Review note: %d chars', reviewNote.length);
393
391
  logger.debug(' - Log context: %d chars', logContext.length);
@@ -436,10 +434,10 @@ const processSingleReview = async (reviewNote, runConfig, outputDirectory)=>{
436
434
  // Validate the API response before using it
437
435
  analysisResult = validateReviewResult(rawResult);
438
436
  } catch (error) {
439
- logger.error(`Failed to analyze review note: ${error.message}`);
437
+ logger.error(`REVIEW_ANALYSIS_FAILED: Unable to analyze review note | Error: ${error.message} | Impact: Cannot identify issues`);
440
438
  throw new Error(`Review analysis failed: ${error.message}`);
441
439
  }
442
- logger.info('āœ… Analysis completed');
440
+ logger.info('REVIEW_ANALYSIS_COMPLETE: Review note analysis completed successfully | Status: completed | Next: Issue creation if enabled');
443
441
  logger.debug('Analysis result summary: %s', analysisResult.summary);
444
442
  logger.debug('Total issues found: %d', analysisResult.totalIssues);
445
443
  logger.debug('Issues array length: %d', ((_analysisResult_issues = analysisResult.issues) === null || _analysisResult_issues === void 0 ? void 0 : _analysisResult_issues.length) || 0);