-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Feat/insforge integration #2774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feat/insforge integration #2774
Conversation
Add InsForge block with 14 tools supporting: - Database operations: query, get_row, insert, update, delete, upsert - Storage management: upload, download, list, delete files - Serverless functions: invoke - AI capabilities: chat completion, vision, image generation Includes block definition, tool implementations, icon, registry updates, and documentation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated all InsForge tool API endpoints to match the actual backend routes: - Database: /api/database/:tableName (was /rest/v1/:tableName) - Storage: /api/storage/buckets/:bucket/objects/:key - Functions: /functions/:slug - AI Chat: /api/ai/chat/completion - AI Image: /api/ai/image/generation Also updated storage_delete to use single file deletion instead of bulk delete to match InsForge API design. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The InsForge backend routes data queries through /api/database/records/:tableName, not /api/database/:tableName. Updated all database tools accordingly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
@tonychang04 is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
Greptile OverviewGreptile SummaryThis PR adds comprehensive InsForge backend-as-a-service integration to Sim, providing 14 new tools across database operations, storage management, serverless functions, and AI capabilities. The implementation follows established patterns from similar integrations (like Supabase) and includes documentation. Key ChangesDatabase Operations (6 tools): Query, get row, insert, update, delete, and upsert operations using PostgREST API syntax. Storage Management (4 tools): File upload, download, list, and delete operations for InsForge storage buckets. AI Capabilities (3 tools): Chat completion, vision analysis, and image generation using OpenAI-compatible APIs. Serverless Functions (1 tool): Function invocation capability for custom backend logic. Critical Issues Found1. Parameter Mismatch in Storage Delete (BLOCKS FUNCTIONALITY)The block configuration uses 2. Missing Method Parameter SupportThe documentation specifies that the 3. Missing URL Encoding ThroughoutAll database operations (query, insert, update, delete, upsert, get_row) directly interpolate table names into URLs without Architecture NotesThe integration follows the established block/tool pattern:
The implementation correctly uses the AuthMode.ApiKey pattern and includes proper error handling in most tools. The AI tools correctly format multi-part requests for vision, and storage_list is the only tool that properly uses URL encoding. Confidence Score: 2/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant SimUI as Sim UI
participant Block as InsForge Block
participant Tool as InsForge Tool
participant API as InsForge API
User->>SimUI: Configure InsForge operation
SimUI->>Block: User provides baseUrl, apiKey, operation params
alt Database Operations
Block->>Block: Parse data/filter/orderBy params
Block->>Tool: Call insforge_query/insert/update/delete
Tool->>Tool: Build URL with table name (missing encoding)
Tool->>API: GET/POST/PATCH/DELETE /api/database/records/{table}
API-->>Tool: Return database records
Tool-->>Block: Transform response with results array
end
alt Storage Operations
Block->>Block: Parse paths/fileContent params
Block->>Tool: Call insforge_storage_upload/download/delete
Tool->>Tool: Build URL with bucket/path (missing encoding)
Tool->>API: POST/GET/DELETE /api/storage/buckets/{bucket}/objects/{path}
API-->>Tool: Return storage operation result
Tool-->>Block: Transform response
end
alt AI Operations
Block->>Block: Parse messages/prompt params
Block->>Tool: Call insforge_completion/vision/image_generation
Tool->>Tool: Build request body with AI parameters
Tool->>API: POST /api/ai/chat/completion or /api/ai/image/generation
API-->>Tool: Return AI-generated content
Tool-->>Block: Transform response with content/images
end
alt Function Invocation
Block->>Block: Parse body params
Block->>Tool: Call insforge_invoke
Tool->>Tool: Build URL (hardcoded POST method)
Tool->>API: POST /functions/{functionName}
API-->>Tool: Return function result
Tool-->>Block: Transform response
end
Block-->>SimUI: Return operation output
SimUI-->>User: Display results
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
13 files reviewed, 13 comments
Block config was using 'paths' (array) but tool expects 'path' (string). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The storage_delete tool uses singular 'path', not 'paths' array. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Supports GET, POST, PUT, DELETE (default: POST) as documented. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use encodeURIComponent to handle special characters in table names. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Use encodeURIComponent to handle special characters. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
Brief description of what this PR does and why.
Add InsForge backend-as-a-service integration as a new tool block in Sim Studio. This enables users to connect to their InsForge backend and perform:
Fixes #(issue)
Type of Change
Testing
How has this been tested? What should reviewers focus on?

Focus on the funcionalities
Checklist
Screenshots/Videos