ai_co_discuss 0.4.38 → 0.4.39

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.4.38",
3
+ "version": "0.4.39",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
@@ -52,7 +52,9 @@ async function main() {
52
52
  for (let waited = 0; waited < EXIT_WAIT_MS && alive(Number(values.pid)); waited += POLL_MS) await sleep(POLL_MS);
53
53
  let failure = null;
54
54
  for (let attempt = 1; attempt <= INSTALL_ATTEMPTS; attempt += 1) {
55
- try { await npm(['install', '--global', `${NPM_PACKAGE}@${job.version}`], values.data); failure = null; break; }
55
+ // --prefer-online: the version was just read from the registry, while npm's cached package list may predate it
56
+ // (a fresh release fails with "notarget" until the cache expires).
57
+ try { await npm(['install', '--global', '--prefer-online', `${NPM_PACKAGE}@${job.version}`], values.data); failure = null; break; }
56
58
  catch (error) { failure = error; if (attempt < INSTALL_ATTEMPTS) await sleep(RETRY_MS); }
57
59
  }
58
60
  save(failure ? { status: 'install_failed', steps: [...job.steps, `安装失败:${failure.message}`] }