viepilot 3.12.0 → 3.12.2
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/CHANGELOG.md +14 -0
- package/bin/viepilot.cjs +30 -0
- package/bin/vp-tools.cjs +33 -0
- package/lib/viepilot-install.cjs +2 -0
- package/lib/viepilot-update.cjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## [3.12.2] - 2026-05-30
|
|
13
|
+
### Fixed
|
|
14
|
+
- BUG-032: `npx viepilot install` silently missed new skills (e.g. `vp-qa`) when the globally-installed package was behind npm latest (2.50.1 vs 3.12.1). `installCommand` now prints a non-blocking version-mismatch warning with the upgrade command when installed < npm latest.
|
|
15
|
+
- BUG-032: `applyInstallPlan` now logs `new: {path}` when a `copy_dir` step creates a directory for the first time, making newly-added skills visible in the install output instead of appearing silently.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## [3.12.1] - 2026-05-26
|
|
20
|
+
### Fixed
|
|
21
|
+
- `bin/vp-tools.cjs` `check-update --silent`: OS session guard file (`/tmp/vp-update-check-{today}.done`) — subsequent skill invocations skip npm call entirely, exit with 0 stdout (0 tokens) (DEBT-003)
|
|
22
|
+
- `lib/viepilot-update.cjs`: reduce version cache TTL 24h → 6h for more timely update notices (DEBT-003)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
12
26
|
## [3.12.0] - 2026-05-25
|
|
13
27
|
### Changed
|
|
14
28
|
- `workflows/autonomous.md`: tracker-agent now rewrites Current State block (find-and-replace)
|
package/bin/viepilot.cjs
CHANGED
|
@@ -15,6 +15,12 @@ const { buildInstallPlan, applyInstallPlan, resolveViepilotPackageRoot } = requi
|
|
|
15
15
|
'viepilot-install.cjs',
|
|
16
16
|
));
|
|
17
17
|
const { adapters: adapterMap } = require(path.join(__dirname, '..', 'lib', 'adapters', 'index.cjs'));
|
|
18
|
+
const { readInstalledVersion, fetchLatestNpmVersion } = require(path.join(
|
|
19
|
+
__dirname, '..', 'lib', 'viepilot-info.cjs'
|
|
20
|
+
));
|
|
21
|
+
const { compareSemver } = require(path.join(
|
|
22
|
+
__dirname, '..', 'lib', 'viepilot-update.cjs'
|
|
23
|
+
));
|
|
18
24
|
|
|
19
25
|
// UI target list — keep cursor-agent and cursor-ide as distinct choices for users.
|
|
20
26
|
const LANGUAGES = [
|
|
@@ -362,6 +368,30 @@ async function installCommand(rawArgs) {
|
|
|
362
368
|
|
|
363
369
|
console.log(`\nSelected targets: ${selectedTargets.join(', ')}`);
|
|
364
370
|
console.log(`Communication language: ${communicationLang}`);
|
|
371
|
+
|
|
372
|
+
// BUG-032: warn when installed version is behind npm latest — new skills may be missing
|
|
373
|
+
try {
|
|
374
|
+
const pkgRoot = resolveViepilotPackageRoot(__dirname);
|
|
375
|
+
const installed = pkgRoot ? readInstalledVersion(pkgRoot) : null;
|
|
376
|
+
const latest = fetchLatestNpmVersion();
|
|
377
|
+
if (installed && latest.ok && compareSemver(installed, latest.version) < 0) {
|
|
378
|
+
const line1 = `⚠ viepilot@${installed} is behind npm@${latest.version}`;
|
|
379
|
+
const line2 = ' New skills in the latest version may not be installed.';
|
|
380
|
+
const line3 = ' Upgrade first:';
|
|
381
|
+
const line4 = ' npm i -g viepilot && vp-tools install';
|
|
382
|
+
const W = 65;
|
|
383
|
+
const bar = '─'.repeat(W);
|
|
384
|
+
console.log(`\n┌${bar}┐`);
|
|
385
|
+
console.log(`│ ${line1.padEnd(W - 1)}│`);
|
|
386
|
+
console.log(`│ ${line2.padEnd(W - 1)}│`);
|
|
387
|
+
console.log(`│ ${line3.padEnd(W - 1)}│`);
|
|
388
|
+
console.log(`│ ${line4.padEnd(W - 1)}│`);
|
|
389
|
+
console.log(`└${bar}┘`);
|
|
390
|
+
}
|
|
391
|
+
} catch (_) {
|
|
392
|
+
// non-blocking — network or fs errors must not abort install
|
|
393
|
+
}
|
|
394
|
+
|
|
365
395
|
const run = runInstallViaNode(selectedTargets, options.dryRun, communicationLang);
|
|
366
396
|
const results = selectedTargets.map((target) => ({
|
|
367
397
|
ok: run.ok,
|
package/bin/vp-tools.cjs
CHANGED
|
@@ -1174,10 +1174,43 @@ ${colors.cyan}Examples:${colors.reset}
|
|
|
1174
1174
|
const silent = args.includes('--silent');
|
|
1175
1175
|
const json = args.includes('--json');
|
|
1176
1176
|
const force = args.includes('--force');
|
|
1177
|
+
|
|
1178
|
+
// OS session guard — skip npm check if already done today (DEBT-003)
|
|
1179
|
+
if (!force && !json) {
|
|
1180
|
+
const _os = require('os');
|
|
1181
|
+
const _today = new Date().toISOString().split('T')[0];
|
|
1182
|
+
const _guardFile = require('path').join(_os.tmpdir(), `vp-update-check-${_today}.done`);
|
|
1183
|
+
if (fs.existsSync(_guardFile)) {
|
|
1184
|
+
try {
|
|
1185
|
+
const _g = JSON.parse(fs.readFileSync(_guardFile, 'utf8'));
|
|
1186
|
+
if (silent) {
|
|
1187
|
+
if (_g.updateAvailable) { process.stdout.write(_g.latest + '\n'); process.exit(1); }
|
|
1188
|
+
process.exit(0);
|
|
1189
|
+
}
|
|
1190
|
+
process.exit(0);
|
|
1191
|
+
} catch (_) { /* corrupt guard — fall through */ }
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1177
1195
|
const { checkLatestVersion } = require('../lib/viepilot-update.cjs');
|
|
1178
1196
|
|
|
1179
1197
|
checkLatestVersion({ force })
|
|
1180
1198
|
.then(({ upToDate, installed, latest }) => {
|
|
1199
|
+
// Write OS session guard for subsequent skill inits (DEBT-003)
|
|
1200
|
+
if (silent || !json) {
|
|
1201
|
+
try {
|
|
1202
|
+
const _os2 = require('os');
|
|
1203
|
+
const _today2 = new Date().toISOString().split('T')[0];
|
|
1204
|
+
const _gf = require('path').join(_os2.tmpdir(), `vp-update-check-${_today2}.done`);
|
|
1205
|
+
fs.writeFileSync(_gf, JSON.stringify({
|
|
1206
|
+
updateAvailable: !upToDate,
|
|
1207
|
+
latest,
|
|
1208
|
+
installed,
|
|
1209
|
+
checkedAt: new Date().toISOString()
|
|
1210
|
+
}));
|
|
1211
|
+
} catch (_) { /* non-fatal */ }
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1181
1214
|
const has_update = !upToDate;
|
|
1182
1215
|
if (json) {
|
|
1183
1216
|
process.stdout.write(JSON.stringify({ installed, latest, has_update }) + '\n');
|
package/lib/viepilot-install.cjs
CHANGED
|
@@ -465,7 +465,9 @@ function applyInstallPlan(plan, options = {}) {
|
|
|
465
465
|
if (!fs.existsSync(step.from)) {
|
|
466
466
|
throw new Error(`Missing source dir: ${step.from}`);
|
|
467
467
|
}
|
|
468
|
+
const isNewDir = !fs.existsSync(step.to);
|
|
468
469
|
copyDirRecursive(step.from, step.to);
|
|
470
|
+
if (isNewDir) logs.push(`new: ${step.to}`);
|
|
469
471
|
}
|
|
470
472
|
break;
|
|
471
473
|
case 'symlink_dir':
|
package/lib/viepilot-update.cjs
CHANGED
|
@@ -161,7 +161,7 @@ function runNpmUpdate(plan) {
|
|
|
161
161
|
*/
|
|
162
162
|
async function checkLatestVersion(opts = {}) {
|
|
163
163
|
const SILENT_RESULT = { upToDate: true, installed: '', latest: '' };
|
|
164
|
-
const TTL_MS =
|
|
164
|
+
const TTL_MS = 6 * 60 * 60 * 1000; // 6 hours
|
|
165
165
|
|
|
166
166
|
try {
|
|
167
167
|
const cacheFile =
|