codehere 0.4.0 → 0.5.0-alpha.0

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 (231) hide show
  1. package/README.md +7 -0
  2. package/dist/application/agents/execution-agent.js +2 -2
  3. package/dist/application/agents/execution-agent.js.map +1 -1
  4. package/dist/application/agents/planning-agent.d.ts.map +1 -1
  5. package/dist/application/agents/planning-agent.js +16 -8
  6. package/dist/application/agents/planning-agent.js.map +1 -1
  7. package/dist/application/agents/validation-agent.js +2 -2
  8. package/dist/application/agents/validation-agent.js.map +1 -1
  9. package/dist/application/services/dependency-container.d.ts +30 -6
  10. package/dist/application/services/dependency-container.d.ts.map +1 -1
  11. package/dist/application/services/dependency-container.js +75 -43
  12. package/dist/application/services/dependency-container.js.map +1 -1
  13. package/dist/application/services/intelligent-router.d.ts.map +1 -1
  14. package/dist/application/services/intelligent-router.js +6 -3
  15. package/dist/application/services/intelligent-router.js.map +1 -1
  16. package/dist/domain/entities/task.d.ts.map +1 -1
  17. package/dist/domain/entities/task.js +1 -1
  18. package/dist/domain/entities/task.js.map +1 -1
  19. package/dist/domain/errors/embeddings-not-found-error.d.ts +9 -0
  20. package/dist/domain/errors/embeddings-not-found-error.d.ts.map +1 -0
  21. package/dist/domain/errors/embeddings-not-found-error.js +13 -0
  22. package/dist/domain/errors/embeddings-not-found-error.js.map +1 -0
  23. package/dist/domain/interfaces/embedding-repository.interface.d.ts +5 -0
  24. package/dist/domain/interfaces/embedding-repository.interface.d.ts.map +1 -1
  25. package/dist/domain/services/environment-mode-manager.d.ts +4 -10
  26. package/dist/domain/services/environment-mode-manager.d.ts.map +1 -1
  27. package/dist/domain/services/environment-mode-manager.js +7 -22
  28. package/dist/domain/services/environment-mode-manager.js.map +1 -1
  29. package/dist/domain/services/risk-tier-detector.d.ts +8 -9
  30. package/dist/domain/services/risk-tier-detector.d.ts.map +1 -1
  31. package/dist/domain/services/risk-tier-detector.js +53 -40
  32. package/dist/domain/services/risk-tier-detector.js.map +1 -1
  33. package/dist/embed.d.ts.map +1 -1
  34. package/dist/embed.js +18 -8
  35. package/dist/embed.js.map +1 -1
  36. package/dist/index.js +308 -48
  37. package/dist/index.js.map +1 -1
  38. package/dist/infrastructure/ai/cohere-ai-service.js +3 -3
  39. package/dist/infrastructure/ai/cohere-ai-service.js.map +1 -1
  40. package/dist/infrastructure/ai/provider-ai-service.d.ts.map +1 -1
  41. package/dist/infrastructure/ai/provider-ai-service.js +6 -6
  42. package/dist/infrastructure/ai/provider-ai-service.js.map +1 -1
  43. package/dist/infrastructure/cache/query-result-cache.d.ts +14 -55
  44. package/dist/infrastructure/cache/query-result-cache.d.ts.map +1 -1
  45. package/dist/infrastructure/cache/query-result-cache.js +40 -112
  46. package/dist/infrastructure/cache/query-result-cache.js.map +1 -1
  47. package/dist/infrastructure/cache/response-cache.d.ts +10 -78
  48. package/dist/infrastructure/cache/response-cache.d.ts.map +1 -1
  49. package/dist/infrastructure/cache/response-cache.js +22 -198
  50. package/dist/infrastructure/cache/response-cache.js.map +1 -1
  51. package/dist/infrastructure/cache/security-scan-cache.d.ts +8 -49
  52. package/dist/infrastructure/cache/security-scan-cache.d.ts.map +1 -1
  53. package/dist/infrastructure/cache/security-scan-cache.js +25 -102
  54. package/dist/infrastructure/cache/security-scan-cache.js.map +1 -1
  55. package/dist/infrastructure/completion/bash-completion.d.ts +2 -3
  56. package/dist/infrastructure/completion/bash-completion.d.ts.map +1 -1
  57. package/dist/infrastructure/completion/bash-completion.js +11 -87
  58. package/dist/infrastructure/completion/bash-completion.js.map +1 -1
  59. package/dist/infrastructure/completion/fish-completion.d.ts +2 -3
  60. package/dist/infrastructure/completion/fish-completion.d.ts.map +1 -1
  61. package/dist/infrastructure/completion/fish-completion.js +15 -58
  62. package/dist/infrastructure/completion/fish-completion.js.map +1 -1
  63. package/dist/infrastructure/completion/zsh-completion.d.ts +2 -3
  64. package/dist/infrastructure/completion/zsh-completion.d.ts.map +1 -1
  65. package/dist/infrastructure/completion/zsh-completion.js +18 -73
  66. package/dist/infrastructure/completion/zsh-completion.js.map +1 -1
  67. package/dist/infrastructure/config/config-manager.js +2 -2
  68. package/dist/infrastructure/config/config-manager.js.map +1 -1
  69. package/dist/infrastructure/context/conversation-context.d.ts +27 -31
  70. package/dist/infrastructure/context/conversation-context.d.ts.map +1 -1
  71. package/dist/infrastructure/context/conversation-context.js +94 -136
  72. package/dist/infrastructure/context/conversation-context.js.map +1 -1
  73. package/dist/infrastructure/context/session-manager.d.ts +27 -11
  74. package/dist/infrastructure/context/session-manager.d.ts.map +1 -1
  75. package/dist/infrastructure/context/session-manager.js +69 -73
  76. package/dist/infrastructure/context/session-manager.js.map +1 -1
  77. package/dist/infrastructure/providers/cohere-provider.d.ts.map +1 -1
  78. package/dist/infrastructure/providers/cohere-provider.js +102 -17
  79. package/dist/infrastructure/providers/cohere-provider.js.map +1 -1
  80. package/dist/infrastructure/providers/openrouter-provider.d.ts +42 -0
  81. package/dist/infrastructure/providers/openrouter-provider.d.ts.map +1 -0
  82. package/dist/infrastructure/providers/openrouter-provider.js +399 -0
  83. package/dist/infrastructure/providers/openrouter-provider.js.map +1 -0
  84. package/dist/infrastructure/serialization/toon-serializer.d.ts +45 -0
  85. package/dist/infrastructure/serialization/toon-serializer.d.ts.map +1 -0
  86. package/dist/infrastructure/serialization/toon-serializer.js +119 -0
  87. package/dist/infrastructure/serialization/toon-serializer.js.map +1 -0
  88. package/dist/infrastructure/storage/embeddings-path.d.ts +18 -0
  89. package/dist/infrastructure/storage/embeddings-path.d.ts.map +1 -0
  90. package/dist/infrastructure/storage/embeddings-path.js +37 -0
  91. package/dist/infrastructure/storage/embeddings-path.js.map +1 -0
  92. package/dist/infrastructure/storage/plan-repository.d.ts +2 -0
  93. package/dist/infrastructure/storage/plan-repository.d.ts.map +1 -1
  94. package/dist/infrastructure/storage/plan-repository.js +36 -73
  95. package/dist/infrastructure/storage/plan-repository.js.map +1 -1
  96. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts +10 -1
  97. package/dist/infrastructure/storage/sqlite-embedding-repository.d.ts.map +1 -1
  98. package/dist/infrastructure/storage/sqlite-embedding-repository.js +37 -3
  99. package/dist/infrastructure/storage/sqlite-embedding-repository.js.map +1 -1
  100. package/dist/infrastructure/storage/task-helpers.d.ts +11 -0
  101. package/dist/infrastructure/storage/task-helpers.d.ts.map +1 -1
  102. package/dist/infrastructure/storage/task-helpers.js +47 -7
  103. package/dist/infrastructure/storage/task-helpers.js.map +1 -1
  104. package/dist/infrastructure/storage/task-repository.d.ts.map +1 -1
  105. package/dist/infrastructure/storage/task-repository.js.map +1 -1
  106. package/dist/infrastructure/ux/capability-boundaries.d.ts +9 -37
  107. package/dist/infrastructure/ux/capability-boundaries.d.ts.map +1 -1
  108. package/dist/infrastructure/ux/capability-boundaries.js +23 -148
  109. package/dist/infrastructure/ux/capability-boundaries.js.map +1 -1
  110. package/dist/infrastructure/ux/comprehensive-formatter.d.ts +12 -54
  111. package/dist/infrastructure/ux/comprehensive-formatter.d.ts.map +1 -1
  112. package/dist/infrastructure/ux/comprehensive-formatter.js +87 -182
  113. package/dist/infrastructure/ux/comprehensive-formatter.js.map +1 -1
  114. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts +5 -18
  115. package/dist/infrastructure/ux/contextual-feature-discovery.d.ts.map +1 -1
  116. package/dist/infrastructure/ux/contextual-feature-discovery.js +5 -139
  117. package/dist/infrastructure/ux/contextual-feature-discovery.js.map +1 -1
  118. package/dist/infrastructure/ux/feature-discovery.d.ts +3 -33
  119. package/dist/infrastructure/ux/feature-discovery.d.ts.map +1 -1
  120. package/dist/infrastructure/ux/feature-discovery.js +5 -181
  121. package/dist/infrastructure/ux/feature-discovery.js.map +1 -1
  122. package/dist/infrastructure/ux/feedback-prompt.d.ts +15 -31
  123. package/dist/infrastructure/ux/feedback-prompt.d.ts.map +1 -1
  124. package/dist/infrastructure/ux/feedback-prompt.js +30 -166
  125. package/dist/infrastructure/ux/feedback-prompt.js.map +1 -1
  126. package/dist/infrastructure/ux/progress-indicator.d.ts +3 -5
  127. package/dist/infrastructure/ux/progress-indicator.d.ts.map +1 -1
  128. package/dist/infrastructure/ux/progress-indicator.js +34 -49
  129. package/dist/infrastructure/ux/progress-indicator.js.map +1 -1
  130. package/dist/infrastructure/ux/review-checkpoint.d.ts +3 -1
  131. package/dist/infrastructure/ux/review-checkpoint.d.ts.map +1 -1
  132. package/dist/infrastructure/ux/review-checkpoint.js +33 -80
  133. package/dist/infrastructure/ux/review-checkpoint.js.map +1 -1
  134. package/dist/infrastructure/ux/staged-feature-intro.d.ts +14 -39
  135. package/dist/infrastructure/ux/staged-feature-intro.d.ts.map +1 -1
  136. package/dist/infrastructure/ux/staged-feature-intro.js +12 -132
  137. package/dist/infrastructure/ux/staged-feature-intro.js.map +1 -1
  138. package/dist/infrastructure/ux/syntax-highlighter.d.ts +1 -2
  139. package/dist/infrastructure/ux/syntax-highlighter.d.ts.map +1 -1
  140. package/dist/infrastructure/ux/syntax-highlighter.js +67 -148
  141. package/dist/infrastructure/ux/syntax-highlighter.js.map +1 -1
  142. package/dist/infrastructure/validation/agent-feedback.d.ts +25 -89
  143. package/dist/infrastructure/validation/agent-feedback.d.ts.map +1 -1
  144. package/dist/infrastructure/validation/agent-feedback.js +32 -204
  145. package/dist/infrastructure/validation/agent-feedback.js.map +1 -1
  146. package/dist/infrastructure/validation/agent-validation-helper.d.ts +53 -53
  147. package/dist/infrastructure/validation/agent-validation-helper.d.ts.map +1 -1
  148. package/dist/infrastructure/validation/agent-validation-helper.js +110 -61
  149. package/dist/infrastructure/validation/agent-validation-helper.js.map +1 -1
  150. package/dist/infrastructure/validation/review-handler.d.ts +13 -41
  151. package/dist/infrastructure/validation/review-handler.d.ts.map +1 -1
  152. package/dist/infrastructure/validation/review-handler.js +23 -189
  153. package/dist/infrastructure/validation/review-handler.js.map +1 -1
  154. package/dist/infrastructure/validation/summary-aggregator.d.ts +25 -22
  155. package/dist/infrastructure/validation/summary-aggregator.d.ts.map +1 -1
  156. package/dist/infrastructure/validation/summary-aggregator.js +47 -133
  157. package/dist/infrastructure/validation/summary-aggregator.js.map +1 -1
  158. package/dist/infrastructure/validation/summary-extractor.d.ts +13 -48
  159. package/dist/infrastructure/validation/summary-extractor.d.ts.map +1 -1
  160. package/dist/infrastructure/validation/summary-extractor.js +32 -89
  161. package/dist/infrastructure/validation/summary-extractor.js.map +1 -1
  162. package/dist/infrastructure/validation/trace-summary.d.ts +30 -57
  163. package/dist/infrastructure/validation/trace-summary.d.ts.map +1 -1
  164. package/dist/infrastructure/validation/trace-summary.js +37 -356
  165. package/dist/infrastructure/validation/trace-summary.js.map +1 -1
  166. package/dist/monitoring.d.ts +1 -1
  167. package/dist/monitoring.d.ts.map +1 -1
  168. package/dist/monitoring.js +12 -9
  169. package/dist/monitoring.js.map +1 -1
  170. package/dist/parallel-processor.d.ts.map +1 -1
  171. package/dist/parallel-processor.js +124 -45
  172. package/dist/parallel-processor.js.map +1 -1
  173. package/dist/presentation/cli/commands/ask-command.d.ts.map +1 -1
  174. package/dist/presentation/cli/commands/ask-command.js +185 -128
  175. package/dist/presentation/cli/commands/ask-command.js.map +1 -1
  176. package/dist/presentation/cli/commands/config-command.d.ts.map +1 -1
  177. package/dist/presentation/cli/commands/config-command.js +8 -6
  178. package/dist/presentation/cli/commands/config-command.js.map +1 -1
  179. package/dist/presentation/cli/commands/docs-command.d.ts +3 -1
  180. package/dist/presentation/cli/commands/docs-command.d.ts.map +1 -1
  181. package/dist/presentation/cli/commands/docs-command.js +13 -184
  182. package/dist/presentation/cli/commands/docs-command.js.map +1 -1
  183. package/dist/presentation/cli/commands/fix-command.d.ts +2 -0
  184. package/dist/presentation/cli/commands/fix-command.d.ts.map +1 -1
  185. package/dist/presentation/cli/commands/fix-command.js +25 -281
  186. package/dist/presentation/cli/commands/fix-command.js.map +1 -1
  187. package/dist/presentation/cli/commands/models-command.d.ts +13 -0
  188. package/dist/presentation/cli/commands/models-command.d.ts.map +1 -0
  189. package/dist/presentation/cli/commands/models-command.js +194 -0
  190. package/dist/presentation/cli/commands/models-command.js.map +1 -0
  191. package/dist/presentation/cli/commands/orchestrate-command.d.ts.map +1 -1
  192. package/dist/presentation/cli/commands/orchestrate-command.js +15 -7
  193. package/dist/presentation/cli/commands/orchestrate-command.js.map +1 -1
  194. package/dist/presentation/cli/commands/plan-command.d.ts.map +1 -1
  195. package/dist/presentation/cli/commands/plan-command.js +9 -6
  196. package/dist/presentation/cli/commands/plan-command.js.map +1 -1
  197. package/dist/presentation/cli/commands/product-command.d.ts +6 -4
  198. package/dist/presentation/cli/commands/product-command.d.ts.map +1 -1
  199. package/dist/presentation/cli/commands/product-command.js +12 -178
  200. package/dist/presentation/cli/commands/product-command.js.map +1 -1
  201. package/dist/presentation/cli/commands/review-command.d.ts +7 -7
  202. package/dist/presentation/cli/commands/review-command.d.ts.map +1 -1
  203. package/dist/presentation/cli/commands/review-command.js +148 -16
  204. package/dist/presentation/cli/commands/review-command.js.map +1 -1
  205. package/dist/presentation/cli/commands/run-command.d.ts +6 -8
  206. package/dist/presentation/cli/commands/run-command.d.ts.map +1 -1
  207. package/dist/presentation/cli/commands/run-command.js +182 -23
  208. package/dist/presentation/cli/commands/run-command.js.map +1 -1
  209. package/dist/presentation/cli/commands/setup-command.d.ts.map +1 -1
  210. package/dist/presentation/cli/commands/setup-command.js +15 -0
  211. package/dist/presentation/cli/commands/setup-command.js.map +1 -1
  212. package/dist/presentation/cli/commands/smart-command.js +1 -1
  213. package/dist/presentation/cli/commands/smart-command.js.map +1 -1
  214. package/dist/presentation/cli/commands/status-command.d.ts +3 -0
  215. package/dist/presentation/cli/commands/status-command.d.ts.map +1 -1
  216. package/dist/presentation/cli/commands/status-command.js +147 -156
  217. package/dist/presentation/cli/commands/status-command.js.map +1 -1
  218. package/dist/presentation/cli/commands/suggest-command.d.ts +3 -5
  219. package/dist/presentation/cli/commands/suggest-command.d.ts.map +1 -1
  220. package/dist/presentation/cli/commands/suggest-command.js +132 -19
  221. package/dist/presentation/cli/commands/suggest-command.js.map +1 -1
  222. package/dist/search.d.ts.map +1 -1
  223. package/dist/search.js +6 -1
  224. package/dist/search.js.map +1 -1
  225. package/dist/session.js +1 -1
  226. package/dist/session.js.map +1 -1
  227. package/dist/ui.d.ts +6 -0
  228. package/dist/ui.d.ts.map +1 -1
  229. package/dist/ui.js +35 -1
  230. package/dist/ui.js.map +1 -1
  231. package/package.json +8 -3
@@ -2,35 +2,31 @@
2
2
  * Progress Indicator Utilities
3
3
  * Provides progress indicators for long-running operations
4
4
  *
5
- * Features:
6
- * - Progress bars for operations with known total
7
- * - Spinners for operations with unknown duration
8
- * - Context-aware progress messages
5
+ * Phase 1: v0.5.0-alpha.0
9
6
  */
10
- import { createSpinner, createProgressBar, colors } from '../../ui.js';
7
+ import { createSpinner } from '../../ui.js';
11
8
  export class ProgressIndicator {
12
9
  spinner = null;
13
- progressBar = null;
10
+ progressBar = '';
14
11
  operationStartTime = 0;
15
12
  currentValue = 0;
13
+ total = 0;
14
+ message = '';
16
15
  /**
17
16
  * Start progress indicator
18
17
  */
19
18
  start(options = {}) {
20
19
  this.operationStartTime = Date.now();
21
20
  this.currentValue = 0;
22
- if (options.total && options.total > 0) {
23
- // Use progress bar for operations with known total
24
- const format = options.message
25
- ? `${colors.dim(options.message)} |{bar}| ${colors.cyan('{percentage}%')} | {value}/{total}`
26
- : undefined;
27
- this.progressBar = createProgressBar(options.total, format);
28
- this.progressBar.start(options.total, 0);
21
+ this.total = options.total || 0;
22
+ this.message = options.message || 'Processing...';
23
+ if (this.total > 0) {
24
+ // Progress bar mode
25
+ this.update(0, this.message);
29
26
  }
30
27
  else {
31
- // Use spinner for operations with unknown duration
32
- const message = options.message || 'Processing...';
33
- this.spinner = createSpinner(message);
28
+ // Spinner mode
29
+ this.spinner = createSpinner(this.message);
34
30
  this.spinner.start();
35
31
  }
36
32
  }
@@ -39,16 +35,20 @@ export class ProgressIndicator {
39
35
  */
40
36
  update(value, message) {
41
37
  this.currentValue = value;
42
- if (this.progressBar) {
43
- this.progressBar.update(value);
44
- if (message) {
45
- // Update progress bar format with new message
46
- // Note: cli-progress doesn't support dynamic message updates easily
47
- // So we'll just update the value
48
- }
38
+ if (message) {
39
+ this.message = message;
49
40
  }
50
- else if (this.spinner && message) {
51
- this.spinner.text = colors.dim(message);
41
+ if (this.total > 0) {
42
+ // Progress bar
43
+ const percentage = Math.min(100, Math.floor((value / this.total) * 100));
44
+ const barLength = 20;
45
+ const filled = Math.floor((percentage / 100) * barLength);
46
+ const bar = '█'.repeat(filled) + '░'.repeat(barLength - filled);
47
+ process.stdout.write(`\r${this.message} [${bar}] ${percentage}% (${value}/${this.total})`);
48
+ }
49
+ else if (this.spinner) {
50
+ // Spinner
51
+ this.spinner.text = this.message;
52
52
  }
53
53
  }
54
54
  /**
@@ -59,33 +59,18 @@ export class ProgressIndicator {
59
59
  }
60
60
  /**
61
61
  * Stop progress indicator with smooth transition
62
- * DELIGHTFUL UX: Smooth completion with visual feedback
63
62
  */
64
63
  stop(success = true, finalMessage) {
65
- const duration = ((Date.now() - this.operationStartTime) / 1000).toFixed(2);
66
- if (this.progressBar) {
67
- // Smooth completion - ensure bar reaches 100%
68
- if (this.progressBar.getTotal() && this.currentValue < this.progressBar.getTotal()) {
69
- this.progressBar.update(this.progressBar.getTotal());
70
- }
71
- this.progressBar.stop();
72
- this.progressBar = null;
73
- if (finalMessage) {
74
- // Color-coded success message
75
- const messageColor = success ? colors.green : colors.red;
76
- console.log(messageColor(` ${finalMessage} (${duration}s)`));
77
- }
78
- }
79
- else if (this.spinner) {
80
- // Smooth spinner stop with success indicator
64
+ if (this.spinner) {
81
65
  this.spinner.stop();
82
66
  this.spinner = null;
83
- if (finalMessage) {
84
- const icon = success ? colors.green('✓') : colors.red('✗');
85
- // Enhanced formatting with color
86
- const messageColor = success ? colors.green : colors.red;
87
- console.log(`${icon} ${messageColor(finalMessage)} ${colors.dim(`(${duration}s)`)}`);
88
- }
67
+ }
68
+ else if (this.total > 0) {
69
+ // Clear progress bar
70
+ process.stdout.write('\r' + ' '.repeat(80) + '\r');
71
+ }
72
+ if (finalMessage) {
73
+ console.log(finalMessage);
89
74
  }
90
75
  }
91
76
  /**
@@ -102,7 +87,7 @@ export function createEmbeddingSearchProgress(total) {
102
87
  const indicator = new ProgressIndicator();
103
88
  indicator.start({
104
89
  total,
105
- message: 'Searching codebase',
90
+ message: 'Searching embeddings',
106
91
  showPercentage: true,
107
92
  showCount: true,
108
93
  });
@@ -1 +1 @@
1
- {"version":3,"file":"progress-indicator.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWvE,MAAM,OAAO,iBAAiB;IACpB,OAAO,GAAe,IAAI,CAAC;IAC3B,WAAW,GAAiC,IAAI,CAAC;IACjD,kBAAkB,GAAW,CAAC,CAAC;IAC/B,YAAY,GAAW,CAAC,CAAC;IAEjC;;OAEG;IACH,KAAK,CAAC,UAA2B,EAAE;QACjC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QAEtB,IAAI,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC;YACvC,mDAAmD;YACnD,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO;gBAC5B,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,oBAAoB;gBAC5F,CAAC,CAAC,SAAS,CAAC;YACd,IAAI,CAAC,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;YAC5D,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO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,CAAC;CACF;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAAC,KAAa;IACzD,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,KAAK;QACL,OAAO,EAAE,oBAAoB;QAC7B,cAAc,EAAE,IAAI;QACpB,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,4BAA4B;IAC1C,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,OAAO,EAAE,iBAAiB;KAC3B,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,OAAO,EAAE,uBAAuB;KACjC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC"}
1
+ {"version":3,"file":"progress-indicator.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAS5C,MAAM,OAAO,iBAAiB;IACpB,OAAO,GAA4C,IAAI,CAAC;IACxD,WAAW,GAAW,EAAE,CAAC;IACzB,kBAAkB,GAAW,CAAC,CAAC;IAC/B,YAAY,GAAW,CAAC,CAAC;IACzB,KAAK,GAAW,CAAC,CAAC;IAClB,OAAO,GAAW,EAAE,CAAC;IAE7B;;OAEG;IACH,KAAK,CAAC,UAA2B,EAAE;QACjC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,KAAK,GAAG,OAAO,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IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,OAAO,EAAE,iBAAiB;KAC3B,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B;IAC3C,MAAM,SAAS,GAAG,IAAI,iBAAiB,EAAE,CAAC;IAC1C,SAAS,CAAC,KAAK,CAAC;QACd,OAAO,EAAE,uBAAuB;KACjC,CAAC,CAAC;IACH,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * Review Checkpoint UI
3
- * Shows summary before applying edits - Task 5.1
3
+ * Shows summary before applying edits
4
+ *
5
+ * Phase 1: v0.5.0-alpha.0
4
6
  */
5
7
  export interface EditSummary {
6
8
  filepath: string;
@@ -1 +1 @@
1
- {"version":3,"file":"review-checkpoint.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/review-checkpoint.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CAyExE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,GACjB;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAwCpE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAc9D"}
1
+ {"version":3,"file":"review-checkpoint.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/review-checkpoint.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,kBAAkB,EAAE,OAAO,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,CAAC;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,oBAAoB,GAAG,IAAI,CA8BxE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB,CA4BA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAE9D"}
@@ -1,66 +1,37 @@
1
1
  /**
2
2
  * Review Checkpoint UI
3
- * Shows summary before applying edits - Task 5.1
3
+ * Shows summary before applying edits
4
+ *
5
+ * Phase 1: v0.5.0-alpha.0
4
6
  */
5
- import { colors, separator, newline, success, warning, error, createTable, } from '../../ui.js';
7
+ import { colors, separator } from '../../ui.js';
6
8
  /**
7
9
  * Display review checkpoint before applying edits
8
10
  */
9
11
  export function displayReviewCheckpoint(info) {
10
- newline();
12
+ console.log('\n' + separator('═', 80));
13
+ console.log(colors.bold('📋 Review Checkpoint'));
11
14
  console.log(separator('═', 80));
12
- console.log(colors.bold('📝 Review Changes'));
13
- console.log(separator('═', 80));
14
- newline();
15
15
  // Files summary
16
- console.log(colors.bold(`Files to modify: ${info.filesToModify.length}`));
17
- newline();
18
- // File details table
19
- const fileRows = info.filesToModify.map(file => [
20
- file.filepath,
21
- `${file.linesAdded} added, ${file.linesRemoved} removed`,
22
- file.linesChanged > 0 ? `${file.linesChanged} changed` : '-',
23
- ]);
24
- const fileTable = createTable(['File', 'Changes', 'Modified Lines'], fileRows);
25
- console.log(fileTable.toString());
26
- newline();
27
- // Status indicators
28
- console.log(colors.bold('Status:'));
29
- const statusRows = [
30
- [
31
- 'Security Scan',
32
- info.securityScanPassed ? success('✓ Passed') : error('✗ Failed'),
33
- ],
34
- [
35
- 'Compilation',
36
- info.compilationValid ? success('✓ Valid') : error('✗ Invalid'),
37
- ],
38
- ];
39
- const statusTable = createTable(['Check', 'Status'], statusRows);
40
- console.log(statusTable.toString());
41
- newline();
42
- // Risk level indicator
43
- const riskColors = {
44
- low: colors.green,
45
- medium: colors.yellow,
46
- high: colors.yellow,
47
- critical: colors.red,
48
- };
49
- const riskLabels = {
50
- low: 'Low Risk',
51
- medium: 'Medium Risk',
52
- high: 'High Risk',
53
- critical: 'Critical Risk',
54
- };
55
- console.log(colors.bold('Risk Level: ') +
56
- riskColors[info.riskLevel](riskLabels[info.riskLevel]));
57
- if (info.uncertainty && info.uncertainty > 0.5) {
58
- const percent = (info.uncertainty * 100).toFixed(0);
59
- console.log(warning(`⚠️ Uncertainty: ${percent}% - Please verify output carefully`));
16
+ console.log(`\n${colors.bold('Files to modify:')} ${info.filesToModify.length}`);
17
+ info.filesToModify.forEach((file, idx) => {
18
+ console.log(` ${idx + 1}. ${file.filepath}`);
19
+ console.log(` +${file.linesAdded} -${file.linesRemoved} ~${file.linesChanged}`);
20
+ });
21
+ // Validation status
22
+ console.log(`\n${colors.bold('Validation:')}`);
23
+ console.log(` Security scan: ${info.securityScanPassed ? colors.green('✓ Passed') : colors.red('✗ Failed')}`);
24
+ console.log(` Compilation: ${info.compilationValid ? colors.green(' Valid') : colors.red(' Invalid')}`);
25
+ // Risk level
26
+ const riskColor = info.riskLevel === 'low' ? colors.green :
27
+ info.riskLevel === 'medium' ? colors.yellow :
28
+ info.riskLevel === 'high' ? colors.red :
29
+ colors.red;
30
+ console.log(` Risk level: ${riskColor(info.riskLevel.toUpperCase())}`);
31
+ if (info.uncertainty !== undefined) {
32
+ console.log(` Uncertainty: ${(info.uncertainty * 100).toFixed(1)}%`);
60
33
  }
61
- newline();
62
- console.log(separator('═', 80));
63
- newline();
34
+ console.log(separator('═', 80) + '\n');
64
35
  }
65
36
  /**
66
37
  * Calculate diff summary from old and new content
@@ -71,26 +42,18 @@ export function calculateDiffSummary(oldContent, newContent) {
71
42
  let linesAdded = 0;
72
43
  let linesRemoved = 0;
73
44
  let linesChanged = 0;
74
- // Simple line-based diff calculation
75
- const oldSet = new Set(oldLines);
76
- const newSet = new Set(newLines);
77
- // Count added lines (in new but not in old)
78
- for (const line of newLines) {
79
- if (!oldSet.has(line)) {
45
+ // Simple line-by-line comparison
46
+ const maxLen = Math.max(oldLines.length, newLines.length);
47
+ for (let i = 0; i < maxLen; i++) {
48
+ const oldLine = oldLines[i];
49
+ const newLine = newLines[i];
50
+ if (oldLine === undefined) {
80
51
  linesAdded++;
81
52
  }
82
- }
83
- // Count removed lines (in old but not in new)
84
- for (const line of oldLines) {
85
- if (!newSet.has(line)) {
53
+ else if (newLine === undefined) {
86
54
  linesRemoved++;
87
55
  }
88
- }
89
- // Changed lines = lines that exist in both but at different positions
90
- // Simplified: count lines that are in both but position differs
91
- const minLength = Math.min(oldLines.length, newLines.length);
92
- for (let i = 0; i < minLength; i++) {
93
- if (oldLines[i] !== newLines[i] && oldSet.has(newLines[i])) {
56
+ else if (oldLine !== newLine) {
94
57
  linesChanged++;
95
58
  }
96
59
  }
@@ -104,16 +67,6 @@ export function calculateDiffSummary(oldContent, newContent) {
104
67
  * Format edit summary for display
105
68
  */
106
69
  export function formatEditSummary(summary) {
107
- const changes = [];
108
- if (summary.linesAdded > 0) {
109
- changes.push(`${summary.linesAdded} added`);
110
- }
111
- if (summary.linesRemoved > 0) {
112
- changes.push(`${summary.linesRemoved} removed`);
113
- }
114
- if (summary.linesChanged > 0) {
115
- changes.push(`${summary.linesChanged} changed`);
116
- }
117
- return changes.length > 0 ? changes.join(', ') : 'No changes';
70
+ return `${summary.filepath}: +${summary.linesAdded} -${summary.linesRemoved} ~${summary.linesChanged}`;
118
71
  }
119
72
  //# sourceMappingURL=review-checkpoint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"review-checkpoint.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/review-checkpoint.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,MAAM,EACN,SAAS,EACT,OAAO,EAEP,OAAO,EACP,OAAO,EACP,KAAK,EAEL,WAAW,GACZ,MAAM,aAAa,CAAC;AAkBrB;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA0B;IAChE,OAAO,EAAE,CAAC;IACV,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;IAChC,OAAO,EAAE,CAAC;IAEV,gBAAgB;IAChB,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,oBAAoB,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE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kB;IAKzE,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAExC,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,YAAY,GAAG,CAAC,CAAC;IACrB,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,iCAAiC;IACjC,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAChC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAE5B,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YAC1B,UAAU,EAAE,CAAC;QACf,CAAC;aAAM,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACjC,YAAY,EAAE,CAAC;QACjB,CAAC;aAAM,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;YAC/B,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAED,OAAO;QACL,UAAU;QACV,YAAY;QACZ,YAAY;KACb,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAoB;IACpD,OAAO,GAAG,OAAO,CAAC,QAAQ,MAAM,OAAO,CAAC,UAAU,KAAK,OAAO,CAAC,YAAY,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC;AACzG,CAAC"}
@@ -1,47 +1,22 @@
1
1
  /**
2
- * Infrastructure: Staged Feature Introduction
2
+ * Staged Feature Introduction
3
+ * Checks feature access and displays availability
3
4
  *
4
- * UI utilities for Progressive Disclosure integration in CLI commands
5
- * Task 2.3: Show feature levels and gate features based on user experience
5
+ * Phase 1: v0.5.0-alpha.0
6
6
  */
7
- import { ProgressiveDisclosure, type UserLevel, type FeatureCapability } from './progressive-disclosure.js';
8
- /**
9
- * Display feature level indicator
10
- */
11
- export declare function displayFeatureLevel(capability: FeatureCapability): string;
12
- /**
13
- * Display user level indicator
14
- */
15
- export declare function displayUserLevel(level: UserLevel): string;
16
- /**
17
- * Display feature gating message when feature is not available
18
- */
19
- export declare function displayFeatureGatingMessage(featureId: string, featureName: string, reason: string, suggestedLevel?: UserLevel, currentLevel?: UserLevel): void;
20
- /**
21
- * Display feature availability message
22
- */
23
- export declare function displayFeatureAvailability(featureName: string, capability: FeatureCapability, userLevel: UserLevel): void;
24
- /**
25
- * Display upgrade notification when user levels up
26
- */
27
- export declare function displayLevelUpNotification(oldLevel: UserLevel, newLevel: UserLevel, newFeatures: Array<{
28
- name: string;
29
- capability: FeatureCapability;
30
- }>): void;
7
+ import type { ProgressiveDisclosure } from './progressive-disclosure.js';
8
+ export interface FeatureAvailability {
9
+ available: boolean;
10
+ message?: string;
11
+ upgradePath?: string;
12
+ shouldContinue?: boolean;
13
+ }
31
14
  /**
32
- * Check if feature is available and show appropriate message
15
+ * Check feature access
33
16
  */
34
- export declare function checkFeatureAccess(progressiveDisclosure: ProgressiveDisclosure, userId: string, featureId: string): {
35
- available: boolean;
36
- shouldContinue: boolean;
37
- };
17
+ export declare function checkFeatureAccess(progressiveDisclosure: ProgressiveDisclosure, userId: string, feature: string): FeatureAvailability;
38
18
  /**
39
- * Get features summary for user
19
+ * Display feature availability
40
20
  */
41
- export declare function getFeaturesSummary(progressiveDisclosure: ProgressiveDisclosure, userId: string): {
42
- userLevel: UserLevel;
43
- totalFeatures: number;
44
- availableFeatures: number;
45
- nextLevelFeatures: number;
46
- };
21
+ export declare function displayFeatureAvailability(featureName: string, capability: string, userLevel?: string): void;
47
22
  //# sourceMappingURL=staged-feature-intro.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"staged-feature-intro.d.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1B,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAuBA"}
1
+ {"version":3,"file":"staged-feature-intro.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/staged-feature-intro.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,qBAAqB,EAC5C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,GACd,mBAAmB,CAMrB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,MAAM,EACnB,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAGN"}
@@ -1,144 +1,24 @@
1
1
  /**
2
- * Infrastructure: Staged Feature Introduction
2
+ * Staged Feature Introduction
3
+ * Checks feature access and displays availability
3
4
  *
4
- * UI utilities for Progressive Disclosure integration in CLI commands
5
- * Task 2.3: Show feature levels and gate features based on user experience
5
+ * Phase 1: v0.5.0-alpha.0
6
6
  */
7
- import { colors, separator } from '../../ui.js';
8
7
  /**
9
- * Display feature level indicator
8
+ * Check feature access
10
9
  */
11
- export function displayFeatureLevel(capability) {
12
- const levelColors = {
13
- basic: colors.green,
14
- standard: colors.blue,
15
- advanced: colors.yellow,
16
- experimental: colors.magenta,
17
- };
18
- const levelLabels = {
19
- basic: 'Basic',
20
- standard: 'Standard',
21
- advanced: 'Advanced',
22
- experimental: 'Experimental',
23
- };
24
- const colorFn = levelColors[capability] || colors.gray;
25
- const label = levelLabels[capability] || capability;
26
- return colorFn(`[${label}]`);
27
- }
28
- /**
29
- * Display user level indicator
30
- */
31
- export function displayUserLevel(level) {
32
- const levelColors = {
33
- beginner: colors.cyan,
34
- intermediate: colors.blue,
35
- advanced: colors.yellow,
36
- expert: colors.magenta,
10
+ export function checkFeatureAccess(progressiveDisclosure, userId, feature) {
11
+ // In alpha, all features are available
12
+ return {
13
+ available: true,
14
+ shouldContinue: true,
37
15
  };
38
- const colorFn = levelColors[level] || colors.gray;
39
- return colorFn(level.charAt(0).toUpperCase() + level.slice(1));
40
16
  }
41
17
  /**
42
- * Display feature gating message when feature is not available
43
- */
44
- export function displayFeatureGatingMessage(featureId, featureName, reason, suggestedLevel, currentLevel) {
45
- console.log('');
46
- console.log(separator('═', 80));
47
- console.log(colors.yellow(`⚠️ Feature Unavailable: ${featureName}`));
48
- console.log(separator('═', 80));
49
- console.log('');
50
- console.log(colors.dim(`Reason: ${reason}`));
51
- if (suggestedLevel && currentLevel) {
52
- console.log('');
53
- console.log(colors.bold('Upgrade Path:'));
54
- console.log(` Current Level: ${displayUserLevel(currentLevel)}`);
55
- console.log(` Required Level: ${displayUserLevel(suggestedLevel)}`);
56
- console.log('');
57
- console.log(colors.dim('Keep using Codehere to unlock more features!'));
58
- console.log(colors.dim(` • Use basic features to progress to intermediate`));
59
- console.log(colors.dim(` • Explore new capabilities to advance your level`));
60
- }
61
- console.log('');
62
- console.log(separator('═', 80));
63
- console.log('');
64
- }
65
- /**
66
- * Display feature availability message
18
+ * Display feature availability
67
19
  */
68
20
  export function displayFeatureAvailability(featureName, capability, userLevel) {
69
- const levelBadge = displayFeatureLevel(capability);
70
- const userBadge = displayUserLevel(userLevel);
71
- // Only show for non-basic features to reduce noise
72
- if (capability !== 'basic') {
73
- console.log(colors.dim(`${levelBadge} Feature: ${featureName} (${userBadge} level)`));
74
- }
75
- }
76
- /**
77
- * Display upgrade notification when user levels up
78
- */
79
- export function displayLevelUpNotification(oldLevel, newLevel, newFeatures) {
80
- console.log('');
81
- console.log(separator('═', 80));
82
- console.log(colors.green(`🎉 Level Up! You're now ${displayUserLevel(newLevel)}`));
83
- console.log(separator('═', 80));
84
- console.log('');
85
- if (newFeatures.length > 0) {
86
- console.log(colors.bold('New Features Unlocked:'));
87
- console.log('');
88
- newFeatures.forEach(feature => {
89
- const badge = displayFeatureLevel(feature.capability);
90
- console.log(` ${badge} ${feature.name}`);
91
- });
92
- console.log('');
93
- }
94
- console.log(colors.dim('Keep exploring to unlock even more advanced capabilities!'));
95
- console.log('');
96
- console.log(separator('═', 80));
97
- console.log('');
98
- }
99
- /**
100
- * Check if feature is available and show appropriate message
101
- */
102
- export function checkFeatureAccess(progressiveDisclosure, userId, featureId) {
103
- const check = progressiveDisclosure.shouldShowFeature(userId, featureId);
104
- if (!check.show) {
105
- const profile = progressiveDisclosure.getUserProfile(userId);
106
- // Get feature from available features to find name
107
- const availableFeatures = progressiveDisclosure.getAvailableFeatures(userId);
108
- const allFeatures = [...availableFeatures];
109
- const unavailableFeatures = progressiveDisclosure.getNextSuggestedFeatures(userId, 100);
110
- const feature = [...allFeatures, ...unavailableFeatures].find(f => f.featureId === featureId);
111
- if (feature) {
112
- displayFeatureGatingMessage(featureId, feature.featureName, check.reason || 'Feature not available', check.suggestedLevel, profile.level);
113
- }
114
- else {
115
- // Fallback if feature not found
116
- displayFeatureGatingMessage(featureId, featureId.replace(/-/g, ' ').replace(/\b\w/g, l => l.toUpperCase()), check.reason || 'Feature not available', check.suggestedLevel, profile.level);
117
- }
118
- return { available: false, shouldContinue: false };
119
- }
120
- return { available: true, shouldContinue: true };
121
- }
122
- /**
123
- * Get features summary for user
124
- */
125
- export function getFeaturesSummary(progressiveDisclosure, userId) {
126
- const profile = progressiveDisclosure.getUserProfile(userId);
127
- const available = progressiveDisclosure.getAvailableFeatures(userId);
128
- const allFeatures = Array.from(progressiveDisclosure.featureRegistry?.values() || []);
129
- // Count features for next level
130
- const levelOrder = ['beginner', 'intermediate', 'advanced', 'expert'];
131
- const currentIndex = levelOrder.indexOf(profile.level);
132
- const nextLevel = currentIndex < levelOrder.length - 1 ? levelOrder[currentIndex + 1] : null;
133
- let nextLevelFeatures = 0;
134
- if (nextLevel) {
135
- nextLevelFeatures = allFeatures.filter((f) => f.requiredLevel === nextLevel).length;
136
- }
137
- return {
138
- userLevel: profile.level,
139
- totalFeatures: allFeatures.length,
140
- availableFeatures: available.length,
141
- nextLevelFeatures,
142
- };
21
+ // In alpha, no-op
22
+ // Can be enhanced later to show feature introductions
143
23
  }
144
24
  //# sourceMappingURL=staged-feature-intro.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"staged-feature-intro.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/staged-feature-intro.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,MAAM,EAAE,SAAS,EAAa,MAAM,aAAa,CAAC;AAG3D;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAA6B;IAC/D,MAAM,WAAW,GAAwD;QACvE,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,QAAQ,EAAE,MAAM,CAAC,IAAI;QACrB,QAAQ,EAAE,MAAM,CAAC,MAAM;QACvB,YAAY,EAAE,MAAM,CAAC,OAAO;KAC7B,CAAC;IAEF,MAAM,WAAW,GAAsC;QACrD,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,YAAY,EAAE,cAAc;KAC7B,CAAC;IAEF,MAAM,OAAO,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC;IACvD,MAAM,KAAK,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;IAEpD,OAAO,OAAO,CAAC,IAAI,KAAK,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAgB;IAC/C,MAAM,WAAW,GAAgD;QAC/D,QAAQ,EAAE,MAAM,CAAC,IAAI;QACrB,YAAY,EAAE,MAAM,CAAC,IAAI;QACzB,QAAQ,E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c,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;IACnF,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACvD,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAE7F,IAAI,iBAAiB,GAAG,CAAC,CAAC;IAC1B,IAAI,SAAS,EAAE,CAAC;QACd,iBAAiB,GAAG,WAAW,CAAC,MAAM,CACpC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,aAAa,KAAK,SAAS,CAC1C,CAAC,MAAM,CAAC;IACX,CAAC;IAED,OAAO;QACL,SAAS,EAAE,OAAO,CAAC,KAAK;QACxB,aAAa,EAAE,WAAW,CAAC,MAAM;QACjC,iBAAiB,EAAE,SAAS,CAAC,MAAM;QACnC,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"staged-feature-intro.js","sourceRoot":"","sources":["../../../src/infrastructure/ux/staged-feature-intro.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAChC,qBAA4C,EAC5C,MAAc,EACd,OAAe;IAEf,uCAAuC;IACvC,OAAO;QACL,SAAS,EAAE,IAAI;QACf,cAAc,EAAE,IAAI;KACrB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,0BAA0B,CACxC,WAAmB,EACnB,UAAkB,EAClB,SAAkB;IAElB,kBAAkB;IAClB,sDAAsD;AACxD,CAAC"}
@@ -2,8 +2,7 @@
2
2
  * Syntax Highlighter for Terminal
3
3
  * Provides basic syntax highlighting for code snippets using chalk
4
4
  *
5
- * Lightweight implementation - no heavy dependencies
6
- * Supports: TypeScript, JavaScript, Python, JSON, YAML, Markdown, Shell
5
+ * Phase 1: v0.5.0-alpha.0
7
6
  */
8
7
  export type SupportedLanguage = 'typescript' | 'javascript' | 'python' | 'json' | 'yaml' | 'markdown' | 'shell' | 'bash' | 'text';
9
8
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"syntax-highlighter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/syntax-highlighter.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,MAAM,iBAAiB,GACzB,YAAY,GACZ,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,MAAM,GACN,UAAU,GACV,OAAO,GACP,MAAM,GACN,MAAM,CAAC;AAEX;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAoBlE;AAsKD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAsCzF;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,QAAQ,CAAC,EAAE,MAAM,EACjB,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,CAyBR"}
1
+ {"version":3,"file":"syntax-highlighter.d.ts","sourceRoot":"","sources":["../../../src/infrastructure/ux/syntax-highlighter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAElI;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAyBlE;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,iBAAiB,GAAG,MAAM,GAAG,MAAM,CA6CzF;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAKvG"}