mirror of
https://github.com/rohitg00/agentmemory.git
synced 2026-09-14 20:16:33 +08:00
v0.9.21
13 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
632fa3531d |
revert: drop GH Packages mirror, keep single canonical install path (#548)
Reverting the GH Packages publish from #545. GH Packages is a separate registry from npmjs.com — anyone installing `@rohitg00/agentmemory` from `npm.pkg.github.com` needs to point their registry there and authenticate, which is friction users don't have on the canonical `@agentmemory/agentmemory` install from public npm. The right-sidebar Packages widget on the repo page was the only motivation for the mirror. Acceptable to leave it empty — the single canonical install path is the better DX. - Drop `publish-github-packages` job from `.github/workflows/publish.yml` - Drop `packages: write` perm wording from the workflow comment block - Remove "GitHub Packages mirror" badge from README Manual follow-up (post-merge): delete the already-published `@rohitg00/agentmemory@0.9.20` from GH Packages registry via github.com/users/rohitg00/packages/npm/agentmemory/settings → Delete. |
||
|
|
6ed47c155a |
fix(funding): tighten FUNDING.yml to canonical single-line form (#547)
Sponsor button still missing from the repo page despite #545 merging. The committed FUNDING.yml started with 4 lines of `#` comments before the canonical `github: [rohitg00]` directive. GitHub's FUNDING parser documents only the canonical key-value form; leading comments shouldn't break it but some users have reported indexer lag when the file starts with non-data lines. Strip to the bare single-line form to match the documented schema and remove any ambiguity. Sponsor profile is enabled (github.com/sponsors/rohitg00 returns 200 + 'Sponsor @rohitg00' button), so the only remaining gap is GitHub's side-bar indexing. Tightening the file forces a re-parse. |
||
|
|
b4259229a6 |
feat(repo): add Sponsor button + GH Packages mirror for sidebar surface (#545)
* feat(repo): add Sponsor button + GH Packages mirror for sidebar surface
Three additions that make the repo page surface clearer + give users
a single place to fund the project:
1. `.github/FUNDING.yml` — `github: [rohitg00]` renders the "Sponsor"
button at the top of the repo + the Sponsor widget in the right
sidebar. Requires GitHub Sponsors to be enabled at
github.com/sponsors/accounts on the rohitg00 profile before the
link resolves (currently 404s — enable before merging this PR).
2. `.github/workflows/publish.yml` — new `publish-github-packages`
job runs after the existing public-npm publish completes.
Republishes the main package as `@rohitg00/agentmemory` to
`npm.pkg.github.com`. The repo's right-sidebar "Packages" widget
only surfaces packages on GitHub Packages, not packages on the
public npm registry, so this is what makes the sidebar widget
non-empty. Public npm remains the canonical install source;
GH Packages is purely a discovery surface.
- Uses built-in GITHUB_TOKEN, no new secrets needed.
- Rewrites package.json `name` + `publishConfig` in-runner via a
small node one-liner, publishes, then restores the original so
main isn't permanently scope-changed.
- Skip-on-already-published guard mirrors the existing public
publish steps.
- Marked `|| echo "non-fatal"` so a GH Packages hiccup never blocks
the canonical npm release.
- `permissions: packages: write` added at workflow level.
3. README badge row — added `npm downloads`, `GitHub Packages mirror`,
and `Sponsor rohitg00 on GitHub Sponsors` badges alongside the
existing `npm version` / `CI` / `License` / `Stars` row. The
sponsor badge is the same link the FUNDING.yml sidebar widget
uses; surfacing it in-README means readers who don't notice the
sidebar still see it.
Out of scope (asked, declined):
- Docker Hub / ghcr.io publish workflow. Not in this PR.
* ci(publish): scope write perms per-job + persist-credentials false
Inline review on #545 flagged that the workflow-level permissions
block granted `id-token: write` + `packages: write` to every job,
including ones that don't need them. Tightened to least-privilege:
- Workflow-level: only `contents: read`.
- `publish` job: adds `id-token: write` (required for `npm publish
--provenance` to mint a Sigstore OIDC token). The GH Packages
job doesn't inherit this.
- `publish-github-packages` job: adds `packages: write` (required
to push to npm.pkg.github.com). The public-npm publish job
doesn't inherit this.
Both `actions/checkout@v6` calls also pick up `persist-credentials:
false`. The publish steps never push back to the repo, so the
GITHUB_TOKEN doesn't need to land in `.git/config` after checkout.
Same posture both jobs.
Skipped from the same review pass:
- **Pin actions to commit SHAs.** Industry rule but introduces real
maintenance friction — Renovate/Dependabot don't auto-bump
SHA-pinned actions to new minors, so SHA pinning trades easy
semver tracking for stale-action drift. We stay on `@v6` major-tag
pins (GitHub publishes those via verified moving refs).
- **Disable setup-node cache.** `actions/setup-node@v6` defaults to
cache-off (the `cache:` input is opt-in). `package-manager-cache`
only auto-enables when `package.json` has a `packageManager` field
— agentmemory's doesn't (verified via `grep`). The fix is a no-op
on this workflow.
|
||
|
|
eb5f7e6895 |
chore(deps): bundle 10 Dependabot bumps (claude-agent-sdk 0.3, dotenv 17, vitest 4, ts 6, types/node 25, react 19.2.6, checkout/setup-node v6) (#390)
* chore(deps): bundle 10 Dependabot bumps + README agents grid refresh Closes the open Dependabot wave in one PR. Root npm bumps: - @anthropic-ai/claude-agent-sdk ^0.2.56 → ^0.3.142 (closes #389 group) - dotenv ^16.4.7 → ^17.4.2 (closes #356) - @types/node ^22 → ^25.7.0 (closes #357) - typescript ^5.7 → ^6.0.3 (closes #358) - vitest ^3 → ^4.1.6 (closes #359) Website npm bumps: - @types/node 22.10.2 → ^25.7.0 (closes #354) - typescript 5.7.2 → ^6.0.3 (closes #353) - react/react-dom ^19.2.5 → ^19.2.6 (closes #352 group) github-actions bumps: - actions/checkout v4 → v6 (closes #351) - actions/setup-node v4 → v6 (closes #350) Verified: - npm run build clean against new TypeScript 6 + vitest 4 stack - npm test 903 / 903 pass - website npm run build clean (next 16.2.6 + react 19.2.6 + ts 6 stack generates 5 static pages, finalises optimisation) - No source changes were needed for any breaking-version bump — the agent-sdk 0.3.x removal of unstable_v2_createSession etc. is not on any path agentmemory exercises (we use query() + the existing AgentSDKProvider shape). Plus README refresh on the Works-with-every-agent grid: - Added OpenHuman entry (tinyhumansai/openhuman) pointing at the recently-landed Memory trait backend (PR tinyhumansai/openhuman#1743) - Added pi as a native-plugin entry (we already ship integrations/pi/security.ts and the plugin file in-tree) - Reordered the grid so native-plugin agents sit in row 1 and MCP-only / REST-only agents sit in row 2 - Updated sub-text on Claude Code / Codex CLI / OpenClaw / Hermes / pi to consistently say "native plugin" rather than mixing "plugin", "skills", "hooks". Counter on assets/tags/section-agents.svg moved from "16 integrations" to "15 integrations" because we dropped the meta "Any agent" + "Claude SDK" cells that double-counted REST and the AgentSDKProvider path already represented by Claude Code. * docs(readme): swap pi logo to first-party SVG Drops the generic GitHub-org avatar for the brand-mark SVG. Lives in assets/agents/ so the README + future grid renders reach it directly. |
||
|
|
96c0ed017d |
chore(security): add dependabot config + close 14 open advisories (#348)
- Add .github/dependabot.yml covering npm (root, website, 3 integrations) + github-actions. Weekly cadence, grouped minor/patch, scoped commit prefixes. - Bump website next ^16.2.4 → ^16.2.6: closes 13 open advisories (middleware/proxy bypass, SSRF, DoS, CSP-nonce XSS, image-opt DoS, cache poisoning, beforeInteractive XSS, segment-prefetch routes). - Pin website postcss → ^8.5.10 via overrides: closes XSS via unescaped </style> in CSS stringify output (resolves to 8.5.14). Verified: - `npm audit --omit=dev` → 0 vulnerabilities. - `npm run build` clean on Next 16.2.6 (Turbopack). |
||
|
|
fab246a3fd | ci: two-step install so npm ci has a lockfile on this branch | ||
|
|
3ed85ffaec |
ci(publish): add @agentmemory/fs-watcher to the release workflow
Ships the new filesystem connector to npm on every release. Also adds workflow_dispatch so we can manually publish packages without cutting a release — useful for back-filling fs-watcher against v0.9.0 which merged before the workflow knew about it. |
||
|
|
a9889e689c |
Merge pull request #118 from rohitg00/docs/security-advisories-v082
docs: v0.8.2 security advisory drafts |
||
|
|
a4a1d23d12 |
docs: address CodeRabbit review on security advisory drafts
- 04-mesh-unauth.md: correct 4->5 mesh REST endpoints in patch summary. - 05-obsidian-export-traversal.md: document the known symlink-traversal limitation of resolveVaultDir(). The 0.8.2 fix uses lexical containment only (path.resolve + startsWith) and does not call realpath/lstat, so a pre-existing symlink under AGENTMEMORY_EXPORT_ROOT pointing outside the root is still a viable escape. Advisory now names this explicitly and points users at sandboxing or a follow-up issue for full hardening. |
||
|
|
416fa15af4 |
chore: release 0.8.6 — scope the MCP shim as @agentmemory/mcp (#134)
0.8.5's publish workflow got blocked on the unscoped `agentmemory-mcp` name by npm's name-similarity policy (there's an unrelated third-party package called `agent-memory-mcp`). Publishing the shim under the `@agentmemory` scope we already own sidesteps the conflict. Changes: - Rename packages/agentmemory-mcp → packages/mcp - Package name: agentmemory-mcp → @agentmemory/mcp (0.8.4 → 0.8.6) - Keep bin name `agentmemory-mcp` so `npm i -g @agentmemory/mcp` still installs a binary at `agentmemory-mcp` for muscle memory - Log prefix [agentmemory-mcp] → [@agentmemory/mcp] in standalone.ts and in-memory-kv.ts - README / integrations/openclaw / integrations/hermes / src/cli.ts all point at `npx -y @agentmemory/mcp` - .github/workflows/publish.yml working-directory and npm view queries target packages/mcp and @agentmemory/mcp - Shim dependency on @agentmemory/agentmemory bumped to ~0.8.6 - Main package 0.8.5 → 0.8.6 across the 8 version files - CHANGELOG [0.8.6] entry documenting the scope move |
||
|
|
8a36fe7867 |
fix: retention scoring (#119) + npx agentmemory-mcp 404 (#120), release 0.8.3 (#123)
* fix: retention scoring (#119) + npx agentmemory-mcp 404 (#120), release 0.8.3 Issue #119 — retention score ignored agent-side reads `mem::retention-score` previously hardcoded `accessCount=0` and `accessTimestamps=[]` for episodic memories and used only a single-sample `lastAccessedAt` for semantic memories, so the time-frequency decay formula was a dead path. All read endpoints now record access events to a new `mem:access` KV namespace via a keyed-mutex'd access tracker: - mem::search, mem::smart-search (compact + expand), mem::context, mem::timeline, mem::file-context, mem::get-related, mem::working-context - retention.ts pre-fetches the full access log in one kv.list call, normalizes every row defensively, and builds an O(1) lookup Map - recordAccessBatch uses Promise.allSettled so a slow keyed-lock on one id does not block the rest of the batch - Bounded ring buffer of the last 20 access timestamps per memory - Backwards-compat fallback: pre-0.8.3 semantic memories with only the legacy sem.lastAccessedAt still score correctly - Corrupt lastAccessedAt values are NaN-safe via Date.parse + isFinite - reinforcementBoost is reported as the raw formula output, not the clamped residual Memory deletion sites (retention-evict, evict, auto-forget, governance-delete, governance-bulk, forget, import replace) now call deleteAccessLog to prevent mem:access from accumulating zombie entries. mem::export / mem::import and mem::snapshot-create / mem::snapshot-restore round-trip the new namespace so backup/restore cycles no longer zero out reinforcement signals. Issue #120 — npx agentmemory-mcp returned npm registry 404 The README instructed users to run `npx agentmemory-mcp`, but `agentmemory-mcp` only existed as a `bin` entry inside `@agentmemory/agentmemory`, not a real registry package. Two-part fix: - New sibling package `packages/agentmemory-mcp/` — a thin shim that depends on `@agentmemory/agentmemory` (~0.8.3, tilde to block 0.9.x supply-chain drift) and forwards to dist/standalone.mjs via the new `exports` field on the main package - Canonical `npx @agentmemory/agentmemory mcp` subcommand on the CLI for users who already have the main package installed - Removed the dead `agentmemory-mcp` bin from the main package so the shim owns the name unambiguously - publish.yml publishes both packages in order with idempotent guards and npm-view registry polling (no more fixed sleep) - All MCP install snippets in README + integrations/openclaw + hermes + shim README use `npx -y agentmemory-mcp` to skip install prompts Release 0.8.3 - 670 tests passing (665 + 11 new: access tracker, retention, smart-search integration, corrupt-input, kv.list failure path, Promise.allSettled resilience) - Version bumped across package.json, src/version.ts, types.ts, export-import supportedVersions, plugin.json - package-lock.json regenerated * fix: address CodeRabbit review feedback on #123 Real issues caught and fixed: - access-tracker: deleteAccessLog now takes the same mem:access:<id> keyed mutex used by recordAccess, eliminating the race where a concurrent delete could drop an in-flight RMW update and leave a stale access log for an evicted memory - access-tracker: normalizeAccessLog now coerces count to a non-negative integer, drops non-finite recent[] entries, truncates recent[] to the last 20 on read (enforcing the ring-buffer invariant), and guarantees count >= recent.length so a malformed row can't produce NaN downstream. count is NOT capped at 20 — it is the lifetime access counter, while recent[] is the 20-entry window - export-import: import path now rejects accessLogs arrays above MAX_ACCESS_LOGS (50_000), normalizes each entry via normalizeAccessLog, and drops entries whose memoryId is not in the imported memories set, so a crafted export can't blow up memory or resurrect zombie access rows for memories that don't exist - publish.yml: added a post-publish npm view polling loop for agentmemory-mcp mirroring the one that already guards the main package, so the workflow only succeeds when `npx agentmemory-mcp` is actually visible on the registry - CHANGELOG.md: added the missing [0.8.3] reference-style link target at the bottom to match the [0.8.2]/[0.8.1]/[0.8.0] pattern - README.md: standalone MCP inline examples now use `npx -y` to match the MCP config snippets and skip the install confirmation prompt Tests: 680/680 (+10 new — deleteAccessLog behavior, normalizeAccessLog invariants, malformed mem:access row handling in retention scoring). Findings deliberately not applied: - auto-forget.ts / remember.ts / evict.ts recordAudit calls: existing pattern in the codebase only audits governance deletes (user-initiated admin actions), not automatic eviction. Adding audit everywhere is a policy change, out of scope for this PR - evict.ts gating deleteAccessLog on memory delete success: current order is defensible, deleteAccessLog is already best-effort with its own try/catch, and calling it after a failed memory delete is harmless - snapshot.ts fail-fast on kv.list failure: inconsistent with the existing .catch(() => []) pattern used for observations in the same function - retention.ts semantic evict only deletes KV.memories rows: real bug but pre-existing on main (RetentionScore has no source/type field). Tracked separately — out of scope for this PR - bin.mjs fallback command: already present in the existing catch handler - Promise.all parallelization of delete+deleteAccessLog: micro optimization not worth the readability cost |
||
|
|
266583ca3a |
docs: add v0.8.2 security advisory drafts
Six advisory drafts, one per vulnerability fixed in v0.8.2. These match the content that should be published via GitHub's Security Advisories UI at: https://github.com/rohitg00/agentmemory/security/advisories/new Each advisory includes: - Severity + CVSS 3.1 vector - CWE classification - Affected/patched version ranges - Full summary of the issue - Impact analysis - Patch description with commit reference - Workarounds for users on affected versions - References and credit These drafts are reference material — the actual CVEs need to be filed through the GitHub UI to get GHSA IDs assigned and to appear in GitHub's vulnerability database for downstream scanners. Order: 01. viewer-xss (CRITICAL, 9.6) 02. curl-sh-rce (CRITICAL, 9.8) 03. default-bind-0000 (HIGH, 8.1) 04. mesh-unauth (HIGH, 7.4) 05. obsidian-export-traversal (MEDIUM, 6.5) 06. privacy-redaction-incomplete (MEDIUM, 6.2) |
||
|
|
e8f410b537 |
feat: v0.7.0 — lessons, tool visibility, auto-consolidation, obsidian export, npx bootstrap (#82)
* feat: v0.7.0 — lessons, tool visibility, auto-consolidation, obsidian export, npx bootstrap Five DX improvements based on competitive research against Mem0, Engram, CodeMem: 1. `npx agentmemory` zero-config startup - New CLI bootstrap (src/cli.ts) auto-detects and starts iii-engine - Tries `iii` binary first, falls back to `docker compose up -d` - Bundles iii-config.yaml and docker-compose.yml in dist/ 2. Simplified MCP tool surface (7 core tools by default) - AGENTMEMORY_TOOLS=all unlocks all 49 tools - Default: save, recall, consolidate, forget, sessions, diagnose, lesson_save - Call handler remains unfiltered — any tool callable by name 3. Auto-consolidation on session end - CONSOLIDATION_ENABLED defaults to true (was false) - Session-end hook: session/end → crystallize → consolidate → bridge sync - Consolidation pipeline always registered (timer gated by config) 4. First-class lesson memory type with confidence decay - Lesson interface: confidence (0-1), reinforcements, decayRate, source - 5 functions: lesson-save, lesson-recall, lesson-list, lesson-strengthen, lesson-decay-sweep - Dedup via SHA-256 fingerprint — duplicate saves strengthen existing - Crystal lessons auto-flow into lesson system at confidence 0.6 - Daily decay sweep with parallel KV writes 5. Obsidian-compatible Markdown export - Export to ~/.agentmemory/vault/ with YAML frontmatter + wikilinks - MOC.md (Map of Content) index file - Parallel KV reads, auto-export via OBSIDIAN_AUTO_EXPORT=true Stats: 49 MCP tools, 99 REST endpoints, 573 tests passing * docs: add AGENTS.md, fix tool/endpoint counts across README, plugin, cli - Create AGENTS.md with strict consistency rules for MCP tools, REST endpoints, versions, KV scopes, and audit operations - Fix MCP tool count: 38 → 41 across README.md (4 occurrences) - Fix REST endpoint count: 93/95 → 99 across README.md and index.ts - Fix plugin.json: version 0.6.1 → 0.7.0, tool count 5 → 41 - Fix cli.ts help text: 48+ → 41 MCP tools - Fix README api.ts path reference → triggers/api.ts * fix: address code review findings — consolidation guard, decay bug, async fs, export-import lessons Inline fixes: - Revert CONSOLIDATION_ENABLED to opt-in (=== "true"), matching original behavior - Add early-exit guard in consolidation-pipeline handler when disabled - Gate session-end crystallize+consolidation calls on CONSOLIDATION_ENABLED - Fix lesson decay over-decay bug: add lastDecayedAt to Lesson, compute incremental delta instead of reapplying full age every sweep run - Add LESSON_DECAY_ENABLED flag (default true) to gate the sweep timer Outside diff fixes: - Add lessons to export-import (export + import + replace cleanup) - Log warning instead of swallowing obsidian auto-export errors Nitpick fixes: - Switch obsidian-export to async fs/promises (mkdir, writeFile) - Add per-item try/catch in obsidian-export, return errors array - Replace governance_delete with smart_search in ESSENTIAL_TOOLS (non-destructive default) - Fix CLI whichBinary for Windows (uses "where" on win32) - Use dynamic port in CLI error message instead of hardcoded 3111 - Return 201 for newly created lessons, 200 for strengthened - Wrap lesson audit calls in try/catch so audit failure doesn't surface - Fix build script to not swallow tsdown failure - Remove exact tool count from test, use >=41 + uniqueness + required names - Add test/consistency.test.ts: validates version, tool count, README consistency - Add isConsolidationEnabled mock to consolidation-pipeline test 579 tests passing (573 original + 6 new consistency checks) * fix: guard remaining audit calls, correct endpoint count, add CI + npm publish Review fixes: - Wrap lesson_recall and lesson_strengthen audit calls in try/catch - Fix REST endpoint count: 99 → 100 (verified via grep) across index.ts, README.md, and AGENTS.md - Use regex in consistency test for README assertions (flexible phrasing) - Add consolidation gate tests: disabled returns early, force=true bypasses CI/CD: - Add .github/workflows/ci.yml — test on Node 18/20/22 - Add .github/workflows/publish.yml — auto-publish to npm on GitHub release (uses NPM_TOKEN secret + provenance) Nitpick: - Single-char term filter (t.length > 1) kept intentionally — prevents noise from single-letter matches; documented in AGENTS.md if needed 581 tests passing * fix(ci): add --legacy-peer-deps for zod v3/v4 peer conflict @anthropic-ai/claude-agent-sdk@0.2.56 requires zod@^4.0.0 as a peer dependency but the project uses zod@^3.23.0. The lock file resolves this locally but npm ci is strict about peer deps in CI. * fix(ci): drop Node 18 from matrix — tsdown requires Node 20+ tsdown/rolldown uses node:util.styleText which is only available in Node 20.12+. Updated engines field to >=20.0.0 to match. * fix(ci): add inlineOnly: false to tsdown config, target node20 tsdown errors on CI with "Consider adding inlineOnly option" when dependencies are bundled. Setting inlineOnly: false suppresses this. Also updated target from node18 to node20 to match engines field. |