Canonical proof-of-life for the @aihu/plugin API — exercises macros, middleware, and transforms.
createDemoRoutesfunction createDemoRoutes(_config?: DemoOptions): { readonly demoEndpoint: RouteHandler }Create the demo plugin route handlers.
createDemoRuntimefunction createDemoRuntime(): DemoResourceCreate a reactive demo runtime surface.
demofunction demo(options?: DemoOptions): PluginCreate the `@aihu/plugin-demo` plugin.
DemoOptionsinterface DemoOptions {
/**
* Greeting name used by the $greeting macro lowering declaration.
* Defaults to 'World'.
*/
readonly greetingName?: string
}Options for the demo plugin and its associated factories.
DemoResourceinterface DemoResource {
/** Read the current count. */
readonly count: () => number
/** Increment the count by 1. */
readonly increment: () => void
}Shape returned by `createDemoRuntime()`.