Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
Python agent-contextagent-memoryagent-pluginsagentic-ragcontext-databasedsh-pluginknowledge-basememorymemory-managementself-evolvingvector-database
fix(docs): keep the Codex git marketplace stable across docs deploys (#5708)
t0saki78c6d8ed917a
diff --git a/.github/scripts/build-plugin-downloads.sh b/.github/scripts/build-plugin-downloads.shindex 5d198b845..21e8190a7 100755--- a/.github/scripts/build-plugin-downloads.sh+++ b/.github/scripts/build-plugin-downloads.sh@@ -37,15 +37,18 @@ bash "${SCRIPTS}/stamp-installer-version.sh" "${SHARED}/install.sh" "${VERSION}"cp "${SHARED}/bootstrap.sh" "${OUT}/memory-plugin-shared/bootstrap.sh"# The git marketplace is committed before the zips are built: zipping resets-# the staged files' times.+# the staged files' times. Like the zips, the repository keeps its bytes until+# the plugins change: a new commit and pack name on every deploy leaves the CDN+# serving refs and packs of different deploys for a while, failing git clients.SRC="${WORK}/memory-plugins-src"cp -R "${STAGE}" "${SRC}"git -C "${SRC}" init -q -b maingit -C "${SRC}" add -A-git -C "${SRC}" -c [email protected] -c user.name="OpenViking Release" \- commit -qm "plugins ${VERSION}"+GIT_AUTHOR_DATE="2000-01-01T00:00:00Z" GIT_COMMITTER_DATE="2000-01-01T00:00:00Z" \+ git -C "${SRC}" -c [email protected] -c user.name="OpenViking Release" \+ commit -qm "OpenViking memory plugins"git clone -q --bare "${SRC}" "${OUT}/plugins/memory-plugins.git"-git -C "${OUT}/plugins/memory-plugins.git" repack -adq+git -C "${OUT}/plugins/memory-plugins.git" -c pack.threads=1 repack -adqgit -C "${OUT}/plugins/memory-plugins.git" update-server-info# Static hosts serve files only; the sample hooks are of no use to a client.rm -rf "${OUT}/plugins/memory-plugins.git/hooks"diff --git a/examples/memory-plugin-shared/release-marketplace.test.mjs b/examples/memory-plugin-shared/release-marketplace.test.mjsindex 989af6a70..14f2f0b69 100644--- a/examples/memory-plugin-shared/release-marketplace.test.mjs+++ b/examples/memory-plugin-shared/release-marketplace.test.mjs@@ -541,11 +541,24 @@ test("the docs download tree holds what the installer fetches, under the addressassert.ok(existsSync(join(tmp, "clone", "codex-memory-plugin", ".codex-plugin", "plugin.json")));assert.ok(existsSync(join(out, "plugins", "memory-plugins.git", "info", "refs")), "dumb HTTP clients read info/refs");+ // Built later from the same plugins, it serves git clients the same files.const again = join(tmp, "again");- const rebuilt = run("bash", [downloadsScript, again, "https://docs.example.invalid/dl"]);+ const later = "2001-02-03T04:05:06Z";+ const rebuilt = run("bash", [downloadsScript, again, "https://docs.example.invalid/dl"], {+ env: { ...process.env, GIT_AUTHOR_DATE: later, GIT_COMMITTER_DATE: later },+ });assert.equal(rebuilt.status, 0, `${rebuilt.stdout}\n${rebuilt.stderr}`);- for (const zip of [join("plugins", "claude", zipName), join("releases", "latest", "memory-plugin-marketplace.zip")]) {- assert.equal(sha256(join(again, zip)), sha256(join(out, zip)), zip);+ const repo = join("plugins", "memory-plugins.git");+ const packs = readdirSync(join(out, repo, "objects", "pack")).map((name) => join(repo, "objects", "pack", name));+ assert.deepEqual(readdirSync(join(again, repo, "objects", "pack")).map((name) => join(repo, "objects", "pack", name)), packs);+ for (const file of [+ join("plugins", "claude", zipName),+ join("releases", "latest", "memory-plugin-marketplace.zip"),+ join(repo, "info", "refs"),+ join(repo, "objects", "info", "packs"),+ ...packs,+ ]) {+ assert.equal(sha256(join(again, file)), sha256(join(out, file)), file);}} finally {rmSync(tmp, { recursive: true, force: true });