bazilion 0.0.0 → 0.1.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.
Files changed (265) hide show
  1. package/README.md +53 -152
  2. package/dist/cli.js +2730 -0
  3. package/dist/cli.js.map +1 -0
  4. package/dist/daemon.js +5888 -0
  5. package/dist/daemon.js.map +1 -0
  6. package/dist/worker.js +1830 -0
  7. package/dist/worker.js.map +1 -0
  8. package/package.json +57 -28
  9. package/.understand-anything/.understandignore +0 -25
  10. package/.understand-anything/fingerprints.json +0 -14267
  11. package/.understand-anything/knowledge-graph.json +0 -18128
  12. package/.understand-anything/meta.json +0 -6
  13. package/CLAUDE.md +0 -164
  14. package/apps/cli/package.json +0 -21
  15. package/apps/cli/src/auth-file.ts +0 -18
  16. package/apps/cli/src/client.ts +0 -37
  17. package/apps/cli/src/columnize.ts +0 -32
  18. package/apps/cli/src/commands/agent.ts +0 -574
  19. package/apps/cli/src/commands/auth.ts +0 -110
  20. package/apps/cli/src/commands/backup.ts +0 -135
  21. package/apps/cli/src/commands/completion.ts +0 -155
  22. package/apps/cli/src/commands/config.ts +0 -95
  23. package/apps/cli/src/commands/doctor.ts +0 -131
  24. package/apps/cli/src/commands/group.ts +0 -132
  25. package/apps/cli/src/commands/inbox.ts +0 -82
  26. package/apps/cli/src/commands/login.ts +0 -73
  27. package/apps/cli/src/commands/memory.ts +0 -106
  28. package/apps/cli/src/commands/profile.ts +0 -259
  29. package/apps/cli/src/commands/provider.ts +0 -170
  30. package/apps/cli/src/commands/send.ts +0 -24
  31. package/apps/cli/src/commands/serve.ts +0 -89
  32. package/apps/cli/src/commands/skill.ts +0 -120
  33. package/apps/cli/src/commands/token.ts +0 -148
  34. package/apps/cli/src/commands/trigger.ts +0 -129
  35. package/apps/cli/src/commands/uninstall.ts +0 -156
  36. package/apps/cli/src/index.ts +0 -196
  37. package/apps/cli/src/paths.ts +0 -12
  38. package/apps/cli/test/agent.test.ts +0 -213
  39. package/apps/cli/test/backup.test.ts +0 -95
  40. package/apps/cli/test/chat.test.ts +0 -539
  41. package/apps/cli/test/columnize.test.ts +0 -29
  42. package/apps/cli/test/completion.test.ts +0 -45
  43. package/apps/cli/test/config-page.test.ts +0 -151
  44. package/apps/cli/test/group.test.ts +0 -74
  45. package/apps/cli/test/helpers.ts +0 -70
  46. package/apps/cli/test/inbox-autodeliver.test.ts +0 -143
  47. package/apps/cli/test/inbox.test.ts +0 -147
  48. package/apps/cli/test/memory.test.ts +0 -69
  49. package/apps/cli/test/profile.test.ts +0 -110
  50. package/apps/cli/test/send.test.ts +0 -30
  51. package/apps/cli/test/server-fixture.ts +0 -212
  52. package/apps/cli/test/session-head.test.ts +0 -45
  53. package/apps/cli/test/skill.test.ts +0 -128
  54. package/apps/cli/test/token.test.ts +0 -109
  55. package/apps/cli/test/trigger.test.ts +0 -245
  56. package/apps/cli/tsconfig.json +0 -4
  57. package/apps/daemon/package.json +0 -31
  58. package/apps/daemon/src/app.ts +0 -41
  59. package/apps/daemon/src/core/agent/archive.ts +0 -8
  60. package/apps/daemon/src/core/agent/delete.ts +0 -30
  61. package/apps/daemon/src/core/agent/resolve.ts +0 -31
  62. package/apps/daemon/src/core/agent/spawn.ts +0 -95
  63. package/apps/daemon/src/core/agent/unarchive.ts +0 -11
  64. package/apps/daemon/src/core/availableModels.ts +0 -58
  65. package/apps/daemon/src/core/db/client.ts +0 -113
  66. package/apps/daemon/src/core/db/migrate.ts +0 -41
  67. package/apps/daemon/src/core/db/migrations/0001_init.sql +0 -179
  68. package/apps/daemon/src/core/group/delete.ts +0 -21
  69. package/apps/daemon/src/core/group/register.ts +0 -68
  70. package/apps/daemon/src/core/index.ts +0 -71
  71. package/apps/daemon/src/core/paths.ts +0 -56
  72. package/apps/daemon/src/core/profile/create.ts +0 -78
  73. package/apps/daemon/src/core/profile/delete.ts +0 -26
  74. package/apps/daemon/src/core/profile/identity.ts +0 -70
  75. package/apps/daemon/src/core/profile/load.ts +0 -45
  76. package/apps/daemon/src/core/profile/seed.ts +0 -74
  77. package/apps/daemon/src/core/profile/templates.ts +0 -60
  78. package/apps/daemon/src/core/profile/update.ts +0 -57
  79. package/apps/daemon/src/core/profile/validate.ts +0 -9
  80. package/apps/daemon/src/core/repos/agents.ts +0 -202
  81. package/apps/daemon/src/core/repos/config.ts +0 -78
  82. package/apps/daemon/src/core/repos/groups.ts +0 -55
  83. package/apps/daemon/src/core/repos/messages.ts +0 -127
  84. package/apps/daemon/src/core/repos/profiles.ts +0 -83
  85. package/apps/daemon/src/core/repos/providerModels.ts +0 -58
  86. package/apps/daemon/src/core/repos/providerState.ts +0 -37
  87. package/apps/daemon/src/core/repos/secrets.ts +0 -145
  88. package/apps/daemon/src/core/repos/skillMeta.ts +0 -49
  89. package/apps/daemon/src/core/repos/triggers.ts +0 -101
  90. package/apps/daemon/src/core/repos/webTokens.ts +0 -87
  91. package/apps/daemon/src/core/secrets.ts +0 -65
  92. package/apps/daemon/src/core/services.ts +0 -264
  93. package/apps/daemon/src/core/skills/discover.ts +0 -28
  94. package/apps/daemon/src/core/skills/import.ts +0 -136
  95. package/apps/daemon/src/core/skills/parse.ts +0 -52
  96. package/apps/daemon/src/core/skills/resolve.ts +0 -50
  97. package/apps/daemon/src/index.ts +0 -45
  98. package/apps/daemon/src/lib/agent-cancel.ts +0 -48
  99. package/apps/daemon/src/lib/agent-id.ts +0 -13
  100. package/apps/daemon/src/lib/agent-turn.ts +0 -56
  101. package/apps/daemon/src/lib/api-key.ts +0 -56
  102. package/apps/daemon/src/lib/auth.ts +0 -41
  103. package/apps/daemon/src/lib/cron.ts +0 -93
  104. package/apps/daemon/src/lib/ctx.ts +0 -80
  105. package/apps/daemon/src/lib/messaging-host.ts +0 -34
  106. package/apps/daemon/src/lib/middleware-auth.ts +0 -52
  107. package/apps/daemon/src/lib/scheduler.ts +0 -294
  108. package/apps/daemon/src/routes/agents.ts +0 -772
  109. package/apps/daemon/src/routes/auth-login.ts +0 -193
  110. package/apps/daemon/src/routes/config.ts +0 -267
  111. package/apps/daemon/src/routes/groups.ts +0 -133
  112. package/apps/daemon/src/routes/messages.ts +0 -29
  113. package/apps/daemon/src/routes/misc.ts +0 -239
  114. package/apps/daemon/src/routes/profiles.ts +0 -197
  115. package/apps/daemon/src/routes/skills.ts +0 -123
  116. package/apps/daemon/src/routes/triggers.ts +0 -29
  117. package/apps/daemon/src/runtime/auth/openai-codex.ts +0 -121
  118. package/apps/daemon/src/runtime/auto-reply/heartbeat.ts +0 -31
  119. package/apps/daemon/src/runtime/index.ts +0 -77
  120. package/apps/daemon/src/runtime/memory/files.ts +0 -103
  121. package/apps/daemon/src/runtime/memory/qmd.ts +0 -152
  122. package/apps/daemon/src/runtime/memory/types.ts +0 -16
  123. package/apps/daemon/src/runtime/pi/events.ts +0 -173
  124. package/apps/daemon/src/runtime/pi/session.ts +0 -536
  125. package/apps/daemon/src/runtime/pi/tools.ts +0 -85
  126. package/apps/daemon/src/runtime/providers/catalog.ts +0 -145
  127. package/apps/daemon/src/runtime/providers/pi-adapter.ts +0 -272
  128. package/apps/daemon/src/runtime/providers/registry.ts +0 -374
  129. package/apps/daemon/src/runtime/providers/retry.ts +0 -176
  130. package/apps/daemon/src/runtime/providers/types.ts +0 -33
  131. package/apps/daemon/src/runtime/session/prompt.ts +0 -83
  132. package/apps/daemon/src/runtime/tools/bootstrap.ts +0 -22
  133. package/apps/daemon/src/runtime/tools/home.ts +0 -114
  134. package/apps/daemon/src/runtime/tools/memory.ts +0 -81
  135. package/apps/daemon/src/runtime/tools/messaging.ts +0 -127
  136. package/apps/daemon/src/runtime/tools/registry.ts +0 -29
  137. package/apps/daemon/src/runtime/tools/types.ts +0 -13
  138. package/apps/daemon/src/runtime/tools/web-extract.ts +0 -110
  139. package/apps/daemon/src/runtime/tools/web-ssrf.ts +0 -245
  140. package/apps/daemon/src/runtime/tools/web.ts +0 -273
  141. package/apps/daemon/src/runtime/worker/entry.ts +0 -221
  142. package/apps/daemon/src/runtime/worker/ipc-protocol.ts +0 -75
  143. package/apps/daemon/src/runtime/worker/spawn.ts +0 -249
  144. package/apps/daemon/test/core/agents.test.ts +0 -319
  145. package/apps/daemon/test/core/available-models.test.ts +0 -63
  146. package/apps/daemon/test/core/config.test.ts +0 -99
  147. package/apps/daemon/test/core/groups.test.ts +0 -63
  148. package/apps/daemon/test/core/helpers.ts +0 -50
  149. package/apps/daemon/test/core/identity.test.ts +0 -85
  150. package/apps/daemon/test/core/migrations.test.ts +0 -83
  151. package/apps/daemon/test/core/profiles.test.ts +0 -182
  152. package/apps/daemon/test/core/provider-models.test.ts +0 -57
  153. package/apps/daemon/test/core/provider-state.test.ts +0 -36
  154. package/apps/daemon/test/core/skill-meta.test.ts +0 -45
  155. package/apps/daemon/test/core/skills.test.ts +0 -271
  156. package/apps/daemon/test/core/triggers.test.ts +0 -182
  157. package/apps/daemon/test/core/web-tokens.test.ts +0 -79
  158. package/apps/daemon/test/cron.test.ts +0 -90
  159. package/apps/daemon/test/runtime/heartbeat.test.ts +0 -34
  160. package/apps/daemon/test/runtime/memory-qmd.test.ts +0 -97
  161. package/apps/daemon/test/runtime/memory.test.ts +0 -78
  162. package/apps/daemon/test/runtime/messaging.test.ts +0 -213
  163. package/apps/daemon/test/runtime/mock-server.ts +0 -65
  164. package/apps/daemon/test/runtime/openai-codex-auth.test.ts +0 -116
  165. package/apps/daemon/test/runtime/providers.test.ts +0 -306
  166. package/apps/daemon/test/runtime/retry.test.ts +0 -191
  167. package/apps/daemon/test/runtime/session-head.test.ts +0 -90
  168. package/apps/daemon/test/runtime/tools-home.test.ts +0 -102
  169. package/apps/daemon/test/runtime/tools-web.test.ts +0 -206
  170. package/apps/daemon/tsconfig.json +0 -4
  171. package/apps/mobile/README.md +0 -60
  172. package/apps/mobile/app/_layout.tsx +0 -58
  173. package/apps/mobile/app/agents/[id]/chat.tsx +0 -486
  174. package/apps/mobile/app/agents/[id]/index.tsx +0 -166
  175. package/apps/mobile/app/agents/index.tsx +0 -212
  176. package/apps/mobile/app/index.tsx +0 -21
  177. package/apps/mobile/app/pair.tsx +0 -226
  178. package/apps/mobile/app/settings.tsx +0 -419
  179. package/apps/mobile/app.json +0 -49
  180. package/apps/mobile/assets/adaptive-icon.png +0 -0
  181. package/apps/mobile/assets/favicon.png +0 -0
  182. package/apps/mobile/assets/icon.png +0 -0
  183. package/apps/mobile/assets/splash-icon.png +0 -0
  184. package/apps/mobile/babel.config.js +0 -6
  185. package/apps/mobile/metro.config.js +0 -28
  186. package/apps/mobile/package.json +0 -44
  187. package/apps/mobile/src/auth.ts +0 -66
  188. package/apps/mobile/src/pair-url.ts +0 -48
  189. package/apps/mobile/src/theme-context.tsx +0 -88
  190. package/apps/mobile/src/theme.ts +0 -135
  191. package/apps/mobile/test/pair-url.test.ts +0 -46
  192. package/apps/mobile/tsconfig.json +0 -23
  193. package/apps/web/components.json +0 -25
  194. package/apps/web/package.json +0 -39
  195. package/apps/web/public/baziu.svg +0 -8
  196. package/apps/web/src/components/AgentTabs.tsx +0 -45
  197. package/apps/web/src/components/BaziuLogo.tsx +0 -21
  198. package/apps/web/src/components/ChatPane.tsx +0 -1033
  199. package/apps/web/src/components/ConfigTabs.tsx +0 -29
  200. package/apps/web/src/components/CopyButton.tsx +0 -68
  201. package/apps/web/src/components/CreateGroupDialog.tsx +0 -127
  202. package/apps/web/src/components/FieldRow.tsx +0 -94
  203. package/apps/web/src/components/Footer.tsx +0 -10
  204. package/apps/web/src/components/PawIcon.tsx +0 -15
  205. package/apps/web/src/components/Sidebar.tsx +0 -287
  206. package/apps/web/src/components/SpawnDialog.tsx +0 -129
  207. package/apps/web/src/components/ThemeToggle.tsx +0 -75
  208. package/apps/web/src/components/TopNav.tsx +0 -34
  209. package/apps/web/src/components/ui/button.tsx +0 -67
  210. package/apps/web/src/components/ui/card.tsx +0 -103
  211. package/apps/web/src/components/ui/checkbox.tsx +0 -31
  212. package/apps/web/src/components/ui/dialog.tsx +0 -168
  213. package/apps/web/src/components/ui/input.tsx +0 -19
  214. package/apps/web/src/components/ui/label.tsx +0 -22
  215. package/apps/web/src/components/ui/radio-group.tsx +0 -44
  216. package/apps/web/src/components/ui/select.tsx +0 -192
  217. package/apps/web/src/components/ui/separator.tsx +0 -26
  218. package/apps/web/src/components/ui/table.tsx +0 -116
  219. package/apps/web/src/components/ui/tabs.tsx +0 -88
  220. package/apps/web/src/components/ui/textarea.tsx +0 -18
  221. package/apps/web/src/lib/auth.ts +0 -50
  222. package/apps/web/src/lib/daemon-client.ts +0 -34
  223. package/apps/web/src/lib/md.ts +0 -45
  224. package/apps/web/src/lib/utils.ts +0 -6
  225. package/apps/web/src/lib/wire-constants.ts +0 -27
  226. package/apps/web/src/routeTree.gen.ts +0 -408
  227. package/apps/web/src/router.tsx +0 -20
  228. package/apps/web/src/routes/__root.tsx +0 -123
  229. package/apps/web/src/routes/agents/$id/inbox.tsx +0 -207
  230. package/apps/web/src/routes/agents/$id/index.tsx +0 -527
  231. package/apps/web/src/routes/agents/$id/triggers.tsx +0 -239
  232. package/apps/web/src/routes/agents/index.tsx +0 -265
  233. package/apps/web/src/routes/api/$.ts +0 -88
  234. package/apps/web/src/routes/config/index.tsx +0 -315
  235. package/apps/web/src/routes/config/services.tsx +0 -49
  236. package/apps/web/src/routes/config/tokens.tsx +0 -192
  237. package/apps/web/src/routes/groups/$id/index.tsx +0 -153
  238. package/apps/web/src/routes/groups/$id/memory.tsx +0 -321
  239. package/apps/web/src/routes/groups/index.tsx +0 -191
  240. package/apps/web/src/routes/index.tsx +0 -133
  241. package/apps/web/src/routes/login.tsx +0 -63
  242. package/apps/web/src/routes/profiles/$id.tsx +0 -549
  243. package/apps/web/src/routes/profiles/index.tsx +0 -458
  244. package/apps/web/src/routes/skills/index.tsx +0 -297
  245. package/apps/web/src/routes/welcome.tsx +0 -61
  246. package/apps/web/src/styles.css +0 -449
  247. package/apps/web/tsconfig.json +0 -25
  248. package/apps/web/vite.config.ts +0 -25
  249. package/biome.json +0 -23
  250. package/docs/agent-engine.md +0 -219
  251. package/docs/architecture.md +0 -627
  252. package/docs/backlog/README.md +0 -42
  253. package/docs/backlog/draft/BAZ-001-a2a-federation-spike.md +0 -125
  254. package/docs/openclaw-reference.md +0 -210
  255. package/packages/api-types/package.json +0 -11
  256. package/packages/api-types/src/entities.ts +0 -146
  257. package/packages/api-types/src/events.ts +0 -55
  258. package/packages/api-types/src/index.ts +0 -488
  259. package/packages/api-types/src/memory.ts +0 -15
  260. package/packages/client/package.json +0 -13
  261. package/packages/client/src/index.ts +0 -117
  262. package/pnpm-workspace.yaml +0 -3
  263. package/tsconfig.base.json +0 -23
  264. package/tsconfig.json +0 -11
  265. package/vitest.config.ts +0 -22
@@ -1,297 +0,0 @@
1
- import type { SkillInfo } from '@bazilion/api-types'
2
- import { createFileRoute, useRouter } from '@tanstack/react-router'
3
- import { createServerFn } from '@tanstack/react-start'
4
- import { type ChangeEvent, type DragEvent, useRef, useState } from 'react'
5
- import { daemonClient } from '../../lib/daemon-client'
6
-
7
- const fetchSkills = createServerFn({ method: 'GET' }).handler(() =>
8
- daemonClient().get<SkillInfo[]>('/api/skills'),
9
- )
10
-
11
- export const Route = createFileRoute('/skills/')({
12
- loader: () => fetchSkills(),
13
- component: SkillsPage,
14
- })
15
-
16
- type Tab = 'openclaw' | 'path' | 'zip'
17
-
18
- function SkillsPage() {
19
- const skills = Route.useLoaderData()
20
- const router = useRouter()
21
-
22
- async function remove(name: string) {
23
- if (!confirm(`remove skill "${name}"? this deletes the directory on disk.`)) return
24
- const res = await fetch(`/api/skills/${encodeURIComponent(name)}`, { method: 'DELETE' })
25
- if (!res.ok && res.status !== 204) {
26
- alert(res.statusText)
27
- return
28
- }
29
- await router.invalidate()
30
- }
31
-
32
- return (
33
- <div>
34
- <h1>skills</h1>
35
- <ImportCard onImported={() => router.invalidate()} />
36
-
37
- <table>
38
- <thead>
39
- <tr>
40
- <th>name</th>
41
- <th>description</th>
42
- <th>source</th>
43
- <th />
44
- </tr>
45
- </thead>
46
- <tbody>
47
- {skills.length === 0 && (
48
- <tr>
49
- <td colSpan={4} className="muted">
50
- no skills installed yet
51
- </td>
52
- </tr>
53
- )}
54
- {skills.map((s) => (
55
- <tr key={s.name}>
56
- <td>
57
- <code>{s.name}</code>
58
- </td>
59
- <td>
60
- {s.parseError ? (
61
- <span className="text-[#9B3D3D]">parse error: {s.parseError}</span>
62
- ) : (
63
- s.description
64
- )}
65
- </td>
66
- <td className="text-[0.78em] text-mocha-light">
67
- <span className="font-mono">{s.source ?? '(unknown)'}</span>
68
- {s.importedAt && (
69
- <div className="font-mono">
70
- {new Date(s.importedAt).toLocaleDateString()}
71
- </div>
72
- )}
73
- </td>
74
- <td>
75
- <button type="button" className="ghost-btn" onClick={() => remove(s.name)}>
76
- remove
77
- </button>
78
- </td>
79
- </tr>
80
- ))}
81
- </tbody>
82
- </table>
83
- </div>
84
- )
85
- }
86
-
87
- function ImportCard({ onImported }: { onImported: () => void }) {
88
- const [tab, setTab] = useState<Tab>('openclaw')
89
- const [path, setPath] = useState('')
90
- const [force, setForce] = useState(false)
91
- const [zipFile, setZipFile] = useState<File | null>(null)
92
- const [dragOver, setDragOver] = useState(false)
93
- const [err, setErr] = useState<string | null>(null)
94
- const [submitting, setSubmitting] = useState(false)
95
- const fileInput = useRef<HTMLInputElement>(null)
96
-
97
- async function submit(e: React.FormEvent<HTMLFormElement>) {
98
- e.preventDefault()
99
- setErr(null)
100
- setSubmitting(true)
101
- try {
102
- let res: Response
103
- if (tab === 'zip') {
104
- if (!zipFile) {
105
- setErr('choose a .zip file first')
106
- setSubmitting(false)
107
- return
108
- }
109
- const fd = new FormData()
110
- fd.set('file', zipFile)
111
- if (force) fd.set('force', 'true')
112
- res = await fetch('/api/skills/import', { method: 'POST', body: fd })
113
- } else {
114
- let source: string
115
- if (tab === 'openclaw') {
116
- source = 'openclaw'
117
- } else {
118
- source = path.trim()
119
- if (!source) {
120
- setErr('fill in the server path')
121
- setSubmitting(false)
122
- return
123
- }
124
- }
125
- res = await fetch('/api/skills/import', {
126
- method: 'POST',
127
- headers: { 'content-type': 'application/json' },
128
- body: JSON.stringify({ source, force }),
129
- })
130
- }
131
- if (!res.ok) {
132
- const e2 = (await res.json().catch(() => null)) as { error?: string } | null
133
- throw new Error(e2?.error ?? `${res.status} ${res.statusText}`)
134
- }
135
- setPath('')
136
- setZipFile(null)
137
- onImported()
138
- } catch (e2) {
139
- setErr((e2 as Error).message)
140
- } finally {
141
- setSubmitting(false)
142
- }
143
- }
144
-
145
- function onFileChange(e: ChangeEvent<HTMLInputElement>) {
146
- const f = e.target.files?.[0] ?? null
147
- setZipFile(f)
148
- }
149
- function onDrop(e: DragEvent<HTMLLabelElement>) {
150
- e.preventDefault()
151
- setDragOver(false)
152
- const files = e.dataTransfer?.files
153
- if (!files || files.length === 0) return
154
- const f = files[0]
155
- if (!f) return
156
- if (!/\.zip$/i.test(f.name)) {
157
- setErr('only .zip archives are supported')
158
- return
159
- }
160
- setZipFile(f)
161
- if (fileInput.current) {
162
- // Sync the underlying input so the label reflects state if anyone reads it.
163
- const dt = new DataTransfer()
164
- dt.items.add(f)
165
- fileInput.current.files = dt.files
166
- }
167
- }
168
-
169
- return (
170
- <section className="card">
171
- <h3 className="mb-1">import skills</h3>
172
- <p className="muted mb-3 text-[0.88em]">
173
- pick a source. Each skill's <code>SKILL.md</code> body is injected into the system
174
- prompt of any agent it's attached to.
175
- </p>
176
-
177
- <div
178
- role="tablist"
179
- className="mb-4 inline-flex gap-0 rounded-md border border-frost bg-ivory p-1"
180
- >
181
- {[
182
- { id: 'openclaw' as const, label: 'OpenClaw' },
183
- { id: 'path' as const, label: 'server directory' },
184
- { id: 'zip' as const, label: 'upload zip' },
185
- ].map((it) => (
186
- <button
187
- key={it.id}
188
- type="button"
189
- role="tab"
190
- aria-selected={tab === it.id}
191
- onClick={() => {
192
- setTab(it.id)
193
- setErr(null)
194
- }}
195
- className={`unstyled cursor-pointer rounded-sm border-none bg-transparent px-3 py-1.5 text-[0.88em] font-medium transition-colors ${
196
- tab === it.id
197
- ? 'bg-snow text-sapphire-deep shadow-baziu-sm'
198
- : 'text-mocha hover:text-sapphire'
199
- }`}
200
- >
201
- {it.label}
202
- </button>
203
- ))}
204
- </div>
205
-
206
- {err && <div className="err">{err}</div>}
207
-
208
- <form onSubmit={submit}>
209
- {tab === 'openclaw' && (
210
- <p className="text-[0.92em] text-mocha">
211
- One-click import of every skill found in <code>~/.openclaw/skills</code> on the
212
- server.
213
- </p>
214
- )}
215
- {tab === 'path' && (
216
- <>
217
- <p className="text-[0.92em] text-mocha">
218
- Import from an absolute path on the server — either a single skill folder
219
- (contains <code>SKILL.md</code>) or a parent folder holding many skill subfolders.
220
- </p>
221
- <label>
222
- server path
223
- <input
224
- value={path}
225
- onChange={(e) => setPath(e.target.value)}
226
- placeholder="/home/you/my-skills"
227
- required
228
- />
229
- </label>
230
- </>
231
- )}
232
- {tab === 'zip' && (
233
- <>
234
- <p className="text-[0.92em] text-mocha">
235
- Upload a <code>.zip</code> archive whose top level contains one folder per skill —
236
- the folder name becomes the skill name.
237
- </p>
238
- <label
239
- onDragOver={(e) => {
240
- e.preventDefault()
241
- setDragOver(true)
242
- }}
243
- onDragLeave={() => setDragOver(false)}
244
- onDrop={onDrop}
245
- className={`block cursor-pointer rounded-md border-2 border-dashed p-6 text-center transition-colors ${
246
- dragOver
247
- ? 'border-sapphire bg-sapphire-glow text-sapphire-deep'
248
- : zipFile
249
- ? 'border-solid border-sapphire-light bg-snow text-chocolate'
250
- : 'border-frost bg-ivory text-mocha-light hover:border-sapphire hover:bg-sapphire-glow hover:text-sapphire-deep'
251
- }`}
252
- >
253
- <input
254
- ref={fileInput}
255
- type="file"
256
- accept=".zip,application/zip"
257
- onChange={onFileChange}
258
- className="absolute h-px w-px overflow-hidden opacity-0"
259
- />
260
- {zipFile ? (
261
- <span className="block break-all font-mono text-[0.85em] text-sapphire-deep">
262
- {zipFile.name}
263
- </span>
264
- ) : (
265
- <>
266
- <span className="block text-[0.95em] font-medium text-mocha">
267
- click to choose a .zip file
268
- </span>
269
- <span className="text-[0.82em]">or drag &amp; drop here</span>
270
- </>
271
- )}
272
- </label>
273
- </>
274
- )}
275
- <div className="mt-3 flex flex-wrap items-center gap-3">
276
- <button type="submit" disabled={submitting}>
277
- {submitting
278
- ? 'importing…'
279
- : tab === 'zip'
280
- ? 'upload & import'
281
- : tab === 'openclaw'
282
- ? 'import from OpenClaw'
283
- : 'import'}
284
- </button>
285
- <label className="m-0 inline-flex cursor-pointer items-center text-[0.88em] text-mocha">
286
- <input
287
- type="checkbox"
288
- checked={force}
289
- onChange={(e) => setForce(e.target.checked)}
290
- />
291
- overwrite existing
292
- </label>
293
- </div>
294
- </form>
295
- </section>
296
- )
297
- }
@@ -1,61 +0,0 @@
1
- import { createFileRoute, redirect } from '@tanstack/react-router'
2
- import { fetchAuthState } from '../lib/auth'
3
-
4
- export const Route = createFileRoute('/welcome')({
5
- beforeLoad: async () => {
6
- // The root middleware already redirected here when setup wasn't done.
7
- // If the user lands directly (or completed setup in another tab), bounce
8
- // to the homepage — no point lingering on the welcome screen.
9
- const auth = await fetchAuthState()
10
- if (auth.setupComplete) {
11
- throw redirect({ to: '/' })
12
- }
13
- },
14
- component: WelcomePage,
15
- })
16
-
17
- function WelcomePage() {
18
- return (
19
- <div className="mx-auto max-w-2xl">
20
- <div className="card">
21
- <h1>Welcome to bazilion</h1>
22
- <p className="muted my-3">
23
- Before you can spawn agents, pick a provider and give it at least one model. Once you
24
- do, a <code>default</code> profile (and a <code>default</code> group directory) are
25
- created automatically and the rest of the app unlocks.
26
- </p>
27
- <ol className="my-5 space-y-4">
28
- <Step n={1}>
29
- <strong>Configure credentials.</strong> Head to the{' '}
30
- <a href="/config">providers tab</a> and set the API key or local URL for the service
31
- you want to use (Anthropic, OpenAI, Ollama, LMStudio, …).
32
- </Step>
33
- <Step n={2}>
34
- <strong>Enable the provider + add a model.</strong> Flip the provider's toggle on
35
- and list at least one concrete model name (e.g. <code>claude-opus-4-6</code> or{' '}
36
- <code>llama3.2</code>).
37
- </Step>
38
- <Step n={3}>
39
- <strong>Start chatting.</strong> You'll be redirected to the home page
40
- automatically, where a <code>default</code> profile is waiting for a first spawn.
41
- </Step>
42
- </ol>
43
- <a
44
- href="/config"
45
- className="inline-flex items-center gap-2 rounded-md bg-sapphire px-4 py-2 text-[0.92em] font-semibold text-snow no-underline transition-colors hover:bg-sapphire-deep"
46
- >
47
- Go to config →
48
- </a>
49
- </div>
50
- </div>
51
- )
52
- }
53
-
54
- function Step({ n, children }: { n: number; children: React.ReactNode }) {
55
- return (
56
- <li className="grid grid-cols-[2rem_1fr] gap-3 border-t border-frost pt-3 first:border-t-0 first:pt-0">
57
- <span className="text-center font-display text-xl text-sapphire">{n}</span>
58
- <div className="text-[0.92em] leading-relaxed text-mocha">{children}</div>
59
- </li>
60
- )
61
- }