agent-memory-git 0.1.12__tar.gz → 0.1.14__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 (67) hide show
  1. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/PKG-INFO +1 -1
  2. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/pyproject.toml +1 -1
  3. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/pyproject.toml.orig +1 -1
  4. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/PROTOCOL.md +4 -2
  5. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/ui.py +10 -18
  6. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/app.css +5 -0
  7. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/icons.js +1 -0
  8. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/insights.js +6 -2
  9. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/settings.js +10 -1
  10. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/LICENSE +0 -0
  11. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/README.md +0 -0
  12. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/__init__.py +0 -0
  13. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/__main__.py +0 -0
  14. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/capture.py +0 -0
  15. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/cli.py +0 -0
  16. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/config.py +0 -0
  17. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/context.py +0 -0
  18. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/personal/2026/08/20260816-blog-publishing-k3qm.md +0 -0
  19. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/personal/2026/09/20260906-push-personal-repos-w8re.md +0 -0
  20. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/personal/2026/09/20260921-home-server-n2vb.md +0 -0
  21. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/personal/2026/10/20261004-options-first-7hcx.md +0 -0
  22. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/personal/2026/10/20261009-thesis-setup-fr6e.md +0 -0
  23. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/08/20260804-alex-profile-ujzd.md +0 -0
  24. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/08/20260804-reply-language-xdnc.md +0 -0
  25. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/08/20260812-ask-before-push-pf3d.md +0 -0
  26. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/08/20260820-tests-before-done-odzd.md +0 -0
  27. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/08/20260827-etl-orders-export-deadline-pft7.md +0 -0
  28. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/08/20260828-etl-dashboard-72ce.md +0 -0
  29. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/09/20260902-report-eta-is2j.md +0 -0
  30. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/09/20260908-shop-web-stripe-checkout-lgmx.md +0 -0
  31. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/09/20260910-shop-web-deploys-dn73.md +0 -0
  32. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/09/20260915-etl-parquet-partitioning-seh2.md +0 -0
  33. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/09/20260922-design-tokens-source-uvw7.md +0 -0
  34. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/10/20261002-shop-web-v3-freeze-5xtp.md +0 -0
  35. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo/work/2026/10/20261012-payments-runbook-4syw.md +0 -0
  36. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/demo.py +0 -0
  37. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/embed_worker.py +0 -0
  38. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/frontmatter.py +0 -0
  39. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/gitsync.py +0 -0
  40. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/hooks.py +0 -0
  41. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/importers.py +0 -0
  42. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/install.py +0 -0
  43. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/lint.py +0 -0
  44. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/profiles.py +0 -0
  45. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/select.py +0 -0
  46. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/sessions.py +0 -0
  47. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/store.py +0 -0
  48. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/ui_server.py +0 -0
  49. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/update.py +0 -0
  50. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/util.py +0 -0
  51. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/index.html +0 -0
  52. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/api.js +0 -0
  53. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/avatar.js +0 -0
  54. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/filters.js +0 -0
  55. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/format.js +0 -0
  56. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/h.js +0 -0
  57. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/main.js +0 -0
  58. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/markdown.js +0 -0
  59. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/search.js +0 -0
  60. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/store.js +0 -0
  61. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/list.js +0 -0
  62. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/memory.js +0 -0
  63. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/overlays.js +0 -0
  64. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/profiles.js +0 -0
  65. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/shell.js +0 -0
  66. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/webui/js/views/ui.js +0 -0
  67. {agent_memory_git-0.1.12 → agent_memory_git-0.1.14}/src/agent_memory/workdir.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-memory-git
3
- Version: 0.1.12
3
+ Version: 0.1.14
4
4
  Summary: Shared, git-backed memory for Claude Code and Codex.
5
5
  Keywords: claude-code,codex,memory,agents,git
6
6
  Author: Shichao Song
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agent-memory-git"
3
- version = "0.1.12"
3
+ version = "0.1.14"
4
4
  description = "Shared, git-backed memory for Claude Code and Codex."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agent-memory-git"
3
- version = "0.1.12"
3
+ version = "0.1.14"
4
4
  description = "Shared, git-backed memory for Claude Code and Codex."
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -40,8 +40,8 @@ Write one file per memory into this session's staging directory, with a short ke
40
40
  ```markdown
41
41
  ---
42
42
  name: kebab-case-slug
43
- type: feedback
44
- scope: global
43
+ type: project
44
+ scope: here
45
45
  description: One line (under 150 characters) saying what this memory is; it becomes the index entry
46
46
  ---
47
47
  The fact itself, in one or two sentences.
@@ -70,6 +70,8 @@ Keep the body under about 1,500 characters. A memory is a conclusion, not a log:
70
70
  - `global`: in every session. Use it for who the user is and for preferences not tied to one project.
71
71
  - `here`: only in this folder, its parent and child folders, and other checkouts of the same git remote. When the index marks the location as a throwaway folder (a scratch workspace or a Codex per-thread folder), `here` memories are filed under the project folder this session worked in most, so use `here` for project facts there too.
72
72
 
73
+ A `project` or `reference` memory is `here` unless it holds in every project you could work in; a fact about one project, its repository or its tools stays `here`, however important it seems. Most `user` and `feedback` memories are `global`.
74
+
73
75
  Leave out ids, dates and provenance (session, host, folder, git remote). When your turn ends a hook adds them, moves the file into the repository and commits it.
74
76
 
75
77
  ## Changing existing memories
@@ -316,19 +316,15 @@ def embed(data_dir, texts):
316
316
 
317
317
 
318
318
  def closeness(vectors):
319
- """Cosine similarity rescaled so a typical pair is 0 and the closest pair is 1.
319
+ """The cosine similarity of every pair of unit rows, as it is (below 0 reads as 0), and what a typical pair
320
+ scores: the median over pairs of different memories. Pairs at or below it are not listed as similar.
320
321
 
321
- Embedding cosines bunch together (most unrelated pairs still score 0.3-0.5),
322
- so the raw number says little; the rescaled one reads like a percentage.
322
+ It is not rescaled: rescaling made the closest pair 100% however far apart it was.
323
323
  """
324
- raw = vectors @ vectors.T
325
- off = raw[~np.eye(len(raw), dtype=bool)]
326
- if not len(off):
327
- return np.ones_like(raw)
328
- lo, hi = np.percentile(off, 50), off.max()
329
- sim = np.clip((raw - lo) / max(hi - lo, 1e-6), 0, 1)
324
+ sim = np.clip(vectors @ vectors.T, 0, 1)
325
+ off = sim[~np.eye(len(sim), dtype=bool)]
330
326
  np.fill_diagonal(sim, 1)
331
- return sim
327
+ return sim, float(np.median(off)) if len(off) else 0.0
332
328
 
333
329
 
334
330
  # ------------------------------------------------------------ page data
@@ -366,13 +362,9 @@ def build(data_dir, semantic=True, vectors_out=None):
366
362
  x, vocab = vectorize(docs)
367
363
  forms = _display_forms(clean(t + " " + b) for t, b in docs)
368
364
  vectors = embed(data_dir, [prose(t, b) for t, b in docs]) if semantic else None
369
- if vectors is not None:
370
- sim, space = closeness(vectors), vectors
371
- method = f"{MODEL['name']}, local"
372
- else:
373
- sim, space = np.clip(x @ x.T, 0, 1), x
374
- np.fill_diagonal(sim, 1)
375
- method = "keywords only (no local model)"
365
+ space = vectors if vectors is not None else x
366
+ sim, typical = closeness(space)
367
+ method = f"{MODEL['name']}, local" if vectors is not None else "keywords only (no local model)"
376
368
  if vectors_out is not None:
377
369
  vectors_out[:] = [space]
378
370
 
@@ -399,7 +391,7 @@ def build(data_dir, semantic=True, vectors_out=None):
399
391
  "host": src.get("host") or "",
400
392
  "created": m["created"],
401
393
  "updated": m["updated"],
402
- "similar": [{"i": j, "s": round(float(sim[i, j]), 3)} for j in order if sim[i, j] > 0],
394
+ "similar": [{"i": j, "s": round(float(sim[i, j]), 3)} for j in order if sim[i, j] > typical],
403
395
  "keywords": [{"k": vocab[j], "t": forms.get(vocab[j], vocab[j])} for j in picks[i]],
404
396
  "terms": [vocab[j] for j in np.flatnonzero(x[i])],
405
397
  "issues": [message for _, message in lint.check(m, body, names)],
@@ -559,6 +559,11 @@ button.hero-meta-item:hover .copy-hint, button.hero-meta-item:focus-visible .cop
559
559
  .doctor-line .i { width: 13px; height: 13px; }
560
560
  .doctor-sum .chev { transition: transform .15s; }
561
561
  .doctor-sum .chev.turned { transform: rotate(180deg); }
562
+ .about { display: flex; justify-content: center; align-items: center; gap: 2px; margin-top: 4px; font-size: 12.5px; color: var(--ink-3); }
563
+ .about .sep { margin: 0 4px; }
564
+ .about a { display: inline-flex; height: 28px; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; color: var(--ink-3); text-decoration: none; transition: background-color .15s, color .15s; }
565
+ .about a:hover { background: var(--hover); color: var(--ink); }
566
+ .about .i { width: 12px; height: 12px; }
562
567
  .checks { width: 100%; margin-top: 12px; padding: 16px 20px 18px; border-radius: var(--r-card); background: var(--panel); animation: rise .15s ease-out; }
563
568
  .checks-note { margin-bottom: 10px; font-size: 12px; color: var(--ink-3); }
564
569
  .checks-note code { font-size: 11.5px; color: var(--ink-2); }
@@ -16,6 +16,7 @@ const PATHS = {
16
16
  "arrow-left": `<path d="m12 19-7-7 7-7"/><path d="M19 12H5"/>`,
17
17
  "arrow-right": `<path d="M5 12h14"/><path d="m12 5 7 7-7 7"/>`,
18
18
  "arrow-up": `<path d="m5 12 7-7 7 7"/><path d="M12 19V5"/>`,
19
+ "arrow-up-right": `<path d="M7 7h10v10"/><path d="M7 17 17 7"/>`,
19
20
  "chart-column": `<path d="M3 3v16a2 2 0 0 0 2 2h16"/><path d="M18 17V9"/><path d="M13 17V5"/><path d="M8 17v-3"/>`,
20
21
  "check": `<path d="M20 6 9 17l-5-5"/>`,
21
22
  "chevron-down": `<path d="m6 9 6 6 6-6"/>`,
@@ -136,7 +136,7 @@ export function insightsPage() {
136
136
  <section class="card span2"><h2>Possible duplicates</h2><p class="card-note">Pairs that read alike; compare them side by side and keep one.</p>
137
137
  ${pairs.length ? pairs.map((p, i) => html`<div class="pair"><div class="pair-text"><span class="truncate">${p[0].description}</span><span class="truncate faint2">${p[1].description}</span></div>
138
138
  <span class="count">${Math.round(p[2] * 100)}%</span><button type="button" class="btn sm" data-act="compare" data-arg="${i}">Compare</button></div>`)
139
- : html`<p class="card-note">No two memories are more than 45% alike.</p>`}
139
+ : html`<p class="card-note">No likely duplicates: no two memories are ${Math.round(DUPLICATE * 100)}% alike or more.</p>`}
140
140
  </section>
141
141
 
142
142
  <section class="card span2"><h2>Changes per week</h2>${chart("changes", changes, WHO, TOOL_COLORS, WHO_LABELS, `No memory changes in the past ${WEEKS} weeks.`)}</section>
@@ -153,9 +153,13 @@ export function insightsPage() {
153
153
  </div>`;
154
154
  }
155
155
 
156
+ /** Cosine similarity at or above which two memories may say the same thing. Set from pairs that were merged as
157
+ * duplicates (0.69-0.70 with the embedding model) and related ones that were not (0.63 and below). */
158
+ const DUPLICATE = 0.65;
159
+
156
160
  /** The pairs shown under Possible duplicates, so Compare can find its pair by position. */
157
161
  export function duplicatePairs() {
158
162
  const M = app.M, pairs = [];
159
- M.forEach((m, i) => m.similar.forEach((s) => { if (s.i > i && s.s >= 0.45 && M[s.i]) pairs.push([m, M[s.i], s.s]); }));
163
+ M.forEach((m, i) => m.similar.forEach((s) => { if (s.i > i && s.s >= DUPLICATE && M[s.i]) pairs.push([m, M[s.i], s.s]); }));
160
164
  return pairs.sort((a, b) => b[2] - a[2]).slice(0, 5);
161
165
  }
@@ -123,6 +123,15 @@ function doctor() {
123
123
  </section>`;
124
124
  }
125
125
 
126
+ // ---------------------------------------------------------------- where agent-memory lives
127
+
128
+ /** The project's site and repository, as [project.urls] in pyproject.toml has them. */
129
+ const LINKS = [["Website", "https://ki-seki.github.io/agent-memory/"], ["GitHub", "https://github.com/Ki-Seki/agent-memory"]];
130
+
131
+ function about() {
132
+ return html`<nav class="about" aria-label="agent-memory">${LINKS.map(([text, href], i) => html`${i ? html`<span class="sep">·</span>` : ""}<a${attrs({ href, target: "_blank", rel: "noopener noreferrer" })}>${text}${icon("arrow-up-right")}</a>`)}</nav>`;
133
+ }
134
+
126
135
  export function settingsPage() {
127
- return html`<div class="settings">${hero()}${prefs()}${doctor()}</div>`;
136
+ return html`<div class="settings">${hero()}${prefs()}${doctor()}${about()}</div>`;
128
137
  }