dsh-memo-sync 2.74.6 → 2.74.9

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/README.md CHANGED
@@ -15,16 +15,14 @@
15
15
 
16
16
  ## 安装
17
17
 
18
- 从 npm 装(发包后可用):
19
-
20
18
  ```sh
21
19
  dsh plugin --profile web add dsh-memo-sync
22
20
  ```
23
21
 
24
- **暂时也可以直接从 GitHub 装**(不依赖 npm,按 tag 锁版本):
22
+ 也可以用 git 源装(不经过 npm,按 tag 锁版本):
25
23
 
26
24
  ```sh
27
- dsh plugin --profile web add github:10110011-ling/dsh-memo-sync#v2.74.4
25
+ dsh plugin --profile web add github:10110011-ling/dsh-memo-sync#v2.74.6
28
26
  ```
29
27
 
30
28
  > `dsh plugin` 本质是把参数转发给 profile 里的 pnpm,所以 npm 包名、git 地址、本地 tarball 都能装。
package/docs/DETAIL.md CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  ## 它解决什么
7
7
 
8
- - **上下文放不下整本备忘录** → 只注入目录(现在约 5 KB,上限 8 KB),问到哪条再 `memo_read`。
8
+ - **上下文放不下整本备忘录** → 只注入目录(默认上限 8 KB,超了会列出没注入的条目 id),问到哪条再 `memo_read`。
9
9
  - **记忆散在几十个会话里,事后想找原话** → 有原文归档,按会话分目录、30 条一段。
10
10
  - **人设和「当前状态」要一直在场** → 它们有固定位置,且不跟条目表抢预算。
11
11
  - **几个会话同时开着,彼此不知道在干什么** → v2.69 的「在场」表,压成一行注入。
package/docs/MARKET.md CHANGED
@@ -43,7 +43,7 @@ AI 的记忆有两种坏结局:**全塞进上下文**(越用越贵、越用
43
43
  | 本地模型 | **不需要**(可选:想省钱/离线时,摘要可指向本地小模型) |
44
44
  | API Key | **不需要**(复用宿主已有模型;默认一次模型都不调) |
45
45
  | 网络 | **不需要**(纯本地文件,无遥测) |
46
- | 磁盘 | 实测平均 2.9 KB/条,100 条约 290 KB;归档平均 16 KB/段(30 条消息),每 100 条对话约 55 KB |
46
+ | 磁盘 | 平均每条约 3 KB(100 条约 300 KB);原文归档每段约 16 KB(30 条消息一段) |
47
47
 
48
48
  ## 安装
49
49
 
package/index.js CHANGED
@@ -63,7 +63,7 @@ function layerOf(raw) {
63
63
  return LAYERS[k] ? k : '';
64
64
  }
65
65
  /** 构建标记:用来确认运行中的插件是不是当前这份代码。 */
66
- const BUILD = '2.74.6+npm-author';
66
+ const BUILD = '2.74.9+pack-index';
67
67
 
68
68
  export const inject = ['tools'];
69
69
 
package/index.json ADDED
@@ -0,0 +1,35 @@
1
+ {
2
+ "format": 1,
3
+ "title": {
4
+ "en": "10110011-ling plugins",
5
+ "zh": "10110011-ling 的插件"
6
+ },
7
+ "plugins": [
8
+ {
9
+ "name": "dsh-memo-sync",
10
+ "title": "记忆(memo-sync)",
11
+ "description": "目录式长期记忆:一条记忆一个 markdown 文件,只把分层目录注入 AGENTS.md;带原话归档、按线索召回、跨会话在场与 3D 星图。默认不调用模型。",
12
+ "icon": "https://raw.githubusercontent.com/10110011-ling/dsh-memo-sync/main/icon.png",
13
+ "author": "10110011-limg",
14
+ "homepage": "https://github.com/10110011-ling/dsh-memo-sync#readme",
15
+ "repository": {
16
+ "url": "https://github.com/10110011-ling/dsh-memo-sync"
17
+ },
18
+ "keywords": [
19
+ "memory",
20
+ "memo",
21
+ "context",
22
+ "archive"
23
+ ],
24
+ "versions": [
25
+ {
26
+ "version": "2.74.9",
27
+ "publishTimestamp": 1795846439,
28
+ "source": {
29
+ "type": "npm"
30
+ }
31
+ }
32
+ ]
33
+ }
34
+ ]
35
+ }
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "dsh-memo-sync",
3
- "version": "2.74.6",
3
+ "version": "2.74.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "scripts": {
8
- "test": "node test/selfcheck.mjs"
8
+ "test": "node test/selfcheck.mjs",
9
+ "index": "node scripts/gen-index.mjs",
10
+ "prepublishOnly": "node scripts/gen-index.mjs"
9
11
  },
10
12
  "author": "10110011-limg",
11
13
  "repository": {
@@ -64,6 +66,8 @@
64
66
  "icon.svg",
65
67
  "icon.png",
66
68
  "LICENSE",
67
- "README.md"
69
+ "README.md",
70
+ "index.json",
71
+ "scripts"
68
72
  ]
69
73
  }
@@ -0,0 +1,25 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+
4
+ const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
5
+ const index = {
6
+ format: 1,
7
+ title: { en: '10110011-ling plugins', zh: '10110011-ling 的插件' },
8
+ plugins: [
9
+ {
10
+ name: pkg.name,
11
+ title: '记忆(memo-sync)',
12
+ description: '目录式长期记忆:一条记忆一个 markdown 文件,只把分层目录注入 AGENTS.md;带原话归档、按线索召回、跨会话在场与 3D 星图。默认不调用模型。',
13
+ icon: 'https://raw.githubusercontent.com/10110011-ling/dsh-memo-sync/main/icon.png',
14
+ author: pkg.author,
15
+ homepage: 'https://github.com/10110011-ling/dsh-memo-sync#readme',
16
+ repository: { url: 'https://github.com/10110011-ling/dsh-memo-sync' },
17
+ keywords: ['memory', 'memo', 'context', 'archive'],
18
+ versions: [
19
+ { version: pkg.version, publishTimestamp: Math.floor(Date.now() / 1000), source: { type: 'npm' } },
20
+ ],
21
+ },
22
+ ],
23
+ };
24
+ fs.writeFileSync('index.json', JSON.stringify(index, null, 2) + '\n');
25
+ console.log('index.json → ' + pkg.name + '@' + pkg.version);