Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

build: publish codync-mem 0.1.0 to crates.io and new versions from CI

leepokai2285f0163255
diff --git a/.github/workflows/memory-crate.yml b/.github/workflows/memory-crate.yml
new file mode 100644
index 00000000..cca8ffc5
--- /dev/null
+++ b/.github/workflows/memory-crate.yml
@@ -0,0 +1,72 @@
+# Ships host/crates/memory (docs/design/bot-memory.md#packaging): mirrors it to leepokai/codync-mem, read-only, and
+# publishes a version crates.io doesn't have yet. The split is deterministic, so each push fast-forwards the mirror
+# as long as nobody commits there.
+name: codync-mem
+
+on:
+ push:
+ branches: [main]
+ paths: ["host/crates/memory/**"]
+
+concurrency:
+ group: memory-crate
+ cancel-in-progress: false
+
+jobs:
+ mirror:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Split the crate's history
+ run: git subtree split --prefix=host/crates/memory -b mirror
+ - name: Push it to the mirror
+ env:
+ # A deploy key with write access on leepokai/codync-mem.
+ KEY: ${{ secrets.CODYNC_MEM_DEPLOY_KEY }}
+ run: |
+ if [ -z "$KEY" ]; then
+ echo "::notice::CODYNC_MEM_DEPLOY_KEY isn't set, so the mirror isn't updated."
+ exit 0
+ fi
+ mkdir -p ~/.ssh
+ printf '%s\n' "$KEY" > ~/.ssh/mirror
+ chmod 600 ~/.ssh/mirror
+ GIT_SSH_COMMAND="ssh -i ~/.ssh/mirror -o StrictHostKeyChecking=accept-new" \
+ git push [email protected]:leepokai/codync-mem.git mirror:main
+
+ publish:
+ # Trusted publishing: crates.io trusts this workflow file, so no token is stored.
+ needs: mirror
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ id-token: write
+ defaults:
+ run:
+ working-directory: host
+ steps:
+ - uses: actions/checkout@v4
+ - name: Is this version on crates.io yet?
+ id: version
+ run: |
+ version=$(sed -n 's/^version = "\(.*\)"$/\1/p' crates/memory/Cargo.toml | head -n 1)
+ code=$(curl -s -o /dev/null -w '%{http_code}' -A "codync-ci (https://github.com/leepokai/Codync)" \
+ "https://crates.io/api/v1/crates/codync-mem/$version")
+ case "$code" in
+ 200) echo "::notice::codync-mem $version is already on crates.io."; echo "new=false" >> "$GITHUB_OUTPUT" ;;
+ 404) echo "new=true" >> "$GITHUB_OUTPUT" ;;
+ *) echo "::error::crates.io answered $code for codync-mem $version."; exit 1 ;;
+ esac
+ - name: Install Rust (rust-toolchain.toml)
+ if: steps.version.outputs.new == 'true'
+ run: rustup toolchain install
+ - uses: rust-lang/crates-io-auth-action@v1
+ if: steps.version.outputs.new == 'true'
+ id: auth
+ - name: Publish
+ if: steps.version.outputs.new == 'true'
+ run: cargo publish -p codync-mem --locked
+ env:
+ CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
diff --git a/.github/workflows/memory-mirror.yml b/.github/workflows/memory-mirror.yml
deleted file mode 100644
index c5990e53..00000000
--- a/.github/workflows/memory-mirror.yml
+++ /dev/null
@@ -1,36 +0,0 @@
-# Mirrors host/crates/memory to leepokai/codync-mem, read-only (docs/design/bot-memory.md#packaging). The split is
-# deterministic, so each push fast-forwards the mirror as long as nobody commits there.
-name: codync-mem mirror
-
-on:
- push:
- branches: [main]
- paths: ["host/crates/memory/**"]
-
-concurrency:
- group: memory-mirror
- cancel-in-progress: false
-
-jobs:
- mirror:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Split the crate's history
- run: git subtree split --prefix=host/crates/memory -b mirror
- - name: Push it to the mirror
- env:
- # A deploy key with write access on leepokai/codync-mem.
- KEY: ${{ secrets.CODYNC_MEM_DEPLOY_KEY }}
- run: |
- if [ -z "$KEY" ]; then
- echo "::notice::CODYNC_MEM_DEPLOY_KEY isn't set, so the mirror isn't updated."
- exit 0
- fi
- mkdir -p ~/.ssh
- printf '%s\n' "$KEY" > ~/.ssh/mirror
- chmod 600 ~/.ssh/mirror
- GIT_SSH_COMMAND="ssh -i ~/.ssh/mirror -o StrictHostKeyChecking=accept-new" \
- git push [email protected]:leepokai/codync-mem.git mirror:main
diff --git a/docs/design/bot-memory.md b/docs/design/bot-memory.md
index 737cabb9..2c459601 100644
--- a/docs/design/bot-memory.md
+++ b/docs/design/bot-memory.md
@@ -712,8 +712,10 @@ ACP status as of 2026-10:
can't link two `rusqlite` versions to `sqlite3`;
- it has its own README and LICENSE (Apache-2.0).
- The crate has its own 0.x versions, separate from Codync's.
-- Open the mirror when rollout step 1 ships (the host calls the crate), marked 0.x with an unstable API. Publish
- 0.1 to crates.io, with the proxy, only after Codync runs on it.
+- The mirror is open, marked 0.x with an unstable API, and 0.1.0 is on crates.io (2026-10-18; the core only, the
+ proxy comes later). Raising `version` in `host/crates/memory/Cargo.toml` publishes it on its next push to `main`:
+ `.github/workflows/memory-crate.yml` skips a version crates.io already has and publishes with trusted publishing
+ (crates.io trusts that workflow file, so no token is stored).
- **Flip later.** When outside users send PRs, the API stops changing with host changes for a few months, or the
proxy gains users:
- stop the sync and develop in the mirror;
@@ -889,9 +891,10 @@ Each milestone ships as its own minor release, with an e2e pass on all three app
and vectors by their triggers. The runner and its 52 cases are in `tools/memory-eval/`; the results are under
[Evaluation](#evaluation).
- **M5. The public mirror.** `leepokai/codync-mem`, synced on every release, as under [Packaging](#packaging).
- The sync (`.github/workflows/memory-mirror.yml`) pushes with the `CODYNC_MEM_DEPLOY_KEY` secret, a write deploy
- key on the mirror only; the mirror's own CI and pull-request redirect live in `host/crates/memory/.github/`.
- Opened 2026-10-18 with the 2.18.0 split, and its CI passed on Linux, macOS and Windows.
+ The sync (`.github/workflows/memory-crate.yml`) pushes with the `CODYNC_MEM_DEPLOY_KEY` secret, a write deploy
+ key on the mirror only, then publishes new versions to crates.io; the mirror's own CI and pull-request redirect
+ live in `host/crates/memory/.github/`. Opened 2026-10-18 with the 2.18.0 split, and its CI passed on Linux, macOS
+ and Windows; 0.1.0 was published by hand the same day.
## Sources
diff --git a/host/Cargo.lock b/host/Cargo.lock
index 08d3172e..b2d7694b 100644
--- a/host/Cargo.lock
+++ b/host/Cargo.lock
@@ -634,7 +634,7 @@ dependencies = [
[[package]]
name = "codync-mem"
-version = "0.0.0"
+version = "0.1.0"
dependencies = [
"rusqlite",
"serde",
diff --git a/host/crates/memory/Cargo.toml b/host/crates/memory/Cargo.toml
index 4068fdcd..1fe0dbc9 100644
--- a/host/crates/memory/Cargo.toml
+++ b/host/crates/memory/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "codync-mem"
-version = "0.0.0"
+version = "0.1.0"
edition = "2024"
rust-version = "1.88"
description = "Memory for coding-agent bots: one store, the rules for who may write it, and what each session sees"
@@ -9,8 +9,8 @@ repository = "https://github.com/leepokai/codync-mem"
readme = "README.md"
keywords = ["agent", "memory", "acp", "sqlite"]
categories = ["database"]
-# Published once Codync runs on it (0.1).
-publish = false
+# The mirror's CI, not part of the package.
+exclude = [".github"]
[dependencies]
# Callers pass their own connection, so the crate re-exports this rusqlite: one build can't link two.
diff --git a/host/crates/memory/README.md b/host/crates/memory/README.md
index e6c6e513..2348e3dd 100644
--- a/host/crates/memory/README.md
+++ b/host/crates/memory/README.md
@@ -21,6 +21,10 @@ send pull requests to [Codync's `dev` branch](https://github.com/leepokai/Codync
## Use
+```sh
+cargo add codync-mem
+```
+
```rust
use codync_mem::rusqlite::Connection;