@@ -3,37 +3,24 @@ import { promises as fs } from 'node:fs';
33import path from 'node:path' ;
44
55import {
6- hostedOpenCodeRuntimePlatformKey ,
6+ HOSTED_OPENCODE_CURRENT_MANIFEST_SCHEMA_VERSION ,
7+ type HostedOpenCodeCurrentManifestV2 ,
78 type HostedOpenCodeRuntimeAvailableArtifact ,
89 type HostedOpenCodeRuntimeLockV2 ,
910 type HostedOpenCodeRuntimePlatformKey ,
11+ hostedOpenCodeRuntimePlatformKey ,
1012 parseHostedOpenCodeRuntimeLock ,
11- } from '../../core/domain/hostedOpenCodeRuntimeLock ' ;
13+ } from '@features/hosted-opencode-runtime ' ;
1214import { atomicWriteAsync , renamePathWithRetry } from '@main/utils/atomicWrite' ;
1315import { execCli } from '@main/utils/childProcess' ;
1416
1517import { extractHostedOpenCodeBinary } from './hostedOpenCodeArchive' ;
1618
17- export const HOSTED_OPENCODE_CURRENT_MANIFEST_SCHEMA_VERSION = 2 as const ;
1819const MAX_ARCHIVE_BYTES = 250 * 1024 * 1024 ;
1920const FETCH_TIMEOUT_MS = 60_000 ;
2021const VERSION_TIMEOUT_MS = 30_000 ;
2122const installInFlight = new Map < string , Promise < HostedOpenCodeCurrentManifestV2 > > ( ) ;
2223
23- export interface HostedOpenCodeCurrentManifestV2 {
24- readonly schemaVersion : 2 ;
25- readonly runtime : 'opencode' ;
26- readonly version : string ;
27- readonly tag : string ;
28- readonly platform : HostedOpenCodeRuntimePlatformKey ;
29- readonly binaryPath : string ;
30- readonly assetUrl : string ;
31- readonly archiveSha256 : string ;
32- readonly binarySha256 : string ;
33- readonly sourceCommit : string ;
34- readonly installedAt : string ;
35- }
36-
3724export interface HostedOpenCodeRuntimeInstallerOptions {
3825 readonly runtimeRoot : string ;
3926 readonly lock : unknown ;
0 commit comments