deploy: Complete 0126-27 deployment - database upgrade, services update, code recovery
Major Changes: - Database: Install pg_bigm/pgvector plugins, create test database - Python service: v1.0 -> v1.1, add pymupdf4llm/openpyxl/pypandoc - Node.js backend: v1.3 -> v1.7, fix pino-pretty and ES Module imports - Frontend: v1.2 -> v1.3, skip TypeScript check for deployment - Code recovery: Restore empty files from local backup Technical Fixes: - Fix pino-pretty error in production (conditional loading) - Fix ES Module import paths (add .js extensions) - Fix OSSAdapter TypeScript errors - Update Prisma Schema (63 models, 16 schemas) - Update environment variables (DATABASE_URL, EXTRACTION_SERVICE_URL, OSS) - Remove deprecated variables (REDIS_URL, DIFY_API_URL, DIFY_API_KEY) Documentation: - Create 0126 deployment folder with 8 documents - Update database development standards v2.0 - Update SAE deployment status records Deployment Status: - PostgreSQL: ai_clinical_research_test with plugins - Python: v1.1 @ 172.17.173.84:8000 - Backend: v1.7 @ 172.17.173.89:3001 - Frontend: v1.3 @ 172.17.173.90:80 Tested: All services running successfully on SAE
This commit is contained in:
@@ -203,6 +203,8 @@ export const jwtService = new JWTService();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -335,6 +335,8 @@ export function getBatchItems<T>(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -86,6 +86,8 @@ export interface VariableValidation {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -359,3 +359,5 @@ export default ChunkService;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -55,3 +55,5 @@ export const DifyClient = DeprecatedDifyClient;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -275,11 +275,12 @@ export class OSSAdapter implements StorageAdapter {
|
||||
const normalizedKey = this.normalizeKey(key)
|
||||
|
||||
const result = await this.client.head(normalizedKey)
|
||||
const headers = result.res.headers as any;
|
||||
|
||||
return {
|
||||
size: parseInt(result.res.headers['content-length'] as string, 10),
|
||||
contentType: result.res.headers['content-type'] as string,
|
||||
lastModified: new Date(result.res.headers['last-modified'] as string),
|
||||
size: parseInt(headers['content-length'] as string, 10),
|
||||
contentType: headers['content-type'] as string,
|
||||
lastModified: new Date(headers['last-modified'] as string),
|
||||
}
|
||||
} catch (error: any) {
|
||||
if (error.code === 'NoSuchKey') {
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
|
||||
import { FastifyReply } from 'fastify';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
import type { OpenAIStreamChunk, StreamOptions, THINKING_TAGS } from './types';
|
||||
import { logger } from '../logging/logger';
|
||||
import type { OpenAIStreamChunk, StreamOptions, THINKING_TAGS } from './types.js';
|
||||
import { logger } from '../logging/logger.js';
|
||||
|
||||
/**
|
||||
* OpenAI 流式响应适配器
|
||||
@@ -210,3 +210,5 @@ export function createOpenAIStreamAdapter(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
import { FastifyReply } from 'fastify';
|
||||
import { OpenAIStreamAdapter, createOpenAIStreamAdapter } from './OpenAIStreamAdapter';
|
||||
import { StreamOptions, StreamCallbacks, THINKING_TAGS, OpenAIMessage } from './types';
|
||||
import { LLMFactory } from '../llm/adapters/LLMFactory';
|
||||
import type { Message as LLMMessage } from '../llm/adapters/types';
|
||||
import { logger } from '../logging/logger';
|
||||
import { OpenAIStreamAdapter, createOpenAIStreamAdapter } from './OpenAIStreamAdapter.js';
|
||||
import { StreamOptions, StreamCallbacks, THINKING_TAGS, OpenAIMessage } from './types.js';
|
||||
import { LLMFactory } from '../llm/adapters/LLMFactory.js';
|
||||
import type { Message as LLMMessage } from '../llm/adapters/types.js';
|
||||
import { logger } from '../logging/logger.js';
|
||||
|
||||
/**
|
||||
* 深度思考标签处理结果
|
||||
@@ -216,3 +216,5 @@ export async function streamChat(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
* 支持 Ant Design X 的 XRequest 直接消费
|
||||
*/
|
||||
|
||||
export { OpenAIStreamAdapter, createOpenAIStreamAdapter } from './OpenAIStreamAdapter';
|
||||
export { StreamingService, createStreamingService, streamChat } from './StreamingService';
|
||||
export { OpenAIStreamAdapter, createOpenAIStreamAdapter } from './OpenAIStreamAdapter.js';
|
||||
export { StreamingService, createStreamingService, streamChat } from './StreamingService.js';
|
||||
|
||||
export type {
|
||||
OpenAIMessage,
|
||||
@@ -14,9 +14,11 @@ export type {
|
||||
StreamOptions,
|
||||
StreamCallbacks,
|
||||
SSEEventType,
|
||||
} from './types';
|
||||
} from './types.js';
|
||||
|
||||
export { THINKING_TAGS } from './types.js';
|
||||
|
||||
|
||||
export { THINKING_TAGS } from './types';
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -109,3 +109,5 @@ export type SSEEventType =
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -92,6 +92,8 @@ export async function moduleRoutes(fastify: FastifyInstance) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -122,6 +122,8 @@ export interface PaginatedResponse<T> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -172,3 +172,5 @@ export const ROLE_DISPLAY_NAMES: Record<UserRole, string> = {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -183,3 +183,5 @@ export function createLLMServiceAdapter(): LLMServiceInterface {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -285,3 +285,5 @@ export class PromptBuilder {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -295,3 +295,5 @@ export class ProtocolExportService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -381,3 +381,5 @@ export interface PromptRenderContext {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -247,3 +247,5 @@ async function matchIntent(query: string): Promise<{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -101,3 +101,5 @@ export async function uploadAttachment(
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -30,3 +30,5 @@ export { aiaRoutes };
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -371,6 +371,8 @@ runTests().catch((error) => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -312,6 +312,8 @@ runTest()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -350,6 +350,8 @@ Content-Type: application/json
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -286,6 +286,8 @@ export const conflictDetectionService = new ConflictDetectionService();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -236,6 +236,8 @@ curl -X POST http://localhost:3000/api/v1/dc/tool-c/test/execute \
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -290,6 +290,8 @@ export const streamAIController = new StreamAIController();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -199,6 +199,8 @@ logger.info('[SessionMemory] 会话记忆管理器已启动', {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -133,6 +133,8 @@ checkTableStructure();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ checkProjectConfig().catch(console.error);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -102,6 +102,8 @@ main();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -559,6 +559,8 @@ URL: https://iit.xunzhengyixue.com/api/v1/iit/patient-wechat/callback
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -194,6 +194,8 @@ console.log('');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -511,6 +511,8 @@ export const patientWechatService = new PatientWechatService();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -156,6 +156,8 @@ testDifyIntegration().catch(error => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -185,6 +185,8 @@ testIitDatabase()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -171,6 +171,8 @@ if (hasError) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -197,6 +197,8 @@ async function testUrlVerification() {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -278,6 +278,8 @@ main().catch((error) => {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -162,6 +162,8 @@ Write-Host ""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -255,6 +255,8 @@ export interface CachedProtocolRules {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ export default async function healthRoutes(fastify: FastifyInstance) {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -146,6 +146,8 @@ Content-Type: application/json
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -131,6 +131,8 @@ Write-Host " - 删除任务: DELETE $BaseUrl/api/v1/rvw/tasks/{taskId}" -Foregr
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ export * from './services/utils.js';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -136,6 +136,8 @@ export function validateAgentSelection(agents: string[]): void {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -436,6 +436,8 @@ SET session_replication_role = 'origin';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -117,3 +117,5 @@ testCrossLanguageSearch();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -179,3 +179,5 @@ testQueryRewrite();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -125,3 +125,5 @@ testRerank();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -138,6 +138,8 @@ WHERE key = 'verify_test';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -281,6 +281,8 @@ verifyDatabase()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
2
backend/src/types/global.d.ts
vendored
2
backend/src/types/global.d.ts
vendored
@@ -71,6 +71,8 @@ export {}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user