sage-mem 0.1.0 → 0.1.2

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 (2) hide show
  1. package/lib/index.js +10 -0
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -114,6 +114,16 @@ export function apply(ctx) {
114
114
  contentSessionId: sessionId,
115
115
  ...(lastAssistantText ? { last_assistant_message: lastAssistantText } : {}),
116
116
  })
117
+ // 元认知捕获:回合最后一条 assistant 输出(装了 sage-meta 时是自检输出)
118
+ // 作为带标记的 observation 发,worker 压缩时按 lesson 类型引导归类
119
+ if (lastAssistantText) {
120
+ post('/api/sessions/observations', {
121
+ contentSessionId: sessionId,
122
+ tool_name: 'meta/self-check',
123
+ tool_input: { turn: event.data?.turn },
124
+ tool_response: lastAssistantText,
125
+ })
126
+ }
117
127
  // 拉取最新记忆上下文,缓存给下一个会话注入
118
128
  fetch(`${WORKER_URL}/api/context/inject?project=${encodeURIComponent(PROJECT)}`, {
119
129
  signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sage-mem",
3
- "description": "Sage memory plugin: bridges DSH session events to the sage-mem worker (forked claude-mem) for cross-session memory",
4
- "version": "0.1.0",
3
+ "description": "Memory plugin for DeepSeek Harness (DSH) — cross-session memory with Chinese-first full-text search",
4
+ "version": "0.1.2",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {