fix(llm-pi-ai): sync desktop patch policy and Azure snapshots

This commit is contained in:
Yichen Jiang committed 2026-10-12 17:46:06 +08:00
1 parent d79f13a4d4
commit ab64b70d3f
4 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -8,7 +8,7 @@ export type DesktopRuntimePatch =
/** Every workspace patch requires an explicit Desktop decision; runtime-only entries may add or replace a patch. */
export const DESKTOP_RUNTIME_PATCHES: Readonly<Record<string, DesktopRuntimePatch>> = {
'@earendil-works/pi-ai@1.0.2': { scope: 'shared', reason: 'Runtime providers need the streamed argument parsing fix.' },
'@earendil-works/pi-ai@1.1.0': { scope: 'shared', reason: 'Runtime providers need the streamed argument parsing fix.' },
'@electron/[email protected]': { scope: 'workspace-only', reason: 'Signing executes on the build host.' },
'@fortune-sheet/[email protected]': { scope: 'workspace-only', reason: 'Patched spreadsheet code is embedded in the client bundle.' },
'@fortune-sheet/[email protected]': { scope: 'workspace-only', reason: 'Patched spreadsheet code is embedded in the client bundle.' },
@@ -19,6 +19,6 @@ export const DESKTOP_RUNTIME_PATCHES: Readonly<Record<string, DesktopRuntimePatc
/** Reviewed Desktop dependency constraints, independent of patch selection. */
export const DESKTOP_RUNTIME_DEPENDENCY_OVERRIDES: Readonly<Record<string, string>> = {
// The provider declares ^1.0.2; its patch is qualified against 1.0.2.
'@earendil-works/pi-ai@^1.0.2': '1.0.2',
// The provider declares ^1.1.0; its patch is qualified against 1.1.0.
'@earendil-works/pi-ai@^1.1.0': '1.1.0',
}
@@ -42,11 +42,11 @@ it('classifies the current workspace and shares only runtime patch bytes', () =>
const repository = resolve(import.meta.dirname, '../../..')
const before = readFileSync(join(repository, 'pnpm-lock.yaml'))
const plan = prepareRuntimePatches(project, repository)
expect(plan.patches.map(entry => entry.spec)).toEqual(['@earendil-works/pi-ai@1.0.2', '[email protected]'])
expect(plan.patches.map(entry => entry.spec)).toEqual(['@earendil-works/pi-ai@1.1.0', '[email protected]'])
expect(plan.workspaceOnly).toHaveLength(5)
const settings = yaml.load(readFileSync(join(project, 'pnpm-workspace.yaml'), 'utf8')) as { overrides: Record<string, string> }
expect(settings.overrides['@earendil-works/pi-ai']).toBeUndefined()
expect(settings.overrides['@earendil-works/pi-ai@^1.0.2']).toBe('1.0.2')
expect(settings.overrides['@earendil-works/pi-ai@^1.1.0']).toBe('1.1.0')
expect(readFileSync(join(repository, 'pnpm-lock.yaml'))).toEqual(before)
})
@@ -20,7 +20,7 @@
- option "amazon-bedrock"
- option "ant-ling"
- option "anthropic"
- option "azure-openai-responses"
- option "azure"
- option "baseten"
- option "cerebras"
- option "cloudflare-ai-gateway"
@@ -24,7 +24,7 @@
- option "amazon-bedrock"
- option "ant-ling"
- option "anthropic"
- option "azure-openai-responses"
- option "azure"
- option "baseten"
- option "cerebras"
- option "cloudflare-ai-gateway"