foliko 1.1.27 → 1.1.29

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.
Files changed (64) hide show
  1. package/.agent/data/default.json +1 -25
  2. package/.agent/data/plugins-state.json +33 -150
  3. package/.agent/mcp_config.json +5 -6
  4. package/.agent/memory/user/mo3qksaz-mxy01b.md +9 -0
  5. package/.agent/plugins/test-plugin.py +50 -74
  6. package/.agent/sessions/cli_default.json +477 -25
  7. package/package.json +1 -1
  8. package/plugins/ambient-agent/ExplorerLoop.js +0 -2
  9. package/plugins/extension-executor-plugin.js +62 -70
  10. package/plugins/subagent-plugin.js +3 -0
  11. package/plugins/think-plugin.js +89 -22
  12. package/plugins/tools-plugin.js +31 -1
  13. package/plugins/web-plugin.js +5 -0
  14. package/src/capabilities/skill-manager.js +26 -0
  15. package/src/core/agent-chat.js +48 -15
  16. package/src/core/agent.js +11 -204
  17. package/src/core/chat-session.js +13 -0
  18. package/src/core/framework.js +57 -14
  19. package/src/core/plugin-base.js +72 -0
  20. package/src/core/subagent.js +215 -56
  21. package/subagent.md +192 -0
  22. package/system.md +103 -1592
  23. package/test-document-01.png +0 -0
  24. package/test-document-02.png +0 -0
  25. package/test-document.md +51 -0
  26. package/.agent/memory/feedback/mnxe0cxc-14l6q5.md +0 -17
  27. package/.agent/memory/feedback/mnxe11pa-nxf577.md +0 -9
  28. package/.agent/memory/feedback/mnxe1an2-84faff.md +0 -9
  29. package/.agent/memory/feedback/mnxgcfj0-qg3wjc.md +0 -9
  30. package/.agent/memory/feedback/mnxgcn3y-40mqss.md +0 -9
  31. package/.agent/memory/feedback/mnxgcxq9-jm7ydl.md +0 -9
  32. package/.agent/memory/feedback/mnxgdyfj-pzjvkb.md +0 -9
  33. package/.agent/memory/feedback/mnxge3z1-7vyit1.md +0 -9
  34. package/.agent/memory/feedback/mnxhrg28-41hhjr.md +0 -9
  35. package/.agent/memory/feedback/mnxhrx0e-yth94k.md +0 -9
  36. package/.agent/memory/feedback/mnxhs3jd-rvx8aq.md +0 -9
  37. package/.agent/memory/feedback/mnxhs7p7-g5rtn9.md +0 -9
  38. package/.agent/memory/feedback/mnxhslx5-oqwuhr.md +0 -9
  39. package/.agent/memory/feedback/mnxhsvd6-nuyvvc.md +0 -9
  40. package/.agent/memory/project/mnxegq6z-5fc64w.md +0 -22
  41. package/.agent/memory/project/mnxh2w4r-le9hur.md +0 -17
  42. package/.agent/memory/project/mnxhq2yv-9qa8ay.md +0 -31
  43. package/.agent/memory/project/mnxhql11-iaun2o.md +0 -34
  44. package/.agent/memory/project/mnxhr78p-jpg7eq.md +0 -23
  45. package/.agent/memory/reference/mnxe0oa9-p6wzk6.md +0 -27
  46. package/.agent/memory/reference/mnxehcll-kcrmpf.md +0 -29
  47. package/.agent/memory/reference/mnxei0ts-jw091y.md +0 -18
  48. package/.agent/memory/reference/mnxfnrr4-rski36.md +0 -40
  49. package/.agent/memory/reference/mnxfo6n5-af9zls.md +0 -18
  50. package/.agent/memory/reference/mnxh2ady-u6cmvk.md +0 -61
  51. package/.agent/memory/reference/mnxhqdqh-ucsbsk.md +0 -31
  52. package/.agent/memory/reference/mnxiixyp-rz2gvw.md +0 -34
  53. package/.agent/memory/user/mnxhqxk3-vjjhlf.md +0 -23
  54. package/.agent/plugins/__pycache__/file_writer.cpython-312.pyc +0 -0
  55. package/.agent/plugins/daytona/README.md +0 -89
  56. package/.agent/plugins/daytona/index.js +0 -377
  57. package/.agent/plugins/daytona/package.json +0 -12
  58. package/.agent/plugins/system-info/index.js +0 -387
  59. package/.agent/plugins/system-info/package.json +0 -4
  60. package/.agent/plugins/system-info/test.js +0 -40
  61. package/.agent/plugins/test_nested_plugin.py +0 -85
  62. package/.agent/sessions/weixin_o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat.json +0 -392
  63. package/system1.md +0 -4042
  64. package/test_poster.png +0 -0
@@ -1,25 +1 @@
1
- {
2
- "session:cli_default": {
3
- "messages": [],
4
- "variables": {},
5
- "metadata": {
6
- "platform": "cli"
7
- },
8
- "createdAt": "2026-04-06T11:30:16.479Z",
9
- "lastActive": "2026-04-06T11:30:16.479Z"
10
- },
11
- "session:weixin_o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat": {
12
- "messages": [],
13
- "variables": {},
14
- "metadata": {
15
- "platform": "weixin",
16
- "userId": "o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat"
17
- },
18
- "createdAt": "2026-04-11T19:20:50.718Z",
19
- "lastActive": "2026-04-11T19:20:50.718Z"
20
- },
21
- "business_card:business_card_info": {
22
- "value": "{\"name\": \"张明远\", \"title\": \"技术总监\", \"company\": \"星辰科技有限公司\", \"phone\": \"+86 138-0000-1234\", \"email\": \"zhangmingyuan@startech.com\", \"website\": \"www.startech.com\", \"address\": \"北京市朝阳区科技园A座1201\", \"file\": \"business_card.png\", \"size\": \"1050x630\", \"dpi\": 300, \"created\": \"2026-04-13\"}",
23
- "updatedAt": "2026-04-12T16:27:27.826Z"
24
- }
25
- }
1
+ {"session:cli_default":{"messages":[],"variables":{},"metadata":{}},"session:weixin_o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat":{"messages":[],"variables":{},"metadata":{"platform":"weixin","userId":"o9cq80zgZqKPA2-s59PN43GdDy1w@im.wechat"},"createdAt":"2026-04-11T19:20:50.718Z","lastActive":"2026-04-11T19:20:50.718Z"},"business_card:business_card_info":{"value":"{\"name\": \"张明远\", \"title\": \"技术总监\", \"company\": \"星辰科技有限公司\", \"phone\": \"+86 138-0000-1234\", \"email\": \"zhangmingyuan@startech.com\", \"website\": \"www.startech.com\", \"address\": \"北京市朝阳区科技园A座1201\", \"file\": \"business_card.png\", \"size\": \"1050x630\", \"dpi\": 300, \"created\": \"2026-04-13\"}","updatedAt":"2026-04-12T16:27:27.826Z"}}
@@ -7,11 +7,14 @@
7
7
  "enabled": true,
8
8
  "config": {}
9
9
  },
10
+ "ai": {
11
+ "enabled": true
12
+ },
10
13
  "skill-manager": {
11
14
  "enabled": true,
12
15
  "config": {}
13
16
  },
14
- "mcp-executor": {
17
+ "mcp": {
15
18
  "enabled": true,
16
19
  "config": {}
17
20
  },
@@ -22,92 +25,16 @@
22
25
  "subagent-manager": {
23
26
  "enabled": true,
24
27
  "config": {
25
- "agentsDir": ".agent/agents",
26
- "agents": [
27
- {
28
- "name": "code-assistant",
29
- "description": "代码助手 - 专业的编程和代码分析助手",
30
- "instructions": "你是一个专业的代码助手,精通多种编程语言和开发技术。\n\n【核心能力】\n- 代码编写、调试和优化\n- 代码审查和重构建议\n- 多种编程语言支持(Python、JavaScript、TypeScript、Java等)\n- 代码问题诊断和解决\n- 解释复杂代码逻辑\n\n【工作原则】\n- 提供清晰、规范的代码\n- 包含必要的注释说明\n- 考虑代码性能和安全性\n- 遵循最佳实践",
31
- "tools": [
32
- "read_file",
33
- "write_file",
34
- "modify_file",
35
- "search_file",
36
- "python-execute",
37
- "execute_command",
38
- "shell"
39
- ],
40
- "_fromDir": true
41
- },
42
- {
43
- "name": "email-assistant",
44
- "description": "邮件助手 - 专业的邮件管理助手",
45
- "instructions": "你是一个专业的邮件助手,擅长邮件的读写、筛选和管理。\n\n【核心能力】\n- 读取和回复邮件\n- 发送新邮件(支持附件)\n- 邮件搜索和筛选\n- 邮件摘要生成\n- 批量邮件处理\n\n【工作原则】\n- 保持邮件格式规范\n- 回复内容专业得体\n- 保护隐私信息\n- 及时处理重要邮件",
46
- "tools": [
47
- "email_read",
48
- "email_send",
49
- "email_mark_read",
50
- "email_delete",
51
- "email_unread_count",
52
- "email_configure",
53
- "notification_send"
54
- ],
55
- "_fromDir": true
56
- },
57
- {
58
- "name": "file-assistant",
59
- "description": "文件助手 - 专业的文件管理和操作助手",
60
- "instructions": "你是一个专业的文件助手,擅长文件操作、目录管理、文件搜索和内容编辑。\n\n【核心能力】\n- 读取、创建、编辑、删除文件和目录\n- 搜索文件内容和文件名称\n- 批量文件操作\n- 文件内容分析和提取\n\n【工作原则】\n- 执行操作前确认路径正确\n- 危险操作(如删除)需要谨慎\n- 保持文件编码一致性\n- 重要文件操作前可创建备份",
61
- "tools": [
62
- "read_file",
63
- "write_file",
64
- "delete_file",
65
- "modify_file",
66
- "search_file",
67
- "read_directory",
68
- "create_directory",
69
- "execute_command"
70
- ],
71
- "_fromDir": true
72
- },
73
- {
74
- "name": "system-assistant",
75
- "description": "系统助手 - 专业的系统信息监控和管理助手",
76
- "instructions": "你是一个专业的系统助手,精通系统信息监控和基础管理。\n\n【核心能力】\n- CPU、内存、磁盘使用情况监控\n- 网络接口信息查询\n- 系统运行状态分析\n- 性能问题诊断\n- 定时监控和报告\n\n【工作原则】\n- 提供清晰的数据展示\n- 发现异常及时提醒\n- 给出合理的优化建议\n- 保护系统安全",
77
- "tools": [
78
- "get_basic_info",
79
- "get_cpu_info",
80
- "get_memory_info",
81
- "get_disk_info",
82
- "get_network_info",
83
- "get_full_system_info",
84
- "notification_send",
85
- "schedule_task"
86
- ],
87
- "_fromDir": true
88
- },
89
- {
90
- "name": "web-assistant",
91
- "description": "网络助手 - 专业的网络数据获取和处理助手",
92
- "instructions": "你是一个专业的网络助手,精通网络数据获取和处理。\n\n【核心能力】\n- HTTP请求发送(GET/POST/PUT/DELETE等)\n- 网页内容抓取和解析\n- API调用和数据处理\n- JSON/XML数据解析\n- 网络问题诊断\n\n【工作原则】\n- 遵守网站使用协议\n- 合理控制请求频率\n- 数据处理规范\n- 异常情况妥善处理",
93
- "tools": [
94
- "fetch",
95
- "web_request",
96
- "execute_command",
97
- "python-execute",
98
- "notification_send"
99
- ],
100
- "_fromDir": true
101
- }
102
- ]
28
+ "agentsDir": "D:\\Code\\foliko\\.agent\\agents"
103
29
  }
104
30
  },
105
- "system-info": {
31
+ "marknative": {
106
32
  "enabled": true,
107
33
  "config": {}
108
34
  },
109
- "ai": {
110
- "enabled": true
35
+ "poster": {
36
+ "enabled": true,
37
+ "config": {}
111
38
  },
112
39
  "ambient": {
113
40
  "enabled": true,
@@ -127,8 +54,12 @@
127
54
  "logDir": ".agent/logs"
128
55
  }
129
56
  },
57
+ "coordinator": {
58
+ "enabled": false,
59
+ "config": {}
60
+ },
130
61
  "email": {
131
- "enabled": true,
62
+ "enabled": false,
132
63
  "config": {}
133
64
  },
134
65
  "extension-executor": {
@@ -151,6 +82,23 @@
151
82
  "enabled": true,
152
83
  "config": {}
153
84
  },
85
+ "memory": {
86
+ "enabled": true,
87
+ "config": {
88
+ "memoryDir": ".agent/memory",
89
+ "autoExtract": true,
90
+ "extractOnTopics": [
91
+ "provider",
92
+ "preference",
93
+ "setting",
94
+ "user"
95
+ ]
96
+ }
97
+ },
98
+ "plugin_manager": {
99
+ "enabled": true,
100
+ "config": {}
101
+ },
154
102
  "python-executor": {
155
103
  "enabled": true,
156
104
  "config": {
@@ -180,7 +128,7 @@
180
128
  "sessionTTL": 1800000,
181
129
  "maxSessions": 100,
182
130
  "maxHistoryLength": 150,
183
- "autoCleanup": true,
131
+ "autoCleanup": false,
184
132
  "cleanupInterval": 300000,
185
133
  "persistToStorage": true,
186
134
  "onSessionStart": null,
@@ -192,7 +140,7 @@
192
140
  "enabled": true,
193
141
  "config": {
194
142
  "timeout": 60000,
195
- "workingDir": "D:\\Code\\vb-agent"
143
+ "workingDir": "D:\\Code\\foliko"
196
144
  }
197
145
  },
198
146
  "storage": {
@@ -228,70 +176,5 @@
228
176
  "web": {
229
177
  "enabled": true,
230
178
  "config": {}
231
- },
232
- "plugin_manager": {
233
- "enabled": true,
234
- "config": {}
235
- },
236
- "weixin": {
237
- "enabled": true,
238
- "config": {
239
- "forceLogin": false,
240
- "qrcodeTerminal": true,
241
- "allowedUsers": []
242
- }
243
- },
244
- "daytona": {
245
- "enabled": true,
246
- "config": {
247
- "apiKey": "dtn_0312a20cad24464cdc31cff0184eb7dfe7f8791bd9b2719798357a6251946a39",
248
- "apiUrl": "https://app.daytona.io/api"
249
- }
250
- },
251
- "test": {
252
- "enabled": true,
253
- "config": {}
254
- },
255
- "marknative": {
256
- "enabled": true,
257
- "config": {}
258
- },
259
- "poster-designer": {
260
- "enabled": true,
261
- "config": {}
262
- },
263
- "memory": {
264
- "enabled": true,
265
- "config": {
266
- "memoryDir": ".agent/memory",
267
- "autoExtract": true,
268
- "extractOnTopics": [
269
- "provider",
270
- "preference",
271
- "setting",
272
- "user"
273
- ],
274
- "maxCoreMemory": 4000
275
- }
276
- },
277
- "session-memory": {
278
- "enabled": true,
279
- "config": {
280
- "memoryDir": ".agent/memory",
281
- "maxCoreMemory": 4000,
282
- "maxRecallResults": 5
283
- }
284
- },
285
- "poster": {
286
- "enabled": true,
287
- "config": {}
288
- },
289
- "coordinator": {
290
- "enabled": true,
291
- "config": {}
292
- },
293
- "mcp": {
294
- "enabled": true,
295
- "config": {}
296
179
  }
297
180
  }
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "mcpServers": {
3
- "designmd": {
4
- "command": "npx",
5
- "args": ["designmd-mcp"],
6
- "env": {
7
- "DESIGNMD_API_KEY": "dk_a8df8439b0b7de2b55a059814bc1e085b66fc0ee"
8
- }
3
+ "fetch": {
4
+ "args": [
5
+ "mcp-server-fetch"
6
+ ],
7
+ "command": "uvx"
9
8
  }
10
9
  }
11
10
  }
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: "mo3qksaz-mxy01b"
3
+ name: "持续新闻监控设置"
4
+ type: "user"
5
+ project: "null"
6
+ tags: [持续思考, 新闻探索, 通知]
7
+ created: "2026-04-18"
8
+ ---
9
+ 用户偏好:开启持续思考模式,主动探索新闻资讯,检测到新新闻时主动通知用户。Why:用户需要实时获取新闻动态,无需手动查询。How to apply:使用 ambient_think 或 ambient_goals 创建持续思考目标,配置 scheduler 监控新闻源,触发新内容时通过 agent:message 事件通知用户。
@@ -3,34 +3,39 @@
3
3
  PLUGIN = {
4
4
  "name": "test-plugin",
5
5
  "version": "1.0.0",
6
- "description": "测试插件 - 包含问候、计算、数据处理等测试工具"
6
+ "description": "测试插件 - 提供基础测试功能"
7
7
  }
8
8
 
9
9
  TOOLS = [
10
10
  {
11
11
  "name": "hello",
12
- "description": "问候工具",
12
+ "description": "问候测试",
13
13
  "params": {"name": "string"}
14
14
  },
15
15
  {
16
- "name": "calc",
17
- "description": "计算器工具",
18
- "params": {"a": "number", "b": "number", "op": "string"}
16
+ "name": "add",
17
+ "description": "加法计算",
18
+ "params": {"a": "number", "b": "number"}
19
+ },
20
+ {
21
+ "name": "multiply",
22
+ "description": "乘法计算",
23
+ "params": {"a": "number", "b": "number"}
19
24
  },
20
25
  {
21
26
  "name": "reverse_text",
22
- "description": "反转字符串",
27
+ "description": "反转文本",
23
28
  "params": {"text": "string"}
24
29
  },
25
30
  {
26
- "name": "word_count",
27
- "description": "统计文本的字符数、单词数、行数",
31
+ "name": "palindrome_check",
32
+ "description": "回文检测",
28
33
  "params": {"text": "string"}
29
34
  },
30
35
  {
31
- "name": "random_number",
32
- "description": "生成指定范围内的随机整数",
33
- "params": {"min": "number", "max": "number"}
36
+ "name": "get_info",
37
+ "description": "获取插件信息",
38
+ "params": {}
34
39
  }
35
40
  ]
36
41
 
@@ -39,85 +44,56 @@ TOOLS = [
39
44
  def hello(params):
40
45
  """问候工具"""
41
46
  name = params.get("name", "World")
42
- return {"success": True, "result": f"Hello, {name}!"}
47
+ return {"success": True, "result": f"Hello, {name}! 👋"}
43
48
 
44
49
 
45
- def calc(params):
46
- """计算器工具"""
50
+ def add(params):
51
+ """加法计算"""
47
52
  a = params.get("a", 0)
48
53
  b = params.get("b", 0)
49
- op = params.get("op", "add")
54
+ result = a + b
55
+ return {"success": True, "result": result, "expression": f"{a} + {b} = {result}"}
50
56
 
51
- if op == "add":
52
- result = a + b
53
- elif op == "sub":
54
- result = a - b
55
- elif op == "mul":
56
- result = a * b
57
- elif op == "div":
58
- if b == 0:
59
- return {"success": False, "error": "Division by zero"}
60
- result = a / b
61
- elif op == "pow":
62
- result = a ** b
63
- elif op == "mod":
64
- if b == 0:
65
- return {"success": False, "error": "Modulo by zero"}
66
- result = a % b
67
- else:
68
- return {"success": False, "error": f"Unknown operation: {op}"}
69
57
 
70
- return {"success": True, "result": result}
58
+ def multiply(params):
59
+ """乘法计算"""
60
+ a = params.get("a", 0)
61
+ b = params.get("b", 0)
62
+ result = a * b
63
+ return {"success": True, "result": result, "expression": f"{a} × {b} = {result}"}
71
64
 
72
65
 
73
66
  def reverse_text(params):
74
- """反转字符串"""
67
+ """反转文本"""
75
68
  text = params.get("text", "")
76
- return {"success": True, "result": text[::-1]}
69
+ reversed_text = text[::-1]
70
+ return {"success": True, "original": text, "reversed": reversed_text}
77
71
 
78
72
 
79
- def word_count(params):
80
- """统计文本的字符数、单词数、行数"""
73
+ def palindrome_check(params):
74
+ """回文检测"""
75
+ import re
81
76
  text = params.get("text", "")
82
-
83
- char_count = len(text)
84
- word_count = len(text.split())
85
- line_count = len(text.splitlines()) if text else 0
86
-
77
+ # 清理:去除空格和标点,转小写
78
+ cleaned = re.sub(r'[^a-zA-Z0-9\u4e00-\u9fa5]', '', text).lower()
79
+ is_palindrome = cleaned == cleaned[::-1] and len(cleaned) > 0
87
80
  return {
88
81
  "success": True,
89
- "result": {
90
- "characters": char_count,
91
- "words": word_count,
92
- "lines": line_count
93
- }
82
+ "text": text,
83
+ "is_palindrome": is_palindrome,
84
+ "result": "是回文 ✓" if is_palindrome else "不是回文 ✗"
94
85
  }
95
86
 
96
87
 
97
- def random_number(params):
98
- """生成指定范围内的随机整数"""
99
- import random
100
-
101
- min_val = params.get("min", 0)
102
- max_val = params.get("max", 100)
103
-
104
- if min_val > max_val:
105
- return {"success": False, "error": "min cannot be greater than max"}
106
-
107
- result = random.randint(min_val, max_val)
108
- return {"success": True, "result": result}
109
-
110
-
111
- # === 工具分发器 (必须) ===
112
- def execute_tool(name, params):
113
- """执行工具的分发器"""
114
- tools = {
115
- "hello": hello,
116
- "calc": calc,
117
- "reverse_text": reverse_text,
118
- "word_count": word_count,
119
- "random_number": random_number,
88
+ def get_info(params):
89
+ """获取插件信息"""
90
+ return {
91
+ "success": True,
92
+ "result": {
93
+ "name": PLUGIN["name"],
94
+ "version": PLUGIN["version"],
95
+ "description": PLUGIN["description"],
96
+ "tool_count": len(TOOLS),
97
+ "tools": [tool["name"] for tool in TOOLS]
98
+ }
120
99
  }
121
- if name not in tools:
122
- return {"success": False, "error": f"Unknown tool: {name}"}
123
- return tools[name](params)