Skip to content

Commit 010435c

Browse files
authored
v0.6.45: superagent, csp, brightdata integration, gemini response format, logs performance improvements
fix(csp): add missing analytics domains, remove unsafe-eval, fix workspace CSP gap (#4179) fix(landing): return 404 for invalid dynamic route slugs (#4182) improvement(seo): optimize sitemaps, robots.txt, and core web vitals across sim and docs (#4170) fix(gemini): support structured output with tools on Gemini 3 models (#4184) feat(brightdata): add Bright Data integration with 8 tools (#4183) fix(mothership): fix superagent credentials (#4185) fix(logs): close sidebar when selected log disappears from filtered list; cleanup (#4186)
2 parents 46ffc49 + cd8c5bd commit 010435c

File tree

63 files changed

+2700
-693
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+2700
-693
lines changed

apps/docs/app/[lang]/[[...slug]]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ import { ResponseSection } from '@/components/ui/response-section'
1717
import { i18n } from '@/lib/i18n'
1818
import { getApiSpecContent, openapi } from '@/lib/openapi'
1919
import { type PageData, source } from '@/lib/source'
20+
import { DOCS_BASE_URL } from '@/lib/urls'
2021

2122
const SUPPORTED_LANGUAGES: Set<string> = new Set(i18n.languages)
22-
const BASE_URL = 'https://docs.sim.ai'
23+
const BASE_URL = DOCS_BASE_URL
2324

2425
const OG_LOCALE_MAP: Record<string, string> = {
2526
en: 'en_US',

apps/docs/app/[lang]/layout.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { defineI18nUI } from 'fumadocs-ui/i18n'
33
import { DocsLayout } from 'fumadocs-ui/layouts/docs'
44
import { RootProvider } from 'fumadocs-ui/provider/next'
55
import { Geist_Mono, Inter } from 'next/font/google'
6-
import Script from 'next/script'
76
import {
87
SidebarFolder,
98
SidebarItem,
@@ -13,6 +12,7 @@ import { Navbar } from '@/components/navbar/navbar'
1312
import { SimLogoFull } from '@/components/ui/sim-logo'
1413
import { i18n } from '@/lib/i18n'
1514
import { source } from '@/lib/source'
15+
import { DOCS_BASE_URL } from '@/lib/urls'
1616
import '../global.css'
1717

1818
const inter = Inter({
@@ -67,22 +67,22 @@ export default async function Layout({ children, params }: LayoutProps) {
6767
name: 'Sim Documentation',
6868
description:
6969
'Documentation for Sim — the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 1,000+ integrations and every major LLM.',
70-
url: 'https://docs.sim.ai',
70+
url: DOCS_BASE_URL,
7171
publisher: {
7272
'@type': 'Organization',
7373
name: 'Sim',
7474
url: 'https://sim.ai',
7575
logo: {
7676
'@type': 'ImageObject',
77-
url: 'https://docs.sim.ai/static/logo.png',
77+
url: `${DOCS_BASE_URL}/static/logo.png`,
7878
},
7979
},
8080
inLanguage: lang,
8181
potentialAction: {
8282
'@type': 'SearchAction',
8383
target: {
8484
'@type': 'EntryPoint',
85-
urlTemplate: 'https://docs.sim.ai/api/search?q={search_term_string}',
85+
urlTemplate: `${DOCS_BASE_URL}/api/search?q={search_term_string}`,
8686
},
8787
'query-input': 'required name=search_term_string',
8888
},
@@ -101,7 +101,6 @@ export default async function Layout({ children, params }: LayoutProps) {
101101
/>
102102
</head>
103103
<body className='flex min-h-screen flex-col font-sans'>
104-
<Script src='https://assets.onedollarstats.com/stonks.js' strategy='lazyOnload' />
105104
<RootProvider i18n={provider(lang)}>
106105
<Navbar />
107106
<DocsLayout

apps/docs/app/layout.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import type { ReactNode } from 'react'
22
import type { Viewport } from 'next'
3+
import { DOCS_BASE_URL } from '@/lib/urls'
34

45
export default function RootLayout({ children }: { children: ReactNode }) {
56
return children
@@ -12,7 +13,7 @@ export const viewport: Viewport = {
1213
}
1314

1415
export const metadata = {
15-
metadataBase: new URL('https://docs.sim.ai'),
16+
metadataBase: new URL(DOCS_BASE_URL),
1617
title: {
1718
default: 'Sim Documentation — The AI Workspace for Teams',
1819
template: '%s | Sim Docs',
@@ -61,14 +62,14 @@ export const metadata = {
6162
type: 'website',
6263
locale: 'en_US',
6364
alternateLocale: ['es_ES', 'fr_FR', 'de_DE', 'ja_JP', 'zh_CN'],
64-
url: 'https://docs.sim.ai',
65+
url: DOCS_BASE_URL,
6566
siteName: 'Sim Documentation',
6667
title: 'Sim Documentation — The AI Workspace for Teams',
6768
description:
6869
'Documentation for Sim — the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 1,000+ integrations and every major LLM.',
6970
images: [
7071
{
71-
url: 'https://docs.sim.ai/api/og?title=Sim%20Documentation',
72+
url: `${DOCS_BASE_URL}/api/og?title=Sim%20Documentation`,
7273
width: 1200,
7374
height: 630,
7475
alt: 'Sim Documentation',
@@ -82,7 +83,7 @@ export const metadata = {
8283
'Documentation for Sim — the open-source AI workspace where teams build, deploy, and manage AI agents. Connect 1,000+ integrations and every major LLM.',
8384
creator: '@simdotai',
8485
site: '@simdotai',
85-
images: ['https://docs.sim.ai/api/og?title=Sim%20Documentation'],
86+
images: [`${DOCS_BASE_URL}/api/og?title=Sim%20Documentation`],
8687
},
8788
robots: {
8889
index: true,
@@ -96,15 +97,15 @@ export const metadata = {
9697
},
9798
},
9899
alternates: {
99-
canonical: 'https://docs.sim.ai',
100+
canonical: DOCS_BASE_URL,
100101
languages: {
101-
'x-default': 'https://docs.sim.ai',
102-
en: 'https://docs.sim.ai',
103-
es: 'https://docs.sim.ai/es',
104-
fr: 'https://docs.sim.ai/fr',
105-
de: 'https://docs.sim.ai/de',
106-
ja: 'https://docs.sim.ai/ja',
107-
zh: 'https://docs.sim.ai/zh',
102+
'x-default': DOCS_BASE_URL,
103+
en: DOCS_BASE_URL,
104+
es: `${DOCS_BASE_URL}/es`,
105+
fr: `${DOCS_BASE_URL}/fr`,
106+
de: `${DOCS_BASE_URL}/de`,
107+
ja: `${DOCS_BASE_URL}/ja`,
108+
zh: `${DOCS_BASE_URL}/zh`,
108109
},
109110
},
110111
}

apps/docs/app/llms.txt/route.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { source } from '@/lib/source'
2+
import { DOCS_BASE_URL } from '@/lib/urls'
23

34
export const revalidate = false
45

56
export async function GET() {
6-
const baseUrl = 'https://docs.sim.ai'
7+
const baseUrl = DOCS_BASE_URL
78

89
try {
910
const pages = source.getPages().filter((page) => {

apps/docs/app/robots.txt/route.ts

Lines changed: 5 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,18 @@
1+
import { DOCS_BASE_URL } from '@/lib/urls'
2+
13
export const revalidate = false
24

35
export async function GET() {
4-
const baseUrl = 'https://docs.sim.ai'
6+
const baseUrl = DOCS_BASE_URL
57

68
const robotsTxt = `# Robots.txt for Sim Documentation
79
810
User-agent: *
9-
Allow: /
10-
11-
# Search engine crawlers
12-
User-agent: Googlebot
13-
Allow: /
14-
15-
User-agent: Bingbot
16-
Allow: /
17-
18-
User-agent: Slurp
19-
Allow: /
20-
21-
User-agent: DuckDuckBot
22-
Allow: /
23-
24-
User-agent: Baiduspider
25-
Allow: /
26-
27-
User-agent: YandexBot
28-
Allow: /
29-
30-
# AI and LLM crawlers - explicitly allowed for documentation indexing
31-
User-agent: GPTBot
32-
Allow: /
33-
34-
User-agent: ChatGPT-User
35-
Allow: /
36-
37-
User-agent: CCBot
38-
Allow: /
39-
40-
User-agent: anthropic-ai
41-
Allow: /
42-
43-
User-agent: Claude-Web
44-
Allow: /
45-
46-
User-agent: Applebot
47-
Allow: /
48-
49-
User-agent: PerplexityBot
50-
Allow: /
51-
52-
User-agent: Diffbot
53-
Allow: /
54-
55-
User-agent: FacebookBot
56-
Allow: /
57-
58-
User-agent: cohere-ai
59-
Allow: /
60-
61-
# Disallow admin and internal paths (if any exist)
6211
Disallow: /.next/
6312
Disallow: /api/internal/
6413
Disallow: /_next/static/
6514
Disallow: /admin/
66-
67-
# Allow but don't prioritize these
15+
Allow: /
6816
Allow: /api/search
6917
Allow: /llms.txt
7018
Allow: /llms-full.txt
@@ -73,23 +21,12 @@ Allow: /llms.mdx/
7321
# Sitemaps
7422
Sitemap: ${baseUrl}/sitemap.xml
7523
76-
# Crawl delay for aggressive bots (optional)
77-
# Crawl-delay: 1
78-
7924
# Additional resources for AI indexing
8025
# See https://github.com/AnswerDotAI/llms-txt for more info
8126
# LLM-friendly content:
8227
# Manifest: ${baseUrl}/llms.txt
8328
# Full content: ${baseUrl}/llms-full.txt
84-
# Individual pages: ${baseUrl}/llms.mdx/[page-path]
85-
86-
# Multi-language documentation available at:
87-
# ${baseUrl}/en - English
88-
# ${baseUrl}/es - Español
89-
# ${baseUrl}/fr - Français
90-
# ${baseUrl}/de - Deutsch
91-
# ${baseUrl}/ja - 日本語
92-
# ${baseUrl}/zh - 简体中文`
29+
# Individual pages: ${baseUrl}/llms.mdx/[page-path]`
9330

9431
return new Response(robotsTxt, {
9532
headers: {

apps/docs/app/sitemap.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import type { MetadataRoute } from 'next'
2+
import { i18n } from '@/lib/i18n'
3+
import { source } from '@/lib/source'
4+
import { DOCS_BASE_URL } from '@/lib/urls'
5+
6+
export const revalidate = 3600
7+
8+
export default function sitemap(): MetadataRoute.Sitemap {
9+
const baseUrl = DOCS_BASE_URL
10+
const languages = source.getLanguages()
11+
12+
const pagesBySlug = new Map<string, Map<string, string>>()
13+
for (const { language, pages } of languages) {
14+
for (const page of pages) {
15+
const key = page.slugs.join('/')
16+
if (!pagesBySlug.has(key)) {
17+
pagesBySlug.set(key, new Map())
18+
}
19+
pagesBySlug.get(key)!.set(language, `${baseUrl}${page.url}`)
20+
}
21+
}
22+
23+
const entries: MetadataRoute.Sitemap = []
24+
for (const [, localeMap] of pagesBySlug) {
25+
const defaultUrl = localeMap.get(i18n.defaultLanguage)
26+
if (!defaultUrl) continue
27+
28+
const langAlternates: Record<string, string> = {}
29+
for (const [lang, url] of localeMap) {
30+
langAlternates[lang] = url
31+
}
32+
33+
langAlternates['x-default'] = defaultUrl
34+
35+
entries.push({
36+
url: defaultUrl,
37+
alternates: { languages: langAlternates },
38+
})
39+
}
40+
41+
return entries
42+
}

apps/docs/app/sitemap.xml/route.ts

Lines changed: 0 additions & 62 deletions
This file was deleted.

apps/docs/components/icons.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2087,6 +2087,21 @@ export function BrandfetchIcon(props: SVGProps<SVGSVGElement>) {
20872087
)
20882088
}
20892089

2090+
export function BrightDataIcon(props: SVGProps<SVGSVGElement>) {
2091+
return (
2092+
<svg {...props} viewBox='54 93 22 52' fill='none' xmlns='http://www.w3.org/2000/svg'>
2093+
<path
2094+
d='M62 95.21c.19 2.16 1.85 3.24 2.82 4.74.25.38.48.11.67-.16.21-.31.6-1.21 1.15-1.28-.35 1.38-.04 3.15.16 4.45.49 3.05-1.22 5.64-4.07 6.18-3.38.65-6.22-2.21-5.6-5.62.23-1.24 1.37-2.5.77-3.7-.85-1.7.54-.52.79-.22 1.04 1.2 1.21.09 1.45-.55.24-.63.31-1.31.47-1.97.19-.77.55-1.4 1.39-1.87z'
2095+
fill='currentColor'
2096+
/>
2097+
<path
2098+
d='M66.70 123.37c0 3.69.04 7.38-.03 11.07-.02 1.04.31 1.48 1.32 1.49.29 0 .59.12.88.13.93.01 1.18.47 1.16 1.37-.05 2.19 0 2.19-2.24 2.19-3.48 0-6.96-.04-10.44.03-1.09.02-1.47-.33-1.3-1.36.02-.12.02-.26 0-.38-.28-1.39.39-1.96 1.7-1.9 1.36.06 1.76-.51 1.74-1.88-.09-5.17-.08-10.35 0-15.53.02-1.22-.32-1.87-1.52-2.17-.57-.14-1.47-.11-1.57-.85-.15-1.04-.05-2.11.01-3.17.02-.34.44-.35.73-.39 2.81-.39 5.63-.77 8.44-1.18.92-.14 1.15.2 1.14 1.09-.04 3.8-.02 7.62-.02 11.44z'
2099+
fill='currentColor'
2100+
/>
2101+
</svg>
2102+
)
2103+
}
2104+
20902105
export function BrowserUseIcon(props: SVGProps<SVGSVGElement>) {
20912106
return (
20922107
<svg

apps/docs/components/structured-data.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { DOCS_BASE_URL } from '@/lib/urls'
2+
13
interface StructuredDataProps {
24
title: string
35
description: string
@@ -15,7 +17,7 @@ export function StructuredData({
1517
dateModified,
1618
breadcrumb,
1719
}: StructuredDataProps) {
18-
const baseUrl = 'https://docs.sim.ai'
20+
const baseUrl = DOCS_BASE_URL
1921

2022
const articleStructuredData = {
2123
'@context': 'https://schema.org',

apps/docs/components/ui/icon-mapping.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
BoxCompanyIcon,
2424
BrainIcon,
2525
BrandfetchIcon,
26+
BrightDataIcon,
2627
BrowserUseIcon,
2728
CalComIcon,
2829
CalendlyIcon,
@@ -215,6 +216,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
215216
attio: AttioIcon,
216217
box: BoxCompanyIcon,
217218
brandfetch: BrandfetchIcon,
219+
brightdata: BrightDataIcon,
218220
browser_use: BrowserUseIcon,
219221
calcom: CalComIcon,
220222
calendly: CalendlyIcon,

0 commit comments

Comments
 (0)