diff --git a/.github/workflows/wasm-bundle-check.yml b/.github/workflows/wasm-bundle-check.yml index ee9ccbcca..9bf926fdb 100644 --- a/.github/workflows/wasm-bundle-check.yml +++ b/.github/workflows/wasm-bundle-check.yml @@ -21,7 +21,7 @@ jobs: submodules: recursive - uses: dtolnay/rust-toolchain@stable with: - toolchain: "1.85" + toolchain: '1.85' targets: wasm32-unknown-unknown - uses: Swatinem/rust-cache@v2 with: @@ -44,7 +44,7 @@ jobs: with: targets: wasm32-unknown-unknown - name: Reverse — blacklisted crates not in wasm bundle - uses: EmbarkStudios/cargo-deny-action@v2 # cargo-deny 0.18+ via the action (Phase 1 Task 1.8 finding) + uses: EmbarkStudios/cargo-deny-action@v2 # cargo-deny 0.18+ via the action (Phase 1 Task 1.8 finding) with: command: check bans arguments: --target wasm32-unknown-unknown diff --git a/.prettierignore b/.prettierignore index d351490b1..40929303d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,7 +1,12 @@ # oxfmt picks this file up automatically (alongside .gitignore). -# Git submodule — owned by a separate repo, not formatted from here. +# Git submodules — owned by separate repos, not formatted from here. packages/agent-native/ +vendor/agent/ +vendor/jian/ + +# Rust build artifacts +target/ # Auto-generated by @tanstack/router-plugin. apps/web/src/routeTree.gen.ts diff --git a/Cargo.toml b/Cargo.toml index 657de2a59..ed688a559 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,11 +4,7 @@ resolver = "2" # Phase 1 batch 2 的 workspace masking 反馈:列出未存在的 crate 会让 `cargo build -p X` # 在 resolve 阶段就挂掉)。glob 自动包含 crates/ 下所有 manifest,自然支持增量创建。 members = ["crates/*"] -exclude = [ - "vendor/agent", - "vendor/jian", - "node_modules", -] +exclude = ["vendor/agent", "vendor/jian", "node_modules"] [workspace.package] version = "0.1.0" diff --git a/README.md b/README.md index 8b3f45938..4d14e946b 100644 --- a/README.md +++ b/README.md @@ -461,11 +461,11 @@ bun run cargo:deny # cargo-deny (native + wasm32 bans; CI uses cargo-deny **Crate list (`crates/`):** -| Crate | Category | wasm32 | -|-------|----------|--------| -| openpencil-app | Stage F entry placeholder | — | -| openpencil-shell-{core,web,native} | UI shell(spec §1.2 三 crate) | core/web ✅ / native ❌ (compile_error guard) | -| pen-types / pen-core / pen-engine / pen-codegen / pen-figma | bucket A logic | ✅ | +| Crate | Category | wasm32 | +| ----------------------------------------------------------- | ------------------------------ | --------------------------------------------- | +| openpencil-app | Stage F entry placeholder | — | +| openpencil-shell-{core,web,native} | UI shell(spec §1.2 三 crate) | core/web ✅ / native ❌ (compile_error guard) | +| pen-types / pen-core / pen-engine / pen-codegen / pen-figma | bucket A logic | ✅ | **Submodule:** `vendor/agent` → `github.com/ZSeven-W/agent-rs` (cross-product Rust agent runtime). diff --git a/crates/openpencil-shell-native/Cargo.toml b/crates/openpencil-shell-native/Cargo.toml index 913b8eb94..4239eb439 100644 --- a/crates/openpencil-shell-native/Cargo.toml +++ b/crates/openpencil-shell-native/Cargo.toml @@ -37,7 +37,12 @@ skia-safe = { version = "0.97.0", features = ["gl"] } glutin = "0.32.3" glutin-winit = "0.5.0" glow = "0.17.0" -winit = { version = "0.30.13", default-features = false, features = ["x11", "wayland", "wayland-csd-adwaita", "rwh_06"] } +winit = { version = "0.30.13", default-features = false, features = [ + "x11", + "wayland", + "wayland-csd-adwaita", + "rwh_06", +] } raw-window-handle = "0.6.2" scopeguard = "1.2" @@ -50,7 +55,9 @@ scopeguard = "1.2" # feature pulls ICU + harfbuzz, ~15MB; P0.5 already bumped skia-safe 0.78→0.97 and # added a public draw_on_canvas). jian-core = { path = "../../vendor/jian/crates/jian-core", version = "0.0.1" } -jian-skia = { path = "../../vendor/jian/crates/jian-skia", version = "0.0.1", features = ["textlayout"] } +jian-skia = { path = "../../vendor/jian/crates/jian-skia", version = "0.0.1", features = [ + "textlayout", +] } # jian-host-desktop: target-gated desktop only (Linux/macOS/Windows); not pulled into # android/ios metadata (verified by Task 1 Step 26 boundary check). @@ -58,7 +65,9 @@ jian-skia = { path = "../../vendor/jian/crates/jian-skia", version = "0.0.1", fe # for raster present; OP runs its own GPU event loop and doesn't need softbuffer. # - features = ["textlayout"]: aligns the text path with jian-skia. [target.'cfg(any(target_os = "macos", target_os = "linux", target_os = "windows"))'.dependencies] -jian-host-desktop = { path = "../../vendor/jian/crates/jian-host-desktop", version = "0.0.1", default-features = false, features = ["textlayout"] } +jian-host-desktop = { path = "../../vendor/jian/crates/jian-host-desktop", version = "0.0.1", default-features = false, features = [ + "textlayout", +] } # tracing for span instrumentation across SharedSkiaContext / NativeBackend # (spec §3.3 / §5.2.1; Task 2 Step 15 dictates per-method spans). diff --git a/crates/openpencil-shell-web/Cargo.toml b/crates/openpencil-shell-web/Cargo.toml index 0bebd8e15..5055642db 100644 --- a/crates/openpencil-shell-web/Cargo.toml +++ b/crates/openpencil-shell-web/Cargo.toml @@ -18,13 +18,7 @@ js-sys = "0.3" [dependencies.web-sys] version = "0.3" -features = [ - "console", - "Document", - "Element", - "HtmlCanvasElement", - "Window", -] +features = ["console", "Document", "Element", "HtmlCanvasElement", "Window"] [features] default = ["web"] diff --git a/deny.toml b/deny.toml index 26bbfa3d2..5fed3723e 100644 --- a/deny.toml +++ b/deny.toml @@ -7,27 +7,27 @@ all-features = false # 不限定的话 cargo-deny 默认尝试所有 target(含 Android/iOS), # 拉进 jni / android-activity 等 edition-2024 deps,在 rustc 1.82 上 cargo metadata 失败。 targets = [ - { triple = "x86_64-unknown-linux-gnu" }, - { triple = "aarch64-unknown-linux-gnu" }, - { triple = "x86_64-apple-darwin" }, - { triple = "aarch64-apple-darwin" }, - { triple = "x86_64-pc-windows-msvc" }, - { triple = "wasm32-unknown-unknown" }, + { triple = "x86_64-unknown-linux-gnu" }, + { triple = "aarch64-unknown-linux-gnu" }, + { triple = "x86_64-apple-darwin" }, + { triple = "aarch64-apple-darwin" }, + { triple = "x86_64-pc-windows-msvc" }, + { triple = "wasm32-unknown-unknown" }, ] [licenses] allow = [ - "MIT", - "Apache-2.0", - "Apache-2.0 WITH LLVM-exception", - "BSD-2-Clause", - "BSD-3-Clause", - "ISC", - "Unicode-DFS-2016", - "Unicode-3.0", - "CDLA-Permissive-2.0", - "MPL-2.0", - "Zlib", + "MIT", + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "BSD-2-Clause", + "BSD-3-Clause", + "ISC", + "Unicode-DFS-2016", + "Unicode-3.0", + "CDLA-Permissive-2.0", + "MPL-2.0", + "Zlib", ] confidence-threshold = 0.93 @@ -41,11 +41,11 @@ wildcards = "deny" # 允许 workspace 内部 path 依赖不写 version(标准实践,避免每次 bump 都改两处)。 allow-wildcard-paths = true deny = [ - # WASM bundle 黑名单(kickoff spec §1.2 invariant) - "pen-agent-cli", - "pen-server", - "agent", - "native-tls", + # WASM bundle 黑名单(kickoff spec §1.2 invariant) + "pen-agent-cli", + "pen-server", + "agent", + "native-tls", ] [[bans.features]] @@ -55,6 +55,4 @@ deny = ["process", "rt-multi-thread"] [sources] unknown-registry = "deny" unknown-git = "deny" -allow-git = [ - "https://github.com/ZSeven-W/agent-rs", -] +allow-git = ["https://github.com/ZSeven-W/agent-rs"] diff --git a/vendor/agent b/vendor/agent index 65b845585..62c4badda 160000 --- a/vendor/agent +++ b/vendor/agent @@ -1 +1 @@ -Subproject commit 65b845585afa68fbd3bff09771b77e8668154062 +Subproject commit 62c4baddae91be4a39924cd5451ed24b7361957c