create-skybridge 0.0.0-dev.e210492 → 0.0.0-dev.e284edd
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.
- package/dist/index.js +315 -214
- package/package.json +7 -6
- package/{template → templates/blank}/Dockerfile +3 -3
- package/templates/blank/README.md +92 -0
- package/{template → templates/blank}/_gitignore +2 -1
- package/templates/blank/node_modules/.bin/alpic +21 -0
- package/{template → templates/blank}/node_modules/.bin/tsc +2 -2
- package/{template → templates/blank}/node_modules/.bin/tsserver +2 -2
- package/{template → templates/blank}/node_modules/.bin/tsx +2 -2
- package/{template → templates/blank}/node_modules/.bin/vite +2 -2
- package/templates/blank/package.json +29 -0
- package/templates/blank/src/server.ts +16 -0
- package/templates/blank/tsconfig.json +5 -0
- package/templates/blank/vite.config.ts +12 -0
- package/templates/demo/.dockerignore +4 -0
- package/templates/demo/AGENTS.md +1 -0
- package/templates/demo/Dockerfile +53 -0
- package/{template → templates/demo}/README.md +17 -16
- package/templates/demo/_gitignore +7 -0
- package/templates/demo/alpic.json +3 -0
- package/templates/demo/node_modules/.bin/alpic +21 -0
- package/templates/demo/node_modules/.bin/sb +21 -0
- package/templates/demo/node_modules/.bin/skybridge +21 -0
- package/templates/demo/node_modules/.bin/tsc +21 -0
- package/templates/demo/node_modules/.bin/tsserver +21 -0
- package/templates/demo/node_modules/.bin/tsx +21 -0
- package/templates/demo/node_modules/.bin/vite +21 -0
- package/{template → templates/demo}/package.json +17 -17
- package/templates/demo/src/helpers.ts +4 -0
- package/{template → templates/demo}/src/index.css +21 -0
- package/templates/demo/src/server.ts +94 -0
- package/templates/demo/src/views/components/doc-link.tsx +22 -0
- package/templates/demo/src/views/components/doc.tsx +21 -0
- package/templates/demo/src/views/components/nav.tsx +31 -0
- package/templates/demo/src/views/components/progress.tsx +35 -0
- package/templates/demo/src/views/components/steps/outro.tsx +68 -0
- package/templates/demo/src/views/components/steps/state.tsx +47 -0
- package/templates/demo/src/views/components/steps/tool-call.tsx +53 -0
- package/templates/demo/src/views/components/steps/tool-output.tsx +40 -0
- package/templates/demo/src/views/images/mascot/beret.png +0 -0
- package/templates/demo/src/views/images/mascot/chapka.png +0 -0
- package/templates/demo/src/views/images/mascot/cowboy-hat.png +0 -0
- package/templates/demo/src/views/images/mascot/fez.png +0 -0
- package/templates/demo/src/views/images/mascot/jester-hat.png +0 -0
- package/templates/demo/src/views/images/mascot/mitre.png +0 -0
- package/templates/demo/src/views/images/mascot/non-la.png +0 -0
- package/templates/demo/src/views/images/mascot/original.png +0 -0
- package/templates/demo/src/views/images/mascot/propeller-beanie.png +0 -0
- package/templates/demo/src/views/images/mascot/ski-mask.png +0 -0
- package/templates/demo/src/views/images/mascot/sombrero.png +0 -0
- package/templates/demo/src/views/images/mascot/top-hat.png +0 -0
- package/templates/demo/src/views/images/mascot/viking-helmet.png +0 -0
- package/templates/demo/src/views/onboarding.tsx +63 -0
- package/templates/demo/src/views/use-mascot.ts +60 -0
- package/{template → templates/demo}/vite.config.ts +6 -0
- package/dist/index.test.d.ts +0 -1
- package/dist/index.test.js +0 -35
- package/template/node_modules/.bin/alpic +0 -21
- package/template/src/server.ts +0 -44
- package/template/src/views/components/intro.tsx +0 -43
- package/template/src/views/images/mascot/beret.png +0 -0
- package/template/src/views/images/mascot/chapka.png +0 -0
- package/template/src/views/images/mascot/classic.png +0 -0
- package/template/src/views/images/mascot/conical.png +0 -0
- package/template/src/views/images/mascot/cownboy.png +0 -0
- package/template/src/views/images/mascot/fez.png +0 -0
- package/template/src/views/images/mascot/formal.png +0 -0
- package/template/src/views/images/mascot/jester.png +0 -0
- package/template/src/views/images/mascot/mitre.png +0 -0
- package/template/src/views/images/mascot/propeller.png +0 -0
- package/template/src/views/images/mascot/sombrero.png +0 -0
- package/template/src/views/images/mascot/viking.png +0 -0
- package/template/src/views/start.tsx +0 -87
- package/template/src/vite-manifest.d.ts +0 -4
- /package/{template → templates/blank}/.dockerignore +0 -0
- /package/{template → templates/blank}/AGENTS.md +0 -0
- /package/{template → templates/blank}/alpic.json +0 -0
- /package/{template → templates/blank}/node_modules/.bin/sb +0 -0
- /package/{template → templates/blank}/node_modules/.bin/skybridge +0 -0
- /package/{template → templates/blank}/src/helpers.ts +0 -0
- /package/{template → templates/demo}/tsconfig.json +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
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/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.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/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.2/node_modules/alpic/node_modules:/home/runner/work/skybridge/skybridge/node_modules/.pnpm/alpic@1.104.1_@opentelemetry+api@1.9.0_arktype@2.1.27_rxjs@7.8.2_typescript@6.0.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/../alpic/bin/run.js" "$@"
|
|
19
|
-
else
|
|
20
|
-
exec node "$basedir/../alpic/bin/run.js" "$@"
|
|
21
|
-
fi
|
package/template/src/server.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { McpServer } from "skybridge/server";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
const server = new McpServer(
|
|
5
|
-
{
|
|
6
|
-
name: "alpic-openai-app",
|
|
7
|
-
version: "0.0.1",
|
|
8
|
-
},
|
|
9
|
-
{ capabilities: {} },
|
|
10
|
-
).registerTool(
|
|
11
|
-
{
|
|
12
|
-
name: "start",
|
|
13
|
-
description: "Onboard Skybridge",
|
|
14
|
-
inputSchema: {
|
|
15
|
-
name: z.string().describe("The user name."),
|
|
16
|
-
},
|
|
17
|
-
view: {
|
|
18
|
-
component: "start",
|
|
19
|
-
description: "Onboarding deck",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
async ({ name }) => {
|
|
23
|
-
try {
|
|
24
|
-
return {
|
|
25
|
-
structuredContent: { name },
|
|
26
|
-
isError: false,
|
|
27
|
-
};
|
|
28
|
-
} catch (error) {
|
|
29
|
-
return {
|
|
30
|
-
content: [{ type: "text", text: `Error: ${error}` }],
|
|
31
|
-
isError: true,
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
if (process.env.NODE_ENV === "production") {
|
|
38
|
-
const { default: manifest } = await import("./vite-manifest.js");
|
|
39
|
-
server.setViteManifest(manifest);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export default await server.run();
|
|
43
|
-
|
|
44
|
-
export type AppType = typeof server;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { Button } from "@alpic-ai/ui/components/button";
|
|
2
|
-
import { CheckCheck, ChevronsRight, Info } from "lucide-react";
|
|
3
|
-
import { useToolInfo } from "@/helpers.js";
|
|
4
|
-
|
|
5
|
-
export default function Intro({ onNext }: { onNext: () => void }) {
|
|
6
|
-
const { input } = useToolInfo<"start">();
|
|
7
|
-
|
|
8
|
-
return (
|
|
9
|
-
<>
|
|
10
|
-
<div className="flex flex-col gap-3">
|
|
11
|
-
<h1 className="type-display-xs font-mozilla font-semibold">
|
|
12
|
-
Howdy, <span className="text-primary">{input?.name} !</span>
|
|
13
|
-
</h1>
|
|
14
|
-
<p className="">
|
|
15
|
-
You're wondering how the view displays your name, don't you? Well,
|
|
16
|
-
it's because it can read <strong>tool output</strong>. The LLM also
|
|
17
|
-
knows about it.
|
|
18
|
-
</p>
|
|
19
|
-
</div>
|
|
20
|
-
<p className="flex items-start gap-2 type-text-xs text-muted-foreground">
|
|
21
|
-
<Info className="size-4 shrink-0" />
|
|
22
|
-
<span>
|
|
23
|
-
The{" "}
|
|
24
|
-
<a
|
|
25
|
-
href="https://docs.skybridge.tech"
|
|
26
|
-
target="_blank"
|
|
27
|
-
rel="noreferrer"
|
|
28
|
-
className="underline underline-offset-4"
|
|
29
|
-
>
|
|
30
|
-
useToolInfo
|
|
31
|
-
</a>{" "}
|
|
32
|
-
hook hydrates the view with tool input, output and metadata.
|
|
33
|
-
</span>
|
|
34
|
-
</p>
|
|
35
|
-
<div className="flex justify-end gap-2">
|
|
36
|
-
<Button variant="cta" onClick={onNext}>
|
|
37
|
-
<CheckCheck />
|
|
38
|
-
Sharing view state
|
|
39
|
-
</Button>
|
|
40
|
-
</div>
|
|
41
|
-
</>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import "@/index.css";
|
|
2
|
-
|
|
3
|
-
import { Card, CardContent } from "@alpic-ai/ui/components/card";
|
|
4
|
-
import {
|
|
5
|
-
Tooltip,
|
|
6
|
-
TooltipContent,
|
|
7
|
-
TooltipTrigger,
|
|
8
|
-
} from "@alpic-ai/ui/components/tooltip";
|
|
9
|
-
import { useState } from "react";
|
|
10
|
-
import { useLayout, useViewState } from "skybridge/web";
|
|
11
|
-
import Intro from "./components/intro.js";
|
|
12
|
-
import classic from "./images/mascot/classic.png";
|
|
13
|
-
|
|
14
|
-
const STEPS = [
|
|
15
|
-
"Reading tool output",
|
|
16
|
-
"Sharing view state",
|
|
17
|
-
"Calling tools",
|
|
18
|
-
] as const;
|
|
19
|
-
const TOTAL_STEPS = STEPS.length;
|
|
20
|
-
|
|
21
|
-
export default function Start() {
|
|
22
|
-
const [state] = useViewState({ mascot: "classic" });
|
|
23
|
-
const { theme } = useLayout();
|
|
24
|
-
const [step, setStep] = useState(0);
|
|
25
|
-
|
|
26
|
-
let mascot: string;
|
|
27
|
-
switch (state.mascot) {
|
|
28
|
-
case "classic":
|
|
29
|
-
mascot = classic;
|
|
30
|
-
break;
|
|
31
|
-
default:
|
|
32
|
-
throw new Error("cannot find mascot");
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<div
|
|
37
|
-
className={`${theme === "dark" ? "dark" : ""} flex min-h-full items-center justify-center p-6 `}
|
|
38
|
-
>
|
|
39
|
-
<Card className="w-full max-w-2xl">
|
|
40
|
-
<CardContent>
|
|
41
|
-
<div className="flex flex-col items-center gap-6 md:flex-row md:items-stretch">
|
|
42
|
-
<div className="shrink-0 self-center animate-float">
|
|
43
|
-
<img
|
|
44
|
-
src={mascot}
|
|
45
|
-
alt="Skybridge mascot"
|
|
46
|
-
className="h-40 w-40 object-contain animate-twirl"
|
|
47
|
-
/>
|
|
48
|
-
</div>
|
|
49
|
-
<div className="flex flex-1 flex-col justify-between gap-6">
|
|
50
|
-
<div className="flex gap-1.5">
|
|
51
|
-
{STEPS.map((label, i) => (
|
|
52
|
-
<Tooltip key={label}>
|
|
53
|
-
<TooltipTrigger asChild>
|
|
54
|
-
<button
|
|
55
|
-
type="button"
|
|
56
|
-
onClick={() => setStep(i)}
|
|
57
|
-
className={`h-1 flex-1 rounded-full ${
|
|
58
|
-
i <= step ? "bg-primary" : "bg-muted"
|
|
59
|
-
}`}
|
|
60
|
-
aria-label={label}
|
|
61
|
-
/>
|
|
62
|
-
</TooltipTrigger>
|
|
63
|
-
<TooltipContent>{label}</TooltipContent>
|
|
64
|
-
</Tooltip>
|
|
65
|
-
))}
|
|
66
|
-
</div>
|
|
67
|
-
{(() => {
|
|
68
|
-
const onNext = () =>
|
|
69
|
-
setStep((s) => Math.min(s + 1, TOTAL_STEPS - 1));
|
|
70
|
-
switch (step) {
|
|
71
|
-
case 0:
|
|
72
|
-
return <Intro onNext={onNext} />;
|
|
73
|
-
case 1:
|
|
74
|
-
return <div>step 2 placeholder</div>;
|
|
75
|
-
case 2:
|
|
76
|
-
return <div>step 3 placeholder</div>;
|
|
77
|
-
default:
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
})()}
|
|
81
|
-
</div>
|
|
82
|
-
</div>
|
|
83
|
-
</CardContent>
|
|
84
|
-
</Card>
|
|
85
|
-
</div>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|