vibecodingmachine-cli 2026.2.26-1739 → 2026.3.9-1621

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 (74) hide show
  1. package/bin/auth/auth-compliance.js +7 -1
  2. package/bin/commands/agent-commands.js +150 -228
  3. package/bin/commands/command-aliases.js +68 -0
  4. package/bin/vibecodingmachine.js +1 -2
  5. package/package.json +2 -2
  6. package/src/commands/agents/list.js +71 -115
  7. package/src/commands/agents-check.js +16 -4
  8. package/src/commands/analyze-file-sizes.js +1 -1
  9. package/src/commands/auto-direct/auto-provider-manager.js +290 -0
  10. package/src/commands/auto-direct/auto-status-display.js +331 -0
  11. package/src/commands/auto-direct/auto-utils.js +439 -0
  12. package/src/commands/auto-direct/file-operations.js +110 -0
  13. package/src/commands/auto-direct/provider-config.js +1 -1
  14. package/src/commands/auto-direct/provider-manager.js +1 -1
  15. package/src/commands/auto-direct/status-display.js +1 -1
  16. package/src/commands/auto-direct/utils.js +24 -18
  17. package/src/commands/auto-direct-refactored.js +413 -0
  18. package/src/commands/auto-direct.js +594 -188
  19. package/src/commands/requirements/commands.js +353 -0
  20. package/src/commands/requirements/default-handlers.js +272 -0
  21. package/src/commands/requirements/disable.js +97 -0
  22. package/src/commands/requirements/enable.js +97 -0
  23. package/src/commands/requirements/utils.js +194 -0
  24. package/src/commands/requirements-refactored.js +60 -0
  25. package/src/commands/requirements.js +38 -771
  26. package/src/commands/specs/disable.js +96 -0
  27. package/src/commands/specs/enable.js +96 -0
  28. package/src/trui/TruiInterface.js +5 -11
  29. package/src/trui/agents/AgentInterface.js +24 -396
  30. package/src/trui/agents/handlers/CommandHandler.js +93 -0
  31. package/src/trui/agents/handlers/ContextManager.js +117 -0
  32. package/src/trui/agents/handlers/DisplayHandler.js +243 -0
  33. package/src/trui/agents/handlers/HelpHandler.js +51 -0
  34. package/src/utils/auth.js +13 -111
  35. package/src/utils/config.js +5 -1
  36. package/src/utils/interactive/requirements-navigation.js +17 -15
  37. package/src/utils/interactive-broken.js +2 -2
  38. package/src/utils/provider-checker/agent-runner.js +15 -1
  39. package/src/utils/provider-checker/cli-installer.js +149 -7
  40. package/src/utils/provider-checker/opencode-checker.js +588 -0
  41. package/src/utils/provider-checker/provider-validator.js +88 -3
  42. package/src/utils/provider-checker/time-formatter.js +3 -2
  43. package/src/utils/provider-manager.js +28 -20
  44. package/src/utils/provider-registry.js +35 -3
  45. package/src/utils/requirements-navigator/index.js +94 -0
  46. package/src/utils/requirements-navigator/input-handler.js +217 -0
  47. package/src/utils/requirements-navigator/section-loader.js +188 -0
  48. package/src/utils/requirements-navigator/tree-builder.js +105 -0
  49. package/src/utils/requirements-navigator/tree-renderer.js +50 -0
  50. package/src/utils/requirements-navigator.js +2 -583
  51. package/src/utils/trui-clarifications.js +188 -0
  52. package/src/utils/trui-feedback.js +54 -1
  53. package/src/utils/trui-kiro-integration.js +398 -0
  54. package/src/utils/trui-main-handlers.js +194 -0
  55. package/src/utils/trui-main-menu.js +235 -0
  56. package/src/utils/trui-nav-agents.js +178 -25
  57. package/src/utils/trui-nav-requirements.js +203 -27
  58. package/src/utils/trui-nav-settings.js +114 -1
  59. package/src/utils/trui-nav-specifications.js +44 -3
  60. package/src/utils/trui-navigation-backup.js +603 -0
  61. package/src/utils/trui-navigation.js +70 -228
  62. package/src/utils/trui-provider-health.js +274 -0
  63. package/src/utils/trui-provider-manager.js +376 -0
  64. package/src/utils/trui-quick-menu.js +25 -1
  65. package/src/utils/trui-req-actions-backup.js +507 -0
  66. package/src/utils/trui-req-actions.js +148 -216
  67. package/src/utils/trui-req-editor.js +170 -0
  68. package/src/utils/trui-req-file-ops.js +278 -0
  69. package/src/utils/trui-req-tree-old.js +719 -0
  70. package/src/utils/trui-req-tree.js +348 -627
  71. package/src/utils/trui-specifications.js +25 -7
  72. package/src/utils/trui-windsurf.js +231 -10
  73. package/src/utils/welcome-screen-extracted.js +2 -2
  74. package/src/utils/welcome-screen.js +2 -2
@@ -0,0 +1,105 @@
1
+ const { t, getRequirementsPath } = require('vibecodingmachine-core');
2
+ const { countRequirements } = require('../status-helpers');
3
+
4
+ /**
5
+ * Builds tree structure for requirements navigator
6
+ */
7
+ async function buildTreeStructure(tree) {
8
+ tree.items = [];
9
+
10
+ // Root: Requirements
11
+ tree.items.push({ level: 0, type: 'root', label: `📋 ${t('requirements.menu.label')}`, key: 'root' });
12
+
13
+ if (tree.expanded.root) {
14
+ tree.items.push({ level: 1, type: 'add', label: '➕ ' + t('requirements.add.new'), key: 'add-one' });
15
+ tree.items.push({ level: 1, type: 'add', label: '➕ ' + t('requirements.add.multiple'), key: 'add-many' });
16
+
17
+ // Use pre-calculated stats and labels from shared logic
18
+ const stats = await countRequirements();
19
+ const { todoCount, toVerifyCount, verifiedCount, total } = stats || {
20
+ todoCount: 0, toVerifyCount: 0, verifiedCount: 0, total: 0
21
+ };
22
+
23
+ // Create localized labels
24
+ const localizedTodoLabel = todoCount > 0 ?
25
+ `⏳ ${t('requirements.section.todo')} (${todoCount} - ${Math.round((todoCount / total) * 100)}%)` :
26
+ `⏳ ${t('requirements.section.todo')} (0 - 0%)`;
27
+
28
+ const localizedToVerifyLabel = toVerifyCount > 0 ?
29
+ `✅ ${t('requirements.section.to.verify')} (${toVerifyCount} - ${Math.round((toVerifyCount / total) * 100)}%)` :
30
+ `✅ ${t('requirements.section.to.verify')} (0 - 0%)`;
31
+
32
+ const localizedVerifiedLabel = verifiedCount > 0 ?
33
+ `🎉 ${t('requirements.section.verified')} (${verifiedCount} - ${Math.round((verifiedCount / total) * 100)}%)` :
34
+ `🎉 ${t('requirements.section.verified')} (0 - 0%)`;
35
+
36
+ const verifiedReqs = tree.verifiedReqs || [];
37
+ const verifyReqs = tree.verifyReqs || [];
38
+ const clarificationReqs = tree.clarificationReqs || [];
39
+ const todoReqs = tree.todoReqs || [];
40
+ const recycledReqs = tree.recycledReqs || [];
41
+
42
+ // Calculate percentages for clarification and recycled sections
43
+ const clarificationPercent = total > 0 ? Math.round((clarificationReqs.length / total) * 100) : 0;
44
+ const recycledPercent = total > 0 ? Math.round((recycledReqs.length / total) * 100) : 0;
45
+
46
+ // VERIFIED section (first) - only show if has requirements
47
+ if (verifiedReqs.length > 0 || verifiedCount > 0) {
48
+ tree.items.push({ level: 1, type: 'section', label: localizedVerifiedLabel, key: 'verified' });
49
+
50
+ if (tree.expanded.verified) {
51
+ verifiedReqs.forEach((req, idx) => {
52
+ tree.items.push({ level: 2, type: 'verified', label: req, key: `verified-${idx}` });
53
+ });
54
+ }
55
+ }
56
+
57
+ // TO VERIFY section (second) - only show if has requirements
58
+ if (verifyReqs.length > 0 || toVerifyCount > 0) {
59
+ tree.items.push({ level: 1, type: 'section', label: localizedToVerifyLabel, key: 'verify', section: '✅ Verified by AI screenshot' });
60
+
61
+ if (tree.expanded.verify) {
62
+ verifyReqs.forEach((req, idx) => {
63
+ tree.items.push({ level: 2, type: 'requirement', label: req.title, key: `verify-${idx}`, req, sectionKey: 'verify' });
64
+ });
65
+ }
66
+ }
67
+
68
+ // NEEDING CLARIFICATION section (third) - only show if has requirements
69
+ if (clarificationReqs.length > 0) {
70
+ tree.items.push({ level: 1, type: 'section', label: `❓ NEEDING CLARIFICATION (${clarificationReqs.length} - ${clarificationPercent}%)`, key: 'clarification', section: '❓ Requirements needing manual feedback' });
71
+
72
+ if (tree.expanded.clarification) {
73
+ clarificationReqs.forEach((req, idx) => {
74
+ tree.items.push({ level: 2, type: 'clarification', label: req.title, key: `clarification-${idx}`, req, sectionKey: 'clarification' });
75
+ });
76
+ }
77
+ }
78
+
79
+ // TODO section (fourth) - only show if has requirements
80
+ if (todoReqs.length > 0 || todoCount > 0) {
81
+ tree.items.push({ level: 1, type: 'section', label: localizedTodoLabel, key: 'todo', section: '⏳ Requirements not yet completed' });
82
+
83
+ if (tree.expanded.todo) {
84
+ todoReqs.forEach((req, idx) => {
85
+ tree.items.push({ level: 2, type: 'requirement', label: req.title, key: `todo-${idx}`, req, sectionKey: 'todo' });
86
+ });
87
+ }
88
+ }
89
+
90
+ // RECYCLED section (last) - only show if has requirements
91
+ if (recycledReqs.length > 0) {
92
+ tree.items.push({ level: 1, type: 'section', label: `♻️ RECYCLED (${recycledReqs.length} - ${recycledPercent}%)`, key: 'recycled', section: '♻️ Recycled' });
93
+
94
+ if (tree.expanded.recycled) {
95
+ recycledReqs.forEach((req, idx) => {
96
+ tree.items.push({ level: 2, type: 'recycled', label: req.title, key: `recycled-${idx}`, req, sectionKey: 'recycled' });
97
+ });
98
+ }
99
+ }
100
+ }
101
+ }
102
+
103
+ module.exports = {
104
+ buildTreeStructure
105
+ };
@@ -0,0 +1,50 @@
1
+ const chalk = require('chalk');
2
+
3
+ /**
4
+ * Renders the tree UI to console
5
+ */
6
+ function renderTree(tree, startIdx, endIdx) {
7
+ // Display visible tree items
8
+ for (let idx = startIdx; idx < endIdx; idx++) {
9
+ const item = tree.items[idx];
10
+ const indent = ' '.repeat(item.level);
11
+ const arrow = tree.expanded[item.key] ? '▼' : (item.type === 'section' ? '▶' : ' ');
12
+ const prefix = item.type === 'section' || item.type === 'root' ? arrow + ' ' : ' ';
13
+ const selected = idx === tree.selected ? chalk.cyan('❯ ') : ' ';
14
+
15
+ // Truncate long labels to fit terminal width (max 120 chars)
16
+ const maxLabelWidth = 120;
17
+ let label = item.label;
18
+ if (label.length > maxLabelWidth) {
19
+ label = label.substring(0, maxLabelWidth - 3) + '...';
20
+ }
21
+
22
+ console.log(selected + indent + prefix + (idx === tree.selected ? chalk.cyan(label) : chalk.gray(label)));
23
+ }
24
+ }
25
+
26
+ /**
27
+ * Calculates window for scrolling
28
+ */
29
+ function calculateScrollWindow(tree, maxVisible = 20) {
30
+ let startIdx = 0;
31
+ let endIdx = tree.items.length;
32
+
33
+ if (tree.items.length > maxVisible) {
34
+ // Center the selected item in the window
35
+ startIdx = Math.max(0, tree.selected - Math.floor(maxVisible / 2));
36
+ endIdx = Math.min(tree.items.length, startIdx + maxVisible);
37
+
38
+ // Adjust if we're near the end
39
+ if (endIdx - startIdx < maxVisible) {
40
+ startIdx = Math.max(0, endIdx - maxVisible);
41
+ }
42
+ }
43
+
44
+ return { startIdx, endIdx };
45
+ }
46
+
47
+ module.exports = {
48
+ renderTree,
49
+ calculateScrollWindow
50
+ };