agent-stage 0.2.15 → 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 (53) hide show
  1. package/dist/commands/guide.js +5 -5
  2. package/dist/commands/init.d.ts +2 -0
  3. package/dist/commands/init.js +164 -0
  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 +2 -0
  11. package/dist/commands/{dev/status.js → status.js} +17 -19
  12. package/dist/commands/stop.d.ts +2 -0
  13. package/dist/commands/stop.js +40 -0
  14. package/dist/index.js +8 -2
  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/stop.d.ts +0 -2
  28. package/dist/commands/dev/stop.js +0 -45
  29. package/template/components.json +0 -17
  30. package/template/index.html +0 -13
  31. package/template/package.json +0 -41
  32. package/template/postcss.config.js +0 -6
  33. package/template/src/components/PageRenderer.tsx +0 -108
  34. package/template/src/components/bridge-state-provider.tsx +0 -87
  35. package/template/src/components/ui/button.tsx +0 -55
  36. package/template/src/components/ui/card.tsx +0 -78
  37. package/template/src/components/ui/input.tsx +0 -24
  38. package/template/src/index.css +0 -59
  39. package/template/src/lib/bridge.ts +0 -53
  40. package/template/src/lib/utils.ts +0 -6
  41. package/template/src/main.tsx +0 -23
  42. package/template/src/pages/counter/store.json +0 -8
  43. package/template/src/pages/counter/ui.json +0 -108
  44. package/template/src/pages/test-page/store.json +0 -8
  45. package/template/src/routeTree.gen.ts +0 -77
  46. package/template/src/routes/__root.tsx +0 -11
  47. package/template/src/routes/counter.tsx +0 -19
  48. package/template/src/routes/index.tsx +0 -46
  49. package/template/src/vite-env.d.ts +0 -1
  50. package/template/tailwind.config.js +0 -53
  51. package/template/tsconfig.json +0 -25
  52. package/template/tsconfig.node.json +0 -11
  53. package/template/vite.config.ts +0 -22
@@ -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" />
@@ -1,53 +0,0 @@
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
- }
@@ -1,25 +0,0 @@
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
- }
@@ -1,11 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "skipLibCheck": true,
5
- "module": "ESNext",
6
- "moduleResolution": "bundler",
7
- "allowSyntheticDefaultImports": true,
8
- "strict": true
9
- },
10
- "include": ["vite.config.ts"]
11
- }
@@ -1,22 +0,0 @@
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
- })