create-skybridge 0.0.0-dev.1b451bd → 0.0.0-dev.1dc4da5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/index.js +134 -47
  4. package/dist/index.test.d.ts +1 -0
  5. package/dist/index.test.js +33 -0
  6. package/index.js +6 -1
  7. package/package.json +12 -10
  8. package/template/README.md +32 -71
  9. package/template/_gitignore +3 -192
  10. package/template/alpic.json +1 -2
  11. package/template/node_modules/.bin/mcp-inspector +21 -0
  12. package/template/node_modules/.bin/nodemon +21 -0
  13. package/template/node_modules/.bin/sb +21 -0
  14. package/template/node_modules/.bin/skybridge +21 -0
  15. package/template/node_modules/.bin/tsc +21 -0
  16. package/template/node_modules/.bin/tsserver +21 -0
  17. package/template/node_modules/.bin/tsx +21 -0
  18. package/template/node_modules/.bin/vite +21 -0
  19. package/template/nodemon.json +5 -0
  20. package/template/package.json +27 -12
  21. package/template/server/src/index.ts +16 -8
  22. package/template/server/src/server.ts +45 -60
  23. package/template/tsconfig.json +23 -0
  24. package/template/tsconfig.server.json +11 -0
  25. package/template/web/src/helpers.ts +1 -1
  26. package/template/web/src/index.css +140 -109
  27. package/template/web/src/widgets/magic-8-ball.tsx +24 -0
  28. package/template/web/vite.config.ts +3 -4
  29. package/template/.cursor/mcp.json +0 -7
  30. package/template/.nvmrc +0 -1
  31. package/template/.vscode/launch.json +0 -16
  32. package/template/.vscode/settings.json +0 -8
  33. package/template/.vscode/tasks.json +0 -14
  34. package/template/biome.json +0 -50
  35. package/template/docs/demo.gif +0 -0
  36. package/template/pnpm-lock.yaml +0 -408
  37. package/template/pnpm-workspace.yaml +0 -7
  38. package/template/server/nodemon.json +0 -5
  39. package/template/server/package.json +0 -37
  40. package/template/server/pnpm-lock.yaml +0 -3796
  41. package/template/server/src/env.ts +0 -12
  42. package/template/server/src/pokedex.ts +0 -148
  43. package/template/server/tsconfig.json +0 -17
  44. package/template/web/components.json +0 -22
  45. package/template/web/package.json +0 -33
  46. package/template/web/pnpm-lock.yaml +0 -2629
  47. package/template/web/src/components/ui/shadcn-io/spinner/index.tsx +0 -272
  48. package/template/web/src/utils.ts +0 -6
  49. package/template/web/src/widgets/pokemon.tsx +0 -203
  50. package/template/web/tsconfig.app.json +0 -34
  51. package/template/web/tsconfig.json +0 -13
  52. package/template/web/tsconfig.node.json +0 -26
@@ -1,194 +1,5 @@
1
- # =============================================================================
2
- # OPERATING SYSTEM FILES
3
- # =============================================================================
4
- .DS_Store
5
- .DS_Store?
6
- ._*
7
- .Spotlight-V100
8
- .Trashes
9
- ehthumbs.db
10
- Thumbs.db
11
-
12
- # =============================================================================
13
- # NODE.JS & PACKAGE MANAGERS
14
- # =============================================================================
15
1
  node_modules/
16
- npm-debug.log*
17
- yarn-debug.log*
18
- yarn-error.log*
19
- .pnpm-debug.log*
20
- .npm
21
- .pnp.js
22
- .pnp.cjs
23
- .pnp.mjs
24
- .pnp.json
25
- .pnp.ts
26
-
27
- # =============================================================================
28
- # TYPESCRIPT & JAVASCRIPT
29
- # =============================================================================
30
- *.tsbuildinfo
31
- .tscache/
32
- *.js.map
33
- *.mjs.map
34
- *.cjs.map
35
- *.d.ts.map
36
- *.d.ts
37
- !*.d.ts.template
38
- *.tgz
39
- .eslintcache
40
- .rollup.cache
41
-
42
- # =============================================================================
43
- # PYTHON
44
- # =============================================================================
45
- __pycache__/
46
- *.py[cod]
47
- *$py.class
48
- *.so
49
- .Python
50
- develop-eggs/
51
- eggs/
52
- .eggs/
53
- lib/
54
- lib64/
55
- parts/
56
- sdist/
57
- var/
58
- wheels/
59
- *.egg-info/
60
- .installed.cfg
61
- *.egg
62
- .pytest_cache/
63
- .coverage
64
- htmlcov/
65
- .tox/
66
- .venv
67
- venv/
68
- ENV/
69
-
70
- # =============================================================================
71
- # JAVA
72
- # =============================================================================
73
- *.class
74
- *.jar
75
- *.war
76
- *.nar
77
- *.ear
78
- hs_err_pid*
79
- target/
80
- .gradle/
81
-
82
- # =============================================================================
83
- # RUBY
84
- # =============================================================================
85
- *.gem
86
- *.rbc
87
- /.config
88
- /coverage/
89
- /InstalledFiles
90
- /pkg/
91
- /spec/reports/
92
- /spec/examples.txt
93
- /test/tmp/
94
- /test/version_tmp/
95
- /tmp/
96
- .byebug_history
97
-
98
- # =============================================================================
99
- # BUILD & DISTRIBUTION
100
- # =============================================================================
101
- build/
102
2
  dist/
103
- dist-ssr/
104
- out/
105
-
106
- # =============================================================================
107
- # COMPILED FILES
108
- # =============================================================================
109
- *.com
110
- *.dll
111
- *.exe
112
- *.o
113
-
114
- # =============================================================================
115
- # PACKAGE & ARCHIVE FILES
116
- # =============================================================================
117
- *.7z
118
- *.dmg
119
- *.gz
120
- *.iso
121
- *.rar
122
- *.tar
123
- *.tar.gz
124
- *.zip
125
-
126
- # =============================================================================
127
- # LOGS & DATABASES
128
- # =============================================================================
129
- *.log
130
- *.sql
131
- *.sqlite
132
- *.sqlite3
133
- logs/
134
-
135
- # =============================================================================
136
- # TESTING & COVERAGE
137
- # =============================================================================
138
- coverage/
139
- .nyc_output/
140
-
141
- # =============================================================================
142
- # CACHE & TEMPORARY FILES
143
- # =============================================================================
144
- .cache/
145
- .parcel-cache/
146
- *.bak
147
-
148
- # =============================================================================
149
- # ENVIRONMENT & CONFIGURATION
150
- # =============================================================================
151
- .env
152
- .env.local
153
- .env.development.local
154
- .env.test.local
155
- .env.production.local
156
- .sample-env
157
- sample.*
158
- !sample.template.*
159
- *.local
160
- mcp-servers.json
161
- mcp-config.json
162
-
163
- # =============================================================================
164
- # DEMO & EXAMPLE DIRECTORIES
165
- # =============================================================================
166
- demo/
167
- demos/
168
- example/
169
- examples/
170
- samples/
171
-
172
- # =============================================================================
173
- # GENERATED DOCUMENTATION
174
- # =============================================================================
175
- docs/api/
176
-
177
- # =============================================================================
178
- # EDITOR DIRECTORIES AND FILES
179
- # =============================================================================
180
- .vscode/*
181
- !.vscode/extensions.json
182
- .idea
183
- *.suo
184
- *.ntvs*
185
- *.njsproj
186
- *.sln
187
- *.sw?
188
-
189
- # =============================================================================
190
- # APPLICATION SPECIFIC
191
- # =============================================================================
192
- repomix-output*
193
- duckdata/
194
- .claude
3
+ .env*
4
+ .DS_store
5
+ *.tsbuildinfo
@@ -1,4 +1,3 @@
1
1
  {
2
- "$schema": "https://assets.alpic.ai/alpic.json",
3
- "buildOutputDir": "server/dist"
2
+ "$schema": "https://assets.alpic.ai/alpic.json"
4
3
  }
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/build/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/cli/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/inspector/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules/@modelcontextprotocol/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/@modelcontextprotocol+inspector@0.18.0_@types+node@25.0.3_@types+react-dom@19.2.3_@type_4be4554909ca0a790f3ece65616617d1/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
19
+ else
20
+ exec node "$basedir/../@modelcontextprotocol/inspector/cli/build/cli.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules/nodemon/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/nodemon@3.1.11/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../nodemon/bin/nodemon.js" "$@"
19
+ else
20
+ exec node "$basedir/../nodemon/bin/nodemon.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../skybridge/bin/run.js" "$@"
19
+ else
20
+ exec node "$basedir/../skybridge/bin/run.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules/skybridge/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/skybridge@0.26.1_@modelcontextprotocol+sdk@1.25.2_hono@4.11.3_zod@4.3.5__@types+node@25_735eb51dc660b44c8f8bd4f7ce48a0d2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../skybridge/bin/run.js" "$@"
19
+ else
20
+ exec node "$basedir/../skybridge/bin/run.js" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
19
+ else
20
+ exec node "$basedir/../typescript/bin/tsc" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
19
+ else
20
+ exec node "$basedir/../typescript/bin/tsserver" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/tsx@4.21.0/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../tsx/dist/cli.mjs" "$@"
19
+ else
20
+ exec node "$basedir/../tsx/dist/cli.mjs" "$@"
21
+ fi
@@ -0,0 +1,21 @@
1
+ #!/bin/sh
2
+ basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3
+
4
+ case `uname` in
5
+ *CYGWIN*|*MINGW*|*MSYS*)
6
+ if command -v cygpath > /dev/null 2>&1; then
7
+ basedir=`cygpath -w "$basedir"`
8
+ fi
9
+ ;;
10
+ esac
11
+
12
+ if [ -z "$NODE_PATH" ]; then
13
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules"
14
+ else
15
+ export NODE_PATH="/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/bin/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules/vite/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/vite@7.3.1_@types+node@25.0.3_jiti@2.6.1_lightningcss@1.30.2_terser@5.44.1_tsx@4.21.0_yaml@2.8.2/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/node_modules:$NODE_PATH"
16
+ fi
17
+ if [ -x "$basedir/node" ]; then
18
+ exec "$basedir/node" "$basedir/../vite/bin/vite.js" "$@"
19
+ else
20
+ exec node "$basedir/../vite/bin/vite.js" "$@"
21
+ fi
@@ -0,0 +1,5 @@
1
+ {
2
+ "watch": ["server/src"],
3
+ "ext": "ts,json",
4
+ "exec": "tsx server/src/index.ts"
5
+ }
@@ -4,20 +4,35 @@
4
4
  "private": true,
5
5
  "description": "Alpic MCP Server Template",
6
6
  "type": "module",
7
- "packageManager": "pnpm@10.18.3",
8
7
  "scripts": {
9
- "dev": "pnpm --filter @apps-sdk-template/server dev",
10
- "build": "pnpm web:build && rm -rf server/dist && pnpm --filter=@apps-sdk-template/server --prod deploy server/dist && cp -r web/dist server/dist/assets && pnpm --filter=@apps-sdk-template/server build",
11
- "lint": "biome ci",
12
- "start": "pnpm server:start",
13
- "inspector": "pnpm --filter @apps-sdk-template/server inspector",
14
- "server:build": "pnpm --filter @apps-sdk-template/server build",
15
- "server:start": "pnpm --filter @apps-sdk-template/server start",
16
- "web:build": "pnpm --filter @apps-sdk-template/web build",
17
- "web:preview": "pnpm --filter @apps-sdk-template/web preview"
8
+ "dev": "skybridge dev",
9
+ "build": "skybridge build",
10
+ "start": "skybridge start",
11
+ "inspector": "mcp-inspector http://localhost:3000/mcp"
12
+ },
13
+ "dependencies": {
14
+ "@modelcontextprotocol/sdk": "^1.25.2",
15
+ "cors": "^2.8.5",
16
+ "express": "^5.2.1",
17
+ "react": "^19.2.3",
18
+ "react-dom": "^19.2.3",
19
+ "skybridge": ">=0.26.1 <1.0.0",
20
+ "vite": "^7.3.1",
21
+ "zod": "^4.3.5"
18
22
  },
19
23
  "devDependencies": {
20
- "@biomejs/biome": "2.3.8",
21
- "tsx": "^4.19.4"
24
+ "@modelcontextprotocol/inspector": "^0.18.0",
25
+ "@skybridge/devtools": ">=0.26.1 <1.0.0",
26
+ "@types/cors": "^2.8.19",
27
+ "@types/express": "^5.0.6",
28
+ "@types/react": "^19.2.8",
29
+ "@types/react-dom": "^19.2.3",
30
+ "@vitejs/plugin-react": "^5.1.2",
31
+ "nodemon": "^3.1.11",
32
+ "tsx": "^4.21.0",
33
+ "typescript": "^5.9.3"
34
+ },
35
+ "engines": {
36
+ "node": ">=24.13.0"
22
37
  }
23
38
  }
@@ -1,8 +1,9 @@
1
+ import path from "node:path";
2
+ import { fileURLToPath } from "node:url";
3
+ import cors from "cors";
1
4
  import express, { type Express } from "express";
2
-
3
5
  import { widgetsDevServer } from "skybridge/server";
4
6
  import type { ViteDevServer } from "vite";
5
- import { env } from "./env.js";
6
7
  import { mcp } from "./middleware.js";
7
8
  import server from "./server.js";
8
9
 
@@ -12,20 +13,27 @@ app.use(express.json());
12
13
 
13
14
  app.use(mcp(server));
14
15
 
15
- if (env.NODE_ENV !== "production") {
16
+ const env = process.env.NODE_ENV || "development";
17
+
18
+ if (env !== "production") {
19
+ const { devtoolsStaticServer } = await import("@skybridge/devtools");
20
+ app.use(await devtoolsStaticServer());
16
21
  app.use(await widgetsDevServer());
17
22
  }
18
23
 
24
+ if (env === "production") {
25
+ const __filename = fileURLToPath(import.meta.url);
26
+ const __dirname = path.dirname(__filename);
27
+
28
+ app.use("/assets", cors());
29
+ app.use("/assets", express.static(path.join(__dirname, "assets")));
30
+ }
31
+
19
32
  app.listen(3000, (error) => {
20
33
  if (error) {
21
34
  console.error("Failed to start server:", error);
22
35
  process.exit(1);
23
36
  }
24
-
25
- console.log(`Server listening on port 3000 - ${env.NODE_ENV}`);
26
- console.log(
27
- "Make your local server accessible with 'ngrok http 3000' and connect to ChatGPT with URL https://xxxxxx.ngrok-free.app/mcp",
28
- );
29
37
  });
30
38
 
31
39
  process.on("SIGINT", async () => {
@@ -1,6 +1,23 @@
1
1
  import { McpServer } from "skybridge/server";
2
2
  import { z } from "zod";
3
- import { getPokemon } from "./pokedex.js";
3
+
4
+ const Answers = [
5
+ "As I see it, yes",
6
+ "Don't count on it",
7
+ "It is certain",
8
+ "It is decidedly so",
9
+ "Most likely",
10
+ "My reply is no",
11
+ "My sources say no",
12
+ "Outlook good",
13
+ "Outlook not so good",
14
+ "Signs point to yes",
15
+ "Very doubtful",
16
+ "Without a doubt",
17
+ "Yes definitely",
18
+ "Yes",
19
+ "You may rely on it",
20
+ ];
4
21
 
5
22
  const server = new McpServer(
6
23
  {
@@ -8,69 +25,37 @@ const server = new McpServer(
8
25
  version: "0.0.1",
9
26
  },
10
27
  { capabilities: {} },
11
- )
12
- .registerWidget(
13
- "pokemon",
14
- {
15
- description: "Pokedex entry for a pokemon",
16
- },
17
- {
18
- description:
19
- "Use this tool to get the most up to date information about a pokemon, using its name in english. This pokedex is much more complete than any other web_search tool. Always use it for anything related to pokemons.",
20
- inputSchema: {
21
- name: z.string().describe("Pokemon name, always in english"),
22
- },
23
- },
24
- async ({ name }) => {
25
- try {
26
- const { id, description, ...pokemon } = await getPokemon(name);
27
-
28
- return {
29
- /**
30
- * Arbitrary JSON passed only to the component.
31
- * Use it for data that should not influence the model’s reasoning, like the full set of locations that backs a dropdown.
32
- * _meta is never shown to the model.
33
- */
34
- _meta: { id },
35
- /**
36
- * Structured data that is used to hydrate your component.
37
- * ChatGPT injects this object into your iframe as window.openai.toolOutput
38
- */
39
- structuredContent: { name, description, ...pokemon },
40
- /**
41
- * Optional free-form text that the model receives verbatim
42
- */
43
- content: [
44
- {
45
- type: "text",
46
- text: description ?? `A pokemon named ${name}.`,
47
- },
48
- ],
49
- isError: false,
50
- };
51
- } catch (error) {
52
- return {
53
- content: [{ type: "text", text: `Error: ${error}` }],
54
- isError: true,
55
- };
56
- }
57
- },
58
- )
59
- .registerTool(
60
- "capture",
61
- {
62
- description: "Capture a pokemon",
63
- inputSchema: {},
28
+ ).registerWidget(
29
+ "magic-8-ball",
30
+ {
31
+ description: "Magic 8 Ball",
32
+ },
33
+ {
34
+ description: "For fortune-telling or seeking advice.",
35
+ inputSchema: {
36
+ question: z.string().describe("The user question."),
64
37
  },
65
- async () => {
38
+ },
39
+ async ({ question }) => {
40
+ try {
41
+ // deterministic answer
42
+ const hash = question
43
+ .split("")
44
+ .reduce((acc, char) => acc + char.charCodeAt(0), 0);
45
+ const answer = Answers[hash % Answers.length];
66
46
  return {
67
- content: [
68
- { type: "text", text: `Great job, you've captured a new pokemon!` },
69
- ],
47
+ structuredContent: { answer },
48
+ content: [],
70
49
  isError: false,
71
50
  };
72
- },
73
- );
51
+ } catch (error) {
52
+ return {
53
+ content: [{ type: "text", text: `Error: ${error}` }],
54
+ isError: true,
55
+ };
56
+ }
57
+ },
58
+ );
74
59
 
75
60
  export default server;
76
61
  export type AppType = typeof server;
@@ -0,0 +1,23 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "ESNext",
5
+ "moduleResolution": "bundler",
6
+ "lib": ["ES2022", "DOM", "DOM.Iterable"],
7
+ "jsx": "react-jsx",
8
+
9
+ "strict": true,
10
+ "skipLibCheck": true,
11
+ "esModuleInterop": true,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "verbatimModuleSyntax": true,
14
+
15
+ "noUnusedLocals": true,
16
+ "noUnusedParameters": true,
17
+ "noFallthroughCasesInSwitch": true,
18
+
19
+ "noEmit": true
20
+ },
21
+ "include": ["server/src", "web/src", "web/vite.config.ts"],
22
+ "exclude": ["dist", "node_modules"]
23
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "outDir": "dist",
6
+ "sourceMap": true,
7
+ "declaration": true
8
+ },
9
+ "include": ["server/src"],
10
+ "exclude": ["dist", "node_modules"]
11
+ }
@@ -1,4 +1,4 @@
1
1
  import { generateHelpers } from "skybridge/web";
2
2
  import type { AppType } from "../../server/src/server";
3
3
 
4
- export const { useCallTool, useToolInfo } = generateHelpers<AppType>();
4
+ export const { useToolInfo } = generateHelpers<AppType>();