foliko 1.0.73 → 1.0.75
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/.agent/.shared/ui-ux-pro-max/data/charts.csv +26 -0
- package/.agent/.shared/ui-ux-pro-max/data/colors.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/icons.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/landing.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/data/products.csv +97 -0
- package/.agent/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
- package/.agent/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
- package/.agent/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
- package/.agent/.shared/ui-ux-pro-max/data/styles.csv +59 -0
- package/.agent/.shared/ui-ux-pro-max/data/typography.csv +58 -0
- package/.agent/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
- package/.agent/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
- package/.agent/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/core.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-313.pyc +0 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/core.py +258 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
- package/.agent/.shared/ui-ux-pro-max/scripts/search.py +106 -0
- package/.agent/ARCHITECTURE.md +288 -0
- package/.agent/agents/ambient-agent.md +57 -0
- package/.agent/agents/debugger.md +55 -0
- package/.agent/agents/email-assistant.md +49 -0
- package/.agent/agents/file-manager.md +42 -0
- package/.agent/agents/python-developer.md +60 -0
- package/.agent/agents/scheduler.md +59 -0
- package/.agent/agents/web-developer.md +45 -0
- package/.agent/data/default.json +29 -0
- package/.agent/data/plugins-state.json +255 -0
- package/.agent/mcp_config.json +4 -0
- package/.agent/mcp_config_updated.json +12 -0
- package/.agent/plugins.json +5 -0
- package/.agent/rules/GEMINI.md +273 -0
- package/.agent/rules/allow-rule.md +77 -0
- package/.agent/rules/log-rule.md +83 -0
- package/.agent/rules/security-rule.md +93 -0
- package/.agent/scripts/auto_preview.py +148 -0
- package/.agent/scripts/checklist.py +217 -0
- package/.agent/scripts/session_manager.py +120 -0
- package/.agent/scripts/verify_all.py +327 -0
- package/.agent/skills/api-patterns/SKILL.md +81 -0
- package/.agent/skills/api-patterns/api-style.md +42 -0
- package/.agent/skills/api-patterns/auth.md +24 -0
- package/.agent/skills/api-patterns/documentation.md +26 -0
- package/.agent/skills/api-patterns/graphql.md +41 -0
- package/.agent/skills/api-patterns/rate-limiting.md +31 -0
- package/.agent/skills/api-patterns/response.md +37 -0
- package/.agent/skills/api-patterns/rest.md +40 -0
- package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
- package/.agent/skills/api-patterns/security-testing.md +122 -0
- package/.agent/skills/api-patterns/trpc.md +41 -0
- package/.agent/skills/api-patterns/versioning.md +22 -0
- package/.agent/skills/app-builder/SKILL.md +75 -0
- package/.agent/skills/app-builder/agent-coordination.md +71 -0
- package/.agent/skills/app-builder/feature-building.md +53 -0
- package/.agent/skills/app-builder/project-detection.md +34 -0
- package/.agent/skills/app-builder/scaffolding.md +118 -0
- package/.agent/skills/app-builder/tech-stack.md +40 -0
- package/.agent/skills/app-builder/templates/SKILL.md +39 -0
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
- package/.agent/skills/architecture/SKILL.md +55 -0
- package/.agent/skills/architecture/context-discovery.md +43 -0
- package/.agent/skills/architecture/examples.md +94 -0
- package/.agent/skills/architecture/pattern-selection.md +68 -0
- package/.agent/skills/architecture/patterns-reference.md +50 -0
- package/.agent/skills/architecture/trade-off-analysis.md +77 -0
- package/.agent/skills/clean-code/SKILL.md +201 -0
- package/.agent/skills/doc.md +177 -0
- package/.agent/skills/frontend-design/SKILL.md +418 -0
- package/.agent/skills/frontend-design/animation-guide.md +331 -0
- package/.agent/skills/frontend-design/color-system.md +311 -0
- package/.agent/skills/frontend-design/decision-trees.md +418 -0
- package/.agent/skills/frontend-design/motion-graphics.md +306 -0
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/.agent/skills/frontend-design/typography-system.md +345 -0
- package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
- package/.agent/skills/frontend-design/visual-effects.md +383 -0
- package/.agent/skills/i18n-localization/SKILL.md +154 -0
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/.agent/skills/mcp-builder/SKILL.md +176 -0
- package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
- package/.agent/workflows/brainstorm.md +113 -0
- package/.agent/workflows/create.md +59 -0
- package/.agent/workflows/debug.md +103 -0
- package/.agent/workflows/deploy.md +176 -0
- package/.agent/workflows/enhance.md +63 -0
- package/.agent/workflows/orchestrate.md +237 -0
- package/.agent/workflows/plan.md +89 -0
- package/.agent/workflows/preview.md +81 -0
- package/.agent/workflows/simple-test.md +42 -0
- package/.agent/workflows/status.md +86 -0
- package/.agent/workflows/structured-orchestrate.md +180 -0
- package/.agent/workflows/test.md +144 -0
- package/.agent/workflows/ui-ux-pro-max.md +296 -0
- package/.claude/settings.local.json +157 -149
- package/.editorconfig +56 -0
- package/.husky/pre-commit +4 -0
- package/.lintstagedrc +7 -0
- package/.prettierignore +29 -0
- package/.prettierrc +11 -0
- package/CLAUDE.md +2 -0
- package/README.md +64 -55
- package/SPEC.md +102 -61
- package/cli/bin/foliko.js +4 -4
- package/cli/src/commands/chat.js +53 -51
- package/cli/src/commands/list.js +40 -37
- package/cli/src/index.js +18 -18
- package/cli/src/ui/chat-ui.js +78 -76
- package/cli/src/utils/ansi.js +15 -15
- package/cli/src/utils/markdown.js +112 -116
- package/docker-compose.yml +1 -1
- package/docs/ai-sdk-optimization.md +655 -636
- package/docs/features.md +80 -80
- package/docs/quick-reference.md +49 -46
- package/docs/user-manual.md +411 -380
- package/examples/ambient-example.js +95 -97
- package/examples/basic.js +115 -110
- package/examples/bootstrap.js +52 -43
- package/examples/mcp-example.js +56 -53
- package/examples/skill-example.js +49 -49
- package/examples/test-chat.js +60 -58
- package/examples/test-mcp.js +49 -43
- package/examples/test-reload.js +38 -40
- package/examples/test-telegram.js +3 -3
- package/examples/test-tg-bot.js +7 -4
- package/examples/test-tg-simple.js +4 -3
- package/examples/test-tg.js +3 -3
- package/examples/test-think.js +13 -7
- package/examples/test-web-plugin.js +61 -56
- package/examples/test-weixin-feishu.js +40 -37
- package/examples/workflow.js +49 -49
- package/foliko-1.0.75.tgz +0 -0
- package/package.json +37 -3
- package/plugins/ai-plugin.js +7 -5
- package/plugins/ambient-agent/EventWatcher.js +113 -0
- package/plugins/ambient-agent/ExplorerLoop.js +640 -0
- package/plugins/ambient-agent/GoalManager.js +197 -0
- package/plugins/ambient-agent/Reflector.js +95 -0
- package/plugins/ambient-agent/StateStore.js +90 -0
- package/plugins/ambient-agent/constants.js +101 -0
- package/plugins/ambient-agent/index.js +579 -0
- package/plugins/default-plugins.js +62 -49
- package/plugins/email/constants.js +64 -0
- package/plugins/email/handlers.js +461 -0
- package/plugins/email/index.js +278 -0
- package/plugins/email/monitor.js +269 -0
- package/plugins/email/parser.js +138 -0
- package/plugins/email/reply.js +151 -0
- package/plugins/email/utils.js +124 -0
- package/plugins/feishu-plugin.js +23 -19
- package/plugins/file-system-plugin.js +469 -120
- package/plugins/install-plugin.js +6 -4
- package/plugins/python-executor-plugin.js +3 -1
- package/plugins/python-plugin-loader.js +10 -8
- package/plugins/rules-plugin.js +5 -3
- package/plugins/scheduler-plugin.js +18 -16
- package/plugins/session-plugin.js +3 -1
- package/plugins/storage-plugin.js +5 -3
- package/plugins/subagent-plugin.js +152 -92
- package/plugins/telegram-plugin.js +26 -19
- package/plugins/think-plugin.js +4 -2
- package/plugins/tools-plugin.js +3 -1
- package/plugins/web-plugin.js +15 -13
- package/plugins/weixin-plugin.js +43 -36
- package/reports/system-health-report-20260401.md +79 -0
- package/skills/ambient-agent/SKILL.md +49 -39
- package/skills/foliko-dev/AGENTS.md +64 -61
- package/skills/foliko-dev/SKILL.md +125 -119
- package/skills/mcp-usage/SKILL.md +19 -17
- package/skills/python-plugin-dev/SKILL.md +16 -15
- package/skills/skill-guide/SKILL.md +12 -12
- package/skills/subagent-guide/SKILL.md +237 -0
- package/skills/workflow-guide/SKILL.md +90 -45
- package/skills/workflow-troubleshooting/DEBUGGING.md +36 -21
- package/skills/workflow-troubleshooting/SKILL.md +156 -79
- package/src/capabilities/index.js +4 -4
- package/src/capabilities/skill-manager.js +211 -197
- package/src/capabilities/workflow-engine.js +461 -547
- package/src/core/agent-chat.js +426 -279
- package/src/core/agent.js +453 -248
- package/src/core/framework.js +183 -149
- package/src/core/index.js +8 -8
- package/src/core/plugin-base.js +52 -52
- package/src/core/plugin-manager.js +377 -281
- package/src/core/provider.js +35 -32
- package/src/core/sub-agent-config.js +264 -0
- package/src/core/system-prompt-builder.js +120 -0
- package/src/core/tool-registry.js +416 -33
- package/src/core/tool-router.js +149 -68
- package/src/executors/executor-base.js +58 -58
- package/src/executors/mcp-executor.js +269 -257
- package/src/index.js +5 -17
- package/src/utils/circuit-breaker.js +301 -0
- package/src/utils/error-boundary.js +363 -0
- package/src/utils/error.js +374 -0
- package/src/utils/event-emitter.js +20 -20
- package/src/utils/id.js +133 -0
- package/src/utils/index.js +217 -3
- package/src/utils/logger.js +181 -0
- package/src/utils/plugin-helpers.js +90 -0
- package/src/utils/retry.js +122 -0
- package/src/utils/sandbox.js +292 -0
- package/test/tool-registry-validation.test.js +218 -0
- package/test_report.md +70 -0
- package/website/docs/api.html +169 -107
- package/website/docs/configuration.html +296 -144
- package/website/docs/plugin-development.html +154 -85
- package/website/docs/project-structure.html +110 -109
- package/website/docs/skill-development.html +117 -61
- package/website/index.html +209 -205
- package/website/script.js +20 -17
- package/website/styles.css +1 -1
- package/plugins/ambient-agent-plugin.js +0 -1565
- package/plugins/email.js +0 -1142
|
@@ -1,57 +1,125 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="zh-CN">
|
|
3
|
-
<head>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>配置指南 - Foliko</title>
|
|
7
|
+
<link rel="stylesheet" href="../styles.css" />
|
|
8
|
+
<style>
|
|
9
|
+
.sidebar {
|
|
10
|
+
position: fixed;
|
|
11
|
+
left: 0;
|
|
12
|
+
top: 60px;
|
|
13
|
+
width: 250px;
|
|
14
|
+
height: calc(100vh - 60px);
|
|
15
|
+
background: var(--bg-card);
|
|
16
|
+
border-right: 1px solid var(--border);
|
|
17
|
+
padding: 2rem 1rem;
|
|
18
|
+
overflow-y: auto;
|
|
19
|
+
}
|
|
20
|
+
.sidebar ul {
|
|
21
|
+
list-style: none;
|
|
22
|
+
}
|
|
23
|
+
.sidebar li {
|
|
24
|
+
margin-bottom: 0.5rem;
|
|
25
|
+
}
|
|
26
|
+
.sidebar a {
|
|
27
|
+
color: var(--text-secondary);
|
|
28
|
+
text-decoration: none;
|
|
29
|
+
display: block;
|
|
30
|
+
padding: 0.5rem;
|
|
31
|
+
border-radius: 4px;
|
|
32
|
+
}
|
|
33
|
+
.sidebar a:hover,
|
|
34
|
+
.sidebar a.active {
|
|
35
|
+
background: rgba(99, 102, 241, 0.2);
|
|
36
|
+
color: var(--primary);
|
|
37
|
+
}
|
|
38
|
+
.main-content {
|
|
39
|
+
margin-left: 250px;
|
|
40
|
+
padding: 2rem;
|
|
41
|
+
max-width: 900px;
|
|
42
|
+
}
|
|
43
|
+
.main-content h1 {
|
|
44
|
+
font-size: 2rem;
|
|
45
|
+
margin-bottom: 1rem;
|
|
46
|
+
}
|
|
47
|
+
.main-content h2 {
|
|
48
|
+
font-size: 1.5rem;
|
|
49
|
+
margin: 2rem 0 1rem;
|
|
50
|
+
color: var(--secondary);
|
|
51
|
+
}
|
|
52
|
+
.main-content p {
|
|
53
|
+
margin-bottom: 1rem;
|
|
54
|
+
color: var(--text-secondary);
|
|
55
|
+
}
|
|
56
|
+
.main-content pre {
|
|
57
|
+
background: var(--bg-card);
|
|
58
|
+
padding: 1rem;
|
|
59
|
+
border-radius: 8px;
|
|
60
|
+
overflow-x: auto;
|
|
61
|
+
margin-bottom: 1rem;
|
|
62
|
+
}
|
|
63
|
+
.main-content code {
|
|
64
|
+
font-family: 'Fira Code', monospace;
|
|
65
|
+
background: var(--bg-dark);
|
|
66
|
+
padding: 0.2rem 0.4rem;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
}
|
|
69
|
+
table {
|
|
70
|
+
width: 100%;
|
|
71
|
+
border-collapse: collapse;
|
|
72
|
+
margin-bottom: 1rem;
|
|
73
|
+
}
|
|
74
|
+
th,
|
|
75
|
+
td {
|
|
76
|
+
padding: 0.75rem;
|
|
77
|
+
text-align: left;
|
|
78
|
+
border: 1px solid var(--border);
|
|
79
|
+
}
|
|
80
|
+
th {
|
|
81
|
+
background: var(--bg-card);
|
|
82
|
+
color: var(--secondary);
|
|
83
|
+
}
|
|
84
|
+
@media (max-width: 768px) {
|
|
85
|
+
.sidebar {
|
|
86
|
+
display: none;
|
|
87
|
+
}
|
|
88
|
+
.main-content {
|
|
89
|
+
margin-left: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
93
|
+
</head>
|
|
94
|
+
<body>
|
|
95
|
+
<header>
|
|
96
|
+
<nav>
|
|
97
|
+
<div class="logo">Foliko</div>
|
|
98
|
+
<ul class="nav-links">
|
|
99
|
+
<li><a href="../index.html">首页</a></li>
|
|
100
|
+
<li><a href="../index.html#features">特性</a></li>
|
|
101
|
+
<li><a href="../index.html#quickstart">快速开始</a></li>
|
|
102
|
+
<li><a href="../index.html#docs">文档</a></li>
|
|
103
|
+
</ul>
|
|
104
|
+
</nav>
|
|
105
|
+
</header>
|
|
38
106
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
107
|
+
<div class="sidebar">
|
|
108
|
+
<ul>
|
|
109
|
+
<li><a href="project-structure.html">项目结构</a></li>
|
|
110
|
+
<li><a href="configuration.html" class="active">配置指南</a></li>
|
|
111
|
+
<li><a href="plugin-development.html">插件开发</a></li>
|
|
112
|
+
<li><a href="skill-development.html">技能开发</a></li>
|
|
113
|
+
<li><a href="api.html">API 参考</a></li>
|
|
114
|
+
</ul>
|
|
115
|
+
</div>
|
|
48
116
|
|
|
49
|
-
|
|
50
|
-
|
|
117
|
+
<div class="main-content">
|
|
118
|
+
<h1>配置指南</h1>
|
|
51
119
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
120
|
+
<h2>环境变量配置 (.env)</h2>
|
|
121
|
+
<p>在项目根目录创建 <code>.env</code> 文件:</p>
|
|
122
|
+
<pre><code># AI Provider: minimax, deepseek, openai, anthropic 等
|
|
55
123
|
FOLIKO_PROVIDER=minimax
|
|
56
124
|
|
|
57
125
|
# AI Model(可选,不填则使用 provider 默认值)
|
|
@@ -70,11 +138,11 @@ FOLIKO_API_KEY=
|
|
|
70
138
|
# Provider 专用 API Key(可选)
|
|
71
139
|
DEEPSEEK_API_KEY=sk-your-deepseek-api-key
|
|
72
140
|
MINIMAX_API_KEY=sk-your-minimax-api-key</code></pre>
|
|
73
|
-
|
|
141
|
+
<p><strong>配置优先级</strong>:命令行参数 > .env配置 > provider默认值</p>
|
|
74
142
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
143
|
+
<h2>目录结构</h2>
|
|
144
|
+
<p>在项目根目录创建 <code>.agent</code> 目录:</p>
|
|
145
|
+
<pre><code>项目目录/
|
|
78
146
|
└── .agent/
|
|
79
147
|
├── config # 配置文件
|
|
80
148
|
├── ai.json # AI 配置
|
|
@@ -83,25 +151,25 @@ MINIMAX_API_KEY=sk-your-minimax-api-key</code></pre>
|
|
|
83
151
|
├── skills/ # 用户技能
|
|
84
152
|
└── data/ # 数据目录</code></pre>
|
|
85
153
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
154
|
+
<h2>config 文件</h2>
|
|
155
|
+
<p>简单的 key=value 格式配置:</p>
|
|
156
|
+
<pre><code>ai_key: your-api-key
|
|
89
157
|
ai_model: MiniMax-M2.7
|
|
90
158
|
ai_provider: minimax
|
|
91
159
|
ai_base_url: https://api.minimaxi.com/v1</code></pre>
|
|
92
160
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
161
|
+
<h2>ai.json</h2>
|
|
162
|
+
<p>JSON 格式的 AI 配置:</p>
|
|
163
|
+
<pre><code>{
|
|
96
164
|
"provider": "minimax",
|
|
97
165
|
"model": "MiniMax-M2.7",
|
|
98
166
|
"apiKey": "your-api-key",
|
|
99
167
|
"baseURL": "https://api.minimaxi.com/v1"
|
|
100
168
|
}</code></pre>
|
|
101
169
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
170
|
+
<h2>mcp_config.json</h2>
|
|
171
|
+
<p>MCP 服务器配置:</p>
|
|
172
|
+
<pre><code>{
|
|
105
173
|
"mcpServers": {
|
|
106
174
|
"fetch": {
|
|
107
175
|
"command": "npx",
|
|
@@ -114,38 +182,38 @@ ai_base_url: https://api.minimaxi.com/v1</code></pre>
|
|
|
114
182
|
}
|
|
115
183
|
}</code></pre>
|
|
116
184
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
185
|
+
<h2>CLI 参数</h2>
|
|
186
|
+
<p>命令行参数会覆盖 .env 配置:</p>
|
|
187
|
+
<table>
|
|
188
|
+
<tr>
|
|
189
|
+
<th>参数</th>
|
|
190
|
+
<th>说明</th>
|
|
191
|
+
<th>示例</th>
|
|
192
|
+
</tr>
|
|
193
|
+
<tr>
|
|
194
|
+
<td><code>--provider</code></td>
|
|
195
|
+
<td>指定 AI 提供商</td>
|
|
196
|
+
<td><code>deepseek</code>, <code>minimax</code></td>
|
|
197
|
+
</tr>
|
|
198
|
+
<tr>
|
|
199
|
+
<td><code>--model</code></td>
|
|
200
|
+
<td>指定 AI 模型</td>
|
|
201
|
+
<td><code>deepseek-chat</code>, <code>MiniMax-M2.7</code></td>
|
|
202
|
+
</tr>
|
|
203
|
+
<tr>
|
|
204
|
+
<td><code>--base-url</code></td>
|
|
205
|
+
<td>指定 API 地址</td>
|
|
206
|
+
<td><code>https://api.deepseek.com/v1</code></td>
|
|
207
|
+
</tr>
|
|
208
|
+
<tr>
|
|
209
|
+
<td><code>--api-key</code></td>
|
|
210
|
+
<td>指定 API 密钥</td>
|
|
211
|
+
<td><code>sk-xxx</code></td>
|
|
212
|
+
</tr>
|
|
213
|
+
</table>
|
|
146
214
|
|
|
147
|
-
|
|
148
|
-
|
|
215
|
+
<h3>使用示例</h3>
|
|
216
|
+
<pre><code># 使用 .env 中的配置
|
|
149
217
|
npm run chat
|
|
150
218
|
|
|
151
219
|
# 指定完整配置
|
|
@@ -157,10 +225,10 @@ foliko chat --provider deepseek --api-key sk-xxx
|
|
|
157
225
|
# 只指定 api-key(使用 FOLIKO_PROVIDER 设定的 provider)
|
|
158
226
|
foliko chat --api-key sk-xxx</code></pre>
|
|
159
227
|
|
|
160
|
-
|
|
228
|
+
<h2>插件配置</h2>
|
|
161
229
|
|
|
162
|
-
|
|
163
|
-
|
|
230
|
+
<h3>Telegram 插件</h3>
|
|
231
|
+
<pre><code>{
|
|
164
232
|
"telegram": {
|
|
165
233
|
"botToken": "your-bot-token",
|
|
166
234
|
"allowedChats": ["123456789"],
|
|
@@ -168,31 +236,67 @@ foliko chat --api-key sk-xxx</code></pre>
|
|
|
168
236
|
"prefix": "/"
|
|
169
237
|
}
|
|
170
238
|
}</code></pre>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
239
|
+
<table>
|
|
240
|
+
<tr>
|
|
241
|
+
<th>配置项</th>
|
|
242
|
+
<th>说明</th>
|
|
243
|
+
<th>默认值</th>
|
|
244
|
+
</tr>
|
|
245
|
+
<tr>
|
|
246
|
+
<td>botToken</td>
|
|
247
|
+
<td>Telegram Bot Token</td>
|
|
248
|
+
<td>TELEGRAM_BOT_TOKEN 环境变量</td>
|
|
249
|
+
</tr>
|
|
250
|
+
<tr>
|
|
251
|
+
<td>allowedChats</td>
|
|
252
|
+
<td>允许的聊天 ID 数组</td>
|
|
253
|
+
<td>[] (允许所有人)</td>
|
|
254
|
+
</tr>
|
|
255
|
+
<tr>
|
|
256
|
+
<td>groupMode</td>
|
|
257
|
+
<td>是否启用群组模式</td>
|
|
258
|
+
<td>false</td>
|
|
259
|
+
</tr>
|
|
260
|
+
<tr>
|
|
261
|
+
<td>prefix</td>
|
|
262
|
+
<td>命令前缀</td>
|
|
263
|
+
<td>/</td>
|
|
264
|
+
</tr>
|
|
265
|
+
</table>
|
|
178
266
|
|
|
179
|
-
|
|
180
|
-
|
|
267
|
+
<h3>WeChat 插件</h3>
|
|
268
|
+
<pre><code>{
|
|
181
269
|
"weixin": {
|
|
182
270
|
"forceLogin": false,
|
|
183
271
|
"qrcodeTerminal": true,
|
|
184
272
|
"allowedUsers": []
|
|
185
273
|
}
|
|
186
274
|
}</code></pre>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
275
|
+
<table>
|
|
276
|
+
<tr>
|
|
277
|
+
<th>配置项</th>
|
|
278
|
+
<th>说明</th>
|
|
279
|
+
<th>默认值</th>
|
|
280
|
+
</tr>
|
|
281
|
+
<tr>
|
|
282
|
+
<td>forceLogin</td>
|
|
283
|
+
<td>强制重新扫码登录</td>
|
|
284
|
+
<td>false</td>
|
|
285
|
+
</tr>
|
|
286
|
+
<tr>
|
|
287
|
+
<td>qrcodeTerminal</td>
|
|
288
|
+
<td>终端渲染二维码</td>
|
|
289
|
+
<td>true</td>
|
|
290
|
+
</tr>
|
|
291
|
+
<tr>
|
|
292
|
+
<td>allowedUsers</td>
|
|
293
|
+
<td>允许的用户 ID 数组</td>
|
|
294
|
+
<td>[] (允许所有人)</td>
|
|
295
|
+
</tr>
|
|
296
|
+
</table>
|
|
193
297
|
|
|
194
|
-
|
|
195
|
-
|
|
298
|
+
<h3>Session 插件</h3>
|
|
299
|
+
<pre><code>{
|
|
196
300
|
"session": {
|
|
197
301
|
"sessionTTL": 1800000,
|
|
198
302
|
"maxSessions": 100,
|
|
@@ -201,44 +305,92 @@ foliko chat --api-key sk-xxx</code></pre>
|
|
|
201
305
|
"cleanupInterval": 300000
|
|
202
306
|
}
|
|
203
307
|
}</code></pre>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
308
|
+
<table>
|
|
309
|
+
<tr>
|
|
310
|
+
<th>配置项</th>
|
|
311
|
+
<th>说明</th>
|
|
312
|
+
<th>默认值</th>
|
|
313
|
+
</tr>
|
|
314
|
+
<tr>
|
|
315
|
+
<td>sessionTTL</td>
|
|
316
|
+
<td>会话过期时间(毫秒)</td>
|
|
317
|
+
<td>30分钟</td>
|
|
318
|
+
</tr>
|
|
319
|
+
<tr>
|
|
320
|
+
<td>maxSessions</td>
|
|
321
|
+
<td>最大会话数</td>
|
|
322
|
+
<td>100</td>
|
|
323
|
+
</tr>
|
|
324
|
+
<tr>
|
|
325
|
+
<td>maxHistoryLength</td>
|
|
326
|
+
<td>最大历史消息数</td>
|
|
327
|
+
<td>50</td>
|
|
328
|
+
</tr>
|
|
329
|
+
<tr>
|
|
330
|
+
<td>autoCleanup</td>
|
|
331
|
+
<td>自动清理过期会话</td>
|
|
332
|
+
<td>true</td>
|
|
333
|
+
</tr>
|
|
334
|
+
<tr>
|
|
335
|
+
<td>cleanupInterval</td>
|
|
336
|
+
<td>清理检查间隔(毫秒)</td>
|
|
337
|
+
<td>5分钟</td>
|
|
338
|
+
</tr>
|
|
339
|
+
</table>
|
|
212
340
|
|
|
213
|
-
|
|
214
|
-
|
|
341
|
+
<h3>Storage 插件</h3>
|
|
342
|
+
<pre><code>{
|
|
215
343
|
"storage": {
|
|
216
344
|
"type": "json",
|
|
217
345
|
"path": ".agent/data",
|
|
218
346
|
"namespace": "default"
|
|
219
347
|
}
|
|
220
348
|
}</code></pre>
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
349
|
+
<table>
|
|
350
|
+
<tr>
|
|
351
|
+
<th>配置项</th>
|
|
352
|
+
<th>说明</th>
|
|
353
|
+
<th>默认值</th>
|
|
354
|
+
</tr>
|
|
355
|
+
<tr>
|
|
356
|
+
<td>type</td>
|
|
357
|
+
<td>存储类型 (json/memory)</td>
|
|
358
|
+
<td>json</td>
|
|
359
|
+
</tr>
|
|
360
|
+
<tr>
|
|
361
|
+
<td>path</td>
|
|
362
|
+
<td>存储文件路径</td>
|
|
363
|
+
<td>.agent/data</td>
|
|
364
|
+
</tr>
|
|
365
|
+
<tr>
|
|
366
|
+
<td>namespace</td>
|
|
367
|
+
<td>命名空间</td>
|
|
368
|
+
<td>default</td>
|
|
369
|
+
</tr>
|
|
370
|
+
</table>
|
|
227
371
|
|
|
228
|
-
|
|
229
|
-
|
|
372
|
+
<h3>Scheduler 插件</h3>
|
|
373
|
+
<pre><code>{
|
|
230
374
|
"scheduler": {
|
|
231
375
|
"checkInterval": 1000
|
|
232
376
|
}
|
|
233
377
|
}</code></pre>
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
378
|
+
<table>
|
|
379
|
+
<tr>
|
|
380
|
+
<th>配置项</th>
|
|
381
|
+
<th>说明</th>
|
|
382
|
+
<th>默认值</th>
|
|
383
|
+
</tr>
|
|
384
|
+
<tr>
|
|
385
|
+
<td>checkInterval</td>
|
|
386
|
+
<td>任务检查间隔(毫秒)</td>
|
|
387
|
+
<td>1000</td>
|
|
388
|
+
</tr>
|
|
389
|
+
</table>
|
|
238
390
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
391
|
+
<h3>Email 插件</h3>
|
|
392
|
+
<p>通过环境变量配置:</p>
|
|
393
|
+
<pre><code># SMTP 配置 (发送邮件)
|
|
242
394
|
SMTP_HOST=smtp.gmail.com
|
|
243
395
|
SMTP_PORT=587
|
|
244
396
|
SMTP_SECURE=false
|
|
@@ -254,9 +406,9 @@ IMAP_PASS=your-app-password
|
|
|
254
406
|
# 默认发件人
|
|
255
407
|
FROM_EMAIL=your-email@gmail.com</code></pre>
|
|
256
408
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
409
|
+
<h3>MCP 配置</h3>
|
|
410
|
+
<p>在 <code>.agent/mcp_config.json</code> 中配置 MCP 服务器:</p>
|
|
411
|
+
<pre><code>{
|
|
260
412
|
"mcpServers": {
|
|
261
413
|
"fetch": {
|
|
262
414
|
"command": "npx",
|
|
@@ -268,6 +420,6 @@ FROM_EMAIL=your-email@gmail.com</code></pre>
|
|
|
268
420
|
}
|
|
269
421
|
}
|
|
270
422
|
}</code></pre>
|
|
271
|
-
|
|
272
|
-
</body>
|
|
423
|
+
</div>
|
|
424
|
+
</body>
|
|
273
425
|
</html>
|