@jiggai/kitchen 0.3.1 → 0.3.3

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 (307) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +2 -2
  3. package/.next/server/app/_global-error.html +2 -2
  4. package/.next/server/app/_global-error.rsc +1 -1
  5. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  6. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found.html +1 -1
  11. package/.next/server/app/_not-found.rsc +1 -1
  12. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  16. package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  17. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  18. package/.next/server/app/channels.html +2 -2
  19. package/.next/server/app/channels.rsc +1 -1
  20. package/.next/server/app/channels.segments/_full.segment.rsc +1 -1
  21. package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
  22. package/.next/server/app/channels.segments/_index.segment.rsc +1 -1
  23. package/.next/server/app/channels.segments/_tree.segment.rsc +1 -1
  24. package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +1 -1
  25. package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
  26. package/.next/server/app/cron-jobs.html +1 -1
  27. package/.next/server/app/cron-jobs.rsc +1 -1
  28. package/.next/server/app/cron-jobs.segments/_full.segment.rsc +1 -1
  29. package/.next/server/app/cron-jobs.segments/_head.segment.rsc +1 -1
  30. package/.next/server/app/cron-jobs.segments/_index.segment.rsc +1 -1
  31. package/.next/server/app/cron-jobs.segments/_tree.segment.rsc +1 -1
  32. package/.next/server/app/cron-jobs.segments/cron-jobs/__PAGE__.segment.rsc +1 -1
  33. package/.next/server/app/cron-jobs.segments/cron-jobs.segment.rsc +1 -1
  34. package/.next/server/app/goals/new.html +2 -2
  35. package/.next/server/app/goals/new.rsc +1 -1
  36. package/.next/server/app/goals/new.segments/_full.segment.rsc +1 -1
  37. package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
  38. package/.next/server/app/goals/new.segments/_index.segment.rsc +1 -1
  39. package/.next/server/app/goals/new.segments/_tree.segment.rsc +1 -1
  40. package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +1 -1
  41. package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
  42. package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
  43. package/.next/server/app/goals.html +1 -1
  44. package/.next/server/app/goals.rsc +1 -1
  45. package/.next/server/app/goals.segments/_full.segment.rsc +1 -1
  46. package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
  47. package/.next/server/app/goals.segments/_index.segment.rsc +1 -1
  48. package/.next/server/app/goals.segments/_tree.segment.rsc +1 -1
  49. package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +1 -1
  50. package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
  51. package/.next/server/app/settings.html +1 -1
  52. package/.next/server/app/settings.rsc +1 -1
  53. package/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  54. package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  55. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  56. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  57. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  58. package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  59. package/.next/server/pages/404.html +1 -1
  60. package/.next/server/pages/500.html +2 -2
  61. package/package.json +1 -2
  62. package/src/app/HomeClient.tsx +0 -207
  63. package/src/app/agents/[agentId]/agent-editor-tabs.tsx +0 -298
  64. package/src/app/agents/[agentId]/agent-editor.tsx +0 -468
  65. package/src/app/agents/[agentId]/page.tsx +0 -32
  66. package/src/app/api/__tests__/agents-add-route.test.ts +0 -143
  67. package/src/app/api/__tests__/agents-file-route.test.ts +0 -117
  68. package/src/app/api/__tests__/agents-files-route.test.ts +0 -61
  69. package/src/app/api/__tests__/agents-id-route.test.ts +0 -104
  70. package/src/app/api/__tests__/agents-identity-route.test.ts +0 -92
  71. package/src/app/api/__tests__/agents-route.test.ts +0 -54
  72. package/src/app/api/__tests__/agents-skills-install-route.test.ts +0 -131
  73. package/src/app/api/__tests__/agents-skills-route.test.ts +0 -64
  74. package/src/app/api/__tests__/agents-update-route.test.ts +0 -95
  75. package/src/app/api/__tests__/channels-bindings-route.test.ts +0 -143
  76. package/src/app/api/__tests__/cron-delete-route.test.ts +0 -93
  77. package/src/app/api/__tests__/cron-job-route.test.ts +0 -78
  78. package/src/app/api/__tests__/cron-jobs-route.test.ts +0 -116
  79. package/src/app/api/__tests__/cron-recipe-installed-route.test.ts +0 -114
  80. package/src/app/api/__tests__/gateway-restart-route.test.ts +0 -36
  81. package/src/app/api/__tests__/goals-promote-route.test.ts +0 -200
  82. package/src/app/api/__tests__/goals-route.test.ts +0 -184
  83. package/src/app/api/__tests__/ids-check-route.test.ts +0 -188
  84. package/src/app/api/__tests__/marketplace-recipes-route.test.ts +0 -123
  85. package/src/app/api/__tests__/recipes-clone-route.test.ts +0 -221
  86. package/src/app/api/__tests__/recipes-delete-route.test.ts +0 -248
  87. package/src/app/api/__tests__/recipes-id-route.test.ts +0 -166
  88. package/src/app/api/__tests__/recipes-route.test.ts +0 -57
  89. package/src/app/api/__tests__/recipes-team-agents-route.test.ts +0 -135
  90. package/src/app/api/__tests__/scaffold-route.test.ts +0 -173
  91. package/src/app/api/__tests__/settings-cron-installation-route.test.ts +0 -82
  92. package/src/app/api/__tests__/skills-available-route.test.ts +0 -47
  93. package/src/app/api/__tests__/swarms-start-route.test.ts +0 -79
  94. package/src/app/api/__tests__/swarms-status-route.test.ts +0 -42
  95. package/src/app/api/__tests__/teams-file-route.test.ts +0 -129
  96. package/src/app/api/__tests__/teams-files-route.test.ts +0 -57
  97. package/src/app/api/__tests__/teams-meta-route.test.ts +0 -113
  98. package/src/app/api/__tests__/teams-orchestrator-install-route.test.ts +0 -66
  99. package/src/app/api/__tests__/teams-orchestrator-route.test.ts +0 -59
  100. package/src/app/api/__tests__/teams-remove-team-route.test.ts +0 -122
  101. package/src/app/api/__tests__/teams-skills-install-route.test.ts +0 -78
  102. package/src/app/api/__tests__/teams-skills-route.test.ts +0 -73
  103. package/src/app/api/__tests__/teams-workflow-runs-route.test.ts +0 -85
  104. package/src/app/api/__tests__/teams-workflows-route.test.ts +0 -110
  105. package/src/app/api/__tests__/tickets-move-route.test.ts +0 -60
  106. package/src/app/api/agents/[id]/route.ts +0 -83
  107. package/src/app/api/agents/add/route.ts +0 -114
  108. package/src/app/api/agents/file/route.ts +0 -45
  109. package/src/app/api/agents/files/route.ts +0 -23
  110. package/src/app/api/agents/identity/route.ts +0 -41
  111. package/src/app/api/agents/route.ts +0 -22
  112. package/src/app/api/agents/skills/install/route.ts +0 -34
  113. package/src/app/api/agents/skills/route.ts +0 -39
  114. package/src/app/api/agents/update/route.ts +0 -52
  115. package/src/app/api/channels/bindings/route.ts +0 -63
  116. package/src/app/api/cron/__tests__/helpers.test.ts +0 -164
  117. package/src/app/api/cron/delete/route.ts +0 -23
  118. package/src/app/api/cron/helpers.ts +0 -172
  119. package/src/app/api/cron/job/route.ts +0 -22
  120. package/src/app/api/cron/jobs/route.ts +0 -52
  121. package/src/app/api/cron/recipe-installed/route.ts +0 -65
  122. package/src/app/api/gateway/restart/route.ts +0 -20
  123. package/src/app/api/goals/[id]/promote/route.ts +0 -119
  124. package/src/app/api/goals/[id]/route.ts +0 -54
  125. package/src/app/api/goals/route.ts +0 -44
  126. package/src/app/api/ids/check/route.ts +0 -113
  127. package/src/app/api/marketplace/recipes/[slug]/route.ts +0 -16
  128. package/src/app/api/marketplace/recipes/route.ts +0 -22
  129. package/src/app/api/recipes/[id]/route.ts +0 -62
  130. package/src/app/api/recipes/clone/route.ts +0 -106
  131. package/src/app/api/recipes/custom-team/route.ts +0 -193
  132. package/src/app/api/recipes/delete/helpers.ts +0 -65
  133. package/src/app/api/recipes/delete/route.ts +0 -73
  134. package/src/app/api/recipes/route.ts +0 -21
  135. package/src/app/api/recipes/team-agents/__tests__/helpers.test.ts +0 -156
  136. package/src/app/api/recipes/team-agents/helpers.ts +0 -151
  137. package/src/app/api/recipes/team-agents/route.ts +0 -80
  138. package/src/app/api/scaffold/__tests__/helpers.test.ts +0 -186
  139. package/src/app/api/scaffold/helpers.ts +0 -214
  140. package/src/app/api/scaffold/route.ts +0 -95
  141. package/src/app/api/settings/cron-installation/route.ts +0 -58
  142. package/src/app/api/skills/available/route.ts +0 -23
  143. package/src/app/api/swarms/start/route.ts +0 -100
  144. package/src/app/api/swarms/status/route.ts +0 -31
  145. package/src/app/api/teams/[teamId]/tickets/assign/route.ts +0 -105
  146. package/src/app/api/teams/[teamId]/tickets/assignees/route.ts +0 -27
  147. package/src/app/api/teams/[teamId]/tickets/delete/route.ts +0 -55
  148. package/src/app/api/teams/[teamId]/tickets/move/route.ts +0 -70
  149. package/src/app/api/teams/[teamId]/tickets/move-to-goals/route.ts +0 -56
  150. package/src/app/api/teams/file/route.ts +0 -46
  151. package/src/app/api/teams/files/route.ts +0 -63
  152. package/src/app/api/teams/memory/route.ts +0 -250
  153. package/src/app/api/teams/meta/route.ts +0 -43
  154. package/src/app/api/teams/orchestrator/install/route.ts +0 -129
  155. package/src/app/api/teams/orchestrator/route.ts +0 -216
  156. package/src/app/api/teams/remove-team/route.ts +0 -37
  157. package/src/app/api/teams/skills/install/route.ts +0 -18
  158. package/src/app/api/teams/skills/route.ts +0 -25
  159. package/src/app/api/teams/workflow-runs/route.ts +0 -534
  160. package/src/app/api/teams/workflow-templates/route.ts +0 -71
  161. package/src/app/api/teams/workflows/route.ts +0 -55
  162. package/src/app/api/tickets/assign/route.ts +0 -94
  163. package/src/app/api/tickets/assignees/route.ts +0 -24
  164. package/src/app/api/tickets/move/route.ts +0 -69
  165. package/src/app/channels/channels-client.tsx +0 -271
  166. package/src/app/channels/page.tsx +0 -5
  167. package/src/app/cron-jobs/cron-jobs-client.tsx +0 -243
  168. package/src/app/cron-jobs/page.tsx +0 -34
  169. package/src/app/favicon.ico +0 -0
  170. package/src/app/global-error.tsx +0 -50
  171. package/src/app/globals.css +0 -153
  172. package/src/app/goals/[id]/goal-editor.tsx +0 -162
  173. package/src/app/goals/[id]/page.tsx +0 -6
  174. package/src/app/goals/goals-client.tsx +0 -201
  175. package/src/app/goals/new/page.tsx +0 -81
  176. package/src/app/goals/page.tsx +0 -10
  177. package/src/app/layout.tsx +0 -53
  178. package/src/app/manifest.ts +0 -15
  179. package/src/app/not-found.tsx +0 -8
  180. package/src/app/page.tsx +0 -33
  181. package/src/app/recipes/CreateAgentModal.tsx +0 -156
  182. package/src/app/recipes/CreateCustomTeamModal.tsx +0 -375
  183. package/src/app/recipes/CreateModalShell.tsx +0 -55
  184. package/src/app/recipes/CreateTeamModal.tsx +0 -91
  185. package/src/app/recipes/[id]/RecipeEditor/RecipeEditorCreateModal.tsx +0 -72
  186. package/src/app/recipes/[id]/RecipeEditor/RecipeEditorPanel.tsx +0 -216
  187. package/src/app/recipes/[id]/RecipeEditor/index.tsx +0 -271
  188. package/src/app/recipes/[id]/RecipeEditor/recipe-editor-utils.ts +0 -46
  189. package/src/app/recipes/[id]/RecipeEditor/types.ts +0 -52
  190. package/src/app/recipes/[id]/page.tsx +0 -37
  191. package/src/app/recipes/page.tsx +0 -101
  192. package/src/app/recipes/recipes-client.tsx +0 -620
  193. package/src/app/settings/page.tsx +0 -26
  194. package/src/app/settings/settings-client.tsx +0 -91
  195. package/src/app/teams/[teamId]/CloneTeamModal.tsx +0 -116
  196. package/src/app/teams/[teamId]/OrchestratorPanel.tsx +0 -255
  197. package/src/app/teams/[teamId]/OrchestratorSetupModal.tsx +0 -184
  198. package/src/app/teams/[teamId]/PublishChangesModal.tsx +0 -43
  199. package/src/app/teams/[teamId]/page.tsx +0 -49
  200. package/src/app/teams/[teamId]/team-editor/TeamAgentsTab.tsx +0 -145
  201. package/src/app/teams/[teamId]/team-editor/TeamCronTab.tsx +0 -72
  202. package/src/app/teams/[teamId]/team-editor/TeamFilesTab.tsx +0 -74
  203. package/src/app/teams/[teamId]/team-editor/TeamMemoryTab.tsx +0 -349
  204. package/src/app/teams/[teamId]/team-editor/TeamRecipeTab.tsx +0 -151
  205. package/src/app/teams/[teamId]/team-editor/TeamSkillsTab.tsx +0 -68
  206. package/src/app/teams/[teamId]/team-editor/index.tsx +0 -558
  207. package/src/app/teams/[teamId]/team-editor/team-editor-data.ts +0 -255
  208. package/src/app/teams/[teamId]/team-editor/team-editor-utils.ts +0 -78
  209. package/src/app/teams/[teamId]/team-editor/types.ts +0 -34
  210. package/src/app/teams/[teamId]/tickets/[ticket]/page.tsx +0 -35
  211. package/src/app/teams/[teamId]/tickets/page.tsx +0 -15
  212. package/src/app/teams/[teamId]/workflows/[workflowId]/WorkflowCanvas.tsx +0 -111
  213. package/src/app/teams/[teamId]/workflows/[workflowId]/page.tsx +0 -27
  214. package/src/app/teams/[teamId]/workflows/[workflowId]/workflows-editor-client.tsx +0 -1608
  215. package/src/app/teams/[teamId]/workflows/page.tsx +0 -40
  216. package/src/app/teams/[teamId]/workflows/workflows-client.tsx +0 -494
  217. package/src/app/tickets/TicketDetailClient.tsx +0 -147
  218. package/src/app/tickets/TicketsBoardClient.tsx +0 -200
  219. package/src/app/tickets/[ticket]/TicketAssignControl.tsx +0 -112
  220. package/src/app/tickets/[ticket]/page.tsx +0 -36
  221. package/src/app/tickets/page.tsx +0 -10
  222. package/src/components/AppShell.tsx +0 -286
  223. package/src/components/ConfirmationModal.tsx +0 -81
  224. package/src/components/DeleteEntityModal.tsx +0 -41
  225. package/src/components/ErrorBoundary.tsx +0 -70
  226. package/src/components/FileListWithOptionalToggle.tsx +0 -86
  227. package/src/components/GoalFormFields.tsx +0 -163
  228. package/src/components/ScaffoldOverlay.tsx +0 -78
  229. package/src/components/ThemeToggle.tsx +0 -53
  230. package/src/components/ToastProvider.tsx +0 -163
  231. package/src/components/__tests__/ConfirmationModal.test.tsx +0 -109
  232. package/src/components/__tests__/ErrorBoundary.test.tsx +0 -39
  233. package/src/components/__tests__/FileListWithOptionalToggle.test.tsx +0 -109
  234. package/src/components/__tests__/GoalFormFields.test.tsx +0 -117
  235. package/src/components/delete-modals.tsx +0 -59
  236. package/src/components/icons.tsx +0 -48
  237. package/src/lib/__tests__/agent-workspace.test.ts +0 -44
  238. package/src/lib/__tests__/agents.test.ts +0 -36
  239. package/src/lib/__tests__/api-route-helpers.test.ts +0 -188
  240. package/src/lib/__tests__/cron.test.ts +0 -45
  241. package/src/lib/__tests__/editor-utils.test.ts +0 -38
  242. package/src/lib/__tests__/errors.test.ts +0 -15
  243. package/src/lib/__tests__/exec.test.ts +0 -13
  244. package/src/lib/__tests__/fetch-json.test.ts +0 -118
  245. package/src/lib/__tests__/gateway.test.ts +0 -234
  246. package/src/lib/__tests__/goal-promote.test.ts +0 -39
  247. package/src/lib/__tests__/goals-client.test.ts +0 -26
  248. package/src/lib/__tests__/goals.test.ts +0 -275
  249. package/src/lib/__tests__/json.test.ts +0 -15
  250. package/src/lib/__tests__/kitchen-api.test.ts +0 -32
  251. package/src/lib/__tests__/marketplace.test.ts +0 -116
  252. package/src/lib/__tests__/openclaw.test.ts +0 -129
  253. package/src/lib/__tests__/paths.test.ts +0 -136
  254. package/src/lib/__tests__/poll.test.ts +0 -26
  255. package/src/lib/__tests__/recipe-clone.test.ts +0 -85
  256. package/src/lib/__tests__/recipe-team-agents.test.ts +0 -70
  257. package/src/lib/__tests__/recipes.test.ts +0 -199
  258. package/src/lib/__tests__/scaffold-client.test.ts +0 -106
  259. package/src/lib/__tests__/scaffold.test.ts +0 -64
  260. package/src/lib/__tests__/slugify.test.ts +0 -23
  261. package/src/lib/__tests__/tickets.test.ts +0 -158
  262. package/src/lib/__tests__/type-guards.test.ts +0 -18
  263. package/src/lib/__tests__/use-slugified-id.test.tsx +0 -120
  264. package/src/lib/agent-workspace.ts +0 -14
  265. package/src/lib/agents.ts +0 -17
  266. package/src/lib/api-route-helpers.ts +0 -157
  267. package/src/lib/cron.ts +0 -40
  268. package/src/lib/editor-utils.ts +0 -18
  269. package/src/lib/errors.ts +0 -7
  270. package/src/lib/exec.ts +0 -4
  271. package/src/lib/fetch-json.ts +0 -29
  272. package/src/lib/gateway.ts +0 -100
  273. package/src/lib/goal-promote.ts +0 -27
  274. package/src/lib/goals-client.ts +0 -69
  275. package/src/lib/goals.ts +0 -171
  276. package/src/lib/json.ts +0 -10
  277. package/src/lib/kitchen-api.ts +0 -19
  278. package/src/lib/marketplace.ts +0 -46
  279. package/src/lib/openclaw.ts +0 -59
  280. package/src/lib/paths.ts +0 -69
  281. package/src/lib/poll.ts +0 -18
  282. package/src/lib/recipe-clone.ts +0 -42
  283. package/src/lib/recipe-team-agents.ts +0 -30
  284. package/src/lib/recipes.ts +0 -95
  285. package/src/lib/scaffold-client.ts +0 -31
  286. package/src/lib/scaffold.ts +0 -37
  287. package/src/lib/slugify.ts +0 -25
  288. package/src/lib/swarms.ts +0 -25
  289. package/src/lib/tickets.ts +0 -192
  290. package/src/lib/type-guards.ts +0 -3
  291. package/src/lib/use-slugified-id.ts +0 -35
  292. package/src/lib/workflows/README.md +0 -11
  293. package/src/lib/workflows/__tests__/storage.test.ts +0 -129
  294. package/src/lib/workflows/__tests__/validate.test.ts +0 -92
  295. package/src/lib/workflows/api-handlers.ts +0 -35
  296. package/src/lib/workflows/readdir.ts +0 -23
  297. package/src/lib/workflows/runs-storage.ts +0 -59
  298. package/src/lib/workflows/runs-types.ts +0 -42
  299. package/src/lib/workflows/storage.ts +0 -70
  300. package/src/lib/workflows/templates/index.ts +0 -1
  301. package/src/lib/workflows/templates/marketing-cadence-v1.ts +0 -142
  302. package/src/lib/workflows/types.ts +0 -48
  303. package/src/lib/workflows/validate.ts +0 -92
  304. package/src/proxy.ts +0 -28
  305. /package/.next/static/{z86RoqzzXXrWnpi229zP6 → Jrrrm9HH5bKkSrQhe1j93}/_buildManifest.js +0 -0
  306. /package/.next/static/{z86RoqzzXXrWnpi229zP6 → Jrrrm9HH5bKkSrQhe1j93}/_clientMiddlewareManifest.json +0 -0
  307. /package/.next/static/{z86RoqzzXXrWnpi229zP6 → Jrrrm9HH5bKkSrQhe1j93}/_ssgManifest.js +0 -0
@@ -1,201 +0,0 @@
1
- "use client";
2
-
3
- import Link from "next/link";
4
- import { errorMessage } from "@/lib/errors";
5
- import { fetchJson } from "@/lib/fetch-json";
6
- import { type GoalFrontmatter } from "@/lib/goals-client";
7
- import { useSearchParams } from "next/navigation";
8
- import { useEffect, useMemo, useState } from "react";
9
-
10
- async function fetchGoals(): Promise<{ goals: GoalFrontmatter[]; error: string | null }> {
11
- try {
12
- const data = await fetchJson<{ goals?: GoalFrontmatter[] }>("/api/goals", { cache: "no-store" });
13
- return { goals: data.goals ?? [], error: null };
14
- } catch (e: unknown) {
15
- return { goals: [], error: errorMessage(e) };
16
- }
17
- }
18
-
19
- function Badge({ children }: { children: React.ReactNode }) {
20
- return (
21
- <span className="rounded-full bg-[color:var(--ck-bg-glass)] px-2 py-0.5 text-xs text-[color:var(--ck-text-secondary)]">
22
- {children}
23
- </span>
24
- );
25
- }
26
-
27
- export default function GoalsClient() {
28
- const [goals, setGoals] = useState<GoalFrontmatter[] | null>(null);
29
- const [error, setError] = useState<string | null>(null);
30
-
31
- const searchParams = useSearchParams();
32
- const teamFilter = (searchParams.get("team") ?? "").trim();
33
-
34
- const [filterStatus, setFilterStatus] = useState<string>("all");
35
-
36
- useEffect(() => {
37
- let cancelled = false;
38
- (async () => {
39
- try {
40
- const { goals: g, error: err } = await fetchGoals();
41
- if (cancelled) return;
42
- setError(err);
43
- setGoals(err ? [] : g);
44
- } catch (e: unknown) {
45
- if (cancelled) return;
46
- setError(errorMessage(e));
47
- setGoals([]);
48
- }
49
- })();
50
-
51
- return () => {
52
- cancelled = true;
53
- };
54
- }, []);
55
-
56
- async function reload() {
57
- setGoals(null);
58
- setError(null);
59
- try {
60
- const { goals: g, error: err } = await fetchGoals();
61
- setError(err);
62
- setGoals(err ? [] : g);
63
- } catch (e: unknown) {
64
- setError(errorMessage(e));
65
- setGoals([]);
66
- }
67
- }
68
-
69
- const filtered = useMemo(() => {
70
- let list = goals ?? [];
71
- if (teamFilter) list = list.filter((g) => Array.isArray(g.teams) && g.teams.includes(teamFilter));
72
- if (filterStatus === "all") return list;
73
- return list.filter((g) => g.status === filterStatus);
74
- }, [goals, filterStatus, teamFilter]);
75
-
76
- const counts = useMemo(() => {
77
- const list = goals ?? [];
78
- const c = { all: list.length, active: 0, planned: 0, done: 0 };
79
- for (const g of list) {
80
- if (g.status === "active") c.active += 1;
81
- else if (g.status === "done") c.done += 1;
82
- else c.planned += 1;
83
- }
84
- return c;
85
- }, [goals]);
86
-
87
- function renderGoal(g: GoalFrontmatter) {
88
- return (
89
- <Link
90
- key={g.id}
91
- href={`/goals/${encodeURIComponent(g.id)}`}
92
- className="block ck-glass p-5 transition hover:bg-[color:var(--ck-bg-glass)]"
93
- >
94
- <div className="flex flex-wrap items-start justify-between gap-3">
95
- <div className="min-w-0">
96
- <div className="truncate text-base font-semibold text-[color:var(--ck-text-primary)]">{g.title}</div>
97
- <div className="mt-1 text-xs text-[color:var(--ck-text-tertiary)]">
98
- <span className="font-mono">{g.id}</span>
99
- {g.updatedAt ? ` • updated ${new Date(g.updatedAt).toLocaleString()}` : ""}
100
- </div>
101
- </div>
102
- <div className="flex flex-wrap gap-2">
103
- <Badge>{g.status}</Badge>
104
- {g.teams?.slice(0, 3).map((t) => (
105
- <Badge key={t}>{t}</Badge>
106
- ))}
107
- {g.tags?.slice(0, 3).map((t) => (
108
- <Badge key={t}>#{t}</Badge>
109
- ))}
110
- </div>
111
- </div>
112
- </Link>
113
- );
114
- }
115
-
116
- return (
117
- <div className="space-y-6">
118
- <div className="flex flex-wrap items-center justify-between gap-3">
119
- <div>
120
- <h1 className="text-2xl font-semibold tracking-tight">Goals</h1>
121
- <p className="mt-1 text-sm text-[color:var(--ck-text-secondary)]">
122
- Stored in <code className="font-mono">~/.openclaw/workspace/notes/goals/</code>
123
- {teamFilter ? (
124
- <>
125
- {" "}• filtered by team <code className="font-mono">{teamFilter}</code>
126
- </>
127
- ) : null}
128
- </p>
129
- </div>
130
- <Link
131
- href="/goals/new"
132
- className="rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white"
133
- >
134
- Create goal
135
- </Link>
136
- </div>
137
-
138
- <div className="ck-glass p-4">
139
- <div className="flex flex-wrap items-center gap-3">
140
- <label className="text-sm text-[color:var(--ck-text-secondary)]">Status</label>
141
- <select
142
- className="rounded-[var(--ck-radius-sm)] border border-[color:var(--ck-border-subtle)] bg-transparent px-2 py-1 text-sm"
143
- value={filterStatus}
144
- onChange={(e) => setFilterStatus(e.target.value)}
145
- >
146
- <option value="all">All ({counts.all})</option>
147
- <option value="active">Active ({counts.active})</option>
148
- <option value="planned">Planned ({counts.planned})</option>
149
- <option value="done">Done ({counts.done})</option>
150
- </select>
151
-
152
- <button
153
- className="ml-auto text-sm font-medium hover:underline"
154
- onClick={() => void reload()}
155
- >
156
- Refresh
157
- </button>
158
- </div>
159
- </div>
160
-
161
- {error ? (
162
- <div className="ck-glass p-4 text-sm text-red-300">{error}</div>
163
- ) : null}
164
-
165
- {goals == null && (
166
- <div className="ck-glass p-6 text-sm text-[color:var(--ck-text-secondary)]">Loading…</div>
167
- )}
168
- {goals != null && filtered.length === 0 && (
169
- <div className="ck-glass p-6">
170
- <div className="text-sm text-[color:var(--ck-text-secondary)]">No goals yet.</div>
171
- <div className="mt-3">
172
- <Link href="/goals/new" className="text-sm font-medium hover:underline">
173
- Create your first goal →
174
- </Link>
175
- </div>
176
- </div>
177
- )}
178
- {goals != null && filtered.length > 0 && filterStatus !== "all" && (
179
- <div className="space-y-3">{filtered.map(renderGoal)}</div>
180
- )}
181
- {goals != null && filtered.length > 0 && filterStatus === "all" && (
182
- <div className="space-y-8">
183
- {(["active", "planned", "done"] as const).map((status) => {
184
- const section = filtered.filter((g) => g.status === status);
185
- if (!section.length) return null;
186
- return (
187
- <section key={status}>
188
- <div className="mb-2 flex items-end justify-between">
189
- <h2 className="text-sm font-semibold tracking-wide text-[color:var(--ck-text-secondary)] uppercase">
190
- {status} ({section.length})
191
- </h2>
192
- </div>
193
- <div className="space-y-3">{section.map(renderGoal)}</div>
194
- </section>
195
- );
196
- })}
197
- </div>
198
- )}
199
- </div>
200
- );
201
- }
@@ -1,81 +0,0 @@
1
- "use client";
2
-
3
- import Link from "next/link";
4
- import { GoalFormCard, GoalFormFields } from "@/components/GoalFormFields";
5
- import { useRouter } from "next/navigation";
6
- import { useMemo, useState } from "react";
7
- import { slugifyId } from "@/lib/slugify";
8
- import { errorMessage } from "@/lib/errors";
9
- import { fetchJson } from "@/lib/fetch-json";
10
- import { useGoalFormState } from "@/lib/goals-client";
11
-
12
- export default function NewGoalPage() {
13
- const router = useRouter();
14
-
15
- const [id, setId] = useState("");
16
- const [error, setError] = useState<string | null>(null);
17
- const [saving, setSaving] = useState(false);
18
-
19
- const defaultBody =
20
- "## Workflow\n<!-- goal-workflow -->\n- Use **Promote to inbox** to send this goal to the development-team inbox for scoping.\n- When promoted, set goal status to **active**.\n- Track implementation work via tickets (add links/IDs under a **Tickets** section in this goal).\n- When development is complete (all associated tickets marked done), set goal status to **done**.\n\n## Tickets\n- (add ticket links/ids)\n";
21
- const { formState, tags, teams } = useGoalFormState({ body: defaultBody });
22
- const { title } = formState;
23
-
24
- const suggestedId = useMemo(() => {
25
- const s = slugifyId(title, 64);
26
- return s.length >= 2 ? s : "";
27
- }, [title]);
28
-
29
- async function create() {
30
- setSaving(true);
31
- setError(null);
32
- const finalId = id.trim();
33
- try {
34
- await fetchJson("/api/goals", {
35
- method: "POST",
36
- headers: { "content-type": "application/json" },
37
- body: JSON.stringify({
38
- id: finalId,
39
- title: formState.title,
40
- status: formState.status,
41
- tags,
42
- teams,
43
- body: formState.body,
44
- }),
45
- });
46
- router.push(`/goals/${encodeURIComponent(finalId)}`);
47
- } catch (e: unknown) {
48
- setError(errorMessage(e));
49
- } finally {
50
- setSaving(false);
51
- }
52
- }
53
-
54
- return (
55
- <div className="space-y-4">
56
- <Link href="/goals" className="text-sm font-medium hover:underline">
57
- ← Back
58
- </Link>
59
-
60
- <GoalFormCard
61
- error={error}
62
- actions={
63
- <button
64
- onClick={() => void create()}
65
- disabled={saving}
66
- className="rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-3 py-2 text-sm font-medium text-white disabled:opacity-50"
67
- >
68
- {saving ? "Creating…" : "Create"}
69
- </button>
70
- }
71
- >
72
- <h1 className="text-xl font-semibold tracking-tight">Create goal</h1>
73
- <GoalFormFields
74
- formState={formState}
75
- idField={{ id, setId, suggestedId: suggestedId || undefined }}
76
- bodyHeight="h-[260px]"
77
- />
78
- </GoalFormCard>
79
- </div>
80
- );
81
- }
@@ -1,10 +0,0 @@
1
- import { Suspense } from "react";
2
- import GoalsClient from "./goals-client";
3
-
4
- export default function GoalsPage() {
5
- return (
6
- <Suspense fallback={<div className="ck-glass p-6 text-sm text-[color:var(--ck-text-secondary)]">Loading goals…</div>}>
7
- <GoalsClient />
8
- </Suspense>
9
- );
10
- }
@@ -1,53 +0,0 @@
1
- import type { Metadata } from "next";
2
- import { Geist, Geist_Mono } from "next/font/google";
3
- import "./globals.css";
4
- import { AppShell } from "@/components/AppShell";
5
-
6
- const geistSans = Geist({
7
- variable: "--font-geist-sans",
8
- subsets: ["latin"],
9
- });
10
-
11
- const geistMono = Geist_Mono({
12
- variable: "--font-geist-mono",
13
- subsets: ["latin"],
14
- });
15
-
16
- export const metadata: Metadata = {
17
- title: "Claw Kitchen",
18
- description: "Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.",
19
- icons: {
20
- icon: [
21
- { url: "/favicon.ico", sizes: "any" },
22
- { url: "/favicon-16x16.png", sizes: "16x16", type: "image/png" },
23
- { url: "/favicon-32x32.png", sizes: "32x32", type: "image/png" },
24
- ],
25
- apple: "/apple-touch-icon.png",
26
- },
27
- };
28
-
29
- export default function RootLayout({
30
- children,
31
- }: Readonly<{
32
- children: React.ReactNode;
33
- }>) {
34
- return (
35
- <html lang="en" suppressHydrationWarning>
36
- <head>
37
- {/* Prevent theme flash: set data-theme before first paint */}
38
- <script
39
- dangerouslySetInnerHTML={{
40
- __html:
41
- "(function(){try{var t=localStorage.getItem('ck-theme');var theme=(t==='light')?'light':'dark';document.documentElement.dataset.theme=theme;}catch(e){document.documentElement.dataset.theme='dark';}})();",
42
- }}
43
- />
44
- </head>
45
- <body
46
- suppressHydrationWarning
47
- className={`${geistSans.variable} ${geistMono.variable} antialiased`}
48
- >
49
- <AppShell>{children}</AppShell>
50
- </body>
51
- </html>
52
- );
53
- }
@@ -1,15 +0,0 @@
1
- import type { MetadataRoute } from "next";
2
-
3
- export default function manifest(): MetadataRoute.Manifest {
4
- return {
5
- name: "Claw Kitchen",
6
- short_name: "Claw Kitchen",
7
- description: "Local-first UI for authoring ClawRecipes recipes and scaffolding agents/teams.",
8
- start_url: "/",
9
- display: "standalone",
10
- icons: [
11
- { src: "/android-chrome-192x192.png", sizes: "192x192", type: "image/png" },
12
- { src: "/android-chrome-512x512.png", sizes: "512x512", type: "image/png" },
13
- ],
14
- };
15
- }
@@ -1,8 +0,0 @@
1
- export default function NotFound() {
2
- return (
3
- <div className="mx-auto max-w-2xl px-6 py-12">
4
- <h1 className="text-xl font-semibold">Page not found</h1>
5
- <p className="mt-2 text-sm text-[color:var(--ck-text-secondary)]">The page you requested does not exist.</p>
6
- </div>
7
- );
8
- }
package/src/app/page.tsx DELETED
@@ -1,33 +0,0 @@
1
- import { unstable_noStore as noStore } from "next/cache";
2
- import { type AgentListItem } from "@/lib/agents";
3
- import { runOpenClaw } from "@/lib/openclaw";
4
- import { listRecipes } from "@/lib/recipes";
5
- import HomeClient from "./HomeClient";
6
-
7
- export const dynamic = "force-dynamic";
8
- export const revalidate = 0;
9
- async function getAgents(): Promise<AgentListItem[]> {
10
- const res = await runOpenClaw(["agents", "list", "--json"]);
11
- if (!res.ok) return [];
12
- return JSON.parse(res.stdout) as AgentListItem[];
13
- }
14
-
15
- async function getTeamsFromRecipes(): Promise<{ teamNames: Record<string, string> }> {
16
- const items = await listRecipes();
17
- const teamNames: Record<string, string> = {};
18
- for (const r of items) {
19
- if (r.kind !== "team") continue;
20
- const name = String(r.name ?? "").trim();
21
- if (!name) continue;
22
- teamNames[r.id] = name;
23
- }
24
- return { teamNames };
25
- }
26
-
27
- export default async function Home() {
28
- // Home should always reflect the current OpenClaw state (teams/agents can change outside Next).
29
- noStore();
30
-
31
- const [agents, { teamNames }] = await Promise.all([getAgents(), getTeamsFromRecipes()]);
32
- return <HomeClient agents={agents} teamNames={teamNames} />;
33
- }
@@ -1,156 +0,0 @@
1
- "use client";
2
-
3
- import { useEffect, useMemo, useState } from "react";
4
- import { fetchJson } from "@/lib/fetch-json";
5
- import { useSlugifiedId } from "@/lib/use-slugified-id";
6
- import { CreateModalShell } from "./CreateModalShell";
7
-
8
- function getAvailabilityBorderClass(state: string): string {
9
- if (state === "available") return "border-emerald-400/50";
10
- if (state === "taken") return "border-red-400/60";
11
- return "border-white/10";
12
- }
13
-
14
- function getAvailabilityHint(state: string): string {
15
- if (state === "taken") return "That id is already taken.";
16
- if (state === "available") return "Id is available.";
17
- return "This will scaffold ~/.openclaw/workspace/agents/<agentId> and add the agent to config.";
18
- }
19
-
20
- type Availability =
21
- | { state: "empty" }
22
- | { state: "checking" }
23
- | { state: "available" }
24
- | { state: "taken"; reason?: string };
25
-
26
- /** Sync availability from local arrays (no fetch). Returns null when API check needed. */
27
- function syncAvailability(
28
- v: string,
29
- existingRecipeIds: string[],
30
- existingAgentIds: string[]
31
- ): Availability | null {
32
- if (!v) return { state: "empty" };
33
- if (existingRecipeIds.includes(v)) return { state: "taken", reason: "recipe-id-collision" };
34
- if (existingAgentIds.includes(v)) return { state: "taken", reason: "agent-exists" };
35
- return null;
36
- }
37
-
38
- export function CreateAgentModal({
39
- open,
40
- recipeId,
41
- recipeName,
42
- agentId,
43
- setAgentId,
44
- agentName,
45
- setAgentName,
46
- existingRecipeIds,
47
- existingAgentIds,
48
- busy,
49
- error,
50
- onClose,
51
- onConfirm,
52
- }: {
53
- open: boolean;
54
- recipeId: string;
55
- recipeName: string;
56
- agentId: string;
57
- setAgentId: (v: string) => void;
58
- agentName: string;
59
- setAgentName: (v: string) => void;
60
- existingRecipeIds: string[];
61
- existingAgentIds: string[];
62
- busy?: boolean;
63
- error?: string | null;
64
- onClose: () => void;
65
- onConfirm: () => void;
66
- }) {
67
- const [idTouched, setIdTouched] = useState(false);
68
- const [apiAvailability, setApiAvailability] = useState<Availability | null>(null);
69
-
70
- const { effectiveId } = useSlugifiedId({
71
- open,
72
- name: agentName,
73
- setName: setAgentName,
74
- id: agentId,
75
- setId: setAgentId,
76
- idTouched,
77
- setIdTouched,
78
- });
79
-
80
- const v = String(effectiveId ?? "").trim();
81
- const syncAvail = useMemo(
82
- () => (open ? syncAvailability(v, existingRecipeIds, existingAgentIds) : { state: "empty" as const }),
83
- [open, v, existingRecipeIds, existingAgentIds]
84
- );
85
-
86
- const availability: Availability = syncAvail ?? apiAvailability ?? { state: "available" };
87
-
88
- useEffect(() => {
89
- if (!open || syncAvail !== null) return;
90
- const t = setTimeout(() => {
91
- void (async () => {
92
- setApiAvailability({ state: "checking" });
93
- try {
94
- const json = await fetchJson<{ ok?: boolean; available?: boolean; reason?: string }>(
95
- `/api/ids/check?kind=agent&id=${encodeURIComponent(v)}`,
96
- { cache: "no-store" }
97
- );
98
- if (json.available) setApiAvailability({ state: "available" });
99
- else setApiAvailability({ state: "taken", reason: json.reason });
100
- } catch {
101
- setApiAvailability({ state: "available" });
102
- }
103
- })();
104
- }, 250);
105
- return () => clearTimeout(t);
106
- }, [open, syncAvail, v]);
107
-
108
- return (
109
- <CreateModalShell
110
- open={open}
111
- title="Create agent"
112
- recipeId={recipeId}
113
- recipeName={recipeName}
114
- error={error}
115
- busy={busy}
116
- canConfirm={
117
- !!effectiveId.trim() &&
118
- availability.state !== "taken" &&
119
- availability.state !== "checking"
120
- }
121
- onClose={onClose}
122
- onConfirm={onConfirm}
123
- confirmLabel="Create agent"
124
- >
125
- <div className="mt-4">
126
- <label className="text-sm font-medium text-[color:var(--ck-text-primary)]">Agent name</label>
127
- <input
128
- value={agentName}
129
- onChange={(e) => setAgentName(e.target.value)}
130
- placeholder="e.g. Crypto Onchain"
131
- className="mt-2 w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)]"
132
- autoFocus
133
- />
134
- </div>
135
-
136
- <div className="mt-4">
137
- <label className="text-sm font-medium text-[color:var(--ck-text-primary)]">Agent id</label>
138
- <input
139
- value={effectiveId}
140
- onChange={(e) => {
141
- setIdTouched(true);
142
- setAgentId(e.target.value);
143
- }}
144
- placeholder="e.g. crypto-onchain"
145
- className={
146
- "mt-2 w-full rounded-[var(--ck-radius-sm)] border bg-white/5 px-3 py-2 text-sm text-[color:var(--ck-text-primary)] placeholder:text-[color:var(--ck-text-tertiary)] " +
147
- getAvailabilityBorderClass(availability.state)
148
- }
149
- />
150
- <div className="mt-2 text-xs text-[color:var(--ck-text-tertiary)]">
151
- {getAvailabilityHint(availability.state)}
152
- </div>
153
- </div>
154
- </CreateModalShell>
155
- );
156
- }