File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " interscript" ,
3- "version" : " 3.1 .0" ,
3+ "version" : " 3.2 .0" ,
44 "description" : " Interscript TypeScript runtime — interoperable script conversion" ,
55 "type" : " module" ,
66 "main" : " ./dist/index.js" ,
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ export {
4646 type ManifestModelEntry ,
4747} from "./provision/manifest.js"
4848
49+ /**
50+ * The IMF v1 registry — models.yaml resolution over GitHub Releases
51+ * (sha256-sidecar-verified). This is the canonical way to load models
52+ * by id; `import { imf } from "interscript/ml"`.
53+ */
54+ export * as imf from "./imf/index.js"
55+
4956// Side-effect: register built-in model kinds. Adding a new model kind
5057// = adding a new import here. Order doesn't matter.
5158import "./models/rababa/index.js"
Original file line number Diff line number Diff line change @@ -212,6 +212,16 @@ describe("registry", () => {
212212 await expect ( resolve ( "nope" , url ) ) . rejects . toThrow ( / i n d e x s h a 2 5 6 / )
213213 } )
214214 } )
215+ it ( "the public ./ml surface re-exports the IMF registry" , async ( ) => {
216+ const ml = await import ( "../src/ml/index.js" )
217+ const imf = ( ml as { imf ?: Record < string , unknown > } ) . imf
218+ expect ( imf ) . toBeDefined ( )
219+ expect ( typeof imf ! [ "resolve" ] ) . toBe ( "function" )
220+ expect ( typeof imf ! [ "IMFModel" ] ) . toBe ( "function" )
221+ expect ( imf ! [ "DEFAULT_INDEX_URL" ] ) . toMatch (
222+ / g i t h u b \. c o m \/ i n t e r s c r i p t \/ i n t e r s c r i p t - m l \/ r e l e a s e s \/ d o w n l o a d \/ i n d e x - v \d + \/ m o d e l s - i n d e x \. y a m l / ,
223+ )
224+ } )
215225} )
216226
217227const e2eZip = process . env [ "SECRYST_E2E_ZIP" ]
You can’t perform that action at this time.
0 commit comments