Skip to content
Merged

Dev #58

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
11d4f8d
refactor: 移除init-bundle模块及相关依赖
TrueNine Mar 1, 2026
fa681b0
refactor(plugin-output): 重构输出插件共享逻辑并提取公共方法
TrueNine Mar 1, 2026
8cf3ccc
refactor(plugin-output-shared): 合并系列过滤功能到统一模块
TrueNine Mar 1, 2026
6ac30de
refactor(plugin-output-shared): 集中共享常量以提高可维护性
TrueNine Mar 1, 2026
55334e2
refactor(cli): 重构插件依赖解析和资源处理逻辑
TrueNine Mar 1, 2026
2d661ae
refactor(cli): 替换 console 输出为 logger 并改进错误处理
TrueNine Mar 1, 2026
4b0c115
feat(plugin-output-shared): 添加 McpConfigManager 用于管理 MCP 配置
TrueNine Mar 1, 2026
8b7a062
refactor(cli): 移除不再使用的init命令及相关代码
TrueNine Mar 1, 2026
ae5b91d
refactor(config): 移除默认配置并加强配置验证
TrueNine Mar 1, 2026
50d562b
feat(plugin-input-orphan-cleanup-effect): 支持自定义源文件路径配置
TrueNine Mar 1, 2026
bb9c1a0
feat(插件输入): 添加多语言提示支持并重构输入插件
TrueNine Mar 2, 2026
c2f41f0
refactor(plugin-input-orphan-cleanup-effect): 简化技能文件路径匹配逻辑
TrueNine Mar 2, 2026
5dba362
refactor(plugins): 将插件输入模块重构并移动到inputs目录
TrueNine Mar 2, 2026
fc175aa
feat(plugin-trae-cn-ide): 新增中文版TraeIDE输出插件
TrueNine Mar 2, 2026
6bc26c8
refactor(types): 统一 SeriName 类型并扩展 RuleScope
TrueNine Mar 2, 2026
0b31dfa
chore: 更新版本号至2026.10303.10139
TrueNine Mar 2, 2026
052cdf6
chore: 更新所有包的版本号至2026.10303.10139
TrueNine Mar 2, 2026
f250061
refactor(plugins): 将所有输出文件移至项目级别,移除全局配置
TrueNine Mar 2, 2026
4755073
refactor(cli): 重构命令相关功能,将fastCommand重命名为command
TrueNine Mar 2, 2026
586f313
refactor(输入插件): 重命名series为commandPrefix和agentPrefix以提高语义清晰度
TrueNine Mar 2, 2026
495e74f
refactor: 将 ShadowSourceProject 重命名为 Aindex
TrueNine Mar 2, 2026
fb8a990
feat: 添加Next.js构建产物及配置文件
TrueNine Mar 2, 2026
8e231e1
refactor(plugin-openai-codex-cli): 移除未使用的技能相关代码
TrueNine Mar 3, 2026
90dfae2
refactor: 将配置和输入插件模块合并到CLI核心
TrueNine Mar 3, 2026
31d03ac
refactor(PluginPipeline): 移除冗余代码并使用模块化实现
TrueNine Mar 3, 2026
53c2559
ci: 优化工作流配置和构建过程
TrueNine Mar 3, 2026
3aa757f
chore: 更新package.json中的版本号至2026.10303.10919
TrueNine Mar 3, 2026
d65ab4a
chore: 更新所有包的版本号至2026.10303.10919
TrueNine Mar 3, 2026
0ca6d3b
a
TrueNine Mar 3, 2026
55b8a59
fix(cli): allow vitest to pass when no test files
TrueNine Mar 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/actions/setup-tauri/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ runs:
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
sudo apt-get install -y --no-install-recommends \
libgtk-3-dev \
libglib2.0-dev \
pkg-config \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
Expand Down Expand Up @@ -48,7 +51,7 @@ runs:
restore-keys: |
${{ runner.os }}-cargo-

- name: Sync Tauri version from CLI
- name: Sync Tauri version
shell: bash
run: |
version="${{ inputs.version }}"
Expand All @@ -63,4 +66,7 @@ runs:

- name: Clean old bundle artifacts
shell: bash
run: rm -rf gui/src-tauri/target/**/bundle
run: |
if [ -d "gui/src-tauri/target" ]; then
find gui/src-tauri/target -type d -name bundle -prune -exec rm -rf {} +
fi
29 changes: 18 additions & 11 deletions .github/workflows/build-gui-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,33 +18,40 @@ jobs:
include:
- os: windows-latest
platform: windows
rust-targets: ''
tauri-command: pnpm tauri build
- os: ubuntu-24.04
platform: linux
rust-targets: ''
tauri-command: pnpm tauri build
- os: macos-14
platform: macos
rust-targets: aarch64-apple-darwin,x86_64-apple-darwin
tauri-command: pnpm tauri build --target universal-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node-pnpm
- uses: ./.github/actions/setup-tauri
with:
rust-targets: ${{ matrix.rust-targets }}
version: ${{ inputs.version }}

- name: Build GUI
working-directory: ./gui
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
run: pnpm tauri build
run: ${{ matrix.tauri-command }}

- name: Upload Windows artifacts
if: matrix.platform == 'windows'
uses: actions/upload-artifact@v4
with:
name: gui-${{ matrix.os }}
path: |
target/*/release/bundle/**/*.exe
target/release/bundle/**/*.exe
gui/src-tauri/target/*/release/bundle/**/*.exe
gui/src-tauri/target/release/bundle/**/*.exe
if-no-files-found: error

- name: Upload Linux artifacts
Expand All @@ -53,12 +60,12 @@ jobs:
with:
name: gui-${{ matrix.os }}
path: |
target/*/release/bundle/**/*.AppImage
target/*/release/bundle/**/*.deb
target/*/release/bundle/**/*.rpm
target/release/bundle/**/*.AppImage
target/release/bundle/**/*.deb
target/release/bundle/**/*.rpm
gui/src-tauri/target/*/release/bundle/**/*.AppImage
gui/src-tauri/target/*/release/bundle/**/*.deb
gui/src-tauri/target/*/release/bundle/**/*.rpm
gui/src-tauri/target/release/bundle/**/*.AppImage
gui/src-tauri/target/release/bundle/**/*.deb
gui/src-tauri/target/release/bundle/**/*.rpm
if-no-files-found: error

- name: Upload macOS artifacts
Expand All @@ -67,6 +74,6 @@ jobs:
with:
name: gui-${{ matrix.os }}
path: |
target/*/release/bundle/**/*.dmg
target/release/bundle/**/*.dmg
gui/src-tauri/target/*/release/bundle/**/*.dmg
gui/src-tauri/target/release/bundle/**/*.dmg
if-no-files-found: error
31 changes: 9 additions & 22 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened, closed]
types: [opened, synchronize, reopened, ready_for_review]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
Expand All @@ -13,39 +13,26 @@ concurrency:
jobs:
check:
runs-on: ubuntu-24.04
if: github.event.pull_request.merged == false
steps:
- uses: actions/checkout@v4

- name: Cache apt packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: apt-gtk-${{ runner.os }}-${{ hashFiles('.github/workflows/pull-request.yml') }}
restore-keys: apt-gtk-${{ runner.os }}-

- name: Install GTK development dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libglib2.0-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf pkg-config

- uses: ./.github/actions/setup-node-pnpm

- name: Build
run: pnpm exec turbo run build

- uses: ./.github/actions/setup-rust
with:
cache-key: pr

- name: Generate Tauri icons
run: pnpm -F @truenine/memory-sync-gui run generate:icons
- name: Build
run: pnpm run build

- name: Lint
run: pnpm run lint

- name: Generate route tree
run: pnpm -F @truenine/memory-sync-gui run generate:routes
- name: Typecheck
run: pnpm run typecheck

- name: Run tests
run: pnpm exec turbo run test
run: pnpm run test

- name: Rust tests (excluding GUI)
run: cargo test --workspace --exclude memory-sync-gui --lib --bins --tests
30 changes: 22 additions & 8 deletions .github/workflows/release-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:
version: ${{ steps.check.outputs.version }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 25

- name: Check if should publish
id: check
Expand Down Expand Up @@ -103,20 +106,31 @@ jobs:
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Build all napi libraries
- name: Build all napi native modules
shell: bash
run: |
for lib in logger md-compiler config init-bundle; do
echo "Building napi for $lib..."
(cd "libraries/$lib" && pnpm exec napi build --platform --release --target ${{ matrix.target.rust }} --output-dir dist -- --features napi)
module_dirs=(libraries/logger libraries/md-compiler cli)
for module_dir in "${module_dirs[@]}"; do
echo "Building napi in ${module_dir}..."
(
cd "${module_dir}" && \
pnpm exec napi build --platform --release --target ${{ matrix.target.rust }} --output-dir dist -- --features napi
)
done
- name: Collect .node files into CLI platform package
shell: bash
run: |
target_dir="cli/npm/${{ matrix.target.suffix }}"
mkdir -p "$target_dir"
for lib in logger md-compiler config init-bundle; do
cp libraries/$lib/dist/*.node "$target_dir/"
shopt -s nullglob
module_dirs=(libraries/logger libraries/md-compiler cli)
for module_dir in "${module_dirs[@]}"; do
node_files=("${module_dir}"/dist/*.node)
if [ "${#node_files[@]}" -eq 0 ]; then
echo "ERROR: no .node files found in ${module_dir}/dist"
exit 1
fi
cp "${node_files[@]}" "$target_dir/"
done
echo "Contents of $target_dir:"
ls -la "$target_dir/"
Expand Down Expand Up @@ -185,7 +199,7 @@ jobs:
node-version: 25
registry-url: https://registry.npmjs.org/
- name: Build
run: pnpm exec turbo run build --filter=@truenine/memory-sync-cli...
run: pnpm -F @truenine/memory-sync-cli run build
- name: Publish to npm
working-directory: ./cli
run: pnpm publish --access public --no-git-checks
Expand Down Expand Up @@ -228,7 +242,7 @@ jobs:
- name: Build plugin-runtime
shell: bash
run: |
pnpm exec turbo run build --filter=@truenine/memory-sync-cli...
pnpm -F @truenine/memory-sync-cli run build
ls -la cli/dist/plugin-runtime.mjs
- uses: ./.github/actions/setup-rust
with:
Expand Down
61 changes: 5 additions & 56 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ members = [
"cli",
"libraries/logger",
"libraries/md-compiler",
"libraries/config",
"libraries/plugin-shared",
"libraries/input-plugins",
"libraries/init-bundle",
"gui/src-tauri",
]

Expand All @@ -23,10 +19,6 @@ repository = "https://github.com/TrueNine/memory-sync"
tnmsc = { path = "cli" }
tnmsc-logger = { path = "libraries/logger" }
tnmsc-md-compiler = { path = "libraries/md-compiler" }
tnmsc-config = { path = "libraries/config" }
tnmsc-plugin-shared = { path = "libraries/plugin-shared" }
tnmsc-input-plugins = { path = "libraries/input-plugins" }
tnmsc-init-bundle = { path = "libraries/init-bundle" }

# Serialization
serde = { version = "1", features = ["derive"] }
Expand Down
13 changes: 8 additions & 5 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ repository.workspace = true
[lib]
name = "tnmsc"
path = "src/lib.rs"
crate-type = ["rlib", "cdylib"]

[[bin]]
name = "tnmsc"
Expand All @@ -18,22 +19,24 @@ path = "src/main.rs"
[features]
default = []
embedded-runtime = []
napi = ["dep:napi", "dep:napi-derive"]

[dependencies]
tnmsc-logger = { workspace = true }
tnmsc-md-compiler = { workspace = true }
tnmsc-config = { workspace = true }
tnmsc-plugin-shared = { workspace = true }
tnmsc-input-plugins = { workspace = true }
tnmsc-init-bundle = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
thiserror = "2"
clap = { workspace = true }
dirs = { workspace = true }
sha2 = { workspace = true }
napi = { workspace = true, optional = true }
napi-derive = { workspace = true, optional = true }
reqwest = { version = "0.13", default-features = false, features = ["blocking", "json", "rustls", "rustls-native-certs"] }

[dev-dependencies]
proptest = "1"
tempfile = "3"
tnmsc-config = { workspace = true }

[build-dependencies]
napi-build = { workspace = true }
Loading