## 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`.
65 lines
1.7 KiB
JSON
65 lines
1.7 KiB
JSON
{
|
|
"name": "@proj-airi/provider-inference",
|
|
"type": "module",
|
|
"version": "0.12.0-beta.5",
|
|
"private": true,
|
|
"description": "Runtime-neutral provider definitions for AIRI inference",
|
|
"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/provider-inference"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.mts",
|
|
"default": "./dist/index.mjs"
|
|
}
|
|
},
|
|
"main": "./dist/index.mjs",
|
|
"types": "./dist/index.d.mts",
|
|
"files": [
|
|
"README.md",
|
|
"dist",
|
|
"package.json"
|
|
],
|
|
"scripts": {
|
|
"dev": "pnpm run build",
|
|
"build": "tsdown",
|
|
"typecheck": "tsc --noEmit",
|
|
"test:run": "vitest run",
|
|
"test:node": "vitest run --project node",
|
|
"test:browser": "vitest run --project browser"
|
|
},
|
|
"dependencies": {
|
|
"@moeru/std": "catalog:",
|
|
"@proj-airi/audio": "workspace:^",
|
|
"@xsai-ext/providers": "catalog:",
|
|
"@xsai-transformers/shared": "catalog:",
|
|
"@xsai/generate-text": "catalog:",
|
|
"@xsai/model": "catalog:",
|
|
"@xsai/stream-transcription": "catalog:",
|
|
"@xsai/utils-chat": "catalog:",
|
|
"clustr": "catalog:",
|
|
"es-toolkit": "catalog:",
|
|
"is-network-error": "catalog:",
|
|
"unspeech": "catalog:xsai",
|
|
"xsschema": "catalog:",
|
|
"zod": "catalog:"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "catalog:",
|
|
"@vitest/browser-playwright": "catalog:vitest",
|
|
"@xsai/generate-speech": "catalog:",
|
|
"playwright": "catalog:",
|
|
"tsdown": "catalog:",
|
|
"typescript": "catalog:",
|
|
"vitest": "catalog:vitest"
|
|
}
|
|
}
|