From e7ff38cf32088b4c597b59270f3fa4d3be26b6cf Mon Sep 17 00:00:00 2001 From: Waleed Date: Mon, 16 Nov 2026 23:42:10 -0800 Subject: [PATCH 01/12] improvement(ci): omit unused browser maps from acceptance builds (#10125) --- .github/workflows/checks.yml | 1 + apps/sim/lib/core/config/env.ts | 1 + apps/sim/next.config.ts | 2 +- apps/sim/turbo.json | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f49ec270d09..c9d8c57df4b 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -997,6 +997,7 @@ jobs: # lint's type-check and the `build` job's own `next build` (generated route types too) # already enforce. NEXT_BUILD_SKIP_TYPE_CHECK: 'true' + NEXT_BUILD_SKIP_SOURCE_MAPS: 'true' run: bunx turbo run build --filter=@sim/app # Everything `next start` reads, including the spreadsheet parse worker it spawns (named, so a diff --git a/apps/sim/lib/core/config/env.ts b/apps/sim/lib/core/config/env.ts index 5606ea7b2c2..712a558b8c7 100644 --- a/apps/sim/lib/core/config/env.ts +++ b/apps/sim/lib/core/config/env.ts @@ -347,6 +347,7 @@ export const env = createEnv({ // Infrastructure & Deployment NEXT_RUNTIME: z.string().optional(), // Next.js runtime environment DOCKER_BUILD: z.boolean().optional(), // Flag indicating Docker build environment + NEXT_BUILD_SKIP_SOURCE_MAPS: z.boolean().optional(), // Omits unused browser source maps in acceptance builds NEXT_BUILD_SKIP_TYPE_CHECK: z.boolean().optional(), // Skips `next build`'s TypeScript pass where another CI job type-checks // Background Jobs & Scheduling diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index 29ff064d278..e7c5a52ead2 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -30,7 +30,7 @@ const nextConfig: NextConfig = { // Safe here since this repo's source is already fully public on GitHub - // no additional exposure versus Next's default (disabled to avoid leaking // source on the client). - productionBrowserSourceMaps: true, + productionBrowserSourceMaps: !isTruthy(env.NEXT_BUILD_SKIP_SOURCE_MAPS), turbopack: { root: path.join(import.meta.dirname, '../..'), }, diff --git a/apps/sim/turbo.json b/apps/sim/turbo.json index 3521e7311fd..4320f58fd80 100644 --- a/apps/sim/turbo.json +++ b/apps/sim/turbo.json @@ -207,7 +207,7 @@ ] }, "build": { - "env": ["NEXT_BUILD_SKIP_TYPE_CHECK"], + "env": ["NEXT_BUILD_SKIP_SOURCE_MAPS", "NEXT_BUILD_SKIP_TYPE_CHECK"], "inputs": [ "$TURBO_DEFAULT$", ".env*", From d54ce94e95f415aebe49cfdb483165880075ec71 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 01:27:13 -0800 Subject: [PATCH 02/12] improvement(ci): reuse bounded compiler state for acceptance builds (#10127) --- .github/CI.md | 4 + .github/workflows/checks.yml | 38 ++++++- apps/docs/package.json | 2 +- apps/sim/lib/core/config/env.ts | 1 + apps/sim/next.config.ts | 24 +---- apps/sim/package.json | 2 +- apps/sim/turbo.json | 6 +- scripts/prune-turbopack-cache.mts | 141 ++++++++++++++++++++++++ scripts/prune-turbopack-cache.test.ts | 150 ++++++++++++++++++++++++++ scripts/prune-turbopack-cache.ts | 114 -------------------- 10 files changed, 344 insertions(+), 138 deletions(-) create mode 100644 scripts/prune-turbopack-cache.mts create mode 100644 scripts/prune-turbopack-cache.test.ts delete mode 100644 scripts/prune-turbopack-cache.ts diff --git a/.github/CI.md b/.github/CI.md index a355fc71c6f..5461465a43f 100644 --- a/.github/CI.md +++ b/.github/CI.md @@ -34,6 +34,10 @@ Database integration uses 4-vCPU Blacksmith runners with sticky dependency disks GitHub runners install dependencies directly rather than transferring Bun and `node_modules` archives. In a same-source paired comparison, those restores took 26.2 seconds before an 82-millisecond install, while a clean install took 12.42 seconds. This is one paired observation; retain the policy only while repeated CI timings support it. Blacksmith keeps its sticky dependency disks. GitHub Turbo output caches remain enabled for jobs that request them, with a commit-specific key and a task/event/fork-scoped restore prefix, so a rerun can reuse an exact entry without creating another archive. Push jobs never restore pull-request entries. +Trusted Blacksmith E2E builders can reuse Next's incremental compiler state when a complete Turbo build is not already cached. The compiler cache has its own mode, event, OS/architecture, resolved toolchain, lockfile and build-recipe namespace; fork PRs and GitHub fallback keep the compiler cache off. The build command always runs, and an uncertain cache probe restores state rather than skipping compilation. + +Compiler maintenance enforces a 20 GiB regular-file working-state limit before and after compilation, preserves the mounted root, and fails closed on access or ownership errors. Dev maintenance remains separate and nonblocking. Sticky disks are optional last-good compiler snapshots, not cross-job artifact handoff or validation receipts; no freshest-snapshot or physical-storage eviction guarantee is assumed. Hosted/deployment builds remain cache-off until separately qualified. A cold E2E qualification job took 259 seconds versus 225 uncached; fresh-runner warm and changed-source jobs took 148 and 159 seconds versus 227 and 229 uncached. These paired observations do not establish a universal CI speedup or justify smaller runners. Compilation and all existing acceptance coverage remain required. + Closing a same-repository pull request deletes only its GitHub merge-ref caches after verifying that it remains closed or merged. The regular `pull_request` workflow skips forks and Dependabot because their tokens cannot delete caches; those entries retain GitHub's normal cache eviction. Cleanup checks out no code and never selects a branch-wide or default-branch cache. Blacksmith sticky disks retain their separate lifecycle. Memory-heavy builds and browser jobs retain appropriately sized Blacksmith runners. Electron uses 4-vCPU Blacksmith: both shards passed within 14 seconds of the 8-vCPU control; the free GitHub rest shard was slower and its lease run stalled. diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index c9d8c57df4b..cacb1bd9e8d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -963,6 +963,8 @@ jobs: if: needs.changes.outputs.e2e_build == 'true' runs-on: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && 'blacksmith-16vcpu-ubuntu-2404' || 'linux-x64-8-core' }} timeout-minutes: 25 + env: + NEXT_BUILD_PERSISTENT_CACHE: ${{ (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && (github.event_name != 'pull_request' || !github.event.pull_request.head.repo.fork) && 'true' || 'false' }} steps: - *checkout-mirror @@ -982,8 +984,10 @@ jobs: echo "::warning::Runner has ${TOTAL_GB} GB. A cold-cache build peaks ~51 GB, so this run may be OOM-killed (reported only as 'the runner has received a shutdown signal'). Warm/partial builds should still fit." fi - - name: Build application - env: + - name: Plan incremental compiler state + id: compiler-cache-plan + if: env.NEXT_BUILD_PERSISTENT_CACHE == 'true' + env: &e2e-build-env NODE_OPTIONS: '--no-warnings --max-old-space-size=8192' NEXT_PUBLIC_APP_URL: 'http://localhost:3000' DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio' @@ -998,8 +1002,38 @@ jobs: # already enforce. NEXT_BUILD_SKIP_TYPE_CHECK: 'true' NEXT_BUILD_SKIP_SOURCE_MAPS: 'true' + run: | + echo "toolchain=bun$(bun --version)-node$(node --version)" >> "$GITHUB_OUTPUT" + if bunx turbo run build --filter=@sim/app --dry=json > "$RUNNER_TEMP/e2e-build-plan.json" && + jq -e 'type == "object" and (.tasks | type) == "array" and ([.tasks[] | select(.taskId == "@sim/app#build")] | length == 1 and .[0].cache.status == "HIT")' "$RUNNER_TEMP/e2e-build-plan.json" > /dev/null; then + echo 'restore=false' >> "$GITHUB_OUTPUT" + else + echo 'restore=true' >> "$GITHUB_OUTPUT" + fi + + - name: Mount incremental compiler state + id: compiler-cache + if: steps.compiler-cache-plan.outputs.restore == 'true' + uses: ./.github/actions/cache + with: + provider: ${{ vars.CI_PROVIDER }} + key: ${{ github.repository }}-next-build-e2e-v1-${{ runner.os }}-${{ runner.arch }}-${{ github.event_name }}-${{ steps.compiler-cache-plan.outputs.toolchain }}-${{ hashFiles('bun.lock', 'package.json', 'patches/**', 'apps/sim/package.json', 'apps/sim/next.config.ts', 'apps/sim/lib/core/config/env.ts', '.github/workflows/checks.yml', '.github/actions/setup/action.yml') }} + path: ./apps/sim/.next/cache + + - name: Bound restored compiler state + if: steps.compiler-cache.outcome == 'success' + working-directory: apps/sim + run: node ../../scripts/prune-turbopack-cache.mts --build + + - name: Build application + env: *e2e-build-env run: bunx turbo run build --filter=@sim/app + - name: Bound compiler state before persistence + if: always() && !cancelled() && steps.compiler-cache.outcome == 'success' + working-directory: apps/sim + run: node ../../scripts/prune-turbopack-cache.mts --build + # Everything `next start` reads, including the spreadsheet parse worker it spawns (named, so a # missing bundle fails packaging as it fails docker/app.Dockerfile); node_modules and the source # tree come from e2e-production's own checkout and setup, at the same workspace path and diff --git a/apps/docs/package.json b/apps/docs/package.json index 47d6aa4edd2..414a177528a 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "scripts": { "dev": "bun run dev:cache:cap && bun run content:generate && bunx concurrently --kill-others --names Next,Content \"next dev --port 3001\" \"bun scripts/compile-content.ts --watch\"", - "dev:cache:cap": "bun run ../../scripts/prune-turbopack-cache.ts", + "dev:cache:cap": "bun run ../../scripts/prune-turbopack-cache.mts", "dev:clean": "rm -rf .next/dev/cache", "build": "bun scripts/fetch-git-history.ts && bun run content:generate --prune && NODE_OPTIONS='--max-old-space-size=8192' next build", "start": "next start", diff --git a/apps/sim/lib/core/config/env.ts b/apps/sim/lib/core/config/env.ts index 712a558b8c7..5a757490398 100644 --- a/apps/sim/lib/core/config/env.ts +++ b/apps/sim/lib/core/config/env.ts @@ -347,6 +347,7 @@ export const env = createEnv({ // Infrastructure & Deployment NEXT_RUNTIME: z.string().optional(), // Next.js runtime environment DOCKER_BUILD: z.boolean().optional(), // Flag indicating Docker build environment + NEXT_BUILD_PERSISTENT_CACHE: z.boolean().optional(), // Enables incremental compiler state for qualified CI builds NEXT_BUILD_SKIP_SOURCE_MAPS: z.boolean().optional(), // Omits unused browser source maps in acceptance builds NEXT_BUILD_SKIP_TYPE_CHECK: z.boolean().optional(), // Skips `next build`'s TypeScript pass where another CI job type-checks diff --git a/apps/sim/next.config.ts b/apps/sim/next.config.ts index e7c5a52ead2..f3a331098ad 100644 --- a/apps/sim/next.config.ts +++ b/apps/sim/next.config.ts @@ -182,15 +182,8 @@ const nextConfig: NextConfig = { * 5.4x faster restarts and ~1.9x less memory. Cold compile with an empty * cache is unchanged (~32s either way) — the cache only pays back on restart. * - * This is deliberately NOT the same decision as `turbopackFileSystemCacheForBuild` - * below. That one is measured-harmful for `next build`; this one is - * measured-beneficial for `next dev`. It was previously `false`, but that was - * incidental — it was introduced by a landing-page redesign (#5408) whose - * description never mentions Turbopack, caching, or dev performance, and it - * is not covered by the #6078 build A/B cited below. - * * The cache is unbounded on disk (an abandoned one reached 78 GB here), so - * `scripts/prune-turbopack-cache.ts` is chained into every `dev` script to cap it. + * `scripts/prune-turbopack-cache.mts` is chained into every `dev` script to cap it. * A *corrupted* cache can abort Turbopack outright ("Cache corruption * detected: checksum mismatch") rather than falling back — it depends whether * the damaged region is read. `bun run dev:clean` and restart is the fix. @@ -203,18 +196,11 @@ const nextConfig: NextConfig = { */ turbopackFileSystemCacheForDev: true, /** - * Turbopack's persistent build cache (beta) stays off — it is a net loss at - * this app's size. A controlled A/B on a byte-identical module graph (PR - * #6078) measured compile at 113s with it off, 162s cold with it on, and 360s - * warm: the cache made the same build 3.2x slower. It also grew 5.1 GB -> - * 12 GB across two runs of an unchanged tree, so a cache degrades the longer - * it lives. Restoring across commits is separately undocumented-as-supported - * (vercel/next.js#87283 reports stale HTML from a cache built elsewhere). - * - * The explicit pin is load-bearing: 16.3.0 flipped this default to true for - * stable (vercel/next.js#94616), so dropping it re-enables the slower cache. + * Only qualified CI builds opt into persistent compiler state. Other builds + * remain cache-off until their own memory, invalidation and restore costs are + * qualified. CI keeps this state separate from complete build-output caches. */ - turbopackFileSystemCacheForBuild: false, + turbopackFileSystemCacheForBuild: isTruthy(env.NEXT_BUILD_PERSISTENT_CACHE), /** * TypeScript 7 ships no JavaScript compiler API until 7.1, so Next's default * checker cannot load it — this shells out to the project-local `tsc` instead. diff --git a/apps/sim/package.json b/apps/sim/package.json index 31a53480a53..97eef71c8f1 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -10,7 +10,7 @@ "scripts": { "dev": "bun run build:cli-runtime && bun run dev:cache:cap && next dev --port 3000", "dev:capped": "bun run build:cli-runtime && bun run dev:cache:cap && NODE_OPTIONS='--max-old-space-size=4096' next dev --port 3000", - "dev:cache:cap": "bun run ../../scripts/prune-turbopack-cache.ts", + "dev:cache:cap": "bun run ../../scripts/prune-turbopack-cache.mts", "dev:clean": "rm -rf .next/dev/cache", "dev:webpack": "bun run build:cli-runtime && next dev --webpack", "load:workflow": "bun run load:workflow:baseline", diff --git a/apps/sim/turbo.json b/apps/sim/turbo.json index 4320f58fd80..61dbbe1da2b 100644 --- a/apps/sim/turbo.json +++ b/apps/sim/turbo.json @@ -207,7 +207,11 @@ ] }, "build": { - "env": ["NEXT_BUILD_SKIP_SOURCE_MAPS", "NEXT_BUILD_SKIP_TYPE_CHECK"], + "env": [ + "NEXT_BUILD_PERSISTENT_CACHE", + "NEXT_BUILD_SKIP_SOURCE_MAPS", + "NEXT_BUILD_SKIP_TYPE_CHECK" + ], "inputs": [ "$TURBO_DEFAULT$", ".env*", diff --git a/scripts/prune-turbopack-cache.mts b/scripts/prune-turbopack-cache.mts new file mode 100644 index 00000000000..f8162ef56fc --- /dev/null +++ b/scripts/prune-turbopack-cache.mts @@ -0,0 +1,141 @@ +#!/usr/bin/env node +/** + * Caps each app's Turbopack cache from its working directory. + * + * Dev maintenance is best effort and never blocks startup. `--build` selects + * `.next/cache`, preserves its mounted root, and fails on maintenance errors; + * run it only between compiler processes. Oversized state is discarded so the + * next compiler starts cold. Child symlinks are neither counted nor followed. + * + * Build maintenance uses Node's bounded directory iterator and stops counting + * above the cap. Dev commands keep Bun and its existing best-effort behavior. + * + * CI build maintenance runs with Node 24: `node scripts/prune-turbopack-cache.mts [--build] [--force] [--dry-run]`. + * `SIM_TURBOPACK_CACHE_MAX_GB` overrides the default 20 GiB cap. + */ +import { existsSync, lstatSync, statSync } from 'node:fs' +import { opendir, rm, rmdir, stat } from 'node:fs/promises' +import path from 'node:path' + +const DEFAULT_MAX_GB = 20 +const BYTES_PER_GB = 1024 ** 3 +const BUILD_CACHE = process.argv.includes('--build') + +/** + * Each app owns its cache under its working directory. Build maintenance selects + * a separate root, so it cannot prune a live dev server's state. + */ +const CACHE_DIR = path.resolve( + process.cwd(), + BUILD_CACHE ? '.next/cache' : '.next/dev/cache/turbopack' +) + +function isMissingPath(error: unknown): boolean { + return error instanceof Error && 'code' in error && error.code === 'ENOENT' +} + +/** Counts regular files without following symlinks or retaining the tree in memory. */ +async function directorySize(dir: string, limit: number): Promise { + let total = 0 + let entries: Awaited> + try { + entries = await opendir(dir, { bufferSize: 32 }) + } catch (error) { + if (BUILD_CACHE && isMissingPath(error)) return 0 + throw error + } + for await (const entry of entries) { + const entryPath = path.join(dir, entry.name) + if (entry.isDirectory()) { + total += await directorySize(entryPath, limit - total) + } else if (entry.isFile()) { + try { + total += (await stat(entryPath)).size + } catch (error) { + if (BUILD_CACHE && !isMissingPath(error)) throw error + } + } + if (total > limit) break + } + return total +} + +async function clearDirectory(dir: string): Promise { + for await (const entry of await opendir(dir, { bufferSize: 32 })) { + const entryPath = path.join(dir, entry.name) + try { + if (entry.isDirectory()) { + await clearDirectory(entryPath) + await rmdir(entryPath) + } else { + await rm(entryPath, { force: true }) + } + } catch (error) { + if (!isMissingPath(error)) throw error + } + } +} + +function parseMaxGb(): number { + const raw = process.env.SIM_TURBOPACK_CACHE_MAX_GB + if (!raw) return DEFAULT_MAX_GB + const parsed = Number(raw) + if (!Number.isFinite(parsed) || parsed <= 0) { + console.warn( + `[turbopack-cache] ignoring invalid SIM_TURBOPACK_CACHE_MAX_GB=${raw}, using ${DEFAULT_MAX_GB}` + ) + return DEFAULT_MAX_GB + } + return parsed +} + +async function main() { + const force = process.argv.includes('--force') + const dryRun = process.argv.includes('--dry-run') + + if (BUILD_CACHE) { + let root: ReturnType + try { + root = lstatSync(CACHE_DIR) + } catch (error) { + if (isMissingPath(error)) return + throw error + } + if (root.isSymbolicLink() || !root.isDirectory()) + throw new Error('Build cache root must be a directory without symlinks') + } else if (!existsSync(CACHE_DIR) || !statSync(CACHE_DIR).isDirectory()) { + return + } + + const maxGb = parseMaxGb() + const limit = BUILD_CACHE ? maxGb * BYTES_PER_GB : Number.POSITIVE_INFINITY + const bytes = force ? 0 : await directorySize(CACHE_DIR, limit) + const gb = bytes / BYTES_PER_GB + const sizeLabel = force + ? 'cache' + : `${BUILD_CACHE && bytes > limit ? 'at least ' : ''}${gb.toFixed(1)} GB` + + if (!force && gb <= maxGb) { + if (dryRun) console.log(`[turbopack-cache] ${sizeLabel} (cap ${maxGb} GB) — keeping`) + return + } + + const reason = force ? 'forced' : `over the ${maxGb} GB cap` + if (dryRun) { + console.log(`[turbopack-cache] ${sizeLabel} is ${reason} — would prune (dry run)`) + return + } + + console.log(`[turbopack-cache] ${sizeLabel} is ${reason} — pruning; next start recompiles cold`) + if (!BUILD_CACHE && lstatSync(CACHE_DIR).isSymbolicLink()) { + await rm(CACHE_DIR, { force: true }) + return + } + await clearDirectory(CACHE_DIR) + if (!BUILD_CACHE) await rmdir(CACHE_DIR) +} + +main().catch((error) => { + console.warn('[turbopack-cache] prune skipped:', error) + if (BUILD_CACHE) process.exitCode = 1 +}) diff --git a/scripts/prune-turbopack-cache.test.ts b/scripts/prune-turbopack-cache.test.ts new file mode 100644 index 00000000000..57cd68bfa37 --- /dev/null +++ b/scripts/prune-turbopack-cache.test.ts @@ -0,0 +1,150 @@ +import { spawnSync } from 'node:child_process' +import { + existsSync, + lstatSync, + mkdirSync, + mkdtempSync, + readdirSync, + readFileSync, + rmSync, + statSync, + symlinkSync, + writeFileSync, +} from 'node:fs' +import { tmpdir } from 'node:os' +import { join, resolve } from 'node:path' +import { afterEach, describe, expect, it } from 'vitest' + +const script = resolve(import.meta.dirname, 'prune-turbopack-cache.mts') +const fixtures: string[] = [] + +function fixture() { + const root = mkdtempSync(join(tmpdir(), 'sim-compiler-cache-')) + fixtures.push(root) + const build = join(root, '.next/cache') + const dev = join(root, '.next/dev/cache/turbopack') + const outside = join(root, 'unrelated') + for (const dir of [build, dev, outside]) { + mkdirSync(dir, { recursive: true }) + writeFileSync(join(dir, 'state'), Buffer.alloc(4_096)) + } + const nested = join(build, 'nested', 'state') + mkdirSync(nested, { recursive: true }) + for (let index = 0; index < 40; index++) writeFileSync(join(nested, String(index)), 'x') + symlinkSync(outside, join(build, 'linked'), process.platform === 'win32' ? 'junction' : 'dir') + return { root, build, dev, outside } +} + +function run(root: string, args: string[], maximum = '0.000001') { + return spawnSync(args.includes('--build') ? 'node' : 'bun', [script, ...args], { + cwd: root, + encoding: 'utf8', + timeout: 10_000, + env: { ...process.env, SIM_TURBOPACK_CACHE_MAX_GB: maximum }, + }) +} + +afterEach(() => { + for (const root of fixtures.splice(0)) rmSync(root, { recursive: true, force: true }) +}) + +describe('compiler cache maintenance through the real CLI', () => { + it.each(['size', 'force'])( + 'clears only build contents by %s while preserving its mount', + (mode) => { + const { root, build, dev, outside } = fixture() + const inode = statSync(build).ino + const result = run( + root, + mode === 'force' ? ['--build', '--force'] : ['--build'], + mode === 'force' ? '1' : undefined + ) + expect(result.status, result.stderr).toBe(0) + expect(existsSync(build)).toBe(true) + expect(statSync(build).ino).toBe(inode) + expect(readdirSync(build)).toEqual([]) + expect(existsSync(join(dev, 'state'))).toBe(true) + expect(existsSync(join(outside, 'state'))).toBe(true) + } + ) + + it('retains useful build state without counting external symlink targets', () => { + const { root, build, dev, outside } = fixture() + const inode = statSync(build).ino + const buildBytes = readFileSync(join(build, 'state')) + const devBytes = readFileSync(join(dev, 'state')) + const outsideBytes = readFileSync(join(outside, 'state')) + expect(run(root, ['--build'], '0.000006').status).toBe(0) + expect(statSync(build).ino).toBe(inode) + expect(readFileSync(join(build, 'state'))).toEqual(buildBytes) + expect(readFileSync(join(dev, 'state'))).toEqual(devBytes) + expect(readFileSync(join(outside, 'state'))).toEqual(outsideBytes) + }) + + it('does not substitute dev state when the build cache is absent', () => { + const { root, build, dev } = fixture() + rmSync(build, { recursive: true }) + expect(run(root, ['--build']).status).toBe(0) + expect(existsSync(join(dev, 'state'))).toBe(true) + }) + + it('rejects a non-directory ancestor instead of treating it as an absent build cache', () => { + const { root, outside } = fixture() + const parent = join(root, '.next') + rmSync(parent, { recursive: true }) + writeFileSync(parent, 'unrelated parent file') + const result = run(root, ['--build']) + expect(result.status, result.stderr).not.toBe(0) + expect(readFileSync(parent, 'utf8')).toBe('unrelated parent file') + expect(existsSync(join(outside, 'state'))).toBe(true) + }) + + it('keeps the existing dev command scoped to dev state', () => { + const { root, build, dev, outside } = fixture() + expect(run(root, []).status).toBe(0) + expect(existsSync(dev)).toBe(false) + expect(existsSync(join(build, 'state'))).toBe(true) + expect(existsSync(join(outside, 'state'))).toBe(true) + }) + + it.each(['size', 'force'])( + 'unlinks a dev root symlink by %s without traversing its target', + (mode) => { + const { root, build, dev, outside } = fixture() + rmSync(dev, { recursive: true }) + symlinkSync(outside, dev, process.platform === 'win32' ? 'junction' : 'dir') + const outsideBytes = readFileSync(join(outside, 'state')) + const result = run( + root, + mode === 'force' ? ['--force'] : [], + mode === 'force' ? '1' : undefined + ) + expect(result.status, result.stderr).toBe(0) + expect(readFileSync(join(outside, 'state'))).toEqual(outsideBytes) + expect(existsSync(dev)).toBe(false) + expect(existsSync(join(build, 'state'))).toBe(true) + } + ) + + it('leaves both caches intact for a build dry run', () => { + const { root, build, dev } = fixture() + expect(run(root, ['--build', '--dry-run']).status).toBe(0) + expect(existsSync(join(build, 'state'))).toBe(true) + expect(existsSync(join(dev, 'state'))).toBe(true) + }) + + it.each([true, false])( + 'refuses a symlink build root when target existence is %s', + (targetExists) => { + const { root, build, dev, outside } = fixture() + rmSync(build, { recursive: true }) + symlinkSync(outside, build, process.platform === 'win32' ? 'junction' : 'dir') + if (!targetExists) rmSync(outside, { recursive: true }) + const result = run(root, ['--build', '--force']) + expect(result.status, result.stderr).not.toBe(0) + expect(lstatSync(build).isSymbolicLink()).toBe(true) + expect(existsSync(join(outside, 'state'))).toBe(targetExists) + expect(existsSync(join(dev, 'state'))).toBe(true) + } + ) +}) diff --git a/scripts/prune-turbopack-cache.ts b/scripts/prune-turbopack-cache.ts deleted file mode 100644 index 2437a0dd216..00000000000 --- a/scripts/prune-turbopack-cache.ts +++ /dev/null @@ -1,114 +0,0 @@ -#!/usr/bin/env bun -/** - * Caps the size of Turbopack's dev filesystem cache. - * - * `experimental.turbopackFileSystemCacheForDev` is ON (see `apps/sim/next.config.ts`) - * because it makes dev-server restarts 5.4x faster and cuts RSS ~1.9x. The tradeoff - * is that the cache is an append-heavy LSM store with no upstream GC: it grows with - * every route compiled and every code change, and it is never pruned. An abandoned - * cache in this repo reached 78 GB across 1,848 SST files. - * - * A stale cache is also slower to read back, so an unbounded one eventually erodes - * the win it exists to provide. This script drops the whole cache once it crosses a - * threshold; Turbopack rebuilds it on the next run (one cold compile, ~32s). - * - * Also the remedy when Turbopack aborts with `Cache corruption detected: - * checksum mismatch` — it does not self-heal from a corrupted cache, so prune - * and restart. (An ordinary hard kill does not corrupt it; Turbopack discards a - * partial write and rebuilds silently.) - * - * Runs automatically before every `dev` script. Also invokable directly: - * bun run scripts/prune-turbopack-cache.ts # prune if over the cap - * bun run scripts/prune-turbopack-cache.ts --force # always prune - * bun run scripts/prune-turbopack-cache.ts --dry-run # report only - * - * Override the cap with `SIM_TURBOPACK_CACHE_MAX_GB` (default 20). - * - * The cap is a backstop, not routine maintenance. A normal session's cache sits - * around 1-2 GB; the 78 GB case was a month of accumulation while the feature was - * effectively abandoned. Measured cost of the size walk: ~30ms on a real cache, - * ~85ms at 2,000 files — under 2% of a warm restart. - * - * Safe to run while a dev server is live, which happens if a second server is - * started from the same checkout: the running server keeps its in-memory state - * and continues serving (verified — no crash, no corruption). It does stop - * persisting for the rest of that session, so its *next* start is cold once, then - * back to normal. Nothing to clean up. - * - * Note for anyone benchmarking the cache: stop the dev server with SIGINT, not - * `kill -9`. Turbopack discards a partially-written cache and rebuilds silently, - * so a hard kill makes a real cache win read as no win at all. - */ -import { existsSync, statSync } from 'node:fs' -import { readdir, rm, stat } from 'node:fs/promises' -import path from 'node:path' - -const DEFAULT_MAX_GB = 20 -const BYTES_PER_GB = 1024 ** 3 - -/** - * Resolved from the working directory, not hardcoded to one app: every Next app - * in the monorepo has its own dev cache (`apps/docs` runs `next dev` too and, with - * no override, uses the Next default where the cache is on). Each app caps its - * own, so one app's dev start never prunes a cache another app is holding open. - */ -const CACHE_DIR = path.resolve(process.cwd(), '.next', 'dev', 'cache', 'turbopack') - -/** Sums the size of every regular file under `dir`, skipping symlinks. */ -async function directorySize(dir: string): Promise { - let total = 0 - const entries = await readdir(dir, { withFileTypes: true, recursive: true }) - for (const entry of entries) { - if (!entry.isFile()) continue - try { - total += (await stat(path.join(entry.parentPath, entry.name))).size - } catch { - // Turbopack compacts while we walk; a file vanishing mid-scan is expected. - } - } - return total -} - -function parseMaxGb(): number { - const raw = process.env.SIM_TURBOPACK_CACHE_MAX_GB - if (!raw) return DEFAULT_MAX_GB - const parsed = Number(raw) - if (!Number.isFinite(parsed) || parsed <= 0) { - console.warn( - `[turbopack-cache] ignoring invalid SIM_TURBOPACK_CACHE_MAX_GB=${raw}, using ${DEFAULT_MAX_GB}` - ) - return DEFAULT_MAX_GB - } - return parsed -} - -async function main() { - const force = process.argv.includes('--force') - const dryRun = process.argv.includes('--dry-run') - - if (!existsSync(CACHE_DIR) || !statSync(CACHE_DIR).isDirectory()) return - - const maxGb = parseMaxGb() - const bytes = await directorySize(CACHE_DIR) - const gb = bytes / BYTES_PER_GB - const sizeLabel = `${gb.toFixed(1)} GB` - - if (!force && gb <= maxGb) { - if (dryRun) console.log(`[turbopack-cache] ${sizeLabel} (cap ${maxGb} GB) — keeping`) - return - } - - const reason = force ? 'forced' : `over the ${maxGb} GB cap` - if (dryRun) { - console.log(`[turbopack-cache] ${sizeLabel} is ${reason} — would prune (dry run)`) - return - } - - console.log(`[turbopack-cache] ${sizeLabel} is ${reason} — pruning; next start recompiles cold`) - await rm(CACHE_DIR, { recursive: true, force: true }) -} - -main().catch((error) => { - // Never block `next dev` on a cache-maintenance failure. - console.warn('[turbopack-cache] prune skipped:', error) -}) From d697c4a9744178cd7a25eca98dbcae2a9eac7766 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 06:11:24 -0800 Subject: [PATCH 03/12] improvement(computer-use): list only what changed in the observation after an action (#10126) * improvement(computer-use): list only what changed in the observation after an action * send a whole tree when nothing visible changed or a window opened or closed * report folded rows, send whole trees for partial reads, and cache the rows exactly as sent --- apps/desktop/src/preload/index.ts | 1 + .../tools/client/computer-tool-execution.ts | 6 +- .../tools/client/computer-tool-result.test.ts | 148 ++++++++++++++++++ .../tools/client/computer-tool-result.ts | 148 ++++++++++++++++-- packages/desktop-bridge/src/index.ts | 5 + 5 files changed, 293 insertions(+), 15 deletions(-) diff --git a/apps/desktop/src/preload/index.ts b/apps/desktop/src/preload/index.ts index e4a0c216116..873b880fba2 100644 --- a/apps/desktop/src/preload/index.ts +++ b/apps/desktop/src/preload/index.ts @@ -127,6 +127,7 @@ const api: SimDesktopApi = { ...(process.platform === 'darwin' ? { computerUse: { + stableElementIds: true, getActivity: () => ipcRenderer.invoke('computer-use:get-activity'), getStatus: () => ipcRenderer.invoke('computer-use:status'), setEnabled: (enabled: boolean) => ipcRenderer.invoke('computer-use:set-enabled', enabled), diff --git a/apps/sim/lib/mothership/tools/client/computer-tool-execution.ts b/apps/sim/lib/mothership/tools/client/computer-tool-execution.ts index e4a38a1eb9f..4539b3e6f8d 100644 --- a/apps/sim/lib/mothership/tools/client/computer-tool-execution.ts +++ b/apps/sim/lib/mothership/tools/client/computer-tool-execution.ts @@ -5,6 +5,7 @@ import { getErrorMessage } from '@sim/utils/errors' import { omit } from '@sim/utils/object' import { backoffWithJitter } from '@sim/utils/retry' import { cancelComputerUseTool, executeComputerUseTool } from '@/lib/computer-use/transport' +import { getDesktopBridge } from '@/lib/desktop' import { ASYNC_TOOL_CONFIRMATION_STATUS, type AsyncConfirmationStatus, @@ -245,7 +246,10 @@ export async function executeComputerToolOnClient( : result.kind === 'action' && !result.verified ? 'Input was dispatched. Inspect the returned observation or the app to verify its effect.' : 'Computer observation completed', - data: computerToolResultForModel(result), + data: computerToolResultForModel(result, { + baseSnapshotId: 'snapshotId' in parsed.data ? parsed.data.snapshotId : undefined, + stableElementIds: getDesktopBridge()?.computerUse?.stableElementIds === true, + }), } } else execution.completion = { diff --git a/apps/sim/lib/mothership/tools/client/computer-tool-result.test.ts b/apps/sim/lib/mothership/tools/client/computer-tool-result.test.ts index 0e9fb9d563c..a12d8287896 100644 --- a/apps/sim/lib/mothership/tools/client/computer-tool-result.test.ts +++ b/apps/sim/lib/mothership/tools/client/computer-tool-result.test.ts @@ -299,3 +299,151 @@ describe('native computer model projection', () => { expect(computerToolResultForModel(result)).toEqual(result) }) }) + +describe('change-only observations after an action', () => { + const buttons = (snapshotId: string, labels: string[], windowId = '1'): ComputerUseSnapshot => ({ + kind: 'state', + bundleId: 'com.example.Fixture', + snapshotId, + windowId, + windows: [{ windowId, title: 'Fixture', x: 0, y: 0, width: 400, height: 300 }], + nodes: labels.map((label, index) => ({ + elementId: `e${index}`, + role: 'AXButton', + label, + actions: ['AXPress'], + })), + truncated: false, + }) + const click = (observation: ComputerUseSnapshot): ComputerUseResult => ({ + kind: 'action', + action: 'click', + bundleId: observation.bundleId, + dispatched: true, + verified: false, + observation, + }) + const tree = (result: unknown) => + (result as { observation: { accessibilityTree: string } }).observation.accessibilityTree + const field = (result: unknown, name: string) => + (result as { observation: Record }).observation[name] + const labels = ['One', 'Two', 'Three', 'Four', 'Five', 'Six'] + const stable = { stableElementIds: true } + + it('sends whole trees when the desktop cannot keep ids stable', () => { + computerToolResultForModel(buttons('a1', labels)) + const result = computerToolResultForModel( + click(buttons('a2', [...labels.slice(0, 5), 'Changed'])), + { + baseSnapshotId: 'a1', + } + ) + expect(field(result, 'changedSince')).toBeUndefined() + expect(tree(result).split('\n')).toHaveLength(6) + }) + + it('sends a whole tree when the snapshot the action used is unknown', () => { + const result = computerToolResultForModel(click(buttons('b2', labels)), { + ...stable, + baseSnapshotId: 'never-seen', + }) + expect(field(result, 'changedSince')).toBeUndefined() + expect(tree(result).split('\n')).toHaveLength(6) + }) + + it('lists only changed and new rows and the ids that disappeared', () => { + computerToolResultForModel(buttons('c1', labels)) + const next = buttons('c2', ['One', 'Two', 'Three', 'Four', 'Renamed']) + next.nodes.push({ elementId: 'e9', role: 'AXButton', label: 'Added', actions: ['AXPress'] }) + const result = computerToolResultForModel(click(next), { ...stable, baseSnapshotId: 'c1' }) + expect(field(result, 'changedSince')).toBe('c1') + expect(tree(result)).toContain('label="Renamed"') + expect(tree(result)).toContain('e9 AXButton label="Added"') + expect(tree(result)).not.toContain('label="One"') + expect(field(result, 'removedElementIds')).toEqual(['e5']) + }) + + it('folds earlier change lists into what the next action is compared against', () => { + computerToolResultForModel(buttons('d1', labels)) + const renamed = [...labels.slice(0, 5), 'Renamed'] + computerToolResultForModel(click(buttons('d2', renamed)), { ...stable, baseSnapshotId: 'd1' }) + const result = computerToolResultForModel(click(buttons('d3', ['Uno', ...renamed.slice(1)])), { + ...stable, + baseSnapshotId: 'd2', + }) + expect(field(result, 'changedSince')).toBe('d2') + expect(tree(result)).toContain('label="Uno"') + expect(tree(result)).not.toContain('label="Renamed"') + }) + + it('sends a whole tree when an action changed nothing visible', () => { + computerToolResultForModel(buttons('k1', labels)) + const result = computerToolResultForModel(click(buttons('k2', labels)), { + ...stable, + baseSnapshotId: 'k1', + }) + expect(field(result, 'changedSince')).toBeUndefined() + expect(tree(result).split('\n')).toHaveLength(6) + }) + + it('sends a whole tree when a window, sheet or popover opens', () => { + computerToolResultForModel(buttons('m1', labels)) + const next = buttons('m2', [...labels.slice(0, 5), 'Renamed']) + next.windows.push({ windowId: '9', title: 'Sheet', x: 0, y: 0, width: 200, height: 100 }) + const result = computerToolResultForModel(click(next), { ...stable, baseSnapshotId: 'm1' }) + expect(field(result, 'changedSince')).toBeUndefined() + }) + + it('reports a shown row that folded into a layout wrapper as no longer shown', () => { + const pane = (enabled: boolean, snapshotId: string): ComputerUseSnapshot => { + const state = buttons(snapshotId, [...labels.slice(0, 5), enabled ? 'Ready' : 'Busy']) + state.nodes.push({ elementId: 'e8', role: 'AXGroup', actions: [], enabled }) + return state + } + computerToolResultForModel(pane(false, 'n1')) + const result = computerToolResultForModel(click(pane(true, 'n2')), { + ...stable, + baseSnapshotId: 'n1', + }) + expect(field(result, 'changedSince')).toBe('n1') + expect(field(result, 'removedElementIds')).toEqual(['e8']) + }) + + it('sends a whole tree when the native read was cut short', () => { + computerToolResultForModel(buttons('p1', labels)) + const partial = { ...buttons('p2', labels.slice(0, 4)), truncated: true } + const result = computerToolResultForModel(click(partial), { ...stable, baseSnapshotId: 'p1' }) + expect(field(result, 'changedSince')).toBeUndefined() + expect(field(result, 'removedElementIds')).toBeUndefined() + }) + + it('returns to a whole tree after a run of change lists', () => { + computerToolResultForModel(buttons('f0', labels)) + let result: unknown + for (let step = 1; step <= 5; step++) + result = computerToolResultForModel( + click(buttons(`f${step}`, [...labels.slice(0, 5), `Step ${step}`])), + { + ...stable, + baseSnapshotId: `f${step - 1}`, + } + ) + expect(field(result, 'changedSince')).toBeUndefined() + expect(tree(result).split('\n')).toHaveLength(6) + }) + + it('sends a whole tree for another window or when most of the tree changed', () => { + computerToolResultForModel(buttons('g1', labels)) + const otherWindow = computerToolResultForModel(click(buttons('g2', labels, '2')), { + ...stable, + baseSnapshotId: 'g1', + }) + expect(field(otherWindow, 'changedSince')).toBeUndefined() + computerToolResultForModel(buttons('h1', labels)) + const rewritten = computerToolResultForModel( + click(buttons('h2', ['A', 'B', 'C', 'D', 'Five', 'Six'])), + { ...stable, baseSnapshotId: 'h1' } + ) + expect(field(rewritten, 'changedSince')).toBeUndefined() + }) +}) diff --git a/apps/sim/lib/mothership/tools/client/computer-tool-result.ts b/apps/sim/lib/mothership/tools/client/computer-tool-result.ts index 72db13ab9cf..2be5ccd5657 100644 --- a/apps/sim/lib/mothership/tools/client/computer-tool-result.ts +++ b/apps/sim/lib/mothership/tools/client/computer-tool-result.ts @@ -1,5 +1,6 @@ import type { ComputerUseResult, ComputerUseSnapshot } from '@sim/desktop-bridge/computer-use' import { truncateAtCodePoint } from '@sim/utils/string' +import { LRUCache } from 'lru-cache' // Keep encoded pixels below the 10 MiB completion body cap, with room for state and its envelope. const MAX_SCREENSHOT_BASE64_BYTES = 9 * 1024 * 1024 @@ -8,18 +9,56 @@ const MAX_SCREENSHOT_BASE64_BYTES = 9 * 1024 * 1024 const MAX_STATE_BYTES = 22 * 1024 const encoder = new TextEncoder() +/** Change-only observations in a row before a full tree again, so a condensed context recovers. */ +const MAX_CHAINED_CHANGES = 4 + +/** What the model has been shown of a snapshot: its rows, folding in any change lists before it. */ +interface KnownTree { + snapshotId: string + bundleId: string + windowId: string + /** The app's windows when shown, so a window, sheet or popover that opens or closes gets a whole tree. */ + windowIds: string[] + rows: Map + changesSinceFull: number +} + +const knownTrees = new LRUCache({ max: 64 }) + +export interface ComputerToolResultContext { + /** The snapshot the action consumed; its observation then lists only rows that changed since it. */ + baseSnapshotId?: string + /** Whether the desktop keeps an element's id across observations; positional ids get whole trees. */ + stableElementIds?: boolean +} + /** Screenshots are image observations; a bounded readable tree keeps actionable references inline. */ -export function computerToolResultForModel(result: ComputerUseResult) { - if (result.kind === 'state') return snapshotForModel(result) +export function computerToolResultForModel( + result: ComputerUseResult, + context: ComputerToolResultContext = {} +) { + if (result.kind === 'state') return remember(snapshotForModel(result)) if (result.kind !== 'action' || !result.observation) return result const { observation: raw, ...action } = result - const { observations, ...observation } = snapshotForModel( - raw, - jsonBytes({ ...action, observation: null }) + const base = + context.stableElementIds && context.baseSnapshotId + ? knownTrees.get(context.baseSnapshotId) + : undefined + const { observations, ...observation } = remember( + snapshotForModel(raw, jsonBytes({ ...action, observation: null }), base) ) return { ...action, observation, ...(observations ? { observations } : {}) } } +/** Records what the model now knows of this snapshot and returns only what it sees. */ +function remember({ + known, + ...projected +}: T & { known: KnownTree }) { + knownTrees.set(projected.snapshotId, known) + return projected +} + function jsonBytes(value: unknown): number { return encoder.encode(JSON.stringify(value)).length } @@ -77,7 +116,7 @@ function nodeRow( return fields.join(' ') } -function snapshotForModel(result: ComputerUseSnapshot, envelopeBytes = 0) { +function snapshotForModel(result: ComputerUseSnapshot, envelopeBytes = 0, base?: KnownTree) { const { screenshot, nodes, windows: allWindows, ...state } = result const image = screenshot && screenshot.base64.length <= MAX_SCREENSHOT_BASE64_BYTES ? screenshot : undefined @@ -139,6 +178,50 @@ function snapshotForModel(result: ComputerUseSnapshot, envelopeBytes = 0) { nodeRow(node, shownParent.get(node.elementId), state.windowId), ]) ) + const clipped = + nodes.some( + (node) => + (node.label?.length ?? 0) > 512 || + (node.value?.length ?? 0) > 512 || + (node.placeholder?.length ?? 0) > 256 || + node.actions.length > 16 + ) || allWindows.some((window) => window.title.length > 256) + const changes = base && changesSince(base, result, shown, rows) + if (changes) { + const changed = { + ...model, + treeFormat: `${model.treeFormat} Only rows added or changed since snapshot ${base.snapshotId} are listed: every other row of that snapshot is unchanged and keeps its elementId, and removedElementIds are no longer shown. Use get_app_state for the whole tree.`, + changedSince: base.snapshotId, + accessibilityTree: changes.ids.map((id) => rows.get(id)).join('\n'), + removedElementIds: changes.removed, + omittedNodeCount: 0, + } + if (jsonBytes(changed) + envelopeBytes <= MAX_STATE_BYTES) { + const known = new Map(base.rows) + for (const id of changes.removed) known.delete(id) + for (const id of changes.ids) known.set(id, rows.get(id) ?? '') + return { + ...changed, + truncated: + state.truncated || windows.length < allWindows.length || clipped || screenshotOmitted, + ...(image + ? { + observations: [ + { name: 'Computer screenshot', mediaType: image.mimeType, data: image.base64 }, + ], + } + : {}), + known: { + snapshotId: state.snapshotId, + bundleId: state.bundleId, + windowId: state.windowId, + windowIds: allWindows.map((window) => window.windowId), + rows: known, + changesSinceFull: base.changesSinceFull + 1, + }, + } + } + } const priority = (node: SnapshotNode) => { const visible = selectedWindow && @@ -197,14 +280,6 @@ function snapshotForModel(result: ComputerUseSnapshot, envelopeBytes = 0) { /** Keep the editor itself even if an unusually deep ancestry cannot fit. */ if (!add(ancestry.reverse())) add([node.elementId]) } - const clipped = - nodes.some( - (node) => - (node.label?.length ?? 0) > 512 || - (node.value?.length ?? 0) > 512 || - (node.placeholder?.length ?? 0) > 256 || - node.actions.length > 16 - ) || allWindows.some((window) => window.title.length > 256) return { ...model, accessibilityTree: shown @@ -225,5 +300,50 @@ function snapshotForModel(result: ComputerUseSnapshot, envelopeBytes = 0) { ], } : {}), + known: { + snapshotId: state.snapshotId, + bundleId: state.bundleId, + windowId: state.windowId, + windowIds: allWindows.map((window) => window.windowId), + /** Exactly the rows sent, so a parent link left out here is sent once that parent shows. */ + rows: new Map( + shown + .filter((node) => selected.has(node.elementId)) + .map((node) => [ + node.elementId, + nodeRow(node, shownParent.get(node.elementId), state.windowId, selected), + ]) + ), + changesSinceFull: 0, + }, } } + +/** + * The rows that differ from what the model was shown of `base`, or undefined when a whole tree is + * clearer: another app or window, a window, sheet or popover opening or closing, a partial native + * read (an element it missed may still exist), a long chain of change lists, most of the tree + * changing, or nothing visible changing at all (an empty list reads as a failed action, while the + * whole tree shows where things stand). + */ +function changesSince( + base: KnownTree, + result: ComputerUseSnapshot, + shown: SnapshotNode[], + rows: Map +): { ids: string[]; removed: string[] } | undefined { + if ( + base.bundleId !== result.bundleId || + base.windowId !== result.windowId || + result.truncated || + base.changesSinceFull >= MAX_CHAINED_CHANGES || + base.windowIds.join() !== result.windows.map((window) => window.windowId).join() + ) + return undefined + const ids = shown.map((node) => node.elementId).filter((id) => rows.get(id) !== base.rows.get(id)) + if (ids.length * 2 > shown.length) return undefined + /** Gone or folded into a layout wrapper: either way the model should stop relying on its row. */ + const removed = [...base.rows.keys()].filter((id) => !rows.has(id)) + if (ids.length === 0 && removed.length === 0) return undefined + return { ids, removed } +} diff --git a/packages/desktop-bridge/src/index.ts b/packages/desktop-bridge/src/index.ts index 6b715aaa083..4ec4b1bf27c 100644 --- a/packages/desktop-bridge/src/index.ts +++ b/packages/desktop-bridge/src/index.ts @@ -85,6 +85,11 @@ export class ComputerUseError extends Error { /** Optional so a new web deployment remains compatible with older desktop shells. */ interface SimDesktopComputerUseApi { + /** + * An element keeps its id across observations of the same app process, so an action's observation + * can list only what changed. Absent in older shells, whose ids are positional. + */ + stableElementIds?: true /** Current activity without starting the helper; absent in older shells. */ getActivity?(): Promise getStatus(): Promise From 3c870e87ad139e0b9ac3fae9f9b2e1a6a54745df Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Nov 2026 09:51:16 -0800 Subject: [PATCH 04/12] ci: bump the actions group across 1 directory with 3 updates (#10130) Bumps the actions group with 3 updates in the / directory: [useblacksmith/checkout](https://github.com/useblacksmith/checkout), [actions/setup-java](https://github.com/actions/setup-java) and [azure/setup-helm](https://github.com/azure/setup-helm). Updates `useblacksmith/checkout` from 1.8.2 to 1.8.3 - [Changelog](https://github.com/useblacksmith/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/useblacksmith/checkout/compare/2b9fe87d796feea153b455ec2f3125b471a7b0e7...75c49b6ed30ce59336e9252425796cfcfac155f8) Updates `actions/setup-java` from 6.2.0 to 6.3.0 - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/77dd5b2ce225ea11469928ac317850245a74ae78...d1374f8ac74474200d16ef8ecee22c7ae7a51880) Updates `azure/setup-helm` from 5.0.1 to 5.1.0 - [Release notes](https://github.com/azure/setup-helm/releases) - [Changelog](https://github.com/Azure/setup-helm/blob/main/CHANGELOG.md) - [Commits](https://github.com/azure/setup-helm/compare/9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310...2f5e7bc67f1f9972ab16657bb795f36d8f04de0e) --- updated-dependencies: - dependency-name: useblacksmith/checkout dependency-version: 1.8.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: actions - dependency-name: actions/setup-java dependency-version: 6.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions - dependency-name: azure/setup-helm dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/checks.yml | 6 +++--- .github/workflows/docs-negotiation.yml | 2 +- .github/workflows/helm.yml | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index cacb1bd9e8d..85942b726c5 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -134,7 +134,7 @@ jobs: - &checkout-mirror name: Checkout code (mirror) if: (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork - uses: useblacksmith/checkout@2b9fe87d796feea153b455ec2f3125b471a7b0e7 # v1.8.2 + uses: useblacksmith/checkout@75c49b6ed30ce59336e9252425796cfcfac155f8 # v1.8.3 - &checkout-plain name: Checkout code if: (vars.CI_PROVIDER != '' && vars.CI_PROVIDER != 'blacksmith') || github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork @@ -612,7 +612,7 @@ jobs: # Same provider/trust split as the build jobs' checkout. - name: Checkout code (mirror) if: (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork - uses: useblacksmith/checkout@2b9fe87d796feea153b455ec2f3125b471a7b0e7 # v1.8.2 + uses: useblacksmith/checkout@75c49b6ed30ce59336e9252425796cfcfac155f8 # v1.8.3 with: fetch-depth: 2 - name: Checkout code @@ -821,7 +821,7 @@ jobs: steps: - name: Checkout code (mirror) if: needs.changes.outputs.test_app == 'true' && (vars.CI_PROVIDER == '' || vars.CI_PROVIDER == 'blacksmith') && github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork - uses: useblacksmith/checkout@2b9fe87d796feea153b455ec2f3125b471a7b0e7 # v1.8.2 + uses: useblacksmith/checkout@75c49b6ed30ce59336e9252425796cfcfac155f8 # v1.8.3 with: fetch-depth: 2 - name: Checkout code diff --git a/.github/workflows/docs-negotiation.yml b/.github/workflows/docs-negotiation.yml index 9653b27d007..7103703ab32 100644 --- a/.github/workflows/docs-negotiation.yml +++ b/.github/workflows/docs-negotiation.yml @@ -361,7 +361,7 @@ jobs: run: tar -I zstd -xf docs-build.tar.zst -C apps/docs - name: Set up Java for copied request examples if: matrix.group == 'http' - uses: actions/setup-java@77dd5b2ce225ea11469928ac317850245a74ae78 # v6.2.0 + uses: actions/setup-java@d1374f8ac74474200d16ef8ecee22c7ae7a51880 # v6.3.0 with: distribution: temurin java-version: '17' diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml index f3e3fd7e9eb..03c176d3dce 100644 --- a/.github/workflows/helm.yml +++ b/.github/workflows/helm.yml @@ -41,7 +41,7 @@ jobs: steps: - name: Checkout code (mirror) if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork - uses: useblacksmith/checkout@2b9fe87d796feea153b455ec2f3125b471a7b0e7 # v1.8.2 + uses: useblacksmith/checkout@75c49b6ed30ce59336e9252425796cfcfac155f8 # v1.8.3 with: &chart-checkout-options # Chart version checks need full history to compare against the PR base. fetch-depth: 0 @@ -52,7 +52,7 @@ jobs: with: *chart-checkout-options - name: Set up Helm - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + uses: azure/setup-helm@2f5e7bc67f1f9972ab16657bb795f36d8f04de0e # v5.1.0 with: version: v3.16.4 @@ -171,7 +171,7 @@ jobs: persist-credentials: false - name: Set up Helm - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + uses: azure/setup-helm@2f5e7bc67f1f9972ab16657bb795f36d8f04de0e # v5.1.0 with: version: v3.16.4 @@ -275,7 +275,7 @@ jobs: persist-credentials: false - name: Set up Helm - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + uses: azure/setup-helm@2f5e7bc67f1f9972ab16657bb795f36d8f04de0e # v5.1.0 with: version: v3.16.4 From 7b6fa049a30b53a87d157d79445f052eed1c650f Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 09:51:33 -0800 Subject: [PATCH 05/12] feat(library): How to Pilot an AI Agent Platform Through Security Review (#10131) Co-authored-by: Sim Pi Agent --- .../index.mdx | 259 ++++++++++++++++++ .../cover.jpg | Bin 0 -> 25504 bytes 2 files changed, 259 insertions(+) create mode 100644 apps/sim/content/library/pilot-ai-agent-platform-security-review/index.mdx create mode 100644 apps/sim/public/library/pilot-ai-agent-platform-security-review/cover.jpg diff --git a/apps/sim/content/library/pilot-ai-agent-platform-security-review/index.mdx b/apps/sim/content/library/pilot-ai-agent-platform-security-review/index.mdx new file mode 100644 index 00000000000..93afbb4079c --- /dev/null +++ b/apps/sim/content/library/pilot-ai-agent-platform-security-review/index.mdx @@ -0,0 +1,259 @@ +--- +slug: pilot-ai-agent-platform-security-review +title: 'How to Pilot an AI Agent Platform Through Security Review' +description: 'Plan a two-to-four-week AI agent platform pilot with measurable success criteria, security evidence, onboarding tests, and a documented purchase decision.' +seoTitle: 'AI Agent Platform Security Review Pilot' +date: 2026-11-17 +updated: 2026-11-17 +authors: + - andrew +readingTime: 11 +tags: [AI Agents, Enterprise Security, Proof of Concept, Procurement, Sim] +ogImage: /library/pilot-ai-agent-platform-security-review/cover.jpg +draft: false +faq: + - q: "What is the difference between a proof of concept and a proof of value?" + a: "An AI agent platform proof of concept demonstrates that a workflow can function under defined technical and security conditions, while a proof of value demonstrates that the functioning workflow produces enough measurable benefit to justify adoption." + - q: "Should an AI agent platform pilot use production data?" + a: "An AI agent platform pilot should begin with synthetic, de-identified, or otherwise approved test data and use production data only after security and data owners approve the exact fields, systems, retention, and deletion procedure." + - q: "Is self-hosting required for an enterprise AI agent pilot?" + a: "Self-hosting is not required for every enterprise AI agent pilot; the correct deployment depends on data boundaries, integration requirements, internal operating capacity, and the vendor's supported architecture." + - q: "Can an open-source AI agent platform skip security review?" + a: "An open-source AI agent platform cannot skip security review because source availability does not by itself prove secure configuration, identity controls, data handling, operational maturity, or contractual compliance." + - q: "Who should own an AI agent platform pilot?" + a: "An AI agent platform pilot should have one accountable business owner, one technical owner, one security reviewer, and named representatives from IT, procurement, legal, and the first operating team as needed." + - q: "Can procurement begin before the AI agent platform pilot is complete?" + a: "Procurement can begin during an AI agent platform pilot when the organization treats commercial and legal review as parallel work and makes final commitment conditional on the documented go decision." + - q: "How much should an enterprise AI agent platform proof of concept cost?" + a: "An enterprise AI agent platform proof of concept should be budgeted around total pilot cost, including platform fees, model and integration usage, implementation labor, security review, operator time, and the cost of correcting failed runs." + - q: "What are enterprise agentic AI platform pricing, pilot, and demo options?" + a: "Enterprise agentic AI platform options typically include a guided demo, a limited proof of concept, a paid proof-of-value engagement, or a customer-run pilot, and buyers should request current first-party terms directly from each shortlisted vendor." + - q: "What should happen after a no-go decision?" + a: "An AI agent platform no-go decision should produce a reusable record of failed thresholds, unresolved risks, measured costs, vendor responses, and the material changes required before reconsideration." +--- + +## TL;DR + +An AI agent platform pilot should prove one bounded workflow, clear security controls, measurable business value, and a repeatable onboarding path within two to four weeks before an enterprise commits to purchase. + +The strongest pilot is not a product tour. It is a controlled test using representative data, real integrations, named owners, predefined stop conditions, and evidence that security, IT, and the first operating team can support the platform. + +Use this five-part sequence: + +1. Select one primary workflow and one optional comparison workflow. +2. Define technical, operational, security, and financial success criteria before building. +3. Request the security review packet before connecting sensitive systems. +4. Onboard a small cross-functional team and run representative cases. +5. Make a documented go, conditional-go, or no-go decision. + +## How do I assess AI agent platforms for a proof of concept and a proof of value? + +An AI agent platform proof of concept should test whether the platform works, while its proof of value should test whether the result is reliable and valuable enough to justify adoption. + +Start by writing a one-page pilot charter with these fields: + +| Field | Decision to record | +|---|---| +| Business problem | The delay, cost, error rate, or capacity constraint the pilot should improve | +| Primary workflow | The single end-to-end process the team will build and run | +| Users | The first team and the people responsible for reviewing outputs | +| Systems | The applications, APIs, models, and data stores the workflow needs | +| Data classification | Public, internal, confidential, regulated, or another company-defined class | +| Baseline | Current completion time, labor time, error rate, cost, and throughput | +| Success threshold | The minimum measurable improvement required for a go decision | +| Guardrails | Actions the agent may take automatically and actions requiring human approval | +| Stop conditions | Security, reliability, cost, or operational failures that pause the pilot | +| Decision owner | The executive who makes the final go, conditional-go, or no-go decision | + +A proof of concept is successful when the workflow can be built, integrated, and operated safely. A proof of value is successful when the measured improvement is large enough to justify implementation, governance, and change-management costs. + +## How should you pick one or two workflows for the pilot? + +An AI agent platform pilot should begin with one high-value, bounded workflow and add a second workflow only when it tests a materially different capability. + +Choose a primary workflow that has: + +- A clear trigger, such as a form submission, support ticket, scheduled event, or approved chat request. +- A finite set of systems and permissions. +- Enough historical examples to create a representative test set. +- A human reviewer who can judge output quality. +- A measurable baseline for time, cost, throughput, or errors. +- A reversible action or an approval step before consequential changes. +- Business value that matters without making the first test mission-critical. + +Good pilot candidates include classifying and routing support requests, preparing account research, extracting fields from documents, drafting internal reports, or assembling approval packets. Avoid starting with an open-ended autonomous agent that can change production systems without review. + +Use a second workflow only to test a different requirement. For example, pair a document-processing workflow with an event-driven workflow if the shortlist must support both unstructured data and operational triggers. Do not add another workflow merely to increase the demo surface. + +For broader feature selection, use [What to Look for in an AI Workflow Automation Platform: Buyer's Checklist](https://www.sim.ai/library/ai-workflow-automation-platform-buyers-checklist). + +## What success criteria should an AI agent platform pilot use? + +An AI agent platform pilot should pass predefined thresholds for completion time, run reliability, output quality, cost per successful run, security, and operator effort. + +Record the baseline before the team builds anything, then calculate pilot results using the same definitions. + +| Criterion | Recommended measurement | +|---|---| +| Time saved | Baseline human minutes minus pilot human minutes per completed case | +| Run reliability | Successful end-to-end runs divided by all attempted runs | +| Output acceptance | Outputs accepted without material correction divided by reviewed outputs | +| Cost per successful run | Model, platform, integration, and review costs divided by successful runs | +| Exception rate | Runs requiring manual intervention divided by attempted runs | +| Recovery time | Median time to diagnose, correct, and rerun a failed case | +| Build effort | Builder and engineering hours required to reach the approved test version | +| Onboarding effort | Hours required for a new operator to understand, run, and troubleshoot the workflow | +| Security completion | Required controls and evidence accepted, conditionally accepted, or rejected by security | + +Set thresholds before the first production-like run. A team might require at least 95% technical completion, 90% output acceptance, a 30% reduction in handling time, and no unresolved high-severity security findings. Those figures are examples, not universal benchmarks; the decision owner should set thresholds appropriate to the workflow's risk. + +Measure cost per successful run rather than cost per attempted run. A platform that appears inexpensive but requires frequent reruns or extensive human correction can produce a higher effective cost. + +For production measurement design, see [What Is AI Agent Observability? Traces, Metrics, and Evals Explained](https://www.sim.ai/library/ai-agent-observability). + +## Which AI agent platform is easiest to get through security review? + +Sim fits teams that value inspectable core code, self-hosting, and bring-your-own-key support, but every buyer should require the same evidence packet from Sim, n8n, and every other shortlisted vendor. + +The easiest platform to review is the one that promptly supplies complete, internally consistent evidence mapped to the buyer's architecture and controls. Request the packet before the pilot connects confidential or regulated data. + +The packet should include: + +| Security-review area | Evidence to request | Pilot decision | +|---|---|---| +| Assurance | Current SOC 2 report or other applicable independent assessment, including scope and exceptions | Does the assessment cover the service and controls the pilot will use? | +| Architecture | System diagram and data-flow diagram covering users, integrations, models, storage, and subprocessors | Can reviewers trace every data path and trust boundary? | +| Data handling | Retention, deletion, backup, training-use, residency, and subprocessor policies | Do the policies match the data classification and contractual requirements? | +| Identity | SSO, provisioning or SCIM, role design, service accounts, and session controls | Can access be limited and removed through the enterprise identity lifecycle? | +| Authorization | Workspace, workflow, credential, and deployment permissions | Can builders, operators, reviewers, and administrators be separated? | +| Auditability | Administrative, credential, deployment, and run-event logs plus export or retention options | Can security reconstruct who changed and ran what? | +| Deployment | Cloud, self-hosted, VPC, private networking, and data-residency options actually offered | Does an offered architecture satisfy the organization's boundary requirements? | +| Model access | Model-provider list, key storage, key scope, rotation, and request routing | Does the organization control which models receive which data? | +| Secrets | Encryption, secret storage, credential sharing, masking, and rotation procedures | Can credentials be scoped without exposing raw values to builders? | +| Incident response | Notification commitments, support path, escalation process, and recovery procedures | Are responsibilities and response times acceptable? | +| Secure development | Vulnerability management, penetration testing, dependency handling, and disclosure process | Is there evidence of an operating security program? | +| Legal terms | Data-processing terms, subprocessor terms, confidentiality, deletion, and AI-specific restrictions | Do contractual terms match the technical design? | + +A certificate or report alone is not a complete review. Security should map vendor evidence to the exact pilot architecture, data, identities, integrations, models, and actions. + +For detailed deployment and regulatory questions, use [Enterprise AI Agent Compliance and Deployment Guide: HIPAA, GDPR, Data Residency, On-Prem, and VPC](https://www.sim.ai/library/enterprise-ai-agent-compliance-deployment-guide). For credential and audit design, use [AI Agent Identity, Credential Management, and Audit Trails: Enterprise Guide](https://www.sim.ai/library/ai-agent-identity-credentials-audit-trails-enterprise-guide). + +## How do regulated organizations evaluate AI agent deployment vendors? + +Regulated organizations should evaluate an AI agent deployment vendor by mapping the proposed workflow to data obligations, human oversight, deployment boundaries, identity controls, audit evidence, and incident responsibilities. + +Use four review layers: + +1. **Use-case review:** Document the decision being supported, affected people, prohibited actions, required approvals, and fallback process. +2. **Data review:** Classify each input and output, identify where it travels, define retention, and restrict model or integration access accordingly. +3. **Control review:** Test authentication, authorization, secrets, logging, human approval, error handling, and change management in the proposed deployment. +4. **Operational review:** Assign owners for monitoring, incidents, access recertification, model changes, workflow changes, and retirement. + +The pilot should use synthetic or de-identified data until security approves broader access. If representative testing requires sensitive data, record the approval, allowed fields, storage locations, retention period, and deletion procedure before the test begins. + +A regulated buyer should also test evidence retrieval. Ask the pilot team to reconstruct one run, identify its workflow version, show which credentials and model route were used, explain every external call, and identify the person who approved any consequential action. + +## What AI agent platform has the best documentation for onboarding? + +An AI agent platform has strong onboarding documentation when a new builder can securely configure access, build a representative workflow, test failures, deploy it, and hand it to an operator without relying on undocumented vendor help. + +Evaluate documentation with a fresh user rather than the platform champion. The documentation should cover: + +- Installation or workspace setup. +- Identity, roles, and invitations. +- Credential creation, ownership, scope, and rotation. +- Model-provider and key configuration. +- Integration setup with required permissions. +- Workflow construction and testing. +- Error handling, retries, and timeouts. +- Human review for consequential actions. +- Deployment and rollback. +- Logs, run history, and troubleshooting. +- Usage and cost monitoring. +- Self-hosting, upgrades, backups, and recovery when applicable. +- Security contacts and support escalation. + +Give a new team member a fixed onboarding task and measure time to first successful run, number of blocked steps, number of support requests, and whether the final setup follows the approved security design. Documentation quality is proven by repeatable completion, not by page count. + +## What should a two-to-four-week AI agent platform pilot timeline include? + +An AI agent platform pilot should reserve time for security and architecture decisions before building, representative testing before demonstrations, and an evidence-based decision after the final run. + +| Period | Activities | Required output | +|---|---|---| +| Days 1–3 | Confirm workflow, baseline, owners, data class, architecture, and success thresholds | Signed pilot charter and initial data-flow diagram | +| Days 3–5 | Review vendor evidence, configure identity, approve integrations, and prepare test data | Security conditions and approved pilot boundary | +| Week 2 | Build the workflow, add error paths and approvals, and run the initial test set | Versioned workflow and issue log | +| Week 3 | Run representative cases, test failures, measure outcomes, and onboard a second operator | Results dashboard and onboarding record | +| Week 4 | Resolve material gaps, rerun failed cases, estimate rollout effort, and hold the decision review | Go, conditional-go, or no-go memo | + +A two-week pilot is appropriate only when the workflow, integrations, data, and review path are already bounded. Use three or four weeks when the team must evaluate self-hosting, private networking, regulated data, multiple departments, or complex identity controls. + +## What does Sim's pilot path look like? + +Sim's pilot path lets a team start with the open-source AI workspace, choose cloud or self-hosted deployment, connect model credentials, build a bounded workflow, and evaluate the same security and value criteria used for every shortlisted platform. + +### Key Sim facts at a glance + +As of November 2026, [Sim's core is licensed under Apache 2.0](https://github.com/simstudioai/sim/blob/main/LICENSE). Code in `apps/sim/ee`, including SSO, SCIM, access control, audit logs, data retention, and other enterprise capabilities, is covered by the separate [Sim Enterprise License](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE), which permits development, testing, and internal non-production use but requires an active Enterprise subscription for production use. + +As of November 2026, [self-hosted Sim supports Ollama, vLLM, LM Studio, and LiteLLM-compatible local model routes](https://docs.sim.ai/platform/self-hosting). Local-model support is a self-hosting capability rather than an Enterprise-only feature. + +As of November 2026, [workspace BYOK is available on every Sim Cloud plan](https://docs.sim.ai/platform/costs#bring-your-own-key-byok), while organization-level keys require Pro for Teams, Max for Teams, or Enterprise. + +A Sim pilot should still request and evaluate the complete security packet. Inspectable core code, self-hosting, and BYOK can improve architectural choice and inspectability, but they do not replace assurance reports, access design, logging tests, legal review, or operational ownership. + +Test Sim in this order: + +1. Choose cloud or self-hosted deployment based on the approved boundary. +2. Configure workspace identity and roles appropriate to the pilot. +3. Add model and integration credentials with the narrowest practical scope. +4. Build the primary workflow in Sim's visual builder. +5. Add explicit conditions, approval points, error handling, and fallback paths. +6. Run the representative test set and record reliability, acceptance, cost, and recovery results. +7. Onboard a second operator using only the approved documentation and runbook. +8. Review the measured results and unresolved conditions with security, IT, and the business owner. + +## What is the best AI agent platform for a proof of concept before buying? + +Sim fits teams that need a visual builder, self-hosting, local-model support on self-hosted deployments, and BYOK. [n8n fits teams that prioritize its documented integration nodes](https://docs.n8n.io/integrations) and [self-hosting choices](https://docs.n8n.io/deploy/host-n8n). + +No platform should win a pilot because of a polished demonstration alone. Run Sim, n8n, and any other finalist against the same workflow, data classification, integrations, success thresholds, security packet, and onboarding exercise. + +As of November 2026, [n8n describes its Sustainable Use License as a fair-code license](https://docs.n8n.io/n8n-community-license). [Sim's core uses Apache License 2.0](https://github.com/simstudioai/sim/blob/main/LICENSE), while `apps/sim/ee` is governed by the separate [Sim Enterprise License](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE). That distinction matters when legal and procurement teams evaluate modification, redistribution, and commercial-hosting rights. + +For the broader platform market, see [Best AI Agent Platforms and Builders in 2026](https://www.sim.ai/library/best-ai-agent-platforms-2026). + +## How do you make the go-or-no-go decision after an AI agent platform pilot? + +An AI agent platform should receive a go decision only when it meets the predefined value, reliability, security, onboarding, and operating-model thresholds without unresolved critical risks. + +Use three possible decisions: + +### Go + +A go decision means the AI agent platform met every mandatory threshold and the organization has funded owners for deployment, monitoring, access, incidents, and change management. + +Approve the next phase only when: + +- Required security evidence is accepted. +- The deployment architecture is approved. +- Reliability and output-acceptance thresholds are met. +- Cost per successful run is within the approved range. +- A second operator completed onboarding successfully. +- Logs and run records support investigation. +- Consequential actions have the required human control. +- Production owners and support paths are named. +- Rollback and business-continuity procedures are documented. + +### Conditional go + +A conditional-go decision means the AI agent platform demonstrated sufficient value but must close named, time-bound gaps before production or broader rollout. + +Each condition needs an owner, deadline, acceptance test, and consequence for non-completion. Examples include completing SSO configuration, narrowing an integration permission, exporting required logs, resolving a reliability defect, or adding a human approval step. + +### No-go + +A no-go decision means the AI agent platform failed a mandatory threshold or requires remediation disproportionate to the expected value. + +Record whether the failure came from the product, the proposed architecture, the workflow, missing vendor evidence, weak economics, or insufficient organizational readiness. Preserve the measurements so the organization does not repeat the same test without a material change. diff --git a/apps/sim/public/library/pilot-ai-agent-platform-security-review/cover.jpg b/apps/sim/public/library/pilot-ai-agent-platform-security-review/cover.jpg new file mode 100644 index 0000000000000000000000000000000000000000..34256b0430be648fab96a960e5704e341722ecc4 GIT binary patch literal 25504 zcmeFZWmH_vwkX;-!9BRU1lQp1?(Xgl1ef6MZo##Y#x=nmf=iGD4IVsbZu9NEzjN+A z|ARxfML4tfxQIL^QP;t=EAs-wv zY&>kp9~lt^5dq|6r=_H%W#?mMVdaw)5|Y$b({^>uctryBe~hFbfQblQ0^0xsMG1h$ zgo43@`ZEY120#IzVW6O(0Dm9w2(WO7Fwn2HIRCl)9{_*W04Ok!HW)A%kb;&ke>eNL zFW^Khh(7(>t)xt)rpw``Yiqv(VA(e9YZ%nbtgkk<#ca4yi(Q28zj+%F5wfEEbVPcg zH8LRe%*PA<_qv#uK4|1XMjuN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Nov 2026 09:51:45 -0800 Subject: [PATCH 06/12] feat(library): Top AI Support Copilots vs Autonomous Support Agents in 2026 (#10132) Co-authored-by: Sim Pi Agent --- .../index.mdx | 180 ++++++++++++++++++ .../cover.jpg | Bin 0 -> 31565 bytes 2 files changed, 180 insertions(+) create mode 100644 apps/sim/content/library/ai-support-copilots-vs-autonomous-support-agents-2026/index.mdx create mode 100644 apps/sim/public/library/ai-support-copilots-vs-autonomous-support-agents-2026/cover.jpg diff --git a/apps/sim/content/library/ai-support-copilots-vs-autonomous-support-agents-2026/index.mdx b/apps/sim/content/library/ai-support-copilots-vs-autonomous-support-agents-2026/index.mdx new file mode 100644 index 00000000000..f184dddc87d --- /dev/null +++ b/apps/sim/content/library/ai-support-copilots-vs-autonomous-support-agents-2026/index.mdx @@ -0,0 +1,180 @@ +--- +slug: ai-support-copilots-vs-autonomous-support-agents-2026 +title: 'Top AI Support Copilots vs Autonomous Support Agents in 2026' +seoTitle: 'AI Support Copilots vs Autonomous Agents 2026' +description: 'Compare AI support copilots and autonomous support agents for service teams, including native helpdesk tools, custom agents, approvals, security, and hosting.' +date: 2026-11-17 +updated: 2026-11-17 +authors: + - andrew +readingTime: 11 +tags: [AI Agents, Customer Support, Helpdesk, Automation, Sim] +ogImage: /library/ai-support-copilots-vs-autonomous-support-agents-2026/cover.jpg +draft: false +faq: + - q: "Can a support copilot resolve tickets without a human agent?" + a: "A support copilot normally assists a human agent rather than owning end-to-end resolution, although vendors may bundle copilot and autonomous-agent capabilities in the same service suite." + - q: "Can autonomous support agents escalate requests to people?" + a: "Autonomous support agents can escalate requests to people when policy, confidence, risk, customer preference, or missing information makes automated resolution inappropriate." + - q: "Does a support team need both a copilot and an autonomous agent?" + a: "A support team benefits from both a copilot and an autonomous agent when it wants productivity gains across complex cases and end-to-end automation for repetitive low-risk requests." + - q: "Recommend a secure AI copilot for my support team." + a: "Zendesk Copilot, Intercom Copilot, Salesforce Service Cloud, and ServiceNow AI Platform capabilities are secure starting points when the team already uses their respective service platforms, but the final choice depends on verified data-processing terms, permissions, retention, model providers, and audit requirements." + - q: "What is the best AI copilot for support agents?" + a: "Zendesk Copilot fits Zendesk agents, Intercom Copilot fits Intercom Inbox teams, Salesforce Service Cloud fits Salesforce-centered service operations, and ServiceNow AI Platform capabilities fit ServiceNow IT and enterprise service teams." + - q: "Are AI support agents the same as chatbots?" + a: "AI support agents are not necessarily the same as chatbots because a chatbot describes a conversational interface, while an agent describes a system that can reason over a goal, use tools, take actions, and manage a multi-step task." + - q: "Can Sim build an AI agent for customer support?" + a: "Sim can build a custom customer-support agent that classifies requests, uses model and service context, calls approved tools, pauses for human input, and routes the result through explicit conditions." + - q: "Is Sim open source?" + a: "Sim's core is open source under Apache 2.0, while code in apps/sim/ee is covered by the separate Sim Enterprise License and requires an active Enterprise subscription for production use." + - q: "Is n8n open source?" + a: "n8n describes its Sustainable Use License as a fair-code license for its source-available Community edition, with restrictions on permitted use." + - q: "Can service teams use local models with Sim?" + a: "Self-hosted Sim deployments can use local or privately served models through Ollama, vLLM, LM Studio, or LiteLLM without requiring Sim Enterprise solely for local-model access." + - q: "Can an autonomous support agent approve refunds or account changes by itself?" + a: "An autonomous support agent should approve refunds or account changes only when explicit policy, scoped permissions, transaction limits, audit logging, and organizational risk tolerance permit it; otherwise the agent should prepare the action for human approval." + - q: "How should a service team measure an AI copilot or agent?" + a: "A service team should measure an AI copilot or agent using resolution quality, first-contact resolution, handling time, escalation rate, recontact rate, policy compliance, unsupported-answer rate, customer satisfaction, agent acceptance, and the cost per successful outcome." +--- + +## TL;DR + +AI support copilots help human service agents work faster by drafting replies, summarizing conversations, and retrieving knowledge. Autonomous support agents can classify, decide, act, and resolve approved requests without a person handling every step. + +Service teams should use copilots for judgment-heavy work, autonomous agents for bounded low-risk requests, and human approval before sensitive actions. Zendesk, Intercom, Salesforce, and ServiceNow fit teams that want AI inside an existing service stack. [Sim](https://www.sim.ai) fits teams that need a custom support agent with explicit approval steps and cross-system logic. + +## Is an AI agent the same thing as a copilot? + +**An AI agent is not the same thing as a copilot: a support copilot assists a human, whereas an autonomous support agent can pursue a defined outcome and take approved actions across systems.** + +A copilot normally waits for an agent to open a ticket or conversation. It can suggest a response, summarize history, retrieve knowledge, recommend a next step, or help complete a form, but the human agent remains responsible for the decision and submission. + +An autonomous support agent can receive a request, classify its intent and risk, retrieve account or device context, call tools, update records, communicate with the requester, and close or escalate the case. Its autonomy should still be bounded by permissions, policies, confidence thresholds, and approval steps. + +| Decision point | AI support copilot | Autonomous support agent | +|---|---|---| +| Primary user | Human support or IT agent | Customer, employee, or automated service queue | +| Typical work | Drafting, summarization, knowledge lookup, recommendations | Triage, tool use, record updates, resolution, escalation | +| Who initiates each task? | Usually a human agent | An event, message, schedule, or human request | +| Who makes the final decision? | Human agent | Agent within policy; human for exceptions or sensitive actions | +| Suitable requests | Ambiguous, emotional, novel, or high-impact cases | Repetitive, well-documented, low-risk cases with clear success criteria | +| Main control | Human review before every action | Scoped tools, policy checks, confidence thresholds, logs, and selective approval | + +## Which AI support copilots fit established service teams? + +**Zendesk Copilot, Intercom Copilot, Salesforce Service Cloud, and ServiceNow's current AI Platform capabilities fit teams that want assistance inside an established service workspace.** + +The practical starting point is usually the copilot native to the system where agents already manage conversations, knowledge, identities, and service records. Switching platforms solely for a drafting feature can create more operational cost than the feature saves. + +| Copilot | Fit | Assistance | Human review | Commercial model | +|---|---|---|---|---| +| [Zendesk Copilot](https://www.zendesk.com/service/ai/copilot/) | Customer-service teams already using Zendesk | Zendesk describes AI assistance for agent productivity within its service platform | A Zendesk agent reviews or acts on suggestions | Zendesk publishes current packaging on its [pricing page](https://www.zendesk.com/pricing/) | +| [Intercom Copilot](https://www.intercom.com/help/en/articles/9121374-copilot-explained) | Conversational support teams working in the Intercom Inbox | Intercom documents answers grounded in conversation history, articles, macros, and connected content | The support representative controls the customer-facing response | Intercom documents included usage and an unlimited per-seat add-on in its [Copilot pricing guidance](https://www.intercom.com/help/en/articles/9121384-copilot-included-and-unlimited-usage) | +| [Salesforce Service AI](https://www.salesforce.com/service/ai/) | Enterprises whose service data and processes already live in Salesforce | Salesforce lists generated replies, summaries, knowledge assistance, classification, and routing | A service representative can review generated content and actions | Salesforce lists editions and add-ons on its [Service AI pricing page](https://www.salesforce.com/service/ai/pricing/) | +| [ServiceNow AI Platform generative AI skills](https://www.servicenow.com/docs/r/intelligent-experiences/ai-products.html) | IT service management and enterprise-service teams on ServiceNow | ServiceNow documents generative AI skills, AI agents, and agentic workflows for service work | ServiceNow users review suggestions within role-controlled workflows | ServiceNow publishes package information for [ITSM](https://www.servicenow.com/in/products/itsm/pricing.html) and [CSM](https://www.servicenow.com/products/customer-service-management/pricing.html) | + +As of November 2026, ServiceNow documentation says the Now Assist experience has evolved into a new AI Platform naming and packaging model. Teams evaluating a product previously described as Now Assist should confirm the current package and migration path in ServiceNow's documentation rather than relying on older product names. + +## Which autonomous support agents fit different service stacks? + +**Zendesk AI agents and Intercom Fin fit their respective helpdesks, Salesforce Agentforce and ServiceNow AI Agents fit enterprise service environments, and Sim or n8n fit teams building custom cross-system agents.** + +For a wider customer-service product comparison, read [Best AI Agents for Customer Support Automation](https://www.sim.ai/library/best-ai-agents-for-customer-support-automation). + +| Autonomous option | Fit | Automation scope | Human oversight | Commercial or deployment model | +|---|---|---|---|---| +| [Zendesk AI agents](https://www.zendesk.com/service/ai/ai-agents/) | Zendesk teams automating common customer requests | Zendesk positions AI agents for autonomous resolution across service channels | Unresolved or policy-bound work can be handed to people within the service process | Current offers are listed on [Zendesk pricing](https://www.zendesk.com/pricing/) | +| [Intercom Fin](https://www.intercom.com/help/en/articles/8205718-fin-ai-agent-outcomes) | Intercom teams seeking a customer-facing AI agent | Intercom documents resolution, procedure handoff, qualification, and routing outcomes | Fin can hand work to a person or configured workflow | Intercom charges by defined outcomes under its current packaging | +| [Salesforce Agentforce](https://www.salesforce.com/agentforce/) | Enterprises requiring agents grounded in Salesforce data and business processes | Agentforce can use Salesforce records, actions, and service processes | Salesforce permissions, flows, and service processes constrain actions | Salesforce offers consumption and user-based options on its [Agentforce pricing page](https://www.salesforce.com/agentforce/pricing/) | +| [ServiceNow AI Agents](https://www.servicenow.com/products/ai-agents.html) | IT and enterprise-service teams automating work on the ServiceNow AI Platform | ServiceNow describes agents that use roles, tools, flows, scripts, and skills to execute tasks | Platform roles, policies, approval paths, and audit controls govern execution | Packaging depends on the relevant [ITSM](https://www.servicenow.com/in/products/itsm/pricing.html) or [CSM](https://www.servicenow.com/products/customer-service-management/pricing.html) offer | +| [Sim](https://www.sim.ai) | Teams building custom support agents with explicit approval steps and multi-system logic | Classification, retrieval, model calls, API actions, notifications, approvals, and escalation | A Human in the Loop block pauses the run for submitted form fields, then a Condition must route the decision | Sim Cloud and self-hosted deployment have different cost responsibilities, described in the [Sim cost documentation](https://docs.sim.ai/platform/costs) | +| [n8n](https://n8n.io/pricing/) | Technical teams assembling support automations from nodes and code | Triggers, model calls, APIs, record updates, and notifications can be composed into workflows | Builders can add branches and review steps to their workflow design | Cloud pricing is based on workflow executions, while self-hosted editions have separate terms | + +## Which AI support tool should a service team choose? + +**A service team should choose its helpdesk's native copilot for immediate agent productivity, a packaged autonomous agent for standardized request resolution, or Sim for custom governed work spanning multiple systems.** + +| Service-team requirement | Starting point | Why | +|---|---|---| +| Draft and summarize without changing the current operating model | Native Zendesk, Intercom, Salesforce, or ServiceNow assistance | The copilot works where human agents already review tickets and customer context | +| Deflect common questions using approved knowledge | Zendesk AI agents or Intercom Fin | Both are designed for customer-facing resolution and human handoff in their native service environments | +| Automate IT incidents and enterprise service requests | ServiceNow AI Agents | ServiceNow can place agent actions inside existing service records, roles, and workflows | +| Act on CRM records and customer-service processes | Salesforce Agentforce | Agentforce can use Salesforce data, permissions, Flow, and service operations | +| Build a custom agent with explicit approval gates | Sim | Sim's visual builder supports a paused Human in the Loop step followed by conditional approve-or-reject routing | +| Build node-based automations with technical customization | n8n | n8n combines integrations, code, model calls, triggers, and self-hosted deployment options | + +The choice should follow the operating model, not the product category alone. A team that already has a mature helpdesk may gain more from native assistance, while a team coordinating several business systems may need a custom agent workflow. + +## How should support teams combine copilots, autonomous agents, and human approval? + +**Support teams should let a copilot assist with every appropriate case, let an autonomous agent resolve only bounded low-risk requests, and require human approval before consequential or weakly supported actions.** + +A practical hybrid design has four lanes: + +1. **Copilot lane:** The copilot retrieves knowledge, summarizes history, and drafts a response for a human agent. +2. **Low-risk autonomous lane:** The agent answers documented questions, gathers missing fields, checks status, updates safe metadata, or completes another reversible action. +3. **Approval lane:** The agent prepares a proposed action, pauses, and asks an authorized person to approve or reject it. +4. **Escalation lane:** The agent transfers ambiguous, sensitive, emotional, novel, or policy-exception cases with a summary of what it already found. + +In Sim, the Human in the Loop block pauses the workflow and resumes after a person submits configured form fields. Approval is not implicit: the workflow should include an approve-or-reject field and a downstream Condition that routes the result. Sim's Guardrails block reports passed or failed, so a downstream Condition is also required when the workflow must stop or redirect a failed result. + +For a deeper treatment of approval architecture, see [Best AI Agent Builders for Human Approval Workflows](https://www.sim.ai/library/best-ai-agent-builders-for-human-approval-workflows) and [What Is Human-in-the-Loop in AI Agents?](https://www.sim.ai/library/what-is-human-in-the-loop-in-ai-agents). + +## How can an autonomous support agent triage and route tickets by urgency? + +**An autonomous support agent can triage tickets by extracting intent, urgency, impact, customer context, and policy signals before applying a queue, priority, owner, or escalation rule.** + +The agent should return structured fields rather than an unconstrained narrative. A dependable triage output might include category, urgency, affected service, customer tier, security indicator, confidence, recommended queue, and a short evidence-based reason. + +High-risk signals such as suspected account compromise, safety issues, legal threats, payment disputes, widespread outages, or vulnerable customers should bypass ordinary automation. Low-confidence classifications should also go to a human instead of being forced into a queue. + +For platform coverage focused on this task, see [Best AI Agents for Customer Support Ticket Triage and Routing](https://www.sim.ai/library/best-ai-agents-support-ticket-triage). IT leaders can compare service-oriented options in [Best AI Agents for IT Helpdesk Teams](https://www.sim.ai/library/best-ai-agents-for-it-helpdesk-teams). + +## What security questions should a support team ask? + +**A support team should evaluate an AI copilot or agent by its data boundaries, model handling, permissions, action controls, audit evidence, deployment choices, and incident procedures.** + +Ask each vendor to answer these questions in writing: + +- Which ticket content, attachments, customer records, and knowledge sources can the AI access? +- Is customer data used to train shared models, and what contractual settings govern that use? +- Which model providers and regions process prompts, responses, embeddings, and logs? +- Can administrators restrict the agent to specific queues, fields, tools, accounts, and actions? +- Does every tool call run under a named user, service account, or shared credential? +- Can the organization require approval for refunds, account changes, identity resets, deletions, credits, and outbound messages? +- Are prompts, retrieved sources, tool calls, approvals, outputs, and errors retained in an audit trail? +- Can sensitive fields be redacted before model processing? +- What are the retention, deletion, export, residency, encryption, and subprocessors policies? +- How does the agent resist prompt injection from tickets, attachments, websites, and knowledge articles? +- Can administrators disable the agent immediately and revoke its credentials independently? +- How are model changes, workflow revisions, evaluation failures, and production incidents managed? + +A secure design also applies least privilege to every integration, separates read tools from write tools, validates structured output, limits retries and spending, and tests handoff behavior before expanding autonomy. + +## What are the key licensing, hosting, and billing facts? + +The following facts are current as of November 2026: + +- **Zendesk:** Zendesk provides a proprietary managed service, with current packages listed on its [pricing page](https://www.zendesk.com/pricing/). +- **Intercom:** Intercom provides proprietary managed products. Its current documentation describes [Copilot usage](https://www.intercom.com/help/en/articles/9121384-copilot-included-and-unlimited-usage) and [Fin outcome billing](https://www.intercom.com/help/en/articles/8205718-fin-ai-agent-outcomes). +- **Salesforce:** Salesforce provides proprietary managed services, with Service AI and Agentforce packaging described on its [Service AI](https://www.salesforce.com/service/ai/pricing/) and [Agentforce](https://www.salesforce.com/agentforce/pricing/) pricing pages. +- **ServiceNow:** ServiceNow provides proprietary platform capabilities through contracted ITSM and CSM packages, rather than an open-source self-hosted license. +- **Sim:** [Sim's core is Apache 2.0](https://github.com/simstudioai/sim/blob/main/LICENSE) and can be self-hosted, while `apps/sim/ee` is governed by the separate [Sim Enterprise License](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE). The enterprise license permits development, testing, and internal non-production use, while production use requires an active Sim Enterprise subscription and modification or redistribution is not permitted. +- **n8n:** n8n's self-hosted Community edition uses the source-available [Sustainable Use License](https://docs.n8n.io/n8n-community-license/community-license/license-faq), while n8n Cloud is a paid service with pricing based on workflow executions. + +## When should a support team use Sim? + +**A support team should use Sim when it needs a custom support agent that coordinates models, business systems, approval steps, and escalation logic instead of relying only on a helpdesk's packaged AI.** + +Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Its visual builder fits processes such as classifying a request, retrieving context, proposing an action, pausing for approval, applying an approved update, and notifying the requester or service team. + +Sim is particularly relevant when the workflow crosses the helpdesk boundary, for example, when a request requires customer data, an internal knowledge source, an identity system, a billing service, and an approval from an operating channel. Self-hosted Sim deployments can use Ollama, vLLM, LM Studio, or LiteLLM through the configuration documented in the [self-hosting guide](https://docs.sim.ai/platform/self-hosting); local-model support is a self-hosting capability rather than an Enterprise-only feature. + +Workspace bring-your-own-key credentials work on any Sim Cloud plan. Organization-level model keys require Pro for Teams, Max for Teams, or Enterprise, as described in the [Sim cost documentation](https://docs.sim.ai/platform/costs). Teams evaluating deployment and governance should distinguish Sim's Apache-2.0 core from the separately licensed enterprise code described above. + +## How should a service team make the final decision? + +Start with the request type and the cost of a wrong action. Use a copilot when human judgment remains central, use an autonomous agent when the outcome is bounded and verifiable, and add approval whenever the action changes money, identity, access, legal status, or an irreversible customer record. + +Then evaluate the surrounding stack. Native helpdesk AI reduces integration work, while a custom agent can coordinate logic across systems and make control points explicit. Finally, test with production-like cases, measure both successful outcomes and unsafe near misses, and expand autonomy only after the team can explain and audit the agent's behavior. diff --git a/apps/sim/public/library/ai-support-copilots-vs-autonomous-support-agents-2026/cover.jpg b/apps/sim/public/library/ai-support-copilots-vs-autonomous-support-agents-2026/cover.jpg new file mode 100644 index 0000000000000000000000000000000000000000..64c32e4b9b19118194b7baf7b73ad430f8d3ae17 GIT binary patch literal 31565 zcmeFZWmufe(l9uIj`-v zyXV^7e_zkd)%UblbyroFFu#|7uK}b0@P8!)1b8H5$OjD-1qBri7aarg!KJ{#$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yJW9a6_rzWtsMeZkzk-ZtdyuhB6bf%0UF+qytz z@$tnPGXk*Gw1FN1Ml+Rs9`NzXG!IY*t;|79tG~?^*LSTR=e8G`Bf|}44lvs1QR@0r zqe@kLp)OMo(#JpB^t6ykJL?%oVlyR3@X0$IB#u`K21?we#-r%~a4Tl@)7eBR+^x*F zY>TH@4+UsPEZ?~Qojm6~h~-zmIMh!|jVaEA@^KhOja11daHUkH@410yCHO$ml0H^ZiYbXb%_FM-jxDgKVz{hLH(8{39-A(LwF= zpOij`yP>L*ddudjLF7vm;{cl_g7TGOHL%61=9*nSnyn+>s?|=u2362RWtt`WAL0B1 ze^pWm?v~!1BLyfLy|4|6_<7Q{f;b%^DHcNO+;)?8v zGR-x$i`3EErUjHZI32VJ7d5q^I(2W)RG7ak^O0qw1<8X~!zce*BhytF=eKLeBXnn? z9E~VXK8i6-D?WZ_MtTUOOxTrr`0-hm`RZ~d1D7pAjgV5iJW0YXO+jBPh)E8g=?wnv z;{e|HVZ7J7;w^+Iz%4Gp~#LIzAQ#=b&bln+gsBGtsP(zwK72$p5Ru e^gpd!>i%h_f{B5l2mrtS|BOI4r~YTe*Z&3P8Yubz literal 0 HcmV?d00001 From a173bd17fd713c816882c9a91d08682b1345fba0 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 09:52:00 -0800 Subject: [PATCH 07/12] feat(library): 6 Best StackAI Alternatives in 2026 After the Asana Acquisition (#10133) * feat(library): 6 Best StackAI Alternatives in 2026 After the Asana Acquisition * Pi Babysit: address PR #10133 feedback --------- Co-authored-by: Sim Pi Agent --- .../best-stackai-alternatives-2026/index.mdx | 177 ++++++++++++++++++ .../best-stackai-alternatives-2026/cover.jpg | Bin 0 -> 28873 bytes 2 files changed, 177 insertions(+) create mode 100644 apps/sim/content/library/best-stackai-alternatives-2026/index.mdx create mode 100644 apps/sim/public/library/best-stackai-alternatives-2026/cover.jpg diff --git a/apps/sim/content/library/best-stackai-alternatives-2026/index.mdx b/apps/sim/content/library/best-stackai-alternatives-2026/index.mdx new file mode 100644 index 00000000000..e42e21cdbe3 --- /dev/null +++ b/apps/sim/content/library/best-stackai-alternatives-2026/index.mdx @@ -0,0 +1,177 @@ +--- +slug: best-stackai-alternatives-2026 +title: '6 Best StackAI Alternatives in 2026 After the Asana Acquisition' +description: 'Compare six StackAI alternatives for independent agent building, self-hosting, cross-system automation, enterprise governance, and LLM applications.' +seoTitle: '6 StackAI Alternatives After the Asana Deal' +date: 2026-11-17 +updated: 2026-11-17 +authors: + - andrew +readingTime: 9 +tags: [AI Agents, Workflow Automation, StackAI, Sim] +ogImage: /library/best-stackai-alternatives-2026/cover.jpg +draft: false +faq: + - q: "Does Asana own StackAI?" + a: "Asana announced its acquisition of StackAI on May 28, 2026, while StackAI said it would continue operating under its own brand." + - q: "Is StackAI shutting down after the Asana acquisition?" + a: "StackAI was not announced as shutting down; Asana and StackAI said StackAI would continue operating as its own brand when they announced the acquisition." + - q: "Why would a team consider an alternative to StackAI?" + a: "StackAI buyers may consider alternatives when they need platform independence, self-hosting, different integrations, code-level control, a different governance model, or a pricing unit better aligned with expected usage." + - q: "Is Sim open source?" + a: "Sim's core is open source under the OSI-approved Apache 2.0 license, while apps/sim/ee uses the separate Sim Enterprise License and requires an active Enterprise subscription for production use." + - q: "Is n8n open source?" + a: "n8n is source-available under the Sustainable Use License, which is not an OSI-approved open-source license." + - q: "Can Sim use local models?" + a: "Self-hosted Sim deployments can use Ollama, vLLM, LM Studio, or LiteLLM without requiring Sim Enterprise solely for local-model support." + - q: "Does Sim support bring your own model keys?" + a: "Sim Cloud supports workspace BYOK on every plan, while organization-level keys require Pro for Teams, Max for Teams, or Enterprise." + - q: "Does Zapier offer self-hosting?" + a: "Zapier's public product and pricing materials describe a hosted service, not a self-hosted distribution, as of November 2026." + - q: "Which StackAI competitor is designed for enterprise integration governance?" + a: "Workato is the enterprise-integration-focused option in this comparison, with centralized governance and orchestration positioned for large automation programs." + - q: "Which StackAI competitor is designed for LLM evaluations?" + a: "Vellum formerly centered on LLM evaluation, but its hosted product shut down in November 2026, so it is not a current recommendation in this comparison." + - q: "Which StackAI competitor is designed for self-hosted applications grounded in retrieved knowledge?" + a: "Dify fits self-hosted applications that retrieve relevant source material before generating an answer because it combines visual orchestration, knowledge bases, model connections, and APIs." + - q: "Is acquisition ownership enough reason to migrate from StackAI?" + a: "StackAI's acquisition by Asana is not by itself enough reason to migrate; teams should compare product direction, platform independence, deployment requirements, governance, integrations, and cost before changing systems." +--- + +## TL;DR + +[Asana announced that it completed its acquisition of StackAI on May 28, 2026](https://investors.asana.com/news-releases/news-release-details/asana-acquires-stackai-adding-cross-system-execution-human-agent). [StackAI told customers](https://web.dev.stack-ai.com/blog/stackai-joins-asana-to-build-the-future-of-agentic-work-management) that the transaction would not change its platform, existing workflows, or customer relationships. Teams may still compare alternatives when they want an agent product independent of a work-management suite, a self-hosted deployment, broader cross-system automation, or a different balance of visual building and code control. + +As of November 2026, the six options covered here are Sim, n8n, Workato, Zapier, Dify, and Langflow. Sim fits teams that want an independent AI workspace with a visual builder and self-hosting. The other options fit different requirements across technical automation, enterprise integration, SaaS connectivity, applications that retrieve relevant source material before generating answers, and developer-controlled agent development. + +## What are the best StackAI alternatives in 2026? + +The useful question is not which product wins a universal ranking. It is which product fits the systems, deployment boundary, governance requirements, and operating model that a team actually has. + +| Platform | Fit | Visual building | Code control | Connectivity | Self-hosting | Commercial model as of November 2026 | +|---|---|---|---|---|---|---| +| **Sim** | Independent agents and cross-system execution | Visual workflow builder | APIs and configurable workflow logic | 270+ integrations, APIs, webhooks, and Model Context Protocol (MCP) servers that expose tools and data to AI models | Yes, for Sim's core | [Cloud plans](https://www.sim.ai/pricing), bring your own key (BYOK), and self-hosting; production use of `apps/sim/ee` requires an Enterprise subscription | +| **n8n** | Technical teams combining application automation with AI steps | Visual workflow editor | [Expressions, JavaScript or Python code, and custom nodes](https://docs.n8n.io/build/code-in-n8n) | Application nodes and API access | [Free Community edition and paid self-hosted editions](https://docs.n8n.io/deploy/host-n8n/community-edition-features) | [Cloud pricing is based on workflow executions](https://n8n.io/pricing/) | +| **Workato** | Governed orchestration across enterprise systems | Recipe-based visual builder | APIs and custom connectors | Enterprise application, data, and API connectivity | Workato connects to private systems through an [on-prem agent](https://docs.workato.com/on-prem/) | [Commercial editions with contract-based selection](https://www.workato.com/pricing) | +| **Zapier** | Fast automation across common SaaS applications | Visual automation interfaces | [Code, webhooks, API requests, and developer tooling](https://help.zapier.com/hc/en-us/articles/36785770231309-Build-advanced-workflows-using-code-and-APIs) | Hosted application integrations | No public self-hosted distribution | [Plans use task-based allowances and billing](https://zapier.com/pricing) | +| **Dify** | Large language model (LLM) applications, retrieval-augmented generation (RAG) that retrieves relevant source material before generating answers, and agent workflows | Visual LLM orchestration | APIs and extension points | Models, knowledge sources, tools, and APIs | [Community and enterprise deployment options](https://dify.ai/pricing/dify-enterprise) | [Cloud tiers and separately priced enterprise options](https://dify.ai/pricing) | +| **Langflow** | Developer-led AI agents, RAG, and MCP services | Visual flow editor | Python components and APIs | Models, vector stores that organize content so AI systems can find relevant passages, tools, and custom components | [Local, Docker, source, and remote deployment options](https://docs.langflow.org/get-started-installation) | [MIT-licensed software](https://github.com/langflow-ai/langflow/blob/main/LICENSE); infrastructure cost depends on the deployment | + +The platforms do not use the same definition of an integration, governance control, or billable unit. Buyers should test the exact systems, identity controls, audit evidence, deployment boundary, and expected run volume that matter to their environment. + +### Key facts at a glance + +- **Sim:** Sim's core is licensed under [Apache 2.0](https://github.com/simstudioai/sim/blob/main/LICENSE) and can be self-hosted. [`apps/sim/ee` uses the separate Sim Enterprise License](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE), which permits development, testing, and internal non-production use, while production use requires an active Enterprise subscription. +- **n8n:** n8n provides a self-hosted Community edition under its [Sustainable Use License](https://docs.n8n.io/n8n-community-license/community-license/license-faq), while n8n Cloud primarily bills by workflow execution. +- **Workato:** [Workato's editions](https://www.workato.com/pricing) fit centralized enterprise integration programs that need managed connectivity, lifecycle controls, and access governance across business systems. +- **Zapier:** [Zapier's hosted plans](https://zapier.com/pricing) fit business teams that prioritize quick setup and a large application ecosystem, with usage measured primarily through tasks. +- **Dify:** [Dify provides managed cloud plans and a self-hosted community distribution](https://dify.ai/pricing), with enterprise security and deployment options sold separately. +- **Langflow:** [Langflow is an open-source, Python-based visual builder](https://docs.langflow.org/) for AI applications that can run locally or on infrastructure controlled by the user. + +## How were these StackAI alternatives selected? + +This guide selected Sim, n8n, Workato, Zapier, Dify, and Langflow because each addresses a different requirement that can arise in a StackAI evaluation. + +The comparison uses four practical criteria: + +1. **Cross-system execution:** Can the product call business applications, databases, APIs, webhooks, or reusable tools? +2. **Builder flexibility:** Can users assemble workflows visually while technical teams retain meaningful code or API control? +3. **Deployment and governance:** Does the product support the required hosting boundary, access model, operational visibility, and audit controls? +4. **Commercial fit:** Does the billing unit align with expected workflow runs, tasks, model use, infrastructure, or enterprise procurement? + +This is not a general ranking of agent products. Buyers comparing the wider category can use [Best AI Agent Platforms and Builders in 2026](https://www.sim.ai/library/best-ai-agent-platforms-2026). + +## Is Sim a good StackAI alternative? + +Sim fits teams prioritizing platform independence, self-hosting, multi-model choice, and a visual workflow builder that can coordinate work across tools and APIs. + +Sim is the open-source AI workspace where teams build, deploy, and manage AI agents. Sim's core uses the OSI-approved Apache 2.0 license, while enterprise code in `apps/sim/ee`, including SSO, SCIM, access control, audit logs, data retention, and session policies, uses the separate Sim Enterprise License. Production use of those enterprise features requires an active Enterprise subscription. + +[Self-hosted Sim deployments](https://docs.sim.ai/platform/self-hosting) can use Ollama, vLLM, LM Studio, or LiteLLM for local models. [Sim Cloud supports workspace-level bring-your-own-key connections on every plan](https://docs.sim.ai/platform/costs#bring-your-own-key-byok), while organization-level keys require Pro for Teams, Max for Teams, or Enterprise. + +Sim is suitable when a team wants agents to operate across existing systems without making a work-management suite the architectural center of every agent. Teams focused on deployment boundaries can also compare [self-hosted AI workflow platforms](https://www.sim.ai/library/best-self-hosted-ai-workflow-automation-platforms-2026). + +## Is n8n a good StackAI alternative? + +n8n fits technical automation teams that want a visual editor, application connectivity, code-level escape hatches, and a self-hosted option. + +n8n is especially relevant when a workload mixes deterministic automation with AI steps. [Its expressions and JavaScript or Python code nodes](https://docs.n8n.io/build/code-in-n8n), along with APIs and custom nodes, provide implementation flexibility beyond a strictly no-code product. + +The licensing distinction matters. n8n's Sustainable Use License is source-available rather than an OSI-approved open-source license. Teams examining this lane can review [n8n alternatives for AI agents](https://www.sim.ai/library/n8n-alternatives). + +## Is Workato a good StackAI alternative? + +[Workato fits governed integration across applications, APIs, and data systems](https://www.workato.com/pricing), particularly for large enterprises with centralized automation programs. + +[Workato's commercial editions](https://www.workato.com/pricing) emphasize centralized administration, reusable integration assets, managed connectivity, and controls for broad organizational deployment. Workato is generally a closer fit for a formal integration program than for a buyer prioritizing an open-source core or a self-hosted agent workspace. + +## Is Zapier a good StackAI alternative? + +Zapier fits business teams that value fast setup and broad SaaS application connectivity over self-hosting or deep infrastructure control. + +Zapier is useful for trigger-and-action processes spanning sales, marketing, support, and productivity applications. [Code steps, webhooks, API requests, and developer tooling](https://help.zapier.com/hc/en-us/articles/36785770231309-Build-advanced-workflows-using-code-and-APIs) extend the visual experience, while Zapier's public plans describe a hosted service. + +For a wider comparison of this category, see [16 Best Zapier Alternatives in 2026, Compared](https://www.sim.ai/library/best-zapier-alternatives). + +## Is Dify a good StackAI alternative? + +Dify fits teams building self-hosted LLM applications, retrieval-augmented generation systems, and model-centered agent workflows. + +[Dify combines managed or private deployment with models, knowledge, tools, and workflows](https://dify.ai/pricing). Its center of gravity is LLM application development, so buyers should test its connectors against the exact ERP, CRM, ITSM, and operational systems their agents must use. + +Teams deciding between these approaches can review [Best Dify Alternatives in 2026](https://www.sim.ai/library/dify-alternatives). + +## Is Langflow a good StackAI alternative? + +Langflow fits developers who want a visual, Python-based environment for agents, RAG applications, MCP servers, and custom AI components. + +[Langflow's documentation](https://docs.langflow.org/) describes an open-source builder that supports agents without requiring a specific model or vector store. Its API and deployment options give technical teams control over how flows are embedded and operated. Buyers that need packaged enterprise governance should evaluate the surrounding identity, audit, secrets, and operational tooling they would need to add to a self-managed deployment. + +## Why is Vellum not included as a current recommendation? + +The source comparison originally included Vellum for prompt development and LLM evaluation. Vellum's official notice says the [hosted Personal Assistant Platform is shutting down](https://www.vellum.ai/vellum-assistant-platform-shutdown), with final exports available until December 13, 2026. + +Because buyers should not start a new evaluation on a product that is shutting down, this guide replaces Vellum with Langflow. Archived Vellum documentation may still describe its former evaluation product, but those pages do not make it a current StackAI alternative. + +## Is StackAI capable of deploying workflows across teams with prebuilt templates and a drag-and-drop builder at scale? + +[StackAI supports visual agent creation and cross-system workflows](https://investors.asana.com/news-releases/news-release-details/asana-acquires-stackai-adding-cross-system-execution-human-agent), but deployment at scale depends on the governance, integration, identity, audit, and operating controls required by each organization. + +A drag-and-drop builder and prebuilt templates can shorten initial implementation. They do not by themselves establish enterprise readiness. Buyers should test shared ownership, environment separation, credentials, approvals, version changes, failure recovery, usage limits, and audit evidence for the exact workflow being deployed. + +The most useful proof is a production-shaped pilot involving multiple teams and at least two unrelated systems. That test exposes whether templates remain reusable, credentials stay appropriately scoped, and operators can investigate failed or unexpected agent runs. + +## How does StackAI by Asana compare with Zapier or Workato across unrelated systems? + +StackAI, Zapier, and Workato have different centers of gravity. StackAI emphasizes no-code enterprise AI agents, Zapier emphasizes fast SaaS automation, and Workato emphasizes governed enterprise orchestration. + +Choose StackAI when the primary job is creating AI agents that work with enterprise data and tools. Choose Zapier when rapid no-code connectivity across common SaaS applications is the leading requirement. Choose Workato when a centralized enterprise automation program needs governed integration across complex business systems. + +The deciding test is not whether a product lists each application. Buyers should compare authentication methods, connector depth, bidirectional operations, API fallback, error handling, data residency, audit events, throughput, and total cost at expected volume. + +## How should teams choose a StackAI alternative after the Asana acquisition? + +StackAI buyers should test architectural independence, system coverage, deployment boundaries, governance evidence, and cost against one representative production workflow. + +Use this sequence: + +1. List every system the agent must read from or write to. +2. Separate deterministic steps from steps that require model reasoning. +3. Define hosting, model-provider, data-residency, and network requirements. +4. Specify identity, credential, approval, audit, and retention requirements. +5. Build the same workflow in two shortlisted products. +6. Measure setup time, run reliability, debugging effort, model cost, and platform charges. +7. Confirm exit options for workflow definitions, data, prompts, and operational records. + +Acquisition ownership can be one input, but it should not replace product testing. Asana and StackAI stated that StackAI would continue operating under its own brand when they announced the transaction in May 2026. + +## Which fit should guide the shortlist? + +- Choose **Sim** when the team needs an independent AI workspace, self-hosting, visual orchestration, and flexible model and tool connections. +- Choose **n8n** when technical automation and code-level workflow control are central. +- Choose **Workato** when a formal enterprise integration program and centralized governance drive the purchase. +- Choose **Zapier** when fast deployment across common hosted applications matters more than infrastructure control. +- Choose **Dify** when the main requirement is a self-hosted LLM application or RAG system. +- Choose **Langflow** when developers want an open-source visual builder with Python customization and self-managed deployment. + +The final choice should come from a production-shaped pilot, not acquisition news or a feature checklist alone. diff --git a/apps/sim/public/library/best-stackai-alternatives-2026/cover.jpg b/apps/sim/public/library/best-stackai-alternatives-2026/cover.jpg new file mode 100644 index 0000000000000000000000000000000000000000..cd53a9f5f963faa850dc0a2e06d9f4aef710dfa0 GIT binary patch literal 28873 zcmeFYbyOTrw=O)mhd_Yf?iSoVxVt;Soe2bYx8UyX?(WV&a1S~J5ANZ@@0IhOd%knl zdhh-3TepXvRnxnxx@uSLUHf@@^Ro1^3iu3w{o4Tt2aACC`awZPLPAEtc!&D>!65p8 z_2Ko82#*90=k;W!BqgO}=K93&iA$89UsPR5-N7O0tr3X->qhzjXz-Bv&^1sHqyR`X z2q-j&mjM7i00ICB1pxs8_~!u&2Mq%c1^Fh$_}A-yyWwR8fDH9o=RMT>*9(n3|E%_J z7hnWU@N)j`T4IJ`pduJhMa47#nrXwToJPsW>~eiu*qj|D&tBku)l~-%_Y?9j8^k}9 zdOC#8nOMI6-Xmtk_iI^@P)FmDvQk=m0BY)06#-faT{%rR?2~y)3zKp-32K+0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ue, 17 Nov 2026 09:52:13 -0800 Subject: [PATCH 08/12] feat(library): How Do You Build a Governed Workday AI Agent for Employee Onboarding and Offboarding? (#10134) Co-authored-by: Sim Pi Agent --- .../index.mdx | 196 ++++++++++++++++++ .../cover.jpg | Bin 0 -> 34161 bytes 2 files changed, 196 insertions(+) create mode 100644 apps/sim/content/library/workday-ai-agent-employee-onboarding-offboarding/index.mdx create mode 100644 apps/sim/public/library/workday-ai-agent-employee-onboarding-offboarding/cover.jpg diff --git a/apps/sim/content/library/workday-ai-agent-employee-onboarding-offboarding/index.mdx b/apps/sim/content/library/workday-ai-agent-employee-onboarding-offboarding/index.mdx new file mode 100644 index 00000000000..5a58bfd2ce3 --- /dev/null +++ b/apps/sim/content/library/workday-ai-agent-employee-onboarding-offboarding/index.mdx @@ -0,0 +1,196 @@ +--- +slug: workday-ai-agent-employee-onboarding-offboarding +title: 'How Do You Build a Governed Workday AI Agent for Employee Onboarding and Offboarding?' +description: 'Build a governed Workday AI agent for employee onboarding, role changes, and offboarding with policy rules, human approval, and audit evidence.' +seoTitle: 'Workday AI Agent for Onboarding and Offboarding' +date: 2026-11-17 +updated: 2026-11-17 +authors: + - andrew +readingTime: 10 +tags: [AI Agents, Workday, Employee Lifecycle, Identity Governance, Sim] +ogImage: /library/workday-ai-agent-employee-onboarding-offboarding/cover.jpg +draft: false +faq: + - q: "What is an employee onboarding agent builder?" + a: "An employee onboarding agent builder coordinates HR events, policy rules, approvals, identity actions, collaboration setup, notifications, and service records in a multi-step workflow. Sim is the open-source AI workspace where teams can build and deploy this type of agent." + - q: "Which IAM vendor has the best automated onboarding and offboarding?" + a: "Okta, Microsoft Entra ID, and SailPoint are strong IAM options for automated onboarding and offboarding, but the right choice is the system that already owns identity, entitlement, and governance policy in the organization. Sim coordinates the cross-system process rather than replacing the IAM vendor." + - q: "What AI service desk platforms allow IT teams to build custom, n8n-style multi-step workflows to automate complex employee requests like offboarding across Okta and Google Workspace?" + a: "Sim allows IT teams to build custom multi-step workflows that coordinate Workday events, Okta or Microsoft Entra ID, Google Workspace, Slack, SailPoint, and Jira Service Management with human approval before access changes. n8n is an established automation product that buyers can include in the same proof of concept." + - q: "Should an AI agent create and remove employee access without approval?" + a: "A Workday AI agent should not create, expand, disable, or remove employee access without an explicit human approval step and a downstream Condition that enforces the decision." + - q: "Should Workday or the AI agent be the employee system of record?" + a: "Workday should remain the employee system of record, while Sim should orchestrate validated lifecycle events, approvals, downstream actions, reconciliation, and evidence." + - q: "Should Okta or Microsoft Entra ID create the primary employee account?" + a: "Okta or Microsoft Entra ID should create and govern the primary employee identity according to the organization's existing identity architecture, while Sim should coordinate the approved action rather than becoming another identity directory." + - q: "How should a Workday agent handle failed offboarding actions?" + a: "A Workday offboarding agent should keep the service ticket open, preserve successful steps, assign each failed revocation to an owner, retry only safe operations, and refuse to mark the employee fully offboarded until reconciliation succeeds." + - q: "Can a Workday onboarding agent add users to Google Workspace groups?" + a: "A Workday onboarding agent can add approved Google Workspace group memberships after deterministic policy mapping and human approval, provided the connected credential has only the required administrative permissions." + - q: "Can a Workday offboarding agent transfer an employee's files?" + a: "A Workday offboarding agent can initiate an approved file-transfer procedure, but Google Workspace ownership, records-retention rules, legal holds, and the authorized destination must be decided by organizational policy and a named reviewer." + - q: "Is Sim open source?" + a: "Sim's core is open source under the OSI-approved Apache License 2.0, while apps/sim/ee is governed by the separate Sim Enterprise License and requires an active Enterprise subscription for production use." + - q: "Is Sim free?" + a: "Sim's core can be used under Apache 2.0, but hosted services, model usage, infrastructure, and production use of apps/sim/ee may carry costs under their applicable plans and licenses." + - q: "Is n8n open source?" + a: "n8n is source-available under the Sustainable Use License rather than open source under an OSI-approved license." + - q: "Sim vs n8n: which is better for Workday onboarding and offboarding?" + a: "Sim fits teams that want the open-source AI workspace with explicit human approval routing and AI-assisted steps, while n8n fits teams seeking a general workflow automation product. The choice should be based on a proof of concept using the organization's actual Workday, IAM, approval, and audit requirements." +--- + +## TL;DR + +Workday and Sim can coordinate employee onboarding, role changes, and offboarding by using Workday as the system of record, calculating proposed access changes, pausing for human approval, and only then updating identity and collaboration systems. + +The safe pattern does not let an AI model decide who receives access. Workday supplies authoritative lifecycle data, deterministic policies map that data to proposed entitlements, a named reviewer approves or rejects the proposal, and downstream identity tools execute the approved changes. + +## What are the key facts about a Workday employee lifecycle agent? + +A Workday employee lifecycle agent should orchestrate governed actions without replacing Workday, the identity provider, or the organization's access policies. + +- **System of record:** [Workday HCM](https://www.workday.com/en-us/topics/hr/human-capital-management-software.html) supplies the worker ID, employment status, department, manager, location, role, and effective date used by the workflow. +- **Identity authority:** [Okta](https://help.okta.com/oie/en-us/Content/topics/users-groups-profiles/usgp-people.htm) or [Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/id-governance/what-are-lifecycle-workflows) should remain the authoritative identity provider rather than allowing the agent to maintain a separate account directory. +- **Approval boundary:** [Sim's Human in the Loop block](https://docs.sim.ai/workflows/blocks/human-in-the-loop) pauses a run and collects reviewer input. A downstream [Condition](https://docs.sim.ai/workflows/blocks/condition) must explicitly route approved and rejected results. +- **Execution boundary:** The workflow may execute approved account, group, notification, and ticket actions, but it should not invent entitlements or override security policy. +- **Evidence:** Every run should preserve the Workday event, proposed changes, approver, decision, executed actions, errors, and final ticket reference. +- **Recovery:** Each write should be idempotent, retry-safe, and paired with an exception path for partial failures. + +As of November 2026, [Sim's core is Apache 2.0](https://github.com/simstudioai/sim/blob/main/LICENSE), while code in `apps/sim/ee` is governed by the separate [Sim Enterprise License](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE). Sim also [supports self-hosting](https://docs.sim.ai/platform/self-hosting). + +As of November 2026, n8n is self-hostable under its source-available [Sustainable Use License](https://docs.n8n.io/n8n-community-license), and [n8n Cloud pricing](https://n8n.io/pricing/) is based on monthly workflow executions. + +## Can I connect custom-built agents to Workday's system of record? + +Workday can supply a custom Sim agent with authoritative employee lifecycle data while Sim coordinates approvals and downstream actions across identity, collaboration, and service-management systems. Sim's [Workday integration](https://docs.sim.ai/integrations/workday) can read worker data and perform lifecycle actions with the permissions granted to the connection. + +Use a narrow data contract between Workday and the workflow. A useful event payload contains only the fields required for the lifecycle process: + +| Field | Purpose | +|---|---| +| Event ID | Prevent duplicate processing | +| Worker ID | Correlate records without relying on names | +| Event type | Distinguish hire, role change, leave, and termination | +| Effective time | Schedule access changes at the correct time | +| Manager ID | Route approval and checklist tasks | +| Department, role, and location | Select a preapproved entitlement policy | +| Employment status | Confirm that the event is still valid before execution | + +A governed connection follows six stages: + +1. **Receive the Workday event.** Start the run from an approved Workday integration path and retain the source event ID. +2. **Validate required fields.** Reject incomplete events instead of asking a model to infer missing identity data. +3. **Read the applicable policy.** Map role, department, location, and employment status to a versioned entitlement set. +4. **Generate a proposed change set.** Present additions, removals, file-transfer instructions, and notification recipients in a structured format. +5. **Pause for approval.** Use Sim's Human in the Loop block to collect the decision, reviewer identity, comments, and any corrected fields, then use a Condition to route the result. +6. **Execute and reconcile.** Apply approved changes through the organization's configured identity, collaboration, governance, and service-management integrations, then compare the actual result with the proposal. + +The workflow should reread the relevant Workday status immediately before a high-impact action. That final check helps prevent a delayed or superseded event from disabling the wrong account. + +## How do you automate employee onboarding from Workday? + +Workday and Sim automate employee onboarding safely by preparing access before the start date, requiring approval before account or group changes, and recording the completed setup in a service-management ticket. + +1. **Start with the Workday hire event.** Capture the worker ID, start date, manager, department, role, location, and employment status. +2. **Check for an existing identity.** Search the selected identity provider using an immutable identifier rather than creating an account solely because an email address was not found. +3. **Build the proposed entitlement set.** Apply deterministic rules such as department-to-group and role-to-application mappings. Keep default access separate from exceptional access. +4. **Create the approval request.** Show the manager or IT reviewer the proposed identity account, groups, application access, and effective time. +5. **Pause before making access changes.** Sim's Human in the Loop block collects approval or rejection, and a downstream Condition permits writes only on the approved path. +6. **Create or update the identity.** Use either [Okta](https://help.okta.com/oie/en-us/Content/topics/users-groups-profiles/usgp-people.htm) or [Microsoft Entra ID](https://learn.microsoft.com/en-us/entra/id-governance/what-are-lifecycle-workflows) as the primary identity authority for the employee. Do not create competing primary identities in both systems. +7. **Add approved collaboration access.** Apply policy-backed [Google Workspace group memberships](https://knowledge.workspace.google.com/admin/groups/remove-or-ban-users-from-a-group) and other approved access. +8. **Create the manager checklist.** Open or update a [Jira Service Management](https://www.atlassian.com/software/jira/service-management/hr) ticket with the equipment, training, access-review, and first-day tasks that still require people. +9. **Send the welcome notification.** Send a Slack welcome only after the identity exists and the message does not expose credentials or sensitive HR data. +10. **Reconcile the result.** Compare requested and actual accounts, groups, and ticket tasks. Route mismatches to IT rather than silently completing the run. + +Device enrollment is a separate control plane. Use [How Do You Build a Governed AI Agent for Microsoft Intune Device Management?](https://www.sim.ai/library/ai-agents-microsoft-intune-device-management) for laptop and mobile-device workflows instead of mixing device policy into the identity workflow. + +## How do you automate employee role changes from Workday? + +Workday and Sim automate employee role changes by calculating the difference between old and new policy-backed access, obtaining approval, and applying both removals and additions at the effective time. + +1. **Receive the Workday role-change event.** Record the old and new department, role, manager, location, employment status, and effective date. +2. **Read current access.** Retrieve the employee's current identity groups, Google Workspace groups, and governed application assignments. +3. **Calculate an entitlement diff.** Produce explicit lists for access to add, retain, remove, and escalate for manual review. +4. **Flag sensitive changes.** Route privileged, financial, administrative, or cross-region access to the designated security or application owner. +5. **Request approval.** Present the exact diff to the new manager or responsible access owner through Human in the Loop. +6. **Route the decision.** Use a Condition after the approval form so that rejection, expiry, or missing input cannot reach access-changing blocks. +7. **Apply removals and additions.** Remove access that is no longer justified and add only the approved entitlements through the organization's identity and governance systems. [SailPoint access profiles](https://documentation.sailpoint.com/saas/help/access/access-profiles.html), for example, bundle related entitlements for governed assignment. +8. **Confirm completion.** Update Jira Service Management with the approved diff, execution results, exceptions, and reviewer identity. + +A role-change workflow must not be additive-only. Retaining old access after an internal transfer creates privilege accumulation, so removals deserve the same review and reconciliation as new access. + +## How do you automate employee offboarding across Okta and Google Workspace? + +Workday and Sim automate offboarding by approving a time-bound deprovisioning plan, disabling the authoritative identity, transferring owned information through approved procedures, revoking application access, and recording evidence in a ticket. + +1. **Receive the Workday termination event.** Capture the worker ID, effective time, manager, employment status, and event ID without copying unnecessary HR details. +2. **Confirm the event is current.** Reread the employee's Workday status before any access change to catch rescinded or rescheduled terminations. +3. **Inventory governed access.** Collect the relevant identity, Google Workspace account and groups, and governed application assignments. +4. **Build the offboarding plan.** Specify which identity will be disabled, which sessions or application assignments will be revoked, who receives transferred files, and which groups will be removed. +5. **Require human approval.** Sim's Human in the Loop block should collect an explicit decision and any file-transfer owner. A downstream Condition should block all access changes unless the decision is approved. +6. **Disable the authoritative identity.** Disable the employee through the organization's selected primary identity provider at the approved effective time. [Okta documents deactivation](https://help.okta.com/en-us/content/topics/users-groups-profiles/usgp-deactivate-user-account.htm) as removing access to assigned applications. +7. **Remove approved access.** Remove Google Workspace group memberships and revoke governed application access through the systems responsible for those entitlements. +8. **Handle files through an approved procedure.** Follow [Google Workspace's administrator guidance](https://knowledge.workspace.google.com/admin/users/delete-or-remove-a-user-from-your-organization) and transfer or preserve files only to the approved manager, records owner, or legal-hold destination defined by policy. +9. **Update the service record.** Write the action results, timestamps, approver, exceptions, and evidence references to Jira Service Management. +10. **Reconcile and escalate.** Confirm that the identity and access state matches the approved plan. Keep the ticket open when any action fails. + +Password resets, employee access requests, and ticket triage belong in the broader service-desk process. See [Best AI Agents for IT Helpdesk Teams: 6 Platforms Compared](https://www.sim.ai/library/best-ai-agents-for-it-helpdesk-teams) for that adjacent workflow. + +## What should a Workday AI agent never do automatically? + +A Workday AI agent should never infer employment status, invent entitlements, approve its own access proposal, expose credentials, or close an offboarding record while a required revocation remains incomplete. + +Keep these decisions outside the model: + +- Whether a person is hired, transferred, suspended, or terminated +- Which privileged role a person deserves +- Whether legal hold or records-retention requirements apply +- Whether a failed identity action can be ignored +- Whether an unrecognized manager may approve sensitive access +- Whether free-text HR notes should be copied into Slack or service tickets + +Use an AI model only where interpretation is useful and bounded, such as classifying a manager's checklist request or summarizing non-sensitive exceptions. Identity matching, entitlement selection, approval routing, and access writes should remain deterministic and policy-driven. + +## What permissions, audit logs, and security controls should IT verify? + +Workday, Sim, and each connected identity system should use least-privilege credentials, immutable event identifiers, explicit approval evidence, and audit records that connect every write to its source event. + +Security and IT teams should confirm: + +- The Workday connection can access only the worker fields required by the workflow. +- Connected identity, collaboration, governance, messaging, and service-management credentials expose only the necessary actions and resources. +- Production credentials are stored as managed secrets rather than embedded in prompts or workflow text. +- The approval form records the reviewer, decision, time, comments, and proposed change-set version. +- A Condition follows Human in the Loop and blocks every rejected, expired, or malformed response. +- Every external write includes or records the Workday event ID and workflow run ID. +- Duplicate events cannot create duplicate accounts or repeat destructive operations. +- Retry behavior distinguishes temporary failures from permanent policy or permission errors. +- Logs avoid unnecessary HR fields, credentials, tokens, and private file contents. +- Offboarding remains incomplete until all required systems either confirm success or produce an assigned exception. +- Emergency termination procedures are predefined by security policy rather than improvised by the agent. + +For a broader identity-control model, read [AI Agent Identity, Credential Management, and Audit Trails: Enterprise Guide](https://www.sim.ai/library/ai-agent-identity-credentials-audit-trails-enterprise-guide). For approval design patterns, read [Best AI Agent Builders for Human Approval Workflows](https://www.sim.ai/library/best-ai-agent-builders-for-human-approval-workflows). + +## How do AI agent integrations with Workday compare? + +Sim and n8n can both coordinate multi-step employee lifecycle processes, but buyers should compare them on connector fit, approval enforcement, auditability, deployment requirements, licensing, and recovery from partial failures rather than visual workflow design alone. + +Run the same proof of concept in every shortlisted product: + +1. Ingest a representative Workday hire, transfer, and termination event. +2. Calculate a deterministic entitlement diff. +3. Pause before the first identity or group write. +4. Reject one request and prove that no write executes. +5. Approve another request and record the reviewer and decision. +6. Force one downstream action to fail. +7. Retry the run without duplicating completed actions. +8. Produce a Jira Service Management record showing the source event, approved plan, actual changes, and unresolved exceptions. + +Sim is the open-source AI workspace for teams that want AI steps, deterministic branches, human approval, and tool actions in one governed workflow. Sim's Human in the Loop block pauses execution and returns form fields, while a downstream Condition enforces the approval decision. + +n8n is a general workflow automation product with [cloud and self-hosted deployment options](https://docs.n8n.io/choose-how-to-use-n8n). As of November 2026, n8n's Sustainable Use License is based on the fair-code model, so organizations should review its license terms alongside technical fit. + +The right product is the one that passes the failure, rejection, reconciliation, and audit tests with the organization's real Workday and identity configuration. + +[Build a governed employee lifecycle agent with Sim](https://www.sim.ai). diff --git a/apps/sim/public/library/workday-ai-agent-employee-onboarding-offboarding/cover.jpg b/apps/sim/public/library/workday-ai-agent-employee-onboarding-offboarding/cover.jpg new file mode 100644 index 0000000000000000000000000000000000000000..461778f4f55e835386899225224a162acb33a924 GIT binary patch literal 34161 zcmeFZbzB_XmNweB1r6>J+}$C#ySqbhX&eFscY?bIZQR`@!QCanH3WCK&HK)onKLu@ z{=W0wf2X>;sM@u4?X}l_mK3i`ud4tt0PNof92_hHBKU*+4hiWUGA0Tt_=8FE9{WA` zOF}?KfCv7uQjwEWvGOo8GV_QF3W{s0XgWEiyj246|GSbt06IKmA#@EC1UUc_9Rdm+ z;&lK(2!H@ULP0=40RH`eg@cBHhk|^2ius?@|IYBb0(b`nE`tVz22N<~`S)V~@&$~r z8A0B^TuQ=NVxkykqM~970L`*t1EN(ivAkU060zb$E^rjOU-i@@z-NAUV2AiZWuQmw zmW>_ouQf3%xnIkMg!&^9DJQM92cV%@RS~3<)RotC!#Q4{vM{b-m!xqi<{ELVw1$=c ztraB4FgMjnHcl<~uQek+D9|F==2J{hkV8)gfWS-C95|y(Ov0y?@N!C~tXI>c#F`OU zpP{a_wpa)ptz@Vj7i9cb8$k~m$3>`UaCw)g`L9TX40f_huqLapt?jz3>*gK{o+iTnR1|#(qtE4g z_eb4JqCPBnqD1WB&_gPf+cl0G$FKj=NwaZMTD7RC1!VVLSVQgsCq;>G75X~~hr)Rt zxw{ef@;6%{GJia6Wxl6Q_pIkSrYFa?ng$oT$B)BLl>$-b=tq3#g`k4 zI9l>V=;ybE?Dehf-=uRc;_JtW>#Zsn&n6?Kn=VUH)n?{OnAp@|IlOb26^fv)jLuM< zQPWh#{dS_4_pmJN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+AK?b_`c`)S zleip0?+!U$YKR}vlJ_cso7G2sK~H_pD#A~SRMGZL{?s~aak7Wu-y$&t-6jgLEF;-Niwj0fn7D$2Ax5w@R)-p4ef2jH}s>ybQ7Hh?N(ZFq22u7<;MUIiD b|Gz%Sf8M%>jfM3D0L}lu+=27o9V`D29}p}F literal 0 HcmV?d00001 From e00e1c8e5275441de9d3dfd22e3ee76ea563244d Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 09:52:35 -0800 Subject: [PATCH 09/12] feat(library): Zapier Pricing at Scale: What Tasks Really Cost and When AI Agents Are Cheaper (#10135) * feat(library): Zapier Pricing at Scale: What Tasks Really Cost and When AI Agents Are Cheaper * Pi Babysit: address PR #10135 feedback --------- Co-authored-by: Sim Pi Agent --- .../library/zapier-pricing-at-scale/index.mdx | 190 ++++++++++++++++++ .../library/zapier-pricing-at-scale/cover.jpg | Bin 0 -> 41218 bytes 2 files changed, 190 insertions(+) create mode 100644 apps/sim/content/library/zapier-pricing-at-scale/index.mdx create mode 100644 apps/sim/public/library/zapier-pricing-at-scale/cover.jpg diff --git a/apps/sim/content/library/zapier-pricing-at-scale/index.mdx b/apps/sim/content/library/zapier-pricing-at-scale/index.mdx new file mode 100644 index 00000000000..a3b1b99d7d0 --- /dev/null +++ b/apps/sim/content/library/zapier-pricing-at-scale/index.mdx @@ -0,0 +1,190 @@ +--- +slug: zapier-pricing-at-scale +title: 'Zapier Pricing at Scale: What Tasks Really Cost and When AI Agents Are Cheaper' +description: 'Learn how Zapier task pricing scales, model billable actions, and compare total Zapier costs with Sim BYOK and self-hosted AI agent costs.' +seoTitle: 'Zapier Pricing at Scale: Tasks vs AI Agents' +date: 2026-11-17 +updated: 2026-11-17 +authors: + - andrew +readingTime: 10 +tags: [Zapier, Automation, AI Agents, Pricing, Sim] +ogImage: /library/zapier-pricing-at-scale/cover.jpg +draft: false +faq: + - q: "Does Zapier charge for every workflow step?" + a: "Zapier charges tasks for successful billable actions, while triggers and some built-in functions do not count as tasks under Zapier's task-usage rules." + - q: "Are there alternatives to Zapier for users on a tight budget?" + a: "Sim, n8n, Make, and Gumloop are alternatives to Zapier, but the lowest-cost choice depends on whether the workload is AI-heavy, deterministic, cloud-hosted, or self-hosted." + - q: "Is there a free alternative to Zapier and Make?" + a: "Self-hosting changes the cost structure rather than eliminating costs because teams still pay for infrastructure, models, APIs, maintenance, and labor." + - q: "How do Gumloop and Zapier pricing compare?" + a: "Gumloop and Zapier use different usage units, so buyers should compare the current Gumloop credit requirement with the current Zapier task requirement for the same successful workflow outcome." + - q: "Can Sim use bring-your-own model keys?" + a: "Sim supports workspace BYOK on every Sim Cloud plan, while organization-level keys require Pro for Teams, Max for Teams, or Enterprise." + - q: "Is Sim free to self-host?" + a: "Self-hosting Sim still carries infrastructure and operating costs, while production use of apps/sim/ee requires an active Sim Enterprise subscription." + - q: "Can Sim run local models?" + a: "Self-hosted Sim can connect to local models through Ollama, vLLM, LM Studio, or LiteLLM without requiring Sim Enterprise solely for local-model support." + - q: "Is n8n open source?" + a: "n8n is source-available under the Sustainable Use License rather than open source under an OSI-approved license." + - q: "Is n8n cheaper than Zapier?" + a: "n8n can cost less than Zapier for some high-volume workflows because its cloud plans and self-hosted option use a different cost model, but infrastructure and maintenance must be included in the comparison." + - q: "Can an AI agent replace every Zapier automation?" + a: "An AI agent should not replace every Zapier automation because simple deterministic integrations are often cheaper, easier to test, and more predictable without model inference." + - q: "Should a company migrate all of its Zaps at once?" + a: "A company should migrate Zaps incrementally, beginning with high-cost workflows whose measured savings and operational benefits justify the change." +--- + +## TL;DR + +Zapier costs grow with the number of successful actions your automations perform. Sim can cost less when bring-your-own-key model usage plus platform or hosting costs stay below the equivalent Zapier task bill. Calculate billable actions per run, multiply by monthly runs, and compare Zapier's current quote with the complete monthly cost of running the same work in Sim. + +All pricing references and cost-accounting rules in this guide are dated **as of November 2026**. Because vendors can change prices and plan allowances, use the linked first-party pricing pages to replace the inputs in the formulas with your current quotes. + +## How much does Zapier cost at scale? + +Zapier's cost at scale depends on monthly task usage, required plan features, billing cycle, and any charges associated with users or add-ons, not simply the number of automations a team creates. + +Zapier defines a task as an action that a Zap completes successfully, although triggers and some built-in functions do not consume tasks. A workflow with one trigger and four billable actions can therefore consume four tasks each time it runs successfully, according to Zapier's [task-usage documentation](https://help.zapier.com/hc/en-us/articles/8496196837261-How-is-task-usage-measured-in-Zapier). + +Use this basic estimate: + +`Monthly Zapier tasks = successful workflow runs × billable actions per run` + +A workflow that runs 10,000 times per month and completes three billable actions per run consumes approximately 30,000 tasks. If a branch, loop, retry, or additional action runs only some of the time, calculate its expected task usage separately and add it to the total. + +As of November 2026, consult [Zapier's official pricing page](https://zapier.com/pricing) for the plan tier and price that cover the calculated task allowance. Use Zapier's task-usage documentation to determine which steps count in the estimate. + +## What are the key cost facts about Zapier, Sim, and n8n? + +Zapier, Sim, and n8n use different billing and deployment models, so buyers should compare complete workflow costs rather than treating tasks, model tokens, and workflow executions as equivalent units. + +- **Zapier:** Zapier's published cloud plans meter automation usage through tasks completed by successful actions, with current allowances and plan features listed on its [official pricing page](https://zapier.com/pricing). +- **Sim:** Sim is the open-source AI workspace. Sim's core is available under the [Apache 2.0 license](https://github.com/simstudioai/sim/blob/main/LICENSE), while `apps/sim/ee` is governed by the separate [Sim Enterprise License](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE). Teams can use workspace BYOK on any Sim Cloud plan or run local models on a self-hosted Sim deployment. +- **n8n:** n8n offers [cloud plans priced by workflow executions](https://n8n.io/pricing/) and [self-hosting options](https://docs.n8n.io/deploy/host-n8n). Its [Sustainable Use License](https://github.com/n8n-io/n8n/blob/master/LICENSE.md) is source-available rather than an OSI-approved open-source license. + +## What does a worked Zapier cost model look like? + +A useful Zapier cost model converts workflow volume into expected monthly tasks before selecting the current plan tier that can accommodate that usage. + +The following table uses illustrative workflow volumes rather than hard-coded vendor prices. "Required Zapier tier" means the current tier or custom quote on Zapier's official pricing page with a task allowance at least as large as the calculated total. + +| Monthly successful runs | Billable actions per run | Estimated Zapier tasks | Required Zapier tier | Comparable BYOK agent-cost input | +|---:|---:|---:|---|---| +| 1,000 | 2 | 2,000 | Current tier covering at least 2,000 tasks | 1,000 agent runs × model usage per run | +| 10,000 | 3 | 30,000 | Current tier covering at least 30,000 tasks | 10,000 agent runs × model usage per run | +| 5,000 | 8 | 40,000 | Current tier covering at least 40,000 tasks | 5,000 agent runs × model usage per run | +| 50,000 | 5 | 250,000 | Current tier or quote covering at least 250,000 tasks | 50,000 agent runs × model usage per run | + +For example, suppose an agent run uses 8,000 input tokens and 2,000 output tokens. Its model cost can be estimated with the current rates from the selected model provider: + +`Model cost per run = (8,000 ÷ 1,000,000 × input-token price) + (2,000 ÷ 1,000,000 × output-token price)` + +Then calculate the complete Sim scenario separately for Cloud and self-hosting: + +`Monthly Sim Cloud cost = plan fee + Cloud usage not covered by included plan credits + BYOK model API usage + external API usage + storage and observability + expected operating labor` + +`Monthly self-hosted Sim cost = infrastructure + model API usage + external API usage + storage and observability + expected operating labor` + +A billable Sim Cloud workflow run has a base charge of one credit before model or tool usage, while billing-disabled self-hosted deployments do not apply Sim plan-based usage billing. Apply the plan's included credits when calculating the remaining Cloud usage charge. Sim documents these rules and the current credit value on its [official costs page](https://docs.sim.ai/platform/costs). + +Workspace BYOK is available on every Sim Cloud plan as of November 2026, while organization-level keys require Pro for Teams, Max for Teams, or Enterprise. Sim documents these distinctions on its [official costs page](https://docs.sim.ai/platform/costs#bring-your-own-key-byok). + +This comparison is not automatically favorable to either platform. A simple two-action Zap may remain inexpensive in Zapier, while a high-volume workflow with many successful actions may cross the break-even point sooner. + +## What hidden costs make Zapier more expensive than the advertised starting price? + +Zapier's real monthly cost can exceed an advertised entry price when multi-step workflows multiply task usage or when the required apps, collaboration features, AI capabilities, and usage allowance move a team to a different tier. + +Account for these items before comparing quotes: + +- **Multi-step task multiplication:** Count each successful billable action, not each workflow run, using Zapier's [task-usage rules](https://help.zapier.com/hc/en-us/articles/8496196837261-How-is-task-usage-measured-in-Zapier). +- **Branches and loops:** Model the percentage of runs that enter each path and the number of actions performed there. +- **Retries and reprocessing:** Include expected reruns caused by bad data, expired credentials, API failures, or manual corrections. +- **App and feature requirements:** Confirm on Zapier's [current plan comparison](https://zapier.com/pricing) that the selected tier includes the apps and capabilities the workflow needs. +- **AI steps:** Determine from Zapier's [current plan](https://zapier.com/pricing) and [task rules](https://help.zapier.com/hc/en-us/articles/8496196837261-How-is-task-usage-measured-in-Zapier) whether each step consumes tasks, separate AI usage, or both. +- **Team access:** Include the current cost of the seats and collaboration features the team actually needs. +- **Overages and growth headroom:** Model expected seasonal peaks rather than sizing the plan only for an average month. +- **Migration and maintenance:** Include the labor required to build, test, monitor, and repair either implementation. + +A reliable model includes a low, expected, and peak-volume scenario. Teams should also apply a safety margin instead of assuming every month will match the historical average. + +## When is an AI agent platform with BYOK cheaper than Zapier? + +A BYOK AI agent platform is cheaper than Zapier when its platform or hosting cost, direct model charges, external API charges, and operating labor remain below Zapier's complete task-based quote after migration costs are amortized. + +Use this break-even test: + +`Monthly savings = complete Zapier cost − complete Sim cost − monthly amortized migration cost` + +Moving is financially justified when monthly savings remain positive across the expected and peak-volume cases. The case becomes stronger when the work also benefits from model choice, unstructured-data handling, reasoning, or dynamic tool selection. + +Sim's BYOK model lets a workspace pay the model provider directly instead of bundling model usage into a separate task unit. [Self-hosted Sim](https://docs.sim.ai/platform/self-hosting) can also connect to local models through Ollama, vLLM, LM Studio, or LiteLLM, although infrastructure and operating labor still need to be counted. + +Zapier can remain the more economical choice when workflows are simple, low-volume, deterministic, already stable, and inexpensive to maintain. Avoid migrating a working two-step integration merely because another platform has a lower theoretical unit cost. + +## Zapier is getting expensive at scale, what are cheaper alternatives for AI automation? + +Sim fits teams evaluating an alternative when Zapier's task multiplication is driving cost and the workflow contains model-based reasoning. n8n, Make, and Gumloop cover different execution, visual-automation, and hosted AI use cases. + +Keep the shortlist tied to the job: + +- **Sim:** Sim fits teams that need AI agents, a visual builder, multiple model providers, BYOK, and an [Apache 2.0 core](https://github.com/simstudioai/sim/blob/main/LICENSE) with a separately licensed [enterprise directory](https://github.com/simstudioai/sim/blob/main/apps/sim/ee/LICENSE). +- **n8n:** n8n fits technical teams that want [execution-based cloud pricing](https://n8n.io/pricing/) or a [self-hosted workflow system](https://docs.n8n.io/deploy/host-n8n) and accept its [source-available license](https://github.com/n8n-io/n8n/blob/master/LICENSE.md). +- **Make:** Make fits visual, deterministic app automation where the workflow's use of [credits](https://www.make.com/pricing) maps predictably to the scenario design. +- **Gumloop:** Gumloop is worth comparing for hosted AI automation when its current [pricing](https://www.gumloop.com/pricing) and [credit model](https://docs.gumloop.com/core-concepts/credits) fit the expected workload. + +For a broader product comparison, see [16 Best Zapier Alternatives in 2026, Compared](https://www.sim.ai/library/best-zapier-alternatives). For the narrower distinction between AI agents and conventional automation, see [AI-Native Workflow Automation vs Traditional Automation Platforms](https://www.sim.ai/library/ai-native-workflow-automation-vs-traditional-automation). + +## We're a startup evaluating automation tools and want something cheaper than Zapier at scale but still easy for nontechnical teammates to use, what should we consider? + +A startup should compare Zapier and Sim with its own workflows because cost at scale matters only if nontechnical teammates can safely build, run, and troubleshoot the replacement. + +Run a short proof of concept with three representative workflows: + +1. A simple deterministic integration with two or three actions. +2. A multi-step workflow with branching, retries, and approvals. +3. An AI-heavy workflow that reads unstructured data and chooses a next action. + +For each workflow, record build time, successful completion rate, monthly usage cost, debugging time, credential setup, and the number of requests that need engineering help. Test the visual builder with the teammates who will actually maintain the automation rather than having an engineer judge usability on their behalf. + +Stay with Zapier if the integrations are already dependable, the projected task tier is affordable, and teammates can maintain them without specialist support. Consider Sim when AI-heavy workflows, BYOK, model choice, or self-hosting create enough value to offset migration and training. + +The [AI workflow automation platform buyer's checklist](https://www.sim.ai/library/ai-workflow-automation-platform-buyers-checklist) provides a broader evaluation framework. + +## I run a small team and need a workflow automation tool that isn't overkill or expensive, what are the best options besides Zapier? + +Sim, n8n, Make, and Gumloop are relevant alternatives to shortlist, but a small team should choose the simplest product that meets its real volume, maintenance, and AI requirements. + +Choose by workload rather than feature count: + +- Choose **Sim** when AI agents, BYOK, or flexible model selection are central to the work. +- Choose **n8n** when technical ownership, [self-hosting](https://docs.n8n.io/deploy/host-n8n), and [execution-based automation](https://n8n.io/pricing/) are priorities. +- Choose **Make** when the work is mostly deterministic app-to-app automation and its [credit model](https://www.make.com/pricing) is predictable for the scenario. +- Evaluate **Gumloop** when the workflow is AI-centric and its current [credit economics](https://docs.gumloop.com/core-concepts/credits) are predictable for your usage. +- Keep **Zapier** when the workflow is small, stable, and cheaper to leave in place than to migrate. + +A small team should reject any option whose savings disappear after adding setup, monitoring, incident response, and maintenance labor. The [7 Best Workflow Automation Tools in 2026: AI and Traditional Options](https://www.sim.ai/library/best-ai-automation-tools-2026) compares the broader category without turning this cost guide into another roundup. + +## Which decision rule should teams use to stay on Zapier or move? + +Teams should stay on Zapier when its complete cost is lower for stable deterministic workflows. Teams should evaluate Sim when repeated modeling shows that BYOK agent execution is less expensive for work that genuinely benefits from AI. + +**Stay on Zapier when:** + +- Current task usage fits comfortably inside an affordable tier. +- Workflows use few billable actions per run. +- Integrations are already stable and require little maintenance. +- The work is deterministic and does not need model reasoning. +- Migration labor would take too long to recover through monthly savings. + +**Evaluate moving to Sim when:** + +- Multi-step workflows create high task totals at expected or peak volume. +- Model-based decisions can replace long chains of brittle rules. +- Direct control over model providers and model spending matters. +- The team needs BYOK, self-hosting, or local-model options. +- The measured savings remain positive after including migration and operating labor. + +For model and infrastructure inputs beyond Zapier, see [How Much Does It Cost to Build and Run an AI Agent?](https://www.sim.ai/library/how-much-does-it-cost-to-build-and-run-an-ai-agent). diff --git a/apps/sim/public/library/zapier-pricing-at-scale/cover.jpg b/apps/sim/public/library/zapier-pricing-at-scale/cover.jpg new file mode 100644 index 0000000000000000000000000000000000000000..a7843e20b4f5b49297ca8781be57943bb758df56 GIT binary pat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pEXaDyb7x`Nl0=R~>5tPP&|a?%NVy|9WqY5C&In!~h#sQtD^sWC4^SO&vYLL4*T7 zO3x#bs%E1n)T*ti;Lf zk?>m_B}cN`TiV_b_!N6+Rg&K#`4gv(V*o_bG7Q020_fPp%rp zV#U%er0-WJt!5?*n{D=6w%WJ{B#|}{vV}7})b>2I1_pDEd@V~fctr8+<7&V2vIFUd zz_9FEuKh>Kqrs;d1UL55O|TcW5$)1yV}0glWDnNeKSe$;7N!Y0(&+O;woC4U*I|@` z`;hs{^FS;oPSk#<}8fS@}hirh$$NJ5}Vmo7a?6eQn>l zH0;6(A?F&p=dq#DOPQ00I0!#_;?lI1aPRF0o~1Sz8j6#6$=ZyyK*9^Avhx+^@PiJ@ z8u+K5Nz$lggu35Qj<(KO7cg+Xb1P;WYsq0$eJ7XN$dmu!!+;gkkQhFh$A2tNi-Vs3 zp)wsB8?L2_f$Z&%ZkJIX#rjc`KmH&R>t^rfpTp&AwgF6S7)7bmM2Rbcs{AtVRb4;M z0%eOFQP4;?CN5DSfB$?PUXSqVL#0vwpY=t{Hz|90gQYc$pZQ>vK}PdJ3v1ig7n$DZ z3~$6v+pa8ZPkZcA!qmt655|O1=2#_3EJkIbBRK>Rszu%QgM3zq{g(?OHIYNy3MZy9 zaQw**mBJTGx-3IHx7ndwXgVcu}wy&hUeoaj?qIA$@q!n8zei~S>}83n*1++`4r!{ zjyXUaVsnW~wh7dOXWdzuhF*fe+C6L5n2ip73ey2jZPCut(Iu_NF=+M%CMej0zg*}4 KfAi|6(SHE&h85@l literal 0 HcmV?d00001 From 769e5ba534a7b5ce6a03156db29cc67b383ec56c Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 09:52:51 -0800 Subject: [PATCH 10/12] fix(billing): withhold hosted Fal.ai image generation from free-plan payers (#10136) --- apps/sim/tools/image/generate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/sim/tools/image/generate.ts b/apps/sim/tools/image/generate.ts index 92fb806b3b5..19cc3927fc7 100644 --- a/apps/sim/tools/image/generate.ts +++ b/apps/sim/tools/image/generate.ts @@ -129,6 +129,7 @@ export const imageGenerateTool: ImageGenerationToolConfig = { apiKeyParam: 'apiKey', byokProviderId: 'falai', exactCostSettlement: 'falai', + requiresPaidPlan: true, pricing: { type: 'custom', getCost: (_params, output) => { From 7e7a0c82bad93f229c4dd0c42b2c96e9a1508452 Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 10:45:28 -0800 Subject: [PATCH 11/12] fix(ci): restore ESM checks and synchronize docs searches (#10139) --- .github/CI.md | 2 + .github/workflows/checks.yml | 3 + apps/docs/scripts/test-navigation-e2e.ts | 98 +++++++++++++++--------- package.json | 3 +- scripts/tsconfig.json | 2 +- scripts/tsconfig.mts.json | 7 ++ 6 files changed, 75 insertions(+), 40 deletions(-) create mode 100644 scripts/tsconfig.mts.json diff --git a/.github/CI.md b/.github/CI.md index 5461465a43f..bda3d5c7182 100644 --- a/.github/CI.md +++ b/.github/CI.md @@ -1,5 +1,7 @@ # CI selection and acceptance ownership +Root `bun run type-check` and CI's lint job also check ESM maintenance scripts through `scripts/tsconfig.mts.json`, which inherits the shared scripts compiler options and selects every `.mts` file. The shared scripts project includes `.ts`, `.tsx`, and `.mts` for editor checking; CI's additional scripts gate is scoped to `.mts`. + The `changes` job runs Turborepo 2.11.10's `affectedTasks` query before installing application dependencies or provisioning services. `turbo.json` records package dependency propagation; `apps/sim/turbo.json` partitions the app into shared runtime, server, workspace UI, and acceptance tasks. `.github/ci-suites.json` turns those tasks into job matrices. The uploaded `ci-plan` artifact names changed files, selected tasks, attribution reasons, and any fallback. A PR compares the checked-out GitHub merge commit with its first parent: the actual target revision tested by that merge. The PR event's base SHA can become stale when the target advances. Scoping requires a matching GitHub merge ref and SHA, exactly two merge parents, and a usable target parent; otherwise every check runs. This works with the existing depth-two checkout without fetching older ancestry. Main/staging pushes execute all checks; the parent `ci` workflow skips checks on `dev` pushes, while PRs targeting `dev` still run checks. A manual `checks` run executes all checks unless supplied a full base commit SHA to reproduce a scoped plan. Missing history, an empty diff, unknown files outside the workspace graph, root script/CI changes, or a planner error run every check. Missing selection outputs fail the aggregate gate. The gate also rejects an omitted dependency, any failed/cancelled job, and any skip that its explicit selection flag did not authorize. diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 85942b726c5..d46394aaca6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -733,6 +733,9 @@ jobs: - name: Migration safety (zero-downtime) audit run: bun run check:migrations "${{ steps.audit_base.outputs.ref }}" + - name: Type-check ESM maintenance scripts + run: bun run type-check:scripts:esm + # Every affected workspace, following the same real task graph as tests. Root/unknown # changes select all. packages/emcn, packages/utils, # apps/desktop and apps/docs had no type check in CI at all; apps/sim's diff --git a/apps/docs/scripts/test-navigation-e2e.ts b/apps/docs/scripts/test-navigation-e2e.ts index 911d3ec98f5..9c78855b823 100644 --- a/apps/docs/scripts/test-navigation-e2e.ts +++ b/apps/docs/scripts/test-navigation-e2e.ts @@ -91,6 +91,24 @@ async function selectRequestLanguage(page: Page, name: string | RegExp): Promise return tab } +async function searchFor(page: Page, query: string) { + const [request] = await Promise.all([ + page.waitForRequest( + (request) => { + const url = new URL(request.url()) + return ( + url.origin === target.origin && + url.pathname === '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/api/search' && + url.searchParams.get('query') === query + ) + }, + { timeout: 5000 } + ), + page.getByRole('combobox', { name: 'Search documentation' }).fill(query), + ]) + expect((await request.response())?.ok()).toBe(true) +} + async function open(page: Page, path: string) { const response = await page.goto(new URL(path, target).href, { waitUntil: 'domcontentloaded' }) expect(response?.ok() || response?.status() === 304).toBe(true) @@ -1756,42 +1774,46 @@ try { 'Search keyboard navigation, empty/error states and focus restoration', async () => { const page = await interactive.newPage() - await open(page, '/introduction') - const trigger = page.getByRole('button', { - name: /^(Search documentation|Search docs)$/, - exact: true, - }) - await trigger.focus() - await page.keyboard.press('Control+k') - const search = page.getByRole('combobox', { name: 'Search documentation' }) - await expect(search).toBeFocused() - await search.fill('Slack') - await expect(page.getByRole('option').first()).toBeVisible() - await page.screenshot({ path: join(directory, 'search-results.png') }) - const activeResult = await search.getAttribute('aria-activedescendant') - await search.dispatchEvent('keydown', { key: 'ArrowDown', isComposing: true }) - await expect(search).toHaveAttribute('aria-activedescendant', activeResult ?? '') - await search.dispatchEvent('keydown', { key: 'Enter', isComposing: true }) - await expect(page.getByRole('dialog')).toBeVisible() - await expect(page).toHaveURL(new URL('/introduction', target).href) - await search.press('ArrowDown') - await search.press('Enter') - await expect(page).not.toHaveURL(new URL('/introduction', target).href) - await page - .getByRole('button', { name: /^(Search documentation|Search docs)$/, exact: true }) - .click() - await search.fill('zzzz-no-such-content-zzzz') - await expect(page.getByRole('status')).toContainText('No results') - await page.route('**/api/search?*', (route) => route.fulfill({ status: 503, body: '{}' })) - await search.fill('failure-case') - await expect(page.getByRole('status')).toContainText('Search is unavailable') - await page.unroute('**/api/search?*') - await page.getByRole('button', { name: 'Try again', exact: true }).click() - await expect(page.getByRole('status')).toContainText('No results') - await search.press('Escape') - await expect( - page.getByRole('button', { name: /^(Search documentation|Search docs)$/, exact: true }) - ).toBeFocused() + try { + await open(page, '/introduction') + const trigger = page.getByRole('button', { + name: /^(Search documentation|Search docs)$/, + exact: true, + }) + await trigger.focus() + await page.keyboard.press('Control+k') + const search = page.getByRole('combobox', { name: 'Search documentation' }) + await expect(search).toBeFocused() + await searchFor(page, 'Slack') + await expect(page.getByRole('option').first()).toBeVisible() + await page.screenshot({ path: join(directory, 'search-results.png') }) + const activeResult = await search.getAttribute('aria-activedescendant') + await search.dispatchEvent('keydown', { key: 'ArrowDown', isComposing: true }) + await expect(search).toHaveAttribute('aria-activedescendant', activeResult ?? '') + await search.dispatchEvent('keydown', { key: 'Enter', isComposing: true }) + await expect(page.getByRole('dialog')).toBeVisible() + await expect(page).toHaveURL(new URL('/introduction', target).href) + await search.press('ArrowDown') + await search.press('Enter') + await expect(page).not.toHaveURL(new URL('/introduction', target).href) + await page + .getByRole('button', { name: /^(Search documentation|Search docs)$/, exact: true }) + .click() + await search.fill('zzzz-no-such-content-zzzz') + await expect(page.getByRole('status')).toContainText('No results') + await page.route('**/api/search?*', (route) => route.fulfill({ status: 503, body: '{}' })) + await search.fill('failure-case') + await expect(page.getByRole('status')).toContainText('Search is unavailable') + await page.unroute('**/api/search?*') + await page.getByRole('button', { name: 'Try again', exact: true }).click() + await expect(page.getByRole('status')).toContainText('No results') + await search.press('Escape') + await expect( + page.getByRole('button', { name: /^(Search documentation|Search docs)$/, exact: true }) + ).toBeFocused() + } finally { + await page.close() + } } ) await check('A stalled search request stops searching and offers a retry', async () => { @@ -1876,7 +1898,7 @@ try { .getByRole('button', { name: /^(Search documentation|Search docs)$/, exact: true }) .click() const search = page.getByRole('combobox', { name: 'Search documentation' }) - await search.fill('Slack') + await searchFor(page, 'Slack') await expect(page.getByRole('option').first()).toBeVisible() await page.screenshot({ path: join(directory, 'mobile-search-results.png') }) if (interactionRecording.video) await sleep(600) @@ -2005,7 +2027,7 @@ try { await page.keyboard.press('Control+k') const search = page.getByRole('combobox', { name: 'Search documentation' }) await expect(search).toBeFocused() - await search.fill('Slack') + await searchFor(page, 'Slack') await expect(page.getByRole('option').first()).toBeVisible() await page.screenshot({ path: join(directory, 'cloudflare-mobile-search.png') }) await search.press('Escape') diff --git a/package.json b/package.json index c47de135725..a528cda30a3 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,8 @@ "check:agent-stream-docs": "bun run scripts/sync-agent-stream-docs.ts --check", "prepare": "bun husky", "test:workflow-sync": "bun --no-env-file scripts/test-integration.ts lib/workspaces/__integration__", - "type-check": "turbo run type-check", + "type-check": "bun run type-check:scripts:esm && turbo run type-check", + "type-check:scripts:esm": "tsc --project scripts/tsconfig.mts.json", "release": "bun run scripts/create-single-release.ts", "test:scripts": "vitest run --config scripts/vitest.config.ts", "check:agent-cli-boundary": "bun run scripts/check-agent-cli-boundary.ts" diff --git a/scripts/tsconfig.json b/scripts/tsconfig.json index 46670083b22..92d8535074e 100644 --- a/scripts/tsconfig.json +++ b/scripts/tsconfig.json @@ -20,5 +20,5 @@ "esm": true, "experimentalSpecifierResolution": "node" }, - "include": ["./**/*.ts", "./**/*.tsx"] + "include": ["./**/*.ts", "./**/*.tsx", "./**/*.mts"] } diff --git a/scripts/tsconfig.mts.json b/scripts/tsconfig.mts.json new file mode 100644 index 00000000000..6f883cd1160 --- /dev/null +++ b/scripts/tsconfig.mts.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "types": ["node"] + }, + "include": ["./**/*.mts"] +} From 41b11cd4f8acc6e5b8d4bc97e2dc3bb9197750ed Mon Sep 17 00:00:00 2001 From: Waleed Date: Tue, 17 Nov 2026 10:56:31 -0800 Subject: [PATCH 12/12] fix(gitlab): scale group discovery and permission-aware search (#10138) * fix(gitlab): scale group discovery and permission-aware search * fix(gitlab): validate combined permission uploads before saving * fix(gitlab): clarify byte limits and use browser file fixtures --- apps/docs/content/docs/search/gitlab.mdx | 16 +- apps/docs/openapi-v2-resources.json | 8 +- .../examples/gitlab/export-permissions.py | 107 ++++--- .../scripts/fixtures/content-baseline.json | 4 +- apps/docs/scripts/test-gitlab-export-e2e.py | 66 +++++ apps/sim/connectors/gitlab/group.ts | 6 +- apps/sim/connectors/gitlab/meta.ts | 3 +- .../gitlab/permission-config/fields.tsx | 7 +- .../gitlab/permission-config/parser.test.ts | 18 +- .../gitlab/permission-config/parser.ts | 4 +- .../gitlab/permission-config/repository.ts | 18 +- .../gitlab/permission-config/request-size.ts | 7 + .../gitlab/permission-config/types.ts | 4 +- .../use-permission-form.test.ts | 48 +++ .../permission-config/use-permission-form.ts | 11 +- apps/sim/connectors/gitlab/permissions.ts | 118 +++++--- apps/sim/hooks/queries/kb/connectors.ts | 13 +- .../contracts/knowledge/gitlab-permissions.ts | 7 +- .../api/contracts/v2/openapi/organizations.ts | 2 +- .../lib/api/mcp/generated/v2-operations.ts | 2 +- .../gitlab-group.integration.ts | 258 ++++++++++++++++- .../knowledge/connectors/permission-store.ts | 15 +- apps/sim/lib/sim-search/live/gitlab-admin.ts | 273 ++++++++++++++++-- apps/sim/lib/sim-search/live/gitlab.ts | 61 ++-- apps/sim/lib/sim-search/live/providers.ts | 2 +- scripts/check-explicit-any.baseline.json | 2 +- scripts/check-unused-exports.baseline.json | 2 - 27 files changed, 893 insertions(+), 189 deletions(-) create mode 100644 apps/sim/connectors/gitlab/permission-config/request-size.ts create mode 100644 apps/sim/connectors/gitlab/permission-config/use-permission-form.test.ts diff --git a/apps/docs/content/docs/search/gitlab.mdx b/apps/docs/content/docs/search/gitlab.mdx index 0556c5cb8c5..d6a543c57a8 100644 --- a/apps/docs/content/docs/search/gitlab.mdx +++ b/apps/docs/content/docs/search/gitlab.mdx @@ -45,13 +45,17 @@ Sim checks returned content against these restrictions independently of the quer ## Add a group -Choose **Group** in the source's **Scope** field and enter the numeric group ID or full group path. Enable **Include subgroups** only if descendant projects should be included. Sim supports groups with at most 1,000 projects visible to the source token; larger groups need narrower sources. Projects shared from outside the group are excluded. +Choose **Group** in the source's **Scope** field and enter the numeric group ID or full group path. Enable **Include subgroups** only if descendant projects should be included. Sim supports up to **50,000 projects** visible to the source token, subject to the CSV limits below and a 16 MiB limit for saved project IDs and paths. Projects shared from outside the group are excluded. + +Discovery reads 100 projects per page and must finish within five minutes. GitLab's configured offset and rate limits still apply; choose narrower groups if the instance cannot return the complete listing within these limits. Sim also handles listings without total-count headers, which GitLab can omit above 10,000 results. The same permission strategies apply. Group membership alone never grants access to every project: administrator mode checks each project's current permissions, and non-admin mode requires a CSV grant for each project and reader. The source token must be able to read every project you want to search. In CSV mode, each successful upload rediscovers the group's projects and replaces all grants atomically. Newly discovered projects become searchable only for users explicitly listed in the uploaded CSV. Updating and saving source settings also refreshes discovery. A failed discovery or stale revision preserves the previous configuration and grants. If a group configured by path is renamed, save the new path and an updated project-permissions CSV together in source settings. Numeric group IDs remain valid across renames. -Search visits project pages within a bounded request budget. Continuation cursors cover remaining projects and results; targeting a project narrows the request. Renamed or moved projects are blocked until a successful refresh; projects outside the configured group remain excluded. Group setup uses the existing project search APIs, so it does not require group-wide advanced search. +In CSV mode, search uses GitLab's group search API and checks each result against the saved projects and reader grants. Group code search requires Advanced Search or Exact Code Search; group wiki search requires Advanced Search. Unsupported scopes fall back to project search. A configured branch/tag, date filters, or administrator-token mode also use project search where needed. Each request visits a bounded number of pages; continuation cursors cover the remainder. Targeting a project narrows the request. + +Group search stops at 10,000 candidates per content type to respect GitLab's Advanced Search window. Sim marks this as partial and asks you to narrow the query or target a project. This candidate limit applies before permission filtering. Renamed or moved projects are blocked until a successful refresh; projects outside the configured group remain excluded. See GitLab's [search capabilities and pagination limits](https://docs.gitlab.com/api/search/). To expand an existing deployment, create a **separate group source** after the application deployment finishes. Keep the working project source and its CI variables unchanged while validating the group. Give the group job its new `SIM_SOURCE_ID`, then pause the old source after confirming the wider setup. Regular knowledge-base ingestion remains project-scoped. @@ -78,7 +82,7 @@ engineering/platform,456 Use the full namespace path even if **Project** contains a numeric ID. Include inherited members explicitly. A grant without an email mapping grants nothing; rows for other projects cannot expand this source. - Each file has exactly two columns in the shown order and at least one data row. Template headers or headerless data are accepted. -- Use UTF-8 CSV, at most 4 MiB and 100,000 data rows per file. The full request must fit 10 MiB. +- Use UTF-8 CSV, at most **8 MiB and 500,000 data rows per file**. The complete JSON upload, including escaped CSV content, must fit **10 MiB**. These are independent limits; split large deployments into narrower sources when either is reached. - Identical rows are deduplicated. Conflicting user-ID/email mappings and malformed rows are rejected. In this example, Alice can search `engineering/platform` because the files link GitLab user `123` to both that project and `alice@example.com`. Sim checks that Alice is a current organization member and that her verified Sim email uniquely matches the grant. It checks again when she opens a result. GitLab receives the request under the source's read-only service account; Alice does not sign in to GitLab or authorize Sim individually. @@ -120,6 +124,8 @@ The export includes active, unlocked human members with Reporter access or highe Requests run serially, paced at 60 per minute by default. Set `--requests-per-minute` to change this export-job ceiling; it does not configure live Search traffic. Each run reads each project's identity and membership pages, plus one profile request per distinct candidate reader. Group exports also read the group identity and project listing. The request ceiling applies across the entire export. API errors, hidden emails, identity conflicts, inconsistent pagination totals (when GitLab provides them), and oversized exports stop the job without publishing either file. Run exports after bulk membership updates finish; paginated API reads are not a point-in-time snapshot. +Large exports can take hours. For example, 50,000 projects require at least 100,000 project and membership requests, before listing and profile requests: over 27 hours at the default ceiling. Set the CI job timeout and schedule accordingly, or use smaller groups. Agree any higher request rate with your GitLab administrator. CSV files are written incrementally and published only when the complete export succeeds. + ## Access checks The source token retrieves content. Administrator mode proves the reader's current GitLab identity from verified Sim email, then checks project/group membership and policy during the request. Unsupported restrictions fail closed. @@ -169,6 +175,10 @@ sync_gitlab_permissions: '{expectedRevision: $rev, permissions: {provider: "gitlab", userMapping: {filename: "users.csv", content: $users}, projectPermissions: {filename: "project-permissions.csv", content: $grants}}}' > "$export_root/update.json" + if [ "$(wc -c < "$export_root/update.json")" -gt 10485760 ]; then + echo "Permission upload exceeds 10 MiB; use a narrower source." >&2 + exit 1 + fi curl --fail --silent --show-error --request PUT -H "$auth" \ -H 'Content-Type: application/json' --data-binary "@$export_root/update.json" "$url" ``` diff --git a/apps/docs/openapi-v2-resources.json b/apps/docs/openapi-v2-resources.json index 5350eac6cd8..7a563ca1c80 100644 --- a/apps/docs/openapi-v2-resources.json +++ b/apps/docs/openapi-v2-resources.json @@ -10233,7 +10233,7 @@ "put": { "operationId": "replaceSearchSourcePermissions", "summary": "Replace Search source permissions", - "description": "Replace the complete permission grants for one Search source. Requires organization Admin access. Supply the current revision and the grants for the configured provider. A stale revision returns 409. GitLab CSV mode accepts both files together, up to 4 MiB and 100,000 data rows each. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "description": "Replace the complete permission grants for one Search source. Requires organization Admin access. Supply the current revision and the grants for the configured provider. A stale revision returns 409. GitLab CSV mode accepts both files together, up to 8 MiB and 500,000 data rows each, within a 10 MiB limit for the complete JSON-encoded request. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", "x-sim-operation": "knowledge.search.source_permissions.replace", "x-oauth-scope": "api:write", "tags": ["Organizations"], @@ -24566,8 +24566,7 @@ "content": { "type": "string", "minLength": 1, - "maxLength": 4194304, - "description": "UTF-8 CSV contents, up to 4 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding." + "description": "UTF-8 CSV contents, up to 8 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding." } }, "required": ["filename", "content"], @@ -24586,8 +24585,7 @@ "content": { "type": "string", "minLength": 1, - "maxLength": 4194304, - "description": "UTF-8 CSV contents, up to 4 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding." + "description": "UTF-8 CSV contents, up to 8 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding." } }, "required": ["filename", "content"], diff --git a/apps/docs/public/static/examples/gitlab/export-permissions.py b/apps/docs/public/static/examples/gitlab/export-permissions.py index 5f37b73b512..0fcdad3a0a5 100644 --- a/apps/docs/public/static/examples/gitlab/export-permissions.py +++ b/apps/docs/public/static/examples/gitlab/export-permissions.py @@ -18,9 +18,9 @@ from urllib.request import HTTPRedirectHandler, HTTPSHandler, Request, build_opener -MAX_BYTES = 4 * 1024 * 1024 -MAX_ROWS = 100_000 -MAX_PROJECTS = 1000 +MAX_BYTES = 8 * 1024 * 1024 +MAX_ROWS = 500_000 +MAX_PROJECTS = 50_000 EMAIL = re.compile( r"[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@" r"[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?" @@ -134,7 +134,7 @@ def export(client, project, profiles): today = datetime.now(timezone.utc).date() page = 1 expected_total = None - while page <= 1000: + while page <= MAX_ROWS // 100 + 1: members, headers = client.get(f"projects/{project_id}/members/all", {"per_page": 100, "page": page}) if not isinstance(members, list) or len(members) > 100: @@ -142,7 +142,7 @@ def export(client, project, profiles): total = headers.get("X-Total") if total is not None: if not re.fullmatch(r"[0-9]{1,6}", total) or int(total) > MAX_ROWS: - raise ExportError("GitLab membership total is invalid or exceeds the 100,000-row limit.") + raise ExportError("GitLab membership total is invalid or exceeds the 500,000-row limit.") if expected_total is not None and int(total) != expected_total: raise ExportError("GitLab membership total changed during pagination. Rerun the export.") expected_total = int(total) @@ -154,7 +154,7 @@ def export(client, project, profiles): raise ExportError("GitLab membership pagination repeated a user. Rerun the export.") seen_members.add(user_id) if len(seen_members) > MAX_ROWS: - raise ExportError("Project membership exceeds the 100,000-row limit.") + raise ExportError("Project membership exceeds the 500,000-row limit.") role = member.get("access_level") if type(role) is not int: raise ExportError("GitLab returned a membership without an access level.") @@ -172,7 +172,7 @@ def export(client, project, profiles): profile, _ = client.get(f"users/{user_id}") profiles[user_id] = verified_email(profile, user_id) if len(profiles) > MAX_ROWS: - raise ExportError("Group identities exceed the 100,000-row limit.") + raise ExportError("Group identities exceed the 500,000-row limit.") email = profiles[user_id] if email is None: continue @@ -189,7 +189,7 @@ def export(client, project, profiles): raise ExportError("GitLab returned invalid membership pagination.") page = int(next_page) else: - raise ExportError("GitLab membership pagination exceeds 1,000 pages.") + raise ExportError("GitLab membership pagination exceeds its limit.") if expected_total is not None and len(seen_members) != expected_total: raise ExportError("Exported membership count does not match GitLab's total. Rerun the export.") return project_path, users @@ -201,21 +201,22 @@ def group_projects(client, group, include_subgroups): raise ExportError("GitLab returned an invalid group.") group_id = identifier(record.get("id")) path = record.get("full_path") - if not isinstance(path, str) or not path: + if not isinstance(path, str) or not path or len(path) > 1024: raise ExportError("GitLab did not return the group path.") projects, seen_ids, seen_paths = [], set(), set() expected_total = None + manifest_bytes = 2 for page in range(1, MAX_PROJECTS // 100 + 2): rows, headers = client.get(f"groups/{group_id}/projects", { "with_shared": "false", "include_subgroups": str(include_subgroups).lower(), - "per_page": 100, "page": page, "order_by": "id", "sort": "asc", + "per_page": 100, "page": page, "order_by": "id", "sort": "asc", "simple": "true", }) if not isinstance(rows, list) or len(rows) > 100: raise ExportError("GitLab returned an invalid group project page.") total = headers.get("X-Total") if total is not None: if not re.fullmatch(r"[0-9]{1,6}", total) or int(total) > MAX_PROJECTS: - raise ExportError("GitLab group exceeds the 1,000-project limit.") + raise ExportError("GitLab group total is invalid or exceeds the 50,000-project limit.") if expected_total is not None and expected_total != int(total): raise ExportError("GitLab group project total changed during export.") expected_total = int(total) @@ -224,6 +225,8 @@ def group_projects(client, group, include_subgroups): raise ExportError("GitLab returned an invalid group project.") project_id = identifier(row.get("id")) project_path = row.get("path_with_namespace") + if not isinstance(project_path, str) or len(project_path) > 1024: + raise ExportError("GitLab returned an invalid project path.") namespace = project_path.rpartition("/")[0] if isinstance(project_path, str) else "" if not (namespace == path or (include_subgroups and namespace.startswith(path + "/"))): raise ExportError("GitLab returned a project outside the configured group.") @@ -233,7 +236,11 @@ def group_projects(client, group, include_subgroups): seen_paths.add(project_path) projects.append((project_id, project_path)) if len(projects) > MAX_PROJECTS: - raise ExportError("GitLab group exceeds the 1,000-project limit.") + raise ExportError("GitLab group exceeds the 50,000-project limit.") + manifest_bytes += len(json.dumps({"id": project_id, "path": project_path}, + ensure_ascii=False, separators=(",", ":")).encode()) + 1 + if manifest_bytes > 16 * 1024 * 1024: + raise ExportError("GitLab group project listing exceeds 16 MiB. Choose a narrower group.") next_page = headers.get("X-Next-Page") if next_page is None: next_page = str(page + 1) if len(rows) == 100 else "" @@ -251,27 +258,39 @@ def group_projects(client, group, include_subgroups): def write_export(output, grants, users): - files = {} - ordered = sorted(users) - for name, header, rows in [ - ("users.csv", ["user_id", "email"], [(user_id, users[user_id]) for user_id in ordered]), - ("project-permissions.csv", ["project_path", "user_id"], - sorted(grants)), - ]: - buffer = io.StringIO(newline="") - writer = csv.writer(buffer, lineterminator="\n") - writer.writerow(header) - writer.writerows(rows) - files[name] = buffer.getvalue().encode("utf-8") - if len(files[name]) > MAX_BYTES: - raise ExportError(f"{name} exceeds Sim's 4 MiB CSV limit.") + def user_rows(): + for user_id in sorted(users): + yield user_id, users[user_id] + output.parent.mkdir(parents=True, exist_ok=True) # Publish the pair together, so an interrupted export cannot mix new and old CSVs. with tempfile.TemporaryDirectory(dir=output.parent, prefix=".gitlab-export-") as temporary: - for name, content in files.items(): + for name, header, rows in [ + ("project-permissions.csv", ["project_path", "user_id"], grants), + ("users.csv", ["user_id", "email"], user_rows()), + ]: path = Path(temporary) / name - path.write_bytes(content) + buffer = io.StringIO(newline="") + writer = csv.writer(buffer, lineterminator="\n") + writer.writerow(header) + size = 0 + with path.open("wb") as handle: + handle.write(buffer.getvalue().encode("utf-8")) + size = handle.tell() + for count, row in enumerate(rows, 1): + if count > MAX_ROWS: + raise ExportError(f"{name} exceeds Sim's 500,000-row limit.") + buffer.seek(0) + buffer.truncate() + writer.writerow(row) + content = buffer.getvalue().encode("utf-8") + size += len(content) + if size > MAX_BYTES: + raise ExportError(f"{name} exceeds Sim's 8 MiB CSV limit.") + handle.write(content) path.chmod(0o600) + if not users: + raise ExportError("No eligible readers. Pause search in Sim; empty CSVs cannot revoke all grants.") os.rename(temporary, output) @@ -297,22 +316,22 @@ def main(): raise ExportError("Output directory already exists. Choose a new directory for a fresh export.") client = GitLab(args.gitlab_url, token, args.requests_per_minute) projects = group_projects(client, args.group, args.include_subgroups) if args.group else [(args.project, None)] - profiles, users, emails, grants = {}, {}, {}, [] - for project_id, expected_path in projects: - project_path, readers = export(client, str(project_id), profiles) - if expected_path is not None and expected_path != project_path: - raise ExportError("GitLab project identity changed during export. Rerun the export.") - for user_id, email in readers.items(): - if email in emails and emails[email] != user_id: - raise ExportError("Multiple GitLab users share an email. Resolve the identity conflict first.") - emails[email] = user_id - users[user_id] = email - grants.append((project_path, user_id)) - if len(grants) > MAX_ROWS: - raise ExportError("Project permissions exceed the 100,000-row limit.") - if not users: - raise ExportError("No eligible readers. Pause search in Sim; empty CSVs cannot revoke all grants.") - write_export(output, grants, users) + profiles, users, emails = {}, {}, {} + + def grants(): + for project_id, expected_path in projects: + project_path, readers = export(client, str(project_id), profiles) + if expected_path is not None and expected_path != project_path: + raise ExportError("GitLab project identity changed during export. Rerun the export.") + for user_id in sorted(readers): + email = readers[user_id] + if email in emails and emails[email] != user_id: + raise ExportError("Multiple GitLab users share an email. Resolve the identity conflict first.") + emails[email] = user_id + users[user_id] = email + yield project_path, user_id + + write_export(output, grants(), users) print(f"Exported {len(users)} readers to {output}/users.csv and {output}/project-permissions.csv") diff --git a/apps/docs/scripts/fixtures/content-baseline.json b/apps/docs/scripts/fixtures/content-baseline.json index 94fc142889d..ff931c8453c 100644 --- a/apps/docs/scripts/fixtures/content-baseline.json +++ b/apps/docs/scripts/fixtures/content-baseline.json @@ -177236,8 +177236,8 @@ { "lang": "yaml", "meta": "title=\".gitlab-ci.yml\"", - "sha256": "29261e0a66aac3cf52e7b9164aaa44f235765bcfd2cae4e68d744d31b29b57bf", - "bytes": 1441, + "sha256": "95f1b2ec16f400d5e0ebe5cd67ae2b9f6476f2c86696a54f9a983b2b8d02a5c7", + "bytes": 1613, "line": 129 }, { diff --git a/apps/docs/scripts/test-gitlab-export-e2e.py b/apps/docs/scripts/test-gitlab-export-e2e.py index 55a85aa4aca..8c4765147d8 100644 --- a/apps/docs/scripts/test-gitlab-export-e2e.py +++ b/apps/docs/scripts/test-gitlab-export-e2e.py @@ -6,6 +6,7 @@ import json import os from pathlib import Path +import runpy import ssl import subprocess import sys @@ -50,6 +51,14 @@ def do_GET(self): query = parse_qs(parsed.query) assert query.get("with_shared") == ["false"] assert query.get("include_subgroups") == ["true" if scenario == "group-subgroups" else "false"] + if scenario in ("group-large", "group-too-large"): + if scenario == "group-too-large": + self.reply(200, [], {"X-Total": "50001"}) + else: + page = int(query.get("page", ["1"])[0]) + self.reply(200, [{"id": index, "path_with_namespace": f"engineering/project-{index}"} + for index in range(10000 + (page - 1) * 100, min(11200, 10000 + page * 100))]) + return projects = [{"id": 91, "path_with_namespace": "engineering/platform"}] if query.get("page", ["1"]) == ["1"]: self.reply(200, projects, {"X-Next-Page": "2", "X-Total": "2"}) @@ -75,6 +84,13 @@ def do_GET(self): members = [] self.reply(200, members, {"X-Next-Page": "", "X-Total": str(len(members))}) return + if scenario == "group-large" and endpoint.startswith("projects/"): + project_id = int(endpoint.split("/")[1]) + if endpoint.endswith("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/members/all"): + self.reply(200, [member(1)] if project_id == 11199 else []) + else: + self.reply(200, {"id": project_id, "path_with_namespace": f"engineering/project-{project_id}"}) + return if endpoint in ("projects/engineering%2Fplatform", "projects/91"): if scenario == "redirect": self.reply(302, {}, {"Location": "/redirect/api/v4/trap"}) @@ -274,6 +290,56 @@ def run(): assert TOKEN not in result.stdout + result.stderr assert len(GitLabFixture.calls) == calls, "Sent a token for an invalid group identifier" report["checks"].append({"name": "invalid-group-identifiers", "passed": True}) + for scenario in ("group-large", "group-too-large"): + output = root / scenario + result = subprocess.run([ + sys.executable, str(SCRIPT), "--gitlab-url", + f"https://127.0.0.1:{server.server_port}/{scenario}", "--group", "engineering", + "--output-dir", str(output), "--requests-per-minute", "600000", + ], capture_output=True, text=True, timeout=60, + env={**os.environ, "GITLAB_EXPORT_TOKEN": TOKEN, "SSL_CERT_FILE": str(cert)}) + if scenario == "group-too-large": + assert result.returncode != 0 and not output.exists(), result.stderr + assert "50,000-project limit" in result.stderr, result.stderr + else: + assert result.returncode == 0, result.stderr + with (output / "project-permissions.csv").open() as handle: + assert list(csv.reader(handle)) == [ + ["project_path", "user_id"], ["engineering/project-11199", "1"]] + with (output / "users.csv").open() as handle: + assert list(csv.reader(handle)) == [["user_id", "email"], ["1", "alice@example.com"]] + report["checks"].append({"name": scenario, "passed": True}) + exporter = runpy.run_path(str(SCRIPT)) + output = root / "large-csv" + exporter["write_export"](output, + ((f"engineering/project-{index:06d}-permissions", 1) for index in range(150000)), + {1: "alice@example.com"}) + assert (output / "project-permissions.csv").stat().st_size > 4 * 1024 * 1024 + with (output / "project-permissions.csv").open() as handle: + rows = csv.reader(handle) + assert next(rows) == ["project_path", "user_id"] + assert sum(1 for _ in rows) == 150000 + report["checks"].append({"name": "large-csv", "passed": True}) + for scenario, grants in ( + ("csv-row-bound", (("a/b", 1) for _ in range(500001))), + ("csv-byte-bound", (("a/" + "b" * 1000, 1) for _ in range(9000))), + ("csv-partial-failure", None), + ): + if scenario == "csv-partial-failure": + def interrupted_grants(): + yield ("a/b", 1) + raise exporter["ExportError"]("Provider failed after the first grant") + grants = interrupted_grants() + output = root / scenario + try: + exporter["write_export"](output, grants, {1: "alice@example.com"}) + raise AssertionError(f"{scenario}: export unexpectedly succeeded") + except exporter["ExportError"] as error: + expected = {"csv-row-bound": "500,000-row limit", "csv-byte-bound": "8 MiB CSV limit", + "csv-partial-failure": "Provider failed after the first grant"}[scenario] + assert expected in str(error), str(error) + assert not output.exists(), "Published an incomplete CSV pair" + report["checks"].append({"name": scenario, "passed": True}) assert not any(endpoint == "trap" for _, endpoint, _, _ in GitLabFixture.calls) report["passed"] = True finally: diff --git a/apps/sim/connectors/gitlab/group.ts b/apps/sim/connectors/gitlab/group.ts index fe68a81f0ca..760500d2b5b 100644 --- a/apps/sim/connectors/gitlab/group.ts +++ b/apps/sim/connectors/gitlab/group.ts @@ -1,17 +1,17 @@ import { z } from 'zod' import { encodeGitLabResourceId, normalizeGitLabHost } from '@/tools/gitlab/utils' -export const GITLAB_GROUP_MAX_PROJECTS = 1000 +export const GITLAB_GROUP_MAX_PROJECTS = 50_000 export const gitLabGroupScopeSchema = z.object({ host: z.string().min(1), group: z.object({ id: z.number().int().positive(), - path: z.string().min(1), + path: z.string().min(1).max(1024), includeSubgroups: z.boolean(), }), projects: z - .array(z.object({ id: z.number().int().positive(), path: z.string().min(1) })) + .array(z.object({ id: z.number().int().positive(), path: z.string().min(1).max(1024) })) .min(1) .max(GITLAB_GROUP_MAX_PROJECTS), }) diff --git a/apps/sim/connectors/gitlab/meta.ts b/apps/sim/connectors/gitlab/meta.ts index a124fe79411..6933fab0522 100644 --- a/apps/sim/connectors/gitlab/meta.ts +++ b/apps/sim/connectors/gitlab/meta.ts @@ -58,7 +58,8 @@ export const gitlabConnectorMeta: ConnectorMeta = { required: true, condition: { field: 'scope', value: 'group' }, placeholder: 'group/subgroup or numeric ID', - description: 'Up to 1,000 projects. Shared projects are excluded.', + description: + 'Up to 50,000 projects, subject to CSV size limits. Shared projects are excluded.', }, { id: 'includeSubgroups', diff --git a/apps/sim/connectors/gitlab/permission-config/fields.tsx b/apps/sim/connectors/gitlab/permission-config/fields.tsx index 3c4c17f9336..b18ee20964e 100644 --- a/apps/sim/connectors/gitlab/permission-config/fields.tsx +++ b/apps/sim/connectors/gitlab/permission-config/fields.tsx @@ -88,9 +88,12 @@ function GitLabCsvFile({ kind, form, disabled }: GitLabCsvFileProps) { disabled={disabled} loading={selected?.loading} label={selected?.loading ? 'Validating…' : (filename ?? 'Drop CSV or click to upload')} - error={selected?.error} + error={selected?.error ?? (kind === 'projectPermissions' ? form.uploadError : undefined)} description={ - filename && count !== undefined && !selected?.loading + filename && + count !== undefined && + !selected?.loading && + !(selected?.upload && form.uploadError) ? `${count.toLocaleString()} ${count === 1 ? 'row' : 'rows'} · ${selected?.upload ? 'Ready to save' : 'Saved'}` : undefined } diff --git a/apps/sim/connectors/gitlab/permission-config/parser.test.ts b/apps/sim/connectors/gitlab/permission-config/parser.test.ts index dec2a016302..0386fc79c8b 100644 --- a/apps/sim/connectors/gitlab/permission-config/parser.test.ts +++ b/apps/sim/connectors/gitlab/permission-config/parser.test.ts @@ -61,18 +61,18 @@ describe('GitLab CSV permission uploads', () => { { filename: 'users.csv', content: '😀'.repeat(GITLAB_CSV_MAX_BYTES / 4 + 1) }, 'userMapping' ) - ).toThrow('4 MiB') + ).toThrow('8 MiB') }) - it('accepts 100,000 rows and rejects the next row', () => { - const content = Array.from({ length: 100_000 }, (_, i) => `${i + 1},u${i}@example.com`).join( - '\n' - ) - expect(parseGitLabCsv({ filename: 'users.csv', content }, 'userMapping')).toHaveLength(100_000) + it('accepts 500,000 rows and rejects the next row', () => { + const content = Array.from({ length: 500_000 }, (_, i) => `a/b,${i + 1}`).join('\n') + expect( + parseGitLabCsv({ filename: 'projects.csv', content }, 'projectPermissions') + ).toHaveLength(500_000) expect(() => parseGitLabCsv( - { filename: 'users.csv', content: `${content}\n100001,last@example.com` }, - 'userMapping' + { filename: 'projects.csv', content: `${content}\na/b,500001` }, + 'projectPermissions' ) - ).toThrow('100,000') + ).toThrow('500,000') }) }) diff --git a/apps/sim/connectors/gitlab/permission-config/parser.ts b/apps/sim/connectors/gitlab/permission-config/parser.ts index e5d13e02529..5de1b8c3b6a 100644 --- a/apps/sim/connectors/gitlab/permission-config/parser.ts +++ b/apps/sim/connectors/gitlab/permission-config/parser.ts @@ -37,7 +37,7 @@ export function parseGitLabCsv(upload: GitLabCsvUpload, kind: GitLabCsvKind): [s reject('Use a filename of 1–255 characters without path separators.') } if (new TextEncoder().encode(upload.content).byteLength > GITLAB_CSV_MAX_BYTES) { - reject('The file must be 4 MiB or smaller.') + reject('The file must be 8 MiB or smaller.') } const rows: [string, string][] = [] const seen = new Set() @@ -60,7 +60,7 @@ export function parseGitLabCsv(upload: GitLabCsvUpload, kind: GitLabCsvKind): [s if (record[0] === HEADERS[kind][0] && record[1] === HEADERS[kind][1]) return null } recordCount++ - if (recordCount > GITLAB_CSV_MAX_ROWS) reject('The file must contain at most 100,000 rows.') + if (recordCount > GITLAB_CSV_MAX_ROWS) reject('The file must contain at most 500,000 rows.') const id = kind === 'userMapping' ? record[0] : record[1] if (!USER_ID.test(id) || !Number.isSafeInteger(Number(id))) { reject(`Row ending at line ${line} has an invalid user_id; use a positive integer.`) diff --git a/apps/sim/connectors/gitlab/permission-config/repository.ts b/apps/sim/connectors/gitlab/permission-config/repository.ts index 817d2e99999..7e1de7ced50 100644 --- a/apps/sim/connectors/gitlab/permission-config/repository.ts +++ b/apps/sim/connectors/gitlab/permission-config/repository.ts @@ -51,13 +51,17 @@ export function readGitLabPermissionMetadata(value: unknown) { const parsed = metadataSchema.safeParse(value) if (!parsed.success) return invalidSnapshot() const result = parsed.data + validateSummaries(result) + return result +} + +function validateSummaries(result: Omit) { if ( result.mode === 'csv' ? !result.userMapping || !result.projectPermissions : result.userMapping !== null || result.projectPermissions !== null ) return invalidSnapshot() - return result } /** Validate stored tuples without allocating another copy of a large CSV snapshot. */ @@ -230,9 +234,15 @@ export async function readGitLabPermissionSummaries( connectorIds: readonly string[] ): Promise> { const result = new Map() - for (const row of await readConnectorPermissionMetadata(connectorIds)) { - const { mode, userMapping, projectPermissions } = readGitLabPermissionMetadata(row.metadata) - result.set(row.connectorId, { mode, revision: row.revision, userMapping, projectPermissions }) + for (const row of await readConnectorPermissionMetadata(connectorIds, [ + 'mode', + 'userMapping', + 'projectPermissions', + ])) { + const parsed = summarySchema.safeParse(row.metadata) + if (!parsed.success) return invalidSnapshot() + validateSummaries(parsed.data) + result.set(row.connectorId, { ...parsed.data, revision: row.revision }) } return result } diff --git a/apps/sim/connectors/gitlab/permission-config/request-size.ts b/apps/sim/connectors/gitlab/permission-config/request-size.ts new file mode 100644 index 00000000000..0ab28ec8e64 --- /dev/null +++ b/apps/sim/connectors/gitlab/permission-config/request-size.ts @@ -0,0 +1,7 @@ +const MAX_UPLOAD_BODY_BYTES = 10 * 1024 * 1024 + +/** Check encoded CSV content and its request envelope against the proxy's JSON body ceiling. */ +export function getGitLabUploadSizeError(body: unknown): string | undefined { + if (new TextEncoder().encode(JSON.stringify(body)).byteLength > MAX_UPLOAD_BODY_BYTES) + return 'The complete upload must be 10 MiB or smaller. Use smaller CSV files or a narrower group.' +} diff --git a/apps/sim/connectors/gitlab/permission-config/types.ts b/apps/sim/connectors/gitlab/permission-config/types.ts index 0ae990937c7..34904d1bb2f 100644 --- a/apps/sim/connectors/gitlab/permission-config/types.ts +++ b/apps/sim/connectors/gitlab/permission-config/types.ts @@ -1,7 +1,7 @@ import { connectorPermissionGroupToken } from '@/lib/knowledge/connectors/permission-tokens' -export const GITLAB_CSV_MAX_BYTES = 4 * 1024 * 1024 -export const GITLAB_CSV_MAX_ROWS = 100_000 +export const GITLAB_CSV_MAX_BYTES = 8 * 1024 * 1024 +export const GITLAB_CSV_MAX_ROWS = 500_000 export const GITLAB_PERMISSION_MODES = ['administrator', 'csv'] as const export type GitLabPermissionMode = (typeof GITLAB_PERMISSION_MODES)[number] diff --git a/apps/sim/connectors/gitlab/permission-config/use-permission-form.test.ts b/apps/sim/connectors/gitlab/permission-config/use-permission-form.test.ts new file mode 100644 index 00000000000..3f0144f071c --- /dev/null +++ b/apps/sim/connectors/gitlab/permission-config/use-permission-form.test.ts @@ -0,0 +1,48 @@ +/** @vitest-environment jsdom */ +import { act, createElement } from 'react' +import { createRoot } from 'react-dom/client' +import { describe, expect, it, vi } from 'vitest' +import { useGitLabPermissionForm } from '@/connectors/gitlab/permission-config/use-permission-form' + +describe('GitLab permission file selection', () => { + it('blocks an oversized combined upload and recovers when a file is replaced', async () => { + vi.stubGlobal('IS_REACT_ACT_ENVIRONMENT', true) + const root = createRoot(document.createElement('div')) + let form: ReturnType | undefined + function Probe() { + form = useGitLabPermissionForm() + return null + } + const current = () => { + if (!form) throw new Error('Permission form was not mounted') + return form + } + act(() => root.render(createElement(Probe))) + const csv = (content: string, filename: string) => + Object.assign(new File([content], filename), { + arrayBuffer: async () => new TextEncoder().encode(content).buffer, + }) + try { + act(() => current().setMode('csv')) + const users = csv('1,a@example.test\n'.repeat(300_000), 'users.csv') + const grants = csv('group/p,1\n'.repeat(490_000), 'projects.csv') + expect(users.size + grants.size).toBeLessThan(10 * 1024 * 1024) + await act(async () => { + await current().selectFile('userMapping', users) + await current().selectFile('projectPermissions', grants) + }) + expect(current().files.userMapping?.error).toBeUndefined() + expect(current().files.projectPermissions?.error).toBeUndefined() + expect(current().complete).toBe(false) + await act(async () => { + await current().selectFile('projectPermissions', csv('group/project,1', 'projects.csv')) + }) + expect(current().complete).toBe(true) + act(() => current().reset()) + expect(current().files).toEqual({}) + } finally { + act(() => root.unmount()) + vi.unstubAllGlobals() + } + }) +}) diff --git a/apps/sim/connectors/gitlab/permission-config/use-permission-form.ts b/apps/sim/connectors/gitlab/permission-config/use-permission-form.ts index 60437b22259..2299af56735 100644 --- a/apps/sim/connectors/gitlab/permission-config/use-permission-form.ts +++ b/apps/sim/connectors/gitlab/permission-config/use-permission-form.ts @@ -7,6 +7,7 @@ import type { GitLabPermissionUploadInput, } from '@/lib/api/contracts/knowledge/gitlab-permissions' import { parseGitLabCsv } from '@/connectors/gitlab/permission-config/parser' +import { getGitLabUploadSizeError } from '@/connectors/gitlab/permission-config/request-size' import { GITLAB_CSV_MAX_BYTES, type GitLabCsvKind, @@ -55,12 +56,17 @@ export function useGitLabPermissionForm(initial?: GitLabPermissionData) { }), [files, mode, saved] ) + const uploadError = useMemo( + () => + input.mode === 'csv' ? getGitLabUploadSizeError({ permissionConfig: input }) : undefined, + [input] + ) const selectFile = useCallback(async (kind: GitLabCsvKind, file: File) => { const generation = ++generations.current[kind] setFiles((previous) => ({ ...previous, [kind]: { loading: true } })) let selected: SelectedFile try { - if (file.size > GITLAB_CSV_MAX_BYTES) throw new Error('The file must be 4 MiB or smaller.') + if (file.size > GITLAB_CSV_MAX_BYTES) throw new Error('The file must be 8 MiB or smaller.') const content = new TextDecoder('utf-8', { fatal: true }).decode(await file.arrayBuffer()) const upload = { filename: file.name, content } const rows = parseGitLabCsv(upload, kind) @@ -89,7 +95,8 @@ export function useGitLabPermissionForm(initial?: GitLabPermissionData) { apiKey, setApiKey, input, - complete, + complete: complete && !uploadError, + uploadError, dirty, selectFile, reset, diff --git a/apps/sim/connectors/gitlab/permissions.ts b/apps/sim/connectors/gitlab/permissions.ts index bb84aa26cd7..cfac3172edd 100644 --- a/apps/sim/connectors/gitlab/permissions.ts +++ b/apps/sim/connectors/gitlab/permissions.ts @@ -124,34 +124,54 @@ export async function discoverGitLabGroup( mode: 'csv' | 'administrator', signal?: AbortSignal ): Promise { - const { host, group } = await validateGitLabGroupToken(token, config, mode, signal) - const base = `https://${host}/api/v4` - const rows = await listAll( - `${base}/groups/${group.id}/projects?with_shared=false&include_subgroups=${group.includeSubgroups}&order_by=id&sort=asc`, - token, - signal, - GITLAB_GROUP_MAX_PROJECTS - ) - const projects: GitLabGroupScope['projects'] = [] - const ids = new Set() - const paths = new Set() - for (const row of rows) { - if ( - !Number.isSafeInteger(row.id) || - row.id <= 0 || - typeof row.path_with_namespace !== 'string' || - !gitLabProjectInGroup(row.path_with_namespace, group) || - ids.has(row.id) || - paths.has(row.path_with_namespace) - ) - throw new Error('GitLab returned an inconsistent group project listing. Retry the update.') - ids.add(row.id) - paths.add(row.path_with_namespace) - projects.push({ id: row.id, path: row.path_with_namespace }) + const deadline = AbortSignal.timeout(5 * 60 * 1000) + const discoverySignal = signal ? AbortSignal.any([signal, deadline]) : deadline + try { + const { host, group } = await validateGitLabGroupToken(token, config, mode, discoverySignal) + const base = `https://${host}/api/v4` + const projects: GitLabGroupScope['projects'] = [] + const ids = new Set() + const paths = new Set() + let manifestBytes = 0 + for await (const rows of listPages( + `${base}/groups/${group.id}/projects?with_shared=false&include_subgroups=${group.includeSubgroups}&simple=true&order_by=id&sort=asc`, + token, + discoverySignal, + GITLAB_GROUP_MAX_PROJECTS + )) { + for (const row of rows) { + if ( + !Number.isSafeInteger(row.id) || + row.id <= 0 || + typeof row.path_with_namespace !== 'string' || + row.path_with_namespace.length > 1024 || + !gitLabProjectInGroup(row.path_with_namespace, group) || + ids.has(row.id) || + paths.has(row.path_with_namespace) + ) + throw new Error( + 'GitLab returned an inconsistent group project listing. Retry the update.' + ) + const project = { id: row.id, path: row.path_with_namespace } + manifestBytes += Buffer.byteLength(JSON.stringify(project), 'utf8') + 1 + if (manifestBytes > 16 * 1024 * 1024) + throw new Error('GitLab group project paths exceed 16 MiB. Choose a narrower group.') + ids.add(project.id) + paths.add(project.path) + projects.push(project) + } + } + if (!projects.length) + throw new Error('The GitLab token cannot read any projects in this group.') + projects.sort((left, right) => left.id - right.id) + return { host, group, projects } + } catch (error) { + if (deadline.aborted && !signal?.aborted) + throw new Error( + 'GitLab group discovery exceeded five minutes. Retry or choose a narrower group.' + ) + throw error } - if (!projects.length) throw new Error('The GitLab token cannot read any projects in this group.') - projects.sort((left, right) => left.id - right.id) - return { host, group, projects } } export interface GitLabPermissionUser { @@ -285,20 +305,23 @@ async function requireAdministrator( } /** Bounded complete enumeration. Never accept a partial directory as authoritative membership. */ -async function listAll( +async function* listPages( url: string, token: string, signal?: AbortSignal, maxItems?: number -): Promise { +): AsyncGenerator { const initial = new URL(url) initial.searchParams.set('per_page', String(PAGE_SIZE)) let next: URL | null = initial const seen = new Set() - const items: T[] = [] + let itemCount = 0 let retainedBytes = 0 let expectedTotal: number | undefined - for (let page = 0; next && page < MAX_DIRECTORY_PAGES; page += 1) { + const maxPages = + maxItems === undefined ? MAX_DIRECTORY_PAGES : Math.ceil(maxItems / PAGE_SIZE) + 1 + for (let page = 0; next && page < maxPages; page += 1) { + signal?.throwIfAborted() if (seen.has(next.href)) throw new Error('GitLab permission pagination repeated a page') seen.add(next.href) const response = await secureFetchWithRetry( @@ -313,26 +336,30 @@ async function listAll( if (!response.ok) throw new Error(`GitLab permission listing failed (${response.status})`) const body = (await response.json()) as T[] if (!Array.isArray(body)) throw new Error('GitLab permission listing was not an array') - retainedBytes += Buffer.byteLength(JSON.stringify(body), 'utf8') - if (body.length > PAGE_SIZE || retainedBytes > MAX_DIRECTORY_BYTES) { + if (maxItems === undefined) retainedBytes += Buffer.byteLength(JSON.stringify(body), 'utf8') + if ( + body.length > PAGE_SIZE || + (maxItems === undefined && retainedBytes > MAX_DIRECTORY_BYTES) + ) { throw new Error('GitLab permission directory exceeded its response budget') } - items.push(...body) + itemCount += body.length if (maxItems !== undefined) { const totalHeader = response.headers.get('x-total') if (totalHeader !== null) { const total = Number(totalHeader) - if ( - !Number.isSafeInteger(total) || - total < 0 || - total > maxItems || - (expectedTotal !== undefined && total !== expectedTotal) - ) - throw new Error('GitLab group project total changed or exceeded its limit') + if (!/^\d+$/.test(totalHeader) || !Number.isSafeInteger(total)) + throw new Error('GitLab returned an invalid group project total.') + if (total > maxItems) + throw new Error('GitLab group exceeds 50,000 projects. Choose a narrower group.') + if (expectedTotal !== undefined && total !== expectedTotal) + throw new Error('GitLab group projects changed during discovery. Retry the update.') expectedTotal = total } - if (items.length > maxItems) throw new Error('GitLab group exceeded its project limit') + if (itemCount > maxItems) + throw new Error('GitLab group exceeds 50,000 projects. Choose a narrower group.') } + yield body const link = response.headers .get('link') ?.split(',') @@ -367,9 +394,14 @@ async function listAll( next = null } } - if (expectedTotal !== undefined && items.length !== expectedTotal) + if (expectedTotal !== undefined && itemCount !== expectedTotal) throw new Error('GitLab group project listing was incomplete') if (next) throw new Error('GitLab permission directory exceeded its page limit') +} + +async function listAll(url: string, token: string, signal?: AbortSignal): Promise { + const items: T[] = [] + for await (const page of listPages(url, token, signal)) items.push(...page) return items } diff --git a/apps/sim/hooks/queries/kb/connectors.ts b/apps/sim/hooks/queries/kb/connectors.ts index 414b5b44ab6..b512974221a 100644 --- a/apps/sim/hooks/queries/kb/connectors.ts +++ b/apps/sim/hooks/queries/kb/connectors.ts @@ -38,11 +38,13 @@ import type { } from '@/lib/api/contracts/knowledge/connectors' import { type ConnectorDocumentsQuery, + createConnectorBodySchema, type PrepareSearchSourceBody, prepareSearchSourceContract, readSearchIndexContract, type SearchConnectionOAuthQuery, type SearchSourcePage, + updateConnectorBodySchema, } from '@/lib/api/contracts/knowledge/connectors' import { type ResourceScope, @@ -54,6 +56,7 @@ import { connectCredentialGroupInPopup } from '@/lib/credential-groups/oauth-pop import { isDesktopApp } from '@/lib/desktop' import { connectDesktopSource } from '@/lib/desktop/source-connect' import { MAX_KNOWLEDGE_CONNECTOR_DOCUMENT_PAGE_SIZE } from '@/lib/knowledge/constants' +import { getGitLabUploadSizeError } from '@/connectors/gitlab/permission-config/request-size' import { credentialGroupKeys } from '@/hooks/queries/utils/credential-group-queries' import { knowledgeKeys } from '@/hooks/queries/utils/knowledge-keys' import { organizationAccountsKeys } from '@/hooks/queries/utils/organization-accounts-keys' @@ -276,9 +279,12 @@ async function createConnector({ knowledgeBaseId, ...body }: CreateConnectorParams): Promise { + const payload = createConnectorBodySchema.parse(body) + const uploadError = payload.permissionConfig?.mode === 'csv' && getGitLabUploadSizeError(payload) + if (uploadError) throw new Error(uploadError) const result = await requestJson(createKnowledgeConnectorContract, { params: { id: knowledgeBaseId }, - body, + body: payload, }) return result.data @@ -323,9 +329,12 @@ async function updateConnector({ connectorId, updates, }: UpdateConnectorParams): Promise { + const payload = updateConnectorBodySchema.parse(updates) + const uploadError = payload.permissionConfig?.mode === 'csv' && getGitLabUploadSizeError(payload) + if (uploadError) throw new Error(uploadError) const result = await requestJson(updateKnowledgeConnectorContract, { params: { id: knowledgeBaseId, connectorId }, - body: updates, + body: payload, }) return result.data diff --git a/apps/sim/lib/api/contracts/knowledge/gitlab-permissions.ts b/apps/sim/lib/api/contracts/knowledge/gitlab-permissions.ts index 6f3d390b14b..df4986065cf 100644 --- a/apps/sim/lib/api/contracts/knowledge/gitlab-permissions.ts +++ b/apps/sim/lib/api/contracts/knowledge/gitlab-permissions.ts @@ -1,6 +1,6 @@ import { z } from 'zod' import { - GITLAB_CSV_MAX_BYTES, + GITLAB_CSV_MAX_ROWS, GITLAB_PERMISSION_MODES, } from '@/connectors/gitlab/permission-config/types' @@ -10,9 +10,8 @@ const gitLabCsvUploadSchema = z content: z .string() .min(1) - .max(GITLAB_CSV_MAX_BYTES) .describe( - 'UTF-8 CSV contents, up to 4 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding.' + 'UTF-8 CSV contents, up to 8 MiB. Both files travel in one request body limited to 10 MiB after JSON encoding.' ), }) .strict() @@ -38,7 +37,7 @@ export type GitLabPermissionUploadInput = z.input import( diff --git a/apps/sim/lib/knowledge/__integration__/gitlab-group.integration.ts b/apps/sim/lib/knowledge/__integration__/gitlab-group.integration.ts index 375e6e7e43e..f8f5c27d49f 100644 --- a/apps/sim/lib/knowledge/__integration__/gitlab-group.integration.ts +++ b/apps/sim/lib/knowledge/__integration__/gitlab-group.integration.ts @@ -58,6 +58,8 @@ describe('GitLab group Search permission boundary', () => { let aliceLegacyResult: { documentId: string } | undefined let confidential = false let providerState = 'healthy' + let largeProjectCount = 50_000 + let nativeGroup = false const checks: string[] = [] const token = 'disposable-group-test-token' const principal = (userId: string): Principal => ({ @@ -98,10 +100,73 @@ describe('GitLab group Search permission boundary', () => { if (providerState === 'revoked') return reply(401, {}) const namespace = providerState === 'renamed' ? 'renamed-team' : 'team' if (path === '/api/v4/user') return reply(200, { id: 50, state: 'active', locked: false }) + if (path === '/api/v4/groups/8') return reply(200, { id: 8, full_path: 'large' }) + if (path === '/api/v4/groups/8/projects') { + const page = Number(url.searchParams.get('page') ?? 1) + const offset = (page - 1) * 100 + return reply( + 200, + Array.from( + { length: Math.max(0, Math.min(100, largeProjectCount - offset)) }, + (_, index) => ({ + id: 100_000 + offset + index, + path_with_namespace: `large/project-${String(offset + index).padStart(5, '0')}-permission-fixture`, + }) + ) + ) + } + if (path === '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/api/v4/projects/149999') + return reply(200, { + id: 149999, + path_with_namespace: 'large/project-49999-permission-fixture', + web_url: 'https://gitlab.fixture.test/large/project-49999-permission-fixture', + }) + if ( + path === '/api/v4/groups/8/search' || + path === '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/api/v4/projects/149999/search' || + path === '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/api/v4/projects/149999/issues/1' + ) { + const issue = { + project_id: 149999, + iid: 1, + title: 'Atlas last project', + description: 'Atlas permitted content', + confidential: false, + state: 'opened', + labels: [], + web_url: 'https://gitlab.fixture.test/large/project-49999-permission-fixture/-/issues/1', + } + return reply(200, path.endsWith('/search') ? [issue] : issue) + } + if (path === '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/api/v4/projects/149999/issues/1/notes') return reply(200, []) if (path === '/api/v4/groups/team' && providerState === 'renamed') return reply(301, {}, { location: '/api/v4/groups/7' }) if (path === '/api/v4/groups/team' || path === '/api/v4/groups/7') return reply(200, { id: 7, full_path: namespace }) + if (path === '/api/v4/groups/7/search') { + if (providerState === 'search-token-expired') return reply(401, {}) + if (providerState === 'search-rate-limited') return reply(429, {}, { 'retry-after': '60' }) + if (!nativeGroup || url.searchParams.get('scope') !== 'issues') return reply(400, {}) + if ( + url.searchParams.get('exclude_forks') !== 'false' || + url.searchParams.get('include_archived') !== 'true' + ) + return reply(200, []) + const rows = [12, 11, 13, 99, 11].map((id, index) => ({ + project_id: id, + iid: index === 4 ? 2 : 1, + title: `Atlas ${id}`, + description: 'Atlas content', + confidential: index === 4, + state: 'opened', + labels: [], + web_url: `https://gitlab.fixture.test/${namespace}/${id === 11 ? 'a' : id === 12 ? 'b' : 'c'}/-/issues/1`, + })) + const page = Number(url.searchParams.get('page') ?? 1) + const size = Number(url.searchParams.get('per_page') ?? 20) + if (page === 5000) return reply(200, [rows[1], rows[2]]) + return reply(200, rows.slice((page - 1) * size, page * size)) + } if (path === '/api/v4/groups/7/projects') { if (url.searchParams.get('with_shared') !== 'false') return reply(400, {}) const projects = [ @@ -151,12 +216,28 @@ describe('GitLab group Search permission boundary', () => { if (match[2] === '/search') { if (providerState === 'search-token-expired') return reply(401, {}) if (providerState === 'search-rate-limited') return reply(429, {}, { 'retry-after': '60' }) + if (url.searchParams.get('scope') === 'blobs' && id === 11 && nativeGroup) + return reply(200, [ + { + project_id: 11, + filename: 'atlas.md', + path: 'atlas.md', + ref: 'main', + data: 'Atlas code content', + }, + ]) + if (url.searchParams.get('scope') !== 'issues') return reply(200, []) const page = Number(url.searchParams.get('page') ?? 1) const size = Number(url.searchParams.get('per_page') ?? 20) return reply(200, [issue(1), issue(2), issue(3)].slice((page - 1) * size, page * size)) } const issueMatch = match[2]?.match(/^\/issues\/(\d+)$/) if (issueMatch) return reply(200, issue(Number(issueMatch[1]))) + if (match[2] === '/repository/files/atlas.md') + return reply(200, { + file_name: 'atlas.md', + content: Buffer.from('Atlas code content').toString('base64'), + }) if (match[2]?.endsWith('/notes')) return reply(200, []) return reply(404, {}) }) @@ -166,7 +247,8 @@ describe('GitLab group Search permission boundary', () => { project?: string, cursor?: string, topK = 20, - accountId = sourceId + accountId = sourceId, + kind: 'issues' | 'all' = 'issues' ) => searchLiveKnowledge.execute({ principal: principal(userId), @@ -179,7 +261,7 @@ describe('GitLab group Search permission boundary', () => { { provider: 'gitlab', query: 'Atlas', - kind: 'issues', + ...(kind === 'issues' ? { kind: 'issues' as const } : {}), accountId: `gitlab-source:${accountId}`, ...(project ? { project } : {}), ...(cursor ? { cursor } : {}), @@ -260,7 +342,6 @@ describe('GitLab group Search permission boundary', () => { boundary: 'Application use cases, real PostgreSQL and HTTP GitLab API fixture; TLS/SSRF transport substituted', checks, - passed: checks.length === 11, }, null, 2 @@ -625,4 +706,175 @@ describe('GitLab group Search permission boundary', () => { } } ) + + it('connects a complete large group and preserves its grants when the next discovery exceeds the bound', async () => { + const grantRows = Array.from({ length: 50_000 }, (_, index) => { + const path = `large/project-${String(index).padStart(5, '0')}-permission-fixture` + return `${path},1\n${path},3\n${path},4` + }).join('\n') + const uploads = { + provider: 'gitlab' as const, + userMapping: { + filename: 'users.csv', + content: `user_id,email\n1,${ids.aliceId}@fixture.test\n2,${ids.bobId}@fixture.test\n3,third@fixture.test\n4,fourth@fixture.test`, + }, + projectPermissions: { + filename: 'permissions.csv', + content: `project_path,user_id\n${grantRows}`, + }, + } + const started = performance.now() + const { connector } = await createKnowledgeConnector.execute({ + principal: principal(ids.aliceId), + input: { + knowledgeBaseId: ids.knowledgeBaseId, + assertedOrganizationId: ids.organizationId, + connectorType: 'gitlab', + accessMode: 'admin', + apiKey: token, + sourceConfig: { ...config, group: '8' }, + permissionConfig: { ...uploads, mode: 'csv' }, + syncIntervalMinutes: 60, + }, + }) + const snapshot = await loadConnectorPermissionSnapshot(connector.id) + expect(snapshot?.metadata).toMatchObject({ + projects: expect.any(Array), + projectPermissions: { rowCount: 150_000 }, + }) + const page = await search(ids.aliceId, '149999', undefined, 20, connector.id) + const first = page.results[0] + if (!first) throw new Error('Missing last-project result') + expect((await read(ids.aliceId, first.documentId)).chunks.length).toBeGreaterThan(0) + await expect(read(ids.bobId, first.documentId)).rejects.toMatchObject({ code: 'not_found' }) + const beforeBroadSearch = transport.paths.length + const broad = await search(ids.aliceId, undefined, undefined, 20, connector.id) + expect(broad.results.map((row) => decodeLiveReference(row.documentId).container)).toEqual([ + '149999', + ]) + expect( + transport.paths + .slice(beforeBroadSearch) + .filter((path) => /^\/api\/v4\/projects\/\d+\/search$/.test(path)) + ).toEqual([]) + const legacy = await search(ids.aliceId, undefined, '1:20:49999:0:1', 20, connector.id) + expect(legacy.results.map((row) => decodeLiveReference(row.documentId).container)).toEqual([ + '149999', + ]) + largeProjectCount = 50_001 + try { + await expect( + replaceSearchSourcePermissions.execute({ + principal: principal(ids.aliceId), + input: { + organizationId: ids.organizationId, + sourceId: connector.id, + expectedRevision: 1, + permissions: uploads, + }, + }) + ).rejects.toMatchObject({ code: 'validation' }) + expect(await loadConnectorPermissionSnapshot(connector.id)).toEqual(snapshot) + expect( + (await search(ids.aliceId, '149999', undefined, 20, connector.id)).results.length + ).toBeGreaterThan(0) + } finally { + largeProjectCount = 50_000 + } + checks.push( + `Complete large-group discovery, larger CSV replacement and failed-update rollback (${Math.round(performance.now() - started)} ms)` + ) + }) + + it('uses group search while preserving project grants, confidentiality and continuations', async () => { + nativeGroup = true + const requests = transport.paths.length + try { + const found: string[] = [] + let cursor: string | undefined + for (let page = 0; page < 5; page += 1) { + const result = await search(ids.aliceId, undefined, cursor, 2) + found.push( + ...result.results.map((row) => { + const ref = decodeLiveReference(row.documentId) + return `${ref.container}:${ref.id}` + }) + ) + cursor = result.live?.accounts[0]?.nextCursor + if (!cursor) break + } + expect(cursor).toBeUndefined() + expect(found).toEqual(['11:1', '13:1']) + const paths = transport.paths.slice(requests) + expect(paths.filter((path) => path === '/api/v4/groups/7/search').length).toBeGreaterThan(0) + expect(paths.filter((path) => /^\/api\/v4\/projects\/\d+\/search$/.test(path))).toEqual([]) + checks.push( + 'Native group search filters forbidden, confidential and unconfigured projects across pages' + ) + } finally { + nativeGroup = false + } + }) + + it('continues supported group searches when code and wiki require project search', async () => { + const { connector } = await createKnowledgeConnector.execute({ + principal: principal(ids.aliceId), + input: { + knowledgeBaseId: ids.knowledgeBaseId, + assertedOrganizationId: ids.organizationId, + connectorType: 'gitlab', + accessMode: 'admin', + apiKey: token, + sourceConfig: { ...config, contentTypes: 'all' }, + permissionConfig: { ...permissions(), mode: 'csv' }, + syncIntervalMinutes: 60, + }, + }) + nativeGroup = true + const requests = transport.paths.length + try { + const kinds: string[] = [] + let cursor: string | undefined + for (let page = 0; page < 12; page += 1) { + const result = await search(ids.aliceId, undefined, cursor, 20, connector.id, 'all') + kinds.push(...result.results.map((row) => decodeLiveReference(row.documentId).kind ?? '')) + cursor = result.live?.accounts[0]?.nextCursor + if (!cursor) break + } + expect(cursor).toBeUndefined() + expect(kinds).toContain('code') + expect(kinds).toContain('issues') + expect( + transport.paths.slice(requests).filter((path) => path === '/api/v4/groups/7/search').length + ).toBeGreaterThan(0) + checks.push('Unsupported group scopes do not starve supported scopes') + } finally { + nativeGroup = false + } + }) + + it('reports the group search result window as partial instead of offering an empty next page', async () => { + const snapshot = await loadConnectorPermissionSnapshot(sourceId) + if (!snapshot) throw new Error('Missing group fixture') + const cursor = `g1.${Buffer.from( + JSON.stringify({ + revision: snapshot.revision, + pageSize: 2, + kinds: ['issues'], + nextKind: 0, + capped: false, + positions: [{ mode: 'group', projectIndex: 0, page: 5000 }], + }) + ).toString('base64url')}` + nativeGroup = true + try { + const result = await search(ids.aliceId, undefined, cursor, 2) + expect(result.results).toHaveLength(2) + expect(result.live?.accounts[0]?.status).toBe('partial') + expect(result.live?.accounts[0]?.nextCursor).toBeUndefined() + checks.push('Search window returns authorized results with explicit partial coverage') + } finally { + nativeGroup = false + } + }) }) diff --git a/apps/sim/lib/knowledge/connectors/permission-store.ts b/apps/sim/lib/knowledge/connectors/permission-store.ts index 053c3feba25..4d242f7d022 100644 --- a/apps/sim/lib/knowledge/connectors/permission-store.ts +++ b/apps/sim/lib/knowledge/connectors/permission-store.ts @@ -3,7 +3,7 @@ import { knowledgeConnectorPermissionGrant, knowledgeConnectorPermissionSnapshot, } from '@sim/db/schema' -import { and, eq, inArray } from 'drizzle-orm' +import { and, eq, inArray, sql } from 'drizzle-orm' import { OrchestrationError } from '@/lib/core/orchestration/types' import type { DbTransaction } from '@/lib/db/types' @@ -98,8 +98,17 @@ export async function loadConnectorPermissionSnapshot(connectorId: string) { } /** Metadata and worker reads leave the potentially large payload in PostgreSQL. */ -export async function readConnectorPermissionMetadata(connectorIds: readonly string[]) { +export async function readConnectorPermissionMetadata( + connectorIds: readonly string[], + fields?: readonly string[] +) { const table = knowledgeConnectorPermissionSnapshot + const metadata = fields?.length + ? sql>`jsonb_build_object(${sql.join( + fields.map((field) => sql`${field}::text, ${table.metadata} -> ${field}::text`), + sql`, ` + )})` + : table.metadata const result: Array> = [] for (let offset = 0; offset < connectorIds.length; offset += 1000) { @@ -108,7 +117,7 @@ export async function readConnectorPermissionMetadata(connectorIds: readonly str .select({ connectorId: table.connectorId, revision: table.revision, - metadata: table.metadata, + metadata, }) .from(table) .where(inArray(table.connectorId, connectorIds.slice(offset, offset + 1000)))) diff --git a/apps/sim/lib/sim-search/live/gitlab-admin.ts b/apps/sim/lib/sim-search/live/gitlab-admin.ts index e0e82df519b..067a180c07a 100644 --- a/apps/sim/lib/sim-search/live/gitlab-admin.ts +++ b/apps/sim/lib/sim-search/live/gitlab-admin.ts @@ -3,6 +3,7 @@ import { knowledgeBase, knowledgeConnector } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { describeError } from '@sim/utils/errors' import { and, eq, inArray, isNull } from 'drizzle-orm' +import { z } from 'zod' import { decryptApiKey } from '@/lib/api-key/crypto' import { type ResourceOwner, resourceScopeFromOwner } from '@/lib/core/resource-scope' import { resourceScopeCondition } from '@/lib/core/resource-scope.server' @@ -15,6 +16,7 @@ import { readConnectorPermissionMetadata, } from '@/lib/knowledge/connectors/permission-store' import { searchIntegrationAccessCondition } from '@/lib/knowledge/search/integration-policy' +import { dateSortDirection, hasDateBounds } from '@/lib/sim-search/live/dates' import { readGitLab, searchGitLab } from '@/lib/sim-search/live/gitlab' import { array, NativeSearchError, object, segment, string } from '@/lib/sim-search/live/http' import { collectNativePages, joinMessages } from '@/lib/sim-search/live/pages' @@ -26,12 +28,14 @@ import type { NativeSearchInput, } from '@/lib/sim-search/live/types' import { + GITLAB_GROUP_MAX_PROJECTS, type GitLabGroupScope, gitLabGroupMatchesConfig, gitLabProjectInGroup, } from '@/connectors/gitlab/group' import { readGitLabPermissionMetadata, + readGitLabPermissionSummaries, seedGitLabPermissionContext, } from '@/connectors/gitlab/permission-config/repository' import { @@ -85,23 +89,15 @@ async function viewerToken(owner: ResourceOwner, userId: string): Promise value.startsWith('u:')) : undefined } -function hasCsvPermissions(metadata: unknown): boolean { - try { - return readGitLabPermissionMetadata(metadata).mode === 'csv' - } catch { - return false - } -} - /** The IDs of CSV-permission sources that grant the viewer no project. */ async function ungrantedSources( owner: ResourceOwner, userId: string, ids: string[] ): Promise> { - const csv = (await readConnectorPermissionMetadata(ids)) - .filter((row) => hasCsvPermissions(row.metadata)) - .map((row) => row.connectorId) + const csv = [...(await readGitLabPermissionSummaries(ids))] + .filter(([, summary]) => summary.mode === 'csv') + .map(([id]) => id) const own = csv.length ? await viewerToken(owner, userId) : undefined if (!own) return new Set() const granted = await connectorsGrantingSubject(csv, own) @@ -423,25 +419,61 @@ async function createProjectSession( } } -/** Traverse bounded project pages; every continuation and document read rechecks current grants. */ +const groupCursorSchema = z + .object({ + revision: z.number().int().nonnegative(), + pageSize: z.number().int().min(1).max(100), + kinds: z.array(z.string().max(20)).min(1).max(4), + nextKind: z.number().int().min(0).max(3), + capped: z.boolean(), + positions: z + .array( + z + .object({ + mode: z.enum(['group', 'project']), + projectIndex: z.number().int().min(0).max(GITLAB_GROUP_MAX_PROJECTS), + page: z.number().int().min(1).max(10_000), + }) + .strict() + .nullable() + ) + .min(1) + .max(4), + }) + .strict() + +/** Search group candidates; every continuation and document read rechecks current project grants. */ async function createGroupSession(input: GitLabSessionInput, own: string) { const { source, client } = input const [stored] = await readConnectorPermissionMetadata([source.id]) const metadata = stored && readGitLabPermissionMetadata(stored.metadata) if (!metadata || !('group' in metadata) || !gitLabGroupMatchesConfig(metadata, source.config)) throw new NativeSearchError('unavailable', 'An admin must update this GitLab group connection.') - const grants = - metadata.mode === 'csv' - ? await readConnectorPermissionGrants( - source.id, - stored.revision, - metadata.projects.map((project) => `project:${project.id}`), - own - ) - : null - const projects = metadata.projects.filter( - (project) => !grants || grants.has(`project:${project.id}`) - ) + const projects = metadata.projects + let projectGrants: Promise | null> | undefined + const fallbackProjects = async () => { + projectGrants ??= + metadata.mode === 'csv' + ? readConnectorPermissionGrants( + source.id, + stored.revision, + projects.map((project) => `project:${project.id}`), + own + ) + : Promise.resolve(null) + const grants = await projectGrants + return grants ? projects.filter((project) => grants.has(`project:${project.id}`)) : projects + } + const permittedProjects = async (candidates: GitLabGroupScope['projects']) => { + if (metadata.mode !== 'csv') return candidates + const grants = await readConnectorPermissionGrants( + source.id, + stored.revision, + candidates.map((project) => `project:${project.id}`), + own + ) + return candidates.filter((project) => grants.has(`project:${project.id}`)) + } const group = object(await client.json(`/api/v4/groups/${metadata.group.id}`, { memo: true })) if ( string(group.id) !== String(metadata.group.id) || @@ -485,15 +517,187 @@ async function createGroupSession(input: GitLabSessionInput, own: string) { } return result } - const referencedProject = (container?: string) => - projects.find((project) => container === String(project.id) || container === project.path) + const searchGroup = async ( + search: NativeSearchInput, + kinds: string[], + raw?: string + ): Promise => { + const fallback = (kind: string) => + Boolean( + (['code', 'wiki'].includes(kind) && string(source.config.ref)) || + hasDateBounds(search.filters) || + dateSortDirection(search.filters) + ) + let cursor: z.output + if (raw) { + try { + if (raw.length > 4000) throw new Error('Oversized cursor') + cursor = groupCursorSchema.parse( + JSON.parse(Buffer.from(raw.slice(3), 'base64url').toString('utf8')) + ) + } catch { + throw new NativeSearchError('unavailable', 'Invalid GitLab group page.') + } + if ( + cursor.revision !== stored.revision || + cursor.pageSize !== search.limit || + cursor.kinds.join(',') !== kinds.join(',') || + cursor.positions.length !== kinds.length || + cursor.nextKind >= kinds.length || + cursor.positions.some( + (position, index) => position?.mode === 'group' && fallback(kinds[index] ?? '') + ) + ) + throw new NativeSearchError( + 'unavailable', + 'GitLab permissions or search options changed. Restart the search.' + ) + } else { + cursor = { + revision: stored.revision, + pageSize: search.limit, + kinds, + nextKind: 0, + capped: false, + positions: kinds.map((kind) => ({ + mode: fallback(kind) ? 'project' : 'group', + projectIndex: 0, + page: 1, + })), + } + } + const failures: string[] = [] + let partial = false + let attempts = 0 + let visited = 0 + const documents: NativeDocument[] = [] + while (attempts < 4 && visited < kinds.length * 4 && documents.length === 0) { + input.signal.throwIfAborted() + const index = cursor.nextKind + cursor.nextKind = (index + 1) % kinds.length + visited += 1 + const position = cursor.positions[index] + const kind = kinds[index] + if (!position || !kind) continue + const query: NativeSearchInput = { + ...search, + native: { + provider: 'gitlab', + query: search.query, + ...search.native, + kind: kind as 'code' | 'wiki' | 'issues' | 'merge_requests', + cursor: String(position.page), + }, + } + attempts += 1 + try { + let result: NativePage + if (position.mode === 'group') { + result = await searchGitLab(client, query, metadata.group.id) + const byId = new Set(result.documents.map((document) => document.container)) + const candidates = projects.filter((project) => byId.has(String(project.id))) + const allowed = new Map( + (await permittedProjects(candidates)).map((project) => [String(project.id), project]) + ) + result.documents = result.documents.filter((document) => + allowed.has(document.container ?? '') + ) + for (const document of result.documents) { + const project = allowed.get(document.container ?? '') + if (!document.url && project) { + const base = `https://${metadata.host}/${project.path.split('/').map(segment).join('/')}` + document.url = + kind === 'code' + ? `${base}/-/blob/${segment(document.revision || 'HEAD')}/${document.id.split('/').map(segment).join('/')}` + : kind === 'wiki' + ? `${base}/-/wikis/${document.id.split('/').map(segment).join('/')}` + : `${base}/-/${kind}/${segment(document.id)}` + } + } + } else { + const permitted = await fallbackProjects() + const project = permitted[position.projectIndex] + if (!project) { + cursor.positions[index] = null + continue + } + result = await (await session(project)).search({ + ...query, + native: { + provider: 'gitlab', + query: query.query, + ...query.native, + project: String(project.id), + }, + }) + } + documents.push(...result.documents) + partial ||= Boolean(result.partial) + cursor.capped ||= Boolean(result.hasMore && !result.nextCursor) + if (result.nextCursor) position.page = Number(result.nextCursor) + else if (position.mode === 'project') { + position.projectIndex += 1 + position.page = 1 + } else cursor.positions[index] = null + } catch (error) { + input.signal.throwIfAborted() + if ( + error instanceof NativeSearchError && + position.mode === 'group' && + (error.httpStatus === 400 || error.httpStatus === 422) + ) { + position.mode = 'project' + position.page = 1 + continue + } + if ( + error instanceof NativeSearchError && + ['reconnect', 'rate_limited', 'timeout'].includes(error.status) + ) + throw error + if (position.mode === 'group') throw error + partial = true + failures.push( + error instanceof NativeSearchError + ? error.message + : 'One GitLab collection could not be searched.' + ) + position.projectIndex += 1 + position.page = 1 + } + } + return { + documents, + partial: partial || cursor.capped, + ...(cursor.capped ? { hasMore: true } : {}), + ...(cursor.positions.some(Boolean) + ? { nextCursor: `g1.${Buffer.from(JSON.stringify(cursor)).toString('base64url')}` } + : {}), + message: joinMessages([ + 'Searched the configured GitLab group with per-project permissions. Continue with the cursor for remaining results.', + cursor.positions.some((position) => position?.mode === 'project') + ? 'Some scopes require project-by-project search on this GitLab instance. Target a project for faster results.' + : undefined, + cursor.capped + ? 'GitLab group search reached its 10,000-result window. Narrow the query or target a project.' + : undefined, + ...failures, + ]), + } + } + const referencedProject = async (container?: string) => { + const project = projects.find( + (project) => container === String(project.id) || container === project.path + ) + return project ? (await permittedProjects([project]))[0] : undefined + } return { async verify(reference: Reference, evidence?: Record) { - const project = referencedProject(reference.container) + const project = await referencedProject(reference.container) return project ? (await session(project)).verify(reference, evidence) : false }, async read(reference: Reference) { - const project = referencedProject(reference.container) + const project = await referencedProject(reference.container) if (!project) throw new NativeSearchError( 'unavailable', @@ -503,16 +707,21 @@ async function createGroupSession(input: GitLabSessionInput, own: string) { }, async search(search: NativeSearchInput): Promise { if (search.native?.project) { - const project = referencedProject(search.native.project) + const project = await referencedProject(search.native.project) return project ? (await session(project)).search(search) : { documents: [] } } const kinds = gitLabSourceKinds(source.config).filter( (kind) => !search.native?.kind || kind === search.native.kind ) - const raw = search.native?.cursor ?? `${stored.revision}:${search.limit}:0:0:1` - if (!/^\d{1,10}:\d{1,3}:\d{1,4}:\d:\d{1,4}$/.test(raw)) + if (!kinds.length) return { documents: [] } + const raw = search.native?.cursor + if (metadata.mode === 'csv' && (!raw || raw.startsWith('g1.'))) + return searchGroup(search, kinds, raw) + const projects = await fallbackProjects() + const legacyCursor = raw ?? `${stored.revision}:${search.limit}:0:0:1` + if (!/^\d{1,10}:\d{1,3}:\d{1,5}:\d:\d{1,4}$/.test(legacyCursor)) throw new NativeSearchError('unavailable', 'Invalid GitLab group page.') - const [revision, pageSize, ...position] = raw.split(':').map(Number) + const [revision, pageSize, ...position] = legacyCursor.split(':').map(Number) if (revision !== stored.revision || pageSize !== search.limit) throw new NativeSearchError( 'unavailable', diff --git a/apps/sim/lib/sim-search/live/gitlab.ts b/apps/sim/lib/sim-search/live/gitlab.ts index d06c11769ef..3a42451a3c0 100644 --- a/apps/sim/lib/sim-search/live/gitlab.ts +++ b/apps/sim/lib/sim-search/live/gitlab.ts @@ -40,9 +40,10 @@ function document(row: Record, kind: string): NativeDocument { export async function searchGitLab( client: NativeClient, - input: NativeSearchInput + input: NativeSearchInput, + groupId?: number ): Promise { - if (!input.native?.project) { + if (!input.native?.project && groupId === undefined) { const projects = array( await client.json('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/api/v4/projects', { query: { @@ -83,13 +84,22 @@ export async function searchGitLab( : result.message, } } - if (!input.native.kind) + if (!input.native?.kind) return collectNativePages( ['issues', 'code', 'merge_requests'].map((kind) => - searchGitLab(client, { - ...input, - native: { ...input.native!, kind: kind as 'issues' | 'code' | 'merge_requests' }, - }) + searchGitLab( + client, + { + ...input, + native: { + provider: 'gitlab', + query: input.query, + ...input.native, + kind: kind as 'issues' | 'code' | 'merge_requests', + }, + }, + groupId + ) ), 'Searched GitLab issues, merge requests, and code.' ) @@ -107,13 +117,19 @@ export async function searchGitLab( 'GitLab supports issues, code, merge_requests, or wiki search.' ) const page = input.native?.cursor ?? '1' - if (!/^\d{1,4}$/.test(page) || Number(page) < 1) + if (!/^\d{1,5}$/.test(page) || Number(page) < 1 || Number(page) > 10_000) throw new NativeSearchError('unavailable', 'Invalid GitLab page.') if (['code', 'wiki'].includes(kind) && hasDateBounds(input.filters)) throw new NativeSearchError( 'unavailable', 'GitLab code/wiki search does not provide modification dates. Use issues or merge_requests for date-filtered search.' ) + const groupPageLimit = Math.floor(10_000 / input.limit) + if (groupId !== undefined && Number(page) > groupPageLimit) + throw new NativeSearchError( + 'unavailable', + 'GitLab group search reached its result window. Narrow the query or target a project.' + ) const dates = nativeDateBounds(input) const listing = Boolean( input.native?.project && @@ -123,14 +139,17 @@ export async function searchGitLab( let response: unknown try { response = await client.json( - listing - ? `/api/v4/projects/${segment(input.native!.project!)}/${kind}` - : input.native?.project - ? `/api/v4/projects/${segment(input.native.project)}/search` - : '/api/v4/search', + groupId !== undefined + ? `/api/v4/groups/${groupId}/search` + : listing + ? `/api/v4/projects/${segment(input.native!.project!)}/${kind}` + : input.native?.project + ? `/api/v4/projects/${segment(input.native.project)}/search` + : '/api/v4/search', { query: { scope: listing ? 'all' : scope, + ...(groupId !== undefined ? { exclude_forks: 'false', include_archived: 'true' } : {}), ...(nativeText(input) ? { search: nativeText(input) } : {}), ...(listing && dates.start ? { updated_after: dates.start } : {}), ...(listing && dates.end ? { updated_before: dates.end } : {}), @@ -147,17 +166,19 @@ export async function searchGitLab( throw new NativeSearchError( error.status, `GitLab ${kind} search: ${error.message}`, - error.retryAfterSeconds + error.retryAfterSeconds, + error.httpStatus, + error.diagnosticCode ) throw error } - if (!Array.isArray(response)) + if (!Array.isArray(response) || response.length > input.limit) throw new NativeSearchError('unavailable', 'GitLab returned an invalid search response.') const data = array(response) const documents = data.map((row) => document(row, kind)) const projects = new Map() for (const item of documents) { - if (!item.url && item.container) { + if (groupId === undefined && !item.url && item.container) { let url = projects.get(item.container) if (!url) { url = string( @@ -173,9 +194,15 @@ export async function searchGitLab( : `${url}/-/${kind}/${segment(item.id)}` } } + const capped = + groupId !== undefined && Number(page) === groupPageLimit && data.length === input.limit return { documents, - ...(data.length === input.limit ? { nextCursor: String(Number(page) + 1) } : {}), + ...(capped + ? { partial: true, hasMore: true } + : data.length === input.limit + ? { nextCursor: String(Number(page) + 1) } + : {}), message: 'GitLab code/wiki/global search availability depends on the instance plan and enabled search backend. Set project to narrow to a project ID or path.', } diff --git a/apps/sim/lib/sim-search/live/providers.ts b/apps/sim/lib/sim-search/live/providers.ts index 09f75ab7d48..c555aa928dc 100644 --- a/apps/sim/lib/sim-search/live/providers.ts +++ b/apps/sim/lib/sim-search/live/providers.ts @@ -266,7 +266,7 @@ export const LIVE_SEARCH_PROVIDERS = { avoid: 'expecting date filters or sorting on code or wiki results, and relying on advanced-search operators (quotes, |, -) on instances that may only have basic search.', }, - search: searchGitLab, + search: (client, input) => searchGitLab(client, input), read: (client, reference) => readGitLab(client, reference.id, reference.container, reference.kind, reference.revision), }, diff --git a/scripts/check-explicit-any.baseline.json b/scripts/check-explicit-any.baseline.json index ad88ebef161..4414fd4f85a 100644 --- a/scripts/check-explicit-any.baseline.json +++ b/scripts/check-explicit-any.baseline.json @@ -1568,7 +1568,7 @@ "apps/sim/lib/sim-search/live/github.ts": 1, "apps/sim/lib/sim-search/live/gitlab-admin.test.ts": 1, "apps/sim/lib/sim-search/live/gitlab-admin.ts": 1, - "apps/sim/lib/sim-search/live/gitlab.ts": 3, + "apps/sim/lib/sim-search/live/gitlab.ts": 2, "apps/sim/lib/sim-search/live/google-meet.ts": 1, "apps/sim/lib/sim-search/live/granola-mcp.ts": 2, "apps/sim/lib/sim-search/live/hubspot-mcp.test.ts": 1, diff --git a/scripts/check-unused-exports.baseline.json b/scripts/check-unused-exports.baseline.json index 7981a84fd47..3ad7f87c93d 100644 --- a/scripts/check-unused-exports.baseline.json +++ b/scripts/check-unused-exports.baseline.json @@ -1521,7 +1521,6 @@ "apps/sim/lib/api/contracts/knowledge/connectors.ts#connectorDocumentsQuerySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#connectorMemberSummarySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#connectorRequestedAccessModeSchema", - "apps/sim/lib/api/contracts/knowledge/connectors.ts#createConnectorBodySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#deleteConnectorQuerySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#listSearchSourcesQuerySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#memberSyncLogDataSchema", @@ -1532,7 +1531,6 @@ "apps/sim/lib/api/contracts/knowledge/connectors.ts#syncLogStatusSchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#triggerKnowledgeConnectorSyncQuerySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#updateConnectorAccessBodySchema", - "apps/sim/lib/api/contracts/knowledge/connectors.ts#updateConnectorBodySchema", "apps/sim/lib/api/contracts/knowledge/connectors.ts#viewerConnectorMembershipSchema", "apps/sim/lib/api/contracts/knowledge/documents.ts#BulkCreateDocumentsBody", "apps/sim/lib/api/contracts/knowledge/documents.ts#CreateKnowledgeDocumentsBody",