Files
ycode/package.json
T
xiaohan.yuan 3ceae1e983 chore(design-system): add extraction artifact and token drift gate
Record the design decisions actually in use and add a static gate that blocks new bare colors, bare sizes, important overrides, and wb token definitions outside token sources.
2026-10-18 18:36:43 +08:00

221 lines
22 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "ycode",
"version": "0.0.1",
"private": true,
"description": "YCode - 个人 AI Agent 桌面应用(Electron)",
"author": "YCode",
"main": "./out/main/index.mjs",
"scripts": {
"dev": "electron-vite dev",
"dev:renderer": "electron-vite dev --rendererOnly",
"build": "npm run sandbox:build && npm run typecheck && electron-vite build",
"sandbox:build": "node scripts/build-sandbox.mjs",
"sandbox:vendor-git": "node scripts/vendor-sandbox-git.mjs",
"test:sandbox": "npm run sandbox:build && node scripts/build-sandbox.mjs --probe && esbuild scripts/sandbox-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-regression.mjs --log-level=warning && node .tmp/sandbox-regression.mjs",
"test:sandbox:app": "npm run build && node scripts/verify-sandbox-app.cjs",
"test:sandbox:policy": "esbuild scripts/sandbox-policy-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-policy-regression.mjs --log-level=warning && node .tmp/sandbox-policy-regression.mjs",
"test:sandbox:disabled": "esbuild scripts/sandbox-disabled-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-disabled-regression.mjs --log-level=warning && node .tmp/sandbox-disabled-regression.mjs",
"test:sandbox:toolchains": "npm run sandbox:build && esbuild scripts/sandbox-toolchain-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-toolchain-regression.mjs --log-level=warning && node .tmp/sandbox-toolchain-regression.mjs",
"test:sandbox:feasibility": "node scripts/build-sandbox.mjs --probe && esbuild scripts/sandbox-feasibility.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-feasibility.mjs --log-level=warning && node .tmp/sandbox-feasibility.mjs",
"test:sandbox:directories": "esbuild scripts/sandbox-directory-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-directory-regression.mjs --log-level=warning && node .tmp/sandbox-directory-regression.mjs",
"test:sandbox:write": "npm run sandbox:build && esbuild scripts/sandbox-write-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-write-regression.mjs --log-level=warning && node .tmp/sandbox-write-regression.mjs",
"test:sandbox:workspace": "npm run sandbox:build && esbuild scripts/sandbox-workspace-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-workspace-regression.mjs --log-level=warning && node .tmp/sandbox-workspace-regression.mjs",
"test:sandbox:stdio": "npm run sandbox:build && node scripts/build-sandbox.mjs --probe && esbuild scripts/sandbox-stdio-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-stdio-regression.mjs --log-level=warning && node .tmp/sandbox-stdio-regression.mjs",
"test:sandbox:read-bridge": "npm run sandbox:build && esbuild scripts/sandbox-read-bridge-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-read-bridge-regression.mjs --log-level=warning && node .tmp/sandbox-read-bridge-regression.mjs",
"test:sandbox:read-protocol": "esbuild scripts/sandbox-read-protocol-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-read-protocol-regression.mjs --log-level=warning && node .tmp/sandbox-read-protocol-regression.mjs",
"test:sandbox:process": "npm run sandbox:build && esbuild scripts/sandbox-process-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-process-regression.mjs --log-level=warning && node .tmp/sandbox-process-regression.mjs",
"test:sandbox:git": "npm run sandbox:build && esbuild scripts/sandbox-git-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-git-regression.mjs --log-level=warning && node .tmp/sandbox-git-regression.mjs",
"test:sandbox:git:prepare": "npm ci --prefix scripts/fixtures/git-transport --ignore-scripts --no-audit --no-fund",
"test:sandbox:git:complete": "npm run test:sandbox:git:prepare && npm run build && esbuild scripts/sandbox-git-complete-regression.ts scripts/sandbox-git-safety-regression.ts scripts/sandbox-git-remote-regression.ts --bundle --platform=node --format=esm --outdir=.tmp/git-complete-tests --out-extension:.js=.mjs --log-level=warning && node .tmp/git-complete-tests/sandbox-git-complete-regression.mjs && node .tmp/git-complete-tests/sandbox-git-safety-regression.mjs && node .tmp/git-complete-tests/sandbox-git-remote-regression.mjs && node scripts/verify-sandbox-app.cjs",
"test:sandbox:bundled-git": "npm run sandbox:build && esbuild scripts/sandbox-bundled-git-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/sandbox-bundled-git-regression.mjs --log-level=warning && node .tmp/sandbox-bundled-git-regression.mjs",
"sandbox:maintain": "node scripts/sandbox-maintain.mjs",
"start": "electron-vite preview",
"typecheck": "tsc --noEmit -p tsconfig.node.json && tsc --noEmit -p tsconfig.web.json",
"check:tokens": "node scripts/check-design-tokens.mjs",
"test:settings-performance": "node scripts/verify-settings-performance.cjs",
"models:sync-metadata": "node scripts/sync-model-metadata.mjs",
"test:custom-models": "esbuild scripts/custom-model-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/custom-model-regression.mjs --log-level=warning && node .tmp/custom-model-regression.mjs",
"test:custom-model-native": "esbuild scripts/custom-model-native-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/custom-model-native-regression.mjs --log-level=warning && node .tmp/custom-model-native-regression.mjs",
"test:model-metadata": "esbuild scripts/model-metadata-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/model-metadata-regression.mjs --log-level=warning && node .tmp/model-metadata-regression.mjs",
"test:custom-model-settings": "node scripts/verify-custom-model-settings.cjs",
"smoke": "esbuild scripts/smoke.ts --bundle --platform=node --format=esm --outfile=.tmp/smoke.mjs --log-level=warning && node .tmp/smoke.mjs",
"test:omp": "esbuild scripts/omp-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/omp-regression.mjs --log-level=warning && node .tmp/omp-regression.mjs",
"test:omp-session": "esbuild scripts/omp-session-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/omp-session-regression.mjs --log-level=warning && node .tmp/omp-session-regression.mjs",
"test:chat": "esbuild scripts/message-order-regression.ts scripts/chat-store-regression.ts scripts/chat-stream-committer-regression.ts scripts/tool-output-regression.ts --bundle --platform=node --format=esm --out-extension:.js=.mjs --outdir=.tmp/chat-tests --log-level=warning && node .tmp/chat-tests/message-order-regression.mjs && node .tmp/chat-tests/chat-store-regression.mjs && node .tmp/chat-tests/chat-stream-committer-regression.mjs && node .tmp/chat-tests/tool-output-regression.mjs",
"test:context-usage": "esbuild scripts/context-usage-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/context-usage-regression.mjs --log-level=error && node .tmp/context-usage-regression.mjs",
"test:browser-automation": "node scripts/browser-automation-regression.cjs",
"test:subagents": "esbuild scripts/subagent-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/subagent-regression.mjs --log-level=warning && node .tmp/subagent-regression.mjs",
"test:subagents:app": "node scripts/subagent-app-regression.cjs",
"test:subagents:display": "esbuild scripts/subagent-display-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/subagent-display-regression.mjs --log-level=warning && node .tmp/subagent-display-regression.mjs",
"test:subagents:ui": "node scripts/verify-subagent-display.cjs",
"test:context-observer": "esbuild scripts/context-observer-transport-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/context-observer-transport-regression.mjs --log-level=warning && node .tmp/context-observer-transport-regression.mjs",
"test:references": "esbuild scripts/reference-content-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --outfile=.tmp/reference-content-regression.cjs --log-level=error && node .tmp/reference-content-regression.cjs",
"test:expert-usage": "esbuild scripts/expert-usage-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/expert-usage-regression.mjs --log-level=warning && node .tmp/expert-usage-regression.mjs",
"test:markdown": "esbuild scripts/markdown-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --outfile=.tmp/markdown-regression.cjs --log-level=warning && node .tmp/markdown-regression.cjs",
"test:recovered": "esbuild scripts/recovered-parser-regression.ts scripts/source-projection-regression.ts scripts/code-block-regression.tsx scripts/incremental-markdown-regression.ts scripts/math-renderer-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --out-extension:.js=.cjs --outdir=.tmp/recovered-tests --log-level=warning && node .tmp/recovered-tests/recovered-parser-regression.cjs && node .tmp/recovered-tests/source-projection-regression.cjs && node .tmp/recovered-tests/code-block-regression.cjs && node .tmp/recovered-tests/incremental-markdown-regression.cjs && node .tmp/recovered-tests/math-renderer-regression.cjs",
"recover:chat-reference": "node scripts/rea/recover-chat-reference.mjs",
"test:persistence": "esbuild scripts/chat-persistence-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/chat-persistence-regression.mjs --log-level=warning && node .tmp/chat-persistence-regression.mjs",
"test:sessions": "esbuild scripts/session-store-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/session-store-regression.mjs --log-level=warning && node .tmp/session-store-regression.mjs",
"shot": "node scripts/shot.mjs",
"icon:build": "node scripts/gen-icon.mjs",
"dist": "npm run omp:vendor && npm run build && electron-builder --win dir",
"dist:installer": "npm run omp:vendor && npm run build && electron-builder --win nsis",
"verify:ui": "node scripts/verify-ui.mjs",
"wb:capture": "node scripts/wb-capture.mjs 9223 .tmp/wb-capture",
"test:media": "esbuild scripts/mermaid-regression.ts --bundle --platform=node --format=esm --packages=external --jsx=automatic --loader:.css=empty --outfile=.tmp/media-tests/mermaid-regression.mjs --log-level=warning && node .tmp/media-tests/mermaid-regression.mjs && esbuild scripts/image-renderer-regression.tsx scripts/path-renderer-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --out-extension:.js=.cjs --outdir=.tmp/media-tests --log-level=warning && node .tmp/media-tests/image-renderer-regression.cjs && node .tmp/media-tests/path-renderer-regression.cjs",
"test:resources": "esbuild scripts/resource-bridge-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/resource-bridge-regression.mjs --log-level=warning && node .tmp/resource-bridge-regression.mjs",
"recover:typography": "node scripts/rea/recover-typography-reference.mjs",
"test:font-size": "esbuild scripts/font-size-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/font-size-regression.mjs --log-level=warning && node .tmp/font-size-regression.mjs",
"test:conversation": "esbuild scripts/conversation-renderer-regression.tsx scripts/composer-regression.tsx scripts/conversation-runtime-regression.ts scripts/completed-fold-regression.tsx scripts/streaming-footer-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=text --out-extension:.js=.cjs --outdir=.tmp/conversation-tests --log-level=error && node .tmp/conversation-tests/conversation-renderer-regression.cjs && node .tmp/conversation-tests/composer-regression.cjs && node .tmp/conversation-tests/conversation-runtime-regression.cjs && node .tmp/conversation-tests/streaming-footer-regression.cjs && node .tmp/conversation-tests/completed-fold-regression.cjs",
"test:workbench-escape": "esbuild scripts/workbench-escape-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/workbench-escape-regression.mjs --log-level=warning && node .tmp/workbench-escape-regression.mjs",
"test:assistant-footer": "esbuild scripts/assistant-message-footer-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --outfile=.tmp/assistant-message-footer-regression.cjs --log-level=error && node .tmp/assistant-message-footer-regression.cjs",
"test:omp-protocol": "esbuild scripts/omp-protocol-probe.ts --bundle --platform=node --format=esm --outfile=.tmp/omp-protocol-probe.mjs --log-level=warning && node .tmp/omp-protocol-probe.mjs",
"omp:vendor": "node scripts/vendor-omp.mjs",
"omp:verify": "node scripts/vendor-omp.mjs --verify",
"test:omp:bundled": "esbuild scripts/omp-bundled-path-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/omp-bundled-path-regression.mjs --log-level=warning && node .tmp/omp-bundled-path-regression.mjs && node scripts/verify-bundled-omp.cjs",
"test:conversation-ipc": "esbuild scripts/conversation-ipc-regression.ts --bundle --platform=node --format=esm --external:esbuild --outfile=.tmp/conversation-ipc-regression.mjs --log-level=warning && node .tmp/conversation-ipc-regression.mjs",
"test:personalization": "esbuild scripts/personalization-prompt-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/personalization-prompt-regression.mjs --log-level=warning && node .tmp/personalization-prompt-regression.mjs",
"test:memory": "node scripts/verify-memory-settings.cjs",
"test:remediation": "esbuild scripts/remediation-pure-regression.ts scripts/chat-completions-usage-regression.ts --bundle --platform=node --format=esm --out-extension:.js=.mjs --outdir=.tmp/remediation-tests --log-level=warning && node .tmp/remediation-tests/remediation-pure-regression.mjs && node .tmp/remediation-tests/chat-completions-usage-regression.mjs",
"test:task-window": "node scripts/verify-task-window-stream.cjs",
"test:archived-tasks": "node scripts/verify-archived-tasks.cjs",
"test:task-running": "node scripts/verify-task-running-menu.cjs",
"test:app-discover": "node scripts/verify-app-discover.cjs",
"test:automations": "esbuild scripts/automation-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/automation-regression.mjs --log-level=warning && node .tmp/automation-regression.mjs",
"test:library": "esbuild scripts/library-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/library-regression.mjs --log-level=warning && node .tmp/library-regression.mjs",
"test:library-ui": "esbuild scripts/library-ui-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --loader:.svg=dataurl --outfile=.tmp/library-ui-regression.cjs --log-level=warning && node .tmp/library-ui-regression.cjs",
"test:module-ui": "node scripts/verify-module-ui-parity.cjs",
"test:project-tasks": "esbuild scripts/project-task-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/project-task-regression.mjs --log-level=warning && node .tmp/project-task-regression.mjs",
"test:three-modules": "node scripts/verify-three-modules.cjs",
"recover:artifact-reference": "node scripts/rea/recover-artifact-reference.mjs",
"test:artifacts": "esbuild scripts/artifact-diff-regression.ts scripts/artifact-renderer-regression.tsx scripts/specialized-block-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=empty --out-extension:.js=.cjs --outdir=.tmp/artifact-tests --log-level=warning && node .tmp/artifact-tests/artifact-diff-regression.cjs && node .tmp/artifact-tests/artifact-renderer-regression.cjs && node .tmp/artifact-tests/specialized-block-regression.cjs",
"recover:conversation-labels": "node scripts/rea/recover-conversation-labels.mjs",
"rea:css:prepare": "node scripts/rea/prepare-css-runtime.mjs",
"rea:css:capture": "node scripts/rea/capture-css.mjs",
"recover:css-reference": "node scripts/rea/export-css-reference.mjs",
"test:rea-css": "node scripts/rea/css-capture-regression.mjs && node scripts/rea/css-runtime-contract-regression.mjs && node scripts/rea/visual-capture-regression.mjs && node scripts/rea/visual-probe-regression.mjs && node scripts/rea/visual-probe-budget-regression.mjs && node scripts/rea/media-assets-regression.mjs && node scripts/rea/selected-artifact-text-regression.mjs && node scripts/rea/css-mcp-regression.mjs && node scripts/rea/css-runtime-integrity.mjs",
"test:rea-visual-live": "node scripts/rea/visual-probe-live-regression.mjs",
"test:visual-pixels": "node scripts/rea/compare-visual-pixels.mjs --self-test",
"test:font-platform": "node scripts/rea/capture-ycode-font-platform-fixture.mjs && node scripts/rea/verify-font-platform-parity.mjs .tmp/ycode-font-platform-selftest-reference.json .tmp/ycode-font-platform-selftest-result.json",
"verify:previews": "node scripts/verify-conversation-previews.cjs",
"test:pierre": "node scripts/rea/test-recovered-pierre-diff.mjs",
"test:tool-virtualizer": "node scripts/rea/test-recovered-tool-virtualizer.mjs",
"verify:pierre": "node scripts/verify-pierre-diff.cjs",
"rea:visual:capture": "node scripts/rea/capture-css.mjs --visuals",
"recover:conversation-styles": "node scripts/rea/recover-conversation-styles.mjs && node scripts/rea/recover-composer-styles.mjs && node scripts/rea/recover-question-styles.mjs && node scripts/rea/recover-task-styles.mjs && node scripts/rea/recover-tool-result-styles.mjs && node scripts/rea/recover-artifact-styles.mjs",
"recover:streaming-footer": "node scripts/rea/recover-streaming-loading-tips.mjs && node scripts/rea/recover-streaming-footer-styles.mjs",
"recover:conversation-icons": "node scripts/rea/recover-action-icons.mjs && node scripts/rea/recover-runtime-icons.mjs && node scripts/rea/recover-question-icons.mjs && node scripts/rea/recover-approval-icon.mjs",
"recover:modern-conversation-labels": "node scripts/rea/recover-modern-conversation-labels.mjs",
"test:modern-conversation-labels": "node scripts/rea/modern-conversation-labels-regression.mjs",
"test:tool-approvals": "esbuild scripts/tool-approval-regression.tsx --bundle --platform=node --format=cjs --jsx=automatic --loader:.css=text --outfile=.tmp/tool-approval-regression.cjs --log-level=error && node .tmp/tool-approval-regression.cjs",
"verify:conversation-states": "node scripts/verify-conversation-states.cjs",
"recover:fold-summary": "node scripts/rea/recover-fold-summary.mjs",
"test:fold-summary": "node scripts/rea/recovered-fold-summary-regression.mjs",
"test:tool-styles": "node scripts/rea/tool-result-styles-regression.mjs",
"test:workbuddy-import": "esbuild scripts/workbuddy-import-regression.ts --bundle --platform=node --format=esm --outfile=.tmp/workbuddy-import-regression.mjs --log-level=warning && node .tmp/workbuddy-import-regression.mjs",
"test:rea-conversation": "node scripts/rea/selected-conversation-regression.mjs"
},
"dependencies": {
"@floating-ui/react": "0.27.20",
"@modelcontextprotocol/sdk": "^1.32.1",
"@xterm/addon-fit": "0.11.0",
"@xterm/xterm": "6.0.0",
"dompurify": "3.4.17",
"fflate": "^0.8.3",
"get-east-asian-width": "^1.4.0",
"html-react-parser": "^6.1.8",
"katex": "0.16.47",
"markdown-it": "^14.1.0",
"markdown-it-texmath": "^1.0.0",
"mermaid": "11.17.2",
"node-pty": "1.1.0",
"prismjs": "^1.30.0",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"rrule": "^2.8.1",
"slate": "0.143.0",
"slate-dom": "0.142.0",
"slate-history": "0.140.0",
"slate-react": "0.142.0",
"svg-pan-zoom": "3.6.2",
"yaml": "^2.9.1",
"zustand": "^5.0.15"
},
"devDependencies": {
"@babel/generator": "^8.0.6",
"@babel/parser": "^8.0.7",
"@resvg/resvg-js": "^2.6.2",
"@types/katex": "^0.16.8",
"@types/markdown-it": "^14.2.0",
"@types/node": "^26.6.5",
"@types/prismjs": "^1.26.6",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"@types/svg-pan-zoom": "^3.3.0",
"@vitejs/plugin-react": "^6.1.2",
"electron": "^37.10.3",
"electron-builder": "^26.15.3",
"electron-vite": "^5.0.0",
"postcss": "8.5.30",
"typescript": "^7.0.2",
"vite": "^8.3.4"
},
"build": {
"appId": "com.ycode.app",
"productName": "YCode",
"directories": {
"output": "release",
"buildResources": "build"
},
"files": [
"out/**/*",
"package.json"
],
"npmRebuild": false,
"extraResources": [
{ "from": "resources/model-metadata", "to": "model-metadata", "filter": ["models.dev.json", "manifest.json", "LICENSE"] },
{
"from": "resources/omp",
"to": "omp",
"filter": ["omp.exe", "LICENSE", "THIRD-PARTY-NOTICES.txt", "runtime.lock.json"]
},
{
"from": "resources/sandbox/win32-x64",
"to": "sandbox/win32-x64",
"filter": [
"ycode-sandbox.exe",
"node-bridge.cjs",
"node-process.cjs",
"python-sitecustomize.py",
"git/**/*",
"manifest.json"
]
},
{
"from": "resources/icon.png",
"to": "icon.png"
},
{
"from": "resources/tray.png",
"to": "tray.png"
}
],
"win": {
"icon": "build/icon.ico",
"artifactName": "YCode-v0.01-Setup-${arch}.${ext}",
"target": [
"dir"
]
},
"nsis": {
"oneClick": false,
"perMachine": false,
"allowToChangeInstallationDirectory": true,
"deleteAppDataOnUninstall": false,
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "YCode"
}
}
}