projectmem 0.3.5__tar.gz → 0.3.7__tar.gz

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 (97) hide show
  1. {projectmem-0.3.5 → projectmem-0.3.7}/CHANGELOG.md +44 -0
  2. projectmem-0.3.7/PKG-INFO +665 -0
  3. projectmem-0.3.7/README.md +632 -0
  4. {projectmem-0.3.5 → projectmem-0.3.7}/llms.txt +18 -9
  5. {projectmem-0.3.5 → projectmem-0.3.7}/pyproject.toml +2 -1
  6. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/__init__.py +1 -1
  7. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/cli.py +44 -3
  8. projectmem-0.3.7/src/projectmem/commands/agent_hooks.py +201 -0
  9. projectmem-0.3.7/src/projectmem/commands/agent_setup.py +446 -0
  10. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/backfill.py +7 -3
  11. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/doctor.py +3 -1
  12. projectmem-0.3.7/src/projectmem/commands/import_memory.py +370 -0
  13. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/init.py +32 -15
  14. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/precheck.py +32 -9
  15. projectmem-0.3.7/src/projectmem/edit_hook.py +349 -0
  16. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/mcp_server.py +129 -70
  17. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/models.py +8 -1
  18. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/redaction.py +11 -2
  19. projectmem-0.3.7/src/projectmem/search.py +78 -0
  20. projectmem-0.3.7/src/projectmem/session_start.py +57 -0
  21. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/storage.py +37 -0
  22. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/summary.py +24 -32
  23. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_agent_guidance.py +3 -17
  24. projectmem-0.3.7/tests/test_agent_hooks.py +127 -0
  25. projectmem-0.3.7/tests/test_agent_setup.py +347 -0
  26. projectmem-0.3.7/tests/test_backfill.py +55 -0
  27. projectmem-0.3.7/tests/test_edit_hook.py +542 -0
  28. projectmem-0.3.7/tests/test_import_memory.py +299 -0
  29. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_log.py +2 -1
  30. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_mcp_server.py +32 -2
  31. projectmem-0.3.7/tests/test_models.py +20 -0
  32. projectmem-0.3.7/tests/test_precheck_lessons.py +131 -0
  33. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_redaction.py +76 -0
  34. projectmem-0.3.7/tests/test_session_issue.py +120 -0
  35. projectmem-0.3.7/tests/test_session_start.py +141 -0
  36. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_summary.py +65 -1
  37. projectmem-0.3.7/tests/test_tool_replies.py +123 -0
  38. projectmem-0.3.5/PKG-INFO +0 -970
  39. projectmem-0.3.5/README.md +0 -937
  40. projectmem-0.3.5/src/projectmem/search.py +0 -44
  41. {projectmem-0.3.5 → projectmem-0.3.7}/.gitignore +0 -0
  42. {projectmem-0.3.5 → projectmem-0.3.7}/LICENSE +0 -0
  43. {projectmem-0.3.5 → projectmem-0.3.7}/SECURITY.md +0 -0
  44. {projectmem-0.3.5 → projectmem-0.3.7}/TUTORIAL.md +0 -0
  45. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/__init__.py +0 -0
  46. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/attempt.py +0 -0
  47. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/auto_capture.py +0 -0
  48. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/brief.py +0 -0
  49. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/context.py +0 -0
  50. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/dashboard.py +0 -0
  51. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/decision.py +0 -0
  52. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/export.py +0 -0
  53. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/fix.py +0 -0
  54. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/global_cmd.py +0 -0
  55. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/hooks.py +0 -0
  56. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/instructions.py +0 -0
  57. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/log.py +0 -0
  58. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/map.py +0 -0
  59. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/note.py +0 -0
  60. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/plan.py +0 -0
  61. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/project.py +0 -0
  62. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/regenerate.py +0 -0
  63. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/score.py +0 -0
  64. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/search.py +0 -0
  65. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/show.py +0 -0
  66. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/stats.py +0 -0
  67. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/visualize.py +0 -0
  68. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/watch.py +0 -0
  69. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/commands/wrap.py +0 -0
  70. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/global_memory.py +0 -0
  71. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/glyphs.py +0 -0
  72. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/project_registry.py +0 -0
  73. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/resolver.py +0 -0
  74. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/staleness.py +0 -0
  75. {projectmem-0.3.5 → projectmem-0.3.7}/src/projectmem/structure.py +0 -0
  76. {projectmem-0.3.5 → projectmem-0.3.7}/tests/conftest.py +0 -0
  77. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_attempt.py +0 -0
  78. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_auto_capture.py +0 -0
  79. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_client_config_discovery.py +0 -0
  80. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_dashboard.py +0 -0
  81. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_global_mcp.py +0 -0
  82. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_hooks_path.py +0 -0
  83. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_init.py +0 -0
  84. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_init_ux.py +0 -0
  85. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_instructions_refresh.py +0 -0
  86. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_location_parsing.py +0 -0
  87. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_plan.py +0 -0
  88. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_search.py +0 -0
  89. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_showoff.py +0 -0
  90. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_staleness_performance.py +0 -0
  91. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_staleness_repair.py +0 -0
  92. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_structure.py +0 -0
  93. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_v014_features.py +0 -0
  94. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_visualize.py +0 -0
  95. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_watch.py +0 -0
  96. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_windows_console_encoding.py +0 -0
  97. {projectmem-0.3.5 → projectmem-0.3.7}/tests/test_windows_hooks_and_context.py +0 -0
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.7
4
+
5
+ **One command connects your AI client, your history from agentmemory or mem0 comes with you, private keys are redacted whole, and backfill no longer trips over a `|` in a commit message.**
6
+
7
+ ### Added
8
+
9
+ - **`pjm init --agent <client>` connects an AI client for you.** Setting up the MCP server used to mean copying the block `pjm init` prints into the right file for each client. With `--agent claude-code`, `codex`, `cursor`, `antigravity` or `claude-desktop` (repeat it for several), `pjm init` adds the server to that client's user config once, for every project, and for Claude Code and Codex also installs the edit hook from 0.3.6. Claude Code and Codex are set up through their own `claude mcp add` and `codex mcp add`. For Cursor, Antigravity and Claude Desktop, only the `projectmem` entry is added to their JSON file: other servers and settings stay as they were, the previous file is kept as `<name>.pjm-bak`, and the file's permissions and dotfile symlinks are kept. A config that does not parse is left untouched and the entry to paste is printed. An entry pinned to one repo, or a projectmem server saved under another name, is left as it is. Running it again changes nothing. Without `--agent`, `pjm init` prints the config as before.
10
+
11
+ - **`pjm import <file> --from agentmemory|mem0` brings your history from another memory tool.** Only what maps onto projectmem's own events comes over. From agentmemory: `architecture` memories and decision observations become decisions; lessons, crystal narratives and `bug`, `pattern`, `workflow`, `fact` and `preference` memories become notes; error observations become failed attempts on their files, so precheck and the edit hook show them. Raw activity such as file reads and writes, commands and searches is dropped, as are superseded memories and other projects' records: only records whose project is this repo, or a folder inside it, are taken (`--source-project` picks a repo that moved). From mem0, every memory becomes a note, since mem0 memories carry no type. The first run only shows what would be imported; `--apply` writes it through the usual write path, so secrets are redacted, and keeps each record's original date. Each imported event names its source record, so importing the same file again adds nothing, and text the project already has is skipped. The export comes from agentmemory's `GET /agentmemory/export` or mem0's `get_all`.
12
+
13
+ ### Fixed
14
+
15
+ - **Private keys were only partly redacted.** Only the `-----BEGIN … PRIVATE KEY-----` line was replaced, so the key itself was written to `events.jsonl`, for example from a pasted service-account JSON. The whole block up to its `END` line is redacted now: PKCS#8, RSA, EC, OpenSSH, encrypted and PGP keys, with real or escaped line breaks, also inside a diff or a quote. A key cut off before its `END` line has its base64 lines redacted. Public keys and certificates are not touched. Contributed by [@bardrop](https://github.com/bardrop). ([#38](https://github.com/riponcm/projectmem/pull/38))
16
+
17
+ - **`pjm backfill` stopped at a commit with `|` in its subject or author name**, with `ValueError: too many values to unpack`. Because `pjm init` hides backfill errors, one such commit among the last 20 meant `pjm init` imported no history at all. The `git log` fields are now separated by a character a commit message cannot contain, and a line that still does not parse is skipped instead of stopping the import. Reported by [@Fonsi44](https://github.com/Fonsi44). ([#39](https://github.com/riponcm/projectmem/issues/39))
18
+
19
+ ## 0.3.6
20
+
21
+ **Your agent sees a file's lessons before it edits it, precheck shows every past failure, and parallel sessions keep to their own issues.** Every change in this release was reported, measured and contributed by [@bigfree](https://github.com/bigfree) (Adam Mikó).
22
+
23
+ ### Added
24
+
25
+ - **An edit hook for Claude Code and Codex CLI.** Agents were asked to call `precheck_file` before editing a file. On the reporter's project they did so before 11% of 8,355 edits. `pjm-edit-hook` runs before every edit instead and gives the agent that file's open issues, failed and partial attempts, and decisions. It adds nothing for a file without lessons, shows each file once per session (again only if its lessons change), keeps subagents separate, resets after compaction, maps Claude Code worktrees back to the main checkout, and never blocks an edit. Install it once with `pjm hooks install --agent claude-code` or `--agent codex`. It takes effect in the next session, and Codex asks you to trust it first. `--project` writes the project's own config instead of your user config, and `pjm hooks uninstall --agent …` removes it. ([#37](https://github.com/riponcm/projectmem/issues/37))
26
+
27
+ - **`start_session()` loads a session in one call.** It returns the rules, the memory summary and the current plan (without Ideas, Someday / maybe and Shipped), and the project map only while it is still the init placeholder. The server instructions and the `CLAUDE.md` / `AGENTS.md` bridge now name it, and independent projectmem calls may run in parallel. The older read tools are unchanged. ([#34](https://github.com/riponcm/projectmem/issues/34))
28
+
29
+ - **`precheck_files(file_paths)`** checks several files in one call and one pass over the log. ([#32](https://github.com/riponcm/projectmem/issues/32))
30
+
31
+ ### Fixed
32
+
33
+ - **Parallel sessions wrote onto each other's issues.** `record_attempt` and `record_fix` without an `issue_id` used the newest issue, so with two agents on one project one agent's fix could close the other's issue. Through MCP, while several issues are open, both now refuse and list the open issues. With one open issue nothing changes, and the CLI is unchanged. ([#33](https://github.com/riponcm/projectmem/issues/33))
34
+
35
+ - **`precheck_file` missed most earlier failures.** An attempt logged without its own location now counts for its issue's file, partial attempts are lessons with their own mark, and failed or partial attempts no longer drop out after 30 days (churn and decisions keep the window). When more lessons exist than are shown, the overflow line names the issues that hold them. On the reporter's project, precheck showed the earlier failures for 72.5% of cases instead of 33.3%. ([#32](https://github.com/riponcm/projectmem/issues/32))
36
+
37
+ - **The summary's Key files listed version numbers and identifiers.** Only real file paths are kept now, `file.py:42` merges into `file.py`, `.projectmem/` files are left out, and the list is ranked by how many events cite each file. A bare name without a known source suffix, such as `Makefile`, is picked up only with a directory or as an event location. ([#35](https://github.com/riponcm/projectmem/pull/35))
38
+
39
+ - An event line stored without an `id` got a new random id on every read. It now gets a stable id derived from its content. ([#36](https://github.com/riponcm/projectmem/pull/36))
40
+
41
+ ### Changed
42
+
43
+ - **Write tools no longer repeat the record back.** They reply with the issue id, or for notes and decisions the event id that `add_decision(supersedes=…)` needs. **`search_events`** uses the same matcher as `pjm search`, shows each match's type, issue, event id and date, clips the text around the match, and marks retired decisions `(superseded)`; `full=True` returns whole texts. On the reporter's two months of transcripts, write replies were 92% smaller and search results 49% smaller. ([#36](https://github.com/riponcm/projectmem/pull/36))
44
+
45
+ - **Upgrading:** run `pjm init` once in each project so its `CLAUDE.md` / `AGENTS.md` bridge names `start_session()` and the `issue_id` rule. `AI_INSTRUCTIONS.md` is unchanged in this release, so a hand-edited copy is left alone.
46
+
3
47
  ## 0.3.5
4
48
 
5
49
  **Two community fixes: precheck recognises a file however its path is spelled, and the summary stays small even when entries are long.**