Skip to content

improvement(self-host): simplify capability setup configuration - #6230

Merged
TheodoreSpeaks merged 12 commits into
stagingfrom
feat/self-host-link
Aug 4, 2026
Merged

improvement(self-host): simplify capability setup configuration#6230
TheodoreSpeaks merged 12 commits into
stagingfrom
feat/self-host-link

Conversation

@TheodoreSpeaks

@TheodoreSpeaks TheodoreSpeaks commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Separate runtime capability definitions from CLI prompts and status decoration
  • Make provider setup generic and drift-checked against application configuration
  • Update integration authoring skills to capture deployment requirements

Type of Change

  • Improvement

Testing

  • bun run test:setup
  • Focused environment capability and integration availability tests
  • bun run type-check
  • bun run lint
  • Full pre-ship audit suite

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@TheodoreSpeaks
TheodoreSpeaks requested a review from a team as a code owner August 3, 2026 22:37
@vercel

vercel Bot commented Aug 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 4, 2026 7:37pm

Request Review

@cursor

cursor Bot commented Aug 3, 2026

Copy link
Copy Markdown

PR Summary

High Risk
Changes authentication flows, deployment availability semantics, and copilot tool exposure across many integrations; misconfiguration now throws or hides integrations rather than silently offering broken OAuth.

Overview
Self-hosted deployments now fail closed on OAuth and integration availability instead of advertising integrations whose client credentials are missing or misconfigured.

Runtime capability model ties visible integration blocks to OAUTH_CLIENT_CAPABILITIES / env schema, with CLI setup fields in capability-config.ts kept in sync. OAuth authorize/callback routes use requireConfiguredOAuthClient; connector providers are filtered to configured clients only.

integrationAvailability (ready / limited / unavailable / misconfigured) is exposed from /api/settings/allowed-integrations and drives the integrations UI (disabled rows, connect deep-links), permission config block filtering, and copilot integration tools / OAuth link generation. Copilot also intersects workspace and env integration allowlists and can expose tools for limited integrations without advertising OAuth when the client is not configured.

CI and authoring: integration-catalog:check validates integrations.json against the block registry; ship/validate-integration skills add deployment-availability steps and expanded audit lists. README/setup docs cover per-capability bun run setup commands and explicit STORAGE_PROVIDER / OCR_PROVIDER env behavior.

Reviewed by Cursor Bugbot for commit babb8c0. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread apps/sim/lib/core/config/env-capabilities.server.ts
Comment thread apps/sim/hooks/use-permission-config.ts
@greptile-apps

greptile-apps Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR centralizes self-hosted deployment capability definitions and separates runtime configuration from setup presentation.

  • Adds generic capability inspection, provider setup, status reporting, and drift checks.
  • Projects OAuth and service-account deployment requirements into integration availability across UI, API, and copilot paths.
  • Updates Redis, storage, jobs, sandbox, email, and related runtime consumers to use centralized configuration.
  • Expands setup tests, integration availability tests, Helm examples, documentation, and authoring guidance.

Confidence Score: 5/5

The PR appears safe to merge because no eligible blocking follow-up finding or outstanding prior finding remains.

No blocking failure remains.

Important Files Changed

Filename Overview
apps/sim/lib/core/config/env-capabilities.ts Introduces the central runtime model for inspecting and requiring deployment capabilities and OAuth client configuration.
scripts/setup/capability-config.ts Separates setup field presentation from runtime capability definitions with exhaustive drift checking.
scripts/setup/capability-setup.ts Implements generic provider setup using the centralized capability and setup-field catalogs.
apps/sim/lib/integrations/availability.ts Resolves integration deployment availability from generated OAuth and service-account metadata.
apps/sim/lib/integrations/availability.server.ts Provides cached server bindings for integration and OAuth-service deployment availability.
apps/sim/lib/integrations/service-account-metadata.ts Defines service-account provider projections and their deployment requirements.
apps/sim/lib/core/config/redis.ts Routes Redis configuration through the centralized cache capability.
scripts/check-integration-catalog.ts Adds drift validation between executable integration definitions and the committed client-safe catalog.
apps/sim/lib/core/config/env-capabilities.test.ts Covers provider selection, partial and invalid configurations, defaults, and OAuth aliases.
scripts/setup/capability-config.test.ts Verifies setup metadata remains exhaustive and aligned with runtime capability fields.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Env[Environment and Helm values] --> Cap[Runtime capability definitions]
  Setup[Self-host setup CLI] --> SetupMap[Setup field presentation]
  SetupMap -. drift checks .-> Cap
  Cap --> Runtime[Runtime resource consumers]
  Cap --> OAuth[OAuth client capability resolution]
  OAuth --> Catalog[Generated integration catalog]
  Catalog --> Availability[Integration availability]
  Availability --> UI[Workspace UI]
  Availability --> API[API and OAuth tooling]
  Availability --> Copilot[Copilot integration tools]
  Runtime --> Resources[Cache, storage, jobs, email, sandbox, OCR]
Loading

Reviews (9): Last reviewed commit: "fix(integrations): preserve connect deep..." | Re-trigger Greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

Comment thread apps/sim/lib/integrations/availability.server.ts
Comment thread apps/sim/lib/integrations/availability.ts
Comment thread apps/sim/hooks/use-permission-config.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/lib/integrations/credential-visibility.server.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit a3d7f63. Configure here.

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 1e9a71f. Configure here.

@TheodoreSpeaks TheodoreSpeaks changed the title feat(self-host): add capability-aware setup improvement(self-host): simplify capability setup configuration Aug 4, 2026
Comment thread scripts/setup/capability-setup.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 64736a0. Configure here.

# Conflicts:
#	apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx
#	apps/sim/lib/copilot/chat/process-contents.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/lib/core/config/env-capabilities.ts
Comment thread apps/sim/lib/copilot/chat/payload.ts
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit babb8c0. Configure here.

@TheodoreSpeaks
TheodoreSpeaks merged commit 35fd4ef into staging Aug 4, 2026
33 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the feat/self-host-link branch August 4, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant