From c3d59b9efacf8e9ad0b3cc52c777253e14b2531a Mon Sep 17 00:00:00 2001 From: SPeak Date: Tue, 12 May 2026 07:17:03 +0800 Subject: [PATCH 01/15] ci: bump mcpp to 0.0.8 (namespace-aware index support) (#15) --- .github/workflows/ci.yml | 10 +++++----- .xlings.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34164ac..fe83a1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - name: Install xlings env: - XLINGS_VERSION: 0.4.25 + XLINGS_VERSION: 0.4.30 run: | tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz" curl -fsSL -o "/tmp/${tarball}" \ @@ -23,17 +23,17 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.7) + - name: Install workspace tools (.xlings.json → mcpp 0.0.8) run: xlings install -y # Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils + # glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by - # mcpp 0.0.7, so a fixed key suffices. + # mcpp 0.0.8, so a fixed key suffices. - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.7/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.7 + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.8/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.8 - name: Build with mcpp run: mcpp build diff --git a/.xlings.json b/.xlings.json index 3f993c1..ad3e668 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.7" } + "mcpp": { "linux": "0.0.8" } } } From 1b6dc6657afbb5e28e9bb3ce06f631bdc81c7bf9 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 18:33:38 +0800 Subject: [PATCH 02/15] chore: bump mcpp to 0.0.11 + add mcpp usage to README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .xlings.json: mcpp 0.0.8 → 0.0.11 - CI: mcpp 0.0.11 - README: add mcpp build/usage section --- .github/workflows/ci.yml | 8 ++++---- .xlings.json | 2 +- README.md | 28 ++++++++++++++++++++++++++++ 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fe83a1f..e02585e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,17 +23,17 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.8) + - name: Install workspace tools (.xlings.json → mcpp 0.0.11) run: xlings install -y # Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils + # glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by - # mcpp 0.0.8, so a fixed key suffices. + # mcpp 0.0.11, so a fixed key suffices. - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.8/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.8 + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11 - name: Build with mcpp run: mcpp build diff --git a/.xlings.json b/.xlings.json index ad3e668..e986e06 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.8" } + "mcpp": { "linux": "0.0.11" } } } diff --git a/README.md b/README.md index 73163ac..5be4e2a 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,34 @@ target("demo") See [docs/en/getting-started.md](docs/en/getting-started.md), [docs/en/providers.md](docs/en/providers.md), and [docs/en/README.md](docs/en/README.md) for more setup and readiness detail. +## 使用 mcpp 构建 + +### 添加依赖 + +```bash +mcpp add llmapi@0.2.5 +``` + +或在 `mcpp.toml` 中手动添加: + +```toml +[dependencies] +llmapi = "0.2.5" +``` + +### 构建 + +```bash +mcpp build +``` + +### 代码示例 + +```cpp +import mcpplibs.llmapi; +// ... usage example +``` + ## License Apache-2.0 - see [LICENSE](LICENSE) From 13efeff499ba70e3e12d1be4afd436aa4b15e750 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 18:46:04 +0800 Subject: [PATCH 03/15] fix: use legacy dotted dep form for xlings compat --- mcpp.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mcpp.toml b/mcpp.toml index e8ea628..00be29a 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -12,5 +12,5 @@ include_dirs = ["src/json"] [targets.llmapi] kind = "lib" -[dependencies.mcpplibs] -tinyhttps = "0.2.2" +[dependencies] +"mcpplibs.tinyhttps" = "0.2.2" From affa09d218674e9101afeb55fce1438d741fc612 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 18:52:52 +0800 Subject: [PATCH 04/15] ci: bust sandbox cache (stale index) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e02585e..015493b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: uses: actions/cache@v4 with: path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11 + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v2 - name: Build with mcpp run: mcpp build From 35b8cec5bec0cd7a8f3e00c45f08cdf294be28d4 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:22:48 +0800 Subject: [PATCH 05/15] ci: add mcpp index update before build (ensure fresh index) --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 015493b..97f3971 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,5 +35,8 @@ jobs: path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v2 + - name: Update package index + run: mcpp index update + - name: Build with mcpp run: mcpp build From cd21bfcbf6a663cfbb48babdc779ba471d88407b Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:28:30 +0800 Subject: [PATCH 06/15] ci: add debug to trace install path --- .github/workflows/ci.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97f3971..753a965 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,5 +38,13 @@ jobs: - name: Update package index run: mcpp index update + - name: Debug mcpp env + run: | + mcpp self env + echo "--- xpkgs directory ---" + find $(mcpp self env 2>&1 | grep MCPP_HOME | awk -F'= ' '{print $2}')/registry/data/xpkgs -maxdepth 2 -type d 2>/dev/null || echo "no xpkgs dir" + echo "--- xlings global data ---" + ls ~/.xlings/data/xpkgs/ 2>/dev/null | head -20 || echo "no global xpkgs" + - name: Build with mcpp run: mcpp build From cd889906176921490b856a4577b565546ab6e543 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:30:53 +0800 Subject: [PATCH 07/15] fix: use bare name for tinyhttps dep (default ns is mcpplibs) --- .github/workflows/ci.yml | 8 -------- mcpp.toml | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 753a965..97f3971 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,13 +38,5 @@ jobs: - name: Update package index run: mcpp index update - - name: Debug mcpp env - run: | - mcpp self env - echo "--- xpkgs directory ---" - find $(mcpp self env 2>&1 | grep MCPP_HOME | awk -F'= ' '{print $2}')/registry/data/xpkgs -maxdepth 2 -type d 2>/dev/null || echo "no xpkgs dir" - echo "--- xlings global data ---" - ls ~/.xlings/data/xpkgs/ 2>/dev/null | head -20 || echo "no global xpkgs" - - name: Build with mcpp run: mcpp build diff --git a/mcpp.toml b/mcpp.toml index 00be29a..e193ade 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -13,4 +13,4 @@ include_dirs = ["src/json"] kind = "lib" [dependencies] -"mcpplibs.tinyhttps" = "0.2.2" +tinyhttps = "0.2.2" From b3db46090c55f3959bd7ff863249933688bac582 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:34:33 +0800 Subject: [PATCH 08/15] fix: use qualified dep name for xlings index lookup --- mcpp.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcpp.toml b/mcpp.toml index e193ade..00be29a 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -13,4 +13,4 @@ include_dirs = ["src/json"] kind = "lib" [dependencies] -tinyhttps = "0.2.2" +"mcpplibs.tinyhttps" = "0.2.2" From 17df7964694423768f547cf3eb1dd31c8747d3eb Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:35:02 +0800 Subject: [PATCH 09/15] ci: debug install path on failure --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97f3971..51bf821 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,4 +39,13 @@ jobs: run: mcpp index update - name: Build with mcpp - run: mcpp build + run: | + mcpp build 2>&1 || { + echo "=== MCPP ENV ===" + mcpp self env 2>&1 || true + echo "=== XPKGS DIR ===" + MCPP_HOME_DIR=$(mcpp self env 2>&1 | grep 'MCPP_HOME' | head -1 | sed 's/.*= *//') + find "$MCPP_HOME_DIR" -path "*/xpkgs/*tinyhttps*" -maxdepth 5 2>/dev/null || echo "not found in MCPP_HOME" + find ~/.xlings -path "*/xpkgs/*tinyhttps*" -maxdepth 5 2>/dev/null || echo "not found in ~/.xlings" + exit 1 + } From beb040e0e890b6b29d1144110ec2de5699e3a2e5 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:47:40 +0800 Subject: [PATCH 10/15] chore: bump mcpp to 0.0.12 + fix dependency syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .xlings.json: mcpp 0.0.11 → 0.0.12 (install_dir_candidates fix) - mcpp.toml: use bare name `tinyhttps` (default ns is mcpplibs) - CI: clean up debug steps, update cache key to 0.0.12 --- .github/workflows/ci.yml | 20 ++++---------------- .xlings.json | 2 +- mcpp.toml | 2 +- 3 files changed, 6 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 51bf821..a4f0ad0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,29 +23,17 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.11) + - name: Install workspace tools (.xlings.json → mcpp 0.0.12) run: xlings install -y - # Cache mcpp's self-bootstrapped sandbox (musl-gcc + binutils + - # glibc + ninja + patchelf, ~800 MB). Toolchain set is pinned by - # mcpp 0.0.11, so a fixed key suffices. - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v2 + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.12/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.12 - name: Update package index run: mcpp index update - name: Build with mcpp - run: | - mcpp build 2>&1 || { - echo "=== MCPP ENV ===" - mcpp self env 2>&1 || true - echo "=== XPKGS DIR ===" - MCPP_HOME_DIR=$(mcpp self env 2>&1 | grep 'MCPP_HOME' | head -1 | sed 's/.*= *//') - find "$MCPP_HOME_DIR" -path "*/xpkgs/*tinyhttps*" -maxdepth 5 2>/dev/null || echo "not found in MCPP_HOME" - find ~/.xlings -path "*/xpkgs/*tinyhttps*" -maxdepth 5 2>/dev/null || echo "not found in ~/.xlings" - exit 1 - } + run: mcpp build diff --git a/.xlings.json b/.xlings.json index e986e06..140590c 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.11" } + "mcpp": { "linux": "0.0.12" } } } diff --git a/mcpp.toml b/mcpp.toml index 00be29a..e193ade 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -13,4 +13,4 @@ include_dirs = ["src/json"] kind = "lib" [dependencies] -"mcpplibs.tinyhttps" = "0.2.2" +tinyhttps = "0.2.2" From 4b2a87cb2b73d5a65c80ad6abd805b1aeae4cb09 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:51:30 +0800 Subject: [PATCH 11/15] chore: revert to mcpp 0.0.11 (0.0.12 not yet in xlings index) --- .github/workflows/ci.yml | 6 +++--- .xlings.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4f0ad0..4a4e2e7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,14 +23,14 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.12) + - name: Install workspace tools (.xlings.json → mcpp 0.0.11) run: xlings install -y - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.12/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.12 + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v3 - name: Update package index run: mcpp index update diff --git a/.xlings.json b/.xlings.json index 140590c..e986e06 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.12" } + "mcpp": { "linux": "0.0.11" } } } From f7a23999055e566b39421f7bd80cbe8427405f3f Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 12 May 2026 21:54:21 +0800 Subject: [PATCH 12/15] fix: use qualified name for tinyhttps dep (xlings index lookup) --- mcpp.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcpp.toml b/mcpp.toml index e193ade..00be29a 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -13,4 +13,4 @@ include_dirs = ["src/json"] kind = "lib" [dependencies] -tinyhttps = "0.2.2" +"mcpplibs.tinyhttps" = "0.2.2" From b99a56f14adeab828d1de5be9721707cda922ee4 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Wed, 13 May 2026 02:47:03 +0800 Subject: [PATCH 13/15] =?UTF-8?q?chore:=20bump=20mcpp=200.0.11=20=E2=86=92?= =?UTF-8?q?=200.0.13,=20xlings=200.4.30=20=E2=86=92=200.4.31?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - .xlings.json: mcpp 0.0.11 → 0.0.13 - CI: xlings 0.4.30 → 0.4.31, update cache key, remove manual `mcpp index update` step (0.0.13 has auto-refresh) - mcpp.toml: migrate dep from legacy quoted form to canonical namespace subtable syntax --- .github/workflows/ci.yml | 11 ++++------- .xlings.json | 2 +- mcpp.toml | 4 ++-- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a4e2e7..be66138 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: - name: Install xlings env: - XLINGS_VERSION: 0.4.30 + XLINGS_VERSION: 0.4.31 run: | tarball="xlings-${XLINGS_VERSION}-linux-x86_64.tar.gz" curl -fsSL -o "/tmp/${tarball}" \ @@ -23,17 +23,14 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" - - name: Install workspace tools (.xlings.json → mcpp 0.0.11) + - name: Install workspace tools (.xlings.json → mcpp 0.0.13) run: xlings install -y - name: Cache mcpp sandbox uses: actions/cache@v4 with: - path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.11/registry - key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.11-v3 - - - name: Update package index - run: mcpp index update + path: ~/.xlings/data/xpkgs/xim-x-mcpp/0.0.13/registry + key: mcpp-sandbox-${{ runner.os }}-mcpp0.0.13 - name: Build with mcpp run: mcpp build diff --git a/.xlings.json b/.xlings.json index e986e06..62fdda3 100644 --- a/.xlings.json +++ b/.xlings.json @@ -1,5 +1,5 @@ { "workspace": { - "mcpp": { "linux": "0.0.11" } + "mcpp": { "linux": "0.0.13" } } } diff --git a/mcpp.toml b/mcpp.toml index 00be29a..e8ea628 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -12,5 +12,5 @@ include_dirs = ["src/json"] [targets.llmapi] kind = "lib" -[dependencies] -"mcpplibs.tinyhttps" = "0.2.2" +[dependencies.mcpplibs] +tinyhttps = "0.2.2" From b92598d1eb574e1c2c8b41a42327ed5d6c7e076f Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Wed, 13 May 2026 02:49:22 +0800 Subject: [PATCH 14/15] ci: add xlings update before install (ensure index is cloned) --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be66138..d492352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,9 @@ jobs: "/tmp/xlings-${XLINGS_VERSION}-linux-x86_64/subos/default/bin/xlings" self install echo "$HOME/.xlings/subos/current/bin" >> "$GITHUB_PATH" + - name: Refresh package index + run: xlings update + - name: Install workspace tools (.xlings.json → mcpp 0.0.13) run: xlings install -y From 57c584ad29cf8d7066a08c07d173d20ea459fa07 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Wed, 13 May 2026 03:01:07 +0800 Subject: [PATCH 15/15] =?UTF-8?q?chore:=20bump=20tinyhttps=200.2.2=20?= =?UTF-8?q?=E2=86=92=200.2.3=20(namespace=20deps=20fix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mcpp.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mcpp.toml b/mcpp.toml index e8ea628..39ffa00 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -13,4 +13,4 @@ include_dirs = ["src/json"] kind = "lib" [dependencies.mcpplibs] -tinyhttps = "0.2.2" +tinyhttps = "0.2.3"