agentic-workflow-manager 9.11.7 → 9.11.9

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.
@@ -17,6 +17,7 @@ const canonical_1 = require("../../../src/core/model-policy/canonical");
17
17
  const capabilities_1 = require("../../../src/core/model-policy/capabilities");
18
18
  const journal_1 = require("../../../src/core/model-policy/journal");
19
19
  const types_1 = require("../../../src/core/journal/types");
20
+ const fixture_cleanup_1 = require("../../helpers/fixture-cleanup");
20
21
  const stdoutWrite = jest.spyOn(process.stdout, 'write').mockImplementation(() => true);
21
22
  const repositoryRoot = path_1.default.resolve(__dirname, '../../../..');
22
23
  const approved = (0, validate_1.validatePlanFile)('docs/plans/2026-09-14-compact-only-bootstrap-plan.md', repositoryRoot);
@@ -181,7 +182,7 @@ describe('plan validate Commander wiring', () => {
181
182
  expect(fs_1.default.readFileSync(plan).equals(before)).toBe(true);
182
183
  }
183
184
  finally {
184
- fs_1.default.rmSync(fixtureRoot, { recursive: true, force: true });
185
+ (0, fixture_cleanup_1.removeFixtureTree)(fixtureRoot);
185
186
  }
186
187
  });
187
188
  it.each([
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.removeFixtureTree = removeFixtureTree;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const REMOVE_OPTIONS = {
10
+ recursive: true,
11
+ force: true,
12
+ maxRetries: 10,
13
+ retryDelay: 50,
14
+ };
15
+ /** Removes an isolated test fixture while tolerating short-lived Windows locks. */
16
+ function removeFixtureTree(target, remove = fs_1.default.rmSync) {
17
+ if (typeof target !== 'string' || !path_1.default.isAbsolute(target)) {
18
+ throw new Error('fixture cleanup requires an absolute path');
19
+ }
20
+ remove(target, REMOVE_OPTIONS);
21
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fixture_cleanup_1 = require("./fixture-cleanup");
4
+ describe('removeFixtureTree', () => {
5
+ it('uses bounded native retries for transient filesystem locks', () => {
6
+ const remove = jest.fn();
7
+ (0, fixture_cleanup_1.removeFixtureTree)('/tmp/fixture', remove);
8
+ expect(remove).toHaveBeenCalledWith('/tmp/fixture', {
9
+ recursive: true,
10
+ force: true,
11
+ maxRetries: 10,
12
+ retryDelay: 50,
13
+ });
14
+ });
15
+ it.each(['', 'relative-fixture'])('rejects an unsafe fixture path %j', target => {
16
+ expect(() => (0, fixture_cleanup_1.removeFixtureTree)(target)).toThrow('fixture cleanup requires an absolute path');
17
+ });
18
+ });
@@ -29,6 +29,13 @@ function command(cwd, executable, args, env = process.env) {
29
29
  const needsShell = process.platform === 'win32' && executable === 'npm';
30
30
  return (0, child_process_1.spawnSync)(executable, args, { cwd, encoding: 'utf8', env, shell: needsShell });
31
31
  }
32
+ function assertCommandSucceeded(result, label) {
33
+ if (result.status === 0)
34
+ return;
35
+ const output = [result.error?.message, result.stderr, result.stdout]
36
+ .filter(Boolean).join('\n').trim().slice(-4_000);
37
+ throw new Error(`${label} failed (status=${String(result.status)}, signal=${String(result.signal)})${output ? `\n${output}` : ''}`);
38
+ }
32
39
  /** Published evidence accepts only exact versions and immutable git tags. */
33
40
  function assertImmutableArtifacts(version, tag, commit, remote) {
34
41
  if (!version || !/^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/.test(version))
@@ -97,7 +104,7 @@ acceptance('published doctor and evidence acceptance (R8.7)', () => {
97
104
  const home = path_1.default.join(root, 'home');
98
105
  fs_1.default.mkdirSync(project, { recursive: true });
99
106
  fs_1.default.mkdirSync(home, { recursive: true });
100
- expect(command(root, 'npm', ['install', '--prefix', artifacts, '--ignore-scripts', '--no-audit', '--no-fund', `agentic-workflow-manager@${cliVersion}`]).status).toBe(0);
107
+ assertCommandSucceeded(command(root, 'npm', ['install', '--prefix', artifacts, '--ignore-scripts', '--no-audit', '--no-fund', `agentic-workflow-manager@${cliVersion}`]), `npm install agentic-workflow-manager@${cliVersion}`);
101
108
  expect(command(root, 'git', ['clone', '--depth', '1', '--branch', registryTag, registryRemote, registry]).status).toBe(0);
102
109
  expect(command(registry, 'git', ['describe', '--exact-match', '--tags', 'HEAD']).stdout.trim()).toBe(registryTag);
103
110
  expect(command(registry, 'git', ['rev-parse', 'HEAD']).stdout.trim()).toBe(registryCommit);
@@ -154,6 +161,10 @@ acceptance('published doctor and evidence acceptance (R8.7)', () => {
154
161
  });
155
162
  });
156
163
  describe('published artifact provenance guard', () => {
164
+ test('reports the command diagnostic when an exact install fails', () => {
165
+ const failure = { status: 1, signal: null, stdout: '', stderr: 'npm ERR! code E404\nnpm ERR! tarball not found' };
166
+ expect(() => assertCommandSucceeded(failure, 'npm install agentic-workflow-manager@9.8.0')).toThrow(/E404[\s\S]*tarball not found/);
167
+ });
157
168
  test.each(['file:../cli', '../cli', 'latest', 'workspace:*', '8.4.0@latest'])('rejects mutable CLI reference %s', (version) => {
158
169
  expect(() => assertImmutableArtifacts(version, 'v3.2.0', 'a'.repeat(40), registryRemote)).toThrow(/published CLI/i);
159
170
  });
@@ -7,6 +7,7 @@ const child_process_1 = require("child_process");
7
7
  const fs_1 = __importDefault(require("fs"));
8
8
  const os_1 = __importDefault(require("os"));
9
9
  const path_1 = __importDefault(require("path"));
10
+ const fixture_cleanup_1 = require("../helpers/fixture-cleanup");
10
11
  const cliDir = path_1.default.resolve(__dirname, '../..');
11
12
  const bin = path_1.default.join(cliDir, 'dist/src/index.js');
12
13
  function writeJson(file, value) {
@@ -126,6 +127,6 @@ test('compiled sensors run materializes a v2 registry command and passes its lit
126
127
  expect(fs_1.default.existsSync(path_1.default.join(fixture.project, 'structured-shell-injection'))).toBe(false);
127
128
  }
128
129
  finally {
129
- fs_1.default.rmSync(fixture.root, { recursive: true, force: true });
130
+ (0, fixture_cleanup_1.removeFixtureTree)(fixture.root);
130
131
  }
131
132
  });
@@ -9,14 +9,12 @@ const path_1 = __importDefault(require("path"));
9
9
  const CLI_ROOT = path_1.default.resolve(__dirname, '..', '..');
10
10
  const REPO_ROOT = path_1.default.resolve(CLI_ROOT, '..');
11
11
  describe('native release artifacts', () => {
12
- it('checks Windows admission before full suites and stops a failed suite without weakening publication', () => {
12
+ it('runs each platform suite once without weakening publication', () => {
13
13
  for (const name of ['ci.yml', 'release.yml']) {
14
14
  const workflow = fs_1.default.readFileSync(path_1.default.join(REPO_ROOT, '.github', 'workflows', name), 'utf8');
15
- expect(workflow).toContain('- name: Windows admission smoke');
16
- expect(workflow).toContain("if: runner.os == 'Windows'");
17
- expect(workflow).toContain('run: npx jest tests/commands/plan/index.test.ts --runInBand --bail');
15
+ expect(workflow).not.toContain('- name: Windows admission smoke');
16
+ expect(workflow).not.toContain('run: npx jest tests/commands/plan/index.test.ts --runInBand --bail');
18
17
  expect(workflow).toContain('run: npx jest --runInBand --bail');
19
- expect(workflow.indexOf('- name: Windows admission smoke')).toBeLessThan(workflow.indexOf('run: npx jest --runInBand --bail'));
20
18
  }
21
19
  const release = fs_1.default.readFileSync(path_1.default.join(REPO_ROOT, '.github', 'workflows', 'release.yml'), 'utf8');
22
20
  expect(release).toMatch(/release:\s*\n\s*needs: test/);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-workflow-manager",
3
- "version": "9.11.7",
3
+ "version": "9.11.9",
4
4
  "main": "dist/src/index.js",
5
5
  "bin": {
6
6
  "awm": "./dist/src/index.js"
@@ -52,7 +52,7 @@
52
52
  "commander": "^14.0.3",
53
53
  "picocolors": "^1.1.1",
54
54
  "semver": "^7.7.4",
55
- "simple-git": "^3.32.2"
55
+ "simple-git": "3.36.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/jest": "^30.0.0",
@@ -64,7 +64,7 @@
64
64
  "dependency-cruiser": "16.10.4",
65
65
  "eslint": "10.8.1",
66
66
  "jest": "^30.2.0",
67
- "js-yaml": "4.1.0",
67
+ "js-yaml": "4.3.2",
68
68
  "node-gyp": "^11.5.0",
69
69
  "ts-jest": "^29.4.6",
70
70
  "ts-node": "^10.9.2",
Binary file
Binary file