• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

thoughtspot / mcp-server / 29141856142
89%

Build:
DEFAULT BRANCH: main
Ran 11 Jul 2026 05:51AM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

11 Jul 2026 05:50AM UTC coverage: 88.793% (+0.4%) from 88.411%
29141856142

push

github

web-flow
SCAL-319970: Multi-org support (list_orgs / switch_org, keep-warm token, idle TTL) (#176)

* SCAL-319970 Multi-org on merged main (post-#165 extraction)

Applies the multi-org feature on top of merged main (#165 auth extraction),
reconciled with intervening main work:
- 3-way merged types.ts and tool-definitions.ts so #171's answer_data_source_id
  coexists with the org types/tools (a blind copy of the pre-#171 branch had
  reverted it, breaking streaming-utils.ts).
- Auth-adjacent bits ride the @thoughtspot/mcp-auth hooks in index.ts: authMode
  (enrichMcpRequestProps -> oauth, extendProps -> bearer/token), extendGrantProps
  carrying refreshToken/expiry into the grant for keep-warm, UserTokenStore export.
- All org logic (list_orgs/switch_org, OrgService, UserTokenStore DO, keep-warm,
  isolation/fan-out/F2a/F4/T3 + tests) unchanged app-side.

Requires @thoughtspot/mcp-auth with the extendGrantProps hook.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* SCAL-319970 Gate multi-org on a post-change grant (backward compat until re-auth)

A grant minted before multi-org shipped has no refresh token in its props
(extendGrantProps adds it at login). areOrgToolsAvailable() now also requires
hasMultiOrgGrant() (refreshToken present), so such sessions:
- do NOT see list_orgs/switch_org, and
- get NO org overlay/minting — they keep the pre-multi-org behavior (login token,
  no forced re-mint) until the user re-authenticates.

This fixes the observed break where an old grant hit "authentication expired"
because the org overlay tried to mint against a stale global token. Tests cover
both: old grant hides org tools and applies no overlay.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* SCAL-319970 Decide multi-org eligibility once in postInit (refresh-token presence)

Move the pre/post-multi-org grant check to a single init-time decision:
postInit sets grantHasRefreshToken = (props.refreshToken present), and
hasMultiOrgGrant() reads that f... (continued)

804 of 937 branches covered (85.81%)

Branch coverage included in aggregate %.

317 of 345 new or added lines in 12 files covered. (91.88%)

2 existing lines in 1 file now uncovered.

1573 of 1740 relevant lines covered (90.4%)

1092.63 hits per line

Uncovered Changes

Lines Coverage ∆ File
10
70.59
src/storage-service/org-storage-service.ts
8
91.71
4.17% src/servers/mcp-server.ts
6
83.76
src/servers/user-token-store-server.ts
2
94.78
-3.9% src/thoughtspot/thoughtspot-client.ts
1
35.8
-1.38% src/index.ts
1
87.67
1.21% src/servers/mcp-server-base.ts

Coverage Regressions

Lines Coverage ∆ File
2
91.71
4.17% src/servers/mcp-server.ts
Jobs
ID Job ID Ran Files Coverage
1 29141856142.1 11 Jul 2026 05:51AM UTC 32
88.79
GitHub Action Run
Source Files on build 29141856142
  • Tree
  • List 32
  • Changed 9
  • Source Changed 9
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29141856142
  • 5a9d76b7 on github
  • Prev Build on main (#29043473952)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc