@agentteams/runner 0.0.114 → 0.0.115

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.
@@ -0,0 +1,28 @@
1
+ import assert from 'node:assert/strict';
2
+ import test from 'node:test';
3
+ import { classifyInstallError, describeInstallError, normalizeInstallError } from './npm-install-error.js';
4
+ test('classifyInstallError detects permission failures from real npm output', () => {
5
+ const eacces = new Error([
6
+ 'Command failed: /usr/bin/npm install -g @agentteams/runner@0.0.114',
7
+ 'npm ERR! code EACCES',
8
+ 'npm ERR! syscall rename',
9
+ 'npm ERR! errno -13',
10
+ ].join('\n'));
11
+ assert.equal(classifyInstallError(eacces), 'PERMISSION_DENIED');
12
+ assert.equal(classifyInstallError(new Error('npm ERR! code EPERM')), 'PERMISSION_DENIED');
13
+ assert.equal(classifyInstallError(new Error('sh: Permission denied')), 'PERMISSION_DENIED');
14
+ });
15
+ test('classifyInstallError falls back to UNKNOWN for other failures', () => {
16
+ assert.equal(classifyInstallError(new Error('network unavailable')), 'UNKNOWN');
17
+ assert.equal(classifyInstallError('ETARGET no matching version'), 'UNKNOWN');
18
+ });
19
+ test('describeInstallError keeps the remediation wording for permission failures', () => {
20
+ assert.match(describeInstallError(new Error('npm ERR! code EACCES')), /elevated permissions/);
21
+ assert.match(describeInstallError(new Error('network unavailable')), /Failed to install the latest AgentRunner/);
22
+ });
23
+ test('normalizeInstallError returns an Error carrying the described message', () => {
24
+ const normalized = normalizeInstallError(new Error('npm ERR! code EACCES'));
25
+ assert.ok(normalized instanceof Error);
26
+ assert.equal(normalized.message, describeInstallError(new Error('npm ERR! code EACCES')));
27
+ });
28
+ //# sourceMappingURL=npm-install-error.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"npm-install-error.test.js","sourceRoot":"","sources":["../../src/utils/npm-install-error.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC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AC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC;IAC5E,MAAM,CAAC,EAAE,CAAC,UAAU,YAAY,KAAK,CAAC,CAAC;IACvC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,EAAE,oBAAoB,CAAC,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;AAC5F,CAAC,CAAC,CAAC"}
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "version": "0.0.114",
3
+ "version": "0.0.115",
4
4
  "platform": "win32",
5
5
  "arch": "x64",
6
6
  "fileName": "agentrunner-launcher.exe",
7
- "sha256": "57d5ee98e3f5a8cda9798b9b03e2fcd2c27cd1b86c6ce1a2226405eb4fe40b96"
7
+ "sha256": "bca2af88f0e26efe547b71f4b003db19a0fbc71f04c6e8716c49cc755f710a2b"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentteams/runner",
3
- "version": "0.0.114",
3
+ "version": "0.0.115",
4
4
  "description": "AgentRunner - Background runner that polls and executes AI agent tasks",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",