diff --git a/src/main/local-builds/local-build-compatibility-contract.test.ts b/src/main/local-builds/local-build-compatibility-contract.test.ts index 767f0765fc1..dc2e2af54fd 100644 --- a/src/main/local-builds/local-build-compatibility-contract.test.ts +++ b/src/main/local-builds/local-build-compatibility-contract.test.ts @@ -1,6 +1,7 @@ import { describe, expect, it } from 'vitest' import { SCHEMA_VERSION } from '../../shared/constants' import compatibilityContract from '../../shared/local-build-compatibility-contract.json' +import { LOCAL_BUILD_COMPATIBILITY_CONTRACT } from '../../shared/local-build-compatibility-contract' import { PREVIOUS_DAEMON_PROTOCOL_VERSIONS, PROTOCOL_VERSION @@ -8,6 +9,7 @@ import { describe('packaged local build compatibility contract', () => { it('stays aligned with runtime state and daemon constants', () => { + expect(LOCAL_BUILD_COMPATIBILITY_CONTRACT).toEqual(compatibilityContract) expect(compatibilityContract).toMatchObject({ appId: 'com.stablyai.orca', stateSchemaVersion: SCHEMA_VERSION, diff --git a/src/shared/local-build-compatibility-contract.ts b/src/shared/local-build-compatibility-contract.ts new file mode 100644 index 00000000000..f05be487dd2 --- /dev/null +++ b/src/shared/local-build-compatibility-contract.ts @@ -0,0 +1,11 @@ +export const LOCAL_BUILD_COMPATIBILITY_CONTRACT = { + formatVersion: 1, + appId: 'com.stablyai.orca', + stateSchemaVersion: 1, + readableStateSchemaVersions: [1], + daemonProtocolVersion: 28, + attachableDaemonProtocolVersions: [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28 + ] +} as const diff --git a/src/shared/local-build-compatibility.ts b/src/shared/local-build-compatibility.ts index 0bd152cbf07..203ffe46476 100644 --- a/src/shared/local-build-compatibility.ts +++ b/src/shared/local-build-compatibility.ts @@ -1,8 +1,9 @@ -import compatibilityContract from './local-build-compatibility-contract.json' +import { LOCAL_BUILD_COMPATIBILITY_CONTRACT } from './local-build-compatibility-contract' export const LOCAL_BUILD_COMPATIBILITY_FILENAME = 'orca-local-build.json' -export const LOCAL_BUILD_COMPATIBILITY_FORMAT_VERSION = compatibilityContract.formatVersion -export const ORCA_APP_ID = compatibilityContract.appId +export const LOCAL_BUILD_COMPATIBILITY_FORMAT_VERSION = + LOCAL_BUILD_COMPATIBILITY_CONTRACT.formatVersion +export const ORCA_APP_ID = LOCAL_BUILD_COMPATIBILITY_CONTRACT.appId export type LocalBuildArchitecture = 'arm64' | 'x64'