[{"data":1,"prerenderedAt":3167},["ShallowReactive",2],{"navigation_docs":3,"-docs-under-the-hood-library-mode":493,"-docs-under-the-hood-library-mode-surround":3162},[4,46,135,218,257,292,355,377,420],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":45},"Getting Started","i-lucide-rocket","\u002Fdocs\u002Fgetting-started","docs\u002F01.getting-started",[10,15,20,25,30,35,40],{"title":11,"path":12,"stem":13,"icon":14},"What is Heximon?","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F01.getting-started\u002F01.introduction","i-lucide-info",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fdocs\u002Fgetting-started\u002Finstallation","docs\u002F01.getting-started\u002F02.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Quick Start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F01.getting-started\u002F03.quick-start","i-lucide-zap",{"title":26,"path":27,"stem":28,"icon":29},"Core Concepts","\u002Fdocs\u002Fgetting-started\u002Fcore-concepts","docs\u002F01.getting-started\u002F04.core-concepts","i-lucide-shapes",{"title":31,"path":32,"stem":33,"icon":34},"Examples","\u002Fdocs\u002Fgetting-started\u002Fexamples","docs\u002F01.getting-started\u002F05.examples","i-lucide-library",{"title":36,"path":37,"stem":38,"icon":39},"Where Next?","\u002Fdocs\u002Fgetting-started\u002Fwhere-next","docs\u002F01.getting-started\u002F06.where-next","i-lucide-signpost",{"title":41,"path":42,"stem":43,"icon":44},"Troubleshooting","\u002Fdocs\u002Fgetting-started\u002Ftroubleshooting","docs\u002F01.getting-started\u002F07.troubleshooting","i-lucide-life-buoy",false,{"title":47,"icon":48,"path":49,"stem":50,"children":51,"page":45},"Essentials","i-lucide-boxes","\u002Fdocs\u002Fessentials","docs\u002F02.essentials",[52,56,61,66,71,76,81,86,91,96,101,105,110,115,120,125,130],{"title":53,"path":54,"stem":55,"icon":48},"Modules & DI","\u002Fdocs\u002Fessentials\u002Fmodules-and-di","docs\u002F02.essentials\u002F01.modules-and-di",{"title":57,"path":58,"stem":59,"icon":60},"Controllers","\u002Fdocs\u002Fessentials\u002Fcontrollers","docs\u002F02.essentials\u002F02.controllers","i-lucide-route",{"title":62,"path":63,"stem":64,"icon":65},"Validation & DTOs","\u002Fdocs\u002Fessentials\u002Fvalidation","docs\u002F02.essentials\u002F03.validation","i-lucide-shield-check",{"title":67,"path":68,"stem":69,"icon":70},"Contracts","\u002Fdocs\u002Fessentials\u002Fcontracts","docs\u002F02.essentials\u002F04.contracts","i-lucide-file-signature",{"title":72,"path":73,"stem":74,"icon":75},"REST Client","\u002Fdocs\u002Fessentials\u002Fclient","docs\u002F02.essentials\u002F05.client","i-lucide-plug",{"title":77,"path":78,"stem":79,"icon":80},"Database","\u002Fdocs\u002Fessentials\u002Fdatabase","docs\u002F02.essentials\u002F06.database","i-lucide-database",{"title":82,"path":83,"stem":84,"icon":85},"Drizzle ORM","\u002Fdocs\u002Fessentials\u002Fdrizzle","docs\u002F02.essentials\u002F07.drizzle","i-lucide-database-zap",{"title":87,"path":88,"stem":89,"icon":90},"Persistence & Transactions","\u002Fdocs\u002Fessentials\u002Fpersistence","docs\u002F02.essentials\u002F08.persistence","i-lucide-database-backup",{"title":92,"path":93,"stem":94,"icon":95},"Migrations","\u002Fdocs\u002Fessentials\u002Fmigrations","docs\u002F02.essentials\u002F09.migrations","i-lucide-git-branch",{"title":97,"path":98,"stem":99,"icon":100},"Authentication","\u002Fdocs\u002Fessentials\u002Fauthentication","docs\u002F02.essentials\u002F10.authentication","i-lucide-key-round",{"title":102,"path":103,"stem":104,"icon":65},"Permissions & scopes","\u002Fdocs\u002Fessentials\u002Fpermissions","docs\u002F02.essentials\u002F11.permissions",{"title":106,"path":107,"stem":108,"icon":109},"Error Handling","\u002Fdocs\u002Fessentials\u002Ferrors","docs\u002F02.essentials\u002F12.errors","i-lucide-triangle-alert",{"title":111,"path":112,"stem":113,"icon":114},"Testing a Heximon App","\u002Fdocs\u002Fessentials\u002Ftesting","docs\u002F02.essentials\u002F13.testing","i-lucide-flask-conical",{"title":116,"path":117,"stem":118,"icon":119},"Test app harness","\u002Fdocs\u002Fessentials\u002Fcreatetestapp","docs\u002F02.essentials\u002F14.createtestapp","i-lucide-test-tube",{"title":121,"path":122,"stem":123,"icon":124},"Logging & Observability","\u002Fdocs\u002Fessentials\u002Flogging","docs\u002F02.essentials\u002F17.logging","i-lucide-scroll-text",{"title":126,"path":127,"stem":128,"icon":129},"Context & Lifecycle","\u002Fdocs\u002Fessentials\u002Fcontext-and-lifecycle","docs\u002F02.essentials\u002F18.context-and-lifecycle","i-lucide-radio",{"title":131,"path":132,"stem":133,"icon":134},"Project Structure","\u002Fdocs\u002Fessentials\u002Fproject-structure","docs\u002F02.essentials\u002F19.project-structure","i-lucide-folder-tree",{"title":136,"icon":137,"path":138,"stem":139,"children":140,"page":45},"Capabilities","i-lucide-sparkles","\u002Fdocs\u002Fcapabilities","docs\u002F03.capabilities",[141,145,150,155,160,164,169,174,179,184,188,193,198,203,208,213],{"title":142,"path":143,"stem":144,"icon":137},"Overview","\u002Fdocs\u002Fcapabilities\u002Foverview","docs\u002F03.capabilities\u002F01.overview",{"title":146,"path":147,"stem":148,"icon":149},"Events","\u002Fdocs\u002Fcapabilities\u002Fevents","docs\u002F03.capabilities\u002F02.events","i-lucide-radio-tower",{"title":151,"path":152,"stem":153,"icon":154},"Queue","\u002Fdocs\u002Fcapabilities\u002Fbackground-jobs","docs\u002F03.capabilities\u002F03.background-jobs","i-lucide-list-ordered",{"title":156,"path":157,"stem":158,"icon":159},"Scheduled Work","\u002Fdocs\u002Fcapabilities\u002Fscheduled-jobs","docs\u002F03.capabilities\u002F04.scheduled-jobs","i-lucide-clock",{"title":161,"path":162,"stem":163,"icon":85},"Caching","\u002Fdocs\u002Fcapabilities\u002Fcaching","docs\u002F03.capabilities\u002F05.caching",{"title":165,"path":166,"stem":167,"icon":168},"Key\u002FValue Storage","\u002Fdocs\u002Fcapabilities\u002Fkey-value","docs\u002F03.capabilities\u002F06.key-value","i-lucide-hard-drive",{"title":170,"path":171,"stem":172,"icon":173},"Blob Storage","\u002Fdocs\u002Fcapabilities\u002Fblob","docs\u002F03.capabilities\u002F07.blob","i-lucide-folder-open",{"title":175,"path":176,"stem":177,"icon":178},"Health & Readiness","\u002Fdocs\u002Fcapabilities\u002Fhealth","docs\u002F03.capabilities\u002F08.health","i-lucide-heart-pulse",{"title":180,"path":181,"stem":182,"icon":183},"Notifications","\u002Fdocs\u002Fcapabilities\u002Fnotifications","docs\u002F03.capabilities\u002F09.notifications","i-lucide-mail",{"title":185,"path":186,"stem":187,"icon":65},"Idempotency","\u002Fdocs\u002Fcapabilities\u002Fidempotency","docs\u002F03.capabilities\u002F10.idempotency",{"title":189,"path":190,"stem":191,"icon":192},"Security Hardening","\u002Fdocs\u002Fcapabilities\u002Fsecurity","docs\u002F03.capabilities\u002F11.security","i-lucide-shield",{"title":194,"path":195,"stem":196,"icon":197},"Observability & Tracing","\u002Fdocs\u002Fcapabilities\u002Fobservability","docs\u002F03.capabilities\u002F12.observability","i-lucide-activity",{"title":199,"path":200,"stem":201,"icon":202},"OpenAPI","\u002Fdocs\u002Fcapabilities\u002Fopenapi","docs\u002F03.capabilities\u002F13.openapi","i-lucide-book-marked",{"title":204,"path":205,"stem":206,"icon":207},"MCP Server","\u002Fdocs\u002Fcapabilities\u002Fmcp","docs\u002F03.capabilities\u002F14.mcp","i-lucide-bot",{"title":209,"path":210,"stem":211,"icon":212},"Schema DTOs","\u002Fdocs\u002Fcapabilities\u002Fschema","docs\u002F03.capabilities\u002F15.schema","i-lucide-file-json",{"title":214,"path":215,"stem":216,"icon":217},"Branded IDs","\u002Fdocs\u002Fcapabilities\u002Fbranded-ids","docs\u002F03.capabilities\u002F16.branded-ids","i-lucide-tag",{"title":219,"icon":220,"path":221,"stem":222,"children":223,"page":45},"Architecture","i-lucide-building","\u002Fdocs\u002Farchitecture","docs\u002F04.architecture",[224,227,232,237,242,247,252],{"title":142,"path":225,"stem":226,"icon":220},"\u002Fdocs\u002Farchitecture\u002Foverview","docs\u002F04.architecture\u002F01.overview",{"title":228,"path":229,"stem":230,"icon":231},"Domain-Driven Design","\u002Fdocs\u002Farchitecture\u002Fddd","docs\u002F04.architecture\u002F02.ddd","i-lucide-hexagon",{"title":233,"path":234,"stem":235,"icon":236},"CQRS","\u002Fdocs\u002Farchitecture\u002Fcqrs","docs\u002F04.architecture\u002F03.cqrs","i-lucide-split",{"title":238,"path":239,"stem":240,"icon":241},"Repository Pattern","\u002Fdocs\u002Farchitecture\u002Frepository-pattern","docs\u002F04.architecture\u002F04.repository-pattern","i-lucide-archive",{"title":243,"path":244,"stem":245,"icon":246},"Integration Events","\u002Fdocs\u002Farchitecture\u002Fintegration-events","docs\u002F04.architecture\u002F05.integration-events","i-lucide-send-horizontal",{"title":248,"path":249,"stem":250,"icon":251},"Saga Orchestration","\u002Fdocs\u002Farchitecture\u002Fsagas","docs\u002F04.architecture\u002F06.sagas","i-lucide-hourglass",{"title":253,"path":254,"stem":255,"icon":256},"Durable Workflows","\u002Fdocs\u002Farchitecture\u002Fworkflows","docs\u002F04.architecture\u002F07.workflows","i-lucide-workflow",{"title":258,"icon":259,"path":260,"stem":261,"children":262,"page":45},"Realtime","i-lucide-cable","\u002Fdocs\u002Frealtime","docs\u002F05.realtime",[263,266,270,274,279,284,288],{"title":142,"path":264,"stem":265,"icon":259},"\u002Fdocs\u002Frealtime\u002Foverview","docs\u002F05.realtime\u002F01.overview",{"title":267,"path":268,"stem":269,"icon":129},"WebSockets","\u002Fdocs\u002Frealtime\u002Fwebsockets","docs\u002F05.realtime\u002F02.websockets",{"title":271,"path":272,"stem":273,"icon":70},"WebSocket Contracts","\u002Fdocs\u002Frealtime\u002Fwebsocket-contracts","docs\u002F05.realtime\u002F03.websocket-contracts",{"title":275,"path":276,"stem":277,"icon":278},"Server-Sent Events","\u002Fdocs\u002Frealtime\u002Fserver-sent-events","docs\u002F05.realtime\u002F04.server-sent-events","i-lucide-rss",{"title":280,"path":281,"stem":282,"icon":283},"Typed Clients","\u002Fdocs\u002Frealtime\u002Ftyped-clients","docs\u002F05.realtime\u002F05.typed-clients","i-lucide-plug-zap",{"title":285,"path":286,"stem":287,"icon":259},"AsyncAPI","\u002Fdocs\u002Frealtime\u002Fasyncapi","docs\u002F05.realtime\u002F06.asyncapi",{"title":289,"path":290,"stem":291,"icon":80},"Durable Objects","\u002Fdocs\u002Frealtime\u002Fdurable-objects","docs\u002F05.realtime\u002F07.durable-objects",{"title":293,"icon":294,"path":295,"stem":296,"children":297,"page":45},"Deploy","i-lucide-cloud-upload","\u002Fdocs\u002Fdeploy","docs\u002F06.deploy",[298,301,306,311,316,321,326,331,336,341,345,350],{"title":142,"path":299,"stem":300,"icon":6},"\u002Fdocs\u002Fdeploy\u002Foverview","docs\u002F06.deploy\u002F01.overview",{"title":302,"path":303,"stem":304,"icon":305},"Node","\u002Fdocs\u002Fdeploy\u002Fnode","docs\u002F06.deploy\u002F02.node","la:node-js",{"title":307,"path":308,"stem":309,"icon":310},"Cloudflare","\u002Fdocs\u002Fdeploy\u002Fcloudflare","docs\u002F06.deploy\u002F03.cloudflare","simple-icons:cloudflare",{"title":312,"path":313,"stem":314,"icon":315},"Vercel","\u002Fdocs\u002Fdeploy\u002Fvercel","docs\u002F06.deploy\u002F04.vercel","ri:vercel-fill",{"title":317,"path":318,"stem":319,"icon":320},"Netlify","\u002Fdocs\u002Fdeploy\u002Fnetlify","docs\u002F06.deploy\u002F05.netlify","i-simple-icons-netlify",{"title":322,"path":323,"stem":324,"icon":325},"AWS Lambda","\u002Fdocs\u002Fdeploy\u002Faws-lambda","docs\u002F06.deploy\u002F06.aws-lambda","hugeicons:aws-lambda",{"title":327,"path":328,"stem":329,"icon":330},"Deno Deploy","\u002Fdocs\u002Fdeploy\u002Fdeno-deploy","docs\u002F06.deploy\u002F07.deno-deploy","simple-icons:denodeploy",{"title":332,"path":333,"stem":334,"icon":335},"Nitro","\u002Fdocs\u002Fdeploy\u002Fnitro","docs\u002F06.deploy\u002F08.nitro","i-unjs-nitro",{"title":337,"path":338,"stem":339,"icon":340},"Nuxt","\u002Fdocs\u002Fdeploy\u002Fnuxt","docs\u002F06.deploy\u002F09.nuxt","i-devicon-nuxt",{"title":342,"path":343,"stem":344,"icon":236},"Mixed-runtime split","\u002Fdocs\u002Fdeploy\u002Fmixed-runtime-split","docs\u002F06.deploy\u002F10.mixed-runtime-split",{"title":346,"path":347,"stem":348,"icon":349},"Hosts","\u002Fdocs\u002Fdeploy\u002Fhosts","docs\u002F06.deploy\u002F11.hosts","i-lucide-map",{"title":351,"path":352,"stem":353,"icon":354},"Cross-service events","\u002Fdocs\u002Fdeploy\u002Fcross-service-events","docs\u002F06.deploy\u002F12.cross-service-events","i-lucide-network",{"title":356,"icon":357,"path":358,"stem":359,"children":360,"page":45},"CLI","i-lucide-terminal","\u002Fdocs\u002Fcli","docs\u002F07.cli",[361,365,369,373],{"title":362,"path":363,"stem":364,"icon":357},"The heximon CLI","\u002Fdocs\u002Fcli\u002Foverview","docs\u002F07.cli\u002F01.overview",{"title":366,"path":367,"stem":368,"icon":137},"Create a New App","\u002Fdocs\u002Fcli\u002Fcreate","docs\u002F07.cli\u002F02.create",{"title":370,"path":371,"stem":372,"icon":95},"Migrations from the CLI","\u002Fdocs\u002Fcli\u002Fmigrations","docs\u002F07.cli\u002F03.migrations",{"title":374,"path":375,"stem":376,"icon":6},"Deploying a Heximon app","\u002Fdocs\u002Fcli\u002Fdeploy","docs\u002F07.cli\u002F04.deploy",{"title":378,"icon":379,"path":380,"stem":381,"children":382,"page":45},"Under the Hood","i-lucide-wrench","\u002Fdocs\u002Funder-the-hood","docs\u002F08.under-the-hood",[383,388,393,397,402,407,411,415],{"title":384,"path":385,"stem":386,"icon":387},"How the Compiler Works","\u002Fdocs\u002Funder-the-hood\u002Fhow-the-compiler-works","docs\u002F08.under-the-hood\u002F01.how-the-compiler-works","i-lucide-cog",{"title":389,"path":390,"stem":391,"icon":392},"Compiler","\u002Fdocs\u002Funder-the-hood\u002Fextending-the-compiler","docs\u002F08.under-the-hood\u002F02.extending-the-compiler","i-lucide-cpu",{"title":394,"path":395,"stem":396,"icon":357},"Compiler Diagnostics","\u002Fdocs\u002Funder-the-hood\u002Fcompiler-diagnostics","docs\u002F08.under-the-hood\u002F03.compiler-diagnostics",{"title":398,"path":399,"stem":400,"icon":401},"Library Mode","\u002Fdocs\u002Funder-the-hood\u002Flibrary-mode","docs\u002F08.under-the-hood\u002F04.library-mode","i-lucide-package",{"title":403,"path":404,"stem":405,"icon":406},"Other bundlers","\u002Fdocs\u002Funder-the-hood\u002Falternate-bundlers","docs\u002F08.under-the-hood\u002F05.alternate-bundlers","i-lucide-blocks",{"title":408,"path":409,"stem":410,"icon":401},"Packages","\u002Fdocs\u002Funder-the-hood\u002Fpackages","docs\u002F08.under-the-hood\u002F06.packages",{"title":412,"path":413,"stem":414,"icon":207},"AI Skills","\u002Fdocs\u002Funder-the-hood\u002Fai-and-agents","docs\u002F08.under-the-hood\u002F07.ai-and-agents",{"title":416,"path":417,"stem":418,"icon":419},"Advanced DI","\u002Fdocs\u002Funder-the-hood\u002Fadvanced-di","docs\u002F08.under-the-hood\u002F08.advanced-di","i-lucide-git-fork",{"title":421,"icon":422,"path":423,"stem":424,"children":425,"page":45},"Recipes","i-lucide-book-open-check","\u002Fdocs\u002Frecipes","docs\u002F09.recipes",[426,431,436,440,444,448,452,456,460,465,469,474,479,484,488],{"title":427,"path":428,"stem":429,"icon":430},"Send an Email","\u002Fdocs\u002Frecipes\u002Fsend-an-email","docs\u002F09.recipes\u002F01.send-an-email","i-lucide-send",{"title":432,"path":433,"stem":434,"icon":435},"Upload a File","\u002Fdocs\u002Frecipes\u002Fupload-a-file","docs\u002F09.recipes\u002F02.upload-a-file","i-lucide-upload",{"title":437,"path":438,"stem":439,"icon":24},"Cache an Expensive Call","\u002Fdocs\u002Frecipes\u002Fcache-an-expensive-call","docs\u002F09.recipes\u002F03.cache-an-expensive-call",{"title":441,"path":442,"stem":443,"icon":154},"Paginate a List","\u002Fdocs\u002Frecipes\u002Fpaginate-a-list","docs\u002F09.recipes\u002F04.paginate-a-list",{"title":445,"path":446,"stem":447,"icon":65},"Protect Admin Routes","\u002Fdocs\u002Frecipes\u002Fprotect-admin-routes","docs\u002F09.recipes\u002F05.protect-admin-routes",{"title":449,"path":450,"stem":451,"icon":178},"Health Probes and a Nightly Job","\u002Fdocs\u002Frecipes\u002Fhealth-probes-and-a-nightly-job","docs\u002F09.recipes\u002F06.health-probes-and-a-nightly-job",{"title":453,"path":454,"stem":455,"icon":80},"Build a CRUD API","\u002Fdocs\u002Frecipes\u002Fcrud-api","docs\u002F09.recipes\u002F07.crud-api",{"title":457,"path":458,"stem":459,"icon":100},"Add Authentication","\u002Fdocs\u002Frecipes\u002Fadd-authentication","docs\u002F09.recipes\u002F08.add-authentication",{"title":461,"path":462,"stem":463,"icon":464},"Background Jobs","\u002Fdocs\u002Frecipes\u002Fbackground-jobs","docs\u002F09.recipes\u002F09.background-jobs","i-lucide-timer",{"title":466,"path":467,"stem":468,"icon":149},"Decouple Features with Events","\u002Fdocs\u002Frecipes\u002Fevent-driven-module","docs\u002F09.recipes\u002F10.event-driven-module",{"title":470,"path":471,"stem":472,"icon":473},"Build a DDD Aggregate","\u002Fdocs\u002Frecipes\u002Fddd-aggregate","docs\u002F09.recipes\u002F11.ddd-aggregate","i-lucide-box",{"title":475,"path":476,"stem":477,"icon":478},"Publish a Feature Package","\u002Fdocs\u002Frecipes\u002Ffeature-package","docs\u002F09.recipes\u002F12.feature-package","i-lucide-package-open",{"title":480,"path":481,"stem":482,"icon":483},"Reliable Integration Events","\u002Fdocs\u002Frecipes\u002Freliable-integration-events","docs\u002F09.recipes\u002F13.reliable-integration-events","i-lucide-inbox",{"title":485,"path":486,"stem":487,"icon":95},"Reactive Choreography","\u002Fdocs\u002Frecipes\u002Freactive-choreography","docs\u002F09.recipes\u002F14.reactive-choreography",{"title":489,"path":490,"stem":491,"icon":492},"Build a Production CRUD API","\u002Fdocs\u002Frecipes\u002Fproduction-crud-api","docs\u002F09.recipes\u002F15.production-crud-api","i-lucide-layers",{"id":494,"title":398,"body":495,"description":3155,"extension":3156,"links":3157,"meta":3158,"navigation":3159,"path":399,"seo":3160,"stem":400,"__hash__":3161},"docs\u002Fdocs\u002F08.under-the-hood\u002F04.library-mode.md",{"type":496,"value":497,"toc":3139},"minimark",[498,507,518,550,761,783,788,807,959,970,974,987,1053,1077,1080,1091,1095,1109,1196,1226,1245,1268,1272,1299,1511,1531,1553,1563,1604,1608,1611,1705,1714,1718,1733,1896,1915,1924,1997,2002,2008,2079,2092,2096,2111,2122,2134,2282,2350,2362,2376,2380,2393,2409,2415,2436,2440,2461,2470,2660,2673,2679,2721,2734,2749,2767,2771,2789,2806,2912,2926,2937,2944,2950,2954,2968,2990,3031,3042,3073,3089,3093,3135],[499,500,501,502,506],"p",{},"Ship a feature as an npm package. Library mode compiles one Heximon module — its providers, its boundary\ntokens, its lifecycle — into an installable package that any Heximon app pulls in through its ",[503,504,505],"code",{},"imports","\narray, exactly like a local module.",[499,508,509,510,513,514,517],{},"The work happens once, at publish time: the build emits a typed\n",[503,511,512],{},"create\u003CModule>"," factory plus a ",[503,515,516],{},"dist\u002Fheximon.manifest.json"," describing the package's DI boundary. The\nconsuming app reads that manifest across the package boundary instead of re-scanning your source — your\ninternal graph ships sealed and prebuilt.",[499,519,520,521,527,528,531,532,535,536,539,540,542,543,545,546,549],{},"Wire it with the ",[522,523,524],"strong",{},[503,525,526],{},"heximonLibrary()"," plugin in your packaging build. A published module's ",[503,529,530],{},"vp pack"," config\nadds it to ",[503,533,534],{},"pack.plugins"," — the deliberate companion to the ",[503,537,538],{},"heximon()"," dev\u002Fapp plugin. The two live in\ndifferent arrays because they run in different builds: ",[503,541,538],{}," is a Vite plugin, and ",[503,544,530],{}," runs on\nRolldown, which never consults the Vite ",[503,547,548],{},"plugins"," array.",[551,552,558],"pre",{"className":553,"code":554,"filename":555,"language":556,"meta":557,"style":557},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import heximonLibrary from \"@heximon\u002Flibrary\u002Frolldown\";\nimport { defineConfig } from \"vite-plus\";\n\n\u002F\u002F On `vp pack`, heximonLibrary() runs the library emit: the typed create\u003CModule> factory +\n\u002F\u002F dist\u002Fheximon.manifest.json. Its compiler plugins come from heximon.config.ts (below).\nexport default defineConfig({\n  pack: {\n    entry: [\"src\u002Findex.ts\"],\n    dts: true,\n    format: [\"esm\"],\n    plugins: [heximonLibrary()],\n  },\n});\n","vite.config.ts","ts","",[503,559,560,590,616,623,630,636,654,667,691,705,726,744,750],{"__ignoreMap":557},[561,562,565,569,573,576,580,584,587],"span",{"class":563,"line":564},"line",1,[561,566,568],{"class":567},"s7zQu","import",[561,570,572],{"class":571},"sTEyZ"," heximonLibrary ",[561,574,575],{"class":567},"from",[561,577,579],{"class":578},"sMK4o"," \"",[561,581,583],{"class":582},"sfazB","@heximon\u002Flibrary\u002Frolldown",[561,585,586],{"class":578},"\"",[561,588,589],{"class":578},";\n",[561,591,593,595,598,601,604,607,609,612,614],{"class":563,"line":592},2,[561,594,568],{"class":567},[561,596,597],{"class":578}," {",[561,599,600],{"class":571}," defineConfig",[561,602,603],{"class":578}," }",[561,605,606],{"class":567}," from",[561,608,579],{"class":578},[561,610,611],{"class":582},"vite-plus",[561,613,586],{"class":578},[561,615,589],{"class":578},[561,617,619],{"class":563,"line":618},3,[561,620,622],{"emptyLinePlaceholder":621},true,"\n",[561,624,626],{"class":563,"line":625},4,[561,627,629],{"class":628},"sHwdD","\u002F\u002F On `vp pack`, heximonLibrary() runs the library emit: the typed create\u003CModule> factory +\n",[561,631,633],{"class":563,"line":632},5,[561,634,635],{"class":628},"\u002F\u002F dist\u002Fheximon.manifest.json. Its compiler plugins come from heximon.config.ts (below).\n",[561,637,639,642,645,648,651],{"class":563,"line":638},6,[561,640,641],{"class":567},"export",[561,643,644],{"class":567}," default",[561,646,600],{"class":647},"s2Zo4",[561,649,650],{"class":571},"(",[561,652,653],{"class":578},"{\n",[561,655,657,661,664],{"class":563,"line":656},7,[561,658,660],{"class":659},"swJcz","  pack",[561,662,663],{"class":578},":",[561,665,666],{"class":578}," {\n",[561,668,670,673,675,678,680,683,685,688],{"class":563,"line":669},8,[561,671,672],{"class":659},"    entry",[561,674,663],{"class":578},[561,676,677],{"class":571}," [",[561,679,586],{"class":578},[561,681,682],{"class":582},"src\u002Findex.ts",[561,684,586],{"class":578},[561,686,687],{"class":571},"]",[561,689,690],{"class":578},",\n",[561,692,694,697,699,703],{"class":563,"line":693},9,[561,695,696],{"class":659},"    dts",[561,698,663],{"class":578},[561,700,702],{"class":701},"sfNiH"," true",[561,704,690],{"class":578},[561,706,708,711,713,715,717,720,722,724],{"class":563,"line":707},10,[561,709,710],{"class":659},"    format",[561,712,663],{"class":578},[561,714,677],{"class":571},[561,716,586],{"class":578},[561,718,719],{"class":582},"esm",[561,721,586],{"class":578},[561,723,687],{"class":571},[561,725,690],{"class":578},[561,727,729,732,734,736,739,742],{"class":563,"line":728},11,[561,730,731],{"class":659},"    plugins",[561,733,663],{"class":578},[561,735,677],{"class":571},[561,737,738],{"class":647},"heximonLibrary",[561,740,741],{"class":571},"()]",[561,743,690],{"class":578},[561,745,747],{"class":563,"line":746},12,[561,748,749],{"class":578},"  },\n",[561,751,753,756,759],{"class":563,"line":752},13,[561,754,755],{"class":578},"}",[561,757,758],{"class":571},")",[561,760,589],{"class":578},[499,762,763,764,766,767,774,775,778,779,782],{},"Building with another bundler instead of ",[503,765,530],{},"? The same emit runs under Vite \u002F Rollup \u002F esbuild via\n",[768,769,771],"a",{"href":770},"\u002Fdocs\u002Funder-the-hood\u002Falternate-bundlers#package-as-a-library",[503,772,773],{},"@heximon\u002Flibrary",". Either way, keep ",[503,776,777],{},"dts: true"," — the\nfactory ships as typed TypeScript, so the declaration step yields a faithful ",[503,780,781],{},"dist\u002Fheximon.d.mts",".",[784,785,787],"h2",{"id":786},"define-the-boundary-module","Define the boundary module",[499,789,790,791,794,795,798,799,802,803,806],{},"A published package has a single ",[522,792,793],{},"root boundary module",". Three keys describe its contract with the\nhost: ",[503,796,797],{},"requires"," names the tokens the host must route in, ",[503,800,801],{},"providers"," build the package's own classes,\nand ",[503,804,805],{},"exports"," expose what consumers may inject. Everything else in the package stays private.",[551,808,811],{"className":553,"code":809,"filename":810,"language":556,"meta":557,"style":557},"import { Module } from \"@heximon\u002Fruntime\";\nimport { BillingDatabase } from \".\u002Fbilling.database\";\nimport { BillingService } from \".\u002Fbilling.service\";\n\nexport class BillingModule extends Module({\n  requires: [BillingDatabase], \u002F\u002F the host routes this token in\n  providers: [BillingService], \u002F\u002F BillingService injects BillingDatabase\n  exports: [BillingService],   \u002F\u002F exposed to the consuming app\n}) {}\n","src\u002Fbilling.module.ts",[503,812,813,835,857,879,883,904,920,935,949],{"__ignoreMap":557},[561,814,815,817,819,822,824,826,828,831,833],{"class":563,"line":564},[561,816,568],{"class":567},[561,818,597],{"class":578},[561,820,821],{"class":571}," Module",[561,823,603],{"class":578},[561,825,606],{"class":567},[561,827,579],{"class":578},[561,829,830],{"class":582},"@heximon\u002Fruntime",[561,832,586],{"class":578},[561,834,589],{"class":578},[561,836,837,839,841,844,846,848,850,853,855],{"class":563,"line":592},[561,838,568],{"class":567},[561,840,597],{"class":578},[561,842,843],{"class":571}," BillingDatabase",[561,845,603],{"class":578},[561,847,606],{"class":567},[561,849,579],{"class":578},[561,851,852],{"class":582},".\u002Fbilling.database",[561,854,586],{"class":578},[561,856,589],{"class":578},[561,858,859,861,863,866,868,870,872,875,877],{"class":563,"line":618},[561,860,568],{"class":567},[561,862,597],{"class":578},[561,864,865],{"class":571}," BillingService",[561,867,603],{"class":578},[561,869,606],{"class":567},[561,871,579],{"class":578},[561,873,874],{"class":582},".\u002Fbilling.service",[561,876,586],{"class":578},[561,878,589],{"class":578},[561,880,881],{"class":563,"line":625},[561,882,622],{"emptyLinePlaceholder":621},[561,884,885,887,891,895,898,900,902],{"class":563,"line":632},[561,886,641],{"class":567},[561,888,890],{"class":889},"spNyl"," class",[561,892,894],{"class":893},"sBMFI"," BillingModule",[561,896,897],{"class":889}," extends",[561,899,821],{"class":647},[561,901,650],{"class":571},[561,903,653],{"class":578},[561,905,906,909,911,914,917],{"class":563,"line":638},[561,907,908],{"class":659},"  requires",[561,910,663],{"class":578},[561,912,913],{"class":571}," [BillingDatabase]",[561,915,916],{"class":578},",",[561,918,919],{"class":628}," \u002F\u002F the host routes this token in\n",[561,921,922,925,927,930,932],{"class":563,"line":656},[561,923,924],{"class":659},"  providers",[561,926,663],{"class":578},[561,928,929],{"class":571}," [BillingService]",[561,931,916],{"class":578},[561,933,934],{"class":628}," \u002F\u002F BillingService injects BillingDatabase\n",[561,936,937,940,942,944,946],{"class":563,"line":669},[561,938,939],{"class":659},"  exports",[561,941,663],{"class":578},[561,943,929],{"class":571},[561,945,916],{"class":578},[561,947,948],{"class":628},"   \u002F\u002F exposed to the consuming app\n",[561,950,951,953,956],{"class":563,"line":693},[561,952,755],{"class":578},[561,954,955],{"class":571},") ",[561,957,958],{"class":578},"{}\n",[499,960,961,964,965,969],{},[503,962,963],{},"BillingDatabase"," is the package's ",[966,967,968],"em",{},"own"," token, declared concrete with a default the host overrides. The\npackage requires it and exports it, but never constructs it across the boundary — the host supplies the\ninstance. That keeps the package agnostic about which database it runs against while still injecting a\nreal one.",[784,971,973],{"id":972},"export-the-surface-the-boundary-tokens","Export the surface — the boundary tokens",[499,975,976,977,979,980,982,983,986],{},"The consuming app must import the module, its ",[503,978,797],{}," tokens, and its ",[503,981,805],{}," from one public entry,\nso both compilers align on the ",[522,984,985],{},"same"," DI identity. A token resolved through two different import paths\nis two different tokens. Re-export those — and nothing else:",[551,988,990],{"className":553,"code":989,"filename":682,"language":556,"meta":557,"style":557},"export { BillingDatabase } from \".\u002Fbilling.database\";\nexport { BillingModule } from \".\u002Fbilling.module\";\nexport { BillingService } from \".\u002Fbilling.service\";\n",[503,991,992,1012,1033],{"__ignoreMap":557},[561,993,994,996,998,1000,1002,1004,1006,1008,1010],{"class":563,"line":564},[561,995,641],{"class":567},[561,997,597],{"class":578},[561,999,843],{"class":571},[561,1001,603],{"class":578},[561,1003,606],{"class":567},[561,1005,579],{"class":578},[561,1007,852],{"class":582},[561,1009,586],{"class":578},[561,1011,589],{"class":578},[561,1013,1014,1016,1018,1020,1022,1024,1026,1029,1031],{"class":563,"line":592},[561,1015,641],{"class":567},[561,1017,597],{"class":578},[561,1019,894],{"class":571},[561,1021,603],{"class":578},[561,1023,606],{"class":567},[561,1025,579],{"class":578},[561,1027,1028],{"class":582},".\u002Fbilling.module",[561,1030,586],{"class":578},[561,1032,589],{"class":578},[561,1034,1035,1037,1039,1041,1043,1045,1047,1049,1051],{"class":563,"line":618},[561,1036,641],{"class":567},[561,1038,597],{"class":578},[561,1040,865],{"class":571},[561,1042,603],{"class":578},[561,1044,606],{"class":567},[561,1046,579],{"class":578},[561,1048,874],{"class":582},[561,1050,586],{"class":578},[561,1052,589],{"class":578},[499,1054,1055,1056,1058,1059,1062,1063,1066,1067,1069,1070,1073,1074,782],{},"The generated ",[503,1057,512],{}," factory is ",[522,1060,1061],{},"not"," part of this barrel. It ships on the package's dedicated\n",[503,1064,1065],{},".\u002Fheximon"," subpath, which the build wires for you: ",[503,1068,526],{}," registers the generated barrel\n(",[503,1071,1072],{},"src\u002F.heximon\u002Flibrary\u002Findex.ts",", a machine-owned dot-directory next to your entry) as its own pack entry\nand writes the matching export-map entry into\n",[503,1075,1076],{},"package.json",[499,1078,1079],{},"No human imports the factory — the consuming app's compiler emits that import into its\ngenerated wiring — so the machine-to-machine channel stays out of your hand-written surface.",[499,1081,1082,1083,1086,1087,1090],{},"Anything a\nconsumer doesn't import — ",[503,1084,1085],{},"billing.service.ts","'s internals, helpers, private providers — never appears in\n",[503,1088,1089],{},"index.ts",". The package's surface is exactly what you re-export here.",[784,1092,1094],{"id":1093},"declare-your-compiler-plugins","Declare your compiler plugins",[499,1096,1097,1098,1101,1102,1104,1105,1108],{},"If your package uses compiler-discovered tiers — HTTP controllers, CQRS handlers, domain event handlers —\ndeclare the matching compiler plugins in ",[503,1099,1100],{},"heximon.config.ts",", exactly as an app does for its dev\nbuild. ",[503,1103,526],{}," reads that same file, so the plugin list lives in one place — an app that exports\nitself as a library repeats nothing (pass ",[503,1106,1107],{},"heximonLibrary({ plugins: [...] })"," to override it):",[551,1110,1112],{"className":553,"code":1111,"filename":1100,"language":556,"meta":557,"style":557},"import { defineHeximonConfig } from \"@heximon\u002Fbuild\";\nimport { HttpPlugin } from \"@heximon\u002Fhttp\u002Fcompiler\";\n\nexport default defineHeximonConfig({ plugins: [new HttpPlugin()] });\n",[503,1113,1114,1136,1158,1162],{"__ignoreMap":557},[561,1115,1116,1118,1120,1123,1125,1127,1129,1132,1134],{"class":563,"line":564},[561,1117,568],{"class":567},[561,1119,597],{"class":578},[561,1121,1122],{"class":571}," defineHeximonConfig",[561,1124,603],{"class":578},[561,1126,606],{"class":567},[561,1128,579],{"class":578},[561,1130,1131],{"class":582},"@heximon\u002Fbuild",[561,1133,586],{"class":578},[561,1135,589],{"class":578},[561,1137,1138,1140,1142,1145,1147,1149,1151,1154,1156],{"class":563,"line":592},[561,1139,568],{"class":567},[561,1141,597],{"class":578},[561,1143,1144],{"class":571}," HttpPlugin",[561,1146,603],{"class":578},[561,1148,606],{"class":567},[561,1150,579],{"class":578},[561,1152,1153],{"class":582},"@heximon\u002Fhttp\u002Fcompiler",[561,1155,586],{"class":578},[561,1157,589],{"class":578},[561,1159,1160],{"class":563,"line":618},[561,1161,622],{"emptyLinePlaceholder":621},[561,1163,1164,1166,1168,1170,1172,1175,1178,1180,1182,1185,1187,1190,1192,1194],{"class":563,"line":625},[561,1165,641],{"class":567},[561,1167,644],{"class":567},[561,1169,1122],{"class":647},[561,1171,650],{"class":571},[561,1173,1174],{"class":578},"{",[561,1176,1177],{"class":659}," plugins",[561,1179,663],{"class":578},[561,1181,677],{"class":571},[561,1183,1184],{"class":578},"new",[561,1186,1144],{"class":647},[561,1188,1189],{"class":571},"()] ",[561,1191,755],{"class":578},[561,1193,758],{"class":571},[561,1195,589],{"class":578},[499,1197,1198,1199,1202,1203,1205,1206,1208,1209,1212,1213,1216,1217,1219,1220,1223,1224,782],{},"With the ",[503,1200,1201],{},"pack"," config and ",[503,1204,1100],{}," in place, ",[503,1207,530],{}," runs the compiler in library mode ",[522,1210,1211],{},"before\nentries resolve"," — writing the typed ",[503,1214,1215],{},"create\u003CModule>.ts"," factory + the ",[503,1218,1072],{}," barrel,\nregistering that barrel as the pack's own ",[503,1221,1222],{},"heximon"," entry, and emitting ",[503,1225,516],{},[499,1227,1228,1229,1231,1232,1235,1236,1238,1239,1242,1243,782],{},"The\nfactory ships as the ",[503,1230,1065],{}," subpath (",[503,1233,1234],{},"dist\u002Fheximon.mjs",", declared in ",[503,1237,781],{},"); your\n",[503,1240,1241],{},"pack.entry"," stays exactly the hand-written ",[503,1244,682],{},[1246,1247,1249,1250,1253,1254,1256,1257,1260,1261,1264,1265,1267],"callout",{"type":1248},"info","Why ",[503,1251,1252],{},"dts"," matters: the factory is emitted as typed TypeScript, so the declaration step produces a faithful\n",[503,1255,781],{}," — a human calling ",[503,1258,1259],{},"createBillingModule"," by hand gets real argument and result types, not\n",[503,1262,1263],{},"any",". The library emit auto-skips if you turn ",[503,1266,1252],{}," off (a build that ships no declarations can't ship a\nconsumable typed factory).",[784,1269,1271],{"id":1270},"declare-the-framework-as-a-peer","Declare the framework as a peer",[499,1273,1274,1275,1278,1279,1282,1283,1286,1287,1290,1291,1294,1295,1298],{},"The framework and every shared cross-boundary type ",[522,1276,1277],{},"must"," be ",[503,1280,1281],{},"peerDependencies",", never bundled. Bundling\nships a second copy of ",[503,1284,1285],{},"Module",", and two copies are two different DI tokens — the host's ",[503,1288,1289],{},"BillingService","\nand yours stop matching, so injection silently fails at runtime. Cover ",[503,1292,1293],{},"dist\u002F"," in ",[503,1296,1297],{},"files"," for the same\nreason of shipping exactly one boundary.",[551,1300,1304],{"className":1301,"code":1302,"filename":1076,"language":1303,"meta":557,"style":557},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"name\": \"@acme\u002Fbilling\",\n  \"type\": \"module\",\n  \"files\": [\"dist\"],\n  \"exports\": {\n    \".\": { \"development\": \".\u002Fsrc\u002Findex.ts\", \"default\": \".\u002Fdist\u002Findex.mjs\" }\n  },\n  \"scripts\": { \"build\": \"vp pack\" },\n  \"peerDependencies\": {\n    \"@heximon\u002Fruntime\": \"^2.0.0\"\n  }\n}\n","json",[503,1305,1306,1310,1331,1351,1373,1385,1436,1440,1471,1483,1501,1506],{"__ignoreMap":557},[561,1307,1308],{"class":563,"line":564},[561,1309,653],{"class":578},[561,1311,1312,1315,1318,1320,1322,1324,1327,1329],{"class":563,"line":592},[561,1313,1314],{"class":578},"  \"",[561,1316,1317],{"class":889},"name",[561,1319,586],{"class":578},[561,1321,663],{"class":578},[561,1323,579],{"class":578},[561,1325,1326],{"class":582},"@acme\u002Fbilling",[561,1328,586],{"class":578},[561,1330,690],{"class":578},[561,1332,1333,1335,1338,1340,1342,1344,1347,1349],{"class":563,"line":618},[561,1334,1314],{"class":578},[561,1336,1337],{"class":889},"type",[561,1339,586],{"class":578},[561,1341,663],{"class":578},[561,1343,579],{"class":578},[561,1345,1346],{"class":582},"module",[561,1348,586],{"class":578},[561,1350,690],{"class":578},[561,1352,1353,1355,1357,1359,1361,1363,1365,1368,1370],{"class":563,"line":625},[561,1354,1314],{"class":578},[561,1356,1297],{"class":889},[561,1358,586],{"class":578},[561,1360,663],{"class":578},[561,1362,677],{"class":578},[561,1364,586],{"class":578},[561,1366,1367],{"class":582},"dist",[561,1369,586],{"class":578},[561,1371,1372],{"class":578},"],\n",[561,1374,1375,1377,1379,1381,1383],{"class":563,"line":632},[561,1376,1314],{"class":578},[561,1378,805],{"class":889},[561,1380,586],{"class":578},[561,1382,663],{"class":578},[561,1384,666],{"class":578},[561,1386,1387,1390,1392,1394,1396,1398,1400,1404,1406,1408,1410,1413,1415,1417,1419,1422,1424,1426,1428,1431,1433],{"class":563,"line":638},[561,1388,1389],{"class":578},"    \"",[561,1391,782],{"class":893},[561,1393,586],{"class":578},[561,1395,663],{"class":578},[561,1397,597],{"class":578},[561,1399,579],{"class":578},[561,1401,1403],{"class":1402},"sbssI","development",[561,1405,586],{"class":578},[561,1407,663],{"class":578},[561,1409,579],{"class":578},[561,1411,1412],{"class":582},".\u002Fsrc\u002Findex.ts",[561,1414,586],{"class":578},[561,1416,916],{"class":578},[561,1418,579],{"class":578},[561,1420,1421],{"class":1402},"default",[561,1423,586],{"class":578},[561,1425,663],{"class":578},[561,1427,579],{"class":578},[561,1429,1430],{"class":582},".\u002Fdist\u002Findex.mjs",[561,1432,586],{"class":578},[561,1434,1435],{"class":578}," }\n",[561,1437,1438],{"class":563,"line":656},[561,1439,749],{"class":578},[561,1441,1442,1444,1447,1449,1451,1453,1455,1458,1460,1462,1464,1466,1468],{"class":563,"line":669},[561,1443,1314],{"class":578},[561,1445,1446],{"class":889},"scripts",[561,1448,586],{"class":578},[561,1450,663],{"class":578},[561,1452,597],{"class":578},[561,1454,579],{"class":578},[561,1456,1457],{"class":893},"build",[561,1459,586],{"class":578},[561,1461,663],{"class":578},[561,1463,579],{"class":578},[561,1465,530],{"class":582},[561,1467,586],{"class":578},[561,1469,1470],{"class":578}," },\n",[561,1472,1473,1475,1477,1479,1481],{"class":563,"line":693},[561,1474,1314],{"class":578},[561,1476,1281],{"class":889},[561,1478,586],{"class":578},[561,1480,663],{"class":578},[561,1482,666],{"class":578},[561,1484,1485,1487,1489,1491,1493,1495,1498],{"class":563,"line":707},[561,1486,1389],{"class":578},[561,1488,830],{"class":893},[561,1490,586],{"class":578},[561,1492,663],{"class":578},[561,1494,579],{"class":578},[561,1496,1497],{"class":582},"^2.0.0",[561,1499,1500],{"class":578},"\"\n",[561,1502,1503],{"class":563,"line":728},[561,1504,1505],{"class":578},"  }\n",[561,1507,1508],{"class":563,"line":746},[561,1509,1510],{"class":578},"}\n",[499,1512,1513,1514,1516,1517,1519,1520,1523,1524,1526,1527,1530],{},"The root ",[503,1515,782],{}," entry you author is the minimum that makes ",[503,1518,1326],{}," resolvable at all — the app's\n",[503,1521,1522],{},"imports: [BillingModule]"," imports the module token through it, and the ",[503,1525,1403],{}," condition serves the\npackage's ",[522,1528,1529],{},"source"," to the workspace before any build has run.",[499,1532,1533,1534,1537,1538,1540,1541,1544,1545,1548,1549,1552],{},"From there the pack ",[522,1535,1536],{},"maintains the map",":\nit normalizes the root entry, adds the ",[503,1539,1065],{}," factory subpath and ",[503,1542,1543],{},".\u002Fpackage.json",", restores explicit\n",[503,1546,1547],{},"types"," conditions, and writes a dist-only ",[503,1550,1551],{},"publishConfig.exports"," your package manager swaps in at\npublish.",[499,1554,1555,1556,1559,1560,1562],{},"Commit the write; re-packs are byte-stable, and extra hand-authored subpaths are preserved. To opt\nout entirely, set ",[503,1557,1558],{},"pack: { exports: false }"," — you then maintain the map by hand, and the build fails loud\nif the ",[503,1561,1065],{}," entry is missing.",[1246,1564,1566,1569,1570,1572,1573,1575,1576,1578,1579,1582,1583,1586,1587,1589,1590,1592,1593,1596,1597,1599,1600,1294,1602,782],{"type":1565},"warning",[522,1567,1568],{},"A bundled framework copy breaks DI identity across the boundary."," ",[503,1571,526],{}," resolves tokens by\nclass identity, so two copies of ",[503,1574,830],{}," produce two unrelated ",[503,1577,1285],{}," tokens and the host\ncan't wire your exports. The build doesn't fail — it ",[522,1580,1581],{},"warns",": ",[503,1584,1585],{},"[heximon-library] no @heximon\u002F* peerDependency declared — the heximon framework and shared cross-boundary types must be peerDependencies (never bundled), or DI token identity splits across the package boundary at runtime (Guard 1).",", and a matching warning when ",[503,1588,1297],{}," doesn't cover ",[503,1591,1293],{},". Fix it by moving every\n",[503,1594,1595],{},"@heximon\u002F*"," you import to ",[503,1598,1281],{}," and listing ",[503,1601,1367],{},[503,1603,1297],{},[784,1605,1607],{"id":1606},"read-what-the-build-emits","Read what the build emits",[499,1609,1610],{},"The build produces two artifacts. The factory is the code the consuming app links against; the manifest\nis the description that lets it link without your source.",[1612,1613,1614,1631],"table",{},[1615,1616,1617],"thead",{},[1618,1619,1620,1625,1628],"tr",{},[1621,1622,1624],"th",{"align":1623},"left","Artifact",[1621,1626,1627],{"align":1623},"Where",[1621,1629,1630],{"align":1623},"Purpose",[1632,1633,1634,1655,1678],"tbody",{},[1618,1635,1636,1642,1652],{},[1637,1638,1639,1641],"td",{"align":1623},[503,1640,512],{}," factory (typed)",[1637,1643,1644,1235,1646,1648,1649,1651],{"align":1623},[503,1645,1234],{},[503,1647,781],{}," — the ",[503,1650,1065],{}," subpath",[1637,1653,1654],{"align":1623},"The factory the consuming app's compiler links against — and a human can call by hand, with real types",[1618,1656,1657,1662,1666],{},[1637,1658,1659],{"align":1623},[503,1660,1661],{},"heximon.manifest.json",[1637,1663,1664],{"align":1623},[503,1665,1293],{},[1637,1667,1668,1669,1671,1672,1674,1675,1677],{"align":1623},"Records the boundary — the module's ",[503,1670,797],{},", ",[503,1673,805],{},", and the factory export + its ",[503,1676,1065],{}," specifier, keyed to the package name",[1618,1679,1680,1687,1690],{},[1637,1681,1682,1569,1684,1686],{"align":1623},[503,1683,1076],{},[503,1685,805],{}," map",[1637,1688,1689],{"align":1623},"written in place",[1637,1691,1692,1693,1695,1696,1698,1699,1701,1702,1704],{"align":1623},"The resolution wiring for both entries — source-linked ",[503,1694,1403],{}," conditions for the workspace, ",[503,1697,1547],{},"\u002F",[503,1700,1421],{}," for the bundle, ",[503,1703,1551],{}," for publish",[499,1706,1707,1708,1710,1711,1713],{},"The manifest is what makes a precompiled package consumable: it records each cross-boundary token's\nspecifier as the package name, so the host compiler resolves ",[503,1709,1289],{}," and ",[503,1712,963],{}," by\nthat bare specifier and never has to see — or recompile — your internals.",[784,1715,1717],{"id":1716},"consume-the-published-module","Consume the published module",[499,1719,1720,1721,1723,1724,1726,1727,1569,1729,1732],{},"The common path never touches the factory by hand. A host app installs the package and lists the module\nin ",[503,1722,505],{}," by its bare specifier, exactly like a local module. The app's compiler resolves the manifest\n(",[503,1725,516],{},", or a custom path via the ",[503,1728,1076],{},[503,1730,1731],{},"heximon.manifest"," pointer) and\nwires the factory in automatically.",[551,1734,1737],{"className":553,"code":1735,"filename":1736,"language":556,"meta":557,"style":557},"import { Module } from \"@heximon\u002Fruntime\";\nimport { BillingDatabase, BillingModule } from \"@acme\u002Fbilling\";\nimport { PrimaryDatabase } from \".\u002Fprimary.database\";\n\nexport class AppModule extends Module({\n  imports: [BillingModule],\n  providers: [PrimaryDatabase],\n  \u002F\u002F Route the package's required token to the host's concrete database.\n  overrides: [{ provide: BillingDatabase, useExisting: PrimaryDatabase }],\n}) {}\n","src\u002Fapp.module.ts",[503,1738,1739,1759,1783,1805,1809,1826,1838,1849,1854,1888],{"__ignoreMap":557},[561,1740,1741,1743,1745,1747,1749,1751,1753,1755,1757],{"class":563,"line":564},[561,1742,568],{"class":567},[561,1744,597],{"class":578},[561,1746,821],{"class":571},[561,1748,603],{"class":578},[561,1750,606],{"class":567},[561,1752,579],{"class":578},[561,1754,830],{"class":582},[561,1756,586],{"class":578},[561,1758,589],{"class":578},[561,1760,1761,1763,1765,1767,1769,1771,1773,1775,1777,1779,1781],{"class":563,"line":592},[561,1762,568],{"class":567},[561,1764,597],{"class":578},[561,1766,843],{"class":571},[561,1768,916],{"class":578},[561,1770,894],{"class":571},[561,1772,603],{"class":578},[561,1774,606],{"class":567},[561,1776,579],{"class":578},[561,1778,1326],{"class":582},[561,1780,586],{"class":578},[561,1782,589],{"class":578},[561,1784,1785,1787,1789,1792,1794,1796,1798,1801,1803],{"class":563,"line":618},[561,1786,568],{"class":567},[561,1788,597],{"class":578},[561,1790,1791],{"class":571}," PrimaryDatabase",[561,1793,603],{"class":578},[561,1795,606],{"class":567},[561,1797,579],{"class":578},[561,1799,1800],{"class":582},".\u002Fprimary.database",[561,1802,586],{"class":578},[561,1804,589],{"class":578},[561,1806,1807],{"class":563,"line":625},[561,1808,622],{"emptyLinePlaceholder":621},[561,1810,1811,1813,1815,1818,1820,1822,1824],{"class":563,"line":632},[561,1812,641],{"class":567},[561,1814,890],{"class":889},[561,1816,1817],{"class":893}," AppModule",[561,1819,897],{"class":889},[561,1821,821],{"class":647},[561,1823,650],{"class":571},[561,1825,653],{"class":578},[561,1827,1828,1831,1833,1836],{"class":563,"line":638},[561,1829,1830],{"class":659},"  imports",[561,1832,663],{"class":578},[561,1834,1835],{"class":571}," [BillingModule]",[561,1837,690],{"class":578},[561,1839,1840,1842,1844,1847],{"class":563,"line":656},[561,1841,924],{"class":659},[561,1843,663],{"class":578},[561,1845,1846],{"class":571}," [PrimaryDatabase]",[561,1848,690],{"class":578},[561,1850,1851],{"class":563,"line":669},[561,1852,1853],{"class":628},"  \u002F\u002F Route the package's required token to the host's concrete database.\n",[561,1855,1856,1859,1861,1863,1865,1868,1870,1872,1874,1877,1879,1882,1884,1886],{"class":563,"line":693},[561,1857,1858],{"class":659},"  overrides",[561,1860,663],{"class":578},[561,1862,677],{"class":571},[561,1864,1174],{"class":578},[561,1866,1867],{"class":659}," provide",[561,1869,663],{"class":578},[561,1871,843],{"class":571},[561,1873,916],{"class":578},[561,1875,1876],{"class":659}," useExisting",[561,1878,663],{"class":578},[561,1880,1881],{"class":571}," PrimaryDatabase ",[561,1883,755],{"class":578},[561,1885,687],{"class":571},[561,1887,690],{"class":578},[561,1889,1890,1892,1894],{"class":563,"line":707},[561,1891,755],{"class":578},[561,1893,955],{"class":571},[561,1895,958],{"class":578},[499,1897,1898,1899,1901,1902,1904,1905,1908,1909,1911,1912,1914],{},"The host routes whatever the package's ",[503,1900,797],{}," names — here ",[503,1903,963],{},", bound to its own\n",[503,1906,1907],{},"PrimaryDatabase"," — and gains access to the package's ",[503,1910,805],{}," (",[503,1913,1289],{},"). The precompiled\ninternal graph stays sealed: the app compiler links the factory and never re-scans the package.",[499,1916,1917,1918,1920,1921,1923],{},"Because the factory ships typed, the rarer manual path is also available — ",[503,1919,568],{}," it from the ",[503,1922,1065],{},"\nsubpath and call it with the host-bound inputs:",[551,1925,1927],{"className":553,"code":1926,"language":556,"meta":557,"style":557},"import { createBillingModule } from \"@acme\u002Fbilling\u002Fheximon\"; \u002F\u002F fully typed\n\nconst { exports } = await createBillingModule({ billingDatabase });\n\u002F\u002F exports.billingService: BillingService\n",[503,1928,1929,1955,1959,1992],{"__ignoreMap":557},[561,1930,1931,1933,1935,1938,1940,1942,1944,1947,1949,1952],{"class":563,"line":564},[561,1932,568],{"class":567},[561,1934,597],{"class":578},[561,1936,1937],{"class":571}," createBillingModule",[561,1939,603],{"class":578},[561,1941,606],{"class":567},[561,1943,579],{"class":578},[561,1945,1946],{"class":582},"@acme\u002Fbilling\u002Fheximon",[561,1948,586],{"class":578},[561,1950,1951],{"class":578},";",[561,1953,1954],{"class":628}," \u002F\u002F fully typed\n",[561,1956,1957],{"class":563,"line":592},[561,1958,622],{"emptyLinePlaceholder":621},[561,1960,1961,1964,1966,1969,1971,1974,1977,1979,1981,1983,1986,1988,1990],{"class":563,"line":618},[561,1962,1963],{"class":889},"const",[561,1965,597],{"class":578},[561,1967,1968],{"class":571}," exports ",[561,1970,755],{"class":578},[561,1972,1973],{"class":578}," =",[561,1975,1976],{"class":567}," await",[561,1978,1937],{"class":647},[561,1980,650],{"class":571},[561,1982,1174],{"class":578},[561,1984,1985],{"class":571}," billingDatabase ",[561,1987,755],{"class":578},[561,1989,758],{"class":571},[561,1991,589],{"class":578},[561,1993,1994],{"class":563,"line":625},[561,1995,1996],{"class":628},"\u002F\u002F exports.billingService: BillingService\n",[1998,1999,2001],"h3",{"id":2000},"what-crosses-a-boundary-and-how","What crosses a boundary, and how",[499,2003,2004,2005,2007],{},"A composed boundary crosses concepts to the consuming app at three depths. You never wire any of them by hand —\nlisting the module in ",[503,2006,505],{}," (and, for the third depth, registering each concept's plugin) is enough:",[1612,2009,2010,2025],{},[1615,2011,2012],{},[1618,2013,2014,2017,2020,2023],{},[1621,2015,2016],{},"Depth",[1621,2018,2019],{},"What crosses",[1621,2021,2022],{},"How",[1621,2024,31],{},[1632,2026,2027,2043,2059],{},[1618,2028,2029,2034,2037,2040],{},[1637,2030,2031],{},[522,2032,2033],{},"Runtime instances",[1637,2035,2036],{},"constructed handler objects",[1637,2038,2039],{},"the boundary's factory constructs them and self-registers them into the host's dispatch tables at boot",[1637,2041,2042],{},"HTTP controllers, CQRS command\u002Fquery handlers, event handlers, queue channel handlers, saga timeout handlers",[1618,2044,2045,2050,2053,2056],{},[1637,2046,2047],{},[522,2048,2049],{},"Manifest facts",[1637,2051,2052],{},"data the app's build needs",[1637,2054,2055],{},"the app reads the boundary's manifest at compile time and folds the facts into its own build output",[1637,2057,2058],{},"a boundary queue channel's delivery trigger on a push platform, a boundary handler's OpenTelemetry span, a boundary's cron triggers",[1618,2060,2061,2066,2069,2076],{},[1637,2062,2063],{},[522,2064,2065],{},"Re-discovered concepts",[1637,2067,2068],{},"class identities the app must name in generated code",[1637,2070,2071,2072,2075],{},"the app synthesizes the class from the boundary's ",[503,2073,2074],{},".d.ts"," + manifest and wires it as if app-local",[1637,2077,2078],{},"Durable Objects (their bridges + wrangler bindings), WebSocket + SSE handlers (their upgrade\u002Fstream routes)",[499,2080,2081,2082,2084,2085,2088,2089,2091],{},"The first two depths need nothing beyond ",[503,2083,505],{},": a boundary's queue handler both drains AND — on a push\nplatform (Vercel \u002F Lambda \u002F Netlify) — gets its delivery trigger, and every boundary command \u002F event \u002F queue\nhandler gets its OpenTelemetry span whenever the app enables ",[503,2086,2087],{},"@heximon\u002Fotel",", all automatically. The third depth\nadditionally needs the owning plugin registered in ",[503,2090,1100],{},", described next.",[1998,2093,2095],{"id":2094},"durable-objects-websocket-and-sse-cross-transparently","Durable Objects, WebSocket, and SSE cross transparently",[499,2097,2098,2099,2102,2103,2106,2107,2110],{},"A ",[522,2100,2101],{},"Durable Object",", a ",[522,2104,2105],{},"WebSocket handler",", and an ",[522,2108,2109],{},"SSE handler"," are not runtime values the factory can hand\nover — a DO is a per-instance platform actor constructed through its own generated bridge, and a streaming handler\nis resolved lazily at dispatch.",[499,2112,2113,2114,2117,2118,2121],{},"So when a boundary ships them, the consuming app ",[522,2115,2116],{},"re-discovers"," them off the\nmanifest and emits their bridges, upgrade routes, wrangler bindings, and durable-host glue ",[966,2119,2120],{},"as if they were\napp-local"," — with no per-app listing.",[499,2123,2124,2125,2128,2129,2131,2132,663],{},"The app opts in the same way it does for any concept: by registering the owning compiler plugin. A boundary\nthat ships Durable Objects behind a typed WebSocket + SSE feed (the flagship's ",[503,2126,2127],{},"@ticketing\u002Frealtime",") is\ncomposed with just its module in ",[503,2130,505],{}," and the three plugins in ",[503,2133,1100],{},[551,2135,2137],{"className":553,"code":2136,"filename":1100,"language":556,"meta":557,"style":557},"import { DurablePlugin } from \"@heximon\u002Fdurable\u002Fcompiler\";\nimport { ServerSentEventsPlugin } from \"@heximon\u002Fsse\u002Fcompiler\";\nimport { WebSocketPlugin } from \"@heximon\u002Fwebsocket\u002Fcompiler\";\n\nexport default defineHeximonConfig({\n  \u002F\u002F DurablePlugin re-discovers the boundary's Durable Objects (their bridges + wrangler bindings emit\n  \u002F\u002F app-side); the WebSocket + SSE plugins re-discover its streaming handlers (their upgrade\u002Fstream routes\n  \u002F\u002F emit app-side). Every other plugin the boundary's concepts need is registered the same way.\n  plugins: [\u002F* … *\u002F new DurablePlugin(), new WebSocketPlugin(), new ServerSentEventsPlugin()],\n});\n",[503,2138,2139,2161,2183,2205,2209,2221,2226,2231,2236,2274],{"__ignoreMap":557},[561,2140,2141,2143,2145,2148,2150,2152,2154,2157,2159],{"class":563,"line":564},[561,2142,568],{"class":567},[561,2144,597],{"class":578},[561,2146,2147],{"class":571}," DurablePlugin",[561,2149,603],{"class":578},[561,2151,606],{"class":567},[561,2153,579],{"class":578},[561,2155,2156],{"class":582},"@heximon\u002Fdurable\u002Fcompiler",[561,2158,586],{"class":578},[561,2160,589],{"class":578},[561,2162,2163,2165,2167,2170,2172,2174,2176,2179,2181],{"class":563,"line":592},[561,2164,568],{"class":567},[561,2166,597],{"class":578},[561,2168,2169],{"class":571}," ServerSentEventsPlugin",[561,2171,603],{"class":578},[561,2173,606],{"class":567},[561,2175,579],{"class":578},[561,2177,2178],{"class":582},"@heximon\u002Fsse\u002Fcompiler",[561,2180,586],{"class":578},[561,2182,589],{"class":578},[561,2184,2185,2187,2189,2192,2194,2196,2198,2201,2203],{"class":563,"line":618},[561,2186,568],{"class":567},[561,2188,597],{"class":578},[561,2190,2191],{"class":571}," WebSocketPlugin",[561,2193,603],{"class":578},[561,2195,606],{"class":567},[561,2197,579],{"class":578},[561,2199,2200],{"class":582},"@heximon\u002Fwebsocket\u002Fcompiler",[561,2202,586],{"class":578},[561,2204,589],{"class":578},[561,2206,2207],{"class":563,"line":625},[561,2208,622],{"emptyLinePlaceholder":621},[561,2210,2211,2213,2215,2217,2219],{"class":563,"line":632},[561,2212,641],{"class":567},[561,2214,644],{"class":567},[561,2216,1122],{"class":647},[561,2218,650],{"class":571},[561,2220,653],{"class":578},[561,2222,2223],{"class":563,"line":638},[561,2224,2225],{"class":628},"  \u002F\u002F DurablePlugin re-discovers the boundary's Durable Objects (their bridges + wrangler bindings emit\n",[561,2227,2228],{"class":563,"line":656},[561,2229,2230],{"class":628},"  \u002F\u002F app-side); the WebSocket + SSE plugins re-discover its streaming handlers (their upgrade\u002Fstream routes\n",[561,2232,2233],{"class":563,"line":669},[561,2234,2235],{"class":628},"  \u002F\u002F emit app-side). Every other plugin the boundary's concepts need is registered the same way.\n",[561,2237,2238,2241,2243,2245,2248,2251,2253,2256,2258,2260,2262,2264,2266,2268,2270,2272],{"class":563,"line":693},[561,2239,2240],{"class":659},"  plugins",[561,2242,663],{"class":578},[561,2244,677],{"class":571},[561,2246,2247],{"class":628},"\u002F* … *\u002F",[561,2249,2250],{"class":578}," new",[561,2252,2147],{"class":647},[561,2254,2255],{"class":571},"()",[561,2257,916],{"class":578},[561,2259,2250],{"class":578},[561,2261,2191],{"class":647},[561,2263,2255],{"class":571},[561,2265,916],{"class":578},[561,2267,2250],{"class":578},[561,2269,2169],{"class":647},[561,2271,741],{"class":571},[561,2273,690],{"class":578},[561,2275,2276,2278,2280],{"class":563,"line":707},[561,2277,755],{"class":578},[561,2279,758],{"class":571},[561,2281,589],{"class":578},[551,2283,2285],{"className":553,"code":2284,"filename":1736,"language":556,"meta":557,"style":557},"import { RealtimeModule } from \"@ticketing\u002Frealtime\";\n\nexport class AppModule extends Module({\n  imports: [RealtimeModule], \u002F\u002F its Durable Objects + WebSocket + SSE handlers wire automatically\n}) {}\n",[503,2286,2287,2308,2312,2328,2342],{"__ignoreMap":557},[561,2288,2289,2291,2293,2296,2298,2300,2302,2304,2306],{"class":563,"line":564},[561,2290,568],{"class":567},[561,2292,597],{"class":578},[561,2294,2295],{"class":571}," RealtimeModule",[561,2297,603],{"class":578},[561,2299,606],{"class":567},[561,2301,579],{"class":578},[561,2303,2127],{"class":582},[561,2305,586],{"class":578},[561,2307,589],{"class":578},[561,2309,2310],{"class":563,"line":592},[561,2311,622],{"emptyLinePlaceholder":621},[561,2313,2314,2316,2318,2320,2322,2324,2326],{"class":563,"line":618},[561,2315,641],{"class":567},[561,2317,890],{"class":889},[561,2319,1817],{"class":893},[561,2321,897],{"class":889},[561,2323,821],{"class":647},[561,2325,650],{"class":571},[561,2327,653],{"class":578},[561,2329,2330,2332,2334,2337,2339],{"class":563,"line":625},[561,2331,1830],{"class":659},[561,2333,663],{"class":578},[561,2335,2336],{"class":571}," [RealtimeModule]",[561,2338,916],{"class":578},[561,2340,2341],{"class":628}," \u002F\u002F its Durable Objects + WebSocket + SSE handlers wire automatically\n",[561,2343,2344,2346,2348],{"class":563,"line":632},[561,2345,755],{"class":578},[561,2347,955],{"class":571},[561,2349,958],{"class":578},[499,2351,2098,2352,2355,2356,1911,2359],{},[503,2353,2354],{},"vp build"," then emits the boundary's Durable Objects into ",[503,2357,2358],{},"dist\u002Fwrangler.json",[503,2360,2361],{},"durable_objects.bindings",[2363,2364,2365],"ul",{},[2366,2367,2368,2369,2372,2373,2375],"li",{},"the migrations ledger) and its WebSocket\u002FSSE upgrade routes into the worker — the same artifacts an app-local\nDurable Object or handler produces. The boundary provider its handlers inject (a ",[503,2370,2371],{},"WebSocketContract",") must be\nin the package's ",[503,2374,805],{},", so the app resolves it across the boundary.",[1998,2377,2379],{"id":2378},"the-build-flags-a-stale-manifest","The build flags a stale manifest",[499,2381,2382,2383,2385,2386,2389,2390,782],{},"Because the app trusts the manifest to know what a sealed package exposes, a manifest that drifts from the\npackage it ships with — a hand-edited or out-of-date ",[503,2384,1661],{}," exporting a token the package\nno longer actually ships — would compile cleanly and then fail at ",[522,2387,2388],{},"runtime"," with a bare ",[503,2391,2392],{},"no provider",[499,2394,2395,2396,2399,2400,2402,2403,2405,2406,2408],{},"The app build closes that gap: it cross-checks each boundary module's manifest ",[503,2397,2398],{},"core"," tokens (the module\nclass, the ",[503,2401,512],{}," factory, and the exported tokens the package itself ships) against the names\nthe package's published ",[503,2404,2074],{}," exports, and ",[522,2407,1581],{}," when one is missing:",[2410,2411,2412],"blockquote",{},[499,2413,2414],{},"Cross-package module '@acme\u002Fbilling': its heximon.manifest.json declares the exported token\n'BillingService', but the package's published .d.ts does not export it — the manifest is out of date\nwith the shipped package. Rebuild\u002Frepublish the package, or align your installed version with its manifest.",[499,2416,2417,2418,2420,2421,2424,2425,2428,2429,2432,2433,2435],{},"It only warns when the package's ",[503,2419,2074],{}," was read ",[522,2422,2423],{},"and"," the name is definitively absent — a package that\nships no type declarations is skipped (no evidence either way), so a ",[503,2426,2427],{},".js","-only dependency is never\nmisreported. Escalate the warning to a build-breaking error with\n",[503,2430,2431],{},"strictDiagnostics: [DiagnosticCode.BoundaryManifestDrift]"," in the ",[503,2434,538],{}," plugin options.",[1998,2437,2439],{"id":2438},"hot-reload-a-workspace-library-in-dev","Hot-reload a workspace library in dev",[499,2441,2442,2443,2446,2447,2450,2451,2454,2455,2458,2459,782],{},"A published npm boundary only changes when you republish it — there is no local source to edit. But a\n",[522,2444,2445],{},"workspace-linked"," library (a monorepo sibling the app consumes by a ",[503,2448,2449],{},"workspace:*"," specifier) ",[966,2452,2453],{},"is"," local\nsource, and ",[503,2456,2457],{},"vp dev"," hot-reloads it: edit the library, refresh the app — no manual ",[503,2460,530],{},[499,2462,2463,2464,2466,2467,2469],{},"The library side is already wired: the exports map the pack wrote carries a ",[503,2465,1403],{}," condition per\nsubpath, pointing at source (the same three-condition shape every framework ",[503,2468,1595],{}," package uses):",[551,2471,2474],{"className":1301,"code":2472,"filename":2473,"language":1303,"meta":557,"style":557},"{\n  \"exports\": {\n    \".\": {\n      \"development\": \".\u002Fsrc\u002Findex.ts\",\n      \"types\": \".\u002Fdist\u002Findex.d.mts\",\n      \"default\": \".\u002Fdist\u002Findex.mjs\"\n    },\n    \".\u002Fheximon\": {\n      \"development\": \".\u002Fsrc\u002F.heximon\u002Flibrary\u002Findex.ts\",\n      \"types\": \".\u002Fdist\u002Fheximon.d.mts\",\n      \"default\": \".\u002Fdist\u002Fheximon.mjs\"\n    },\n    \".\u002Fpackage.json\": \".\u002Fpackage.json\"\n  }\n}\n","the library's package.json — written by the pack",[503,2475,2476,2480,2492,2504,2523,2542,2558,2563,2575,2594,2613,2630,2634,2650,2655],{"__ignoreMap":557},[561,2477,2478],{"class":563,"line":564},[561,2479,653],{"class":578},[561,2481,2482,2484,2486,2488,2490],{"class":563,"line":592},[561,2483,1314],{"class":578},[561,2485,805],{"class":889},[561,2487,586],{"class":578},[561,2489,663],{"class":578},[561,2491,666],{"class":578},[561,2493,2494,2496,2498,2500,2502],{"class":563,"line":618},[561,2495,1389],{"class":578},[561,2497,782],{"class":893},[561,2499,586],{"class":578},[561,2501,663],{"class":578},[561,2503,666],{"class":578},[561,2505,2506,2509,2511,2513,2515,2517,2519,2521],{"class":563,"line":625},[561,2507,2508],{"class":578},"      \"",[561,2510,1403],{"class":1402},[561,2512,586],{"class":578},[561,2514,663],{"class":578},[561,2516,579],{"class":578},[561,2518,1412],{"class":582},[561,2520,586],{"class":578},[561,2522,690],{"class":578},[561,2524,2525,2527,2529,2531,2533,2535,2538,2540],{"class":563,"line":632},[561,2526,2508],{"class":578},[561,2528,1547],{"class":1402},[561,2530,586],{"class":578},[561,2532,663],{"class":578},[561,2534,579],{"class":578},[561,2536,2537],{"class":582},".\u002Fdist\u002Findex.d.mts",[561,2539,586],{"class":578},[561,2541,690],{"class":578},[561,2543,2544,2546,2548,2550,2552,2554,2556],{"class":563,"line":638},[561,2545,2508],{"class":578},[561,2547,1421],{"class":1402},[561,2549,586],{"class":578},[561,2551,663],{"class":578},[561,2553,579],{"class":578},[561,2555,1430],{"class":582},[561,2557,1500],{"class":578},[561,2559,2560],{"class":563,"line":656},[561,2561,2562],{"class":578},"    },\n",[561,2564,2565,2567,2569,2571,2573],{"class":563,"line":669},[561,2566,1389],{"class":578},[561,2568,1065],{"class":893},[561,2570,586],{"class":578},[561,2572,663],{"class":578},[561,2574,666],{"class":578},[561,2576,2577,2579,2581,2583,2585,2587,2590,2592],{"class":563,"line":693},[561,2578,2508],{"class":578},[561,2580,1403],{"class":1402},[561,2582,586],{"class":578},[561,2584,663],{"class":578},[561,2586,579],{"class":578},[561,2588,2589],{"class":582},".\u002Fsrc\u002F.heximon\u002Flibrary\u002Findex.ts",[561,2591,586],{"class":578},[561,2593,690],{"class":578},[561,2595,2596,2598,2600,2602,2604,2606,2609,2611],{"class":563,"line":707},[561,2597,2508],{"class":578},[561,2599,1547],{"class":1402},[561,2601,586],{"class":578},[561,2603,663],{"class":578},[561,2605,579],{"class":578},[561,2607,2608],{"class":582},".\u002Fdist\u002Fheximon.d.mts",[561,2610,586],{"class":578},[561,2612,690],{"class":578},[561,2614,2615,2617,2619,2621,2623,2625,2628],{"class":563,"line":728},[561,2616,2508],{"class":578},[561,2618,1421],{"class":1402},[561,2620,586],{"class":578},[561,2622,663],{"class":578},[561,2624,579],{"class":578},[561,2626,2627],{"class":582},".\u002Fdist\u002Fheximon.mjs",[561,2629,1500],{"class":578},[561,2631,2632],{"class":563,"line":746},[561,2633,2562],{"class":578},[561,2635,2636,2638,2640,2642,2644,2646,2648],{"class":563,"line":752},[561,2637,1389],{"class":578},[561,2639,1543],{"class":893},[561,2641,586],{"class":578},[561,2643,663],{"class":578},[561,2645,579],{"class":578},[561,2647,1543],{"class":582},[561,2649,1500],{"class":578},[561,2651,2653],{"class":563,"line":2652},14,[561,2654,1505],{"class":578},[561,2656,2658],{"class":563,"line":2657},15,[561,2659,1510],{"class":578},[499,2661,2662,2663,2665,2666,2669,2670,2672],{},"The explicit ",[503,2664,1547],{}," conditions matter — the app's boundary-drift check resolves the library's declarations\ntypes-first, so they keep it pointed at the bundled ",[503,2667,2668],{},".d.mts"," even while ",[503,2671,1403],{}," points at source. The\npack restores them automatically.",[499,2674,2675,2676,2678],{},"In dev, Vite loads the linked library from its ",[522,2677,1529],{}," instead of its bundle, so the dev server reflects a\nlibrary edit two ways, automatically:",[2363,2680,2681,2695],{},[2366,2682,2683,2686,2687,2690,2691,2694],{},[522,2684,2685],{},"Behavioral, route, and contract edits hot-reload for free."," A service method body, a controller, a\n",[503,2688,2689],{},"Route"," definition, a contract ",[503,2692,2693],{},"prefix"," — these are runtime values Vite re-evaluates through its own module\ngraph (the library is now source-loaded). Nothing is re-packed.",[2366,2696,2697,2704,2705,2707,2708,2710,2711,2714,2715,2717,2718,2720],{},[522,2698,2699,2700,2703],{},"A change to the library's DI ",[966,2701,2702],{},"surface"," re-emits in-process."," When you change what the library ",[503,2706,797],{},"\nor ",[503,2709,805],{}," — the cross-boundary edges the app's compile reads from the manifest — the dev server runs the\nlibrary's library-mode emit ",[522,2712,2713],{},"in-process"," (no ",[503,2716,530],{},", no child process), writes the fresh\n",[503,2719,516],{}," + generated factory, and recompiles the app against it.",[499,2722,2723,2724,2727,2728,2730,2731,2733],{},"The dev server also ",[522,2725,2726],{},"self-heals the machine-owned artifacts"," before it loads the app: a missing generated\nbarrel is re-emitted in-process, and a deleted ",[503,2729,1065],{}," export-map entry is restored into ",[503,2732,1076],{},"\n(with a logged warning) — for the directly imported libraries and for the workspace libraries they compose,\nso a hand-cleaned tree never 500s on an unresolvable factory import.",[499,2735,2736,2737,2739,2740,2742,2743,2745,2746,2748],{},"Production is unchanged: a ",[503,2738,2354],{}," resolves the library's ",[503,2741,1421],{}," export (its bundled ",[503,2744,1367],{},"), exactly as a\npublished npm package would. The ",[503,2747,1403],{}," condition is a dev-only convenience.",[1246,2750,2751,2752,2755,2756,2759,2760,2763,2764,2766],{"type":1248},"Hot-reload is ",[522,2753,2754],{},"Vite-only"," (the live dev server), and applies only to ",[522,2757,2758],{},"workspace-member"," libraries — a\npublished ",[503,2761,2762],{},"node_modules"," package ships only ",[503,2765,1367],{},", so there is no source to watch.",[784,2768,2770],{"id":2769},"ship-more-than-one-root-module","Ship more than one root module",[499,2772,2773,2774,2777,2778,2780,2781,1698,2783,2785,2786,2788],{},"A package may publish ",[522,2775,2776],{},"more than one root module"," — for example a business module plus a per-dialect\npersistence module. The build emits one ",[503,2779,512],{}," factory per root, and the manifest records each root\nas its own section (the host reads ",[503,2782,797],{},[503,2784,805],{},"\u002Ffactory per imported class, not just the first root).\nNothing extra is required in ",[503,2787,1201],{}," — every module no other module in the package imports becomes a root.",[499,2790,2791,2792,2795,2796,2798,2799,2802,2803,2805],{},"This unlocks the ",[522,2793,2794],{},"dialect-swap"," shape: a context package ships its business module ",[522,2797,2423],{}," a persistence\nmodule per dialect, each exporting the same repository port. The host imports the business module plus the one\ndialect it wants, and ",[522,2800,2801],{},"declares no repository binding"," — the dialect choice ",[966,2804,2453],{}," which persistence module it\nimports.",[551,2807,2809],{"className":553,"code":2808,"filename":1736,"language":556,"meta":557,"style":557},"import { Module } from \"@heximon\u002Fruntime\";\nimport { CatalogModule, SqliteCatalogPersistence } from \"@ticketing\u002Fcatalog\";\n\nexport class AppModule extends Module({\n  \u002F\u002F CatalogModule requires EventRepository; SqliteCatalogPersistence exports it.\n  \u002F\u002F No host binding — the persistence module's export satisfies the business module's require.\n  imports: [CatalogModule, SqliteCatalogPersistence],\n}) {}\n",[503,2810,2811,2831,2858,2862,2878,2883,2888,2904],{"__ignoreMap":557},[561,2812,2813,2815,2817,2819,2821,2823,2825,2827,2829],{"class":563,"line":564},[561,2814,568],{"class":567},[561,2816,597],{"class":578},[561,2818,821],{"class":571},[561,2820,603],{"class":578},[561,2822,606],{"class":567},[561,2824,579],{"class":578},[561,2826,830],{"class":582},[561,2828,586],{"class":578},[561,2830,589],{"class":578},[561,2832,2833,2835,2837,2840,2842,2845,2847,2849,2851,2854,2856],{"class":563,"line":592},[561,2834,568],{"class":567},[561,2836,597],{"class":578},[561,2838,2839],{"class":571}," CatalogModule",[561,2841,916],{"class":578},[561,2843,2844],{"class":571}," SqliteCatalogPersistence",[561,2846,603],{"class":578},[561,2848,606],{"class":567},[561,2850,579],{"class":578},[561,2852,2853],{"class":582},"@ticketing\u002Fcatalog",[561,2855,586],{"class":578},[561,2857,589],{"class":578},[561,2859,2860],{"class":563,"line":618},[561,2861,622],{"emptyLinePlaceholder":621},[561,2863,2864,2866,2868,2870,2872,2874,2876],{"class":563,"line":625},[561,2865,641],{"class":567},[561,2867,890],{"class":889},[561,2869,1817],{"class":893},[561,2871,897],{"class":889},[561,2873,821],{"class":647},[561,2875,650],{"class":571},[561,2877,653],{"class":578},[561,2879,2880],{"class":563,"line":632},[561,2881,2882],{"class":628},"  \u002F\u002F CatalogModule requires EventRepository; SqliteCatalogPersistence exports it.\n",[561,2884,2885],{"class":563,"line":638},[561,2886,2887],{"class":628},"  \u002F\u002F No host binding — the persistence module's export satisfies the business module's require.\n",[561,2889,2890,2892,2894,2897,2899,2902],{"class":563,"line":656},[561,2891,1830],{"class":659},[561,2893,663],{"class":578},[561,2895,2896],{"class":571}," [CatalogModule",[561,2898,916],{"class":578},[561,2900,2901],{"class":571}," SqliteCatalogPersistence]",[561,2903,690],{"class":578},[561,2905,2906,2908,2910],{"class":563,"line":669},[561,2907,755],{"class":578},[561,2909,955],{"class":571},[561,2911,958],{"class":578},[499,2913,2914,2915,2917,2918,2921,2922,2925],{},"When a boundary module's ",[503,2916,797],{}," token has ",[522,2919,2920],{},"no host provider",", the compiler resolves it against the\n",[522,2923,2924],{},"exports of the other boundary modules"," the app imports — the inter-boundary edge.",[499,2927,2928,2929,2932,2933,2936],{},"A host provider for the\nsame token always ",[522,2930,2931],{},"wins"," (the explicit-routing escape hatch from ",[768,2934,1717],{"href":2935},"#consume-the-published-module","\nstill applies); the sibling-export tier is the fallback.",[499,2938,2939,2940,2943],{},"Two imported modules exporting the same token with no\nhost binding is an ",[522,2941,2942],{},"ambiguity error"," — route it with an explicit host binding, or import only one exporter.",[1246,2945,2946,2947,2949],{"type":1248},"A single-root package is unchanged: its manifest keeps one section and the host routes its ",[503,2948,797],{}," exactly\nas before. Multi-root + cross-boundary satisfaction is purely additive — older packages and older consumers\nkeep working.",[784,2951,2953],{"id":2952},"choose-an-emission-shape","Choose an emission shape",[499,2955,2956,2959,2960,2963,2964,2967],{},[503,2957,2958],{},"wiringMode"," controls how the compiler emits the factory. The default builds the package's internal DI graph\ninto one file; lazy mode (",[522,2961,2962],{},"experimental",") emits a thin spine that ",[503,2965,2966],{},"import()","s an internal construction chunk,\nso a heavy package's graph can load on first use.",[499,2969,2970,2971,2973,2974,2977,2978,2981,2982,2985,2986,2989],{},"Set it in ",[503,2972,1100],{}," (or inline on\n",[503,2975,2976],{},"heximonLibrary({ wiringMode: \"lazy\" })","). The value is either the ",[503,2979,2980],{},"\"eager\""," \u002F ",[503,2983,2984],{},"\"lazy\""," string shorthand or the\nstructured object form ",[503,2987,2988],{},"{ mode: \"lazy\" }"," — equivalent today, with the object reserved for future per-build\nknobs.",[1612,2991,2992,3003],{},[1615,2993,2994],{},[1618,2995,2996,3000],{},[1621,2997,2998],{"align":1623},[503,2999,2958],{},[1621,3001,3002],{"align":1623},"Factory output",[1632,3004,3005,3018],{},[1618,3006,3007,3012],{},[1637,3008,3009,3011],{"align":1623},[503,3010,2980],{}," (default)",[1637,3013,3014,3015,3017],{"align":1623},"One byte-identical ",[503,3016,512],{}," factory",[1618,3019,3020,3025],{},[1637,3021,3022,3024],{"align":1623},[503,3023,2984],{}," (experimental)",[1637,3026,3027,3028,3030],{"align":1623},"A thin spine plus an ",[503,3029,2966],{},"-able internal construction chunk (the internal DI graph code-split)",[499,3032,3033,3034,3037,3038,3041],{},"The factory's external contract — ",[503,3035,3036],{},"create\u003CModule>(inputs)"," resolving to ",[503,3039,3040],{},"{ exports, lifecycle, contributions }","\n— is byte-stable across both, so the manifest, peer, and coverage checks are identical either way.",[499,3043,3044,3045,3048,3049,3052,3053,3056,3057,3060,3061,3064,3065,3068,3069,3072],{},"The\n",[503,3046,3047],{},"lifecycle"," handle aggregates the package's internal hooks per phase: ",[503,3050,3051],{},"init()"," (run when the composing app\nloads the boundary), ",[503,3054,3055],{},"bootstrap()"," (present when a provider declares ",[503,3058,3059],{},"onBootstrap"," — the app collects it and\nruns it with its own boot hooks, after every ",[503,3062,3063],{},"onInit","; the manifest's ",[503,3066,3067],{},"hasBootstrap"," flag also makes the app\nload the package at boot so the standing work starts without a request), and ",[503,3070,3071],{},"destroy()"," (run at shutdown).",[499,3074,3075,3076,3078,3079,3082,3083,3085,3086,3088],{},"The barrel\nre-exports only the spine; the build follows the spine's ",[503,3077,2966],{}," like any dynamic import, so whether the\nchunk stays a separate file or is folded back into ",[503,3080,3081],{},"dist\u002Findex.mjs"," is the bundler's usual size-based call. For\nmost packages ",[503,3084,2980],{}," is the right default; reach for ",[503,3087,2984],{}," only when a large internal graph genuinely\nbenefits from deferring construction.",[784,3090,3092],{"id":3091},"see-also","See also",[2363,3094,3095,3101,3107,3113],{},[2366,3096,3097,3100],{},[768,3098,3099],{"href":347},"Hosts overview"," — how Heximon apps reach a host, framework hosts plus library mode at a glance.",[2366,3102,3103,3106],{},[768,3104,3105],{"href":333},"Host an app on Nitro"," — the app-side counterpart: compile and mount a Heximon app inside Nitro for universal deployment.",[2366,3108,3109,3112],{},[768,3110,3111],{"href":476},"Package a feature"," — an end-to-end recipe: structure a feature so its contracts and schemas import from the frontend while controllers and domain stay on the server.",[2366,3114,3115,3123,3124,1698,3126,3128,3129,3131,3132,3134],{},[768,3116,3120],{"href":3117,"rel":3118},"https:\u002F\u002Fgithub.com\u002Fheximon\u002Fheximon\u002Ftree\u002Fmain\u002Fpackages\u002Ftooling\u002Flibrary\u002Ftest\u002Ffixtures\u002Flibrary-module",[3119],"nofollow",[522,3121,3122],{},"Billing module fixture"," — a runnable published-style package: the ",[503,3125,797],{},[503,3127,805],{}," boundary, the barrel, the ",[503,3130,530],{}," config, and the ",[503,3133,1281],{}," setup that keeps DI identity intact.",[3136,3137,3138],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":557,"searchDepth":592,"depth":592,"links":3140},[3141,3142,3143,3144,3145,3146,3152,3153,3154],{"id":786,"depth":592,"text":787},{"id":972,"depth":592,"text":973},{"id":1093,"depth":592,"text":1094},{"id":1270,"depth":592,"text":1271},{"id":1606,"depth":592,"text":1607},{"id":1716,"depth":592,"text":1717,"children":3147},[3148,3149,3150,3151],{"id":2000,"depth":618,"text":2001},{"id":2094,"depth":618,"text":2095},{"id":2378,"depth":618,"text":2379},{"id":2438,"depth":618,"text":2439},{"id":2769,"depth":592,"text":2770},{"id":2952,"depth":592,"text":2953},{"id":3091,"depth":592,"text":3092},"Ship a Heximon module as a precompiled npm package — heximonLibrary(), the typed create\u003CModule> factory, heximon.manifest.json, requires\u002Fexports boundary tokens, and peerDependencies.","md",null,{},{"icon":401},{"title":398,"description":3155},"aLHeVGe8WkeBI1kEFJxOXwrw1A3T49ONVUk0MgWfkp8",[3163,3165],{"title":394,"path":395,"stem":396,"description":3164,"icon":357,"children":-1},"How a Heximon build error reads — the severity header, the area\u002Fslug code, the source codeframe, the help trailer, the dev-server overlay, and the compact CI form.",{"title":403,"path":404,"stem":405,"description":3166,"icon":406,"children":-1},"Compile a Heximon app and serve its generated wiring across bundlers with @heximon\u002Fbuild — the full dev experience on Vite (including WebSocket-in-dev), and Rollup \u002F Rolldown \u002F esbuild \u002F webpack \u002F rspack build tiers that emit a runnable server bundle from one unchanged src\u002F.",1783300761903]