fimo 2.2.0-staging.9 → 2.2.1-staging.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 (93) 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 -7
  6. package/assets/skills/fimo-cli/references/assets.md +38 -2
  7. package/assets/skills/fimo-cli/references/branches.md +9 -8
  8. package/assets/skills/fimo-cli/references/content.md +1 -1
  9. package/assets/skills/fimo-cli/references/credits.md +12 -19
  10. package/assets/skills/fimo-cli/references/deploy.md +6 -6
  11. package/assets/skills/fimo-cli/references/history.md +2 -2
  12. package/assets/skills/fimo-cli/references/inbox.md +86 -0
  13. package/assets/skills/fimo-cli/references/init.md +7 -6
  14. package/assets/skills/fimo-cli/references/invite.md +11 -9
  15. package/assets/skills/fimo-cli/references/labels.md +3 -11
  16. package/assets/skills/fimo-cli/references/locales.md +5 -3
  17. package/assets/skills/fimo-cli/references/preview.md +1 -2
  18. package/assets/skills/fimo-cli/references/projects.md +8 -8
  19. package/assets/skills/fimo-cli/references/schedules.md +2 -2
  20. package/assets/skills/fimo-cli/references/webhooks.md +4 -4
  21. package/assets/skills/fimo-code/references/assets.md +22 -11
  22. package/assets/skills/fimo-code/references/content/clients.md +15 -1
  23. package/assets/skills/fimo-code/references/content/schema.md +1 -0
  24. package/assets/skills/fimo-code/references/frameworks/astro.md +1 -1
  25. package/assets/skills/fimo-code/references/frameworks/next/app-router.md +12 -1
  26. package/assets/skills/fimo-code/references/frameworks/next/locales.md +2 -2
  27. package/assets/skills/fimo-code/references/frameworks/next.md +1 -1
  28. package/assets/skills/fimo-code/references/locales.md +4 -2
  29. package/assets/skills/fimo-migration/SKILL.md +54 -16
  30. package/assets/skills/fimo-migration/references/frameworks/nextjs.md +8 -0
  31. package/assets/skills/fimo-migration/references/media.md +11 -0
  32. package/assets/skills/fimo-migration/references/qa.md +30 -4
  33. package/assets/skills/fimo-migration/references/questions-and-improvements.md +188 -0
  34. package/assets/skills/fimo-migration/references/workers/content-planner.md +8 -3
  35. package/assets/skills/fimo-migration/references/workers/validator.md +20 -6
  36. package/assets/skills/fimo-migration/references/workers.md +17 -6
  37. package/assets/skills/fimo-migration/references/workflow.md +36 -6
  38. package/assets/skills/fimo-studio/SKILL.md +3 -1
  39. package/assets/skills/fimo-studio/references/agents.md +25 -0
  40. package/assets/skills/fimo-studio/references/ai-chat.md +1 -2
  41. package/assets/skills/fimo-studio/references/billing-and-credits.md +14 -7
  42. package/assets/skills/fimo-studio/references/webhooks.md +1 -1
  43. package/dist/cli/bundle.json +2 -2
  44. package/dist/cli/index.js +206 -176
  45. package/dist/runtime/content/serialization.d.ts +4 -3
  46. package/dist/runtime/content/serialization.js +4 -3
  47. package/dist/runtime/primitives/lib/primitives.d.ts +15 -7
  48. package/dist/runtime/primitives/lib/primitives.js +14 -1
  49. package/dist/runtime/shared/local-runtime-env.d.ts +2 -2
  50. package/dist/runtime/shared/local-runtime-env.js +14 -9
  51. package/dist/runtime/templates.d.ts +9 -2
  52. package/dist/runtime/templates.js +36 -7
  53. package/dist/scripts/validate-schemas.js +10 -15
  54. package/package.json +10 -8
  55. package/templates/astro/AGENTS.md +1 -1
  56. package/templates/astro/package.json +2 -2
  57. package/templates/nextjs/AGENTS.md +2 -2
  58. package/templates/nextjs/package.json +3 -3
  59. package/templates/nextjs/src/app/layout.tsx +4 -1
  60. package/templates/react-router/AGENTS.md +2 -2
  61. package/templates/react-router/package.json +4 -4
  62. package/templates/sveltekit/AGENTS.md +1 -1
  63. package/templates/sveltekit/package.json +2 -2
  64. package/templates/vite/AGENTS.md +5 -1
  65. package/templates/vite/package.json +4 -4
  66. package/templates/welcome/manifest.json +655 -0
  67. package/templates/welcome/media/analytics-overview.avif +0 -0
  68. package/templates/welcome/media/autonomous-loop.avif +0 -0
  69. package/templates/welcome/media/editable-preview.avif +0 -0
  70. package/templates/welcome/media/media-library.avif +0 -0
  71. package/templates/welcome/media/slack-teams.avif +0 -0
  72. package/templates/welcome/template/.fimo/agents/welcome-guide/GOAL.md +12 -0
  73. package/templates/welcome/template/.fimo/agents/welcome-guide/capabilities.yaml +3 -0
  74. package/templates/welcome/template/.fimo/agents/welcome-guide/config.yaml +8 -0
  75. package/templates/welcome/template/.fimo/config.json +53 -0
  76. package/templates/welcome/template/src/font.css +60 -0
  77. package/templates/welcome/template/src/pages/ArticleDetail.tsx +104 -0
  78. package/templates/welcome/template/src/pages/Index.tsx +36 -0
  79. package/templates/welcome/template/src/pages/SiteContent.tsx +674 -0
  80. package/templates/welcome/template/src/pages/fallback-content.ts +152 -0
  81. package/templates/welcome/template/src/routes.ts +9 -0
  82. package/templates/welcome/template/src/schemas/Article.json +34 -0
  83. package/templates/welcome/template/src/schemas/Article.ts +54 -0
  84. package/templates/welcome/template/src/schemas/Article.types.ts +93 -0
  85. package/templates/welcome/template/src/schemas/Author.json +17 -0
  86. package/templates/welcome/template/src/schemas/Author.ts +51 -0
  87. package/templates/welcome/template/src/schemas/Author.types.ts +54 -0
  88. package/templates/welcome/template/src/schemas/Category.json +17 -0
  89. package/templates/welcome/template/src/schemas/Category.ts +51 -0
  90. package/templates/welcome/template/src/schemas/Category.types.ts +54 -0
  91. package/templates/welcome/template/src/schemas/HomePage.json +110 -0
  92. package/templates/welcome/template/src/schemas/HomePage.ts +22 -0
  93. package/templates/welcome/template/src/schemas/HomePage.types.ts +116 -0
@@ -3,5 +3,11 @@
3
3
  version: 1
4
4
  description: 'A new Fimo agent. Edit this tagline to describe what it does.'
5
5
  model: openai/gpt-5.6-luna
6
+
7
+ runtime:
8
+ # Per-run spend limit in credits. Remove to allow up to the
9
+ # organization's available balance at admission.
10
+ max_credits: 5000
11
+
6
12
  triggers:
7
13
  - type: manual
@@ -5,6 +5,7 @@ model: openai/gpt-5.6-luna
5
5
  runtime:
6
6
  cloud: true
7
7
  long_running: true
8
+ max_credits: 5000
8
9
 
9
10
  triggers:
10
11
  - type: manual
@@ -24,6 +24,27 @@ import type { <%= referenceImport.pascal %> } from "./<%= referenceImport.pascal
24
24
  /* ──────────── 📄 Type definitions ──────────── */
25
25
  /*───────────────────────────────────────────────────────────────*/
26
26
 
27
+ <% if (Object.values(model.fields || {}).some(holdsMedia)) { -%>
28
+ /**
29
+ * What a media field stores: a reference to a media-library asset. Point at the
30
+ * asset by `id`, or by the `url` an upload returned and Fimo resolves the `id`
31
+ * for you. `alt` belongs to the entry, so it survives replacing the asset. The
32
+ * facts the asset owns are never copied in, so they cannot go stale.
33
+ */
34
+ export type FimoMediaRef = ({ id: string; url?: string } | { id?: string; url: string }) & {
35
+ alt?: string;
36
+ source?: "local" | "external";
37
+ };
38
+
39
+ /**
40
+ * What a read returns for a media field it named in `populate`: the reference
41
+ * plus the facts the asset owns as of that read. `name`, `mime`, `width`, and
42
+ * `height` remain optional when the asset is external, missing, or incomplete.
43
+ * A read that did not name the field returns `FimoMedia` with those facts absent.
44
+ */
45
+ export type FimoPopulatedMedia = FimoMedia & { name?: string; mime?: string };
46
+
47
+ <% } -%>
27
48
  /**
28
49
  * <%= model.pascal %> entity interface
29
50
  */
@@ -131,10 +152,8 @@ function getInputTypeForField(field) {
131
152
  return 'string';
132
153
  case 'json':
133
154
  return 'Record<string, unknown>';
134
- case 'media': {
135
- const media = 'Pick<FimoMedia, "url" | "alt" | "name" | "mime" | "width" | "height">';
136
- return field.multiple ? `${media}[]` : media;
137
- }
155
+ case 'media':
156
+ return field.multiple ? 'FimoMediaRef[]' : 'FimoMediaRef';
138
157
  case 'reference': {
139
158
  const raw = Array.isArray(field.targets) && field.targets.length > 0 ? 'FimoPolymorphicReference' : 'FimoReference';
140
159
  return field.many ? `${raw}[]` : `${raw} | null`;
@@ -176,6 +195,32 @@ function getBlocksType(field, input) {
176
195
  return `${item}[]`;
177
196
  }
178
197
 
198
+ /** A media field, or a blocks field with a media value in some variant. */
199
+ function holdsMedia(field) {
200
+ if (field.type === 'media') {
201
+ return true;
202
+ }
203
+ if (field.type !== 'blocks') {
204
+ return false;
205
+ }
206
+ const schema = field.schema || {};
207
+ const variants = Array.isArray(schema.oneOf) ? schema.oneOf : [schema];
208
+ return variants.some((variant) => Object.values(variant.fields || {}).some(holdsMedia));
209
+ }
210
+
211
+ /**
212
+ * What the field becomes when `populate` names it. A media field gains the
213
+ * asset facts; a blocks field keeps its declared item types — the media inside
214
+ * it is populated at runtime, but naming which variant carries which value is
215
+ * beyond what this flat contract can say, so the type stays conservative.
216
+ */
217
+ function getPopulatedTypeForField(field) {
218
+ if (field.type === 'media') {
219
+ return field.multiple ? 'FimoPopulatedMedia[]' : 'FimoPopulatedMedia';
220
+ }
221
+ return getBlocksType(field, false);
222
+ }
223
+
179
224
  function getStringLiteralUnion(field) {
180
225
  if (!Array.isArray(field.options) || field.options.length === 0) {
181
226
  return null;
@@ -202,17 +247,26 @@ function isConditionalField(field) {
202
247
  return field.showIf !== undefined || field.showIfAny !== undefined;
203
248
  }
204
249
 
205
- const populatedReferenceFields = Object.entries(model.fields || {}).filter(([, field]) => {
250
+ const modelFields = Object.entries(model.fields || {});
251
+ const populatedReferenceFields = modelFields.filter(([, field]) => {
206
252
  if (field.type !== 'reference') {
207
253
  return false;
208
254
  }
209
255
  return (Array.isArray(field.targetRefs) && field.targetRefs.length > 0) || typeof field.targetPascal === 'string';
210
256
  });
257
+ const populatedMediaFields = modelFields.filter(([, field]) => holdsMedia(field));
258
+ const populatableFields = [...populatedReferenceFields, ...populatedMediaFields];
211
259
  -%>
212
260
 
213
- <% if (populatedReferenceFields.length === 0) { -%>
261
+ <% if (populatableFields.length === 0) { -%>
214
262
  export type <%= model.pascal %>References = Record<never, never>;
215
263
  <% } else { -%>
264
+ /**
265
+ * What each populatable field returns when a read names it in `populate`: a
266
+ * reference field resolves to its target entry, a media field to the asset's
267
+ * current facts, a blocks field to the same items with every media value
268
+ * inside them filled. Fields absent here are returned as stored.
269
+ */
216
270
  export interface <%= model.pascal %>References {
217
271
  <%
218
272
  populatedReferenceFields.forEach(([key, field]) => {
@@ -235,6 +289,11 @@ populatedReferenceFields.forEach(([key, field]) => {
235
289
  <%= key %>: <%= type %>;
236
290
  <%
237
291
  });
292
+ populatedMediaFields.forEach(([key, field]) => {
293
+ -%>
294
+ <%= key %>: <%= getPopulatedTypeForField(field) %>;
295
+ <%
296
+ });
238
297
  -%>
239
298
  }
240
299
  <% } -%>
@@ -44,7 +44,7 @@ A Fimo project is identified by `.fimo/project.json`, written by `fimo init`. Th
44
44
 
45
45
  ## Critical: commands target the Branch matching the current git branch
46
46
 
47
- A project can have multiple **Branches** — each is a git branch _plus_ its own DB, sandbox, preview, and assets. Project-scoped commands (`deploy`, `status`, `entries`, `diff`, …) operate on the Branch matching the **current git branch**, and print a one-line banner saying which one. New projects start on `main`. Override for a single command with the canonical `--branch <name>` flag; the legacy `--env <name>` spelling still works, but passing both with different values fails (`BRANCH_OPTION_CONFLICT`) instead of picking one. Never edit the link file to switch. The full git-shaped workflow (`branch` / `checkout` / `switch` / `pull` / `diff` / `merge` / `status` / `publish`) lives in `references/branches.md`.
47
+ A project can have multiple **Branches** — each is a git branch _plus_ its own DB, sandbox, preview, and assets. Project-scoped commands (`deploy`, `status`, `entries`, `diff`, …) operate on the Branch matching the **current git branch**, and print a one-line banner saying which one. New projects start on `main`. Override for a single command with the canonical `--branch <name>` flag; the removed `--env <name>` spelling is rejected. Never edit the link file to switch. The full git-shaped workflow (`branch` / `checkout` / `switch` / `pull` / `diff` / `merge` / `status` / `publish`) lives in `references/branches.md`.
48
48
 
49
49
  ## Quick Start
50
50
 
@@ -83,7 +83,7 @@ Load the matching reference when the user's request fires its trigger. Recipes t
83
83
  - "Declare Pages routes / configure Pages sources or route params / control what Studio shows for a route" → `references/pages.md`
84
84
  - "Add a contact / signup / feedback / newsletter form" → `references/forms.md` (workflow) **+ run `fimo skills get fimo-code --ref forms` for the JSON spec and generated client**
85
85
  - "View form submissions / who filled out the contact form / inspect what users sent / how many signups" → `references/forms.md` § Reading submissions
86
- - "Upload an image / hero / cover / existing media file" → `references/assets.md` (workflow: upload, browse, open, delete) **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape and rendering**
86
+ - "Upload, inspect, replace, safely remove, or permanently destroy an image / hero / cover / existing media file" → `references/assets.md` **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape and rendering**
87
87
  - "Generate AI image / video / draft preview / image edit / cover from a prompt" → `references/media.md` (task commands, quality, recipes, and verification) **+ run `fimo skills get fimo-code --ref assets` for the `FimoMedia` shape if you'll plug the result into UI**
88
88
  - "Add labels / update static copy / fix missing `t()` values" → `references/labels.md` (workflow) **+ run `fimo skills get fimo-code --ref labels` and load the detected framework reference**
89
89
  - "Enable locales / configure default locale / integrate an existing locale system" → `references/locales.md` **+ run `fimo skills get fimo-code --ref locales` and load the detected framework locale reference**
@@ -106,6 +106,7 @@ Load the matching reference when the user's request fires its trigger. Recipes t
106
106
  - "Modify the URL of the website / change my project's address / connect a custom domain (e.g. blog.example.com) / rename the Fimo-provided `*.fimo.site` subdomain / buy a new domain through Fimo / set up a domain" → `references/domains.md`
107
107
  - "Invite a collaborator / add Marc / share with client" → `references/invite.md`
108
108
  - "Login / log out / who am I / switch organization" → `references/account.md` — note: switching **org** is `fimo orgs switch`; bare `fimo switch` changes the active **Fimo Branch** (see `references/branches.md`)
109
+ - "Check the Inbox / what are my agents waiting on / answer a blocked agent / an agent asked me a question / approve or deny what an agent asked for (`fimo inbox *`)" → `references/inbox.md`. Never answer on the person's behalf.
109
110
  - "Create / scaffold / run / validate an agent / agent bundle / wire or enable its triggers / list agent templates / view agent runs, reports, or logs (`fimo agents *`)" → `references/agents.md`
110
111
  - "Install Fimo for my agent / fimo skills install / set up Claude Code, Codex, or Cursor for Fimo" → `references/agent-setup.md`
111
112
  - "Add, inspect, search, or run a remote MCP server / use `fimo mcp`" → `references/mcp.md`
@@ -130,6 +131,7 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
130
131
  - **You need the current preview URL but haven't changed code** (opening it, screenshotting it, handing it to another tool, the previous URL expired) → `fimo preview url`, never a no-op `fimo deploy`. See `references/preview.md`.
131
132
  - **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`.
132
133
  - **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`.
134
+ - **When a project agent has stopped and is waiting on a person** → `fimo inbox list --topic agent_question --unread` surfaces it. Show the stored form to the person, collect their explicit answer, and submit it with `fimo inbox answer`. See `references/inbox.md`.
133
135
  - **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`.
134
136
  - **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.
135
137
  - **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).
@@ -146,6 +148,6 @@ These fire at specific moments in the project lifecycle. **Surface them proactiv
146
148
  - **Adding another deploy tool (Vercel, Netlify, Cloudflare Pages)** — Fimo handles deploys; don't bolt another platform on.
147
149
  - **Committing secrets** — hidden values use `fimo secrets`; public browser-safe values use `fimo vars`. Local env files are ignored and must not become deploy inputs.
148
150
  - **Hardcoding tokens in flags** — use the credentials written by `fimo login` (one file per backend at `~/.config/fimo/credentials/<host>-<hash>.json`).
149
- - **Treating the daily allowance as extra credits** — `fimo credits` already includes spendable daily free credits in "Available now"; the allowance section is accounting context, not an amount to add.
151
+ - **Treating the daily allowance as extra credits** — the allowance section appears only for legacy Premium organizations, and `fimo credits` already includes its spendable credits in "Available now"; it is accounting context, not an amount to add.
150
152
  - **Trying to refill credits from the CLI** — `fimo credits` is read-only. Buying/refilling credits belongs in the billing UI for now.
151
153
  - **`fimo agents run` to push bundle changes** — it doesn't. The bundle reaches the server through `fimo deploy` (it lives in git, not the DB), and that push to `main` is also what wires the declared triggers. `run` dispatches the _deployed_ version. Deploy first. There is no `activate` command. See `references/agents.md`.
@@ -7,7 +7,7 @@ The `fimo agents` namespace authors and operates **agent bundles** — multi-fil
7
7
  The namespace splits cleanly in two:
8
8
 
9
9
  - **Bundle authoring** — `create`, `list-templates`, `list`, `validate`, `secrets add/remove/list`. Local config editing, no API call except the project-level validation path. Operates on the files under `.fimo/agents/<name>/` (or root `agents/<name>/` for legacy projects).
10
- - **Cloud ops** — `run`, `runs`, `report`, `logs`. Branch-aware, talk to the server. Default `--branch` is `main`; the legacy `--env` spelling remains an alias. `--project` defaults to the linked project in `.fimo/project.json` or legacy `.fimo.settings.json`.
10
+ - **Cloud ops** — `run`, `runs`, `report`. Branch-aware, talk to the server. Default `--branch` is `main`; `--env` is rejected as a Branch selector. `--project` defaults to the linked project in `.fimo/project.json` or legacy `.fimo.settings.json`.
11
11
 
12
12
  The bundle lives in **git** (`.fimo/agents/<name>/`, or legacy root `agents/<name>/`), not the database. The DB only mirrors what `config.yaml` declares on `main` (which triggers are wired) plus **run sessions**. So the bundle reaches the server through `fimo deploy` — and that push to `main` is also what wires its triggers. There is no activate command: deploying IS the enablement act, and removing a trigger from `config.yaml` tears it down on the next deploy.
13
13
 
@@ -23,7 +23,6 @@ fimo deploy # push to main — this also wires the declared tr
23
23
  fimo agents run <name> # trigger a manual run → sessionId
24
24
  fimo agents runs <name> # see past sessions
25
25
  fimo agents report <name> # print a run's outcome summary
26
- fimo agents logs <name> # stream a session's log
27
26
  ```
28
27
 
29
28
  ## Bundle authoring (local)
@@ -57,6 +56,31 @@ integrations:
57
56
  An explicit map is restrictive: only entries set to `true` are available. An omitted or disabled integration cannot be
58
57
  used. See `references/integrations.md` for project setup, auth, and provider-specific commands.
59
58
 
59
+ Declare a `runtime` block in `config.yaml` to gate where a bundle runs and bound what one run costs:
60
+
61
+ ```yaml
62
+ runtime:
63
+ cloud: true
64
+ dev: false
65
+ long_running: false
66
+ max_credits: 5000
67
+ max_steps: 40
68
+ ```
69
+
70
+ - `cloud` / `dev` — declared boolean environment flags for where the bundle may run.
71
+ - `long_running` — same capability as the `runtime:long_running` token: lets the run exceed the default time limit.
72
+ - `max_credits` — the run's own credit ceiling (integer, credits ≥ 1). The default scaffold template ships
73
+ `max_credits: 5000` as a visible starter limit. Unset: the run may spend up to the organization's available
74
+ credits at admission.
75
+ - `max_steps` — cap on model-loop steps for one run (integer ≥ 1). Unset: no step cap; only `max_credits` (or the
76
+ organization's balance) and the plan's agent-hours bound the run.
77
+
78
+ All five keys are optional; an absent `runtime` block behaves as if every key were unset. There is no platform step cap
79
+ and no legacy per-session cost ceiling — the only stops are these author-owned limits, the organization running out of
80
+ credits (`insufficient_credits`), and the agent-hours allowance. A limit that fires records a truthful terminal reason
81
+ (`max_steps`, `budget_exceeded`, `insufficient_credits`, or `finish_run_missing` when a run ends without calling
82
+ `finish_run`), readable via `fimo agents report` and the Studio run page.
83
+
60
84
  ## How a cloud run ends
61
85
 
62
86
  Fimo creates one task Branch and environment for a cloud run, tells the agent their names, and manages their lifecycle.
@@ -244,13 +268,11 @@ Example for a content editor that can read and update entries but cannot change
244
268
  fimo agents run <name> [--branch <branch>] [--project <id>] [--skip-drift-check] [-C <dir>]
245
269
  fimo agents runs <name> [--limit <n>] [--cursor <cursor>] [--all-pages] [--branch <branch>] [--project <id>] [-C <dir>]
246
270
  fimo agents report <name> [--session <id>] [--branch <branch>] [--project <id>] [-C <dir>]
247
- fimo agents logs <name> [--session <id>] [--project <id>] [-C <dir>]
248
271
  ```
249
272
 
250
- - **`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.
251
- - **`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.
252
- - **`report <name>`** — print a run's structured **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 returns plain text without calling `finish_run` receives a small structured fallback document. With no `--session`, the most recent run for `<name>` is used (combine with `--branch` to scope); `--session <id>` targets a specific run. Output is projected 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 report, 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.
253
- - **`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`.
273
+ - **`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`.
274
+ - **`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 uses the canonical `branch` field.
275
+ - **`report <name>`** — print a run's structured **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 returns plain text without calling `finish_run` receives a small structured fallback document. With no `--session`, the most recent run for `<name>` is used (combine with `--branch` to scope); `--session <id>` targets a specific run. Output is projected 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 report, it says so (and shows the stop reason when there is one).
254
276
 
255
277
  ## How triggers get wired
256
278
 
@@ -3,7 +3,7 @@
3
3
  > Package contract: run `fimo skills get fimo-code --ref assets` for `FimoMedia`, `--ref ui` for rendering primitives, and load the detected framework reference for framework-specific integration.
4
4
  > For **generating** new images / videos with AI, see **`references/media.md`** for the task commands and recipes.
5
5
 
6
- This file covers the **CLI workflow** for media that already exists: uploading files, browsing the library, opening an asset to inspect it, moving / deleting items.
6
+ This file covers the **CLI workflow** for media that already exists: uploading files, browsing the library, inspecting reference impact, replacing references, and removing assets safely.
7
7
 
8
8
  ## Upload a file
9
9
 
@@ -145,11 +145,47 @@ When the agent needs to **see** the image — e.g., Claude inspecting it to pick
145
145
  fimo assets create-folder "Blog Images"
146
146
  fimo assets create-folder "Covers" --parent-id <uuid>
147
147
  fimo assets move <asset-id> --parent-id <folder-uuid>
148
- fimo assets delete <asset-id>
149
148
  ```
150
149
 
151
150
  `--parent-id` is **required** on `move` and must be a folder UUID. (Moving an asset back to the library root isn't supported by this command today — the server rejects a non-UUID parent.)
152
151
 
152
+ ## Inspect, replace, and remove safely
153
+
154
+ Check structured content references before removal:
155
+
156
+ ```bash
157
+ fimo assets usage <asset-id> --json
158
+ ```
159
+
160
+ The result reports coverage, status, and counts for the Current Branch, Main, and Live. Other Branches are not checked, so this is guidance, never a project-wide claim that an asset is unused. Code references are not scanned.
161
+
162
+ Replace structured references only in the Current Branch:
163
+
164
+ ```bash
165
+ fimo assets replace <source-id> --with <replacement-id>
166
+ ```
167
+
168
+ This changes references, not file bytes. It leaves the original asset, Main, Live, other Branches, and code references unchanged.
169
+
170
+ Remove from the selected environment and include reference guidance in the receipt:
171
+
172
+ ```bash
173
+ fimo assets remove <asset-id>
174
+ fimo assets remove <source-id> --replace-with <replacement-id>
175
+ fimo assets remove <asset-id> --without-checking
176
+ ```
177
+
178
+ Reference counts and incomplete scopes do not block environment removal. Main and Live keep their rows, and shared bytes remain available to them. Use `--replace-with` when Current Branch references should point to another asset before removal. `--without-checking` skips only the guidance scan and remains environment-scoped.
179
+
180
+ Project-wide destruction is separate and requires confirmation:
181
+
182
+ ```bash
183
+ fimo assets remove <asset-id> --permanent
184
+ fimo assets remove <asset-id> --permanent --yes
185
+ ```
186
+
187
+ Use `--permanent` only when the user explicitly wants the asset destroyed across the project. It cannot be combined with `--replace-with` or `--without-checking`. The legacy `fimo assets delete` spelling remains an alias for `remove`.
188
+
153
189
  ## End-to-end workflow
154
190
 
155
191
  1. Upload with `fimo assets upload`, use `fimo assets bulk-upload` for a batch, or generate with a task command such as `fimo image generate`.
@@ -4,7 +4,7 @@
4
4
 
5
5
  A Fimo **Branch** is a multi-surface clone of the project: a git branch **plus** its own Neon DB branch, sandbox, preview URL, and R2 asset prefix. The CLI mirrors `git` command shapes so the workflow transfers directly — same verbs, multi-surface semantics. In Project Settings, an **Environment** is a grouping policy such as Production or Preview; it is not this Branch-backed clone.
6
6
 
7
- Every project starts with one Branch: `main`. You create more for feature work, deploy previews per Branch, then merge back and publish.
7
+ New standalone projects start with one Branch: `main`. Linking an unversioned folder, cloning, and scaffolding read the project's default Branch from Fimo when they set up Git. You create more for feature work, deploy previews per Branch, then merge back and publish.
8
8
 
9
9
  ## The Branch model — how every command picks its target
10
10
 
@@ -15,10 +15,11 @@ fimo --branch <name> <command> # peek at another Branch for one command (does n
15
15
  ```
16
16
 
17
17
  - **`--branch <name>`** is the canonical global override. `fimo --branch main status` inspects `main` while you stay checked out on your feature Branch.
18
- - **`--env <name>`** remains a deprecated alias for `--branch`. Passing both with **different** values fails with `BRANCH_OPTION_CONFLICT` rather than picking a winner; passing both with the same value is fine.
18
+ - **`--env <name>`** is not a Branch selector. It is rejected; use `--branch <name>`.
19
19
  - Git-changing commands use the current branch; cross-branch status only reports the mismatch.
20
+ - If Git cannot name a Branch, the CLI stops instead of guessing. Check out a Branch or pass `--branch <name>`. Sandboxes receive their Branch through `FIMO_ENV`.
20
21
  - If the git branch maps to no Fimo Branch, the CLI errors with a hint (`fimo branch` to list, `fimo branch <name>` to create) rather than guessing.
21
- - **`main`** is the default Branch and cannot be deleted.
22
+ - The project's default Branch cannot be deleted. Existing standalone projects use **`main`**.
22
23
  - **`release/*`** Branches are **read-only** — they're tags produced by `fimo publish`, not branches you push to. `fimo deploy` refuses them.
23
24
  - **`prod`** is protected: it cannot be created, forked from, checked out, or deleted. It's updated by publishing, never by pushing.
24
25
 
@@ -35,9 +36,9 @@ fimo --branch <name> <command> # peek at another Branch for one command (does n
35
36
  | `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
37
  | `fimo status` | `git status` | Multi-surface status for the current Branch vs its parent. See below. |
37
38
  | `fimo merge <from>` | `git merge` | Merge another Branch into the current one (multi-surface, atomic, interactive conflict resolver). See below. |
38
- | `fimo publish` | — | Publish the already-synced `main` revision with a stable Fimo publication ID. See "Publishing" below. |
39
+ | `fimo publish` | — | Publish the synced Production source revision with a stable Fimo publication ID. See "Publishing" below. |
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
+ All of these accept the global `--branch` override. `diff`, `status`, `merge`, and `publish` additionally accept `-C, --cwd <dir>` to point at a project directory.
41
42
 
42
43
  > **`fimo switch` changes the active Fimo Branch, not the org.** A Fimo Branch keeps its code, database, sandbox, content, and preview together. To change your active organization, use `fimo orgs switch` — see `references/account.md`.
43
44
 
@@ -97,10 +98,10 @@ Syncs the current Branch's data plane from its parent (or `--from <ancestor>`).
97
98
 
98
99
  Two different "go live" mechanisms — don't confuse them:
99
100
 
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
- - **`fimo deploy --publish`** — the project-publish path. Pushes the current `main` code and flips the project live in one shot. See `references/deploy.md`.
101
+ - **`fimo publish [--label <text>] [--notes <md>]`** — publishes the synced Production source revision. Fimo assigns the immutable publication ID; the label and notes are optional annotations. `--skip-validate` is an operator override.
102
+ - **`fimo deploy --publish`** — the project-publish path. Pushes the current Production source code and flips the project live in one shot. See `references/deploy.md`.
102
103
 
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
+ Use `fimo publish` when the Production source Branch is already synced; use `fimo deploy --publish` when the local revision still needs to be pushed first. Both only run from the configured Production source Branch. Existing projects use `main`.
104
105
 
105
106
  ## Anti-patterns
106
107
 
@@ -103,7 +103,7 @@ Reference filters take the target `id` string (`{"author":"750e..."}`). On a to-
103
103
 
104
104
  `--populate` is a comma-separated list of reference fields to embed. Without it, reference fields return reference objects like `{ "id": "..." }`; with `--populate author,contributors`, those fields return the target entry objects for the requested locale. Only reference fields can be populated (scalar fields 400), and populate never selects which target fields come back. A populated target missing in the requested locale resolves to null unless you pass `localeFallbacks=true`, which falls back to the best available locale variant, marked by its `locale` field. Limits: 200 references per to-many write, 500 distinct populated documents per field per request (400 past either).
105
105
 
106
- Polymorphic references declare `targets: ["Post", "Product"]` instead of `target` (never both) and their values carry both parts: `{ "contentType": "Post", "id": "..." }`. Populate returns mixed full entries, and generated hooks expose `$type` on each populated value to branch on. `--where` on polymorphic fields is not supported yet and fails with a clear error.
106
+ Polymorphic references declare `targets: ["Post", "Product"]` instead of `target` (never both) and their values carry both parts: `{ "contentType": "Post", "id": "..." }`. Populate returns mixed full entries, and generated hooks expose `$type` on each populated value to branch on. `--where` on polymorphic fields is not supported yet and fails with a clear error. Fixed and polymorphic references also work inside blocks with these same write shapes (`id`, `documentId`, or `slug` selectors), but nested fields cannot be populated or filtered.
107
107
 
108
108
  In generated application code, the equivalent is `populate: ['author', 'contributors'] as const` in query params. Let the generated client infer the result when possible; if a named TypeScript shape is needed, use `BlogPostResult<TFields, TPopulate>` as documented by `fimo skills get fimo-code --ref content/clients`. Writes use `BlogPostInput`.
109
109
 
@@ -13,31 +13,29 @@ This command is **project-scoped but not Branch-scoped**. It does not depend on
13
13
 
14
14
  ## Pretty Output
15
15
 
16
- The human output has three sections:
16
+ The human output has two sections:
17
17
 
18
18
  - **Available now** - total spendable credits across all usable buckets, plus a status of `OK`, `Low`, or `Unavailable`.
19
- - **Breakdown (included in available now)** - daily free, monthly, purchased, and awarded buckets. These are components of the total, not extra credits to add again.
20
- - **Daily allowance (not additional balance)** - period cap, period usage, remaining period allowance, and the maximum daily grant. This explains plan/accounting limits and can be absent.
19
+ - **Breakdown (included in available now)** - daily free, monthly, purchased, and awarded buckets. These are components of the total, not extra credits to add again. Daily free is 0 except for organizations on the legacy Premium plan, the only plan with daily credits.
21
20
 
22
21
  Example:
23
22
 
24
23
  ```txt
25
24
  Available now
26
- 12,430 credits
25
+ 11,830 credits
27
26
  Status: OK
28
27
 
29
28
  Breakdown (included in available now)
30
- Daily free 600 expires today
29
+ Daily free 0
31
30
  Monthly 8,000
32
31
  Purchased 3,000
33
32
  Awarded 830
34
-
35
- Daily allowance (not additional balance)
36
- Used this period: 4,400 / 5,000
37
- Remaining period: 600
38
- Daily grant: up to 1,000 / day
39
33
  ```
40
34
 
35
+ Organizations on the legacy Premium plan also show a "Daily allowance (not
36
+ additional balance)" section. It is accounting context already included in
37
+ "Available now", never extra credits to add.
38
+
41
39
  ## JSON Output
42
40
 
43
41
  Use `--json` when another tool or agent needs to parse the balance:
@@ -51,29 +49,24 @@ Use `--json` when another tool or agent needs to parse the balance:
51
49
  "projectId": "project_123",
52
50
  "organizationId": "org_123",
53
51
  "balance": {
54
- "totalAvailable": 12430,
52
+ "totalAvailable": 11830,
55
53
  "nearLimit": false,
56
54
  "canUseAi": true,
57
55
  "buckets": {
58
- "dailyFreeAvailable": 600,
56
+ "dailyFreeAvailable": 0,
59
57
  "monthlyAvailable": 8000,
60
58
  "purchasedAvailable": 3000,
61
59
  "awardedAvailable": 830
62
60
  }
63
61
  },
64
62
  "allowances": {
65
- "dailyCredits": {
66
- "periodCap": 5000,
67
- "dailyGrant": 1000,
68
- "usedThisPeriod": 4400,
69
- "remainingThisPeriod": 600
70
- }
63
+ "dailyCredits": null
71
64
  }
72
65
  }
73
66
  }
74
67
  ```
75
68
 
76
- `allowances.dailyCredits` can be `null` when the project owner's plan/account does not expose a daily allowance. Do not derive spendability from the allowance alone; use `balance.canUseAi`, `balance.nearLimit`, and `balance.totalAvailable`.
69
+ `allowances.dailyCredits` is `null` except for organizations on the legacy Premium plan, the only plan with a daily allowance. Do not derive spendability from the allowance alone; use `balance.canUseAi`, `balance.nearLimit`, and `balance.totalAvailable`.
77
70
 
78
71
  ## When To Run It
79
72
 
@@ -4,7 +4,7 @@
4
4
 
5
5
  > **Local vs hosted.** The local dev server is localhost only. The Fimo **dashboard preview** and the authenticated **project-member preview URL** are served by the deployed sandbox — so if the developer wants to see the site in the dashboard or send another project member a link, that requires a `fimo deploy`.
6
6
 
7
- `fimo deploy` uses the current Branch. New projects start on `main`; `release/*` is read-only, and `--publish` only runs from `main`. See `references/branches.md` for the multi-Branch workflow.
7
+ `fimo deploy` uses the current Branch. New projects start on `main`; `release/*` is read-only, and `--publish` only runs from the project's configured Production source Branch. See `references/branches.md` for the multi-Branch workflow.
8
8
 
9
9
  Before deploying, Fimo fast-forwards a clean checkout that is behind and stops on dirty-behind or diverged branches. This syncs the whole branch, including config commits from Studio or locale commands.
10
10
 
@@ -20,7 +20,7 @@ fimo deploy -m "<commit message>" --publish # also publish a new live version
20
20
  ```
21
21
 
22
22
  - **`fimo deploy`** — commits pending changes, pushes to the current Branch, syncs that Branch's preview sandbox, and links to the Preview and Fimo dashboard.
23
- - **`fimo deploy --publish`** — same as above, then triggers a live publish and prints the live URL. Runs from `main` only. **Only use `--publish` when the user signals "ship it"** — first-time site completion, or an explicit "publish" / "go live" request. Otherwise stick to plain `fimo deploy`. (For a _versioned_ prod release, use `fimo publish` instead — see below.)
23
+ - **`fimo deploy --publish`** — same as above, then triggers a live publish and prints the live URL. Runs from the configured Production source Branch only. **Only use `--publish` when the user signals "ship it"** — first-time site completion, or an explicit "publish" / "go live" request. Otherwise stick to plain `fimo deploy`. (For a _versioned_ prod release, use `fimo publish` instead — see below.)
24
24
  - **`-m`** is the commit message used when there are uncommitted local changes; required in non-interactive shells. Omit if the working tree is already clean.
25
25
  - **`--no-restart`** — tells the sandbox to skip the dev-server restart and let Vite HMR pick up the change. Shaves ~3s per deploy. See "Skipping the dev-server restart" below for when it's safe.
26
26
 
@@ -121,10 +121,10 @@ There's nothing special about this — it's the same `fimo deploy` you'd run lat
121
121
 
122
122
  Two different "go live" mechanisms — pick deliberately:
123
123
 
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.
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`.
124
+ - **`fimo deploy --publish`** — push what's on the Production source Branch now and flip the project live in one shot. The simple "ship it" path. Runs from that Branch only.
125
+ - **`fimo publish [--label <text>] [--notes <md>]`** — publish the synced Production source revision without pushing. Fimo assigns the immutable publication ID; a label and notes are optional human annotations. See `references/branches.md`.
126
126
 
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.
127
+ When unsure, use `fimo deploy --publish` so the local revision is pushed before it goes live. Use `fimo publish` when the Production source Branch is already synced.
128
128
 
129
129
  ## Markdown for AI agents
130
130
 
@@ -157,7 +157,7 @@ fimo deploy
157
157
 
158
158
  - Source of truth is this git repo.
159
159
  - **Never** edit `.fimo/project.json`; it is generated by `fimo init`.
160
- - Each Branch deploys to its own preview sandbox; `--publish` and `fimo publish` run from `main` only. See `references/branches.md`.
160
+ - Each Branch deploys to its own preview sandbox; `--publish` and `fimo publish` run from the configured Production source Branch only. See `references/branches.md`.
161
161
 
162
162
  ## After the first successful deploy
163
163
 
@@ -18,8 +18,8 @@ fimo history restore <version-id>
18
18
 
19
19
  Studio chat can run `history list` and `history show`. Create and restore remain available through the standalone CLI and Studio's History page.
20
20
 
21
- Use the global `--branch <name>` option to target a different Branch. The legacy
22
- `--env <name>` spelling remains a compatibility alias. Use `--project <id>` when
21
+ Use the global `--branch <name>` option to target a different Branch. The removed
22
+ `--env <name>` spelling is rejected as a Branch selector. Use `--project <id>` when
23
23
  there is no local `.fimo/project.json`.
24
24
 
25
25
  ## Pagination and usage
@@ -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.