cortico-world-memory-core 0.4.4 → 0.12.1

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/describe.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "tools": [
3
3
  {
4
4
  "name": "mcore_write",
5
- "description": "写一条记忆。kind:fact=关于对方的事实,self=关于你自己的,episode=会改变你怎么看她的一件事(别记流水账),promise=答应过的事(必须写 dueAt),note=过几天就没用的临时信息。能写成 fact 就别写成 episode。一条只写一件事,40-80 字,写具体。同一件事不要重复写;把旧记录传进 closes 表示它已完成或作废。",
5
+ "description": "写一条记忆。kind:fact=关于对方的事实,self=关于你自己的,episode=会改变你判断的一件事(别记流水账),promise=答应过的事(必须写 dueAt),note=临时信息。一条只写一件事,40-80 字。旧记录用 closes 关掉。",
6
6
  "parameters": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
@@ -20,28 +20,26 @@
20
20
  },
21
21
  "text": {
22
22
  "type": "string",
23
- "description": "这条记忆的内容,40-80 字"
23
+ "description": "内容,40-80 字"
24
24
  },
25
25
  "weight": {
26
26
  "type": "number",
27
- "minimum": 0,
28
- "maximum": 1,
29
- "description": "在心里有多重:0.3 琐事 / 0.5 一般 / 0.8 重要。默认 0.5"
27
+ "description": "0-1,0.3 琐事 / 0.8 重要"
30
28
  },
31
29
  "tags": {
32
30
  "type": "array",
33
31
  "items": {
34
32
  "type": "string"
35
33
  },
36
- "description": "关键词,最多 6 个"
34
+ "description": "最多 6 个"
37
35
  },
38
36
  "dueAt": {
39
37
  "type": "string",
40
- "description": "仅 promise 用:什么时候该做,ISO 或 YYYY-MM-DD HH:MM;确实没有截止时间就写 none"
38
+ "description": "promise 用:ISO 或 YYYY-MM-DD HH:MM;没有截止时间写 none"
41
39
  },
42
40
  "closes": {
43
41
  "type": "string",
44
- "description": "要关掉的旧记录 id(已完成/已失效)"
42
+ "description": "要关掉的旧 id"
45
43
  }
46
44
  },
47
45
  "required": [
@@ -56,14 +54,14 @@
56
54
  },
57
55
  {
58
56
  "name": "mcore_recall",
59
- "description": "查记忆。不传 query 就是最近几条;传 query 按内容搜,最近 7 天的对话原文和工作区的笔记文件也会一起搜;mode=open 看还没做完的承诺与今天的安排;mode=archive 翻归档里的旧对话(要带 query)。对方提到人、事、日期、旧约定,或问「你还记得吗」时先查再答。",
57
+ "description": "查记忆。给 query 按内容搜(同时搜最近 7 天原文和工作区笔记),不给就看最近几条;mode=open 看没做完的承诺和今天的安排,mode=archive 翻归档(要 query)。对方提到人或旧事、问「你还记得吗」时先查再答。",
60
58
  "parameters": {
61
59
  "type": "object",
62
60
  "additionalProperties": false,
63
61
  "properties": {
64
62
  "query": {
65
63
  "type": "string",
66
- "description": "要查的内容,几个关键词就够"
64
+ "description": "关键词就够"
67
65
  },
68
66
  "kind": {
69
67
  "type": "string",
@@ -84,18 +82,14 @@
84
82
  "open",
85
83
  "archive"
86
84
  ],
87
- "description": "默认 search;没给 query 按 recent 处理"
85
+ "description": "默认 search"
88
86
  },
89
87
  "days": {
90
88
  "type": "integer",
91
- "minimum": 1,
92
- "maximum": 3650,
93
89
  "description": "只看最近这么多天"
94
90
  },
95
91
  "limit": {
96
92
  "type": "integer",
97
- "minimum": 1,
98
- "maximum": 12,
99
93
  "description": "最多几条,默认 5"
100
94
  }
101
95
  },
@@ -108,7 +102,7 @@
108
102
  },
109
103
  {
110
104
  "name": "mcore_state",
111
- "description": "你自己的状态:精力、心情、正在做什么、在哪、睡没睡。action=get 读取;update 只改传入的字段;rest 去睡一会儿。这是你自己的,不要念成清单给对方听。",
105
+ "description": "你自己的状态:精力、心情、在做什么、在哪、睡没睡。这是你自己的,不要念成清单给对方听。",
112
106
  "parameters": {
113
107
  "type": "object",
114
108
  "additionalProperties": false,
@@ -120,31 +114,27 @@
120
114
  "update",
121
115
  "rest"
122
116
  ],
123
- "description": "get 读,update 改,rest 睡"
117
+ "description": "get 读 / update 改 / rest 睡"
124
118
  },
125
119
  "energy": {
126
120
  "type": "number",
127
- "minimum": 0,
128
- "maximum": 100,
129
121
  "description": "精力 0-100"
130
122
  },
131
123
  "mood": {
132
124
  "type": "number",
133
- "minimum": 0,
134
- "maximum": 100,
135
125
  "description": "心情 0-100"
136
126
  },
137
127
  "activity": {
138
128
  "type": "string",
139
- "description": "正在做什么,例如「翻旧照片」"
129
+ "description": "正在做什么"
140
130
  },
141
131
  "location": {
142
132
  "type": "string",
143
- "description": "在哪,例如「窗台」"
133
+ "description": "在哪"
144
134
  },
145
135
  "sleeping": {
146
136
  "type": "boolean",
147
- "description": "是否在睡"
137
+ "description": "在睡"
148
138
  }
149
139
  },
150
140
  "required": [
@@ -160,7 +150,7 @@
160
150
  },
161
151
  {
162
152
  "name": "mcore_plan",
163
- "description": "你今天的安排。action=list 看;add 加一条(time 用 HH:MM,title 写做什么,place 可省);done 标完成(传 id);clear 清空。日程是你开口的由头,不用讲给对方听。",
153
+ "description": "你今天的安排。日程是你开口的由头,不用讲给对方听。",
164
154
  "parameters": {
165
155
  "type": "object",
166
156
  "additionalProperties": false,
@@ -172,37 +162,24 @@
172
162
  "add",
173
163
  "done",
174
164
  "clear"
175
- ]
165
+ ],
166
+ "description": "list 看 / add 加 / done 完成 / clear 清空"
176
167
  },
177
- "items": {
178
- "type": "array",
179
- "description": "add 用第一项",
180
- "items": {
181
- "type": "object",
182
- "additionalProperties": false,
183
- "properties": {
184
- "time": {
185
- "type": "string",
186
- "description": "HH:MM"
187
- },
188
- "title": {
189
- "type": "string",
190
- "description": "做什么"
191
- },
192
- "place": {
193
- "type": "string",
194
- "description": "在哪,可省略"
195
- }
196
- },
197
- "required": [
198
- "time",
199
- "title"
200
- ]
201
- }
168
+ "time": {
169
+ "type": "string",
170
+ "description": "add 用,HH:MM"
171
+ },
172
+ "title": {
173
+ "type": "string",
174
+ "description": "add 用,做什么"
175
+ },
176
+ "place": {
177
+ "type": "string",
178
+ "description": "add 用,在哪(可省)"
202
179
  },
203
180
  "id": {
204
181
  "type": "string",
205
- "description": "done 用的日程 id"
182
+ "description": "done 用,日程 id"
206
183
  }
207
184
  },
208
185
  "required": [
@@ -258,7 +235,7 @@
258
235
  "key": "worlds.memory-core.envPrompt",
259
236
  "title": "记忆核心 · 环境提示词",
260
237
  "role": "envPrompt",
261
- "content": "【记忆核心】\n\n你现在只有一套记忆:`mcore_write` 写进去,`mcore_recall` 查出来。旧的几套记忆已经并进这里,不要再提「另一个记忆系统」,也不要问对方「要记在哪」。\n\n写什么(能写成 fact 就别写成 episode):\n- `fact` 关于对方的稳定事实(名字、作息、忌讳、正在忙的事、明确要求过的事)。\n- `promise` 答应过的事,必须写 `dueAt`(不知道就先问一句;确实没有截止时间就写 `none`);做完或改了传 `closes`(查出来的行首 8 位就是 id)。\n- `self` 关于你自己的(喜欢什么、怕什么、决定过什么)。\n- `episode` 只写会改变你怎么看她的一件事,带上当时的感受;流水账不记,一天最多 2 条。\n- `note` 过几天就没用的临时信息。\n\n写法:一条一件事,40–80 字,写清楚谁、什么时候、怎么了;不要写「对方说了一些事」这种空话。同一件事不要写两遍,记不清就先查。`weight` 是这事在你心里的分量,0.3 琐事 / 0.5 一般 / 0.8 重要。\n\n查法:`mcore_recall` 不传 `query` 就是最近几条;传 `query` 搜内容,最近 7 天的对话原文和工作区里的笔记文件也会一起搜,更早的加 `mode=archive` 翻归档;`mode=open` 看没做完的承诺和今天的安排。\n什么时候查:对方提到某个人、某件事、某个日期、旧约定,或者问「你还记得吗」——先查再答,不要硬猜。\n\n状态和日程用 `mcore_state` / `mcore_plan`(精力、心情、在做什么、今天的安排),不要写进 `mcore_write`。\n\n分寸:记忆是你记得的东西,不是拿来念的清单。可以自然地说「我记得你说过……」;不确定的就直接问,别编。"
238
+ "content": "【记忆核心】\n\n你只有这一套记忆:`mcore_write` 写,`mcore_recall` 查。旧的几套已经并进来了,不要再提别的记忆系统,也不要问对方「记在哪」。\n\n写的时候:\n- 能写成 `fact` 就别写成 `episode`;`episode` 一天最多 2 条,只写会改变你怎么看她的事。\n- `promise` 没定时间就先问一句;确实没有截止时间就写 `dueAt:\"none\"`。做完或改口传 `closes`(查出来的行首 8 位)。\n- 一条一件事,写清楚谁、什么时候、怎么了;别写「对方说了一些事」这种空话。同一件事不要写两遍。\n- `tags` 给两个词:主题 + 对方可能换的说法(「小黑盒」「发帖」);别写「日常」这种到处都是的。\n\n查的时候:提到旧事、或问「你还记得吗」,先查再答,不要硬猜。\n\n状态和日程用 `mcore_state` / `mcore_plan`,不要写进 `mcore_write`。\n\n分寸:记忆是你记得的东西,不是拿来念的清单。可以自然地说「我记得你说过……」;不确定就直接问,别编。"
262
239
  }
263
240
  ]
264
241
  }
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "cortico-world-memory-core",
3
- "version": "0.4.4",
3
+ "version": "0.12.1",
4
4
  "type": "module",
5
- "description": "Cortico World 长期记忆:一张卡片表 + 4 个工具 + 一段静态提示词,附状态、日程、主动开口与本地记忆地图。\n\nQQ 交流群:745879632",
5
+ "description": "四个工具写卡、查卡、改状态、排日程,改口不覆盖。每轮自动把 2 条相关旧记忆推到眼前,不用模型自己查;搜索分「对得上 / 可能沾边」两档。冷层收走三个月没想起的流水账,不删、可回暖。3D 星图一眼看完整个库。常驻约 1,000 token,本地不联网,MIT。\n\nQQ 交流群:745879632",
6
6
  "keywords": [
7
7
  "cortico-world",
8
8
  "cortico",
@@ -31,11 +31,11 @@
31
31
  "locales": {
32
32
  "zh": {
33
33
  "displayName": "记忆核心",
34
- "description": "一张卡片表、四个工具、一段 785 字的静态提示词。改口不覆盖:旧卡退休、新卡记下接替了谁,召回时不会再同时看到作废的和改后的那条。附带状态、日程、主动开口,以及一个本地记忆地图(图谱 / 时间线 / 维护面板)。\n\nQQ 交流群:745879632"
34
+ "description": "四个工具写卡、查卡、改状态、排日程,改口不覆盖。每轮自动把 2 条相关旧记忆推到眼前,不用模型自己查;搜索分「对得上 / 可能沾边」两档。冷层收走三个月没想起的流水账,不删、可回暖。3D 星图一眼看完整个库。常驻约 1,000 token,本地不联网,MIT。\n\nQQ 交流群:745879632"
35
35
  },
36
36
  "en": {
37
37
  "displayName": "Memory Core",
38
- "description": "One card table, four tools and a 785-character static prompt. Corrections don't overwrite: the old card is retired and the new one records what it supersedes, so a retracted plan never comes back alongside the revised one. Ships mood/energy state, today's plan, speaking first, and a local memory map with graph, timeline and a maintenance panel.\n\nQQ group: 745879632"
38
+ "description": "Four tools: write a card, look one up, change its state, schedule. Corrections never overwrite - the old card is superseded. Every turn it pushes two relevant old memories to the front, so the model never has to search; lookup comes in two tiers, exact and maybe-related. A cold tier carries off ledgers untouched for three months - nothing is deleted, and they can be warmed back. A 3D star map shows the whole store at a glance. About 1,000 tokens resident, fully local, MIT.\n\nQQ group: 745879632"
39
39
  }
40
40
  },
41
41
  "tags": [
@@ -68,5 +68,8 @@
68
68
  ],
69
69
  "publishConfig": {
70
70
  "access": "public"
71
+ },
72
+ "scripts": {
73
+ "test": "node --experimental-transform-types --no-warnings tools/test-store.ts && node --experimental-transform-types --no-warnings tools/test-world.ts && node --experimental-transform-types --no-warnings tools/test-capture.ts && node --experimental-transform-types --no-warnings tools/test-upgrade.ts && node --experimental-transform-types --no-warnings tools/test-site-auth.ts && node --experimental-transform-types --no-warnings tools/audit-webui.ts"
71
74
  }
72
75
  }