Open
Conversation
…keyboard shortcuts, audit logs
…rects to rewrites
…stash, algolia tools; isolated-vm robustness improvements, tables backend (#3271) * feat(tools): advanced fields for youtube, vercel; added cloudflare and dataverse tools (#3257) * refactor(vercel): mark optional fields as advanced mode Move optional/power-user fields behind the advanced toggle: - List Deployments: project filter, target, state - Create Deployment: project ID override, redeploy from, target - List Projects: search - Create/Update Project: framework, build/output/install commands - Env Vars: variable type - Webhooks: project IDs filter - Checks: path, details URL - Team Members: role filter - All operations: team ID scope Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * style(youtube): mark optional params as advanced mode Hide pagination, sort order, and filter fields behind the advanced toggle for a cleaner default UX across all YouTube operations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * added advanced fields for vercel and youtube, added cloudflare and dataverse block * addded desc for dataverse * add more tools * ack comment * more * ops --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> * feat(tables): added tables (#2867) * updates * required * trashy table viewer * updates * updates * filtering ui * updates * updates * updates * one input mode * format * fix lints * improved errors * updates * updates * chages * doc strings * breaking down file * update comments with ai * updates * comments * changes * revert * updates * dedupe * updates * updates * updates * refactoring * renames & refactors * refactoring * updates * undo * update db * wand * updates * fix comments * fixes * simplify comments * u[dates * renames * better comments * validation * updates * updates * updates * fix sorting * fix appearnce * updating prompt to make it user sort * rm * updates * rename * comments * clean comments * simplicifcaiton * updates * updates * refactor * reduced type confusion * undo * rename * undo changes * undo * simplify * updates * updates * revert * updates * db updates * type fix * fix * fix error handling * updates * docs * docs * updates * rename * dedupe * revert * uncook * updates * fix * fix * fix * fix * prepare merge * readd migrations * add back missed code * migrate enrichment logic to general abstraction * address bugbot concerns * adhere to size limits for tables * remove conflicting migration * add back migrations * fix tables auth * fix permissive auth * fix lint * reran migrations * migrate to use tanstack query for all server state * update table-selector * update names * added tables to permission groups, updated subblock types --------- Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai> Co-authored-by: waleed <walif6@gmail.com> * fix(snapshot): changed insert to upsert when concurrent identical child workflows are running (#3259) * fix(snapshot): changed insert to upsert when concurrent identical child workflows are running * fixed ci tests failing * fix(workflows): disallow duplicate workflow names at the same folder level (#3260) * feat(tools): added redis, upstash, algolia, and revenuecat (#3261) * feat(tools): added redis, upstash, algolia, and revenuecat * ack comment * feat(models): add gemini-3.1-pro-preview and update gemini-3-pro thinking levels (#3263) * fix(audit-log): lazily resolve actor name/email when missing (#3262) * fix(blocks): move type coercions from tools.config.tool to tools.config.params (#3264) * fix(blocks): move type coercions from tools.config.tool to tools.config.params Number() coercions in tools.config.tool ran at serialization time before variable resolution, destroying dynamic references like <block.result.count> by converting them to NaN/null. Moved all coercions to tools.config.params which runs at execution time after variables are resolved. Fixed in 15 blocks: exa, arxiv, sentry, incidentio, wikipedia, ahrefs, posthog, elasticsearch, dropbox, hunter, lemlist, spotify, youtube, grafana, parallel. Also added mode: 'advanced' to optional exa fields. Closes #3258 * fix(blocks): address PR review — move remaining param mutations from tool() to params() - Moved field mappings from tool() to params() in grafana, posthog, lemlist, spotify, dropbox (same dynamic reference bug) - Fixed parallel.ts excerpts/full_content boolean logic - Fixed parallel.ts search_queries empty case (must set undefined) - Fixed elasticsearch.ts timeout not included when already ends with 's' - Restored dropbox.ts tool() switch for proper default fallback * fix(blocks): restore field renames to tool() for serialization-time validation Field renames (e.g. personalApiKey→apiKey) must be in tool() because validateRequiredFieldsBeforeExecution calls selectToolId()→tool() then checks renamed field names on params. Only type coercions (Number(), boolean) stay in params() to avoid destroying dynamic variable references. * improvement(resolver): resovled empty sentinel to not pass through unexecuted valid refs to text inputs (#3266) * fix(blocks): add required constraint for serviceDeskId in JSM block (#3268) * fix(blocks): add required constraint for serviceDeskId in JSM block * fix(blocks): rename custom field values to request field values in JSM create request * fix(trigger): add isolated-vm support to trigger.dev container builds (#3269) Scheduled workflow executions running in trigger.dev containers were failing to spawn isolated-vm workers because the native module wasn't available in the container. This caused loop condition evaluation to silently fail and exit after one iteration. - Add isolated-vm to build.external and additionalPackages in trigger config - Include isolated-vm-worker.cjs via additionalFiles for child process spawning - Add fallback path resolution for worker file in trigger.dev environment * fix(tables): hide tables from sidebar and block registry (#3270) * fix(tables): hide tables from sidebar and block registry * fix(trigger): add isolated-vm support to trigger.dev container builds (#3269) Scheduled workflow executions running in trigger.dev containers were failing to spawn isolated-vm workers because the native module wasn't available in the container. This caused loop condition evaluation to silently fail and exit after one iteration. - Add isolated-vm to build.external and additionalPackages in trigger config - Include isolated-vm-worker.cjs via additionalFiles for child process spawning - Add fallback path resolution for worker file in trigger.dev environment * lint * fix(trigger): update node version to align with main app (#3272) * fix(build): fix corrupted sticky disk cache on blacksmith (#3273) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Lakee Sivaraya <71339072+lakeesiv@users.noreply.github.com> Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai> Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
… fixes, removed retired models, hex integration
… pagination, memory improvements
* feat(api): add tables and files v1 REST API with OpenAPI docs * fix(api): address review feedback for tables/files REST API * fix(api): reject empty filters, consolidate PUT/DELETE into service helpers * fix(api): upsert unique constraints, POST response fields, uploadedAt timestamp * fix(api): stop leaking internal fields in list tables, fix deleteTable requestId * fix(api): atomic table-count limit in createTable, stop leaking internal fields * fix(api): error classification in PATCH, z.coerce→preprocess, requestId in logs * fix(api): audit logging, PATCH service consolidation, Content-Disposition encoding - Add TABLE_CREATED/TABLE_DELETED audit events to v1 table routes - Consolidate PATCH handlers to use updateRow service function - Fix Content-Disposition header with RFC 5987 dual-parameter form - Normalize schema in POST /tables response with normalizeColumn * lint * fix(api): upsert unique constraint 400, guard request.json() parse errors - Add 'Unique constraint violation' to upsert error classification - Wrap PUT/DELETE request.json() in try/catch to return 400 on malformed body - Apply fixes to both v1 and internal routes * fix(api): guard PATCH request.json(), accurate deleteRowsByIds count - Wrap PATCH request.json() in try/catch for both v1 and internal routes - Rewrite deleteRowsByIds to use .returning() for accurate deletedCount under concurrent requests (eliminates SELECT-then-DELETE race) * fix(api): guard all remaining request.json() calls in table routes - Wrap POST handler request.json() in try/catch across all table routes - Also fix internal DELETE single-row handler - Every request.json() in table routes now returns 400 on malformed body * fix(api): safe type check on formData workspaceId in file upload - Replace unsafe `as string | null` cast with typeof check - Prevents File object from bypassing workspaceId validation * fix(api): safe File cast in upload, validate column name before sql.raw() - Use instanceof File check instead of unsafe `as File | null` cast - Add regex validation on column name before sql.raw() interpolation * fix(api): comprehensive hardening pass across all table/file routes - Guard request.formData() with try/catch in file upload - Guard all .toISOString() calls with instanceof Date checks - Replace verifyTableWorkspace double-fetch with direct comparison - Fix relative imports to absolute (@/app/api/table/utils) - Fix internal list tables leaking fields via ...t spread - Normalize schema in internal POST create table response - Remove redundant pre-check in internal create (service handles atomically) - Make 'maximum table limit' return 403 consistently (was 400 in internal) - Add 'Row not found' → 404 classification in PATCH handlers - Add NAME_PATTERN validation before sql.raw() in validation.ts * chore: lint fixes
…le integration (#3230) * feat(knowledge): connectors, user exclusions, expanded tools & airtable integration * improvements * removed redundant util * ack PR comments * remove module level cache, use syncContext between paginated calls to avoid redundant schema fetches * regen migrations, ack PR comments * ack PR comment * added tests * ack comments * ack comments * feat(db): add knowledge connector migration after merge Generated migration 0162 for knowledge_connector and knowledge_connector_sync_log tables after resolving merge conflicts with feat/mothership-copilot. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(connectors): audit fixes for sync engine, connectors, and knowledge tools - Extract shared computeContentHash to connectors/utils.ts (dedup across 7 connectors) - Include error'd connectors in cron auto-retry query - Add syncContext caching for Confluence (cloudId, spaceId) - Batch Confluence label fetches with concurrency limit of 10 - Enforce maxPages in Confluence v2 path - Clean up stale storage files on document update - Retry stuck documents (pending/failed) after sync completes - Soft-delete documents and reclaim tag slots on connector deletion - Add incremental sync support to ConnectorConfig interface - Fix offset:0 falsy check in list_documents tool Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * perf(connectors): deep audit — extract shared utils, fix pagination, optimize API calls - Extract shared htmlToPlainText to connectors/utils.ts (dedup Confluence + Google Drive) - Add syncContext caching for Jira cloudId, Notion/Linear/Google Drive cumulative limits - Fix cumulative maxPages/maxIssues/maxFiles enforcement across pagination pages - Bump Notion page_size from 20 to 100 (5x fewer API round-trips) - Batch Notion child page fetching with concurrency=5 (was serial N+1) - Bump Confluence v2 limit from 50 to 250 (v2 API supports it) - Pass syncContext through Confluence CQL path for cumulative tracking - Upgrade GitHub tree truncation warning to error level - Fix sync-engine test mock to include inArray export Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * refactor(connectors): extract tag helpers, fix Notion maxPages, rewrite broken tests - Add parseTagDate and joinTagArray helpers to connectors/utils.ts - Update all 7 connectors to use shared tag mapping helpers (removes 12+ duplication instances) - Fix Notion listFromParentPage cumulative maxPages check (was using local count) - Rewrite 3 broken connector route test files to use vi.hoisted() + static vi.mock() pattern instead of deprecated vi.doMock/vi.resetModules (all 86 tests now pass) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(connectors): add loading skeletons, delete pending state, and pause feedback Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(knowledge): escape LIKE wildcards, guard restore from un-deleting, fix offset=0 - Escape %, _, \ in tag filter LIKE patterns to prevent incorrect matches - Add isNull(deletedAt) guard to restore operation to prevent un-deleting soft-deleted docs - Change offset check from falsy to != null so offset=0 is not dropped Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(knowledge): add 10 new knowledge base connectors Add connectors for Dropbox, OneDrive, SharePoint, Slack, Google Docs, Asana, HubSpot, Salesforce, WordPress, and Webflow. Each connector implements listDocuments, getDocument, validateConfig with proper pagination, content hashing, and tag definitions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(connectors): address audit findings across 5 connectors OneDrive: fix encodeURIComponent breaking folder paths with slashes, add recursive folder traversal via folder queue in cursor state. Slack: add missing requiredScopes. Asana: pass retryOptions as 3rd arg to fetchWithRetry instead of spreading into RequestInit; add missing requiredScopes. HubSpot: add missing requiredScopes; fix sort property to use hs_lastmodifieddate for non-contact object types. Google Docs: remove orphaned title tag that was never populated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(connectors): add missing requiredScopes to OneDrive and HubSpot OneDrive: add requiredScopes: ['Files.Read'] HubSpot: add missing crm.objects.tickets.read scope Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * chore(connectors): lint fixes * fix(connectors): slice documents to respect max limit on last page * fix(connectors): use per-segment encodeURIComponent for SharePoint folder paths encodeURI does not encode #, ?, &, + or = which are valid in folder names but break the Microsoft Graph URL. Apply the same per-segment encoding fix already used in the OneDrive connector. * fix(connectors): address PR review findings - Slack: remove private_channel from conversations.list types param since requiredScopes only cover public channels (channels:read, channels:history). Adding groups:read/groups:history would force all users to grant private channel access unnecessarily. - OneDrive/SharePoint: add .htm to supported extensions and handle it in content processing (htmlToPlainText), matching Dropbox. - Salesforce: guard getDocument for KnowledgeArticleVersion to skip records that are no longer PublishStatus='Online', preventing un-published articles from being re-synced. * fix(connectors): pre-download size check and remove dead parameter - OneDrive/SharePoint: add file size check against MAX_FILE_SIZE before downloading, matching Dropbox's behavior. Prevents OOM on large files. - Slack: remove unused syncContext parameter from fetchChannelMessages. * fix(connectors): slack getDocument user cache & wordpress scope reduction - Slack: pass a local syncContext to formatMessages in getDocument so resolveUserName caches user lookups across messages. Without this, every message triggered a fresh users.info API call. - WordPress: replace 'global' scope with 'posts' and 'sites' following principle of least privilege. The connector only reads posts and validates site existence. * fix(connectors): revert wordpress scope and slack local cache changes - WordPress: revert requiredScopes to ['global'] — the scope check does literal string matching, so ['posts', 'sites'] would always fail since auth.ts requests 'global' from WordPress.com OAuth. Reducing scope requires changing both auth.ts and the connector. - Slack: remove local syncContext from getDocument — the perf impact of uncached users.info calls is negligible for typical channels (bounded by unique users, not message count). * fix(connectors): align requiredScopes with auth.ts registrations The scope check in getMissingRequiredScopes does literal string matching against the OAuth token's granted scopes. requiredScopes must match what auth.ts actually requests (since that's what the provider returns). - HubSpot: use 'tickets' (legacy scope in auth.ts) instead of 'crm.objects.tickets.read' (v3 granular scope not requested) - Google Docs: use 'drive' (what auth.ts requests) instead of 'documents.readonly' and 'drive.readonly' (never requested, so never in the granted set) * fix(connectors): align Google Drive requiredScopes with auth.ts Google Drive connector required 'drive.readonly' but auth.ts requests 'drive' (the superset). Since scope validation does literal matching, this caused a spurious 'Additional permissions required' warning. --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brief description of what this PR does and why.
Fixes #(issue)
Type of Change
Testing
How has this been tested? What should reviewers focus on?
Checklist
Screenshots/Videos