fimo 0.21.0-staging.2 → 0.21.0-staging.4

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 (59) hide show
  1. package/assets/agent-templates/_default/GOAL.md +10 -0
  2. package/assets/agent-templates/_default/capabilities.yaml +10 -0
  3. package/assets/content-templates/shared/types.eta +1 -1
  4. package/assets/skills/fimo-cli/SKILL.md +1 -1
  5. package/assets/skills/fimo-cli/references/agents.md +85 -32
  6. package/assets/skills/fimo-cli/references/deploy.md +9 -0
  7. package/assets/skills/fimo-cli/references/domains.md +4 -4
  8. package/assets/skills/fimo-cli/references/init.md +4 -0
  9. package/assets/skills/fimo-cli/references/locales.md +1 -1
  10. package/assets/skills/fimo-cli/references/mcp.md +1 -1
  11. package/assets/skills/fimo-cli/references/media.md +18 -1
  12. package/assets/skills/fimo-code/references/content/schema.md +23 -0
  13. package/assets/skills/fimo-code/references/frameworks/next/locales.md +4 -4
  14. package/assets/skills/fimo-code/references/frameworks/react-router.md +2 -1
  15. package/assets/skills/fimo-code/references/frameworks/sveltekit.md +3 -5
  16. package/assets/skills/fimo-code/references/locales.md +2 -2
  17. package/assets/skills/fimo-studio/references/billing-and-credits.md +6 -4
  18. package/assets/skills/fimo-studio/references/cms.md +2 -0
  19. package/assets/skills/fimo-studio/references/preview-and-responsive.md +1 -0
  20. package/dist/cli/bundle.json +1 -1
  21. package/dist/cli/index.js +102 -101
  22. package/dist/runtime/app/FimoProviders.js +8 -1
  23. package/dist/runtime/app/FimoScripts.d.ts +0 -1
  24. package/dist/runtime/app/FimoScripts.js +1 -4
  25. package/dist/runtime/next/client.d.ts +2 -2
  26. package/dist/runtime/next/client.js +1 -1
  27. package/dist/runtime/next/provider.d.ts +0 -5
  28. package/dist/runtime/next/provider.js +21 -6
  29. package/dist/runtime/preview/script.d.ts +3 -0
  30. package/dist/runtime/preview/script.js +14 -0
  31. package/dist/runtime/react/primitives/contracts.d.ts +7 -1
  32. package/dist/runtime/sveltekit/preview.d.ts +1 -2
  33. package/dist/runtime/sveltekit/preview.js +1 -14
  34. package/dist/scripts/sync-schemas.js +84 -0
  35. package/dist/scripts/validate-schemas.js +63 -2
  36. package/package.json +6 -1
  37. package/templates/astro/AGENTS.md +1 -1
  38. package/templates/astro/package.json +2 -1
  39. package/templates/astro/pnpm-workspace.yaml +6 -2
  40. package/templates/nextjs/.fimo/config.json +1 -2
  41. package/templates/nextjs/AGENTS.md +5 -15
  42. package/templates/nextjs/next.config.ts +3 -1
  43. package/templates/nextjs/package.json +2 -1
  44. package/templates/nextjs/pnpm-workspace.yaml +6 -2
  45. package/templates/nextjs/src/app/layout.tsx +16 -0
  46. package/templates/nextjs/src/locales.ts +3 -6
  47. package/templates/react-router/AGENTS.md +1 -1
  48. package/templates/react-router/package.json +3 -2
  49. package/templates/react-router/pnpm-workspace.yaml +6 -6
  50. package/templates/react-router/src/vite-env.d.ts +0 -1
  51. package/templates/sveltekit/AGENTS.md +1 -1
  52. package/templates/sveltekit/package.json +2 -1
  53. package/templates/sveltekit/pnpm-workspace.yaml +6 -2
  54. package/templates/nextjs/src/app/(default)/layout.tsx +0 -10
  55. package/templates/nextjs/src/app/[locale]/layout.tsx +0 -22
  56. package/templates/nextjs/src/app/[locale]/page.tsx +0 -1
  57. package/templates/nextjs/src/components/Document.tsx +0 -26
  58. package/templates/nextjs/src/components/FimoPreviewBridge.tsx +0 -13
  59. /package/templates/nextjs/src/app/{(default)/page.tsx → page.tsx} +0 -0
@@ -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,7 @@ 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
- - **After the first successful `fimo deploy --publish`** (not the automatic first preview) → 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. 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 after first publish.
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
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).
133
133
 
134
134
  ## Anti-Patterns
@@ -62,9 +62,11 @@ Fimo creates one task Branch and environment for a cloud run, tells the agent th
62
62
  The agent works only in that checkout. Extra branches, worktrees, and `git push` are unsupported and cannot be cleaned up
63
63
  or handed off correctly.
64
64
 
65
- - **Merge** when the work is ready for the target Branch. Fimo applies it or keeps any conflict for review.
66
- - **Retain** when a person should review the work, the run stops or fails, the agent needs an answer, or recovery may be
67
- necessary. Fimo keeps the task Branch for a follow-up run.
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.
68
70
  - **Discard** when none of the run's work should be applied, including when it made no useful changes or deliberately
69
71
  abandoned an approach. This permanently deletes the task Branch and every change in it without review.
70
72
 
@@ -74,6 +76,49 @@ that Branch for inspection or screenshots; it does not finish or hand off the ru
74
76
  The run report is a concise outcome summary: what changed, what was verified, and what is still blocked. It is not a
75
77
  chronological account, and it should not use decorative emoji.
76
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
+
77
122
  When a run cannot continue correctly without a decision from a project member, it may call `ask_user` instead. The
78
123
  question goes to the Fimo Inbox, the current invocation ends, and Fimo keeps the same task Branch and environment until
79
124
  an authorized member answers. The answer starts one ordinary continuation in the same run thread; the original model
@@ -106,41 +151,49 @@ changes and finishes with `discard` and a brief report of what is waiting.
106
151
 
107
152
  Capabilities describe the opt-in Fimo and network actions an agent may take. Managed agents always receive project
108
153
  filesystem access, a shell, and the ability to commit their task-environment changes; Fimo owns branch creation and
109
- publication. If `capabilities.yaml` is absent or empty, the agent has those project-worker tools but no Fimo API
110
- permissions or web-fetch tool. Once you add a capabilities file, list every Fimo or network permission the agent needs.
111
- There is no all-capabilities wildcard; keeping the list explicit makes each agent's power reviewable.
112
-
113
- | Capability | Allows the agent to | Risk |
114
- | ---------------------------- | ------------------------------------------- | ------------ |
115
- | `cms:read` | Read CMS content | Low |
116
- | `cms:write` | Create, update, or delete CMS entries | Medium |
117
- | `cms:schema:read` | Read CMS schemas | Low |
118
- | `cms:schema:write` | Modify CMS schemas | High |
119
- | `assets:read` | Read uploaded media | Low |
120
- | `assets:write` | Upload, replace, or delete media | Medium |
121
- | `i18n:read` / `i18n:write` | Read / modify translation catalogs | Low / Medium |
122
- | `forms:read` / `forms:write` | Read / modify form schemas and submissions | Low / Medium |
123
- | `webhooks:read` | Read webhook configs and deliveries | Low |
124
- | `webhooks:write` | Create, modify, delete, or trigger webhooks | High |
125
- | `schedules:read` | Read schedule configs and run history | Low |
126
- | `schedules:write` | Create, change, or trigger scheduled runs | Critical |
127
- | `fimo:logs:read` | Read project deployment logs | Low |
128
- | `fimo:analytics:read` | Read analytics data | Low |
129
- | `fimo:preview:read` | Read a current preview URL | Low |
130
- | `fimo:history:read` | Read project restore points | Low |
131
- | `fimo:deploy` | Trigger a production deploy | Critical |
132
- | `net:fetch` | Make outbound HTTP requests | Medium |
133
- | `agent:delegate` | Invoke declared sub-agents | Medium |
134
- | `runtime:long_running` | Run beyond the default time limit | High |
135
- | `runtime:auto_merge` | Auto-merge trivial proposed branches | Critical |
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 |
136
186
 
137
187
  If a public Fimo capability is missing and the work is genuinely blocked, the agent can request it through `ask_user`.
138
188
  Fimo grants only the selected subset to the next invocation in that run thread. Unknown capabilities, internal runtime
139
189
  abilities, and capabilities the run already holds are refused before the question is stored. For durable access on
140
190
  ordinary future runs, add the capability to `capabilities.yaml`, validate, and deploy the bundle.
141
191
 
142
- Studio chat and project-bound Slack turns receive `fimo:logs:read`. Autonomous agents receive it only when their
143
- `capabilities.yaml` declares it; use `fimo logs` with the deploy guidance when diagnosing a failed preview.
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.
144
197
 
145
198
  Example for a content editor that can read and update entries but cannot change schemas:
146
199
 
@@ -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
@@ -56,17 +56,17 @@ 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 after first publish
59
+ ## Offer a cleaner default URL before first publish
60
60
 
61
- After the project's first successful `fimo deploy --publish`, offer a cleaner free `*.fimo.site` URL when there is no custom domain and the current default slug still looks generated or was never explicitly chosen. This is not part of the automatic first preview. Skip the offer if the user already chose the default slug, attached a custom domain, or declined.
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
62
 
63
- The default URL is free and needs no DNS. A custom domain is the separate Premium workflow above. Renaming the default slug changes a public URL, so never silently claim a suggestion:
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
64
 
65
65
  1. Run `fimo domains suggest-default --base "<brand>" --json` to get candidates.
66
66
  2. Show the candidates and ask the user to choose one explicitly.
67
67
  3. After confirmation, run `fimo domains rename-default <slug>` or `fimo domains suggest-default --pick <slug>`.
68
68
 
69
- The renamed URL resolves after a successful publish.
69
+ Choosing the slug does not publish the site. The first successful `fimo deploy --publish` makes the renamed URL resolve.
70
70
 
71
71
  ## Pricing & how money moves
72
72
 
@@ -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`) |
@@ -163,6 +165,8 @@ fimo deploy -m "chore: first preview" --json
163
165
 
164
166
  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
167
 
168
+ 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.
169
+
166
170
  ## Adding another AI tool to an existing project later
167
171
 
168
172
  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.
@@ -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
@@ -35,13 +35,13 @@ When labels are not needed at that boundary, use `<FimoProvider locale={locale}>
35
35
 
36
36
  ## New-project boundary
37
37
 
38
- Choose the primary locale from the user's request before building pages. Put the first explicitly requested locale in `.fimo/config.json#i18n.defaultLocale` and keep all requested locales in `i18n.locales`. That edit is the whole locale setup: `src/locales.ts` reads the file, so the default locale passed to `FimoProvider`, the `<html lang>` of each tree, and the set of prefixed URLs follow it. If the user gives no locale signal, keep `en` and state that choice. Never add `NEXT_PUBLIC_FIMO_DEFAULT_LOCALE` or `FIMO_DEFAULT_LOCALE`; the runtime ignores them by design.
38
+ Choose the primary locale from the user's request before building pages. Put the first explicitly requested locale in `.fimo/config.json#i18n.defaultLocale` and keep all requested locales in `i18n.locales`. That is content and provider configuration: `src/locales.ts` reads the file, so the default locale passed to `FimoProvider` and the `<html lang>` follow it. It does not create locale URLs. If the user gives no locale signal, keep `en` and state that choice. Never add `NEXT_PUBLIC_FIMO_DEFAULT_LOCALE` or `FIMO_DEFAULT_LOCALE`; the runtime ignores them by design.
39
39
 
40
- The starter keeps default routes in an unprefixed `app/(default)` route group and a native `app/[locale]` tree for the other locales. Only a root layout may render `<html>`, so each tree owns its root layout and renders the shared `src/components/Document.tsx` with its locale: the unprefixed tree with `defaultLocale`, the prefixed tree with `params.locale`. The prefixed layout 404s a locale that is not in `prefixedLocales`, which is why the default locale has exactly one URL. For `/:locale/pricing`, `params.locale.optional: true` means omit the configured default locale: with `i18n.defaultLocale: "en"`, `/pricing` is English and `/fr/pricing` is French. With `optional: false`, both `/en/pricing` and `/fr/pricing` are prefixed. The default locale value chooses the fallback locale; `optional` independently controls URL prefixes. A route without `:locale` remains application-owned.
40
+ The starter is default-only: one ordinary root layout renders `<html lang={defaultLocale}>` and `FimoProvider`, `/` is the homepage, and unknown paths get Next's native 404. Implement a locale routing strategy only when the product asks for one — prefixed `[locale]` segments, middleware, cookies, domains, or an i18n library are all Next decisions — then resolve the locale in that strategy and pass it into Fimo server reads and `FimoProvider`. Do not install a top-level `[locale]` route or an optional catch-all speculatively: it captures `/favicon.ico` and every unknown top-level path, and Fimo never requires it.
41
41
 
42
- Next.js has no optional single-segment route folder, so mirror localized routes in both existing groups as the site grows. Astro uses the same paired native filesystem-tree shape for this semantic. Do not replace the trees with middleware, rewrites, an optional catch-all that captures the application route tree, or a Fimo route helper. The config route catalog describes the URL shapes for Studio; Next's `app` directory remains authoritative.
42
+ When the app implements a localized URL shape, describe it in `.fimo/config.json#routes` for Studio. For `/:locale/pricing`, `params.locale.optional: true` means omit the configured default locale: with `i18n.defaultLocale: "en"`, `/pricing` is English and `/fr/pricing` is French. With `optional: false`, both `/en/pricing` and `/fr/pricing` are prefixed. The default locale value chooses the fallback locale; `optional` independently controls URL prefixes. A route without `:locale` remains application-owned. The config route catalog describes URL shapes for Studio; Next's `app` directory remains authoritative.
43
43
 
44
- Keep the starter's client-only `src/components/FimoPreviewBridge.tsx` inside `Document`, so both trees mount it. It reads Next's native pathname/router, reports the settled locale to Studio, and lets Studio navigate through Next; do not move Next imports into Fimo's shared runtime.
44
+ `FimoProvider` owns the optional Studio preview runtime, including Next navigation and script loading. Application code only passes its resolved locale to the provider. Do not add a preview bridge component, read Fimo preview environment variables, or inject Fimo scripts.
45
45
 
46
46
  With `next-i18next`, keep its routing and translation provider for the strings it owns. Pass the same resolved locale to Fimo; do not replace the library or duplicate its route structure.
47
47
 
@@ -133,6 +133,7 @@ For new projects, apply `references/locales.md`, keep the starter's `:locale?` r
133
133
  ## Boundaries
134
134
 
135
135
  - Route modules and `meta` exports own routing and SEO.
136
- - `FimoScripts` owns preview-script loading; do not add the overlay script manually.
136
+ - `FimoProviders` owns the optional Studio preview runtime. Do not read Fimo preview environment variables or inject its script in application code.
137
+ - `FimoScripts` owns document-only JSON-LD and the development error overlay.
137
138
  - Use `fimo deploy` only when the developer requests a hosted preview or publication.
138
139
  - Load `references/ui.md` for rendering and `references/locales.md` for locale ownership.
@@ -127,11 +127,9 @@ export const actions = {
127
127
 
128
128
  ## Live preview
129
129
 
130
- `FimoProvider` owns the Studio browser bridge. On mount it reads
131
- `PUBLIC_FIMO_PREVIEW_SCRIPT_URL` from SvelteKit's dynamic public environment,
132
- loads that script once, delegates navigation to SvelteKit's `goto`, and
133
- refreshes data with `invalidateAll()`. Without that environment value it does
134
- nothing. Do not add a second preview component.
130
+ `FimoProvider` owns the optional Studio preview runtime, including script
131
+ loading, SvelteKit navigation, and content refresh. Do not add a second preview
132
+ component, read Fimo preview environment variables, or inject Fimo scripts.
135
133
 
136
134
  ## Boundaries
137
135
 
@@ -13,7 +13,7 @@ The application owns locale resolution and routing. Fimo consumes the resolved l
13
13
  }
14
14
  ```
15
15
 
16
- For new projects, derive the primary locale from the request; when several are explicit, the first one named is the default. Update `i18n.defaultLocale`, `i18n.locales`, the framework-native route boundary and matcher, and the document language default. If the user gives no locale signal, retain the starter default and state that choice.
16
+ For new projects, derive the primary locale from the request; when several are explicit, the first one named is the default. Update `i18n.defaultLocale`, `i18n.locales`, the document language default, and any framework-native locale route boundary or matcher the application implements. If the user gives no locale signal, retain the starter default and state that choice.
17
17
 
18
18
  Keep one locale unless the product asks for multilingual output. Keep it locale-ready without forcing `/en`, a language switcher, global path-prefix routing, or localized schemas. Locale tags should be structurally valid, such as `en`, `pt-BR`, or `zh-Hans`.
19
19
 
@@ -45,4 +45,4 @@ For an already linked project, enable each locale in Fimo before writing non-def
45
45
 
46
46
  Do not replace an existing locale system merely to add Fimo. Do not duplicate localized routes in the Studio catalog. Every framework resolves its active locale and passes it to Fimo through that framework's provider or server-read seam.
47
47
 
48
- Astro and Next implement an optional locale boundary with paired native filesystem route trees: one unprefixed tree for the default locale and one prefixed tree for the other locales. Neither framework has an optional single-segment filesystem folder.
48
+ Neither Astro nor Next has an optional single-segment filesystem folder; an optional locale boundary in those frameworks is paired native filesystem route trees, one unprefixed for the default locale and one prefixed for the others. The Astro starter ships that pair; the Next starter is default-only, so a Next application adds a `[locale]` tree (or another strategy) only when the product asks for prefixed URLs.
@@ -57,10 +57,12 @@ From there:
57
57
  Some organizations that already have Premium may see a **Plan transition**
58
58
  section in Billing. It shows the recorded offer and the deadline to respond.
59
59
 
60
- - **Review the offer** opens the normal plan dialog with the exact recorded
61
- terms. Accepting asks the billing provider to activate Pro immediately and
62
- credit the unused part of the current Premium period. The plan changes only
63
- after the provider confirms the new subscription.
60
+ - **Review the offer** opens the plan dialog without charging anything.
61
+ Selecting Pro opens a final confirmation with the provider-calculated unused
62
+ Premium credit, amount charged now, next renewal date, and next renewal
63
+ amount. Fimo rechecks those figures before switching; if they changed, you
64
+ review and confirm the new amount. The plan changes only after the provider
65
+ confirms the new subscription.
64
66
  - **Move to Free instead** is an explicit choice. Premium remains active until
65
67
  the end of the current billing period, then the organization moves to Free.
66
68
  - An offer that is still being prepared, has expired, or has already been
@@ -83,6 +83,8 @@ Press **Alt+J** to move to the next entry or **Alt+K** to move to the previous o
83
83
 
84
84
  If a field is invalid, the editor keeps the change unsaved and pins a status bar below the header. Choose **Review issues** to jump to the first invalid field, then **Next issue** to move through the remaining fields. Collapsed blocks open automatically. Once every issue is fixed, the editor confirms that all fields are valid and resumes saving.
85
85
 
86
+ Longer entry forms may have quiet field-group tabs below the header. Choose a group to focus on that part of the entry, or choose **All fields** for the complete form. Studio remembers the selected group for that content type during the browser session, and copied entry links preserve the active group. If validation finds a problem elsewhere, **Review issues** opens All fields before focusing it. Groups only change the editor view; they do not hide content from the API or restrict what the AI can edit.
87
+
86
88
  A field labelled with a padlocked globe is shared across languages: it holds one value for the whole entry, so editing it in any language changes it in all of them. Fields without that marker are per language and only affect the language you are editing. Hover the icon for the same explanation in context.
87
89
 
88
90
  ## Editing Text
@@ -35,6 +35,7 @@ You may see different overlays depending on what is happening:
35
35
 
36
36
  - **"Working"** -- A loading overlay (heading "Working", subtext "Getting your preview in motion...") while the preview is being prepared.
37
37
  - **Error overlay** -- Something went wrong. The overlay shows details about the issue, and the AI can often auto-fix it for you.
38
+ - **"Some installed packages need approval"** -- Choose **Fix with Fimo** to send the complete repair context to the coding agent, or **Copy details** to handle it elsewhere. Review every named package, commit only trusted package-specific approvals, and retry Preview. Never replace the project policy with a blanket allow-all setting.
38
39
  - **First generation progress** -- When your project is being built for the first time, a progress overlay shows the current status.
39
40
 
40
41
  ## Switching Workspaces
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "bundled": true,
3
3
  "bundler": "esbuild",
4
- "bundledAt": "2026-08-22T15:14:06.125Z",
4
+ "bundledAt": "2026-08-23T14:49:49.653Z",
5
5
  "cliVersion": "0.20.0",
6
6
  "external": [
7
7
  "oxc-parser",