agentic-workflow-manager 9.11.8 → 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.
- package/dist/tests/integration/published-doctor-evidence.e2e.test.js +12 -1
- package/package.json +1 -1
- package/prebuilds/darwin-arm64/secure_fs.node +0 -0
- package/prebuilds/darwin-x64/secure_fs.node +0 -0
- package/prebuilds/win32-arm64/secure_fs.node +0 -0
- package/prebuilds/win32-x64/secure_fs.node +0 -0
|
@@ -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
|
-
|
|
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
|
});
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|