chore(workspace): bun scripts wrap cargo commands

This commit is contained in:
Kayshen-X 2026-05-03 23:30:00 +08:00
parent 6510a56822
commit e690b35716

View file

@ -46,7 +46,14 @@
"generate": "bun -e \"import { compileSkills } from './packages/pen-ai-skills/vite-plugin-skills'; compileSkills('./packages/pen-ai-skills')\"",
"agent:build": "cd packages/agent-native && zig build napi -Doptimize=ReleaseFast",
"agent-native:bundle": "node -e \"const fs=require('fs'),p=require('path');const src=p.resolve('packages/agent-native/zig-out/napi/agent_napi.node');const dst=p.resolve('packages/agent-native/napi/agent_napi.node');if(!fs.existsSync(src)){console.error('Native binary missing at '+src+'. Run bun run agent:build first.');process.exit(1)}fs.copyFileSync(src,dst);console.log('[agent-native:bundle] copied to '+dst)\"",
"postinstall": "(bun scripts/patch-srvx-bun.ts && bun run generate && node scripts/ensure-agent-native.cjs) || true"
"postinstall": "(bun scripts/patch-srvx-bun.ts && bun run generate && node scripts/ensure-agent-native.cjs) || true",
"cargo:check": "cargo check --workspace",
"cargo:test": "cargo test --workspace",
"cargo:fmt": "cargo fmt --all",
"cargo:clippy": "cargo clippy --workspace --all-targets -- -D warnings",
"cargo:wasm-check": "cargo check --target wasm32-unknown-unknown -p openpencil-shell-web --no-default-features --features web && cargo check --target wasm32-unknown-unknown -p pen-types -p pen-core -p pen-engine -p pen-codegen -p pen-figma",
"cargo:deny": "cargo deny check && cargo deny --target wasm32-unknown-unknown check bans",
"shell:wasm:dev": "echo 'Step 4 will replace this with: cargo build --target wasm32-unknown-unknown -p openpencil-shell-web --no-default-features --features web && wasm-pack build crates/openpencil-shell-web --target web --dev && bun run scripts/serve-wasm-dev.ts'"
},
"dependencies": {
"@agentclientprotocol/sdk": "^0.18.2",