@cuebot/skill 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # Cuebot - Cue 核心引擎
2
+
3
+ > Cue Skill 的核心实现库
4
+
5
+ ## 简介
6
+
7
+ Cuebot 是 Cue AI 研究助手的核心引擎,提供深度研究、智能监控、用户画像等功能。
8
+
9
+ ## 安装
10
+
11
+ ```bash
12
+ npm install cuebot
13
+ ```
14
+
15
+ ## 核心功能
16
+
17
+ | 模块 | 功能 |
18
+ |------|------|
19
+ | `api/cuecueClient.js` | Cuecue API 调用 |
20
+ | `core/backgroundExecutor.js` | 后台任务执行 |
21
+ | `core/taskManager.js` | 任务管理 |
22
+ | `core/monitorManager.js` | 监控管理 |
23
+ | `cron/monitor-daemon.js` | 监控守护进程 |
24
+ | `cron/research-worker.js` | 研究工作进程 |
25
+ | `notifier/index.js` | 通知发送 |
26
+
27
+ ## 使用
28
+
29
+ ```javascript
30
+ import { startResearch, autoDetectMode } from 'cuebot/src/api/cuecueClient.js';
31
+ import { startBackgroundResearch } from 'cuebot/src/core/backgroundExecutor.js';
32
+
33
+ // 启动研究
34
+ const taskId = await startBackgroundResearch({
35
+ topic: '宁德时代竞争优势',
36
+ chatId: 'ou_xxx',
37
+ apiKey: 'your-api-key'
38
+ });
39
+ ```
40
+
41
+ ## 环境变量
42
+
43
+ | 变量 | 必需 | 说明 |
44
+ |------|------|------|
45
+ | `CUECUE_API_KEY` | 是 | Cuecue API 密钥 |
46
+ | `TAVILY_API_KEY` | 否 | Tavily 搜索 API |
47
+
48
+ ## 用户画像
49
+
50
+ 自动创建 `~/.cuecue/{chatId}/profile.json`:
51
+
52
+ ```json
53
+ {
54
+ "name": "ou_xxx",
55
+ "role": "个人投资者",
56
+ "risk_tolerance": "中等",
57
+ "investment_style": "稳健",
58
+ "focus_industries": []
59
+ }
60
+ ```
61
+
62
+ ## 监控流程
63
+
64
+ ```
65
+ 搜索 → 内容不足?→ 浏览器获取 → 触发通知
66
+ ```
67
+
68
+ ## 版本
69
+
70
+ v1.0.5
71
+
72
+ ## License
73
+
74
+ Private
package/index.js ADDED
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Cue Core - AI Research Assistant Library
3
+ * @version 1.0.5
4
+ */
5
+
6
+ // API
7
+ export { startResearch, autoDetectMode, buildPrompt, buildPromptLayered, generateMonitorSuggestions } from './src/api/cuecueClient.js';
8
+
9
+ // Core
10
+ export { createTaskManager } from './src/core/taskManager.js';
11
+ export { createMonitorManager } from './src/core/monitorManager.js';
12
+ export { createUserState } from './src/core/userState.js';
13
+ export { createLogger } from './src/core/logger.js';
14
+ export { startBackgroundResearch } from './src/core/backgroundExecutor.js';
15
+
16
+ // Utils
17
+ export { getApiKey, setApiKey, detectServiceFromKey, getApiKeyStatus } from './src/utils/envUtils.js';
18
+ export { getUserDir, ensureDir, listJsonFiles } from './src/utils/fileUtils.js';
19
+ export { validateInput } from './src/utils/validators.js';
20
+ export { calculateSimilarity, evaluateSmartTrigger } from './src/utils/smartTrigger.js';
21
+ export { enqueueNotification, startNotificationProcessor } from './src/utils/notificationQueue.js';
22
+ export { isOpenClawGateway, registerCronTask } from './src/utils/openclawUtils.js';
23
+
24
+ // Cron
25
+ export { startMonitorDaemon } from './src/cron/monitor-daemon.js';
26
+
27
+ // Notifier
28
+ export { sendMessage, sendProgressNotification, sendResearchCompleteNotification } from './src/notifier/index.js';
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@cuebot/skill",
3
+ "version": "1.0.5",
4
+ "description": "Cue AI Research Assistant - Core Library",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "exports": {
8
+ ".": "./index.js",
9
+ "./api": "./src/api/cuecueClient.js",
10
+ "./core": "./src/core/index.js",
11
+ "./utils": "./src/utils/index.js"
12
+ },
13
+ "keywords": [
14
+ "cue",
15
+ "ai",
16
+ "research",
17
+ "assistant"
18
+ ],
19
+ "author": "Cue Team",
20
+ "license": "MIT",
21
+ "engines": {
22
+ "node": ">=18.0.0"
23
+ },
24
+ "dependencies": {
25
+ "fs-extra": "^11.2.0",
26
+ "node-cron": "^3.0.3"
27
+ }
28
+ }