fimo 2.8.0 → 2.9.0-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.
- package/assets/skills/fimo-cli/references/branches.md +5 -2
- package/assets/skills/fimo-cli/references/hosting.md +22 -22
- package/assets/skills/fimo-code/references/frameworks/next.md +1 -10
- package/assets/skills/fimo-migration/references/frameworks/nextjs.md +1 -22
- package/assets/skills/fimo-migration/references/qa.md +1 -11
- package/assets/skills/fimo-studio/references/ai-chat.md +9 -3
- package/assets/skills/fimo-studio/references/preview-and-responsive.md +1 -0
- package/dist/build/astro/config.js +32 -1
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +78 -74
- package/dist/runtime/preview/frame-headers.d.ts +14 -0
- package/dist/runtime/preview/frame-headers.js +96 -0
- package/dist/runtime/preview/index.d.ts +1 -0
- package/dist/runtime/preview/index.js +1 -0
- package/package.json +8 -8
- package/release.json +2 -2
- package/templates/astro/package.json +3 -3
- package/templates/nextjs/package.json +5 -5
- package/templates/react-router/package.json +5 -5
- package/templates/sveltekit/package.json +3 -3
- package/templates/vite/package.json +5 -5
|
@@ -83,12 +83,15 @@ fimo status --json # machine-readable
|
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
85
|
fimo merge feat/seo # merge feat/seo into the current Branch
|
|
86
|
-
fimo merge feat/seo -y # non-interactive:
|
|
86
|
+
fimo merge feat/seo -y # non-interactive: keep the target's value on every conflict
|
|
87
|
+
fimo merge feat/seo --resume # continue a stopped merge, or follow one still applying
|
|
87
88
|
fimo merge feat/seo --allow-direct-merge # override the "don't merge straight onto main" gate
|
|
88
89
|
```
|
|
89
90
|
|
|
90
91
|
- Merging directly onto `main` is gated — the CLI refuses unless you pass `--allow-direct-merge`. Prefer merging on a branch and publishing.
|
|
91
|
-
- On conflicts you get
|
|
92
|
+
- On conflicts nothing is applied. In a terminal you get a resolver per row: **parent** (keep the target's value), **child** (take the source's value), **pick** (edit in `$EDITOR`), or **abort**. `-y` keeps the target's value for everything.
|
|
93
|
+
- `--json` never prompts. Unresolved conflicts exit non-zero with `MERGE_CONFLICTS`; `error.details` carries `merge_id`, `from`, `to`, and `conflicts`. Re-run with `--resume --yes` to keep the target's values, or resolve interactively.
|
|
94
|
+
- After resolutions are accepted the CLI waits for the merge: success is `status: "ok"` with the completed merge's `mergeId` and `summary` but no `applied` list (per-surface counts are only reported when a merge applies cleanly without conflicts); `MERGE_FAILED` and `MERGE_CANCELLED` are terminal; `MERGE_IN_PROGRESS` means it is still applying — run `--resume` to keep following it. `--resume` never resubmits a merge that is already applying.
|
|
92
95
|
|
|
93
96
|
## `fimo pull`
|
|
94
97
|
|
|
@@ -33,31 +33,25 @@ Declare redirects, headers, rewrites, and URL shape in
|
|
|
33
33
|
|
|
34
34
|
Every field is optional. Only what you declare is emitted.
|
|
35
35
|
|
|
36
|
-
## Preview and security headers
|
|
37
|
-
|
|
38
|
-
A restrictive application-owned CSP or `X-Frame-Options` policy can block Studio
|
|
39
|
-
Preview. Do not assume automatic header rewriting; Next.js `withFimo` does not
|
|
40
|
-
provide it. Inspect the served policy and scope any manual adaptation to Preview,
|
|
41
|
-
preserving production protections and unrelated headers. `frame-ancestors`
|
|
42
|
-
permits the Studio parent, not the framed app's preview origin. Never derive
|
|
43
|
-
ancestor sources from a preview-origin variable. For `script-src`, `connect-src`,
|
|
44
|
-
`frame-src`, and `form-action`, use resolved/observed Fimo resources and endpoints
|
|
45
|
-
actually used by the iframe. Studio-parent WebSockets do not belong in app CSP.
|
|
46
|
-
|
|
47
36
|
## Matching
|
|
48
37
|
|
|
49
38
|
`source` matches the pathname only, never the query string.
|
|
50
39
|
|
|
51
|
-
| Pattern | Matches
|
|
52
|
-
| --------------- |
|
|
53
|
-
| `/about` | exactly that path
|
|
54
|
-
| `/blog/:slug` | one segment, captured as `slug`
|
|
55
|
-
| `/proxy/:rest*` | any number of segments, including none
|
|
56
|
-
| `/(.*)` | everything
|
|
40
|
+
| Pattern | Matches |
|
|
41
|
+
| --------------- | --------------------------------------------- |
|
|
42
|
+
| `/about` | exactly that path |
|
|
43
|
+
| `/blog/:slug` | one segment, captured as `slug` |
|
|
44
|
+
| `/proxy/:rest*` | any number of segments, including none |
|
|
45
|
+
| `/(.*)` | everything |
|
|
46
|
+
| `/:path(.*)` | everything, including `/`, captured as `path` |
|
|
57
47
|
|
|
58
48
|
Captured names are reusable in `destination`: `/blog/:slug` →
|
|
59
49
|
`/posts/:slug`. `destination` may be an absolute path or an external URL.
|
|
60
50
|
|
|
51
|
+
Fimo preserves `source` as written. Use `/:path(.*)` when a redirect, rewrite,
|
|
52
|
+
or header rule must include the homepage `/`; do not assume `/:path*` includes
|
|
53
|
+
it. Keep `:path*` in the destination to reuse the captured path.
|
|
54
|
+
|
|
61
55
|
## Conditions
|
|
62
56
|
|
|
63
57
|
Any redirect, rewrite, or header rule can require more than a path match. `has`
|
|
@@ -93,9 +87,15 @@ them are present.
|
|
|
93
87
|
Omit `value` to match on presence alone, as the `consent` cookie above does.
|
|
94
88
|
The redirect example requires the request to include `x-promo: summer`.
|
|
95
89
|
|
|
90
|
+
For a www-to-apex redirect, connect both hostnames and use
|
|
91
|
+
`{"source":"/:path(.*)","has":[{"type":"host","value":"www.example.com"}],"destination":"https://example.com/:path*","statusCode":301}`.
|
|
92
|
+
The host condition matches the visitor's requested hostname. Verify `/`, a
|
|
93
|
+
nested path, and a query string, and check that the destination host does not
|
|
94
|
+
redirect back.
|
|
95
|
+
|
|
96
96
|
**Prefer doing this in the application when it can.** Middleware, a loader, or a
|
|
97
|
-
server component can be run and tested locally; a condition here
|
|
98
|
-
|
|
97
|
+
server component can be run and tested locally; a condition here takes effect
|
|
98
|
+
on hosted deployments and needs verification there. Reach for `has` when
|
|
99
99
|
the app cannot act — a redirect that must happen before any code runs, or a
|
|
100
100
|
header on a static asset.
|
|
101
101
|
|
|
@@ -121,6 +121,6 @@ header on a static asset.
|
|
|
121
121
|
## Verify
|
|
122
122
|
|
|
123
123
|
`fimo validate` rejects an unknown `hosting` key, so a typo fails locally
|
|
124
|
-
rather than silently doing nothing in production.
|
|
125
|
-
|
|
126
|
-
the preview.
|
|
124
|
+
rather than silently doing nothing in production. Hosting rules apply to
|
|
125
|
+
hosted deployments; the sandbox dev server does not exercise them. Verify
|
|
126
|
+
affected routes on the hosted preview and after an authorized publish.
|
|
@@ -57,16 +57,7 @@ const nextConfig: NextConfig = {};
|
|
|
57
57
|
export default withFimo(nextConfig);
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
-
Preserve existing config fields and config-function logic.
|
|
61
|
-
does not rewrite response headers or adapt application-owned CSP. A restrictive
|
|
62
|
-
policy may need a manual Preview adaptation; inspect actual framing and blocked
|
|
63
|
-
requests, preserve production protections, and verify the result in a browser.
|
|
64
|
-
`frame-ancestors` permits the Studio parent, not the app's preview origin or a
|
|
65
|
-
value derived from a preview-origin variable. `script-src`, `connect-src`,
|
|
66
|
-
`frame-src`, and `form-action` concern resources/endpoints used by the iframe;
|
|
67
|
-
use the resolved connection and observed requests. Never add a Studio-parent
|
|
68
|
-
WebSocket to application CSP. Scope exceptions to Preview and keep unrelated
|
|
69
|
-
security headers unchanged.
|
|
60
|
+
Preserve existing config fields and config-function logic.
|
|
70
61
|
|
|
71
62
|
## Client dependency
|
|
72
63
|
|
|
@@ -105,32 +105,11 @@ Do not create or edit `.env` / `.env.local` for a linked project's Fimo
|
|
|
105
105
|
connection. Run the project's normal `next dev`, `next build`, and `next start`
|
|
106
106
|
commands, then exercise at least one server read and one client-side data read.
|
|
107
107
|
|
|
108
|
-
## Preview
|
|
108
|
+
## Preview integration
|
|
109
109
|
|
|
110
110
|
Keep the generated `FimoProvider` and `withFimo` integration. It supports
|
|
111
111
|
rendering Fimo Preview in Fimo Studio and enabling Edit Mode.
|
|
112
112
|
|
|
113
|
-
The application owns response and security headers; `withFimo` currently does
|
|
114
|
-
not rewrite them or adapt CSP automatically. A restrictive policy may still
|
|
115
|
-
need a manual Preview adaptation. Inspect framing behavior and response headers
|
|
116
|
-
first. Scope changes to Preview, preserve production protections and unrelated
|
|
117
|
-
security headers, and record them in the runtime report's Hosting section.
|
|
118
|
-
When the existing policy sends `X-Frame-Options` or an unconditional
|
|
119
|
-
`frame-ancestors` block, condition or relax that framing control only for the
|
|
120
|
-
verified Preview embedding context; retain it for non-Preview and production
|
|
121
|
-
responses.
|
|
122
|
-
|
|
123
|
-
- `frame-ancestors` controls which Fimo Studio parent may embed the app. The
|
|
124
|
-
incident's manual fix used the current Studio sources `https://fimo.ai` and
|
|
125
|
-
`https://*.fimo.ai`. Verify the Studio parent for the target environment;
|
|
126
|
-
these sources are not a universal resource allowlist. Never derive them from
|
|
127
|
-
a preview-origin variable. The sandbox or hosted preview origin identifies
|
|
128
|
-
the app being framed, not its ancestor.
|
|
129
|
-
- `script-src` controls scripts, `connect-src` API and WebSocket connections,
|
|
130
|
-
`frame-src` frames embedded by the app, and `form-action` form submission
|
|
131
|
-
destinations. Base Fimo sources on the resolved connection and observed
|
|
132
|
-
requests made by the preview iframe, only for resources/endpoints it uses.
|
|
133
|
-
|
|
134
113
|
## Locales
|
|
135
114
|
|
|
136
115
|
Keep these claims separate, and treat any one of them as unproven until its
|
|
@@ -112,17 +112,7 @@ and passes only the public connection to the browser. Run the normal `next dev`,
|
|
|
112
112
|
Owned by the runtime lane; verified here read-only.
|
|
113
113
|
|
|
114
114
|
- The target starts locally: the dev server responds without startup errors.
|
|
115
|
-
- Fimo Preview renders the target in Fimo Studio and Edit Mode works.
|
|
116
|
-
is blocked, verify the actual framing behavior and response headers. The
|
|
117
|
-
application owns its security policy; any Preview exception must preserve
|
|
118
|
-
production protections and unrelated security headers.
|
|
119
|
-
- Check CSP sources by purpose: `frame-ancestors` permits the Studio parent;
|
|
120
|
-
the app's preview origin is the framed site. `script-src`, `connect-src`,
|
|
121
|
-
`frame-src`, and `form-action` use resolved/observed Fimo resources and
|
|
122
|
-
endpoints actually used by the iframe. Do not copy ancestor sources into
|
|
123
|
-
resource directives or derive them from a preview-origin variable.
|
|
124
|
-
- `withFimo` does not rewrite response headers. Verify any required manual
|
|
125
|
-
Preview adaptation of an application-owned restrictive policy.
|
|
115
|
+
- Fimo Preview renders the target in Fimo Studio and Edit Mode works.
|
|
126
116
|
- The runtime report covers local startup, preview embedding, build, the
|
|
127
117
|
resolved Fimo connection, header translations, and integration env-key
|
|
128
118
|
names, with every claim backed by evidence.
|
|
@@ -10,15 +10,21 @@ Chat has its own **Chats** tab in the site header; the tab shows how many chats
|
|
|
10
10
|
|
|
11
11
|
Agents and routines appear only when the organization has the agents feature, which is off by default in production. Without it, the **+** above the chat list opens a new chat directly, agent settings have no **Routines**, and existing routines do not run; ask Fimo support to enable it.
|
|
12
12
|
|
|
13
|
-
An agent is a chat with a job: a name and a description that Fimo reads at the start of every reply in that chat. Agents are shared like any chat and are listed as soon as they are created, with an **Agent** tag after the name. The **+** above the chat list is a menu: **New chat** (blank), **New agent** (a name and a description, then the empty agent opens), and under **Agents** Fimo's default agents (**SEO**, **GEO**); a new site starts with
|
|
13
|
+
An agent is a chat with a job: a name and a description that Fimo reads at the start of every reply in that chat. Agents are shared like any chat and are listed as soon as they are created, with an **Agent** tag after the name. The **+** above the chat list is a menu: **New chat** (blank), **New agent** (a name and a description, then the empty agent opens), and under **Agents** Fimo's default agents (**SEO**, **GEO**, **Content**, **Quality**, **Compliance**); a new site starts with SEO and GEO listed, their routines active from the start; Content, Quality and Compliance, and every default on an older site, are created the first time someone selects them, routines active, the same chat every time after. In an agent, the description shows next to its name in the header (one line) and the empty state introduces the agent by name and job (the description's first three lines); a cut description shows whole on hover, or on tap on a phone, and the message box reads **Message <name>**. The agent's settings page has a **Description** field, shared with everyone; empty means none. The filter icon's **Kind** option shows only chats or only agents; search finds an agent by its name.
|
|
14
14
|
|
|
15
|
-
The **SEO** default runs seven routines backed by Studio's built-in `fimo-seo` skill, which checks the site as a browser renders it and fixes at the source: **Technical SEO** (status, redirects, canonicals, sitemap, robots.txt, language, main heading), **Broken links**, **Meta tags** (titles, descriptions, Open Graph, the site's title ending, length in characters and pixels), **Image SEO** (alt text, file names, images over 200 KB), **Hreflang** (only on a site in more than one language) and **SEO monitoring** (changes since its last run, pages moved without a redirect) every day, and **Internal linking** (orphan and deep pages, articles with no link up to a hub or product page or more than eight links) every Monday. A page it changed is left alone for 8 weeks, the time Google takes to show the effect. A fix with one right answer from the page's own words is made without a message (a link only once the new target is checked to be the same content in the same language); a change to what visitors read, which page wins a search, whether a page exists, or a
|
|
15
|
+
The **SEO** default runs seven routines backed by Studio's built-in `fimo-seo` skill, which checks the site as a browser renders it and fixes at the source: **Technical SEO** (status, redirects, canonicals, sitemap, robots.txt, language, main heading), **Broken links**, **Meta tags** (titles, descriptions, Open Graph, the site's title ending, length in characters and pixels), **Image SEO** (alt text, file names, images over 200 KB: one in the media library or the site's own files is rendered through Fimo's resizing on its own, a file of the site uploaded first), **Hreflang** (only on a site in more than one language) and **SEO monitoring** (changes since its last run, pages moved without a redirect) every day, and **Internal linking** (orphan and deep pages, articles with no link up to a hub or product page or more than eight links) every Monday. A page it changed is left alone for 8 weeks, the time Google takes to show the effect. A fix with one right answer from the page's own words is made without a message (a link only once the new target is checked to be the same content in the same language; a link on words the text already uses to name another page; a 301 from a page's old address once the same page is live at a new one); a change to what visitors read, which page wins a search, whether a page exists, a redirect with more than one possible target, a price or a legal page is asked as a decision; page removals and the robots policy are never changed on its own. A change a person asks for in a chat is made. What a check could not tell (a timeout, a 5xx, a page past the crawl limit) is never acted on: the run retries once, then says the check was incomplete.
|
|
16
16
|
|
|
17
17
|
The **GEO** default runs three routines backed by Studio's built-in `fimo-geo` skill, which shares `fimo-seo`'s crawl and its rule for what a run may change alone: **AI readiness** (llms.txt, the text each page serves before JavaScript, landmarks and heading levels) and **Structured data** (valid JSON-LD; Organization and WebSite, Article, BreadcrumbList; Product and FAQ where they fit) every day, and **AI citation optimization** (a direct answer under each content page's H1, question headings on long pages) every Wednesday. On its own it writes a missing llms.txt and keeps its links in step, adds Organization, WebSite, Article and BreadcrumbList from fields the site already has (never an invented logo, address, author or rating), and fixes landmarks and heading levels without changing words; an opening answer, new headings, FAQ or Product data, and how pages are rendered are asked as decisions; who robots.txt lets crawl, AI crawlers included, prices and claims are never changed, nor reported: asked whether an assistant can read the site, it checks and names the crawlers robots.txt keeps out. Where AI assistants cite the site needs a visibility source; until one is connected there is no routine for it.
|
|
18
18
|
|
|
19
|
+
The **Content** default runs three routines backed by Studio's built-in `fimo-content` skill, on the same crawl and rule: **Content refresh** every Tuesday (past years written as the present, events and offers whose date passed, "coming soon" text, product names the team retired, pages losing visitors in Fimo analytics), **Content lifecycle** on the 1st of every month (thin pages, pages that repeat another, pages nothing links to that are also thin or out of date) and **Translation** every Wednesday (CMS entries missing in a locale, or whose source changed after the translation; on a site with one locale it stops at once). On its own it translates missing and outdated entries in the site's tone, keeping slugs, dates, media and names, and renders a copyright year typed in the code from the date; any other sentence a visitor reads is asked as a decision quoting the exact words; merging, redirecting or retiring a page is only proposed; a price or a legal page is changed or translated only once a person agreed. Writing from briefs and watching competitors need data sources; until they are connected there is no routine for them.
|
|
20
|
+
|
|
21
|
+
The **Quality** default runs two routines every Thursday backed by Studio's built-in `fimo-quality` skill, whose crawl also measures accessibility in each page and opens one or two pages of each template again 390 px wide: **Accessibility** (WCAG AA contrast, heading levels, links, buttons and fields without a name, images used as links with no name, positive tabindex, invisible focus, the page language) and **Mobile optimization** (a missing viewport or one that blocks zoom, sideways scrolling, images, tables and forms wider than the screen, tap targets under 24 × 24 px, text mostly under 12 px). On its own it names a control or labels a field from words the page shows, fixes heading levels, tabindex and a removed focus outline, lets visitors zoom again and keeps media inside the screen; a colour, a size or a layout change is asked as a decision. Image alt text stays with the SEO agent; brand compliance needs brand guidelines, so there is no routine for it yet.
|
|
22
|
+
|
|
23
|
+
The **Compliance** default runs three routines backed by Studio's built-in `fimo-compliance` skill, on the same crawl, which can also open a sample of pages with no consent given and record the cookies, third-party requests, consent banner and form fields a first visit gets: **Brand compliance** every Thursday (words, terms, claims and voice of what changed, against the brand rules in the site knowledge, `AGENTS.md` and the agent's memory; it runs on Claude Haiku 5.5), **Cookie consent** every Thursday (trackers and third-party cookies before a choice, a missing banner, a banner with no way to refuse) and **Privacy and legal pages** on the 1st of every month (a privacy page that exists, names the services loaded and the kinds of field the forms collect, and was updated in the last two years). On its own it changes only a term the brand rules replace; every other sentence, the consent setup and every legal page are proposed as decisions, with placeholders for legal details, and it never states that a site is compliant.
|
|
24
|
+
|
|
19
25
|
### Routines
|
|
20
26
|
|
|
21
|
-
A routine is saved instructions an agent runs in a thread of its own, by hand, on a schedule, or when something happens in the project, so each run sees its earlier runs and the agent's chat never fills with its work. The agent creates, changes, runs and deletes its routines from its chat with its `routines` tool: a person asks in the chat ("check the prices every Monday", "run after each publish"), and Studio only shows routines. A trigger is set in words; Fimo checks them and either says when the routine runs or why it cannot follow them and what it can do instead; for what Fimo cannot see as an event (traffic, rankings, errors
|
|
27
|
+
A routine is saved instructions an agent runs in a thread of its own, by hand, on a schedule, or when something happens in the project, so each run sees its earlier runs and the agent's chat never fills with its work. The agent creates, changes, runs and deletes its routines from its chat with its `routines` tool: a person asks in the chat ("check the prices every Monday", "run after each publish"), and Studio only shows routines. A trigger is set in words; Fimo checks them and either says when the routine runs or why it cannot follow them and what it can do instead; for what Fimo cannot see as an event (traffic, rankings, errors) the agent offers a schedule whose run checks it and stops when there is nothing to do. Fimo follows publishes of the site and content changes on the main branch by content type, action, locale, changed fields, the entry's current values ("price over 100", "status changes to archived") or a yes/no question about what the content says ("mentions Contentful or Sanity"; for "a competitor" it uses the names given or those in the site knowledge, and asks for them otherwise; a run started on an uncertain answer says so), media files uploaded or changed (by name or file type), the site's code changing through a deploy or a merge (by file path glob), another routine of the same agent finishing (optionally with a yes/no question about its report; never its own end), a visitor submitting a form (optionally with a yes/no question about the answers), a form or content type changing, a branch merged into main, a locale added, removed or made the default, a publish of the site failing, a domain added or removed, and the prices on a page of another web site changing ("tell me when https://example.com/pricing changes its prices": checked daily, a change must hold on three reads before the routine runs, the run lists each plan with its old and new price, the routine page shows the watch as **OK**, **Needs repair**, **Blocked** or **Unstable** with its last check, at most 10 watched pages a project); comparing a field's old and new values is not supported; what a routine changes, publishes or reports can start the agent's other routines, in chains of any length, each routine at most once per change that started the chain (across every routine that change leads to, so routines never loop or multiply; a person's new change, a run by hand or on a schedule starts a new chain); events that come in while a run is busy wait, then run together in one next run (up to 10), which the Runs list shows as one run with its event count. The agent's settings list its **Routines** as cards (name, cadence such as **Every Monday at 08:00** or **By hand**, next run, an **Active** switch); the default agents come with theirs. A routine's page is read-only: **Instructions** (the task, run on every trigger), **Model** (the model its runs use: Opus 5.5 by default; the agent sets another when asked), **Triggers** (**By hand** with **Run now**, which starts a run right away; **Schedule** and the event trigger, given a short title by Fimo from the words it was set with, each a sentence, shown when set), the **Runs** list (newest first, two lines each: how it ended (**Quiet**, **Sent to agent**, **Asked for a decision**, or **Failed** and **Stopped** in red), when and what started it (**On schedule**, **On event**, or **By hand** with the person's name or **agent** when their message started it), then the first sentence of what it told the agent; select one to open the routine's thread, read-only, at that run), and the **Active** switch in the header (pauses the schedule and the trigger, not **Run now**). Routines report to the agent, never to a person: a run that has something the agent should know writes it to the agent's chat as a message only the agent reads, and the agent takes a turn on it (reports waiting together are read in one turn); a run with nothing to say reports nothing. The agent decides what the team sees: nothing (the chat stays as it was, the row stays read), one short message (several reports folded into one), or a form when a person must decide, and the chat's row reads **Needs you** while that form is open. A person answers the form in the chat; the agent sends the decision to the routine with its `routines` tool and the routine runs again with it. Only the agent answers a routine: its page has no answer box. Quiet runs leave no message: they fold into one line placed where the last run happened among the messages (**N runs since <date>**), counted from the last report the agent answered visibly, and the chat's row reads **Ran <date>** with that count while the newest thing in the chat is a run, the ordinary status and the last words when a message is newer, and **First check <day> <time>** or **No checks scheduled** before the first run. A routine whose runs keep failing or are refused for credits is reported to the agent once per streak, as a message from Fimo. Routine runs use the plan's agent-hours, from each run's start to its end (Studio chats do not); Billing shows the hours used this period, and each run shows its duration and credits. Once the included hours are used, nothing runs (no schedule, event or Run now, which the routines tool reports to the agent); Studio shows **Routines paused** under the chat list and in the agent's settings with the reset date and the button that resumes them sooner (**Upgrade**), and the routine's page says until when. No run lasts longer than 2 hours.
|
|
22
28
|
|
|
23
29
|
## Sending a Message
|
|
24
30
|
|
|
@@ -39,6 +39,7 @@ You may see different overlays depending on what is happening:
|
|
|
39
39
|
- **"Editing unavailable"** -- The site remains visible, but its Fimo integration did not connect in time. Visual editing and the route selector stay unavailable; preview and refresh still work.
|
|
40
40
|
- **Error overlay** -- Something went wrong. The overlay shows details about the issue, and the AI can often auto-fix it for you.
|
|
41
41
|
- **"Some installed packages need approval"** -- Choose **Fix with Fimo** to send the complete repair context to the coding agent, or **Copy details** to handle it elsewhere. Review every named package, commit only trusted package-specific approvals, and retry Preview. Never replace the site policy with a blanket allow-all setting.
|
|
42
|
+
- **"Your app could not start"** -- The site's own dev command exited while starting; the output is available through **Copy details**. Choose **Fix with Fimo** to send that output to the coding agent, **Retry preview** to start it once more, or **Copy details** to handle it elsewhere. Fix the cause in the project, such as declaring the package that provides a missing command, rather than working around it. Preview also retries after the fix lands.
|
|
42
43
|
- **First generation progress** -- When your site is being built for the first time, a progress overlay shows the current status.
|
|
43
44
|
|
|
44
45
|
## Switching Workspaces
|
|
@@ -17,7 +17,38 @@ export function fimo(options = {}) {
|
|
|
17
17
|
return {
|
|
18
18
|
name: 'fimo:astro',
|
|
19
19
|
hooks: {
|
|
20
|
-
'astro:config:setup': ({ config, injectScript, updateConfig }) => {
|
|
20
|
+
'astro:config:setup': async ({ config, command, injectScript, updateConfig, addMiddleware }) => {
|
|
21
|
+
// Hosted builds supply deployment-scoped values through .env. An explicit
|
|
22
|
+
// empty process value still disables adaptation for published builds.
|
|
23
|
+
const { loadEnv } = await import('vite');
|
|
24
|
+
const studioOrigin = process.env.FIMO_PREVIEW_PARENT_ORIGIN ??
|
|
25
|
+
loadEnv(config.vite?.mode ?? (command === 'dev' ? 'development' : 'production'), config.vite?.envDir ?? fileURLToPath(config.root), 'FIMO_PREVIEW_PARENT_ORIGIN').FIMO_PREVIEW_PARENT_ORIGIN;
|
|
26
|
+
if (studioOrigin) {
|
|
27
|
+
// FIMO-2910: run outside application middleware so its final response
|
|
28
|
+
// is adapted too. Capture the preview build's origin, never request input.
|
|
29
|
+
const id = 'virtual:fimo-preview-frame-headers';
|
|
30
|
+
addMiddleware({ entrypoint: id, order: 'pre' });
|
|
31
|
+
updateConfig({
|
|
32
|
+
vite: {
|
|
33
|
+
plugins: [
|
|
34
|
+
{
|
|
35
|
+
name: 'fimo:astro-preview-frame-headers',
|
|
36
|
+
resolveId(source) {
|
|
37
|
+
if (source === id)
|
|
38
|
+
return `\0${id}`;
|
|
39
|
+
},
|
|
40
|
+
load(source) {
|
|
41
|
+
if (source !== `\0${id}`)
|
|
42
|
+
return;
|
|
43
|
+
return `import { adaptPreviewFrameResponse } from 'fimo/preview';
|
|
44
|
+
export const onRequest = async (_context, next) =>
|
|
45
|
+
adaptPreviewFrameResponse(await next(), ${serializeForModule(studioOrigin)});`;
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
});
|
|
51
|
+
}
|
|
21
52
|
const hasVercelAdapter = config.integrations?.some((integration) => integration.name === '@astrojs/vercel' || integration.name.startsWith('@astrojs/vercel/'));
|
|
22
53
|
if (config.output === 'server' && !config.adapter && !hasVercelAdapter) {
|
|
23
54
|
if (!options.hostingAdapter) {
|