@jacklika/dsh-memory 0.1.7-rc.10

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 ADDED
@@ -0,0 +1,84 @@
1
+ ---
2
+ description: "The dsh memory bundle: an Obsidian-compatible Markdown vault with per-agent write namespaces, serialized writes, and git history layered over dsh-base."
3
+ kind: "package-bundle"
4
+ ---
5
+
6
+ # @jacklika/dsh-memory
7
+
8
+ English | [中文](README.zh.md)
9
+
10
+ ## Summary
11
+
12
+ `dsh-memory` is the external Profile Bundle that mounts the complete memory chain — an Obsidian-compatible Markdown vault plus its write coordination — after `dsh-base`. Install this one package into a custom Profile; its runtime dependencies bring every member plugin.
13
+
14
+ ## Table of Contents
15
+
16
+ - [Use this package](#use-this-package)
17
+ - [Understand the implementation](#understand-the-implementation)
18
+ - [Model Experience](#model-experience)
19
+ - [Known Limitations and Deferred Work](#known-limitations-and-deferred-work)
20
+ - [Dev Note](#dev-note)
21
+
22
+ -----
23
+
24
+ <a id="use-this-package"></a>
25
+ ## Use this package
26
+
27
+ Install the Bundle through the Harness Plugin Manager; the Profile may already exist or be created by the command:
28
+
29
+ ```sh
30
+ dsh plugin --profile memory add @jacklika/dsh-memory@0.1.7-rc.10
31
+ ```
32
+
33
+ Keep the Bundle after `dsh-base` and include an application layer such as `dsh-headless` or `dsh-web-app`. Semantic search stays disabled until the profile patch supplies an embeddings endpoint:
34
+
35
+ ```yaml
36
+ - id: tool-memory-vector
37
+ disabled: false
38
+ config:
39
+ endpoint: http://localhost:11434/v1/embeddings
40
+ model: nomic-embed-text
41
+ ```
42
+
43
+ The Bundle patch sets the vault to `<session cwd>/.plugins/memory/`; override `vaultRoot` on `tool-memory-filesystem`, `memory-queue`, `memory-git`, and `tool-memory-graph` from the profile patch if you prefer a different location.
44
+
45
+ <a id="understand-the-implementation"></a>
46
+ ## Understand the implementation
47
+
48
+ The bundle's substance is `cordis.patch.yml`, declared by the `dsh.bundle.patch` manifest field. Its insert list mounts the write ladder in waterfall order:
49
+
50
+ 1. `memory-scope` rewrites private `wiki_write` ids into `agents/<agent key>/` namespaces so agents cannot collide by construction; `shared/` prefixes pass through.
51
+ 2. `memory-queue` serializes surviving same-lane writes with an `mkdir` lock and heartbeat-counter liveness, so separate processes cannot interleave.
52
+ 3. `memory-git` commits `shared/` writes inside the lock; `nestedRepo: 'init'` keeps vault history in the vault's own `.git`, never the enclosing project repo.
53
+ 4. `tool-memory-filesystem` owns the vault: `wiki_read`, `wiki_search`, `wiki_write` with atomic publication and optional `baseVersion` conflict detection.
54
+ 5. `tool-memory-graph` adds `wiki_graph` link-graph queries.
55
+
56
+ `tool-memory-vector` ships disabled because it requires an external embeddings endpoint. All git commits are local; nothing pushes.
57
+
58
+ <a id="model-experience"></a>
59
+ ## Model Experience
60
+
61
+ Indirectly, through each inserted row's package, which owns that row's model-facing behavior.
62
+
63
+ #### KV Cache effect
64
+
65
+ The bundle itself adds no request prefix; each inserted row's package owns any cache effect.
66
+
67
+ ## Known Limitations and Deferred Work
68
+
69
+ <a id="known-limitations-and-deferred-work"></a>
70
+
71
+ - Scope, queue locks, and version checks are advisory: writers outside the waterfall (shell, Obsidian, other processes) bypass them; atomic rename and `baseVersion` bound the damage.
72
+ - Write scope is partition-only: every agent can read the whole vault, including other agents' namespaces.
73
+ - `tool-memory-vector` needs an external embeddings endpoint; enabling it sends note content to that endpoint.
74
+ - Git history has no read/rollback tool yet; use `git` directly in the vault.
75
+
76
+ <a id="dev-note"></a>
77
+ ### Dev Note
78
+
79
+ <details>
80
+ <summary>Working context for maintainers — click to expand</summary>
81
+
82
+ None.
83
+
84
+ </details>
package/README.zh.md ADDED
@@ -0,0 +1,84 @@
1
+ ---
2
+ description: "dsh 记忆 bundle:在 dsh-base 之上叠加兼容 Obsidian 的 Markdown vault、按 agent 划分的写入命名空间、串行化写入与 git 历史。"
3
+ kind: "package-bundle"
4
+ ---
5
+
6
+ # @jacklika/dsh-memory
7
+
8
+ [English](README.md) | 中文
9
+
10
+ ## 概述
11
+
12
+ `dsh-memory` 是外部 Profile Bundle,在 `dsh-base` 之后挂载完整记忆链——兼容 Obsidian 的 Markdown vault 及其写协调。只需把这一个包安装进自定义 Profile;它的运行时依赖会带齐所有成员插件。
13
+
14
+ ## 目录
15
+
16
+ - [使用本包](#use-this-package)
17
+ - [理解实现](#understand-the-implementation)
18
+ - [模型体验](#model-experience)
19
+ - [已知限制与延期工作](#known-limitations-and-deferred-work)
20
+ - [开发备注](#dev-note)
21
+
22
+ -----
23
+
24
+ <a id="use-this-package"></a>
25
+ ## 使用本包
26
+
27
+ 通过 Harness Plugin Manager 安装 Bundle;该命令可使用已有 Profile,也可自动创建:
28
+
29
+ ```sh
30
+ dsh plugin --profile memory add @jacklika/dsh-memory@0.1.7-rc.10
31
+ ```
32
+
33
+ 保持 Bundle 位于 `dsh-base` 之后,并加入 `dsh-headless` 或 `dsh-web-app` 等应用层。语义搜索默认关闭,需在 profile patch 中提供 embeddings 端点后启用:
34
+
35
+ ```yaml
36
+ - id: tool-memory-vector
37
+ disabled: false
38
+ config:
39
+ endpoint: http://localhost:11434/v1/embeddings
40
+ model: nomic-embed-text
41
+ ```
42
+
43
+ Bundle patch 默认把 vault 设在 `<会话 cwd>/.plugins/memory/`;可在 profile patch 中覆盖 `tool-memory-filesystem`、`memory-queue`、`memory-git` 与 `tool-memory-graph` 的 `vaultRoot`。
44
+
45
+ <a id="understand-the-implementation"></a>
46
+ ## 理解实现
47
+
48
+ bundle 的实质是 `cordis.patch.yml`,由 `dsh.bundle.patch` 清单字段声明。其 insert 列表按 waterfall 顺序挂载写入阶梯:
49
+
50
+ 1. `memory-scope` 把私有 `wiki_write` 的 id 重写到 `agents/<agent key>/` 命名空间,使不同 agent 在结构上不可能撞车;`shared/` 前缀直接放行。
51
+ 2. `memory-queue` 用 `mkdir` 锁与心跳计数器判活串行化同 lane 的写,使不同进程无法交错。
52
+ 3. `memory-git` 在锁内提交 `shared/` 写;`nestedRepo: 'init'` 把 vault 历史保存在 vault 自己的 `.git` 中,绝不进入外层项目仓库。
53
+ 4. `tool-memory-filesystem` 拥有 vault 本体:`wiki_read`、`wiki_search`、`wiki_write`,原子发布与可选 `baseVersion` 冲突检测。
54
+ 5. `tool-memory-graph` 提供 `wiki_graph` 链接图查询。
55
+
56
+ `tool-memory-vector` 默认禁用,因为它需要外部 embeddings 端点。所有 git 提交都是本地的;不会推送。
57
+
58
+ <a id="model-experience"></a>
59
+ ## 模型体验
60
+
61
+ 间接地,经由各插入行所属的包提供——各行自己的包负责其模型可见行为。
62
+
63
+ #### KV Cache 影响
64
+
65
+ bundle 自身不增加请求前缀;任何缓存影响由各插入行所属的包负责。
66
+
67
+ ## 已知限制与延期工作
68
+
69
+ <a id="known-limitations-and-deferred-work"></a>
70
+
71
+ - scope、queue 锁与版本校验都是咨询性的:waterfall 之外的写入方(shell、Obsidian、其他进程)会绕过;原子 rename 与 `baseVersion` 限定损害范围。
72
+ - 写权只划分不隔离读:每个 agent 都可读全 vault,包括其他 agent 的命名空间。
73
+ - `tool-memory-vector` 需要外部 embeddings 端点;启用后笔记内容会发送到该端点。
74
+ - git 历史尚无读取/回滚工具;可直接在 vault 中使用 `git`。
75
+
76
+ <a id="dev-note"></a>
77
+ ### 开发备注
78
+
79
+ <details>
80
+ <summary>维护者工作上下文 — 点击展开</summary>
81
+
82
+ 无。
83
+
84
+ </details>
@@ -0,0 +1,55 @@
1
+ # The dsh-memory bundle patch: the Obsidian-compatible memory vault and its
2
+ # write ladder over dsh-base. Insert order is the waterfall order — each
3
+ # earlier plugin wraps the dispatches of the ones after it:
4
+ # scope rewrites private write ids into agents/<key>/ namespaces, queue
5
+ # serializes the surviving same-lane writes across processes, git commits
6
+ # shared/ writes inside the lock, and the filesystem tool owns the vault
7
+ # itself. Reads stay unscoped: every agent can read the whole vault.
8
+ - insert:
9
+ - id: memory-scope
10
+ name: '@jacklika/dsh-memory-scope'
11
+
12
+ - id: memory-queue
13
+ name: '@jacklika/dsh-memory-queue'
14
+ config:
15
+ vaultRoot: '.plugins/memory'
16
+ crossProcessLock: true
17
+ laneArgument: id
18
+
19
+ - id: memory-git
20
+ name: '@jacklika/dsh-memory-git'
21
+ config:
22
+ vaultRoot: '.plugins/memory'
23
+ prefixes: ['shared/']
24
+ nestedRepo: init
25
+
26
+ - id: tool-memory-filesystem
27
+ name: '@jacklika/dsh-tool-memory-filesystem'
28
+ config:
29
+ vaultRoot: '.plugins/memory'
30
+ extensions: ['.md']
31
+ maxLinkDepth: 1
32
+ maxSearchResults: 20
33
+ indexHiddenDirs: false
34
+
35
+ - id: memory-curator
36
+ name: '@jacklika/dsh-memory-curator'
37
+
38
+ - id: tool-memory-graph
39
+ name: '@jacklika/dsh-tool-memory-graph'
40
+ config:
41
+ vaultRoot: '.plugins/memory'
42
+
43
+ # Semantic search stays off until a deployment supplies an embeddings
44
+ # endpoint; enable it from the profile patch layer:
45
+ # - id: tool-memory-vector
46
+ # disabled: false
47
+ # config:
48
+ # vaultRoot: '.plugins/memory'
49
+ # endpoint: http://localhost:11434/v1/embeddings
50
+ # model: nomic-embed-text
51
+ - id: tool-memory-vector
52
+ name: '@jacklika/dsh-tool-memory-vector'
53
+ disabled: true
54
+ config:
55
+ vaultRoot: '.plugins/memory'
package/lib/index.js ADDED
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @jacklika/dsh-memory — the memory profile bundle. The package's
3
+ * substance is `cordis.patch.yml`, declared by the `dsh.bundle.patch`
4
+ * manifest field and resolved by the profile composer through that field;
5
+ * this module carries no runtime API.
6
+ * @module @jacklika/dsh-memory
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @jacklika/dsh-memory — the memory profile bundle. The package's
3
+ * substance is `cordis.patch.yml`, declared by the `dsh.bundle.patch`
4
+ * manifest field and resolved by the profile composer through that field;
5
+ * this module carries no runtime API.
6
+ * @module @jacklika/dsh-memory
7
+ */
8
+ export {};
9
+ //# sourceMappingURL=index.d.ts.map
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@jacklika/dsh-memory",
3
+ "description": "The dsh memory bundle: an Obsidian-compatible Markdown vault with per-agent write namespaces, serialized writes, and git history as a patch layer over dsh-base",
4
+ "version": "0.1.7-rc.10",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/JackLiKa/jacklika-agent-plugins-repo.git",
11
+ "directory": "packages/memory"
12
+ },
13
+ "type": "module",
14
+ "engines": {
15
+ "node": "^22.19.0 || >=24.0.0"
16
+ },
17
+ "main": "lib/index.js",
18
+ "types": "lib/types/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./lib/types/index.d.ts",
22
+ "default": "./lib/index.js"
23
+ },
24
+ "./cordis.patch.yml": "./cordis.patch.yml",
25
+ "./package.json": "./package.json"
26
+ },
27
+ "files": [
28
+ "lib/**/*.js",
29
+ "lib/types/**/*.d.ts",
30
+ "cordis.patch.yml"
31
+ ],
32
+ "license": "MIT",
33
+ "dsh": {
34
+ "bundle": {
35
+ "patch": "./cordis.patch.yml"
36
+ }
37
+ },
38
+ "peerDependencies": {
39
+ "@deepseek-ai/dsh-tools": ">=0.1.7-rc.1 <0.3.0-0"
40
+ },
41
+ "dependencies": {
42
+ "@jacklika/dsh-memory-curator": "0.1.0-alpha.3",
43
+ "@jacklika/dsh-memory-git": "0.1.0-alpha.2",
44
+ "@jacklika/dsh-memory-queue": "0.1.0-alpha.2",
45
+ "@jacklika/dsh-memory-scope": "0.1.0-alpha.1",
46
+ "@jacklika/dsh-tool-memory-filesystem": "0.1.3-alpha.4",
47
+ "@jacklika/dsh-tool-memory-graph": "0.1.0-alpha.2",
48
+ "@jacklika/dsh-tool-memory-vector": "0.1.0-alpha.2"
49
+ }
50
+ }