amrita_plugin_memory 0.2.2.post1__tar.gz → 0.2.4__tar.gz

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 (26) hide show
  1. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/PKG-INFO +3 -3
  2. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/README.md +2 -2
  3. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/runner.py +2 -2
  4. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/workflow.py +5 -10
  5. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory.egg-info/PKG-INFO +3 -3
  6. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/pyproject.toml +1 -1
  7. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/LICENSE +0 -0
  8. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/__init__.py +0 -0
  9. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/config.py +0 -0
  10. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/embed.py +0 -0
  11. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/matchers.py +0 -0
  12. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/__init__.py +0 -0
  13. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/_state.py +0 -0
  14. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/backend.py +0 -0
  15. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/consts.py +0 -0
  16. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/hooks.py +0 -0
  17. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/nodes.py +0 -0
  18. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/schemas.py +0 -0
  19. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/rethinking/tools.py +0 -0
  20. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/tools.py +0 -0
  21. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory/vector.py +0 -0
  22. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory.egg-info/SOURCES.txt +0 -0
  23. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory.egg-info/dependency_links.txt +0 -0
  24. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory.egg-info/requires.txt +0 -0
  25. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/amrita_plugin_memory.egg-info/top_level.txt +0 -0
  26. {amrita_plugin_memory-0.2.2.post1 → amrita_plugin_memory-0.2.4}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amrita_plugin_memory
3
- Version: 0.2.2.post1
3
+ Version: 0.2.4
4
4
  Summary: Amrita长期记忆插件
5
5
  Requires-Python: <3.14,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -48,7 +48,7 @@ flowchart TB
48
48
  end
49
49
 
50
50
  Surface -.->|"共享 ChromaDB"| Subconscious
51
- Runner -->|"持久化状态"| CachedRepo["CachedUserDataRepository<br/>uid=amritabot_inner_thinker"]
51
+ Runner -->|"持久化状态"| CachedRepo["CachedUserDataRepository<br/>uid=user_00000000"]
52
52
  Runner -->|"usage 统计"| Insights["InsightsModel<br/>全局 Token 统计"]
53
53
  ```
54
54
 
@@ -73,7 +73,7 @@ LOAD_STATE → JINJA2_RENDER → LIMITING_MEMORY → BUILD_MESSAGE → STRATEGY_
73
73
  | 向量数据库 | ChromaDB(PersistentClient / HttpClient) |
74
74
  | 嵌入模型 | OpenAI Embedding / Ollama Embedding |
75
75
  | 调度引擎 | nonebot_plugin_apscheduler |
76
- | 持久化 | CachedUserDataRepository(uid=`amritabot_inner_thinker`) |
76
+ | 持久化 | CachedUserDataRepository(uid=`user_00000000`) |
77
77
  | Token 统计 | InsightsModel(复用 Bot 全局 usage 统计) |
78
78
  | 配置管理 | Pydantic + TOML |
79
79
  | 代码质量 | Ruff + Pyright |
@@ -32,7 +32,7 @@ flowchart TB
32
32
  end
33
33
 
34
34
  Surface -.->|"共享 ChromaDB"| Subconscious
35
- Runner -->|"持久化状态"| CachedRepo["CachedUserDataRepository<br/>uid=amritabot_inner_thinker"]
35
+ Runner -->|"持久化状态"| CachedRepo["CachedUserDataRepository<br/>uid=user_00000000"]
36
36
  Runner -->|"usage 统计"| Insights["InsightsModel<br/>全局 Token 统计"]
37
37
  ```
38
38
 
@@ -57,7 +57,7 @@ LOAD_STATE → JINJA2_RENDER → LIMITING_MEMORY → BUILD_MESSAGE → STRATEGY_
57
57
  | 向量数据库 | ChromaDB(PersistentClient / HttpClient) |
58
58
  | 嵌入模型 | OpenAI Embedding / Ollama Embedding |
59
59
  | 调度引擎 | nonebot_plugin_apscheduler |
60
- | 持久化 | CachedUserDataRepository(uid=`amritabot_inner_thinker`) |
60
+ | 持久化 | CachedUserDataRepository(uid=`user_00000000`) |
61
61
  | Token 统计 | InsightsModel(复用 Bot 全局 usage 统计) |
62
62
  | 配置管理 | Pydantic + TOML |
63
63
  | 代码质量 | Ruff + Pyright |
@@ -37,7 +37,7 @@ from .consts import (
37
37
  )
38
38
  from .workflow import build_workflow
39
39
 
40
- _REPO_UID = "amritabot_inner_thinker"
40
+ _REPO_UID = "user_00000000"
41
41
 
42
42
 
43
43
  class SubconsciousRunner:
@@ -45,7 +45,7 @@ class SubconsciousRunner:
45
45
 
46
46
  使用 ChatObject 作为数据容器 + 标准 Agent 框架(ReActAgentStrategy)。
47
47
  LIMITING_MEMORY 节点在 Agent Loop 之前运行 MemoryLimiter 压缩会话消息。
48
- 持久化使用 CachedUserDataRepository(uid=amritabot_inner_thinker)。
48
+ 持久化使用 CachedUserDataRepository(uid=user_00000000)。
49
49
  """
50
50
 
51
51
  def __init__(self, config: SubconsciousConfig) -> None:
@@ -8,8 +8,7 @@ from amrita_core.components.react import (
8
8
  REACT_COUNTER,
9
9
  SINGLE_STRATEGY_CALL,
10
10
  )
11
- from amrita_core.enums import BuiltinName
12
- from amrita_sense import ALIAS, GOTO, NOP, WHILE, NodeCompose
11
+ from amrita_sense import WHILE, NodeCompose
13
12
 
14
13
  from .nodes import LIMITING_MEMORY, STRATEGY_INIT
15
14
 
@@ -21,19 +20,15 @@ _workflow = None
21
20
  def build_workflow():
22
21
  global _workflow
23
22
  if _workflow is None:
24
- wf: NodeCompose = (
23
+ wf: NodeCompose = ( # A simple ReAct
25
24
  LOAD_STATE
26
25
  >> JINJA2_RENDER
27
26
  >> LIMITING_MEMORY
28
27
  >> BUILD_MESSAGE
29
28
  >> STRATEGY_INIT
30
- >> (
31
- GOTO(BuiltinName.STRATEGY_EOF)
32
- >> ALIAS(AGENT_ENTRY, BuiltinName.AGENT_STRATEGY)
33
- >> WHILE(_single_call).ACTION(REACT_COUNTER)
34
- >> AGENT_POST_PROCESS
35
- >> ALIAS(NOP, BuiltinName.STRATEGY_EOF)
36
- )
29
+ >> AGENT_ENTRY
30
+ >> WHILE(_single_call).ACTION(REACT_COUNTER)
31
+ >> AGENT_POST_PROCESS
37
32
  )
38
33
  _workflow = wf.render()
39
34
  return _workflow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amrita_plugin_memory
3
- Version: 0.2.2.post1
3
+ Version: 0.2.4
4
4
  Summary: Amrita长期记忆插件
5
5
  Requires-Python: <3.14,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -48,7 +48,7 @@ flowchart TB
48
48
  end
49
49
 
50
50
  Surface -.->|"共享 ChromaDB"| Subconscious
51
- Runner -->|"持久化状态"| CachedRepo["CachedUserDataRepository<br/>uid=amritabot_inner_thinker"]
51
+ Runner -->|"持久化状态"| CachedRepo["CachedUserDataRepository<br/>uid=user_00000000"]
52
52
  Runner -->|"usage 统计"| Insights["InsightsModel<br/>全局 Token 统计"]
53
53
  ```
54
54
 
@@ -73,7 +73,7 @@ LOAD_STATE → JINJA2_RENDER → LIMITING_MEMORY → BUILD_MESSAGE → STRATEGY_
73
73
  | 向量数据库 | ChromaDB(PersistentClient / HttpClient) |
74
74
  | 嵌入模型 | OpenAI Embedding / Ollama Embedding |
75
75
  | 调度引擎 | nonebot_plugin_apscheduler |
76
- | 持久化 | CachedUserDataRepository(uid=`amritabot_inner_thinker`) |
76
+ | 持久化 | CachedUserDataRepository(uid=`user_00000000`) |
77
77
  | Token 统计 | InsightsModel(复用 Bot 全局 usage 统计) |
78
78
  | 配置管理 | Pydantic + TOML |
79
79
  | 代码质量 | Ruff + Pyright |
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "amrita_plugin_memory"
3
3
  description = "Amrita长期记忆插件"
4
- version = "0.2.2.post1"
4
+ version = "0.2.4"
5
5
  dependencies = [
6
6
  "aiohttp>=3.13.3",
7
7
  "aiologic>=0.16.0",