From 3a43e0b4ed90bc4368529ccbb993f37779c356fe Mon Sep 17 00:00:00 2001 From: TrueNine Date: Tue, 3 Mar 2026 11:17:38 +0800 Subject: [PATCH 1/3] =?UTF-8?q?feat(build):=20=E6=B7=BB=E5=8A=A0=E5=B5=8C?= =?UTF-8?q?=E5=85=A5=E5=BC=8F=E8=BF=90=E8=A1=8C=E6=97=B6=E7=89=B9=E6=80=A7?= =?UTF-8?q?=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当启用embedded-runtime特性时,自动查找并复制plugin-runtime.mjs文件到输出目录。如果文件未找到,则提示用户需要先构建该文件。同时添加文件变更监听以支持增量构建。 --- cli/build.rs | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/cli/build.rs b/cli/build.rs index f2be9938..ffcc7d99 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -1,4 +1,47 @@ +use std::env; +use std::fs; +use std::path::{Path, PathBuf}; + fn main() { #[cfg(feature = "napi")] napi_build::setup(); + + // Check if embedded-runtime feature is enabled via CARGO_FEATURE_* env var + // Note: #[cfg(feature = ...)] doesn't work in build.rs at runtime, + // we must check the environment variable set by cargo + if env::var("CARGO_FEATURE_EMBEDDED_RUNTIME").is_ok() { + let out_dir = env::var("OUT_DIR").expect("OUT_DIR not set"); + let dest = Path::new(&out_dir).join("plugin-runtime.mjs"); + + // Try multiple possible locations for plugin-runtime.mjs + let possible_sources = vec![ + // Already built in cli/dist + PathBuf::from("dist/plugin-runtime.mjs"), + // From repo root + PathBuf::from("cli/dist/plugin-runtime.mjs"), + // CI workspace path (when building from repo root) + PathBuf::from("../cli/dist/plugin-runtime.mjs"), + ]; + + let mut found = false; + for src in &possible_sources { + if src.exists() { + fs::copy(src, &dest).expect("Failed to copy plugin-runtime.mjs"); + println!("cargo:rerun-if-changed={}", src.display()); + found = true; + break; + } + } + + if !found { + panic!( + "plugin-runtime.mjs not found for embedded-runtime feature. \ + Please build it first with: pnpm -C cli exec tsdown \ + Searched paths: {:?}", + possible_sources + ); + } + + println!("cargo:rerun-if-changed=build.rs"); + } } From bf47360d8d26614242d498c62f8867857d80b442 Mon Sep 17 00:00:00 2001 From: TrueNine Date: Tue, 3 Mar 2026 11:18:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8F=B7=E8=87=B32026.10303.11117?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c0d3916e..ddcbdacd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "description": "Cross-AI-tool prompt synchronisation toolkit (CLI + Tauri desktop GUI) — one ruleset, multi-target adaptation. Monorepo powered by pnpm + Turbo.", "license": "AGPL-3.0-only", "keywords": [ From 368695d9378b935b88103bb9331e711b216262db Mon Sep 17 00:00:00 2001 From: TrueNine Date: Tue, 3 Mar 2026 11:18:58 +0800 Subject: [PATCH 3/3] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0=E6=89=80?= =?UTF-8?q?=E6=9C=89=E5=8C=85=E7=9A=84=E7=89=88=E6=9C=AC=E5=8F=B7=E8=87=B3?= =?UTF-8?q?2026.10303.11117?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 2 +- cli/npm/darwin-arm64/package.json | 2 +- cli/npm/darwin-x64/package.json | 2 +- cli/npm/linux-arm64-gnu/package.json | 2 +- cli/npm/linux-x64-gnu/package.json | 2 +- cli/npm/win32-x64-msvc/package.json | 2 +- cli/package.json | 2 +- doc/package.json | 2 +- gui/package.json | 2 +- gui/src-tauri/Cargo.toml | 2 +- gui/src-tauri/tauri.conf.json | 2 +- libraries/logger/package.json | 2 +- libraries/md-compiler/package.json | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cbb32af9..a45f4f81 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2071,7 +2071,7 @@ dependencies = [ [[package]] name = "memory-sync-gui" -version = "2026.10303.11058" +version = "2026.10303.11117" dependencies = [ "dirs", "proptest", diff --git a/cli/npm/darwin-arm64/package.json b/cli/npm/darwin-arm64/package.json index ca3b6810..3d4c3677 100644 --- a/cli/npm/darwin-arm64/package.json +++ b/cli/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-cli-darwin-arm64", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "os": [ "darwin" ], diff --git a/cli/npm/darwin-x64/package.json b/cli/npm/darwin-x64/package.json index 4c3104f3..672baad9 100644 --- a/cli/npm/darwin-x64/package.json +++ b/cli/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-cli-darwin-x64", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "os": [ "darwin" ], diff --git a/cli/npm/linux-arm64-gnu/package.json b/cli/npm/linux-arm64-gnu/package.json index a4189f57..9b3340b0 100644 --- a/cli/npm/linux-arm64-gnu/package.json +++ b/cli/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-cli-linux-arm64-gnu", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "os": [ "linux" ], diff --git a/cli/npm/linux-x64-gnu/package.json b/cli/npm/linux-x64-gnu/package.json index 86af2ea8..417b2b03 100644 --- a/cli/npm/linux-x64-gnu/package.json +++ b/cli/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-cli-linux-x64-gnu", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "os": [ "linux" ], diff --git a/cli/npm/win32-x64-msvc/package.json b/cli/npm/win32-x64-msvc/package.json index 9774d61c..ad8f3101 100644 --- a/cli/npm/win32-x64-msvc/package.json +++ b/cli/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-cli-win32-x64-msvc", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "os": [ "win32" ], diff --git a/cli/package.json b/cli/package.json index eb19e634..44a2314a 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,7 +1,7 @@ { "name": "@truenine/memory-sync-cli", "type": "module", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "description": "TrueNine Memory Synchronization CLI", "author": "TrueNine", "license": "AGPL-3.0-only", diff --git a/doc/package.json b/doc/package.json index 1594fdec..b68ee1d4 100644 --- a/doc/package.json +++ b/doc/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-docs", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "private": true, "description": "Documentation site for @truenine/memory-sync, built with Next.js 16 and MDX.", "engines": { diff --git a/gui/package.json b/gui/package.json index 2d13eab8..2201098d 100644 --- a/gui/package.json +++ b/gui/package.json @@ -1,6 +1,6 @@ { "name": "@truenine/memory-sync-gui", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "private": true, "engines": { "node": ">=25.2.1", diff --git a/gui/src-tauri/Cargo.toml b/gui/src-tauri/Cargo.toml index cb674f79..10a0c4fd 100644 --- a/gui/src-tauri/Cargo.toml +++ b/gui/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "memory-sync-gui" -version = "2026.10303.11058" +version = "2026.10303.11117" description = "Memory Sync desktop GUI application" authors.workspace = true edition.workspace = true diff --git a/gui/src-tauri/tauri.conf.json b/gui/src-tauri/tauri.conf.json index 4a1bbe31..6b818f44 100644 --- a/gui/src-tauri/tauri.conf.json +++ b/gui/src-tauri/tauri.conf.json @@ -1,6 +1,6 @@ { "$schema": "https://schema.tauri.app/config/2", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "productName": "Memory Sync", "identifier": "org.truenine.memory-sync", "build": { diff --git a/libraries/logger/package.json b/libraries/logger/package.json index c6f029c7..3491d933 100644 --- a/libraries/logger/package.json +++ b/libraries/logger/package.json @@ -1,7 +1,7 @@ { "name": "@truenine/logger", "type": "module", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "private": true, "description": "Rust-powered structured logger for Node.js with pure-TS fallback", "license": "AGPL-3.0-only", diff --git a/libraries/md-compiler/package.json b/libraries/md-compiler/package.json index 1bae642d..b16e2348 100644 --- a/libraries/md-compiler/package.json +++ b/libraries/md-compiler/package.json @@ -1,7 +1,7 @@ { "name": "@truenine/md-compiler", "type": "module", - "version": "2026.10303.11058", + "version": "2026.10303.11117", "private": true, "description": "Rust-powered MDX→Markdown compiler for Node.js with pure-TS fallback", "license": "AGPL-3.0-only",