#1 Persistent memory for AI coding agents based on real-world benchmarks
TypeScript agentmemoryagentsaiclaudeclaudecodecodexcopilotcursorgenaiharnesshermesmemoryompopenclawopencodepi
feat(codex): package a skills-only plugin for the public directory (#1482)
Rohit Ghumare007a1a7fe864
diff --git a/docs/plugins/codex-local.md b/docs/plugins/codex-local.mdindex c4c80660..d8d88657 100644--- a/docs/plugins/codex-local.md+++ b/docs/plugins/codex-local.md@@ -156,12 +156,16 @@ metadata is a retrieval aid, not an account or tenant authorization boundary.## Public directory submission-The generated `agentmemory-codex-review` ZIP has MCP and skills but no lifecycle-hooks. It is a preparation artifact, not a submission-ready claim. OpenAI's-standard public flow currently expects a production HTTPS MCP server. Its guide-directs authors who need local MCP to contact OpenAI for support. Confirm local-stdio eligibility and the supported test environment before submitting this-archive. Removing hooks does not remove that requirement.+`npm run plugin:pack:codex` writes three archives. `agentmemory-codex-skills`+carries the 17 skills and nothing else, which is what the directory's skills-only+upload path accepts; its README tells users to run `agentmemory connect codex`+so the skills find the memory tools. `agentmemory-codex-review` keeps MCP and+skills but no lifecycle hooks. It is a preparation artifact, not a+submission-ready claim. OpenAI's standard public flow currently expects a+production HTTPS MCP server. Its guide directs authors who need local MCP to+contact OpenAI for support. Confirm local stdio eligibility and the supported+test environment before submitting that archive. Removing hooks does not remove+that requirement.Once eligibility is confirmed: select a verified developer identity in the[plugin dashboard](https://platform.openai.com/plugins), upload the complete MCPdiff --git a/plugin/.codex-plugin/plugin.json b/plugin/.codex-plugin/plugin.jsonindex b79927a6..f06523f6 100644--- a/plugin/.codex-plugin/plugin.json+++ b/plugin/.codex-plugin/plugin.json@@ -15,9 +15,10 @@"interface": {"displayName": "Agent Memory","shortDescription": "Memory across coding sessions",- "longDescription": "Recall past decisions, resume work, save useful context, and learn from corrections across Codex and Claude Code using one local Agent Memory daemon. Includes search, session history, lessons, graph queries, memory maintenance, export, and deletion workflows. Requires Node.js 20+ and a running Agent Memory daemon. Basic keyword recall needs no model key. Embeddings and model-based features require configuration; external providers may receive selected data when enabled. Automatic capture requires trusted, supported hooks. Designed for local Codex sessions.",+ "longDescription": "Recall past decisions, resume work, save useful context, and learn from corrections across your coding sessions using one local Agent Memory daemon. Includes search, session history, lessons, graph queries, memory maintenance, export, and deletion workflows. Requires Node.js 20+ and a running Agent Memory daemon. Basic keyword recall needs no model key. Embeddings and model-based features require configuration; external providers may receive selected data when enabled. Automatic capture requires trusted, supported hooks. Designed for local Codex sessions.","developerName": "Rohit Ghumare",- "websiteURL": "https://github.com/rohitg00/agentmemory",+ "websiteURL": "https://www.agent-memory.dev",+ "privacyPolicyURL": "https://www.agent-memory.dev/privacy","supportURL": "https://github.com/rohitg00/agentmemory/issues","category": "Developer Tools","capabilities": ["Local persistent memory", "Session handoff", "Lessons and recall", "Memory management"],diff --git a/scripts/plugins/package-codex.mjs b/scripts/plugins/package-codex.mjsindex 7919833c..87fa9aa1 100644--- a/scripts/plugins/package-codex.mjs+++ b/scripts/plugins/package-codex.mjs@@ -12,35 +12,69 @@ const sourceManifest = JSON.parse(readFileSync(join(plugin, ".codex-plugin/plugiif (sourceManifest.version !== pkg.version) throw new Error("Plugin and runtime versions must match before packaging.");if (!existsSync(join(plugin, "scripts/plugin-bridge.mjs"))) throw new Error("Run npm run build first.");+const FLAVORS = {+ local: { mcp: true, hooks: true },+ review: { mcp: true, hooks: false },+ skills: { mcp: false, hooks: false },+};++const SKILLS_README = `# Agent Memory skills for Codex++This package carries the 17 Agent Memory skills and no MCP server or lifecycle hooks, so it passes the public directory's skills-only upload path.++The skills call the \`memory_*\` tools of a running Agent Memory daemon. Install and wire it once:++\`\`\`bash+npm install -g @agentmemory/agentmemory+agentmemory+agentmemory connect codex+\`\`\`++\`connect codex\` registers the local MCP server in \`~/.codex/config.toml\`. Add \`--with-hooks\` for automatic capture (trust the hooks in Codex before expecting events). Basic keyword recall needs no model key; embeddings and model-based features are configured in \`~/.agentmemory/.env\`.++Source and documentation: https://github.com/rohitg00/agentmemory+`;+mkdirSync(output, { recursive: true });const artifacts = [];-for (const flavor of ["local", "review"]) {+for (const [flavor, { mcp, hooks }] of Object.entries(FLAVORS)) {const name = `agentmemory-codex-${flavor}`;const destination = join(output, name);rmSync(destination, { recursive: true, force: true });mkdirSync(join(destination, ".codex-plugin"), { recursive: true });- mkdirSync(join(destination, "scripts"));const manifest = structuredClone(sourceManifest);- manifest.mcpServers = "./.mcp.json";- if (flavor === "review") {+ if (!hooks) {delete manifest.hooks;manifest.description = manifest.description.replace(/ Optional capture through .*$/, "");- manifest.interface.longDescription = manifest.interface.longDescription.replace("Automatic capture requires trusted, supported hooks.", "This review package contains no lifecycle hooks; capture must be configured separately.");+ }+ if (mcp) {+ manifest.mcpServers = "./.mcp.json";+ if (!hooks) {+ manifest.interface.longDescription = manifest.interface.longDescription.replace("Automatic capture requires trusted, supported hooks.", "This review package contains no lifecycle hooks; capture must be configured separately.");+ }+ mkdirSync(join(destination, "scripts"));+ cpSync(join(plugin, ".mcp.codex.json"), join(destination, ".mcp.json"));+ cpSync(join(plugin, "scripts/plugin-bridge.mjs"), join(destination, "scripts/plugin-bridge.mjs"));+ cpSync(join(root, "docs/plugins/codex-local.md"), join(destination, "README.md"));+ } else {+ delete manifest.mcpServers;+ manifest.description = manifest.description.replace("through 54 MCP tools and 17 skills.", "through 17 skills that use the MCP tools of your own Agent Memory daemon.");+ manifest.interface.longDescription = manifest.interface.longDescription.replace("Automatic capture requires trusted, supported hooks.", "This package contains the skills only. Install the Agent Memory daemon and wire its MCP server with `agentmemory connect codex` so the skills can call the memory tools.");+ writeFileSync(join(destination, "README.md"), SKILLS_README);}writeFileSync(join(destination, ".codex-plugin/plugin.json"), JSON.stringify(manifest, null, 2) + "\n");- cpSync(join(plugin, ".mcp.codex.json"), join(destination, ".mcp.json"));- cpSync(join(plugin, "scripts/plugin-bridge.mjs"), join(destination, "scripts/plugin-bridge.mjs"));for (const directory of ["skills", "assets"]) {cpSync(join(plugin, directory), join(destination, directory), { recursive: true });}+ const agentsSkill = join(destination, "skills/agentmemory-agents/SKILL.md");+ writeFileSync(agentsSkill, readFileSync(agentsSkill, "utf8").replace("If unknown, default to `claude-code`.", "If unknown, default to `codex`."));cpSync(join(root, "LICENSE"), join(destination, "LICENSE"));- cpSync(join(root, "docs/plugins/codex-local.md"), join(destination, "README.md"));- if (flavor === "local") {+ if (hooks) {mkdirSync(join(destination, "hooks"));cpSync(join(plugin, "hooks/hooks.codex.json"), join(destination, "hooks/hooks.codex.json"));- const hooks = readFileSync(join(plugin, "hooks/hooks.codex.json"), "utf8");+ const hookManifest = readFileSync(join(plugin, "hooks/hooks.codex.json"), "utf8");cpSync(join(plugin, "scripts/_capture.mjs"), join(destination, "scripts/_capture.mjs"));- for (const script of new Set([...hooks.matchAll(/scripts\/([\w-]+\.mjs)/g)].map((m) => m[1]))) {+ for (const script of new Set([...hookManifest.matchAll(/scripts\/([\w-]+\.mjs)/g)].map((m) => m[1]))) {cpSync(join(plugin, "scripts", script), join(destination, "scripts", script));}}@@ -60,5 +94,5 @@ writeFileSync(join(output, ".agents/plugins/marketplace.json"), JSON.stringify({plugins: [{ name: "agentmemory", source: { source: "local", path: "./agentmemory-codex-local" },policy: { installation: "AVAILABLE", authentication: "ON_INSTALL" }, category: "Developer Tools" }],}, null, 2) + "\n");-console.log(`Built ${artifacts.map((a) => a.archive).join(" and ")} in ${output}`);-console.log("The review archive excludes hooks but still uses local stdio MCP. Public submission requires OpenAI local-MCP eligibility confirmation.");+console.log(`Built ${artifacts.map((a) => a.archive).join(", ")} in ${output}`);+console.log("The review archive excludes hooks but still uses local stdio MCP, which the public directory accepts only with OpenAI local-MCP support. The skills archive has no MCP server or hooks and fits the skills-only upload path.");diff --git a/test/codex-local-package.test.ts b/test/codex-local-package.test.tsindex 10ac2328..240b9ed5 100644--- a/test/codex-local-package.test.ts+++ b/test/codex-local-package.test.ts@@ -259,6 +259,24 @@ describe("Codex release packaging", () => {expect(manifest.hooks).toBeUndefined();expect(manifest.mcpServers).toBe("./.mcp.json");});++ it("builds a skills-only ZIP with no MCP server, hooks, or scripts for the directory's skills path", () => {+ const version = JSON.parse(readFileSync(join(root, "package.json"), "utf8")).version;+ const archive = join(root, `dist/plugins/agentmemory-codex-skills-${version}.zip`);+ const listing = execFileSync("unzip", ["-Z1", archive], { encoding: "utf8" });+ expect(listing).not.toContain(".mcp.json");+ expect(listing).not.toMatch(/^(hooks|scripts)\//m);+ expect(listing).toContain("skills/agentmemory-config/SKILL.md");+ expect(listing).toContain("README.md");+ const manifest = JSON.parse(execFileSync("unzip", ["-p", archive, ".codex-plugin/plugin.json"], { encoding: "utf8" }));+ expect(manifest.mcpServers).toBeUndefined();+ expect(manifest.hooks).toBeUndefined();+ expect(manifest.author.name).toBe(manifest.interface.developerName);+ expect(manifest.interface.longDescription).toContain("agentmemory connect codex");+ const agents = execFileSync("unzip", ["-p", archive, "skills/agentmemory-agents/SKILL.md"], { encoding: "utf8" });+ expect(agents).toContain("default to `codex`");+ expect(agents).not.toContain("default to `claude-code`");+ });});describe("authenticated bridge URL policy", () => {