viepilot 3.12.0 → 3.12.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/CHANGELOG.md +7 -0
- package/bin/vp-tools.cjs +33 -0
- package/lib/viepilot-update.cjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
+
## [3.12.1] - 2026-05-26
|
|
13
|
+
### Fixed
|
|
14
|
+
- `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)
|
|
15
|
+
- `lib/viepilot-update.cjs`: reduce version cache TTL 24h → 6h for more timely update notices (DEBT-003)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
12
19
|
## [3.12.0] - 2026-05-25
|
|
13
20
|
### Changed
|
|
14
21
|
- `workflows/autonomous.md`: tracker-agent now rewrites Current State block (find-and-replace)
|
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-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 =
|