vibecodingmachine-core 1.0.2 → 2025.11.2-7.1302

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 (49) hide show
  1. package/.babelrc +13 -13
  2. package/README.md +28 -28
  3. package/__tests__/applescript-manager-claude-fix.test.js +286 -286
  4. package/__tests__/requirement-2-auto-start-looping.test.js +69 -69
  5. package/__tests__/requirement-3-auto-start-looping.test.js +69 -69
  6. package/__tests__/requirement-4-auto-start-looping.test.js +69 -69
  7. package/__tests__/requirement-6-auto-start-looping.test.js +73 -73
  8. package/__tests__/requirement-7-status-tracking.test.js +332 -332
  9. package/jest.config.js +18 -18
  10. package/jest.setup.js +12 -12
  11. package/package.json +48 -48
  12. package/src/auth/access-denied.html +119 -119
  13. package/src/auth/shared-auth-storage.js +230 -230
  14. package/src/autonomous-mode/feature-implementer.cjs +70 -70
  15. package/src/autonomous-mode/feature-implementer.js +425 -425
  16. package/src/chat-management/chat-manager.cjs +71 -71
  17. package/src/chat-management/chat-manager.js +342 -342
  18. package/src/ide-integration/__tests__/applescript-manager-thread-closure.test.js +227 -227
  19. package/src/ide-integration/aider-cli-manager.cjs +850 -850
  20. package/src/ide-integration/applescript-manager.cjs +1088 -1088
  21. package/src/ide-integration/applescript-manager.js +2802 -2802
  22. package/src/ide-integration/applescript-utils.js +306 -306
  23. package/src/ide-integration/cdp-manager.cjs +221 -221
  24. package/src/ide-integration/cdp-manager.js +321 -321
  25. package/src/ide-integration/claude-code-cli-manager.cjs +301 -301
  26. package/src/ide-integration/cline-cli-manager.cjs +2252 -2252
  27. package/src/ide-integration/continue-cli-manager.js +431 -431
  28. package/src/ide-integration/provider-manager.cjs +354 -354
  29. package/src/ide-integration/quota-detector.cjs +34 -34
  30. package/src/ide-integration/quota-detector.js +349 -349
  31. package/src/ide-integration/windows-automation-manager.js +262 -262
  32. package/src/index.cjs +47 -43
  33. package/src/index.js +17 -17
  34. package/src/llm/direct-llm-manager.cjs +609 -609
  35. package/src/ui/ButtonComponents.js +247 -247
  36. package/src/ui/ChatInterface.js +499 -499
  37. package/src/ui/StateManager.js +259 -259
  38. package/src/utils/audit-logger.cjs +116 -116
  39. package/src/utils/config-helpers.cjs +94 -94
  40. package/src/utils/config-helpers.js +94 -94
  41. package/src/utils/electron-update-checker.js +113 -85
  42. package/src/utils/gcloud-auth.cjs +394 -394
  43. package/src/utils/logger.cjs +193 -193
  44. package/src/utils/logger.js +191 -191
  45. package/src/utils/repo-helpers.cjs +120 -120
  46. package/src/utils/repo-helpers.js +120 -120
  47. package/src/utils/requirement-helpers.js +432 -432
  48. package/src/utils/update-checker.js +227 -167
  49. package/src/utils/version-checker.js +169 -0
@@ -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
+ };