agent-stage 0.2.14 → 0.2.17

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 (68) hide show
  1. package/dist/commands/guide.js +5 -5
  2. package/dist/commands/init.d.ts +1 -1
  3. package/dist/commands/init.js +94 -138
  4. package/dist/commands/page/add.js +5 -40
  5. package/dist/commands/run/exec.js +1 -1
  6. package/dist/commands/run/inspect.js +1 -1
  7. package/dist/commands/run/watch.js +1 -1
  8. package/dist/commands/serve.d.ts +2 -0
  9. package/dist/commands/serve.js +238 -0
  10. package/dist/commands/status.d.ts +1 -1
  11. package/dist/commands/status.js +41 -40
  12. package/dist/commands/stop.d.ts +1 -1
  13. package/dist/commands/stop.js +26 -44
  14. package/dist/index.js +16 -30
  15. package/dist/utils/agent-helper.js +5 -5
  16. package/dist/utils/paths.js +5 -5
  17. package/dist/utils/tunnel.d.ts +1 -1
  18. package/dist/utils/tunnel.js +1 -1
  19. package/package.json +8 -5
  20. package/dist/commands/dev/index.d.ts +0 -2
  21. package/dist/commands/dev/index.js +0 -11
  22. package/dist/commands/dev/init.d.ts +0 -2
  23. package/dist/commands/dev/init.js +0 -215
  24. package/dist/commands/dev/start.d.ts +0 -2
  25. package/dist/commands/dev/start.js +0 -145
  26. package/dist/commands/dev/status.d.ts +0 -2
  27. package/dist/commands/dev/status.js +0 -55
  28. package/dist/commands/dev/stop.d.ts +0 -2
  29. package/dist/commands/dev/stop.js +0 -45
  30. package/dist/commands/exec.d.ts +0 -2
  31. package/dist/commands/exec.js +0 -75
  32. package/dist/commands/inspect.d.ts +0 -2
  33. package/dist/commands/inspect.js +0 -62
  34. package/dist/commands/ls.d.ts +0 -2
  35. package/dist/commands/ls.js +0 -132
  36. package/dist/commands/restart.d.ts +0 -2
  37. package/dist/commands/restart.js +0 -90
  38. package/dist/commands/rm-page.d.ts +0 -2
  39. package/dist/commands/rm-page.js +0 -32
  40. package/dist/commands/start.d.ts +0 -2
  41. package/dist/commands/start.js +0 -82
  42. package/dist/commands/watch.d.ts +0 -2
  43. package/dist/commands/watch.js +0 -54
  44. package/template/components.json +0 -17
  45. package/template/index.html +0 -13
  46. package/template/package.json +0 -41
  47. package/template/postcss.config.js +0 -6
  48. package/template/src/components/PageRenderer.tsx +0 -108
  49. package/template/src/components/bridge-state-provider.tsx +0 -87
  50. package/template/src/components/ui/button.tsx +0 -55
  51. package/template/src/components/ui/card.tsx +0 -78
  52. package/template/src/components/ui/input.tsx +0 -24
  53. package/template/src/index.css +0 -59
  54. package/template/src/lib/bridge.ts +0 -53
  55. package/template/src/lib/utils.ts +0 -6
  56. package/template/src/main.tsx +0 -23
  57. package/template/src/pages/counter/store.json +0 -8
  58. package/template/src/pages/counter/ui.json +0 -108
  59. package/template/src/pages/test-page/store.json +0 -8
  60. package/template/src/routeTree.gen.ts +0 -77
  61. package/template/src/routes/__root.tsx +0 -11
  62. package/template/src/routes/counter.tsx +0 -19
  63. package/template/src/routes/index.tsx +0 -46
  64. package/template/src/vite-env.d.ts +0 -1
  65. package/template/tailwind.config.js +0 -53
  66. package/template/tsconfig.json +0 -25
  67. package/template/tsconfig.node.json +0 -11
  68. package/template/vite.config.ts +0 -22
@@ -1,87 +0,0 @@
1
- import { createContext, useContext, useState, useEffect, type ReactNode } from 'react'
2
- import type { Bridge } from '../lib/bridge'
3
-
4
- interface BridgeStateContextValue {
5
- state: Record<string, unknown>
6
- get: (path: string) => unknown
7
- set: (path: string, value: unknown) => void
8
- update: (updates: Record<string, unknown>) => void
9
- }
10
-
11
- const BridgeStateContext = createContext<BridgeStateContextValue | null>(null)
12
-
13
- interface BridgeStateProviderProps {
14
- bridge: Bridge
15
- children: ReactNode
16
- }
17
-
18
- export function BridgeStateProvider({ bridge, children }: BridgeStateProviderProps) {
19
- const [state, setLocalState] = useState(() => bridge.store.getState())
20
-
21
- useEffect(() => {
22
- return bridge.store.subscribe((newState) => {
23
- setLocalState(newState)
24
- })
25
- }, [bridge])
26
-
27
- const value: BridgeStateContextValue = {
28
- state,
29
- get: (path: string) => {
30
- const parts = path.split('/').filter(Boolean)
31
- let current: unknown = state
32
- for (const part of parts) {
33
- if (current === null || current === undefined) return undefined
34
- current = (current as Record<string, unknown>)[part]
35
- }
36
- return current
37
- },
38
- set: (path: string, value: unknown) => {
39
- const parts = path.split('/').filter(Boolean)
40
- bridge.store.setState((prev) => {
41
- const next = { ...prev }
42
- let current: Record<string, unknown> = next
43
- for (let i = 0; i < parts.length - 1; i++) {
44
- const part = parts[i]
45
- if (!(part in current) || typeof current[part] !== 'object') {
46
- current[part] = {}
47
- }
48
- current = current[part] as Record<string, unknown>
49
- }
50
- current[parts[parts.length - 1]] = value
51
- return next
52
- })
53
- },
54
- update: (updates: Record<string, unknown>) => {
55
- bridge.store.setState((prev) => {
56
- const next = { ...prev }
57
- for (const [path, value] of Object.entries(updates)) {
58
- const parts = path.split('/').filter(Boolean)
59
- let current: Record<string, unknown> = next
60
- for (let i = 0; i < parts.length - 1; i++) {
61
- const part = parts[i]
62
- if (!(part in current) || typeof current[part] !== 'object') {
63
- current[part] = {}
64
- }
65
- current = current[part] as Record<string, unknown>
66
- }
67
- current[parts[parts.length - 1]] = value
68
- }
69
- return next
70
- })
71
- },
72
- }
73
-
74
- return (
75
- <BridgeStateContext.Provider value={value}>
76
- {children}
77
- </BridgeStateContext.Provider>
78
- )
79
- }
80
-
81
- export function useBridgeStateContext(): BridgeStateContextValue {
82
- const context = useContext(BridgeStateContext)
83
- if (!context) {
84
- throw new Error('useBridgeStateContext must be used within BridgeStateProvider')
85
- }
86
- return context
87
- }
@@ -1,55 +0,0 @@
1
- import * as React from "react"
2
- import { Slot } from "@radix-ui/react-slot"
3
- import { cva, type VariantProps } from "class-variance-authority"
4
- import { cn } from "@/lib/utils"
5
-
6
- const buttonVariants = cva(
7
- "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",
8
- {
9
- variants: {
10
- variant: {
11
- default: "bg-primary text-primary-foreground hover:bg-primary/90",
12
- destructive:
13
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
14
- outline:
15
- "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
16
- secondary:
17
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
18
- ghost: "hover:bg-accent hover:text-accent-foreground",
19
- link: "text-primary underline-offset-4 hover:underline",
20
- },
21
- size: {
22
- default: "h-10 px-4 py-2",
23
- sm: "h-9 rounded-md px-3",
24
- lg: "h-11 rounded-md px-8",
25
- icon: "h-10 w-10",
26
- },
27
- },
28
- defaultVariants: {
29
- variant: "default",
30
- size: "default",
31
- },
32
- }
33
- )
34
-
35
- export interface ButtonProps
36
- extends React.ButtonHTMLAttributes<HTMLButtonElement>,
37
- VariantProps<typeof buttonVariants> {
38
- asChild?: boolean
39
- }
40
-
41
- const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
42
- ({ className, variant, size, asChild = false, ...props }, ref) => {
43
- const Comp = asChild ? Slot : "button"
44
- return (
45
- <Comp
46
- className={cn(buttonVariants({ variant, size, className }))}
47
- ref={ref}
48
- {...props}
49
- />
50
- )
51
- }
52
- )
53
- Button.displayName = "Button"
54
-
55
- export { Button, buttonVariants }
@@ -1,78 +0,0 @@
1
- import * as React from "react"
2
- import { cn } from "@/lib/utils"
3
-
4
- const Card = React.forwardRef<
5
- HTMLDivElement,
6
- React.HTMLAttributes<HTMLDivElement>
7
- >(({ className, ...props }, ref) => (
8
- <div
9
- ref={ref}
10
- className={cn(
11
- "rounded-lg border bg-card text-card-foreground shadow-sm",
12
- className
13
- )}
14
- {...props}
15
- />
16
- ))
17
- Card.displayName = "Card"
18
-
19
- const CardHeader = React.forwardRef<
20
- HTMLDivElement,
21
- React.HTMLAttributes<HTMLDivElement>
22
- >(({ className, ...props }, ref) => (
23
- <div
24
- ref={ref}
25
- className={cn("flex flex-col space-y-1.5 p-6", className)}
26
- {...props}
27
- />
28
- ))
29
- CardHeader.displayName = "CardHeader"
30
-
31
- const CardTitle = React.forwardRef<
32
- HTMLParagraphElement,
33
- React.HTMLAttributes<HTMLHeadingElement>
34
- >(({ className, ...props }, ref) => (
35
- <h3
36
- ref={ref}
37
- className={cn(
38
- "text-2xl font-semibold leading-none tracking-tight",
39
- className
40
- )}
41
- {...props}
42
- />
43
- ))
44
- CardTitle.displayName = "CardTitle"
45
-
46
- const CardDescription = React.forwardRef<
47
- HTMLParagraphElement,
48
- React.HTMLAttributes<HTMLParagraphElement>
49
- >(({ className, ...props }, ref) => (
50
- <p
51
- ref={ref}
52
- className={cn("text-sm text-muted-foreground", className)}
53
- {...props}
54
- />
55
- ))
56
- CardDescription.displayName = "CardDescription"
57
-
58
- const CardContent = React.forwardRef<
59
- HTMLDivElement,
60
- React.HTMLAttributes<HTMLDivElement>
61
- >(({ className, ...props }, ref) => (
62
- <div ref={ref} className={cn("p-6 pt-0", className)} {...props} />
63
- ))
64
- CardContent.displayName = "CardContent"
65
-
66
- const CardFooter = React.forwardRef<
67
- HTMLDivElement,
68
- React.HTMLAttributes<HTMLDivElement>
69
- >(({ className, ...props }, ref) => (
70
- <div
71
- ref={ref}
72
- className={cn("flex items-center p-6 pt-0", className)}
73
- {...props}
74
- />
75
- ))
76
- CardFooter.displayName = "CardFooter"
77
-
78
- export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent }
@@ -1,24 +0,0 @@
1
- import * as React from "react"
2
- import { cn } from "@/lib/utils"
3
-
4
- export interface InputProps
5
- extends React.InputHTMLAttributes<HTMLInputElement> {}
6
-
7
- const Input = React.forwardRef<HTMLInputElement, InputProps>(
8
- ({ className, type, ...props }, ref) => {
9
- return (
10
- <input
11
- type={type}
12
- className={cn(
13
- "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
14
- className
15
- )}
16
- ref={ref}
17
- {...props}
18
- />
19
- )
20
- }
21
- )
22
- Input.displayName = "Input"
23
-
24
- export { Input }
@@ -1,59 +0,0 @@
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
- }
@@ -1,53 +0,0 @@
1
- import { createBridgeStore } from 'agent-stage-bridge/browser'
2
- import { z } from 'zod'
3
- import type { ZodSchema } from 'zod'
4
-
5
- export interface Bridge {
6
- store: {
7
- getState: () => Record<string, unknown>
8
- subscribe: (callback: (state: Record<string, unknown>) => void) => () => void
9
- setState: (updater: (prev: Record<string, unknown>) => Record<string, unknown>) => void
10
- }
11
- connect: () => Promise<{ storeId: string }>
12
- isHydrated: boolean
13
- pageId: string
14
- }
15
-
16
- interface CreatePageBridgeOptions {
17
- pageId: string
18
- schema?: ZodSchema
19
- actions?: Record<string, { description: string; payload?: ZodSchema }>
20
- events?: Record<string, { description: string }>
21
- }
22
-
23
- // Default schema that accepts any object
24
- const defaultSchema = z.record(z.unknown())
25
-
26
- export function createPageBridge(options: CreatePageBridgeOptions): Bridge {
27
- const { pageId, schema = defaultSchema, actions = {}, events = {} } = options
28
-
29
- const bridge = createBridgeStore({
30
- pageId,
31
- storeKey: 'main',
32
- description: {
33
- schema,
34
- actions,
35
- events,
36
- },
37
- createState: () => ({
38
- // Initial state will be loaded from store.json by gateway
39
- }),
40
- })
41
-
42
- // Mount to window for debugging
43
- if (typeof window !== 'undefined') {
44
- ;(window as unknown as Record<string, unknown>)[`bridge_${pageId}`] = bridge
45
- }
46
-
47
- return bridge as unknown as Bridge
48
- }
49
-
50
- // Legacy export for compatibility
51
- export const bridge = createPageBridge({
52
- pageId: 'counter',
53
- })
@@ -1,6 +0,0 @@
1
- import { clsx, type ClassValue } from "clsx"
2
- import { twMerge } from "tailwind-merge"
3
-
4
- export function cn(...inputs: ClassValue[]) {
5
- return twMerge(clsx(inputs))
6
- }
@@ -1,23 +0,0 @@
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
- )
@@ -1,8 +0,0 @@
1
- {
2
- "state": {
3
- "count": 5
4
- },
5
- "version": 1,
6
- "updatedAt": "2026-02-19T08:00:00.000Z",
7
- "pageId": "counter"
8
- }
@@ -1,108 +0,0 @@
1
- {
2
- "root": "container",
3
- "elements": {
4
- "container": {
5
- "type": "Stack",
6
- "props": {
7
- "direction": "vertical",
8
- "gap": "md",
9
- "align": "center"
10
- },
11
- "children": ["header", "card"]
12
- },
13
- "header": {
14
- "type": "Stack",
15
- "props": {
16
- "direction": "vertical",
17
- "gap": "sm",
18
- "align": "center"
19
- },
20
- "children": ["title", "description"]
21
- },
22
- "title": {
23
- "type": "Heading",
24
- "props": {
25
- "text": "File-based Store Demo",
26
- "level": "h1"
27
- }
28
- },
29
- "description": {
30
- "type": "Text",
31
- "props": {
32
- "text": "This page demonstrates the JSON-render architecture. State is persisted to store.json and synced via bridge.",
33
- "variant": "muted"
34
- }
35
- },
36
- "card": {
37
- "type": "Card",
38
- "props": {
39
- "title": "Counter",
40
- "description": "Try modifying store.json or use CLI to update state"
41
- },
42
- "children": ["counter-content"]
43
- },
44
- "counter-content": {
45
- "type": "Stack",
46
- "props": {
47
- "direction": "vertical",
48
- "gap": "md",
49
- "align": "center"
50
- },
51
- "children": ["count-display", "buttons", "hint"]
52
- },
53
- "count-display": {
54
- "type": "Text",
55
- "props": {
56
- "text": { "$state": "/count" },
57
- "variant": "lead"
58
- }
59
- },
60
- "buttons": {
61
- "type": "Stack",
62
- "props": {
63
- "direction": "horizontal",
64
- "gap": "sm"
65
- },
66
- "children": ["btn-decrement", "btn-increment"]
67
- },
68
- "btn-decrement": {
69
- "type": "Button",
70
- "props": {
71
- "label": "-",
72
- "variant": "secondary"
73
- },
74
- "on": {
75
- "press": {
76
- "action": "setState",
77
- "params": {
78
- "statePath": "/count",
79
- "value": -1
80
- }
81
- }
82
- }
83
- },
84
- "btn-increment": {
85
- "type": "Button",
86
- "props": {
87
- "label": "+",
88
- "variant": "primary"
89
- },
90
- "on": {
91
- "press": {
92
- "action": "setState",
93
- "params": {
94
- "statePath": "/count",
95
- "value": 1
96
- }
97
- }
98
- }
99
- },
100
- "hint": {
101
- "type": "Text",
102
- "props": {
103
- "text": "State is saved to pages/counter/store.json. Try refreshing or editing the file!",
104
- "variant": "caption"
105
- }
106
- }
107
- }
108
- }
@@ -1,8 +0,0 @@
1
- {
2
- "state": {
3
- "count": 42
4
- },
5
- "version": 1,
6
- "updatedAt": "2026-02-17T11:51:56.723Z",
7
- "pageId": "test-page"
8
- }
@@ -1,77 +0,0 @@
1
- /* eslint-disable */
2
-
3
- // @ts-nocheck
4
-
5
- // noinspection JSUnusedGlobalSymbols
6
-
7
- // This file was automatically generated by TanStack Router.
8
- // You should NOT make any changes in this file as it will be overwritten.
9
- // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
10
-
11
- import { Route as rootRouteImport } from './routes/__root'
12
- import { Route as CounterRouteImport } from './routes/counter'
13
- import { Route as IndexRouteImport } from './routes/index'
14
-
15
- const CounterRoute = CounterRouteImport.update({
16
- id: '/counter',
17
- path: '/counter',
18
- getParentRoute: () => rootRouteImport,
19
- } as any)
20
- const IndexRoute = IndexRouteImport.update({
21
- id: '/',
22
- path: '/',
23
- getParentRoute: () => rootRouteImport,
24
- } as any)
25
-
26
- export interface FileRoutesByFullPath {
27
- '/': typeof IndexRoute
28
- '/counter': typeof CounterRoute
29
- }
30
- export interface FileRoutesByTo {
31
- '/': typeof IndexRoute
32
- '/counter': typeof CounterRoute
33
- }
34
- export interface FileRoutesById {
35
- __root__: typeof rootRouteImport
36
- '/': typeof IndexRoute
37
- '/counter': typeof CounterRoute
38
- }
39
- export interface FileRouteTypes {
40
- fileRoutesByFullPath: FileRoutesByFullPath
41
- fullPaths: '/' | '/counter'
42
- fileRoutesByTo: FileRoutesByTo
43
- to: '/' | '/counter'
44
- id: '__root__' | '/' | '/counter'
45
- fileRoutesById: FileRoutesById
46
- }
47
- export interface RootRouteChildren {
48
- IndexRoute: typeof IndexRoute
49
- CounterRoute: typeof CounterRoute
50
- }
51
-
52
- declare module '@tanstack/react-router' {
53
- interface FileRoutesByPath {
54
- '/counter': {
55
- id: '/counter'
56
- path: '/counter'
57
- fullPath: '/counter'
58
- preLoaderRoute: typeof CounterRouteImport
59
- parentRoute: typeof rootRouteImport
60
- }
61
- '/': {
62
- id: '/'
63
- path: '/'
64
- fullPath: '/'
65
- preLoaderRoute: typeof IndexRouteImport
66
- parentRoute: typeof rootRouteImport
67
- }
68
- }
69
- }
70
-
71
- const rootRouteChildren: RootRouteChildren = {
72
- IndexRoute: IndexRoute,
73
- CounterRoute: CounterRoute,
74
- }
75
- export const routeTree = rootRouteImport
76
- ._addFileChildren(rootRouteChildren)
77
- ._addFileTypes<FileRouteTypes>()
@@ -1,11 +0,0 @@
1
- import { createRootRoute, 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
- })
@@ -1,19 +0,0 @@
1
- import { createFileRoute } from '@tanstack/react-router'
2
- import { useMemo } from 'react'
3
- import { PageRenderer } from '../components/PageRenderer'
4
- import { createPageBridge } from '../lib/bridge'
5
-
6
- export const Route = createFileRoute('/counter')({
7
- component: CounterPage,
8
- })
9
-
10
- function CounterPage() {
11
- // Create bridge instance for this page
12
- const bridge = useMemo(() => {
13
- return createPageBridge({
14
- pageId: 'counter',
15
- })
16
- }, [])
17
-
18
- return <PageRenderer pageId="counter" bridge={bridge} />
19
- }
@@ -1,46 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- /// <reference types="vite/client" />