@vellumai/assistant 0.11.5-dev.202608252008.65007aa → 0.11.5-dev.202608252207.bb1179d
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 +1 -1
- package/src/__tests__/credential-routes.test.ts +17 -1
- package/src/cli/commands/credentials.help.ts +1 -1
- package/src/config/loader.ts +3 -0
- package/src/config/schemas/services.ts +24 -0
- package/src/oauth/seed-providers.ts +265 -0
- package/src/runtime/routes/credential-routes.ts +2 -1
package/package.json
CHANGED
|
@@ -749,12 +749,28 @@ describe("credentials routes", () => {
|
|
|
749
749
|
expect(entry.service).toBe("vercel");
|
|
750
750
|
expect(entry.field).toBe("api_token");
|
|
751
751
|
expect(entry.hasSecret).toBe(true);
|
|
752
|
-
expect(entry.scrubbedValue).toBe("****
|
|
752
|
+
expect(entry.scrubbedValue).toBe("supe****");
|
|
753
753
|
|
|
754
754
|
// AND the raw secret never appears anywhere in the response
|
|
755
755
|
expect(JSON.stringify(result)).not.toContain(SECRET_VALUE);
|
|
756
756
|
});
|
|
757
757
|
|
|
758
|
+
test("masked preview keeps a vendor token prefix", async () => {
|
|
759
|
+
const token = "cfat_000000000000000000000000000000000000abcd";
|
|
760
|
+
await setRoute!.handler({
|
|
761
|
+
body: {
|
|
762
|
+
service: "cloudflare",
|
|
763
|
+
field: "api_token",
|
|
764
|
+
value: token,
|
|
765
|
+
},
|
|
766
|
+
});
|
|
767
|
+
|
|
768
|
+
const result = (await listRoute!.handler({ body: {} })) as ListResponse;
|
|
769
|
+
expect(result.credentials).toHaveLength(1);
|
|
770
|
+
expect(result.credentials[0].scrubbedValue).toBe("cfat****");
|
|
771
|
+
expect(JSON.stringify(result)).not.toContain(token);
|
|
772
|
+
});
|
|
773
|
+
|
|
758
774
|
test("filters credentials by search substring", async () => {
|
|
759
775
|
/**
|
|
760
776
|
* The optional `search` filter restricts the listing to credentials
|
|
@@ -178,7 +178,7 @@ Arguments:
|
|
|
178
178
|
id (optional) Credential UUID for lookup by ID
|
|
179
179
|
|
|
180
180
|
Shows everything known about a credential without revealing the secret value.
|
|
181
|
-
The secret is masked to show only the
|
|
181
|
+
The secret is masked to show only the first 4 characters (e.g. cfat****).
|
|
182
182
|
|
|
183
183
|
Displayed fields include: label, creation/update timestamps, allowed tools,
|
|
184
184
|
allowed domains, OAuth2 scopes, account info, and injection template count.
|
package/src/config/loader.ts
CHANGED
|
@@ -179,6 +179,9 @@ export function getDeploymentContextDefaults(): Record<string, unknown> {
|
|
|
179
179
|
"todoist-oauth": managed,
|
|
180
180
|
"discord-oauth": managed,
|
|
181
181
|
"hubspot-oauth": managed,
|
|
182
|
+
"monday-oauth": managed,
|
|
183
|
+
"eventbrite-oauth": managed,
|
|
184
|
+
"calendly-oauth": managed,
|
|
182
185
|
},
|
|
183
186
|
};
|
|
184
187
|
}
|
|
@@ -136,6 +136,21 @@ const HubspotOAuthServiceSchema = BaseServiceSchema.extend({
|
|
|
136
136
|
mode: ServiceModeSchema.default("your-own"),
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
+
const MondayOAuthServiceSchema = BaseServiceSchema.extend({
|
|
140
|
+
mode: ServiceModeSchema.default("your-own"),
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
export const EventbriteOAuthServiceSchema = BaseServiceSchema.extend({
|
|
144
|
+
mode: ServiceModeSchema.default("your-own"),
|
|
145
|
+
});
|
|
146
|
+
export type EventbriteOAuthService = z.infer<
|
|
147
|
+
typeof EventbriteOAuthServiceSchema
|
|
148
|
+
>;
|
|
149
|
+
|
|
150
|
+
const CalendlyOAuthServiceSchema = BaseServiceSchema.extend({
|
|
151
|
+
mode: ServiceModeSchema.default("your-own"),
|
|
152
|
+
});
|
|
153
|
+
|
|
139
154
|
export const ServicesSchema = z.object({
|
|
140
155
|
inference: InferenceServiceSchema.default(InferenceServiceSchema.parse({})),
|
|
141
156
|
"image-generation": ImageGenerationServiceSchema.default(
|
|
@@ -184,6 +199,15 @@ export const ServicesSchema = z.object({
|
|
|
184
199
|
"hubspot-oauth": HubspotOAuthServiceSchema.default(
|
|
185
200
|
HubspotOAuthServiceSchema.parse({}),
|
|
186
201
|
),
|
|
202
|
+
"monday-oauth": MondayOAuthServiceSchema.default(
|
|
203
|
+
MondayOAuthServiceSchema.parse({}),
|
|
204
|
+
),
|
|
205
|
+
"eventbrite-oauth": EventbriteOAuthServiceSchema.default(
|
|
206
|
+
EventbriteOAuthServiceSchema.parse({}),
|
|
207
|
+
),
|
|
208
|
+
"calendly-oauth": CalendlyOAuthServiceSchema.default(
|
|
209
|
+
CalendlyOAuthServiceSchema.parse({}),
|
|
210
|
+
),
|
|
187
211
|
});
|
|
188
212
|
export type Services = z.infer<typeof ServicesSchema>;
|
|
189
213
|
|
|
@@ -684,6 +684,271 @@ export const PROVIDER_SEED_DATA: Record<
|
|
|
684
684
|
identityResponsePaths: ["email", "preferred_username"],
|
|
685
685
|
},
|
|
686
686
|
|
|
687
|
+
monday: {
|
|
688
|
+
provider: "monday",
|
|
689
|
+
authorizeUrl: "https://auth.monday.com/oauth2/authorize",
|
|
690
|
+
tokenExchangeUrl: "https://auth.monday.com/oauth2/token",
|
|
691
|
+
pingUrl: "https://api.monday.com/v2",
|
|
692
|
+
pingMethod: "POST",
|
|
693
|
+
pingHeaders: { "Content-Type": "application/json" },
|
|
694
|
+
pingBody: { query: "{ me { id name email } }" },
|
|
695
|
+
baseUrl: "https://api.monday.com",
|
|
696
|
+
displayLabel: "monday.com",
|
|
697
|
+
description: "Boards, items, docs, and updates",
|
|
698
|
+
dashboardUrl: "https://auth.monday.com/apps",
|
|
699
|
+
clientIdPlaceholder: null,
|
|
700
|
+
// Simple Icons does not host a monday.com mark (both `monday` and
|
|
701
|
+
// `mondaydotcom` 404 on the CDN), so use the documented thesvg fallback.
|
|
702
|
+
logoUrl:
|
|
703
|
+
"https://cdn.jsdelivr.net/gh/glincker/thesvg@main/public/icons/monday/default.svg",
|
|
704
|
+
// monday tokens do not expire under the legacy OAuth flow and no refresh
|
|
705
|
+
// token is issued, so there is no refreshUrl. The newer OAuth 2.1 flow
|
|
706
|
+
// adds expiry/refresh/revocation but is opt-in per app version in the
|
|
707
|
+
// Developer Center and posts JSON (not form-encoded) credentials, so it
|
|
708
|
+
// is deliberately not used here.
|
|
709
|
+
defaultScopes: [
|
|
710
|
+
"me:read",
|
|
711
|
+
"account:read",
|
|
712
|
+
"users:read",
|
|
713
|
+
"teams:read",
|
|
714
|
+
"workspaces:read",
|
|
715
|
+
"boards:read",
|
|
716
|
+
"boards:write",
|
|
717
|
+
"items:read",
|
|
718
|
+
"items:write",
|
|
719
|
+
"docs:read",
|
|
720
|
+
"updates:read",
|
|
721
|
+
"updates:write",
|
|
722
|
+
"assets:read",
|
|
723
|
+
"tags:read",
|
|
724
|
+
"notifications:write",
|
|
725
|
+
],
|
|
726
|
+
availableScopes: [
|
|
727
|
+
{ scope: "me:read", description: "Read the user's profile information" },
|
|
728
|
+
{
|
|
729
|
+
scope: "account:read",
|
|
730
|
+
description: "Read general information about the account",
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
scope: "users:read",
|
|
734
|
+
description: "Read profile information of the account's users",
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
scope: "users:write",
|
|
738
|
+
description: "Modify profile information of the account's users",
|
|
739
|
+
},
|
|
740
|
+
{
|
|
741
|
+
scope: "teams:read",
|
|
742
|
+
description: "Read information about the account's teams",
|
|
743
|
+
},
|
|
744
|
+
{ scope: "teams:write", description: "Modify the account's teams" },
|
|
745
|
+
{
|
|
746
|
+
scope: "workspaces:read",
|
|
747
|
+
description: "Read a user's workspaces data",
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
scope: "workspaces:write",
|
|
751
|
+
description: "Modify a user's workspaces data",
|
|
752
|
+
},
|
|
753
|
+
{ scope: "boards:read", description: "Read a user's board data" },
|
|
754
|
+
{ scope: "boards:write", description: "Modify a user's board data" },
|
|
755
|
+
{ scope: "items:read", description: "Read a user's item data" },
|
|
756
|
+
{ scope: "items:write", description: "Modify a user's item data" },
|
|
757
|
+
{ scope: "docs:read", description: "Read a user's docs" },
|
|
758
|
+
{ scope: "docs:write", description: "Modify a user's docs" },
|
|
759
|
+
{
|
|
760
|
+
scope: "updates:read",
|
|
761
|
+
description: "Read updates and replies the user can see",
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
scope: "updates:write",
|
|
765
|
+
description: "Post or edit updates on behalf of the user",
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
scope: "assets:read",
|
|
769
|
+
description: "Read data from assets the user has access to",
|
|
770
|
+
},
|
|
771
|
+
{ scope: "tags:read", description: "Read the account's tags" },
|
|
772
|
+
{
|
|
773
|
+
scope: "notifications:write",
|
|
774
|
+
description: "Send notifications on behalf of the user",
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
scope: "webhooks:read",
|
|
778
|
+
description: "Read existing webhooks configuration",
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
scope: "webhooks:write",
|
|
782
|
+
description: "Create and modify webhooks",
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
scope: "departments:read",
|
|
786
|
+
description: "Read the account's department data",
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
scope: "departments:write",
|
|
790
|
+
description: "Modify the account's departments",
|
|
791
|
+
},
|
|
792
|
+
],
|
|
793
|
+
tokenEndpointAuthMethod: "client_secret_post",
|
|
794
|
+
// 17337/17338 are taken by eventbrite/calendly (all three providers
|
|
795
|
+
// landed in parallel and independently picked the next free port at the
|
|
796
|
+
// time); 17339 is the real next-free slot once all three are seeded
|
|
797
|
+
// together.
|
|
798
|
+
loopbackPort: 17339,
|
|
799
|
+
managedServiceConfigKey: "monday-oauth",
|
|
800
|
+
injectionTemplates: [
|
|
801
|
+
{
|
|
802
|
+
hostPattern: "api.monday.com",
|
|
803
|
+
injectionType: "header",
|
|
804
|
+
headerName: "Authorization",
|
|
805
|
+
valuePrefix: "Bearer ",
|
|
806
|
+
},
|
|
807
|
+
],
|
|
808
|
+
appType: "App",
|
|
809
|
+
identityUrl: "https://api.monday.com/v2",
|
|
810
|
+
identityMethod: "POST",
|
|
811
|
+
identityHeaders: { "Content-Type": "application/json" },
|
|
812
|
+
identityBody: { query: "{ me { id name email } }" },
|
|
813
|
+
identityResponsePaths: ["data.me.name", "data.me.email"],
|
|
814
|
+
},
|
|
815
|
+
|
|
816
|
+
eventbrite: {
|
|
817
|
+
provider: "eventbrite",
|
|
818
|
+
authorizeUrl: "https://www.eventbrite.com/oauth/authorize",
|
|
819
|
+
tokenExchangeUrl: "https://www.eventbrite.com/oauth/token",
|
|
820
|
+
refreshUrl: "https://www.eventbrite.com/oauth/token",
|
|
821
|
+
pingUrl: "https://www.eventbriteapi.com/v3/users/me/",
|
|
822
|
+
baseUrl: "https://www.eventbriteapi.com",
|
|
823
|
+
displayLabel: "Eventbrite",
|
|
824
|
+
description: "Events, attendees, and ticket orders",
|
|
825
|
+
dashboardUrl: "https://www.eventbrite.com/platform/api-keys/",
|
|
826
|
+
clientIdPlaceholder: null,
|
|
827
|
+
// Simple Icons does not host an Eventbrite mark (cdn.simpleicons.org
|
|
828
|
+
// 404s), so use the documented thesvg fallback.
|
|
829
|
+
logoUrl:
|
|
830
|
+
"https://cdn.jsdelivr.net/gh/glincker/thesvg@main/public/icons/eventbrite/default.svg",
|
|
831
|
+
// Eventbrite has no granular OAuth scope system: an access token carries
|
|
832
|
+
// the full permissions of the user who authorized it, and the authorize
|
|
833
|
+
// endpoint ignores a `scope` parameter. Seed an empty set rather than
|
|
834
|
+
// inventing scope strings the provider would silently drop (same shape
|
|
835
|
+
// as Notion).
|
|
836
|
+
defaultScopes: [],
|
|
837
|
+
tokenEndpointAuthMethod: "client_secret_post",
|
|
838
|
+
loopbackPort: 17337,
|
|
839
|
+
managedServiceConfigKey: "eventbrite-oauth",
|
|
840
|
+
injectionTemplates: [
|
|
841
|
+
{
|
|
842
|
+
hostPattern: "www.eventbriteapi.com",
|
|
843
|
+
injectionType: "header",
|
|
844
|
+
headerName: "Authorization",
|
|
845
|
+
valuePrefix: "Bearer ",
|
|
846
|
+
},
|
|
847
|
+
],
|
|
848
|
+
appType: "App",
|
|
849
|
+
identityUrl: "https://www.eventbriteapi.com/v3/users/me/",
|
|
850
|
+
identityResponsePaths: ["name", "first_name"],
|
|
851
|
+
},
|
|
852
|
+
|
|
853
|
+
calendly: {
|
|
854
|
+
provider: "calendly",
|
|
855
|
+
authorizeUrl: "https://auth.calendly.com/oauth/authorize",
|
|
856
|
+
tokenExchangeUrl: "https://auth.calendly.com/oauth/token",
|
|
857
|
+
pingUrl: "https://api.calendly.com/users/me",
|
|
858
|
+
baseUrl: "https://api.calendly.com",
|
|
859
|
+
displayLabel: "Calendly",
|
|
860
|
+
description: "Scheduling links and meetings",
|
|
861
|
+
dashboardUrl: "https://calendly.com/integrations/api_webhooks",
|
|
862
|
+
clientIdPlaceholder: null,
|
|
863
|
+
logoUrl: "https://cdn.simpleicons.org/calendly",
|
|
864
|
+
// A :write scope implicitly grants the matching :read in the same domain,
|
|
865
|
+
// so the baseline stays at the six that map to reading schedule data and
|
|
866
|
+
// creating bookings/links. Organization-wide visibility is opt-in.
|
|
867
|
+
defaultScopes: [
|
|
868
|
+
"users:read",
|
|
869
|
+
"event_types:read",
|
|
870
|
+
"scheduled_events:read",
|
|
871
|
+
"availability:read",
|
|
872
|
+
"scheduled_events:write",
|
|
873
|
+
"scheduling_links:write",
|
|
874
|
+
],
|
|
875
|
+
availableScopes: [
|
|
876
|
+
{ scope: "users:read", description: "Read the connected user's profile" },
|
|
877
|
+
{
|
|
878
|
+
scope: "event_types:read",
|
|
879
|
+
description: "Read event types and their available times",
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
scope: "event_types:write",
|
|
883
|
+
description: "Create and update event types",
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
scope: "scheduled_events:read",
|
|
887
|
+
description: "Read scheduled events and invitees",
|
|
888
|
+
},
|
|
889
|
+
{
|
|
890
|
+
scope: "scheduled_events:write",
|
|
891
|
+
description: "Create invitees, cancel events, mark no-shows",
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
scope: "availability:read",
|
|
895
|
+
description: "Read busy times and availability schedules",
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
scope: "availability:write",
|
|
899
|
+
description: "Update event type availability",
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
scope: "scheduling_links:write",
|
|
903
|
+
description: "Create single-use scheduling links",
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
scope: "shares:write",
|
|
907
|
+
description: "Create customized single-use scheduling links",
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
scope: "organizations:read",
|
|
911
|
+
description: "Read organization data and memberships",
|
|
912
|
+
},
|
|
913
|
+
{
|
|
914
|
+
scope: "groups:read",
|
|
915
|
+
description: "Read group details and relationships",
|
|
916
|
+
},
|
|
917
|
+
{
|
|
918
|
+
scope: "webhooks:read",
|
|
919
|
+
description: "Read webhook subscriptions",
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
scope: "webhooks:write",
|
|
923
|
+
description: "Create and delete webhook subscriptions",
|
|
924
|
+
},
|
|
925
|
+
{ scope: "contacts:read", description: "Read contact details" },
|
|
926
|
+
{
|
|
927
|
+
scope: "contacts:write",
|
|
928
|
+
description: "Create, update, and delete contacts",
|
|
929
|
+
},
|
|
930
|
+
],
|
|
931
|
+
tokenEndpointAuthMethod: "client_secret_basic",
|
|
932
|
+
// 17337 is taken by eventbrite (both providers landed in parallel and
|
|
933
|
+
// independently picked the next free port at the time); 17338 is the
|
|
934
|
+
// real next-free slot once both are seeded together.
|
|
935
|
+
loopbackPort: 17338,
|
|
936
|
+
managedServiceConfigKey: "calendly-oauth",
|
|
937
|
+
injectionTemplates: [
|
|
938
|
+
{
|
|
939
|
+
hostPattern: "api.calendly.com",
|
|
940
|
+
injectionType: "header",
|
|
941
|
+
headerName: "Authorization",
|
|
942
|
+
valuePrefix: "Bearer ",
|
|
943
|
+
},
|
|
944
|
+
],
|
|
945
|
+
revokeUrl: "https://auth.calendly.com/oauth/revoke",
|
|
946
|
+
revokeBodyTemplate: { token: "{access_token}" },
|
|
947
|
+
appType: "App",
|
|
948
|
+
identityUrl: "https://api.calendly.com/users/me",
|
|
949
|
+
identityResponsePaths: ["resource.email", "resource.name"],
|
|
950
|
+
},
|
|
951
|
+
|
|
687
952
|
figma: {
|
|
688
953
|
provider: "figma",
|
|
689
954
|
authorizeUrl: "https://www.figma.com/oauth",
|
|
@@ -72,7 +72,8 @@ function scrubSecret(secret: string | undefined): string {
|
|
|
72
72
|
if (secret.length <= 4) {
|
|
73
73
|
return "****";
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
// Keep the leading 4 characters so vendor prefixes stay visible.
|
|
76
|
+
return secret.slice(0, 4) + "****";
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
function safeGetConnectionByProvider(
|