loopengine 0.1.76 → 0.1.77

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.
@@ -10,6 +10,9 @@
10
10
  // left exactly as it was (`--keep-edited`), so an unattended upgrade can
11
11
  // never leave conflict markers that stop the server from starting. The
12
12
  // files it may change are backed up first and restored if it fails.
13
+ // Every npm install here passes --include=dev: with NODE_ENV=production
14
+ // npm would drop devDependencies, and an older project still lists tsx,
15
+ // which runs it, as one.
13
16
  import { execFile } from 'node:child_process';
14
17
  import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
15
18
  import { basename, dirname, join } from 'node:path';
@@ -146,7 +149,7 @@ export async function runUpgrade(options) {
146
149
  const current = loopengineVersion();
147
150
  if (latest && semver.valid(current) && semver.gt(latest, current) && !result.dependencies.some((d) => d.name === 'loopengine')) {
148
151
  try {
149
- await run('npm', ['install', '--no-audit', '--no-fund', `loopengine@^${latest}`], projectDir, 10 * 60_000);
152
+ await run('npm', ['install', '--include=dev', '--no-audit', '--no-fund', `loopengine@^${latest}`], projectDir, 10 * 60_000);
150
153
  }
151
154
  catch (err) {
152
155
  throw new UpgradeError(`Installing loopengine ${latest} failed: ${err instanceof Error ? err.message.split('\n')[0] : String(err)}`);
@@ -163,7 +166,7 @@ export async function runUpgrade(options) {
163
166
  catch (err) {
164
167
  restore(projectDir, saved);
165
168
  // package.json is back; put node_modules back in line with it.
166
- await run('npm', ['install', '--no-audit', '--no-fund'], projectDir, 10 * 60_000).catch(() => { });
169
+ await run('npm', ['install', '--include=dev', '--no-audit', '--no-fund'], projectDir, 10 * 60_000).catch(() => { });
167
170
  throw err instanceof UpgradeError ? err : new UpgradeError(err instanceof Error ? err.message : String(err));
168
171
  }
169
172
  finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loopengine",
3
- "version": "0.1.76",
3
+ "version": "0.1.77",
4
4
  "type": "module",
5
5
  "description": "Runtime for tool-using AI agents with a transparent ReAct loop.",
6
6
  "license": "MIT",