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/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"); + } } 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", 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": [