fix(zapier): address review feedback (masked key, ES imports) + test hygiene

- authentication: API key field is now type 'password' so Zapier masks it in
  the connection UI instead of showing it in cleartext.
- index: use ES imports for the platform version and package version instead of
  require(), matching the repo's TypeScript rule. dist stays flat; both versions
  resolve at runtime.
- AGENTS.md: add the Key Directories row for integrations/zapier-mem0.
- tests: disable telemetry during test runs so CI never fires real PostHog
  events, which also removes a lingering open handle after the suite.

Verified: build + zapier validate (0 failures) + 16 tests (13 unit, 3 live E2E).
This commit is contained in:
Himanshu-Sangshetti
2026-07-23 18:33:11 +05:30
parent 1bd9910382
commit de39f294dd
5 changed files with 10 additions and 6 deletions
+1
View File
@@ -27,6 +27,7 @@ This is a **polyglot monorepo** containing Python and TypeScript packages, CLIs,
| `integrations/openclaw/` | `@mem0/openclaw-mem0` — OpenClaw plugin for Claude Code / AI editors |
| `integrations/pi-agent-plugin/` | `@mem0/pi-agent-plugin` — Pi Agent plugin |
| `integrations/vercel-ai-sdk/` | `@mem0/vercel-ai-provider` — Vercel AI SDK memory provider |
| `integrations/zapier-mem0/` | `zapier-mem0` — Zapier Platform CLI app (deploys to Zapier, not npm); add / search / get / delete memories |
| `server/` | FastAPI REST server for self-hosted Mem0 (Docker: FastAPI + PostgreSQL/pgvector + Neo4j) |
| `openmemory/` | Self-hosted memory platform — `api/` (FastAPI + Alembic + MCP server) and `ui/` (Next.js 15 + React 19) |
| `skills/` | Claude Code skill definitions. Reference skills (SDK knowledge, always-on): `mem0/`, `mem0-cli/`, `mem0-vercel-ai-sdk/`. Pipeline skills (run on demand): `mem0-integrate/`, `mem0-test-integration/`, `mem0-oss-to-platform/` |
+1
View File
@@ -36,6 +36,7 @@
"jest": {
"testEnvironment": "node",
"testMatch": ["**/test/**/*.test.ts"],
"setupFiles": ["<rootDir>/test/setup.ts"],
"transform": {
"^.+\\.tsx?$": ["ts-jest", {}]
}
@@ -11,7 +11,8 @@ export default {
{
key: 'apiKey',
label: 'Mem0 API Key',
type: 'string',
// `password` so Zapier masks the key in the connection UI (it is a secret).
type: 'password',
required: true,
helpText:
'Your Mem0 API key (starts with `m0-`). Create one at [app.mem0.ai](https://app.mem0.ai) → Settings → API Keys.',
+3 -5
View File
@@ -1,16 +1,14 @@
import { version as platformVersion } from 'zapier-platform-core';
import authentication from './authentication';
import { includeApiKey, handleBadResponses } from './middleware';
import addMemory from './creates/add_memory';
import deleteMemory from './creates/delete_memory';
import searchMemories from './searches/search_memories';
import getMemories from './searches/get_memories';
// Read version at runtime from the package manifest (one directory up from dist/).
const { version } = require('../package.json');
const platformVersion = require('zapier-platform-core').version;
import pkg from '../package.json';
const app = {
version,
version: pkg.version,
platformVersion,
authentication,
+3
View File
@@ -0,0 +1,3 @@
// Disable telemetry during tests so runs never fire real PostHog events
// (and so the fire-and-forget fetch cannot leave an open handle after tests).
process.env.MEM0_TELEMETRY = 'false';