vibecodingmachine-cli 2026.2.20-438 → 2026.2.26-1739
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.
- package/bin/auth/auth-compliance.js +126 -0
- package/bin/cli-program.js +104 -0
- package/bin/cli-setup.js +52 -0
- package/bin/commands/agent-commands.js +310 -0
- package/bin/commands/auto-commands.js +70 -0
- package/bin/commands/command-aliases.js +118 -0
- package/bin/commands/repo-commands.js +39 -0
- package/bin/commands/rui-commands.js +152 -0
- package/bin/config/cli-config.js +394 -0
- package/bin/init/environment-setup.js +84 -0
- package/bin/update/update-checker.js +126 -0
- package/bin/vibecodingmachine-new.js +50 -0
- package/bin/vibecodingmachine.js +29 -663
- package/package.json +8 -2
- package/src/commands/agents/add.js +277 -0
- package/src/commands/agents/check.js +380 -0
- package/src/commands/agents/list.js +471 -0
- package/src/commands/agents/remove.js +351 -0
- package/src/commands/analyze-file-sizes.js +428 -0
- package/src/commands/auto-direct/code-processor.js +282 -0
- package/src/commands/auto-direct/file-scanner.js +266 -0
- package/src/commands/auto-direct/provider-config.js +178 -0
- package/src/commands/auto-direct/provider-manager.js +219 -0
- package/src/commands/auto-direct/requirement-manager.js +172 -0
- package/src/commands/auto-direct/status-display.js +91 -0
- package/src/commands/auto-direct/utils.js +106 -0
- package/src/commands/auto-direct.js +875 -488
- package/src/commands/auto-execution.js +342 -0
- package/src/commands/auto-provider-management.js +102 -0
- package/src/commands/auto-requirement-management.js +161 -0
- package/src/commands/auto-status-helpers.js +141 -0
- package/src/commands/auto.js +105 -5155
- package/src/commands/check-compliance.js +536 -0
- package/src/commands/continuous-scan.js +119 -0
- package/src/commands/ide.js +16 -4
- package/src/commands/refactor-file.js +486 -0
- package/src/commands/requirements.js +301 -2
- package/src/commands/timeout.js +290 -0
- package/src/trui/TruiInterface.js +108 -0
- package/src/trui/agents/AgentInterface.js +580 -0
- package/src/utils/antigravity-installer.js +60 -6
- package/src/utils/clarification-actions.js +290 -0
- package/src/utils/config.js +123 -2
- package/src/utils/first-run.js +5 -5
- package/src/utils/ide-handlers.js +212 -0
- package/src/utils/interactive/clarification-actions.js +348 -0
- package/src/utils/interactive/core-ui.js +265 -0
- package/src/utils/interactive/file-backup.js +237 -0
- package/src/utils/interactive/file-import-export.js +305 -0
- package/src/utils/interactive/file-operations.js +49 -0
- package/src/utils/interactive/file-validation.js +276 -0
- package/src/utils/interactive/interactive-prompts.js +480 -0
- package/src/utils/interactive/requirement-actions.js +127 -0
- package/src/utils/interactive/requirement-crud.js +356 -0
- package/src/utils/interactive/requirements-navigation.js +286 -0
- package/src/utils/interactive.js +390 -3459
- package/src/utils/provider-checker/agent-checker.js +250 -0
- package/src/utils/provider-checker/agent-runner.js +450 -0
- package/src/utils/provider-checker/cli-installer.js +123 -0
- package/src/utils/provider-checker/cli-utils.js +15 -0
- package/src/utils/provider-checker/format-utils.js +32 -0
- package/src/utils/provider-checker/ide-manager.js +72 -0
- package/src/utils/provider-checker/ide-utils.js +71 -0
- package/src/utils/provider-checker/node-detector.js +56 -0
- package/src/utils/provider-checker/node-utils.js +61 -0
- package/src/utils/provider-checker/process-spawn.js +22 -0
- package/src/utils/provider-checker/process-utils.js +37 -0
- package/src/utils/provider-checker/provider-validator.js +160 -0
- package/src/utils/provider-checker/quota-checker.js +54 -0
- package/src/utils/provider-checker/quota-detector.js +44 -0
- package/src/utils/provider-checker/requirements-manager.js +94 -0
- package/src/utils/provider-checker/test-requirements.js +95 -0
- package/src/utils/provider-checker/time-formatter.js +18 -0
- package/src/utils/provider-checker-new.js +14 -0
- package/src/utils/provider-checker.js +12 -407
- package/src/utils/provider-checkers/ide-manager.js +128 -0
- package/src/utils/provider-checkers/node-executable-finder.js +51 -0
- package/src/utils/provider-checkers/provider-checker-core.js +172 -0
- package/src/utils/provider-checkers/provider-checker-main.js +107 -0
- package/src/utils/provider-manager.js +60 -4
- package/src/utils/provider-registry.js +26 -3
- package/src/utils/provider-utils.js +173 -0
- package/src/utils/quota-detectors.js +212 -0
- package/src/utils/requirement-action-handlers.js +288 -0
- package/src/utils/requirement-actions/clarification-actions.js +229 -0
- package/src/utils/requirement-actions/confirmation-prompts.js +93 -0
- package/src/utils/requirement-actions/file-operations.js +92 -0
- package/src/utils/requirement-actions/helpers.js +40 -0
- package/src/utils/requirement-actions/requirement-operations.js +335 -0
- package/src/utils/requirement-actions.js +46 -856
- package/src/utils/requirement-file-operations.js +259 -0
- package/src/utils/requirement-helpers.js +128 -0
- package/src/utils/requirement-management.js +279 -0
- package/src/utils/requirement-navigation.js +146 -0
- package/src/utils/requirement-organization.js +271 -0
- package/src/utils/simple-trui.js +75 -1
- package/src/utils/trui-navigation.js +28 -2
- package/src/utils/trui-req-tree.js +196 -11
- package/src/utils/trui-specifications.js +31 -1
- package/src/utils/interactive-backup.js +0 -5664
- package/src/utils/trui-provider-manager.js +0 -182
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quota Checker Module
|
|
3
|
+
*
|
|
4
|
+
* Contains quota checking utilities for providers.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Check Antigravity IDE for quota limit using AppleScript
|
|
9
|
+
* @returns {Promise<{isRateLimited: boolean, message?: string, resumeAt?: string}>}
|
|
10
|
+
*/
|
|
11
|
+
async function checkAntigravityQuota() {
|
|
12
|
+
try {
|
|
13
|
+
const { AppleScriptManager } = require('vibecodingmachine-core');
|
|
14
|
+
const manager = new AppleScriptManager();
|
|
15
|
+
|
|
16
|
+
const script = `
|
|
17
|
+
tell application "Antigravity"
|
|
18
|
+
if it is running then
|
|
19
|
+
try
|
|
20
|
+
-- Try to get quota information from the UI
|
|
21
|
+
-- This is a simplified check - in reality you'd need to inspect the UI elements
|
|
22
|
+
set quotaInfo to "Quota status not available"
|
|
23
|
+
return quotaInfo
|
|
24
|
+
on error errMsg
|
|
25
|
+
return "Error checking quota: " & errMsg
|
|
26
|
+
end try
|
|
27
|
+
else
|
|
28
|
+
return "Antigravity is not running"
|
|
29
|
+
end if
|
|
30
|
+
end tell
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const result = await manager.executeScript(script);
|
|
34
|
+
|
|
35
|
+
// Parse the result to determine if rate limited
|
|
36
|
+
const isRateLimited = result.includes('quota') &&
|
|
37
|
+
(result.includes('limit') || result.includes('exceeded'));
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
isRateLimited,
|
|
41
|
+
message: result,
|
|
42
|
+
resumeAt: isRateLimited ? 'Check again later' : undefined
|
|
43
|
+
};
|
|
44
|
+
} catch (error) {
|
|
45
|
+
return {
|
|
46
|
+
isRateLimited: false,
|
|
47
|
+
message: `Quota check failed: ${error.message}`
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
module.exports = {
|
|
53
|
+
checkAntigravityQuota
|
|
54
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Check Antigravity IDE for quota limit using AppleScript
|
|
5
|
+
* @returns {Promise<{isRateLimited: boolean, message?: string, resumeAt?: string}>}
|
|
6
|
+
*/
|
|
7
|
+
async function checkAntigravityQuota() {
|
|
8
|
+
try {
|
|
9
|
+
const { AppleScriptManager } = require('vibecodingmachine-core');
|
|
10
|
+
const manager = new AppleScriptManager();
|
|
11
|
+
const result = await manager.checkAntigravityQuotaLimit();
|
|
12
|
+
|
|
13
|
+
// If no rate limit detected, return as-is
|
|
14
|
+
if (!result || !result.isRateLimited) {
|
|
15
|
+
return result || { isRateLimited: false };
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// Parse the UI text to extract refresh time
|
|
19
|
+
const text = result.message || '';
|
|
20
|
+
let resumeAt = '';
|
|
21
|
+
|
|
22
|
+
// Look for pattern like "refresh on 2/23/2026, 5:32:16 PM"
|
|
23
|
+
const matchRefresh = text.match(/refresh\s+on\s+(\d+\/\d+\/\d+,\s+\d+:\d+:\d+\s+[AP]M)/i);
|
|
24
|
+
if (matchRefresh) {
|
|
25
|
+
resumeAt = matchRefresh[1];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Clean up message to just the key part
|
|
29
|
+
const cleanMessage = text.split('\n').filter(line => line.trim()).join(' ').substring(0, 150);
|
|
30
|
+
|
|
31
|
+
return {
|
|
32
|
+
isRateLimited: true,
|
|
33
|
+
message: cleanMessage || text,
|
|
34
|
+
resumeAt: resumeAt || undefined
|
|
35
|
+
};
|
|
36
|
+
} catch (err) {
|
|
37
|
+
console.log(`[AGENT CHECK] Could not check Antigravity quota: ${err.message}`);
|
|
38
|
+
return { isRateLimited: false };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
module.exports = {
|
|
43
|
+
checkAntigravityQuota
|
|
44
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const TEST_REQ_TITLE = 'VCM agent connectivity check';
|
|
7
|
+
const PENDING_HEADER = '## ⏳ Requirements not yet completed';
|
|
8
|
+
const VERIFIED_HEADER = '## ✅ Verified by AI';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Return the absolute path to the result file used by the check.
|
|
12
|
+
*/
|
|
13
|
+
function getResultFilePath(repoPath) {
|
|
14
|
+
return path.join(repoPath, '.vibecodingmachine', 'temp', 'TEMP_agent_check.txt');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Add the test requirement at the TOP of the pending section.
|
|
19
|
+
* Idempotent — if it's already there, do nothing.
|
|
20
|
+
*/
|
|
21
|
+
function addTestRequirement(reqPath, resultFile) {
|
|
22
|
+
let content = '';
|
|
23
|
+
try { content = fs.readFileSync(reqPath, 'utf8'); } catch {}
|
|
24
|
+
|
|
25
|
+
// Already present?
|
|
26
|
+
if (content.includes(TEST_REQ_TITLE)) return;
|
|
27
|
+
|
|
28
|
+
const testBlock = `### 1. ${TEST_REQ_TITLE}
|
|
29
|
+
🚦 Current Status: PREPARE
|
|
30
|
+
Create a new file at the following absolute path: ${resultFile}
|
|
31
|
+
The file must contain exactly this text on the first line: VCM_CHECK_OK
|
|
32
|
+
Do not modify any other files. This is an automated connectivity test.
|
|
33
|
+
|
|
34
|
+
`;
|
|
35
|
+
|
|
36
|
+
const idx = content.indexOf(PENDING_HEADER);
|
|
37
|
+
if (idx !== -1) {
|
|
38
|
+
const afterHeader = idx + PENDING_HEADER.length;
|
|
39
|
+
// Insert after the header, then existing content follows
|
|
40
|
+
const before = content.slice(0, afterHeader);
|
|
41
|
+
const after = content.slice(afterHeader).replace(/^\n+/, '');
|
|
42
|
+
content = before + '\n\n' + testBlock + after;
|
|
43
|
+
} else {
|
|
44
|
+
// No pending section — prepend one
|
|
45
|
+
content = PENDING_HEADER + '\n\n' + testBlock + '\n' + (content || VERIFIED_HEADER + '\n');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
fs.writeFileSync(reqPath, content, 'utf8');
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Remove the test requirement from REQUIREMENTS.md regardless of which section it's in.
|
|
53
|
+
* Also cleans up triple-blank lines left behind.
|
|
54
|
+
*/
|
|
55
|
+
function removeTestRequirement(reqPath) {
|
|
56
|
+
let content = '';
|
|
57
|
+
try { content = fs.readFileSync(reqPath, 'utf8'); } catch { return; }
|
|
58
|
+
|
|
59
|
+
if (!content.includes(TEST_REQ_TITLE)) return;
|
|
60
|
+
|
|
61
|
+
const lines = content.split('\n');
|
|
62
|
+
|
|
63
|
+
// Find the ### header line for this requirement
|
|
64
|
+
let blockStart = -1;
|
|
65
|
+
for (let i = 0; i < lines.length; i++) {
|
|
66
|
+
if (lines[i].includes(TEST_REQ_TITLE) || (lines[i].startsWith('###') && i + 1 < lines.length && lines[i + 1].includes(TEST_REQ_TITLE))) {
|
|
67
|
+
// Walk back to find the ### line
|
|
68
|
+
blockStart = lines[i].startsWith('###') ? i : i - 1;
|
|
69
|
+
if (blockStart < 0) blockStart = i;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (blockStart === -1) return;
|
|
75
|
+
|
|
76
|
+
// Find end of block (next ### or ##, or EOF)
|
|
77
|
+
let blockEnd = blockStart + 1;
|
|
78
|
+
while (blockEnd < lines.length && !lines[blockEnd].startsWith('###') && !lines[blockEnd].startsWith('## ')) {
|
|
79
|
+
blockEnd++;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
lines.splice(blockStart, blockEnd - blockStart);
|
|
83
|
+
const cleaned = lines.join('\n').replace(/\n{3,}/g, '\n\n').trimEnd() + '\n';
|
|
84
|
+
fs.writeFileSync(reqPath, cleaned, 'utf8');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
module.exports = {
|
|
88
|
+
TEST_REQ_TITLE,
|
|
89
|
+
PENDING_HEADER,
|
|
90
|
+
VERIFIED_HEADER,
|
|
91
|
+
getResultFilePath,
|
|
92
|
+
addTestRequirement,
|
|
93
|
+
removeTestRequirement
|
|
94
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Requirements Module
|
|
3
|
+
*
|
|
4
|
+
* Contains test requirement management utilities.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
const path = require('path');
|
|
9
|
+
|
|
10
|
+
const TEST_REQ_TITLE = 'VCM agent connectivity check';
|
|
11
|
+
const PENDING_HEADER = '## ⏳ Requirements not yet completed';
|
|
12
|
+
const VERIFIED_HEADER = '## ✅ Verified by AI';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Return the absolute path to the result file used by the check.
|
|
16
|
+
*/
|
|
17
|
+
function getResultFilePath(repoPath) {
|
|
18
|
+
return path.join(repoPath, '.vibecodingmachine', 'temp', 'TEMP_agent_check.txt');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Add the test requirement at the TOP of the pending section.
|
|
23
|
+
* Idempotent — if it's already there, do nothing.
|
|
24
|
+
*/
|
|
25
|
+
function addTestRequirement(reqPath, resultFile) {
|
|
26
|
+
let content = '';
|
|
27
|
+
try { content = fs.readFileSync(reqPath, 'utf8'); } catch {}
|
|
28
|
+
|
|
29
|
+
// Check if test requirement already exists
|
|
30
|
+
if (content.includes(TEST_REQ_TITLE)) return;
|
|
31
|
+
|
|
32
|
+
// Find the start of the pending section
|
|
33
|
+
const pendingStart = content.indexOf(PENDING_HEADER);
|
|
34
|
+
if (pendingStart === -1) return;
|
|
35
|
+
|
|
36
|
+
// Find the end of the pending section (next ## header or end of file)
|
|
37
|
+
const afterPending = content.indexOf('\n##', pendingStart + 1);
|
|
38
|
+
const insertPos = afterPending === -1 ? content.length : afterPending;
|
|
39
|
+
|
|
40
|
+
// Build the test requirement content
|
|
41
|
+
const testReq = `\n### ${TEST_REQ_TITLE}
|
|
42
|
+
|
|
43
|
+
**Purpose:** Verify agent connectivity and functionality
|
|
44
|
+
|
|
45
|
+
**Expected Results:**
|
|
46
|
+
- Agent responds to test prompt
|
|
47
|
+
- No errors or timeouts
|
|
48
|
+
- Proper formatting and structure
|
|
49
|
+
|
|
50
|
+
**Test Command:** \`vibecodingmachine agent test\`
|
|
51
|
+
|
|
52
|
+
**Verification:** Check TEMP_agent_check.txt for results
|
|
53
|
+
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
// Insert the test requirement
|
|
57
|
+
const newContent = content.slice(0, insertPos) + testReq + content.slice(insertPos);
|
|
58
|
+
fs.writeFileSync(reqPath, newContent);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Remove the test requirement from REQUIREMENTS.md regardless of which section it's in.
|
|
63
|
+
* Also cleans up triple-blank lines left behind.
|
|
64
|
+
*/
|
|
65
|
+
function removeTestRequirement(reqPath) {
|
|
66
|
+
let content = '';
|
|
67
|
+
try { content = fs.readFileSync(reqPath, 'utf8'); } catch { return; }
|
|
68
|
+
|
|
69
|
+
// Find the test requirement
|
|
70
|
+
const startMarker = `### ${TEST_REQ_TITLE}`;
|
|
71
|
+
const startIndex = content.indexOf(startMarker);
|
|
72
|
+
if (startIndex === -1) return;
|
|
73
|
+
|
|
74
|
+
// Find the end of this requirement (next ### or ## header)
|
|
75
|
+
let endIndex = content.indexOf('\n###', startIndex + 1);
|
|
76
|
+
if (endIndex === -1) endIndex = content.indexOf('\n##', startIndex + 1);
|
|
77
|
+
if (endIndex === -1) endIndex = content.length;
|
|
78
|
+
|
|
79
|
+
// Remove the requirement
|
|
80
|
+
const newContent = content.slice(0, startIndex) + content.slice(endIndex);
|
|
81
|
+
|
|
82
|
+
// Clean up triple blank lines
|
|
83
|
+
const cleanedContent = newContent.replace(/\n{3,}/g, '\n\n');
|
|
84
|
+
|
|
85
|
+
fs.writeFileSync(reqPath, cleanedContent);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
module.exports = {
|
|
89
|
+
TEST_REQ_TITLE,
|
|
90
|
+
PENDING_HEADER,
|
|
91
|
+
VERIFIED_HEADER,
|
|
92
|
+
getResultFilePath,
|
|
93
|
+
addTestRequirement,
|
|
94
|
+
removeTestRequirement
|
|
95
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Format a checkedAt ISO timestamp for display.
|
|
5
|
+
* e.g. "April 12, 2025 at 4:23 pm"
|
|
6
|
+
*/
|
|
7
|
+
function formatCheckedAt(checkedAt) {
|
|
8
|
+
if (!checkedAt) return '';
|
|
9
|
+
const d = new Date(checkedAt);
|
|
10
|
+
if (isNaN(d.getTime())) return checkedAt;
|
|
11
|
+
const months = ['January','February','March','April','May','June','July','August','September','October','November','December'];
|
|
12
|
+
const timePart = d.toLocaleTimeString('en-US', { hour: 'numeric', minute: '2-digit', hour12: true }).toLowerCase();
|
|
13
|
+
return `${months[d.getMonth()]} ${d.getDate()}, ${d.getFullYear()} at ${timePart}`;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
formatCheckedAt
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Import all provider checker modules
|
|
4
|
+
const { checkProvider, checkAllProviders, formatCheckedAt } = require('./provider-checkers/provider-checker-main');
|
|
5
|
+
const { DIRECT_TIMEOUT_MS, IDE_TIMEOUT_MS } = require('./provider-checkers/provider-checker-core');
|
|
6
|
+
|
|
7
|
+
// Re-export the main API
|
|
8
|
+
module.exports = {
|
|
9
|
+
checkProvider,
|
|
10
|
+
checkAllProviders,
|
|
11
|
+
formatCheckedAt,
|
|
12
|
+
DIRECT_TIMEOUT_MS,
|
|
13
|
+
IDE_TIMEOUT_MS
|
|
14
|
+
};
|