abmind 0.1.3 → 0.1.4

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.
Files changed (132) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/abmind-backup.js +10 -10
  3. package/dist/cli/abmind-backup.js.map +1 -1
  4. package/dist/cli/abmind-hook-postToolUse.d.ts +10 -0
  5. package/dist/cli/abmind-hook-postToolUse.d.ts.map +1 -0
  6. package/dist/cli/abmind-hook-postToolUse.js +85 -0
  7. package/dist/cli/abmind-hook-postToolUse.js.map +1 -0
  8. package/dist/cli/abmind-hook-preToolUse.d.ts +10 -0
  9. package/dist/cli/abmind-hook-preToolUse.d.ts.map +1 -0
  10. package/dist/cli/abmind-hook-preToolUse.js +61 -0
  11. package/dist/cli/abmind-hook-preToolUse.js.map +1 -0
  12. package/dist/cli/abmind-hook-store.js +26 -3
  13. package/dist/cli/abmind-hook-store.js.map +1 -1
  14. package/dist/cli/abmind-hook-wakeup.js +10 -0
  15. package/dist/cli/abmind-hook-wakeup.js.map +1 -1
  16. package/dist/cli/abmind-key.d.ts +5 -0
  17. package/dist/cli/abmind-key.d.ts.map +1 -0
  18. package/dist/cli/abmind-key.js +214 -0
  19. package/dist/cli/abmind-key.js.map +1 -0
  20. package/dist/cli/abmind-retro-extract.js +41 -5
  21. package/dist/cli/abmind-retro-extract.js.map +1 -1
  22. package/dist/cli/abmind-sleep-state.js +1 -1
  23. package/dist/cli/abmind-sleep-state.js.map +1 -1
  24. package/dist/cli/abmind.js +2 -0
  25. package/dist/cli/abmind.js.map +1 -1
  26. package/dist/src/backup.d.ts +3 -1
  27. package/dist/src/backup.d.ts.map +1 -1
  28. package/dist/src/backup.js +11 -4
  29. package/dist/src/backup.js.map +1 -1
  30. package/dist/src/context-engine.d.ts +1 -1
  31. package/dist/src/context-engine.d.ts.map +1 -1
  32. package/dist/src/context-engine.js +1 -1
  33. package/dist/src/context-engine.js.map +1 -1
  34. package/dist/src/context-orchestrator.js +3 -3
  35. package/dist/src/context-orchestrator.js.map +1 -1
  36. package/dist/src/crypto.d.ts +6 -0
  37. package/dist/src/crypto.d.ts.map +1 -1
  38. package/dist/src/crypto.js +103 -17
  39. package/dist/src/crypto.js.map +1 -1
  40. package/dist/src/ensure-initialized.d.ts +1 -1
  41. package/dist/src/ensure-initialized.js +1 -1
  42. package/dist/src/env-schema.d.ts +2 -0
  43. package/dist/src/env-schema.d.ts.map +1 -1
  44. package/dist/src/env-schema.js +3 -1
  45. package/dist/src/env-schema.js.map +1 -1
  46. package/dist/src/index.d.ts +5 -2
  47. package/dist/src/index.d.ts.map +1 -1
  48. package/dist/src/index.js +5 -2
  49. package/dist/src/index.js.map +1 -1
  50. package/dist/src/keyring.d.ts +9 -0
  51. package/dist/src/keyring.d.ts.map +1 -0
  52. package/dist/src/keyring.js +60 -0
  53. package/dist/src/keyring.js.map +1 -0
  54. package/dist/src/mem-types.d.ts +1 -1
  55. package/dist/src/mem-types.d.ts.map +1 -1
  56. package/dist/src/memory-backend.d.ts +3 -0
  57. package/dist/src/memory-backend.d.ts.map +1 -1
  58. package/dist/src/memory-config.js +1 -1
  59. package/dist/src/memory-config.js.map +1 -1
  60. package/dist/src/memory-db.d.ts +1 -6
  61. package/dist/src/memory-db.d.ts.map +1 -1
  62. package/dist/src/memory-db.js +7 -1
  63. package/dist/src/memory-db.js.map +1 -1
  64. package/dist/src/memory-editor.d.ts +1 -0
  65. package/dist/src/memory-editor.d.ts.map +1 -1
  66. package/dist/src/memory-editor.js +17 -16
  67. package/dist/src/memory-editor.js.map +1 -1
  68. package/dist/src/memory-ipc-client.d.ts +3 -0
  69. package/dist/src/memory-ipc-client.d.ts.map +1 -1
  70. package/dist/src/memory-ipc-client.js +4 -0
  71. package/dist/src/memory-ipc-client.js.map +1 -1
  72. package/dist/src/message-store.js +1 -1
  73. package/dist/src/message-store.js.map +1 -1
  74. package/dist/src/recall-benchmark.js +4 -2
  75. package/dist/src/recall-benchmark.js.map +1 -1
  76. package/dist/src/redact-secrets.d.ts.map +1 -1
  77. package/dist/src/redact-secrets.js +3 -0
  78. package/dist/src/redact-secrets.js.map +1 -1
  79. package/dist/src/session-context.d.ts +6 -5
  80. package/dist/src/session-context.d.ts.map +1 -1
  81. package/dist/src/session-context.js +134 -66
  82. package/dist/src/session-context.js.map +1 -1
  83. package/dist/src/sleep/levels.d.ts +7 -6
  84. package/dist/src/sleep/levels.d.ts.map +1 -1
  85. package/dist/src/sleep/levels.js.map +1 -1
  86. package/dist/src/sleep/orchestrator.d.ts +1 -1
  87. package/dist/src/sleep/orchestrator.d.ts.map +1 -1
  88. package/dist/src/sleep/orchestrator.js +80 -38
  89. package/dist/src/sleep/orchestrator.js.map +1 -1
  90. package/dist/src/sleep/sleep-daily-summary.d.ts +6 -2
  91. package/dist/src/sleep/sleep-daily-summary.d.ts.map +1 -1
  92. package/dist/src/sleep/sleep-daily-summary.js +34 -12
  93. package/dist/src/sleep/sleep-daily-summary.js.map +1 -1
  94. package/dist/src/sleep/sleep-extract-daily.d.ts.map +1 -1
  95. package/dist/src/sleep/sleep-extract-daily.js +3 -0
  96. package/dist/src/sleep/sleep-extract-daily.js.map +1 -1
  97. package/dist/src/sleep/sleep-prompt-loader.js +3 -3
  98. package/dist/src/sleep/sleep-prompt-loader.js.map +1 -1
  99. package/dist/src/sleep-data-access.d.ts +4 -2
  100. package/dist/src/sleep-data-access.d.ts.map +1 -1
  101. package/dist/src/sleep-data-access.js +49 -13
  102. package/dist/src/sleep-data-access.js.map +1 -1
  103. package/dist/src/sqlite-backend.d.ts +3 -0
  104. package/dist/src/sqlite-backend.d.ts.map +1 -1
  105. package/dist/src/sqlite-backend.js +3 -0
  106. package/dist/src/sqlite-backend.js.map +1 -1
  107. package/dist/src/status-block.d.ts +7 -0
  108. package/dist/src/status-block.d.ts.map +1 -0
  109. package/dist/src/status-block.js +67 -0
  110. package/dist/src/status-block.js.map +1 -0
  111. package/dist/src/wake-up-renderer.d.ts +0 -5
  112. package/dist/src/wake-up-renderer.d.ts.map +1 -1
  113. package/dist/src/wake-up-renderer.js +0 -34
  114. package/dist/src/wake-up-renderer.js.map +1 -1
  115. package/package.json +1 -1
  116. package/prompts/sleep/03-retrospective.md +23 -0
  117. package/prompts/sleep/04-extract-memories.md +3 -0
  118. package/prompts/sleep/06-retro-derive.md +39 -0
  119. package/prompts/sleep/08-memory-maintenance.md +39 -0
  120. package/prompts/sleep/{13-consolidation.md → 11-consolidation.md} +4 -1
  121. package/prompts/sleep/03-extract-from-daily.md +0 -3
  122. package/prompts/sleep/04-retrospective.md +0 -30
  123. package/prompts/sleep/07-topic-assignment.md +0 -23
  124. package/prompts/sleep/08-core-promotion.md +0 -26
  125. package/prompts/sleep/09-merge.md +0 -19
  126. package/prompts/sleep/12-core-knowledge.md +0 -14
  127. package/prompts/sleep/14-emotion-context.md +0 -17
  128. /package/prompts/sleep/{15-contradiction-and-graph.md → 05-contradiction-and-graph.md} +0 -0
  129. /package/prompts/sleep/{06-feedback.md → 07-feedback.md} +0 -0
  130. /package/prompts/sleep/{10-translation.md → 09-translation.md} +0 -0
  131. /package/prompts/sleep/{11-skill-review.md → 10-skill-review.md} +0 -0
  132. /package/prompts/sleep/{16-rem-synthesis.md → 12-rem-synthesis.md} +0 -0
@@ -0,0 +1,39 @@
1
+ # Memory Maintenance
2
+
3
+ Three metadata tasks on existing memories. Process each section independently.
4
+
5
+ ## Task 1: Topic Assignment
6
+
7
+ Untagged memories:
8
+ ${UNTAGGED_MEMORIES}
9
+
10
+ For each memory, assign the most fitting topic AND 3-5 search keywords:
11
+ ```
12
+ abmind edit --memory-id N --topic <topic> --keyword "synonym1, synonym2, synonym3"
13
+ ```
14
+
15
+ Topics: `coding`, `personal`, `work`, `finance`, `health`, `projects`, `tools`, `people`
16
+
17
+ If a memory spans multiple topics, pick the primary one.
18
+
19
+ ## Task 2: Merge Duplicates
20
+
21
+ Candidate pairs (similar content, same topic):
22
+ ${MERGE_CANDIDATES}
23
+
24
+ For each pair:
25
+ - If truly duplicate: invalidate the older one (`abmind edit --memory-id <older> --valid-to <today>`)
26
+ - If complementary: keep both
27
+ - If contradictory: invalidate the less confident one
28
+
29
+ ## Task 3: Fill Emotion Context
30
+
31
+ Memories with emotion tags but missing emotion_context:
32
+ ${EMOTION_CONTEXT_GAPS}
33
+
34
+ For each memory:
35
+ 1. Read the content and emotion tags.
36
+ 2. Infer WHY the emotion applies in 3-5 words.
37
+ 3. Apply: `abmind edit --memory-id N --emotion-context "reason"`
38
+
39
+ Report counts for each task. If a section has no candidates, say "(none)" and move on.
@@ -6,6 +6,9 @@ Write a weekly or quarterly summary by consolidating recent daily files.
6
6
 
7
7
  1. Read recent daily retrospective and summary files.
8
8
  2. Identify recurring themes, progress on projects, and shifts in priorities.
9
- 3. Write a consolidated summary to `${CONSOLIDATION_PATH}`.
9
+ 3. Write a consolidated summary to `${CONSOLIDATION_OUTPUT_PATH}`.
10
+ 4. The first line should be a heading showing the date range covered (e.g. "# Weekly — May 19–25, 2026").
11
+
12
+ Previous consolidation for reference: `${CONSOLIDATION_PATH}`
10
13
 
11
14
  Respond with confirmation of the summary written.
@@ -1,3 +0,0 @@
1
- # Extract From Daily
2
-
3
- This step is code-driven. The orchestrator handles extraction.
@@ -1,30 +0,0 @@
1
- # Daily Retrospective + Memory Extraction
2
-
3
- Write a daily retrospective based on today's conversations, then extract lasting memories from it.
4
-
5
- ## Pre-loaded data
6
-
7
- Today's clean messages:
8
- ${CLEAN_MESSAGES}
9
-
10
- ## Task 1: Write Retrospective
11
-
12
- Write a retrospective covering:
13
-
14
- 1. **What happened** — key events, tasks, decisions made today.
15
- 2. **Emotional attribution** — how the user seemed to feel during different interactions. Note shifts in tone or energy.
16
- 3. **Lessons** — what went well, what didn't, what to do differently.
17
- 4. **Recurring errors** — check if any errors appeared multiple times today and were fixed the same way. If so, note: "Recurring: [error] was fixed by [action] — consider adding as auto-fix rule via `abtars-autofix add`."
18
- 5. **Agent notes update** — if anything learned today should persist (user preferences, project context, recurring patterns), update `agent_notes.md` via `abmind edit`.
19
-
20
- Write the retrospective to `${RETRO_PATH}`.
21
-
22
- ## Task 2: Extract Memories from Retrospective
23
-
24
- From the retrospective you just wrote, extract lessons, mistakes, and insights as permanent memories:
25
-
26
- 1. For each candidate, run `abmind recall` with the key phrase to check for duplicates.
27
- 2. If no duplicate exists, store via `abmind store`.
28
- 3. If a mistake repeats a previously stored mistake, store it with escalated emotion score (`-2` from previous).
29
-
30
- Respond with a brief confirmation of what was written to the retro file, followed by the count of memories stored.
@@ -1,23 +0,0 @@
1
- # Topic Assignment
2
-
3
- Assign topics to untagged memories.
4
-
5
- ## Pre-loaded data
6
-
7
- Untagged memories:
8
- ${UNTAGGED_MEMORIES}
9
-
10
- ## Topics
11
-
12
- `coding`, `personal`, `work`, `finance`, `health`, `projects`, `tools`, `people`
13
-
14
- ## Task
15
-
16
- For each memory, read its content and assign the most fitting topic AND 3-5 search keywords (synonyms a user might query with):
17
- ```
18
- abmind edit --memory-id N --topic <topic> --keyword "synonym1, synonym2, synonym3"
19
- ```
20
-
21
- If a memory spans multiple topics, pick the primary one.
22
-
23
- Respond with the assignments made.
@@ -1,26 +0,0 @@
1
- # Core Promotion
2
-
3
- Promote worthy general-tier memories to core tier.
4
-
5
- ## Pre-loaded data
6
-
7
- Promotion candidates (high relevance, frequently recalled):
8
- ${PROMOTION_CANDIDATES}
9
-
10
- ${CONTRADICTION_WARNINGS}
11
-
12
- ## Constraints
13
-
14
- - Budget: 100 core entries max. Do not exceed.
15
- - Only promote memories that represent enduring facts, strong preferences, or critical context.
16
- - Do not promote transient or time-bound information.
17
- - If a contradiction is flagged: invalidate the older memory (`abmind edit --memory-id <older> --valid-to <today>`) before promoting the newer one.
18
-
19
- ## Task
20
-
21
- For each worthy candidate:
22
- ```
23
- abmind edit --memory-id N --tier core
24
- ```
25
-
26
- Respond with the list of promotions made.
@@ -1,19 +0,0 @@
1
- # Memory Merge
2
-
3
- Review near-duplicate memory pairs and merge or invalidate.
4
-
5
- ## Pre-loaded data
6
-
7
- Candidate pairs (similar content, same topic):
8
- ${MERGE_CANDIDATES}
9
-
10
- ## Rules
11
-
12
- - Max 5 merges per run.
13
- - If both express the same fact: `abmind store --merge --merge-ids A,B`
14
- - If one contradicts the other: invalidate the older one via `abmind edit --memory-id <older> --valid-to <today>`
15
- - If they are related but distinct, skip.
16
-
17
- ## Task
18
-
19
- Review each pair and act accordingly. Respond with merges and invalidations performed.
@@ -1,14 +0,0 @@
1
- # Core Knowledge Review
2
-
3
- Review and maintain `agent_notes.md` and `user_profile.md`.
4
-
5
- **SOUL.md is read-only** — never modify it. Identity is human-managed.
6
-
7
- ## Task
8
-
9
- 1. Read `agent_notes.md` and `user_profile.md`.
10
- 2. Remove entries that are outdated or no longer accurate.
11
- 3. Update entries that have become stale based on recent interactions.
12
- 4. Keep files concise — no redundancy.
13
-
14
- Respond with changes made.
@@ -1,17 +0,0 @@
1
- # Emotion Context
2
-
3
- Infer emotional context for memories that have emotion tags but no context explaining why.
4
-
5
- ## Pre-loaded data
6
-
7
- Memories with emotion tags but missing emotion_context:
8
- ${EMOTION_CONTEXT_GAPS}
9
-
10
- ## Task
11
-
12
- For each memory:
13
- 1. Read the content and emotion tags.
14
- 2. Infer WHY the emotion applies in 3–5 words (e.g., "frustrated by repeated bug", "proud of shipping fast").
15
- 3. Apply: `abmind edit --memory-id N --emotion-context "reason"`
16
-
17
- Respond with the count of contexts added.