diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9f8f61d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,41 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + lint-and-typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - run: npm ci + + - name: ESLint + run: npm run lint + + - name: TypeScript + run: npx tsc --noEmit + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: npm + + - run: npm ci + + - name: Unit Tests + run: npm test diff --git a/README.md b/README.md index de8a047..4946b9d 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Interviewers schedule interviews once — the bot handles everything else: resea - **Fully automated interview** — the candidate chats with the bot on Telegram; the bot asks questions, follows up dynamically, and adapts in real time - **Smart evaluation report** — after the interview, a structured report with per-dimension scores and a hire/no-hire recommendation is sent to the interviewer - **Reminders & notifications** — candidate is reminded 15 minutes before, and notified automatically when it's time to start +- **Smart self-introduction analysis** — before the interview begins, the bot collects a self-introduction from the candidate, extracts tech stack and experience via AI, and dynamically adjusts question focus and depth ## Interview Dimensions @@ -94,7 +95,8 @@ The system will automatically collect research and generate questions 2 hours be 1. Send `/start` to the bot first — required so the bot can reach you proactively 2. The bot will notify you when it's time for your interview 3. You can also send `/begin` after the scheduled time to start immediately -4. Just reply in the chat to answer questions +4. The bot will ask for a self-introduction first — your background helps tailor the questions +5. Just reply in the chat to answer questions ## Architecture @@ -107,7 +109,7 @@ src/ ├── parser.ts # Natural language parsing (extract scheduling info) ├── db.ts # SQLite persistence (sql.js) ├── config.ts # Environment variable config -└── types.ts # TypeScript type definitions +└── types.ts # TypeScript type definitions (InterviewPhase, CandidateProfile, etc.) ``` **Stack:** @@ -121,8 +123,8 @@ src/ ## Interview Status Flow ``` -pending → researching → ready → notified → in_progress → completed - ↘ cancelled +pending → researching → ready → notified → intro → in_progress → completed + ↘ cancelled ``` | Status | Description | @@ -131,7 +133,8 @@ pending → researching → ready → notified → in_progress → completed | `researching` | Collecting research and generating questions | | `ready` | Questions ready, waiting for interview time | | `notified` | Candidate notified, waiting for them to start | -| `in_progress` | Interview in progress | +| `intro` | Collecting candidate self-introduction and analyzing background | +| `in_progress` | Interview in progress (questions tailored to candidate's profile) | | `completed` | Interview finished, report sent | | `cancelled` | Cancelled | diff --git a/README.zh.md b/README.zh.md index 20e4eea..cd690d9 100644 --- a/README.zh.md +++ b/README.zh.md @@ -13,6 +13,7 @@ - **全程自动面试**:候选人通过 Telegram 与机器人对话完成面试,支持追问和动态调整 - **智能评估报告**:面试结束后自动生成结构化评估报告,包含各维度评分和录用建议,发送给面试官 - **候选人提醒**:面试前 15 分钟自动提醒候选人,到时间自动发起面试通知 +- **智能自我介绍分析**:面试开始前收集候选人自我介绍,AI 自动提取技术栈和经验背景,动态调整后续提问方向与深度 ## 面试维度 @@ -96,7 +97,8 @@ npm run build && npm start 1. 向机器人发送 `/start` 完成注册(必须,否则机器人无法主动联系) 2. 到预约时间后,机器人会主动发送面试通知 3. 也可在预约时间后主动发送 `/begin` 开始面试 -4. 直接在对话框回复问题即可完成面试 +4. 机器人会先请你做自我介绍——你的背景信息将帮助 AI 定制后续问题 +5. 直接在对话框回复问题即可完成面试 ## 技术架构 @@ -109,7 +111,7 @@ src/ ├── parser.ts # 自然语言解析(提取面试信息) ├── db.ts # SQLite 数据持久化(sql.js) ├── config.ts # 环境变量配置 -└── types.ts # TypeScript 类型定义 +└── types.ts # TypeScript 类型定义(InterviewPhase、CandidateProfile 等) ``` **技术栈:** @@ -123,8 +125,8 @@ src/ ## 面试状态流转 ``` -pending → researching → ready → notified → in_progress → completed - ↘ cancelled +pending → researching → ready → notified → intro → in_progress → completed + ↘ cancelled ``` | 状态 | 说明 | @@ -133,7 +135,8 @@ pending → researching → ready → notified → in_progress → completed | `researching` | 正在收集资料、生成题目 | | `ready` | 题目已就绪,等待面试时间 | | `notified` | 已通知候选人,等待候选人确认开始 | -| `in_progress` | 面试进行中 | +| `intro` | 收集候选人自我介绍,分析背景信息 | +| `in_progress` | 面试进行中(根据候选人背景定制提问) | | `completed` | 面试结束,报告已发送 | | `cancelled` | 已取消 | diff --git a/docs/index.html b/docs/index.html index 498ebfb..63b67ed 100644 --- a/docs/index.html +++ b/docs/index.html @@ -294,17 +294,17 @@

AI Agent 管理员
自动面试助手

面试助手
- 您好,张三!您的面试时间到了。
本次面试时长约 45 分钟,请回复任意内容开始。
+ 您好,张三!我是本次面试的面试官。
本次面试针对「AI Agent 管理员」岗位,时长约 45 分钟。
首先,请您做一段自我介绍吧。
-
好的,我准备好了
+
我有 3 年 AI 相关经验,熟悉 LangChain 和 RAG 架构,之前负责过一个多 Agent 协作平台...
面试助手
- 很好!第一题:请解释 RAG 的工作原理,以及在什么场景下会选择使用它? + 感谢您的介绍!看到您有 LangChain 和多 Agent 平台的经验,非常好。
接下来我们开始正式面试。第一题:请结合您的实践,谈谈 Agent 的 ReAct 模式是如何工作的?
-
RAG 是检索增强生成,通过向量数据库...
+
ReAct 模式是将推理和行动交替进行...
面试助手
- 回答不错!追问:如何评估 RAG 系统的检索质量? + 回答不错!追问:在您的多 Agent 平台中,是如何处理 Agent 之间的协作和冲突的?
@@ -347,6 +347,11 @@

自动提醒通知

身份验证

通过 Telegram 用户名绑定候选人,确保只有指定候选人可参与面试。

+
+
🙋
+

智能自我介绍分析

+

面试开始前收集候选人自我介绍,AI 自动提取技术栈和经验,动态调整后续提问方向与深度。

+
@@ -355,7 +360,7 @@

身份验证

-

六步完成一场面试

+

七步完成一场面试

面试官只需完成第一步,其余由系统自动推进。

@@ -389,15 +394,22 @@

候选人开始面试

5
-

AI 主持面试

-

Claude 按题目顺序提问,根据回答动态追问,全程对话式进行。

+

自我介绍与背景分析

+

AI 自动请候选人做自我介绍,分析技术栈、经验年限和项目亮点,动态调整后续提问策略。

6
-

生成评估报告

-

面试结束后自动生成报告,含综合评分、各维度分析和录用建议,发送给面试官。

+

AI 主持面试

+

根据候选人背景定制提问,动态追问,全程对话式进行。

+
+
+
+
7
+
+

生成评估报告

+

面试结束后自动生成报告,含综合评分、各维度分析和录用建议,发送给面试官。

@@ -560,11 +572,11 @@

启动机器人

hero_sub: '专为招聘「AI Agent 管理员」岗位设计。从预约到评估报告,全程 AI 驱动,无需人工介入。', hero_cta_deploy: '快速部署', hero_cta_source: '查看源码', demo_name: '面试助手', demo_status: '● 在线', - demo_msg1: '您好,张三!您的面试时间到了。
本次面试时长约 45 分钟,请回复任意内容开始。', - demo_reply1: '好的,我准备好了', - demo_msg2: '很好!第一题:请解释 RAG 的工作原理,以及在什么场景下会选择使用它?', - demo_reply2: 'RAG 是检索增强生成,通过向量数据库...', - demo_msg3: '回答不错!追问:如何评估 RAG 系统的检索质量?', + demo_msg1: '您好,张三!我是本次面试的面试官。
本次面试针对「AI Agent 管理员」岗位,时长约 45 分钟。
首先,请您做一段自我介绍吧。', + demo_reply1: '我有 3 年 AI 相关经验,熟悉 LangChain 和 RAG 架构,之前负责过一个多 Agent 协作平台...', + demo_msg2: '感谢您的介绍!看到您有 LangChain 和多 Agent 平台的经验,非常好。
接下来我们开始正式面试。第一题:请结合您的实践,谈谈 Agent 的 ReAct 模式是如何工作的?', + demo_reply2: 'ReAct 模式是将推理和行动交替进行...', + demo_msg3: '回答不错!追问:在您的多 Agent 平台中,是如何处理 Agent 之间的协作和冲突的?', feat_label: '核心功能', feat_title: '从预约到报告,全自动', feat_sub: '面试官只需预约一次,其余全部交给 AI。', feat1_h: '自然语言预约', feat1_p: '直接描述面试信息,Claude 自动提取候选人、时间、时长,无需填表单。', feat2_h: '自动资料收集', feat2_p: '面试前 2 小时,机器人搜索 AI Agent 领域最新动态,生成定制化题目。', @@ -572,13 +584,15 @@

启动机器人

feat4_h: '智能评估报告', feat4_p: '面试结束后自动生成结构化报告,含各维度评分和录用建议。', feat5_h: '自动提醒通知', feat5_p: '面试前 15 分钟提醒候选人,到时间自动发起面试,无需手动操作。', feat6_h: '身份验证', feat6_p: '通过 Telegram 用户名绑定候选人,确保只有指定候选人可参与面试。', - flow_label: '工作流程', flow_title: '六步完成一场面试', flow_sub: '面试官只需完成第一步,其余由系统自动推进。', + feat7_h: '智能自我介绍分析', feat7_p: '面试开始前收集候选人自我介绍,AI 自动提取技术栈和经验,动态调整后续提问方向与深度。', + flow_label: '工作流程', flow_title: '七步完成一场面试', flow_sub: '面试官只需完成第一步,其余由系统自动推进。', flow1_h: '面试官预约', flow1_p: '发送 /schedule 张三 @zhangsan,明天下午3点,45分钟,Claude 解析并确认。', flow2_h: '自动资料收集', flow2_p: '面试前 2 小时,系统搜索 AI Agent 领域最新资料,生成针对性面试题目。', flow3_h: '提醒候选人', flow3_p: '面试前 15 分钟自动发送提醒,到时间发送开始通知。', flow4_h: '候选人开始面试', flow4_p: '候选人回复任意内容或发送 /begin,面试正式开始。', - flow5_h: 'AI 主持面试', flow5_p: 'Claude 按题目顺序提问,根据回答动态追问,全程对话式进行。', - flow6_h: '生成评估报告', flow6_p: '面试结束后自动生成报告,含综合评分、各维度分析和录用建议,发送给面试官。', + flow5_h: '自我介绍与背景分析', flow5_p: 'AI 自动请候选人做自我介绍,分析技术栈、经验年限和项目亮点,动态调整后续提问策略。', + flow6_h: 'AI 主持面试', flow6_p: '根据候选人背景定制提问,动态追问,全程对话式进行。', + flow7_h: '生成评估报告', flow7_p: '面试结束后自动生成报告,含综合评分、各维度分析和录用建议,发送给面试官。', dim_label: '面试维度', dim_title: '四个维度,全面评估', dim_sub: '针对 AI Agent 管理员岗位设计,覆盖技术与业务能力。', dim1_tag: 'AI 基础知识', dim1_h: 'LLM 与 AI 原理', dim1_p: '模型原理、Prompt 工程、RAG、幻觉处理、微调方法(LoRA、RLHF)', dim2_tag: 'Agent 框架', dim2_h: '框架实践经验', dim2_p: 'LangChain、AutoGen、CrewAI、Claude SDK、LlamaIndex 等框架的实际使用经验', @@ -602,11 +616,11 @@

启动机器人

hero_sub: 'Built for hiring AI Agent Administrators. From scheduling to evaluation report — fully automated, no human intervention needed.', hero_cta_deploy: 'Quick Setup', hero_cta_source: 'View Source', demo_name: 'Interview Bot', demo_status: '● Online', - demo_msg1: 'Hi John! Your interview is starting now.
This session is ~45 minutes. Reply anything to begin.', - demo_reply1: "I'm ready, let's go!", - demo_msg2: 'Great! Q1: Explain how RAG works and when you would choose to use it.', - demo_reply2: 'RAG is Retrieval-Augmented Generation, using a vector database...', - demo_msg3: 'Good answer! Follow-up: How do you evaluate retrieval quality in a RAG system?', + demo_msg1: 'Hi John! I\'m your interviewer today.
This interview is for the AI Agent Administrator role, ~45 minutes.
Let\'s start with a self-introduction — tell me about your background and experience.', + demo_reply1: "I have 3 years of AI experience, familiar with LangChain and RAG architecture, previously led a multi-Agent collaboration platform...", + demo_msg2: 'Thanks for the introduction! Great to see your LangChain and multi-Agent experience.
Let\'s begin the formal interview. Q1: Based on your practice, how does the ReAct pattern work in Agents?', + demo_reply2: 'The ReAct pattern alternates between reasoning and action...', + demo_msg3: 'Good answer! Follow-up: In your multi-Agent platform, how did you handle collaboration and conflicts between Agents?', feat_label: 'Features', feat_title: 'Fully automated, end to end', feat_sub: 'Schedule once — the bot handles everything else.', feat1_h: 'Natural Language Scheduling', feat1_p: 'Describe the interview in plain text. Claude extracts candidate, time, and duration automatically.', feat2_h: 'Automated Research', feat2_p: '2 hours before the interview, the bot searches for the latest AI Agent trends and generates tailored questions.', @@ -614,13 +628,15 @@

启动机器人

feat4_h: 'Smart Evaluation Report', feat4_p: 'A structured report with per-dimension scores and a hire/no-hire recommendation is sent to the interviewer.', feat5_h: 'Reminders & Notifications', feat5_p: 'Candidate is reminded 15 minutes before, and notified automatically when it\'s time to start.', feat6_h: 'Identity Verification', feat6_p: 'Candidates are bound by Telegram username — only the designated candidate can participate.', - flow_label: 'How It Works', flow_title: '6 Steps to Complete an Interview', flow_sub: 'The interviewer only handles step 1. The rest is automatic.', + feat7_h: 'Smart Self-Introduction Analysis', feat7_p: 'Collects candidate self-introduction before the interview. AI extracts tech stack and experience to dynamically adjust question focus and depth.', + flow_label: 'How It Works', flow_title: '7 Steps to Complete an Interview', flow_sub: 'The interviewer only handles step 1. The rest is automatic.', flow1_h: 'Interviewer Schedules', flow1_p: 'Send /schedule John @john, tomorrow 3pm, 45 minutes — Claude parses and confirms.', flow2_h: 'Automated Research', flow2_p: '2 hours before, the system searches for the latest AI Agent resources and generates targeted questions.', flow3_h: 'Candidate Reminder', flow3_p: 'A reminder is sent 15 minutes before. A start notification is sent when it\'s time.', flow4_h: 'Candidate Starts', flow4_p: 'The candidate replies to any message or sends /begin to start the interview.', - flow5_h: 'AI Conducts Interview', flow5_p: 'Claude asks questions in order, follows up based on answers, and adapts dynamically.', - flow6_h: 'Evaluation Report Generated', flow6_p: 'After the interview, a report with overall score, per-dimension analysis, and hire recommendation is sent to the interviewer.', + flow5_h: 'Self-Introduction & Background Analysis', flow5_p: 'AI asks the candidate for a self-introduction, analyzes tech stack, experience, and project highlights to tailor the questioning strategy.', + flow6_h: 'AI Conducts Interview', flow6_p: 'Questions are tailored to the candidate\'s background, with dynamic follow-ups throughout.', + flow7_h: 'Evaluation Report Generated', flow7_p: 'After the interview, a report with overall score, per-dimension analysis, and hire recommendation is sent to the interviewer.', dim_label: 'Interview Dimensions', dim_title: '4 Dimensions, Comprehensive Evaluation', dim_sub: 'Designed for the AI Agent Administrator role — covering both technical and business skills.', dim1_tag: 'AI Fundamentals', dim1_h: 'LLM & AI Principles', dim1_p: 'Model principles, prompt engineering, RAG, hallucination mitigation, fine-tuning (LoRA, RLHF)', dim2_tag: 'Agent Frameworks', dim2_h: 'Framework Experience', dim2_p: 'Hands-on experience with LangChain, AutoGen, CrewAI, Claude SDK, LlamaIndex, and more', diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..b0351e8 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,30 @@ +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; + +export default tseslint.config( + eslint.configs.recommended, + ...tseslint.configs.recommended, + { + languageOptions: { + parserOptions: { + projectService: { + defaultProject: 'tsconfig.test.json', + allowDefaultProject: ['tests/*.test.ts'], + }, + tsconfigRootDir: import.meta.dirname, + }, + }, + rules: { + '@typescript-eslint/no-unused-vars': ['error', { + argsIgnorePattern: '^_', + varsIgnorePattern: '^_', + }], + '@typescript-eslint/no-explicit-any': 'warn', + '@typescript-eslint/consistent-type-imports': 'error', + 'no-console': 'off', + }, + }, + { + ignores: ['dist/', 'docs/', 'node_modules/', '*.js'], + }, +); diff --git a/package-lock.json b/package-lock.json index 2153418..4727d1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,10 +18,15 @@ "undici": "^7.22.0" }, "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/eslint__js": "^8.42.3", "@types/node": "^20.11.0", "@types/node-cron": "^3.0.11", + "eslint": "^10.0.2", "tsx": "^4.7.0", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "typescript-eslint": "^8.56.1", + "vitest": "^4.0.18" } }, "node_modules/@anthropic-ai/sdk": { @@ -495,28 +500,975 @@ "node": ">=18" } }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.9.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", + "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.2.tgz", + "integrity": "sha512-YF+fE6LV4v5MGWRGj7G404/OZzGNepVF8fxk7jqmqo3lrza7a0uUcDnROGRBG1WFC1omYUS/Wp1f42i0M+3Q3A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^3.0.2", + "debug": "^4.3.1", + "minimatch": "^10.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.2.tgz", + "integrity": "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/core": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz", + "integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/js": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-10.0.1.tgz", + "integrity": "sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "eslint": "^10.0.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/@eslint/object-schema": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.2.tgz", + "integrity": "sha512-HOy56KJt48Bx8KmJ+XGQNSUMT/6dZee/M54XyUyuvTvPXJmsERRvBchsUVx1UMe1WwIH49XLAczNC7V2INsuUw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.0.tgz", + "integrity": "sha512-bIZEUzOI1jkhviX2cp5vNyXQc6olzb2ohewQubuYlMXZ2Q/XjBO0x0XhGPvc9fjSIiUN0vw+0hq53BJ4eQSJKQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^1.1.0", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, "node_modules/@grammyjs/types": { "version": "3.24.0", "resolved": "https://registry.npmjs.org/@grammyjs/types/-/types-3.24.0.tgz", "integrity": "sha512-qQIEs4lN5WqUdr4aT8MeU6UFpMbGYAvcvYSW1A4OO1PABGJQHz/KLON6qvpf+5RxaNDQBxiY2k2otIhg/AG7RQ==", "license": "MIT" }, - "node_modules/@types/node": { - "version": "20.19.35", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.35.tgz", - "integrity": "sha512-Uarfe6J91b9HAUXxjvSOdiO2UPOKLm07Q1oh0JHxoZ1y8HoqxDAu3gVrsrOHeiio0kSsoVBt4wFrKOm0dKxVPQ==", + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.4.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/eslint": "*" + } + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "20.19.35", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.35.tgz", + "integrity": "sha512-Uarfe6J91b9HAUXxjvSOdiO2UPOKLm07Q1oh0JHxoZ1y8HoqxDAu3gVrsrOHeiio0kSsoVBt4wFrKOm0dKxVPQ==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/node-cron": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@types/node-cron/-/node-cron-3.0.11.tgz", + "integrity": "sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.56.1.tgz", + "integrity": "sha512-Jz9ZztpB37dNC+HU2HI28Bs9QXpzCz+y/twHOwhyrIRdbuVDxSytJNDl6z/aAKlaRIwC7y8wJdkBv7FxYGgi0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.12.2", + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/type-utils": "8.56.1", + "@typescript-eslint/utils": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "ignore": "^7.0.5", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.56.1", + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.56.1.tgz", + "integrity": "sha512-klQbnPAAiGYFyI02+znpBRLyjL4/BrBd0nyWkdC0s/6xFLkXYQ8OoRrSkqacS1ddVxf/LDyODIKbQ5TgKAf/Fg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.56.1.tgz", + "integrity": "sha512-TAdqQTzHNNvlVFfR+hu2PDJrURiwKsUvxFn1M0h95BB8ah5jejas08jUWG4dBA68jDMI988IvtfdAI53JzEHOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.56.1", + "@typescript-eslint/types": "^8.56.1", + "debug": "^4.4.3" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.56.1.tgz", + "integrity": "sha512-YAi4VDKcIZp0O4tz/haYKhmIDZFEUPOreKbfdAN3SzUDMcPhJ8QI99xQXqX+HoUVq8cs85eRKnD+rne2UAnj2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.56.1.tgz", + "integrity": "sha512-qOtCYzKEeyr3aR9f28mPJqBty7+DBqsdd63eO0yyDwc6vgThj2UjWfJIcsFeSucYydqcuudMOprZ+x1SpF3ZuQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.56.1.tgz", + "integrity": "sha512-yB/7dxi7MgTtGhZdaHCemf7PuwrHMenHjmzgUW1aJpO+bBU43OycnM3Wn+DdvDO/8zzA9HlhaJ0AUGuvri4oGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/utils": "8.56.1", + "debug": "^4.4.3", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", + "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.56.1.tgz", + "integrity": "sha512-qzUL1qgalIvKWAf9C1HpvBjif+Vm6rcT5wZd4VoMb9+Km3iS3Cv9DY6dMRMDtPnwRAFyAi7YXJpTIEXLvdfPxg==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~6.21.0" + "@typescript-eslint/project-service": "8.56.1", + "@typescript-eslint/tsconfig-utils": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/visitor-keys": "8.56.1", + "debug": "^4.4.3", + "minimatch": "^10.2.2", + "semver": "^7.7.3", + "tinyglobby": "^0.2.15", + "ts-api-utils": "^2.4.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" } }, - "node_modules/@types/node-cron": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@types/node-cron/-/node-cron-3.0.11.tgz", - "integrity": "sha512-0ikrnug3/IyneSHqCBeslAhlK2aBfYek1fGo4bP4QnZPmiqSGRK+Oy7ZMisLWkesffJvQ1cqAcBnJC+8+nxIAg==", + "node_modules/@typescript-eslint/utils": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.56.1.tgz", + "integrity": "sha512-HPAVNIME3tABJ61siYlHzSWCGtOoeP2RTIaHXFMPqjrQKCGB9OgUVdiNgH7TJS2JNIQ5qQ4RsAUDuGaGme/KOA==", "dev": true, - "license": "MIT" + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.56.1", + "@typescript-eslint/types": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.56.1.tgz", + "integrity": "sha512-KiROIzYdEV85YygXw6BI/Dx4fnBlFQu6Mq4QE4MOH9fFnhohw6wX/OAvDY2/C+ut0I3RSPKenvZJIVYqJNkhEw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.56.1", + "eslint-visitor-keys": "^5.0.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@vitest/expect": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.0.18.tgz", + "integrity": "sha512-8sCWUyckXXYvx4opfzVY03EOiYVxyNrHS5QxX3DAIi5dpJAAkyJezHCP77VMX4HKA2LDT/Jpfo8i2r5BE3GnQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.0.18", + "@vitest/utils": "4.0.18", + "chai": "^6.2.1", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.0.18.tgz", + "integrity": "sha512-HhVd0MDnzzsgevnOWCBj5Otnzobjy5wLBe4EdeeFGv8luMsGcYqDuFRMcttKWZA5vVO8RFjexVovXvAM4JoJDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.0.18", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.0.18.tgz", + "integrity": "sha512-P24GK3GulZWC5tz87ux0m8OADrQIUVDPIjjj65vBXYG17ZeU3qD7r+MNZ1RNv4l8CGU2vtTRqixrOi9fYk/yKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.0.18.tgz", + "integrity": "sha512-rpk9y12PGa22Jg6g5M3UVVnTS7+zycIGk9ZNGN+m6tZHKQb7jrP7/77WfZy13Y/EUDd52NDsLRQhYKtv7XfPQw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.0.18", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.0.18.tgz", + "integrity": "sha512-PCiV0rcl7jKQjbgYqjtakly6T1uwv/5BQ9SwBLekVg/EaYeQFPiXcgrC2Y7vDMA8dM1SUEAEV82kgSQIlXNMvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.0.18", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.0.18.tgz", + "integrity": "sha512-cbQt3PTSD7P2OARdVW3qWER5EGq7PHlvE+QfzSC0lbwO+xnt7+XH06ZzFjFRgzUX//JmpxrCu92VdwvEPlWSNw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.0.18.tgz", + "integrity": "sha512-msMRKLMVLWygpK3u2Hybgi4MNjcYJvwTb0Ru09+fOyCXIgT5raYP041DRRdiJiI3k/2U6SEbAETB3YtBrUkCFA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.0.18", + "tinyrainbow": "^3.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } }, "node_modules/abort-controller": { "version": "3.0.0", @@ -530,6 +1482,30 @@ "node": ">=6.5" } }, + "node_modules/acorn": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", + "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/agent-base": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", @@ -539,6 +1515,81 @@ "node": ">= 14" } }, + "node_modules/ajv": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.14.0.tgz", + "integrity": "sha512-IWrosm/yrn43eiKqkfkHis7QioDleaXQHdDVPKg0FSwwd/DuvyX79TZnFOnYpB7dcsFAMmtFztZuXPDvSePkFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/brace-expansion": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", + "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/debug": { "version": "4.4.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", @@ -556,6 +1607,13 @@ } } }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, "node_modules/dotenv": { "version": "16.6.1", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", @@ -568,6 +1626,13 @@ "url": "https://dotenvx.com" } }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, "node_modules/esbuild": { "version": "0.27.3", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", @@ -610,15 +1675,291 @@ "@esbuild/win32-x64": "0.27.3" } }, - "node_modules/event-target-shim": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", - "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.2.tgz", + "integrity": "sha512-uYixubwmqJZH+KLVYIVKY1JQt7tysXhtj21WSvjcSmU5SVNzMus1bgLe+pAt816yQ8opKfheVVoPLqvVMGejYw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.2", + "@eslint/config-helpers": "^0.5.2", + "@eslint/core": "^1.1.0", + "@eslint/plugin-kit": "^0.6.0", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.1", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.1.1", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.1", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.1.tgz", + "integrity": "sha512-GaUN0sWim5qc8KVErfPBWmc31LEsOkrUJbvJZV+xuL3u2phMUK4HIvXlWAakfC8W4nzlK+chPEAkYOYb5ZScIw==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.1.1.tgz", + "integrity": "sha512-AVHPqQoZYc+RUM4/3Ly5udlZY/U4LS8pIG05jEjWM2lQMU/oaZ7qshzAl2YP1tfNmXfftH3ohurfwNAug+MnsQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/expect-type": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", + "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, "engines": { - "node": ">=6" + "node": ">=16.0.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" } }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -647,6 +1988,19 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/grammy": { "version": "1.40.1", "resolved": "https://registry.npmjs.org/grammy/-/grammy-1.40.1.tgz", @@ -689,82 +2043,501 @@ "url": "https://locize.com/i18next.html" }, { - "type": "individual", - "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + "type": "individual", + "url": "https://www.i18next.com/how-to/faq#i18next-is-awesome.-how-can-i-support-the-project" + } + ], + "license": "MIT", + "dependencies": { + "@babel/runtime": "^7.28.4" + }, + "peerDependencies": { + "typescript": "^5" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-to-ts": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/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/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/minimatch": { + "version": "10.2.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", + "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.11", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz", + "integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-cron": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.3.tgz", + "integrity": "sha512-dOal67//nohNgYWb+nWmg5dkFdIwDm8EpeGYMekPMrngV3637lqnX0lbUcCtgibHTz6SEz7DAIjKvKDFYCnO1A==", + "license": "ISC", + "dependencies": { + "uuid": "8.3.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/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/obug": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", + "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT" + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz", + "integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "license": "MIT", "dependencies": { - "@babel/runtime": "^7.28.4" + "nanoid": "^3.3.11", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, - "peerDependencies": { - "typescript": "^5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } + "engines": { + "node": "^10 || ^12 || >=14" } }, - "node_modules/json-schema-to-ts": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz", - "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==", + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/rollup": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", + "dev": true, "license": "MIT", "dependencies": { - "@babel/runtime": "^7.18.3", - "ts-algebra": "^2.0.0" + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" }, "engines": { - "node": ">=16" + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", + "fsevents": "~2.3.2" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "license": "MIT" - }, - "node_modules/node-cron": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/node-cron/-/node-cron-3.0.3.tgz", - "integrity": "sha512-dOal67//nohNgYWb+nWmg5dkFdIwDm8EpeGYMekPMrngV3637lqnX0lbUcCtgibHTz6SEz7DAIjKvKDFYCnO1A==", + "node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "dev": true, "license": "ISC", - "dependencies": { - "uuid": "8.3.2" + "bin": { + "semver": "bin/semver.js" }, "engines": { - "node": ">=6.0.0" + "node": ">=10" } }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "license": "MIT", "dependencies": { - "whatwg-url": "^5.0.0" + "shebang-regex": "^3.0.0" }, "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } + "node": ">=8" } }, - "node_modules/resolve-pkg-maps": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", - "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, "license": "MIT", - "funding": { - "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + "engines": { + "node": ">=8" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" } }, "node_modules/sql.js": { @@ -773,6 +2546,64 @@ "integrity": "sha512-NXYh+kFqLiYRCNAaHD0PcbjFgXyjuolEKLMk5vRt2DgPENtF1kkNzzMlg42dUk5wIsH8MhUzsRhaUxIisoSlZQ==", "license": "MIT" }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.0.2.tgz", + "integrity": "sha512-W/KYk+NFhkmsYpuHq5JykngiOCnxeVL8v8dFnqxSD8qEEdRfXk1SDM6JzNqcERbcGYj9tMrDQBYV9cjgnunFIg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.15", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", + "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.3" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.0.3.tgz", + "integrity": "sha512-PSkbLUoxOFRzJYjjxHJt9xro7D+iilgMX/C9lawzVuYiIdcihh9DXmVibBe8lmcFrRi/VzlPjBxbN7rH24q8/Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -785,12 +2616,26 @@ "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==", "license": "MIT" }, + "node_modules/ts-api-utils": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", + "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/tsx": { "version": "4.21.0", "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.21.0.tgz", "integrity": "sha512-5C1sg4USs1lfG0GFb2RLXsdpXqBSEhAaA/0kPL01wxzpMqLILNxIxIOKiILz+cdg/pLnOUxFYOR5yhHU666wbw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "esbuild": "~0.27.0", "get-tsconfig": "^4.7.5" @@ -805,6 +2650,19 @@ "fsevents": "~2.3.3" } }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/typescript": { "version": "5.9.3", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", @@ -820,6 +2678,30 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.56.1", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.56.1.tgz", + "integrity": "sha512-U4lM6pjmBX7J5wk4szltF7I1cGBHXZopnAXCMXb3+fZ3B/0Z3hq3wS/CCUB2NZBNAExK92mCU2tEohWuwVMsDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.56.1", + "@typescript-eslint/parser": "8.56.1", + "@typescript-eslint/typescript-estree": "8.56.1", + "@typescript-eslint/utils": "8.56.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, "node_modules/undici": { "version": "7.22.0", "resolved": "https://registry.npmjs.org/undici/-/undici-7.22.0.tgz", @@ -836,6 +2718,16 @@ "dev": true, "license": "MIT" }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -845,6 +2737,160 @@ "uuid": "dist/bin/uuid" } }, + "node_modules/vite": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz", + "integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "esbuild": "^0.27.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.0.18", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.0.18.tgz", + "integrity": "sha512-hOQuK7h0FGKgBAas7v0mSAsnvrIgAvWmRFjmzpJ7SwFHH3g1k2u37JtYwOwmEKhK6ZO3v9ggDBBm0La1LCK4uQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.0.18", + "@vitest/mocker": "4.0.18", + "@vitest/pretty-format": "4.0.18", + "@vitest/runner": "4.0.18", + "@vitest/snapshot": "4.0.18", + "@vitest/spy": "4.0.18", + "@vitest/utils": "4.0.18", + "es-module-lexer": "^1.7.0", + "expect-type": "^1.2.2", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^3.10.0", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.0.3", + "vite": "^6.0.0 || ^7.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.0.18", + "@vitest/browser-preview": "4.0.18", + "@vitest/browser-webdriverio": "4.0.18", + "@vitest/ui": "4.0.18", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, "node_modules/webidl-conversions": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", @@ -860,6 +2906,62 @@ "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/package.json b/package.json index 7a12f05..a6a1d9f 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "scripts": { "dev": "tsx watch src/bot.ts", "build": "tsc", - "start": "node dist/bot.js" + "start": "node dist/bot.js", + "lint": "eslint src/ tests/", + "lint:fix": "eslint src/ tests/ --fix", + "test": "vitest run", + "test:watch": "vitest" }, "dependencies": { "@anthropic-ai/sdk": "^0.78.0", @@ -19,9 +23,14 @@ "undici": "^7.22.0" }, "devDependencies": { + "@eslint/js": "^10.0.1", + "@types/eslint__js": "^8.42.3", "@types/node": "^20.11.0", "@types/node-cron": "^3.0.11", + "eslint": "^10.0.2", "tsx": "^4.7.0", - "typescript": "^5.3.3" + "typescript": "^5.3.3", + "typescript-eslint": "^8.56.1", + "vitest": "^4.0.18" } } diff --git a/src/db.ts b/src/db.ts index ecb5f7d..3386226 100644 --- a/src/db.ts +++ b/src/db.ts @@ -4,6 +4,8 @@ import { config } from './config.js'; import type { Interview, InterviewStatus, + InterviewPhase, + CandidateProfile, ResearchNotes, Question, ConversationMessage, @@ -32,6 +34,8 @@ CREATE TABLE IF NOT EXISTS interviews ( interview_questions TEXT, conversation_history TEXT, summary TEXT, + interview_phase TEXT NOT NULL DEFAULT 'intro', + candidate_profile TEXT, created_at INTEGER NOT NULL DEFAULT (CAST(strftime('%s','now') AS INTEGER) * 1000), updated_at INTEGER NOT NULL DEFAULT (CAST(strftime('%s','now') AS INTEGER) * 1000) ); @@ -71,6 +75,14 @@ export async function init_db(): Promise { try { _db.run("ALTER TABLE interviews ADD COLUMN candidate_telegram_id TEXT NOT NULL DEFAULT ''"); } catch { /* already exists */ } // Migration: create user_prefs table for existing databases try { _db.run("CREATE TABLE IF NOT EXISTS user_prefs (chat_id TEXT PRIMARY KEY, language TEXT NOT NULL DEFAULT 'zh-CN')"); } catch { /* already exists */ } + // Migration: add interview phase and candidate profile columns + // Default to 'questioning' for existing records (they've already passed the intro stage) + try { + _db.run("ALTER TABLE interviews ADD COLUMN interview_phase TEXT NOT NULL DEFAULT 'questioning'"); + // Only new interviews (status='notified') that haven't started yet should be 'intro' + _db.run("UPDATE interviews SET interview_phase = 'intro' WHERE status IN ('pending', 'researching', 'ready', 'notified')"); + } catch { /* already exists */ } + try { _db.run("ALTER TABLE interviews ADD COLUMN candidate_profile TEXT"); } catch { /* already exists */ } persist(); } @@ -112,6 +124,30 @@ function query_one(sql: string, params: any[] = []): Record | n return rows[0] ?? null; } +/** @internal Exported for testing */ +export function is_valid_candidate_profile(obj: unknown): obj is CandidateProfile { + if (!obj || typeof obj !== 'object') return false; + const o = obj as Record; + return Array.isArray(o.tech_stack) + && (o.years_of_experience === null || typeof o.years_of_experience === 'number') + && Array.isArray(o.project_highlights) + && Array.isArray(o.suggested_focus_areas); +} + +/** @internal Exported for testing */ +export function safe_parse_candidate_profile(raw: string | null | undefined): CandidateProfile | null { + if (!raw) return null; + try { + const parsed = JSON.parse(raw as string); + if (is_valid_candidate_profile(parsed)) return parsed; + console.error('[db] Invalid candidate_profile structure:', parsed); + return null; + } catch (err) { + console.error('[db] Failed to parse candidate_profile JSON:', err); + return null; + } +} + function parse_interview(row: Record): Interview { return { id: row.id as number, @@ -122,6 +158,11 @@ function parse_interview(row: Record): Interview { scheduled_time: row.scheduled_time as number, duration_minutes: row.duration_minutes as number, status: row.status as InterviewStatus, + interview_phase: (() => { + const raw = row.interview_phase as string; + return raw === 'intro' || raw === 'questioning' ? raw : 'intro'; + })(), + candidate_profile: safe_parse_candidate_profile(row.candidate_profile as string | null), research_notes: row.research_notes ? JSON.parse(row.research_notes as string) : null, interview_questions: row.interview_questions ? JSON.parse(row.interview_questions as string) : null, conversation_history: row.conversation_history ? JSON.parse(row.conversation_history as string) : null, @@ -272,6 +313,23 @@ export function set_candidate_telegram_id(id: number, candidate_telegram_id: str run('UPDATE interviews SET candidate_telegram_id = ?, updated_at = ? WHERE id = ?', [candidate_telegram_id, Date.now(), id]); } +export function set_interview_phase(id: number, phase: InterviewPhase): void { + run('UPDATE interviews SET interview_phase = ?, updated_at = ? WHERE id = ?', [phase, Date.now(), id]); +} + +export function set_candidate_profile(id: number, profile: CandidateProfile): void { + run('UPDATE interviews SET candidate_profile = ?, updated_at = ? WHERE id = ?', [JSON.stringify(profile), Date.now(), id]); +} + +/** Atomic: set phase and profile in a single DB write to avoid inconsistent state on crash */ +export function set_phase_and_profile(id: number, phase: InterviewPhase, profile: CandidateProfile): void { + run( + 'UPDATE interviews SET interview_phase = ?, candidate_profile = ?, updated_at = ? WHERE id = ?', + [phase, JSON.stringify(profile), Date.now(), id] + ); +} + + // ─── User language preferences ──────────────────────────────────────────────── /** Returns the stored locale for chat_id, or null if no preference recorded yet. */ diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json index 1928541..f16d441 100644 --- a/src/i18n/locales/en-US.json +++ b/src/i18n/locales/en-US.json @@ -39,7 +39,8 @@ }, "interview": { "ending": "⏳ Interview finished. Generating evaluation report, please wait...", - "reply_error": "Sorry, an error occurred while processing your reply. Please try again later." + "reply_error": "Sorry, an error occurred while processing your reply. Please try again later.", + "intro_prompt": "Please introduce yourself, including your technical background, work experience, and projects you have worked on." }, "default_reply": "Use /schedule to book an interview, or /help for help.", "wizard": { diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 9c8ffb1..2ef8e70 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -39,7 +39,8 @@ }, "interview": { "ending": "⏳ 面试已结束,正在生成评估报告,请稍候...", - "reply_error": "抱歉,处理您的回复时遇到了问题,请稍后再试。" + "reply_error": "抱歉,处理您的回复时遇到了问题,请稍后再试。", + "intro_prompt": "请做一段自我介绍,包括您的技术背景、工作经验、参与过的项目等。" }, "default_reply": "请使用 /schedule 预约面试,或 /help 查看帮助。", "wizard": { diff --git a/src/interviewer.ts b/src/interviewer.ts index 581e96a..6a6e769 100644 --- a/src/interviewer.ts +++ b/src/interviewer.ts @@ -1,11 +1,15 @@ import Anthropic from '@anthropic-ai/sdk'; import { config } from './config.js'; -import { get_interview, append_message, get_conversation } from './db.js'; -import type { Interview, InterviewSummary, InterviewCategory } from './types.js'; +import { get_interview, append_message, get_conversation, set_phase_and_profile } from './db.js'; +import type { Interview, InterviewSummary, InterviewCategory, CandidateProfile } from './types.js'; + +// Guard against concurrent intro processing per interview +const _intro_processing = new Set(); const client = new Anthropic({ apiKey: config.anthropic.api_key, baseURL: config.anthropic.base_url }); -function build_interviewer_system_prompt(interview: Interview, time_remaining_ms: number | null): string { +/** @internal Exported for testing */ +export function build_interviewer_system_prompt(interview: Interview, time_remaining_ms: number | null): string { const time_info = time_remaining_ms !== null ? `剩余时间:约 ${Math.max(0, Math.round(time_remaining_ms / 60000))} 分钟` : ''; @@ -18,6 +22,35 @@ function build_interviewer_system_prompt(interview: Interview, time_remaining_ms ? `研究背景:\n${interview.research_notes.summary}` : ''; + // Intro phase: no questions injected — we only need the candidate's self-introduction at this stage. + // Questions will be included in the questioning phase prompt after profile analysis. + if (interview.interview_phase === 'intro') { + return `你是一位专业的技术面试官,正在对候选人进行"AI Agent 管理员"职位的面试。 + +候选人姓名:${interview.candidate_name} +面试时长:${interview.duration_minutes} 分钟 +${time_info} + +${research_text} + +面试指导原则: +1. 保持专业、友好、鼓励的态度 +2. 全程使用中文交流 +3. 不要透露评分标准,不要主动说明你是 AI(除非被直接询问) + +面试开始时,先做简短的自我介绍,说明本次面试的职位和大致流程,然后请候选人做自我介绍(介绍自己的背景、技术栈、工作经验、项目经历等)。`; + } + + const profile_text = interview.candidate_profile + ? `候选人背景(从自我介绍中提取): +- 技术栈:${interview.candidate_profile.tech_stack.join('、') || '未提及'} +- 经验年限:${interview.candidate_profile.years_of_experience !== null ? `约 ${interview.candidate_profile.years_of_experience} 年` : '未明确'} +- 项目亮点:${interview.candidate_profile.project_highlights.join(';') || '未提及'} +- 建议重点考察方向:${interview.candidate_profile.suggested_focus_areas.join('、') || '按标准流程'} + +请根据候选人背景调整提问深度和方向。例如:候选人提到有 LangChain 经验,则在 agent_frameworks 维度深入考察 LangChain 的具体使用;候选人经验年限较浅,则适当降低难度;候选人有丰富的系统运维经验,则在 system_operations 维度深入考察。` + : ''; + return `你是一位专业的技术面试官,正在对候选人进行"AI Agent 管理员"职位的面试。 候选人姓名:${interview.candidate_name} @@ -26,6 +59,8 @@ ${time_info} ${research_text} +${profile_text} + 准备好的面试题目: ${questions_text} @@ -37,9 +72,7 @@ ${questions_text} 5. 时间不足5分钟时,礼貌地进行收尾 6. 面试结束时,在回复末尾单独一行写 INTERVIEW_COMPLETE 7. 全程使用中文交流 -8. 不要透露评分标准,不要主动说明你是 AI(除非被直接询问) - -面试开始时,先做自我介绍并说明面试流程,然后从 AI 基础知识开始提问。`; +8. 不要透露评分标准,不要主动说明你是 AI(除非被直接询问)`; } const SUMMARY_SYSTEM_PROMPT = `你是一位资深技术招聘官,负责分析 AI Agent 管理员职位的面试结果。 @@ -77,6 +110,44 @@ export async function handle_candidate_reply( const interview = get_interview(interview_id); if (!interview) throw new Error(`Interview ${interview_id} not found`); + // If still in intro phase, analyze the self-introduction and transition + if (interview.interview_phase === 'intro') { + // Race condition guard: skip if already processing intro for this interview + if (_intro_processing.has(interview_id)) { + console.warn(`[handle_candidate_reply] Intro already processing for interview ${interview_id}, skipping duplicate`); + return { response: '', should_end: false, skipped: true } as { response: string; should_end: boolean }; + } + _intro_processing.add(interview_id); + + try { + // Collect all user messages from intro phase (candidate may send multiple messages) + const intro_messages = get_conversation(interview_id) + .filter(m => m.role === 'user') + .map(m => m.content) + .join('\n'); + const profile = await analyze_self_introduction(intro_messages || candidate_message); + // Atomic: set profile and phase in a single DB write to avoid inconsistent state on crash + set_phase_and_profile(interview_id, 'questioning', profile); + + // Reload interview with updated phase and profile + const updated_interview = get_interview(interview_id); + if (!updated_interview) throw new Error(`Interview ${interview_id} not found`); + + const elapsed_ms = Date.now() - updated_interview.scheduled_time; + const time_remaining_ms = updated_interview.duration_minutes * 60_000 - elapsed_ms; + + // Inject explicit transition trigger so the AI acknowledges the intro + const transition_trigger = '[系统提示:候选人已完成自我介绍,请根据候选人背景开始正式提问。先简短过渡(如"感谢您的介绍,接下来我们开始正式面试"),然后从第一个问题开始。]'; + const response = await generate_interviewer_turn(updated_interview, time_remaining_ms, transition_trigger); + append_message(interview_id, 'assistant', response); + + const should_end = response.includes('INTERVIEW_COMPLETE') || time_remaining_ms <= 0; + return { response: response.replaceAll('INTERVIEW_COMPLETE', '').trim(), should_end }; + } finally { + _intro_processing.delete(interview_id); + } + } + const elapsed_ms = Date.now() - interview.scheduled_time; const time_remaining_ms = interview.duration_minutes * 60_000 - elapsed_ms; @@ -84,12 +155,60 @@ export async function handle_candidate_reply( append_message(interview_id, 'assistant', response); const should_end = response.includes('INTERVIEW_COMPLETE') || time_remaining_ms <= 0; - return { response: response.replace('INTERVIEW_COMPLETE', '').trim(), should_end }; + return { response: response.replaceAll('INTERVIEW_COMPLETE', '').trim(), should_end }; +} + +async function analyze_self_introduction(intro_text: string): Promise { + const response = await client.messages.create({ + model: config.anthropic.model, + max_tokens: 1000, + system: `你是一位专业的技术招聘分析师。请从候选人的自我介绍中提取关键信息,输出严格的 JSON 格式,不包含任何其他文字。`, + messages: [{ + role: 'user', + content: `请分析以下自我介绍,提取关键信息: + +${intro_text} + +请输出如下 JSON 格式: +{ + "tech_stack": ["技术1", "技术2"], + "years_of_experience": 数字或null, + "project_highlights": ["项目亮点1", "项目亮点2"], + "suggested_focus_areas": ["建议重点考察方向1", "方向2"] +} + +说明: +- tech_stack:候选人提到的所有技术、框架、工具 +- years_of_experience:从描述中估算的工作年限(整数),无法判断则为 null +- project_highlights:候选人提到的值得深入了解的项目或经历(简短描述) +- suggested_focus_areas:根据候选人背景,建议在面试中重点考察的方向(结合 AI基础知识、Agent框架经验、系统运维、业务沟通四个维度)`, + }], + }); + + const text_blocks = (response.content ?? []).filter(b => b.type === 'text'); + const full_text = text_blocks.map(b => (b as Anthropic.TextBlock).text).join('\n'); + + const json_match = full_text.match(/\{[\s\S]*"tech_stack"[\s\S]*\}/); + if (json_match) { + try { + return JSON.parse(json_match[0]) as CandidateProfile; + } catch (err) { + console.error('[analyze_self_introduction] Failed to parse profile JSON:', err, 'Raw text:', full_text); + } + } + + return { + tech_stack: [], + years_of_experience: null, + project_highlights: [], + suggested_focus_areas: [], + }; } async function generate_interviewer_turn( interview: Interview, time_remaining_ms: number | null, + inject_trigger?: string, ): Promise { const history = get_conversation(interview.id); @@ -98,19 +217,20 @@ async function generate_interviewer_turn( content: m.content, })); - // First turn: inject a trigger message - if (messages.length === 0) { - messages.push({ - role: 'user', - content: '[系统提示:面试时间到,请开始面试。发送开场白并介绍面试流程。]', - }); + // Inject trigger message: either explicit (for phase transitions) or default (for first turn) + if (inject_trigger) { + messages.push({ role: 'user', content: inject_trigger }); + } else if (messages.length === 0) { + // First turn in intro phase: prompt the interviewer to start + const trigger = '[系统提示:面试时间到,请开始面试。做简短自我介绍,说明面试职位和流程,然后请候选人做自我介绍。]'; + messages.push({ role: 'user', content: trigger }); } let full_response = ''; const stream = client.messages.stream({ model: config.anthropic.model, - max_tokens: 1500, + max_tokens: 16000, thinking: { type: 'adaptive' }, system: build_interviewer_system_prompt(interview, time_remaining_ms), messages, @@ -175,7 +295,8 @@ ${conversation_text} return extract_summary(response); } -function extract_summary(response: Anthropic.Message): InterviewSummary { +/** @internal Exported for testing */ +export function extract_summary(response: Anthropic.Message): InterviewSummary { const text_blocks = (response.content ?? []).filter(b => b.type === 'text'); const full_text = text_blocks.map(b => (b as Anthropic.TextBlock).text).join('\n'); diff --git a/src/scheduler.ts b/src/scheduler.ts index 17c158a..06ec4ae 100644 --- a/src/scheduler.ts +++ b/src/scheduler.ts @@ -38,8 +38,8 @@ function admin_lang(): string { return config.admin_locale; } -/** Format a UTC timestamp for display (always CST timezone). */ -function fmt_time(ts: number, lng: string): string { +/** Format a UTC timestamp for display (always CST timezone). @internal Exported for testing */ +export function fmt_time(ts: number, lng: string): string { const locale = lng === 'zh-CN' ? 'zh-CN' : 'en-US'; return new Date(ts).toLocaleString(locale, { timeZone: 'Asia/Shanghai' }); } diff --git a/src/types.ts b/src/types.ts index 0cb8bbd..faeeab4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -7,6 +7,8 @@ export type InterviewStatus = | 'completed' | 'cancelled'; +export type InterviewPhase = 'intro' | 'questioning'; + export type InterviewCategory = | 'ai_fundamentals' | 'agent_frameworks' @@ -19,6 +21,13 @@ export type Recommendation = | 'no_hire' | 'strong_no_hire'; +export interface CandidateProfile { + tech_stack: string[]; + years_of_experience: number | null; + project_highlights: string[]; + suggested_focus_areas: string[]; +} + export interface Interview { id: number; telegram_user_id: string; @@ -28,6 +37,8 @@ export interface Interview { scheduled_time: number; duration_minutes: number; status: InterviewStatus; + interview_phase: InterviewPhase; + candidate_profile: CandidateProfile | null; research_notes: ResearchNotes | null; interview_questions: Question[] | null; conversation_history: ConversationMessage[] | null; diff --git a/tests/db.test.ts b/tests/db.test.ts new file mode 100644 index 0000000..4883eb6 --- /dev/null +++ b/tests/db.test.ts @@ -0,0 +1,466 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest'; +import { existsSync } from 'fs'; +import { tmpdir } from 'os'; +import { join } from 'path'; + +// vi.mock is hoisted — factory must be self-contained (no external refs) +vi.mock('../src/config.js', async () => { + const os = await import('os'); + const path = await import('path'); + return { + config: { + db: { path: path.join(os.tmpdir(), 'test-eval-mate.db') }, + interview: { research_lead_hours: 2 }, + anthropic: { api_key: 'test', base_url: 'http://localhost', model: 'test' }, + telegram: { bot_token: 'test', admin_chat_id: 'test' }, + admin_locale: 'zh-CN', + }, + }; +}); + +const TEST_DB_PATH = join(tmpdir(), 'test-eval-mate.db'); + +import { + init_db, + create_interview, + get_interview, + get_interview_by_user, + get_interviews_by_user, + update_interview_status, + set_interview_phase, + set_candidate_profile, + set_phase_and_profile, + append_message, + get_conversation, + set_research, + set_summary, + cancel_interview, + get_user_lang, + set_user_lang, + get_due_interviews, + get_notified_interviews, + get_in_progress_interviews, + get_db, + is_valid_candidate_profile, + safe_parse_candidate_profile, +} from '../src/db.js'; +import type { CandidateProfile, ResearchNotes, Question, InterviewSummary } from '../src/types.js'; + +describe('Database', () => { + beforeEach(async () => { + try { + const { unlinkSync } = await import('fs'); + unlinkSync(TEST_DB_PATH); + } catch { /* file doesn't exist */ } + await init_db(); + }); + + describe('init_db', () => { + it('should create a new database file', () => { + expect(existsSync(TEST_DB_PATH)).toBe(true); + }); + + it('should be idempotent', async () => { + await init_db(); + expect(existsSync(TEST_DB_PATH)).toBe(true); + }); + }); + + describe('create_interview & get_interview', () => { + it('should create and retrieve an interview', () => { + const id = create_interview({ + telegram_user_id: 'user123', + candidate_name: 'Alice', + candidate_telegram_username: 'alice_tg', + scheduled_time: Date.now() + 3600_000, + duration_minutes: 30, + }); + + expect(id).toBeGreaterThan(0); + const interview = get_interview(id); + expect(interview).not.toBeNull(); + expect(interview!.candidate_name).toBe('Alice'); + expect(interview!.status).toBe('pending'); + expect(interview!.interview_phase).toBe('intro'); + expect(interview!.candidate_profile).toBeNull(); + }); + + it('should return null for non-existent interview', () => { + expect(get_interview(9999)).toBeNull(); + }); + }); + + describe('update_interview_status', () => { + it('should update status correctly', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'Bob', + candidate_telegram_username: 'bob', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + update_interview_status(id, 'researching'); + expect(get_interview(id)!.status).toBe('researching'); + update_interview_status(id, 'ready'); + expect(get_interview(id)!.status).toBe('ready'); + }); + }); + + describe('interview_phase & candidate_profile', () => { + it('should set interview phase', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'C', + candidate_telegram_username: 'c', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + expect(get_interview(id)!.interview_phase).toBe('intro'); + set_interview_phase(id, 'questioning'); + expect(get_interview(id)!.interview_phase).toBe('questioning'); + }); + + it('should set candidate profile', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'D', + candidate_telegram_username: 'd', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + const profile: CandidateProfile = { + tech_stack: ['Python', 'LangChain'], + years_of_experience: 3, + project_highlights: ['Built a RAG system'], + suggested_focus_areas: ['agent_frameworks'], + }; + set_candidate_profile(id, profile); + expect(get_interview(id)!.candidate_profile).toEqual(profile); + }); + + it('should atomically set phase and profile', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'E', + candidate_telegram_username: 'e', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + const profile: CandidateProfile = { + tech_stack: ['TypeScript'], years_of_experience: 5, + project_highlights: [], suggested_focus_areas: [], + }; + set_phase_and_profile(id, 'questioning', profile); + const interview = get_interview(id)!; + expect(interview.interview_phase).toBe('questioning'); + expect(interview.candidate_profile).toEqual(profile); + }); + + it('should fallback invalid phase to intro', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'F', + candidate_telegram_username: 'f', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + get_db().run('UPDATE interviews SET interview_phase = ? WHERE id = ?', ['invalid_phase', id]); + expect(get_interview(id)!.interview_phase).toBe('intro'); + }); + + it('should handle malformed candidate_profile JSON', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'G', + candidate_telegram_username: 'g', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + get_db().run('UPDATE interviews SET candidate_profile = ? WHERE id = ?', ['not-json', id]); + expect(get_interview(id)!.candidate_profile).toBeNull(); + }); + + it('should handle structurally invalid candidate_profile', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'H', + candidate_telegram_username: 'h', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + get_db().run('UPDATE interviews SET candidate_profile = ? WHERE id = ?', ['{"foo":"bar"}', id]); + expect(get_interview(id)!.candidate_profile).toBeNull(); + }); + }); + + describe('messages', () => { + it('should append and retrieve conversation', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'I', + candidate_telegram_username: 'i', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + append_message(id, 'assistant', 'Hello'); + append_message(id, 'user', 'Hi'); + append_message(id, 'assistant', 'Tell me about yourself'); + const conv = get_conversation(id); + expect(conv).toHaveLength(3); + expect(conv[0].role).toBe('assistant'); + expect(conv[1].content).toBe('Hi'); + }); + + it('should return empty array for no messages', () => { + const id = create_interview({ + telegram_user_id: 'u1', candidate_name: 'J', + candidate_telegram_username: 'j', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + expect(get_conversation(id)).toEqual([]); + }); + }); + + describe('user language', () => { + it('should return null for unknown user', () => { + expect(get_user_lang('unknown')).toBeNull(); + }); + + it('should set and get language', () => { + set_user_lang('ua', 'en-US'); + expect(get_user_lang('ua')).toBe('en-US'); + }); + + it('should update existing language', () => { + set_user_lang('ub', 'zh-CN'); + set_user_lang('ub', 'en-US'); + expect(get_user_lang('ub')).toBe('en-US'); + }); + }); + + describe('query helpers', () => { + it('get_interview_by_user returns active interview', () => { + const id = create_interview({ + telegram_user_id: 'uq', candidate_name: 'Q', + candidate_telegram_username: 'q', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + expect(get_interview_by_user('uq')!.id).toBe(id); + }); + + it('get_interview_by_user skips completed', () => { + const id = create_interview({ + telegram_user_id: 'ud', candidate_name: 'D', + candidate_telegram_username: 'd', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + update_interview_status(id, 'completed'); + expect(get_interview_by_user('ud')).toBeNull(); + }); + + it('get_interviews_by_user returns multiple', () => { + create_interview({ + telegram_user_id: 'um', candidate_name: 'A', + candidate_telegram_username: 'a', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + create_interview({ + telegram_user_id: 'um', candidate_name: 'B', + candidate_telegram_username: 'b', + scheduled_time: Date.now() + 7200_000, duration_minutes: 30, + }); + expect(get_interviews_by_user('um')).toHaveLength(2); + }); + + it('cancel_interview sets cancelled', () => { + const id = create_interview({ + telegram_user_id: 'uc', candidate_name: 'C', + candidate_telegram_username: 'c', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + cancel_interview(id); + expect(get_interview(id)!.status).toBe('cancelled'); + }); + + it('get_due_interviews returns ready past-scheduled', () => { + const id = create_interview({ + telegram_user_id: 'udue', candidate_name: 'Due', + candidate_telegram_username: 'due', + scheduled_time: Date.now() - 1000, duration_minutes: 30, + }); + update_interview_status(id, 'ready'); + expect(get_due_interviews().some(i => i.id === id)).toBe(true); + }); + + it('get_notified_interviews returns notified', () => { + const id = create_interview({ + telegram_user_id: 'un', candidate_name: 'N', + candidate_telegram_username: 'n', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + update_interview_status(id, 'notified'); + expect(get_notified_interviews().some(i => i.id === id)).toBe(true); + }); + + it('get_in_progress_interviews returns in_progress', () => { + const id = create_interview({ + telegram_user_id: 'uip', candidate_name: 'IP', + candidate_telegram_username: 'ip', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + update_interview_status(id, 'in_progress'); + expect(get_in_progress_interviews().some(i => i.id === id)).toBe(true); + }); + }); + + describe('research & summary', () => { + it('should set and retrieve research notes', () => { + const id = create_interview({ + telegram_user_id: 'ur', candidate_name: 'R', + candidate_telegram_username: 'r', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + const notes: ResearchNotes = { + summary: 'Test research', + topics: [{ category: 'ai_fundamentals', key_concepts: ['transformers'], suggested_depth: 'moderate' }], + generated_at: Date.now(), + }; + const questions: Question[] = [{ + id: 'q1', category: 'ai_fundamentals', text: 'What is a transformer?', + follow_ups: ['Explain attention'], scoring_rubric: 'Knows basics', difficulty: 'junior', + }]; + set_research(id, notes, questions); + const interview = get_interview(id)!; + expect(interview.research_notes!.summary).toBe('Test research'); + expect(interview.interview_questions).toHaveLength(1); + }); + + it('should set and retrieve summary', () => { + const id = create_interview({ + telegram_user_id: 'us', candidate_name: 'S', + candidate_telegram_username: 's', + scheduled_time: Date.now() + 3600_000, duration_minutes: 30, + }); + const summary: InterviewSummary = { + overall_recommendation: 'hire', overall_score: 75, + category_scores: { + ai_fundamentals: { score: 20, notes: 'Good' }, + agent_frameworks: { score: 18, notes: 'Decent' }, + system_operations: { score: 20, notes: 'Strong' }, + business_communication: { score: 17, notes: 'OK' }, + }, + strengths: ['Technical depth'], weaknesses: ['Communication'], + notable_quotes: ['I built a RAG system'], + detailed_assessment: 'Overall good candidate', generated_at: Date.now(), + }; + set_summary(id, summary); + expect(get_interview(id)!.summary!.overall_recommendation).toBe('hire'); + expect(get_interview(id)!.summary!.overall_score).toBe(75); + }); + }); + + describe('is_valid_candidate_profile', () => { + it('should accept valid profile', () => { + expect(is_valid_candidate_profile({ + tech_stack: ['Python'], + years_of_experience: 3, + project_highlights: ['RAG'], + suggested_focus_areas: ['ai_fundamentals'], + })).toBe(true); + }); + + it('should accept null years_of_experience', () => { + expect(is_valid_candidate_profile({ + tech_stack: [], + years_of_experience: null, + project_highlights: [], + suggested_focus_areas: [], + })).toBe(true); + }); + + it('should reject null', () => { + expect(is_valid_candidate_profile(null)).toBe(false); + }); + + it('should reject undefined', () => { + expect(is_valid_candidate_profile(undefined)).toBe(false); + }); + + it('should reject non-object', () => { + expect(is_valid_candidate_profile('string')).toBe(false); + expect(is_valid_candidate_profile(42)).toBe(false); + }); + + it('should reject missing tech_stack', () => { + expect(is_valid_candidate_profile({ + years_of_experience: 3, + project_highlights: [], + suggested_focus_areas: [], + })).toBe(false); + }); + + it('should reject non-array tech_stack', () => { + expect(is_valid_candidate_profile({ + tech_stack: 'Python', + years_of_experience: 3, + project_highlights: [], + suggested_focus_areas: [], + })).toBe(false); + }); + + it('should reject string years_of_experience', () => { + expect(is_valid_candidate_profile({ + tech_stack: [], + years_of_experience: '3', + project_highlights: [], + suggested_focus_areas: [], + })).toBe(false); + }); + + it('should reject missing project_highlights', () => { + expect(is_valid_candidate_profile({ + tech_stack: [], + years_of_experience: null, + suggested_focus_areas: [], + })).toBe(false); + }); + + it('should reject missing suggested_focus_areas', () => { + expect(is_valid_candidate_profile({ + tech_stack: [], + years_of_experience: null, + project_highlights: [], + })).toBe(false); + }); + }); + + describe('safe_parse_candidate_profile', () => { + it('should parse valid JSON profile', () => { + const profile = safe_parse_candidate_profile(JSON.stringify({ + tech_stack: ['TypeScript'], + years_of_experience: 5, + project_highlights: ['Built eval-mate'], + suggested_focus_areas: ['agent_frameworks'], + })); + expect(profile).not.toBeNull(); + expect(profile!.tech_stack).toEqual(['TypeScript']); + }); + + it('should return null for null input', () => { + expect(safe_parse_candidate_profile(null)).toBeNull(); + }); + + it('should return null for undefined input', () => { + expect(safe_parse_candidate_profile(undefined)).toBeNull(); + }); + + it('should return null for empty string', () => { + expect(safe_parse_candidate_profile('')).toBeNull(); + }); + + it('should return null for invalid JSON', () => { + expect(safe_parse_candidate_profile('not json')).toBeNull(); + }); + + it('should return null for valid JSON with wrong structure', () => { + expect(safe_parse_candidate_profile('{"foo":"bar"}')).toBeNull(); + }); + + it('should return null for array JSON', () => { + expect(safe_parse_candidate_profile('[1,2,3]')).toBeNull(); + }); + + it('should return null for JSON with wrong types', () => { + expect(safe_parse_candidate_profile(JSON.stringify({ + tech_stack: 'not an array', + years_of_experience: 3, + project_highlights: [], + suggested_focus_areas: [], + }))).toBeNull(); + }); + }); +}); diff --git a/tests/interviewer.test.ts b/tests/interviewer.test.ts new file mode 100644 index 0000000..972d83c --- /dev/null +++ b/tests/interviewer.test.ts @@ -0,0 +1,307 @@ +import { describe, it, expect, vi } from 'vitest'; + +// Mock config +vi.mock('../src/config.js', () => ({ + config: { + anthropic: { api_key: 'test', base_url: 'http://localhost', model: 'test-model' }, + telegram: { bot_token: 'test', admin_chat_id: 'test' }, + db: { path: ':memory:' }, + admin_locale: 'zh-CN', + interview: { research_lead_hours: 2 }, + }, +})); + +// Mock Anthropic SDK +vi.mock('@anthropic-ai/sdk', () => ({ + default: class { + messages = { + create: vi.fn(), + stream: vi.fn(), + }; + }, +})); + +// Mock db module +vi.mock('../src/db.js', () => ({ + get_interview: vi.fn(), + append_message: vi.fn(), + get_conversation: vi.fn(() => []), + set_phase_and_profile: vi.fn(), + get_db: vi.fn(), +})); + +import { build_interviewer_system_prompt, extract_summary } from '../src/interviewer.js'; +import type { Interview, InterviewSummary, CandidateProfile } from '../src/types.js'; +import type Anthropic from '@anthropic-ai/sdk'; + +function makeInterview(overrides: Partial = {}): Interview { + return { + id: 1, + telegram_user_id: 'user1', + candidate_name: '测试候选人', + candidate_telegram_username: 'test_user', + candidate_telegram_id: '', + scheduled_time: Date.now(), + duration_minutes: 30, + status: 'in_progress', + interview_phase: 'questioning', + candidate_profile: null, + research_notes: null, + interview_questions: null, + conversation_history: null, + summary: null, + created_at: Date.now(), + updated_at: Date.now(), + ...overrides, + }; +} + +describe('build_interviewer_system_prompt', () => { + it('should generate intro phase prompt', () => { + const interview = makeInterview({ interview_phase: 'intro' }); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).toContain('测试候选人'); + expect(prompt).toContain('30 分钟'); + expect(prompt).toContain('自我介绍'); + // Intro phase should NOT contain question bank + expect(prompt).not.toContain('准备好的面试题目'); + }); + + it('should generate questioning phase prompt with default questions', () => { + const interview = makeInterview({ interview_phase: 'questioning' }); + const prompt = build_interviewer_system_prompt(interview, 1500_000); // 25 min + + expect(prompt).toContain('测试候选人'); + expect(prompt).toContain('约 25 分钟'); + expect(prompt).toContain('准备好的面试题目'); + expect(prompt).toContain('使用默认面试题库'); + expect(prompt).toContain('INTERVIEW_COMPLETE'); + }); + + it('should include candidate profile when available', () => { + const profile: CandidateProfile = { + tech_stack: ['Python', 'LangChain', 'Docker'], + years_of_experience: 5, + project_highlights: ['Built a RAG pipeline'], + suggested_focus_areas: ['agent_frameworks', 'system_operations'], + }; + const interview = makeInterview({ + interview_phase: 'questioning', + candidate_profile: profile, + }); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).toContain('Python、LangChain、Docker'); + expect(prompt).toContain('约 5 年'); + expect(prompt).toContain('Built a RAG pipeline'); + expect(prompt).toContain('agent_frameworks、system_operations'); + }); + + it('should handle null years_of_experience', () => { + const profile: CandidateProfile = { + tech_stack: ['TypeScript'], + years_of_experience: null, + project_highlights: [], + suggested_focus_areas: [], + }; + const interview = makeInterview({ + interview_phase: 'questioning', + candidate_profile: profile, + }); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).toContain('未明确'); + }); + + it('should handle empty profile arrays', () => { + const profile: CandidateProfile = { + tech_stack: [], + years_of_experience: null, + project_highlights: [], + suggested_focus_areas: [], + }; + const interview = makeInterview({ + interview_phase: 'questioning', + candidate_profile: profile, + }); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).toContain('未提及'); + expect(prompt).toContain('按标准流程'); + }); + + it('should include research notes when available', () => { + const interview = makeInterview({ + research_notes: { + summary: '候选人有丰富的 AI 经验', + topics: [], + generated_at: Date.now(), + }, + }); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).toContain('候选人有丰富的 AI 经验'); + }); + + it('should include interview questions when available', () => { + const interview = makeInterview({ + interview_questions: [{ + id: 'q1', + category: 'ai_fundamentals', + text: '什么是 Transformer?', + follow_ups: [], + scoring_rubric: 'test', + difficulty: 'junior', + }], + }); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).toContain('什么是 Transformer?'); + }); + + it('should show 0 minutes when time is up', () => { + const interview = makeInterview(); + const prompt = build_interviewer_system_prompt(interview, -5000); + + expect(prompt).toContain('约 0 分钟'); + }); + + it('should omit time info when time_remaining_ms is null', () => { + const interview = makeInterview(); + const prompt = build_interviewer_system_prompt(interview, null); + + expect(prompt).not.toContain('剩余时间'); + }); +}); + +describe('extract_summary', () => { + function makeMessage(text: string) { + return { + id: 'msg_test', + type: 'message', + role: 'assistant', + model: 'test', + content: [{ type: 'text' as const, text, citations: null }], + stop_reason: 'end_turn', + stop_sequence: null, + usage: { input_tokens: 0, output_tokens: 0, cache_creation: null, cache_creation_input_tokens: 0, cache_read_input_tokens: 0, inference_geo: null, server_tool_use: null, service_tier: null }, + } as unknown as Anthropic.Message; + } + + it('should parse valid summary JSON', () => { + const summary: InterviewSummary = { + overall_recommendation: 'hire', + overall_score: 78, + category_scores: { + ai_fundamentals: { score: 20, notes: '扎实' }, + agent_frameworks: { score: 18, notes: '有经验' }, + system_operations: { score: 22, notes: '优秀' }, + business_communication: { score: 18, notes: '良好' }, + }, + strengths: ['技术深度好'], + weaknesses: ['沟通可以加强'], + notable_quotes: ['我做过 RAG 系统'], + detailed_assessment: '整体不错的候选人', + generated_at: Date.now(), + }; + + const result = extract_summary(makeMessage(JSON.stringify(summary))); + expect(result.overall_recommendation).toBe('hire'); + expect(result.overall_score).toBe(78); + expect(result.category_scores.ai_fundamentals.score).toBe(20); + }); + + it('should extract JSON embedded in markdown code block', () => { + const json = JSON.stringify({ + overall_recommendation: 'strong_hire', + overall_score: 90, + category_scores: { + ai_fundamentals: { score: 23, notes: 'Excellent' }, + agent_frameworks: { score: 24, notes: 'Outstanding' }, + system_operations: { score: 22, notes: 'Very good' }, + business_communication: { score: 21, notes: 'Good' }, + }, + strengths: ['Deep knowledge'], + weaknesses: [], + notable_quotes: [], + detailed_assessment: 'Top candidate', + generated_at: Date.now(), + }); + + const result = extract_summary(makeMessage(`以下是评估报告:\n\`\`\`json\n${json}\n\`\`\``)); + expect(result.overall_recommendation).toBe('strong_hire'); + expect(result.overall_score).toBe(90); + }); + + it('should return fallback summary for invalid JSON', () => { + const result = extract_summary(makeMessage('这不是有效的 JSON')); + expect(result.overall_recommendation).toBe('no_hire'); + expect(result.overall_score).toBe(0); + expect(result.weaknesses).toContain('评估报告解析失败,请查看原始对话记录'); + }); + + it('should return fallback for empty content', () => { + const msg = { + id: 'msg_test', + type: 'message', + role: 'assistant', + model: 'test', + content: [], + stop_reason: 'end_turn', + stop_sequence: null, + usage: { input_tokens: 0, output_tokens: 0 }, + } as unknown as Anthropic.Message; + const result = extract_summary(msg); + expect(result.overall_recommendation).toBe('no_hire'); + expect(result.overall_score).toBe(0); + }); + + it('should return fallback for JSON without overall_recommendation', () => { + const result = extract_summary(makeMessage('{"foo": "bar"}')); + expect(result.overall_recommendation).toBe('no_hire'); + expect(result.overall_score).toBe(0); + }); + + it('should truncate detailed_assessment in fallback to 500 chars', () => { + const longText = 'A'.repeat(1000); + const result = extract_summary(makeMessage(longText)); + expect(result.detailed_assessment.length).toBeLessThanOrEqual(500); + }); + + it('should handle thinking blocks mixed with text', () => { + const json = JSON.stringify({ + overall_recommendation: 'no_hire', + overall_score: 45, + category_scores: { + ai_fundamentals: { score: 10, notes: 'Weak' }, + agent_frameworks: { score: 12, notes: 'Basic' }, + system_operations: { score: 13, notes: 'OK' }, + business_communication: { score: 10, notes: 'Poor' }, + }, + strengths: [], + weaknesses: ['Lacks depth'], + notable_quotes: [], + detailed_assessment: 'Not ready', + generated_at: Date.now(), + }); + + const msg = { + id: 'msg_test', + type: 'message', + role: 'assistant', + model: 'test', + content: [ + { type: 'thinking', thinking: 'Let me analyze...' }, + { type: 'text', text: json, citations: null }, + ], + stop_reason: 'end_turn', + stop_sequence: null, + usage: { input_tokens: 0, output_tokens: 0 }, + } as unknown as Anthropic.Message; + + const result = extract_summary(msg); + expect(result.overall_recommendation).toBe('no_hire'); + expect(result.overall_score).toBe(45); + }); +}); diff --git a/tests/parser.test.ts b/tests/parser.test.ts new file mode 100644 index 0000000..6922e4f --- /dev/null +++ b/tests/parser.test.ts @@ -0,0 +1,206 @@ +import { describe, it, expect, vi, beforeEach } from 'vitest'; + +// vi.hoisted runs before vi.mock hoisting +const { mockCreate } = vi.hoisted(() => ({ + mockCreate: vi.fn(), +})); + +// Mock config +vi.mock('../src/config.js', () => ({ + config: { + anthropic: { api_key: 'test', base_url: 'http://localhost', model: 'test-model' }, + telegram: { bot_token: 'test', admin_chat_id: 'test' }, + db: { path: ':memory:' }, + admin_locale: 'zh-CN', + interview: { research_lead_hours: 2 }, + }, +})); + +// Mock Anthropic SDK +vi.mock('@anthropic-ai/sdk', () => ({ + default: class { + messages = { create: mockCreate }; + }, +})); + +import { parse_schedule_request } from '../src/parser.js'; + +function makeResponse(text: string) { + return { content: [{ type: 'text', text }] }; +} + +describe('parse_schedule_request', () => { + beforeEach(() => { + mockCreate.mockReset(); + }); + + it('should parse a complete schedule request', async () => { + const futureDate = new Date(Date.now() + 86400_000 + 8 * 3600_000); + const cstStr = futureDate.toISOString().slice(0, 10) + ' 14:00'; + + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: '张三', + candidate_telegram_username: '@zhangsan', + scheduled_time_cst: cstStr, + duration_minutes: 45, + }))); + + const result = await parse_schedule_request('明天下午2点面试张三'); + expect(result.candidate_name).toBe('张三'); + expect(result.candidate_telegram_username).toBe('zhangsan'); + expect(result.scheduled_time).toBeTypeOf('number'); + expect(result.duration_minutes).toBe(45); + }); + + it('should handle partial response (name only)', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: '李四', + candidate_telegram_username: null, + scheduled_time_cst: null, + duration_minutes: null, + }))); + + const result = await parse_schedule_request('面试李四'); + expect(result.candidate_name).toBe('李四'); + expect(result.candidate_telegram_username).toBeUndefined(); + expect(result.scheduled_time).toBeUndefined(); + expect(result.duration_minutes).toBeUndefined(); + }); + + it('should return empty object when no JSON in response', async () => { + mockCreate.mockResolvedValue(makeResponse('抱歉,我无法理解您的请求。')); + const result = await parse_schedule_request('随便说点什么'); + expect(result).toEqual({}); + }); + + it('should return empty object for malformed JSON', async () => { + mockCreate.mockResolvedValue(makeResponse('{invalid json')); + const result = await parse_schedule_request('test'); + expect(result).toEqual({}); + }); + + it('should reject past scheduled_time', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: '王五', + candidate_telegram_username: null, + scheduled_time_cst: '2020-01-01 10:00', + duration_minutes: 30, + }))); + + const result = await parse_schedule_request('2020年面试王五'); + expect(result.candidate_name).toBe('王五'); + expect(result.scheduled_time).toBeUndefined(); + expect(result.duration_minutes).toBe(30); + }); + + it('should reject duration below 10', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: '赵六', + candidate_telegram_username: null, + scheduled_time_cst: null, + duration_minutes: 5, + }))); + + const result = await parse_schedule_request('面试赵六5分钟'); + expect(result.duration_minutes).toBeUndefined(); + }); + + it('should reject duration over 120', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: null, + candidate_telegram_username: null, + scheduled_time_cst: null, + duration_minutes: 200, + }))); + + const result = await parse_schedule_request('test'); + expect(result.duration_minutes).toBeUndefined(); + }); + + it('should handle empty content array', async () => { + mockCreate.mockResolvedValue({ content: [] }); + const result = await parse_schedule_request('test'); + expect(result).toEqual({}); + }); + + it('should strip @ from telegram username', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: 'Test', + candidate_telegram_username: '@testuser', + scheduled_time_cst: null, + duration_minutes: null, + }))); + + const result = await parse_schedule_request('test'); + expect(result.candidate_telegram_username).toBe('testuser'); + }); + + it('should handle non-string candidate_name', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: 123, + candidate_telegram_username: null, + scheduled_time_cst: null, + duration_minutes: null, + }))); + + const result = await parse_schedule_request('test'); + expect(result.candidate_name).toBeUndefined(); + }); + + it('should round float duration_minutes', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: null, + candidate_telegram_username: null, + scheduled_time_cst: null, + duration_minutes: 30.7, + }))); + + const result = await parse_schedule_request('test'); + expect(result.duration_minutes).toBe(31); + }); + + it('should handle JSON embedded in other text', async () => { + mockCreate.mockResolvedValue(makeResponse( + '好的,以下是解析结果:\n```json\n{"candidate_name": "嵌入测试", "candidate_telegram_username": null, "scheduled_time_cst": null, "duration_minutes": null}\n```' + )); + + const result = await parse_schedule_request('test'); + expect(result.candidate_name).toBe('嵌入测试'); + }); + + it('should reject invalid time format', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: null, + candidate_telegram_username: null, + scheduled_time_cst: '明天下午三点', + duration_minutes: null, + }))); + + const result = await parse_schedule_request('test'); + expect(result.scheduled_time).toBeUndefined(); + }); + + it('should trim whitespace from candidate_name', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: ' 张三 ', + candidate_telegram_username: null, + scheduled_time_cst: null, + duration_minutes: null, + }))); + + const result = await parse_schedule_request('test'); + expect(result.candidate_name).toBe('张三'); + }); + + it('should trim whitespace from telegram username', async () => { + mockCreate.mockResolvedValue(makeResponse(JSON.stringify({ + candidate_name: null, + candidate_telegram_username: ' @user ', + scheduled_time_cst: null, + duration_minutes: null, + }))); + + const result = await parse_schedule_request('test'); + expect(result.candidate_telegram_username).toBe('user'); + }); +}); diff --git a/tests/scheduler.test.ts b/tests/scheduler.test.ts new file mode 100644 index 0000000..9f58476 --- /dev/null +++ b/tests/scheduler.test.ts @@ -0,0 +1,82 @@ +import { describe, it, expect, vi } from 'vitest'; + +// Mock config +vi.mock('../src/config.js', () => ({ + config: { + anthropic: { api_key: 'test', base_url: 'http://localhost', model: 'test-model' }, + telegram: { bot_token: 'test', admin_chat_id: 'test' }, + db: { path: ':memory:' }, + admin_locale: 'zh-CN', + interview: { research_lead_hours: 2 }, + }, +})); + +// Mock db module (scheduler imports it) +vi.mock('../src/db.js', () => ({ + get_due_interviews: vi.fn(() => []), + get_pending_for_research: vi.fn(() => []), + update_interview_status: vi.fn(), +})); + +// Mock researcher +vi.mock('../src/researcher.js', () => ({ + research_candidate: vi.fn(), +})); + +// Mock interviewer +vi.mock('../src/interviewer.js', () => ({ + send_opening_message: vi.fn(), +})); + +// Mock grammy Bot +vi.mock('grammy', () => ({ + Bot: class { + api = { sendMessage: vi.fn() }; + }, +})); + +// Mock i18n +vi.mock('../src/i18n/index.js', () => ({ + t: vi.fn((_key: string, _lng: string, _vars?: Record) => 'mocked'), + SUPPORTED_LANGS: ['zh-CN', 'en-US'], +})); + +import { fmt_time } from '../src/scheduler.js'; + +describe('fmt_time', () => { + it('should format timestamp in zh-CN locale', () => { + // 2026-01-15 10:30:00 UTC = 2026-01-15 18:30:00 CST + const ts = Date.UTC(2026, 0, 15, 10, 30, 0); + const result = fmt_time(ts, 'zh-CN'); + + // Should contain date and time in Chinese format + expect(result).toContain('2026'); + expect(result).toContain('1'); + expect(result).toContain('15'); + }); + + it('should format timestamp in en-US locale', () => { + const ts = Date.UTC(2026, 0, 15, 10, 30, 0); + const result = fmt_time(ts, 'en-US'); + + expect(result).toContain('2026'); + }); + + it('should always use CST timezone (Asia/Shanghai)', () => { + // Midnight UTC = 8:00 AM CST + const ts = Date.UTC(2026, 5, 1, 0, 0, 0); + const result = fmt_time(ts, 'zh-CN'); + + // Should show 8:00 (CST), not 0:00 (UTC) + expect(result).toContain('8'); + }); + + it('should handle different dates correctly', () => { + // 2026-12-31 23:00 UTC = 2027-01-01 07:00 CST (date crosses midnight) + const ts = Date.UTC(2026, 11, 31, 23, 0, 0); + const result = fmt_time(ts, 'zh-CN'); + + // Should show January 1, 2027 in CST + expect(result).toContain('2027'); + }); +}); diff --git a/tsconfig.test.json b/tsconfig.test.json new file mode 100644 index 0000000..efc81b3 --- /dev/null +++ b/tsconfig.test.json @@ -0,0 +1,8 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "rootDir": ".", + "noEmit": true + }, + "include": ["src/**/*", "tests/**/*"] +} diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 0000000..a5390a8 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,14 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + globals: true, + environment: 'node', + include: ['tests/**/*.test.ts'], + coverage: { + provider: 'v8', + include: ['src/**/*.ts'], + exclude: ['tests/**/*.test.ts', 'src/bot.ts'], + }, + }, +});