vibecodingmachine-core 1.0.0 → 1.0.1
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/.babelrc +13 -13
- package/README.md +28 -28
- package/__tests__/applescript-manager-claude-fix.test.js +286 -286
- package/__tests__/requirement-2-auto-start-looping.test.js +69 -69
- package/__tests__/requirement-3-auto-start-looping.test.js +69 -69
- package/__tests__/requirement-4-auto-start-looping.test.js +69 -69
- package/__tests__/requirement-6-auto-start-looping.test.js +73 -73
- package/__tests__/requirement-7-status-tracking.test.js +332 -332
- package/jest.config.js +18 -18
- package/jest.setup.js +12 -12
- package/package.json +47 -45
- package/src/auth/access-denied.html +119 -119
- package/src/auth/shared-auth-storage.js +230 -230
- package/src/autonomous-mode/feature-implementer.cjs +70 -70
- package/src/autonomous-mode/feature-implementer.js +425 -425
- package/src/chat-management/chat-manager.cjs +71 -71
- package/src/chat-management/chat-manager.js +342 -342
- package/src/ide-integration/__tests__/applescript-manager-thread-closure.test.js +227 -227
- package/src/ide-integration/aider-cli-manager.cjs +850 -850
- package/src/ide-integration/applescript-manager.cjs +1088 -1088
- package/src/ide-integration/applescript-manager.js +2802 -2802
- package/src/ide-integration/applescript-utils.js +306 -306
- package/src/ide-integration/cdp-manager.cjs +221 -221
- package/src/ide-integration/cdp-manager.js +321 -321
- package/src/ide-integration/claude-code-cli-manager.cjs +301 -301
- package/src/ide-integration/cline-cli-manager.cjs +2252 -2252
- package/src/ide-integration/continue-cli-manager.js +431 -431
- package/src/ide-integration/provider-manager.cjs +354 -354
- package/src/ide-integration/quota-detector.cjs +34 -34
- package/src/ide-integration/quota-detector.js +349 -349
- package/src/ide-integration/windows-automation-manager.js +262 -262
- package/src/index.cjs +43 -43
- package/src/index.js +17 -17
- package/src/llm/direct-llm-manager.cjs +609 -609
- package/src/ui/ButtonComponents.js +247 -247
- package/src/ui/ChatInterface.js +499 -499
- package/src/ui/StateManager.js +259 -259
- package/src/utils/audit-logger.cjs +116 -116
- package/src/utils/config-helpers.cjs +94 -94
- package/src/utils/config-helpers.js +94 -94
- package/src/utils/electron-update-checker.js +85 -78
- package/src/utils/gcloud-auth.cjs +394 -394
- package/src/utils/logger.cjs +193 -193
- package/src/utils/logger.js +191 -191
- package/src/utils/repo-helpers.cjs +120 -120
- package/src/utils/repo-helpers.js +120 -120
- package/src/utils/requirement-helpers.js +432 -432
- package/src/utils/update-checker.js +167 -167
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
const path = require('path');
|
|
2
|
-
const fs = require('fs-extra');
|
|
3
|
-
const os = require('os');
|
|
4
|
-
const { getConfigValue } = require('./config-helpers');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Get the hostname for the current machine
|
|
8
|
-
* @returns {string} The hostname (includes .local suffix if present)
|
|
9
|
-
*/
|
|
10
|
-
function getHostname() {
|
|
11
|
-
return os.hostname(); // Keep full hostname including .local
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Check if computer name setting is enabled
|
|
16
|
-
* Reads from shared config location (same as Electron app)
|
|
17
|
-
* @returns {Promise<boolean>} True if enabled
|
|
18
|
-
*/
|
|
19
|
-
async function isComputerNameEnabled() {
|
|
20
|
-
return await getConfigValue('computerNameEnabled', false);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Get the requirements filename (always uses hostname-specific file)
|
|
25
|
-
* @param {string} hostname - Optional hostname (defaults to current hostname)
|
|
26
|
-
* @param {boolean} useHostname - Optional override (deprecated, always uses hostname)
|
|
27
|
-
* @returns {Promise<string>} The requirements filename
|
|
28
|
-
*/
|
|
29
|
-
async function getRequirementsFilename(hostname = null, useHostname = null) {
|
|
30
|
-
// Always use hostname-specific file to ensure consistency across CLI and Electron app
|
|
31
|
-
const host = hostname || getHostname();
|
|
32
|
-
return `REQUIREMENTS-${host}.md`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Check if .vibecodingmachine directories exist in either location
|
|
37
|
-
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
38
|
-
* @returns {Promise<Object>} Status object with exists, insideExists, siblingExists, insideDir, siblingDir
|
|
39
|
-
*/
|
|
40
|
-
async function checkVibeCodingMachineExists(repoPath = null) {
|
|
41
|
-
try {
|
|
42
|
-
const cwd = repoPath || process.cwd();
|
|
43
|
-
const repoName = path.basename(cwd);
|
|
44
|
-
const insideDir = path.join(cwd, '.vibecodingmachine');
|
|
45
|
-
const siblingDir = path.join(path.dirname(cwd), `.vibecodingmachine-${repoName}`);
|
|
46
|
-
|
|
47
|
-
const insideExists = await fs.pathExists(insideDir);
|
|
48
|
-
const siblingExists = await fs.pathExists(siblingDir);
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
exists: insideExists || siblingExists,
|
|
52
|
-
insideExists,
|
|
53
|
-
siblingExists,
|
|
54
|
-
insideDir,
|
|
55
|
-
siblingDir
|
|
56
|
-
};
|
|
57
|
-
} catch (error) {
|
|
58
|
-
return {
|
|
59
|
-
exists: false,
|
|
60
|
-
insideExists: false,
|
|
61
|
-
siblingExists: false,
|
|
62
|
-
insideDir: null,
|
|
63
|
-
siblingDir: null
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Get the .vibecodingmachine directory path (checks both inside and sibling locations)
|
|
70
|
-
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
71
|
-
* @returns {Promise<string|null>} The path to the .vibecodingmachine directory or null if not found
|
|
72
|
-
*/
|
|
73
|
-
async function getVibeCodingMachineDir(repoPath = null) {
|
|
74
|
-
const status = await checkVibeCodingMachineExists(repoPath);
|
|
75
|
-
if (status.insideExists) {
|
|
76
|
-
return status.insideDir;
|
|
77
|
-
} else if (status.siblingExists) {
|
|
78
|
-
return status.siblingDir;
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* Get the path to the REQUIREMENTS file (with hostname)
|
|
85
|
-
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
86
|
-
* @param {string} hostname - Optional hostname (defaults to current hostname)
|
|
87
|
-
* @returns {Promise<string|null>} The path to the REQUIREMENTS file or null if .vibecodingmachine dir not found
|
|
88
|
-
*/
|
|
89
|
-
async function getRequirementsPath(repoPath = null, hostname = null) {
|
|
90
|
-
const allnightDir = await getVibeCodingMachineDir(repoPath);
|
|
91
|
-
if (!allnightDir) {
|
|
92
|
-
return null;
|
|
93
|
-
}
|
|
94
|
-
const filename = await getRequirementsFilename(hostname);
|
|
95
|
-
return path.join(allnightDir, filename);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Check if REQUIREMENTS file exists (with hostname)
|
|
100
|
-
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
101
|
-
* @param {string} hostname - Optional hostname (defaults to current hostname)
|
|
102
|
-
* @returns {Promise<boolean>} True if REQUIREMENTS file exists
|
|
103
|
-
*/
|
|
104
|
-
async function requirementsExists(repoPath = null, hostname = null) {
|
|
105
|
-
const reqPath = await getRequirementsPath(repoPath, hostname);
|
|
106
|
-
if (!reqPath) {
|
|
107
|
-
return false;
|
|
108
|
-
}
|
|
109
|
-
return await fs.pathExists(reqPath);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
module.exports = {
|
|
113
|
-
getHostname,
|
|
114
|
-
isComputerNameEnabled,
|
|
115
|
-
getRequirementsFilename,
|
|
116
|
-
checkVibeCodingMachineExists,
|
|
117
|
-
getVibeCodingMachineDir,
|
|
118
|
-
getRequirementsPath,
|
|
119
|
-
requirementsExists
|
|
120
|
-
};
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const fs = require('fs-extra');
|
|
3
|
+
const os = require('os');
|
|
4
|
+
const { getConfigValue } = require('./config-helpers');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Get the hostname for the current machine
|
|
8
|
+
* @returns {string} The hostname (includes .local suffix if present)
|
|
9
|
+
*/
|
|
10
|
+
function getHostname() {
|
|
11
|
+
return os.hostname(); // Keep full hostname including .local
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Check if computer name setting is enabled
|
|
16
|
+
* Reads from shared config location (same as Electron app)
|
|
17
|
+
* @returns {Promise<boolean>} True if enabled
|
|
18
|
+
*/
|
|
19
|
+
async function isComputerNameEnabled() {
|
|
20
|
+
return await getConfigValue('computerNameEnabled', false);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Get the requirements filename (always uses hostname-specific file)
|
|
25
|
+
* @param {string} hostname - Optional hostname (defaults to current hostname)
|
|
26
|
+
* @param {boolean} useHostname - Optional override (deprecated, always uses hostname)
|
|
27
|
+
* @returns {Promise<string>} The requirements filename
|
|
28
|
+
*/
|
|
29
|
+
async function getRequirementsFilename(hostname = null, useHostname = null) {
|
|
30
|
+
// Always use hostname-specific file to ensure consistency across CLI and Electron app
|
|
31
|
+
const host = hostname || getHostname();
|
|
32
|
+
return `REQUIREMENTS-${host}.md`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Check if .vibecodingmachine directories exist in either location
|
|
37
|
+
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
38
|
+
* @returns {Promise<Object>} Status object with exists, insideExists, siblingExists, insideDir, siblingDir
|
|
39
|
+
*/
|
|
40
|
+
async function checkVibeCodingMachineExists(repoPath = null) {
|
|
41
|
+
try {
|
|
42
|
+
const cwd = repoPath || process.cwd();
|
|
43
|
+
const repoName = path.basename(cwd);
|
|
44
|
+
const insideDir = path.join(cwd, '.vibecodingmachine');
|
|
45
|
+
const siblingDir = path.join(path.dirname(cwd), `.vibecodingmachine-${repoName}`);
|
|
46
|
+
|
|
47
|
+
const insideExists = await fs.pathExists(insideDir);
|
|
48
|
+
const siblingExists = await fs.pathExists(siblingDir);
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
exists: insideExists || siblingExists,
|
|
52
|
+
insideExists,
|
|
53
|
+
siblingExists,
|
|
54
|
+
insideDir,
|
|
55
|
+
siblingDir
|
|
56
|
+
};
|
|
57
|
+
} catch (error) {
|
|
58
|
+
return {
|
|
59
|
+
exists: false,
|
|
60
|
+
insideExists: false,
|
|
61
|
+
siblingExists: false,
|
|
62
|
+
insideDir: null,
|
|
63
|
+
siblingDir: null
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get the .vibecodingmachine directory path (checks both inside and sibling locations)
|
|
70
|
+
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
71
|
+
* @returns {Promise<string|null>} The path to the .vibecodingmachine directory or null if not found
|
|
72
|
+
*/
|
|
73
|
+
async function getVibeCodingMachineDir(repoPath = null) {
|
|
74
|
+
const status = await checkVibeCodingMachineExists(repoPath);
|
|
75
|
+
if (status.insideExists) {
|
|
76
|
+
return status.insideDir;
|
|
77
|
+
} else if (status.siblingExists) {
|
|
78
|
+
return status.siblingDir;
|
|
79
|
+
}
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get the path to the REQUIREMENTS file (with hostname)
|
|
85
|
+
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
86
|
+
* @param {string} hostname - Optional hostname (defaults to current hostname)
|
|
87
|
+
* @returns {Promise<string|null>} The path to the REQUIREMENTS file or null if .vibecodingmachine dir not found
|
|
88
|
+
*/
|
|
89
|
+
async function getRequirementsPath(repoPath = null, hostname = null) {
|
|
90
|
+
const allnightDir = await getVibeCodingMachineDir(repoPath);
|
|
91
|
+
if (!allnightDir) {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
const filename = await getRequirementsFilename(hostname);
|
|
95
|
+
return path.join(allnightDir, filename);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Check if REQUIREMENTS file exists (with hostname)
|
|
100
|
+
* @param {string} repoPath - The repository path (defaults to cwd)
|
|
101
|
+
* @param {string} hostname - Optional hostname (defaults to current hostname)
|
|
102
|
+
* @returns {Promise<boolean>} True if REQUIREMENTS file exists
|
|
103
|
+
*/
|
|
104
|
+
async function requirementsExists(repoPath = null, hostname = null) {
|
|
105
|
+
const reqPath = await getRequirementsPath(repoPath, hostname);
|
|
106
|
+
if (!reqPath) {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
return await fs.pathExists(reqPath);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
module.exports = {
|
|
113
|
+
getHostname,
|
|
114
|
+
isComputerNameEnabled,
|
|
115
|
+
getRequirementsFilename,
|
|
116
|
+
checkVibeCodingMachineExists,
|
|
117
|
+
getVibeCodingMachineDir,
|
|
118
|
+
getRequirementsPath,
|
|
119
|
+
requirementsExists
|
|
120
|
+
};
|