fimo 2.11.0 → 2.13.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 (30) hide show
  1. package/assets/skills/fimo-cli/SKILL.studio.md +1 -1
  2. package/assets/skills/fimo-cli/references/domains.md +1 -1
  3. package/assets/skills/fimo-cli/references/preview.md +7 -0
  4. package/assets/skills/fimo-code/references/content/richtext.md +2 -0
  5. package/assets/skills/fimo-code/references/frameworks/seo-head.md +9 -0
  6. package/assets/skills/fimo-studio/references/ai-chat/agents.md +7 -1
  7. package/assets/skills/fimo-studio/references/ai-chat/default-agents.md +3 -3
  8. package/assets/skills/fimo-studio/references/ai-chat/routines.md +1 -1
  9. package/assets/skills/fimo-studio/references/ai-chat.md +2 -1
  10. package/assets/skills/fimo-studio/references/knowledge.md +1 -1
  11. package/assets/skills/fimo-studio/references/seo-settings.md +1 -1
  12. package/dist/build/vite/plugins/runtime-env.d.ts +0 -19
  13. package/dist/build/vite/plugins/runtime-env.js +23 -1
  14. package/dist/cli/bundle.json +2 -2
  15. package/dist/cli/index.js +24 -21
  16. package/dist/runtime/seo/resolver.d.ts +10 -1
  17. package/dist/runtime/seo/resolver.js +20 -2
  18. package/dist/runtime/seo/schemas.d.ts +1 -1
  19. package/dist/runtime/seo/schemas.js +6 -4
  20. package/dist/runtime/seo/server.js +3 -2
  21. package/package.json +8 -8
  22. package/templates/astro/package.json +4 -3
  23. package/templates/nextjs/package.json +4 -4
  24. package/templates/react-router/.fimo/config.json +0 -3
  25. package/templates/react-router/package.json +5 -5
  26. package/templates/react-router/vite.config.ts +1 -1
  27. package/templates/sveltekit/package.json +3 -3
  28. package/templates/vite/.fimo/config.json +0 -3
  29. package/templates/vite/package.json +5 -5
  30. package/templates/react-router/public/robots.txt +0 -4
@@ -10,7 +10,8 @@ import type { FimoRouteConfig, FimoSEO, RouteSEO } from '../shared/fimo-config.t
10
10
  * - runtime meta generation (`buildMetaForPath`)
11
11
  * - the Vite SEO plugin (`vite/plugin-seo`)
12
12
  *
13
- * The resolver is intentionally pure. It does not read files or mutate HTML.
13
+ * The resolver does not read files or mutate HTML. The one outside input it reads
14
+ * is the platform's `FIMO_SITE_URL`, the site's address when `seo.url` is not set.
14
15
  * Instead, it focuses only on the decision logic:
15
16
  * - normalize the incoming pathname
16
17
  * - find the best matching route config
@@ -27,6 +28,14 @@ import type { FimoRouteConfig, FimoSEO, RouteSEO } from '../shared/fimo-config.t
27
28
  * and merge rules. Any change to SEO resolution behavior should happen here first.
28
29
  */
29
30
  export declare const SEO_FIELD_KEYS: readonly ["title", "description", "siteName", "url", "image", "favicon", "twitterSite", "robots", "themeColor", "locale"];
31
+ /**
32
+ * The site's address: the `seo.url` the owner set, else what the platform sets in `FIMO_SITE_URL`
33
+ * (the primary domain, else the built-in address).
34
+ * A browser has no `process`; Vite builds pass the address through `virtual:fimo-config`.
35
+ * A value in the variable that is not an http(s) URL is ignored.
36
+ */
37
+ export declare function resolveSiteUrl(configuredUrl?: string): string | undefined;
38
+ export declare function withSiteUrl(seo?: FimoSEO): FimoSEO | undefined;
30
39
  export declare function normalizePathname(pathname: string): string;
31
40
  export declare function buildCanonicalUrl(seoUrl: string | undefined, pathname: string): string | undefined;
32
41
  /**
@@ -10,7 +10,8 @@ import { matchFimoRoute } from '../routes/index.js';
10
10
  * - runtime meta generation (`buildMetaForPath`)
11
11
  * - the Vite SEO plugin (`vite/plugin-seo`)
12
12
  *
13
- * The resolver is intentionally pure. It does not read files or mutate HTML.
13
+ * The resolver does not read files or mutate HTML. The one outside input it reads
14
+ * is the platform's `FIMO_SITE_URL`, the site's address when `seo.url` is not set.
14
15
  * Instead, it focuses only on the decision logic:
15
16
  * - normalize the incoming pathname
16
17
  * - find the best matching route config
@@ -38,6 +39,23 @@ export const SEO_FIELD_KEYS = [
38
39
  'themeColor',
39
40
  'locale',
40
41
  ];
42
+ /**
43
+ * The site's address: the `seo.url` the owner set, else what the platform sets in `FIMO_SITE_URL`
44
+ * (the primary domain, else the built-in address).
45
+ * A browser has no `process`; Vite builds pass the address through `virtual:fimo-config`.
46
+ * A value in the variable that is not an http(s) URL is ignored.
47
+ */
48
+ export function resolveSiteUrl(configuredUrl) {
49
+ if (configuredUrl?.trim()) {
50
+ return configuredUrl;
51
+ }
52
+ const value = globalThis.process?.env?.FIMO_SITE_URL?.trim();
53
+ return value && /^https?:\/\//i.test(value) && URL.canParse(value) ? value : configuredUrl;
54
+ }
55
+ export function withSiteUrl(seo) {
56
+ const url = resolveSiteUrl(seo?.url);
57
+ return url ? { ...seo, url } : seo;
58
+ }
41
59
  export function normalizePathname(pathname) {
42
60
  const withoutQuery = pathname.split('?')[0]?.split('#')[0] ?? '/';
43
61
  const normalized = withoutQuery.startsWith('/') ? withoutQuery : `/${withoutQuery}`;
@@ -112,7 +130,7 @@ function resolveSeoField(routeValue, globalValue, context) {
112
130
  return globalValue;
113
131
  }
114
132
  export function resolveSeoForPath(pathname, config, routeData) {
115
- const globalSeo = config.seo ?? {};
133
+ const globalSeo = withSiteUrl(config.seo) ?? {};
116
134
  const routeConfig = matchFimoRoute(pathname, config)?.contract.config;
117
135
  const routeSeo = routeConfig?.seo;
118
136
  if (!routeSeo) {
@@ -2,7 +2,7 @@ import type { FimoSEO } from '../shared/fimo-config.types.js';
2
2
  export type SiteSchema = Record<string, unknown>;
3
3
  /**
4
4
  * Schema.org Organization and WebSite for the whole site, built from global SEO.
5
- * Returns nothing unless both `siteName` and `url` are set. Render each entry
5
+ * Returns nothing unless the site has both a `siteName` and an address. Render each entry
6
6
  * with `serializeJsonLd` in its own `<script type="application/ld+json">`.
7
7
  */
8
8
  export declare function buildSiteSchemas(seo?: FimoSEO): SiteSchema[];
@@ -1,17 +1,19 @@
1
+ import { resolveSiteUrl } from './resolver.js';
1
2
  /**
2
3
  * Schema.org Organization and WebSite for the whole site, built from global SEO.
3
- * Returns nothing unless both `siteName` and `url` are set. Render each entry
4
+ * Returns nothing unless the site has both a `siteName` and an address. Render each entry
4
5
  * with `serializeJsonLd` in its own `<script type="application/ld+json">`.
5
6
  */
6
7
  export function buildSiteSchemas(seo = {}) {
7
- if (!seo.siteName || !seo.url) {
8
+ const url = resolveSiteUrl(seo.url);
9
+ if (!seo.siteName || !url) {
8
10
  return [];
9
11
  }
10
12
  const organization = {
11
13
  '@context': 'https://schema.org',
12
14
  '@type': 'Organization',
13
15
  name: seo.siteName,
14
- url: seo.url,
16
+ url,
15
17
  };
16
18
  if (seo.favicon) {
17
19
  organization.logo = seo.favicon;
@@ -20,7 +22,7 @@ export function buildSiteSchemas(seo = {}) {
20
22
  '@context': 'https://schema.org',
21
23
  '@type': 'WebSite',
22
24
  name: seo.siteName,
23
- url: seo.url,
25
+ url,
24
26
  };
25
27
  return [organization, website];
26
28
  }
@@ -1,5 +1,5 @@
1
1
  import { readConfigServer } from '../shared/fimo-config.server.js';
2
- import { resolveSeoForPath } from './resolver.js';
2
+ import { resolveSeoForPath, withSiteUrl } from './resolver.js';
3
3
  /**
4
4
  * Read global SEO, or resolve an explicit pathname against the project's route
5
5
  * catalog. Node only. Missing config/SEO returns undefined; other read and JSON
@@ -19,5 +19,6 @@ export function getFimoSeo({ pathname, routeData, rootDir = process.cwd() } = {}
19
19
  if (pathname !== undefined) {
20
20
  return resolveSeoForPath(pathname, config, routeData);
21
21
  }
22
- return config.seo && Object.keys(config.seo).length > 0 ? config.seo : undefined;
22
+ const seo = withSiteUrl(config.seo);
23
+ return seo && Object.keys(seo).length > 0 ? seo : undefined;
23
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fimo",
3
- "version": "2.11.0",
3
+ "version": "2.13.0",
4
4
  "description": "CLI for Fimo, the website platform for sites built with coding agents: CMS, previews, site agents, and hosting. Create, deploy, and manage Fimo sites.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -202,13 +202,13 @@
202
202
  "devDependencies": {
203
203
  "@clack/core": "^1.5.1",
204
204
  "@clack/prompts": "^1.8.1",
205
- "@fimo/agents-bundle": "2.11.0",
206
- "@fimo/api-contracts": "2.11.0",
207
- "@fimo/cli-kit": "2.11.0",
208
- "@fimo/framework-detect": "2.11.0",
209
- "@fimo/routes": "2.11.0",
210
- "@fimo/sdk": "2.11.0",
211
- "@fimo/tsconfig": "2.11.0",
205
+ "@fimo/agents-bundle": "2.13.0",
206
+ "@fimo/api-contracts": "2.13.0",
207
+ "@fimo/cli-kit": "2.13.0",
208
+ "@fimo/framework-detect": "2.13.0",
209
+ "@fimo/routes": "2.13.0",
210
+ "@fimo/sdk": "2.13.0",
211
+ "@fimo/tsconfig": "2.13.0",
212
212
  "@types/node": "22.18.6",
213
213
  "agent-install": "^0.0.5",
214
214
  "astro": "^7.4.5",
@@ -9,13 +9,14 @@
9
9
  "check": "astro sync && astro check"
10
10
  },
11
11
  "dependencies": {
12
- "fimo": "2.11.0",
13
- "fimo-analytics": "2.11.0",
14
- "fimo-astro": "2.11.0",
12
+ "fimo": "2.13.0",
13
+ "fimo-analytics": "2.13.0",
14
+ "fimo-astro": "2.13.0",
15
15
  "zod": "^4.4.3"
16
16
  },
17
17
  "devDependencies": {
18
18
  "@astrojs/check": "^0.9.10",
19
+ "@emnapi/runtime": "^1.11.3",
19
20
  "astro": "^7.1.6",
20
21
  "typescript": "^6.0.3"
21
22
  },
@@ -12,10 +12,10 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@tanstack/react-query": "^5.80.6",
15
- "fimo": "2.11.0",
16
- "fimo-analytics": "2.11.0",
17
- "fimo-next": "2.11.0",
18
- "fimo-react": "2.11.0",
15
+ "fimo": "2.13.0",
16
+ "fimo-analytics": "2.13.0",
17
+ "fimo-next": "2.13.0",
18
+ "fimo-react": "2.13.0",
19
19
  "next": "16.4.2",
20
20
  "react": "^19.2.7",
21
21
  "react-dom": "^19.2.7",
@@ -3,9 +3,6 @@
3
3
  "seo": {
4
4
  "title": "Welcome to your Fimo website",
5
5
  "description": "A default homepage for Fimo projects.",
6
- "url": "https://fimo.ai/",
7
- "image": "https://fimo.ai/socials/og_cover.png",
8
- "favicon": "https://fimo.ai/favicon-orange.svg",
9
6
  "locale": "en_US"
10
7
  },
11
8
  "i18n": {
@@ -21,11 +21,11 @@
21
21
  "cn": "0.2.4",
22
22
  "date-fns": "^4.1.0",
23
23
  "embla-carousel-react": "^8.6.0",
24
- "fimo": "2.11.0",
25
- "fimo-analytics": "2.11.0",
26
- "fimo-react": "2.11.0",
27
- "fimo-react-router": "2.11.0",
28
- "fimo-vite": "2.11.0",
24
+ "fimo": "2.13.0",
25
+ "fimo-analytics": "2.13.0",
26
+ "fimo-react": "2.13.0",
27
+ "fimo-react-router": "2.13.0",
28
+ "fimo-vite": "2.13.0",
29
29
  "input-otp": "^1.4.2",
30
30
  "isbot": "^5",
31
31
  "lucide-react": "^0.577.0",
@@ -45,7 +45,7 @@ export default defineConfig(({ command, isSsrBuild, mode }) => {
45
45
  const resolvedApiUrl = resolveApiUrl({ command, isSsrBuild, env });
46
46
 
47
47
  return {
48
- plugins: [reactRouter(), tailwindcss(), fimo({ sitemap: true })],
48
+ plugins: [reactRouter(), tailwindcss(), fimo({ sitemap: true, robots: true })],
49
49
  define: {
50
50
  'import.meta.env.VITE_API_URL': JSON.stringify(resolvedApiUrl),
51
51
  'import.meta.env.FIMO_ENV': JSON.stringify(env.FIMO_ENV || ''),
@@ -11,9 +11,9 @@
11
11
  "prepare": "svelte-kit sync"
12
12
  },
13
13
  "dependencies": {
14
- "fimo": "2.11.0",
15
- "fimo-analytics": "2.11.0",
16
- "fimo-sveltekit": "2.11.0",
14
+ "fimo": "2.13.0",
15
+ "fimo-analytics": "2.13.0",
16
+ "fimo-sveltekit": "2.13.0",
17
17
  "zod": "^4.4.3"
18
18
  },
19
19
  "devDependencies": {
@@ -7,9 +7,6 @@
7
7
  "title": "Welcome to your Fimo website",
8
8
  "description": "A native Vite React starter for Fimo projects.",
9
9
  "siteName": "Fimo Starter Site",
10
- "url": "https://fimo.ai/",
11
- "image": "https://fimo.ai/socials/og_cover.png",
12
- "favicon": "https://fimo.ai/favicon-orange.svg",
13
10
  "locale": "en_US"
14
11
  },
15
12
  "i18n": {
@@ -11,11 +11,11 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "@tanstack/react-query": "^5.80.6",
14
- "fimo": "2.11.0",
15
- "fimo-analytics": "2.11.0",
16
- "fimo-react": "2.11.0",
17
- "fimo-react-router": "2.11.0",
18
- "fimo-vite": "2.11.0",
14
+ "fimo": "2.13.0",
15
+ "fimo-analytics": "2.13.0",
16
+ "fimo-react": "2.13.0",
17
+ "fimo-react-router": "2.13.0",
18
+ "fimo-vite": "2.13.0",
19
19
  "react": "^19.2.7",
20
20
  "react-dom": "^19.2.7",
21
21
  "react-router": "^8.3.0",
@@ -1,4 +0,0 @@
1
- User-agent: *
2
- Allow: /
3
-
4
- Sitemap: /sitemap.xml