vg-coder-cli 2.0.48 → 2.0.49
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/INTEGRATION.md +1 -1
- package/README.md +52 -6
- package/package.json +1 -1
- package/src/index.js +2 -1
- package/src/server/api-server.js +9 -4
- package/src/server/views/vg-coder/background.js +40 -4
- package/src/server/views/vg-coder/manifest.json +1 -10
- package/src/server/views/vg-coder/rules.json +0 -23
package/INTEGRATION.md
CHANGED
package/README.md
CHANGED
|
@@ -94,8 +94,8 @@ GET http://localhost:6868/health
|
|
|
94
94
|
```json
|
|
95
95
|
{
|
|
96
96
|
"status": "ok",
|
|
97
|
-
"version": "
|
|
98
|
-
"timestamp": "
|
|
97
|
+
"version": "2.0.48",
|
|
98
|
+
"timestamp": "2026-05-09T10:07:13.000Z"
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
@@ -308,8 +308,9 @@ curl -X POST http://localhost:6868/api/execute \
|
|
|
308
308
|
## 🔧 Development
|
|
309
309
|
|
|
310
310
|
```bash
|
|
311
|
-
# Install dependencies
|
|
311
|
+
# Install dependencies (root + extension)
|
|
312
312
|
npm install
|
|
313
|
+
cd vetgo-auto && npm install && cd ..
|
|
313
314
|
|
|
314
315
|
# Run tests
|
|
315
316
|
npm test
|
|
@@ -317,10 +318,42 @@ npm test
|
|
|
317
318
|
# Run in dev mode
|
|
318
319
|
npm run dev
|
|
319
320
|
|
|
320
|
-
#
|
|
321
|
-
npm run
|
|
321
|
+
# Local full build (extension + dashboard bundle + global install)
|
|
322
|
+
npm run build
|
|
322
323
|
```
|
|
323
324
|
|
|
325
|
+
## 🚢 Release
|
|
326
|
+
|
|
327
|
+
CI tự publish lên npm khi `package.json` version đổi. Chỉ dùng 1 lệnh tuỳ loại bump:
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
npm run release:patch # 2.0.48 → 2.0.49 (bug fix)
|
|
331
|
+
npm run release:minor # 2.0.48 → 2.1.0 (feature mới)
|
|
332
|
+
npm run release:major # 2.0.48 → 3.0.0 (breaking change)
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
Mỗi lệnh tự `npm version <bump>` (commit + tag) rồi `git push --follow-tags origin main`. GitHub Actions workflow `.github/workflows/publish.yml` chạy tự động:
|
|
336
|
+
|
|
337
|
+
1. So sánh `package.json` version với `npm view vg-coder-cli version`. Bằng nhau → skip.
|
|
338
|
+
2. `npm ci` root + `vetgo-auto`, build extension, copy vào `src/server/views/vg-coder/`, build dashboard bundle.
|
|
339
|
+
3. `npm publish --access public` (cần secret repo `NPM_TOKEN` — granular access token với "bypass 2FA").
|
|
340
|
+
4. Tag `v<version>` (skip nếu đã có) + tạo GitHub Release auto-generated notes.
|
|
341
|
+
|
|
342
|
+
Manual trigger: GitHub repo → **Actions** → **Publish to npm** → **Run workflow**.
|
|
343
|
+
|
|
344
|
+
### Update notifier
|
|
345
|
+
|
|
346
|
+
CLI dùng `update-notifier` v5.1.0 — sau lần chạy đầu, nếu có version mới trên npm sẽ in banner cuối tiến trình:
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
╭─────────────────────────────────────────╮
|
|
350
|
+
│ Update available 2.0.48 → 2.0.49 │
|
|
351
|
+
│ Run npm i -g vg-coder-cli to update │
|
|
352
|
+
╰─────────────────────────────────────────╯
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
Cache check 6h ở `~/.config/configstore/update-notifier-vg-coder-cli.json`. Tự bypass khi offline / non-interactive shell.
|
|
356
|
+
|
|
324
357
|
## 🤝 Đóng góp
|
|
325
358
|
|
|
326
359
|
1. Fork repository
|
|
@@ -336,7 +369,20 @@ MIT License - xem file [LICENSE](LICENSE) để biết thêm chi tiết.
|
|
|
336
369
|
|
|
337
370
|
## 📊 Version History
|
|
338
371
|
|
|
339
|
-
###
|
|
372
|
+
### v2.0.48 (Latest)
|
|
373
|
+
- 🤖 Remote Task API: external service push task chat AI Studio + nhận callback (`POST /api/tasks` + webhook)
|
|
374
|
+
- 🧠 Multi-worker pool: mỗi Chrome profile = 1 worker, parallel + auto-failover khi rate-limit
|
|
375
|
+
- 🪟 Launcher SW per profile + tab management API (`GET /api/launcher/tabs`, `POST /api/launcher/{open,close}-tab`)
|
|
376
|
+
- 🔁 Auto-recycle tab sau mỗi task để lock model `gemini-3-flash-preview` (free + multimodal)
|
|
377
|
+
- 🛡️ Auto-dismiss modal: "Start creating with media", "Link a paid API key", ToS update, preference vote
|
|
378
|
+
- 📸 Native screenshot (`chrome.tabs.captureVisibleTab`) thay html2canvas — 5x nhanh hơn, sạch CORS
|
|
379
|
+
- 🪵 Console + window.error ring buffer 200 + REST `POST /api/worker/logs`
|
|
380
|
+
- 🚢 GitHub Actions auto-publish khi version bump + `npm run release:{patch,minor,major}`
|
|
381
|
+
- 🔔 update-notifier banner cho end-user khi có version mới
|
|
382
|
+
|
|
383
|
+
Xem chi tiết: [INTEGRATION.md](INTEGRATION.md)
|
|
384
|
+
|
|
385
|
+
### v1.0.10
|
|
340
386
|
- ✨ Added API Server with REST endpoints
|
|
341
387
|
- 🎨 Beautiful dashboard UI with auto-open browser
|
|
342
388
|
- ⚡ Bash script execution with validation
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -56,6 +56,7 @@ class VGCoderCLI {
|
|
|
56
56
|
.alias('s')
|
|
57
57
|
.description('Khởi động API server')
|
|
58
58
|
.option('-p, --port <port>', 'Port cho server', '6868')
|
|
59
|
+
.option('--host <host>', 'Bind address (loopback mặc định, set 0.0.0.0 để LAN/Docker)', process.env.VG_HOST || '127.0.0.1')
|
|
59
60
|
.action(this.handleStart.bind(this));
|
|
60
61
|
}
|
|
61
62
|
|
|
@@ -220,7 +221,7 @@ class VGCoderCLI {
|
|
|
220
221
|
|
|
221
222
|
console.log(chalk.blue('\n🚀 Starting VG Coder Server...'));
|
|
222
223
|
|
|
223
|
-
const server = new ApiServer(initialPort);
|
|
224
|
+
const server = new ApiServer(initialPort, options.host);
|
|
224
225
|
const lockAcquired = await projectManager.acquireLock(initialPort);
|
|
225
226
|
if (!lockAcquired) throw new Error('Failed to acquire leader lock');
|
|
226
227
|
|
package/src/server/api-server.js
CHANGED
|
@@ -22,8 +22,9 @@ const taskStore = require('./task-store');
|
|
|
22
22
|
const multer = require('multer');
|
|
23
23
|
|
|
24
24
|
class ApiServer {
|
|
25
|
-
constructor(port = 6868) {
|
|
25
|
+
constructor(port = 6868, host = process.env.VG_HOST || '127.0.0.1') {
|
|
26
26
|
this.port = port;
|
|
27
|
+
this.host = host;
|
|
27
28
|
this.app = express();
|
|
28
29
|
this.httpServer = http.createServer(this.app);
|
|
29
30
|
this.io = new Server(this.httpServer, { cors: { origin: "*" } });
|
|
@@ -797,11 +798,15 @@ class ApiServer {
|
|
|
797
798
|
}
|
|
798
799
|
};
|
|
799
800
|
this.httpServer.once('error', onError);
|
|
800
|
-
this.server = this.httpServer.listen(port,
|
|
801
|
+
this.server = this.httpServer.listen(port, this.host, () => {
|
|
801
802
|
this.httpServer.removeListener('error', onError);
|
|
802
803
|
this.port = this.server.address().port;
|
|
803
|
-
|
|
804
|
-
console.log(chalk.
|
|
804
|
+
const display = this.host === '0.0.0.0' ? 'localhost' : this.host;
|
|
805
|
+
console.log(chalk.green(`🚀 Server Online: http://${display}:${this.port}`));
|
|
806
|
+
if (this.host === '0.0.0.0') {
|
|
807
|
+
console.log(chalk.gray(` (binding 0.0.0.0 — reachable from LAN/Docker)`));
|
|
808
|
+
}
|
|
809
|
+
console.log(chalk.blue(`📦 Dist served at: http://${display}:${this.port}/dist`));
|
|
805
810
|
taskQueue.rehydrateFromProjects(this.projectManager).catch(err => {
|
|
806
811
|
console.log(chalk.yellow(`[TaskQueue] Rehydrate failed: ${err.message}`));
|
|
807
812
|
});
|