Dashboard › opencode › Distillation
b4637859-46d7-4dd6-981e-929fcefd9256["lore_tm_v1_ZiGIHImuPBmun4vd7geZZNfqXBFnL0uID2sVujsEkVA","lore_tm_v1_wAZPcCUWW-vpiJpGEvOp8lztVpZ-9-dZrBJUFWBFpv0","lore_tm_v1_X0LlAA3jiU3v7CGgvEO-ie5jKPWb4B8-L4THIhBCtLs","lore_tm_v1_ElUg4DoAOXiRjBoXyNBL4UhyRJshmt0yNXTTakYbuW0","lore_tm_v1_X3DbRSo0ELKI3eJeS2fLdpRL6I_fNMiurw2DbHpPvR4","lore_tm_v1_X-eFEbrleF0UpNWFmw3Ro48MKA5EMit67F-nmVgtOnc","lore_tm_v1_jFgxkuky1h4Ff-fKEbZ_Vac0EyrV44iejrnDUYmGXn0","lore_tm_v1_Wu974DKiV_KEMLwHdVNU1R_LqHO1rwYzbeaXdF0zEHU","lore_tm_v1_mv150LG-8tFbR1s8y2trjb_OdxoeOTqaC3zANYXjP98","lore_tm_v1_xtWCElkc3-uyjNnsOZfWfUsHKMjgfxXejlp0s-CgxRw","lore_tm_v1_4Hrs7ScQF0Yxwf6C6Ia5zLeKVpK7xzudGEdirfVBSD4","lore_tm_v1_89v-FGukR2Rd4n2BGlUhlrj7Nq4tVfOTkiOF6OLcteo","lore_tm_v1_bTchG2xJ8sI5-Z6n9oFokiTqKbUTE1BuPquwmzq4OpY"]
packages/opencode/test/package.test.ts initially built and packed @loreai/opencode into a temporary loreai-opencode.tgz, extracted it, and cleaned the temporary directory in afterAll()."ships a compiled JavaScript server entrypoint" verified package.json export "./server" equals { types: "./src/server.ts", bun: "./dist/server.js", default: "./dist/server.js" }; it also checked dist/server.js excludes interface LoreServerRuntime, import type , and @opencode/plugin.packages/opencode/test/package.test.ts was modified to add a packed-server import regression."ships a compiled JavaScript server entrypoint" in 3ms and "imports the packed server entrypoint without a host SDK" in 2865ms; 1 test file and 2 tests passed, with total duration 6.72s.packages/opencode/test/package.test.ts was updated so "imports the packed server entrypoint without a host SDK" executes process.execPath with --input-type=module --eval, imports the extracted package/dist/server.js, and prints JSON containing definition.id and typeof definition.setup.v24.16.0: ERR_MODULE_NOT_FOUND: Cannot find package '@loreai/core' imported from /tmp/lore-opencode-package-Eakuux/package/dist/server.js; Node suggested file:///home/byk/Code/opencode-lore-v2/packages/core/dist/node/index.js."ships a compiled JavaScript server entrypoint" passed in 3ms, "imports the packed server entrypoint without a host SDK" failed in 65ms, and total duration was 2.75s.dist/server.js; keep @loreai/gateway external because its runtime assets and lifecycle must remain package-owned; keep the host SDK type-only.packages/opencode/script/build.ts was modified to implement the narrow bundling fix, removing @loreai/core from the server bundleβs externals while retaining the gateway as external."ships a compiled JavaScript server entrypoint" passed in 151ms and "imports the packed server entrypoint without a host SDK" passed in 1208ms; 1 test file and 2 tests passed, total duration 9.40s.@loreai/opencode@0.40.0 passed tsc --noEmit, then built via tsx script/build.ts; esbuild produced dist/server.js at 16.5mb and dist/server.js.map at 31.9mb in 1671ms./tmp/opencode/loreai-opencode-0.40.0.tgz contains dist/server.js, dist/server.js.map, LICENSE, package.json, README.md, src/index.ts, src/internal.ts, src/server-runtime.ts, and src/server.ts./tmp/opencode/lore-v2-runtime-final/config/opencode/ with new files package.json, opencode.json, and lore-plugin/server.js.