foliko 1.1.6 → 1.1.7

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 (79) hide show
  1. package/.agent/data/email/processed-emails.json +1 -0
  2. package/.agent/data/plugins-state.json +5 -1
  3. package/.agent/data/web/web-config.json +5 -0
  4. package/.agent/memory/feedback/mnt7jrlt-d67qs7.md +15 -0
  5. package/.agent/memory/feedback/mnt88ja3-al4fuy.md +9 -0
  6. package/.agent/plugins/test-plugin.py +108 -0
  7. package/.agent/sessions/cli_default.json +514 -5298
  8. package/.claude/settings.local.json +2 -1
  9. package/SPEC.md +735 -696
  10. package/output/zen_silence.png +0 -0
  11. package/package.json +2 -2
  12. package/plugins/ambient-agent/EventWatcher.js +33 -37
  13. package/plugins/ambient-agent/ExplorerLoop.js +338 -36
  14. package/plugins/ambient-agent/GoalManager.js +7 -3
  15. package/plugins/ambient-agent/StateStore.js +30 -1
  16. package/plugins/ambient-agent/constants.js +15 -1
  17. package/plugins/ambient-agent/index.js +26 -33
  18. package/plugins/coordinator-plugin.js +3 -3
  19. package/plugins/default-plugins.js +2 -2
  20. package/plugins/email/index.js +150 -36
  21. package/plugins/email/monitor.js +79 -5
  22. package/plugins/email/reply.js +15 -25
  23. package/plugins/extension-executor-plugin.js +160 -31
  24. package/plugins/file-system-plugin.js +57 -24
  25. package/plugins/memory-plugin.js +176 -64
  26. package/plugins/python-plugin-loader.js +79 -9
  27. package/plugins/scheduler-plugin.js +64 -24
  28. package/plugins/think-plugin.js +7 -2
  29. package/plugins/web-plugin.js +263 -4
  30. package/skills/ambient-agent/SKILL.md +342 -314
  31. package/src/core/agent-chat.js +64 -9
  32. package/src/core/agent.js +118 -59
  33. package/src/core/tool-registry.js +5 -5
  34. package/src/executors/mcp-executor.js +188 -26
  35. package/src/utils/id.js +5 -0
  36. package/system.md +3480 -0
  37. package/.agent/data/ambient/goals.json +0 -50
  38. package/.agent/data/ambient/memories.json +0 -7
  39. package/.agent/memory/core.md +0 -1
  40. package/.agent/memory/feedback/mnrsiuoc-e1ru74.md +0 -9
  41. package/.agent/memory/feedback/mnrt2mmz-98az6n.md +0 -9
  42. package/.agent/memory/feedback/mnrtqrhm-kxsicz.md +0 -9
  43. package/.agent/memory/feedback/mnrts8vg-i0ngzp.md +0 -15
  44. package/.agent/memory/feedback/mnrtt7jt-c0trb2.md +0 -9
  45. package/.agent/memory/feedback/mnruc2f0-5s52la.md +0 -16
  46. package/.agent/memory/feedback/mnrumbmx-63sa0v.md +0 -9
  47. package/.agent/memory/project/mnn93ogy-ypjn27.md +0 -9
  48. package/.agent/memory/project/mnn98fqy-5nhc1u.md +0 -25
  49. package/.agent/memory/project/mnrp7p5n-8enm2a.md +0 -31
  50. package/.agent/memory/project/mnrp9ifb-yynks0.md +0 -40
  51. package/.agent/memory/project/mnrpb3b8-f617s4.md +0 -25
  52. package/.agent/memory/project/mnrrmqgg-focprv.md +0 -9
  53. package/.agent/memory/project/mnrtykbh-6atsor.md +0 -9
  54. package/.agent/memory/project/mnru9jiu-kgau16.md +0 -35
  55. package/.agent/memory/reference/mnq3oenw-46haj6.md +0 -63
  56. package/.agent/memory/reference/mnq5qxm2-mjoooh.md +0 -116
  57. package/.agent/memory/reference/mnrnvpwo-rcqv9m.md +0 -52
  58. package/.agent/memory/reference/mnrovxvz-zy9xqm.md +0 -25
  59. package/.agent/memory/reference/mnroxabj-1b3930.md +0 -68
  60. package/.agent/memory/reference/mnrpjtlp-mnb9od.md +0 -35
  61. package/.agent/memory/reference/mnrps1x3-6b8xfm.md +0 -28
  62. package/.agent/memory/reference/mnrpt9ov-15er5w.md +0 -22
  63. package/.agent/memory/reference/mnrq82dn-y9tv9e.md +0 -50
  64. package/.agent/memory/reference/mnrqnr5v-v75drf.md +0 -34
  65. package/.agent/memory/reference/mnrrfzys-urudaf.md +0 -31
  66. package/.agent/memory/reference/mnrrocha-t0027n.md +0 -21
  67. package/.agent/memory/reference/mnrukklc-bxndsb.md +0 -35
  68. package/.agent/memory/user/mnm67t9m-x8rekk.md +0 -9
  69. package/.agent/memory/user/mnn5mmqh-w6aktx.md +0 -11
  70. package/.agent/memory/user/mnnbfhhn-dk1bd1.md +0 -22
  71. package/.agent/memory/user/mnrt39t8-8eosy0.md +0 -9
  72. package/foliko-cloud-rising.png +0 -0
  73. package/foliko-dawn-of-ai.png +0 -0
  74. package/foliko-mindful-observation.png +0 -0
  75. package/foliko-stellar-dreams.png +0 -0
  76. package/foliko-zen-jing.png +0 -0
  77. package/foliko-zen-kong.png +0 -0
  78. package/foliko-zen-wu.png +0 -0
  79. package/zen_karesansui.png +0 -0
@@ -0,0 +1 @@
1
+ ["<709921775831304@mail.yandex.ru>","<164041775831815@mail.yandex.ru>","<1453131775832337@mail.yandex.ru>","1224161775832900@mail.yandex.ru","659171775833135@mail.yandex.ru","300181775834203@mail.yandex.ru","2939231775834764@mail.yandex.ru","1443171775835448@mail.yandex.ru","1647161775839441@mail.yandex.ru","807111775840146@mail.yandex.ru","1317101775840554@mail.yandex.ru","859941775840854@mail.yandex.ru","41131775841292@mail.yandex.ru","341691775841865@mail.yandex.ru","170181775842337@mail.yandex.ru","18581775842668@mail.yandex.ru","3899221775842970@mail.yandex.ru","386541775843216@mail.yandex.ru","408111775843932@mail.yandex.ru","<408111775843932@mail.yandex.ru>","2304111775844462@mail.yandex.ru","<2304111775844462@mail.yandex.ru>"]
@@ -128,7 +128,7 @@
128
128
  }
129
129
  },
130
130
  "email": {
131
- "enabled": false,
131
+ "enabled": true,
132
132
  "config": {}
133
133
  },
134
134
  "extension-executor": {
@@ -289,5 +289,9 @@
289
289
  "coordinator": {
290
290
  "enabled": true,
291
291
  "config": {}
292
+ },
293
+ "mcp": {
294
+ "enabled": true,
295
+ "config": {}
292
296
  }
293
297
  }
@@ -0,0 +1,5 @@
1
+ {
2
+ "routes": [],
3
+ "webhooks": [],
4
+ "statics": []
5
+ }
@@ -0,0 +1,15 @@
1
+ ---
2
+ id: "mnt7jrlt-d67qs7"
3
+ name: "【避免指南】避免在动作参数中使用未正确解析的模板变量"
4
+ type: "feedback"
5
+ project: "null"
6
+ tags: [error, avoid, email, template-variable]
7
+ created: "2026-04-10"
8
+ ---
9
+ 【下次这样做】在 Ambient Agent 动作参数中使用模板变量时,必须确保变量能正确解析。错误原因:${event.from} 模板变量未被解析为实际邮箱地址 'chnak@yandex.ru',导致 email_auto_reply 工具收到空的 to 参数。
10
+
11
+ 【避免方法】
12
+ 1. 在动作 args 中使用模板变量时,需检查变量路径是否正确,如 ${event.from} 应解析为发件人邮箱
13
+ 2. 对于嵌套在 _eventRaw 中的数据,需使用正确的变量路径(如 ${event._eventRaw.data.email.from})
14
+ 3. 建议在动作执行前添加日志或调试步骤验证变量是否正确解析
15
+ 4. 对于 email_auto_reply,to 参数必须为有效的邮箱地址字符串,不能是未解析的模板变量
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: "mnt88ja3-al4fuy"
3
+ name: "【避免指南】避免重复启动已运行的服务或资源"
4
+ type: "feedback"
5
+ project: "null"
6
+ tags: [error, avoid, duplicate-operation, state-conflict]
7
+ created: "2026-04-10"
8
+ ---
9
+ 【下次这样做】在启动服务前应先检查其当前状态。如果服务已在运行,应跳过启动操作或返回明确提示,而非直接调用启动命令。错误原因:重复启动已运行中的邮件监控服务(email_watch),导致状态冲突。建议在启动前调用 status 接口确认服务状态,或确保工具本身实现幂等性。
@@ -0,0 +1,108 @@
1
+ # .agent/plugins/test-plugin.py
2
+
3
+ PLUGIN = {
4
+ "name": "test-plugin",
5
+ "version": "1.0.0",
6
+ "description": "测试插件 - 包含问候、计算、数据处理等测试工具"
7
+ }
8
+
9
+ TOOLS = [
10
+ {
11
+ "name": "hello",
12
+ "description": "问候工具",
13
+ "params": {"name": "string"}
14
+ },
15
+ {
16
+ "name": "calc",
17
+ "description": "计算器工具",
18
+ "params": {"a": "number", "b": "number", "op": "string"}
19
+ },
20
+ {
21
+ "name": "reverse_text",
22
+ "description": "反转字符串",
23
+ "params": {"text": "string"}
24
+ },
25
+ {
26
+ "name": "word_count",
27
+ "description": "统计文本的字符数、单词数、行数",
28
+ "params": {"text": "string"}
29
+ },
30
+ {
31
+ "name": "random_number",
32
+ "description": "生成指定范围内的随机整数",
33
+ "params": {"min": "number", "max": "number"}
34
+ }
35
+ ]
36
+
37
+ # === 工具实现 ===
38
+
39
+ def hello(params):
40
+ """问候工具"""
41
+ name = params.get("name", "World")
42
+ return {"success": True, "result": f"Hello, {name}!"}
43
+
44
+
45
+ def calc(params):
46
+ """计算器工具"""
47
+ a = params.get("a", 0)
48
+ b = params.get("b", 0)
49
+ op = params.get("op", "add")
50
+
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
+
70
+ return {"success": True, "result": result}
71
+
72
+
73
+ def reverse_text(params):
74
+ """反转字符串"""
75
+ text = params.get("text", "")
76
+ return {"success": True, "result": text[::-1]}
77
+
78
+
79
+ def word_count(params):
80
+ """统计文本的字符数、单词数、行数"""
81
+ 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
+
87
+ return {
88
+ "success": True,
89
+ "result": {
90
+ "characters": char_count,
91
+ "words": word_count,
92
+ "lines": line_count
93
+ }
94
+ }
95
+
96
+
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}