agent-stage 0.2.0
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/commands/add-page.d.ts +2 -0
- package/dist/commands/add-page.js +132 -0
- package/dist/commands/components.d.ts +2 -0
- package/dist/commands/components.js +136 -0
- package/dist/commands/doctor.d.ts +2 -0
- package/dist/commands/doctor.js +247 -0
- package/dist/commands/exec.d.ts +2 -0
- package/dist/commands/exec.js +59 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/init.js +208 -0
- package/dist/commands/inspect.d.ts +2 -0
- package/dist/commands/inspect.js +62 -0
- package/dist/commands/ls.d.ts +2 -0
- package/dist/commands/ls.js +84 -0
- package/dist/commands/reset.d.ts +2 -0
- package/dist/commands/reset.js +92 -0
- package/dist/commands/restart.d.ts +2 -0
- package/dist/commands/restart.js +90 -0
- package/dist/commands/rm-page.d.ts +2 -0
- package/dist/commands/rm-page.js +32 -0
- package/dist/commands/start.d.ts +2 -0
- package/dist/commands/start.js +82 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.js +52 -0
- package/dist/commands/stop.d.ts +2 -0
- package/dist/commands/stop.js +58 -0
- package/dist/commands/watch.d.ts +2 -0
- package/dist/commands/watch.js +54 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +48 -0
- package/dist/utils/paths.d.ts +45 -0
- package/dist/utils/paths.js +138 -0
- package/package.json +32 -0
- package/template/components.json +17 -0
- package/template/index.html +13 -0
- package/template/package.json +40 -0
- package/template/postcss.config.js +6 -0
- package/template/src/components/ui/button.tsx +55 -0
- package/template/src/components/ui/card.tsx +78 -0
- package/template/src/components/ui/input.tsx +24 -0
- package/template/src/index.css +59 -0
- package/template/src/lib/utils.ts +6 -0
- package/template/src/main.tsx +23 -0
- package/template/src/routes/__root.tsx +11 -0
- package/template/src/routes/index.tsx +46 -0
- package/template/src/vite-env.d.ts +1 -0
- package/template/tailwind.config.js +53 -0
- package/template/tsconfig.json +25 -0
- package/template/tsconfig.node.json +11 -0
- package/template/vite.config.ts +22 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--background: 0 0% 100%;
|
|
8
|
+
--foreground: 0 0% 3.9%;
|
|
9
|
+
--card: 0 0% 100%;
|
|
10
|
+
--card-foreground: 0 0% 3.9%;
|
|
11
|
+
--popover: 0 0% 100%;
|
|
12
|
+
--popover-foreground: 0 0% 3.9%;
|
|
13
|
+
--primary: 0 0% 9%;
|
|
14
|
+
--primary-foreground: 0 0% 98%;
|
|
15
|
+
--secondary: 0 0% 96.1%;
|
|
16
|
+
--secondary-foreground: 0 0% 9%;
|
|
17
|
+
--muted: 0 0% 96.1%;
|
|
18
|
+
--muted-foreground: 0 0% 45.1%;
|
|
19
|
+
--accent: 0 0% 96.1%;
|
|
20
|
+
--accent-foreground: 0 0% 9%;
|
|
21
|
+
--destructive: 0 84.2% 60.2%;
|
|
22
|
+
--destructive-foreground: 0 0% 98%;
|
|
23
|
+
--border: 0 0% 89.8%;
|
|
24
|
+
--input: 0 0% 89.8%;
|
|
25
|
+
--ring: 0 0% 3.9%;
|
|
26
|
+
--radius: 0.5rem;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dark {
|
|
30
|
+
--background: 0 0% 3.9%;
|
|
31
|
+
--foreground: 0 0% 98%;
|
|
32
|
+
--card: 0 0% 3.9%;
|
|
33
|
+
--card-foreground: 0 0% 98%;
|
|
34
|
+
--popover: 0 0% 3.9%;
|
|
35
|
+
--popover-foreground: 0 0% 98%;
|
|
36
|
+
--primary: 0 0% 98%;
|
|
37
|
+
--primary-foreground: 0 0% 9%;
|
|
38
|
+
--secondary: 0 0% 14.9%;
|
|
39
|
+
--secondary-foreground: 0 0% 98%;
|
|
40
|
+
--muted: 0 0% 14.9%;
|
|
41
|
+
--muted-foreground: 0 0% 63.9%;
|
|
42
|
+
--accent: 0 0% 14.9%;
|
|
43
|
+
--accent-foreground: 0 0% 98%;
|
|
44
|
+
--destructive: 0 62.8% 30.6%;
|
|
45
|
+
--destructive-foreground: 0 0% 98%;
|
|
46
|
+
--border: 0 0% 14.9%;
|
|
47
|
+
--input: 0 0% 14.9%;
|
|
48
|
+
--ring: 0 0% 83.1%;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@layer base {
|
|
53
|
+
* {
|
|
54
|
+
@apply border-border;
|
|
55
|
+
}
|
|
56
|
+
body {
|
|
57
|
+
@apply bg-background text-foreground;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ReactDOM from 'react-dom/client'
|
|
3
|
+
import { RouterProvider, createRouter } from '@tanstack/react-router'
|
|
4
|
+
import './index.css'
|
|
5
|
+
|
|
6
|
+
// Import the generated route tree
|
|
7
|
+
import { routeTree } from './routeTree.gen'
|
|
8
|
+
|
|
9
|
+
// Create a new router instance
|
|
10
|
+
const router = createRouter({ routeTree })
|
|
11
|
+
|
|
12
|
+
// Register the router instance for type safety
|
|
13
|
+
declare module '@tanstack/react-router' {
|
|
14
|
+
interface Register {
|
|
15
|
+
router: typeof router
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
20
|
+
<React.StrictMode>
|
|
21
|
+
<RouterProvider router={router} />
|
|
22
|
+
</React.StrictMode>,
|
|
23
|
+
)
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createRootRoute, Link, Outlet } from '@tanstack/react-router'
|
|
2
|
+
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
|
|
3
|
+
|
|
4
|
+
export const Route = createRootRoute({
|
|
5
|
+
component: () => (
|
|
6
|
+
<>
|
|
7
|
+
<Outlet />
|
|
8
|
+
<TanStackRouterDevtools />
|
|
9
|
+
</>
|
|
10
|
+
),
|
|
11
|
+
})
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createFileRoute } from '@tanstack/react-router'
|
|
2
|
+
import { Button } from '../components/ui/button'
|
|
3
|
+
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '../components/ui/card'
|
|
4
|
+
import { Input } from '../components/ui/input'
|
|
5
|
+
|
|
6
|
+
export const Route = createFileRoute('/')({
|
|
7
|
+
component: IndexPage,
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
function IndexPage() {
|
|
11
|
+
return (
|
|
12
|
+
<div className="min-h-screen bg-background p-8">
|
|
13
|
+
<div className="mx-auto max-w-2xl space-y-6">
|
|
14
|
+
<div className="space-y-2">
|
|
15
|
+
<h1 className="text-3xl font-bold tracking-tight">Agentstage</h1>
|
|
16
|
+
<p className="text-muted-foreground">
|
|
17
|
+
Interactive UI for AI Agents
|
|
18
|
+
</p>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<Card>
|
|
22
|
+
<CardHeader>
|
|
23
|
+
<CardTitle>Welcome</CardTitle>
|
|
24
|
+
<CardDescription>
|
|
25
|
+
Your Agentstage app is running. Use the CLI to add pages and components.
|
|
26
|
+
</CardDescription>
|
|
27
|
+
</CardHeader>
|
|
28
|
+
<CardContent className="space-y-4">
|
|
29
|
+
<div className="flex gap-2">
|
|
30
|
+
<Input placeholder="Type something..." />
|
|
31
|
+
<Button>Submit</Button>
|
|
32
|
+
</div>
|
|
33
|
+
<div className="text-sm text-muted-foreground">
|
|
34
|
+
<p>Quick commands:</p>
|
|
35
|
+
<ul className="list-disc list-inside mt-2 space-y-1">
|
|
36
|
+
<li><code>agentstage add-page counter</code> - Add a new page</li>
|
|
37
|
+
<li><code>agentstage ls</code> - List connected stores</li>
|
|
38
|
+
<li><code>agentstage exec {'<storeId>'} setCount 5</code> - Execute action</li>
|
|
39
|
+
</ul>
|
|
40
|
+
</div>
|
|
41
|
+
</CardContent>
|
|
42
|
+
</Card>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** @type {import('tailwindcss').Config} */
|
|
2
|
+
export default {
|
|
3
|
+
darkMode: ["class"],
|
|
4
|
+
content: [
|
|
5
|
+
"./index.html",
|
|
6
|
+
"./src/**/*.{js,ts,jsx,tsx}",
|
|
7
|
+
],
|
|
8
|
+
theme: {
|
|
9
|
+
extend: {
|
|
10
|
+
colors: {
|
|
11
|
+
border: "hsl(var(--border))",
|
|
12
|
+
input: "hsl(var(--input))",
|
|
13
|
+
ring: "hsl(var(--ring))",
|
|
14
|
+
background: "hsl(var(--background))",
|
|
15
|
+
foreground: "hsl(var(--foreground))",
|
|
16
|
+
primary: {
|
|
17
|
+
DEFAULT: "hsl(var(--primary))",
|
|
18
|
+
foreground: "hsl(var(--primary-foreground))",
|
|
19
|
+
},
|
|
20
|
+
secondary: {
|
|
21
|
+
DEFAULT: "hsl(var(--secondary))",
|
|
22
|
+
foreground: "hsl(var(--secondary-foreground))",
|
|
23
|
+
},
|
|
24
|
+
destructive: {
|
|
25
|
+
DEFAULT: "hsl(var(--destructive))",
|
|
26
|
+
foreground: "hsl(var(--destructive-foreground))",
|
|
27
|
+
},
|
|
28
|
+
muted: {
|
|
29
|
+
DEFAULT: "hsl(var(--muted))",
|
|
30
|
+
foreground: "hsl(var(--muted-foreground))",
|
|
31
|
+
},
|
|
32
|
+
accent: {
|
|
33
|
+
DEFAULT: "hsl(var(--accent))",
|
|
34
|
+
foreground: "hsl(var(--accent-foreground))",
|
|
35
|
+
},
|
|
36
|
+
popover: {
|
|
37
|
+
DEFAULT: "hsl(var(--popover))",
|
|
38
|
+
foreground: "hsl(var(--popover-foreground))",
|
|
39
|
+
},
|
|
40
|
+
card: {
|
|
41
|
+
DEFAULT: "hsl(var(--card))",
|
|
42
|
+
foreground: "hsl(var(--card-foreground))",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
borderRadius: {
|
|
46
|
+
lg: "var(--radius)",
|
|
47
|
+
md: "calc(var(--radius) - 2px)",
|
|
48
|
+
sm: "calc(var(--radius) - 4px)",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
plugins: [require("tailwindcss-animate")],
|
|
53
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"moduleResolution": "bundler",
|
|
9
|
+
"allowImportingTsExtensions": true,
|
|
10
|
+
"resolveJsonModule": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
13
|
+
"jsx": "react-jsx",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
"noFallthroughCasesInSwitch": true,
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["./src/*"]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"include": ["src", "src/routeTree.gen.ts"],
|
|
24
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import { TanStackRouterVite } from '@tanstack/router-plugin/vite'
|
|
4
|
+
import { bridgePlugin } from 'agent-stage-bridge/vite'
|
|
5
|
+
import path from 'path'
|
|
6
|
+
|
|
7
|
+
// https://vitejs.dev/config/
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
plugins: [
|
|
10
|
+
TanStackRouterVite({
|
|
11
|
+
target: 'react',
|
|
12
|
+
autoCodeSplitting: true,
|
|
13
|
+
}),
|
|
14
|
+
react(),
|
|
15
|
+
bridgePlugin(),
|
|
16
|
+
],
|
|
17
|
+
resolve: {
|
|
18
|
+
alias: {
|
|
19
|
+
'@': path.resolve(__dirname, './src'),
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
})
|