cortico-world-memory 0.1.7 → 0.1.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cortico-world-memory",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "type": "module",
5
5
  "description": "Cortico World 扩展:五层记忆(事实库/知识库/反思/人格/档案)+ 三级记忆底座 + Hybrid Recall 向量混合检索(移植自 E:/qq_bot 的记忆系统与 memory_server 向量 sidecar,qq_bot 源码零改动)。",
6
6
  "license": "MIT",
package/src/config.ts CHANGED
@@ -97,8 +97,8 @@ export const MEMORY_CONFIG_GROUP: ConfigGroup = {
97
97
  'worlds.memory.embeddingSidecarUrl': { type: 'string', title: 'Sidecar 地址', description: 'sidecar 模式用,qq_bot memory_server(默认 http://127.0.0.1:8766)。' },
98
98
  'worlds.memory.embeddingTimeoutMs': { type: 'number', title: 'Sidecar 超时(ms)', description: 'qq_bot 向量模型首载慢,默认 3 分钟。' },
99
99
  'worlds.memory.storageBackend': {
100
- type: 'string', title: '存储后端', enum: ['json', 'sqlite'],
101
- description: 'json=原生 JSON 文件(默认);sqlite=单库 KV(自动 better-sqlite3→node:sqlite 回退)。切 sqlite 首次自动迁移旧 JSON。',
100
+ type: 'string', title: '存储后端', enum: ['json', 'sqlite'], 'x-hot': false,
101
+ description: 'json=原生 JSON 文件(默认);sqlite=单库 KV(自动 better-sqlite3→node:sqlite 回退)。切 sqlite 首次自动迁移旧 JSON。改后须点「重启」生效。',
102
102
  },
103
103
  },
104
104
  },
package/src/world.ts CHANGED
@@ -3,6 +3,7 @@ import { fileURLToPath } from 'node:url';
3
3
  import type { World, WorldHost, ToolDef, ToolTag, EventEnvelope } from 'cortico/core/types.ts';
4
4
  import type { WorldContext } from 'cortico/world.ts';
5
5
  import type { MemoryConfig } from './config.ts';
6
+ import { MEMORY_CONFIG_GROUP } from './config.ts';
6
7
  import { MemoryBase } from './memory.ts';
7
8
  import { EmbeddingClient } from './embedding.ts';
8
9
  import { VectorStore } from './vector-store.ts';
@@ -103,7 +104,7 @@ export class MemoryWorld implements World {
103
104
 
104
105
  console() {
105
106
  return {
106
- config: [], // 旋钮由部署的 worlds/memory.json 提供,此处不重复
107
+ config: [MEMORY_CONFIG_GROUP], // 在「记忆系统」分组下渲染全部旋钮(含存储后端切换)
107
108
  promptDocs: [
108
109
  {
109
110
  key: 'worlds.memory.envPrompt',