Skip to content

v0.6.101: 11 new knowledgebase connectors, slack scopes update, login refinements#4858

Merged
waleedlatif1 merged 5 commits into
mainfrom
staging
Jun 3, 2026
Merged

v0.6.101: 11 new knowledgebase connectors, slack scopes update, login refinements#4858
waleedlatif1 merged 5 commits into
mainfrom
staging

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

icecrasher321 and others added 4 commits June 2, 2026 14:06
* fix(schedules): count usage lim error schedule as failed run

* remove backoff logic
* feat(connectors): add 11 knowledge base connectors (Gong, Grain, Fathom, Granola, incident.io, Rootly, Ashby, Greenhouse, DocuSign, Monday, GitLab)

* fix(granola): restore correct calendar_event field names (event_title/organiser/calendar_event_id/scheduled_start_time/scheduled_end_time/invitees)

* fix(connectors): correct Grain id field/include flags and incident.io timestamp value shape (verified vs raw API specs)

* feat(connectors): add scoping filters for Gong (host users), Fathom (meeting type/domain), Granola (folder/created-after)

* feat(connectors): add verified scoping filters (Grain, Rootly, Ashby, Greenhouse, DocuSign, GitLab) + clarify Monday board scope

* fix(connectors): docusign sandbox source URL, greenhouse scorecard cap, gong overlap; add incident.io status/mode filters

* chore(connectors): remove non-TSDoc inline comments

* fix(fathom): apply 14-day overlap to incremental created_after so late transcripts are recaptured

* fix(fathom): cache sourceUrl in header so getDocument preserves it; return concrete contentHash (drop omit/cast)

* fix(connectors): grain check transcript before formatting; gong cache date window across cursor pages

* fix(connectors): fathom skip meetings with no transcript/summary; docusign cache from_date across cursor pages

* fix(fathom): return metadata from getDocument (carried via header cache) for tag consistency

* fix(connectors): grain cache filter window across pages, greenhouse guard NaN page, rootly skip empty incidents

* feat(connectors): final audit — add verified scoping filters (grain team/type, granola+greenhouse createdBefore, gitlab milestone, rootly service/team/env), fix incident.io paused category + rootly severity-slug copy
…4855)

* fix(auth): show "account already exists" on duplicate email signup

* fix(auth): use exact path match for duplicate-email signup check
* fix(slack): request reactions:read in OAuth URL, drop im:history

* chore(slack): update read-messages missing-scope message to drop im:history
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jun 3, 2026 3:11am

Request Review

@cursor
Copy link
Copy Markdown

cursor Bot commented Jun 3, 2026

PR Summary

Medium Risk
Schedule execution behavior changes for usage-limit overages (now increment failure count); large new connector surface adds API/integration maintenance but is mostly additive.

Overview
Adds eleven knowledge base connectors (e.g. Ashby, DocuSign, Fathom, GitLab, Gong, Grain, Granola, Greenhouse) that list deferred stubs and hydrate plain-text documents for sync, with filters, tags, and validation wired into the connector registry.

Scheduled workflows: introduces shared buildScheduleFailureUpdate so every failure path (API route + background execution) applies the same claim clear, nextRunAt, consecutive-failure increment, and auto-disable logic. Usage-limit (402) hits now count as failed runs toward auto-disable while still scheduling the next normal cadence.

Granola: workflow block and docs gain optional folderId on list notes and webUrl on get note.

Slack read-messages: clarifies the missing-scope error—channel history scopes vs. no Sim-bot DM history.

Reviewed by Cursor Bugbot for commit b58cd1f. Configure here.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 3, 2026

Greptile Summary

This PR bundles four separate improvements: 11 new knowledge-base connectors (Ashby, DocuSign, Fathom, GitLab, Gong, Grain, Granola, Greenhouse, incident.io, Monday, Rootly), Slack OAuth scope updates (reactions:read added, im:history dropped), a fix to surface a clearer "account already exists" error during duplicate email signup, and a fix to count usage-limit (HTTP 402) preprocessing failures as failed schedule runs so they contribute toward the auto-disable threshold.

  • 11 new connectors: Each follows the existing deferred-content pattern with listDocuments/getDocument, API-key auth, and tag definitions; Fathom is the only one that caches listing metadata in syncContext rather than embedding it in the stub.
  • Schedule fix: buildScheduleFailureUpdate is extracted, exported, and reused across all failure paths; usage-limit hits now use a 1-hour retry cadence instead of being silently dropped, while still advancing failedCount toward MAX_CONSECUTIVE_FAILURES.
  • Auth fix: A before middleware hook queries the DB for an existing user with the submitted email and throws a typed USER_ALREADY_EXISTS error before better-auth's own handling fires.

Confidence Score: 4/5

Safe to merge with minor caveats; no blocking issues found.

The schedule fix and connector additions are well-structured and the core logic is sound. The auth middleware email check has a subtle case-sensitivity gap where the lowercased input is compared against potentially mixed-case stored emails via a case-sensitive eq(). The Fathom connector's syncContext-dependent metadata means any getDocument call that lacks the cache produces incomplete documents. The Monday.com API version jump skips many release cycles and could silently break existing tool calls if breaking changes were introduced.

apps/sim/lib/auth/auth.ts (email case-sensitivity in duplicate check), apps/sim/connectors/fathom/fathom.ts (syncContext-dependent document metadata), and apps/sim/tools/monday/utils.ts (large API version skip).

Important Files Changed

Filename Overview
apps/sim/lib/auth/auth.ts Adds a before middleware hook to detect duplicate email signups and throw a typed USER_ALREADY_EXISTS error; the DB lookup lowercases the input but uses a case-sensitive eq() comparison, which may silently miss existing mixed-case accounts.
apps/sim/background/schedule-execution.ts Extracts and exports buildScheduleFailureUpdate to centralize all failure-path schedule updates; no logic regressions detected.
apps/sim/app/api/schedules/execute/route.ts Adds 402 (usage limit) case that now calls buildScheduleFailureUpdate, correctly incrementing failure counters and scheduling retry at next cron run (or 1-hour fallback).
apps/sim/lib/oauth/oauth.ts Removes im:history and adds reactions:read to Slack scopes; changes DocuSign supportsRefreshTokenRotation to true — safe because the code already handles a null/absent new token via null-coalesce fallback.
apps/sim/connectors/fathom/fathom.ts New Fathom connector caches meeting headers in syncContext instead of the document stub; getDocument silently falls back to minimal/incorrect metadata when the cache is absent, producing incomplete index entries.
apps/sim/connectors/gong/gong.ts New Gong connector syncing call transcripts; correctly handles Basic auth with accessKey:accessKeySecret format detection and incremental sync with 14-day overlap window.
apps/sim/connectors/ashby/ashby.ts New Ashby connector syncing candidate profiles, notes, and interview feedback; correctly bounds per-candidate feedback requests with MAX_APPLICATIONS_FOR_FEEDBACK.
apps/sim/connectors/greenhouse/greenhouse.ts New Greenhouse connector using page-number-based cursor and RFC 5988 Link header for pagination; parallel fetch of activity feed and scorecards per candidate looks correct.
apps/sim/connectors/granola/granola.ts New Granola connector with folderId scoping, incremental sync, date filters, and fol_ pattern validation in validateConfig; well-structured with appropriate fallbacks.
apps/sim/connectors/registry.ts Registers all 11 new connectors; all imports resolve to newly-added connector modules.
apps/sim/tools/monday/utils.ts Bumps Monday.com API version header from 2024-10 to 2026-04; a large version skip that could introduce breaking field changes to existing Monday.com tool calls.
apps/sim/app/api/tools/slack/read-messages/route.ts Updated missing_scope error message to reflect that im:history is no longer requested and DM history is unsupported; consistent with the OAuth scope removal.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Schedule tick claims due schedule] --> B[preprocessExecution]
    B --> C{HTTP status code}
    C -- 401 --> D[Disable schedule]
    C -- 403 --> D
    C -- 404 --> D
    C -- 429 --> E[Retry in 5 min, reset infraRetry]
    C -- 402 Usage limit --> F[buildScheduleFailureUpdate\nnextRunAt = cron next OR now+1h]
    C -- 5xx retryable --> G[retryScheduleAfterInfraFailure\nbackoff + jitter]
    C -- other 5xx --> H[buildScheduleFailureUpdate\nnextRunAt = deployment or now+24h]
    C -- success --> I[runWorkflowExecution]
    F --> J[Increment failedCount\nSet lastFailedAt\nAuto-disable if >= MAX_CONSECUTIVE_FAILURES]
    H --> J
    I --> K{Execution result}
    K -- success --> L[Reset failedCount, advance nextRunAt]
    K -- failure --> M[buildScheduleFailureUpdate\nnextRunAt from blocks]
    M --> J
    G --> N{Retry attempts exhausted?}
    N -- yes --> H
    N -- no --> O[Set nextRunAt = now + backoff\nIncrement infraRetryCount]
Loading

Reviews (1): Last reviewed commit: "fix(slack): request reactions:read in OA..." | Re-trigger Greptile

Comment thread apps/sim/lib/auth/auth.ts
Comment thread apps/sim/connectors/fathom/fathom.ts Outdated
Comment thread apps/sim/tools/monday/utils.ts
@waleedlatif1 waleedlatif1 merged commit 3ba8668 into main Jun 3, 2026
19 checks passed
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.

2 participants