memindex 1.0.0 → 1.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/.agents/plugins/marketplace.json +12 -0
- package/.claude-plugin/marketplace.json +7 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +1 -1
- package/README.md +10 -12
- package/dist/bug-report/index.js +63 -63
- package/dist/npx-cli/index.js +355 -10233
- package/dist/opencode-plugin/index.js +35 -35
- package/dist/pi-extension/index.js +6 -6
- package/integrations/dsh/lib/index.js +28 -28
- package/integrations/dsh/package.json +1 -1
- package/integrations/openclaw/openclaw.plugin.json +1 -1
- package/package.json +5 -8
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/.codex-plugin/plugin.json +1 -1
- package/plugin/.qoder-plugin/plugin.json +1 -1
- package/plugin/hooks.json +49 -0
- package/plugin/mcp_config.json +11 -0
- package/plugin/modes/personal.json +130 -0
- package/plugin/package.json +1 -1
- package/plugin/plugin.json +4 -0
- package/plugin/scripts/context-generator.cjs +51 -48
- package/plugin/scripts/context-generator.cjs.map +3 -3
- package/plugin/scripts/mcp-server.cjs +83 -83
- package/plugin/scripts/mcp-server.cjs.map +3 -3
- package/plugin/scripts/transcript-watcher.cjs +37 -37
- package/plugin/scripts/transcript-watcher.cjs.map +3 -3
- package/plugin/scripts/windows-hook-launcher.cjs +2 -0
- package/plugin/scripts/worker-service.cjs +1149 -668
- package/plugin/scripts/worker-service.cjs.map +3 -3
- package/plugin/skills/cloud-sync/SKILL.md +91 -0
- package/plugin/sqlite/SessionStore.js +317 -181
- package/plugin/sqlite/SessionStore.js.map +3 -3
- package/plugin/sqlite/observations/files.js +6 -6
- package/plugin/sqlite/observations/files.js.map +3 -3
- package/plugin/ui/viewer-bundle.js +2 -2
- package/plugin/scripts/server-service.cjs +0 -10305
- package/plugin/scripts/server-service.cjs.map +0 -6
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cloud-sync
|
|
3
|
+
description: Check or set up memindex cloud sync through MemIndex hosting. Use when the user says "set up cloud sync", "sync my memories", "cloud backup", "sync status", or wants their memory database synced between their own machines.
|
|
4
|
+
allowed-tools:
|
|
5
|
+
- Bash
|
|
6
|
+
- Read
|
|
7
|
+
- AskUserQuestion
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Cloud Sync (MemIndex hosting)
|
|
11
|
+
|
|
12
|
+
The installed worker can sync through the MemIndex hosting hub. There is one
|
|
13
|
+
client, one durable operation log, and no separate sync daemon. The hub URL is
|
|
14
|
+
`https://memindex.ai`, the sync token is your MemIndex hosting key, and the user
|
|
15
|
+
id names your log on the hub. This skill checks status and explains which
|
|
16
|
+
settings turn sync on. To turn it on, the user runs
|
|
17
|
+
`npx memindex sync connect` in their own terminal (it reads the account key from
|
|
18
|
+
their settings file, or takes `--key`).
|
|
19
|
+
|
|
20
|
+
Sync is on only when all three of these are set in `~/.memindex/settings.json`:
|
|
21
|
+
`MEMINDEX_CLOUD_SYNC_TOKEN`, `MEMINDEX_CLOUD_SYNC_USER_ID` and
|
|
22
|
+
`MEMINDEX_CLOUD_SYNC_HUB_URL`. If any of them is blank, sync is off. A fresh
|
|
23
|
+
install leaves them blank.
|
|
24
|
+
|
|
25
|
+
**Security rule:** never ask the user to paste the sync token into this chat,
|
|
26
|
+
and never put it in a command you write, print it, put it in argv, or log it. A
|
|
27
|
+
secret pasted into a chat lands in the transcript, which memindex itself can
|
|
28
|
+
capture and sync. The user writes the token into
|
|
29
|
+
`~/.memindex/settings.json` (mode `0600`) themselves, in their own editor.
|
|
30
|
+
|
|
31
|
+
## 1. Check status
|
|
32
|
+
|
|
33
|
+
Resolve the worker port and query the always-registered status route:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
PORT="${MEMINDEX_WORKER_PORT:-$(node -e "const fs=require('fs'),p=require('path'),os=require('os');const uid=(typeof process.getuid==='function'?process.getuid():77);const fallback=String(38700+(uid%100));try{const s=JSON.parse(fs.readFileSync(p.join(os.homedir(),'.memindex','settings.json'),'utf-8'));process.stdout.write(String(s.MEMINDEX_WORKER_PORT||fallback));}catch{process.stdout.write(fallback);}" 2>/dev/null)}"
|
|
37
|
+
curl -s "http://127.0.0.1:${PORT}/api/sync/status"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- `configured: true` and `hub.reachable: true` → the worker completed an
|
|
41
|
+
authenticated `GET /v1/sync/status` against the hub. Report `deviceId`,
|
|
42
|
+
pending counts, `lastFlushAt`, `lastError`, and the Hub head/checkpoint;
|
|
43
|
+
stop unless the user asked to replace the connection.
|
|
44
|
+
- `configured: true` and `hub.reachable: false` → report `hub.error` and say
|
|
45
|
+
the SyncHub connection is not verified. A zero pending count or
|
|
46
|
+
`lastError: null` is not success because an empty queue performs no push.
|
|
47
|
+
- `configured: false` → continue.
|
|
48
|
+
- Connection refused, 404, or 503 immediately after restart → retry every
|
|
49
|
+
three seconds for about 30 seconds before diagnosing the worker.
|
|
50
|
+
|
|
51
|
+
## 2. Connect to your hub
|
|
52
|
+
|
|
53
|
+
Ask the user to open `~/.memindex/settings.json` in their own editor and set:
|
|
54
|
+
|
|
55
|
+
- `MEMINDEX_CLOUD_SYNC_HUB_URL` to the base URL of their hub,
|
|
56
|
+
- `MEMINDEX_CLOUD_SYNC_USER_ID` and `MEMINDEX_CLOUD_SYNC_TOKEN` to the user id
|
|
57
|
+
and token their hub accepts.
|
|
58
|
+
|
|
59
|
+
Nothing secret is typed into this chat, and you do not collect the values
|
|
60
|
+
yourself. If the user has no hub, say plainly that sync needs one and stop:
|
|
61
|
+
their memories stay on this machine and keep working without it.
|
|
62
|
+
|
|
63
|
+
The worker mints and persists a device id on first start and defaults the device
|
|
64
|
+
name to the hostname (`MEMINDEX_CLOUD_SYNC_DEVICE_NAME` changes it).
|
|
65
|
+
|
|
66
|
+
## 3. Verify
|
|
67
|
+
|
|
68
|
+
Once the settings are saved, poll the status route every five seconds for up to
|
|
69
|
+
30 seconds. If the worker was not restarted, restart it first:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
curl -s -X POST "http://127.0.0.1:${PORT}/api/admin/restart"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Success means `configured: true`, `hub.reachable: true`, and `lastError: null`.
|
|
76
|
+
The local route always makes an authenticated, read-only SyncHub status probe,
|
|
77
|
+
even when every pending count is zero; it never appends or advances sync state. Pending counts describe only
|
|
78
|
+
writes made after the SyncHub launch baseline; setup does not migrate a
|
|
79
|
+
pre-launch local corpus.
|
|
80
|
+
|
|
81
|
+
If `hub.reachable` is false, report `hub.error`. If `lastError` is non-null,
|
|
82
|
+
report it too, and suggest checking the three settings against the hub. Never
|
|
83
|
+
include the token.
|
|
84
|
+
|
|
85
|
+
## 4. Report
|
|
86
|
+
|
|
87
|
+
Report device id, pending counts, last successful flush, Hub reachability and
|
|
88
|
+
checkpoint, and any Hub/flush error. End with this privacy note:
|
|
89
|
+
|
|
90
|
+
> Cloud sync uploads your observation narratives and full prompt text to the
|
|
91
|
+
> sync hub you configured.
|