mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-09 05:19:32 +08:00
The previous migration to tsdown was reverted because it caused a ~20x slowdown when running OpenClaw from the repo. @hyf0 investigated and found that simply renaming the `dist` folder also caused the same slowdown. It turns out the Plugin script loader has a bunch of voodoo vibe logic to determine if it should load files from source and compile them, or if it should load them from dist. When building with tsdown, the filesystem layout is different (bundled), and so some files weren't in the right location, and the Plugin script loader decided to compile source files from scratch using Jiti. The new implementation uses tsdown to embed `NODE_ENV: 'production'`, which we now use to determine if we are running OpenClaw from a "production environmen" (ie. from dist). This removes the slop in favor of a deterministic toggle, and doesn't rely on directory names or similar. There is some code reaching into `dist` to load specific modules, primarily in the voice-call extension, which I simplified into loading an "officially" exported `extensionAPI.js` file. With tsdown, entry points need to be explicitly configured, so we should be able to avoid sloppy code reaching into internals from now on. This might break some existing users, but if it does, it's because they were using "private" APIs.
297 lines
11 KiB
JSON
297 lines
11 KiB
JSON
{
|
|
"name": "openclaw",
|
|
"version": "2026.2.1",
|
|
"description": "WhatsApp gateway CLI (Baileys web) with Pi RPC agent",
|
|
"keywords": [],
|
|
"license": "MIT",
|
|
"author": "",
|
|
"bin": {
|
|
"openclaw": "openclaw.mjs"
|
|
},
|
|
"files": [
|
|
"CHANGELOG.md",
|
|
"LICENSE",
|
|
"openclaw.mjs",
|
|
"README-header.png",
|
|
"README.md",
|
|
"assets/**",
|
|
"dist/*.js",
|
|
"dist/*.json",
|
|
"docs/**",
|
|
"extensions/**",
|
|
"git-hooks/**",
|
|
"patches/**",
|
|
"scripts/format-staged.js",
|
|
"scripts/postinstall.js",
|
|
"scripts/setup-git-hooks.js",
|
|
"skills/**",
|
|
"dist/acp/**",
|
|
"dist/agents/**",
|
|
"dist/auto-reply/**",
|
|
"dist/browser/**",
|
|
"dist/canvas-host/**",
|
|
"dist/channels/**",
|
|
"dist/cli/**",
|
|
"dist/commands/**",
|
|
"dist/compat/**",
|
|
"dist/config/**",
|
|
"dist/control-ui/**",
|
|
"dist/cron/**",
|
|
"dist/daemon/**",
|
|
"dist/discord/**",
|
|
"dist/gateway/**",
|
|
"dist/hooks/**",
|
|
"dist/imessage/**",
|
|
"dist/infra/**",
|
|
"dist/line/**",
|
|
"dist/link-understanding/**",
|
|
"dist/logging/**",
|
|
"dist/macos/**",
|
|
"dist/markdown/**",
|
|
"dist/media-understanding/**",
|
|
"dist/media/**",
|
|
"dist/memory/**",
|
|
"dist/node-host/**",
|
|
"dist/pairing/**",
|
|
"dist/plugin-sdk/**",
|
|
"dist/plugins/**",
|
|
"dist/process/**",
|
|
"dist/providers/**",
|
|
"dist/routing/**",
|
|
"dist/security/**",
|
|
"dist/sessions/**",
|
|
"dist/shared/**",
|
|
"dist/signal/**",
|
|
"dist/slack/**",
|
|
"dist/telegram/**",
|
|
"dist/terminal/**",
|
|
"dist/tts/**",
|
|
"dist/tui/**",
|
|
"dist/utils/**",
|
|
"dist/web/**",
|
|
"dist/whatsapp/**",
|
|
"dist/wizard/**"
|
|
],
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"exports": {
|
|
".": "./dist/index.js",
|
|
"./plugin-sdk": "./dist/plugin-sdk/index.js",
|
|
"./plugin-sdk/*": "./dist/plugin-sdk/*",
|
|
"./cli-entry": "./openclaw.mjs"
|
|
},
|
|
"scripts": {
|
|
"android:assemble": "cd apps/android && ./gradlew :app:assembleDebug",
|
|
"android:install": "cd apps/android && ./gradlew :app:installDebug",
|
|
"android:run": "cd apps/android && ./gradlew :app:installDebug && adb shell am start -n ai.openclaw.android/.MainActivity",
|
|
"android:test": "cd apps/android && ./gradlew :app:testDebugUnitTest",
|
|
"build": "pnpm canvas:a2ui:bundle && tsdown && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/write-build-info.ts",
|
|
"canvas:a2ui:bundle": "bash scripts/bundle-a2ui.sh",
|
|
"check": "pnpm tsgo && pnpm lint && pnpm format",
|
|
"check:loc": "node --import tsx scripts/check-ts-max-loc.ts --max 500",
|
|
"dev": "node scripts/run-node.mjs",
|
|
"docs:bin": "node scripts/build-docs-list.mjs",
|
|
"docs:build": "cd docs && pnpm dlx --reporter append-only mint broken-links",
|
|
"docs:dev": "cd docs && mint dev",
|
|
"docs:list": "node scripts/docs-list.js",
|
|
"format": "oxfmt --check",
|
|
"format:all": "pnpm format && pnpm format:swift",
|
|
"format:fix": "oxfmt --write",
|
|
"format:swift": "swiftformat --lint --config .swiftformat apps/macos/Sources apps/ios/Sources apps/shared/OpenClawKit/Sources",
|
|
"gateway:dev": "OPENCLAW_SKIP_CHANNELS=1 CLAWDBOT_SKIP_CHANNELS=1 node scripts/run-node.mjs --dev gateway",
|
|
"gateway:dev:reset": "OPENCLAW_SKIP_CHANNELS=1 CLAWDBOT_SKIP_CHANNELS=1 node scripts/run-node.mjs --dev gateway --reset",
|
|
"gateway:watch": "node scripts/watch-node.mjs gateway --force",
|
|
"ios:build": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build'",
|
|
"ios:gen": "cd apps/ios && xcodegen generate",
|
|
"ios:open": "cd apps/ios && xcodegen generate && open OpenClaw.xcodeproj",
|
|
"ios:run": "bash -lc 'cd apps/ios && xcodegen generate && xcodebuild -project OpenClaw.xcodeproj -scheme OpenClaw -destination \"${IOS_DEST:-platform=iOS Simulator,name=iPhone 17}\" -configuration Debug build && xcrun simctl boot \"${IOS_SIM:-iPhone 17}\" || true && xcrun simctl launch booted ai.openclaw.ios'",
|
|
"lint": "oxlint --type-aware --tsconfig tsconfig.oxlint.json",
|
|
"lint:all": "pnpm lint && pnpm lint:swift",
|
|
"lint:fix": "oxlint --type-aware --tsconfig tsconfig.oxlint.json --fix && pnpm format:fix",
|
|
"lint:swift": "swiftlint lint --config .swiftlint.yml && (cd apps/ios && swiftlint lint --config .swiftlint.yml)",
|
|
"mac:open": "open dist/OpenClaw.app",
|
|
"mac:package": "bash scripts/package-mac-app.sh",
|
|
"mac:restart": "bash scripts/restart-mac.sh",
|
|
"moltbot:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
|
|
"openclaw": "node scripts/run-node.mjs",
|
|
"openclaw:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
|
|
"plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts",
|
|
"postinstall": "node scripts/postinstall.js",
|
|
"prepack": "pnpm build && pnpm ui:build",
|
|
"protocol:check": "pnpm protocol:gen && pnpm protocol:gen:swift && git diff --exit-code -- dist/protocol.schema.json apps/macos/Sources/OpenClawProtocol/GatewayModels.swift",
|
|
"protocol:gen": "node --import tsx scripts/protocol-gen.ts",
|
|
"protocol:gen:swift": "node --import tsx scripts/protocol-gen-swift.ts",
|
|
"release:check": "node --import tsx scripts/release-check.ts",
|
|
"start": "node scripts/run-node.mjs",
|
|
"test": "node scripts/test-parallel.mjs",
|
|
"test:all": "pnpm lint && pnpm build && pnpm test && pnpm test:e2e && pnpm test:live && pnpm test:docker:all",
|
|
"test:coverage": "vitest run --coverage",
|
|
"test:docker:all": "pnpm test:docker:live-models && pnpm test:docker:live-gateway && pnpm test:docker:onboard && pnpm test:docker:gateway-network && pnpm test:docker:qr && pnpm test:docker:doctor-switch && pnpm test:docker:plugins && pnpm test:docker:cleanup",
|
|
"test:docker:cleanup": "bash scripts/test-cleanup-docker.sh",
|
|
"test:docker:doctor-switch": "bash scripts/e2e/doctor-install-switch-docker.sh",
|
|
"test:docker:gateway-network": "bash scripts/e2e/gateway-network-docker.sh",
|
|
"test:docker:live-gateway": "bash scripts/test-live-gateway-models-docker.sh",
|
|
"test:docker:live-models": "bash scripts/test-live-models-docker.sh",
|
|
"test:docker:onboard": "bash scripts/e2e/onboard-docker.sh",
|
|
"test:docker:plugins": "bash scripts/e2e/plugins-docker.sh",
|
|
"test:docker:qr": "bash scripts/e2e/qr-import-docker.sh",
|
|
"test:e2e": "vitest run --config vitest.e2e.config.ts",
|
|
"test:force": "node --import tsx scripts/test-force.ts",
|
|
"test:install:e2e": "bash scripts/test-install-sh-e2e-docker.sh",
|
|
"test:install:e2e:anthropic": "OPENCLAW_E2E_MODELS=anthropic CLAWDBOT_E2E_MODELS=anthropic bash scripts/test-install-sh-e2e-docker.sh",
|
|
"test:install:e2e:openai": "OPENCLAW_E2E_MODELS=openai CLAWDBOT_E2E_MODELS=openai bash scripts/test-install-sh-e2e-docker.sh",
|
|
"test:install:smoke": "bash scripts/test-install-sh-docker.sh",
|
|
"test:live": "OPENCLAW_LIVE_TEST=1 CLAWDBOT_LIVE_TEST=1 vitest run --config vitest.live.config.ts",
|
|
"test:ui": "pnpm --dir ui test",
|
|
"test:watch": "vitest",
|
|
"tui": "node scripts/run-node.mjs tui",
|
|
"tui:dev": "OPENCLAW_PROFILE=dev CLAWDBOT_PROFILE=dev node scripts/run-node.mjs --dev tui",
|
|
"ui:build": "node scripts/ui.js build",
|
|
"ui:dev": "node scripts/ui.js dev",
|
|
"ui:install": "node scripts/ui.js install"
|
|
},
|
|
"dependencies": {
|
|
"@agentclientprotocol/sdk": "0.13.1",
|
|
"@aws-sdk/client-bedrock": "^3.981.0",
|
|
"@buape/carbon": "0.14.0",
|
|
"@clack/prompts": "^1.0.0",
|
|
"@grammyjs/runner": "^2.0.3",
|
|
"@grammyjs/transformer-throttler": "^1.2.1",
|
|
"@homebridge/ciao": "^1.3.4",
|
|
"@line/bot-sdk": "^10.6.0",
|
|
"@lydell/node-pty": "1.2.0-beta.3",
|
|
"@mariozechner/pi-agent-core": "0.51.1",
|
|
"@mariozechner/pi-ai": "0.51.1",
|
|
"@mariozechner/pi-coding-agent": "0.51.1",
|
|
"@mariozechner/pi-tui": "0.51.1",
|
|
"@mozilla/readability": "^0.6.0",
|
|
"@sinclair/typebox": "0.34.48",
|
|
"@slack/bolt": "^4.6.0",
|
|
"@slack/web-api": "^7.13.0",
|
|
"@whiskeysockets/baileys": "7.0.0-rc.9",
|
|
"ajv": "^8.17.1",
|
|
"chalk": "^5.6.2",
|
|
"chokidar": "^5.0.0",
|
|
"cli-highlight": "^2.1.11",
|
|
"commander": "^14.0.3",
|
|
"croner": "^10.0.1",
|
|
"discord-api-types": "^0.38.38",
|
|
"dotenv": "^17.2.3",
|
|
"express": "^5.2.1",
|
|
"file-type": "^21.3.0",
|
|
"grammy": "^1.39.3",
|
|
"hono": "4.11.7",
|
|
"jiti": "^2.6.1",
|
|
"json5": "^2.2.3",
|
|
"jszip": "^3.10.1",
|
|
"linkedom": "^0.18.12",
|
|
"long": "^5.3.2",
|
|
"markdown-it": "^14.1.0",
|
|
"node-edge-tts": "^1.2.9",
|
|
"osc-progress": "^0.3.0",
|
|
"pdfjs-dist": "^5.4.624",
|
|
"playwright-core": "1.58.1",
|
|
"proper-lockfile": "^4.1.2",
|
|
"qrcode-terminal": "^0.12.0",
|
|
"sharp": "^0.34.5",
|
|
"signal-utils": "^0.21.1",
|
|
"sqlite-vec": "0.1.7-alpha.2",
|
|
"tar": "7.5.7",
|
|
"tslog": "^4.10.2",
|
|
"undici": "^7.20.0",
|
|
"ws": "^8.19.0",
|
|
"yaml": "^2.8.2",
|
|
"zod": "^4.3.6"
|
|
},
|
|
"devDependencies": {
|
|
"@grammyjs/types": "^3.23.0",
|
|
"@lit-labs/signals": "^0.2.0",
|
|
"@lit/context": "^1.1.6",
|
|
"@types/express": "^5.0.6",
|
|
"@types/markdown-it": "^14.1.2",
|
|
"@types/node": "^25.2.0",
|
|
"@types/proper-lockfile": "^4.1.4",
|
|
"@types/qrcode-terminal": "^0.12.2",
|
|
"@types/ws": "^8.18.1",
|
|
"@typescript/native-preview": "7.0.0-dev.20260202.1",
|
|
"@vitest/coverage-v8": "^4.0.18",
|
|
"lit": "^3.3.2",
|
|
"ollama": "^0.6.3",
|
|
"oxfmt": "0.28.0",
|
|
"oxlint": "^1.43.0",
|
|
"oxlint-tsgolint": "^0.11.4",
|
|
"rolldown": "1.0.0-rc.2",
|
|
"tsdown": "^0.20.1",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^5.9.3",
|
|
"vitest": "^4.0.18"
|
|
},
|
|
"peerDependencies": {
|
|
"@napi-rs/canvas": "^0.1.89",
|
|
"node-llama-cpp": "3.15.1"
|
|
},
|
|
"overrides": {
|
|
"tar": "7.5.7"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.12.0"
|
|
},
|
|
"packageManager": "pnpm@10.23.0",
|
|
"pnpm": {
|
|
"minimumReleaseAge": 2880,
|
|
"overrides": {
|
|
"fast-xml-parser": "5.3.4",
|
|
"form-data": "2.5.4",
|
|
"@hono/node-server>hono": "4.11.7",
|
|
"hono": "4.11.7",
|
|
"qs": "6.14.1",
|
|
"@sinclair/typebox": "0.34.47",
|
|
"tar": "7.5.7",
|
|
"tough-cookie": "4.1.3"
|
|
},
|
|
"onlyBuiltDependencies": [
|
|
"@lydell/node-pty",
|
|
"@matrix-org/matrix-sdk-crypto-nodejs",
|
|
"@napi-rs/canvas",
|
|
"@whiskeysockets/baileys",
|
|
"authenticate-pam",
|
|
"esbuild",
|
|
"node-llama-cpp",
|
|
"protobufjs",
|
|
"sharp"
|
|
]
|
|
},
|
|
"vitest": {
|
|
"coverage": {
|
|
"provider": "v8",
|
|
"reporter": [
|
|
"text",
|
|
"lcov"
|
|
],
|
|
"thresholds": {
|
|
"lines": 70,
|
|
"functions": 70,
|
|
"branches": 70,
|
|
"statements": 70
|
|
},
|
|
"include": [
|
|
"src/**/*.ts"
|
|
],
|
|
"exclude": [
|
|
"src/**/*.test.ts"
|
|
]
|
|
},
|
|
"include": [
|
|
"src/**/*.test.ts"
|
|
],
|
|
"exclude": [
|
|
"dist/**",
|
|
"apps/macos/**",
|
|
"apps/macos/.build/**",
|
|
"**/vendor/**",
|
|
"apps/macos/.build/**",
|
|
"dist/OpenClaw.app/**"
|
|
]
|
|
}
|
|
}
|