refactor(server): revert a8f445a17985a90d7eb5d981b4231114c3066e94
This commit is contained in:
@@ -7,16 +7,14 @@ RUN corepack enable
|
||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json tsconfig.json ./
|
||||
COPY patches/ ./patches/
|
||||
COPY apps/server apps/server
|
||||
COPY packages/server-protocol packages/server-protocol
|
||||
COPY packages/server-schema packages/server-schema
|
||||
COPY packages/plugin-protocol packages/plugin-protocol
|
||||
COPY packages/server-sdk-shared packages/server-sdk-shared
|
||||
|
||||
RUN --mount=type=cache,id=pnpm-store,target=/root/.pnpm-store \
|
||||
pnpm install --frozen-lockfile --ignore-scripts
|
||||
|
||||
RUN pnpm -F @proj-airi/server-schema run build
|
||||
RUN pnpm -F @proj-airi/server-protocol run build
|
||||
RUN pnpm -F @proj-airi/plugin-protocol run build
|
||||
RUN pnpm -F @proj-airi/server-sdk-shared run build
|
||||
RUN pnpm -F @proj-airi/server run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
+2
-3
@@ -32,6 +32,7 @@ CREATE TABLE "outbox_events" (
|
||||
ALTER TABLE "llm_request_log" DROP CONSTRAINT "llm_request_log_user_id_user_id_fk";
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "messages" ALTER COLUMN "sender_id" DROP NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "stripe_subscription" ALTER COLUMN "cancel_at_period_end" SET DATA TYPE boolean;--> statement-breakpoint
|
||||
ALTER TABLE "messages" ADD COLUMN "seq" integer;--> statement-breakpoint
|
||||
ALTER TABLE "stripe_checkout_session" ADD COLUMN "flux_credited" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "stripe_invoice" ADD COLUMN "flux_credited" boolean DEFAULT false NOT NULL;--> statement-breakpoint
|
||||
@@ -42,6 +43,4 @@ CREATE UNIQUE INDEX "flux_ledger_user_request_uniq" ON "flux_ledger" USING btree
|
||||
CREATE UNIQUE INDEX "outbox_events_event_id_idx" ON "outbox_events" USING btree ("event_id");--> statement-breakpoint
|
||||
CREATE INDEX "outbox_events_publish_scan_idx" ON "outbox_events" USING btree ("published_at","available_at","claim_expires_at","created_at");--> statement-breakpoint
|
||||
CREATE INDEX "outbox_events_claimed_by_idx" ON "outbox_events" USING btree ("claimed_by");--> statement-breakpoint
|
||||
ALTER TABLE "llm_request_log" DROP COLUMN "settled";
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "stripe_subscription" ALTER COLUMN "cancel_at_period_end" SET DATA TYPE boolean;
|
||||
ALTER TABLE "llm_request_log" DROP COLUMN "settled";
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"id": "a5a18f1d-badd-401b-8f55-a4745aade80c",
|
||||
"id": "22b43247-dc0b-4bde-8869-955460dbd3e2",
|
||||
"prevId": "45bc0dad-65f5-4695-9115-3d7d376b6440",
|
||||
"version": "7",
|
||||
"dialect": "postgresql",
|
||||
@@ -2294,7 +2294,7 @@
|
||||
},
|
||||
"cancel_at_period_end": {
|
||||
"name": "cancel_at_period_end",
|
||||
"type": "text",
|
||||
"type": "boolean",
|
||||
"primaryKey": false,
|
||||
"notNull": false
|
||||
},
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
{
|
||||
"idx": 5,
|
||||
"version": "7",
|
||||
"when": 1774527361016,
|
||||
"tag": "0005_skinny_leech",
|
||||
"when": 1774552566896,
|
||||
"tag": "0005_tearful_kronos",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -38,8 +38,8 @@
|
||||
"@opentelemetry/sdk-trace-node": "^2.6.1",
|
||||
"@opentelemetry/semantic-conventions": "^1.40.0",
|
||||
"@proj-airi/drizzle-orm-browser-migrator": "^0.1.6",
|
||||
"@proj-airi/server-protocol": "workspace:*",
|
||||
"@proj-airi/server-schema": "workspace:*",
|
||||
"@proj-airi/server-sdk-shared": "workspace:*",
|
||||
"better-auth": "^1.5.6",
|
||||
"cac": "catalog:",
|
||||
"drizzle-orm": "^0.45.1",
|
||||
|
||||
@@ -7,15 +7,13 @@ RUN corepack enable
|
||||
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json tsconfig.json ./
|
||||
COPY patches/ ./patches/
|
||||
COPY apps/server apps/server
|
||||
COPY packages/server-protocol packages/server-protocol
|
||||
COPY packages/server-schema packages/server-schema
|
||||
COPY packages/plugin-protocol packages/plugin-protocol
|
||||
COPY packages/server-sdk-shared packages/server-sdk-shared
|
||||
|
||||
RUN pnpm install --frozen-lockfile --ignore-scripts
|
||||
|
||||
RUN pnpm -F @proj-airi/server-schema run build
|
||||
RUN pnpm -F @proj-airi/server-protocol run build
|
||||
RUN pnpm -F @proj-airi/plugin-protocol run build
|
||||
RUN pnpm -F @proj-airi/server-sdk-shared run build
|
||||
RUN pnpm -F @proj-airi/server run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -6,7 +6,7 @@ import type { ChatService } from '../services/chats'
|
||||
|
||||
import { useLogger } from '@guiiai/logg'
|
||||
import { defineInvokeHandler } from '@moeru/eventa'
|
||||
import { newMessages, pullMessages, sendMessages } from '@proj-airi/server-protocol'
|
||||
import { newMessages, pullMessages, sendMessages } from '@proj-airi/server-sdk-shared'
|
||||
|
||||
import { createPeerHooks, wsDisconnectedEvent } from '../libs/eventa-hono-adapter'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { MessageRole, WireMessage } from '@proj-airi/server-protocol'
|
||||
import type { MessageRole, WireMessage } from '@proj-airi/server-sdk-shared'
|
||||
|
||||
import type { Database } from '../libs/db'
|
||||
import type { EngagementMetrics } from '../libs/otel'
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"paths": {
|
||||
"@proj-airi/server-protocol": [
|
||||
"../../packages/server-protocol/src/index.ts"
|
||||
"@proj-airi/server-sdk-shared": [
|
||||
"../../packages/server-sdk-shared/src/index.ts"
|
||||
],
|
||||
"@proj-airi/server-protocol/*": [
|
||||
"../../packages/server-protocol/src/*"
|
||||
"@proj-airi/server-sdk-shared/*": [
|
||||
"../../packages/server-sdk-shared/src/*"
|
||||
]
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
@@ -29,7 +29,7 @@
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": [
|
||||
"../../packages/server-protocol/src/**/*.ts",
|
||||
"../../packages/server-sdk-shared/src/**/*.ts",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
import { resolve } from 'node:path'
|
||||
|
||||
import { defineConfig } from 'vitest/config'
|
||||
|
||||
export default defineConfig({
|
||||
resolve: {
|
||||
alias: {
|
||||
'@proj-airi/server-sdk-shared': resolve(import.meta.dirname, '..', '..', 'packages', 'server-sdk-shared', 'src', 'index.ts'),
|
||||
},
|
||||
},
|
||||
test: {
|
||||
environment: 'node',
|
||||
globals: true,
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
# @proj-airi/server-protocol
|
||||
|
||||
Shared protocol types for AIRI server runtimes, SDKs, and frontend consumers.
|
||||
|
||||
## Usage
|
||||
|
||||
```shell
|
||||
ni @proj-airi/server-protocol -D # from @antfu/ni, can be installed via `npm i -g @antfu/ni`
|
||||
pnpm i @proj-airi/server-protocol -D
|
||||
yarn i @proj-airi/server-protocol -D
|
||||
npm i @proj-airi/server-protocol -D
|
||||
```
|
||||
|
||||
```typescript
|
||||
import type { WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](../../LICENSE)
|
||||
@@ -1,2 +0,0 @@
|
||||
export * from './events/chat'
|
||||
export * from './types'
|
||||
@@ -41,7 +41,6 @@
|
||||
"dependencies": {
|
||||
"@guiiai/logg": "catalog:",
|
||||
"@moeru/std": "catalog:",
|
||||
"@proj-airi/server-protocol": "workspace:^",
|
||||
"@proj-airi/server-shared": "workspace:^",
|
||||
"crossws": "^0.4.4",
|
||||
"h3": "^2.0.1-rc.19",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { MetadataEventSource, WebSocketEvent } from '@proj-airi/server-protocol'
|
||||
import type { MetadataEventSource, WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
|
||||
import type {
|
||||
RouteContext,
|
||||
@@ -11,11 +11,11 @@ import type { AuthenticatedPeer, Peer } from './types'
|
||||
import { timingSafeEqual } from 'node:crypto'
|
||||
|
||||
import { availableLogLevelStrings, Format, LogLevelString, logLevelStringToLogLevelMap, useLogg } from '@guiiai/logg'
|
||||
import { MessageHeartbeat, MessageHeartbeatKind, WebSocketEventSource } from '@proj-airi/server-protocol'
|
||||
import {
|
||||
createInvalidJsonServerErrorMessage,
|
||||
ServerErrorMessages,
|
||||
} from '@proj-airi/server-shared'
|
||||
import { MessageHeartbeat, MessageHeartbeatKind, WebSocketEventSource } from '@proj-airi/server-shared/types'
|
||||
import { defineWebSocketHandler, H3 } from 'h3'
|
||||
import { nanoid } from 'nanoid'
|
||||
import { parse, stringify } from 'superjson'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RouteTargetExpression, WebSocketBaseEvent, WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { RouteTargetExpression, WebSocketBaseEvent, WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
|
||||
import type { AuthenticatedPeer } from '../types'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RouteTargetExpression, WebSocketEvent } from '@proj-airi/server-protocol'
|
||||
import type { RouteTargetExpression, WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
|
||||
import type { AuthenticatedPeer } from '../types'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { RouteTargetExpression } from '@proj-airi/server-protocol'
|
||||
import type { RouteTargetExpression } from '@proj-airi/server-shared/types'
|
||||
|
||||
import type { AuthenticatedPeer } from '../../types'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { MetadataEventSource } from '@proj-airi/server-protocol'
|
||||
import type { MetadataEventSource } from '@proj-airi/server-shared/types'
|
||||
|
||||
export interface Peer {
|
||||
/**
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"paths": {
|
||||
"@proj-airi/server-protocol": [
|
||||
"../server-protocol/src/index.ts"
|
||||
"@proj-airi/server-shared": [
|
||||
"../server-shared/src/index.ts"
|
||||
],
|
||||
"@proj-airi/server-protocol/*": [
|
||||
"../server-protocol/src/*"
|
||||
"@proj-airi/server-shared/*": [
|
||||
"../server-shared/src/*"
|
||||
]
|
||||
},
|
||||
"esModuleInterop": true,
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
# @proj-airi/server-sdk-shared
|
||||
|
||||
Shared event contracts and types for AIRI server SDK consumers and server-side handlers.
|
||||
|
||||
## Usage
|
||||
|
||||
```shell
|
||||
ni @proj-airi/server-sdk-shared -D
|
||||
pnpm i @proj-airi/server-sdk-shared -D
|
||||
```
|
||||
|
||||
```typescript
|
||||
import type { WireMessage } from '@proj-airi/server-sdk-shared'
|
||||
|
||||
import { newMessages, pullMessages, sendMessages } from '@proj-airi/server-sdk-shared'
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](../../LICENSE)
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "@proj-airi/server-protocol",
|
||||
"name": "@proj-airi/server-sdk-shared",
|
||||
"type": "module",
|
||||
"version": "0.9.0-alpha.22",
|
||||
"description": "Shared protocol types for AIRI server clients, frontends, and runtimes",
|
||||
"description": "Shared event contracts and types consumed by AIRI server-sdk clients and server-side handlers",
|
||||
"author": {
|
||||
"name": "Moeru AI Project AIRI Team",
|
||||
"email": "airi@moeru.ai",
|
||||
@@ -12,16 +12,12 @@
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/moeru-ai/airi.git",
|
||||
"directory": "packages/server-protocol"
|
||||
"directory": "packages/server-sdk-shared"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"./types": {
|
||||
"types": "./dist/types/index.d.mts",
|
||||
"default": "./dist/types/index.mjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
@@ -37,7 +33,6 @@
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@moeru/eventa": "catalog:",
|
||||
"@proj-airi/plugin-protocol": "workspace:*"
|
||||
"@moeru/eventa": "catalog:"
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -2,8 +2,7 @@ import { defineConfig } from 'tsdown'
|
||||
|
||||
export default defineConfig({
|
||||
entry: {
|
||||
'index': 'src/index.ts',
|
||||
'types/index': 'src/types/index.ts',
|
||||
index: 'src/index.ts',
|
||||
},
|
||||
sourcemap: true,
|
||||
unused: true,
|
||||
@@ -39,7 +39,7 @@
|
||||
"dependencies": {
|
||||
"@moeru/eventa": "catalog:",
|
||||
"@moeru/std": "catalog:",
|
||||
"@proj-airi/server-protocol": "workspace:^",
|
||||
"@proj-airi/server-sdk-shared": "workspace:^",
|
||||
"@proj-airi/server-shared": "workspace:^",
|
||||
"crossws": "^0.4.4",
|
||||
"superjson": "catalog:"
|
||||
|
||||
@@ -6,14 +6,14 @@ import type {
|
||||
WebSocketEvent,
|
||||
WebSocketEventOptionalSource,
|
||||
WebSocketEvents,
|
||||
} from '@proj-airi/server-protocol'
|
||||
} from '@proj-airi/server-shared/types'
|
||||
|
||||
import WebSocket from 'crossws/websocket'
|
||||
import superjson from 'superjson'
|
||||
|
||||
import { errorMessageFrom, sleep } from '@moeru/std'
|
||||
import { MessageHeartbeat, MessageHeartbeatKind } from '@proj-airi/server-protocol'
|
||||
import { isTerminalAuthenticationServerErrorMessage, parseServerErrorMessage } from '@proj-airi/server-shared'
|
||||
import { MessageHeartbeat, MessageHeartbeatKind } from '@proj-airi/server-shared/types'
|
||||
|
||||
export type ClientStatus
|
||||
= | 'idle'
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from '@proj-airi/server-protocol'
|
||||
export * from '@proj-airi/server-sdk-shared'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export * from './client'
|
||||
export * from './events/chat'
|
||||
export type * from '@proj-airi/server-protocol'
|
||||
export { ContextUpdateStrategy, WebSocketEventSource } from '@proj-airi/server-protocol'
|
||||
export type * from '@proj-airi/server-shared/types'
|
||||
export { ContextUpdateStrategy, WebSocketEventSource } from '@proj-airi/server-shared/types'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketEvent } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
|
||||
import superjson from 'superjson'
|
||||
|
||||
|
||||
@@ -4,8 +4,20 @@
|
||||
"lib": [
|
||||
"ESNext"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"paths": {
|
||||
"@proj-airi/server-shared": [
|
||||
"../server-shared/src/index.ts"
|
||||
],
|
||||
"@proj-airi/server-shared/*": [
|
||||
"../server-shared/src/*"
|
||||
],
|
||||
"@proj-airi/server-sdk-shared": [
|
||||
"../server-sdk-shared/src/index.ts"
|
||||
]
|
||||
},
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true,
|
||||
@@ -13,6 +25,8 @@
|
||||
"skipLibCheck": true
|
||||
},
|
||||
"include": [
|
||||
"../server-shared/src/**/*.ts",
|
||||
"../server-sdk-shared/src/**/*.ts",
|
||||
"src/**/*.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -18,6 +18,10 @@
|
||||
".": {
|
||||
"types": "./dist/index.d.mts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"./types": {
|
||||
"types": "./dist/types/index.d.mts",
|
||||
"default": "./dist/types/index.mjs"
|
||||
}
|
||||
},
|
||||
"main": "./dist/index.mjs",
|
||||
@@ -32,5 +36,7 @@
|
||||
"build": "tsdown",
|
||||
"typecheck": "tsc --noEmit"
|
||||
},
|
||||
"dependencies": {}
|
||||
"dependencies": {
|
||||
"@proj-airi/plugin-protocol": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
export * from './errors'
|
||||
export * from './types'
|
||||
|
||||
@@ -2,7 +2,8 @@ import { defineConfig } from 'tsdown'
|
||||
|
||||
export default defineConfig({
|
||||
entry: {
|
||||
index: 'src/index.ts',
|
||||
'index': 'src/index.ts',
|
||||
'types/index': 'src/types/index.ts',
|
||||
},
|
||||
sourcemap: true,
|
||||
unused: true,
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
"@moeru/std": "catalog:",
|
||||
"@proj-airi/ccc": "workspace:*",
|
||||
"@proj-airi/i18n": "workspace:*",
|
||||
"@proj-airi/server-protocol": "workspace:*",
|
||||
"@proj-airi/server-sdk": "workspace:*",
|
||||
"@proj-airi/server-shared": "workspace:*",
|
||||
"@proj-airi/stage-ui": "workspace:*",
|
||||
"@proj-airi/stage-ui-live2d": "workspace:*",
|
||||
"@proj-airi/stage-ui-three": "workspace:*",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-protocol'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-shared/types'
|
||||
import { Section } from '@proj-airi/stage-ui/components'
|
||||
import { Button, FieldInput, FieldTextArea, SelectTab } from '@proj-airi/ui'
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
|
||||
import type { FlowEntry, PreviewItem } from '../context-flow-types'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
|
||||
type Optional<T> = T | undefined
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { WebSocketBaseEvent, WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketBaseEvent, WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
import type { ChatStreamEvent, ContextMessage } from '@proj-airi/stage-ui/types/chat'
|
||||
|
||||
import type { FlowDirection, FlowEntry, SparkNotifyEntryState } from './context-flow-types'
|
||||
|
||||
import { errorMessageFrom } from '@moeru/std'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-protocol'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-shared/types'
|
||||
import { useCharacterOrchestratorStore, useCharacterStore } from '@proj-airi/stage-ui/stores/character'
|
||||
import { useChatOrchestratorStore } from '@proj-airi/stage-ui/stores/chat'
|
||||
import { CHAT_STREAM_CHANNEL_NAME, CONTEXT_CHANNEL_NAME } from '@proj-airi/stage-ui/stores/chat/constants'
|
||||
|
||||
@@ -69,8 +69,8 @@
|
||||
"@proj-airi/i18n": "workspace:^",
|
||||
"@proj-airi/model-driver-lipsync": "workspace:^",
|
||||
"@proj-airi/pipelines-audio": "workspace:^",
|
||||
"@proj-airi/server-protocol": "workspace:^",
|
||||
"@proj-airi/server-sdk": "workspace:^",
|
||||
"@proj-airi/server-shared": "workspace:^",
|
||||
"@proj-airi/stage-shared": "workspace:^",
|
||||
"@proj-airi/stage-ui-live2d": "workspace:^",
|
||||
"@proj-airi/stage-ui-three": "workspace:^",
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
import type { ChatProvider, ChatProviderWithExtraOptions, EmbedProvider, EmbedProviderWithExtraOptions, SpeechProvider, SpeechProviderWithExtraOptions, TranscriptionProvider, TranscriptionProviderWithExtraOptions } from '@xsai-ext/providers/utils'
|
||||
import type { Message } from '@xsai/shared-chat'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable style/indent-binary-ops */
|
||||
/* eslint-disable style/operator-linebreak */
|
||||
|
||||
import type { WebSocketEventOf } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEventOf } from '@proj-airi/server-shared/types'
|
||||
import type { Store, StoreDefinition } from 'pinia'
|
||||
import type { Mock } from 'vitest'
|
||||
import type { UnwrapRef } from 'vue'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketBaseEvent, WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketBaseEvent, WebSocketEventOf, WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
|
||||
import { defineStore, storeToRefs } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketEventInputs } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEventInputs } from '@proj-airi/server-shared/types'
|
||||
import type { ChatProvider } from '@xsai-ext/providers/utils'
|
||||
import type { CommonContentPart, Message, ToolMessage } from '@xsai/shared-chat'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ContextMessage } from '../../../types/chat'
|
||||
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-protocol'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-shared/types'
|
||||
import { nanoid } from 'nanoid'
|
||||
|
||||
const DATETIME_CONTEXT_ID = 'system:datetime'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ContextMessage } from '../../types/chat'
|
||||
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-protocol'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-shared/types'
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref, toRaw } from 'vue'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { WebSocketEvent } from '@proj-airi/server-protocol'
|
||||
import type { WebSocketEvent } from '@proj-airi/server-shared/types'
|
||||
|
||||
import { nanoid } from 'nanoid'
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { ContextUpdate, InputContextUpdate, WebSocketBaseEvent, WebSocketEvent, WebSocketEventOptionalSource, WebSocketEvents } from '@proj-airi/server-protocol'
|
||||
import type { ContextUpdate, InputContextUpdate, WebSocketBaseEvent, WebSocketEvent, WebSocketEventOptionalSource, WebSocketEvents } from '@proj-airi/server-shared/types'
|
||||
import type { CommonContentPart } from '@xsai/shared-chat'
|
||||
|
||||
import { WebSocketEventSource } from '@proj-airi/server-protocol'
|
||||
import { Client } from '@proj-airi/server-sdk'
|
||||
import { WebSocketEventSource } from '@proj-airi/server-shared/types'
|
||||
import { isStageTamagotchi, isStageWeb } from '@proj-airi/stage-shared'
|
||||
import { useLocalStorage } from '@vueuse/core'
|
||||
import { nanoid } from 'nanoid'
|
||||
|
||||
@@ -2,7 +2,7 @@ import type { CommonContentPart } from '@xsai/shared-chat'
|
||||
|
||||
import type { VisionWorkloadId } from '../../../composables/vision/use-vision-workloads'
|
||||
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-protocol'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-shared/types'
|
||||
import { defineStore, storeToRefs } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { ContextUpdate, MetadataEventSource, WebSocketEventInputs } from '@proj-airi/server-protocol'
|
||||
import type { ContextUpdate, MetadataEventSource, WebSocketEventInputs } from '@proj-airi/server-shared/types'
|
||||
import type { AssistantMessage, CommonContentPart, CompletionToolCall, Message, SystemMessage, ToolMessage, UserMessage } from '@xsai/shared-chat'
|
||||
|
||||
export interface ChatSlicesText {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { MetadataEventSource } from '@proj-airi/server-protocol'
|
||||
import type { MetadataEventSource } from '@proj-airi/server-shared/types'
|
||||
|
||||
interface EventSourcePayload {
|
||||
source?: string
|
||||
|
||||
Generated
+25
-27
@@ -572,12 +572,12 @@ importers:
|
||||
'@proj-airi/drizzle-orm-browser-migrator':
|
||||
specifier: ^0.1.6
|
||||
version: 0.1.6(drizzle-orm@0.45.1(@electric-sql/pglite@0.4.1)(@opentelemetry/api@1.9.1)(@prisma/client@5.22.0)(@types/pg@8.20.0)(better-sqlite3@12.5.0)(kysely@0.28.14)(pg@8.20.0)(postgres@3.4.8))
|
||||
'@proj-airi/server-protocol':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/server-protocol
|
||||
'@proj-airi/server-schema':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/server-schema
|
||||
'@proj-airi/server-sdk-shared':
|
||||
specifier: workspace:*
|
||||
version: link:../../packages/server-sdk-shared
|
||||
better-auth:
|
||||
specifier: ^1.5.6
|
||||
version: 1.5.6(@opentelemetry/api@1.9.1)(@prisma/client@5.22.0)(better-sqlite3@12.5.0)(drizzle-kit@0.31.10)(drizzle-orm@0.45.1(@electric-sql/pglite@0.4.1)(@opentelemetry/api@1.9.1)(@prisma/client@5.22.0)(@types/pg@8.20.0)(better-sqlite3@12.5.0)(kysely@0.28.14)(pg@8.20.0)(postgres@3.4.8))(pg@8.20.0)(react@19.2.3)(vitest@4.1.1)(vue@3.5.30(typescript@5.9.3))
|
||||
@@ -2243,15 +2243,6 @@ importers:
|
||||
specifier: ^5.28.0
|
||||
version: 5.28.0
|
||||
|
||||
packages/server-protocol:
|
||||
dependencies:
|
||||
'@moeru/eventa':
|
||||
specifier: 'catalog:'
|
||||
version: 1.0.0-beta.2(electron@41.0.3)(h3@2.0.1-rc.19(crossws@0.4.4(srvx@0.11.13(patch_hash=c761d25a70e22a0925c88fe91a9dd1c3153dd341d8fd4f260166678156c4df2d))))
|
||||
'@proj-airi/plugin-protocol':
|
||||
specifier: workspace:*
|
||||
version: link:../plugin-protocol
|
||||
|
||||
packages/server-runtime:
|
||||
dependencies:
|
||||
'@guiiai/logg':
|
||||
@@ -2260,9 +2251,6 @@ importers:
|
||||
'@moeru/std':
|
||||
specifier: 'catalog:'
|
||||
version: 0.1.0-beta.17
|
||||
'@proj-airi/server-protocol':
|
||||
specifier: workspace:^
|
||||
version: link:../server-protocol
|
||||
'@proj-airi/server-shared':
|
||||
specifier: workspace:^
|
||||
version: link:../server-shared
|
||||
@@ -2296,9 +2284,9 @@ importers:
|
||||
'@moeru/std':
|
||||
specifier: 'catalog:'
|
||||
version: 0.1.0-beta.17
|
||||
'@proj-airi/server-protocol':
|
||||
'@proj-airi/server-sdk-shared':
|
||||
specifier: workspace:^
|
||||
version: link:../server-protocol
|
||||
version: link:../server-sdk-shared
|
||||
'@proj-airi/server-shared':
|
||||
specifier: workspace:^
|
||||
version: link:../server-shared
|
||||
@@ -2309,7 +2297,17 @@ importers:
|
||||
specifier: 'catalog:'
|
||||
version: 2.2.6
|
||||
|
||||
packages/server-shared: {}
|
||||
packages/server-sdk-shared:
|
||||
dependencies:
|
||||
'@moeru/eventa':
|
||||
specifier: 'catalog:'
|
||||
version: 1.0.0-beta.2(electron@41.0.3)(h3@2.0.1-rc.19(crossws@0.4.4(srvx@0.11.13(patch_hash=c761d25a70e22a0925c88fe91a9dd1c3153dd341d8fd4f260166678156c4df2d))))
|
||||
|
||||
packages/server-shared:
|
||||
dependencies:
|
||||
'@proj-airi/plugin-protocol':
|
||||
specifier: workspace:*
|
||||
version: link:../plugin-protocol
|
||||
|
||||
packages/stage-layouts:
|
||||
dependencies:
|
||||
@@ -2428,12 +2426,12 @@ importers:
|
||||
'@proj-airi/i18n':
|
||||
specifier: workspace:*
|
||||
version: link:../i18n
|
||||
'@proj-airi/server-protocol':
|
||||
specifier: workspace:*
|
||||
version: link:../server-protocol
|
||||
'@proj-airi/server-sdk':
|
||||
specifier: workspace:*
|
||||
version: link:../server-sdk
|
||||
'@proj-airi/server-shared':
|
||||
specifier: workspace:*
|
||||
version: link:../server-shared
|
||||
'@proj-airi/stage-ui':
|
||||
specifier: workspace:*
|
||||
version: link:../stage-ui
|
||||
@@ -2610,12 +2608,12 @@ importers:
|
||||
'@proj-airi/pipelines-audio':
|
||||
specifier: workspace:^
|
||||
version: link:../pipelines-audio
|
||||
'@proj-airi/server-protocol':
|
||||
specifier: workspace:^
|
||||
version: link:../server-protocol
|
||||
'@proj-airi/server-sdk':
|
||||
specifier: workspace:^
|
||||
version: link:../server-sdk
|
||||
'@proj-airi/server-shared':
|
||||
specifier: workspace:^
|
||||
version: link:../server-shared
|
||||
'@proj-airi/stage-shared':
|
||||
specifier: workspace:^
|
||||
version: link:../stage-shared
|
||||
@@ -3353,12 +3351,12 @@ importers:
|
||||
'@proj-airi/audio':
|
||||
specifier: workspace:^
|
||||
version: link:../../packages/audio
|
||||
'@proj-airi/server-protocol':
|
||||
specifier: workspace:^
|
||||
version: link:../../packages/server-protocol
|
||||
'@proj-airi/server-sdk':
|
||||
specifier: workspace:^
|
||||
version: link:../../packages/server-sdk
|
||||
'@proj-airi/server-shared':
|
||||
specifier: workspace:^
|
||||
version: link:../../packages/server-shared
|
||||
'@snazzah/davey':
|
||||
specifier: ^0.1.10
|
||||
version: 0.1.10
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
"@guiiai/logg": "catalog:",
|
||||
"@huggingface/transformers": "^3.8.1",
|
||||
"@proj-airi/audio": "workspace:^",
|
||||
"@proj-airi/server-protocol": "workspace:^",
|
||||
"@proj-airi/server-sdk": "workspace:^",
|
||||
"@proj-airi/server-shared": "workspace:^",
|
||||
"@snazzah/davey": "^0.1.10",
|
||||
"@xsai-ext/providers": "catalog:",
|
||||
"@xsai/generate-speech": "catalog:",
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { Discord } from '@proj-airi/server-protocol'
|
||||
import type { Discord } from '@proj-airi/server-shared/types'
|
||||
import type { Interaction } from 'discord.js'
|
||||
|
||||
import { env } from 'node:process'
|
||||
|
||||
import { useLogg } from '@guiiai/logg'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-protocol'
|
||||
import { Client as ServerChannel } from '@proj-airi/server-sdk'
|
||||
import { ContextUpdateStrategy } from '@proj-airi/server-shared/types'
|
||||
import { Client, Events, GatewayIntentBits, Partials } from 'discord.js'
|
||||
|
||||
import { handlePing, registerCommands, VoiceManager } from '../bots/discord/commands'
|
||||
|
||||
@@ -2,8 +2,8 @@ import type { Readable } from 'node:stream'
|
||||
|
||||
import type { AudioPlayer, VoiceConnection, VoiceConnectionState } from '@discordjs/voice'
|
||||
import type { Logg } from '@guiiai/logg'
|
||||
import type { Discord } from '@proj-airi/server-protocol'
|
||||
import type { Client as AiriClient } from '@proj-airi/server-sdk'
|
||||
import type { Discord } from '@proj-airi/server-shared/types'
|
||||
import type {
|
||||
BaseGuildVoiceChannel,
|
||||
CacheType,
|
||||
|
||||
Reference in New Issue
Block a user