feat: complete WorkBuddy parity and Windows release workflow

This commit is contained in:
xiaohan.yuan committed 2026-10-18 12:45:21 +08:00
1 parent 143516b3a8
commit d5512df549
434 files changed
+54977 -1854

No files matched your search

+122 -6
View File
@@ -1,6 +1,6 @@
{
"name": "ycode",
"version": "0.1.0",
"version": "0.0.1",
"private": true,
"description": "YCode - 个人 AI Agent 桌面应用(Electron)",
"author": "YCode",
@@ -8,13 +8,46 @@
"scripts": {
"dev": "electron-vite dev",
"dev:renderer": "electron-vite dev --rendererOnly",
"build": "npm run typecheck && electron-vite build",
"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: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",
"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: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",
@@ -22,17 +55,36 @@
"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: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",
@@ -48,8 +100,8 @@
"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-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",
@@ -78,6 +130,11 @@
"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"
@@ -85,6 +142,7 @@
"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",
@@ -94,9 +152,67 @@
"@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"
}
}
}