@bubblelab/shared-schemas 0.1.110 → 0.1.112

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,26 +1,26 @@
1
1
  import { z } from 'zod';
2
- import { CredentialType } from './types.js';
2
+ import { CredentialType, type BubbleName } from './types.js';
3
3
  /**
4
4
  * Schema for a single input parameter that a capability accepts.
5
5
  * Inputs are user-configurable values (e.g., a Google Doc ID).
6
6
  */
7
7
  export declare const CapabilityInputSchema: z.ZodObject<{
8
8
  name: z.ZodString;
9
- type: z.ZodEnum<["string", "number", "boolean"]>;
9
+ type: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
10
10
  description: z.ZodString;
11
11
  required: z.ZodDefault<z.ZodBoolean>;
12
- default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
12
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
13
13
  }, "strip", z.ZodTypeAny, {
14
14
  name: string;
15
- type: "string" | "number" | "boolean";
15
+ type: "string" | "number" | "boolean" | "string[]";
16
16
  description: string;
17
17
  required: boolean;
18
- default?: string | number | boolean | undefined;
18
+ default?: string | number | boolean | string[] | undefined;
19
19
  }, {
20
20
  name: string;
21
- type: "string" | "number" | "boolean";
21
+ type: "string" | "number" | "boolean" | "string[]";
22
22
  description: string;
23
- default?: string | number | boolean | undefined;
23
+ default?: string | number | boolean | string[] | undefined;
24
24
  required?: boolean | undefined;
25
25
  }>;
26
26
  export type CapabilityInput = z.infer<typeof CapabilityInputSchema>;
@@ -32,14 +32,18 @@ export declare const CapabilityToolDefSchema: z.ZodObject<{
32
32
  name: z.ZodString;
33
33
  description: z.ZodString;
34
34
  parameterSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
35
+ /** Bubble names used internally by this tool (e.g., ['google-drive']). Used for dependency graph hierarchy. */
36
+ internalBubbles: z.ZodOptional<z.ZodArray<z.ZodType<BubbleName, z.ZodTypeDef, BubbleName>, "many">>;
35
37
  }, "strip", z.ZodTypeAny, {
36
38
  name: string;
37
39
  description: string;
38
40
  parameterSchema: Record<string, unknown>;
41
+ internalBubbles?: BubbleName[] | undefined;
39
42
  }, {
40
43
  name: string;
41
44
  description: string;
42
45
  parameterSchema: Record<string, unknown>;
46
+ internalBubbles?: BubbleName[] | undefined;
43
47
  }>;
44
48
  export type CapabilityToolDef = z.infer<typeof CapabilityToolDefSchema>;
45
49
  /**
@@ -56,35 +60,39 @@ export declare const CapabilityMetadataSchema: z.ZodObject<{
56
60
  requiredCredentials: z.ZodArray<z.ZodNativeEnum<typeof CredentialType>, "many">;
57
61
  inputs: z.ZodArray<z.ZodObject<{
58
62
  name: z.ZodString;
59
- type: z.ZodEnum<["string", "number", "boolean"]>;
63
+ type: z.ZodEnum<["string", "number", "boolean", "string[]"]>;
60
64
  description: z.ZodString;
61
65
  required: z.ZodDefault<z.ZodBoolean>;
62
- default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
66
+ default: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>;
63
67
  }, "strip", z.ZodTypeAny, {
64
68
  name: string;
65
- type: "string" | "number" | "boolean";
69
+ type: "string" | "number" | "boolean" | "string[]";
66
70
  description: string;
67
71
  required: boolean;
68
- default?: string | number | boolean | undefined;
72
+ default?: string | number | boolean | string[] | undefined;
69
73
  }, {
70
74
  name: string;
71
- type: "string" | "number" | "boolean";
75
+ type: "string" | "number" | "boolean" | "string[]";
72
76
  description: string;
73
- default?: string | number | boolean | undefined;
77
+ default?: string | number | boolean | string[] | undefined;
74
78
  required?: boolean | undefined;
75
79
  }>, "many">;
76
80
  tools: z.ZodArray<z.ZodObject<{
77
81
  name: z.ZodString;
78
82
  description: z.ZodString;
79
83
  parameterSchema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
84
+ /** Bubble names used internally by this tool (e.g., ['google-drive']). Used for dependency graph hierarchy. */
85
+ internalBubbles: z.ZodOptional<z.ZodArray<z.ZodType<BubbleName, z.ZodTypeDef, BubbleName>, "many">>;
80
86
  }, "strip", z.ZodTypeAny, {
81
87
  name: string;
82
88
  description: string;
83
89
  parameterSchema: Record<string, unknown>;
90
+ internalBubbles?: BubbleName[] | undefined;
84
91
  }, {
85
92
  name: string;
86
93
  description: string;
87
94
  parameterSchema: Record<string, unknown>;
95
+ internalBubbles?: BubbleName[] | undefined;
88
96
  }>, "many">;
89
97
  systemPromptAddition: z.ZodOptional<z.ZodString>;
90
98
  }, "strip", z.ZodTypeAny, {
@@ -94,16 +102,17 @@ export declare const CapabilityMetadataSchema: z.ZodObject<{
94
102
  name: string;
95
103
  description: string;
96
104
  parameterSchema: Record<string, unknown>;
105
+ internalBubbles?: BubbleName[] | undefined;
97
106
  }[];
98
107
  id: string;
99
108
  requiredCredentials: CredentialType[];
100
109
  version: string;
101
110
  inputs: {
102
111
  name: string;
103
- type: "string" | "number" | "boolean";
112
+ type: "string" | "number" | "boolean" | "string[]";
104
113
  description: string;
105
114
  required: boolean;
106
- default?: string | number | boolean | undefined;
115
+ default?: string | number | boolean | string[] | undefined;
107
116
  }[];
108
117
  icon?: string | undefined;
109
118
  category?: string | undefined;
@@ -115,14 +124,15 @@ export declare const CapabilityMetadataSchema: z.ZodObject<{
115
124
  name: string;
116
125
  description: string;
117
126
  parameterSchema: Record<string, unknown>;
127
+ internalBubbles?: BubbleName[] | undefined;
118
128
  }[];
119
129
  id: string;
120
130
  requiredCredentials: CredentialType[];
121
131
  inputs: {
122
132
  name: string;
123
- type: "string" | "number" | "boolean";
133
+ type: "string" | "number" | "boolean" | "string[]";
124
134
  description: string;
125
- default?: string | number | boolean | undefined;
135
+ default?: string | number | boolean | string[] | undefined;
126
136
  required?: boolean | undefined;
127
137
  }[];
128
138
  icon?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"capability-schema.d.ts","sourceRoot":"","sources":["../src/capability-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAMhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAIlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
1
+ {"version":3,"file":"capability-schema.d.ts","sourceRoot":"","sources":["../src/capability-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;EAQhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;IAIlC,+GAA+G;;;;;;;;;;;;EAE/G,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QATnC,+GAA+G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoB/G,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
package/dist/index.js CHANGED
@@ -5318,15 +5318,17 @@ function buildParameterObjectLiteral(parameters, options) {
5318
5318
  import { z as z20 } from "zod";
5319
5319
  var CapabilityInputSchema = z20.object({
5320
5320
  name: z20.string().min(1),
5321
- type: z20.enum(["string", "number", "boolean"]),
5321
+ type: z20.enum(["string", "number", "boolean", "string[]"]),
5322
5322
  description: z20.string(),
5323
5323
  required: z20.boolean().default(true),
5324
- default: z20.union([z20.string(), z20.number(), z20.boolean()]).optional()
5324
+ default: z20.union([z20.string(), z20.number(), z20.boolean(), z20.array(z20.string())]).optional()
5325
5325
  });
5326
5326
  var CapabilityToolDefSchema = z20.object({
5327
5327
  name: z20.string().min(1),
5328
5328
  description: z20.string().min(1),
5329
- parameterSchema: z20.record(z20.string(), z20.unknown())
5329
+ parameterSchema: z20.record(z20.string(), z20.unknown()),
5330
+ /** Bubble names used internally by this tool (e.g., ['google-drive']). Used for dependency graph hierarchy. */
5331
+ internalBubbles: z20.array(z20.string()).optional()
5330
5332
  });
5331
5333
  var CapabilityMetadataSchema = z20.object({
5332
5334
  id: z20.string().min(1),