@@ -19,7 +19,6 @@ import {
1919 type ProviderDriverKind ,
2020 type ServerProviderModel ,
2121} from "@t3tools/contracts" ;
22- import { cliReleaseChannelOf } from "@t3tools/shared/cliRelease" ;
2322import { codexModelFamily } from "@t3tools/shared/model" ;
2423import * as Clock from "effect/Clock" ;
2524import * as Context from "effect/Context" ;
@@ -31,7 +30,6 @@ import * as Schema from "effect/Schema";
3130import * as Semaphore from "effect/Semaphore" ;
3231import { HttpClient , HttpClientResponse } from "effect/unstable/http" ;
3332
34- import packageJson from "../../package.json" with { type : "json" } ;
3533import { ServerConfig } from "../config.ts" ;
3634import * as ServerSettings from "../serverSettings.ts" ;
3735import { hasValidClaudeManifestAdapters } from "./ClaudeModelManifest.ts" ;
@@ -142,25 +140,6 @@ const decodeManifest = Schema.decodeUnknownEffect(ModelManifestSchema);
142140export const BUNDLED_MODEL_MANIFEST : ModelManifestData =
143141 Schema . decodeUnknownSync ( ModelManifestSchema ) ( bundledManifestJson ) ;
144142
145- /**
146- * TEMPORARY V2 preview stopgap. Revert before V2 merges into main; it is on
147- * #2829's "Revert before merging into main" checklist.
148- *
149- * The fetched manifest is `main`'s, and its compatibility policy is written for
150- * stable and nightly builds, which do not run OpenCode 2. A policy's
151- * `t3CodeRange` cannot single out preview builds because range matching drops
152- * prerelease tags. Preview builds therefore keep the compatibility policy they
153- * shipped with and take everything else from the fetched manifest.
154- */
155- function withPreviewCompatibility (
156- manifest : ModelManifestData ,
157- t3CodeVersion : string ,
158- ) : ModelManifestData {
159- return cliReleaseChannelOf ( t3CodeVersion ) === "preview"
160- ? { ...manifest , compatibility : BUNDLED_MODEL_MANIFEST . compatibility }
161- : manifest ;
162- }
163-
164143/** Epoch millis of the manifest's `updatedAt`, or 0 when absent or unparsable. */
165144function manifestUpdatedAtMs ( manifest : ModelManifestData ) : number {
166145 if ( manifest . updatedAt === undefined ) return 0 ;
@@ -357,8 +336,7 @@ const BundledOnlyModelManifest: ModelManifest["Service"] = {
357336
358337export const layerTest = Layer . succeed ( ModelManifest , BundledOnlyModelManifest ) ;
359338
360- /** `make` for a given T3 Code version, so tests can exercise each release channel. */
361- export const makeForVersion = Effect . fnUntraced ( function * ( t3CodeVersion : string ) {
339+ export const make = Effect . gen ( function * ( ) {
362340 const fileSystem = yield * FileSystem . FileSystem ;
363341 const path = yield * Path . Path ;
364342 const config = yield * ServerConfig ;
@@ -391,7 +369,7 @@ export const makeForVersion = Effect.fnUntraced(function* (t3CodeVersion: string
391369 if ( manifestUpdatedAtMs ( BUNDLED_MODEL_MANIFEST ) > manifestUpdatedAtMs ( fromDisk . manifest ) ) {
392370 return ;
393371 }
394- manifest = withPreviewCompatibility ( fromDisk . manifest , t3CodeVersion ) ;
372+ manifest = fromDisk . manifest ;
395373 fetchedAtMs = fromDisk . fetchedAtMs ;
396374 } ) ,
397375 ) ;
@@ -430,7 +408,7 @@ export const makeForVersion = Effect.fnUntraced(function* (t3CodeVersion: string
430408 return manifest ;
431409 }
432410
433- manifest = withPreviewCompatibility ( fetched , t3CodeVersion ) ;
411+ manifest = fetched ;
434412 fetchedAtMs = now ;
435413 yield * encodeManifestCache ( { fetchedAtMs : now , manifest : fetched } ) . pipe (
436414 Effect . flatMap ( ( serialized ) => fileSystem . writeFileString ( cachePath , serialized ) ) ,
@@ -449,6 +427,4 @@ export const makeForVersion = Effect.fnUntraced(function* (t3CodeVersion: string
449427 } ) ;
450428} ) ;
451429
452- export const make = makeForVersion ( packageJson . version ) ;
453-
454430export const layer = Layer . effect ( ModelManifest , make ) ;
0 commit comments