gigaclaw 1.4.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/LICENSE +26 -0
- package/README.md +237 -0
- package/api/CLAUDE.md +19 -0
- package/api/index.js +265 -0
- package/bin/cli.js +823 -0
- package/bin/local.sh +85 -0
- package/bin/postinstall.js +63 -0
- package/config/index.js +26 -0
- package/config/instrumentation.js +62 -0
- package/drizzle/0000_initial.sql +52 -0
- package/drizzle/0001_nostalgic_sersi.sql +11 -0
- package/drizzle/0002_black_daimon_hellstrom.sql +19 -0
- package/drizzle/0003_rename_code_workspaces.sql +5 -0
- package/drizzle/meta/0000_snapshot.json +321 -0
- package/drizzle/meta/0001_snapshot.json +390 -0
- package/drizzle/meta/0002_snapshot.json +411 -0
- package/drizzle/meta/0003_snapshot.json +419 -0
- package/drizzle/meta/_journal.json +34 -0
- package/lib/actions.js +44 -0
- package/lib/ai/agent.js +86 -0
- package/lib/ai/index.js +342 -0
- package/lib/ai/model.js +180 -0
- package/lib/ai/tools.js +269 -0
- package/lib/ai/web-search.js +42 -0
- package/lib/auth/actions.js +28 -0
- package/lib/auth/config.js +27 -0
- package/lib/auth/edge-config.js +27 -0
- package/lib/auth/index.js +27 -0
- package/lib/auth/middleware.js +62 -0
- package/lib/channels/base.js +56 -0
- package/lib/channels/index.js +15 -0
- package/lib/channels/telegram.js +148 -0
- package/lib/chat/actions.js +579 -0
- package/lib/chat/api.js +140 -0
- package/lib/chat/components/app-sidebar.js +213 -0
- package/lib/chat/components/app-sidebar.jsx +279 -0
- package/lib/chat/components/chat-header.js +192 -0
- package/lib/chat/components/chat-header.jsx +223 -0
- package/lib/chat/components/chat-input.js +236 -0
- package/lib/chat/components/chat-input.jsx +249 -0
- package/lib/chat/components/chat-nav-context.js +11 -0
- package/lib/chat/components/chat-nav-context.jsx +11 -0
- package/lib/chat/components/chat-page.js +99 -0
- package/lib/chat/components/chat-page.jsx +121 -0
- package/lib/chat/components/chat.js +153 -0
- package/lib/chat/components/chat.jsx +199 -0
- package/lib/chat/components/chats-page.js +367 -0
- package/lib/chat/components/chats-page.jsx +394 -0
- package/lib/chat/components/code-mode-toggle.js +132 -0
- package/lib/chat/components/code-mode-toggle.jsx +163 -0
- package/lib/chat/components/crons-page.js +172 -0
- package/lib/chat/components/crons-page.jsx +244 -0
- package/lib/chat/components/greeting.js +11 -0
- package/lib/chat/components/greeting.jsx +16 -0
- package/lib/chat/components/icons.js +805 -0
- package/lib/chat/components/icons.jsx +751 -0
- package/lib/chat/components/index.js +20 -0
- package/lib/chat/components/message.js +363 -0
- package/lib/chat/components/message.jsx +422 -0
- package/lib/chat/components/messages.js +65 -0
- package/lib/chat/components/messages.jsx +74 -0
- package/lib/chat/components/notifications-page.js +56 -0
- package/lib/chat/components/notifications-page.jsx +87 -0
- package/lib/chat/components/page-layout.js +21 -0
- package/lib/chat/components/page-layout.jsx +28 -0
- package/lib/chat/components/pull-requests-page.js +103 -0
- package/lib/chat/components/pull-requests-page.jsx +113 -0
- package/lib/chat/components/settings-layout.js +39 -0
- package/lib/chat/components/settings-layout.jsx +53 -0
- package/lib/chat/components/settings-secrets-page.js +216 -0
- package/lib/chat/components/settings-secrets-page.jsx +264 -0
- package/lib/chat/components/sidebar-history-item.js +138 -0
- package/lib/chat/components/sidebar-history-item.jsx +119 -0
- package/lib/chat/components/sidebar-history.js +167 -0
- package/lib/chat/components/sidebar-history.jsx +220 -0
- package/lib/chat/components/sidebar-user-nav.js +61 -0
- package/lib/chat/components/sidebar-user-nav.jsx +77 -0
- package/lib/chat/components/swarm-page.js +157 -0
- package/lib/chat/components/swarm-page.jsx +210 -0
- package/lib/chat/components/tool-call.js +89 -0
- package/lib/chat/components/tool-call.jsx +107 -0
- package/lib/chat/components/triggers-page.js +153 -0
- package/lib/chat/components/triggers-page.jsx +221 -0
- package/lib/chat/components/ui/combobox.js +98 -0
- package/lib/chat/components/ui/combobox.jsx +114 -0
- package/lib/chat/components/ui/confirm-dialog.js +53 -0
- package/lib/chat/components/ui/confirm-dialog.jsx +57 -0
- package/lib/chat/components/ui/dropdown-menu.js +194 -0
- package/lib/chat/components/ui/dropdown-menu.jsx +215 -0
- package/lib/chat/components/ui/rename-dialog.js +78 -0
- package/lib/chat/components/ui/rename-dialog.jsx +74 -0
- package/lib/chat/components/ui/scroll-area.js +13 -0
- package/lib/chat/components/ui/scroll-area.jsx +17 -0
- package/lib/chat/components/ui/separator.js +21 -0
- package/lib/chat/components/ui/separator.jsx +18 -0
- package/lib/chat/components/ui/sheet.js +75 -0
- package/lib/chat/components/ui/sheet.jsx +95 -0
- package/lib/chat/components/ui/sidebar.js +228 -0
- package/lib/chat/components/ui/sidebar.jsx +246 -0
- package/lib/chat/components/ui/tooltip.js +56 -0
- package/lib/chat/components/ui/tooltip.jsx +66 -0
- package/lib/chat/components/upgrade-dialog.js +151 -0
- package/lib/chat/components/upgrade-dialog.jsx +170 -0
- package/lib/chat/utils.js +11 -0
- package/lib/code/actions.js +153 -0
- package/lib/code/code-page.js +22 -0
- package/lib/code/code-page.jsx +25 -0
- package/lib/code/index.js +1 -0
- package/lib/code/terminal-view.js +201 -0
- package/lib/code/terminal-view.jsx +224 -0
- package/lib/code/ws-proxy.js +80 -0
- package/lib/cron.js +246 -0
- package/lib/db/api-keys.js +163 -0
- package/lib/db/chats.js +168 -0
- package/lib/db/code-workspaces.js +110 -0
- package/lib/db/index.js +52 -0
- package/lib/db/notifications.js +99 -0
- package/lib/db/schema.js +66 -0
- package/lib/db/update-check.js +96 -0
- package/lib/db/users.js +89 -0
- package/lib/paths.js +42 -0
- package/lib/tools/create-job.js +97 -0
- package/lib/tools/docker.js +146 -0
- package/lib/tools/github.js +271 -0
- package/lib/tools/openai.js +35 -0
- package/lib/tools/telegram.js +292 -0
- package/lib/triggers.js +104 -0
- package/lib/utils/render-md.js +111 -0
- package/package.json +118 -0
- package/setup/lib/auth.mjs +81 -0
- package/setup/lib/env.mjs +21 -0
- package/setup/lib/fs-utils.mjs +20 -0
- package/setup/lib/github.mjs +149 -0
- package/setup/lib/prerequisites.mjs +155 -0
- package/setup/lib/prompts.mjs +267 -0
- package/setup/lib/providers.mjs +105 -0
- package/setup/lib/sync.mjs +125 -0
- package/setup/lib/targets.mjs +45 -0
- package/setup/lib/telegram-verify.mjs +63 -0
- package/setup/lib/telegram.mjs +76 -0
- package/setup/setup-cloud.mjs +833 -0
- package/setup/setup-local.mjs +377 -0
- package/setup/setup-telegram.mjs +265 -0
- package/setup/setup.mjs +87 -0
- package/templates/.dockerignore +5 -0
- package/templates/.env.example +104 -0
- package/templates/.github/workflows/auto-merge.yml +117 -0
- package/templates/.github/workflows/notify-job-failed.yml +64 -0
- package/templates/.github/workflows/notify-pr-complete.yml +119 -0
- package/templates/.github/workflows/rebuild-event-handler.yml +121 -0
- package/templates/.github/workflows/run-job.yml +89 -0
- package/templates/.github/workflows/upgrade-event-handler.yml +62 -0
- package/templates/.gitignore.template +45 -0
- package/templates/.pi/extensions/env-sanitizer/index.ts +48 -0
- package/templates/.pi/extensions/env-sanitizer/package.json +5 -0
- package/templates/CLAUDE.md +29 -0
- package/templates/CLAUDE.md.template +308 -0
- package/templates/app/api/[...gigaclaw]/route.js +1 -0
- package/templates/app/api/auth/[...nextauth]/route.js +1 -0
- package/templates/app/chat/[chatId]/page.js +9 -0
- package/templates/app/chats/page.js +7 -0
- package/templates/app/code/[codeWorkspaceId]/page.js +9 -0
- package/templates/app/components/ascii-logo.jsx +12 -0
- package/templates/app/components/login-form.jsx +92 -0
- package/templates/app/components/setup-form.jsx +82 -0
- package/templates/app/components/theme-provider.jsx +11 -0
- package/templates/app/components/theme-toggle.jsx +38 -0
- package/templates/app/components/ui/button.jsx +21 -0
- package/templates/app/components/ui/card.jsx +23 -0
- package/templates/app/components/ui/input.jsx +10 -0
- package/templates/app/components/ui/label.jsx +10 -0
- package/templates/app/crons/page.js +5 -0
- package/templates/app/globals.css +90 -0
- package/templates/app/layout.js +33 -0
- package/templates/app/login/page.js +15 -0
- package/templates/app/notifications/page.js +7 -0
- package/templates/app/page.js +7 -0
- package/templates/app/pull-requests/page.js +7 -0
- package/templates/app/settings/crons/page.js +5 -0
- package/templates/app/settings/layout.js +7 -0
- package/templates/app/settings/page.js +5 -0
- package/templates/app/settings/secrets/page.js +5 -0
- package/templates/app/settings/triggers/page.js +5 -0
- package/templates/app/stream/chat/route.js +1 -0
- package/templates/app/swarm/page.js +7 -0
- package/templates/app/triggers/page.js +5 -0
- package/templates/config/CODE_PLANNING.md +14 -0
- package/templates/config/CRONS.json +56 -0
- package/templates/config/HEARTBEAT.md +3 -0
- package/templates/config/JOB_AGENT.md +30 -0
- package/templates/config/JOB_PLANNING.md +240 -0
- package/templates/config/JOB_SUMMARY.md +130 -0
- package/templates/config/SKILL_BUILDING_GUIDE.md +96 -0
- package/templates/config/SOUL.md +48 -0
- package/templates/config/TRIGGERS.json +58 -0
- package/templates/config/WEB_SEARCH_AVAILABLE.md +5 -0
- package/templates/config/WEB_SEARCH_UNAVAILABLE.md +3 -0
- package/templates/docker/claude-code-job/Dockerfile +34 -0
- package/templates/docker/claude-code-job/entrypoint.sh +149 -0
- package/templates/docker/claude-code-workspace/.tmux.conf +5 -0
- package/templates/docker/claude-code-workspace/Dockerfile +61 -0
- package/templates/docker/claude-code-workspace/entrypoint.sh +51 -0
- package/templates/docker/event-handler/Dockerfile +20 -0
- package/templates/docker/event-handler/ecosystem.config.cjs +7 -0
- package/templates/docker/pi-coding-agent-job/Dockerfile +51 -0
- package/templates/docker/pi-coding-agent-job/entrypoint.sh +164 -0
- package/templates/docker-compose.local.yml +78 -0
- package/templates/docker-compose.yml +64 -0
- package/templates/instrumentation.js +6 -0
- package/templates/middleware.js +23 -0
- package/templates/next.config.mjs +3 -0
- package/templates/postcss.config.mjs +5 -0
- package/templates/public/favicon.ico +0 -0
- package/templates/server.js +25 -0
- package/templates/skills/LICENSE +21 -0
- package/templates/skills/README.md +119 -0
- package/templates/skills/brave-search/SKILL.md +79 -0
- package/templates/skills/brave-search/content.js +86 -0
- package/templates/skills/brave-search/package-lock.json +621 -0
- package/templates/skills/brave-search/package.json +14 -0
- package/templates/skills/brave-search/search.js +199 -0
- package/templates/skills/browser-tools/SKILL.md +196 -0
- package/templates/skills/browser-tools/browser-content.js +103 -0
- package/templates/skills/browser-tools/browser-cookies.js +35 -0
- package/templates/skills/browser-tools/browser-eval.js +53 -0
- package/templates/skills/browser-tools/browser-hn-scraper.js +108 -0
- package/templates/skills/browser-tools/browser-nav.js +44 -0
- package/templates/skills/browser-tools/browser-pick.js +162 -0
- package/templates/skills/browser-tools/browser-screenshot.js +34 -0
- package/templates/skills/browser-tools/browser-start.js +87 -0
- package/templates/skills/browser-tools/package-lock.json +2556 -0
- package/templates/skills/browser-tools/package.json +19 -0
- package/templates/skills/google-docs/SKILL.md +23 -0
- package/templates/skills/google-docs/create.sh +69 -0
- package/templates/skills/google-drive/SKILL.md +47 -0
- package/templates/skills/google-drive/delete.sh +47 -0
- package/templates/skills/google-drive/download.sh +50 -0
- package/templates/skills/google-drive/list.sh +41 -0
- package/templates/skills/google-drive/upload.sh +76 -0
- package/templates/skills/kie-ai/SKILL.md +38 -0
- package/templates/skills/kie-ai/generate-image.sh +77 -0
- package/templates/skills/kie-ai/generate-video.sh +69 -0
- package/templates/skills/llm-secrets/SKILL.md +34 -0
- package/templates/skills/llm-secrets/llm-secrets.js +33 -0
- package/templates/skills/modify-self/SKILL.md +12 -0
- package/templates/skills/youtube-transcript/SKILL.md +41 -0
- package/templates/skills/youtube-transcript/package-lock.json +24 -0
- package/templates/skills/youtube-transcript/package.json +8 -0
- package/templates/skills/youtube-transcript/transcript.js +84 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { signIn } from 'next-auth/react';
|
|
5
|
+
import { useRouter, useSearchParams } from 'next/navigation';
|
|
6
|
+
import { Button } from './ui/button';
|
|
7
|
+
import { Input } from './ui/input';
|
|
8
|
+
import { Label } from './ui/label';
|
|
9
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './ui/card';
|
|
10
|
+
|
|
11
|
+
export function LoginForm() {
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const searchParams = useSearchParams();
|
|
14
|
+
const justCreated = searchParams.get('created') === '1';
|
|
15
|
+
const [email, setEmail] = useState('');
|
|
16
|
+
const [password, setPassword] = useState('');
|
|
17
|
+
const [error, setError] = useState('');
|
|
18
|
+
const [loading, setLoading] = useState(false);
|
|
19
|
+
|
|
20
|
+
async function handleSubmit(e) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
setError('');
|
|
23
|
+
setLoading(true);
|
|
24
|
+
|
|
25
|
+
try {
|
|
26
|
+
const result = await signIn('credentials', {
|
|
27
|
+
email,
|
|
28
|
+
password,
|
|
29
|
+
redirect: false,
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
if (result?.error) {
|
|
33
|
+
setError('Invalid email or password.');
|
|
34
|
+
} else {
|
|
35
|
+
router.push('/');
|
|
36
|
+
}
|
|
37
|
+
} catch {
|
|
38
|
+
setError('Something went wrong. Please try again.');
|
|
39
|
+
} finally {
|
|
40
|
+
setLoading(false);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div className="w-full max-w-sm space-y-3">
|
|
46
|
+
{justCreated && (
|
|
47
|
+
<div className="rounded-lg border border-green-500/30 bg-green-500/5 p-4">
|
|
48
|
+
<p className="text-sm font-medium text-green-600 dark:text-green-400">
|
|
49
|
+
Account created. Sign in with your new credentials.
|
|
50
|
+
</p>
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
<Card className="w-full max-w-sm">
|
|
54
|
+
<CardHeader>
|
|
55
|
+
<CardTitle>Sign In</CardTitle>
|
|
56
|
+
<CardDescription>Log in to your agent dashboard.</CardDescription>
|
|
57
|
+
</CardHeader>
|
|
58
|
+
<CardContent>
|
|
59
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
60
|
+
<div className="space-y-2">
|
|
61
|
+
<Label htmlFor="email">Email</Label>
|
|
62
|
+
<Input
|
|
63
|
+
id="email"
|
|
64
|
+
type="email"
|
|
65
|
+
placeholder="admin@example.com"
|
|
66
|
+
value={email}
|
|
67
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
68
|
+
required
|
|
69
|
+
/>
|
|
70
|
+
</div>
|
|
71
|
+
<div className="space-y-2">
|
|
72
|
+
<Label htmlFor="password">Password</Label>
|
|
73
|
+
<Input
|
|
74
|
+
id="password"
|
|
75
|
+
type="password"
|
|
76
|
+
value={password}
|
|
77
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
78
|
+
required
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
{error && (
|
|
82
|
+
<p className="text-sm text-destructive">{error}</p>
|
|
83
|
+
)}
|
|
84
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
85
|
+
{loading ? 'Signing in...' : 'Sign In'}
|
|
86
|
+
</Button>
|
|
87
|
+
</form>
|
|
88
|
+
</CardContent>
|
|
89
|
+
</Card>
|
|
90
|
+
</div>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { useRouter } from 'next/navigation';
|
|
5
|
+
import { Button } from './ui/button';
|
|
6
|
+
import { Input } from './ui/input';
|
|
7
|
+
import { Label } from './ui/label';
|
|
8
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent } from './ui/card';
|
|
9
|
+
import { setupAdmin } from 'gigaclaw/auth/actions';
|
|
10
|
+
|
|
11
|
+
export function SetupForm() {
|
|
12
|
+
const router = useRouter();
|
|
13
|
+
const [email, setEmail] = useState('');
|
|
14
|
+
const [password, setPassword] = useState('');
|
|
15
|
+
const [error, setError] = useState('');
|
|
16
|
+
const [loading, setLoading] = useState(false);
|
|
17
|
+
|
|
18
|
+
async function handleSubmit(e) {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
setError('');
|
|
21
|
+
setLoading(true);
|
|
22
|
+
|
|
23
|
+
try {
|
|
24
|
+
const result = await setupAdmin(email, password);
|
|
25
|
+
|
|
26
|
+
if (result.error) {
|
|
27
|
+
setError(result.error);
|
|
28
|
+
setLoading(false);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Redirect to login with success indicator — admin must authenticate through the normal flow
|
|
33
|
+
router.push('/login?created=1');
|
|
34
|
+
} catch {
|
|
35
|
+
setError('Something went wrong. Please try again.');
|
|
36
|
+
} finally {
|
|
37
|
+
setLoading(false);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<Card className="w-full max-w-sm">
|
|
43
|
+
<CardHeader>
|
|
44
|
+
<CardTitle>Create Admin Account</CardTitle>
|
|
45
|
+
<CardDescription>Set up your first admin account to get started.</CardDescription>
|
|
46
|
+
</CardHeader>
|
|
47
|
+
<CardContent>
|
|
48
|
+
<form onSubmit={handleSubmit} className="space-y-4">
|
|
49
|
+
<div className="space-y-2">
|
|
50
|
+
<Label htmlFor="email">Email</Label>
|
|
51
|
+
<Input
|
|
52
|
+
id="email"
|
|
53
|
+
type="email"
|
|
54
|
+
placeholder="admin@example.com"
|
|
55
|
+
value={email}
|
|
56
|
+
onChange={(e) => setEmail(e.target.value)}
|
|
57
|
+
required
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
<div className="space-y-2">
|
|
61
|
+
<Label htmlFor="password">Password</Label>
|
|
62
|
+
<Input
|
|
63
|
+
id="password"
|
|
64
|
+
type="password"
|
|
65
|
+
placeholder="Min 8 characters"
|
|
66
|
+
value={password}
|
|
67
|
+
onChange={(e) => setPassword(e.target.value)}
|
|
68
|
+
required
|
|
69
|
+
minLength={8}
|
|
70
|
+
/>
|
|
71
|
+
</div>
|
|
72
|
+
{error && (
|
|
73
|
+
<p className="text-sm text-destructive">{error}</p>
|
|
74
|
+
)}
|
|
75
|
+
<Button type="submit" className="w-full" disabled={loading}>
|
|
76
|
+
{loading ? 'Creating...' : 'Create Account'}
|
|
77
|
+
</Button>
|
|
78
|
+
</form>
|
|
79
|
+
</CardContent>
|
|
80
|
+
</Card>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { ThemeProvider as NextThemesProvider } from 'next-themes';
|
|
4
|
+
|
|
5
|
+
export function ThemeProvider({ children }) {
|
|
6
|
+
return (
|
|
7
|
+
<NextThemesProvider attribute="class" defaultTheme="system" enableSystem>
|
|
8
|
+
{children}
|
|
9
|
+
</NextThemesProvider>
|
|
10
|
+
);
|
|
11
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { useTheme } from 'next-themes';
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
|
|
6
|
+
export function ThemeToggle() {
|
|
7
|
+
const { theme, setTheme } = useTheme();
|
|
8
|
+
const [mounted, setMounted] = useState(false);
|
|
9
|
+
|
|
10
|
+
useEffect(() => setMounted(true), []);
|
|
11
|
+
|
|
12
|
+
if (!mounted) return <div className="h-[34px] w-[106px]" />;
|
|
13
|
+
|
|
14
|
+
const options = [
|
|
15
|
+
{ value: 'light', label: '☀️' },
|
|
16
|
+
{ value: 'dark', label: '🌙' },
|
|
17
|
+
{ value: 'system', label: '💻' },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<div className="flex items-center gap-1 rounded-md border border-border bg-muted p-1">
|
|
22
|
+
{options.map((opt) => (
|
|
23
|
+
<button
|
|
24
|
+
key={opt.value}
|
|
25
|
+
onClick={() => setTheme(opt.value)}
|
|
26
|
+
className={`rounded px-2 py-1 text-sm transition-colors ${
|
|
27
|
+
theme === opt.value
|
|
28
|
+
? 'bg-background text-foreground shadow-sm'
|
|
29
|
+
: 'text-muted-foreground hover:text-foreground'
|
|
30
|
+
}`}
|
|
31
|
+
title={opt.value.charAt(0).toUpperCase() + opt.value.slice(1)}
|
|
32
|
+
>
|
|
33
|
+
{opt.label}
|
|
34
|
+
</button>
|
|
35
|
+
))}
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Button({ children, variant = 'default', className = '', disabled, ...props }) {
|
|
4
|
+
const base = 'inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 px-4 py-2';
|
|
5
|
+
|
|
6
|
+
const variants = {
|
|
7
|
+
default: 'bg-primary text-primary-foreground hover:bg-primary/90',
|
|
8
|
+
outline: 'border border-border bg-transparent text-foreground hover:bg-muted',
|
|
9
|
+
ghost: 'text-foreground hover:bg-muted',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<button
|
|
14
|
+
className={`${base} ${variants[variant] || variants.default} ${className}`}
|
|
15
|
+
disabled={disabled}
|
|
16
|
+
{...props}
|
|
17
|
+
>
|
|
18
|
+
{children}
|
|
19
|
+
</button>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export function Card({ children, className = '' }) {
|
|
2
|
+
return (
|
|
3
|
+
<div className={`rounded-lg border border-border bg-muted p-6 ${className}`}>
|
|
4
|
+
{children}
|
|
5
|
+
</div>
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function CardHeader({ children, className = '' }) {
|
|
10
|
+
return <div className={`mb-4 ${className}`}>{children}</div>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export function CardTitle({ children, className = '' }) {
|
|
14
|
+
return <h2 className={`text-lg font-semibold text-foreground ${className}`}>{children}</h2>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function CardDescription({ children, className = '' }) {
|
|
18
|
+
return <p className={`text-sm text-muted-foreground ${className}`}>{children}</p>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function CardContent({ children, className = '' }) {
|
|
22
|
+
return <div className={className}>{children}</div>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
export function Input({ className = '', ...props }) {
|
|
4
|
+
return (
|
|
5
|
+
<input
|
|
6
|
+
className={`flex h-10 w-full rounded-md border border-border bg-input px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${className}`}
|
|
7
|
+
{...props}
|
|
8
|
+
/>
|
|
9
|
+
);
|
|
10
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
@import "streamdown/styles.css";
|
|
3
|
+
@source "../node_modules/gigabot/lib/**/*.{js,jsx}";
|
|
4
|
+
@source "../node_modules/streamdown/dist/**/*.js";
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--background: #ffffff;
|
|
8
|
+
--foreground: #171717;
|
|
9
|
+
--primary: #171717;
|
|
10
|
+
--primary-foreground: #ffffff;
|
|
11
|
+
--muted: #f5f5f5;
|
|
12
|
+
--muted-foreground: #737373;
|
|
13
|
+
--border: #e5e5e5;
|
|
14
|
+
--input: #f5f5f5;
|
|
15
|
+
--ring: #171717;
|
|
16
|
+
--destructive: #dc2626;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dark {
|
|
20
|
+
--background: #0a0a0a;
|
|
21
|
+
--foreground: #ededed;
|
|
22
|
+
--primary: #ededed;
|
|
23
|
+
--primary-foreground: #0a0a0a;
|
|
24
|
+
--muted: #171717;
|
|
25
|
+
--muted-foreground: #a3a3a3;
|
|
26
|
+
--border: #262626;
|
|
27
|
+
--input: #171717;
|
|
28
|
+
--ring: #ededed;
|
|
29
|
+
--destructive: #ef4444;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@theme inline {
|
|
33
|
+
--color-background: var(--background);
|
|
34
|
+
--color-foreground: var(--foreground);
|
|
35
|
+
--color-primary: var(--primary);
|
|
36
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
37
|
+
--color-muted: var(--muted);
|
|
38
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
39
|
+
--color-border: var(--border);
|
|
40
|
+
--color-input: var(--input);
|
|
41
|
+
--color-ring: var(--ring);
|
|
42
|
+
--color-destructive: var(--destructive);
|
|
43
|
+
--text-xs: 0.8125rem;
|
|
44
|
+
--text-xs--line-height: 1.125rem;
|
|
45
|
+
--text-sm: 1rem;
|
|
46
|
+
--text-sm--line-height: 1.5rem;
|
|
47
|
+
--font-sans: system-ui, -apple-system, sans-serif;
|
|
48
|
+
--font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
|
|
49
|
+
--radius-sm: 0.375rem;
|
|
50
|
+
--radius-md: 0.5rem;
|
|
51
|
+
--radius-lg: 0.75rem;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Scrollbar styling */
|
|
55
|
+
.scrollbar-thin {
|
|
56
|
+
scrollbar-width: thin;
|
|
57
|
+
scrollbar-color: var(--border) transparent;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.scrollbar-thin::-webkit-scrollbar {
|
|
61
|
+
width: 6px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.scrollbar-thin::-webkit-scrollbar-track {
|
|
65
|
+
background: transparent;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.scrollbar-thin::-webkit-scrollbar-thumb {
|
|
69
|
+
background-color: var(--border);
|
|
70
|
+
border-radius: 3px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Code block horizontal scroll — target the pre (code-block-body), not the
|
|
74
|
+
outer wrapper which needs overflow-hidden for border-radius clipping */
|
|
75
|
+
[data-streamdown="code-block-body"] {
|
|
76
|
+
overflow-x: auto !important;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
[data-streamdown="code-block-body"]::-webkit-scrollbar {
|
|
80
|
+
height: 6px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-streamdown="code-block-body"]::-webkit-scrollbar-track {
|
|
84
|
+
background: transparent;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
[data-streamdown="code-block-body"]::-webkit-scrollbar-thumb {
|
|
88
|
+
background-color: var(--border);
|
|
89
|
+
border-radius: 3px;
|
|
90
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import './globals.css';
|
|
2
|
+
import { ThemeProvider } from './components/theme-provider';
|
|
3
|
+
|
|
4
|
+
export const metadata = {
|
|
5
|
+
title: 'Giga Bot — Autonomous AI Agent by Gignaati',
|
|
6
|
+
description: 'Giga Bot is an autonomous AI agent platform by Gignaati. Build, deploy, and run AI agents 24/7 with India-first, edge-native AI. Supports PragatiGPT, Claude, GPT, Gemini, and local models via Ollama.',
|
|
7
|
+
keywords: ['AI agent', 'autonomous agent', 'Gignaati', 'PragatiGPT', 'India AI', 'edge AI', 'Giga Bot'],
|
|
8
|
+
authors: [{ name: 'Gignaati', url: 'https://www.gignaati.com' }],
|
|
9
|
+
creator: 'Gignaati',
|
|
10
|
+
publisher: 'Gignaati',
|
|
11
|
+
openGraph: {
|
|
12
|
+
title: 'Giga Bot — Autonomous AI Agent by Gignaati',
|
|
13
|
+
description: 'Build, deploy, and run AI agents 24/7 with India-first, edge-native AI.',
|
|
14
|
+
siteName: 'Giga Bot by Gignaati',
|
|
15
|
+
type: 'website',
|
|
16
|
+
},
|
|
17
|
+
robots: {
|
|
18
|
+
index: false, // Private agent — do not index
|
|
19
|
+
follow: false,
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default function RootLayout({ children }) {
|
|
24
|
+
return (
|
|
25
|
+
<html lang="en" suppressHydrationWarning>
|
|
26
|
+
<body className="min-h-screen bg-background text-foreground antialiased">
|
|
27
|
+
<ThemeProvider>
|
|
28
|
+
{children}
|
|
29
|
+
</ThemeProvider>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getPageAuthState } from 'gigaclaw/auth';
|
|
2
|
+
import { AsciiLogo } from '../components/ascii-logo';
|
|
3
|
+
import { SetupForm } from '../components/setup-form';
|
|
4
|
+
import { LoginForm } from '../components/login-form';
|
|
5
|
+
|
|
6
|
+
export default async function LoginPage() {
|
|
7
|
+
const { needsSetup } = await getPageAuthState();
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<main className="min-h-screen flex flex-col items-center justify-center p-8">
|
|
11
|
+
<AsciiLogo />
|
|
12
|
+
{needsSetup ? <SetupForm /> : <LoginForm />}
|
|
13
|
+
</main>
|
|
14
|
+
);
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { POST } from 'gigaclaw/chat/api';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
You are a coding assistant. The user has selected a GitHub repository and branch to work on. Help them discuss and plan what they want to build.
|
|
2
|
+
|
|
3
|
+
You have two tools:
|
|
4
|
+
|
|
5
|
+
1. **get_repository_details** — Fetches CLAUDE.md and README.md from the selected repo/branch so you understand the project.
|
|
6
|
+
2. **start_coding** — Launches a live Claude Code workspace where the actual coding happens.
|
|
7
|
+
|
|
8
|
+
IMPORTANT RULES:
|
|
9
|
+
- When the user sends their first message, you MUST call get_repository_details immediately — before responding to anything. This gives you project context.
|
|
10
|
+
- After getting repo context, help the user refine their idea, answer questions, suggest approaches.
|
|
11
|
+
- Do NOT call start_coding until the user explicitly says they're ready (e.g. "let's start", "go ahead", "launch it").
|
|
12
|
+
- When you call start_coding, include a thorough task_description summarizing what to build based on the conversation.
|
|
13
|
+
|
|
14
|
+
Today is {{datetime}}.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "heartbeat",
|
|
4
|
+
"schedule": "*/30 * * * *",
|
|
5
|
+
"type": "agent",
|
|
6
|
+
"job": "Read the file at config/HEARTBEAT.md and complete the tasks described there.",
|
|
7
|
+
"enabled": false
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "daily-check",
|
|
11
|
+
"schedule": "0 9 * * *",
|
|
12
|
+
"type": "agent",
|
|
13
|
+
"job": "Check for dependency updates in package.json and report any outdated packages.",
|
|
14
|
+
"enabled": false
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "ping",
|
|
18
|
+
"schedule": "*/1 * * * *",
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "echo \"pong!\"",
|
|
21
|
+
"enabled": true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "cleanup-logs",
|
|
25
|
+
"schedule": "0 0 * * 0",
|
|
26
|
+
"type": "command",
|
|
27
|
+
"command": "ls -la logs/",
|
|
28
|
+
"enabled": false
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "ping-status",
|
|
32
|
+
"schedule": "*/5 * * * *",
|
|
33
|
+
"type": "webhook",
|
|
34
|
+
"url": "https://example.com/status",
|
|
35
|
+
"method": "POST",
|
|
36
|
+
"vars": { "source": "heartbeat" },
|
|
37
|
+
"enabled": false
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "health-check",
|
|
41
|
+
"schedule": "*/10 * * * *",
|
|
42
|
+
"type": "webhook",
|
|
43
|
+
"url": "https://example.com/health",
|
|
44
|
+
"method": "GET",
|
|
45
|
+
"enabled": false
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "daily-check-openai",
|
|
49
|
+
"schedule": "0 9 * * *",
|
|
50
|
+
"type": "agent",
|
|
51
|
+
"job": "Check for dependency updates in package.json and report any outdated packages.",
|
|
52
|
+
"llm_provider": "openai",
|
|
53
|
+
"llm_model": "gpt-4o",
|
|
54
|
+
"enabled": false
|
|
55
|
+
}
|
|
56
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# gigaclaw Agent Environment
|
|
2
|
+
|
|
3
|
+
**This document describes what you are and your operating environment**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. What You Are
|
|
8
|
+
|
|
9
|
+
You are **gigaclaw**, an autonomous AI agent running inside a Docker container.
|
|
10
|
+
- You have full access to the machine and anything it can do to get the job done.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 2. Local Docker Environment Reference
|
|
15
|
+
|
|
16
|
+
### WORKDIR — `/job` is a git repo
|
|
17
|
+
|
|
18
|
+
Your working directory is `/job`. **This is a live git repository.** When your job finishes, everything inside `/job` is automatically committed and pushed via `git add -A`. You do not control this — it happens after you exit.
|
|
19
|
+
|
|
20
|
+
This means: **any file you create, copy, move, or download into `/job` or any subdirectory of `/job` WILL be committed to the repository.** There are no exceptions.
|
|
21
|
+
|
|
22
|
+
### All working files go in `/tmp`
|
|
23
|
+
|
|
24
|
+
**NEVER save, copy, move, or download files into `/job`** unless the job specifically requires changing the repository (e.g. editing source code, updating config files).
|
|
25
|
+
|
|
26
|
+
Use `/tmp` for everything else — downloads, generated files, images, videos, scripts, intermediate data, API responses, anything you create to get the job done. `/tmp` is outside the repo and nothing there gets committed.
|
|
27
|
+
|
|
28
|
+
If a skill or tool downloads a file to `/tmp`, **leave it there**. Do not copy or move it into `/job`. If you need to pass that file to another tool (e.g. uploading it somewhere), reference it directly from `/tmp`.
|
|
29
|
+
|
|
30
|
+
Current datetime: {{datetime}}
|