Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
b7e377e
v0.5.91: docs i18n, turborepo upgrade
waleedlatif1 Feb 16, 2026
da46a38
v0.5.92: shortlinks, copilot scrolling stickiness, pagination
waleedlatif1 Feb 17, 2026
b197f68
v0
Sg312 Feb 17, 2026
231ddc5
V0
Sg312 Feb 18, 2026
471e58a
Checkpoint
Sg312 Feb 18, 2026
7599774
Checkpoint
Sg312 Feb 18, 2026
fdca736
v0.5.93: NextJS config changes, MCP and Blocks whitelisting, copilot …
waleedlatif1 Feb 18, 2026
632e0e0
Checkpoitn
Sg312 Feb 18, 2026
15ace5e
v0.5.94: vercel integration, folder insertion, migrated tracking redi…
waleedlatif1 Feb 19, 2026
4c3002f
Checkpoint
Sg312 Feb 19, 2026
3338b25
Checkpoint
Sg312 Feb 19, 2026
459c293
Checkpoint
Sg312 Feb 19, 2026
3112485
Checkpoint
Sg312 Feb 19, 2026
03908ed
Checkpoint
Sg312 Feb 19, 2026
67aa4bb
v0.5.95: gemini 3.1 pro, cloudflare, dataverse, revenuecat, redis, up…
waleedlatif1 Feb 20, 2026
34d92fa
v0.5.96: sim oauth provider, slack ephemeral message tool and blockki…
waleedlatif1 Feb 21, 2026
115f04e
v0.5.97: oidc discovery for copilot mcp
waleedlatif1 Feb 21, 2026
0d86ea0
v0.5.98: change detection improvements, rate limit and code execution…
waleedlatif1 Feb 22, 2026
af59234
v0.5.99: local dev improvements, live workflow logs in terminal
waleedlatif1 Feb 23, 2026
134c4c4
Checkpoint
Sg312 Feb 24, 2026
d333307
Checkpoint
Sg312 Feb 24, 2026
b9c3c2f
Checkpoint interface consolidation
Sg312 Feb 24, 2026
bbcf346
Nuke migration
Sg312 Feb 24, 2026
743f048
Merge with origin staging
Sg312 Feb 24, 2026
3de3ef4
Readd migration
Sg312 Feb 24, 2026
724aaa1
table tools
Sg312 Feb 24, 2026
87f5c46
Consolidation
Sg312 Feb 24, 2026
eccad2a
Remove dup code from tool calls
Sg312 Feb 25, 2026
67f8a68
v0.5.100: multiple credentials, 40% speedup, gong, attio, audit log i…
waleedlatif1 Feb 25, 2026
704fa16
run workflow checkpoint
Sg312 Feb 25, 2026
7b813be
Fix truncation
Sg312 Feb 25, 2026
41f0957
Separation of route
Sg312 Feb 25, 2026
f12d8f6
Split
Sg312 Feb 25, 2026
4f74a8b
Checkpopint
Sg312 Feb 25, 2026
b6f8439
Remove dead code
Sg312 Feb 25, 2026
90a1254
Fix lint
Sg312 Feb 25, 2026
3e6cf24
feat(landing): structure
emir-karabeg Feb 10, 2026
e47dcdc
feat(landing): navbar, metadata, hero, templates header
emir-karabeg Feb 18, 2026
bb3e899
feat(landing): template, generic workflow
emir-karabeg Feb 20, 2026
843af91
feat: integrations skeleton, realtime complete
emir-karabeg Feb 22, 2026
49c29d5
feat: pricing, collaboration improvement, features skeleton
emir-karabeg Feb 24, 2026
57a9102
Fix condition edges
Sg312 Feb 26, 2026
11e6387
Fix run workflow
Sg312 Feb 26, 2026
3cb1768
Move files to separate resource
Sg312 Feb 26, 2026
3ad7af4
File creation
Sg312 Feb 26, 2026
7276136
Piping
Sg312 Feb 26, 2026
cc5e592
Kb checkpoint
Sg312 Feb 26, 2026
4fd0989
v0.5.101: circular dependency mitigation, confluence enhancements, go…
waleedlatif1 Feb 26, 2026
9cc46ff
Edit subagents
Sg312 Feb 26, 2026
c168e36
Fix
Sg312 Feb 27, 2026
8fa4745
MCP commented out
Sg312 Feb 27, 2026
d49a2c1
Fixes
Sg312 Feb 27, 2026
0d2e6ff
v0.5.102: new integrations, new tools, ci speedups, memory leak instr…
waleedlatif1 Feb 28, 2026
b2cc5b6
Billing
Sg312 Mar 1, 2026
e07e3c3
v0.5.103: memory util instrumentation, API docs, amplitude, google pa…
waleedlatif1 Mar 2, 2026
f3474b0
Tool call loop
Sg312 Mar 2, 2026
2c20519
improvement: ui/ux
emir-karabeg Mar 2, 2026
0fb840c
Cleaned up home
emir-karabeg Mar 2, 2026
ae080f1
Merge branch 'feat/landing' into feat/mothership-copilot
emir-karabeg Mar 2, 2026
fce1024
Mothership block
Sg312 Mar 2, 2026
1d48289
Mothership block pudate
Sg312 Mar 2, 2026
e9550c6
Wand
Sg312 Mar 2, 2026
4622966
improvement(home): interactions
emir-karabeg Mar 3, 2026
553c376
Fix routes
Sg312 Mar 3, 2026
0249ca1
Fix files
Sg312 Mar 3, 2026
b3a639a
Logs
Sg312 Mar 3, 2026
fe5ab8a
improved streaming
emir-karabeg Mar 3, 2026
7fafc00
Task management
Sg312 Mar 3, 2026
1339915
Task vfs
Sg312 Mar 3, 2026
82f541e
improvement: ui
emir-karabeg Mar 3, 2026
fadda6a
improvement: task routing optimizations
emir-karabeg Mar 3, 2026
38c9ecd
resolved merge conflicts
emir-karabeg Mar 3, 2026
b57636e
finalized task navigation
emir-karabeg Mar 3, 2026
4f4191f
fix: task ordering
emir-karabeg Mar 3, 2026
df7e731
Add payload
Sg312 Mar 4, 2026
21404d1
fix: message stream pickup and task ordering
emir-karabeg Mar 4, 2026
a3b19fb
improvement(user-input): ui, files
emir-karabeg Mar 4, 2026
f1ec5fe
v0.5.104: memory improvements, nested subflows, careers page redirect…
waleedlatif1 Mar 4, 2026
d157592
improvement(theme): system default
emir-karabeg Mar 4, 2026
161fb37
Remove migrations
Sg312 Mar 4, 2026
4ede071
Fix merge conflicts
Sg312 Mar 4, 2026
9a7b5ff
Fix merge conflicts
Sg312 Mar 4, 2026
6f3559c
Fix merge conflicts
Sg312 Mar 4, 2026
da34917
Fix merge conflicts
Sg312 Mar 4, 2026
37337ae
Scope perms
Sg312 Mar 4, 2026
08fb8c1
Tool perms
Sg312 Mar 4, 2026
b07925f
feat(settings): migrate settings from modal to route-based pages (#3413)
waleedlatif1 Mar 4, 2026
c6ac0b4
Agent subdir
Sg312 Mar 5, 2026
3371540
Oauth link
Sg312 Mar 5, 2026
70c36cb
v0.5.105: slack remove reaction, nested subflow locks fix, servicenow…
waleedlatif1 Mar 5, 2026
eac8aca
Schedules page for workflows
Sg312 Mar 5, 2026
a368827
feat(api): add tables and files v1 REST API with OpenAPI docs (#3422)
waleedlatif1 Mar 5, 2026
73cd10c
Jobs 2
Sg312 Mar 5, 2026
7140867
Jobs
Sg312 Mar 5, 2026
dbef14b
feat(knowledge): connectors, user exclusions, expanded tools & airtab…
waleedlatif1 Mar 5, 2026
443e15e
Jobs
Sg312 Mar 6, 2026
17e1bb5
Nuke migrations
Sg312 Mar 6, 2026
3ce9475
v0.5.106: condition block and legacy kbs fixes, GPT 5.4
icecrasher321 Mar 6, 2026
9d001ea
Jobs
Sg312 Mar 6, 2026
5c24d24
Jobs
Sg312 Mar 6, 2026
280ac30
Jobs
Sg312 Mar 6, 2026
d6b97fe
Fix lint
Sg312 Mar 6, 2026
aac9e74
feat(knowledge): add 10 new knowledge base connectors (#3430)
waleedlatif1 Mar 6, 2026
4735245
feat(tables): inline cell editing with optimistic updates
waleedlatif1 Mar 6, 2026
ff4b2f8
lint
waleedlatif1 Mar 6, 2026
9665f49
fix(workflow): editor visible
emir-karabeg Mar 6, 2026
a5b148e
Native kb connectors
Sg312 Mar 6, 2026
6c6b357
Triggers in the vfs
Sg312 Mar 6, 2026
226a3f6
Fix lint
Sg312 Mar 6, 2026
0e7c719
improvement(sidebar): loading
emir-karabeg Mar 6, 2026
4350937
fix(sidebar): use client-generated UUIDs for stable optimistic update…
waleedlatif1 Mar 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
261 changes: 261 additions & 0 deletions .claude/commands/add-connector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,261 @@
---
description: Add a knowledge base connector for syncing documents from an external source
argument-hint: <service-name> [api-docs-url]
---

# Add Connector Skill

You are an expert at adding knowledge base connectors to Sim. A connector syncs documents from an external source (Confluence, Google Drive, Notion, etc.) into a knowledge base.

## Your Task

When the user asks you to create a connector:
1. Use Context7 or WebFetch to read the service's API documentation
2. Create the connector directory and config
3. Register it in the connector registry

## Directory Structure

Create files in `apps/sim/connectors/{service}/`:
```
connectors/{service}/
├── index.ts # Barrel export
└── {service}.ts # ConnectorConfig definition
```

## ConnectorConfig Structure

```typescript
import { createLogger } from '@sim/logger'
import { {Service}Icon } from '@/components/icons'
import { fetchWithRetry } from '@/lib/knowledge/documents/utils'
import type { ConnectorConfig, ExternalDocument, ExternalDocumentList } from '@/connectors/types'

const logger = createLogger('{Service}Connector')

export const {service}Connector: ConnectorConfig = {
id: '{service}',
name: '{Service}',
description: 'Sync documents from {Service} into your knowledge base',
version: '1.0.0',
icon: {Service}Icon,

oauth: {
required: true,
provider: '{service}', // Must match OAuthService in lib/oauth/types.ts
requiredScopes: ['read:...'],
},

configFields: [
// Rendered dynamically by the add-connector modal UI
// Supports 'short-input' and 'dropdown' types
],

listDocuments: async (accessToken, sourceConfig, cursor) => {
// Paginate via cursor, extract text, compute SHA-256 hash
// Return { documents: ExternalDocument[], nextCursor?, hasMore }
},

getDocument: async (accessToken, sourceConfig, externalId) => {
// Return ExternalDocument or null
},

validateConfig: async (accessToken, sourceConfig) => {
// Return { valid: true } or { valid: false, error: 'message' }
},

// Optional: map source metadata to semantic tag keys (translated to slots by sync engine)
mapTags: (metadata) => {
// Return Record<string, unknown> with keys matching tagDefinitions[].id
},
}
```

## ConfigField Types

The add-connector modal renders these automatically — no custom UI needed.

```typescript
// Text input
{
id: 'domain',
title: 'Domain',
type: 'short-input',
placeholder: 'yoursite.example.com',
required: true,
}

// Dropdown (static options)
{
id: 'contentType',
title: 'Content Type',
type: 'dropdown',
required: false,
options: [
{ label: 'Pages only', id: 'page' },
{ label: 'Blog posts only', id: 'blogpost' },
{ label: 'All content', id: 'all' },
],
}
```

## ExternalDocument Shape

Every document returned from `listDocuments`/`getDocument` must include:

```typescript
{
externalId: string // Source-specific unique ID
title: string // Document title
content: string // Extracted plain text
mimeType: 'text/plain' // Always text/plain (content is extracted)
contentHash: string // SHA-256 of content (change detection)
sourceUrl?: string // Link back to original (stored on document record)
metadata?: Record<string, unknown> // Source-specific data (fed to mapTags)
}
```

## Content Hashing (Required)

The sync engine uses content hashes for change detection:

```typescript
async function computeContentHash(content: string): Promise<string> {
const data = new TextEncoder().encode(content)
const hashBuffer = await crypto.subtle.digest('SHA-256', data)
return Array.from(new Uint8Array(hashBuffer)).map(b => b.toString(16).padStart(2, '0')).join('')
}
```

## tagDefinitions — Declared Tag Definitions

Declare which tags the connector populates using semantic IDs. Shown in the add-connector modal as opt-out checkboxes.
On connector creation, slots are **dynamically assigned** via `getNextAvailableSlot` — connectors never hardcode slot names.

```typescript
tagDefinitions: [
{ id: 'labels', displayName: 'Labels', fieldType: 'text' },
{ id: 'version', displayName: 'Version', fieldType: 'number' },
{ id: 'lastModified', displayName: 'Last Modified', fieldType: 'date' },
],
```

Each entry has:
- `id`: Semantic key matching a key returned by `mapTags` (e.g. `'labels'`, `'version'`)
- `displayName`: Human-readable name shown in the UI (e.g. "Labels", "Last Modified")
- `fieldType`: `'text'` | `'number'` | `'date'` | `'boolean'` — determines which slot pool to draw from

Users can opt out of specific tags in the modal. Disabled IDs are stored in `sourceConfig.disabledTagIds`.
The assigned mapping (`semantic id → slot`) is stored in `sourceConfig.tagSlotMapping`.

## mapTags — Metadata to Semantic Keys

Maps source metadata to semantic tag keys. Required if `tagDefinitions` is set.
The sync engine calls this automatically and translates semantic keys to actual DB slots
using the `tagSlotMapping` stored on the connector.

Return keys must match the `id` values declared in `tagDefinitions`.

```typescript
mapTags: (metadata: Record<string, unknown>): Record<string, unknown> => {
const result: Record<string, unknown> = {}

// Validate arrays before casting — metadata may be malformed
const labels = Array.isArray(metadata.labels) ? (metadata.labels as string[]) : []
if (labels.length > 0) result.labels = labels.join(', ')

// Validate numbers — guard against NaN
if (metadata.version != null) {
const num = Number(metadata.version)
if (!Number.isNaN(num)) result.version = num
}

// Validate dates — guard against Invalid Date
if (typeof metadata.lastModified === 'string') {
const date = new Date(metadata.lastModified)
if (!Number.isNaN(date.getTime())) result.lastModified = date
}

return result
}
```

## External API Calls — Use `fetchWithRetry`

All external API calls must use `fetchWithRetry` from `@/lib/knowledge/documents/utils` instead of raw `fetch()`. This provides exponential backoff with retries on 429/502/503/504 errors. It returns a standard `Response` — all `.ok`, `.json()`, `.text()` checks work unchanged.

For `validateConfig` (user-facing, called on save), pass `VALIDATE_RETRY_OPTIONS` to cap wait time at ~7s. Background operations (`listDocuments`, `getDocument`) use the built-in defaults (5 retries, ~31s max).

```typescript
import { VALIDATE_RETRY_OPTIONS, fetchWithRetry } from '@/lib/knowledge/documents/utils'

// Background sync — use defaults
const response = await fetchWithRetry(url, {
method: 'GET',
headers: { Authorization: `Bearer ${accessToken}` },
})

// validateConfig — tighter retry budget
const response = await fetchWithRetry(url, { ... }, VALIDATE_RETRY_OPTIONS)
```

## sourceUrl

If `ExternalDocument.sourceUrl` is set, the sync engine stores it on the document record. Always construct the full URL (not a relative path).

## Sync Engine Behavior (Do Not Modify)

The sync engine (`lib/knowledge/connectors/sync-engine.ts`) is connector-agnostic. It:
1. Calls `listDocuments` with pagination until `hasMore` is false
2. Compares `contentHash` to detect new/changed/unchanged documents
3. Stores `sourceUrl` and calls `mapTags` on insert/update automatically
4. Handles soft-delete of removed documents

You never need to modify the sync engine when adding a connector.

## OAuth Credential Reuse

Connectors reuse the existing OAuth infrastructure. The `oauth.provider` must match an `OAuthService` from `apps/sim/lib/oauth/types.ts`. Check existing providers before adding a new one.

## Icon

The `icon` field on `ConnectorConfig` is used throughout the UI — in the connector list, the add-connector modal, and as the document icon in the knowledge base table (replacing the generic file type icon for connector-sourced documents). The icon is read from `CONNECTOR_REGISTRY[connectorType].icon` at runtime — no separate icon map to maintain.

If the service already has an icon in `apps/sim/components/icons.tsx` (from a tool integration), reuse it. Otherwise, ask the user to provide the SVG.

## Registering

Add one line to `apps/sim/connectors/registry.ts`:

```typescript
import { {service}Connector } from '@/connectors/{service}'

export const CONNECTOR_REGISTRY: ConnectorRegistry = {
// ... existing connectors ...
{service}: {service}Connector,
}
```

## Reference Implementation

See `apps/sim/connectors/confluence/confluence.ts` for a complete example with:
- Multiple config field types (text + dropdown)
- Label fetching and CQL search filtering
- Blogpost + page content types
- `mapTags` mapping labels, version, and dates to semantic keys

## Checklist

- [ ] Created `connectors/{service}/{service}.ts` with full ConnectorConfig
- [ ] Created `connectors/{service}/index.ts` barrel export
- [ ] `oauth.provider` matches an existing OAuthService in `lib/oauth/types.ts`
- [ ] `listDocuments` handles pagination and computes content hashes
- [ ] `sourceUrl` set on each ExternalDocument (full URL, not relative)
- [ ] `metadata` includes source-specific data for tag mapping
- [ ] `tagDefinitions` declared for each semantic key returned by `mapTags`
- [ ] `mapTags` implemented if source has useful metadata (labels, dates, versions)
- [ ] `validateConfig` verifies the source is accessible
- [ ] All external API calls use `fetchWithRetry` (not raw `fetch`)
- [ ] All optional config fields validated in `validateConfig`
- [ ] Icon exists in `components/icons.tsx` (or asked user to provide SVG)
- [ ] Registered in `connectors/registry.ts`
26 changes: 26 additions & 0 deletions .cursor/rules/landing-seo-geo.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
description: SEO and GEO guidelines for the landing page
globs: ["apps/sim/app/(home)/**/*.tsx"]
---

# Landing Page — SEO / GEO

## SEO

- One `<h1>` per page, in Hero only — never add another.
- Strict heading hierarchy: H1 (Hero) → H2 (section titles) → H3 (feature names).
- Every section: `<section id="…" aria-labelledby="…-heading">`.
- Decorative/animated elements: `aria-hidden="true"`.
- All internal routes use Next.js `<Link>` (crawlable). External links get `rel="noopener noreferrer"`.
- Navbar is a Server Component (no `'use client'`) for immediate crawlability. Logo `<Image>` has `priority` (LCP element).
- Navbar `<nav>` carries `SiteNavigationElement` schema.org markup.
- Feature lists must stay in sync with `WebApplication.featureList` in `structured-data.tsx`.

## GEO (Generative Engine Optimisation)

- **Answer-first pattern**: each section's H2 + subtitle should directly answer a user question (e.g. "What is Sim?", "How fast can I deploy?").
- **Atomic answer blocks**: each feature / template card should be independently extractable by an AI summariser.
- **Entity consistency**: always write "Sim" by name — never "the platform" or "our tool".
- **Keyword density**: first 150 visible chars of Hero must name "Sim", "AI agents", "agentic workflows".
- **sr-only summaries**: Hero and Templates each have a `<p className="sr-only">` (~50 words) as an atomic product/catalog summary for AI citation.
- **Specific numbers**: prefer concrete figures ("1,000+ integrations", "15+ AI providers") over vague claims.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ bun-debug.log*
**/standalone/
sim-standalone.tar.gz

# redis
dump.rdb

# misc
.DS_Store
*.pem
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

<p align="center">Build and deploy AI agent workflows in minutes.</p>
<p align="center">The open-source platform to build AI agents and run your agentic workforce. Connect 1,000+ integrations and LLMs to orchestrate agentic workflows.</p>

<p align="center">
<a href="https://sim.ai" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/badge/sim.ai-6F3DFA" alt="Sim.ai"></a>
Expand Down
22 changes: 13 additions & 9 deletions apps/docs/app/[lang]/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,17 @@ export async function generateMetadata(props: {
return {
title: data.title,
description:
data.description || 'Sim visual workflow builder for AI applications documentation',
data.description ||
'Documentation for Sim — the open-source platform to build AI agents and run your agentic workforce.',
keywords: [
'AI workflow builder',
'visual workflow editor',
'AI automation',
'workflow automation',
'AI agents',
'no-code AI',
'drag and drop workflows',
'agentic workforce',
'AI agent platform',
'agentic workflows',
'LLM orchestration',
'AI automation',
'knowledge base',
'AI integrations',
data.title?.toLowerCase().split(' '),
]
.flat()
Expand All @@ -385,7 +387,8 @@ export async function generateMetadata(props: {
openGraph: {
title: data.title,
description:
data.description || 'Sim visual workflow builder for AI applications documentation',
data.description ||
'Documentation for Sim — the open-source platform to build AI agents and run your agentic workforce.',
url: fullUrl,
siteName: 'Sim Documentation',
type: 'article',
Expand All @@ -406,7 +409,8 @@ export async function generateMetadata(props: {
card: 'summary_large_image',
title: data.title,
description:
data.description || 'Sim visual workflow builder for AI applications documentation',
data.description ||
'Documentation for Sim — the open-source platform to build AI agents and run your agentic workforce.',
images: [ogImageUrl],
creator: '@simdotai',
site: '@simdotai',
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default async function Layout({ children, params }: LayoutProps) {
'@type': 'WebSite',
name: 'Sim Documentation',
description:
'Comprehensive documentation for Sim - the visual workflow builder for AI Agent Workflows.',
'Documentation for Sim the open-source platform to build AI agents and run your agentic workforce. Connect 1,000+ integrations and LLMs to deploy and orchestrate agentic workflows.',
url: 'https://docs.sim.ai',
publisher: {
'@type': 'Organization',
Expand Down
Loading
Loading