fimo 2.2.0-staging.8 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/assets/agent-templates/_default/config.yaml +6 -0
  2. package/assets/agent-templates/broken-link-sweeper/config.yaml +1 -0
  3. package/assets/content-templates/shared/types.eta +65 -6
  4. package/assets/skills/fimo-cli/SKILL.md +5 -3
  5. package/assets/skills/fimo-cli/references/agents.md +29 -4
  6. package/assets/skills/fimo-cli/references/assets.md +42 -3
  7. package/assets/skills/fimo-cli/references/branches.md +9 -8
  8. package/assets/skills/fimo-cli/references/content.md +4 -4
  9. package/assets/skills/fimo-cli/references/credits.md +12 -19
  10. package/assets/skills/fimo-cli/references/deploy.md +8 -8
  11. package/assets/skills/fimo-cli/references/forms.md +3 -1
  12. package/assets/skills/fimo-cli/references/history.md +3 -2
  13. package/assets/skills/fimo-cli/references/inbox.md +86 -0
  14. package/assets/skills/fimo-cli/references/init.md +7 -6
  15. package/assets/skills/fimo-cli/references/invite.md +11 -9
  16. package/assets/skills/fimo-cli/references/labels.md +3 -11
  17. package/assets/skills/fimo-cli/references/locales.md +5 -3
  18. package/assets/skills/fimo-cli/references/preview.md +1 -2
  19. package/assets/skills/fimo-cli/references/projects.md +8 -8
  20. package/assets/skills/fimo-cli/references/schedules.md +6 -4
  21. package/assets/skills/fimo-cli/references/webhooks.md +6 -4
  22. package/assets/skills/fimo-code/references/assets.md +22 -11
  23. package/assets/skills/fimo-code/references/content/clients.md +15 -1
  24. package/assets/skills/fimo-code/references/content/schema.md +1 -0
  25. package/assets/skills/fimo-code/references/frameworks/astro.md +1 -1
  26. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +12 -1
  27. package/assets/skills/fimo-code/references/frameworks/next/locales.md +2 -2
  28. package/assets/skills/fimo-code/references/frameworks/next.md +1 -1
  29. package/assets/skills/fimo-code/references/locales.md +4 -2
  30. package/assets/skills/fimo-migration/SKILL.md +54 -16
  31. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +8 -0
  32. package/assets/skills/fimo-migration/references/media.md +11 -0
  33. package/assets/skills/fimo-migration/references/qa.md +30 -4
  34. package/assets/skills/fimo-migration/references/questions-and-improvements.md +188 -0
  35. package/assets/skills/fimo-migration/references/workers/content-planner.md +8 -3
  36. package/assets/skills/fimo-migration/references/workers/validator.md +20 -6
  37. package/assets/skills/fimo-migration/references/workers.md +17 -6
  38. package/assets/skills/fimo-migration/references/workflow.md +36 -6
  39. package/assets/skills/fimo-studio/SKILL.md +3 -1
  40. package/assets/skills/fimo-studio/references/agents.md +25 -0
  41. package/assets/skills/fimo-studio/references/ai-chat.md +1 -2
  42. package/assets/skills/fimo-studio/references/billing-and-credits.md +14 -7
  43. package/assets/skills/fimo-studio/references/visual-editing.md +9 -1
  44. package/assets/skills/fimo-studio/references/webhooks.md +1 -1
  45. package/dist/cli/bundle.json +2 -2
  46. package/dist/cli/index.js +210 -179
  47. package/dist/runtime/content/client/collection-core.js +3 -2
  48. package/dist/runtime/content/client/core-types.d.ts +4 -3
  49. package/dist/runtime/content/client/internal.d.ts +2 -0
  50. package/dist/runtime/content/client/internal.js +54 -25
  51. package/dist/runtime/content/client/singleton-core.js +2 -1
  52. package/dist/runtime/content/index.d.ts +1 -1
  53. package/dist/runtime/content/index.js +1 -1
  54. package/dist/runtime/content/serialization.d.ts +4 -3
  55. package/dist/runtime/content/serialization.js +4 -3
  56. package/dist/runtime/primitives/lib/index.d.ts +1 -1
  57. package/dist/runtime/primitives/lib/index.js +1 -1
  58. package/dist/runtime/primitives/lib/primitives.d.ts +39 -12
  59. package/dist/runtime/primitives/lib/primitives.js +83 -17
  60. package/dist/runtime/primitives/lib/template.js +2 -2
  61. package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
  62. package/dist/runtime/shared/local-runtime-env.js +14 -9
  63. package/dist/runtime/templates.d.ts +9 -2
  64. package/dist/runtime/templates.js +36 -7
  65. package/dist/scripts/validate-schemas.js +10 -15
  66. package/package.json +10 -8
  67. package/release.json +2 -2
  68. package/templates/astro/AGENTS.md +1 -1
  69. package/templates/astro/package.json +2 -2
  70. package/templates/nextjs/AGENTS.md +2 -2
  71. package/templates/nextjs/package.json +3 -3
  72. package/templates/nextjs/src/app/layout.tsx +4 -1
  73. package/templates/react-router/AGENTS.md +2 -2
  74. package/templates/react-router/package.json +4 -4
  75. package/templates/sveltekit/AGENTS.md +1 -1
  76. package/templates/sveltekit/package.json +2 -2
  77. package/templates/vite/AGENTS.md +5 -1
  78. package/templates/vite/package.json +4 -4
  79. package/templates/welcome/manifest.json +655 -0
  80. package/templates/welcome/media/analytics-overview.avif +0 -0
  81. package/templates/welcome/media/autonomous-loop.avif +0 -0
  82. package/templates/welcome/media/editable-preview.avif +0 -0
  83. package/templates/welcome/media/media-library.avif +0 -0
  84. package/templates/welcome/media/slack-teams.avif +0 -0
  85. package/templates/welcome/template/.fimo/agents/welcome-guide/GOAL.md +12 -0
  86. package/templates/welcome/template/.fimo/agents/welcome-guide/capabilities.yaml +3 -0
  87. package/templates/welcome/template/.fimo/agents/welcome-guide/config.yaml +8 -0
  88. package/templates/welcome/template/.fimo/config.json +53 -0
  89. package/templates/welcome/template/src/font.css +60 -0
  90. package/templates/welcome/template/src/pages/ArticleDetail.tsx +104 -0
  91. package/templates/welcome/template/src/pages/Index.tsx +36 -0
  92. package/templates/welcome/template/src/pages/SiteContent.tsx +674 -0
  93. package/templates/welcome/template/src/pages/fallback-content.ts +152 -0
  94. package/templates/welcome/template/src/routes.ts +9 -0
  95. package/templates/welcome/template/src/schemas/Article.json +34 -0
  96. package/templates/welcome/template/src/schemas/Article.ts +54 -0
  97. package/templates/welcome/template/src/schemas/Article.types.ts +93 -0
  98. package/templates/welcome/template/src/schemas/Author.json +17 -0
  99. package/templates/welcome/template/src/schemas/Author.ts +51 -0
  100. package/templates/welcome/template/src/schemas/Author.types.ts +54 -0
  101. package/templates/welcome/template/src/schemas/Category.json +17 -0
  102. package/templates/welcome/template/src/schemas/Category.ts +51 -0
  103. package/templates/welcome/template/src/schemas/Category.types.ts +54 -0
  104. package/templates/welcome/template/src/schemas/HomePage.json +110 -0
  105. package/templates/welcome/template/src/schemas/HomePage.ts +22 -0
  106. package/templates/welcome/template/src/schemas/HomePage.types.ts +116 -0
@@ -0,0 +1,86 @@
1
+ # Inbox
2
+
3
+ The Inbox is what a project's agents tell the people on it: a run finished, a
4
+ run left work for review, a merge conflicted, or a run stopped and is waiting
5
+ for a decision. Only the last one can be acted on from the CLI.
6
+
7
+ ```bash
8
+ fimo inbox list # unread first, then read
9
+ fimo inbox list --topic agent_question --unread
10
+ fimo inbox get <notification-id> # the notification, plus the stored form when it is a question
11
+ fimo inbox answer <notification-id> --body '<compact answer json>'
12
+ ```
13
+
14
+ A notification id is the only id you ever hold. The question, its thread, the
15
+ run it continues, and the Branch that run kept alive are resolved for you.
16
+
17
+ Use `--project <id>` when there is no local `.fimo/project.json`. `--limit`,
18
+ `--cursor`, and `--all-pages` page the list. `--archived` reads archived items;
19
+ `--unread` stays in the unread stream instead of continuing into read items.
20
+
21
+ ## Answering is the person's decision, not yours
22
+
23
+ **Never answer a question on someone's behalf.** A question exists because a run
24
+ needed a human decision it could not make correctly. Answer only what the person
25
+ in front of you explicitly chose.
26
+
27
+ 1. `fimo inbox list --topic agent_question --unread --json` to find waiting
28
+ questions, then `fimo inbox get <notification-id> --json` for the one to
29
+ answer. `data.question.form` is the stored form, verbatim.
30
+ 2. **Reproduce that form in the interface you are in** — the native form or
31
+ choice UI your harness offers, or a plain enumerated prompt when it offers
32
+ none. Keep the title, the description, the step order, the wording of every
33
+ question, every option label, the recommended option where one is marked,
34
+ image labels and URLs, and each capability's reason. The person is deciding
35
+ on what the agent actually asked, not on your summary of it.
36
+ 3. Collect only explicit answers. Do not default a step, infer one from earlier
37
+ conversation, or fill a step the person skipped. If the person already gave a
38
+ complete explicit answer, do not ask again — use what they said.
39
+ 4. **Never infer capability approval.** Selecting nothing on a capabilities step
40
+ is a deliberate deny-all, and omitting the step entirely is refused by the
41
+ CLI rather than read as a denial.
42
+ 5. Pass their notes through verbatim. The note is the one part of the answer
43
+ only they could write.
44
+ 6. Call `fimo inbox answer` once.
45
+
46
+ ## The compact answer
47
+
48
+ Keyed by the step ids `inbox get` returned, in any order, one entry per step:
49
+
50
+ ```json
51
+ {
52
+ "answers": [
53
+ { "stepId": "direction", "selected": ["Editorial studio"], "note": "Keep it calm." },
54
+ { "stepId": "access", "selected": [] },
55
+ { "stepId": "notes", "note": "Ship on Friday." }
56
+ ]
57
+ }
58
+ ```
59
+
60
+ - `selected` holds option **labels**, exactly as the form shows them.
61
+ - `note` is free text. A step that offers options may be answered with a note
62
+ alone, with a selection alone, or with both.
63
+ - A written step (`"type": "text"`) is answered with `note` only.
64
+ - A capabilities step needs `selected`, empty or not. `[]` approves none.
65
+ - Every step needs its own entry. Nothing is answered by omission.
66
+
67
+ `--file <path>` and `--stdin` read the same JSON from a file or a pipe.
68
+
69
+ ## What the CLI refuses
70
+
71
+ | Code | Why |
72
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
73
+ | `INBOX_ANSWER_INVALID` | Unknown or missing step, unoffered option, too many selections on a single-select, a written step answered by picking, or a capabilities step with no explicit decision |
74
+ | `INBOX_NOT_A_QUESTION` | The notification is a run outcome, a review, or a conflict — there is nothing to answer |
75
+ | `INBOX_QUESTION_CLOSED` | Already answered, expired, cancelled, or superseded |
76
+ | `INBOX_UNKNOWN_TOPIC` | `--topic` is not one of the four Inbox topics |
77
+ | `INBOX_INVALID_CURSOR` | `--cursor` was not the `nextCursor` from a previous page |
78
+ | `INBOX_NOT_FOUND` | No notification with that id is addressed to you in this project |
79
+
80
+ A question is answered once. Answering it starts exactly one continuation run,
81
+ and re-sending the same answer never starts a second one.
82
+
83
+ ## What the CLI does not do
84
+
85
+ Marking read, archiving, restoring, reviewing retained work, and resolving merge
86
+ conflicts happen in the Fimo Inbox UI. `fimo inbox` reads and answers.
@@ -23,7 +23,7 @@ Generated pnpm projects pin `pnpm@10.26.0` and carry project-owned `pnpm-workspa
23
23
  | `--project-id <id>` | no | Set up the named Fimo project: scaffold and push a fresh site when it has no code yet, otherwise clone it. |
24
24
  | `--org <id>` | no | Target organization **id** when creating (use the `ID` column from `fimo orgs list`, NOT the slug). Picker shown interactively if omitted and TTY. |
25
25
  | `--branch <name>` | no | Branch to check out when linking an existing project (defaults to `main`). |
26
- | `--env <name>` | no | Compatibility alias for `--branch <name>`. |
26
+ | `--env <name>` | no | Rejected as a Branch selector; use `--branch <name>`. |
27
27
  | `--framework <framework>` | no | New-project scaffold: `nextjs` (App Router, default), `react-router`, `vite` (React SPA), `astro`, or `sveltekit`. Existing repositories are preserved. |
28
28
  | `--package-manager <pm>` | no | `npm` \| `pnpm` \| `yarn` \| `bun`. |
29
29
  | `--install` / `--no-install` | yes in non-TTY | Install deps after checkout (or skip it). |
@@ -81,10 +81,11 @@ select it with `--framework react-router` when a project should use React Router
81
81
  instead of the default Next.js App Router shell.
82
82
 
83
83
  Set the primary locale from the request: when several are explicitly named, use the first as default;
84
- if none is requested, keep `en` and tell the user. Update `.fimo/config.json#i18n`, the framework-native
85
- locale boundary, matcher, and HTML language default. Do not keep `en` solely because the shell starts
86
- there. Do not add `/en`, a language picker, global path-prefix configuration, or localized schemas unless
87
- the site needs them.
84
+ if none is requested, keep `en` and tell the user. After init, load `references/locales.md` and use its
85
+ typed lifecycle commands to configure the locale set and default. Then update the framework-native locale
86
+ boundary, matcher, and HTML language default. Do not keep `en` solely because the shell starts there.
87
+ Do not add `/en`, a language picker, global path-prefix configuration, or localized schemas unless the
88
+ site needs them.
88
89
  After init, load the project rules and `fimo-code` to build the requested site.
89
90
  If you replace a shell's code with a site that uses another framework or none,
90
91
  fix `runtime.framework` in the same change
@@ -94,7 +95,7 @@ For `--agents`, pass the AI tool you're running in: `--agents=claude-code` for C
94
95
 
95
96
  ## Setting up a project by ID
96
97
 
97
- Pass `--project-id <id>` to set up a known Fimo project. If the project has no code yet — for example, one just created in Fimo Studio — `init` scaffolds a fresh site into it and pushes the initial commit: the same create-new path, linked to the existing ID. If the project already has code, `init` clones it into `[dir]`, like `fimo clone`. Use `--branch <name>` to check out a specific Branch (defaults to `main`); `--env <name>` remains a compatibility alias. Without `--project-id`, `fimo init` creates a new project.
98
+ Pass `--project-id <id>` to set up a known Fimo project. If the project has no code yet — for example, one just created in Fimo Studio — `init` scaffolds a fresh site into it and pushes the initial commit: the same create-new path, linked to the existing ID. If the project already has code, `init` clones it into `[dir]`, like `fimo clone`. Use `--branch <name>` to check out a specific Branch (defaults to `main`). Without `--project-id`, `fimo init` creates a new project.
98
99
 
99
100
  ## Linking an existing local application
100
101
 
@@ -11,7 +11,7 @@ Invite collaborators to your Fimo organization or project. After deploying a web
11
11
  Typical scenarios where inviting is appropriate:
12
12
 
13
13
  - Multi-person projects (agencies, teams)
14
- - Client hand-off (invite client as `view` or `comment`)
14
+ - Client hand-off (invite client as `view`)
15
15
  - Content editors (invite as `edit` for CMS access)
16
16
  - Developers (invite as `edit` or `full`)
17
17
 
@@ -30,12 +30,14 @@ fimo invite --project <project-id> --email "john@acme.com" --role full
30
30
 
31
31
  Project roles:
32
32
 
33
- | Role | Access Level | Use Case |
34
- | --------- | --------------------------------------------- | --------------------------- |
35
- | `view` | Read-only | Clients, stakeholders |
36
- | `comment` | View + leave comments | Reviewers, approvers |
37
- | `edit` | Edit code, content, assets, use AI chat | Developers, content editors |
38
- | `full` | Full access including settings and publishing | Project leads |
33
+ | Role | Access Level | Use Case |
34
+ | ------ | --------------------------------------------- | -------------------------------- |
35
+ | `view` | Read-only | Clients, stakeholders, reviewers |
36
+ | `edit` | Edit code, content, assets, use AI chat | Developers, content editors |
37
+ | `full` | Full access including settings and publishing | Project leads |
38
+
39
+ `comment` is no longer offered. Fimo has no comment system, so it granted exactly what `view` grants. It is still
40
+ accepted by `--role` and still held by anyone already assigned it, but do not hand it out — use `view`.
39
41
 
40
42
  ## Invite to an organization
41
43
 
@@ -76,8 +78,8 @@ Next steps:
76
78
  # Give client view-only access
77
79
  fimo invite --email "client@company.com" --role view
78
80
 
79
- # Give client comment access for feedback
80
- fimo invite --email "client@company.com" --role comment
81
+ # Reviewers get the same read-only access
82
+ fimo invite --email "reviewer@company.com" --role view
81
83
  ```
82
84
 
83
85
  ### Adding a developer
@@ -27,18 +27,10 @@ There is no `fimo translations` command. Use `fimo labels`.
27
27
 
28
28
  ## Locale config
29
29
 
30
- `.fimo/config.json` controls label/content locales:
31
-
32
- ```json
33
- {
34
- "i18n": {
35
- "defaultLocale": "en",
36
- "locales": ["en"]
37
- }
38
- }
39
- ```
30
+ Use `references/locales.md` to change the supported locales or default.
40
31
 
41
- - `defaultLocale` is what `fimo validate` and label commands use when `--locale` is omitted.
32
+ - `fimo validate` reads `defaultLocale` from the synchronized local config so it can run without a Fimo session.
33
+ - Label writes with no `--locale` leave the locale unset; the selected Branch API resolves its configured default.
42
34
  - `locales` is the enabled locale list and must include `defaultLocale`. Do not add non-default locales unless the user asks for multiple languages, localized routes, translations, or a specific locale.
43
35
  - If multiple locales are configured, create or update label values for every configured locale.
44
36
  - For a non-default locale, pass `--locale <locale>` explicitly.
@@ -13,13 +13,13 @@ fimo locales set-default es --yes --json
13
13
  fimo locales remove es --yes --json
14
14
  ```
15
15
 
16
- Studio chat can run `locales list`. Manage the locale lifecycle through Studio Settings or the standalone CLI.
16
+ In a linked project, change the locale set or default only through these commands or Studio Settings. Never edit `i18n.defaultLocale` or `i18n.locales` directly. Studio chat can run `locales list`.
17
17
 
18
18
  These commands update the selected Branch through the locale lifecycle API. The API commits `.fimo/config.json` to the Fimo Branch, then the CLI synchronizes the **whole local branch** to that commit. They refuse a dirty config, a local-ahead branch, or a diverged branch before applying the remote change. `--yes` bypasses only the explanatory prompt.
19
19
 
20
20
  If a mutation exits with code `2` and `data.code` is `LOCALE_APPLIED_SYNC_REQUIRED`, the remote operation succeeded (`data.applied` is `true`) but the local fast-forward did not. **Do not retry the locale command.** Run the commands in `data.sync.recovery`, resolve the checkout, and confirm with `fimo status` or `fimo locales list`.
21
21
 
22
- Edit `.fimo/config.json` only for declarative locale and route metadata:
22
+ The synchronized `.fimo/config.json` remains the application runtime's declarative locale configuration:
23
23
 
24
24
  ```jsonc
25
25
  {
@@ -36,6 +36,8 @@ Edit `.fimo/config.json` only for declarative locale and route metadata:
36
36
  - New projects do not need a global routing strategy. The route contract declares locale placement with `/:locale`; legacy `i18n.routing.strategy` values are read only for compatibility while migrating.
37
37
  - If multiple locales are configured, create or update labels and localized content for every configured locale. Create schemas with `i18n: { "enabled": false }` only once.
38
38
 
39
+ Edit application-owned settings such as `routes` directly in `.fimo/config.json`. Locale membership and the default use the lifecycle commands above because they must update the selected Fimo Branch and local checkout together.
40
+
39
41
  `fimo locales remove` permanently deletes that locale's stored entries and labels.
40
42
 
41
43
  ## Validate
@@ -108,7 +110,7 @@ Neither Astro nor Next supports an optional single-segment filesystem folder. As
108
110
 
109
111
  ## Migrate An Existing Locale System
110
112
 
111
- Inspect the existing locale provider, route table, switcher, redirects, and public URLs before editing configuration. Preserve working URL behavior during the migration.
113
+ Inspect the existing locale provider, route table, switcher, redirects, and public URLs before changing locale behavior. Preserve working URL behavior during the migration.
112
114
 
113
115
  Preserve the existing locale provider, router, switcher, redirects, and public URLs. Next.js projects run `fimo skills get fimo-code --ref frameworks/next/locales`; React Router projects load the React Router setup reference and its focused route-ownership migration when upgrading; Astro projects run `fimo skills get fimo-code --ref frameworks/astro` and pass the page-resolved locale into server reads and `getLabels`.
114
116
 
@@ -14,7 +14,7 @@ fimo preview url --all # print every destination a
14
14
  curl -L "$(fimo preview url)" # fetch the raw sandbox preview
15
15
  ```
16
16
 
17
- `--env <name>` remains a deprecated alias for `--branch <name>`; the two disagreeing is an error, not a precedence rule. The JSON envelope carries `branch` and keeps `env` as a duplicate of it. Studio deep links still use the `/env/` path, which redirects to `/branch/`.
17
+ `--env <name>` is rejected as a Branch selector; use `--branch <name>`. The JSON envelope carries the canonical `branch` field and may include a deprecated `env` compatibility duplicate. Studio deep links still use the `/env/` path, which redirects to `/branch/`.
18
18
 
19
19
  ## Human and machine behavior
20
20
 
@@ -32,7 +32,6 @@ curl -L "$(fimo preview url)" # fetch the raw sandbox pre
32
32
  "project_id": "prj_abc",
33
33
  "branch": "main",
34
34
  "env": "main",
35
- "env": "main",
36
35
  "preview_url": "https://fimo.ai/preview/prj_abc/main",
37
36
  "sandbox_url": "https://preview.provider.example/session",
38
37
  "sandbox_expires_at": "2026-08-20T18:42:00.000Z",
@@ -9,16 +9,16 @@ fimo projects list [--org <id>] # list projects in an org (defau
9
9
  fimo projects create [dir] [--org <id>] [--framework react-router|astro|nextjs|sveltekit] [--install|--no-install]
10
10
  fimo projects clone [projectId] [dir] [--branch <name>] # clone an existing project locally
11
11
  fimo projects delete [projectId] [-C <dir>] [-y] # delete (defaults to current project)
12
- fimo projects publish [projectId] [-C <dir>] # make the project live (publish from main)
12
+ fimo projects publish [projectId] [-C <dir>] # make the project live from its Production source Branch
13
13
  fimo projects unpublish [projectId] [-C <dir>] # take the project offline
14
14
  fimo projects rename <name> [projectId] [-C <dir>] # set seo.siteName in the linked project config
15
15
  ```
16
16
 
17
17
  - **`list`** — projects you can see in the org. Live projects are marked.
18
18
  - **`create`** — identical to `fimo init` (create-new path); see `references/init.md`.
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.
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 removed `--env <name>` spelling is rejected as a Branch selector. 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).
21
+ - **`publish` / `unpublish`** — toggle the project's public visibility. `publish` flips the configured Production source state live (the same "go live" as `fimo deploy --publish`, minus the git push).
22
22
  - **`rename`** — edits only the linked local project's `seo.siteName`. It does not commit or deploy. 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). Later remote config commands may require reconciliation while the local config is dirty. Finish your local edits, then explicitly run `fimo deploy --no-wait` when ready for a quick sync.
23
23
 
24
24
  ## Top-level clone shortcut
@@ -43,10 +43,10 @@ fimo rename "<Site Name>" # local edit: set seo.siteName in the project c
43
43
 
44
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` | Flip the already-synced `main` revision live; optional label and notes. |
46
+ | Command | Effect |
47
+ | ----------------------- | -------------------------------------------------------------------------- |
48
+ | `fimo deploy --publish` | Push the current Production source + flip the project live in one shot. |
49
+ | `fimo projects publish` | Flip the project live (no git push). |
50
+ | `fimo publish` | Flip the synced Production source revision live; optional label and notes. |
51
51
 
52
52
  See `references/deploy.md` and `references/branches.md` for the full picture.
@@ -2,7 +2,7 @@
2
2
 
3
3
  `fimo schedules` manages recurring commands for one project Branch. It uses the
4
4
  current checkout Branch by default, or the Branch passed with `--branch <name>`.
5
- The legacy `--env <name>` spelling remains a compatibility alias.
5
+ The removed `--env <name>` spelling is rejected as a Branch selector.
6
6
 
7
7
  The command starts in that Branch's sandbox. Commands can still target another
8
8
  Branch explicitly, for example with `fimo schemas list --branch preview`.
@@ -22,7 +22,7 @@ fimo schedules resume <schedule>
22
22
  fimo schedules run <schedule>
23
23
  fimo schedules run <schedule> --no-wait
24
24
  fimo schedules runs <schedule> --limit 25 --status failed
25
- fimo schedules runs <schedule> --all
25
+ fimo schedules runs <schedule> --all-pages
26
26
  fimo schedules runs show <run-id>
27
27
  fimo schedules delete <schedule>
28
28
  ```
@@ -59,9 +59,11 @@ Run history is cursor-paginated:
59
59
  fimo schedules runs nightly --limit 50
60
60
  fimo schedules runs nightly --cursor <cursor>
61
61
  fimo schedules runs nightly --status succeeded
62
- fimo schedules runs nightly --all
62
+ fimo schedules runs nightly --all-pages
63
63
  ```
64
64
 
65
+ `--all` remains a compatibility alias for existing scripts.
66
+
65
67
  Run detail includes status, timing, trigger, exit/error information, retained output, output retention metadata, and secret snapshot metadata. Output is capped and redacted before it is returned.
66
68
 
67
69
  ## JSON
@@ -70,6 +72,6 @@ All schedule commands support the CLI's global `--json` mode. List, detail, and
70
72
 
71
73
  ## Notes
72
74
 
73
- - Every operation is scoped to the active Branch unless `--branch` (or the legacy `--env` alias) is passed.
75
+ - Every operation is scoped to the active Branch unless `--branch` is passed.
74
76
  - Pausing stops future cron runs. It does not delete history.
75
77
  - A failed or skipped manual run exits non-zero with its run ID and an exact `runs show` command for inspecting detail.
@@ -28,12 +28,13 @@ Run this before writing a custom payload. The list shows supported event types,
28
28
  - Publish: `publish.started`, `publish.succeeded`, `publish.failed`, `publish.unpublished`
29
29
  - Agents: run started/completed/failed/cancelled and review requested/resolved
30
30
  - Analytics: `analytics.report_ready`
31
- - Media: uploaded/updated/deleted/generated/processing_failed
31
+ - Media: uploaded/updated/deleted
32
32
  - Entries: `entry.changed`
33
33
  - Domains: `domain.created`, `domain.deleted`
34
34
  - Labels: `label.changed`
35
35
  - Locales: `locale.created`, `locale.default_changed`, `locale.deleted`
36
- - Environment events (legacy wire names): `environment.created`, `environment.deleted`, `environment.merged`, `environment.restored`
36
+ - Branch restore: `branch.restored`
37
+ - Existing lifecycle wire names: `environment.created`, `environment.deleted`, `environment.merged`
37
38
 
38
39
  Do not guess variable paths. The common envelope is:
39
40
 
@@ -110,9 +111,8 @@ Available filters are event-specific:
110
111
  - `--agent <name>` for agent events
111
112
  - `--media-type <image|video|audio|document|other>` for media events
112
113
  - `--action <created|updated|deleted>`, `--content-type <name>`, and `--locale <locale>` for `entry.changed`
113
- - `--debounce-changes <immediate|5s|30s|1m>` for direct `entry.changed` delivery grouping
114
114
 
115
- `entry.changed` represents content accepted in the selected Environment. New entry webhooks wait 5 seconds after the last direct edit by default, then send one delivery with the combined `data.changes`. Exact repeated autosave changes appear once. Use `--debounce-changes immediate` to disable grouping. Accepted agent edits and environment merges already carry compact batches and send immediately. Operations above the delivery batch size share an `operationId` and include `{ index, total }` batch metadata. Every event includes scalar `environment` and `branch` context and keeps the legacy Branch value at `event.env.name`. Publish events always report Production on `main`.
115
+ `entry.changed` represents content committed in the selected Environment. Each committed write sends one delivery whose `data.changes` lists every affected entry; environment merges arrive the same way with `reason: "environment_merge"`. Operations above the delivery batch size share an `operationId` and include `{ index, total }` batch metadata. Retries resend the same delivery (same event `id`), never a new one. Every event includes scalar `environment` and `branch` context and keeps the legacy Branch value at `event.env.name`. Publish events always report Production on `main`.
116
116
 
117
117
  ## Inspect before depending on it
118
118
 
@@ -121,6 +121,8 @@ fimo webhooks list
121
121
  fimo webhooks get <webhook-id>
122
122
  fimo webhooks test <webhook-id> --wait
123
123
  fimo webhooks deliveries <webhook-id> --limit 20
124
+ fimo webhooks deliveries <webhook-id> --cursor <next-cursor>
125
+ fimo webhooks deliveries <webhook-id> --all-pages
124
126
  fimo webhooks delivery <webhook-id> <delivery-id>
125
127
  ```
126
128
 
@@ -1,12 +1,12 @@
1
- # Assets — package surface
1
+ # Assets in code
2
2
 
3
3
  > For the CLI commands (`fimo assets upload`, `fimo image generate`, folder management) and the "when to generate AI images" workflow rules, see **`fimo-cli/references/assets.md`**.
4
4
 
5
- This file covers the package surface for working with assets in code: the `media` field value shape, rendering primitives, and URL format.
5
+ This file covers media fields and the Fimo image components.
6
6
 
7
- ## `media` field value (stored/wire shape)
7
+ ## Media field values
8
8
 
9
- Asset values returned from `fimo assets upload` or Fimo media tasks, and stored in `media` content-type fields:
9
+ A media field stores a reference to an asset, not a copy of the asset metadata. Write the value returned by upload or generation:
10
10
 
11
11
  ```json
12
12
  {
@@ -16,11 +16,22 @@ Asset values returned from `fimo assets upload` or Fimo media tasks, and stored
16
16
  }
17
17
  ```
18
18
 
19
- - `source`: `"local"` for uploaded/generated assets in the Fimo media library. `"external"` for hard-coded third-party URLs (avoid when possible — editors can't manage these).
20
- - `url`: stable HTTPS URL, no auth required, safe to embed.
21
- - `alt`: optional alt text.
19
+ - `source`: `"local"` for a Fimo media-library asset, or `"external"` for a third-party URL.
20
+ - `url`: the public asset URL.
21
+ - `alt`: optional text owned by the entry.
22
22
 
23
- Generated content reads wrap this stored value in `FimoMedia`, which exposes `url`, `alt`, `name`, `mime`, and optional `width`/`height`. It does not expose `source`; Fimo tracks that internally. Pass the whole entry value to `<Image>` / `<Video>`.
23
+ For a local asset, Fimo stores its ID and keeps the URL as a fallback. Do not copy `name`, `mime`, `width`, or `height` into the value. Those facts belong to the asset and are removed from writes.
24
+
25
+ By default, reads return the stored reference without an asset lookup. Name a media or blocks field in `populate` when the page needs the asset's current URL, name, MIME type, or intrinsic size:
26
+
27
+ ```ts
28
+ const post = await Post.getBySlug('hello');
29
+ const withAsset = await Post.getBySlug('hello', { populate: ['cover'] });
30
+ ```
31
+
32
+ `populate` takes top-level field names. A blocks field populates every media value inside it. One lookup covers all selected media in the response. Media inside a populated reference target stays a reference. Use `fimo assets open <id> --download` to inspect the source file.
33
+
34
+ Generated reads wrap media in `FimoMedia`. Its `id`, `alt`, `name`, `mime`, `width`, and `height` can be absent. A populated value has the current facts when the asset resolves; missing or external assets stay unchanged. `source` is internal. Pass the whole value to `<Image>` or `<Video>`.
24
35
 
25
36
  ## Rendering in application code
26
37
 
@@ -41,11 +52,11 @@ import { Image, StaticImage, Video } from 'fimo-next';
41
52
  <StaticImage src="https://assets.fimo.ai/<project>/<id>.jpg" alt="Hero" width={1200} height={630} />
42
53
  ```
43
54
 
44
- Fimo's `<Image>` is not Next's `next/image` component. Do not pass Next-only props such as `priority`, `fill`, `quality`, or `loader`; use only the props documented for the Fimo primitive. Preserve `next/image` for non-Fimo images when the application needs those Next-specific controls.
55
+ Fimo's `<Image>` is not Next's `next/image`. Use the Fimo props documented here. Keep `next/image` for non-Fimo images that need its controls.
45
56
 
46
- **Provide `width` and `height` when known** so Fimo can optimize the asset and reserve layout space (prevents CLS).
57
+ Choose dimensions, CSS, `sizes`, and `fit` from the page design. Do not copy the source file's intrinsic dimensions into layout props by default. When a read includes intrinsic size, Fimo uses it for aspect-ratio reservation and responsive candidates.
47
58
 
48
- **Never hand-construct a `FimoMedia` object** to pass into `<Image>` — that bypasses inline-editing metadata. If you have a raw URL, use `<StaticImage>` instead.
59
+ **Never hand-construct a `FimoMedia` object** to pass into `<Image>`. That bypasses inline-editing metadata. If you have a raw URL, use `<StaticImage>` instead.
49
60
 
50
61
  See `references/ui.md` for the full component table and rules.
51
62
 
@@ -125,7 +125,21 @@ const page = await Article.list({
125
125
  });
126
126
  ```
127
127
 
128
- Fimo always keeps `id`, `entryId`, `documentId`, and `locale`. Without `populate`, references are `{ id }`; with it, they become the target entry or `null`. Populate is depth-one and only accepts reference field names.
128
+ Fimo always keeps `id`, `entryId`, `documentId`, and `locale`, plus every field named in `populate`.
129
+
130
+ `populate` is depth-one and takes top-level field names of two kinds:
131
+
132
+ | Field named | Without `populate` | With it |
133
+ | -------------------- | ------------------------ | ------------------------------------------------------------------------------------------- |
134
+ | reference | `{ id }` | the target entry, or `null` |
135
+ | media | the stored reference | `FimoPopulatedMedia` with current asset facts when it resolves; asset facts remain optional |
136
+ | blocks holding media | stored references inside | every media value inside it populated; item types unchanged |
137
+
138
+ Any other field name is a 400. A populated reference target carries its own media as stored references. Population does not recurse, and a missing or external asset keeps its stored media value.
139
+
140
+ Even when media is populated, `id`, `name`, `mime`, `width`, and `height` can be absent for external, missing, or incomplete assets. The stored `url` remains the fallback, and `alt` is optional entry-owned text.
141
+
142
+ Generated schema modules keep `FimoMediaRef` and `FimoPopulatedMedia` local. Their shapes depend on the schema, while the installed runtime package may be an older release.
129
143
 
130
144
  When a named type is needed, use the generated result type rather than typing populated data as the base entry:
131
145
 
@@ -140,6 +140,7 @@ Use `schema.fields` for one repeated shape and `schema.oneOf` for selectable var
140
140
  - Fimo adds stable `_key` values; `oneOf` items also receive `_type`.
141
141
  - Nest blocks up to seven levels. One `oneOf` supports up to 40 variants and one blocks field up to 200 items.
142
142
  - Nested scalar values use the same source-tracked value type as top-level fields.
143
+ - Fixed and polymorphic references work inside blocks with the same value shapes as top-level reference fields.
143
144
  - Nested reference population and filtering are not supported.
144
145
 
145
146
  ## References
@@ -115,7 +115,7 @@ export async function getStaticPaths() {
115
115
 
116
116
  Configure Astro i18n from `.fimo/config.json#i18n` and use `Astro.currentLocale` for content reads, `getLabels({ locale })`, and `<html lang>`. The standard starter keeps the configured default locale unprefixed and prefixes the others. Existing applications may instead resolve locale through middleware, domains, cookies, or another application-owned strategy. Astro needs no Fimo locale provider. Ownership rules: `references/locales.md`.
117
117
 
118
- The new-project shell pairs unprefixed default-locale pages with a parallel `[locale]` tree because Astro has no optional single-segment page filename. Add locales in `.fimo/config.json`; Astro's native i18n router validates the prefixed tree. Route metadata uses `/:locale` with `params.locale.optional: true`; Astro page files remain authoritative.
118
+ The new-project shell pairs unprefixed default-locale pages with a parallel `[locale]` tree because Astro has no optional single-segment page filename. Add locales through the `fimo-cli` locale workflow; Astro's native i18n router reads the synchronized config and validates the prefixed tree. Route metadata uses `/:locale` with `params.locale.optional: true`; Astro page files remain authoritative.
119
119
 
120
120
  ## Studio route catalog
121
121
 
@@ -109,7 +109,18 @@ Do not add `'use client'` to a page solely because Fimo is present. Keep promise
109
109
 
110
110
  ## Metadata
111
111
 
112
- Next remains in control through `generateMetadata`. Resolve labels/content on the server and convert tracked strings only where Next expects primitives:
112
+ Fimo owns the site-wide defaults; the application owns per-page overrides. Keep (or add) the starter wiring in the root layout — it maps `.fimo/config.json#seo` (Studio's Settings → SEO: title, description, favicon, share image, robots, theme color, canonical) onto Next `Metadata`/`Viewport`:
113
+
114
+ ```ts
115
+ import { buildFimoMetadata, buildFimoViewport } from 'fimo-next';
116
+
117
+ export const generateMetadata = () => buildFimoMetadata();
118
+ export const generateViewport = () => buildFimoViewport();
119
+ ```
120
+
121
+ If the root layout lacks this wiring, add it (updating the fimo packages if `fimo-next` does not export the helpers); without it, Settings → SEO never reaches the rendered head.
122
+
123
+ Per-page `metadata`/`generateMetadata` exports override the defaults field by field. Resolve labels/content on the server and convert tracked strings only where Next expects primitives:
113
124
 
114
125
  ```ts
115
126
  export async function generateMetadata() {
@@ -35,7 +35,7 @@ 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 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.
38
+ Choose the primary locale from the user's request before building pages. Configure the supported locales and default through the `fimo-cli` locale workflow. `src/locales.ts` reads the synchronized config, 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
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
 
@@ -45,7 +45,7 @@ When the app implements a localized URL shape, describe it in `.fimo/config.json
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
 
48
- Before creating non-default Fimo labels or content variants, confirm that those locales are enabled for the linked Fimo project. Load `fimo-cli` with its `locales` reference and run `fimo locales add <locale> --yes --json`; `.fimo/config.json` documents the application's locale policy, but `fimo validate` does not add project locales.
48
+ Before creating non-default Fimo labels or content variants, confirm that those locales are enabled for the linked Fimo project. Load `fimo-cli` with its `locales` reference and run `fimo locales add <locale> --yes --json`; `fimo validate` does not add project locales.
49
49
 
50
50
  ## Ownership boundary
51
51
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this reference when `fimo describe --json` reports `framework.slug: "nextjs"`, or the project uses an App Router (`app/` or `src/app/`) or Pages Router (`pages/` or `src/pages/`) tree.
4
4
 
5
- Fimo supports schema-first content in both routers across static generation, ISR, request-time rendering, and Client Components. The application owns routes, locale resolution, links, `<html lang/dir>`, and SEO. Fimo receives the resolved locale and supplies content, labels, source metadata, and client editing context.
5
+ Fimo supports schema-first content in both routers across static generation, ISR, request-time rendering, and Client Components. The application owns routes, locale resolution, links, `<html lang/dir>`, and per-page SEO overrides. Fimo receives the resolved locale and supplies content, labels, source metadata, client editing context, and the site-wide SEO defaults (App Router: `buildFimoMetadata`/`buildFimoViewport` in the root layout — see the router reference's Metadata section).
6
6
 
7
7
  ## Choose the router reference
8
8
 
@@ -13,11 +13,13 @@ 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 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.
16
+ For a linked project, load `fimo-cli` with its `locales` reference and use the typed locale commands to change the supported locales or default. That reference owns the synchronization and recovery contract.
17
+
18
+ For new projects, derive the primary locale from the request; when several are explicit, the first one named is the default. Configure that locale set through the lifecycle commands, then update 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
19
 
18
20
  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
21
 
20
- For an already linked project, enable each locale in Fimo before writing non-default label or content variants. Load `fimo-cli` with its `locales` reference and run `fimo locales add <locale> --yes --json`; local config and `fimo validate` do not provision project locales. Do not change the application's route strategy to work around a missing locale.
22
+ Enable each locale before writing non-default label or content variants. Run `fimo locales add <locale> --yes --json`; `fimo validate` does not provision project locales. Do not change the application's route strategy to work around a missing locale.
21
23
 
22
24
  ## Application responsibilities
23
25