mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-15 21:03:30 +00:00
Merge branch 'develop' into staging
This commit is contained in:
commit
1d114b53b6
17
.github/workflows/main.yml
vendored
17
.github/workflows/main.yml
vendored
@ -496,6 +496,9 @@ jobs:
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
- uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: latest
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
@ -518,6 +521,14 @@ jobs:
|
||||
env:
|
||||
DOCKER_CLI_HINTS: false
|
||||
DOCKER_EXTRA: --platform=linux/amd64,linux/arm64
|
||||
- name: Docker build love-agent
|
||||
run: |
|
||||
cd ./services/ai-bot/love-agent
|
||||
pnpm install && pnpm build
|
||||
pnpm docker:build -v
|
||||
env:
|
||||
DOCKER_CLI_HINTS: false
|
||||
DOCKER_EXTRA: --platform=linux/amd64,linux/arm64
|
||||
- name: Login to Docker Hub
|
||||
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||
uses: docker/login-action@v3
|
||||
@ -532,6 +543,12 @@ jobs:
|
||||
run: |
|
||||
echo Pushing release of tag ${{ github.ref }}
|
||||
node common/scripts/install-run-rush.js docker:push -v
|
||||
- name: Docker push love-agent
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||
run: |
|
||||
echo Pushing love-agent release of tag ${{ github.ref }}
|
||||
cd ./services/ai-bot/love-agent
|
||||
pnpm docker:push
|
||||
dist-build:
|
||||
# if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||
if: ${{ startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/s') }}
|
||||
|
@ -28,17 +28,20 @@ export async function yDocFromStorage (
|
||||
ydoc?: YDoc
|
||||
): Promise<YDoc | undefined> {
|
||||
// stat the object to ensure it exists, because read will throw an error in this case
|
||||
const blob = await storageAdapter.stat(ctx, workspace, documentId)
|
||||
if (blob === undefined) {
|
||||
return undefined
|
||||
try {
|
||||
const buffer = await storageAdapter.read(ctx, workspace, documentId)
|
||||
|
||||
// no need to apply gc because we load existing document
|
||||
// it is either already gc-ed, or gc not needed and it is disabled
|
||||
ydoc ??= new YDoc({ guid: generateId(), gc: false })
|
||||
|
||||
return yDocFromBuffer(Buffer.concat(buffer as any), ydoc)
|
||||
} catch (err: any) {
|
||||
if (err.code === 'NoSuchKey') {
|
||||
return undefined
|
||||
}
|
||||
throw err
|
||||
}
|
||||
|
||||
// no need to apply gc because we load existing document
|
||||
// it is either already gc-ed, or gc not needed and it is disabled
|
||||
ydoc ??= new YDoc({ guid: generateId(), gc: false })
|
||||
|
||||
const buffer = await storageAdapter.read(ctx, workspace, documentId)
|
||||
return yDocFromBuffer(Buffer.concat(buffer as any), ydoc)
|
||||
}
|
||||
|
||||
/** @public */
|
||||
|
@ -48,8 +48,8 @@ import type { Request, Response } from '@hcengineering/rpc'
|
||||
import type { Token } from '@hcengineering/server-token'
|
||||
import { type Readable } from 'stream'
|
||||
import type { DbAdapter, DomainHelper } from './adapter'
|
||||
import { type StorageAdapter } from './storage'
|
||||
import type { StatisticsElement } from './stats'
|
||||
import { type StorageAdapter } from './storage'
|
||||
|
||||
export interface ServerFindOptions<T extends Doc> extends FindOptions<T> {
|
||||
domain?: Domain // Allow to find for Doc's in specified domain only.
|
||||
@ -519,6 +519,17 @@ export interface StorageConfig {
|
||||
port?: number
|
||||
}
|
||||
|
||||
export class NoSuchKeyError extends Error {
|
||||
code: string
|
||||
constructor (
|
||||
msg: string,
|
||||
readonly cause?: any
|
||||
) {
|
||||
super(msg)
|
||||
this.code = 'NoSuchKey'
|
||||
}
|
||||
}
|
||||
|
||||
export interface StorageConfiguration {
|
||||
default: string
|
||||
storages: StorageConfig[]
|
||||
|
@ -401,7 +401,7 @@ export function start (
|
||||
}
|
||||
|
||||
let blobInfo = await ctx.with(
|
||||
'notoken-stat',
|
||||
'stat',
|
||||
{ workspace: payload.workspace.name },
|
||||
async (ctx) => await config.storageAdapter.stat(ctx, payload.workspace, uuid)
|
||||
)
|
||||
|
@ -1085,17 +1085,17 @@ abstract class PostgresAdapterBase implements DbAdapter {
|
||||
if (!initialized) {
|
||||
if (recheck === true) {
|
||||
await this.retryTxn(client, async (client) => {
|
||||
await client`UPDATE ${client(translateDomain(domain))} SET jsonb_set(data, '{%hash%}', 'NULL', true) WHERE "workspaceId" = ${this.workspaceId.name} AND data ->> '%hash%' IS NOT NULL`
|
||||
await client`UPDATE ${client(translateDomain(domain))} SET '%hash%' = NULL WHERE "workspaceId" = ${this.workspaceId.name} AND '%hash%' IS NOT NULL`
|
||||
})
|
||||
}
|
||||
await init('_id, data', "data ->> '%hash%' IS NOT NULL AND data ->> '%hash%' <> ''")
|
||||
await init('_id, data', "'%hash%' IS NOT NULL AND '%hash%' <> ''")
|
||||
initialized = true
|
||||
}
|
||||
let docs = await ctx.with('next', { mode }, async () => await next(50))
|
||||
if (docs.length === 0 && mode === 'hashed') {
|
||||
await close(cursorName)
|
||||
mode = 'non_hashed'
|
||||
await init('*', "data ->> '%hash%' IS NULL OR data ->> '%hash%' = ''")
|
||||
await init('*', "'%hash%' IS NULL OR '%hash%' = ''")
|
||||
docs = await ctx.with('next', { mode }, async () => await next(50))
|
||||
}
|
||||
if (docs.length === 0) {
|
||||
@ -1155,7 +1155,7 @@ abstract class PostgresAdapterBase implements DbAdapter {
|
||||
const connection = (await this.getConnection(ctx)) ?? this.client
|
||||
const res =
|
||||
await connection`SELECT * FROM ${connection(translateDomain(domain))} WHERE _id = ANY(${docs}) AND "workspaceId" = ${this.workspaceId.name}`
|
||||
return res as any as Doc[]
|
||||
return res.map((p) => parseDocWithProjection(p as any))
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,12 @@ export function inferType (val: any): string {
|
||||
}
|
||||
if (Array.isArray(val)) {
|
||||
const type = inferType(val[0])
|
||||
return type + '[]'
|
||||
if (type !== '') {
|
||||
return type + '[]'
|
||||
}
|
||||
}
|
||||
if (typeof val === 'object') {
|
||||
return '::jsonb'
|
||||
}
|
||||
return ''
|
||||
}
|
||||
@ -388,7 +393,7 @@ export class DBCollectionHelper implements DomainHelperOperations {
|
||||
}
|
||||
}
|
||||
|
||||
export function parseDocWithProjection<T extends Doc> (doc: DBDoc, projection: Projection<T> | undefined): T {
|
||||
export function parseDocWithProjection<T extends Doc> (doc: DBDoc, projection?: Projection<T> | undefined): T {
|
||||
const { workspaceId, data, ...rest } = doc
|
||||
for (const key in rest) {
|
||||
if ((rest as any)[key] === 'NULL' || (rest as any)[key] === null) {
|
||||
|
@ -29,6 +29,7 @@ import core, {
|
||||
} from '@hcengineering/core'
|
||||
import { getMetadata } from '@hcengineering/platform'
|
||||
import serverCore, {
|
||||
NoSuchKeyError,
|
||||
type BlobStorageIterator,
|
||||
type ListBlobResult,
|
||||
type StorageAdapter,
|
||||
@ -316,21 +317,26 @@ export class S3Service implements StorageAdapter {
|
||||
}
|
||||
|
||||
async doGet (ctx: MeasureContext, workspaceId: WorkspaceId, objectName: string, range?: string): Promise<Readable> {
|
||||
const res = await this.client.getObject({
|
||||
Bucket: this.getBucketId(workspaceId),
|
||||
Key: this.getDocumentKey(workspaceId, objectName),
|
||||
Range: range
|
||||
})
|
||||
try {
|
||||
const res = await this.client.getObject({
|
||||
Bucket: this.getBucketId(workspaceId),
|
||||
Key: this.getDocumentKey(workspaceId, objectName),
|
||||
Range: range
|
||||
})
|
||||
|
||||
const stream = res.Body?.transformToWebStream()
|
||||
const stream = res.Body?.transformToWebStream()
|
||||
|
||||
if (stream !== undefined) {
|
||||
return Readable.fromWeb(stream as ReadableStream<any>)
|
||||
} else {
|
||||
const readable = new Readable()
|
||||
readable._read = () => {}
|
||||
readable.push(null)
|
||||
return readable
|
||||
if (stream !== undefined) {
|
||||
return Readable.fromWeb(stream as ReadableStream<any>)
|
||||
} else {
|
||||
const readable = new Readable()
|
||||
readable._read = () => {}
|
||||
readable.push(null)
|
||||
return readable
|
||||
}
|
||||
} catch (err: any) {
|
||||
// In case of error return undefined
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${objectName}`, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -144,7 +144,7 @@ export class FallbackStorageAdapter implements StorageAdapter, StorageAdapterEx
|
||||
return result
|
||||
}
|
||||
|
||||
@withContext('aggregator-delete', {})
|
||||
@withContext('fallback-delete', {})
|
||||
async delete (ctx: MeasureContext, workspaceId: WorkspaceId): Promise<void> {
|
||||
for (const { adapter } of this.adapters) {
|
||||
if (await adapter.exists(ctx, workspaceId)) {
|
||||
@ -153,7 +153,7 @@ export class FallbackStorageAdapter implements StorageAdapter, StorageAdapterEx
|
||||
}
|
||||
}
|
||||
|
||||
@withContext('aggregator-remove', {})
|
||||
@withContext('fallback-remove', {})
|
||||
async remove (ctx: MeasureContext, workspaceId: WorkspaceId, objectNames: string[]): Promise<void> {
|
||||
// Group by provider and delegate into it.
|
||||
for (const { adapter } of this.adapters) {
|
||||
@ -173,40 +173,30 @@ export class FallbackStorageAdapter implements StorageAdapter, StorageAdapterEx
|
||||
}
|
||||
}
|
||||
|
||||
@withContext('aggregator-stat', {})
|
||||
async stat (ctx: MeasureContext, workspaceId: WorkspaceId, name: string): Promise<Blob | undefined> {
|
||||
const result = await this.findProvider(ctx, workspaceId, name)
|
||||
if (result !== undefined) {
|
||||
result.stat.provider = result.name
|
||||
}
|
||||
return result?.stat
|
||||
}
|
||||
|
||||
@withContext('aggregator-get', {})
|
||||
async get (ctx: MeasureContext, workspaceId: WorkspaceId, name: string): Promise<Readable> {
|
||||
const result = await this.findProvider(ctx, workspaceId, name)
|
||||
if (result === undefined) {
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${name}`)
|
||||
}
|
||||
return await result.adapter.get(ctx, workspaceId, result.stat._id)
|
||||
}
|
||||
|
||||
@withContext('find-provider', {})
|
||||
private async findProvider (
|
||||
ctx: MeasureContext,
|
||||
workspaceId: WorkspaceId,
|
||||
objectName: string
|
||||
): Promise<{ name: string, adapter: StorageAdapter, stat: Blob } | undefined> {
|
||||
// Group by provider and delegate into it.
|
||||
@withContext('fallback-stat', {})
|
||||
async stat (ctx: MeasureContext, workspaceId: WorkspaceId, objectName: string): Promise<Blob | undefined> {
|
||||
for (const { name, adapter } of this.adapters) {
|
||||
const stat = await adapter.stat(ctx, workspaceId, objectName)
|
||||
if (stat !== undefined) {
|
||||
return { name, adapter, stat }
|
||||
stat.provider = name
|
||||
return stat
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@withContext('aggregator-partial', {})
|
||||
@withContext('fallback-get', {})
|
||||
async get (ctx: MeasureContext, workspaceId: WorkspaceId, objectName: string): Promise<Readable> {
|
||||
for (const { adapter } of this.adapters) {
|
||||
try {
|
||||
return await adapter.get(ctx, workspaceId, objectName)
|
||||
} catch (err: any) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${objectName}`)
|
||||
}
|
||||
|
||||
@withContext('fallback-partial', {})
|
||||
async partial (
|
||||
ctx: MeasureContext,
|
||||
workspaceId: WorkspaceId,
|
||||
@ -214,20 +204,26 @@ export class FallbackStorageAdapter implements StorageAdapter, StorageAdapterEx
|
||||
offset: number,
|
||||
length?: number | undefined
|
||||
): Promise<Readable> {
|
||||
const result = await this.findProvider(ctx, workspaceId, objectName)
|
||||
if (result === undefined) {
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${objectName}`)
|
||||
for (const { adapter } of this.adapters) {
|
||||
try {
|
||||
return await adapter.partial(ctx, workspaceId, objectName, offset, length)
|
||||
} catch (err: any) {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
return await result.adapter.partial(ctx, workspaceId, result.stat._id, offset, length)
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${objectName}`)
|
||||
}
|
||||
|
||||
@withContext('aggregator-read', {})
|
||||
@withContext('fallback-read', {})
|
||||
async read (ctx: MeasureContext, workspaceId: WorkspaceId, objectName: string): Promise<Buffer[]> {
|
||||
const result = await this.findProvider(ctx, workspaceId, objectName)
|
||||
if (result === undefined) {
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${objectName}`)
|
||||
for (const { adapter } of this.adapters) {
|
||||
try {
|
||||
return await adapter.read(ctx, workspaceId, objectName)
|
||||
} catch (err: any) {
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
return await result.adapter.read(ctx, workspaceId, result.stat._id)
|
||||
throw new NoSuchKeyError(`${workspaceId.name} missing ${objectName}`)
|
||||
}
|
||||
|
||||
@withContext('aggregator-put', {})
|
||||
|
@ -13,10 +13,17 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "node esbuild.config.js",
|
||||
"docker:build": "../../../common/scripts/docker_build.sh hardcoreeng/love-agent",
|
||||
"docker:push": "../../../common/scripts/docker_tag.sh hardcoreeng/love-agent",
|
||||
"lint": "eslint src/**/*.ts",
|
||||
"lint:fix": "eslint --fix src/**/*.ts",
|
||||
"format": "prettier --write src/**/*.ts && pnpm lint:fix"
|
||||
},
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"livekit-server-sdk": "2.7.3"
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "~20.11.16",
|
||||
"@typescript-eslint/eslint-plugin": "^6.11.0",
|
||||
@ -32,7 +39,7 @@
|
||||
"typescript": "^5.6.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@deepgram/sdk": "^3.8.1",
|
||||
"@deepgram/sdk": "^3.9.0",
|
||||
"@livekit/agents": "^0.3.5",
|
||||
"@livekit/rtc-node": "^0.11.1",
|
||||
"dotenv": "^16.4.5"
|
||||
|
@ -4,13 +4,16 @@ settings:
|
||||
autoInstallPeers: true
|
||||
excludeLinksFromLockfile: false
|
||||
|
||||
overrides:
|
||||
livekit-server-sdk: 2.7.3
|
||||
|
||||
importers:
|
||||
|
||||
.:
|
||||
dependencies:
|
||||
'@deepgram/sdk':
|
||||
specifier: ^3.8.1
|
||||
version: 3.8.1
|
||||
specifier: ^3.9.0
|
||||
version: 3.9.0
|
||||
'@livekit/agents':
|
||||
specifier: ^0.3.5
|
||||
version: 0.3.5
|
||||
@ -70,8 +73,8 @@ packages:
|
||||
resolution: {integrity: sha512-8B1C/oTxTxyHlSFubAhNRgCbQ2SQ5wwvtlByn8sDYZvdDtdn/VE2yEPZ4BvUnrKWmsbTQY6/ooLV+9Ka2qmDSQ==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
|
||||
'@deepgram/sdk@3.8.1':
|
||||
resolution: {integrity: sha512-Q732JUp4tuBRpqOVnxC4MMARvQnxE963ftzF5pYPeQU/DDTAz3rty6yeGzjsZavPPr8mqySZ1RboU3FEIUvD+Q==}
|
||||
'@deepgram/sdk@3.9.0':
|
||||
resolution: {integrity: sha512-X/7JzoYjCObyEaPb2Dgnkwk2LwRe4bw0FJJCLdkjpnFfJCFgA9IWgRD8FEUI6/hp8dW/CqqXkGPA2Q3DIsVG8A==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
|
||||
'@esbuild/aix-ppc64@0.20.2':
|
||||
@ -212,14 +215,14 @@ packages:
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@eslint-community/eslint-utils@4.4.0':
|
||||
resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==}
|
||||
'@eslint-community/eslint-utils@4.4.1':
|
||||
resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
|
||||
|
||||
'@eslint-community/regexpp@4.11.1':
|
||||
resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==}
|
||||
'@eslint-community/regexpp@4.12.1':
|
||||
resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==}
|
||||
engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0}
|
||||
|
||||
'@eslint/eslintrc@2.1.4':
|
||||
@ -249,8 +252,8 @@ packages:
|
||||
'@livekit/mutex@1.1.0':
|
||||
resolution: {integrity: sha512-XRLG+z/0uoyDioupjUiskjI06Y51U/IXVPJn7qJ+R3J75XX01irYVBM9MpxeJahpVoe9QhU4moIEolX+HO9U9g==}
|
||||
|
||||
'@livekit/protocol@1.27.0':
|
||||
resolution: {integrity: sha512-jVb4zljNaYKoLiL5MBjGiO1+QKVsxMqXT/c0dwcKUW7NCLjAZXucoQVV1Y79FCbKwVnOCOtI6wwteEntbfk/Qw==}
|
||||
'@livekit/protocol@1.27.1':
|
||||
resolution: {integrity: sha512-ISEp7uWdV82mtCR1eyHFTzdRZTVbe2+ZztjmjiMPzR/KPrI1Ma/u5kLh87NNuY3Rn8wv1VlEvGHHsFjQ+dKVUw==}
|
||||
|
||||
'@livekit/rtc-node-darwin-arm64@0.11.1':
|
||||
resolution: {integrity: sha512-M+Ui87H06ae19GGI7r937dS6hI84MBBTQAkkNlL7qd+pvdCAk25u0FYa8r4SOElKJ0VR3AbzeDoXTihLgpvjMg==}
|
||||
@ -310,6 +313,9 @@ packages:
|
||||
'@types/json5@0.0.29':
|
||||
resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==}
|
||||
|
||||
'@types/node@18.19.64':
|
||||
resolution: {integrity: sha512-955mDqvO2vFf/oL7V3WiUtiz+BugyX8uVbaT2H8oj3+8dRyH2FLiNdowe7eNqRM7IOIZvzDH76EoAT+gwm6aIQ==}
|
||||
|
||||
'@types/node@20.11.30':
|
||||
resolution: {integrity: sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==}
|
||||
|
||||
@ -386,8 +392,8 @@ packages:
|
||||
peerDependencies:
|
||||
acorn: ^6.0.0 || ^7.0.0 || ^8.0.0
|
||||
|
||||
acorn@8.13.0:
|
||||
resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==}
|
||||
acorn@8.14.0:
|
||||
resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==}
|
||||
engines: {node: '>=0.4.0'}
|
||||
hasBin: true
|
||||
|
||||
@ -503,8 +509,8 @@ packages:
|
||||
cross-fetch@3.1.8:
|
||||
resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==}
|
||||
|
||||
cross-spawn@7.0.3:
|
||||
resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==}
|
||||
cross-spawn@7.0.5:
|
||||
resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==}
|
||||
engines: {node: '>= 8'}
|
||||
|
||||
data-view-buffer@1.0.1:
|
||||
@ -1015,8 +1021,8 @@ packages:
|
||||
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
livekit-server-sdk@2.7.2:
|
||||
resolution: {integrity: sha512-qDNRXeo+WMnY5nKSug7KHJ9er9JIuKi+r7H9ZaSBbmbaOt62i0b4BrHBMFSMr8pAuWzuSxihCFa29q5QvFc5fw==}
|
||||
livekit-server-sdk@2.7.3:
|
||||
resolution: {integrity: sha512-dBiyMJ2o3Adw7aBVuFxVOlYHmiZtGGS9zVksMuv/wiEVHY+6XSDzo0X67pZVkyGlq1moF4YZAReVY2Dbxve8NQ==}
|
||||
engines: {node: '>=19'}
|
||||
|
||||
locate-path@6.0.0:
|
||||
@ -1331,8 +1337,8 @@ packages:
|
||||
tr46@0.0.3:
|
||||
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
|
||||
|
||||
ts-api-utils@1.3.0:
|
||||
resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==}
|
||||
ts-api-utils@1.4.0:
|
||||
resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==}
|
||||
engines: {node: '>=16'}
|
||||
peerDependencies:
|
||||
typescript: '>=4.2.0'
|
||||
@ -1436,9 +1442,10 @@ snapshots:
|
||||
dependencies:
|
||||
dayjs: 1.11.13
|
||||
|
||||
'@deepgram/sdk@3.8.1':
|
||||
'@deepgram/sdk@3.9.0':
|
||||
dependencies:
|
||||
'@deepgram/captions': 1.2.0
|
||||
'@types/node': 18.19.64
|
||||
cross-fetch: 3.1.8
|
||||
deepmerge: 4.3.1
|
||||
events: 3.3.0
|
||||
@ -1517,12 +1524,12 @@ snapshots:
|
||||
'@esbuild/win32-x64@0.20.2':
|
||||
optional: true
|
||||
|
||||
'@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)':
|
||||
'@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)':
|
||||
dependencies:
|
||||
eslint: 8.57.1
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
'@eslint-community/regexpp@4.11.1': {}
|
||||
'@eslint-community/regexpp@4.12.1': {}
|
||||
|
||||
'@eslint/eslintrc@2.1.4':
|
||||
dependencies:
|
||||
@ -1555,10 +1562,10 @@ snapshots:
|
||||
'@livekit/agents@0.3.5':
|
||||
dependencies:
|
||||
'@livekit/mutex': 1.1.0
|
||||
'@livekit/protocol': 1.27.0
|
||||
'@livekit/protocol': 1.27.1
|
||||
'@livekit/rtc-node': 0.11.1
|
||||
commander: 12.1.0
|
||||
livekit-server-sdk: 2.7.2
|
||||
livekit-server-sdk: 2.7.3
|
||||
pino: 8.21.0
|
||||
pino-pretty: 11.3.0
|
||||
ws: 8.18.0
|
||||
@ -1569,7 +1576,7 @@ snapshots:
|
||||
|
||||
'@livekit/mutex@1.1.0': {}
|
||||
|
||||
'@livekit/protocol@1.27.0':
|
||||
'@livekit/protocol@1.27.1':
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 1.10.0
|
||||
|
||||
@ -1620,6 +1627,10 @@ snapshots:
|
||||
|
||||
'@types/json5@0.0.29': {}
|
||||
|
||||
'@types/node@18.19.64':
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
|
||||
'@types/node@20.11.30':
|
||||
dependencies:
|
||||
undici-types: 5.26.5
|
||||
@ -1628,7 +1639,7 @@ snapshots:
|
||||
|
||||
'@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.6.3))(eslint@8.57.1)(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@eslint-community/regexpp': 4.11.1
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
'@typescript-eslint/parser': 6.21.0(eslint@8.57.1)(typescript@5.6.3)
|
||||
'@typescript-eslint/scope-manager': 6.21.0
|
||||
'@typescript-eslint/type-utils': 6.21.0(eslint@8.57.1)(typescript@5.6.3)
|
||||
@ -1640,7 +1651,7 @@ snapshots:
|
||||
ignore: 5.3.2
|
||||
natural-compare: 1.4.0
|
||||
semver: 7.6.3
|
||||
ts-api-utils: 1.3.0(typescript@5.6.3)
|
||||
ts-api-utils: 1.4.0(typescript@5.6.3)
|
||||
optionalDependencies:
|
||||
typescript: 5.6.3
|
||||
transitivePeerDependencies:
|
||||
@ -1670,7 +1681,7 @@ snapshots:
|
||||
'@typescript-eslint/utils': 6.21.0(eslint@8.57.1)(typescript@5.6.3)
|
||||
debug: 4.3.7
|
||||
eslint: 8.57.1
|
||||
ts-api-utils: 1.3.0(typescript@5.6.3)
|
||||
ts-api-utils: 1.4.0(typescript@5.6.3)
|
||||
optionalDependencies:
|
||||
typescript: 5.6.3
|
||||
transitivePeerDependencies:
|
||||
@ -1687,7 +1698,7 @@ snapshots:
|
||||
is-glob: 4.0.3
|
||||
minimatch: 9.0.3
|
||||
semver: 7.6.3
|
||||
ts-api-utils: 1.3.0(typescript@5.6.3)
|
||||
ts-api-utils: 1.4.0(typescript@5.6.3)
|
||||
optionalDependencies:
|
||||
typescript: 5.6.3
|
||||
transitivePeerDependencies:
|
||||
@ -1695,7 +1706,7 @@ snapshots:
|
||||
|
||||
'@typescript-eslint/utils@6.21.0(eslint@8.57.1)(typescript@5.6.3)':
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1)
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1)
|
||||
'@types/json-schema': 7.0.15
|
||||
'@types/semver': 7.5.8
|
||||
'@typescript-eslint/scope-manager': 6.21.0
|
||||
@ -1718,11 +1729,11 @@ snapshots:
|
||||
dependencies:
|
||||
event-target-shim: 5.0.1
|
||||
|
||||
acorn-jsx@5.3.2(acorn@8.13.0):
|
||||
acorn-jsx@5.3.2(acorn@8.14.0):
|
||||
dependencies:
|
||||
acorn: 8.13.0
|
||||
acorn: 8.14.0
|
||||
|
||||
acorn@8.13.0: {}
|
||||
acorn@8.14.0: {}
|
||||
|
||||
ajv@6.12.6:
|
||||
dependencies:
|
||||
@ -1863,7 +1874,7 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
|
||||
cross-spawn@7.0.3:
|
||||
cross-spawn@7.0.5:
|
||||
dependencies:
|
||||
path-key: 3.1.1
|
||||
shebang-command: 2.0.0
|
||||
@ -2151,8 +2162,8 @@ snapshots:
|
||||
|
||||
eslint@8.57.1:
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1)
|
||||
'@eslint-community/regexpp': 4.11.1
|
||||
'@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1)
|
||||
'@eslint-community/regexpp': 4.12.1
|
||||
'@eslint/eslintrc': 2.1.4
|
||||
'@eslint/js': 8.57.1
|
||||
'@humanwhocodes/config-array': 0.13.0
|
||||
@ -2161,7 +2172,7 @@ snapshots:
|
||||
'@ungap/structured-clone': 1.2.0
|
||||
ajv: 6.12.6
|
||||
chalk: 4.1.2
|
||||
cross-spawn: 7.0.3
|
||||
cross-spawn: 7.0.5
|
||||
debug: 4.3.7
|
||||
doctrine: 3.0.0
|
||||
escape-string-regexp: 4.0.0
|
||||
@ -2194,8 +2205,8 @@ snapshots:
|
||||
|
||||
espree@9.6.1:
|
||||
dependencies:
|
||||
acorn: 8.13.0
|
||||
acorn-jsx: 5.3.2(acorn@8.13.0)
|
||||
acorn: 8.14.0
|
||||
acorn-jsx: 5.3.2(acorn@8.14.0)
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
esquery@1.6.0:
|
||||
@ -2477,9 +2488,9 @@ snapshots:
|
||||
prelude-ls: 1.2.1
|
||||
type-check: 0.4.0
|
||||
|
||||
livekit-server-sdk@2.7.2:
|
||||
livekit-server-sdk@2.7.3:
|
||||
dependencies:
|
||||
'@livekit/protocol': 1.27.0
|
||||
'@livekit/protocol': 1.27.1
|
||||
camelcase-keys: 9.1.3
|
||||
jose: 5.9.6
|
||||
|
||||
@ -2800,7 +2811,7 @@ snapshots:
|
||||
|
||||
tr46@0.0.3: {}
|
||||
|
||||
ts-api-utils@1.3.0(typescript@5.6.3):
|
||||
ts-api-utils@1.4.0(typescript@5.6.3):
|
||||
dependencies:
|
||||
typescript: 5.6.3
|
||||
|
||||
|
@ -14,7 +14,6 @@
|
||||
//
|
||||
|
||||
interface Config {
|
||||
Port: number
|
||||
TranscriptDelay: number
|
||||
DeepgramApiKey: string
|
||||
PlatformUrl: string
|
||||
@ -25,7 +24,6 @@ const parseNumber = (str: string | undefined): number | undefined => (str !== un
|
||||
|
||||
const config: Config = (() => {
|
||||
const params: Partial<Config> = {
|
||||
Port: parseNumber(process.env.PORT) ?? 4020,
|
||||
DeepgramApiKey: process.env.DEEPGRAM_API_KEY,
|
||||
TranscriptDelay: parseNumber(process.env.TRANSCRIPT_DELAY) ?? 3000,
|
||||
PlatformUrl: process.env.PLATFORM_URL,
|
||||
|
Loading…
Reference in New Issue
Block a user