dsh-memory-sync 0.0.0-stage → 0.1.0

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/lib/tool.mjs ADDED
@@ -0,0 +1,40 @@
1
+ /** Tool spec for the agent; plain JSON Schema so no defineTool import is needed. */
2
+ export function memorySyncToolSpec(runtime) {
3
+ return {
4
+ name: 'memory_sync',
5
+ description: [
6
+ 'Inspect or trigger the startup memory sync (git repo shared between this machine and a peer).',
7
+ 'action="run" runs the three phases now: local commit+push, peer commit+push over ssh, local pull.',
8
+ 'action="status" reports the last run, HEAD, dirty state and whether the peer is configured.',
9
+ 'Use it when the user asks whether memory is synced, or asks to sync right now.',
10
+ ].join('\n'),
11
+ parameters: {
12
+ type: 'object',
13
+ properties: {
14
+ action: {
15
+ type: 'string',
16
+ enum: ['run', 'status'],
17
+ description: 'run = sync now; status = last run and repo state.',
18
+ },
19
+ },
20
+ required: ['action'],
21
+ additionalProperties: false,
22
+ },
23
+ timeoutMs: 300000,
24
+ output: {
25
+ schema: { type: 'object', additionalProperties: true },
26
+ render(_args, value) {
27
+ return [{
28
+ type: 'text',
29
+ text: typeof value === 'string' ? value : JSON.stringify(value, null, 2),
30
+ }]
31
+ },
32
+ },
33
+ async execute(args) {
34
+ const action = String(args?.action || 'status')
35
+ if (action === 'run') return runtime.run('manual')
36
+ if (action === 'status') return runtime.status()
37
+ return { ok: false, error: `unknown action: ${action}` }
38
+ },
39
+ }
40
+ }
package/locale/en.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "Memory sync on startup",
4
+ "description": "Every time DeepSeek Harness starts, sync this machine's git-backed memory folder with a peer machine once — latest memories at boot, no daemon running in the background. Built for keeping memories on an always-on machine and catching up on a laptop at startup. Failures retry, then raise an OS dialog."
5
+ }
6
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "启动时同步记忆",
4
+ "description": "每次打开 DeepSeek Harness,自动把本机的 git 记忆目录和另一台机器双向同步一次——开机就有最新记忆,不用常驻后台。适合把记忆放在一台常开的机器上、另一台电脑每次启动时对齐。失败会重试,最后弹系统窗口提醒。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,6 +1,58 @@
1
1
  {
2
2
  "name": "dsh-memory-sync",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "每次打开 DeepSeek Harness,自动把本机的 git 记忆目录和另一台机器双向同步一次——开机就有最新记忆,不用常驻后台。Sync a git-backed memory folder with a peer machine on every DSH startup; no daemon, no cron.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "QIC-9821",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/QIC-9821/dsh.git"
11
+ },
12
+ "homepage": "https://github.com/QIC-9821/dsh#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/QIC-9821/dsh/issues"
15
+ },
16
+ "main": "./index.js",
17
+ "exports": {
18
+ ".": "./index.js",
19
+ "./locale/*.json": "./locale/*.json",
20
+ "./icon": "./icon.svg",
21
+ "./package.json": "./package.json"
22
+ },
23
+ "files": [
24
+ "index.js",
25
+ "lib/",
26
+ "cordis.patch.yml",
27
+ "locale/",
28
+ "icon.svg",
29
+ "README.md",
30
+ "README.en.md",
31
+ "CHANGELOG.md",
32
+ "LICENSE"
33
+ ],
34
+ "keywords": [
35
+ "dsh",
36
+ "dsh-plugin",
37
+ "deepseek-harness",
38
+ "memory",
39
+ "git",
40
+ "sync",
41
+ "startup"
42
+ ],
43
+ "engines": {
44
+ "node": ">=22"
45
+ },
46
+ "scripts": {
47
+ "test": "node --test test/*.test.mjs"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public",
51
+ "provenance": true
52
+ },
53
+ "dsh": {
54
+ "bundle": {
55
+ "patch": "./cordis.patch.yml"
56
+ }
57
+ }
58
+ }