-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathpackage.json
More file actions
213 lines (213 loc) · 11.8 KB
/
Copy pathpackage.json
File metadata and controls
213 lines (213 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
{
"name": "craft-agent",
"version": "0.11.1",
"license": "Apache-2.0",
"description": "Claude Code-like agent for Craft documents",
"type": "module",
"private": true,
"trustedDependencies": [
"@sentry/cli",
"@vscode/ripgrep",
"electron",
"electron-winstaller",
"esbuild",
"koffi",
"protobufjs",
"sharp"
],
"workspaces": [
"packages/*",
"apps/*",
"!apps/online-docs"
],
"scripts": {
"test": "bun test && for f in $(find . -name '*.isolated.ts' -not -path './node_modules/*'); do bun test \"$f\" || exit 1; done",
"typecheck": "bun run typecheck:shared",
"typecheck:shared": "cd packages/shared && bun run tsc --noEmit",
"typecheck:staged": "bash scripts/typecheck-staged.sh",
"typecheck:all": "cd packages/core && bun run tsc --noEmit && cd ../shared && bun run tsc --noEmit && cd ../server-core && bun run tsc --noEmit && cd ../server && bun run tsc --noEmit && cd ../session-tools-core && bun run tsc --noEmit && cd ../pi-agent-server && bun run typecheck && cd ../../apps/electron && bun run typecheck && cd ../../packages/ui && bun run tsc --noEmit",
"server:start": "bun run packages/server/src/index.ts",
"server:dev": "bun run server:build:subprocess && CRAFT_DEBUG=true CRAFT_BUNDLED_ASSETS_ROOT=$PWD/apps/electron bun run packages/server/src/index.ts",
"server:build": "bun run scripts/build-server.ts",
"server:build:linux-x64": "bun run scripts/build-server.ts --platform=linux --arch=x64 --compress",
"server:build:linux-arm64": "bun run scripts/build-server.ts --platform=linux --arch=arm64 --compress",
"server:build:darwin-arm64": "bun run scripts/build-server.ts --platform=darwin --arch=arm64 --compress",
"server:build:darwin-x64": "bun run scripts/build-server.ts --platform=darwin --arch=x64 --compress",
"typecheck:electron": "cd apps/electron && bun run typecheck",
"test:shared:llm-connections": "cd packages/shared && bun test tests/llm-connections.test.ts",
"test:shared:models-pi": "cd packages/shared && bun test tests/models-pi.test.ts",
"test:shared:config": "cd packages/shared && bun test src/config/__tests__/llm-connections.test.ts src/config/__tests__/storage-migrations.test.ts src/config/__tests__/storage-startup-migration.test.ts src/config/__tests__/default-thinking-level.test.ts",
"test:shared:all": "bun run test:shared:llm-connections && bun run test:shared:models-pi && bun run test:shared:config",
"test:doc-tools": "python3 -m unittest apps.electron.resources.scripts.tests.test_pdf_tool_smoke apps.electron.resources.scripts.tests.test_xlsx_tool_smoke apps.electron.resources.scripts.tests.test_docx_tool_smoke apps.electron.resources.scripts.tests.test_pptx_tool_smoke apps.electron.resources.scripts.tests.test_img_tool_smoke apps.electron.resources.scripts.tests.test_ical_tool_smoke apps.electron.resources.scripts.tests.test_doc_diff_smoke apps.electron.resources.scripts.tests.test_markitdown_smoke",
"validate:dev": "bun run typecheck:all && bun run test:shared:all && bun run test:doc-tools",
"validate:ci": "bun run validate:dev && bun run lint:i18n:parity && bun run lint:i18n:sorted && bun run lint:i18n:coverage",
"lint:ipc-sends": "bash scripts/check-raw-sends.sh",
"lint:tool-name-checks": "bash scripts/check-task-tool-checks.sh",
"lint:electron": "cd apps/electron && bun run lint",
"lint:shared": "cd packages/shared && npx eslint .",
"lint:ui": "cd packages/ui && npx eslint .",
"lint:i18n:staged": "bash scripts/lint-i18n-staged.sh",
"lint:i18n:strings": "bash scripts/lint-i18n-strings.sh",
"lint:i18n:parity": "bun run scripts/check-i18n-parity.ts",
"lint:i18n:coverage": "bun run scripts/check-i18n-coverage.ts",
"sort-locales": "bun scripts/sort-locales.ts",
"lint:i18n:sorted": "bun scripts/sort-locales.ts --check",
"lint": "bun run lint:ipc-sends && bun run lint:tool-name-checks && bun run lint:electron && bun run lint:shared && bun run lint:ui",
"link": "bun link",
"electron:clean": "bun run scripts/electron-clean.ts",
"electron:build:main": "bun run scripts/electron-build-main.ts",
"electron:build:preload": "bun run scripts/electron-build-preload.ts",
"electron:build:renderer": "bun run scripts/electron-build-renderer.ts",
"electron:build:resources": "bun run scripts/electron-build-resources.ts",
"build:wa-worker": "bun run scripts/build-wa-worker.ts",
"electron:build:assets": "cd apps/electron && bun scripts/copy-assets.ts",
"electron:build": "bun run electron:build:main && bun run electron:build:preload && bun run electron:build:renderer && bun run electron:build:resources && bun run electron:build:assets",
"electron:start": "bun run electron:build && electron apps/electron",
"electron:dev": "bun run scripts/electron-dev.ts",
"electron:dev:terminal": "bun run scripts/electron-dev.ts --terminal",
"electron:dev:menu": "bash scripts/electron-dev.sh",
"electron:dev:logs": "pgrep -f 'tail -f.*@craft-agent/electron/main.log' > /dev/null || osascript -e \"tell application \\\"Terminal\\\" to do script \\\"$PWD/scripts/tail-electron-logs.sh\\\"\"",
"sync-secrets": "bash scripts/sync-secrets.sh",
"fresh-start": "bun run scripts/fresh-start.ts",
"fresh-start:token": "bun run scripts/fresh-start.ts --token-only",
"print:system-prompt": "bun run packages/shared/src/prompts/print-system-prompt.ts",
"browser-tool": "bun run scripts/browser-tool.ts",
"electron:dist": "bun run electron:build && cd apps/electron && electron-builder --config electron-builder.yml",
"electron:dist:mac": "bun run electron:build && cd apps/electron && electron-builder --config electron-builder.yml --mac",
"electron:dist:win": "bun run electron:build && cd apps/electron && electron-builder --config electron-builder.yml --win",
"electron:dist:linux": "bun run electron:build && cd apps/electron && electron-builder --config electron-builder.yml --linux",
"electron:dist:dev:mac": "CSC_IDENTITY_AUTO_DISCOVERY=false CRAFT_DEV_RUNTIME=1 bun run electron:build && cd apps/electron && CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --config electron-builder.yml --mac",
"electron:dist:dev:win": "CRAFT_DEV_RUNTIME=1 bun run electron:build && cd apps/electron && electron-builder --config electron-builder.yml --win",
"electron:dist:dev:linux": "CRAFT_DEV_RUNTIME=1 bun run electron:build && cd apps/electron && electron-builder --config electron-builder.yml --linux",
"playground:dev": "lsof -ti:5173 | xargs kill -9 2>/dev/null; vite dev --config apps/electron/vite.config.ts --open /playground.html",
"viewer:dev": "lsof -ti:5174 | xargs kill -9 2>/dev/null; vite dev --config apps/viewer/vite.config.ts --open /s/tz5-13I84pwK_he",
"viewer:typecheck": "cd apps/viewer && bun run typecheck",
"viewer:build": "vite build --config apps/viewer/vite.config.ts",
"viewer:preview": "vite preview --config apps/viewer/vite.config.ts",
"webui:dev": "lsof -ti:5175 | xargs kill -9 2>/dev/null; vite dev --config apps/webui/vite.config.ts",
"webui:clean": "rm -rf apps/webui/dist",
"webui:build": "vite build --config apps/webui/vite.config.ts",
"webui:typecheck": "cd apps/webui && bun run typecheck",
"server:build:subprocess": "cd packages/session-mcp-server && bun run build && cd ../pi-agent-server && bun run build",
"server:prod": "bun run server:build:subprocess && bun run webui:build && CRAFT_WEBUI_DIR=apps/webui/dist CRAFT_BUNDLED_ASSETS_ROOT=$PWD/apps/electron bun run packages/server/src/index.ts",
"server:dev:webui": "bun run server:build:subprocess && bun run webui:build && CRAFT_WEBUI_DIR=apps/webui/dist CRAFT_WEBUI_PORT=3100 bun run server:dev",
"marketing:dev": "vite dev --config apps/marketing/vite.config.ts",
"marketing:build": "vite build --config apps/marketing/vite.config.ts",
"marketing:preview": "vite preview --config apps/marketing/vite.config.ts",
"docs:dev": "cd apps/online-docs && npm install && npx mintlify dev",
"build": "bun run scripts/build.ts",
"release": "bun run scripts/release.ts",
"check-version": "bun run scripts/check-version.ts",
"oss:sync": "bun run scripts/oss-sync.ts",
"prepare": "husky"
},
"devDependencies": {
"@aws-sdk/client-s3": "^3.947.0",
"@electron/packager": "^19.0.1",
"@rollup/rollup-win32-arm64-msvc": "^4.55.1",
"@sentry/vite-plugin": "^4.8.0",
"@tailwindcss/vite": "^4.1.18",
"@types/bun": "latest",
"@types/js-yaml": "^4.0.9",
"@types/katex": "^0.16.8",
"@types/linkify-it": "^5.0.0",
"@types/node": "^25.0.8",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@types/semver": "^7.7.1",
"@types/shell-quote": "^1.7.5",
"@types/uuid": "^11.0.0",
"@typescript-eslint/eslint-plugin": "^8.52.0",
"@typescript-eslint/parser": "^8.52.0",
"@vitejs/plugin-react": "^5.1.2",
"autoprefixer": "^10.4.23",
"concurrently": "^9.2.1",
"electron": "^39.2.7",
"electron-builder": "^26.0.12",
"esbuild": "^0.25.0",
"eslint": "^9.39.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.0.1",
"husky": "^9.1.7",
"openai": "^6.18.0",
"postcss": "^8.5.6",
"react-devtools-core": "^6.1.1",
"tailwindcss": "^4.1.18",
"tar": "^7.5.2",
"typescript": "^5.0.0",
"vite": "^6.2.4"
},
"dependencies": {
"@anthropic-ai/claude-agent-sdk": "0.3.197",
"@anthropic-ai/sdk": "^0.100.0",
"@dnd-kit/dom": "^0.4.0-beta-20260227032529",
"@dnd-kit/helpers": "^0.4.0-beta-20260227032529",
"@github/copilot-sdk": "^0.1.23",
"@earendil-works/pi-ai": "0.80.6",
"@earendil-works/pi-coding-agent": "0.80.6",
"@modelcontextprotocol/sdk": "^1.29.0",
"@radix-ui/react-avatar": "^1.1.11",
"@radix-ui/react-collapsible": "^1.1.12",
"@radix-ui/react-dropdown-menu": "^2.1.16",
"@radix-ui/react-scroll-area": "^1.2.10",
"@radix-ui/react-select": "^2.2.6",
"@radix-ui/react-separator": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"@radix-ui/react-tabs": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.8",
"@sentry/electron": "^7.7.0",
"@sentry/react": "^10.36.0",
"@shikijs/cli": "^3.19.0",
"@tailwindcss/typography": "^0.5.19",
"@tiptap/extension-bubble-menu": "^3.20.0",
"@tiptap/extension-file-handler": "^3.20.0",
"@tiptap/extension-image": "^3.20.0",
"@tiptap/extension-mathematics": "^3.20.0",
"@tiptap/extension-placeholder": "^3.20.0",
"@tiptap/extension-task-item": "^3.20.0",
"@tiptap/extension-task-list": "^3.20.0",
"@tiptap/markdown": "^3.20.0",
"@tiptap/react": "^3.20.0",
"@tiptap/starter-kit": "^3.20.0",
"@tiptap/suggestion": "^3.20.0",
"@vscode/ripgrep": "^1.17.1",
"beautiful-mermaid": "^1.1.3",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"date-fns": "^4.1.0",
"gray-matter": "^4.0.3",
"jotai": "^2.16.0",
"js-yaml": "^4.1.1",
"katex": "^0.16.33",
"linkify-it": "^5.0.0",
"lucide-react": "^0.561.0",
"marked": "^17.0.1",
"markitdown-js": "^0.0.14",
"open": "^11.0.0",
"prosemirror-highlight": "^0.15.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^10.1.0",
"react-resizable-panels": "^3.0.6",
"rehype-katex": "^7.0.1",
"rehype-raw": "^7.0.0",
"remark-gfm": "^4.0.1",
"remark-math": "^6.0.0",
"semver": "^7.7.3",
"shiki": "^3.19.0",
"tailwind-merge": "^3.4.0",
"tiptap-extension-code-block-shiki": "^1.0.0",
"tiptap-markdown": "^0.9.0",
"zod": "^4.0.0"
},
"optionalDependencies": {
"@img/sharp-darwin-arm64": "0.34.5",
"@img/sharp-darwin-x64": "0.34.5",
"@img/sharp-linux-arm64": "0.34.5",
"@img/sharp-linux-x64": "0.34.5",
"@img/sharp-libvips-darwin-arm64": "1.2.4",
"@img/sharp-libvips-darwin-x64": "1.2.4",
"@img/sharp-libvips-linux-arm64": "1.2.4",
"@img/sharp-libvips-linux-x64": "1.2.4"
}
}