vibecodingmachine-core 1.0.1 → 2025.11.2-7.1239

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,85 +1,113 @@
1
- const https = require('https');
2
-
3
- /**
4
- * Check for Electron app updates from S3 version manifest
5
- * @param {string} currentVersion - Current version (e.g., '1.0.0')
6
- * @returns {Promise<Object>} Update info or null if no update available
7
- */
8
- async function checkForElectronUpdates(currentVersion) {
9
- return new Promise((resolve, reject) => {
10
- const manifestUrl = 'https://vibecodingmachine-website.s3.amazonaws.com/version-manifest.json';
11
-
12
- https.get(manifestUrl, (res) => {
13
- let data = '';
14
-
15
- // Check HTTP status code
16
- if (res.statusCode !== 200) {
17
- console.log(`ℹ️ Update check skipped: version manifest not available (HTTP ${res.statusCode})`);
18
- resolve({ hasUpdate: false, currentVersion, error: `HTTP ${res.statusCode}` });
19
- return;
20
- }
21
-
22
- res.on('data', (chunk) => {
23
- data += chunk;
24
- });
25
-
26
- res.on('end', () => {
27
- try {
28
- const manifest = JSON.parse(data);
29
- const latestVersion = manifest.version;
30
-
31
- if (latestVersion !== currentVersion) {
32
- const publishedDate = new Date(manifest.publishedDate);
33
-
34
- // Detect architecture and choose appropriate download URL
35
- // For auto-updates, use architecture-specific builds (faster, smaller)
36
- const arch = process.arch; // 'arm64' or 'x64'
37
- let downloadUrl = manifest.downloadUrl; // Fallback to universal
38
-
39
- if (arch === 'arm64' && manifest.downloadUrlArm64) {
40
- downloadUrl = manifest.downloadUrlArm64;
41
- console.log('✅ Using Apple Silicon optimized update');
42
- } else if (arch === 'x64' && manifest.downloadUrlX64) {
43
- downloadUrl = manifest.downloadUrlX64;
44
- console.log('✅ Using Intel optimized update');
45
- } else {
46
- console.log('ℹ️ Using universal build for update');
47
- }
48
-
49
- resolve({
50
- hasUpdate: true,
51
- currentVersion,
52
- latestVersion,
53
- publishedDate: publishedDate.toLocaleString('en-US', {
54
- year: 'numeric',
55
- month: '2-digit',
56
- day: '2-digit',
57
- hour: '2-digit',
58
- minute: '2-digit',
59
- timeZoneName: 'short'
60
- }),
61
- downloadUrl,
62
- releaseNotes: manifest.releaseNotes || ''
63
- });
64
- } else {
65
- resolve({
66
- hasUpdate: false,
67
- currentVersion,
68
- latestVersion
69
- });
70
- }
71
- } catch (error) {
72
- console.error('Error parsing version manifest:', error);
73
- resolve({ hasUpdate: false, currentVersion, error: error.message });
74
- }
75
- });
76
- }).on('error', (error) => {
77
- console.error('Error checking for Electron updates:', error);
78
- resolve({ hasUpdate: false, currentVersion, error: error.message });
79
- });
80
- });
81
- }
82
-
83
- module.exports = {
84
- checkForElectronUpdates
85
- };
1
+ const https = require('https');
2
+
3
+ /**
4
+ * Format version timestamp to YYYY.MM.DD.HHMM (TIMEZONE)
5
+ */
6
+ function formatVersionTimestamp(versionString, date) {
7
+ // Version format: YYYY.MM.DD.HHMM
8
+ const match = versionString.match(/^(\d{4})\.(\d{2})\.(\d{2})\.(\d{2})(\d{2})$/);
9
+ if (!match) return versionString;
10
+
11
+ try {
12
+ // Parse the version timestamp to get the actual time zone abbreviation
13
+ const [, year, month, day, hour, minute] = match;
14
+ const versionDate = new Date(`${year}-${month}-${day}T${hour}:${minute}:00Z`);
15
+
16
+ const timeZone = Intl.DateTimeFormat().resolvedOptions().timeZone;
17
+ const timeZoneAbbr = new Intl.DateTimeFormat('en-US', {
18
+ timeZone,
19
+ timeZoneName: 'short'
20
+ }).format(versionDate).split(' ').pop();
21
+
22
+ return `${versionString} (${timeZoneAbbr})`;
23
+ } catch (error) {
24
+ return `${versionString} (UTC)`;
25
+ }
26
+ }
27
+
28
+ /**
29
+ * Check for Electron app updates from S3 version manifest
30
+ * @param {string} currentVersion - Current version (e.g., '2025.11.26.0519')
31
+ * @returns {Promise<Object>} Update info or null if no update available
32
+ */
33
+ async function checkForElectronUpdates(currentVersion) {
34
+ return new Promise((resolve, reject) => {
35
+ const manifestUrl = `https://vibecodingmachine-website.s3.amazonaws.com/downloads/version.json?t=${Date.now()}`;
36
+
37
+ https.get(manifestUrl, (res) => {
38
+ let data = '';
39
+
40
+ // Check HTTP status code
41
+ if (res.statusCode !== 200) {
42
+ console.log(`ℹ️ Update check skipped: version manifest not available (HTTP ${res.statusCode})`);
43
+ resolve({ hasUpdate: false, currentVersion, error: `HTTP ${res.statusCode}` });
44
+ return;
45
+ }
46
+
47
+ res.on('data', (chunk) => {
48
+ data += chunk;
49
+ });
50
+
51
+ res.on('end', () => {
52
+ try {
53
+ const manifest = JSON.parse(data);
54
+ const latestVersion = manifest.version;
55
+ const publishedDate = manifest.date;
56
+
57
+ // Detect architecture and choose appropriate download URL
58
+ const arch = process.arch; // 'arm64' or 'x64'
59
+ const platform = process.platform; // 'darwin' or 'win32'
60
+ const baseUrl = 'https://vibecodingmachine-website.s3.amazonaws.com/downloads';
61
+
62
+ let downloadUrl;
63
+ if (platform === 'darwin') {
64
+ // Try architecture-specific first, fallback to universal
65
+ if (arch === 'arm64') {
66
+ downloadUrl = `${baseUrl}/VibeCodingMachine-${latestVersion}-arm64.dmg`;
67
+ } else if (arch === 'x64') {
68
+ downloadUrl = `${baseUrl}/VibeCodingMachine-${latestVersion}-x64.dmg`;
69
+ } else {
70
+ downloadUrl = `${baseUrl}/VibeCodingMachine-${latestVersion}.dmg`;
71
+ }
72
+ } else if (platform === 'win32') {
73
+ downloadUrl = `${baseUrl}/VibeCodingMachine-${latestVersion}-win32-x64.zip`;
74
+ } else {
75
+ downloadUrl = baseUrl;
76
+ }
77
+
78
+ if (latestVersion !== currentVersion) {
79
+ resolve({
80
+ hasUpdate: true,
81
+ currentVersion,
82
+ currentVersionFormatted: formatVersionTimestamp(currentVersion, publishedDate),
83
+ latestVersion,
84
+ latestVersionFormatted: formatVersionTimestamp(latestVersion, publishedDate),
85
+ publishedDate: formatVersionTimestamp(latestVersion, publishedDate),
86
+ commit: manifest.commit || 'Unknown',
87
+ downloadUrl
88
+ });
89
+ } else {
90
+ resolve({
91
+ hasUpdate: false,
92
+ currentVersion,
93
+ currentVersionFormatted: formatVersionTimestamp(currentVersion, publishedDate),
94
+ latestVersion,
95
+ latestVersionFormatted: formatVersionTimestamp(latestVersion, publishedDate)
96
+ });
97
+ }
98
+ } catch (error) {
99
+ console.error('Error parsing version manifest:', error);
100
+ resolve({ hasUpdate: false, currentVersion, error: error.message });
101
+ }
102
+ });
103
+ }).on('error', (error) => {
104
+ console.error('Error checking for Electron updates:', error);
105
+ resolve({ hasUpdate: false, currentVersion, error: error.message });
106
+ });
107
+ });
108
+ }
109
+
110
+ module.exports = {
111
+ checkForElectronUpdates,
112
+ formatVersionTimestamp
113
+ };