fimo 0.20.0 → 0.21.0-experimental.1

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 (322) hide show
  1. package/README.md +1 -1
  2. package/assets/agent-templates/_default/GOAL.md +10 -0
  3. package/assets/agent-templates/_default/capabilities.yaml +10 -0
  4. package/assets/content-templates/shared/types.eta +1 -1
  5. package/assets/skills/fimo-cli/SKILL.md +2 -1
  6. package/assets/skills/fimo-cli/references/agents.md +136 -36
  7. package/assets/skills/fimo-cli/references/branches.md +8 -5
  8. package/assets/skills/fimo-cli/references/deploy.md +11 -2
  9. package/assets/skills/fimo-cli/references/domains.md +12 -0
  10. package/assets/skills/fimo-cli/references/forms.md +1 -1
  11. package/assets/skills/fimo-cli/references/init.md +9 -2
  12. package/assets/skills/fimo-cli/references/locales.md +1 -1
  13. package/assets/skills/fimo-cli/references/mcp.md +1 -1
  14. package/assets/skills/fimo-cli/references/media.md +18 -1
  15. package/assets/skills/fimo-cli/references/project-vars-and-secrets.md +3 -1
  16. package/assets/skills/fimo-cli/references/projects.md +7 -7
  17. package/assets/skills/fimo-code/assets/react-router-locales/navigation.tsx +1 -1
  18. package/assets/skills/fimo-code/references/assets.md +2 -2
  19. package/assets/skills/fimo-code/references/best-practices/next.md +1 -1
  20. package/assets/skills/fimo-code/references/content/schema.md +23 -0
  21. package/assets/skills/fimo-code/references/forms.md +1 -1
  22. package/assets/skills/fimo-code/references/frameworks/astro.md +8 -2
  23. package/assets/skills/fimo-code/references/frameworks/compatibility.md +9 -9
  24. package/assets/skills/fimo-code/references/frameworks/hosting.md +17 -13
  25. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +8 -9
  26. package/assets/skills/fimo-code/references/frameworks/next/locales.md +5 -5
  27. package/assets/skills/fimo-code/references/frameworks/next/pages-router.md +5 -5
  28. package/assets/skills/fimo-code/references/frameworks/next.md +41 -32
  29. package/assets/skills/fimo-code/references/frameworks/react-router.md +10 -7
  30. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +22 -15
  31. package/assets/skills/fimo-code/references/frameworks/vite-react.md +7 -5
  32. package/assets/skills/fimo-code/references/labels.md +4 -4
  33. package/assets/skills/fimo-code/references/locales.md +2 -2
  34. package/assets/skills/fimo-code/references/ui.md +4 -4
  35. package/assets/skills/fimo-migration/SKILL.md +51 -30
  36. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +12 -15
  37. package/assets/skills/fimo-migration/references/media.md +12 -8
  38. package/assets/skills/fimo-migration/references/qa.md +12 -11
  39. package/assets/skills/fimo-migration/references/workers/content-planner.md +33 -4
  40. package/assets/skills/fimo-migration/references/workers/validator.md +10 -0
  41. package/assets/skills/fimo-migration/references/workers.md +19 -10
  42. package/assets/skills/fimo-migration/references/workflow.md +29 -11
  43. package/assets/skills/fimo-studio/references/ai-chat.md +1 -1
  44. package/assets/skills/fimo-studio/references/billing-and-credits.md +18 -1
  45. package/assets/skills/fimo-studio/references/cms.md +2 -0
  46. package/assets/skills/fimo-studio/references/preview-and-responsive.md +1 -0
  47. package/assets/starters/fimo-site/template/src/pages/Contact.tsx +1 -1
  48. package/assets/starters/fimo-site/template/src/pages/SiteContent.tsx +1 -1
  49. package/assets/starters/fimo-site/template/src/schemas/HomePage.ts +3 -3
  50. package/assets/starters/fimo-site/template/src/schemas/HomePage.types.ts +1 -1
  51. package/dist/build/astro/config.d.ts +13 -2
  52. package/dist/build/astro/config.js +9 -24
  53. package/dist/build/next/moved.d.ts +2 -0
  54. package/dist/build/next/moved.js +2 -0
  55. package/dist/build/react/router-moved.d.ts +2 -0
  56. package/dist/build/react/router-moved.js +2 -0
  57. package/dist/build/react/router-preset-moved.d.ts +2 -0
  58. package/dist/build/react/router-preset-moved.js +2 -0
  59. package/dist/build/react/router-routes-moved.d.ts +2 -0
  60. package/dist/build/react/router-routes-moved.js +2 -0
  61. package/dist/build/react/ui-moved.d.ts +2 -0
  62. package/dist/build/react/ui-moved.js +2 -0
  63. package/dist/build/react/vite-moved.d.ts +2 -0
  64. package/dist/build/react/vite-moved.js +2 -0
  65. package/dist/build/sveltekit/config.d.ts +5 -4
  66. package/dist/build/sveltekit/config.js +6 -15
  67. package/dist/build/sveltekit/moved.d.ts +13 -0
  68. package/dist/build/sveltekit/moved.js +3 -0
  69. package/dist/build/vite/data-id.d.ts +11 -0
  70. package/dist/build/vite/data-id.js +20 -0
  71. package/dist/build/vite/plugins/runtime-env.d.ts +1 -1
  72. package/dist/build/vite/plugins/runtime-env.js +6 -2
  73. package/dist/build/vite/runtime-env.d.ts +2 -0
  74. package/dist/build/vite/runtime-env.js +1 -0
  75. package/dist/cli/bundle.json +1 -1
  76. package/dist/cli/index.js +115 -110
  77. package/dist/runtime/content/client/internal.js +1 -1
  78. package/dist/runtime/content/index.d.ts +6 -1
  79. package/dist/runtime/content/index.js +6 -0
  80. package/dist/runtime/i18n/index.d.ts +2 -0
  81. package/dist/runtime/i18n/index.js +1 -0
  82. package/dist/runtime/labels/index.d.ts +3 -0
  83. package/dist/runtime/labels/index.js +2 -0
  84. package/dist/runtime/preview/index.d.ts +5 -0
  85. package/dist/runtime/preview/index.js +4 -0
  86. package/dist/runtime/preview/script.d.ts +3 -0
  87. package/dist/runtime/preview/script.js +14 -0
  88. package/dist/runtime/primitives/lib/index.d.ts +2 -0
  89. package/dist/runtime/primitives/lib/index.js +2 -0
  90. package/dist/runtime/seo/index.d.ts +0 -8
  91. package/dist/runtime/seo/index.js +0 -8
  92. package/dist/runtime/shared/config.d.ts +6 -0
  93. package/dist/runtime/shared/config.js +4 -0
  94. package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
  95. package/dist/runtime/shared/local-runtime-env.js +7 -5
  96. package/dist/runtime/templates.d.ts +20 -4
  97. package/dist/runtime/templates.js +60 -18
  98. package/dist/scripts/extract-translations.js +8 -3
  99. package/dist/scripts/index.d.ts +3 -0
  100. package/dist/scripts/index.js +2 -0
  101. package/dist/scripts/sync-forms.js +21 -9
  102. package/dist/scripts/sync-schemas.js +129 -21
  103. package/dist/scripts/validate-schemas.js +63 -2
  104. package/package.json +72 -71
  105. package/release.json +2 -2
  106. package/templates/astro/AGENTS.md +1 -1
  107. package/templates/astro/astro.config.mjs +1 -1
  108. package/templates/astro/package.json +4 -2
  109. package/templates/astro/pnpm-workspace.yaml +6 -2
  110. package/templates/nextjs/.fimo/config.json +1 -2
  111. package/templates/nextjs/AGENTS.md +6 -16
  112. package/templates/nextjs/next.config.ts +4 -2
  113. package/templates/nextjs/package.json +4 -2
  114. package/templates/nextjs/pnpm-workspace.yaml +6 -2
  115. package/templates/nextjs/src/app/layout.tsx +16 -0
  116. package/templates/nextjs/src/locales.ts +3 -6
  117. package/templates/react-router/AGENTS.md +1 -1
  118. package/templates/react-router/package.json +5 -2
  119. package/templates/react-router/pnpm-workspace.yaml +6 -6
  120. package/templates/react-router/react-router.config.ts +1 -1
  121. package/templates/react-router/src/pages/legal/LegalPage.tsx +1 -1
  122. package/templates/react-router/src/root.tsx +1 -1
  123. package/templates/react-router/src/vite-env.d.ts +0 -1
  124. package/templates/react-router/vite.config.ts +1 -1
  125. package/templates/sveltekit/AGENTS.md +1 -1
  126. package/templates/sveltekit/package.json +4 -2
  127. package/templates/sveltekit/pnpm-workspace.yaml +6 -2
  128. package/templates/sveltekit/src/routes/+layout.server.ts +1 -1
  129. package/templates/sveltekit/src/routes/+layout.svelte +1 -1
  130. package/templates/sveltekit/svelte.config.js +1 -1
  131. package/templates/sveltekit/vite.config.ts +1 -1
  132. package/assets/sveltekit/components/Boolean.svelte +0 -19
  133. package/assets/sveltekit/components/Date.svelte +0 -33
  134. package/assets/sveltekit/components/DateTime.svelte +0 -35
  135. package/assets/sveltekit/components/FimoProvider.svelte +0 -35
  136. package/assets/sveltekit/components/Image.svelte +0 -80
  137. package/assets/sveltekit/components/Json.svelte +0 -18
  138. package/assets/sveltekit/components/Label.svelte +0 -16
  139. package/assets/sveltekit/components/Number.svelte +0 -21
  140. package/assets/sveltekit/components/RichText.svelte +0 -19
  141. package/assets/sveltekit/components/Text.svelte +0 -30
  142. package/assets/sveltekit/components/Video.svelte +0 -37
  143. package/assets/sveltekit/components/index.d.ts +0 -11
  144. package/assets/sveltekit/components/index.js +0 -11
  145. package/dist/build/next/config.d.ts +0 -17
  146. package/dist/build/next/config.js +0 -66
  147. package/dist/build/sveltekit/data-id.d.ts +0 -3
  148. package/dist/build/sveltekit/data-id.js +0 -171
  149. package/dist/build/sveltekit/files/edge.js +0 -68
  150. package/dist/build/sveltekit/files/serverless.js +0 -42
  151. package/dist/build/sveltekit/vite.d.ts +0 -12
  152. package/dist/build/sveltekit/vite.js +0 -14
  153. package/dist/build/vite/index.d.ts +0 -42
  154. package/dist/build/vite/index.js +0 -160
  155. package/dist/build/vite/plugins/content-sync.d.ts +0 -11
  156. package/dist/build/vite/plugins/content-sync.js +0 -41
  157. package/dist/build/vite/plugins/data-id.d.ts +0 -12
  158. package/dist/build/vite/plugins/data-id.js +0 -109
  159. package/dist/build/vite/plugins/fimo-config.d.ts +0 -12
  160. package/dist/build/vite/plugins/fimo-config.js +0 -68
  161. package/dist/build/vite/plugins/overlay.d.ts +0 -3
  162. package/dist/build/vite/plugins/overlay.js +0 -154
  163. package/dist/build/vite/plugins/robots.d.ts +0 -10
  164. package/dist/build/vite/plugins/robots.js +0 -56
  165. package/dist/build/vite/plugins/seo.d.ts +0 -3
  166. package/dist/build/vite/plugins/seo.js +0 -112
  167. package/dist/build/vite/plugins/server-config.d.ts +0 -3
  168. package/dist/build/vite/plugins/server-config.js +0 -36
  169. package/dist/build/vite/plugins/sitemap.d.ts +0 -3
  170. package/dist/build/vite/plugins/sitemap.js +0 -73
  171. package/dist/build/vite/plugins/translations.d.ts +0 -11
  172. package/dist/build/vite/plugins/translations.js +0 -601
  173. package/dist/runtime/app/FimoProviders.d.ts +0 -30
  174. package/dist/runtime/app/FimoProviders.js +0 -186
  175. package/dist/runtime/app/FimoScripts.d.ts +0 -14
  176. package/dist/runtime/app/FimoScripts.js +0 -48
  177. package/dist/runtime/app/index.d.ts +0 -8
  178. package/dist/runtime/app/index.js +0 -4
  179. package/dist/runtime/app/prefetch.d.ts +0 -9
  180. package/dist/runtime/app/prefetch.js +0 -39
  181. package/dist/runtime/content/DataSourcesProvider.d.ts +0 -4
  182. package/dist/runtime/content/DataSourcesProvider.js +0 -63
  183. package/dist/runtime/content/RefreshContentProvider.d.ts +0 -19
  184. package/dist/runtime/content/RefreshContentProvider.js +0 -71
  185. package/dist/runtime/content/client/createContentClient.d.ts +0 -7
  186. package/dist/runtime/content/client/createContentClient.js +0 -7
  187. package/dist/runtime/content/client/createSingletonClient.d.ts +0 -5
  188. package/dist/runtime/content/client/createSingletonClient.js +0 -6
  189. package/dist/runtime/content/client/react-content-client.d.ts +0 -10
  190. package/dist/runtime/content/client/react-content-client.js +0 -165
  191. package/dist/runtime/content/client/react-singleton-client.d.ts +0 -7
  192. package/dist/runtime/content/client/react-singleton-client.js +0 -38
  193. package/dist/runtime/content/client/types.d.ts +0 -42
  194. package/dist/runtime/content/client/types.js +0 -1
  195. package/dist/runtime/content/client/useQueryLocale.d.ts +0 -2
  196. package/dist/runtime/content/client/useQueryLocale.js +0 -5
  197. package/dist/runtime/content/client/vite-runtime.d.ts +0 -3
  198. package/dist/runtime/content/client/vite-runtime.js +0 -23
  199. package/dist/runtime/content/utils/retrieve-data-sources.d.ts +0 -29
  200. package/dist/runtime/content/utils/retrieve-data-sources.js +0 -107
  201. package/dist/runtime/core/AppErrorBoundary.d.ts +0 -10
  202. package/dist/runtime/core/AppErrorBoundary.js +0 -27
  203. package/dist/runtime/core/ViteLifecycles.d.ts +0 -5
  204. package/dist/runtime/core/ViteLifecycles.js +0 -35
  205. package/dist/runtime/i18n/FimoLocaleContext.d.ts +0 -9
  206. package/dist/runtime/i18n/FimoLocaleContext.js +0 -17
  207. package/dist/runtime/iframe/ConsoleErrorProvider.d.ts +0 -3
  208. package/dist/runtime/iframe/ConsoleErrorProvider.js +0 -103
  209. package/dist/runtime/iframe/ScreenshotProvider.d.ts +0 -3
  210. package/dist/runtime/iframe/ScreenshotProvider.js +0 -60
  211. package/dist/runtime/iframe/runtime/overlay-hmr.d.ts +0 -2
  212. package/dist/runtime/iframe/runtime/overlay-hmr.js +0 -27
  213. package/dist/runtime/iframe/runtime/overlay-runtime.d.ts +0 -2
  214. package/dist/runtime/iframe/runtime/overlay-runtime.js +0 -103
  215. package/dist/runtime/index.d.ts +0 -22
  216. package/dist/runtime/index.js +0 -23
  217. package/dist/runtime/next/client-runtime.d.ts +0 -3
  218. package/dist/runtime/next/client-runtime.js +0 -24
  219. package/dist/runtime/next/client.d.ts +0 -28
  220. package/dist/runtime/next/client.js +0 -25
  221. package/dist/runtime/next/facade.d.ts +0 -8
  222. package/dist/runtime/next/facade.js +0 -34
  223. package/dist/runtime/next/labels.d.ts +0 -7
  224. package/dist/runtime/next/labels.js +0 -9
  225. package/dist/runtime/next/preview.d.ts +0 -13
  226. package/dist/runtime/next/preview.js +0 -34
  227. package/dist/runtime/next/primitives/Text.d.ts +0 -10
  228. package/dist/runtime/next/primitives/Text.js +0 -18
  229. package/dist/runtime/next/primitives/server.d.ts +0 -11
  230. package/dist/runtime/next/primitives/server.js +0 -54
  231. package/dist/runtime/next/provider.d.ts +0 -18
  232. package/dist/runtime/next/provider.js +0 -39
  233. package/dist/runtime/next/server-runtime.d.ts +0 -3
  234. package/dist/runtime/next/server-runtime.js +0 -23
  235. package/dist/runtime/next/server.d.ts +0 -21
  236. package/dist/runtime/next/server.js +0 -16
  237. package/dist/runtime/primitives/index.d.ts +0 -16
  238. package/dist/runtime/primitives/index.js +0 -17
  239. package/dist/runtime/react/primitives/contracts.d.ts +0 -94
  240. package/dist/runtime/react/primitives/contracts.js +0 -1
  241. package/dist/runtime/react/primitives/editable/Boolean.d.ts +0 -5
  242. package/dist/runtime/react/primitives/editable/Boolean.js +0 -11
  243. package/dist/runtime/react/primitives/editable/Date.d.ts +0 -4
  244. package/dist/runtime/react/primitives/editable/Date.js +0 -12
  245. package/dist/runtime/react/primitives/editable/DateTime.d.ts +0 -4
  246. package/dist/runtime/react/primitives/editable/DateTime.js +0 -13
  247. package/dist/runtime/react/primitives/editable/Image.d.ts +0 -4
  248. package/dist/runtime/react/primitives/editable/Image.js +0 -10
  249. package/dist/runtime/react/primitives/editable/Json.d.ts +0 -5
  250. package/dist/runtime/react/primitives/editable/Json.js +0 -11
  251. package/dist/runtime/react/primitives/editable/RichText.d.ts +0 -4
  252. package/dist/runtime/react/primitives/editable/RichText.js +0 -11
  253. package/dist/runtime/react/primitives/editable/Text.d.ts +0 -20
  254. package/dist/runtime/react/primitives/editable/Text.js +0 -36
  255. package/dist/runtime/react/primitives/editable/Video.d.ts +0 -4
  256. package/dist/runtime/react/primitives/editable/Video.js +0 -10
  257. package/dist/runtime/react/primitives/renderers/DateRenderer.d.ts +0 -17
  258. package/dist/runtime/react/primitives/renderers/DateRenderer.js +0 -17
  259. package/dist/runtime/react/primitives/renderers/ImageRenderer.d.ts +0 -8
  260. package/dist/runtime/react/primitives/renderers/ImageRenderer.js +0 -31
  261. package/dist/runtime/react/primitives/renderers/RichTextRenderer.d.ts +0 -12
  262. package/dist/runtime/react/primitives/renderers/RichTextRenderer.js +0 -135
  263. package/dist/runtime/react/primitives/renderers/StaticImage.d.ts +0 -35
  264. package/dist/runtime/react/primitives/renderers/StaticImage.js +0 -58
  265. package/dist/runtime/react/primitives/renderers/VideoRenderer.d.ts +0 -8
  266. package/dist/runtime/react/primitives/renderers/VideoRenderer.js +0 -10
  267. package/dist/runtime/react/useFimoLiveValue.d.ts +0 -20
  268. package/dist/runtime/react/useFimoLiveValue.js +0 -43
  269. package/dist/runtime/react-router/active-routes.d.ts +0 -12
  270. package/dist/runtime/react-router/active-routes.js +0 -60
  271. package/dist/runtime/react-router/index.d.ts +0 -16
  272. package/dist/runtime/react-router/index.js +0 -20
  273. package/dist/runtime/react-router/legacy/routes.d.ts +0 -35
  274. package/dist/runtime/react-router/legacy/routes.js +0 -86
  275. package/dist/runtime/react-router/navigation-utils.d.ts +0 -8
  276. package/dist/runtime/react-router/navigation-utils.js +0 -36
  277. package/dist/runtime/react-router/navigation.d.ts +0 -12
  278. package/dist/runtime/react-router/navigation.js +0 -28
  279. package/dist/runtime/react-router/preset.d.ts +0 -30
  280. package/dist/runtime/react-router/preset.js +0 -33
  281. package/dist/runtime/routing/AppResetScrollOnNavigate.d.ts +0 -2
  282. package/dist/runtime/routing/AppResetScrollOnNavigate.js +0 -12
  283. package/dist/runtime/routing/AppRoutesProvider.d.ts +0 -25
  284. package/dist/runtime/routing/AppRoutesProvider.js +0 -112
  285. package/dist/runtime/seo/buildSeoForPath.d.ts +0 -74
  286. package/dist/runtime/seo/buildSeoForPath.js +0 -55
  287. package/dist/runtime/seo/htmlProps.d.ts +0 -13
  288. package/dist/runtime/seo/htmlProps.js +0 -15
  289. package/dist/runtime/sveltekit/content.d.ts +0 -25
  290. package/dist/runtime/sveltekit/content.js +0 -33
  291. package/dist/runtime/sveltekit/context-contract.d.ts +0 -5
  292. package/dist/runtime/sveltekit/context-contract.js +0 -2
  293. package/dist/runtime/sveltekit/context.d.ts +0 -8
  294. package/dist/runtime/sveltekit/context.js +0 -25
  295. package/dist/runtime/sveltekit/forms.d.ts +0 -15
  296. package/dist/runtime/sveltekit/forms.js +0 -15
  297. package/dist/runtime/sveltekit/index.d.ts +0 -9
  298. package/dist/runtime/sveltekit/index.js +0 -5
  299. package/dist/runtime/sveltekit/internal.d.ts +0 -6
  300. package/dist/runtime/sveltekit/internal.js +0 -12
  301. package/dist/runtime/sveltekit/labels.d.ts +0 -20
  302. package/dist/runtime/sveltekit/labels.js +0 -13
  303. package/dist/runtime/sveltekit/preview.d.ts +0 -28
  304. package/dist/runtime/sveltekit/preview.js +0 -82
  305. package/dist/runtime/sveltekit/runtime.d.ts +0 -9
  306. package/dist/runtime/sveltekit/runtime.js +0 -26
  307. package/dist/runtime/t/OptionalTracking.d.ts +0 -13
  308. package/dist/runtime/t/OptionalTracking.js +0 -28
  309. package/dist/runtime/t/Pageview.d.ts +0 -9
  310. package/dist/runtime/t/Pageview.js +0 -118
  311. package/dist/runtime/vite/Label.d.ts +0 -13
  312. package/dist/runtime/vite/Label.js +0 -16
  313. package/dist/runtime/vite/primitives/Images.d.ts +0 -4
  314. package/dist/runtime/vite/primitives/Images.js +0 -12
  315. package/dist/runtime/vite/translations.d.ts +0 -28
  316. package/dist/runtime/vite/translations.js +0 -103
  317. package/templates/nextjs/src/app/(default)/layout.tsx +0 -10
  318. package/templates/nextjs/src/app/[locale]/layout.tsx +0 -22
  319. package/templates/nextjs/src/app/[locale]/page.tsx +0 -1
  320. package/templates/nextjs/src/components/Document.tsx +0 -26
  321. package/templates/nextjs/src/components/FimoPreviewBridge.tsx +0 -13
  322. /package/templates/nextjs/src/app/{(default)/page.tsx → page.tsx} +0 -0
package/README.md CHANGED
@@ -74,7 +74,7 @@ fimo deploy -m "your message"
74
74
  Go live to production:
75
75
 
76
76
  ```bash
77
- fimo publish --version 1.0.0
77
+ fimo publish --label "Homepage launch"
78
78
  ```
79
79
 
80
80
  Environments work like git branches:
@@ -9,3 +9,13 @@ Some good things to include:
9
9
  - Inputs the agent should expect (CLI args, files, API responses)
10
10
  - Anything the agent should **not** do
11
11
  - The format of the report / output the agent should produce
12
+
13
+ ## Decision policy
14
+
15
+ Adapt these defaults to the risk and scope of this agent:
16
+
17
+ - Proceed without asking when the work is within scope and a safe, reversible choice exists.
18
+ - Ask when a missing human decision changes what the correct result should be.
19
+ - Retain when the work is complete but all changes should be reviewed before merge.
20
+ - Request merge only when the result is complete, verified, and clearly safe for this agent's scope.
21
+ - Discard when the run produced no useful changes or deliberately abandoned them.
@@ -0,0 +1,10 @@
1
+ - cms:*
2
+ - assets:*
3
+ - i18n:*
4
+ - forms:*
5
+ - webhooks:read
6
+ - schedules:read
7
+ - fimo:analytics:read
8
+ - fimo:history:read
9
+ - fimo:logs:read
10
+ - fimo:preview:read
@@ -9,7 +9,7 @@
9
9
  */
10
10
  %>
11
11
  // AUTO-GENERATED ⚠️ – do not edit by hand
12
- import { type Fields, type FimoBoolean, type FimoMedia, type FimoPolymorphicReference, type FimoReference, type FimoRichText, type FimoRichTextContent, type FimoString, type Populate, type PopulatedResult, type ProjectedWithPopulate, type Query, type Sort, type Where, type WithReferences } from "<%= runtimeImport %>";
12
+ import { <%= model.runtimeTypeImports.map((typeImport) => `type ${typeImport}`).join(', ') %> } from "<%= runtimeImport %>";
13
13
  <%
14
14
  if (model.referenceImports && model.referenceImports.length > 0) {
15
15
  model.referenceImports.forEach((referenceImport) => {
@@ -128,7 +128,8 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
128
128
  - **When the user wants to try something risky / explore a redesign without touching the live site** → suggest a feature Branch: `fimo checkout -b <name>` gives an isolated Branch + DB + preview. Deploy previews there, then `fimo merge` it back and `fimo publish`. See `references/branches.md`.
129
129
  - **After completing or safely preserving the user's main work, when a confirmed Fimo platform failure still materially blocks the task after one safe recovery attempt, or a confirmed missing capability blocks completion or forces a fragile or heavily manual workaround** → use the built-in `supportReport` tool. Do not wait for the user to ask and do not stop after only describing the gap. See `references/support.md`.
130
130
  - **After the first successful `fimo deploy`** → suggest `fimo invite` if the project involves multiple people. Typical roles: `edit` for developers/content editors, `view` or `comment` for clients/stakeholders, `full` for project leads. See `references/invite.md`.
131
- - **When the user wants to modify the URL of their website** → walk through `references/domains.md`. The CLI surface covers renaming the Fimo-provided subdomain (`fimo domains rename-default`, free), attaching a domain they already own (`fimo domains add`, Premium), and buying a new domain through Fimo (`fimo domains buy`, Premium). The auto-generated default URL on every project is a fallback, not a final choice — proactively offer this after `fimo deploy --publish` if the user mentioned a real brand or domain.
131
+ - **After the automatic first-preview deploy on the create-new path, before the project has been published** → if there is no custom domain and the free default `*.fimo.site` slug still looks generated or was never explicitly chosen, offer to find a cleaner free subdomain. It needs no DNS. Never claim one without explicit user confirmation: suggest candidates, let the user choose, then rename it. Choosing the slug does not publish the site; the URL starts resolving only after the first successful `fimo deploy --publish`. Skip this nudge if the user already chose the default slug, attached a custom domain, or declined. See `references/domains.md` § Offer a cleaner default URL before first publish.
132
+ - **When the user wants to modify the URL of their website** → walk through `references/domains.md`. The CLI surface covers renaming the Fimo-provided subdomain (`fimo domains rename-default`, free), attaching a domain they already own (`fimo domains add`, Premium), and buying a new domain through Fimo (`fimo domains buy`, Premium).
132
133
 
133
134
  ## Anti-Patterns
134
135
 
@@ -22,7 +22,7 @@ fimo validate # project build and codegen checks
22
22
  fimo deploy # push to main — this also wires the declared triggers
23
23
  fimo agents run <name> # trigger a manual run → sessionId
24
24
  fimo agents runs <name> # see past sessions
25
- fimo agents report <name> # print a run's report (the agent's final message)
25
+ fimo agents report <name> # print a run's outcome summary
26
26
  fimo agents logs <name> # stream a session's log
27
27
  ```
28
28
 
@@ -56,44 +56,144 @@ integrations:
56
56
  An explicit map is restrictive: only entries set to `true` are available. An omitted or disabled integration cannot be
57
57
  used. See `references/integrations.md` for project setup, auth, and provider-specific commands.
58
58
 
59
+ ## How a cloud run ends
60
+
61
+ Fimo creates one task Branch and environment for a cloud run, tells the agent their names, and manages their lifecycle.
62
+ The agent works only in that checkout. Extra branches, worktrees, and `git push` are unsupported and cannot be cleaned up
63
+ or handed off correctly.
64
+
65
+ - **Merge** when the work is ready for the target Branch. Fimo applies the complete task environment or, if it conflicts,
66
+ leaves the target unchanged and keeps the work for review without choosing a side.
67
+ - **Retain** when the completed work should be reviewed before merge, or when the run stops, fails, or may need recovery.
68
+ Fimo leaves the target unchanged, keeps the complete task Branch, and sends an Inbox notification asking a person to
69
+ review all of its changes. A later follow-up can continue from that retained work.
70
+ - **Discard** when none of the run's work should be applied, including when it made no useful changes or deliberately
71
+ abandoned an approach. This permanently deletes the task Branch and every change in it without review.
72
+
73
+ If the agent exits without a decision, Fimo retains the task Branch. `fimo deploy` inside a run may build a preview of
74
+ that Branch for inspection or screenshots; it does not finish or hand off the run.
75
+
76
+ The run report is a concise outcome summary: what changed, what was verified, and what is still blocked. It is not a
77
+ chronological account, and it should not use decorative emoji.
78
+
79
+ ## Define the agent's decision policy
80
+
81
+ When authoring or editing an agent, add a short **Decision policy** to its `GOAL.md`. Describe the domain conditions for
82
+ acting, asking, review, and merge; do not copy Fimo's tool protocol. Use this shape and replace the examples with rules
83
+ specific to the agent:
84
+
85
+ ```md
86
+ ## Decision policy
87
+
88
+ - Proceed without asking when the work is within scope and a safe, reversible choice exists.
89
+ - Ask when a missing human decision changes what the correct result should be.
90
+ - Retain when the work is complete but all changes should be reviewed before merge.
91
+ - Request merge only when the result is complete, verified, and clearly safe for this agent's scope.
92
+ - Discard when the run produced no useful changes or deliberately abandoned them.
93
+ ```
94
+
95
+ Asking and review are different: `ask_user` is for a decision required before correct work can continue; `retain` ends
96
+ the run with its complete proposal waiting for review and does not ask a question.
97
+
98
+ Make those rules concrete enough that the agent can decide without guessing. For example:
99
+
100
+ - **Broken-link sweeper:** fix and request merge for up to ten internal links when each replacement is unambiguous and
101
+ the link check passes. Ask when two plausible destinations change the page's meaning. Retain useful fixes if complete
102
+ verification is blocked. Discard when the scan is clean or exploratory edits were reverted.
103
+ - **Launch-copy agent:** draft from an approved brief without asking about routine wording. Ask before choosing pricing,
104
+ product promises, brand direction, or deletions. Retain every completed draft for human review; never request merge.
105
+ - **Read-only auditor:** inspect and report autonomously. Ask only when the requested scope cannot be inferred. Discard
106
+ the unchanged task environment after recording the report.
107
+ - **Missing capability:** ask once for the exact capability and explain which operation it unlocks. Do not retain partial
108
+ work as a substitute for the blocking permission decision.
109
+
110
+ A review-first content agent could use this complete policy:
111
+
112
+ ```md
113
+ ## Decision policy
114
+
115
+ - Draft all requested copy without asking when the brief and approved source material answer the content decisions.
116
+ - Ask before inventing a price, product promise, legal claim, brand direction, or deleting existing content.
117
+ - Group every blocking decision and missing capability into one question.
118
+ - Retain every completed draft so a person reviews all changes before merge. Never request merge directly.
119
+ - Discard only when no useful draft was produced or the attempted approach was fully abandoned.
120
+ ```
121
+
122
+ When a run cannot continue correctly without a decision from a project member, it may call `ask_user` instead. The
123
+ question goes to the Fimo Inbox, the current invocation ends, and Fimo keeps the same task Branch and environment until
124
+ an authorized member answers. The answer starts one ordinary continuation in the same run thread; the original model
125
+ process does not wait.
126
+
127
+ Use `ask_user` sparingly, especially from scheduled agents:
128
+
129
+ - Ask only for a genuinely blocking human decision. Prefer a safe reversible default when one exists.
130
+ - Group every known blocker into one form with 1–4 related steps. Give it a 1–3 sentence description that says where
131
+ the work stands and why the decision matters or what it unlocks; keep implementation detail in the run.
132
+ - Use choices for compact text options. Use cards only when an option benefits from an image or a richer title and
133
+ subtitle. Use assets when the image itself is the answer, and tables when options need the same structured comparison.
134
+ - Do not repeat a question or request already waiting in prior run history.
135
+ - Use `finish_run` with `retain` when the work is ready for review but no answer is required.
136
+
137
+ An agent may include one multi-select `capabilities` step in that same form to request public Fimo capabilities it does
138
+ not currently hold. Group related tokens in one request. Selected tokens apply only to the continuation started by that
139
+ answer; unselected tokens are denied, selecting none is valid, and the blocked invocation never gains new authority.
140
+ Internal runtime abilities, integration setup, and OAuth are not capability requests.
141
+
142
+ At the start of a run, `run_history` provides bounded summaries of earlier outcomes and work still awaiting a person. An agent
143
+ may also maintain `.fimo/agents/<name>/MEMORY.md` as an ordinary reviewed file for durable facts that change future
144
+ behavior. Keep it under 4 KB, record no secrets or run log, and prune stale entries before adding new ones.
145
+
146
+ When three or more earlier runs still await a question answer, review, conflict resolution, or recovery, the agent
147
+ normally starts no new independent work. Unless the current trigger explicitly asks it to proceed anyway, it makes no
148
+ changes and finishes with `discard` and a brief report of what is waiting.
149
+
59
150
  ## Capabilities
60
151
 
61
152
  Capabilities describe the opt-in Fimo and network actions an agent may take. Managed agents always receive project
62
153
  filesystem access, a shell, and the ability to commit their task-environment changes; Fimo owns branch creation and
63
- publication. If `capabilities.yaml` is absent or empty, the agent has those project-worker tools but no Fimo API
64
- permissions or web-fetch tool. Once you add a capabilities file, list every Fimo or network permission the agent needs.
65
- There is no all-capabilities wildcard; keeping the list explicit makes each agent's power reviewable.
66
-
67
- | Capability | Allows the agent to | Risk |
68
- | ---------------------------- | ------------------------------------------- | ------------ |
69
- | `cms:read` | Read CMS content | Low |
70
- | `cms:write` | Create, update, or delete CMS entries | Medium |
71
- | `cms:schema:read` | Read CMS schemas | Low |
72
- | `cms:schema:write` | Modify CMS schemas | High |
73
- | `assets:read` | Read uploaded media | Low |
74
- | `assets:write` | Upload, replace, or delete media | Medium |
75
- | `i18n:read` / `i18n:write` | Read / modify translation catalogs | Low / Medium |
76
- | `forms:read` / `forms:write` | Read / modify form schemas and submissions | Low / Medium |
77
- | `webhooks:read` | Read webhook configs and deliveries | Low |
78
- | `webhooks:write` | Create, modify, delete, or trigger webhooks | High |
79
- | `schedules:read` | Read schedule configs and run history | Low |
80
- | `schedules:write` | Create, change, or trigger scheduled runs | Critical |
81
- | `fimo:logs:read` | Read project deployment logs | Low |
82
- | `fimo:analytics:read` | Read analytics data | Low |
83
- | `fimo:preview:read` | Read a current preview URL | Low |
84
- | `fimo:history:read` | Read project restore points | Low |
85
- | `fimo:deploy` | Trigger a production deploy | Critical |
86
- | `net:fetch` | Make outbound HTTP requests | Medium |
87
- | `agent:delegate` | Invoke declared sub-agents | Medium |
88
- | `runtime:long_running` | Run beyond the default time limit | High |
89
- | `runtime:auto_merge` | Auto-merge trivial proposed branches | Critical |
90
-
91
- If a capability is missing, the related command is denied and the agent should choose another path or report the
92
- blocker. Add the capability to `capabilities.yaml`, run `fimo agents validate <name>`, deploy the bundle, and start a
93
- new run. A denied capability does not grant access to anything else.
94
-
95
- Studio chat and project-bound Slack turns receive `fimo:logs:read`. Autonomous agents receive it only when their
96
- `capabilities.yaml` declares it; use `fimo logs` with the deploy guidance when diagnosing a failed preview.
154
+ publication. If `capabilities.yaml` is absent or empty, the agent keeps baseline project reads such as agent run history,
155
+ but receives no CMS, asset, or other domain-operation scope and no web-fetch tool. Once you add a capabilities file,
156
+ list every Fimo or network permission the agent needs.
157
+ Namespace selectors such as `cms:*`, `assets:*`, `i18n:*`, and `forms:*` grant every current and future declarable capability
158
+ in that namespace. Fimo expands selectors to concrete grants when a run starts. Use exact tokens for narrower agents.
159
+ The default template includes those four selectors plus read access to analytics, deployment logs, history, previews,
160
+ webhooks, and schedules; remove entries when an agent should have less access.
161
+
162
+ | Capability | Allows the agent to | Risk |
163
+ | ------------------------------------------- | ------------------------------------------------------------------------- | ------------ |
164
+ | `cms:read` | Read CMS content | Low |
165
+ | `cms:write` | Create, update, or delete CMS entries | Medium |
166
+ | `cms:schema:read` | Read CMS schemas | Low |
167
+ | `cms:schema:write` | Modify CMS schemas | High |
168
+ | `assets:read` | Read uploaded media | Low |
169
+ | `assets:write` | Upload, replace, or delete media | Medium |
170
+ | `i18n:read` / `i18n:write` | Read / modify translation catalogs | Low / Medium |
171
+ | `cms:*` / `assets:*` / `i18n:*` / `forms:*` | Every declarable capability in that namespace, including future additions | Mixed |
172
+ | `forms:read` / `forms:write` | Read / modify form schemas and submissions | Low / Medium |
173
+ | `webhooks:read` | Read webhook configs and deliveries | Low |
174
+ | `webhooks:write` | Create, modify, delete, or trigger webhooks | High |
175
+ | `schedules:read` | Read schedule configs and run history | Low |
176
+ | `schedules:write` | Create, change, or trigger scheduled runs | Critical |
177
+ | `fimo:logs:read` | Read project deployment logs | Low |
178
+ | `fimo:analytics:read` | Read analytics data | Low |
179
+ | `fimo:preview:read` | Read a current preview URL | Low |
180
+ | `fimo:history:read` | Read project restore points | Low |
181
+ | `fimo:deploy` | Trigger a production deploy | Critical |
182
+ | `net:fetch` | Make outbound HTTP requests | Medium |
183
+ | `agent:delegate` | Invoke declared sub-agents | Medium |
184
+ | `runtime:long_running` | Run beyond the default time limit | High |
185
+ | `runtime:auto_merge` | Auto-merge trivial proposed branches | Critical |
186
+
187
+ If a public Fimo capability is missing and the work is genuinely blocked, the agent can request it through `ask_user`.
188
+ Fimo grants only the selected subset to the next invocation in that run thread. Unknown capabilities, internal runtime
189
+ abilities, and capabilities the run already holds are refused before the question is stored. For durable access on
190
+ ordinary future runs, add the capability to `capabilities.yaml`, validate, and deploy the bundle.
191
+
192
+ Managed agents can list project agents and read their run history through baseline project access. This does not
193
+ require `fimo:agents:run`; that capability is only required to dispatch another agent.
194
+
195
+ Studio chat and project-bound Slack turns receive `fimo:logs:read`. The default autonomous-agent template now declares
196
+ it too; custom templates still need to declare it before using `fimo logs` to diagnose a failed preview.
97
197
 
98
198
  Example for a content editor that can read and update entries but cannot change schemas:
99
199
 
@@ -113,7 +213,7 @@ fimo agents logs <name> [--session <id>] [--project <id>] [-C <dir>]
113
213
 
114
214
  - **`run <name>`** — fire the agent's `manual` trigger on the server; prints a `sessionId` on success. Skips with `no-manual-trigger` when `config.yaml` declares none, or `trigger-not-wired` when the push-to-main sync recorded the trigger but refused to wire it (see the wiring note below). **Pre-flight drift check**: if `.fimo/agents/<name>/` (or the legacy root bundle) has uncommitted git changes, the command refuses — the server would dispatch the _deployed_ version, so deploy first. Pass `--skip-drift-check` to dispatch the deployed bundle anyway. Defaults `--branch` to `main`; legacy `--env` remains an alias.
115
215
  - **`runs <name>`** — list past run sessions for the agent in a compact table (id, started, duration, status, trigger, Branch, cost). Default `--limit 20`; `--branch` filters to one Branch. The response's legacy `env` field is still present for API compatibility.
116
- - **`report <name>`** — print a run's **report**: the agent's final message, captured when the run finishes (for a read-only agent like `seo-audit` this _is_ the audit; for a write agent it's a "what I changed" summary). With no `--session`, the most recent run for `<name>` is used (combine with `--branch` to scope); `--session <id>` targets a specific run. Output is raw markdown, so it stays readable in the terminal and pipes cleanly (e.g. `fimo agents report seo-audit | glow`). If the run hasn't finished, or produced no message, it says so (and shows the stop reason when there is one). This is the command to read what a run actually produced — see the `logs` note below.
216
+ - **`report <name>`** — print a run's **report**: its durable outcome summary (for a read-only agent like `seo-audit` this _is_ the audit; for a write agent it's a "what I changed" summary). A run that never finalised falls back to its last message. With no `--session`, the most recent run for `<name>` is used (combine with `--branch` to scope); `--session <id>` targets a specific run. Output is raw markdown, so it stays readable in the terminal and pipes cleanly (e.g. `fimo agents report seo-audit | glow`). If the run hasn't finished, or produced no message, it says so (and shows the stop reason when there is one). This is the command to read what a run actually produced — see the `logs` note below.
117
217
  - **`logs <name>`** — stream a run's log (defaults to the latest session; `--session <id>` targets one). **Note:** the log-streaming endpoint is still a server-side stub at time of writing — the command prints a placeholder rather than real log lines. To read a finished run's output today, use `report`.
118
218
 
119
219
  ## How triggers get wired
@@ -35,7 +35,7 @@ fimo --branch <name> <command> # peek at another Branch for one command (does n
35
35
  | `fimo diff [from] [to]` | `git diff` | Two-Branch diff across all surfaces. Defaults `from` = current Branch, `to` = `main`. `--surface <name>` limits to one; `--json`; `--no-color`. |
36
36
  | `fimo status` | `git status` | Multi-surface status for the current Branch vs its parent. See below. |
37
37
  | `fimo merge <from>` | `git merge` | Merge another Branch into the current one (multi-surface, atomic, interactive conflict resolver). See below. |
38
- | `fimo publish` | — | Tag `main@HEAD` as `release/<version>` and trigger the prod swap. See "Publishing" below. |
38
+ | `fimo publish` | — | Publish the already-synced `main` revision with a stable Fimo publication ID. See "Publishing" below. |
39
39
 
40
40
  All of these accept the global `--branch` override; legacy `--env` remains an alias. `diff`, `status`, `merge`, and `publish` additionally accept `-C, --cwd <dir>` to point at a project directory.
41
41
 
@@ -59,7 +59,7 @@ fimo preview url # canonical URL to open / screenshot the feat/s
59
59
  fimo status # see what changed vs main, surface by surface
60
60
  fimo checkout main # back to main
61
61
  fimo merge feat/seo # merge the Branch back into main (resolve conflicts)
62
- fimo publish --version 1.4.0 # tag a release + prod swap
62
+ fimo publish --label "Homepage launch" --notes "Initial production publish"
63
63
  fimo branch -d feat/seo # tear down the feature Branch
64
64
  ```
65
65
 
@@ -97,15 +97,18 @@ Syncs the current Branch's data plane from its parent (or `--from <ancestor>`).
97
97
 
98
98
  Two different "go live" mechanisms — don't confuse them:
99
99
 
100
- - **`fimo publish --version <ver> [--notes <md>]`** — the release path. Runs from `main` only, validates, tags `main@HEAD` as `release/<ver>`, and triggers the prod swap. `--skip-validate` is an operator override. This is the versioned, prod-facing publish.
100
+ - **`fimo publish [--label <text>] [--notes <md>]`** — publishes the already-synced `main` revision. Fimo assigns the immutable publication ID; the label and notes are optional annotations. `--skip-validate` is an operator override.
101
101
  - **`fimo deploy --publish`** — the project-publish path. Pushes the current `main` code and flips the project live in one shot. See `references/deploy.md`.
102
102
 
103
- Use `fimo publish` for versioned prod releases; use `fimo deploy --publish` for the simple "ship what's on main now" flow. Both only run from `main`.
103
+ Use `fimo publish` when `main` is already synced; use `fimo deploy --publish` when the local revision still needs to be pushed first. Both only run from `main`.
104
104
 
105
105
  ## Anti-patterns
106
106
 
107
107
  - **Using `git checkout -b` instead of `fimo checkout -b`** — raw git creates the branch but **not** the Branch's DB / sandbox / preview. Always use `fimo` for Branch operations so resources are provisioned atomically. (Running `fimo branch <name>` after the fact provisions them.) The running app itself follows the git branch either way.
108
- - **Hardcoding the tenant API URL** — the app derives it from the git branch and `.fimo/project.json`. Set `VITE_API_URL` / `NEXT_PUBLIC_FIMO_API_URL` yourself only as a deliberate override (e.g. a local API); it then wins over derivation on every branch.
108
+ - **Hardcoding the tenant API URL** — the framework runtime derives it from the
109
+ git branch and `.fimo/project.json`. Use an explicit host variable only as a
110
+ deliberate override, such as a local API; it then wins over derivation on
111
+ every branch.
109
112
  - **Trying to push to or delete `prod` / `release/*`** — these are read-only/protected. Publish to update prod; never push.
110
113
  - **`fimo merge` straight onto `main` as a habit** — it's gated for a reason. Merge on a branch, then publish.
111
114
  - **Confusing `fimo switch` (Branch) with `fimo orgs switch` (org).**
@@ -56,6 +56,15 @@ Use the publication ID returned by the failed command: run `fimo publish inspect
56
56
 
57
57
  If the sandbox fails to install dependencies or start the app, run `fimo logs --json` before retrying. Read the newest install and dev-server events first; when the response is truncated, use its `previousCursor` as `fimo logs --before <cursor> --json` to fetch the preceding page. Do not recreate or replace the sandbox before collecting logs, because that can discard the failure evidence.
58
58
 
59
+ When Preview reports blocked dependency build scripts, treat that as a project security-policy repair, not a transient sandbox failure. Review every named package before approving it, then use the package manager's narrow project-owned mechanism:
60
+
61
+ - **pnpm:** add each approved package to `allowBuilds` in `pnpm-workspace.yaml`.
62
+ - **Yarn:** set `dependenciesMeta.<package>.built` in `package.json` for each approved package.
63
+ - **Bun:** add approved packages to `trustedDependencies` in `package.json`, or run the exact `bun pm trust <packages>` command Preview reports.
64
+ - **npm:** npm has no equivalent per-package approval error. Diagnose the failing lifecycle script itself; do not turn a generic npm script failure into a trust-policy change.
65
+
66
+ Run the same plain install locally and commit the policy plus lockfile before retrying Preview. Never bypass the error with `dangerouslyAllowAllBuilds`, `enableScripts`, or another global allow-all switch: Preview and publishing intentionally consume the committed project policy.
67
+
59
68
  ## Framework hosting
60
69
 
61
70
  Fimo preview resolves `runtime.commands` override → package script → detected
@@ -113,9 +122,9 @@ There's nothing special about this — it's the same `fimo deploy` you'd run lat
113
122
  Two different "go live" mechanisms — pick deliberately:
114
123
 
115
124
  - **`fimo deploy --publish`** — push what's on `main` now and flip the project live in one shot. The simple "ship it" path. Runs from `main` only.
116
- - **`fimo publish --version <ver> [--notes <md>]`** — the **versioned release** path. From `main`, it validates, tags `main@HEAD` as `release/<ver>`, and triggers the prod swap. Use this when the user wants a real, tagged production release (e.g. "cut v1.4.0", "publish a new version"). See `references/branches.md`.
125
+ - **`fimo publish [--label <text>] [--notes <md>]`** — publish the already-synced `main` revision without pushing. Fimo assigns the immutable publication ID; a label and notes are optional human annotations. See `references/branches.md`.
117
126
 
118
- When unsure, `fimo deploy --publish` is the lighter-weight default; reach for `fimo publish` only when versioning/release semantics are wanted.
127
+ When unsure, use `fimo deploy --publish` so the local revision is pushed before it goes live. Use `fimo publish` when `main` is already synced.
119
128
 
120
129
  ## Markdown for AI agents
121
130
 
@@ -56,6 +56,18 @@ When a user says "I want to change my website's URL," ask which case fits:
56
56
 
57
57
  If they aren't sure, run `fimo domains suggest-default` first — it's free, takes one step, and a good fallback if they don't want to commit to a domain purchase.
58
58
 
59
+ ## Offer a cleaner default URL before first publish
60
+
61
+ After the automatic first-preview deploy on a newly created project, offer a cleaner free `*.fimo.site` URL before the first public publish when there is no custom domain and the current default slug still looks generated or was never explicitly chosen. Choosing it now lets the first public launch use the clean URL. Skip the offer if the user already chose the default slug, attached a custom domain, or declined.
62
+
63
+ The default URL is free and needs no DNS. A custom domain is the separate Premium workflow above. A default slug can be reserved before publication, but it returns "Project Not Found" until the site is published. Renaming changes the address that will become public, so never silently claim a suggestion:
64
+
65
+ 1. Run `fimo domains suggest-default --base "<brand>" --json` to get candidates.
66
+ 2. Show the candidates and ask the user to choose one explicitly.
67
+ 3. After confirmation, run `fimo domains rename-default <slug>` or `fimo domains suggest-default --pick <slug>`.
68
+
69
+ Choosing the slug does not publish the site. The first successful `fimo deploy --publish` makes the renamed URL resolve.
70
+
59
71
  ## Pricing & how money moves
60
72
 
61
73
  The CLI never charges directly. Two distinct money paths:
@@ -54,7 +54,7 @@ Use this when the user asks "who filled out the contact form?", "how many signup
54
54
 
55
55
  ## When to run sync manually
56
56
 
57
- The `fimo/vite` plugin regenerates legacy Vite `src/forms/*.ts` after form JSON changes during development. Framework-aware generation runs during validation. Before a production build, regenerate explicitly with:
57
+ The `fimo-vite` plugin regenerates legacy Vite `src/forms/*.ts` after form JSON changes during development. Framework-aware generation runs during validation. Before a production build, regenerate explicitly with:
58
58
 
59
59
  ```bash
60
60
  fimo validate # runs all phases: codegen, lint, route validation, label checks
@@ -15,6 +15,8 @@ fimo init [dir] [options]
15
15
  3. **Installs dependencies** — prompts for the package manager, or honor `--package-manager <pm>` / `--no-install`.
16
16
  4. **Optionally sets up Fimo skills** — confirm prompt, or `--skills` / `--no-skills`.
17
17
 
18
+ Generated pnpm projects pin `pnpm@10.26.0` and carry project-owned `pnpm-workspace.yaml#strictDepBuilds: true` and `#allowBuilds` settings. Generated Bun projects trust the same required packages through `package.json#trustedDependencies`. Keep the selected package manager's policy committed. When adding a dependency with an install script, review it before extending that policy; never replace it with a blanket allow-all install.
19
+
18
20
  | Flag | Required | Purpose |
19
21
  | ---------------------------- | ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
20
22
  | `[dir]` positional | yes in non-TTY for create-new | Target directory (e.g. `my-site`) |
@@ -102,7 +104,6 @@ Pass `--project-id <id>` to set up a known Fimo project. If the project has no c
102
104
  - `.fimo/project.json` — links this directory to the remote project (read-only after creation)
103
105
  - `.fimo/config.json` — project, optional Studio Pages route metadata, locale, SEO, and agent policy
104
106
  - `.fimo/agents/` — versioned agent bundles
105
- - `.env` — framework-specific tenant content API URLs for local development
106
107
  - `AGENTS.md` + `CLAUDE.md` — project rules (from the template) read by AGENTS.md-compatible tools and Claude Code. Both point the agent at `fimo skills get` to load the real skills on demand.
107
108
  - A git repository with `fimo` as the remote, and — after dependencies install — an initial commit (including the lockfile) plus an initial push
108
109
 
@@ -118,7 +119,11 @@ Nothing is written into per-agent skill dirs: the rich skills are fetched on dem
118
119
 
119
120
  Codex, OpenCode, Aider, and similar AGENTS.md-native tools work directly off AGENTS.md.
120
121
 
121
- `.env` is only the bootstrap app env so local `pnpm dev` works immediately. Fimo writes the tenant API aliases used by its supported frameworks; users should not discover or set those URLs manually. User-managed public variables are stored with `fimo vars add` and synced into a managed `.env.local` block; hidden values use `fimo secrets add`. See `references/project-vars-and-secrets.md`.
122
+ Supported framework runtimes derive the Fimo connection from
123
+ `.fimo/project.json` and the active git branch, so local development needs no
124
+ Fimo env file. User-managed public variables are stored with `fimo vars add`
125
+ and synced into a managed `.env.local` block; hidden values use
126
+ `fimo secrets add`. See `references/project-vars-and-secrets.md`.
122
127
 
123
128
  ## Right after scaffolding
124
129
 
@@ -163,6 +168,8 @@ fimo deploy -m "chore: first preview" --json
163
168
 
164
169
  This first deploy creates a preview only — never add `--publish`, and treat every later deploy as offer-then-confirm. The rule does not apply when `init` cloned a project with existing code or when the work is a migration; those paths keep their normal deployment approval rules.
165
170
 
171
+ After the preview succeeds, follow `references/domains.md` § Offer a cleaner default URL before first publish. Reserve a slug only after the user chooses it; the URL will not resolve until the site is published.
172
+
166
173
  ## Adding another AI tool to an existing project later
167
174
 
168
175
  If a teammate joins on a different AI tool (e.g. Cursor) after the project was scaffolded for claude-code only:
@@ -104,7 +104,7 @@ These canonical entries are also the optional metadata used by Studio Pages. See
104
104
 
105
105
  For every framework, the application owns its URL scheme, resolves the locale, and passes it into Fimo. Studio stores the locale the app reports for the current location — including when only the locale changed — and reads content in it. Route metadata is optional unless the project wants Fimo Studio route selection/navigation.
106
106
 
107
- Astro and Next express the same optional-locale semantic with paired native filesystem route trees: an unprefixed default-locale tree and a prefixed non-default tree. Neither framework supports an optional single-segment filesystem folder.
107
+ Neither Astro nor Next supports an optional single-segment filesystem folder. Astro's starter expresses an optional-locale semantic with paired native filesystem route trees. The Next starter is default-only; a Next application adds a `[locale]` tree or another application-owned strategy only when the product requires locale URLs.
108
108
 
109
109
  ## Migrate An Existing Locale System
110
110
 
@@ -60,7 +60,7 @@ The Project MCP catalog covers:
60
60
  - **Identity and navigation** — current user, projects, and Branches.
61
61
  - **Content** — schemas, collection entries, search, create/update/delete, bounded bulk operations, and Singles.
62
62
  - **Labels** — list, read, set, batch-set, and delete localized labels.
63
- - **Media** — list and inspect assets, generate images or videos, create folders, move, and delete assets. Binary
63
+ - **Media** — list and inspect assets, read canonical pages or ask one targeted question with `assets_read`, generate images or videos, create folders, move, and delete assets. Binary
64
64
  upload remains `fimo assets upload`.
65
65
  - **Forms** — create, read, update, and delete forms; inspect submissions and statistics.
66
66
  - **Files** — read, glob, grep, write, edit, and delete project files within the scoped Branch. Sensitive files
@@ -159,11 +159,28 @@ Do not generate when:
159
159
 
160
160
  Upload real files with `fimo assets upload`. Browse reusable media with `fimo assets list` before spending credits.
161
161
 
162
+ ## Inspect an existing asset
163
+
164
+ Open the original when visual or binary inspection is required. Read canonical text when exact portable understanding
165
+ is required:
166
+
167
+ ```bash
168
+ fimo assets open <asset-id> --download
169
+ fimo assets read <asset-id>
170
+ fimo assets read <asset-id> --cursor <next-cursor>
171
+ fimo assets read <asset-id> --query "<one targeted question>"
172
+ ```
173
+
174
+ For a complete exact read, keep following `nextCursor` until `complete` is `true`. Never combine `--cursor` and
175
+ `--query`. Complete readable interpretation is lazy and cached, separately from compact Media Library alt/caption
176
+ metadata. A 3D read includes four reusable rendered views. Download ZIP archives and inspect them in the sandbox; do
177
+ not expect server-side extraction.
178
+
162
179
  ## Verification
163
180
 
164
181
  After generation:
165
182
 
166
183
  1. Confirm the command exited successfully and returned an asset ID.
167
- 2. Open or download the asset with `fimo assets open <id>`.
184
+ 2. Open the original with `fimo assets open <id>`, or read its canonical understanding with `fimo assets read <id>`.
168
185
  3. Verify it matches the request before inserting it into content or UI.
169
186
  4. Use the whole media value with Fimo's `<Image>` or `<Video>` components rather than raw HTML elements.
@@ -47,7 +47,9 @@ variables.
47
47
 
48
48
  ## Local Env Files
49
49
 
50
- `fimo init` and `fimo clone` write `.env` with the framework-specific tenant content API URLs needed for local development. These are Fimo-managed connection values, not project variables; users should not discover or set them manually.
50
+ `fimo init`, `fimo clone`, and `fimo link` do not write the Fimo connection to
51
+ an env file. Supported framework runtimes derive it from `.fimo/project.json`
52
+ and the active git branch; hosted preview and production inject it directly.
51
53
 
52
54
  `fimo vars add`, `fimo vars update`, and `fimo vars pull` write public project variables to a managed block in `.env.local`.
53
55
 
@@ -18,7 +18,7 @@ fimo projects rename <name> [projectId] [-C <dir>] # set seo.siteName in the l
18
18
  - **`create`** — identical to `fimo init` (create-new path); see `references/init.md`.
19
19
  - **`clone`** — clone a remote Fimo project's git repo to your machine and write the local `.fimo/project.json` and agent files. Use `fimo clone <projectId>` when scripting or when the ID is known. In an interactive terminal, bare `fimo clone` opens a project picker for the active org; JSON mode and non-TTY shells require an explicit project ID and fail fast instead of prompting. By default it clones `main`; pass `--branch <name>` to clone a specific Branch. The legacy `--env <name>` spelling remains a compatibility alias. The target directory defaults to the project display name/name, or pass `[dir]` explicitly.
20
20
  - **`delete`** — destructive; prompts unless `-y`. Removes the remote project.
21
- - **`publish` / `unpublish`** — toggle the project's public visibility. `publish` flips the current `main` state live (the same "go live" as `fimo deploy --publish`, minus the git push). This is **not** the versioned release path — for that, see `fimo publish` in `references/branches.md`.
21
+ - **`publish` / `unpublish`** — toggle the project's public visibility. `publish` flips the current `main` state live (the same "go live" as `fimo deploy --publish`, minus the git push).
22
22
  - **`rename`** — edits only the linked local project immediately. It requires a project marker in the cwd, and if you pass a `[projectId]` that doesn't match the linked project it errors and exits 1 (so you can't rename a different project). It writes `seo.siteName` into the current or legacy project config; commit and run `fimo deploy` to reconcile the remote `displayName` and deploy the new site name.
23
23
 
24
24
  ## Top-level clone shortcut
@@ -41,12 +41,12 @@ fimo rename "<Site Name>" # local edit: set seo.siteName in the project c
41
41
 
42
42
  `fimo rename` sets the **site name** (`seo.siteName`) in the local project config — it is a local edit, not an immediate remote update, so it requires a follow-up commit + `fimo deploy` to take effect. Deploy reconciles the project's remote `displayName` with the committed site name while pushing the config. See `references/init.md` and `references/deploy.md`.
43
43
 
44
- ## Three "publish" verbs — don't confuse them
44
+ ## Publish commands
45
45
 
46
- | Command | Effect |
47
- | ---------------------------- | -------------------------------------------------------------- |
48
- | `fimo deploy --publish` | Push current `main` + flip the project live in one shot. |
49
- | `fimo projects publish` | Flip the project live (no git push). |
50
- | `fimo publish --version <v>` | Tag `release/<v>` + trigger the prod swap (versioned release). |
46
+ | Command | Effect |
47
+ | ----------------------- | ----------------------------------------------------------------------- |
48
+ | `fimo deploy --publish` | Push current `main` + flip the project live in one shot. |
49
+ | `fimo projects publish` | Flip the project live (no git push). |
50
+ | `fimo publish` | Flip the already-synced `main` revision live; optional label and notes. |
51
51
 
52
52
  See `references/deploy.md` and `references/branches.md` for the full picture.
@@ -1,4 +1,4 @@
1
- import { FimoLink } from 'fimo/react-router';
1
+ import { FimoLink } from 'fimo-react-router';
2
2
 
3
3
  export function Navigation() {
4
4
  return (
@@ -24,7 +24,7 @@ Generated content reads wrap this stored value in `FimoMedia`, which exposes `ur
24
24
 
25
25
  ## Rendering in application code
26
26
 
27
- Import the primitives from the active framework adapter: `fimo/next` on the Next server, `fimo/next/client` in Next Client Components, `fimo/ui` in React Router/Vite, or `fimo/astro/components` in Astro pages.
27
+ Import the primitives from the active framework adapter: `fimo-next` on the Next server, `fimo-next/client` in Next Client Components, `fimo-react` in React Router/Vite, or `fimo/astro/components` in Astro pages.
28
28
 
29
29
  | Asset source | Component | Pass via |
30
30
  | --------------------------------------------------- | --------------------- | ------------------------- |
@@ -32,7 +32,7 @@ Import the primitives from the active framework adapter: `fimo/next` on the Next
32
32
  | Hard-coded URL or generated asset referenced inline | `<StaticImage>` | `src="https://..."` |
33
33
 
34
34
  ```tsx
35
- import { Image, StaticImage, Video } from 'fimo/next';
35
+ import { Image, StaticImage, Video } from 'fimo-next';
36
36
 
37
37
  // from a schema entry:
38
38
  <Image value={post.coverImage} width={1200} height={630} fit="cover" />
@@ -13,7 +13,7 @@ Load `references/frameworks/next.md` and the matching router reference first. In
13
13
 
14
14
  ```ts
15
15
  import type { NextConfig } from 'next';
16
- import { withFimo } from 'fimo/next/config';
16
+ import { withFimo } from 'fimo-next/config';
17
17
 
18
18
  const nextConfig: NextConfig = {
19
19
  cacheComponents: true,
@@ -23,6 +23,29 @@ Write one schema per `src/schemas/<Uid>.json`. The PascalCase filename must matc
23
23
 
24
24
  Required root keys: `uid`, `name`, and `fields`.
25
25
 
26
+ ## Group fields in Studio
27
+
28
+ Use optional top-level `groups` when an entry has meaningful editing areas, such as Overview, Tickets, SEO, or Scheduling. They work best for longer forms where editors regularly work on one area at a time. Usually skip groups for short forms, one-field groups, or vague buckets such as General and Other. Prefer two to five groups organized around editor tasks. This is guidance, not a schema limit.
29
+
30
+ Assign each top-level field with `group`; one field may appear in more than one group. This changes only the Studio layout, not stored content, generated types, validation, permissions, or what agents can edit.
31
+
32
+ ```json
33
+ {
34
+ "uid": "Event",
35
+ "name": "Events",
36
+ "groups": [
37
+ { "id": "overview", "label": "Overview", "default": true },
38
+ { "id": "tickets", "label": "Tickets" }
39
+ ],
40
+ "fields": {
41
+ "title": { "type": "string", "group": "overview" },
42
+ "price": { "type": "number", "group": ["overview", "tickets"] }
43
+ }
44
+ }
45
+ ```
46
+
47
+ Group IDs must be unique, at most one group may be the default, and memberships must reference a declared group. Only top-level fields can be grouped; fields inside blocks cannot declare `group`.
48
+
26
49
  Use `"isSingleton": true` whenever the site has exactly one logical document: a homepage, site settings, an About page, or one campaign landing page. Do not turn it into a one-entry collection just to seed content; keep the Single and load `fimo-cli/references/content.md` for the `fimo singles update` workflow.
27
50
 
28
51
  ```json
@@ -106,7 +106,7 @@ export function ContactForm() {
106
106
 
107
107
  ## Framework bindings
108
108
 
109
- - **Vite/React:** `submitX(data)` keeps using the existing `fimo/ui` runtime and preserves the current generated API.
109
+ - **Vite/React:** `submitX(data)` keeps using the existing `fimo-react` runtime and preserves the current generated API.
110
110
  - **Next.js:** server modules import `@/forms/name`; client components import `@/forms/name.client`. Both expose the same `submitX(data)` shape.
111
111
  - **Astro:** import the generated server module and call `submitX(data)` in an Astro action or endpoint. Astro keeps the HTML form and redirect.
112
112
  - **SvelteKit:** use `createFimoFormClient({ event })` in a server action and pass it as the second argument: `submitX(data, client)`.