## Summary Extract runtime-neutral provider definitions from `@proj-airi/stage-ui` into a new `@proj-airi/provider-inference` package that runs in both Node.js and browser without Vue/Pinia dependencies. ## What changed - **New package** `packages/provider-inference/` — owns `ProviderDefinition`, `ProviderRegistry`, validators, and all provider modules (cloud + local) - **Provider modules relocated** — ~45 providers moved from `stage-ui/src/libs/providers/providers/` to `provider-inference/src/providers/cloud/` and `provider-inference/src/providers/local/` - **Type decoupling** — `ProviderContext.t` changed from `ComposerTranslation` (Vue) to generic `ProviderTranslator`, removing the Vue dependency from core types - **stage-ui types slimmed** — `types.ts` now re-exports from `provider-inference` and only adds the Vue-specific `ProviderViews` extension - **validators/run.ts** — becomes a pass-through re-export - **Registry** — portable `createProviderRegistry()` with deterministic ordering and duplicate-id detection ## Verification ```bash pnpm -F @proj-airi/provider-inference typecheck pnpm -F @proj-airi/provider-inference test:node pnpm -F @proj-airi/provider-inference test:browser pnpm -F @proj-airi/provider-inference build pnpm -F @proj-airi/stage-ui typecheck pnpm -F @proj-airi/stage-web typecheck pnpm -F @proj-airi/stage-tamagotchi typecheck pnpm lint ``` ## Why Provider definitions were tightly coupled to Vue (`ComposerTranslation`, `Component`), preventing reuse in non-Vue runtimes (Node.js services, tests, future Electron backend). This extraction creates a clean boundary: runtime-neutral definitions live in `provider-inference`, while Vue/Pinia-specific concerns stay in `stage-ui`.
234 lines
8.7 KiB
JSON
234 lines
8.7 KiB
JSON
{
|
|
"name": "@proj-airi/stage-ui",
|
|
"type": "module",
|
|
"version": "0.12.0-beta.5",
|
|
"private": true,
|
|
"description": "Shared core for stage",
|
|
"author": {
|
|
"name": "Moeru AI Project AIRI Team",
|
|
"email": "airi@moeru.ai",
|
|
"url": "https://github.com/moeru-ai"
|
|
},
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/moeru-ai/airi.git",
|
|
"directory": "packages/stage-ui"
|
|
},
|
|
"exports": {
|
|
".": "./src/components/index.ts",
|
|
"./components/scenarios/chat": "./src/components/scenarios/chat/index.ts",
|
|
"./components/scenarios/settings/model-settings": "./src/components/scenarios/settings/model-settings/index.ts",
|
|
"./components/scenes": "./src/components/scenes/index.ts",
|
|
"./components/*": "./src/components/*.ts",
|
|
"./components": "./src/components/index.ts",
|
|
"./composables/*": "./src/composables/*.ts",
|
|
"./composables": "./src/composables/index.ts",
|
|
"./constants/*": "./src/constants/*.ts",
|
|
"./constants": "./src/constants/index.ts",
|
|
"./directives/*": "./src/directives/*.ts",
|
|
"./features/devtools/motion/live2d": "./src/features/devtools/motion/live2d/index.ts",
|
|
"./features/motions/live2d": "./src/features/motions/live2d/index.ts",
|
|
"./libs/inference/adapters/*": "./src/libs/inference/adapters/*.ts",
|
|
"./libs/inference": "./src/libs/inference/index.ts",
|
|
"./libs/analytics": "./src/libs/analytics/index.ts",
|
|
"./libs/analytics/*": "./src/libs/analytics/*.ts",
|
|
"./libs/pinia": "./src/libs/pinia/index.ts",
|
|
"./libs/providers/stream-transcription": "./src/libs/providers/stream-transcription/index.ts",
|
|
"./libs/providers/providers/aliyun-nls": "./src/libs/providers/providers/aliyun-nls/index.ts",
|
|
"./libs/*": "./src/libs/*.ts",
|
|
"./libs": "./src/libs/index.ts",
|
|
"./models/*": "./src/models/*.ts",
|
|
"./services/*": "./src/services/*.ts",
|
|
"./tools/mcp": "./src/tools/mcp.ts",
|
|
"./stores/character": "./src/stores/character/index.ts",
|
|
"./stores/settings/analytics": "./src/stores/settings/analytics.ts",
|
|
"./stores/settings/stage-model": "./src/stores/settings/stage-model.ts",
|
|
"./stores/settings": "./src/stores/settings/index.ts",
|
|
"./stores/modules/vision": "./src/stores/modules/vision/index.ts",
|
|
"./stores/mcp-tool-bridge": "./src/stores/mcp-tool-bridge.ts",
|
|
"./stores/ai/chat-llm/*": "./src/stores/ai/chat-llm/*.ts",
|
|
"./stores/*": "./src/stores/*.ts",
|
|
"./stores": "./src/stores/index.ts",
|
|
"./workers/vad": "./src/workers/vad/index.ts",
|
|
"./workers/*": "./src/workers/*.ts",
|
|
"./workers": "./src/workers/index.ts",
|
|
"./utils": "./src/utils/index.ts",
|
|
"./utils/tts": "./src/utils/tts.ts",
|
|
"./types/*": "./src/types/*.ts",
|
|
"./types": "./src/types/index.ts"
|
|
},
|
|
"scripts": {
|
|
"typecheck": "vue-tsc --noEmit",
|
|
"story:dev": "histoire dev",
|
|
"story:build": "histoire build",
|
|
"story:build-base": "histoire build --base /ui",
|
|
"story:preview": "histoire preview",
|
|
"build": "echo \"No build step required\"",
|
|
"test": "vitest",
|
|
"test:run": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@better-fetch/fetch": "catalog:",
|
|
"@date-fns/utc": "catalog:",
|
|
"@formkit/auto-animate": "catalog:",
|
|
"@huggingface/transformers": "catalog:",
|
|
"@moeru/eventa": "catalog:",
|
|
"@moeru/std": "catalog:",
|
|
"@opentelemetry/api": "catalog:",
|
|
"@opentelemetry/core": "catalog:",
|
|
"@opentelemetry/sdk-trace-base": "catalog:",
|
|
"@pinia/colada": "catalog:",
|
|
"@proj-airi/audio": "workspace:^",
|
|
"@proj-airi/ccc": "workspace:^",
|
|
"@proj-airi/chromatic": "catalog:",
|
|
"@proj-airi/core-agent": "workspace:^",
|
|
"@proj-airi/core-character": "workspace:^",
|
|
"@proj-airi/drizzle-duckdb-wasm": "catalog:",
|
|
"@proj-airi/font-chillroundm": "workspace:^",
|
|
"@proj-airi/font-cjkfonts-allseto": "workspace:^",
|
|
"@proj-airi/font-xiaolai": "workspace:^",
|
|
"@proj-airi/i18n": "workspace:^",
|
|
"@proj-airi/input-gamepad": "workspace:^",
|
|
"@proj-airi/model-driver-lipsync": "workspace:^",
|
|
"@proj-airi/model-driver-magic-live2d": "workspace:^",
|
|
"@proj-airi/motion-driver-magic": "workspace:^",
|
|
"@proj-airi/pipelines-audio": "workspace:^",
|
|
"@proj-airi/provider-inference": "workspace:^",
|
|
"@proj-airi/server-sdk": "workspace:^",
|
|
"@proj-airi/server-sdk-shared": "workspace:^",
|
|
"@proj-airi/stage-shared": "workspace:^",
|
|
"@proj-airi/stage-ui-live2d": "workspace:^",
|
|
"@proj-airi/stage-ui-mmd": "workspace:^",
|
|
"@proj-airi/stage-ui-spine": "workspace:^",
|
|
"@proj-airi/stage-ui-tachie": "workspace:^",
|
|
"@proj-airi/stage-ui-three": "workspace:^",
|
|
"@proj-airi/ui": "workspace:^",
|
|
"@ricky0123/vad-web": "catalog:",
|
|
"@shikijs/rehype": "catalog:",
|
|
"@shopify/draggable": "catalog:",
|
|
"@vueuse/core": "catalog:",
|
|
"@vueuse/motion": "catalog:",
|
|
"@vueuse/shared": "catalog:",
|
|
"@xsai-apple-speech/transcription": "catalog:",
|
|
"@xsai-apple-speech/transcription-electron-plugin": "catalog:",
|
|
"@xsai-ext/providers": "catalog:",
|
|
"@xsai-transformers/embed": "catalog:",
|
|
"@xsai-transformers/shared": "catalog:",
|
|
"@xsai/embed": "catalog:",
|
|
"@xsai/generate-speech": "catalog:",
|
|
"@xsai/generate-text": "catalog:",
|
|
"@xsai/generate-transcription": "catalog:",
|
|
"@xsai/model": "catalog:",
|
|
"@xsai/shared": "catalog:",
|
|
"@xsai/shared-chat": "catalog:",
|
|
"@xsai/stream-text": "catalog:",
|
|
"@xsai/stream-transcription": "catalog:",
|
|
"@xsai/tool": "catalog:",
|
|
"@xsai/utils-chat": "catalog:",
|
|
"animejs": "catalog:",
|
|
"async-mutex": "catalog:",
|
|
"better-auth": "catalog:",
|
|
"culori": "catalog:",
|
|
"d3": "catalog:",
|
|
"date-fns": "catalog:",
|
|
"dockview-vue": "catalog:",
|
|
"dompurify": "catalog:",
|
|
"embla-carousel-autoplay": "catalog:",
|
|
"embla-carousel-vue": "catalog:",
|
|
"es-toolkit": "catalog:",
|
|
"gpuu": "catalog:",
|
|
"hono": "catalog:",
|
|
"html2canvas": "catalog:",
|
|
"idb-keyval": "catalog:",
|
|
"jszip": "catalog:",
|
|
"kokoro-js": "catalog:",
|
|
"localforage": "catalog:",
|
|
"mediabunny": "catalog:",
|
|
"nanoid": "catalog:",
|
|
"node-vibrant": "catalog:",
|
|
"ofetch": "catalog:",
|
|
"pinia": "catalog:",
|
|
"pinia-plugin-synced": "catalog:",
|
|
"posthog-js": "catalog:",
|
|
"rehype-katex": "catalog:",
|
|
"rehype-parse": "catalog:",
|
|
"rehype-stringify": "catalog:",
|
|
"reka-ui": "catalog:",
|
|
"remark-math": "catalog:",
|
|
"remark-parse": "catalog:",
|
|
"remark-rehype": "catalog:",
|
|
"shiki": "catalog:",
|
|
"splitpanes": "catalog:",
|
|
"unified": "catalog:",
|
|
"unist-builder": "catalog:",
|
|
"unist-util-visit": "catalog:",
|
|
"unspeech": "catalog:xsai",
|
|
"unstorage": "catalog:",
|
|
"uuid": "catalog:",
|
|
"valibot": "catalog:",
|
|
"vaul-vue": "catalog:",
|
|
"virtua": "catalog:",
|
|
"vue-i18n": "catalog:",
|
|
"vue-router": "catalog:",
|
|
"vue-sonner": "catalog:",
|
|
"web-haptics": "catalog:",
|
|
"xast-util-to-xml": "catalog:",
|
|
"xastscript": "catalog:",
|
|
"xsschema": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@fontsource-variable/comfortaa": "catalog:",
|
|
"@fontsource-variable/dm-sans": "catalog:",
|
|
"@fontsource-variable/jura": "catalog:",
|
|
"@fontsource-variable/nunito": "catalog:",
|
|
"@fontsource-variable/quicksand": "catalog:",
|
|
"@fontsource-variable/urbanist": "catalog:",
|
|
"@fontsource/dm-mono": "catalog:",
|
|
"@fontsource/dm-serif-display": "catalog:",
|
|
"@fontsource/gugi": "catalog:",
|
|
"@fontsource/kiwi-maru": "catalog:",
|
|
"@fontsource/m-plus-rounded-1c": "catalog:",
|
|
"@histoire/plugin-vue": "catalog:",
|
|
"@iconify-json/carbon": "catalog:",
|
|
"@iconify-json/eos-icons": "catalog:",
|
|
"@iconify-json/lucide": "catalog:",
|
|
"@iconify-json/mingcute": "catalog:",
|
|
"@iconify-json/ph": "catalog:",
|
|
"@iconify-json/simple-icons": "catalog:",
|
|
"@iconify-json/solar": "catalog:",
|
|
"@iconify-json/svg-spinners": "catalog:",
|
|
"@iconify-json/vscode-icons": "catalog:",
|
|
"@moeru/std": "catalog:",
|
|
"@pinia/testing": "catalog:",
|
|
"@proj-airi/api-server": "workspace:*",
|
|
"@proj-airi/lobe-icons": "catalog:",
|
|
"@proj-airi/stream-kit": "workspace:*",
|
|
"@types/audioworklet": "catalog:",
|
|
"@types/culori": "catalog:",
|
|
"@types/d3": "catalog:",
|
|
"@types/hast": "catalog:",
|
|
"@types/mdast": "catalog:",
|
|
"@types/splitpanes": "catalog:",
|
|
"@types/unist": "catalog:",
|
|
"@types/ws": "catalog:",
|
|
"@unocss/reset": "catalog:",
|
|
"@vitejs/plugin-vue": "catalog:",
|
|
"@webgpu/types": "catalog:",
|
|
"clustr": "catalog:",
|
|
"csstype": "catalog:",
|
|
"histoire": "catalog:",
|
|
"is-network-error": "catalog:",
|
|
"unocss": "catalog:",
|
|
"unplugin-basemove": "catalog:",
|
|
"unplugin-info": "catalog:",
|
|
"unplugin-yaml": "catalog:",
|
|
"vite": "catalog:",
|
|
"vitest-browser-vue": "catalog:",
|
|
"vue": "catalog:",
|
|
"vue-tsc": "catalog:",
|
|
"ws": "catalog:"
|
|
}
|
|
}
|