create-skybridge 0.0.0-dev.9f37f42 → 0.0.0-dev.9f58376

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 (67) hide show
  1. package/dist/index.js +315 -214
  2. package/package.json +4 -3
  3. package/templates/blank/.dockerignore +4 -0
  4. package/templates/blank/Dockerfile +53 -0
  5. package/templates/blank/README.md +92 -0
  6. package/templates/blank/package.json +28 -0
  7. package/templates/blank/src/server.ts +16 -0
  8. package/templates/blank/tsconfig.json +5 -0
  9. package/templates/blank/vite.config.ts +6 -0
  10. package/templates/demo/.dockerignore +4 -0
  11. package/templates/demo/AGENTS.md +1 -0
  12. package/templates/demo/Dockerfile +53 -0
  13. package/{template → templates/demo}/README.md +16 -15
  14. package/templates/demo/_gitignore +6 -0
  15. package/templates/demo/alpic.json +3 -0
  16. package/templates/demo/node_modules/.bin/alpic +21 -0
  17. package/templates/demo/node_modules/.bin/sb +21 -0
  18. package/templates/demo/node_modules/.bin/skybridge +21 -0
  19. package/templates/demo/node_modules/.bin/tsc +21 -0
  20. package/templates/demo/node_modules/.bin/tsserver +21 -0
  21. package/templates/demo/node_modules/.bin/vite +21 -0
  22. package/{template → templates/demo}/package.json +8 -2
  23. package/templates/demo/src/helpers.ts +4 -0
  24. package/templates/demo/src/index.css +59 -0
  25. package/templates/demo/src/server.ts +94 -0
  26. package/templates/demo/src/views/components/doc-link.tsx +22 -0
  27. package/templates/demo/src/views/components/doc.tsx +21 -0
  28. package/templates/demo/src/views/components/nav.tsx +31 -0
  29. package/templates/demo/src/views/components/progress.tsx +35 -0
  30. package/templates/demo/src/views/components/steps/outro.tsx +68 -0
  31. package/templates/demo/src/views/components/steps/state.tsx +47 -0
  32. package/templates/demo/src/views/components/steps/tool-call.tsx +53 -0
  33. package/templates/demo/src/views/components/steps/tool-output.tsx +40 -0
  34. package/templates/demo/src/views/images/mascot/beret.png +0 -0
  35. package/templates/demo/src/views/images/mascot/chapka.png +0 -0
  36. package/templates/demo/src/views/images/mascot/cowboy-hat.png +0 -0
  37. package/templates/demo/src/views/images/mascot/fez.png +0 -0
  38. package/templates/demo/src/views/images/mascot/jester-hat.png +0 -0
  39. package/templates/demo/src/views/images/mascot/mitre.png +0 -0
  40. package/templates/demo/src/views/images/mascot/non-la.png +0 -0
  41. package/templates/demo/src/views/images/mascot/original.png +0 -0
  42. package/templates/demo/src/views/images/mascot/propeller-beanie.png +0 -0
  43. package/templates/demo/src/views/images/mascot/ski-mask.png +0 -0
  44. package/templates/demo/src/views/images/mascot/sombrero.png +0 -0
  45. package/templates/demo/src/views/images/mascot/top-hat.png +0 -0
  46. package/templates/demo/src/views/images/mascot/viking-helmet.png +0 -0
  47. package/templates/demo/src/views/onboarding.tsx +63 -0
  48. package/templates/demo/src/views/use-mascot.ts +60 -0
  49. package/{template → templates/demo}/vite.config.ts +2 -1
  50. package/dist/index.test.d.ts +0 -1
  51. package/dist/index.test.js +0 -33
  52. package/template/src/components/ball.tsx +0 -22
  53. package/template/src/index.css +0 -152
  54. package/template/src/server.ts +0 -61
  55. package/template/src/views/magic-8-ball.tsx +0 -10
  56. /package/{template → templates/blank}/AGENTS.md +0 -0
  57. /package/{template → templates/blank}/_gitignore +0 -0
  58. /package/{template → templates/blank}/alpic.json +0 -0
  59. /package/{template → templates/blank}/node_modules/.bin/alpic +0 -0
  60. /package/{template → templates/blank}/node_modules/.bin/sb +0 -0
  61. /package/{template → templates/blank}/node_modules/.bin/skybridge +0 -0
  62. /package/{template → templates/blank}/node_modules/.bin/tsc +0 -0
  63. /package/{template → templates/blank}/node_modules/.bin/tsserver +0 -0
  64. /package/{template → templates/blank}/node_modules/.bin/vite +0 -0
  65. /package/{template → templates/blank}/src/helpers.ts +0 -0
  66. /package/{template → templates/demo}/node_modules/.bin/tsx +0 -0
  67. /package/{template → templates/demo}/tsconfig.json +0 -0
@@ -1,61 +0,0 @@
1
- import { McpServer } from "skybridge/server";
2
- import { z } from "zod";
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
- ];
21
-
22
- const server = new McpServer(
23
- {
24
- name: "alpic-openai-app",
25
- version: "0.0.1",
26
- },
27
- { capabilities: {} },
28
- ).registerTool(
29
- {
30
- name: "magic-8-ball",
31
- description: "For fortune-telling or seeking advice.",
32
- inputSchema: {
33
- question: z.string().describe("The user question."),
34
- },
35
- view: {
36
- component: "magic-8-ball",
37
- description: "Magic 8 Ball",
38
- },
39
- },
40
- async ({ question }) => {
41
- try {
42
- const hash = question
43
- .split("")
44
- .reduce((acc, char) => acc + char.charCodeAt(0), 0);
45
- const answer = Answers[hash % Answers.length];
46
- return {
47
- structuredContent: { answer },
48
- isError: false,
49
- };
50
- } catch (error) {
51
- return {
52
- content: [{ type: "text", text: `Error: ${error}` }],
53
- isError: true,
54
- };
55
- }
56
- },
57
- );
58
-
59
- server.run();
60
-
61
- export type AppType = typeof server;
@@ -1,10 +0,0 @@
1
- import "@/index.css";
2
-
3
- import { Ball } from "../components/ball.js";
4
- import { useToolInfo } from "../helpers.js";
5
-
6
- export default function Magic8Ball() {
7
- const { input, output } = useToolInfo<"magic-8-ball">();
8
-
9
- return <Ball question={input?.question} answer={output?.answer} />;
10
- }
File without changes
File without changes
File without changes
File without changes
File without changes