Skip to content

#1 Persistent memory for AI coding agents based on real-world benchmarks

feat(repo): add Sponsor button + GH Packages mirror for sidebar surface (#545)

Rohit Ghumareb4259229a616
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..4fbf3e44
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,5 @@
+# GitHub renders this as the "Sponsor" button at the top of the repo
+# and the Sponsor widget in the right sidebar. Enable GitHub Sponsors
+# on the profile at github.com/sponsors/accounts before merging so the
+# resulting link doesn't 404.
+github: [rohitg00]
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 62dc8925..7162c585 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -10,15 +10,30 @@ on:
required: false
default: "agentmemory,mcp,fs-watcher"
+# Workflow-level permissions stay minimal — only `contents: read`
+# is required to check out the repo. Write scopes (`id-token: write`
+# for npm provenance, `packages: write` for the GH Packages mirror)
+# are granted per-job below so neither job inherits a scope it
+# doesn't need.
permissions:
contents: read
- id-token: write
jobs:
publish:
runs-on: ubuntu-latest
+ # `id-token: write` is required for npm publish --provenance to
+ # mint a Sigstore OIDC token on this run. Scoped to this job only
+ # so the GH Packages mirror job doesn't inherit it.
+ permissions:
+ contents: read
+ id-token: write
steps:
- uses: actions/checkout@v6
+ with:
+ # Don't persist the GITHUB_TOKEN to .git/config — the
+ # publish steps don't push back to the repo, so the token
+ # only needs to live in memory for this checkout.
+ persist-credentials: false
- uses: actions/setup-node@v6
with:
@@ -112,3 +127,49 @@ jobs:
done
echo "ERROR: fs-watcher never propagated after 2 minutes" >&2
exit 1
+
+ publish-github-packages:
+ # Mirror the same artifacts to GitHub Packages so the repo's
+ # right-sidebar "Packages" widget surfaces them. Scoped to
+ # @rohitg00 since GH Packages requires the org/user to match the
+ # repo owner. Public npm registry remains the canonical install
+ # source; this is purely a discovery surface on the repo page.
+ needs: publish
+ runs-on: ubuntu-latest
+ # `packages: write` only here — the public-npm publish job
+ # doesn't need it. `contents: read` for the checkout.
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ - uses: actions/checkout@v6
+ with:
+ # Same posture as the publish job — no push back to the
+ # repo, so don't persist the token to `.git/config`.
+ persist-credentials: false
+
+ - uses: actions/setup-node@v6
+ with:
+ node-version: 22
+ registry-url: https://npm.pkg.github.com
+ scope: "@rohitg00"
+
+ - run: npm install --package-lock-only --legacy-peer-deps --no-audit --no-fund
+ - run: npm ci --legacy-peer-deps --no-audit --no-fund
+ - run: npm run build
+
+ - name: Publish @rohitg00/agentmemory to GitHub Packages
+ run: |
+ VERSION=$(node -p "require('./package.json').version")
+ # Save original package.json, rewrite scope for GH Packages,
+ # publish, restore. Avoids a permanent scope change in main.
+ cp package.json package.json.bak
+ node -e "const p=require('./package.json');p.name='@rohitg00/agentmemory';p.publishConfig={registry:'https://npm.pkg.github.com'};require('fs').writeFileSync('package.json',JSON.stringify(p,null,2));"
+ if npm view "@rohitg00/agentmemory@$VERSION" version --registry=https://npm.pkg.github.com >/dev/null 2>&1; then
+ echo "GH Packages version already published, skipping"
+ else
+ npm publish --access public || echo "GH Packages publish failed (non-fatal)"
+ fi
+ mv package.json.bak package.json
+ env:
+ NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/README.md b/README.md
index ef840011..21cd623f 100644
--- a/README.md
+++ b/README.md
@@ -34,9 +34,12 @@
<p align="center">
<a href="https://www.npmjs.com/package/@agentmemory/agentmemory"><img src="https://img.shields.io/npm/v/@agentmemory/agentmemory?color=CB3837&label=npm&style=for-the-badge&logo=npm" alt="npm version" /></a>
+ <a href="https://www.npmjs.com/package/@agentmemory/agentmemory"><img src="https://img.shields.io/npm/dm/@agentmemory/agentmemory?color=CB3837&label=downloads&style=for-the-badge&logo=npm" alt="npm downloads" /></a>
+ <a href="https://github.com/rohitg00/agentmemory/pkgs/npm/agentmemory"><img src="https://img.shields.io/badge/GitHub_Packages-mirror-181717?style=for-the-badge&logo=github&logoColor=white" alt="GitHub Packages mirror" /></a>
<a href="https://github.com/rohitg00/agentmemory/actions"><img src="https://img.shields.io/github/actions/workflow/status/rohitg00/agentmemory/ci.yml?label=tests&style=for-the-badge&logo=github" alt="CI" /></a>
<a href="https://github.com/rohitg00/agentmemory/blob/main/LICENSE"><img src="https://img.shields.io/github/license/rohitg00/agentmemory?color=blue&style=for-the-badge" alt="License" /></a>
<a href="https://github.com/rohitg00/agentmemory/stargazers"><img src="https://img.shields.io/github/stars/rohitg00/agentmemory?style=for-the-badge&color=yellow&logo=github" alt="Stars" /></a>
+ <a href="https://github.com/sponsors/rohitg00"><img src="https://img.shields.io/badge/sponsor-rohitg00-EA4AAA?style=for-the-badge&logo=githubsponsors&logoColor=white" alt="Sponsor rohitg00 on GitHub Sponsors" /></a>
</p>
<p align="center">