diff --git a/src/main/skills/skill-package-creation.test.ts b/src/main/skills/skill-package-creation.test.ts index 605c7f36c8b..78db2f8bba7 100644 --- a/src/main/skills/skill-package-creation.test.ts +++ b/src/main/skills/skill-package-creation.test.ts @@ -125,7 +125,7 @@ describe('skill package creation and extraction', () => { archiveSha256: created.archiveSha256, packageDigest: created.manifest.packageDigest }).toEqual({ - archiveSha256: '4a62b276b1e8100f0b437f2f0aa182d844768160ba30c5f76afd027acfe50ac8', + archiveSha256: '2abf449e92650f03b749631547c22e0f28facf6da9c36f0e77d6f8cc7df8e47a', packageDigest: '3bb1fc63cfea2f2b7f2cf80e539735eebd5bfb6aa65f47cf0db7e9fd35297f57' }) }) diff --git a/src/main/skills/skill-package-tar.ts b/src/main/skills/skill-package-tar.ts index f4295939396..72731beb652 100644 --- a/src/main/skills/skill-package-tar.ts +++ b/src/main/skills/skill-package-tar.ts @@ -4,7 +4,7 @@ import { once } from 'node:events' import type { Readable, Writable } from 'node:stream' import { Transform } from 'node:stream' import { pipeline } from 'node:stream/promises' -import { createGunzip, createGzip } from 'node:zlib' +import { constants as zlibConstants, createGunzip, createGzip } from 'node:zlib' import { SKILL_PACKAGE_MAX_COMPRESSED_BYTES } from '../../shared/skill-package-manifest' const TAR_BLOCK_BYTES = 512 @@ -103,7 +103,7 @@ export async function writeSkillTarGzip( ): Promise<{ archiveSha256: string; compressedBytes: number }> { const archiveHash = createHash('sha256') let compressedBytes = 0 - const gzip = createGzip({ level: 9 }) + const gzip = createGzip({ level: 9, strategy: zlibConstants.Z_FIXED }) const hashTransform = new Transform({ transform(chunk: Buffer, _encoding, callback) { compressedBytes += chunk.length