ziiagentmemory 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/.env.example +175 -0
- package/AGENTS.md +124 -0
- package/LICENSE +190 -0
- package/README.md +1546 -0
- package/dist/cli.d.mts +5 -0
- package/dist/cli.d.mts.map +1 -0
- package/dist/cli.mjs +2859 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/config-ChC9EtgV.mjs +259 -0
- package/dist/config-ChC9EtgV.mjs.map +1 -0
- package/dist/connect-JnsJXc68.mjs +1075 -0
- package/dist/connect-JnsJXc68.mjs.map +1 -0
- package/dist/hooks/notification.d.mts +1 -0
- package/dist/hooks/notification.mjs +74 -0
- package/dist/hooks/notification.mjs.map +1 -0
- package/dist/hooks/post-commit.d.mts +1 -0
- package/dist/hooks/post-commit.mjs +101 -0
- package/dist/hooks/post-commit.mjs.map +1 -0
- package/dist/hooks/post-tool-failure.d.mts +1 -0
- package/dist/hooks/post-tool-failure.mjs +75 -0
- package/dist/hooks/post-tool-failure.mjs.map +1 -0
- package/dist/hooks/post-tool-use.d.mts +1 -0
- package/dist/hooks/post-tool-use.mjs +120 -0
- package/dist/hooks/post-tool-use.mjs.map +1 -0
- package/dist/hooks/pre-compact.d.mts +1 -0
- package/dist/hooks/pre-compact.mjs +78 -0
- package/dist/hooks/pre-compact.mjs.map +1 -0
- package/dist/hooks/pre-tool-use.d.mts +1 -0
- package/dist/hooks/pre-tool-use.mjs +84 -0
- package/dist/hooks/pre-tool-use.mjs.map +1 -0
- package/dist/hooks/prompt-submit.d.mts +1 -0
- package/dist/hooks/prompt-submit.mjs +67 -0
- package/dist/hooks/prompt-submit.mjs.map +1 -0
- package/dist/hooks/session-end.d.mts +1 -0
- package/dist/hooks/session-end.mjs +60 -0
- package/dist/hooks/session-end.mjs.map +1 -0
- package/dist/hooks/session-start.d.mts +1 -0
- package/dist/hooks/session-start.mjs +85 -0
- package/dist/hooks/session-start.mjs.map +1 -0
- package/dist/hooks/stop.d.mts +1 -0
- package/dist/hooks/stop.mjs +44 -0
- package/dist/hooks/stop.mjs.map +1 -0
- package/dist/hooks/subagent-start.d.mts +1 -0
- package/dist/hooks/subagent-start.mjs +73 -0
- package/dist/hooks/subagent-start.mjs.map +1 -0
- package/dist/hooks/subagent-stop.d.mts +1 -0
- package/dist/hooks/subagent-stop.mjs +74 -0
- package/dist/hooks/subagent-stop.mjs.map +1 -0
- package/dist/hooks/task-completed.d.mts +1 -0
- package/dist/hooks/task-completed.mjs +73 -0
- package/dist/hooks/task-completed.mjs.map +1 -0
- package/dist/image-refs-BKLmp_sD.mjs +34 -0
- package/dist/image-refs-BKLmp_sD.mjs.map +1 -0
- package/dist/image-refs-C2YU7BIm.mjs +34 -0
- package/dist/image-refs-C2YU7BIm.mjs.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +22324 -0
- package/dist/index.mjs.map +1 -0
- package/dist/keyed-mutex-DTHtcZrt.mjs +88 -0
- package/dist/keyed-mutex-DTHtcZrt.mjs.map +1 -0
- package/dist/logger-BEB7pCI9.mjs +43 -0
- package/dist/logger-BEB7pCI9.mjs.map +1 -0
- package/dist/schema-CNiCWzV9.mjs +78 -0
- package/dist/schema-CNiCWzV9.mjs.map +1 -0
- package/dist/src-Cr3pH_uH.mjs +20745 -0
- package/dist/src-Cr3pH_uH.mjs.map +1 -0
- package/dist/standalone-C6KzNkt5.mjs +700 -0
- package/dist/standalone-C6KzNkt5.mjs.map +1 -0
- package/dist/standalone.d.mts +25 -0
- package/dist/standalone.d.mts.map +1 -0
- package/dist/standalone.mjs +1867 -0
- package/dist/standalone.mjs.map +1 -0
- package/dist/tools-registry-DCt2KAWA.mjs +1145 -0
- package/dist/tools-registry-DCt2KAWA.mjs.map +1 -0
- package/docker-compose.yml +47 -0
- package/iii-config.docker.yaml +53 -0
- package/iii-config.yaml +61 -0
- package/package.json +99 -0
- package/plugin/.claude-plugin/plugin.json +13 -0
- package/plugin/.codex-plugin/plugin.json +15 -0
- package/plugin/.mcp.copilot.json +15 -0
- package/plugin/.mcp.json +13 -0
- package/plugin/hooks/hooks.codex.json +67 -0
- package/plugin/hooks/hooks.copilot.json +72 -0
- package/plugin/hooks/hooks.json +125 -0
- package/plugin/opencode/README.md +229 -0
- package/plugin/opencode/agentmemory-capture.ts +687 -0
- package/plugin/opencode/commands/recall.md +19 -0
- package/plugin/opencode/commands/remember.md +19 -0
- package/plugin/opencode/plugin.json +12 -0
- package/plugin/plugin.json +15 -0
- package/plugin/scripts/diagnostics.mjs +551 -0
- package/plugin/scripts/notification.d.mts +1 -0
- package/plugin/scripts/notification.mjs +74 -0
- package/plugin/scripts/notification.mjs.map +1 -0
- package/plugin/scripts/post-commit.d.mts +1 -0
- package/plugin/scripts/post-commit.mjs +101 -0
- package/plugin/scripts/post-commit.mjs.map +1 -0
- package/plugin/scripts/post-tool-failure.d.mts +1 -0
- package/plugin/scripts/post-tool-failure.mjs +75 -0
- package/plugin/scripts/post-tool-failure.mjs.map +1 -0
- package/plugin/scripts/post-tool-use.d.mts +1 -0
- package/plugin/scripts/post-tool-use.mjs +120 -0
- package/plugin/scripts/post-tool-use.mjs.map +1 -0
- package/plugin/scripts/pre-compact.d.mts +1 -0
- package/plugin/scripts/pre-compact.mjs +78 -0
- package/plugin/scripts/pre-compact.mjs.map +1 -0
- package/plugin/scripts/pre-tool-use.d.mts +1 -0
- package/plugin/scripts/pre-tool-use.mjs +84 -0
- package/plugin/scripts/pre-tool-use.mjs.map +1 -0
- package/plugin/scripts/prompt-submit.d.mts +1 -0
- package/plugin/scripts/prompt-submit.mjs +67 -0
- package/plugin/scripts/prompt-submit.mjs.map +1 -0
- package/plugin/scripts/session-end.d.mts +1 -0
- package/plugin/scripts/session-end.mjs +60 -0
- package/plugin/scripts/session-end.mjs.map +1 -0
- package/plugin/scripts/session-start.d.mts +1 -0
- package/plugin/scripts/session-start.mjs +85 -0
- package/plugin/scripts/session-start.mjs.map +1 -0
- package/plugin/scripts/stop.d.mts +1 -0
- package/plugin/scripts/stop.mjs +44 -0
- package/plugin/scripts/stop.mjs.map +1 -0
- package/plugin/scripts/subagent-start.d.mts +1 -0
- package/plugin/scripts/subagent-start.mjs +73 -0
- package/plugin/scripts/subagent-start.mjs.map +1 -0
- package/plugin/scripts/subagent-stop.d.mts +1 -0
- package/plugin/scripts/subagent-stop.mjs +74 -0
- package/plugin/scripts/subagent-stop.mjs.map +1 -0
- package/plugin/scripts/task-completed.d.mts +1 -0
- package/plugin/scripts/task-completed.mjs +73 -0
- package/plugin/scripts/task-completed.mjs.map +1 -0
- package/plugin/skills/_shared/TROUBLESHOOTING.md +38 -0
- package/plugin/skills/agentmemory-agents/REFERENCE.md +28 -0
- package/plugin/skills/agentmemory-agents/SKILL.md +34 -0
- package/plugin/skills/agentmemory-architecture/SKILL.md +33 -0
- package/plugin/skills/agentmemory-config/REFERENCE.md +42 -0
- package/plugin/skills/agentmemory-config/SKILL.md +37 -0
- package/plugin/skills/agentmemory-hooks/REFERENCE.md +20 -0
- package/plugin/skills/agentmemory-hooks/SKILL.md +39 -0
- package/plugin/skills/agentmemory-mcp-tools/REFERENCE.md +65 -0
- package/plugin/skills/agentmemory-mcp-tools/SKILL.md +39 -0
- package/plugin/skills/agentmemory-rest-api/REFERENCE.md +129 -0
- package/plugin/skills/agentmemory-rest-api/SKILL.md +43 -0
- package/plugin/skills/commit-context/EXAMPLES.md +71 -0
- package/plugin/skills/commit-context/SKILL.md +64 -0
- package/plugin/skills/commit-history/EXAMPLES.md +71 -0
- package/plugin/skills/commit-history/SKILL.md +62 -0
- package/plugin/skills/forget/EXAMPLES.md +75 -0
- package/plugin/skills/forget/SKILL.md +66 -0
- package/plugin/skills/handoff/EXAMPLES.md +56 -0
- package/plugin/skills/handoff/SKILL.md +68 -0
- package/plugin/skills/recall/EXAMPLES.md +74 -0
- package/plugin/skills/recall/SKILL.md +60 -0
- package/plugin/skills/recap/EXAMPLES.md +60 -0
- package/plugin/skills/recap/SKILL.md +63 -0
- package/plugin/skills/remember/EXAMPLES.md +67 -0
- package/plugin/skills/remember/SKILL.md +61 -0
- package/plugin/skills/session-history/EXAMPLES.md +59 -0
- package/plugin/skills/session-history/SKILL.md +61 -0
- package/plugin/skills/write-agentmemory-skill/SKILL.md +40 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remember
|
|
3
|
+
description: Save an insight, decision, or learning to agentmemory's long-term storage with searchable concept tags. Use when the user says "remember this", "save this", "note that", "don't forget", or wants to preserve knowledge for future sessions.
|
|
4
|
+
argument-hint: "[what to remember]"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
The user wants to save this to long-term memory: $ARGUMENTS
|
|
9
|
+
|
|
10
|
+
## Quick start
|
|
11
|
+
|
|
12
|
+
```json
|
|
13
|
+
memory_save {
|
|
14
|
+
"content": "We rotate JWT refresh tokens on every use; the old token is revoked server-side in auth/refresh.ts.",
|
|
15
|
+
"concepts": "jwt-refresh-rotation, token-revocation, auth-flow",
|
|
16
|
+
"files": "src/auth/refresh.ts"
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Expected output:
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Saved memory abc12345 with 3 concepts: jwt-refresh-rotation, token-revocation, auth-flow.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why
|
|
27
|
+
|
|
28
|
+
A memory is only as useful as the terms that retrieve it. Tag with specific
|
|
29
|
+
concepts so a future `recall` finds it, and preserve the user's own phrasing.
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
|
|
33
|
+
1. Pull the core insight, decision, or fact out of `$ARGUMENTS`.
|
|
34
|
+
2. Extract 2-5 lowercased concept phrases. Prefer specific over generic
|
|
35
|
+
(`jwt-refresh-rotation` beats `auth`).
|
|
36
|
+
3. Extract referenced file paths (absolute or repo-relative). Empty if none.
|
|
37
|
+
4. Call `memory_save` with `content`, `concepts` (comma-separated string), and
|
|
38
|
+
`files` (comma-separated string).
|
|
39
|
+
5. Confirm the save and echo the concepts so the user knows the retrieval terms.
|
|
40
|
+
|
|
41
|
+
## Anti-patterns
|
|
42
|
+
|
|
43
|
+
WRONG: `concepts: "stuff, code, notes"` (generic tags nothing can find later).
|
|
44
|
+
|
|
45
|
+
RIGHT: `concepts: "jwt-refresh-rotation, token-revocation"` (specific, retrievable).
|
|
46
|
+
|
|
47
|
+
## Checklist
|
|
48
|
+
|
|
49
|
+
- Content preserves the user's phrasing, not a paraphrase.
|
|
50
|
+
- Concepts are specific, lowercased, 2-5 items.
|
|
51
|
+
- File paths are real references, not guesses.
|
|
52
|
+
- Confirmation echoes the exact concepts tagged.
|
|
53
|
+
|
|
54
|
+
## See also
|
|
55
|
+
|
|
56
|
+
- `recall`: retrieve what you save here (the pair to this skill).
|
|
57
|
+
- `forget`: remove a memory you saved by mistake.
|
|
58
|
+
|
|
59
|
+
## Troubleshooting
|
|
60
|
+
|
|
61
|
+
See ../_shared/TROUBLESHOOTING.md if `memory_save` is not available.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# session-history worked examples
|
|
2
|
+
|
|
3
|
+
## 1. Standard timeline
|
|
4
|
+
|
|
5
|
+
User: "Show me the session history."
|
|
6
|
+
|
|
7
|
+
Invocation:
|
|
8
|
+
|
|
9
|
+
```json
|
|
10
|
+
memory_sessions { "limit": 20 }
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Response:
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"sessions": [
|
|
18
|
+
{ "id": "7f3a9c21", "project": "app", "startedAt": "2026-06-07T09:00:00Z",
|
|
19
|
+
"status": "completed", "observationCount": 14,
|
|
20
|
+
"summary": "Reworked refresh rotation",
|
|
21
|
+
"highlights": [ { "type": "decision", "title": "Rotate refresh tokens on every use" } ] },
|
|
22
|
+
{ "id": "b21d004e", "project": "app", "startedAt": "2026-06-05T14:00:00Z",
|
|
23
|
+
"status": "completed", "observationCount": 9,
|
|
24
|
+
"highlights": [ { "type": "code", "title": "limit.ts counts per-IP" } ] }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Present:
|
|
30
|
+
|
|
31
|
+
> - `7f3a9c2` app, 2026-06-07 09:00, completed, 14 obs
|
|
32
|
+
> - decision: Rotate refresh tokens on every use (summary: Reworked refresh rotation)
|
|
33
|
+
> - `b21d004` app, 2026-06-05 14:00, completed, 9 obs
|
|
34
|
+
> - code: limit.ts counts per-IP
|
|
35
|
+
|
|
36
|
+
## 2. Session with no observations
|
|
37
|
+
|
|
38
|
+
If a returned session has `observationCount: 0`, list it but say so:
|
|
39
|
+
|
|
40
|
+
> - `c98f110` app, 2026-06-04 11:00, abandoned, 0 obs (no recorded work)
|
|
41
|
+
|
|
42
|
+
## 3. Empty history
|
|
43
|
+
|
|
44
|
+
User: "What did we do last time?"
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
memory_sessions { "limit": 20 }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Response:
|
|
51
|
+
|
|
52
|
+
```json
|
|
53
|
+
{ "sessions": [] }
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Present:
|
|
57
|
+
|
|
58
|
+
> No recorded sessions yet for this project. Once you work with memory capture
|
|
59
|
+
> on, they will show here. Use `remember` to save a note now.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-history
|
|
3
|
+
description: Show what happened in recent past sessions on this project as a clean timeline. Use when the user asks "what did we do last time", "session history", "past sessions", or wants an overview of previous work.
|
|
4
|
+
user-invocable: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
The user wants an overview of recent sessions on this project.
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```json
|
|
12
|
+
memory_sessions { "limit": 20 }
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Expected output:
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
7f3a9c2 · app · 2026-06-07 09:00 · completed · 14 obs
|
|
19
|
+
- decision: Rotate refresh tokens on every use
|
|
20
|
+
b21d004 · app · 2026-06-05 14:00 · completed · 9 obs
|
|
21
|
+
- code: limit.ts counts per-IP
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Why
|
|
25
|
+
|
|
26
|
+
Only show sessions and observations the tool returned. An empty history is a
|
|
27
|
+
real answer, never a cue to invent past work.
|
|
28
|
+
|
|
29
|
+
## Workflow
|
|
30
|
+
|
|
31
|
+
1. Call `memory_sessions` with `limit: 20` for a meaningful window.
|
|
32
|
+
2. Present in reverse chronological order: session id (first 8), project, start
|
|
33
|
+
time, status.
|
|
34
|
+
3. For sessions with observations, show the key highlights (type plus title).
|
|
35
|
+
4. Note the total observation count per session.
|
|
36
|
+
5. When a session summary exists, surface its title and the key decisions.
|
|
37
|
+
|
|
38
|
+
## Anti-patterns
|
|
39
|
+
|
|
40
|
+
WRONG: the tool returns two sessions, you describe "several sessions of steady
|
|
41
|
+
progress" and add ones you remember from the conversation.
|
|
42
|
+
|
|
43
|
+
RIGHT: show exactly the two sessions returned, each with its real id, status, and
|
|
44
|
+
observation count.
|
|
45
|
+
|
|
46
|
+
## Checklist
|
|
47
|
+
|
|
48
|
+
- Every session shown came from the tool response.
|
|
49
|
+
- Order is reverse-chronological.
|
|
50
|
+
- Per-session observation counts match the response.
|
|
51
|
+
- No session or highlight was invented or merged.
|
|
52
|
+
|
|
53
|
+
## See also
|
|
54
|
+
|
|
55
|
+
- `recap`: same data grouped by date with highlights.
|
|
56
|
+
- `handoff`: jump straight into the most recent session.
|
|
57
|
+
- `recall`: search across all sessions by topic.
|
|
58
|
+
|
|
59
|
+
## Troubleshooting
|
|
60
|
+
|
|
61
|
+
See ../_shared/TROUBLESHOOTING.md if `memory_sessions` is not available.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: write-agentmemory-skill
|
|
3
|
+
description: The house format and rules for writing or updating an agentmemory skill. Use when adding a new skill, restructuring an existing one, or reviewing a skill contribution for consistency.
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
agentmemory skills follow one tiered format so they stay skimmable, accurate, and current. Match it exactly.
|
|
8
|
+
|
|
9
|
+
## Directory layout
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
plugin/skills/<name>/
|
|
13
|
+
SKILL.md (required, under 100 lines)
|
|
14
|
+
REFERENCE.md (optional, dense facts; auto-generate data tables)
|
|
15
|
+
EXAMPLES.md (optional, worked transcripts)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## SKILL.md rules
|
|
19
|
+
|
|
20
|
+
- Frontmatter: `name`, `description`, optional `argument-hint`, and `user-invocable`. Set `user-invocable: true` only for skills the user runs as a slash command; reference and knowledge skills are `false`.
|
|
21
|
+
- Description is two sentences and the only thing the agent sees when deciding to load the skill. Sentence one states the capability. Sentence two starts "Use when" and lists concrete triggers. Keep it distinct from sibling skills, under 1024 chars, third person.
|
|
22
|
+
- Body order: Quick start (one concrete example), Why (the governing principle), Workflow (numbered steps with decision gates), Anti-patterns (a WRONG vs RIGHT callout for the top mistake), Checklist, See also (cross-link siblings), Reference or Troubleshooting pointer.
|
|
23
|
+
- Stay under 100 lines. Move dense facts to REFERENCE.md and examples to EXAMPLES.md.
|
|
24
|
+
- Cross-references link one level deep only. Shared recovery steps live in `../_shared/TROUBLESHOOTING.md`, never inlined.
|
|
25
|
+
|
|
26
|
+
## Keep it current
|
|
27
|
+
|
|
28
|
+
Facts that exist in source (tool names and parameters, REST endpoints, env vars, connect adapters, hook events) are generated, never hand-typed. Edit the source, then run `npm run skills:gen`. CI runs `npm run skills:check` and fails on drift, so generated tables cannot fall behind the code.
|
|
29
|
+
|
|
30
|
+
## Style
|
|
31
|
+
|
|
32
|
+
No external or competitor product names. No emojis. No em-dashes. No filler. State the thing and stop.
|
|
33
|
+
|
|
34
|
+
## Checklist
|
|
35
|
+
|
|
36
|
+
- Description has a "Use when" sentence with real triggers.
|
|
37
|
+
- SKILL.md is under 100 lines.
|
|
38
|
+
- No time-sensitive claims and no duplicated troubleshooting block.
|
|
39
|
+
- Concrete example present; generated facts come from the generator.
|
|
40
|
+
- Cross-links resolve and go one level deep.
|