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.

ci: ship codync-mem with each release that changes it

leepokaiae45ad629831
diff --git a/.github/workflows/memory-crate.yml b/.github/workflows/memory-crate.yml
index cca8ffc5..a48d4468 100644
--- a/.github/workflows/memory-crate.yml
+++ b/.github/workflows/memory-crate.yml
@@ -1,19 +1,45 @@
-# 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.
+# Ships host/crates/memory with each Codync release (docs/design/bot-memory.md#packaging): a pull request into main
+# that changes the crate must raise its version; the push to main mirrors it to leepokai/codync-mem, read-only, and
+# publishes that version. The split is deterministic, so each push fast-forwards the mirror as long as nobody commits
+# there.
name: codync-mem
on:
+ pull_request:
+ branches: [main]
+ paths: ["host/crates/memory/**"]
push:
branches: [main]
paths: ["host/crates/memory/**"]
concurrency:
- group: memory-crate
+ group: memory-crate-${{ github.event_name }}
cancel-in-progress: false
jobs:
+ version:
+ if: github.event_name == 'pull_request'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: A changed crate has a new version
+ env:
+ BASE: ${{ github.event.pull_request.base.sha }}
+ run: |
+ # Its .github is the mirror's CI, not part of the package.
+ if git diff --quiet "$BASE" HEAD -- host/crates/memory ':!host/crates/memory/.github'; then exit 0; fi
+ version() { sed -n 's/^version = "\(.*\)"$/\1/p' | head -n 1; }
+ before=$(git show "$BASE:host/crates/memory/Cargo.toml" | version)
+ after=$(version < host/crates/memory/Cargo.toml)
+ if [ "$before" = "$after" ]; then
+ echo "::error file=host/crates/memory/Cargo.toml::codync-mem changed but is still $after: raise its version."
+ exit 1
+ fi
+
mirror:
+ if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
diff --git a/AGENTS.md b/AGENTS.md
index 22d89940..1b571647 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -44,7 +44,7 @@ After every change, test it end to end on the real apps, not just builds and uni
- **Every source change ships as a release.** A version bump on `main` is the only release trigger (Auto Tag → desktop app for macOS, Linux and Windows, host, Homebrew, in-app update), so any change to shipped code (`apps/`, `host/`, `packaging/`) bumps the version before it reaches `main`, without being asked. Docs, `web/`, `cloud/`, `relay/` and CI-only changes don't bump.
- Phone ↔ host compatibility: each side names the oldest version of the other it works with (`minApp` in the host's `hello`, `minHost` in each client). Additive changes need nothing; a rename/removal raises `minApp` in the same release, and hosts hold that release until the App Store has the iPhone app: [docs/reference/compatibility.md](docs/reference/compatibility.md)
-- Pick the bump yourself: patch for fixes and small tweaks, minor for new features or protocol additions. Never bump major (stay on 2.x). One bump per merge into `main`: if `MARKETING_VERSION` is already ahead of the latest `v*` tag, leave it.
+- Pick the bump yourself: patch for fixes and small tweaks, minor for new features or protocol additions. Never bump major (stay on 2.x). One bump per merge into `main`: if `MARKETING_VERSION` is already ahead of the latest `v*` tag, leave it. A change to `host/crates/memory` also raises `codync-mem`'s own 0.x version once per release (leave it if it's already ahead of `main`'s); CI blocks a PR into `main` that forgets, and the merge publishes it to crates.io ([codync-mem releases](docs/guides/development.md#codync-mem-releases)).
- How: set `MARKETING_VERSION` in `apps/project.yml` and `version` in `host/Cargo.toml` (+ its `Cargo.lock` entry) and `apps/desktop/package.json` (+ `package-lock.json`) to the same value, run `xcodegen generate --spec apps/project.yml`, commit as `build: bump version to X.Y.Z`. Never touch `CURRENT_PROJECT_VERSION` (Xcode Cloud sets the iOS build number). When the iOS app changes, also write that version's section in `apps/ios/WhatsNew.md` (zh-Hant + en-US, what iPhone users notice); it becomes the App Store "What's New".
## Coding Style & Naming Conventions
diff --git a/CLAUDE.md b/CLAUDE.md
index 38565108..aab3a6bb 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -78,7 +78,7 @@ After every change, test it end to end on the real apps, not just builds and uni
- Phone ↔ host compatibility: each side names the oldest version of the other it works with (`minApp` in the host's `hello`, `minHost` in each client). Additive changes need nothing; a rename/removal raises `minApp` in the same release, and hosts hold that release until the App Store has the iPhone app: [docs/reference/compatibility.md](docs/reference/compatibility.md)
- **Every source change ships as a release.** A version bump on `main` is the only release trigger (Auto Tag → desktop app for macOS, Linux and Windows, host, Homebrew, in-app update), so any change to shipped code (`apps/`, `host/`, `packaging/`) bumps the version before it reaches `main`, without being asked. Docs, `web/`, `cloud/`, `relay/` and CI-only changes don't bump.
-- Pick the bump yourself: patch for fixes and small tweaks, minor for new features or protocol additions. Never bump major (stay on 2.x). One bump per merge into `main`: if `MARKETING_VERSION` is already ahead of the latest `v*` tag, leave it.
+- Pick the bump yourself: patch for fixes and small tweaks, minor for new features or protocol additions. Never bump major (stay on 2.x). One bump per merge into `main`: if `MARKETING_VERSION` is already ahead of the latest `v*` tag, leave it. A change to `host/crates/memory` also raises `codync-mem`'s own 0.x version once per release (leave it if it's already ahead of `main`'s); CI blocks a PR into `main` that forgets, and the merge publishes it to crates.io ([codync-mem releases](docs/guides/development.md#codync-mem-releases)).
- How: set `MARKETING_VERSION` in `apps/project.yml` and `version` in `host/Cargo.toml` (+ its `Cargo.lock` entry) and `apps/desktop/package.json` (+ `package-lock.json`) to the same value, run `xcodegen generate --spec apps/project.yml`, commit as `build: bump version to X.Y.Z`. Never touch `CURRENT_PROJECT_VERSION` (Xcode Cloud sets the iOS build number). When the iOS app changes, also write that version's section in `apps/ios/WhatsNew.md` (zh-Hant + en-US, what iPhone users notice); it becomes the App Store "What's New".
## Layout & naming
diff --git a/docs/design/bot-memory.md b/docs/design/bot-memory.md
index 2c459601..4ea194dd 100644
--- a/docs/design/bot-memory.md
+++ b/docs/design/bot-memory.md
@@ -713,9 +713,9 @@ ACP status as of 2026-10:
- it has its own README and LICENSE (Apache-2.0).
- The crate has its own 0.x versions, separate from Codync's.
- 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).
+ proxy comes later). It ships with the Codync release that changes it: a pull request into `main` that changes
+ the crate must raise its `version`, and the push to `main` publishes it with trusted publishing
+ ([codync-mem releases](../guides/development.md#codync-mem-releases)).
- **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;
diff --git a/docs/guides/development.md b/docs/guides/development.md
index 102f94ba..81401dfd 100644
--- a/docs/guides/development.md
+++ b/docs/guides/development.md
@@ -115,6 +115,15 @@ Versions are defined in `apps/project.yml` (`MARKETING_VERSION`), `host/Cargo.to
Auto Tag (`.github/workflows/auto-tag.yml`) creates each `v*` release right after pushing the tag, before the host and desktop jobs upload to it. Its description comes from `tools/release-notes.sh`: the `## Summary` of the PR that merged the version bump into `main` (or the PR's opening text without that heading), else the `feat`/`fix` commits since the previous tag, followed by GitHub's generated PR list and compare link. Write the release PR's Summary for people reading the release page. The same description is posted to the Discord server's #releases channel through the webhook in the `DISCORD_RELEASES_WEBHOOK` secret (a failed post only leaves a warning on the run); each `@login` there whose GitHub account is linked on the Discord Worker becomes a mention that pings them (`DISCORD_MENTIONS_SECRET`, [discord/README.md](../../discord/README.md)).
+## codync-mem releases
+
+The memory crate (`host/crates/memory`) has its own 0.x version and ships with the Codync release that carries its changes, through `.github/workflows/memory-crate.yml`:
+
+- A pull request into `main` that changes the crate (its `.github`, the mirror's CI, aside) fails unless the crate's `version` differs from `main`'s.
+- The push to `main` mirrors the crate to [leepokai/codync-mem](https://github.com/leepokai/codync-mem) (write deploy key in the `CODYNC_MEM_DEPLOY_KEY` secret), then publishes its version to crates.io unless crates.io already has it. Publishing uses trusted publishing: the crate's Settings → Trusted Publishing on crates.io trusts `leepokai/Codync` with the workflow `memory-crate.yml`, so no token is stored.
+
+To bump, set `version` in `host/crates/memory/Cargo.toml` (patch for fixes, minor for API changes while 0.x) and run `cargo check -p codync-mem` in `host/` to update its `Cargo.lock` entry. A published version can't be deleted, only yanked.
+
## iOS releases (Xcode Cloud)
The Xcode Cloud workflow "Release" on the product "iOS" has no automatic start condition (its own tag trigger never fired); it only runs when started through the API, and it archives the `iOS` scheme in Release with deployment preparation **TestFlight and App Store** (the "Internal Testing Only" option produces builds App Review can't take) and uploads it to App Store Connect. Xcode Cloud overrides the build number with its own counter (`CI_BUILD_NUMBER`, configured under Xcode Cloud settings → Build Number in App Store Connect), so `CURRENT_PROJECT_VERSION` in `project.yml` is only the local default. The checked-in `apps/Codync.xcodeproj` is what the cloud builds: regenerate it whenever `project.yml` changes, and commit `apps/Codync.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved` whenever a package version changes (Xcode Cloud never resolves packages itself; copy `apps/ios/Kit/Package.resolved` there if Xcode wrote it to `apps/ios/Kit/`). Xcode Cloud reads public package repositories without any connection. The `Submit iOS` GitHub workflow (`.github/workflows/ios-submit.yml` → `tools/asc-submit.py`, secrets `ASC_KEY_ID`, `ASC_ISSUER_ID`, `ASC_PRIVATE_KEY`) runs on every `v*` tag (the tags Auto Tag pushes after a version bump on `main`). It compares the tag with the last version sent to the App Store: when nothing the iPhone app is built from changed (`apps/ios/` including `apps/ios/Kit/`, `apps/shared/`, the package pins, or `apps/project.yml` beyond its version lines), iOS skips that release, so host- or desktop-only releases neither build nor touch a version in review. Otherwise it starts the Xcode Cloud archive on the tag, waits for that build to finish processing and submits it for App Review, released automatically after approval. The latest version wins: a version still *Waiting for Review* is pulled back, renamed and resubmitted with the new build; one already *In Review* or approved is left alone (rerun the workflow with the version once it is out). *What's New* comes from the version's `## <version>` section in `apps/ios/WhatsNew.md` (one `### <locale>` per App Store language, written in the version bump); without one, the `### zh-Hant` / `### en-US` bullets under `## What's New` in the PR template are collected from every PR merged since the last App Store version (changes pushed to `main` without a PR add nothing); with neither, empty fields get a generic "Bug fixes and improvements" line. Running `Submit iOS` by hand with a version ships it even without iPhone changes. `python3 tools/asc-submit-test.py` checks the PR parsing and the change detection. `DRY_RUN=1 tools/asc-submit.py <version>` prints the writes without making them.