← Public packages
@apphub/doom
Play Freedoom (Chocolate Doom WASM) in-browser as an installable PWA with WebMCP agent tools.
src/open.ts
18 lines · 568 B · TypeScriptimport { packageContext } from 'kody:runtime'
/**
* Return the hosted KODOOM PWA URL for the current package mount.
* Use when an agent or human needs a shareable link to the live game app.
*
* @returns Absolute hosted URL string
*
* @example
* import open from 'kody:@apphub/doom/open'
* const url = await open()
*/
export default async function open(): Promise<string> {
if (!packageContext?.hostedUrl) {
throw new Error('This module must run as a package app or package context.')
}
return String(packageContext.hostedUrl).replace(/\/$/, '') + '/'
}