Repository navigation
Expand file tree
/
Copy pathpackage.json
More file actions
256 lines (256 loc) · 16.3 KB
/
Copy pathpackage.json
File metadata and controls
256 lines (256 loc) · 16.3 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
{
"name": "@portel/photon",
"version": "1.38.1",
"description": "Build MCP servers, CLI tools, and web dashboards for AI agents from a single TypeScript file.",
"type": "module",
"packageManager": "bun@1.2.20",
"main": "dist/index.js",
"bin": {
"photon": "bin/photon"
},
"files": [
"bin",
"dist",
"templates"
],
"scripts": {
"prepare": "git config core.hooksPath .githooks || true",
"build": "eslint src/ --quiet && tsc && cp -r src/photons dist/ && chmod +x dist/cli.js && node scripts/build-beam.mjs",
"dev": "tsc --watch",
"docs:sync": "node scripts/sync-docs-site.mjs",
"docs:dev": "bun run docs:sync && vitepress dev docs-site",
"docs:build": "bun run docs:sync && vitepress build docs-site && node scripts/fix-docs-site-build.mjs",
"docs:preview": "vitepress preview docs-site",
"lint": "eslint src/",
"lint:fix": "eslint src/ --fix",
"knip": "knip",
"format": "prettier --write \"src/**/*.ts\"",
"format:check": "prettier --check \"src/**/*.ts\"",
"typecheck": "tsc --noEmit",
"build:beam": "node scripts/build-beam.mjs",
"watch:beam": "node scripts/build-beam.mjs --watch",
"dev:beam": "bun run build && bun run build:beam && (trap 'kill 0' EXIT; tsc --watch --preserveWatchOutput & node scripts/build-beam.mjs --watch & sleep 1 && tsx watch src/cli.ts beam)",
"prepublishOnly": "bun run verify:publish-version && node -e \"const p=require('./package.json'); if(JSON.stringify(p.dependencies).includes('file:')) { console.error('ERROR: file: dependency found.'); process.exit(1); }\" && node -e \"const fs=require('fs'),path=require('path'); const p=require('./package.json'); for(const d of Object.keys(p.dependencies||{})){const t=path.join('node_modules',d); if(fs.lstatSync(t).isSymbolicLink()){console.error('ERROR: '+d+' is linked. Run: bun remove '+d+' && bun add '+d); process.exit(1);}}\" && bun run build && bun run build:beam",
"test": "bash scripts/run-tests.sh",
"test:chain": "bun run test:all",
"test:all": "bun run build && bun run test:security && bun run test:schema && bun run test:marketplace && bun run test:loader && bun run test:server && bun run test:websocket && bun run test:integration && bun run test:byte-compat && bun run test:format-registry && bun run test:content-negotiation && bun run test:mcp-oauth-2026 && bun run test:mcp-wire && bun run test:mcp-input && bun run test:mcp-schema && bun run test:mcp-errors && bun run test:mcp-routing-headers && bun run test:mcp-multi-round && bun run test:mcp-tasks-extension && bun run test:mcp-observability-2026 && bun run test:mcp-stateless-resilience-2026 && bun run test:mcp-stateless-load-2026 && bun run test:ui-resources && bun run test:client-adaptive && bun run test:zero-config && bun run test:mcp-config && bun run test:cli && bun run test:release-ref-guard && bun run test:intent && bun run test:logger && bun run test:error-handler && bun run test:validation && bun run test:bridge && bun run test:beam-web-routes && bun run test:daemon-pubsub && bun run test:daemon-buffer && bun run test:instance-drift && bun run test:daemon-watcher && bun run test:ui-rendering && bun run test:beam:port-hosting && bun run test:photon-instance-manager && bun run test:viewport-aware-proxy && bun run test:viewport-manager && bun run test:pagination-integration && bun run test:pagination-performance && tsx tests/pagination-phase5.test.ts && tsx tests/pagination-phase5c.test.ts && tsx tests/pagination-phase5d.test.ts && tsx tests/phase6a-service-worker.test.ts && tsx tests/phase6b-offline-state.test.ts && tsx tests/phase6c-offline-sync.test.ts && tsx tests/phase6d-integration.test.ts && tsx tests/promises.test.ts && bun run test:cf-bindings && bun run test:cf-runtime && bun run test:cf-overrides && bun run test:cf-deploy && bun run test:cf-mcp-bearer && bun run test:readme",
"test:daemon-watcher": "tsx tests/daemon-watcher.test.ts && tsx tests/schedule-missed-fire.test.ts",
"test:instance-drift": "tsx tests/instance-drift.test.ts",
"test:photon-instance-manager": "vitest run tests/photon-instance-manager.test.ts",
"test:cf-bindings": "vitest run tests/cf-bindings-parser.test.ts",
"test:cf-runtime": "vitest run tests/cf-runtime-kv.test.ts",
"test:cf-overrides": "vitest run tests/cf-overrides.test.ts",
"test:cf-deploy": "vitest run tests/cf-deploy-toml.test.ts tests/cf-host-workflow.test.ts tests/cf-generated-worker.test.ts tests/cf-template-emit-flush.test.ts --exclude '.claude/worktrees/**'",
"test:cf-mcp-bearer": "vitest run tests/cf-mcp-bearer.test.ts",
"test:viewport-aware-proxy": "vitest run tests/viewport-aware-proxy.test.ts",
"test:viewport-manager": "vitest run tests/viewport-manager.test.ts",
"test:pagination-integration": "vitest run tests/pagination-integration.test.ts",
"test:pagination-performance": "vitest run tests/pagination-performance.test.ts",
"test:multi-client-pagination": "bun run build && tsx tests/multi-client-pagination.test.ts",
"test:security": "tsx tests/security.test.ts",
"test:zero-config": "tsx tests/zero-config.test.ts",
"test:mcp-config": "tsx tests/mcp-configuration.test.ts",
"test:coverage": "bun run build && c8 --include='dist/**/*.js' --reporter=text --reporter=html bun run test:unit",
"test:unit": "tsx tests/schema-extractor.test.ts && tsx tests/marketplace-manager.test.ts && tsx tests/loader.test.ts && tsx tests/loader.comprehensive.test.ts && tsx tests/server.test.ts && tsx tests/server.comprehensive.test.ts && tsx tests/cli-runner.test.ts && tsx tests/cli.comprehensive.test.ts && tsx tests/logger.test.ts && tsx tests/error-handler.test.ts && tsx tests/validation.test.ts && tsx tests/daemon-pubsub.test.ts && tsx tests/shared-utils.test.ts",
"test:cli:comprehensive": "tsx tests/cli.comprehensive.test.ts",
"test:loader:comprehensive": "tsx tests/loader.comprehensive.test.ts",
"test:server:comprehensive": "tsx tests/server.comprehensive.test.ts",
"test:daemon-pubsub": "tsx tests/daemon-pubsub.test.ts",
"test:daemon-buffer": "tsx tests/daemon-event-buffer.test.ts",
"test:bridge": "bun run test:bridge:generation && bun run test:bridge:protocol && bun run test:bridge:beam && bunx vitest run tests/theme-token-runtime.test.ts",
"test:bridge:generation": "tsx tests/bridge/bridge-generation.test.ts",
"test:bridge:protocol": "tsx tests/bridge/protocol.test.ts",
"test:bridge:beam": "bash scripts/run-ts-test.sh tests/bridge/beam-integration.test.ts",
"test:beam-web-routes": "bash scripts/run-ts-test.sh tests/beam-web-route-matching.test.ts",
"test:cli": "tsx tests/cli-runner.test.ts && tsx tests/ps-parse-target.test.ts",
"test:intent": "tsx tests/intent-contract.test.ts",
"test:logger": "tsx tests/logger.test.ts",
"test:error-handler": "tsx tests/error-handler.test.ts",
"test:validation": "tsx tests/validation.test.ts",
"test:version-notify": "tsx tests/version-notify.test.ts",
"test:streamable-http": "tsx tests/streamable-http-transport.test.ts",
"test:mcp-oauth-2026": "tsx tests/oauth.test.ts && tsx tests/auth-endpoints.test.ts && tsx tests/serv-http-auth.test.ts && bun tests/sqlite-stores.test.ts && tsx tests/streamable-http-transport.test.ts && tsx tests/integration.test.ts && tsx tests/oauth-auth-tags.extractor.test.ts && tsx tests/oauth-auth-tags.editor.test.ts && tsx tests/oauth-role-conformance-loader.test.ts && tsx tests/oauth-role-conformance-server.test.ts && tsx tests/oauth-role-conformance-gaps.test.ts && vitest run tests/runtime-oauth.test.ts tests/cf-mcp-oauth-codegen.test.ts --exclude '.claude/worktrees/**'",
"test:passkey-virtual": "tsx tests/passkey-virtual.e2e.ts",
"test:mcp-wire": "bun tests/mcp-wire-adapter.golden.test.ts",
"test:mcp-input": "tsx tests/mcp-input.test.ts && tsx tests/mcp-client-sdk.test.ts",
"test:mcp-schema": "node tests/mcp-json-schema-2020-12.test.ts",
"test:mcp-errors": "node tests/mcp-error-semantics.test.ts",
"test:mcp-routing-headers": "node tests/mcp-routing-headers.test.ts",
"test:mcp-multi-round": "node tests/mcp-request-state.test.ts && tsx tests/mcp-multi-round-http.test.ts",
"test:mcp-tasks-extension": "tsx tests/mcp-tasks-extension.test.ts",
"test:mcp-observability-2026": "tsx tests/mcp-observability-2026.test.ts",
"test:mcp-stateless-resilience-2026": "tsx tests/mcp-stateless-resilience-2026.test.ts",
"test:mcp-stateless-load-2026": "tsx tests/mcp-stateless-load-2026.test.ts",
"test:websocket": "vitest run tests/websocket-upgrade.test.ts --exclude '.claude/worktrees/**'",
"test:smoke": "tsx tests/smoke.test.ts",
"test:readme": "bash tests/readme-validation.sh",
"test:schema": "tsx tests/schema-extractor.test.ts",
"test:marketplace": "tsx tests/marketplace-manager.test.ts",
"test:github-ref": "tsx tests/github-ref-install.test.ts",
"test:loader": "tsx tests/loader.test.ts && tsx tests/runtime-config-store.test.ts",
"test:server": "tsx tests/server.test.ts && tsx tests/sse-client-app-fallback.test.ts",
"test:integration": "tsx tests/integration.test.ts",
"test:byte-compat": "RUN_E2E=1 vitest run tests/v128-byte-compat.test.ts --exclude '.claude/worktrees/**'",
"test:format-registry": "vitest run tests/format-registry.test.ts",
"test:content-negotiation": "RUN_E2E=1 vitest run tests/http-content-negotiation.test.ts",
"test:ui-resources": "tsx tests/ui-resources.test.ts",
"test:ui-rendering": "bash scripts/run-ts-test.sh --test tests/ui/result-rendering.test.ts",
"test:client-adaptive": "tsx tests/client-adaptive.test.ts",
"test:load": "bun run build && node --expose-gc --max-old-space-size=4096 node_modules/.bin/tsx tests/load-test.ts",
"test:sqlite": "bun run build && tsx tests/sqlite.test.ts",
"test:github": "bun run build && tsx tests/github-issues.integration.ts",
"test:beam": "bash scripts/run-package-script.sh build && bash scripts/run-ts-test.sh tests/beam/rendering.test.ts",
"test:beam:regressions": "bash scripts/run-package-script.sh build && bash scripts/run-ts-test.sh tests/beam/beam-integration-regressions.test.ts",
"test:beam:port-hosting": "bash scripts/run-ts-test.sh tests/beam/port-hosting-regressions.test.ts",
"test:e2e": "bun run build && playwright test",
"test:e2e:ui": "bun run build && playwright test --ui",
"test:visual": "bash scripts/run-package-script.sh build && bash scripts/run-package-script.sh build:beam && bash scripts/run-ts-test.sh tests/beam/visual/visual.test.ts",
"test:layout-lab": "bun run build && tsx tests/contract/layout-lab.test.ts",
"test:contracts": "tsx tests/contract/format-coverage.test.ts && tsx tests/contract/schema-contract.test.ts && tsx tests/contract/render-dom.test.ts && tsx tests/contract/security-posture.test.ts && tsx tests/contract/coverage-gate.test.ts",
"test:conformance": "bun run test:photon-conformance",
"test:photon-conformance": "bun run build && tsx tests/conformance/conformance.test.ts",
"test:mcp-sdk-boundary": "tsx tests/mcp-sdk-boundary.test.ts",
"test:mcp-sdk-v2": "bun run build && tsx tests/mcp-sdk-v2-negotiation.test.ts && tsx tests/mcp-beam-sdk.test.ts",
"test:mcp-apps-contract": "bun run build && tsx tests/ui-resources.test.ts && tsx tests/client-adaptive.test.ts && tsx tests/bridge/protocol.test.ts && tsx tests/bridge/beam-integration.test.ts",
"test:mcp-sdk-compat": "bun run test:mcp-sdk-boundary && bun run test:photon-conformance && bun run test:mcp-apps-contract",
"test:mcp-official-conformance": "bun run build && tsx tests/conformance/official-runner.ts",
"test:mcp-docs": "bun run build && tsx tests/mcp-documentation.test.ts",
"test:mcp-release": "bun run build && bun run test:mcp-sdk-boundary && bun run test:mcp-sdk-v2 && bun run test:mcp-wire && bun run test:mcp-schema && bun run test:mcp-errors && bun run test:mcp-routing-headers && bun run test:mcp-multi-round && bun run test:mcp-tasks-extension && bun run test:mcp-observability-2026 && bun run test:mcp-stateless-resilience-2026 && bun run test:mcp-stateless-load-2026 && bun run test:mcp-oauth-2026 && bun run test:photon-conformance && bun run test:mcp-apps-contract && bun run test:mcp-docs && bun run test:mcp-official-conformance",
"test:a2ui": "bun run build && tsx tests/a2ui-mapper.test.ts && tsx tests/a2ui-e2e.test.ts && tsx tests/a2ui-renderer-script.test.ts",
"test:dom": "bun run build && bun run build:beam && tsx tests/contract/dom-structure.test.ts",
"test:promises": "bun run build && bun run build:beam && tsx tests/promises.test.ts",
"release": "release-it",
"release:minor": "release-it minor",
"release:major": "release-it major",
"release:patch": "release-it patch",
"release:dry": "release-it --dry-run",
"test:release-ref-guard": "tsx tests/release-ref-guard.test.ts",
"test:pagination-phase5": "bun run build && tsx tests/pagination-phase5.test.ts",
"test:pagination-phase5c": "bun run build && tsx tests/pagination-phase5c.test.ts",
"test:pagination-phase5d": "bun run build && tsx tests/pagination-phase5d.test.ts",
"test:phase6a": "bun run build && tsx tests/phase6a-service-worker.test.ts",
"test:phase6b": "bun run build && tsx tests/phase6b-offline-state.test.ts",
"test:phase6c": "bun run build && tsx tests/phase6c-offline-sync.test.ts",
"test:phase6d": "bun run build && tsx tests/phase6d-integration.test.ts",
"verify:publish-version": "node scripts/verify-publish-version.mjs"
},
"keywords": [
"mcp",
"mcp-server",
"mcp-apps",
"model-context-protocol",
"ai-agents",
"ai-tools",
"chatgpt",
"claude",
"claude-code",
"claude-desktop",
"cursor",
"photon",
"typescript",
"cli",
"web-dashboard",
"single-file",
"business-logic",
"convention-over-configuration",
"hot-reload",
"marketplace",
"developer-tools",
"enterprise"
],
"author": "Portel Dev",
"license": "MIT",
"dependencies": {
"@chenglou/pretext": "^0.0.7",
"@modelcontextprotocol/client": "2.0.0",
"@modelcontextprotocol/ext-apps": "1.7.5",
"@modelcontextprotocol/hono": "2.0.0",
"@modelcontextprotocol/node": "2.0.0",
"@modelcontextprotocol/sdk": "1.29.0",
"@modelcontextprotocol/server": "2.0.0",
"@portel/cli": "^1.1.0",
"@portel/photon-core": "^2.28.1",
"ajv": "^8.18.0",
"boxen": "^8.0.1",
"chalk": "^5.4.1",
"chart.js": "^4.5.1",
"chokidar": "^4.0.3",
"cli-highlight": "^2.1.11",
"cli-table3": "^0.6.5",
"commander": "^12.1.0",
"esbuild": "^0.28.0",
"fast-json-patch": "^3.1.1",
"json-schema-typed": "^8.0.2",
"miniflare": "^4.20260507.1",
"ora": "^9.3.0",
"qrcode": "^1.5.4",
"ws": "^8.18.0"
},
"optionalDependencies": {
"better-sqlite3": "^12.9.0"
},
"trustedDependencies": [
"better-sqlite3",
"esbuild"
],
"devDependencies": {
"@modelcontextprotocol/conformance": "0.2.0-alpha.10",
"@codemirror/autocomplete": "^6.20.0",
"@codemirror/commands": "^6.10.1",
"@codemirror/lang-javascript": "^6.2.4",
"@codemirror/state": "^6.5.4",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.39.12",
"@playwright/test": "^1.58.0",
"@release-it/conventional-changelog": "^11.0.0",
"@types/inquirer": "^9.0.9",
"@types/node": "^22.10.2",
"@types/qrcode": "^1.5.6",
"@types/ws": "^8.18.1",
"@typescript-eslint/eslint-plugin": "^8.56.0",
"@typescript-eslint/parser": "^8.56.0",
"autocannon": "^8.0.0",
"c8": "^11.0.0",
"codemirror": "^6.0.2",
"cron-parser": "^5.0.0",
"eslint": "^10.3.0",
"eslint-config-prettier": "^10.1.8",
"knip": "^6.13.1",
"lit": "^3.3.2",
"openapi-types": "^12.1.3",
"playwright": "^1.57.0",
"prettier": "^3.8.0",
"release-it": "^20.0.0",
"tsx": "^4.20.6",
"typescript": "^5.7.3",
"vitepress": "^1.6.4",
"vitest": "^4.1.5"
},
"overrides": {
"@hono/node-server": "^1.19.13",
"basic-ftp": "^6.0.1",
"brace-expansion": "^5.0.6",
"defu": "^6.1.7",
"express-rate-limit": "^8.2.2",
"fast-uri": "^3.1.2",
"flatted": "^3.4.2",
"handlebars": "^4.7.9",
"hono": "^4.12.18",
"ip-address": "^10.2.0",
"minimatch": "^10.2.1",
"path-to-regexp": "^8.4.2",
"picomatch": "^4.0.4"
},
"engines": {
"node": ">=20.0.0",
"bun": ">=1.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/portel-dev/photon.git"
},
"bugs": {
"url": "https://github.com/portel-dev/photon/issues"
},
"homepage": "https://photon.portel.dev/"
}