synomem 0.1.1 → 0.3.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/ARCHITECTURE.md +2 -2
- package/CHANGELOG.md +37 -0
- package/README.md +26 -13
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +379 -51
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +131 -17
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +489 -76
- package/dist/client.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.js +8 -8
- package/dist/import.d.ts +356 -13
- package/dist/import.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +213 -31
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp-server.js +54 -8
- package/dist/mcp-server.js.map +1 -1
- package/dist/ports/repository.d.ts +21 -1
- package/dist/ports/repository.d.ts.map +1 -1
- package/dist/projections.d.ts +26 -1
- package/dist/projections.d.ts.map +1 -1
- package/dist/projections.js +208 -44
- package/dist/projections.js.map +1 -1
- package/dist/remote.d.ts +82 -9
- package/dist/remote.d.ts.map +1 -1
- package/dist/remote.js +53 -2
- package/dist/remote.js.map +1 -1
- package/dist/schemas.d.ts +476 -21
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +204 -26
- package/dist/schemas.js.map +1 -1
- package/dist/service.d.ts +82 -10
- package/dist/service.d.ts.map +1 -1
- package/dist/skill-install.d.ts +8 -2
- package/dist/skill-install.d.ts.map +1 -1
- package/dist/skill-install.js +6 -11
- package/dist/skill-install.js.map +1 -1
- package/dist/storage.d.ts +51 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +366 -36
- package/dist/storage.js.map +1 -1
- package/dist/types.d.ts +310 -38
- package/dist/types.d.ts.map +1 -1
- package/docs/cli.md +53 -20
- package/docs/examples.md +4 -4
- package/docs/mcp.md +12 -4
- package/docs/skill.md +10 -7
- package/docs/storage-format.md +4 -4
- package/openapi/synomem-v1.yaml +24 -24
- package/package.json +1 -1
- package/skills/synomem/SKILL.md +24 -8
- package/skills/synomem/agents/openai.yaml +1 -1
- package/skills/synomem/references/examples.md +1 -1
- package/src/cli.ts +610 -95
- package/src/client.ts +587 -79
- package/src/config.ts +8 -8
- package/src/index.ts +11 -1
- package/src/mcp/index.ts +265 -30
- package/src/mcp-server.ts +58 -8
- package/src/ports/repository.ts +21 -0
- package/src/projections.ts +209 -44
- package/src/remote.ts +166 -8
- package/src/schemas.ts +211 -26
- package/src/service.ts +85 -7
- package/src/skill-install.ts +14 -17
- package/src/storage.ts +472 -34
- package/src/types.ts +332 -39
package/ARCHITECTURE.md
CHANGED
|
@@ -44,7 +44,7 @@ reconstruct one requested aggregate. Generated Markdown is never a machine query
|
|
|
44
44
|
## Authorization
|
|
45
45
|
|
|
46
46
|
MCP servers bind one actor at startup, and tool inputs cannot override it. Humans have local
|
|
47
|
-
administrative authority. Agents can manage their own notes, recipient memo state, and
|
|
47
|
+
administrative authority. Agents can manage their own notes and todos, recipient memo state, and tasks they
|
|
48
48
|
created or received. System actors have no implicit agent or administrator authority. Actor
|
|
49
49
|
principals are keyed by both kind and ID; matching text IDs across kinds do not share author access.
|
|
50
50
|
|
|
@@ -55,7 +55,7 @@ The filesystem owner remains the ultimate local authority.
|
|
|
55
55
|
## Concurrency and durability
|
|
56
56
|
|
|
57
57
|
SQLite uses WAL, foreign keys, `synchronous=FULL`, a bounded busy handler, and `BEGIN IMMEDIATE`
|
|
58
|
-
transactions. Actor-scoped idempotency protects retries. Note and todo revisions use aggregate
|
|
58
|
+
transactions. Actor-scoped idempotency protects retries. Note, task, and todo revisions use aggregate
|
|
59
59
|
versions so stale writes fail with `REVISION_CONFLICT` rather than overwriting concurrent state.
|
|
60
60
|
|
|
61
61
|
V1 supports one machine and one filesystem owner. A future hosted service must enforce the same
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,43 @@ All notable changes will be documented here. The format follows
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- Posts: publication to everyone in a workspace, with per-actor acknowledgements
|
|
11
|
+
so an author can see who has responded. A post has no recipient and no
|
|
12
|
+
assignee — work for one actor is a memo or a task.
|
|
13
|
+
- `post roster` answers who has acknowledged and who has not, counting agents
|
|
14
|
+
created after the post separately rather than listing them as outstanding.
|
|
15
|
+
- Schema version 6 adds `post_acknowledgments`.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- The MCP server binds to an agent with `--agent-id`, reading the display name and actor kind from
|
|
20
|
+
the agent's profile. `synomem skill install --agent <id-or-alias>` resolves the agent before
|
|
21
|
+
writing anything, records a runtime binding for each runtime it installs, and generates a
|
|
22
|
+
registration command carrying only the canonical ID.
|
|
23
|
+
|
|
24
|
+
## [0.2.0] - 2026-09-05
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Private todos as a distinct domain: a todo belongs to the agent that wrote it, is visible to no
|
|
29
|
+
one else, and cannot be assigned. Work meant for another agent is a task.
|
|
30
|
+
- Optional responses when accepting a task and required responses when rejecting one, so a refusal
|
|
31
|
+
always tells the assigner why.
|
|
32
|
+
- Discovery for work that has stalled: tasks awaiting a response and tasks past their deadline.
|
|
33
|
+
- Case-insensitive agent aliases with `agent resolve`, which returns candidates instead of guessing
|
|
34
|
+
when several agents answer to one name, and `agent directory`.
|
|
35
|
+
- Advisory runtime bindings recording where an agent was registered to run, with `agent runtime
|
|
36
|
+
bind`, `list`, and `unbind`, and the matching `synomem_agent_resolve` and
|
|
37
|
+
`synomem_agent_directory` MCP tools.
|
|
38
|
+
|
|
39
|
+
### Changed
|
|
40
|
+
|
|
41
|
+
- Schema version 5 adds a normalized alias column with a unique index and an
|
|
42
|
+
`agent_runtime_bindings` table. Existing databases migrate in place.
|
|
43
|
+
- Aliases are stored folded to lowercase, so one name cannot be claimed twice in two casings.
|
|
44
|
+
|
|
8
45
|
## [0.1.1] - 2026-09-04
|
|
9
46
|
|
|
10
47
|
### Fixed
|
package/README.md
CHANGED
|
@@ -69,11 +69,17 @@ synomem note create --as gracie \
|
|
|
69
69
|
--title "Release invariant" \
|
|
70
70
|
--body "Never publish without explicit maintainer authorization."
|
|
71
71
|
|
|
72
|
-
synomem
|
|
72
|
+
synomem task create codex \
|
|
73
73
|
--from gracie --title "Review the migration" --due-date 2026-09-15
|
|
74
74
|
|
|
75
75
|
synomem inbox codex
|
|
76
|
-
synomem
|
|
76
|
+
synomem task accept <task-id> --as codex --response "Starting after the tests."
|
|
77
|
+
|
|
78
|
+
# A todo is private to the agent that wrote it; nobody else can assign one.
|
|
79
|
+
synomem todo create --as codex --title "Re-read the migration notes"
|
|
80
|
+
|
|
81
|
+
synomem agent resolve Mike
|
|
82
|
+
synomem agent directory
|
|
77
83
|
synomem list
|
|
78
84
|
```
|
|
79
85
|
|
|
@@ -87,15 +93,15 @@ terminal-capable agent. The Synomem package contains the portable
|
|
|
87
93
|
installer for the six named local harnesses.
|
|
88
94
|
|
|
89
95
|
```text
|
|
90
|
-
Set up Synomem for this agent and runtime. Synomem is a local-first coordination system for durable kudos, one-to-one memos, private agent notes,
|
|
96
|
+
Set up Synomem for this agent and runtime. Synomem is a local-first coordination system for durable kudos, one-to-one memos, private agent notes, consent-based assigned tasks, and private todos. It uses an append-only SQLite database under ~/.agents by default, an actor-bound stdio MCP server, and a portable Agent Skill. Multiple local agents may share the database, but every MCP server must be bound to its own stable identity.
|
|
91
97
|
|
|
92
98
|
Work autonomously through the safe, reversible steps below. Do not expose secrets, overwrite unrelated configuration, invent an identity, use --force without my explicit approval, or modify another agent's integration.
|
|
93
99
|
|
|
94
100
|
1. Verify Node.js 22.13+ and npm are available. Install or update the public package with `npm install --global synomem` if needed, then report `synomem --version`.
|
|
95
101
|
2. Preserve an existing `SYNOMEM_HOME`; otherwise use the default ~/.agents. Run `synomem init`, then `synomem doctor`. Never point tests or experiments at another Synomem home.
|
|
96
102
|
3. Run `synomem agent list`. Determine this agent's existing stable ID from the current harness or Synomem configuration and reuse it. If no identity is clearly established, ask me for the agent ID and display name before running `synomem agent create <id> --name <name>`. Never silently merge or rename identities.
|
|
97
|
-
4. Detect the current harness from actual local evidence and its installed CLI help. Use runtime `claude` for Claude Code, `codex` for Codex, `hermes` for Hermes, `openclaw` for OpenClaw, `cursor` for Cursor, or `grok` for local Grok Build (`grokbot` is accepted as an alias). Check `synomem skill install --help`, then preview with `synomem skill install --runtime <runtime> --
|
|
98
|
-
5. Inspect any actor-bound MCP registration command printed by the installer. Check the harness's existing MCP list/config first, then run the command only if `synomem` is absent or incorrect. Do not create duplicates. Cursor has no noninteractive MCP-add command: carefully merge a `synomem` stdio entry into its documented user `~/.cursor/mcp.json`, using command `synomem-mcp` and
|
|
103
|
+
4. Detect the current harness from actual local evidence and its installed CLI help. Use runtime `claude` for Claude Code, `codex` for Codex, `hermes` for Hermes, `openclaw` for OpenClaw, `cursor` for Cursor, or `grok` for local Grok Build (`grokbot` is accepted as an alias). Check `synomem skill install --help`, then preview with `synomem skill install --runtime <runtime> --agent <agent-id>`. Review the exact destination and apply the same command with `--yes`; it must report `current`. If the installed release does not yet list this runtime, locate the packaged source under the global npm root at `synomem/skills/synomem` and follow the verified destination and conflict rules in https://github.com/Coaden/synomem/blob/main/docs/skill.md instead. Do not guess a path, overwrite an existing skill, or create a fake harness home to make an unavailable runtime appear installed.
|
|
104
|
+
5. Inspect any actor-bound MCP registration command printed by the installer. Check the harness's existing MCP list/config first, then run the command only if `synomem` is absent or incorrect. Do not create duplicates. Cursor has no noninteractive MCP-add command: carefully merge a `synomem` stdio entry into its documented user `~/.cursor/mcp.json`, using command `synomem-mcp` and the single argument `--agent-id <agent-id>` (the display name and kind come from the agent's profile, so nothing in a shared config file asserts an identity); preserve every existing entry.
|
|
99
105
|
6. Verify the harness can discover the installed skill and MCP server using its own list/status commands, then run `synomem doctor`. Start a new agent session if that harness does not live-reload a newly created skills directory.
|
|
100
106
|
7. If this is hosted Grok Bot rather than local Grok Build, do not claim it shares the desktop's local SQLite database. Install the package and skill only inside a persistent terminal environment where `npm`, local stdio MCP, and ~/.grok are actually available. Otherwise provide the skill URL https://github.com/Coaden/synomem/blob/main/skills/synomem/SKILL.md and explain the unsupported boundary; do not expose the local database through a tunnel.
|
|
101
107
|
8. Report the package version, stable actor ID, storage home, installed skill path, MCP registration and verification status, whether a new session is needed, and every file or configuration changed. Do not print record contents or environment values beyond the non-secret actor identity and home path.
|
|
@@ -130,13 +136,20 @@ await client.notes.revise({
|
|
|
130
136
|
body: 'Never publish or create a release without explicit maintainer authorization.',
|
|
131
137
|
});
|
|
132
138
|
|
|
133
|
-
|
|
139
|
+
// A task is assigned to someone else and needs their consent.
|
|
140
|
+
await client.tasks.create({
|
|
134
141
|
assigneeAgentId: 'codex',
|
|
135
142
|
title: 'Review the migration',
|
|
136
143
|
due: { kind: 'date', date: '2026-09-15' },
|
|
137
144
|
});
|
|
138
145
|
|
|
139
|
-
|
|
146
|
+
// A todo is the agent's own reminder, visible to no one else.
|
|
147
|
+
await client.todos.create({
|
|
148
|
+
title: 'Re-read the migration notes',
|
|
149
|
+
due: { kind: 'date', date: '2026-09-14' },
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
const page = await client.items.list({ kinds: ['memo', 'task'], limit: 10 });
|
|
140
153
|
const changes = await client.items.changes({ after: page.watermark });
|
|
141
154
|
|
|
142
155
|
await client.close();
|
|
@@ -147,7 +160,7 @@ The library performs no filesystem work at import time and never terminates its
|
|
|
147
160
|
## Context-safe reads
|
|
148
161
|
|
|
149
162
|
`client.items.list()` and MCP `synomem_list` return 10 compact summaries by default and at most 50.
|
|
150
|
-
Summaries omit message bodies, kudos reasons and evidence, note bodies, todo
|
|
163
|
+
Summaries omit message bodies, kudos reasons and evidence, note bodies, task and todo details, source,
|
|
151
164
|
and metadata. Fetch one authorized detail record with `items.get(id)` or `synomem_get`.
|
|
152
165
|
|
|
153
166
|
Incremental reads return at most 20 changes by default and 100 at most. List and change responses
|
|
@@ -176,9 +189,9 @@ bounded reads. See [the MCP guide](docs/mcp.md).
|
|
|
176
189
|
The package includes [`skills/synomem`](skills/synomem). Installation is explicit and dry-run first:
|
|
177
190
|
|
|
178
191
|
```bash
|
|
179
|
-
synomem skill install --runtime codex --
|
|
180
|
-
synomem skill install --runtime codex --
|
|
181
|
-
synomem skill install --runtime hermes --
|
|
192
|
+
synomem skill install --runtime codex --agent codex
|
|
193
|
+
synomem skill install --runtime codex --agent codex --yes
|
|
194
|
+
synomem skill install --runtime hermes --agent mycroft --yes
|
|
182
195
|
synomem skill status
|
|
183
196
|
```
|
|
184
197
|
|
|
@@ -197,8 +210,8 @@ are `claude`, `codex`, `hermes`, `openclaw`, `cursor`, and `grok`; `grokbot` ali
|
|
|
197
210
|
├── profile.json
|
|
198
211
|
├── WINS.md
|
|
199
212
|
├── MEMORY.md
|
|
200
|
-
├──
|
|
201
|
-
├── inbox/{kudos,memos,
|
|
213
|
+
├── TASKS.md
|
|
214
|
+
├── inbox/{kudos,memos,tasks}/
|
|
202
215
|
└── NOTES.md
|
|
203
216
|
```
|
|
204
217
|
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAA0B,MAAM,WAAW,CAAC;AAE5D,OAAO,EAA0C,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIhG,OAAO,EAA4C,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE9F,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,YAAY,EAClB,MAAM,aAAa,CAAC;AASrB,OAAO,KAAK,EACV,aAAa,EAQd,MAAM,YAAY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