foliko 1.0.75 → 1.0.76
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/.claude/settings.local.json +159 -157
- package/cli/bin/foliko.js +12 -12
- package/cli/src/commands/chat.js +143 -143
- package/cli/src/commands/list.js +93 -93
- package/cli/src/index.js +75 -75
- package/cli/src/ui/chat-ui.js +201 -201
- package/cli/src/utils/ansi.js +40 -40
- package/cli/src/utils/markdown.js +292 -292
- package/examples/ambient-example.js +194 -194
- package/examples/basic.js +115 -115
- package/examples/bootstrap.js +121 -121
- package/examples/mcp-example.js +56 -56
- package/examples/skill-example.js +49 -49
- package/examples/test-chat.js +137 -137
- package/examples/test-mcp.js +85 -85
- package/examples/test-reload.js +59 -59
- package/examples/test-telegram.js +50 -50
- package/examples/test-tg-bot.js +45 -45
- package/examples/test-tg-simple.js +47 -47
- package/examples/test-tg.js +62 -62
- package/examples/test-think.js +43 -43
- package/examples/test-web-plugin.js +103 -103
- package/examples/test-weixin-feishu.js +103 -103
- package/examples/workflow.js +158 -158
- package/package.json +1 -1
- package/plugins/ai-plugin.js +102 -102
- package/plugins/ambient-agent/EventWatcher.js +113 -113
- package/plugins/ambient-agent/ExplorerLoop.js +640 -640
- package/plugins/ambient-agent/GoalManager.js +197 -197
- package/plugins/ambient-agent/Reflector.js +95 -95
- package/plugins/ambient-agent/StateStore.js +90 -90
- package/plugins/ambient-agent/constants.js +101 -101
- package/plugins/ambient-agent/index.js +579 -579
- package/plugins/audit-plugin.js +187 -187
- package/plugins/default-plugins.js +662 -662
- package/plugins/email/constants.js +64 -64
- package/plugins/email/handlers.js +461 -461
- package/plugins/email/index.js +278 -278
- package/plugins/email/monitor.js +269 -269
- package/plugins/email/parser.js +138 -138
- package/plugins/email/reply.js +151 -151
- package/plugins/email/utils.js +124 -124
- package/plugins/feishu-plugin.js +481 -481
- package/plugins/file-system-plugin.js +826 -826
- package/plugins/install-plugin.js +199 -199
- package/plugins/python-executor-plugin.js +367 -367
- package/plugins/python-plugin-loader.js +481 -481
- package/plugins/rules-plugin.js +294 -294
- package/plugins/scheduler-plugin.js +691 -691
- package/plugins/session-plugin.js +369 -369
- package/plugins/shell-executor-plugin.js +197 -197
- package/plugins/storage-plugin.js +240 -240
- package/plugins/subagent-plugin.js +845 -845
- package/plugins/telegram-plugin.js +482 -482
- package/plugins/think-plugin.js +345 -345
- package/plugins/tools-plugin.js +196 -196
- package/plugins/web-plugin.js +606 -606
- package/plugins/weixin-plugin.js +545 -545
- package/src/capabilities/index.js +11 -11
- package/src/capabilities/skill-manager.js +609 -609
- package/src/capabilities/workflow-engine.js +1109 -1109
- package/src/core/agent-chat.js +882 -882
- package/src/core/agent.js +892 -892
- package/src/core/framework.js +465 -465
- package/src/core/index.js +19 -19
- package/src/core/plugin-base.js +219 -219
- package/src/core/plugin-manager.js +863 -863
- package/src/core/provider.js +114 -114
- package/src/core/sub-agent-config.js +264 -264
- package/src/core/system-prompt-builder.js +120 -120
- package/src/core/tool-registry.js +517 -517
- package/src/core/tool-router.js +297 -297
- package/src/executors/executor-base.js +58 -58
- package/src/executors/mcp-executor.js +741 -741
- package/src/index.js +25 -25
- package/src/utils/circuit-breaker.js +301 -301
- package/src/utils/error-boundary.js +363 -363
- package/src/utils/error.js +374 -374
- package/src/utils/event-emitter.js +97 -97
- package/src/utils/id.js +133 -133
- package/src/utils/index.js +217 -217
- package/src/utils/logger.js +181 -181
- package/src/utils/plugin-helpers.js +90 -90
- package/src/utils/retry.js +122 -122
- package/src/utils/sandbox.js +292 -292
- package/test/tool-registry-validation.test.js +218 -218
- package/website/script.js +136 -136
- package/foliko-1.0.75.tgz +0 -0
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* StateStore - 持久化目标和记忆到文件系统
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
const fs = require('fs')
|
|
6
|
-
const path = require('path')
|
|
7
|
-
const { logger } = require('../../src/utils/logger')
|
|
8
|
-
|
|
9
|
-
const log = logger.child('Ambient:StateStore')
|
|
10
|
-
|
|
11
|
-
class StateStore {
|
|
12
|
-
constructor(persistencePath) {
|
|
13
|
-
this._persistencePath = persistencePath
|
|
14
|
-
this._ensureDir()
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
_ensureDir() {
|
|
18
|
-
if (!fs.existsSync(this._persistencePath)) {
|
|
19
|
-
fs.mkdirSync(this._persistencePath, { recursive: true })
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
_getGoalsPath() {
|
|
24
|
-
return path.join(this._persistencePath, 'goals.json')
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
_getMemoriesPath() {
|
|
28
|
-
return path.join(this._persistencePath, 'memories.json')
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* 保存目标列表到文件
|
|
33
|
-
* @param {Array} goals - 目标数组
|
|
34
|
-
*/
|
|
35
|
-
saveGoals(goals) {
|
|
36
|
-
try {
|
|
37
|
-
fs.writeFileSync(this._getGoalsPath(), JSON.stringify(goals, null, 2))
|
|
38
|
-
} catch (err) {
|
|
39
|
-
log.error('保存目标失败:', err.message)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* 从文件加载目标列表
|
|
45
|
-
* @returns {Array} 目标数组
|
|
46
|
-
*/
|
|
47
|
-
loadGoals() {
|
|
48
|
-
try {
|
|
49
|
-
const filePath = this._getGoalsPath()
|
|
50
|
-
if (fs.existsSync(filePath)) {
|
|
51
|
-
const data = fs.readFileSync(filePath, 'utf-8')
|
|
52
|
-
return JSON.parse(data)
|
|
53
|
-
}
|
|
54
|
-
} catch (err) {
|
|
55
|
-
log.error('加载目标失败:', err.message)
|
|
56
|
-
}
|
|
57
|
-
return []
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 保存记忆列表到文件
|
|
62
|
-
* @param {Array} memories - 记忆数组
|
|
63
|
-
*/
|
|
64
|
-
saveMemories(memories) {
|
|
65
|
-
try {
|
|
66
|
-
fs.writeFileSync(this._getMemoriesPath(), JSON.stringify(memories, null, 2))
|
|
67
|
-
} catch (err) {
|
|
68
|
-
log.error('保存记忆失败:', err.message)
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* 从文件加载记忆列表
|
|
74
|
-
* @returns {Array} 记忆数组
|
|
75
|
-
*/
|
|
76
|
-
loadMemories() {
|
|
77
|
-
try {
|
|
78
|
-
const filePath = this._getMemoriesPath()
|
|
79
|
-
if (fs.existsSync(filePath)) {
|
|
80
|
-
const data = fs.readFileSync(filePath, 'utf-8')
|
|
81
|
-
return JSON.parse(data)
|
|
82
|
-
}
|
|
83
|
-
} catch (err) {
|
|
84
|
-
log.error('加载记忆失败:', err.message)
|
|
85
|
-
}
|
|
86
|
-
return []
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
module.exports = { StateStore }
|
|
1
|
+
/**
|
|
2
|
+
* StateStore - 持久化目标和记忆到文件系统
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
const fs = require('fs')
|
|
6
|
+
const path = require('path')
|
|
7
|
+
const { logger } = require('../../src/utils/logger')
|
|
8
|
+
|
|
9
|
+
const log = logger.child('Ambient:StateStore')
|
|
10
|
+
|
|
11
|
+
class StateStore {
|
|
12
|
+
constructor(persistencePath) {
|
|
13
|
+
this._persistencePath = persistencePath
|
|
14
|
+
this._ensureDir()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_ensureDir() {
|
|
18
|
+
if (!fs.existsSync(this._persistencePath)) {
|
|
19
|
+
fs.mkdirSync(this._persistencePath, { recursive: true })
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
_getGoalsPath() {
|
|
24
|
+
return path.join(this._persistencePath, 'goals.json')
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
_getMemoriesPath() {
|
|
28
|
+
return path.join(this._persistencePath, 'memories.json')
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 保存目标列表到文件
|
|
33
|
+
* @param {Array} goals - 目标数组
|
|
34
|
+
*/
|
|
35
|
+
saveGoals(goals) {
|
|
36
|
+
try {
|
|
37
|
+
fs.writeFileSync(this._getGoalsPath(), JSON.stringify(goals, null, 2))
|
|
38
|
+
} catch (err) {
|
|
39
|
+
log.error('保存目标失败:', err.message)
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 从文件加载目标列表
|
|
45
|
+
* @returns {Array} 目标数组
|
|
46
|
+
*/
|
|
47
|
+
loadGoals() {
|
|
48
|
+
try {
|
|
49
|
+
const filePath = this._getGoalsPath()
|
|
50
|
+
if (fs.existsSync(filePath)) {
|
|
51
|
+
const data = fs.readFileSync(filePath, 'utf-8')
|
|
52
|
+
return JSON.parse(data)
|
|
53
|
+
}
|
|
54
|
+
} catch (err) {
|
|
55
|
+
log.error('加载目标失败:', err.message)
|
|
56
|
+
}
|
|
57
|
+
return []
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 保存记忆列表到文件
|
|
62
|
+
* @param {Array} memories - 记忆数组
|
|
63
|
+
*/
|
|
64
|
+
saveMemories(memories) {
|
|
65
|
+
try {
|
|
66
|
+
fs.writeFileSync(this._getMemoriesPath(), JSON.stringify(memories, null, 2))
|
|
67
|
+
} catch (err) {
|
|
68
|
+
log.error('保存记忆失败:', err.message)
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 从文件加载记忆列表
|
|
74
|
+
* @returns {Array} 记忆数组
|
|
75
|
+
*/
|
|
76
|
+
loadMemories() {
|
|
77
|
+
try {
|
|
78
|
+
const filePath = this._getMemoriesPath()
|
|
79
|
+
if (fs.existsSync(filePath)) {
|
|
80
|
+
const data = fs.readFileSync(filePath, 'utf-8')
|
|
81
|
+
return JSON.parse(data)
|
|
82
|
+
}
|
|
83
|
+
} catch (err) {
|
|
84
|
+
log.error('加载记忆失败:', err.message)
|
|
85
|
+
}
|
|
86
|
+
return []
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
module.exports = { StateStore }
|
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Ambient Agent 常量定义
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
// 目标生命周期状态
|
|
6
|
-
const GoalState = {
|
|
7
|
-
PENDING: 'pending', // 待激活
|
|
8
|
-
ACTIVE: 'active', // 执行中
|
|
9
|
-
COMPLETED: 'completed', // 已完成
|
|
10
|
-
FAILED: 'failed' // 已失败
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// 事件描述(用于生成插件描述)
|
|
14
|
-
const EventDescriptions = {
|
|
15
|
-
'tool:result': '工具执行结果事件 - 参数: name(工具名), args(执行参数), result(执行结果), error(错误信息)',
|
|
16
|
-
'scheduler:reminder': '定时提醒事件 - 参数: taskId(任务ID), message(提醒消息), time(触发时间)',
|
|
17
|
-
'scheduler:task_completed': '任务完成事件 - 参数: taskId(任务ID), result(任务结果)',
|
|
18
|
-
'scheduler:task_failed': '任务失败事件 - 参数: taskId(任务ID), error(错误信息)',
|
|
19
|
-
'agent:message': '代理消息事件 - 参数: content(消息内容), sessionId(会话ID), agentId(代理ID)',
|
|
20
|
-
'think:thought_completed': '思考完成事件 - 参数: mode(思考模式), topic(思考主题), thought(思考内容), depth(思考深度)',
|
|
21
|
-
'email:received': '收到邮件事件 - 参数: from(发件人), to(收件人), subject(主题), text(正文), body(HTML正文), messageId(消息ID), timestamp(时间戳)',
|
|
22
|
-
'webhook:received': 'Webhook接收事件 - 参数: headers(HTTP头), body(请求体), query(查询参数), path(请求路径)'
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
// 监听的事件类型列表
|
|
26
|
-
const DefaultEvents = [
|
|
27
|
-
'tool:result',
|
|
28
|
-
'scheduler:reminder',
|
|
29
|
-
'agent:message',
|
|
30
|
-
'think:thought_completed',
|
|
31
|
-
'email:received',
|
|
32
|
-
'webhook:received'
|
|
33
|
-
]
|
|
34
|
-
|
|
35
|
-
// 系统提示词模板
|
|
36
|
-
const SystemPrompts = {
|
|
37
|
-
ambientWorker: `你是 ambient-worker,一个专门执行后台任务的子 agent。
|
|
38
|
-
|
|
39
|
-
你的职责:
|
|
40
|
-
1. 执行 LLM 调用的任务(如生成回复、发送消息)
|
|
41
|
-
2. 不主动思考,只执行给定任务
|
|
42
|
-
3. 快速响应,不等待用户交互
|
|
43
|
-
|
|
44
|
-
当收到任务时,直接执行并返回结果。`
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// 思考模式提示词
|
|
48
|
-
const ThinkModePrompts = {
|
|
49
|
-
reflect: (goal, topic) => `作为Ambient Agent,反思当前目标:
|
|
50
|
-
标题: ${goal.title}
|
|
51
|
-
描述: ${goal.description || '无'}
|
|
52
|
-
优先级: ${goal.priority}
|
|
53
|
-
状态: ${goal.state}
|
|
54
|
-
尝试次数: ${goal.attempts}
|
|
55
|
-
|
|
56
|
-
${topic ? `额外关注点: ${topic}` : ''}
|
|
57
|
-
|
|
58
|
-
请反思:
|
|
59
|
-
1. 这个目标仍然相关且可实现吗?
|
|
60
|
-
2. 操作是否适合这个目标?
|
|
61
|
-
3.有什么可以改进的?`,
|
|
62
|
-
|
|
63
|
-
brainstorm: (goal, topic) => `为Ambient Agent目标头脑风暴新方法:
|
|
64
|
-
标题: ${goal.title}
|
|
65
|
-
${goal.description ? `描述: ${goal.description}` : ''}
|
|
66
|
-
计划的操作数: ${goal.actions ? goal.actions.length : 0}
|
|
67
|
-
|
|
68
|
-
${topic ? `关注点: ${topic}` : '生成关于如何更有效地追求这个目标的新想法。'}`,
|
|
69
|
-
|
|
70
|
-
plan: (goal, topic) => `为Ambient Agent目标制定更精细的计划:
|
|
71
|
-
标题: ${goal.title}
|
|
72
|
-
${goal.description ? `描述: ${goal.description}` : ''}
|
|
73
|
-
${topic ? `额外上下文: ${topic}` : ''}
|
|
74
|
-
|
|
75
|
-
制定一个清晰、可操作的计划。`,
|
|
76
|
-
|
|
77
|
-
analyze: (goal, topic) => `分析Ambient Agent目标:
|
|
78
|
-
标题: ${goal.title}
|
|
79
|
-
状态: ${goal.state}
|
|
80
|
-
优先级: ${goal.priority}
|
|
81
|
-
操作: ${goal.actions ? JSON.stringify(goal.actions) : '无'}
|
|
82
|
-
|
|
83
|
-
${topic ? `分析重点: ${topic}` : '这个目标的优势、劣势和潜在问题是什么?'}`
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// 自由思考提示词
|
|
87
|
-
const FreeThinkPrompts = {
|
|
88
|
-
reflect: (topic) => `Ambient Agent反思: ${topic || '思考系统和目标的当前状态。有什么可以改进的?'}`,
|
|
89
|
-
brainstorm: (topic) => `Ambient Agent头脑风暴: ${topic || '生成关于新目标或方法的有创意想法。'}`,
|
|
90
|
-
plan: (topic) => `Ambient Agent计划: ${topic || '为待实现的目标制定计划。'}`,
|
|
91
|
-
analyze: (topic) => `Ambient Agent分析: ${topic || '分析当前目标及其进展。'}`
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
module.exports = {
|
|
95
|
-
GoalState,
|
|
96
|
-
EventDescriptions,
|
|
97
|
-
DefaultEvents,
|
|
98
|
-
SystemPrompts,
|
|
99
|
-
ThinkModePrompts,
|
|
100
|
-
FreeThinkPrompts
|
|
101
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Ambient Agent 常量定义
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// 目标生命周期状态
|
|
6
|
+
const GoalState = {
|
|
7
|
+
PENDING: 'pending', // 待激活
|
|
8
|
+
ACTIVE: 'active', // 执行中
|
|
9
|
+
COMPLETED: 'completed', // 已完成
|
|
10
|
+
FAILED: 'failed' // 已失败
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// 事件描述(用于生成插件描述)
|
|
14
|
+
const EventDescriptions = {
|
|
15
|
+
'tool:result': '工具执行结果事件 - 参数: name(工具名), args(执行参数), result(执行结果), error(错误信息)',
|
|
16
|
+
'scheduler:reminder': '定时提醒事件 - 参数: taskId(任务ID), message(提醒消息), time(触发时间)',
|
|
17
|
+
'scheduler:task_completed': '任务完成事件 - 参数: taskId(任务ID), result(任务结果)',
|
|
18
|
+
'scheduler:task_failed': '任务失败事件 - 参数: taskId(任务ID), error(错误信息)',
|
|
19
|
+
'agent:message': '代理消息事件 - 参数: content(消息内容), sessionId(会话ID), agentId(代理ID)',
|
|
20
|
+
'think:thought_completed': '思考完成事件 - 参数: mode(思考模式), topic(思考主题), thought(思考内容), depth(思考深度)',
|
|
21
|
+
'email:received': '收到邮件事件 - 参数: from(发件人), to(收件人), subject(主题), text(正文), body(HTML正文), messageId(消息ID), timestamp(时间戳)',
|
|
22
|
+
'webhook:received': 'Webhook接收事件 - 参数: headers(HTTP头), body(请求体), query(查询参数), path(请求路径)'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// 监听的事件类型列表
|
|
26
|
+
const DefaultEvents = [
|
|
27
|
+
'tool:result',
|
|
28
|
+
'scheduler:reminder',
|
|
29
|
+
'agent:message',
|
|
30
|
+
'think:thought_completed',
|
|
31
|
+
'email:received',
|
|
32
|
+
'webhook:received'
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
// 系统提示词模板
|
|
36
|
+
const SystemPrompts = {
|
|
37
|
+
ambientWorker: `你是 ambient-worker,一个专门执行后台任务的子 agent。
|
|
38
|
+
|
|
39
|
+
你的职责:
|
|
40
|
+
1. 执行 LLM 调用的任务(如生成回复、发送消息)
|
|
41
|
+
2. 不主动思考,只执行给定任务
|
|
42
|
+
3. 快速响应,不等待用户交互
|
|
43
|
+
|
|
44
|
+
当收到任务时,直接执行并返回结果。`
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// 思考模式提示词
|
|
48
|
+
const ThinkModePrompts = {
|
|
49
|
+
reflect: (goal, topic) => `作为Ambient Agent,反思当前目标:
|
|
50
|
+
标题: ${goal.title}
|
|
51
|
+
描述: ${goal.description || '无'}
|
|
52
|
+
优先级: ${goal.priority}
|
|
53
|
+
状态: ${goal.state}
|
|
54
|
+
尝试次数: ${goal.attempts}
|
|
55
|
+
|
|
56
|
+
${topic ? `额外关注点: ${topic}` : ''}
|
|
57
|
+
|
|
58
|
+
请反思:
|
|
59
|
+
1. 这个目标仍然相关且可实现吗?
|
|
60
|
+
2. 操作是否适合这个目标?
|
|
61
|
+
3.有什么可以改进的?`,
|
|
62
|
+
|
|
63
|
+
brainstorm: (goal, topic) => `为Ambient Agent目标头脑风暴新方法:
|
|
64
|
+
标题: ${goal.title}
|
|
65
|
+
${goal.description ? `描述: ${goal.description}` : ''}
|
|
66
|
+
计划的操作数: ${goal.actions ? goal.actions.length : 0}
|
|
67
|
+
|
|
68
|
+
${topic ? `关注点: ${topic}` : '生成关于如何更有效地追求这个目标的新想法。'}`,
|
|
69
|
+
|
|
70
|
+
plan: (goal, topic) => `为Ambient Agent目标制定更精细的计划:
|
|
71
|
+
标题: ${goal.title}
|
|
72
|
+
${goal.description ? `描述: ${goal.description}` : ''}
|
|
73
|
+
${topic ? `额外上下文: ${topic}` : ''}
|
|
74
|
+
|
|
75
|
+
制定一个清晰、可操作的计划。`,
|
|
76
|
+
|
|
77
|
+
analyze: (goal, topic) => `分析Ambient Agent目标:
|
|
78
|
+
标题: ${goal.title}
|
|
79
|
+
状态: ${goal.state}
|
|
80
|
+
优先级: ${goal.priority}
|
|
81
|
+
操作: ${goal.actions ? JSON.stringify(goal.actions) : '无'}
|
|
82
|
+
|
|
83
|
+
${topic ? `分析重点: ${topic}` : '这个目标的优势、劣势和潜在问题是什么?'}`
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 自由思考提示词
|
|
87
|
+
const FreeThinkPrompts = {
|
|
88
|
+
reflect: (topic) => `Ambient Agent反思: ${topic || '思考系统和目标的当前状态。有什么可以改进的?'}`,
|
|
89
|
+
brainstorm: (topic) => `Ambient Agent头脑风暴: ${topic || '生成关于新目标或方法的有创意想法。'}`,
|
|
90
|
+
plan: (topic) => `Ambient Agent计划: ${topic || '为待实现的目标制定计划。'}`,
|
|
91
|
+
analyze: (topic) => `Ambient Agent分析: ${topic || '分析当前目标及其进展。'}`
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
module.exports = {
|
|
95
|
+
GoalState,
|
|
96
|
+
EventDescriptions,
|
|
97
|
+
DefaultEvents,
|
|
98
|
+
SystemPrompts,
|
|
99
|
+
ThinkModePrompts,
|
|
100
|
+
FreeThinkPrompts
|
|
101
|
+
}
|