@vellumai/assistant 0.12.3-dev.202609222313.c4916bb → 0.12.3-dev.202609230043.e6fddec

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vellumai/assistant",
3
- "version": "0.12.3-dev.202609222313.c4916bb",
3
+ "version": "0.12.3-dev.202609230043.e6fddec",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "exports": {
@@ -33,6 +33,10 @@ export const GMAIL_API_BASE_URL =
33
33
  * requests Calendar-only). Resolving against Gmail read access turns a
34
34
  * downstream 403 into an actionable "reconnect Google and grant Gmail" error
35
35
  * at resolution time when the selected connection cannot read Gmail.
36
+ *
37
+ * Managed connections never carry this scope: Vellum's app grants Gmail as
38
+ * `https://mail.google.com/`, which `scopeDifference` in `oauth/scope-utils.ts`
39
+ * accepts as covering it.
36
40
  */
37
41
  export const GMAIL_REQUIRED_SCOPES = [
38
42
  "https://www.googleapis.com/auth/gmail.readonly",
@@ -14,6 +14,12 @@ Add an entry to `PROVIDER_SEED_DATA`. Required fields: `provider`, `authorizeUrl
14
14
 
15
15
  If the provider will support managed mode, set `managedServiceConfigKey` to a slug matching the key you will add to `ServicesSchema` (e.g. `"acme-oauth"`).
16
16
 
17
+ #### Scopes: your-own vs. managed
18
+
19
+ `defaultScopes` here is requested only by the user's own OAuth client. A managed connection authorizes against Vellum's OAuth app, whose defaults live in the platform's `provider_registry.json`. Google shows users warnings or errors for scopes not approved for the app, so the managed start endpoint rejects anything outside the platform registry's `extra_config.allowed_scopes`. Managed Google, for example, grants Gmail only as `https://mail.google.com/`, never `gmail.readonly` / `gmail.modify` / `gmail.send`.
20
+
21
+ So anything that names scopes for a managed connection (a hardcoded constant, a client hook, `requestedScopes` on an `oauth_connect` surface, a `--scopes` example in a skill) must use scopes from that approved list, not the `defaultScopes` names. A required-scope check that runs against managed grants must accept the approved equivalent: `grantedScopeCoversRequiredScope` in `scope-utils.ts` treats `mail.google.com` as covering `gmail.readonly`. Adding a scope to a managed flow means getting it approved in the provider console and adding it to `allowed_scopes` first.
22
+
17
23
  ### 2. _(managed only)_ Add a service schema — `../config/schemas/services.ts`
18
24
 
19
25
  Create a schema and export its type: