From c0dfbcb37559dc0ba10b8cefc9b4b0bd4412752f Mon Sep 17 00:00:00 2001 From: cxxxxxn Date: Mon, 19 Oct 2026 17:07:01 +0800 Subject: [PATCH 1/6] build(agentlet): upgrade TypeScript to 6.0.3 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- external/agentlet/packages/local/package.json | 2 +- external/agentlet/packages/protocol/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/external/agentlet/packages/local/package.json b/external/agentlet/packages/local/package.json index 2e7eb9747..5b92974b0 100644 --- a/external/agentlet/packages/local/package.json +++ b/external/agentlet/packages/local/package.json @@ -23,6 +23,6 @@ }, "devDependencies": { "@types/ws": "^8.5.0", - "typescript": "^5.9.0" + "typescript": "^6.0.3" } } diff --git a/external/agentlet/packages/protocol/package.json b/external/agentlet/packages/protocol/package.json index 9fe12b745..58b24b4c1 100644 --- a/external/agentlet/packages/protocol/package.json +++ b/external/agentlet/packages/protocol/package.json @@ -20,6 +20,6 @@ "lint": "tsc --noEmit" }, "devDependencies": { - "typescript": "^5.9.0" + "typescript": "^6.0.3" } } From a05bc8cb802f2f66f42b9a555893b9ffca95c7c4 Mon Sep 17 00:00:00 2001 From: cxxxxxn Date: Mon, 19 Oct 2026 17:07:03 +0800 Subject: [PATCH 2/6] build(agenetes): upgrade TypeScript to 6.0.3 Explicitly include Node.js types for the instance and profile registry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- external/agenetes/packages/acp-driver/package.json | 2 +- external/agenetes/packages/agenetes/package.json | 2 +- external/agenetes/packages/agenetes/tsconfig.json | 3 ++- external/agenetes/packages/agent-profile/package.json | 2 +- external/agenetes/packages/agent-profile/tsconfig.json | 3 ++- external/agenetes/packages/agentlet-gateway/package.json | 2 +- external/agenetes/packages/agentlet-host/package.json | 2 +- external/agenetes/packages/pi-driver/package.json | 2 +- external/agenetes/packages/protocol/package.json | 2 +- external/agenetes/packages/runtime/package.json | 2 +- 10 files changed, 12 insertions(+), 10 deletions(-) diff --git a/external/agenetes/packages/acp-driver/package.json b/external/agenetes/packages/acp-driver/package.json index 1caef17be..910dbe016 100644 --- a/external/agenetes/packages/acp-driver/package.json +++ b/external/agenetes/packages/acp-driver/package.json @@ -28,7 +28,7 @@ "zod": "^4.3.6" }, "devDependencies": { - "typescript": "^5.9.0", + "typescript": "^6.0.3", "vitest": "^4.1.11" } } diff --git a/external/agenetes/packages/agenetes/package.json b/external/agenetes/packages/agenetes/package.json index d5e0aca9e..f7e247267 100644 --- a/external/agenetes/packages/agenetes/package.json +++ b/external/agenetes/packages/agenetes/package.json @@ -26,7 +26,7 @@ }, "devDependencies": { "@types/node": "^22.15.0", - "typescript": "^5.9.0", + "typescript": "^6.0.3", "vitest": "^4.1.11" } } diff --git a/external/agenetes/packages/agenetes/tsconfig.json b/external/agenetes/packages/agenetes/tsconfig.json index ccf97bb50..eba0587ae 100644 --- a/external/agenetes/packages/agenetes/tsconfig.json +++ b/external/agenetes/packages/agenetes/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist", - "rootDir": "./src" + "rootDir": "./src", + "types": ["node"] }, "include": ["src"], "exclude": ["**/*.test.ts"] diff --git a/external/agenetes/packages/agent-profile/package.json b/external/agenetes/packages/agent-profile/package.json index c1b97943a..99a71de33 100644 --- a/external/agenetes/packages/agent-profile/package.json +++ b/external/agenetes/packages/agent-profile/package.json @@ -27,7 +27,7 @@ }, "devDependencies": { "@types/node": "^22.15.0", - "typescript": "^5.9.0", + "typescript": "^6.0.3", "vitest": "^4.1.11" } } diff --git a/external/agenetes/packages/agent-profile/tsconfig.json b/external/agenetes/packages/agent-profile/tsconfig.json index ccf97bb50..eba0587ae 100644 --- a/external/agenetes/packages/agent-profile/tsconfig.json +++ b/external/agenetes/packages/agent-profile/tsconfig.json @@ -2,7 +2,8 @@ "extends": "../../tsconfig.json", "compilerOptions": { "outDir": "./dist", - "rootDir": "./src" + "rootDir": "./src", + "types": ["node"] }, "include": ["src"], "exclude": ["**/*.test.ts"] diff --git a/external/agenetes/packages/agentlet-gateway/package.json b/external/agenetes/packages/agentlet-gateway/package.json index 10b42a4e1..f5173317e 100644 --- a/external/agenetes/packages/agentlet-gateway/package.json +++ b/external/agenetes/packages/agentlet-gateway/package.json @@ -27,7 +27,7 @@ "devDependencies": { "@types/node": "^22.15.0", "@types/ws": "^8.5.0", - "typescript": "^5.9.0", + "typescript": "^6.0.3", "vitest": "^4.1.11" } } diff --git a/external/agenetes/packages/agentlet-host/package.json b/external/agenetes/packages/agentlet-host/package.json index 74ad7bc7c..121c25edf 100644 --- a/external/agenetes/packages/agentlet-host/package.json +++ b/external/agenetes/packages/agentlet-host/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@types/ws": "^8.5.0", "fastify": "^5.12.5", - "typescript": "^5.9.0", + "typescript": "^6.0.3", "vitest": "^4.1.11", "ws": "^8.18.0" } diff --git a/external/agenetes/packages/pi-driver/package.json b/external/agenetes/packages/pi-driver/package.json index 6f256922f..4ea2496a6 100644 --- a/external/agenetes/packages/pi-driver/package.json +++ b/external/agenetes/packages/pi-driver/package.json @@ -28,7 +28,7 @@ "zod": "^4.3.6" }, "devDependencies": { - "typescript": "^5.9.0", + "typescript": "^6.0.3", "vitest": "^4.1.11" } } diff --git a/external/agenetes/packages/protocol/package.json b/external/agenetes/packages/protocol/package.json index 5e39e30d6..13205af7c 100644 --- a/external/agenetes/packages/protocol/package.json +++ b/external/agenetes/packages/protocol/package.json @@ -24,6 +24,6 @@ "zod": "^4.3.6" }, "devDependencies": { - "typescript": "^5.9.0" + "typescript": "^6.0.3" } } diff --git a/external/agenetes/packages/runtime/package.json b/external/agenetes/packages/runtime/package.json index ce231ee03..8d3fa56ec 100644 --- a/external/agenetes/packages/runtime/package.json +++ b/external/agenetes/packages/runtime/package.json @@ -23,6 +23,6 @@ "@agenetes/protocol": "workspace:*" }, "devDependencies": { - "typescript": "^5.9.0" + "typescript": "^6.0.3" } } From e7b012b5b3a523c1bb9771b121f636aa8cad8d12 Mon Sep 17 00:00:00 2001 From: cxxxxxn Date: Mon, 19 Oct 2026 17:07:04 +0800 Subject: [PATCH 3/6] build: align all workspaces on TypeScript 6.0.3 Migrate docs aliases away from baseUrl, declare SSR Node types, and remove the unused TypeScript 5 lockfile entry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- apps/docs/package.json | 2 +- apps/docs/tsconfig.json | 4 +- docs/architecture/desktop-auto-update.md | 6 +++ pnpm-lock.yaml | 51 ++++++++++-------------- 4 files changed, 31 insertions(+), 32 deletions(-) diff --git a/apps/docs/package.json b/apps/docs/package.json index 2e762cbc2..6243ceef9 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -30,7 +30,7 @@ "pagefind": "^1.4.0", "postcss": "^8.5.18", "tailwindcss": "^4.1.18", - "typescript": "^5.9.3", + "typescript": "^6.0.3", "vite": "^6.0.0", "vitest": "^4.1.11" } diff --git a/apps/docs/tsconfig.json b/apps/docs/tsconfig.json index 4c3bfe195..41b76620a 100644 --- a/apps/docs/tsconfig.json +++ b/apps/docs/tsconfig.json @@ -1,8 +1,7 @@ { "compilerOptions": { - "baseUrl": ".", "paths": { - "@/*": ["src/*"] + "@/*": ["./src/*"] }, "target": "ES2020", "useDefineForClassFields": true, @@ -16,6 +15,7 @@ "noEmit": true, "jsx": "react-jsx", "strict": true, + "types": ["node"], "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true diff --git a/docs/architecture/desktop-auto-update.md b/docs/architecture/desktop-auto-update.md index 0bb53cc78..9f55e2650 100644 --- a/docs/architecture/desktop-auto-update.md +++ b/docs/architecture/desktop-auto-update.md @@ -56,6 +56,12 @@ The `dist:*` scripts pass `--publish never`: electron-builder generates the upda The `.dmg` / `.exe` are the human-facing first installs; the `.zip` (Squirrel.Mac) and `latest*.yml` feeds are what the running app consumes. When a build is relocated from the build-source repo to the public distribution repo, these metadata files must move with it. +## TypeScript build toolchain + +All workspaces that declare TypeScript, including the Agentlet and Agenetes subtrees and the documentation site, use the same `^6.0.3` dependency range and resolve to TypeScript `6.0.3` through the root `pnpm-lock.yaml`. Release builds use the workspace compiler selected by pnpm; no global compiler override is required. + +The Agenetes instance, Agent Profile registry, and documentation site's mixed browser/SSR project explicitly load Node.js types with `types: ["node"]`, because TypeScript 6 no longer automatically includes visible `@types` packages. The documentation site resolves its `@/*` alias through `./src/*` without the deprecated `baseUrl` option. + ## macOS signing dependency Desktop packaging pins `electron-builder` to `26.16.1` in `apps/desktop/package.json` and resolves it through the shared `pnpm-lock.yaml`. This is the first stable v26 release containing the upstream [keychain password fix](https://github.com/electron-userland/electron-builder/pull/10172): `security import -P` needs the certificate password, but `security set-key-partition-list -k` needs the temporary keychain's own unlock password. Version `26.15.3` incorrectly reused the certificate password for the latter command, causing `SecKeychainUnlock` failures before signing or notarization. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7c3aff24..9e3376aed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -149,8 +149,8 @@ importers: specifier: ^4.1.18 version: 4.3.1 typescript: - specifier: ^5.9.3 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vite: specifier: ^6.0.0 version: 6.4.3(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0) @@ -512,8 +512,8 @@ importers: version: 4.4.3 devDependencies: typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.0)(@types/node@24.13.3)(happy-dom@20.11.1)(vite@7.3.5(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0)) @@ -531,8 +531,8 @@ importers: specifier: ^22.15.0 version: 22.19.21 typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.0)(@types/node@22.19.21)(happy-dom@20.11.1)(vite@7.3.5(@types/node@22.19.21)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0)) @@ -553,8 +553,8 @@ importers: specifier: ^22.15.0 version: 22.19.21 typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.0)(@types/node@22.19.21)(happy-dom@20.11.1)(vite@7.3.5(@types/node@22.19.21)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0)) @@ -575,8 +575,8 @@ importers: specifier: ^8.5.0 version: 8.18.1 typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.0)(@types/node@22.19.21)(happy-dom@20.11.1)(vite@7.3.5(@types/node@22.19.21)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0)) @@ -603,8 +603,8 @@ importers: specifier: ^5.12.5 version: 5.12.5 typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.0)(@types/node@24.13.3)(happy-dom@20.11.1)(vite@7.3.5(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0)) @@ -631,8 +631,8 @@ importers: version: 4.4.3 devDependencies: typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: specifier: ^4.1.11 version: 4.1.11(@opentelemetry/api@1.9.0)(@types/node@24.13.3)(happy-dom@20.11.1)(vite@7.3.5(@types/node@24.13.3)(jiti@2.7.0)(lightningcss@1.32.0)(tsx@4.22.4)(yaml@2.9.0)) @@ -647,8 +647,8 @@ importers: version: 4.4.3 devDependencies: typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 external/agenetes/packages/runtime: dependencies: @@ -657,8 +657,8 @@ importers: version: link:../protocol devDependencies: typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 external/agentlet/packages/local: dependencies: @@ -679,14 +679,14 @@ importers: specifier: ^8.5.0 version: 8.18.1 typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 external/agentlet/packages/protocol: devDependencies: typescript: - specifier: ^5.9.0 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 packages/client-runtime: dependencies: @@ -6635,11 +6635,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 typescript: '>=4.8.4 <6.1.0' - typescript@5.9.3: - resolution: {integrity: sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==} - engines: {node: '>=14.17'} - hasBin: true - typescript@6.0.3: resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} @@ -14083,8 +14078,6 @@ snapshots: transitivePeerDependencies: - supports-color - typescript@5.9.3: {} - typescript@6.0.3: {} ufo@1.6.4: {} From 0c5db99ab08b001b3cf4b6c5eff9727ab6291a74 Mon Sep 17 00:00:00 2001 From: cxxxxxn Date: Mon, 19 Oct 2026 18:02:37 +0800 Subject: [PATCH 4/6] test(agentlet): isolate Windows harness shell environment Cover both default cmd.exe and an explicit ComSpec path without depending on the host environment. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../agentlet/packages/local/tests/harnesses.test.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/external/agentlet/packages/local/tests/harnesses.test.ts b/external/agentlet/packages/local/tests/harnesses.test.ts index 3b8326e3b..ca374961c 100644 --- a/external/agentlet/packages/local/tests/harnesses.test.ts +++ b/external/agentlet/packages/local/tests/harnesses.test.ts @@ -1,4 +1,4 @@ -import { beforeEach, describe, expect, it, vi } from 'vitest' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { join } from 'node:path' import type { HarnessDiscoveryResult, JsonRpcMessage } from '@agentlet/protocol' import { ServerMethods } from '@agentlet/protocol' @@ -28,6 +28,10 @@ import { Agentlet } from '../src/agentlet.js' import { AgentProcess } from '../src/agent-process.js' import { Logger } from '../src/logger.js' +afterEach(() => { + vi.unstubAllEnvs() +}) + beforeEach(() => { vi.clearAllMocks() mocks.platform.mockReturnValue('linux') @@ -98,7 +102,8 @@ describe('trusted harness discovery', () => { expect(harnesses[0]?.version).toBeUndefined() }) - it('supports Windows native executables and probes through the platform shell', async () => { + it.each([undefined, 'C:\\Windows\\System32\\cmd.exe'])('supports Windows native executables with ComSpec=%s', async (shell) => { + vi.stubEnv('ComSpec', shell) mocks.platform.mockReturnValue('win32') mocks.probe.mockImplementation(async (file: string, args: string[]) => ({ stdout: file === 'where.exe' ? `C:\\Tools\\${args[0]}.exe\r\nD:\\Other\\${args[0]}.exe\r\n` : '2.0\r\n', @@ -106,7 +111,7 @@ describe('trusted harness discovery', () => { expect((await discoverHarnesses()).harnesses[0]).toMatchObject({ status: 'ready', version: '2.0', }) - expect(mocks.probe).toHaveBeenCalledWith('cmd.exe', ['/d', '/s', '/c', 'copilot --version'], expect.objectContaining({ shell: false })) + expect(mocks.probe).toHaveBeenCalledWith(shell ?? 'cmd.exe', ['/d', '/s', '/c', 'copilot --version'], expect.objectContaining({ shell: false })) }) it.each(['cmd', 'CMD', 'bat', 'BAT'])( From 4f55bd55ce482a9d090160b09e7c1ecf0335ff83 Mon Sep 17 00:00:00 2001 From: cxxxxxn Date: Mon, 19 Oct 2026 18:02:38 +0800 Subject: [PATCH 5/6] test(agenetes): fix Windows store suite lifecycle Close SQLite connections before removing fixtures and normalize paths when registering the harness contract tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../agenetes/src/store-harness.test.ts | 4 +- .../packages/agenetes/src/turn-store.test.ts | 46 +++++++++++++------ 2 files changed, 34 insertions(+), 16 deletions(-) diff --git a/external/agenetes/packages/agenetes/src/store-harness.test.ts b/external/agenetes/packages/agenetes/src/store-harness.test.ts index ce2e42b3e..ba9151652 100644 --- a/external/agenetes/packages/agenetes/src/store-harness.test.ts +++ b/external/agenetes/packages/agenetes/src/store-harness.test.ts @@ -17,6 +17,7 @@ // minus its tests (tsconfig `exclude`), and a test-only harness has no // business in the shipped `dist`. +import { normalize } from 'node:path'; import { fileURLToPath } from 'node:url'; import { describe, expect, it } from 'vitest'; @@ -217,7 +218,8 @@ const namespace = { name: 'harness', storage: undefined }; // The harness is a module other suites import, so guard its own contract // tests: registering them again inside every importer would run the same // three cases five times and bury each suite's real subject. -if (expect.getState().testPath === fileURLToPath(import.meta.url)) { +const testPath = expect.getState().testPath; +if (testPath && normalize(testPath) === fileURLToPath(import.meta.url)) { describe('asynchronous store harness', () => { it('answers every port method with a promise, never synchronously', async () => { const stores = createAsyncStores(); diff --git a/external/agenetes/packages/agenetes/src/turn-store.test.ts b/external/agenetes/packages/agenetes/src/turn-store.test.ts index feb2ce32e..2751cddde 100644 --- a/external/agenetes/packages/agenetes/src/turn-store.test.ts +++ b/external/agenetes/packages/agenetes/src/turn-store.test.ts @@ -30,19 +30,35 @@ import { import type { AgentTurn, Namespace } from '@agenetes/protocol'; let tmp: string; +const fileStores: FileTurnStore[] = []; +const namespaces: Namespace[] = []; beforeEach(() => { + fileStores.length = 0; + namespaces.length = 0; tmp = mkdtempSync(path.join(tmpdir(), 'agenetes-turnstore-')); }); afterEach(() => { + for (const store of fileStores) { + for (const namespace of namespaces) store.close(namespace); + } rmSync(tmp, { recursive: true, force: true }); }); -const ns = (name: string): Namespace => ({ - name, - storage: { root: path.join(tmp, name) }, -}); +const ns = (name: string): Namespace => { + const namespace = { name, storage: { root: path.join(tmp, name) } }; + namespaces.push(namespace); + return namespace; +}; + +const fileStore = ( + ...args: ConstructorParameters +): FileTurnStore => { + const store = new FileTurnStore(...args); + fileStores.push(store); + return store; +}; const turn = (text: string): AgentTurn => ({ request: { type: 'user_text', content: `q:${text}` }, @@ -64,7 +80,7 @@ const turnDatabasePath = (namespace: Namespace): string => // stays a faithful twin of the in-memory default. describe.each<[string, () => TurnStore]>([ ['InMemoryTurnStore', () => new InMemoryTurnStore()], - ['FileTurnStore', () => new FileTurnStore()], + ['FileTurnStore', () => fileStore()], ])('%s — TurnStore contract', (_name, make) => { it('appends and lists folded turns in fold order', () => { const store = make(); @@ -236,13 +252,13 @@ describe.each<[string, () => TurnStore]>([ describe('FileTurnStore — on-disk specifics', () => { it('persists to the Space-owned turns.sqlite and survives a restart', () => { const n = ns('canvas-1'); - const first = new FileTurnStore(); + const first = fileStore(); first.append(n, 'thread-1', persisted('a', 1, 3)); first.append(n, 'thread-1', persisted('b', 4, 7)); expect(existsSync(turnDatabasePath(n))).toBe(true); // A fresh store reads the same on-disk log (restart-surviving). - const restarted = new FileTurnStore(); + const restarted = fileStore(); expect(restarted.list(n, 'thread-1').map((p) => p.seqEnd)).toEqual([3, 7]); expect(restarted.count(n, 'thread-1')).toBe(2); expect(restarted.fence(n, 'thread-1')).toBe(7); @@ -250,7 +266,7 @@ describe('FileTurnStore — on-disk specifics', () => { it('closes the Space-owned database before its directory moves', () => { const n = ns('canvas-1'); - const store = new FileTurnStore(); + const store = fileStore(); store.append(n, 'thread-1', persisted('a', 1, 3)); store.close(n); @@ -266,7 +282,7 @@ describe('FileTurnStore — on-disk specifics', () => { it('tolerates a corrupt tail line without bricking the read', () => { const n = ns('canvas-1'); - const store = new FileTurnStore(); + const store = fileStore(); store.append(n, 'thread-1', persisted('a', 1, 3)); // Append a malformed line directly, as a torn write would leave behind. appendFileSync(turnFilePath(n, 'thread-1'), '{ not json\n'); @@ -280,7 +296,7 @@ describe('FileTurnStore — on-disk specifics', () => { it('replace() writes the target database and a fresh store instance reads it back', () => { const source = ns('canvas-1'); const target = ns('canvas-2'); - const writer = new FileTurnStore(); + const writer = fileStore(); writer.append(source, 'thread-1', persisted('a', 1, 3)); writer.append(source, 'thread-1', persisted('b', 4, 7)); const snapshot = writer.list(source, 'thread-1'); @@ -288,21 +304,21 @@ describe('FileTurnStore — on-disk specifics', () => { writer.replace(target, 'thread-1', snapshot); expect(existsSync(turnDatabasePath(target))).toBe(true); - const restarted = new FileTurnStore(); + const restarted = fileStore(); expect(restarted.list(target, 'thread-1')).toEqual(snapshot); expect(restarted.fence(target, 'thread-1')).toBe(7); }); it('delete() removes the thread rows so a fresh store observes an empty log', () => { const n = ns('canvas-1'); - const writer = new FileTurnStore(); + const writer = fileStore(); writer.append(n, 'thread-1', persisted('a', 1, 3)); expect(existsSync(turnDatabasePath(n))).toBe(true); writer.delete(n, 'thread-1'); expect(existsSync(turnDatabasePath(n))).toBe(true); - const restarted = new FileTurnStore(); + const restarted = fileStore(); expect(restarted.list(n, 'thread-1')).toEqual([]); expect(restarted.count(n, 'thread-1')).toBe(0); }); @@ -319,7 +335,7 @@ describe('FileTurnStore — on-disk specifics', () => { { flag: 'w' }, ); - const store = new FileTurnStore(); + const store = fileStore(); expect(store.list(n, 'thread-1').map((record) => record.seqEnd)).toEqual([ 3, 7, ]); @@ -333,7 +349,7 @@ describe('FileTurnStore — on-disk specifics', () => { mkdirSync(path.dirname(source), { recursive: true }); writeFileSync(source, `${JSON.stringify(persisted('a', 1, 3))}\n`); let fail = true; - const store = new FileTurnStore({ + const store = fileStore({ rename: (from, to) => { if (fail) { fail = false; From a7d0a978262147ae33466d1a45201e56e4b22412 Mon Sep 17 00:00:00 2001 From: cxxxxxn Date: Mon, 19 Oct 2026 18:02:39 +0800 Subject: [PATCH 6/6] build: repair desktop packaging dependency resolution Scope the available Undici 6.29.0 release to node-gyp, refresh packaging snapshots, and preserve existing package integrity metadata. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/architecture/desktop-auto-update.md | 2 ++ pnpm-lock.yaml | 31 +++++------------------- pnpm-workspace.yaml | 2 ++ 3 files changed, 10 insertions(+), 25 deletions(-) diff --git a/docs/architecture/desktop-auto-update.md b/docs/architecture/desktop-auto-update.md index 9f55e2650..7d6f31a05 100644 --- a/docs/architecture/desktop-auto-update.md +++ b/docs/architecture/desktop-auto-update.md @@ -68,6 +68,8 @@ Desktop packaging pins `electron-builder` to `26.16.1` in `apps/desktop/package. Local builds, GitHub Actions, and Azure Pipelines use the same packaging dependency. Both CI paths install with `--frozen-lockfile`; no workflow-specific password substitution or signing bypass is required. Developer ID signing and Apple notarization remain enabled. +The workspace overrides the `node-gyp > undici` packaging dependency to the published `6.29.0` release, within node-gyp's declared `^6.25.0` range. The previous `6.29.1` lockfile resolution is unavailable from the configured package feed and prevents a frozen dependency restore. This scoped override does not change the application's runtime Undici dependency. + ## Azure Pipelines packaging The root [azure-pipelines.yml](../../azure-pipelines.yml) adds independent Microsoft-hosted Windows and macOS packaging jobs alongside the existing GitHub Actions release workflow. In Azure DevOps, select **New Pipeline > GitHub > microsoft/Huabu > Existing Azure Pipelines YAML file** and choose `/azure-pipelines.yml`; authorize repository access through the Azure DevOps GitHub integration. This pipeline publishes build artifacts only, not GitHub Releases, and does not change the application's GitHub update feed. diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9e3376aed..397325a0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,7 @@ settings: overrides: http-response-object>@types/node: ^22.19.21 + node-gyp>undici: 6.29.0 importers: @@ -4332,10 +4333,6 @@ packages: resolution: {integrity: sha512-EQsFzMUJkCKGr1ePqlYADkIUmHW1s3ZXr5Yqy6wbGrfUCphpl2maM/kyOIRA2HpP3AaFQTZXD4ldjek+nccddA==} engines: {node: '>=14.14'} - fs-extra@11.4.1: - resolution: {integrity: sha512-KYAb4c9BJQI6QqGKthV68OHe0badztdXJWKo0WtBA9IuCFPTKvE5ZdUBglP833aMjhaSPNO4A5j/EkzZtGlKjA==} - engines: {node: '>=14.14'} - fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -6663,18 +6660,14 @@ packages: undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} - undici@6.29.1: - resolution: {integrity: sha512-EvRlUt/QqAEvXdQeRMYUfwOQsfzpDztykrG2owGEE/rBOBoYv9uF39ZzsNDh4lTFHhTr2XOZjKkYgueD12ZmGA==} + undici@6.29.0: + resolution: {integrity: sha512-R+RODBqp6i2pPflGdq+xIOUkl+RNfGgHwoinecKu/JCuf2uO06cOKoDbI2P7Dn6KcswdKwrczbU6IYJ6K8X+wg==, tarball: https://ms-feed-25.pkgs.visualstudio.com/1es-public/_packaging/npm-public/npm/registry/undici/-/undici-6.29.0.tgz} engines: {node: '>=18.17'} undici@7.29.0: resolution: {integrity: sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==} engines: {node: '>=20.18.1'} - undici@7.30.1: - resolution: {integrity: sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==} - engines: {node: '>=20.18.1'} - undici@8.10.2: resolution: {integrity: sha512-/y4/bH9YNU5hi9NIrpOuvGXFcxrj3CMrV+/AYpowAYTpHn8gX/XPFjNy766FPoYY0miQhdW977JFWKGNhBdwyQ==} engines: {node: '>=22.19.0'} @@ -7914,8 +7907,6 @@ snapshots: progress: 2.0.3 semver: 7.8.5 sumchecker: 3.0.1 - optionalDependencies: - undici: 7.30.1 transitivePeerDependencies: - supports-color @@ -7965,7 +7956,7 @@ snapshots: dependencies: cross-dirname: 0.1.0 debug: 4.4.3 - fs-extra: 11.4.1 + fs-extra: 11.4.0 minimist: 1.2.8 postject: 1.0.0-alpha.6 transitivePeerDependencies: @@ -11410,13 +11401,6 @@ snapshots: jsonfile: 6.2.1 universalify: 2.0.1 - fs-extra@11.4.1: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 6.2.1 - universalify: 2.0.1 - optional: true - fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -12635,7 +12619,7 @@ snapshots: semver: 7.8.5 tar: 7.5.16 tinyglobby: 0.2.17 - undici: 6.29.1 + undici: 6.29.0 which: 6.0.1 node-int64@0.4.0: {} @@ -14099,13 +14083,10 @@ snapshots: undici-types@7.18.2: {} - undici@6.29.1: {} + undici@6.29.0: {} undici@7.29.0: {} - undici@7.30.1: - optional: true - undici@8.10.2: {} unified@11.0.5: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4867851e6..aebf55563 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -22,3 +22,5 @@ onlyBuiltDependencies: # Keep this installer-only dependency from hoisting Node 10 types into workspaces. overrides: 'http-response-object>@types/node': '^22.19.21' + # The configured feed does not publish the previously locked 6.29.1. + 'node-gyp>undici': '6.29.0'