@bubblelab/shared-schemas 0.1.154 → 0.1.156

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.
@@ -1,5 +1,13 @@
1
1
  import { BubbleName, CredentialType } from './types.js';
2
2
  import { z } from '@hono/zod-openapi';
3
+ /**
4
+ * Structured credential requirements separating required from optional credentials.
5
+ * Used by BubbleInjector.findCredentials() and propagated through validation/execution layers.
6
+ */
7
+ export interface CredentialRequirements {
8
+ required: Record<string, CredentialType[]>;
9
+ optional: Record<string, CredentialType[]>;
10
+ }
3
11
  /**
4
12
  * Configuration for a credential type displayed in the UI
5
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"credential-schema.d.ts","sourceRoot":"","sources":["../src/credential-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AActC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnD;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAsUb,CAAC;AAEhE;;GAEG;AACH,wBAAgB,0BAA0B,IAAI,MAAM,CAQnD;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAwC7D,CAAC;AAEF,+BAA+B;AAC/B,eAAO,MAAM,kBAAkB,qBAgB7B,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,oBAAoB,qBAI/B,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GACrB,QAAQ,GACR,c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ZodObject<{
204
204
  request: z.ZodObject<{
205
205
  flowId: z.ZodString;
206
206
  flowCode: z.ZodString;
207
- requiredCredentials: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
207
+ credentialRequirements: z.ZodObject<{
208
+ required: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
209
+ optional: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
210
+ }, "strip", z.ZodTypeAny, {
211
+ required: CredentialType[];
212
+ optional: CredentialType[];
213
+ }, {
214
+ required: CredentialType[];
215
+ optional: CredentialType[];
216
+ }>;
208
217
  description: z.ZodString;
209
218
  }, "strip", z.ZodTypeAny, {
210
219
  description: string;
211
220
  flowId: string;
212
- requiredCredentials: CredentialType[];
213
221
  flowCode: string;
222
+ credentialRequirements: {
223
+ required: CredentialType[];
224
+ optional: CredentialType[];
225
+ };
214
226
  }, {
215
227
  description: string;
216
228
  flowId: string;
217
- requiredCredentials: CredentialType[];
218
229
  flowCode: string;
230
+ credentialRequirements: {
231
+ required: CredentialType[];
232
+ optional: CredentialType[];
233
+ };
219
234
  }>;
220
235
  }, "strip", z.ZodTypeAny, {
221
236
  type: "context_request";
@@ -224,8 +239,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
224
239
  request: {
225
240
  description: string;
226
241
  flowId: string;
227
- requiredCredentials: CredentialType[];
228
242
  flowCode: string;
243
+ credentialRequirements: {
244
+ required: CredentialType[];
245
+ optional: CredentialType[];
246
+ };
229
247
  };
230
248
  }, {
231
249
  type: "context_request";
@@ -234,8 +252,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
234
252
  request: {
235
253
  description: string;
236
254
  flowId: string;
237
- requiredCredentials: CredentialType[];
238
255
  flowCode: string;
256
+ credentialRequirements: {
257
+ required: CredentialType[];
258
+ optional: CredentialType[];
259
+ };
239
260
  };
240
261
  }>, z.ZodObject<{
241
262
  id: z.ZodString;
@@ -250,18 +271,33 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
250
271
  originalRequest: z.ZodOptional<z.ZodObject<{
251
272
  flowId: z.ZodString;
252
273
  flowCode: z.ZodString;
253
- requiredCredentials: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
274
+ credentialRequirements: z.ZodObject<{
275
+ required: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
276
+ optional: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
277
+ }, "strip", z.ZodTypeAny, {
278
+ required: CredentialType[];
279
+ optional: CredentialType[];
280
+ }, {
281
+ required: CredentialType[];
282
+ optional: CredentialType[];
283
+ }>;
254
284
  description: z.ZodString;
255
285
  }, "strip", z.ZodTypeAny, {
256
286
  description: string;
257
287
  flowId: string;
258
- requiredCredentials: CredentialType[];
259
288
  flowCode: string;
289
+ credentialRequirements: {
290
+ required: CredentialType[];
291
+ optional: CredentialType[];
292
+ };
260
293
  }, {
261
294
  description: string;
262
295
  flowId: string;
263
- requiredCredentials: CredentialType[];
264
296
  flowCode: string;
297
+ credentialRequirements: {
298
+ required: CredentialType[];
299
+ optional: CredentialType[];
300
+ };
265
301
  }>>;
266
302
  }, "strip", z.ZodTypeAny, {
267
303
  status: "error" | "success" | "rejected";
@@ -271,8 +307,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
271
307
  originalRequest?: {
272
308
  description: string;
273
309
  flowId: string;
274
- requiredCredentials: CredentialType[];
275
310
  flowCode: string;
311
+ credentialRequirements: {
312
+ required: CredentialType[];
313
+ optional: CredentialType[];
314
+ };
276
315
  } | undefined;
277
316
  }, {
278
317
  status: "error" | "success" | "rejected";
@@ -282,8 +321,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
282
321
  originalRequest?: {
283
322
  description: string;
284
323
  flowId: string;
285
- requiredCredentials: CredentialType[];
286
324
  flowCode: string;
325
+ credentialRequirements: {
326
+ required: CredentialType[];
327
+ optional: CredentialType[];
328
+ };
287
329
  } | undefined;
288
330
  }>;
289
331
  credentialTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -299,8 +341,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
299
341
  originalRequest?: {
300
342
  description: string;
301
343
  flowId: string;
302
- requiredCredentials: CredentialType[];
303
344
  flowCode: string;
345
+ credentialRequirements: {
346
+ required: CredentialType[];
347
+ optional: CredentialType[];
348
+ };
304
349
  } | undefined;
305
350
  };
306
351
  credentialTypes?: string[] | undefined;
@@ -316,8 +361,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
316
361
  originalRequest?: {
317
362
  description: string;
318
363
  flowId: string;
319
- requiredCredentials: CredentialType[];
320
364
  flowCode: string;
365
+ credentialRequirements: {
366
+ required: CredentialType[];
367
+ optional: CredentialType[];
368
+ };
321
369
  } | undefined;
322
370
  };
323
371
  credentialTypes?: string[] | undefined;
@@ -512,8 +560,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
512
560
  request: {
513
561
  description: string;
514
562
  flowId: string;
515
- requiredCredentials: CredentialType[];
516
563
  flowCode: string;
564
+ credentialRequirements: {
565
+ required: CredentialType[];
566
+ optional: CredentialType[];
567
+ };
517
568
  };
518
569
  } | {
519
570
  type: "context_response";
@@ -527,8 +578,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
527
578
  originalRequest?: {
528
579
  description: string;
529
580
  flowId: string;
530
- requiredCredentials: CredentialType[];
531
581
  flowCode: string;
582
+ credentialRequirements: {
583
+ required: CredentialType[];
584
+ optional: CredentialType[];
585
+ };
532
586
  } | undefined;
533
587
  };
534
588
  credentialTypes?: string[] | undefined;
@@ -623,8 +677,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
623
677
  request: {
624
678
  description: string;
625
679
  flowId: string;
626
- requiredCredentials: CredentialType[];
627
680
  flowCode: string;
681
+ credentialRequirements: {
682
+ required: CredentialType[];
683
+ optional: CredentialType[];
684
+ };
628
685
  };
629
686
  } | {
630
687
  type: "context_response";
@@ -638,8 +695,11 @@ export declare const generateBubbleFlowCodeSchema: z.ZodObject<{
638
695
  originalRequest?: {
639
696
  description: string;
640
697
  flowId: string;
641
- requiredCredentials: CredentialType[];
642
698
  flowCode: string;
699
+ credentialRequirements: {
700
+ required: CredentialType[];
701
+ optional: CredentialType[];
702
+ };
643
703
  } | undefined;
644
704
  };
645
705
  credentialTypes?: string[] | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"generate-bubbleflow-schema.d.ts","sourceRoot":"","sources":["../src/generate-bubbleflow-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKzC,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;EA2CE,CAAC;AAGhD,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4FE,CAAC;AAGxD,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkGL,CAAC;AACzC,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,oCAAoC,CAC5C,CAAC;AACF,MAAM,MAAM,iCAAiC,GAAG,CAAC,CAAC,KAAK,CACrD,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAC7D,OAAO,wCAAwC,CAChD,CAAC;AACF,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAC9C,OAAO,gCAAgC,CACxC,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -903,10 +903,6 @@ var OAUTH_PROVIDERS = {
903
903
  "remote_files:share",
904
904
  // Assistant (requires admin)
905
905
  "assistant:write",
906
- // Search (requires admin)
907
- "search:read.files",
908
- "search:read.public",
909
- "search:read.users",
910
906
  // Team Preferences (requires admin)
911
907
  "team.preferences:read"
912
908
  ],
@@ -1228,22 +1224,6 @@ var OAUTH_PROVIDERS = {
1228
1224
  description: "Respond in Slack AI threads",
1229
1225
  defaultEnabled: true
1230
1226
  },
1231
- // Search
1232
- {
1233
- scope: "search:read.files",
1234
- description: "Search files",
1235
- defaultEnabled: true
1236
- },
1237
- {
1238
- scope: "search:read.public",
1239
- description: "Search public channels",
1240
- defaultEnabled: true
1241
- },
1242
- {
1243
- scope: "search:read.users",
1244
- description: "Search for users",
1245
- defaultEnabled: true
1246
- },
1247
1227
  // Team Preferences
1248
1228
  {
1249
1229
  scope: "team.preferences:read",
@@ -3196,6 +3176,9 @@ var validateBubbleFlowCodeResponseSchema = z9.object({
3196
3176
  requiredCredentials: z9.record(z9.string(), z9.array(z9.string())).optional().openapi({
3197
3177
  description: "Required credentials for the bubbles in the code"
3198
3178
  }),
3179
+ optionalCredentials: z9.record(z9.string(), z9.array(z9.string())).optional().openapi({
3180
+ description: "Optional credentials keyed by bubble name (from wildcard bubbles, OPTIONAL_CREDENTIALS set, and capability optionalCredentials)"
3181
+ }),
3199
3182
  metadata: z9.object({
3200
3183
  validatedAt: z9.string().openapi({
3201
3184
  description: "Timestamp when validation was performed"
@@ -3259,7 +3242,10 @@ var CoffeeClarificationEventSchema = z10.object({
3259
3242
  var CoffeeRequestExternalContextEventSchema = z10.object({
3260
3243
  flowId: z10.string().describe("Unique ID for this context request"),
3261
3244
  flowCode: z10.string().describe("Validated BubbleFlow TypeScript code to execute"),
3262
- requiredCredentials: z10.array(z10.nativeEnum(CredentialType)).describe("List of credential types needed to run this flow"),
3245
+ credentialRequirements: z10.object({
3246
+ required: z10.array(z10.nativeEnum(CredentialType)).describe("Credential types that must be provided"),
3247
+ optional: z10.array(z10.nativeEnum(CredentialType)).describe("Credential types that can optionally be provided")
3248
+ }).describe("Required and optional credentials for this flow"),
3263
3249
  description: z10.string().describe("User-friendly description of what this flow will do")
3264
3250
  });
3265
3251
  var CoffeeContextAnswerSchema = z10.object({