From 17014446ba159532a9502ff0728e8e69095360ad Mon Sep 17 00:00:00 2001 From: lik Date: Mon, 25 May 2026 12:46:14 +0800 Subject: [PATCH] start --- .env | 2 + .gitignore | 2 + agent/agent.js | 116 + agent/prompts.js | 56 + agent/task.js | 29 + app.js | 74 + conf.json | 21 + handler/escort_record.js | 127 ++ handler/org.js | 170 ++ handler/resource.js | 18 + index.js | 10 + models/index.js | 47 + models/schema/escort_record.js | 304 +++ models/schema/org.js | 246 ++ nginx_site.txt | 63 + package-lock.json | 3868 ++++++++++++++++++++++++++++++++ package.json | 42 + resource/services.js | 284 +++ routes/index.js | 38 + utils/authToken.js | 138 ++ utils/logger.js | 48 + utils/passwdCrypto.js | 13 + utils/responseUtil.js | 85 + websocket.js | 131 ++ 24 files changed, 5932 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100644 agent/agent.js create mode 100644 agent/prompts.js create mode 100644 agent/task.js create mode 100644 app.js create mode 100644 conf.json create mode 100644 handler/escort_record.js create mode 100644 handler/org.js create mode 100644 handler/resource.js create mode 100644 index.js create mode 100644 models/index.js create mode 100644 models/schema/escort_record.js create mode 100644 models/schema/org.js create mode 100644 nginx_site.txt create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 resource/services.js create mode 100644 routes/index.js create mode 100644 utils/authToken.js create mode 100644 utils/logger.js create mode 100644 utils/passwdCrypto.js create mode 100644 utils/responseUtil.js create mode 100644 websocket.js diff --git a/.env b/.env new file mode 100644 index 0000000..d1b5f66 --- /dev/null +++ b/.env @@ -0,0 +1,2 @@ +TAVILY_API_KEY=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 +DEEPSEEK_API_KEY=sk-a58ccd82b7ba4ce3ac176a88c9381095 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e63b985 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/node_modules/ +/logs/ diff --git a/agent/agent.js b/agent/agent.js new file mode 100644 index 0000000..f124dfa --- /dev/null +++ b/agent/agent.js @@ -0,0 +1,116 @@ +import 'dotenv/config'; +import { createDeepAgent } from "deepagents"; +import { ChatOpenAI } from "@langchain/openai"; +import { AIMessageChunk, ToolMessage } from "langchain"; +import { SystemMessage, HumanMessage, AIMessage } from "@langchain/core/messages"; +import { ChatDeepSeek } from "@langchain/deepseek"; +import Prompts from "./prompts.js"; + +export default class EscortAgent { + constructor() { + } + + clearMessages() { + this.messages = []; + } + + // msg: { ts: "2023-08-01 10:00:00", content: "你好" } + async streamChat(userInfo, msgs, callback) { + if (!msgs.length) { + return; + } + + const agent = this._genAgent(userInfo); + msgs.forEach(msg => { + if (msg.type === "clear") { + this.messages = []; + } else { + this.messages.push(new HumanMessage(msg.content)); + } + }); + + if (this.messages.length === 0) { + return; + } + + const INTERESTING_NODES = new Set(["model_request", "tools"]); + for await (const [namespace, mode, data] of await agent.stream( + { messages: this.messages }, + { + recursion_limit: 50, + streamMode: ["updates", "messages", "custom"], subgraphs: true, + configurable: { + thread_id: 'default-session' + } + })) { + const isSubagent = namespace.some(s => s.startsWith("tools:")); + const source = isSubagent ? "subagent" : "main"; + if (mode === "updates") { + for (const nodeName of Object.keys(data)) { + if (!INTERESTING_NODES.has(nodeName)) continue; + // Main agent updates (empty namespace) + if (namespace.length === 0) { + for (const [nodeName, data_] of Object.entries(data)) { + if (nodeName === "tools") { + // Subagent results returned to main agent + for (const msg of data_.messages ?? []) { + if (msg.type === "tool") { + console.log(`\nSubagent complete: ${msg.name}`); + console.log(` Result: ${String(msg.content).slice(0, 200)}...`); + } + } + } else if (nodeName === "model_request") { + this.messages.push(...data_.messages); + } + } + } else { + // Subagent updates (non-empty namespace) + for (const [nodeName, data_] of Object.entries(data)) { + console.log(` [${namespace[0]}] step: ${nodeName}`); + } + } + } + } else if (mode === "messages") { + const [message] = data; + if (message.tool_call_chunks?.length) { + continue; + } + if (AIMessageChunk.isInstance(message)) { + if (message.text && !message.tool_call_chunks?.length) { + callback(source, "ai", message.text, message.id); + } + if (message.additional_kwargs.reasoning_content && !message.tool_call_chunks?.length) { + callback(source, "reasoning", message.additional_kwargs.reasoning_content, message.id); + } + } + if (ToolMessage.isInstance(message) && message.text) { + callback(source, "tool", message.text, message.id); + } + } else if (mode === "custom") { + this.logger.info("custom: ", data); + } + } + } + + _genAgent(userInfo) { + if (this.agent) { + return this.agent; + } + + this.messages = []; + + this.model = new ChatDeepSeek({ + model: 'deepseek-v4-pro', + apiKey: 'sk-a58ccd82b7ba4ce3ac176a88c9381095', + temperature: 0.3 + }); + + this.agent = createDeepAgent({ + name: "deep-agent", + model: this.model, + systemPrompt: Prompts.buildSystemPrompt(userInfo) + }); + + return this.agent; + } +} \ No newline at end of file diff --git a/agent/prompts.js b/agent/prompts.js new file mode 100644 index 0000000..d6da8ac --- /dev/null +++ b/agent/prompts.js @@ -0,0 +1,56 @@ +import moment from "moment"; +import services from "../resource/services.js"; + +class Prompts { + static buildSystemPrompt(userInfo) { + let userInfo_str = "用户未登录,提示用户先登录,并在'我的'中完善个人信息"; + if (userInfo) { + userInfo_str = JSON.stringify({ + name: userInfo.profile.name, + mobile: userInfo.profile.mobile, + sex: userInfo.profile.sex, + birth: userInfo.profile.birth, + province: userInfo.location.province, + city: userInfo.location.city, + address: userInfo.addresses || [], + }); + } + + return ` +# 角色定义 +你是小橙,一名陪诊服务顾问。温暖、直接、高效。 + +# 核心能力 +- 查询医院、科室、医生信息 +- 创建、查询陪诊订单 +- 解答服务流程、价格、注意事项 +- 提供就诊准备建议 + +# 铁律(必须遵守) +1. 极度简洁:能一句话说完绝不两句。禁止长篇大论,直接给答案。 +2. 聊专业问题时,要严肃专注,不偏离主题;要客观公正,绝不主观臆造;同时给用户专业真诚的反馈。 +3. 聚焦用户最新问题,理解意图,高情商个性化的跟用户沟通,不要一开口就问“需要陪诊服务吗”。 +4. 主动追问:回答后,一句追问收尾,引导用户给出下一步关键信息。 +5. 输出要排版层次清晰,格式统一整洁,不要使用markdown格式。 +6. 医疗问题时,末尾加一句"最终以医生诊断为准"。 +7. 保护用户隐私,不泄露个人信息。 +8. 用户询问怎么加入团队或怎么合作时,首先欢迎用户加入团队,然后让用户电话或微信联系。 +9. 你无法回答的业务问题,要提示用户联系客服。 + +# 工作流程 +1. 问清城市、医院、科室 +2. 推荐匹配选项 +3. 确认就诊时间 +4. 创建订单、确认细节 +5. 就诊前提醒 + +## 参考信息 +当前日期:${moment().format("YYYY-MM-DD")}; +用户信息:${userInfo_str}; +服务项目:${JSON.stringify(services)}; +服务电话: 18618162956 (微信同号) +`; + } +} + +export default Prompts; diff --git a/agent/task.js b/agent/task.js new file mode 100644 index 0000000..9809663 --- /dev/null +++ b/agent/task.js @@ -0,0 +1,29 @@ +import EscortAgent from "./agent.js"; + +class ChatTask { + constructor(options = {}) { + this.options = { + modelProvider: options.modelProvider || "deepseek", + apiKey: options.apiKey, + baseURL: options.baseURL, + modelName: options.modelName, + temperature: options.temperature ?? 0.7, + maxIterations: options.maxIterations || 10, + }; + + this.agents = {}; + } + + async streamChat(userInfo, message, callback) { + const userId = userInfo ? userInfo._id : message.appId; + if (!this.agents[userId]) { + this.agents[userId] = new EscortAgent(); + } + return this.agents[userId].streamChat(userInfo, [message], callback); + } +} + +const chatTask = new ChatTask(); + +export { ChatTask, chatTask }; +export default chatTask; diff --git a/app.js b/app.js new file mode 100644 index 0000000..3624c44 --- /dev/null +++ b/app.js @@ -0,0 +1,74 @@ +import Koa from 'koa'; +import bodyParser from 'koa-bodyparser'; +import cors from 'koa-cors'; +import http from 'http'; +import { DBModel } from './models/index.js'; +import registerRoutes from './routes/index.js'; +import ResponseUtil from './utils/responseUtil.js'; + +class APP { + constructor() { + this.app = new Koa(); + this.setupDB(); + this.setupMiddleware(); + this.setupRoutes(); + this.setupFallback(); + } + + setupDB() { + DBModel.init(); + } + + setupMiddleware() { + this.app.use(cors()); + this.app.use(bodyParser()); + + this.app.use(async (ctx, next) => { + const start = Date.now(); + await next(); + const ms = Date.now() - start; + console.log(`${ctx.method} ${ctx.url} - ${ctx.status} - ${ms}ms`); + }); + } + + setupRoutes() { + this.app.use(async (ctx, next) => { + if (ctx.path === '/') { + ResponseUtil.success(ctx, { name: 'attendant-api', version: '1.0.0' }); + return; + } + await next(); + }); + + this.app._router = registerRoutes(this.app); + } + + setupFallback() { + this.app.use(async (ctx) => { + ctx.status = 404; + ctx.body = { code: 404, msg: 'Not Found' }; + }); + } + + start(port) { + this.server = http.createServer(this.app.callback()); + this.server.listen(port, () => { + console.log(`Server: running on http://localhost:${port}`); + }); + } + + stop() { + if (this.server) { + this.server.close(); + this.server = null; + console.log('Server stopped'); + } + } + + static createKoaApp() { + const instance = new APP(); + return instance.app; + } +} + +export { APP }; diff --git a/conf.json b/conf.json new file mode 100644 index 0000000..7d1e780 --- /dev/null +++ b/conf.json @@ -0,0 +1,21 @@ +{ + "wechat": { + "appid": "wxf73c79e16837af07", + "secret": "5a061d65f4d35d19e62e83b98f6c63cf" + }, + "mongodb": { + "str": "mongodb://huashengtec.com:6000", + "host": "huashengtec.com", + "db": "health", + "option": { + "user": "ehason", + "pass": "Ehason_dbuser_2026", + "dbName": "eiot_health", + "authSource": "admin", + "autoIndex": true, + "socketTimeoutMS": 3000, + "serverSelectionTimeoutMS": 30000 + }, + "debug": true + } +} \ No newline at end of file diff --git a/handler/escort_record.js b/handler/escort_record.js new file mode 100644 index 0000000..1cd27a4 --- /dev/null +++ b/handler/escort_record.js @@ -0,0 +1,127 @@ +import { DBModel } from "../models/index.js"; +import ResponseUtil from "../utils/responseUtil.js"; + +class HandlerEscortRecord { + constructor() { + } + + async getMyRecords(ctx) { + try { + const userId = ctx.state.user?._id || ctx.request.query?.userId; + if (!userId) { + return ResponseUtil.badRequest(ctx, "缺少用户ID"); + } + + const { page = 1, pageSize = 20, status } = ctx.request.query; + const records = await DBModel.EscortRecord.findRecordsByUser(userId, { + page: parseInt(page), + pageSize: parseInt(pageSize), + status, + }); + + return ResponseUtil.success(ctx, { records }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async getAttendantRecords(ctx) { + try { + const attendantId = ctx.state.user?._id || ctx.request.query?.attendantId; + if (!attendantId) { + return ResponseUtil.badRequest(ctx, "缺少陪诊员ID"); + } + + const { page = 1, pageSize = 20, status } = ctx.request.query; + const records = await DBModel.EscortRecord.findRecordsByAttendant(attendantId, { + page: parseInt(page), + pageSize: parseInt(pageSize), + status, + }); + + return ResponseUtil.success(ctx, { records }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async getRecordById(ctx) { + try { + const { id } = ctx.params; + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少记录ID"); + } + + const record = await DBModel.EscortRecord.findById(id); + if (!record) { + return ResponseUtil.error(ctx, "陪诊记录不存在", null, 404); + } + + return ResponseUtil.success(ctx, { record }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async createRecord(ctx) { + try { + const record = ctx.request.body; + if (!record.userId) { + return ResponseUtil.badRequest(ctx, "缺少患者信息"); + } + + const newRecord = await DBModel.EscortRecord.createRecord(record); + return ResponseUtil.success(ctx, { record: newRecord }, "创建成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async updateRecord(ctx) { + try { + const { id } = ctx.params; + const update = ctx.request.body; + + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少记录ID"); + } + + const updatedRecord = await DBModel.EscortRecord.updateRecord(id, update); + if (!updatedRecord) { + return ResponseUtil.error(ctx, "陪诊记录不存在", null, 404); + } + + return ResponseUtil.success(ctx, { record: updatedRecord }, "更新成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async updateStatus(ctx) { + try { + const { id } = ctx.params; + const { status } = ctx.request.body; + + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少记录ID"); + } + if (!status) { + return ResponseUtil.badRequest(ctx, "缺少状态值"); + } + + const updatedRecord = await DBModel.EscortRecord.updateRecord(id, { + "escort.status": status, + }); + + if (!updatedRecord) { + return ResponseUtil.error(ctx, "陪诊记录不存在", null, 404); + } + + return ResponseUtil.success(ctx, { record: updatedRecord }, "状态更新成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } +} + +export { HandlerEscortRecord }; \ No newline at end of file diff --git a/handler/org.js b/handler/org.js new file mode 100644 index 0000000..1caf4cf --- /dev/null +++ b/handler/org.js @@ -0,0 +1,170 @@ +import { DBModel } from "../models/index.js"; +import ResponseUtil from "../utils/responseUtil.js"; + +class HandlerHospital { + constructor() { + } + + async searchHospitalByName(ctx) { + try { + const { name, page = 1, pageSize = 20 } = ctx.request.query; + if (!name) { + return ResponseUtil.badRequest(ctx, "缺少搜索关键词"); + } + + const hospitals = await DBModel.Hospital.findByName(name, { + page: parseInt(page), + pageSize: parseInt(pageSize), + }); + + return ResponseUtil.success(ctx, { hospitals }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async getHospitalsByCity(ctx) { + try { + const { city, page = 1, pageSize = 20, level, type } = ctx.request.query; + if (!city) { + return ResponseUtil.badRequest(ctx, "缺少城市参数"); + } + + const hospitals = await DBModel.Hospital.findByCity(city, { + page: parseInt(page), + pageSize: parseInt(pageSize), + level, + type, + }); + + return ResponseUtil.success(ctx, { hospitals }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async getHospitalSelector(ctx) { + try { + const { city, level, type } = ctx.request.query; + const hospitals = await DBModel.Hospital.getHospitalSelector({ + city, + level, + type, + }); + + return ResponseUtil.success(ctx, { hospitals }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async getHospitalById(ctx) { + try { + const { id } = ctx.params; + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少医院ID"); + } + + const hospital = await DBModel.Hospital.findById(id); + if (!hospital) { + return ResponseUtil.notFound(ctx, "医院不存在"); + } + + return ResponseUtil.success(ctx, { hospital }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async createHospital(ctx) { + try { + const hospital = ctx.request.body; + if (!hospital.basic?.name) { + return ResponseUtil.badRequest(ctx, "缺少医院名称"); + } + + const newHospital = await DBModel.Hospital.createHospital(hospital); + return ResponseUtil.success(ctx, { hospital: newHospital }, "创建成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async updateHospital(ctx) { + try { + const { id } = ctx.params; + const update = ctx.request.body; + + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少医院ID"); + } + + const updatedHospital = await DBModel.Hospital.updateHospital(id, update); + if (!updatedHospital) { + return ResponseUtil.notFound(ctx, "医院不存在"); + } + + return ResponseUtil.success(ctx, { hospital: updatedHospital }, "更新成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async setHospitalStatus(ctx) { + try { + const { id } = ctx.params; + const { isEnabled } = ctx.request.body; + + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少医院ID"); + } + + const updatedHospital = await DBModel.Hospital.setHospitalStatus(id, isEnabled); + if (!updatedHospital) { + return ResponseUtil.notFound(ctx, "医院不存在"); + } + + return ResponseUtil.success(ctx, { hospital: updatedHospital }, "状态更新成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async getAllHospitals(ctx) { + try { + const { page = 1, pageSize = 20 } = ctx.request.query; + const skip = (parseInt(page) - 1) * parseInt(pageSize); + + const hospitals = await DBModel.Hospital.find({}) + .sort({ "service.sortOrder": 1, "basic.name": 1 }) + .skip(skip) + .limit(parseInt(pageSize)); + + const total = await DBModel.Hospital.countDocuments({}); + + return ResponseUtil.success(ctx, { hospitals, total }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } + + async deleteHospital(ctx) { + try { + const { id } = ctx.params; + if (!id) { + return ResponseUtil.badRequest(ctx, "缺少医院ID"); + } + + const deletedHospital = await DBModel.Hospital.findByIdAndDelete(id); + if (!deletedHospital) { + return ResponseUtil.notFound(ctx, "医院不存在"); + } + + return ResponseUtil.success(ctx, null, "删除成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } +} + +export { HandlerHospital }; \ No newline at end of file diff --git a/handler/resource.js b/handler/resource.js new file mode 100644 index 0000000..8b7a404 --- /dev/null +++ b/handler/resource.js @@ -0,0 +1,18 @@ +import ResponseUtil from "../utils/responseUtil.js"; +import services from "../resource/services.js"; + +class HandlerResource { + constructor() { + } + + // 获取所有启用的服务列表 + async getServices(ctx) { + try { + return ResponseUtil.success(ctx, { services }, "查询成功"); + } catch (err) { + return ResponseUtil.internalError(ctx, err.message); + } + } +} + +export { HandlerResource }; diff --git a/index.js b/index.js new file mode 100644 index 0000000..c08b177 --- /dev/null +++ b/index.js @@ -0,0 +1,10 @@ +import { APP } from './app.js' +import WebSocketServerManager from './websocket.js' + +// HTTP server +const koaApp = new APP(); +koaApp.start(9004); + +// WebSocket server +const wsServer = new WebSocketServerManager(9005); +wsServer.start(); diff --git a/models/index.js b/models/index.js new file mode 100644 index 0000000..4a21423 --- /dev/null +++ b/models/index.js @@ -0,0 +1,47 @@ +'use strict'; + +import mongoose from 'mongoose'; +import { EscortRecordSchema } from "./schema/escort_record.js" +import { HospitalSchema } from "./schema/org.js" +import config from '../conf.json' with { type: 'json' }; +import logger from '../utils/logger.js'; + +class MongoDBSchema { + constructor() { + this.dbConnection = null; + this.User = null; + this.EscortRecord = null; + this.Hospital = null; + } + + init() { + mongoose.set("debug", config.mongodb.debug); + + this.dbConnection = mongoose.createConnection(config.mongodb.str, config.mongodb.option); + this.dbConnection.on("error", () => { + logger.error.bind(logger, "...mongodb connect error ...") + }); + this.dbConnection.on("connected", async () => { + logger.info("Mongodb: " + config.mongodb.str + " connected"); + }); + this.dbConnection.on("disconnected", () => + logger.warn("Mongodb: " + config.mongodb.str + " disconnected") + ); + this.dbConnection.on("reconnected", () => + logger.info("Mongodb: " + config.mongodb.str + " reconnected") + ); + this.dbConnection.on("disconnecting", () => + logger.warn("Mongodb: " + config.mongodb.str + " disconnecting") + ); + this.dbConnection.on("close", () => + logger.warn("Mongodb: " + config.mongodb.str + " closed") + ); + + this.EscortRecord = this.dbConnection.model('escort_record', EscortRecordSchema) + this.Hospital = this.dbConnection.model('hospital', HospitalSchema) + } +} + +const DBModel = new MongoDBSchema() +export { DBModel }; + diff --git a/models/schema/escort_record.js b/models/schema/escort_record.js new file mode 100644 index 0000000..e16c71e --- /dev/null +++ b/models/schema/escort_record.js @@ -0,0 +1,304 @@ +"use strict"; + +import mongoose from "mongoose"; + +/** + * 陪诊记录Schema定义 + * + * 用于记录和管理陪诊服务全流程数据,包含以下主要分类: + * - 基础信息:userId(订单提交用户) + * - 患者信息:patient(姓名、电话、性别、年龄、身份证号) + * - 陪诊服务:escort(服务ID、服务名称) + * - 就诊信息:hospital(医院省份、名称、地址、科室、医生、病历号) + * - 时间安排:schedule(预约时间、开始时间、结束时间、时长) + * - 陪诊员信息:attendant(陪诊员ID、姓名) + * - 费用信息:payment(总费用、已支付、支付状态) + * - 备注信息:notes(患者备注、陪诊记录、就诊摘要) + * - 状态信息:status(陪诊状态) + * - 元数据:meta(创建时间、更新时间) + */ +const EscortRecordSchema = mongoose.Schema( + { + /** + * 提交订单的用户ID(订单创建者) + * @type {ObjectId} + * @ref user + */ + userId: { + type: mongoose.Schema.Types.ObjectId, + ref: "user", + index: true, + comment: "提交订单用户ID" + }, + + /** + * 患者信息 - 就诊患者的基本信息 + */ + patient: { + name: { type: String, default: "", comment: "患者姓名" }, + mobile: { type: String, default: "", comment: "患者联系电话" }, + sex: { type: String, enum: ["male", "female"], comment: "患者性别" }, + age: { type: Number, default: 0, comment: "患者年龄" }, + idnumber: { type: String, default: "", comment: "患者身份证号" }, + }, + + /** + * 陪诊服务信息 - 选择的陪诊服务配置 + */ + escort: { + serviceId: { type: Number, default: -1, comment: "陪诊服务ID" }, + serviceName: { type: String, default: "", comment: "陪诊服务名称" }, + }, + + /** + * 就诊信息 - 医院和科室相关信息 + */ + hospital: { + province: { type: String, default: "", comment: "就诊医院省份" }, + name: { type: String, default: "", comment: "就诊医院名称" }, + address: { type: String, default: "", comment: "医院详细地址" }, + department: { type: String, default: "", comment: "就诊科室" }, + doctor: { type: String, default: "", comment: "就诊医生" }, + medicalRecordNo: { type: String, default: "", comment: "病历号" }, + }, + + /** + * 时间信息 - 陪诊服务的时间安排 + */ + schedule: { + date: { type: Date, default: Date.now, comment: "预约就诊日期" }, + startTime: { type: String, default: "", comment: "陪诊实际开始时间" }, + endTime: { type: String, default: "", comment: "陪诊实际结束时间" }, + duration: { type: Number, default: 60, comment: "陪诊时长(分钟)" }, + }, + + /** + * 陪诊员信息 - 为患者提供服务的陪诊员 + */ + attendant: { + id: { + type: mongoose.Schema.Types.ObjectId, + ref: "user", + index: true, + comment: "陪诊员用户ID" + }, + name: { type: String, default: "", comment: "陪诊员姓名" }, + sex: { type: String, enum: ["none", "male", "female"], comment: "陪诊员性别" }, + }, + + /** + * 费用信息 - 服务费用相关 + */ + payment: { + totalFee: { type: Number, default: 0, comment: "陪诊服务总费用(元)" }, + paidFee: { type: Number, default: 0, comment: "已支付费用(元)" }, + status: { + type: String, + enum: ["unpaid", "partial", "paid", "refunded"], + default: "unpaid", + comment: "支付状态:未支付、部分支付、已支付、已退款", + }, + }, + + /** + * 备注信息 - 陪诊过程中的记录 + */ + notes: { + patientNote: { type: String, default: "", comment: "患者备注/特殊需求" }, + escortNote: { type: String, default: "", comment: "陪诊员服务记录" }, + medicalSummary: { type: String, default: "", comment: "就诊摘要" }, + }, + + /** + * 陪诊状态 + * - pending: 待确认 - 订单已创建,等待确认 + * - confirmed: 已确认 - 订单已确认,等待服务 + * - in_progress: 进行中 - 陪诊服务正在进行 + * - completed: 已完成 - 陪诊服务已完成 + * - cancelled: 已取消 - 订单已取消 + */ + status: { + type: String, + enum: ["pending", "confirmed", "in_progress", "completed", "cancelled"], + default: "pending", + comment: "陪诊状态:待确认、已确认、进行中、已完成、已取消", + }, + + /** + * 元数据 - 系统管理信息 + */ + meta: { + createtime: { type: Date, default: Date.now, comment: "创建时间" }, + updatetime: { type: Date, default: Date.now, comment: "更新时间" }, + }, + }, + { + minimize: false, + strict: false, + collection: "escort_record", + timestamps: false, + } +); + +/** + * 根据用户ID查找陪诊记录 + * + * @param {ObjectId} userId - 订单提交用户ID + * @param {Object} options - 查询选项 + * @param {number} [options.page=1] - 页码 + * @param {number} [options.pageSize=20] - 每页数量 + * @param {string} [options.status] - 状态筛选 + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 陪诊记录列表(按预约日期倒序) + */ +EscortRecordSchema.statics.findRecordsByUser = async function (userId, options = {}, cb) { + const { page = 1, pageSize = 20, status } = options; + const filter = { userId }; + + if (status) { + filter.status = status; + } + + const skip = (page - 1) * pageSize; + + return await this.find(filter) + .sort({ "schedule.date": -1 }) + .skip(skip) + .limit(pageSize) + .exec(cb); +}; + +/** + * 根据陪诊员ID查找陪诊记录 + * + * @param {ObjectId} attendantId - 陪诊员用户ID + * @param {Object} options - 查询选项 + * @param {number} [options.page=1] - 页码 + * @param {number} [options.pageSize=20] - 每页数量 + * @param {string} [options.status] - 状态筛选 + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 陪诊记录列表(按预约日期倒序) + */ +EscortRecordSchema.statics.findRecordsByAttendant = async function (attendantId, options = {}, cb) { + const { page = 1, pageSize = 20, status } = options; + const filter = { "attendant.id": attendantId }; + + if (status) { + filter.status = status; + } + + const skip = (page - 1) * pageSize; + + return await this.find(filter) + .sort({ "schedule.date": -1 }) + .skip(skip) + .limit(pageSize) + .exec(cb); +}; + +/** + * 创建陪诊记录 + * + * @param {Object} record - 陪诊记录对象 + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 创建的陪诊记录 + */ +EscortRecordSchema.statics.createRecord = async function (record, cb) { + record.meta = { + createtime: Date.now(), + updatetime: Date.now(), + }; + + const newRecord = new this(record); + return await newRecord.save(cb); +}; + +/** + * 更新陪诊记录 + * + * @param {ObjectId} id - 记录ID + * @param {Object} update - 要更新的字段 + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 更新后的记录,失败返回null + */ +EscortRecordSchema.statics.updateRecord = async function (id, update, cb) { + try { + update["meta.updatetime"] = Date.now(); + return await this.findByIdAndUpdate(id, { $set: update }, { new: true }, cb); + } catch (error) { + console.error("更新陪诊记录失败:", error); + return null; + } +}; + +/** + * 根据ID查找陪诊记录 + * + * @param {ObjectId} id - 记录ID + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 陪诊记录,不存在返回null + */ +EscortRecordSchema.statics.findRecordById = async function (id, cb) { + return await this.findById(id).exec(cb); +}; + +/** + * 根据状态查找陪诊记录 + * + * @param {string} status - 状态 + * @param {Object} options - 查询选项 + * @param {number} [options.page=1] - 页码 + * @param {number} [options.pageSize=20] - 每页数量 + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 陪诊记录列表 + */ +EscortRecordSchema.statics.findRecordsByStatus = async function (status, options = {}, cb) { + const { page = 1, pageSize = 20 } = options; + const skip = (page - 1) * pageSize; + + return await this.find({ status }) + .sort({ "schedule.date": -1 }) + .skip(skip) + .limit(pageSize) + .exec(cb); +}; + +/** + * 删除陪诊记录 + * + * @param {ObjectId} id - 记录ID + * @param {Function} [cb] - 可选的回调函数 + * @returns {Promise} 删除的记录,失败返回null + */ +EscortRecordSchema.statics.deleteRecord = async function (id, cb) { + try { + return await this.findByIdAndDelete(id, cb); + } catch (error) { + console.error("删除陪诊记录失败:", error); + return null; + } +}; + +// ==================== 索引定义 ==================== + +/** + * 用户ID索引 - 用于快速查询用户的陪诊记录 + */ +EscortRecordSchema.index({ userId: 1, "schedule.date": -1 }); + +/** + * 陪诊员ID索引 - 用于快速查询陪诊员的服务记录 + */ +EscortRecordSchema.index({ "attendant.id": 1, status: 1, "schedule.date": -1 }); + +/** + * 状态索引 - 用于快速按状态筛选记录 + */ +EscortRecordSchema.index({ status: 1 }); + +/** + * 医院名称索引 - 用于快速按医院筛选记录 + */ +EscortRecordSchema.index({ "hospital.name": 1 }); + +export { EscortRecordSchema }; diff --git a/models/schema/org.js b/models/schema/org.js new file mode 100644 index 0000000..745aa77 --- /dev/null +++ b/models/schema/org.js @@ -0,0 +1,246 @@ +"use strict"; + +import mongoose from "mongoose"; + +/** + * 医院Schema定义 + * + * 包含5个主要分类块:基本信息、位置信息、联系方式、服务信息和元数据。 + * 用于记录和管理医院信息,支持陪诊服务的医院选择功能。 + */ +const HospitalSchema = mongoose.Schema( + { + // 基本信息 - 医院的核心标识信息 + basic: { + name: { type: String, required: true, comment: "医院名称" }, + shortName: { type: String, default: "", comment: "医院简称" }, + pinyin: { type: String, default: "", comment: "医院名称拼音,用于搜索" }, + pinyinFL: { type: String, default: "", comment: "医院名称拼音首字母,用于搜索" }, + level: { + type: String, + enum: ["tertiary", "secondary", "primary", "other"], + default: "other", + comment: "医院等级:三级、二级、一级、其他", + }, + type: { + type: String, + enum: ["general", "specialized", "traditional_chinese", "integrated", "other"], + default: "general", + comment: "医院类型:综合医院、专科医院、中医医院、中西医结合医院、其他", + }, + description: { type: String, default: "", comment: "医院简介" }, + logo: { type: String, default: "", comment: "医院Logo地址" }, + }, + + // 位置信息 - 医院的地理位置 + location: { + province: { type: String, default: "", comment: "省份" }, + city: { type: String, default: "", comment: "城市" }, + district: { type: String, default: "", comment: "区县" }, + address: { type: String, default: "", comment: "详细地址" }, + longitude: { type: Number, default: 0, comment: "经度" }, + latitude: { type: Number, default: 0, comment: "纬度" }, + }, + + // 联系方式 - 医院的联系信息 + contact: { + phone: { type: String, default: "", comment: "联系电话" }, + emergencyPhone: { type: String, default: "", comment: "急诊电话" }, + website: { type: String, default: "", comment: "官方网站" }, + email: { type: String, default: "", comment: "电子邮箱" }, + }, + + // 服务信息 - 医院提供的服务 + service: { + features: [{ type: String, comment: "特色服务" }], + isEnabled: { type: Boolean, default: true, comment: "是否启用" }, + sortOrder: { type: Number, default: 0, comment: "排序优先级" }, + }, + + // 科室信息 - 医院科室详细信息 + departments: [ + { + name: { type: String, required: true, comment: "科室名称" }, + pinyin: { type: String, default: "", comment: "科室名称拼音" }, + pinyinFL: { type: String, default: "", comment: "科室名称拼音首字母" }, + location: { type: String, default: "", comment: "科室位置(几号楼,几层)" }, + phone: { type: String, default: "", comment: "科室联系电话" }, + description: { type: String, default: "", comment: "科室简介" }, + doctors: [ + { + name: { type: String, required: true, comment: "医生姓名" }, + title: { + type: String, + enum: ["resident", "attending", "deputy_chief", "chief", "other"], + default: "attending", + comment: "医生职称:住院医师、主治医师、副主任医师、主任医师、其他", + }, + specialty: { type: String, default: "", comment: "专业擅长" }, + avatar: { type: String, default: "", comment: "医生头像" }, + }, + ], + isEnabled: { type: Boolean, default: true, comment: "是否启用" }, + sortOrder: { type: Number, default: 0, comment: "排序优先级" }, + }, + ], + + // 元数据 - 系统管理信息 + meta: { + createtime: { type: Date, default: Date.now, comment: "创建时间" }, + updatetime: { type: Date, default: Date.now, comment: "更新时间" }, + }, + }, + { + minimize: false, + strict: false, + collection: "hospital", + timestamps: false, + } +); + +/** + * 根据名称查找医院 + * + * @param {String} name - 医院名称(支持模糊搜索) + * @param {Object} options - 查询选项 { page, pageSize } + * @param {Function} cb - 可选的回调函数 + * @returns {Promise} 医院列表 + */ +HospitalSchema.statics.findByName = async function (name, options = {}, cb) { + const { page = 1, pageSize = 20 } = options; + const filter = { + $or: [ + { "basic.name": new RegExp(name, "i") }, + { "basic.shortName": new RegExp(name, "i") }, + { "basic.pinyin": new RegExp(name.toLowerCase(), "i") }, + { "basic.pinyinFL": new RegExp(name.toUpperCase(), "i") }, + ], + "service.isEnabled": true, + }; + const skip = (page - 1) * pageSize; + return await this.find(filter) + .sort({ "service.sortOrder": 1, "basic.name": 1 }) + .skip(skip) + .limit(pageSize) + .exec(cb); +}; + +/** + * 根据城市查找医院 + * + * @param {String} city - 城市名称 + * @param {Object} options - 查询选项 { page, pageSize, level, type } + * @param {Function} cb - 可选的回调函数 + * @returns {Promise} 医院列表 + */ +HospitalSchema.statics.findByCity = async function (city, options = {}, cb) { + const { page = 1, pageSize = 20, level, type } = options; + const filter = { + "location.city": city, + "service.isEnabled": true, + }; + if (level) { + filter["basic.level"] = level; + } + if (type) { + filter["basic.type"] = type; + } + const skip = (page - 1) * pageSize; + return await this.find(filter) + .sort({ "service.sortOrder": 1, "basic.name": 1 }) + .skip(skip) + .limit(pageSize) + .exec(cb); +}; + +/** + * 获取所有启用的医院列表(用于选择器) + * + * @param {Object} options - 查询选项 { city, level, type } + * @param {Function} cb - 可选的回调函数 + * @returns {Promise} 医院列表(仅包含名称和ID) + */ +HospitalSchema.statics.getHospitalSelector = async function (options = {}, cb) { + const { city, level, type } = options; + const filter = { "service.isEnabled": true }; + if (city) { + filter["location.city"] = city; + } + if (level) { + filter["basic.level"] = level; + } + if (type) { + filter["basic.type"] = type; + } + return await this.find(filter, { "basic.name": 1 }) + .sort({ "service.sortOrder": 1, "basic.name": 1 }) + .exec(cb); +}; + +/** + * 创建医院 + * + * @param {Object} hospital - 医院对象 + * @param {Function} cb - 可选的回调函数 + * @returns {Promise} 创建的医院 + */ +HospitalSchema.statics.createHospital = async function (hospital, cb) { + hospital.meta = { + createtime: Date.now(), + updatetime: Date.now(), + }; + const newHospital = new this(hospital); + return await newHospital.save(cb); +}; + +/** + * 更新医院信息 + * + * @param {ObjectId} id - 医院ID + * @param {Object} update - 要更新的字段 + * @param {Function} cb - 可选的回调函数 + * @returns {Promise} 更新后的医院 + */ +HospitalSchema.statics.updateHospital = async function (id, update, cb) { + try { + update["meta.updatetime"] = Date.now(); + return await this.findByIdAndUpdate(id, { $set: update }, { new: true }, cb); + } catch (error) { + return null; + } +}; + +/** + * 启用/禁用医院 + * + * @param {ObjectId} id - 医院ID + * @param {Boolean} isEnabled - 是否启用 + * @param {Function} cb - 可选的回调函数 + * @returns {Promise} 更新后的医院 + */ +HospitalSchema.statics.setHospitalStatus = async function (id, isEnabled, cb) { + try { + return await this.findByIdAndUpdate( + id, + { + "service.isEnabled": isEnabled, + "meta.updatetime": Date.now(), + }, + { new: true }, + cb + ); + } catch (error) { + return null; + } +}; + +// 医院名称索引 +HospitalSchema.index({ "basic.name": 1 }); + +// 城市和等级索引 +HospitalSchema.index({ "location.city": 1, "basic.level": 1 }); + +// 启用状态索引 +HospitalSchema.index({ "service.isEnabled": 1 }); + +export { HospitalSchema }; \ No newline at end of file diff --git a/nginx_site.txt b/nginx_site.txt new file mode 100644 index 0000000..2954f8a --- /dev/null +++ b/nginx_site.txt @@ -0,0 +1,63 @@ +# HTTP 配置(可选:重定向到 HTTPS) +server { + listen 80; + server_name attendant.huashengtec.com; + + # HTTP 重定向到 HTTPS + return 301 https://$server_name$request_uri; +} + +# HTTPS 配置 +server { + listen 443 ssl; + server_name attendant.huashengtec.com; + + # SSL 证书配置 + ssl_certificate /data/wwwroot/attendant/attendant.huashengtec.com_bundle.crt; + ssl_certificate_key /data/wwwroot/attendant/attendant.huashengtec.com.key; + + # SSL 安全配置 + ssl_protocols TLSv1.2 TLSv1.3; + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_prefer_server_ciphers on; + ssl_session_cache shared:SSL:10m; + ssl_session_timeout 10m; + + # 设置 MIME 类型 + include /etc/nginx/mime.types; + default_type application/octet-stream; + + # API 反向代理 + location /api/ { + proxy_pass http://127.0.0.1:9004/; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + # WebSocket 反向代理 + location /ws/ { + proxy_pass http://127.0.0.1:9005/; + proxy_http_version 1.1; + + # WebSocket 必需请求头 + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + # 长连接超时设置(可选,根据业务调整) + proxy_read_timeout 86400s; + proxy_send_timeout 86400s; + } + + # 前端静态文件 + location / { + root /data/wwwroot/attendant; + try_files $uri $uri/ /index.html; + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..83b17c0 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3868 @@ +{ + "name": "attendant-api", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "attendant-api", + "version": "1.0.0", + "dependencies": { + "@langchain/anthropic": "^1.4.0", + "@langchain/community": "^1.1.28", + "@langchain/core": "^1.1.48", + "@langchain/deepseek": "^1.0.27", + "@langchain/langgraph": "^1.3.2", + "@langchain/openai": "^1.4.7", + "@langchain/tavily": "^1.2.0", + "bcrypt": "^5.1.1", + "bufferutil": "^4.1.0", + "deepagents": "^1.10.2", + "dotenv": "^17.4.2", + "koa": "^2.16.4", + "koa-bodyparser": "^4.4.1", + "koa-cors": "^0.0.16", + "koa-router": "^12.0.1", + "langchain": "^1.4.2", + "lodash": "^4.18.1", + "moment": "^2.30.1", + "mongoose": "^8.24.0", + "node-fetch": "^3.3.2", + "utf-8-validate": "^6.0.6", + "winston": "^3.19.0", + "ws": "^8.21.0", + "zod": "^4.4.3" + }, + "devDependencies": { + "nodemon": "^3.0.2" + }, + "optionalDependencies": { + "bufferutil": "^4.1.0", + "utf-8-validate": "^6.0.6" + } + }, + "node_modules/@anthropic-ai/sdk": { + "version": "0.95.2", + "resolved": "https://registry.npmmirror.com/@anthropic-ai/sdk/-/sdk-0.95.2.tgz", + "integrity": "sha512-Egddwo3sheo1PzUrMkZnH6VkQYwS0h/b/i8vSK8Ta9M45UQipAMeDFH57dYuDAfXMEUUGeKw6CMlremgMZgrSQ==", + "license": "MIT", + "dependencies": { + "json-schema-to-ts": "^3.1.1", + "standardwebhooks": "^1.0.0" + }, + "bin": { + "anthropic-ai-sdk": "bin/cli" + }, + "peerDependencies": { + "zod": "^3.25.0 || ^4.0.0" + }, + "peerDependenciesMeta": { + "zod": { + "optional": true + } + } + }, + "node_modules/@babel/runtime": { + "version": "7.29.2", + "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cfworker/json-schema": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/@cfworker/json-schema/-/json-schema-4.1.1.tgz", + "integrity": "sha512-gAmrUZSGtKc3AiBL71iNWxDsyUC5uMaKKGdvzYsBoTW/xi42JQHl7eKV2OYzCUqvc+D2RCcf7EXY2iCyFIk6og==", + "license": "MIT" + }, + "node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmmirror.com/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.8", + "resolved": "https://registry.npmmirror.com/@dabh/diagnostics/-/diagnostics-2.0.8.tgz", + "integrity": "sha512-R4MSXTVnuMzGD7bzHdW2ZhhdPC/igELENcq5IjEverBvq5hn1SXCWcsi6eSsdWP0/Ur+SItRRjAktmdoX/8R/Q==", + "license": "MIT", + "dependencies": { + "@so-ric/colorspace": "^1.1.6", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "node_modules/@hapi/bourne": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/@hapi/bourne/-/bourne-3.0.0.tgz", + "integrity": "sha512-Waj1cwPXJDucOib4a3bAISsKJVb15MKi9IvmTI/7ssVEm6sywXGjVJDhl6/umt1pK1ZS7PacXU3A1PmFKHEZ2w==", + "license": "BSD-3-Clause" + }, + "node_modules/@langchain/anthropic": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/@langchain/anthropic/-/anthropic-1.4.0.tgz", + "integrity": "sha512-rs1yVydrHjyiD31uChdCnKZpmDuKa0Bpz8Raiy9GvqnqmfXPMe0oOrap/2paE+NRSinDbtax8mMpP/yv8EbO1A==", + "license": "MIT", + "dependencies": { + "@anthropic-ai/sdk": "^0.95.1", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.1.47" + } + }, + "node_modules/@langchain/classic": { + "version": "1.0.33", + "resolved": "https://registry.npmmirror.com/@langchain/classic/-/classic-1.0.33.tgz", + "integrity": "sha512-EffyMp4GhcRR3a/re+E/SQlBlsToE6kun266tYzKXbc6lEHeerXAkNsZChgP8kCVBhCYhYhdTbn68ZyldrE7JA==", + "license": "MIT", + "dependencies": { + "@langchain/openai": "1.4.6", + "@langchain/textsplitters": "1.0.1", + "handlebars": "^4.7.9", + "js-yaml": "^4.1.1", + "jsonpointer": "^5.0.1", + "openapi-types": "^12.1.3", + "yaml": "^2.8.3", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "optionalDependencies": { + "langsmith": ">=0.4.0 <1.0.0" + }, + "peerDependencies": { + "@langchain/core": "^1.1.47", + "cheerio": "*", + "peggy": "^5.1.0", + "typeorm": "*" + }, + "peerDependenciesMeta": { + "cheerio": { + "optional": true + }, + "peggy": { + "optional": true + }, + "typeorm": { + "optional": true + } + } + }, + "node_modules/@langchain/classic/node_modules/@langchain/openai": { + "version": "1.4.6", + "resolved": "https://registry.npmmirror.com/@langchain/openai/-/openai-1.4.6.tgz", + "integrity": "sha512-R92/hW1aFlL9YNWLDEy1ePBnsn83kPOINNsVD+asjTJKB/00Dwf6s0VBpgZLRJiSWOW/RvbLJ/V4Djayh5boyQ==", + "license": "MIT", + "dependencies": { + "js-tiktoken": "^1.0.12", + "openai": "^6.37.0", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.1.47" + } + }, + "node_modules/@langchain/community": { + "version": "1.1.28", + "resolved": "https://registry.npmmirror.com/@langchain/community/-/community-1.1.28.tgz", + "integrity": "sha512-Mb6vmLE4a7LLkH/flxNJgzNXCbrLH/osAvuplXTRqfsysfL8/EjtN7B98kuj/4HwLtBpn8pUQ5HbJIRXLrhP8Q==", + "license": "MIT", + "dependencies": { + "@langchain/classic": "^1.0.27", + "@langchain/openai": "^1.4.1", + "binary-extensions": "^2.2.0", + "flat": "^5.0.2", + "js-yaml": "^4.1.1", + "langsmith": ">=0.4.0 <1.0.0", + "math-expression-evaluator": "^2.0.0", + "uuid": "^14.0.0", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@arcjet/redact": "^v1.2.0", + "@aws-crypto/sha256-js": "^5.0.0", + "@aws-sdk/client-dynamodb": "^3.1001.0", + "@aws-sdk/client-lambda": "^3.1001.0", + "@aws-sdk/client-s3": "^3.1001.0", + "@aws-sdk/client-sagemaker-runtime": "^3.1001.0", + "@aws-sdk/client-sfn": "^3.1001.0", + "@aws-sdk/credential-provider-node": "^3.388.0", + "@azure/search-documents": "^12.2.0", + "@azure/storage-blob": "^12.31.0", + "@browserbasehq/sdk": "*", + "@browserbasehq/stagehand": "^1.0.0", + "@clickhouse/client": "^0.2.5", + "@datastax/astra-db-ts": "^1.0.0", + "@elastic/elasticsearch": "^8.4.0", + "@getmetal/metal-sdk": "*", + "@getzep/zep-cloud": "^1.0.6", + "@getzep/zep-js": "^2.0.2", + "@gomomento/sdk-core": "^1.117.2", + "@google-cloud/storage": "^6.10.1 || ^7.7.0", + "@gradientai/nodejs-sdk": "^1.2.0", + "@huggingface/inference": "^4.13.14", + "@huggingface/transformers": "^3.8.1", + "@ibm-cloud/watsonx-ai": "*", + "@lancedb/lancedb": "^0.19.1", + "@langchain/core": "^1.1.38", + "@layerup/layerup-security": "^1.5.12", + "@libsql/client": "^0.17.0", + "@mendable/firecrawl-js": "^4.15.2", + "@mlc-ai/web-llm": "*", + "@mozilla/readability": "*", + "@neondatabase/serverless": "*", + "@notionhq/client": "^5.11.1", + "@opensearch-project/opensearch": "*", + "@planetscale/database": "^1.8.0", + "@premai/prem-sdk": "^0.3.25", + "@raycast/api": "^1.55.2", + "@rockset/client": "^0.9.1", + "@smithy/eventstream-codec": "^4.2.10", + "@smithy/protocol-http": "^5.3.10", + "@smithy/signature-v4": "^5.3.10", + "@smithy/util-utf8": "^4.2.2", + "@spider-cloud/spider-client": "^0.2.0", + "@supabase/supabase-js": "^2.45.0", + "@tensorflow-models/universal-sentence-encoder": "*", + "@tensorflow/tfjs-core": "*", + "@upstash/ratelimit": "^1.1.3 || ^2.0.3", + "@upstash/redis": "^1.20.6", + "@upstash/vector": "^1.1.1", + "@vercel/kv": "*", + "@vercel/postgres": "*", + "@writerai/writer-sdk": "^3.6.0", + "@xata.io/client": "^0.30.1", + "@zilliz/milvus2-sdk-node": ">=2.3.5", + "apify-client": "^2.22.2", + "assemblyai": "^4.25.1", + "azion": "^3.1.2", + "better-sqlite3": ">=9.4.0 <13.0.0", + "cassandra-driver": "^4.7.2", + "cborg": "^4.5.8", + "cheerio": "^1.2.0", + "chromadb": "*", + "closevector-common": "0.1.3", + "closevector-node": "0.1.6", + "closevector-web": "0.1.6", + "convex": "^1.32.0", + "couchbase": "^4.6.1", + "crypto-js": "^4.2.0", + "d3-dsv": "^3.0.1", + "discord.js": "^14.25.1", + "duck-duck-scrape": "^2.2.5", + "epub2": "^3.0.1", + "faiss-node": "*", + "fast-xml-parser": "*", + "firebase-admin": "^13.6.1", + "google-auth-library": "*", + "googleapis": "*", + "hnswlib-node": "^3.0.0", + "html-to-text": "^9.0.5", + "ibm-cloud-sdk-core": "*", + "ignore": "^7.0.5", + "interface-datastore": "^9.0.2", + "ioredis": "^5.3.2", + "it-all": "^3.0.4", + "jsdom": "*", + "jsonwebtoken": "^9.0.3", + "lodash": "^4.17.23", + "lunary": "^0.7.10", + "mammoth": "^1.11.0", + "mariadb": "^3.5.1", + "mem0ai": "^2.2.4", + "mysql2": "^3.19.1", + "neo4j-driver": "*", + "node-llama-cpp": ">=3.0.0", + "notion-to-md": "^3.1.0", + "officeparser": "^6.0.4", + "openai": "*", + "pdf-parse": "^1.0.0 || ^2.0.0", + "pg": "^8.11.0", + "pg-copy-streams": "^7.0.0", + "pickleparser": "^0.2.1", + "playwright": "^1.58.2", + "portkey-ai": "^3.0.3", + "puppeteer": "*", + "pyodide": ">=0.24.1 <0.27.0", + "replicate": "*", + "sonix-speech-recognition": "^2.1.1", + "srt-parser-2": "^1.2.3", + "typeorm": "^0.3.28", + "typesense": "^3.0.1", + "usearch": "^1.1.1", + "voy-search": "0.6.3", + "word-extractor": "*", + "ws": "^8.14.2", + "youtubei.js": "*" + }, + "peerDependenciesMeta": { + "@arcjet/redact": { + "optional": true + }, + "@aws-crypto/sha256-js": { + "optional": true + }, + "@aws-sdk/client-dynamodb": { + "optional": true + }, + "@aws-sdk/client-lambda": { + "optional": true + }, + "@aws-sdk/client-s3": { + "optional": true + }, + "@aws-sdk/client-sagemaker-runtime": { + "optional": true + }, + "@aws-sdk/client-sfn": { + "optional": true + }, + "@aws-sdk/credential-provider-node": { + "optional": true + }, + "@aws-sdk/dsql-signer": { + "optional": true + }, + "@azure/search-documents": { + "optional": true + }, + "@azure/storage-blob": { + "optional": true + }, + "@browserbasehq/sdk": { + "optional": true + }, + "@clickhouse/client": { + "optional": true + }, + "@datastax/astra-db-ts": { + "optional": true + }, + "@elastic/elasticsearch": { + "optional": true + }, + "@getmetal/metal-sdk": { + "optional": true + }, + "@getzep/zep-cloud": { + "optional": true + }, + "@getzep/zep-js": { + "optional": true + }, + "@gomomento/sdk-core": { + "optional": true + }, + "@google-cloud/storage": { + "optional": true + }, + "@gradientai/nodejs-sdk": { + "optional": true + }, + "@huggingface/inference": { + "optional": true + }, + "@huggingface/transformers": { + "optional": true + }, + "@lancedb/lancedb": { + "optional": true + }, + "@layerup/layerup-security": { + "optional": true + }, + "@libsql/client": { + "optional": true + }, + "@mendable/firecrawl-js": { + "optional": true + }, + "@mlc-ai/web-llm": { + "optional": true + }, + "@mozilla/readability": { + "optional": true + }, + "@neondatabase/serverless": { + "optional": true + }, + "@notionhq/client": { + "optional": true + }, + "@opensearch-project/opensearch": { + "optional": true + }, + "@pinecone-database/pinecone": { + "optional": true + }, + "@planetscale/database": { + "optional": true + }, + "@premai/prem-sdk": { + "optional": true + }, + "@qdrant/js-client-rest": { + "optional": true + }, + "@raycast/api": { + "optional": true + }, + "@rockset/client": { + "optional": true + }, + "@smithy/eventstream-codec": { + "optional": true + }, + "@smithy/protocol-http": { + "optional": true + }, + "@smithy/signature-v4": { + "optional": true + }, + "@smithy/util-utf8": { + "optional": true + }, + "@spider-cloud/spider-client": { + "optional": true + }, + "@supabase/supabase-js": { + "optional": true + }, + "@tensorflow-models/universal-sentence-encoder": { + "optional": true + }, + "@tensorflow/tfjs-core": { + "optional": true + }, + "@upstash/ratelimit": { + "optional": true + }, + "@upstash/redis": { + "optional": true + }, + "@upstash/vector": { + "optional": true + }, + "@vercel/kv": { + "optional": true + }, + "@vercel/postgres": { + "optional": true + }, + "@writerai/writer-sdk": { + "optional": true + }, + "@xata.io/client": { + "optional": true + }, + "@xenova/transformers": { + "optional": true + }, + "@zilliz/milvus2-sdk-node": { + "optional": true + }, + "apify-client": { + "optional": true + }, + "assemblyai": { + "optional": true + }, + "azion": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "cassandra-driver": { + "optional": true + }, + "cborg": { + "optional": true + }, + "cheerio": { + "optional": true + }, + "chromadb": { + "optional": true + }, + "closevector-common": { + "optional": true + }, + "closevector-node": { + "optional": true + }, + "closevector-web": { + "optional": true + }, + "cohere-ai": { + "optional": true + }, + "convex": { + "optional": true + }, + "couchbase": { + "optional": true + }, + "crypto-js": { + "optional": true + }, + "d3-dsv": { + "optional": true + }, + "discord.js": { + "optional": true + }, + "duck-duck-scrape": { + "optional": true + }, + "epub2": { + "optional": true + }, + "faiss-node": { + "optional": true + }, + "fast-xml-parser": { + "optional": true + }, + "firebase-admin": { + "optional": true + }, + "google-auth-library": { + "optional": true + }, + "googleapis": { + "optional": true + }, + "hnswlib-node": { + "optional": true + }, + "html-to-text": { + "optional": true + }, + "ignore": { + "optional": true + }, + "interface-datastore": { + "optional": true + }, + "ioredis": { + "optional": true + }, + "it-all": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "jsonwebtoken": { + "optional": true + }, + "lodash": { + "optional": true + }, + "lunary": { + "optional": true + }, + "mammoth": { + "optional": true + }, + "mariadb": { + "optional": true + }, + "mem0ai": { + "optional": true + }, + "mongodb": { + "optional": true + }, + "mysql2": { + "optional": true + }, + "neo4j-driver": { + "optional": true + }, + "node-llama-cpp": { + "optional": true + }, + "notion-to-md": { + "optional": true + }, + "officeparser": { + "optional": true + }, + "pdf-parse": { + "optional": true + }, + "pg": { + "optional": true + }, + "pg-copy-streams": { + "optional": true + }, + "pickleparser": { + "optional": true + }, + "playwright": { + "optional": true + }, + "portkey-ai": { + "optional": true + }, + "puppeteer": { + "optional": true + }, + "pyodide": { + "optional": true + }, + "redis": { + "optional": true + }, + "replicate": { + "optional": true + }, + "sonix-speech-recognition": { + "optional": true + }, + "srt-parser-2": { + "optional": true + }, + "typeorm": { + "optional": true + }, + "typesense": { + "optional": true + }, + "usearch": { + "optional": true + }, + "voy-search": { + "optional": true + }, + "weaviate-client": { + "optional": true + }, + "word-extractor": { + "optional": true + }, + "ws": { + "optional": true + }, + "youtubei.js": { + "optional": true + } + } + }, + "node_modules/@langchain/core": { + "version": "1.1.48", + "resolved": "https://registry.npmmirror.com/@langchain/core/-/core-1.1.48.tgz", + "integrity": "sha512-fQU6Guyb1pwc2fEplmA8FPbKfOMAofjnyJzExevro0FxEiuGHE18Ov/ZHmT9trWCDTZRI9eW1VIc6aChxV8pAQ==", + "license": "MIT", + "dependencies": { + "@cfworker/json-schema": "^4.0.2", + "@standard-schema/spec": "^1.1.0", + "js-tiktoken": "^1.0.12", + "langsmith": ">=0.5.0 <1.0.0", + "mustache": "^4.2.0", + "p-queue": "^6.6.2", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/@langchain/deepseek": { + "version": "1.0.27", + "resolved": "https://registry.npmmirror.com/@langchain/deepseek/-/deepseek-1.0.27.tgz", + "integrity": "sha512-lmj1yPy+noA0ceIzH5jNxJU/uNMGSYlWVwztvkTYC0GExja9sY+21Y9Fpn9WLld5g/AL9/1+3i2aWIQoXOaeGQ==", + "license": "MIT", + "dependencies": { + "@langchain/openai": "1.4.7" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.0.0" + } + }, + "node_modules/@langchain/langgraph": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/@langchain/langgraph/-/langgraph-1.3.2.tgz", + "integrity": "sha512-SL7Ktsr681R7da+1b2MVOWEbaCoFJOXEJPTGOjg4JIG4C7quWbTYC8DzxhcCxte6D/8cGp0rYDBnbKLXEpNqlA==", + "license": "MIT", + "dependencies": { + "@langchain/langgraph-checkpoint": "^1.0.2", + "@langchain/langgraph-sdk": "~1.9.4", + "@langchain/protocol": "^0.0.15", + "@standard-schema/spec": "1.1.0", + "uuid": "^10.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": "^1.1.44", + "zod": "^3.25.32 || ^4.2.0", + "zod-to-json-schema": "^3.x" + }, + "peerDependenciesMeta": { + "zod-to-json-schema": { + "optional": true + } + } + }, + "node_modules/@langchain/langgraph-checkpoint": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/@langchain/langgraph-checkpoint/-/langgraph-checkpoint-1.0.2.tgz", + "integrity": "sha512-F4E5Tr0nt8FGghgdscJtHw+ABzChOHeI80R7Y1pjIHdiJom6c2ieo76vL+FWiny80JmoGqhrVAEIWrw0cXKPxg==", + "license": "MIT", + "dependencies": { + "uuid": "^10.0.0" + }, + "engines": { + "node": ">=18" + }, + "peerDependencies": { + "@langchain/core": "^1.1.44" + } + }, + "node_modules/@langchain/langgraph-checkpoint/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@langchain/langgraph-sdk": { + "version": "1.9.4", + "resolved": "https://registry.npmmirror.com/@langchain/langgraph-sdk/-/langgraph-sdk-1.9.4.tgz", + "integrity": "sha512-hhASJGKa2MDJDtDkuIFdWGysMTog/HkYe0r6B6Gn1XqsURWnF7FIFl9diITAPOv1tB8YpyjnbpsBj/NkT5d+jQ==", + "license": "MIT", + "dependencies": { + "@langchain/protocol": "^0.0.15", + "@types/json-schema": "^7.0.15", + "p-queue": "^9.0.1", + "p-retry": "^7.1.1", + "uuid": "^13.0.0" + }, + "peerDependencies": { + "@langchain/core": "^1.1.44", + "react": "^18 || ^19", + "react-dom": "^18 || ^19", + "svelte": "^4.0.0 || ^5.0.0", + "vue": "^3.0.0" + }, + "peerDependenciesMeta": { + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + } + } + }, + "node_modules/@langchain/langgraph-sdk/node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, + "node_modules/@langchain/langgraph-sdk/node_modules/p-queue": { + "version": "9.3.0", + "resolved": "https://registry.npmmirror.com/p-queue/-/p-queue-9.3.0.tgz", + "integrity": "sha512-7NED7xhQ74Ngp4JP/2e0VZHp7vSWfJfqeiR92jPgxsz6m0Se4P03YoTKa9dDXyZ3r6P616gUXttrB6nnHYKang==", + "license": "MIT", + "dependencies": { + "eventemitter3": "^5.0.4", + "p-timeout": "^7.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@langchain/langgraph-sdk/node_modules/p-timeout": { + "version": "7.0.1", + "resolved": "https://registry.npmmirror.com/p-timeout/-/p-timeout-7.0.1.tgz", + "integrity": "sha512-AxTM2wDGORHGEkPCt8yqxOTMgpfbEHqF51f/5fJCmwFC3C/zNcGT63SymH2ttOAaiIws2zVg4+izQCjrakcwHg==", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@langchain/langgraph-sdk/node_modules/uuid": { + "version": "13.0.2", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-13.0.2.tgz", + "integrity": "sha512-vzi9uRZ926x4XV73S/4qQaTwPXM2JBj6/6lI/byHH1jOpCzb0zDbfytgA9LcN/hzb2l7WQSQnxITOVx5un/wGw==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, + "node_modules/@langchain/langgraph/node_modules/uuid": { + "version": "10.0.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-10.0.0.tgz", + "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/@langchain/openai": { + "version": "1.4.7", + "resolved": "https://registry.npmmirror.com/@langchain/openai/-/openai-1.4.7.tgz", + "integrity": "sha512-i1YLV4pWbGC6W8m0ZNpLObJuf1nyU4o8aWyX4AF9fHn7eM67HfIJWQ5n5XzcCpuSa41otrxA9jvH5XRKwI1qDA==", + "license": "MIT", + "dependencies": { + "js-tiktoken": "^1.0.12", + "openai": "^6.37.0", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.1.48" + } + }, + "node_modules/@langchain/protocol": { + "version": "0.0.15", + "resolved": "https://registry.npmmirror.com/@langchain/protocol/-/protocol-0.0.15.tgz", + "integrity": "sha512-MllvbpMjqHevUm+v94M422mH7XKN+wGCvJRBVROTWBotEDOATYB4Ktk2UheYP859y9o2LlhtPek5t1T9eyfAbQ==", + "license": "MIT" + }, + "node_modules/@langchain/tavily": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/@langchain/tavily/-/tavily-1.2.0.tgz", + "integrity": "sha512-aPLPgtw8+b/Rnr3H+X8H8z98T/Y7JuCE4B5eqRDHoEWgZvMDUFF7divqwQqCTMq2deQttlVrm5bN5JbKaAR7/w==", + "license": "MIT", + "dependencies": { + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.0.0" + } + }, + "node_modules/@langchain/textsplitters": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@langchain/textsplitters/-/textsplitters-1.0.1.tgz", + "integrity": "sha512-rheJlB01iVtrOUzttscutRgLybPH9qR79EyzBEbf1u97ljWyuxQfCwIWK+SjoQTM9O8M7GGLLRBSYE26Jmcoww==", + "license": "MIT", + "dependencies": { + "js-tiktoken": "^1.0.12" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.0.0" + } + }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "license": "BSD-3-Clause", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "license": "MIT" + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "license": "BSD-2-Clause" + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.4.11", + "resolved": "https://registry.npmmirror.com/@mongodb-js/saslprep/-/saslprep-1.4.11.tgz", + "integrity": "sha512-o9rAHc0IpIjuPSxRutWpE1F62x7n+4mVS4rCNHkzhIUMQcc18bb6xEq5wd2NdN0WjepIyXIppRshYI2kQDOZVA==", + "license": "MIT", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@so-ric/colorspace": { + "version": "1.1.6", + "resolved": "https://registry.npmmirror.com/@so-ric/colorspace/-/colorspace-1.1.6.tgz", + "integrity": "sha512-/KiKkpHNOBgkFJwu9sh48LkHSMYGyuTcSFK/qMBdnOAlrRJzRSXAOFB5qwzaVQuDl8wAvHVMkaASQDReTahxuw==", + "license": "MIT", + "dependencies": { + "color": "^5.0.2", + "text-hex": "1.0.x" + } + }, + "node_modules/@stablelib/base64": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/@stablelib/base64/-/base64-1.0.1.tgz", + "integrity": "sha512-1bnPQqSxSuc3Ii6MhBysoWCg58j97aUjuCSZrGSmDxNqtytIi0k8utUenAwTZN4V5mXXYGsVUI9zeBqy+jBOSQ==", + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmmirror.com/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "license": "MIT" + }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmmirror.com/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", + "license": "MIT" + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmmirror.com/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==", + "license": "MIT" + }, + "node_modules/@types/whatwg-url": { + "version": "11.0.5", + "resolved": "https://registry.npmmirror.com/@types/whatwg-url/-/whatwg-url-11.0.5.tgz", + "integrity": "sha512-coYR071JRaHa+xoEvvYqvnIHaVqaYrLPbsufM9BF63HkwI5Lgmy2QR8Q5K/lYDYo5AK82wOvSOS0UsLTpTG7uQ==", + "license": "MIT", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "license": "ISC" + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmmirror.com/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "license": "MIT", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/aproba": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/aproba/-/aproba-2.1.0.tgz", + "integrity": "sha512-tLIEcj5GuR2RSTnxNKdkK0dJ/GrC7P38sUkiDmDuHfsHmbagTFAxDVIBltoklXEVIQ/f14IL8IMJ5pn9Hez1Ew==", + "license": "ISC" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "deprecated": "This package is no longer supported.", + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "license": "Python-2.0" + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmmirror.com/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/bcrypt": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/bcrypt/-/bcrypt-5.1.1.tgz", + "integrity": "sha512-AGBHOG5hPYZ5Xl9KXzU5iKq9516yEmvCKDg3ecP5kX2aB6UqTeXZxk2ELnDgDm6BQSMlLt9rDB4LoSMx0rYwww==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.11", + "node-addon-api": "^5.0.0" + }, + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.6", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/bson": { + "version": "6.10.4", + "resolved": "https://registry.npmmirror.com/bson/-/bson-6.10.4.tgz", + "integrity": "sha512-WIsKqkSC0ABoBJuT1LEX+2HEvNmNKKgnTAyd0fL8qzK4SH2i9NXg+t08YtdZp/V9IZ33cxe3iV4yM0qg8lMQng==", + "license": "Apache-2.0", + "engines": { + "node": ">=16.20.1" + } + }, + "node_modules/bufferutil": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/bufferutil/-/bufferutil-4.1.0.tgz", + "integrity": "sha512-ZMANVnAixE6AWWnPzlW2KpUrxhm9woycYvPOo67jWHyFowASTEd9s+QN1EIMsSDtwhIxN4sWE1jotpuDUIgyIw==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmmirror.com/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cache-content-type": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/cache-content-type/-/cache-content-type-1.0.1.tgz", + "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", + "license": "MIT", + "dependencies": { + "mime-types": "^2.1.18", + "ylru": "^1.2.0" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmmirror.com/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/co-body": { + "version": "6.2.0", + "resolved": "https://registry.npmmirror.com/co-body/-/co-body-6.2.0.tgz", + "integrity": "sha512-Kbpv2Yd1NdL1V/V4cwLVxraHDV6K8ayohr2rmH0J87Er8+zJjcTa6dAn9QMPC9CRgU8+aNajKbSf1TzDB1yKPA==", + "license": "MIT", + "dependencies": { + "@hapi/bourne": "^3.0.0", + "inflation": "^2.0.0", + "qs": "^6.5.2", + "raw-body": "^2.3.3", + "type-is": "^1.6.16" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/color": { + "version": "5.0.3", + "resolved": "https://registry.npmmirror.com/color/-/color-5.0.3.tgz", + "integrity": "sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==", + "license": "MIT", + "dependencies": { + "color-convert": "^3.1.3", + "color-string": "^2.1.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/color-convert": { + "version": "3.1.3", + "resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-3.1.3.tgz", + "integrity": "sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg==", + "license": "MIT", + "dependencies": { + "color-name": "^2.0.0" + }, + "engines": { + "node": ">=14.6" + } + }, + "node_modules/color-name": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/color-name/-/color-name-2.1.0.tgz", + "integrity": "sha512-1bPaDNFm0axzE4MEAzKPuqKWeRaT43U/hyxKPBdqTfmPF+d6n7FSoTFxLVULUJOmiLp01KjhIPPH+HrXZJN4Rg==", + "license": "MIT", + "engines": { + "node": ">=12.20" + } + }, + "node_modules/color-string": { + "version": "2.1.4", + "resolved": "https://registry.npmmirror.com/color-string/-/color-string-2.1.4.tgz", + "integrity": "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==", + "license": "MIT", + "dependencies": { + "color-name": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmmirror.com/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "license": "MIT" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "license": "ISC" + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmmirror.com/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookies": { + "version": "0.9.1", + "resolved": "https://registry.npmmirror.com/cookies/-/cookies-0.9.1.tgz", + "integrity": "sha512-TG2hpqe4ELx54QER/S3HQ9SRVnQnGBtKUz5bLQWtYAQ+o6GpgMs6sYUvaiJjVxb+UXwhRhAEP3m7LbsIZ77Hmw==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "keygrip": "~1.1.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/copy-to": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/copy-to/-/copy-to-2.0.1.tgz", + "integrity": "sha512-3DdaFaU/Zf1AnpLiFDeNCD4TOWe3Zl2RZaTzUvWiIk5ERzcCodOE20Vqq4fzCbNoHURFHT4/us/Lfq+S2zyY4w==", + "license": "MIT" + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-equal": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/deep-equal/-/deep-equal-1.0.1.tgz", + "integrity": "sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==", + "license": "MIT" + }, + "node_modules/deepagents": { + "version": "1.10.2", + "resolved": "https://registry.npmmirror.com/deepagents/-/deepagents-1.10.2.tgz", + "integrity": "sha512-Ptp+t/FgIvMhDbVK0ml3IHcNx3gog3Cbqx+s88H4Hz8ieHG7svuR+/4Mawc/g14FY7mCls7Y8gCcrGb0i3Mi4w==", + "license": "MIT", + "dependencies": { + "@langchain/core": "^1.1.44", + "@langchain/langgraph": "^1.3.0", + "@langchain/langgraph-sdk": "^1.9.1", + "fast-glob": "^3.3.3", + "langchain": "^1.4.0", + "micromatch": "^4.0.8", + "yaml": "^2.8.2", + "zod": "^4.3.6" + }, + "peerDependencies": { + "langsmith": ">=0.6.0 <1.0.0" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "license": "MIT" + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "license": "MIT", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/dotenv": { + "version": "17.4.2", + "resolved": "https://registry.npmmirror.com/dotenv/-/dotenv-17.4.2.tgz", + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmmirror.com/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmmirror.com/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmmirror.com/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "license": "MIT" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-sha256": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/fast-sha256/-/fast-sha256-1.3.0.tgz", + "integrity": "sha512-n11RGP/lrWEFI/bWdygLxhI+pVeo1ZYIVwvvPkW7azl/rOy+F3HYRZ2K5zeE9mmkhQppyv9sQFx0JM9UabnpPQ==", + "license": "Unlicense" + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", + "license": "MIT" + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmmirror.com/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" + } + }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "license": "MIT" + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmmirror.com/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/generator-function": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/generator-function/-/generator-function-2.0.1.tgz", + "integrity": "sha512-SFdFmIJi+ybC0vjlHN0ZGVGHc3lgE0DxPAT0djjVg+kjOnSqclqmj0KQ7ykTOLP6YxoqOvuAODGdcHJn+43q3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "1.1.14", + "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.14.tgz", + "integrity": "sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/handlebars": { + "version": "4.7.9", + "resolved": "https://registry.npmmirror.com/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", + "license": "MIT", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "license": "ISC" + }, + "node_modules/hasown": { + "version": "2.0.3", + "resolved": "https://registry.npmmirror.com/hasown/-/hasown-2.0.3.tgz", + "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-assert": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/http-assert/-/http-assert-1.5.0.tgz", + "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", + "license": "MIT", + "dependencies": { + "deep-equal": "~1.0.1", + "http-errors": "~1.8.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/http-errors": { + "version": "1.8.1", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-1.8.1.tgz", + "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", + "license": "MIT", + "dependencies": { + "depd": "~1.1.2", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": ">= 1.5.0 < 2", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/http-errors/node_modules/depd": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/depd/-/depd-1.1.2.tgz", + "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore-by-default": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz", + "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", + "dev": true, + "license": "ISC" + }, + "node_modules/inflation": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/inflation/-/inflation-2.1.0.tgz", + "integrity": "sha512-t54PPJHG1Pp7VQvxyVCJ9mBbjG3Hqryges9bXoOO6GExCPa+//i/d5GSuFtpx3ALLd7lgIAur6zrIlBQyJuMlQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-function": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/is-generator-function/-/is-generator-function-1.1.2.tgz", + "integrity": "sha512-upqt1SkGkODW9tsGNG5mtXTXtECizwtS2kA161M+gJPc1xdb/Ax629af6YrTwcOeQHbewrPNlE5Dx7kzvXTizA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.4", + "generator-function": "^2.0.0", + "get-proto": "^1.0.1", + "has-tostringtag": "^1.0.2", + "safe-regex-test": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-network-error": { + "version": "1.3.2", + "resolved": "https://registry.npmmirror.com/is-network-error/-/is-network-error-1.3.2.tgz", + "integrity": "sha512-PhBY86zaxNZUuWP6h13Vu5oFe0XY6/UlKzQnYFELzGVHygP3MxmvTfYSG7GN3aIab/iWudSMgjSnG9Dq+nHrgA==", + "license": "MIT", + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-regex": { + "version": "1.2.1", + "resolved": "https://registry.npmmirror.com/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/js-tiktoken": { + "version": "1.0.21", + "resolved": "https://registry.npmmirror.com/js-tiktoken/-/js-tiktoken-1.0.21.tgz", + "integrity": "sha512-biOj/6M5qdgx5TKjDnFT1ymSpM5tbd3ylwDtrQvFQSu0Z7bBYko2dF+W/aUkXUPuk6IVpRxk/3Q2sHOzGlS36g==", + "license": "MIT", + "dependencies": { + "base64-js": "^1.5.1" + } + }, + "node_modules/js-yaml": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.1.tgz", + "integrity": "sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==", + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-to-ts": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz", + "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==", + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.18.3", + "ts-algebra": "^2.0.0" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/jsonpointer": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/jsonpointer/-/jsonpointer-5.0.1.tgz", + "integrity": "sha512-p/nXbhSEcu3pZRdkW1OfJhpsVtW1gd4Wa1fnQc9YLiTfAjn0312eMKimbdIQzuZl9aa9xUGaRlP9T/CJE/ditQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kareem": { + "version": "2.6.3", + "resolved": "https://registry.npmmirror.com/kareem/-/kareem-2.6.3.tgz", + "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==", + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/keygrip": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/keygrip/-/keygrip-1.1.0.tgz", + "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", + "license": "MIT", + "dependencies": { + "tsscmp": "1.0.6" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/koa": { + "version": "2.16.4", + "resolved": "https://registry.npmmirror.com/koa/-/koa-2.16.4.tgz", + "integrity": "sha512-3An0GCLDSR34tsCO4H8Tef8Pp2ngtaZDAZnsWJYelqXUK5wyiHvGItgK/xcSkmHLSTn1Jcho1mRQs2ehRzvKKw==", + "license": "MIT", + "dependencies": { + "accepts": "^1.3.5", + "cache-content-type": "^1.0.0", + "content-disposition": "~0.5.2", + "content-type": "^1.0.4", + "cookies": "~0.9.0", + "debug": "^4.3.2", + "delegates": "^1.0.0", + "depd": "^2.0.0", + "destroy": "^1.0.4", + "encodeurl": "^1.0.2", + "escape-html": "^1.0.3", + "fresh": "~0.5.2", + "http-assert": "^1.3.0", + "http-errors": "^1.6.3", + "is-generator-function": "^1.0.7", + "koa-compose": "^4.1.0", + "koa-convert": "^2.0.0", + "on-finished": "^2.3.0", + "only": "~0.0.2", + "parseurl": "^1.3.2", + "statuses": "^1.5.0", + "type-is": "^1.6.16", + "vary": "^1.1.2" + }, + "engines": { + "node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4" + } + }, + "node_modules/koa-bodyparser": { + "version": "4.4.1", + "resolved": "https://registry.npmmirror.com/koa-bodyparser/-/koa-bodyparser-4.4.1.tgz", + "integrity": "sha512-kBH3IYPMb+iAXnrxIhXnW+gXV8OTzCu8VPDqvcDHW9SQrbkHmqPQtiZwrltNmSq6/lpipHnT7k7PsjlVD7kK0w==", + "license": "MIT", + "dependencies": { + "co-body": "^6.0.0", + "copy-to": "^2.0.1", + "type-is": "^1.6.18" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/koa-compose": { + "version": "4.1.0", + "resolved": "https://registry.npmmirror.com/koa-compose/-/koa-compose-4.1.0.tgz", + "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==", + "license": "MIT" + }, + "node_modules/koa-convert": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/koa-convert/-/koa-convert-2.0.0.tgz", + "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==", + "license": "MIT", + "dependencies": { + "co": "^4.6.0", + "koa-compose": "^4.1.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/koa-cors": { + "version": "0.0.16", + "resolved": "https://registry.npmmirror.com/koa-cors/-/koa-cors-0.0.16.tgz", + "integrity": "sha512-s15knPxe3AJBi2I/ZMPL0pSqU+PLYLO6k5tI0AqClkzavowvocPlSdFUwaHNqtjHMhsGmiq2tiX/25iILJx9YA==", + "license": "MIT" + }, + "node_modules/koa-router": { + "version": "12.0.1", + "resolved": "https://registry.npmmirror.com/koa-router/-/koa-router-12.0.1.tgz", + "integrity": "sha512-gaDdj3GtzoLoeosacd50kBBTnnh3B9AYxDThQUo4sfUyXdOhY6ku1qyZKW88tQCRgc3Sw6ChXYXWZwwgjOxE0w==", + "deprecated": "Please use @koa/router instead, starting from v9! ", + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "http-errors": "^2.0.0", + "koa-compose": "^4.1.0", + "methods": "^1.1.2", + "path-to-regexp": "^6.2.1" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/koa-router/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/koa-router/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "license": "MIT" + }, + "node_modules/langchain": { + "version": "1.4.2", + "resolved": "https://registry.npmmirror.com/langchain/-/langchain-1.4.2.tgz", + "integrity": "sha512-SLGipy0r4nqQD0aiUOBYLMeGFfB/QiYnMndfZ8sGN89vXDCIXbYqcE7G/4QDDX3nZsM7/emQpoScmlxEX6sDnQ==", + "license": "MIT", + "dependencies": { + "@langchain/langgraph": "^1.3.2", + "@langchain/langgraph-checkpoint": "^1.0.1", + "langsmith": ">=0.5.0 <1.0.0", + "zod": "^3.25.76 || ^4" + }, + "engines": { + "node": ">=20" + }, + "peerDependencies": { + "@langchain/core": "^1.1.48" + } + }, + "node_modules/langsmith": { + "version": "0.7.1", + "resolved": "https://registry.npmmirror.com/langsmith/-/langsmith-0.7.1.tgz", + "integrity": "sha512-Wjk90UjNoY5cBHMlNAC/eZx5clI8jnjBOBW8uJu8+MWBtx0QesNjsUiLtjI+I3UnrpxFFpDqGXcnhBjH654Mqg==", + "license": "MIT", + "dependencies": { + "p-queue": "6.6.2" + }, + "peerDependencies": { + "@opentelemetry/api": "*", + "@opentelemetry/exporter-trace-otlp-proto": "*", + "@opentelemetry/sdk-trace-base": "*", + "openai": "*", + "ws": ">=7" + }, + "peerDependenciesMeta": { + "@opentelemetry/api": { + "optional": true + }, + "@opentelemetry/exporter-trace-otlp-proto": { + "optional": true + }, + "@opentelemetry/sdk-trace-base": { + "optional": true + }, + "openai": { + "optional": true + }, + "ws": { + "optional": true + } + } + }, + "node_modules/lodash": { + "version": "4.18.1", + "resolved": "https://registry.npmmirror.com/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", + "license": "MIT" + }, + "node_modules/logform": { + "version": "2.7.0", + "resolved": "https://registry.npmmirror.com/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", + "license": "MIT", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/math-expression-evaluator": { + "version": "2.0.7", + "resolved": "https://registry.npmmirror.com/math-expression-evaluator/-/math-expression-evaluator-2.0.7.tgz", + "integrity": "sha512-uwliJZ6BPHRq4eiqNWxZBDzKUiS5RIynFFcgchqhBOloVLVBpZpNG8jRYkedLcBvhph8TnRyWEuxPqiQcwIdog==", + "license": "MIT" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmmirror.com/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==", + "license": "MIT" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmmirror.com/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "license": "ISC", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmmirror.com/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/mongodb": { + "version": "6.20.0", + "resolved": "https://registry.npmmirror.com/mongodb/-/mongodb-6.20.0.tgz", + "integrity": "sha512-Tl6MEIU3K4Rq3TSHd+sZQqRBoGlFsOgNrH5ltAcFBV62Re3Fd+FcaVf8uSEQFOJ51SDowDVttBTONMfoYWrWlQ==", + "license": "Apache-2.0", + "dependencies": { + "@mongodb-js/saslprep": "^1.3.0", + "bson": "^6.10.4", + "mongodb-connection-string-url": "^3.0.2" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0 || ^2.0.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.3.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.2.tgz", + "integrity": "sha512-rMO7CGo/9BFwyZABcKAWL8UJwH/Kc2x0g72uhDWzG48URRax5TCIcJ7Rc3RZqffZzO/Gwff/jyKwCU9TN8gehA==", + "license": "Apache-2.0", + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^14.1.0 || ^13.0.0" + } + }, + "node_modules/mongoose": { + "version": "8.24.0", + "resolved": "https://registry.npmmirror.com/mongoose/-/mongoose-8.24.0.tgz", + "integrity": "sha512-EEZwOibDPZ5uZN3bFapfnRskEbdljAf6sP9ln6u+P4e5IfkOAh6Tqw2g8/Tag++KHOAJ095WXT/c0uqRq4Vckg==", + "license": "MIT", + "dependencies": { + "bson": "^6.10.4", + "kareem": "2.6.3", + "mongodb": "~6.20.0", + "mpath": "0.9.0", + "mquery": "5.0.0", + "ms": "2.1.3", + "sift": "17.1.3" + }, + "engines": { + "node": ">=16.20.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/mongoose" + } + }, + "node_modules/mpath": { + "version": "0.9.0", + "resolved": "https://registry.npmmirror.com/mpath/-/mpath-0.9.0.tgz", + "integrity": "sha512-ikJRQTk8hw5DEoFVxHG1Gn9T/xcjtdnOKIU1JTmGjZZlg9LST2mBLmcX3/ICIbgJydT2GOc15RnNy5mHmzfSew==", + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/mquery": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/mquery/-/mquery-5.0.0.tgz", + "integrity": "sha512-iQMncpmEK8R8ncT8HJGsGc9Dsp8xcgYMVSbs5jgnm1lFHTZqMJTUWTDx1LBO8+mK3tPNZWFLBghQEIOULSTHZg==", + "license": "MIT", + "dependencies": { + "debug": "4.x" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mustache": { + "version": "4.2.0", + "resolved": "https://registry.npmmirror.com/mustache/-/mustache-4.2.0.tgz", + "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", + "license": "MIT", + "bin": { + "mustache": "bin/mustache" + } + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmmirror.com/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmmirror.com/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==", + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-gyp-build": { + "version": "4.8.4", + "resolved": "https://registry.npmmirror.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", + "license": "MIT", + "optional": true, + "bin": { + "node-gyp-build": "bin.js", + "node-gyp-build-optional": "optional.js", + "node-gyp-build-test": "build-test.js" + } + }, + "node_modules/nodemon": { + "version": "3.1.14", + "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.1.14.tgz", + "integrity": "sha512-jakjZi93UtB3jHMWsXL68FXSAosbLfY0In5gtKq3niLSkrWznrVBzXFNOEMJUfc9+Ke7SHWoAZsiMkNP3vq6Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chokidar": "^3.5.2", + "debug": "^4", + "ignore-by-default": "^1.0.1", + "minimatch": "^10.2.1", + "pstree.remy": "^1.1.8", + "semver": "^7.5.3", + "simple-update-notifier": "^2.0.0", + "supports-color": "^5.5.0", + "touch": "^3.1.0", + "undefsafe": "^2.0.5" + }, + "bin": { + "nodemon": "bin/nodemon.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/nodemon" + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmmirror.com/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmmirror.com/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, + "node_modules/only": { + "version": "0.0.2", + "resolved": "https://registry.npmmirror.com/only/-/only-0.0.2.tgz", + "integrity": "sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==" + }, + "node_modules/openai": { + "version": "6.38.0", + "resolved": "https://registry.npmmirror.com/openai/-/openai-6.38.0.tgz", + "integrity": "sha512-AoMplt2UalrpgUDMh3L09QWjNRlgJPipclQvA6sYAaeF6nHNBMgmikAZGmcYLn8on4d9sQY9Q8bOLfrBS7Lc8g==", + "license": "Apache-2.0", + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "ws": "^8.18.0", + "zod": "^3.25 || ^4.0" + }, + "peerDependenciesMeta": { + "ws": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/openapi-types": { + "version": "12.1.3", + "resolved": "https://registry.npmmirror.com/openapi-types/-/openapi-types-12.1.3.tgz", + "integrity": "sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==", + "license": "MIT" + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==", + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmmirror.com/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "license": "MIT", + "dependencies": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-retry": { + "version": "7.1.1", + "resolved": "https://registry.npmmirror.com/p-retry/-/p-retry-7.1.1.tgz", + "integrity": "sha512-J5ApzjyRkkf601HpEeykoiCvzHQjWxPAHhyjFcEUP2SWq0+35NKh8TLhpLw+Dkq5TZBFvUM6UigdE9hIVYTl5w==", + "license": "MIT", + "dependencies": { + "is-network-error": "^1.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmmirror.com/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "license": "MIT", + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "license": "MIT" + }, + "node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pstree.remy": { + "version": "1.1.8", + "resolved": "https://registry.npmmirror.com/pstree.remy/-/pstree.remy-1.1.8.tgz", + "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==", + "dev": true, + "license": "MIT" + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmmirror.com/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/qs": { + "version": "6.15.2", + "resolved": "https://registry.npmmirror.com/qs/-/qs-6.15.2.tgz", + "integrity": "sha512-Rzq0KEyX/w/tEybncDgdkZrJgVUsUMk3xjh3t5bv3S1HTAtg+uOYt72+ZfwiQwKdysThkTBdL/rTi6HDmX9Ddw==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmmirror.com/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/raw-body": { + "version": "2.5.3", + "resolved": "https://registry.npmmirror.com/raw-body/-/raw-body-2.5.3.tgz", + "integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.4.24", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/raw-body/node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmmirror.com/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/raw-body/node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmmirror.com/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.0", + "resolved": "https://registry.npmmirror.com/semver/-/semver-7.8.0.tgz", + "integrity": "sha512-AcM7dV/5ul4EekoQ29Agm5vri8JNqRyj39o0qpX6vDF2GZrtutZl5RwgD1XnZjiTAfncsJhMI48QQH3sN87YNA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "license": "ISC" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmmirror.com/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/side-channel-list/-/side-channel-list-1.0.1.tgz", + "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/sift": { + "version": "17.1.3", + "resolved": "https://registry.npmmirror.com/sift/-/sift-17.1.3.tgz", + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==", + "license": "MIT" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "license": "ISC" + }, + "node_modules/simple-update-notifier": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", + "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmmirror.com/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "license": "MIT", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmmirror.com/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/standardwebhooks": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/standardwebhooks/-/standardwebhooks-1.0.0.tgz", + "integrity": "sha512-BbHGOQK9olHPMvQNHWul6MYlrRTAOKn03rOe4A8O3CLWhNf4YHBqq2HJKKC+sfqpxiBY52pNeesD6jIiLDz8jg==", + "license": "MIT", + "dependencies": { + "@stablelib/base64": "^1.0.0", + "fast-sha256": "^1.3.0" + } + }, + "node_modules/statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmmirror.com/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmmirror.com/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/touch": { + "version": "3.1.1", + "resolved": "https://registry.npmmirror.com/touch/-/touch-3.1.1.tgz", + "integrity": "sha512-r0eojU4bI8MnHr8c5bNo7lJDdI2qXlWWJk6a9EAFG7vbhTjElYhBVS3/miuE0uOuoLdb8Mc/rVfsmm6eo5o9GA==", + "dev": true, + "license": "ISC", + "bin": { + "nodetouch": "bin/nodetouch.js" + } + }, + "node_modules/tr46": { + "version": "5.1.1", + "resolved": "https://registry.npmmirror.com/tr46/-/tr46-5.1.1.tgz", + "integrity": "sha512-hdF5ZgjTqgAntKkklYw0R03MG2x/bSzTtkxmIRw/sTNV8YXsCJ1tfLAX23lhxhHJlEf3CRCOCGGWw3vI3GaSPw==", + "license": "MIT", + "dependencies": { + "punycode": "^2.3.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmmirror.com/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/ts-algebra": { + "version": "2.0.0", + "resolved": "https://registry.npmmirror.com/ts-algebra/-/ts-algebra-2.0.0.tgz", + "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==", + "license": "MIT" + }, + "node_modules/tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmmirror.com/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", + "license": "MIT", + "engines": { + "node": ">=0.6.x" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmmirror.com/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "license": "MIT", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmmirror.com/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/undefsafe": { + "version": "2.0.5", + "resolved": "https://registry.npmmirror.com/undefsafe/-/undefsafe-2.0.5.tgz", + "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utf-8-validate": { + "version": "6.0.6", + "resolved": "https://registry.npmmirror.com/utf-8-validate/-/utf-8-validate-6.0.6.tgz", + "integrity": "sha512-q3l3P9UtEEiAHcsgsqTgf9PPjctrDWoIXW3NpOHFdRDbLvu4DLIcxHangJ4RLrWkBcKjmcs/6NkerI8T/rE4LA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/uuid": { + "version": "14.0.0", + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-14.0.0.tgz", + "integrity": "sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmmirror.com/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + } + }, + "node_modules/whatwg-url": { + "version": "14.2.0", + "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-14.2.0.tgz", + "integrity": "sha512-De72GdQZzNTUBBChsXueQUnPKDkg/5A5zp7pFDuQAj5UFoENpiACU0wlCvzpAGnTkj++ihpKwKyYewn/XNUbKw==", + "license": "MIT", + "dependencies": { + "tr46": "^5.1.0", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/winston": { + "version": "3.19.0", + "resolved": "https://registry.npmmirror.com/winston/-/winston-3.19.0.tgz", + "integrity": "sha512-LZNJgPzfKR+/J3cHkxcpHKpKKvGfDZVPS4hfJCc4cCG0CgYzvlD6yE/S3CIL/Yt91ak327YCpiF/0MyeZHEHKA==", + "license": "MIT", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.8", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.7.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.9.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.9.0", + "resolved": "https://registry.npmmirror.com/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", + "dependencies": { + "logform": "^2.7.0", + "readable-stream": "^3.6.2", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmmirror.com/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.21.0", + "resolved": "https://registry.npmmirror.com/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.9.0", + "resolved": "https://registry.npmmirror.com/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/ylru": { + "version": "1.4.0", + "resolved": "https://registry.npmmirror.com/ylru/-/ylru-1.4.0.tgz", + "integrity": "sha512-2OQsPNEmBCvXuFlIni/a+Rn+R2pHW9INm0BxXJ4hVDA8TirqMj+J/Rp9ItLatT/5pZqWwefVrTQcHpixsxnVlA==", + "license": "MIT", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/zod": { + "version": "4.4.3", + "resolved": "https://registry.npmmirror.com/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..95015af --- /dev/null +++ b/package.json @@ -0,0 +1,42 @@ +{ + "name": "attendant-api", + "version": "1.0.0", + "description": "值班助手小程序 RESTful API 服务", + "type": "module", + "main": "app.js", + "scripts": { + "start": "node index.js", + "dev": "nodemon index.js" + }, + "dependencies": { + "@langchain/anthropic": "^1.4.0", + "@langchain/community": "^1.1.28", + "@langchain/core": "^1.1.48", + "@langchain/deepseek": "^1.0.27", + "@langchain/langgraph": "^1.3.2", + "@langchain/openai": "^1.4.7", + "@langchain/tavily": "^1.2.0", + "bcrypt": "^5.1.1", + "deepagents": "^1.10.2", + "dotenv": "^17.4.2", + "koa": "^2.16.4", + "koa-bodyparser": "^4.4.1", + "koa-cors": "^0.0.16", + "koa-router": "^12.0.1", + "langchain": "^1.4.2", + "lodash": "^4.18.1", + "moment": "^2.30.1", + "mongoose": "^8.24.0", + "node-fetch": "^3.3.2", + "winston": "^3.19.0", + "ws": "^8.21.0", + "zod": "^4.4.3" + }, + "devDependencies": { + "nodemon": "^3.0.2" + }, + "optionalDependencies": { + "bufferutil": "^4.1.0", + "utf-8-validate": "^6.0.6" + } +} diff --git a/resource/services.js b/resource/services.js new file mode 100644 index 0000000..b4d784b --- /dev/null +++ b/resource/services.js @@ -0,0 +1,284 @@ +const services = [ + { + id: 1, + title: '全天陪诊', + subtitle: '八小时服务/次,专业陪诊师全程陪同', + price: '499.00', + image: '/images/pz1.jpg', + tag: '热门', + description: '全天陪诊服务提供8小时的专业陪诊服务,陪诊师将全程陪同您完成就医流程。包括挂号、候诊、就诊、检查、取药等环节的协助与引导。我们的陪诊师均经过专业培训,熟悉各大医院流程,能够有效缩短就医时间,提升就医体验。', + flow: [{ + title: '在线预约', + desc: '选择服务类型,填写就诊信息,提交订单' + }, + { + title: '电话确认', + desc: '客服人员将在30分钟内与您电话确认订单详情' + }, + { + title: '分配陪诊师', + desc: '根据您的就诊医院和时间,匹配专业陪诊师' + }, + { + title: '医院集合', + desc: '陪诊师按约定时间在医院指定地点与您会合' + }, + { + title: '全程陪诊', + desc: '陪诊师协助完成挂号、就诊、检查、取药等流程' + }, + { + title: '服务完成', + desc: '确认服务完成,可对陪诊师进行评价' + } + ], + notices: [ + '服务时长为8小时,超出时间按每小时50元计费', + '请提前1天预约,紧急订单需额外支付加急费', + '如需取消订单,请提前4小时联系客服', + '服务不包含挂号费、检查费、药费等医疗费用' + ] + }, + { + id: 2, + title: '半天陪诊', + subtitle: '四小时服务/次,适合简单就诊', + price: '298.00', + image: '/images/pz1.jpg', + tag: '', + description: '半天陪诊服务提供4小时的专业陪诊服务,适合就诊流程相对简单的客户。陪诊师将协助您完成挂号、就诊、简单检查及取药等环节,让您的就医过程更加顺畅。', + flow: [{ + title: '在线预约', + desc: '选择服务类型,填写就诊信息,提交订单' + }, + { + title: '电话确认', + desc: '客服人员将在30分钟内与您电话确认订单详情' + }, + { + title: '分配陪诊师', + desc: '根据您的就诊医院和时间,匹配专业陪诊师' + }, + { + title: '医院集合', + desc: '陪诊师按约定时间在医院指定地点与您会合' + }, + { + title: '全程陪诊', + desc: '陪诊师协助完成挂号、就诊、检查、取药等流程' + }, + { + title: '服务完成', + desc: '确认服务完成,可对陪诊师进行评价' + } + ], + notices: [ + '服务时长为4小时,超出时间按每小时50元计费', + '请提前1天预约,紧急订单需额外支付加急费', + '如需取消订单,请提前4小时联系客服', + '服务不包含挂号费、检查费、药费等医疗费用' + ] + }, + { + id: 3, + title: '2小时陪诊', + subtitle: '2小时陪诊,超时需加钟', + price: '198.00', + image: '/images/pz1.jpg', + tag: '', + description: '2小时陪诊服务适合仅需简单协助的客户,如单次就诊或简单取药。陪诊师将在约定时间内提供专业的陪诊服务,帮助您高效完成就医流程。', + flow: [{ + title: '在线预约', + desc: '选择服务类型,填写就诊信息,提交订单' + }, + { + title: '电话确认', + desc: '客服人员将在30分钟内与您电话确认订单详情' + }, + { + title: '分配陪诊师', + desc: '根据您的就诊医院和时间,匹配专业陪诊师' + }, + { + title: '医院集合', + desc: '陪诊师按约定时间在医院指定地点与您会合' + }, + { + title: '全程陪诊', + desc: '陪诊师协助完成挂号、就诊、检查、取药等流程' + }, + { + title: '服务完成', + desc: '确认服务完成,可对陪诊师进行评价' + } + ], + notices: [ + '服务时长为2小时,超出时间按每小时50元计费', + '请提前1天预约,紧急订单需额外支付加急费', + '如需取消订单,请提前4小时联系客服', + '服务不包含挂号费、检查费、药费等医疗费用' + ] + }, + { + id: 4, + title: '代问诊', + subtitle: '代您到医院与医生进行问诊', + price: '268.00', + image: '/images/wz1.jpg', + tag: '', + description: '代问诊服务适用于无法亲自到医院的客户。我们的陪诊师将携带您的病历资料,代您与医生进行面诊,详细记录医生的诊断意见和用药建议,并及时反馈给您。', + flow: [{ + title: '在线预约', + desc: '选择代问诊服务,填写就诊信息和病史' + }, + { + title: '资料准备', + desc: '将病历、检查报告等资料拍照上传或快递给陪诊师' + }, + { + title: '电话确认', + desc: '客服确认资料完整性和就诊需求' + }, + { + title: '代问诊', + desc: '陪诊师携带资料到医院代您问诊' + }, + { + title: '结果反馈', + desc: '陪诊师将医生诊断意见和用药建议详细反馈给您' + }, + { + title: '服务完成', + desc: '确认服务完成,可对陪诊师进行评价' + } + ], + notices: [ + '请确保提供的病历资料真实完整', + '代问诊不包含挂号费和药费', + '部分医院可能要求患者本人到场,请提前确认', + '陪诊师会详细记录医嘱,但不提供医疗建议' + ] + }, + { + id: 5, + title: '检查预约', + subtitle: '磁共振预约、CT预约、彩超等其他预约', + price: '238.00', + image: '/images/qbg1.jpg', + tag: '', + description: '检查预约服务帮助您预约各类医学检查,包括核磁共振(MRI)、CT、彩超、胃镜等。我们熟悉各大医院的预约流程,能够帮您快速预约到合适的检查时间,避免长时间等待。', + flow: [{ + title: '在线预约', + desc: '选择检查预约服务,填写检查类型和期望时间' + }, + { + title: '资料审核', + desc: '上传医生开具的检查申请单' + }, + { + title: '预约办理', + desc: '工作人员代为联系医院预约检查时间' + }, + { + title: '确认通知', + desc: '将预约成功的具体时间通知您' + }, + { + title: '现场协助', + desc: '如需,可额外购买陪诊服务协助检查' + }, + { + title: '服务完成', + desc: '确认服务完成' + } + ], + notices: [ + '需要提供医生开具的检查申请单', + '部分检查项目有特殊的身体准备要求,请提前了解', + '预约成功后如需改期,请提前24小时联系', + '服务费用不包含检查费用' + ] + }, + { + id: 6, + title: '出入院代办', + subtitle: '出入院手续代办', + price: '198.00', + image: '/images/yy.jpg', + tag: '', + description: '出入院代办服务帮助您办理医院的入院和出院手续。包括床位预约、入院登记、医保手续办理、出院结算等,让您或家人能够更专注于治疗本身。', + flow: [{ + title: '在线预约', + desc: '选择出入院代办服务,填写相关信息' + }, + { + title: '资料准备', + desc: '准备身份证、医保卡、押金等相关资料' + }, + { + title: '电话确认', + desc: '客服确认代办事项和所需资料' + }, + { + title: '代办服务', + desc: '工作人员代为办理出入院手续' + }, + { + title: '结果反馈', + desc: '将办理结果和相关单据反馈给您' + }, + { + title: '服务完成', + desc: '确认服务完成' + } + ], + notices: [ + '需要提供患者身份证、医保卡等证件', + '入院代办需提前了解医院床位情况', + '服务费用不包含住院押金和医疗费用', + '部分手续可能需要患者本人签字' + ] + }, + { + id: 7, + title: '送/取/买/跑腿等服务', + subtitle: '排队/买药/取报告等一小时陪诊服务', + price: '158.00', + image: '/images/pt.jpg', + tag: '', + description: '跑腿服务提供各类医院相关代办事项,包括代排队、代买药、代取报告、代送标本等。适合工作繁忙或行动不便的客户,让您足不出户即可完成医院相关事务。', + flow: [{ + title: '在线预约', + desc: '选择跑腿服务,填写具体代办事项' + }, + { + title: '电话确认', + desc: '客服确认代办细节和所需材料' + }, + { + title: '材料交接', + desc: '通过快递或约定地点交接所需材料' + }, + { + title: '代办服务', + desc: '工作人员按约定完成代办事项' + }, + { + title: '结果交付', + desc: '将办理结果通过快递或约定方式交付' + }, + { + title: '服务完成', + desc: '确认服务完成' + } + ], + notices: [ + '请详细说明代办事项和特殊要求', + '需要提供办理所需的相关证件和材料', + '服务时长为1小时,超出按每小时50元计费', + '服务费用不包含药品费、检查费等费用' + ] + } +] + +export default services; diff --git a/routes/index.js b/routes/index.js new file mode 100644 index 0000000..39441e6 --- /dev/null +++ b/routes/index.js @@ -0,0 +1,38 @@ +import Router from "koa-router"; +import { HandlerEscortRecord } from "../handler/escort_record.js"; +import { HandlerResource } from "../handler/resource.js"; + +function printRoutes(stack) { + for (const layer of stack) { + if (layer.path) { + const methods = layer.methods.filter(m => m !== '_all'); + methods.forEach(m => console.log(` [${m.toUpperCase()}] ${layer.path}`)); + } + } +} + +function registerRoutes(app) { + const router = new Router({ prefix: '/health' }); + + const handlerEscortRecord = new HandlerEscortRecord(); + const handlerResource = new HandlerResource(); + + router.get("/escort-record/my", handlerEscortRecord.getMyRecords.bind(handlerEscortRecord)); + router.get("/escort-record/attendant", handlerEscortRecord.getAttendantRecords.bind(handlerEscortRecord)); + router.get("/escort-record/:id", handlerEscortRecord.getRecordById.bind(handlerEscortRecord)); + router.post("/escort-record", handlerEscortRecord.createRecord.bind(handlerEscortRecord)); + router.put("/escort-record/:id", handlerEscortRecord.updateRecord.bind(handlerEscortRecord)); + router.patch("/escort-record/:id/status", handlerEscortRecord.updateStatus.bind(handlerEscortRecord)); + + router.get("/service", handlerResource.getServices.bind(handlerResource)); + + app.use(router.routes()); + app.use(router.allowedMethods()); + + console.log('API Routes:'); + printRoutes(router.stack); + + return router; +} + +export default registerRoutes; \ No newline at end of file diff --git a/utils/authToken.js b/utils/authToken.js new file mode 100644 index 0000000..49ef726 --- /dev/null +++ b/utils/authToken.js @@ -0,0 +1,138 @@ +"use strict"; + +import crypto from "crypto" +import logger from './logger.js' + +function AuthToken() { +} + +AuthToken.prototype.init = function (redisdb, defaultExpiresSeconds) { + this.tokenDB = redisdb; + this.defaultExpiresSeconds = defaultExpiresSeconds; +} + +AuthToken.prototype.gen = async function (uid, tokenOld) { + let userToken = tokenOld; + + try { + let tokenData = await this.tokenDB.get(userToken).then(function (data) { + return JSON.parse(data); + }); + if (!tokenData) { + if (!userToken || userToken.length <= 16) { + let hash = crypto.createHash("md5"); + hash.update(uid + Date() + Math.random()); + userToken = hash.digest("hex"); + } + + tokenData = { + uid, + token: userToken, + ts: Math.floor(Date.now() / 1000), + ttl: this.defaultExpiresSeconds, + }; + } + + this.tokenDB.set(userToken, JSON.stringify(tokenData), "EX", this.defaultExpiresSeconds); + } catch (err) { + logger.error('生成Token失败:', { error: err.message, uid, stack: err.stack }); + } + + return userToken; +}; + +AuthToken.prototype.update = async function (userToken) { + try { + let tokenData = await this.tokenDB.get(userToken).then(function (data) { + return JSON.parse(data); + }); + + if (tokenData) { + this.tokenDB.set(userToken, JSON.stringify(tokenData), "EX", this.defaultExpiresSeconds); + return tokenData; + } + } catch (err) { + logger.error('更新Token失败:', { error: err.message, stack: err.stack }); + } + + return null; +}; + +AuthToken.prototype.del = async function (userToken) { + let tokenData = await this.tokenDB.get(userToken).then(function (data) { + return JSON.parse(data); + }); + + if (tokenData) { + this.tokenDB.del(userToken); + } + + return tokenData; +}; + +AuthToken.prototype.check = async function (userToken, updateExpire = true) { + try { + if (updateExpire) { + if (await this.tokenDB.expire(userToken, this.defaultExpiresSeconds) >= 1) { + return true; + } + } else { + if (await this.tokenDB.exists([userToken]) >= 1) { + return true; + } + } + } catch (err) { + logger.error('检查Token失败:', { error: err.message, userToken, stack: err.stack }); + } + return false; +}; + +AuthToken.prototype.get = async function (token) { + let tokenData = await this.tokenDB.get(token).then(function (data) { + return JSON.parse(data); + }); + + if (!tokenData) { + return null; + } + + return tokenData; +}; + +AuthToken.prototype.koaRequest = async function (ctx, next) { + try { + let token = ctx.request.body.token; + + if (!token) token = ctx.request.query.token; + if (!token) token = ctx.header["authorization"]; + if (!token) token = ctx.header["token"]; + + if (!token) { + throw new Error("Need token param."); + } + + let ret = await this.check(token); + if (!ret) { + throw new Error("User not login in."); + } + + let tokenData = await this.get(token); + if (tokenData && tokenData.uid) { + const { DBModel } = await import("../models/index.js"); + const user = await DBModel.User.findOne({ _id: tokenData.uid }); + if (user) { + ctx.userInfo = user; + } + } + + ctx.authToken = this; + + return next(); + } catch (err) { + logger.error('身份验证失败:', { error: err.message, token: ctx.request.body.token || ctx.request.query.token || ctx.header["authorization"] || ctx.header["token"], stack: err.stack }); + throw err; + } + }; + +const Token = new AuthToken() +export { Token } \ No newline at end of file diff --git a/utils/logger.js b/utils/logger.js new file mode 100644 index 0000000..49f79db --- /dev/null +++ b/utils/logger.js @@ -0,0 +1,48 @@ +import fs from 'fs'; +import path from 'path'; + +const logDir = path.join(process.cwd(), 'logs'); +if (!fs.existsSync(logDir)) { + fs.mkdirSync(logDir, { recursive: true }); +} + +const LEVELS = { + ERROR: 'ERROR', + WARN: 'WARN', + INFO: 'INFO', + DEBUG: 'DEBUG' +}; + +const getCurrentTimestamp = () => { + return new Date().toISOString(); +}; + +const writeLog = (level, message, meta = {}) => { + const timestamp = getCurrentTimestamp(); + const logEntry = { + timestamp, + level, + message, + meta + }; + + console.log(`[${timestamp}] ${level}: ${message}`, meta); + + const logFileName = `${new Date().toISOString().slice(0, 10)}.log`; + const logFilePath = path.join(logDir, logFileName); + + fs.appendFile(logFilePath, JSON.stringify(logEntry) + '\n', (err) => { + if (err) { + console.error('Failed to write log to file:', err); + } + }); +}; + +const logger = { + error: (message, meta) => writeLog(LEVELS.ERROR, message, meta), + warn: (message, meta) => writeLog(LEVELS.WARN, message, meta), + info: (message, meta) => writeLog(LEVELS.INFO, message, meta), + debug: (message, meta) => writeLog(LEVELS.DEBUG, message, meta) +}; + +export default logger; \ No newline at end of file diff --git a/utils/passwdCrypto.js b/utils/passwdCrypto.js new file mode 100644 index 0000000..370ab03 --- /dev/null +++ b/utils/passwdCrypto.js @@ -0,0 +1,13 @@ +import bcrypt from 'bcrypt'; + +const SALT_ROUNDS = 10; + +function hash(text) { + return bcrypt.hash(text, SALT_ROUNDS); +} + +function compare(text, hash) { + return bcrypt.compare(text, hash); +} + +export default { hash, compare } \ No newline at end of file diff --git a/utils/responseUtil.js b/utils/responseUtil.js new file mode 100644 index 0000000..d4162c8 --- /dev/null +++ b/utils/responseUtil.js @@ -0,0 +1,85 @@ +/** + * 响应工具类 + * 提供统一的响应格式 + */ +class ResponseUtil { + /** + * 成功响应 + * @param {Object} ctx - Koa上下文对象 + * @param {Object} data - 响应数据 + * @param {string} message - 响应消息 + */ + static success(ctx, data, message = '操作成功') { + ctx.status = 200; + ctx.body = { + code: 0, + msg: message, + data, + ts: Date.now() + }; + } + + /** + * 错误响应 + * @param {Object} ctx - Koa上下文对象 + * @param {string} message - 错误消息 + * @param {number} errorCode - 应用错误码 + */ + static error(ctx, message, data = null, errorCode = 500) { + // 根据规则,只要进入controller,http状态码都是200 + ctx.status = 200; + ctx.body = { + code: errorCode, + msg: message, + data, + ts: Date.now() + }; + } + + /** + * 请求参数错误响应 + * @param {Object} ctx - Koa上下文对象 + * @param {string} message - 错误消息 + */ + static badRequest(ctx, message = '请求参数错误', data = null) { + return ResponseUtil.error(ctx, message, data, 400); + } + + /** + * 未授权响应 + * @param {Object} ctx - Koa上下文对象 + * @param {string} message - 错误消息 + */ + static unauthorized(ctx, message = '未授权', data = null) { + return ResponseUtil.error(ctx, message, data, 401); + } + + /** + * 禁止访问响应 + * @param {Object} ctx - Koa上下文对象 + * @param {string} message - 错误消息 + */ + static forbidden(ctx, message = '禁止访问', data = null) { + return ResponseUtil.error(ctx, message, data, 403); + } + + /** + * 资源不存在响应 + * @param {Object} ctx - Koa上下文对象 + * @param {string} message - 错误消息 + */ + static notFound(ctx, message = '资源不存在', data = null) { + return ResponseUtil.error(ctx, message, data, 404); + } + + /** + * 服务器内部错误响应 + * @param {Object} ctx - Koa上下文对象 + * @param {string} message - 错误消息 + */ + static internalError(ctx, message = '服务器内部错误', data = null) { + return ResponseUtil.error(ctx, message, data, 500); + } +} + +export default ResponseUtil; \ No newline at end of file diff --git a/websocket.js b/websocket.js new file mode 100644 index 0000000..81b8d5b --- /dev/null +++ b/websocket.js @@ -0,0 +1,131 @@ +import WebSocket, { WebSocketServer } from 'ws'; +import http from 'http'; +import { DBModel } from "./models/index.js"; +import { chatTask } from "./agent/task.js"; + +export default class WebSocketServerManager { + constructor(port = 8080) { + this.port = port; + this.wss = null; + this.server = null; + } + + start() { + this.server = http.createServer((req, res) => { + res.writeHead(426, { 'Content-Type': 'text/plain' }); + res.end('Upgrade Required: WebSocket expected'); + }); + + this.wss = new WebSocketServer({ + server: this.server, + perMessageDeflate: { + zlibDeflateOptions: { + chunkSize: 1024, + memLevel: 7, + level: 3 + }, + zlibInflateOptions: { + chunkSize: 10 * 1024 + }, + clientNoContextTakeover: true, + serverNoContextTakeover: true, + serverMaxWindowBits: 10, + concurrencyLimit: 10, + threshold: 1024 + } + }); + + this.wss.on('connection', (ws, req) => { + const path = req.url; + console.log(`WebSocket connected: ${req.socket.remoteAddress}, path: ${path}`); + + if (path === '/chat') { + this._handleChatConnection(ws); + } else { + ws.send(JSON.stringify({ type: 'system', content: 'Unknown path' })); + ws.close(1000, 'Unknown path'); + } + }); + + this.server.listen(this.port, () => { + console.log(`WebSocket server started on ws://localhost:${this.port}`); + }); + } + + _handleChatConnection(ws) { + ws.send(JSON.stringify({ type: 'system', content: 'Connected to chat server' })); + + ws.on('message', (data) => this._handleMessage(ws, data)); + + ws.on('close', () => { + console.log('Chat client disconnected'); + }); + + ws.on('error', (err) => { + console.error('WebSocket error:', err); + }); + } + + async _handleMessage(ws, data) { + try { + const raw = data.toString(); + console.log('Received:', raw); + + const msg = JSON.parse(raw); + + if (msg.type === 'ping') { + ws.send(JSON.stringify({ type: 'pong' })); + return; + } + + if (msg.type === 'chat' || msg.type === 'clear') { + const userInfo = await this.getUserInfo(msg.userId); + chatTask.streamChat(userInfo, msg, (source, type, content, id) => { + ws.send(JSON.stringify({ source, type, content, id })); + }); + return; + } + + if (msg.type === 'system') { + console.log('[System]', msg.content); + return; + } + + console.log('[Unknown type]', msg); + } catch (e) { + console.error('Message parse error:', e); + ws.send(JSON.stringify({ type: 'error', content: 'Invalid JSON' })); + } + } + + broadcast(message) { + if (!this.wss) return; + this.wss.clients.forEach((client) => { + if (client.readyState === WebSocket.OPEN) { + client.send(message); + } + }); + } + + stop() { + if (this.wss) { + this.wss.close(); + this.wss = null; + } + if (this.server) { + this.server.close(); + this.server = null; + } + console.log('WebSocket server stopped'); + } + + getClientsCount() { + if (!this.wss) return 0; + return this.wss.clients.size; + } + + async getUserInfo(userId) { + if (!DBModel.User || userId.length === 0) return null; + return await DBModel.User.findById(userId).lean().exec(); + } +}