Skip to content

Add agentmemory MCP server and memory hooks#20

Draft
milk790-code wants to merge 13 commits into
mainfrom
claude/memory-update-QASFZ
Draft

Add agentmemory MCP server and memory hooks#20
milk790-code wants to merge 13 commits into
mainfrom
claude/memory-update-QASFZ

Conversation

@milk790-code
Copy link
Copy Markdown
Owner

Summary

  • Register the agentmemory MCP server via .mcp.json (@agentmemory/mcp, env-driven AGENTMEMORY_URL/AGENTMEMORY_SECRET/AGENTMEMORY_TOOLS).
  • Merge the full @agentmemory plugin hook set into .claude/settings.json (SessionStart, UserPromptSubmit, Pre/PostToolUse, PreCompact, Subagent lifecycle, Stop/SessionEnd, etc.).
  • Preserve this repo's existing custom session-start.sh SessionStart hook — it now runs alongside the agentmemory session-start hook.

Notes

  • This brings agent long-term memory to the repo while keeping the existing social_distributor dependency-install hook intact.

Test plan

  • .claude/settings.json and .mcp.json parse as valid JSON
  • Both SessionStart hooks fire in a fresh session
  • agentmemory MCP server connects when AGENTMEMORY_URL is reachable

https://claude.ai/code/session_01G7ZukKSNZsBGd2iCsa9vJa


Generated by Claude Code

claude and others added 3 commits May 27, 2026 06:03
Wire up the @AgentMemory plugin: register the agentmemory MCP server
via .mcp.json and merge the full memory hook set into .claude/settings.json
alongside the existing session-start.sh SessionStart hook.

https://claude.ai/code/session_01G7ZukKSNZsBGd2iCsa9vJa
- threads.py: Threads API v1.0 publisher (text/image/video, 2-step container)
- ThreadsOAuth: short->long-lived token exchange + refresh
- registry.py: register ThreadsPublisher + ThreadsOAuth
- config.py: THREADS_APP_ID / THREADS_APP_SECRET / THREADS_REDIRECT_URI
- auth/routes.py: add threads provider + _persist_accounts handler
Dockerfile packages @agentmemory/agentmemory v0.9.22 as a long-running REST
service (binds 0.0.0.0, persists ./data via volume). README.md documents the
Railway deploy, memory-data sync from the local machine, and the no-auth
security caveat that must be addressed before public exposure.

https://claude.ai/code/session_01G7ZukKSNZsBGd2iCsa9vJa
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 27, 2026

Deploying popmonster-vip with  Cloudflare Pages  Cloudflare Pages

Latest commit: dd81ad8
Status:🚫  Build failed.

View logs

claude and others added 10 commits May 28, 2026 08:04
Wire up the @AgentMemory plugin: register the agentmemory MCP server
via .mcp.json and merge the full memory hook set into .claude/settings.json
alongside the existing session-start.sh SessionStart hook.

https://claude.ai/code/session_01G7ZukKSNZsBGd2iCsa9vJa
Dockerfile packages @agentmemory/agentmemory v0.9.22 as a long-running REST
service (binds 0.0.0.0, persists ./data via volume). README.md documents the
Railway deploy, memory-data sync from the local machine, and the no-auth
security caveat that must be addressed before public exposure.

https://claude.ai/code/session_01G7ZukKSNZsBGd2iCsa9vJa
自動完成推進
指令1 API鑑權地基:
- __init__.py: hmac.compare_digest before_request 攔截 /api/*(放行 /auth/* /healthz*)
- app.js: api() 從 localStorage 讀 X-API-Key header
- index.html: 加 ⚙設定 tab,含 API key + API base 儲存輸入框
- .env.example: 加 API_KEY 欄位說明

指令2 Token到期監控+FB活性:
- models.py: 新增 TokenExpiryAlert 表(expiring_soon / needs_reauth)
- tasks.py: sweep_expiring_tokens task,7天預警 + FB /me liveness probe,upsert alert rows
- celery_app.py: 每天 08:00 UTC beat排程

指令3 變體引擎升級:
- variants.py: DEFAULT_MODEL=claude-opus-4-6,加品牌安全網(blocklist+新增數字偵測),
  few-shot(top互動率貼文),fetch_few_shot_examples() helper for Flask context

指令5 Threads就緒:
- registry.py: 修復 Platform.META_THREADS 重複 key bug(靜默覆蓋)
- .env.example: 加 THREADS_APP_ID/SECRET/REDIRECT_URI
- BROWSER_STEPS.md: 新增 Phase Th — Threads OAuth 接入步驟

指令6 多租戶評估:
- MULTITENANT_EVAL.md: 工程量數字(最小7.5天/完整14.5天)+遷移腳本+決策建議
  含:零停機遷移策略、計費掛接點、現行 user_id 隔離就可先收費的建議

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- index.html: lightweight inline script captures ?ref=XXXX into
  localStorage.pm_ref so portal signup can bind referredBy.
- agentmemory-server/proxy/: Caddy reverse proxy with Bearer-token gate,
  deployed as a separate Railway service in front of the (private)
  agentmemory service. Lets option B (public + token) co-exist with the
  default private path.
- README documents the proxy deploy.

https://claude.ai/code/session_01G7ZukKSNZsBGd2iCsa9vJa
- 黑金品牌風格 LIFF 推薦頁
- 推薦碼顯示+複製+QR Code 生成
- LINE shareTargetPicker 一鍵分享
- 統計:已推薦人數/泡泡幣/會員等級
- 里程碑進度條(目標5人解鎖獎勵)
- API 指向 pop-ecpay.milk790.workers.dev

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants