@deints/ask-sir
v1.0.2
Published
Ask SIR Safety plugin — generative UI con brand SIR Safety System
Readme
@deints/ask-sir
Ask SIR Safety plugin — generative UI con brand SIR Safety System
An Ask generative-UI plugin: a set of
custom components an LLM can compose into a page at runtime. Built on
@websolutespa/ask-plugin and @websolutespa/ask-ui.
Develop
pnpm install
pnpm build # tsdown (ESM + browser bundle) + Tailwind -> dist/styles.css
pnpm types # tsc --noEmitStructure
src/catalog.ts— component schema + descriptions shown to the LLM.src/blocks/*— the custom React components the LLM can render.src/registry.ts— maps catalog names to blocks.src/components/*— chat shell overrides (Renderer binds the registry).src/exports/*— package subpath entrypoints (browser,catalog,registry,client).src/globals.css— Tailwind v4 theme.
Add a component
- Add an entry (and a
*Skeleton) tosrc/catalog.ts. - Create
src/blocks/<name>.tsxtyped withComponentContext<'Name'>. - Register both in
src/registry.ts. - Rebuild and bump the version.
Publish & register
npm publish --access publicThen set the app's pluginPackage to @deints/ask-sir on the platform
(pluginLocal = false for CDN resolution).
Conventions (must hold)
- Package
@deints/ask-sir→ globalaskSir→ tag<ask-sir>. ./catalogmust exportgetSystemPromptandcatalog../browserself-registers the Web Component.- The browser bundle inlines all deps (
deps.alwaysBundle: ['**']). - Use container query variants (
@md:) instead of viewport (md:).
