amrita_plugin_memory 0.2.0__tar.gz → 0.2.2__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 (16) hide show
  1. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/PKG-INFO +16 -14
  2. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/README.md +15 -13
  3. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory/config.py +2 -2
  4. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory.egg-info/PKG-INFO +16 -14
  5. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/pyproject.toml +2 -1
  6. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/LICENSE +0 -0
  7. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory/__init__.py +0 -0
  8. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory/embed.py +0 -0
  9. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory/matchers.py +0 -0
  10. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory/tools.py +0 -0
  11. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory/vector.py +0 -0
  12. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory.egg-info/SOURCES.txt +0 -0
  13. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory.egg-info/dependency_links.txt +0 -0
  14. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory.egg-info/requires.txt +0 -0
  15. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/amrita_plugin_memory.egg-info/top_level.txt +0 -0
  16. {amrita_plugin_memory-0.2.0 → amrita_plugin_memory-0.2.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amrita_plugin_memory
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Amrita长期记忆插件
5
5
  Requires-Python: <3.14,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -152,7 +152,7 @@ per_session_memory_limit = 50
152
152
  [subconscious]
153
153
  enabled = false # 是否启用
154
154
  experimental = true # 实验性标注
155
- target_user_id = "" # 目标用户 ID(必填)
155
+ target_user_id = "" # 目标用户 ID(为空则不启用)
156
156
  allowed_tools = [] # 额外可用工具
157
157
  max_iterations = 10 # 单轮 ReAct 最大步数
158
158
  loop_detect_threshold = 3 # 连续同工具触发警告阈值
@@ -174,21 +174,23 @@ max_abstracts = 5 # 摘要滑动窗口大小
174
174
 
175
175
  **`subconscious_prompt.txt`** — Agent 系统提示词(由 `prompt_file` 配置指定)
176
176
 
177
- | 模板变量 | 说明 |
178
- | ------------------ | ---------------------------------- |
179
- | `{{ last_run }}` | 上一轮 MemoryLimiter 产出的摘要 |
180
- | `{{ last_abstracts }}` | 最近 N 轮摘要列表(max_abstracts 控制) |
181
- | `{{ current_time }}` | 当前 UTC 时间 |
182
- | `{{ target_user_id }}` | 目标用户 ID |
183
- | `{{ total_runs }}` | 累计运行轮数 |
177
+ | 模板变量 | 说明 |
178
+ | ------------------------ | ------------------------------------ |
179
+ | `{{ character_prompt }}` | Bot 当前角色设定(从 `config/chat/private_prompts/` 读取) |
180
+ | `{{ last_run }}` | 上一轮 MemoryLimiter 产出的摘要 |
181
+ | `{{ last_abstracts }}` | 最近 N 轮摘要列表(max_abstracts 控制) |
182
+ | `{{ current_time }}` | 当前 UTC 时间 |
183
+ | `{{ target_user_id }}` | 目标用户 ID |
184
+ | `{{ total_runs }}` | 累计运行轮数 |
184
185
 
185
186
  **`subconscious_send_prompt.txt`** — 主动消息生成模板
186
187
 
187
- | 模板变量 | 说明 |
188
- | ---------------------- | -------------------- |
189
- | `{{ intent }}` | LLM 指定的消息意图 |
190
- | `{{ memory_context }}` | 关联的记忆上下文 |
191
- | `{{ current_time }}` | 当前 UTC 时间 |
188
+ | 模板变量 | 说明 |
189
+ | ------------------------ | ------------------------------------ |
190
+ | `{{ character_prompt }}` | Bot 当前角色设定 |
191
+ | `{{ intent }}` | LLM 指定的消息意图 |
192
+ | `{{ memory_context }}` | 关联的记忆上下文 |
193
+ | `{{ current_time }}` | 当前 UTC 时间 |
192
194
 
193
195
  ### 环境变量(`.env`)
194
196
 
@@ -136,7 +136,7 @@ per_session_memory_limit = 50
136
136
  [subconscious]
137
137
  enabled = false # 是否启用
138
138
  experimental = true # 实验性标注
139
- target_user_id = "" # 目标用户 ID(必填)
139
+ target_user_id = "" # 目标用户 ID(为空则不启用)
140
140
  allowed_tools = [] # 额外可用工具
141
141
  max_iterations = 10 # 单轮 ReAct 最大步数
142
142
  loop_detect_threshold = 3 # 连续同工具触发警告阈值
@@ -158,21 +158,23 @@ max_abstracts = 5 # 摘要滑动窗口大小
158
158
 
159
159
  **`subconscious_prompt.txt`** — Agent 系统提示词(由 `prompt_file` 配置指定)
160
160
 
161
- | 模板变量 | 说明 |
162
- | ------------------ | ---------------------------------- |
163
- | `{{ last_run }}` | 上一轮 MemoryLimiter 产出的摘要 |
164
- | `{{ last_abstracts }}` | 最近 N 轮摘要列表(max_abstracts 控制) |
165
- | `{{ current_time }}` | 当前 UTC 时间 |
166
- | `{{ target_user_id }}` | 目标用户 ID |
167
- | `{{ total_runs }}` | 累计运行轮数 |
161
+ | 模板变量 | 说明 |
162
+ | ------------------------ | ------------------------------------ |
163
+ | `{{ character_prompt }}` | Bot 当前角色设定(从 `config/chat/private_prompts/` 读取) |
164
+ | `{{ last_run }}` | 上一轮 MemoryLimiter 产出的摘要 |
165
+ | `{{ last_abstracts }}` | 最近 N 轮摘要列表(max_abstracts 控制) |
166
+ | `{{ current_time }}` | 当前 UTC 时间 |
167
+ | `{{ target_user_id }}` | 目标用户 ID |
168
+ | `{{ total_runs }}` | 累计运行轮数 |
168
169
 
169
170
  **`subconscious_send_prompt.txt`** — 主动消息生成模板
170
171
 
171
- | 模板变量 | 说明 |
172
- | ---------------------- | -------------------- |
173
- | `{{ intent }}` | LLM 指定的消息意图 |
174
- | `{{ memory_context }}` | 关联的记忆上下文 |
175
- | `{{ current_time }}` | 当前 UTC 时间 |
172
+ | 模板变量 | 说明 |
173
+ | ------------------------ | ------------------------------------ |
174
+ | `{{ character_prompt }}` | Bot 当前角色设定 |
175
+ | `{{ intent }}` | LLM 指定的消息意图 |
176
+ | `{{ memory_context }}` | 关联的记忆上下文 |
177
+ | `{{ current_time }}` | 当前 UTC 时间 |
176
178
 
177
179
  ### 环境变量(`.env`)
178
180
 
@@ -20,8 +20,8 @@ class SubconsciousConfig(BaseModel):
20
20
  experimental: bool = Field(
21
21
  default=True, description="实验性标注,启用时日志输出 [EXPERIMENTAL]"
22
22
  )
23
- target_user_id: str | None = Field(
24
- default=None, description="目标用户ID(MVP仅支持单用户),为空则不启动"
23
+ target_user_id: str = Field(
24
+ default="", description="目标用户ID(MVP仅支持单用户),为空则不启动"
25
25
  )
26
26
  allowed_tools: list[str] = Field(
27
27
  default_factory=list,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: amrita_plugin_memory
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Amrita长期记忆插件
5
5
  Requires-Python: <3.14,>=3.10
6
6
  Description-Content-Type: text/markdown
@@ -152,7 +152,7 @@ per_session_memory_limit = 50
152
152
  [subconscious]
153
153
  enabled = false # 是否启用
154
154
  experimental = true # 实验性标注
155
- target_user_id = "" # 目标用户 ID(必填)
155
+ target_user_id = "" # 目标用户 ID(为空则不启用)
156
156
  allowed_tools = [] # 额外可用工具
157
157
  max_iterations = 10 # 单轮 ReAct 最大步数
158
158
  loop_detect_threshold = 3 # 连续同工具触发警告阈值
@@ -174,21 +174,23 @@ max_abstracts = 5 # 摘要滑动窗口大小
174
174
 
175
175
  **`subconscious_prompt.txt`** — Agent 系统提示词(由 `prompt_file` 配置指定)
176
176
 
177
- | 模板变量 | 说明 |
178
- | ------------------ | ---------------------------------- |
179
- | `{{ last_run }}` | 上一轮 MemoryLimiter 产出的摘要 |
180
- | `{{ last_abstracts }}` | 最近 N 轮摘要列表(max_abstracts 控制) |
181
- | `{{ current_time }}` | 当前 UTC 时间 |
182
- | `{{ target_user_id }}` | 目标用户 ID |
183
- | `{{ total_runs }}` | 累计运行轮数 |
177
+ | 模板变量 | 说明 |
178
+ | ------------------------ | ------------------------------------ |
179
+ | `{{ character_prompt }}` | Bot 当前角色设定(从 `config/chat/private_prompts/` 读取) |
180
+ | `{{ last_run }}` | 上一轮 MemoryLimiter 产出的摘要 |
181
+ | `{{ last_abstracts }}` | 最近 N 轮摘要列表(max_abstracts 控制) |
182
+ | `{{ current_time }}` | 当前 UTC 时间 |
183
+ | `{{ target_user_id }}` | 目标用户 ID |
184
+ | `{{ total_runs }}` | 累计运行轮数 |
184
185
 
185
186
  **`subconscious_send_prompt.txt`** — 主动消息生成模板
186
187
 
187
- | 模板变量 | 说明 |
188
- | ---------------------- | -------------------- |
189
- | `{{ intent }}` | LLM 指定的消息意图 |
190
- | `{{ memory_context }}` | 关联的记忆上下文 |
191
- | `{{ current_time }}` | 当前 UTC 时间 |
188
+ | 模板变量 | 说明 |
189
+ | ------------------------ | ------------------------------------ |
190
+ | `{{ character_prompt }}` | Bot 当前角色设定 |
191
+ | `{{ intent }}` | LLM 指定的消息意图 |
192
+ | `{{ memory_context }}` | 关联的记忆上下文 |
193
+ | `{{ current_time }}` | 当前 UTC 时间 |
192
194
 
193
195
  ### 环境变量(`.env`)
194
196
 
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "amrita_plugin_memory"
3
3
  description = "Amrita长期记忆插件"
4
- version = "0.2.0"
4
+ version = "0.2.2"
5
5
  dependencies = [
6
6
  "aiohttp>=3.13.3",
7
7
  "aiologic>=0.16.0",
@@ -33,6 +33,7 @@ dev-dependencies = [
33
33
  "ruff>=0.12.8",
34
34
  "nonebot-plugin-orm[default]>=0.8.2",
35
35
  #"pytest>=8.4.1",
36
+ "ambot-inlinectl>=0.1.2",
36
37
  ]
37
38
  package = true
38
39