vibecodingmachine-cli 2025.12.25-25 → 2026.1.22-1441

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 (52) hide show
  1. package/__tests__/antigravity-js-handler.test.js +23 -0
  2. package/__tests__/provider-manager.test.js +84 -0
  3. package/__tests__/provider-rate-cache.test.js +27 -0
  4. package/bin/vibecodingmachine.js +92 -118
  5. package/logs/audit/2025-12-27.jsonl +1 -0
  6. package/logs/audit/2026-01-03.jsonl +2 -0
  7. package/package.json +2 -2
  8. package/reset_provider_order.js +21 -0
  9. package/scripts/convert-requirements.js +35 -0
  10. package/scripts/debug-parse.js +24 -0
  11. package/src/commands/auth.js +5 -1
  12. package/src/commands/auto-direct.js +747 -182
  13. package/src/commands/auto.js +206 -48
  14. package/src/commands/computers.js +9 -0
  15. package/src/commands/feature.js +123 -0
  16. package/src/commands/ide.js +108 -3
  17. package/src/commands/repo.js +27 -22
  18. package/src/commands/requirements-remote.js +34 -2
  19. package/src/commands/requirements.js +129 -9
  20. package/src/commands/setup.js +2 -1
  21. package/src/commands/status.js +39 -1
  22. package/src/commands/sync.js +7 -1
  23. package/src/utils/antigravity-js-handler.js +13 -4
  24. package/src/utils/auth.js +56 -25
  25. package/src/utils/compliance-check.js +10 -0
  26. package/src/utils/config.js +42 -1
  27. package/src/utils/date-formatter.js +44 -0
  28. package/src/utils/first-run.js +8 -6
  29. package/src/utils/interactive.js +1363 -334
  30. package/src/utils/kiro-js-handler.js +188 -0
  31. package/src/utils/prompt-helper.js +64 -0
  32. package/src/utils/provider-rate-cache.js +31 -0
  33. package/src/utils/provider-registry.js +42 -1
  34. package/src/utils/requirements-converter.js +107 -0
  35. package/src/utils/requirements-parser.js +144 -0
  36. package/tests/antigravity-js-handler.test.js +23 -0
  37. package/tests/home-bootstrap.test.js +76 -0
  38. package/tests/integration/health-tracking.integration.test.js +284 -0
  39. package/tests/provider-manager.test.js +92 -0
  40. package/tests/rate-limit-display.test.js +44 -0
  41. package/tests/requirements-bullet-parsing.test.js +15 -0
  42. package/tests/requirements-converter.test.js +42 -0
  43. package/tests/requirements-heading-count.test.js +27 -0
  44. package/tests/requirements-legacy-parsing.test.js +15 -0
  45. package/tests/requirements-parse-integration.test.js +44 -0
  46. package/tests/wait-for-ide-completion.test.js +56 -0
  47. package/tests/wait-for-ide-quota-detection-cursor-screenshot.test.js +61 -0
  48. package/tests/wait-for-ide-quota-detection-cursor.test.js +60 -0
  49. package/tests/wait-for-ide-quota-detection-negative.test.js +45 -0
  50. package/tests/wait-for-ide-quota-detection.test.js +59 -0
  51. package/verify_fix.js +36 -0
  52. package/verify_ui.js +38 -0
@@ -75,6 +75,41 @@ async function setStages(stages) {
75
75
  await writeConfig(cfg);
76
76
  }
77
77
 
78
+ async function getComputerFilter() {
79
+ const cfg = await readConfig();
80
+ return cfg.computerFilter || null;
81
+ }
82
+
83
+ async function setComputerFilter(computerName) {
84
+ const cfg = await readConfig();
85
+ cfg.computerFilter = computerName;
86
+ await writeConfig(cfg);
87
+ }
88
+
89
+ async function getProviderCache() {
90
+ const cfg = await readConfig();
91
+ return cfg.providerCache || {};
92
+ }
93
+
94
+ async function setProviderCache(cacheData) {
95
+ const cfg = await readConfig();
96
+ // Merge with existing cache
97
+ cfg.providerCache = { ...(cfg.providerCache || {}), ...cacheData };
98
+ await writeConfig(cfg);
99
+ }
100
+
101
+ async function getAutoTimeout() {
102
+ const cfg = await readConfig();
103
+ // Default to 5 minutes (300000 ms) if not set
104
+ return cfg.autoTimeout !== undefined ? cfg.autoTimeout : 5 * 60 * 1000;
105
+ }
106
+
107
+ async function setAutoTimeout(timeoutMs) {
108
+ const cfg = await readConfig();
109
+ cfg.autoTimeout = timeoutMs;
110
+ await writeConfig(cfg);
111
+ }
112
+
78
113
  module.exports = {
79
114
  getRepoPath,
80
115
  setRepoPath,
@@ -84,7 +119,13 @@ module.exports = {
84
119
  writeConfig,
85
120
  getStages,
86
121
  setStages,
87
- DEFAULT_STAGES
122
+ DEFAULT_STAGES,
123
+ getComputerFilter,
124
+ setComputerFilter,
125
+ getProviderCache,
126
+ setProviderCache,
127
+ getAutoTimeout,
128
+ setAutoTimeout
88
129
  };
89
130
 
90
131
 
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Format a date into a rate limit reset label
3
+ * @param {string|number|Date} resetsAt - The reset time
4
+ * @returns {string|null} - Formatted label (e.g., "Resets at 4:23 pm CST on January 17, 2026")
5
+ */
6
+ function formatResetsAtLabel(resetsAt) {
7
+ if (!resetsAt) return null;
8
+ const resetDate = new Date(resetsAt);
9
+ if (Number.isNaN(resetDate.getTime())) return null;
10
+
11
+ const msUntilReset = resetDate.getTime() - Date.now();
12
+ // If the reset minute has started (i.e., we're at or past the beginning of the stated minute),
13
+ // consider the quota reset to have occurred and don't show a label.
14
+ const resetMinuteStart = new Date(resetDate);
15
+ resetMinuteStart.setSeconds(0, 0);
16
+ if (resetMinuteStart.getTime() <= Date.now()) return null;
17
+
18
+ // Format time part: "4:23 pm"
19
+ const timePart = resetDate.toLocaleTimeString('en-US', {
20
+ hour: 'numeric',
21
+ minute: '2-digit',
22
+ hour12: true
23
+ }).toLowerCase();
24
+
25
+ // Format timezone part: "mst"
26
+ // Note: toLocaleString with timeZoneName: 'short' often returns 'MST', 'PDT', etc.
27
+ const tzPart = resetDate.toLocaleTimeString('en-US', {
28
+ timeZoneName: 'short'
29
+ }).split(' ').pop().toLowerCase();
30
+
31
+ const months = [
32
+ 'January', 'February', 'March', 'April', 'May', 'June',
33
+ 'July', 'August', 'September', 'October', 'November', 'December'
34
+ ];
35
+
36
+ const monthName = months[resetDate.getMonth()];
37
+ const day = resetDate.getDate();
38
+ const year = resetDate.getFullYear();
39
+
40
+ // "Resets at 4:23 pm mst on January 17, 2026"
41
+ return `Resets at ${timePart} ${tzPart} on ${monthName} ${day}, ${year}`;
42
+ }
43
+
44
+ module.exports = { formatResetsAtLabel };
@@ -7,6 +7,7 @@ const os = require('os');
7
7
  const { getProviderDefinitions, saveProviderPreferences, getDefaultProviderOrder } = require('./provider-registry');
8
8
  const { isKiroInstalled } = require('./kiro-installer');
9
9
  const { t } = require('vibecodingmachine-core');
10
+ const { promptWithDefaultsOnce } = require('./prompt-helper');
10
11
 
11
12
  const { execSync } = require('child_process');
12
13
 
@@ -120,7 +121,7 @@ async function checkFirstRun() {
120
121
  await new Promise(resolve => setTimeout(resolve, 1500));
121
122
 
122
123
  // --- NEW: Vibe Coding Introduction ---
123
- const { showIntro } = await inquirer.prompt([
124
+ const { showIntro } = await promptWithDefaultsOnce([
124
125
  {
125
126
  type: 'confirm',
126
127
  name: 'showIntro',
@@ -198,7 +199,7 @@ async function checkFirstRun() {
198
199
 
199
200
  // 3. Status Report & Selection
200
201
  if (detectedIDEs.length > 0) {
201
- console.log(chalk.green('\n✓ We found these IDEs and enabled them for you:'));
202
+ console.log(chalk.green('\n✓ We found these IDEs already installed and enabled them:'));
202
203
  detectedIDEs.forEach(ide => {
203
204
  console.log(chalk.gray(` • ${ide.name}`));
204
205
  });
@@ -206,19 +207,19 @@ async function checkFirstRun() {
206
207
 
207
208
  let selectedIDEs = [];
208
209
 
209
- // Only prompt for uninstalled IDEs if there are any
210
+ // Show all uninstalled IDEs for selection
210
211
  if (otherIDEs.length > 0) {
211
212
  console.log(); // Spacing
212
213
  const choices = otherIDEs.map(ide => ({
213
214
  name: ide.name,
214
215
  value: ide.id,
215
- checked: true // Select by default as requested
216
+ checked: true // All IDEs enabled by default as requested
216
217
  }));
217
218
 
218
219
  const response = await inquirer.prompt([{
219
220
  type: 'checkbox',
220
221
  name: 'selectedIDEs',
221
- message: 'Select additional IDEs to install & enable:',
222
+ message: 'Select IDEs to install & enable (uncheck any you don\'t want):',
222
223
  choices: choices,
223
224
  pageSize: 10
224
225
  }]);
@@ -331,6 +332,7 @@ async function checkFirstRun() {
331
332
  if (def && def.type === 'ide') {
332
333
  const isDetectedNow = reDetected.includes(id);
333
334
  const isSelected = selectedIDEs.includes(id);
335
+ // Enable if detected OR selected during first run
334
336
  enabledMap[id] = isDetectedNow || isSelected;
335
337
  } else {
336
338
  enabledMap[id] = true; // Keep LLMs enabled by default
@@ -345,7 +347,7 @@ async function checkFirstRun() {
345
347
 
346
348
  // --- NEW: CLI Usage Onboarding ---
347
349
  // Moved here so IDEs are set up first
348
- const { isFamiliar } = await inquirer.prompt([
350
+ const { isFamiliar } = await promptWithDefaultsOnce([
349
351
  {
350
352
  type: 'confirm',
351
353
  name: 'isFamiliar',