@caplets/core 0.17.0 → 0.18.1

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,28 +1,241 @@
1
+ import { z } from "zod";
1
2
  export declare const operations: readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"];
3
+ export declare const mcpOperations: readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool", "list_resources", "search_resources", "list_resource_templates", "read_resource", "list_prompts", "search_prompts", "get_prompt", "complete"];
4
+ export type GeneratedOperation = (typeof operations)[number];
5
+ export type GeneratedMcpOperation = (typeof mcpOperations)[number];
6
+ export type CapletSchemaBackend = {
7
+ backend: string;
8
+ };
2
9
  export declare const generatedToolInputDescriptions: {
3
- readonly operation: "Wrapper operation: get_caplet, check_backend, list_tools, search_tools, get_tool, or call_tool.";
4
- readonly query: "Required for search_tools only.";
5
- readonly limit: "Optional search_tools result limit.";
10
+ readonly operation: "Wrapper operation: get_caplet, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.";
11
+ readonly query: "Required for search operations only.";
12
+ readonly limit: "Optional list/search result limit.";
6
13
  readonly tool: "Exact downstream tool name for get_tool or call_tool.";
7
- readonly arguments: "Required JSON object for call_tool arguments/downstream inputs.";
14
+ readonly arguments: "JSON object for call_tool arguments/downstream inputs or get_prompt arguments.";
8
15
  readonly fields: "Optional call_tool structured output paths when outputSchema allows it.";
16
+ readonly uri: "Exact downstream resource URI for read_resource.";
17
+ readonly prompt: "Exact downstream prompt name for get_prompt.";
18
+ readonly ref: "Completion target reference for complete.";
19
+ readonly argument: "Completion argument object for complete.";
20
+ };
21
+ export declare const completionRefSchema: z.ZodUnion<readonly [z.ZodObject<{
22
+ type: z.ZodLiteral<"prompt">;
23
+ name: z.ZodString;
24
+ }, z.core.$strict>, z.ZodObject<{
25
+ type: z.ZodLiteral<"resourceTemplate">;
26
+ uri: z.ZodString;
27
+ }, z.core.$strict>]>;
28
+ export declare const completionArgumentSchema: z.ZodObject<{
29
+ name: z.ZodString;
30
+ value: z.ZodString;
31
+ }, z.core.$strict>;
32
+ export declare function generatedToolInputSchemaForCaplet(caplet: CapletSchemaBackend): z.ZodObject<{
33
+ uri?: z.ZodOptional<z.ZodString>;
34
+ prompt?: z.ZodOptional<z.ZodString>;
35
+ ref?: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
36
+ type: z.ZodLiteral<"prompt">;
37
+ name: z.ZodString;
38
+ }, z.core.$strict>, z.ZodObject<{
39
+ type: z.ZodLiteral<"resourceTemplate">;
40
+ uri: z.ZodString;
41
+ }, z.core.$strict>]>>;
42
+ argument?: z.ZodOptional<z.ZodObject<{
43
+ name: z.ZodString;
44
+ value: z.ZodString;
45
+ }, z.core.$strict>>;
46
+ query: z.ZodOptional<z.ZodString>;
47
+ limit: z.ZodOptional<z.ZodNumber>;
48
+ tool: z.ZodOptional<z.ZodString>;
49
+ arguments: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodAny>>>;
50
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
51
+ operation: z.ZodEnum<{
52
+ get_caplet: "get_caplet";
53
+ check_backend: "check_backend";
54
+ list_tools: "list_tools";
55
+ search_tools: "search_tools";
56
+ get_tool: "get_tool";
57
+ call_tool: "call_tool";
58
+ }>;
59
+ }, z.core.$strict>;
60
+ export declare const generatedToolInputSchema: z.ZodObject<{
61
+ query: z.ZodOptional<z.ZodString>;
62
+ limit: z.ZodOptional<z.ZodNumber>;
63
+ tool: z.ZodOptional<z.ZodString>;
64
+ arguments: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodAny>>>;
65
+ fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
66
+ operation: z.ZodEnum<{
67
+ get_caplet: "get_caplet";
68
+ check_backend: "check_backend";
69
+ list_tools: "list_tools";
70
+ search_tools: "search_tools";
71
+ get_tool: "get_tool";
72
+ call_tool: "call_tool";
73
+ }>;
74
+ }, z.core.$strict>;
75
+ export declare function generatedToolInputJsonSchemaForCaplet(caplet: CapletSchemaBackend): {
76
+ readonly type: "object";
77
+ readonly properties: {
78
+ readonly uri?: {
79
+ type: string;
80
+ description: "Exact downstream resource URI for read_resource.";
81
+ };
82
+ readonly prompt?: {
83
+ type: string;
84
+ description: "Exact downstream prompt name for get_prompt.";
85
+ };
86
+ readonly ref?: {
87
+ oneOf: ({
88
+ type: string;
89
+ properties: {
90
+ type: {
91
+ const: string;
92
+ };
93
+ name: {
94
+ type: string;
95
+ minLength: number;
96
+ };
97
+ uri?: never;
98
+ };
99
+ required: string[];
100
+ additionalProperties: boolean;
101
+ } | {
102
+ type: string;
103
+ properties: {
104
+ type: {
105
+ const: string;
106
+ };
107
+ uri: {
108
+ type: string;
109
+ minLength: number;
110
+ };
111
+ name?: never;
112
+ };
113
+ required: string[];
114
+ additionalProperties: boolean;
115
+ })[];
116
+ description: "Completion target reference for complete.";
117
+ };
118
+ readonly argument?: {
119
+ type: string;
120
+ properties: {
121
+ name: {
122
+ type: string;
123
+ minLength: number;
124
+ };
125
+ value: {
126
+ type: string;
127
+ };
128
+ };
129
+ required: string[];
130
+ additionalProperties: boolean;
131
+ description: "Completion argument object for complete.";
132
+ };
133
+ readonly operation: {
134
+ readonly type: "string";
135
+ readonly enum: readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"] | readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool", "list_resources", "search_resources", "list_resource_templates", "read_resource", "list_prompts", "search_prompts", "get_prompt", "complete"];
136
+ readonly description: "Wrapper operation: get_caplet, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.";
137
+ };
138
+ readonly query: {
139
+ readonly type: "string";
140
+ readonly description: "Required for search operations only.";
141
+ };
142
+ readonly limit: {
143
+ readonly type: "integer";
144
+ readonly minimum: 1;
145
+ readonly description: "Optional list/search result limit.";
146
+ };
147
+ readonly tool: {
148
+ readonly type: "string";
149
+ readonly description: "Exact downstream tool name for get_tool or call_tool.";
150
+ };
151
+ readonly arguments: {
152
+ readonly type: "object";
153
+ readonly description: "JSON object for call_tool arguments/downstream inputs or get_prompt arguments.";
154
+ };
155
+ readonly fields: {
156
+ readonly type: "array";
157
+ readonly items: {
158
+ readonly type: "string";
159
+ readonly minLength: 1;
160
+ };
161
+ readonly minItems: 1;
162
+ readonly description: "Optional call_tool structured output paths when outputSchema allows it.";
163
+ };
164
+ };
165
+ readonly required: readonly ["operation"];
166
+ readonly additionalProperties: false;
9
167
  };
10
168
  export declare function generatedToolInputJsonSchema(): {
11
169
  readonly type: "object";
12
170
  readonly properties: {
171
+ readonly uri?: {
172
+ type: string;
173
+ description: "Exact downstream resource URI for read_resource.";
174
+ };
175
+ readonly prompt?: {
176
+ type: string;
177
+ description: "Exact downstream prompt name for get_prompt.";
178
+ };
179
+ readonly ref?: {
180
+ oneOf: ({
181
+ type: string;
182
+ properties: {
183
+ type: {
184
+ const: string;
185
+ };
186
+ name: {
187
+ type: string;
188
+ minLength: number;
189
+ };
190
+ uri?: never;
191
+ };
192
+ required: string[];
193
+ additionalProperties: boolean;
194
+ } | {
195
+ type: string;
196
+ properties: {
197
+ type: {
198
+ const: string;
199
+ };
200
+ uri: {
201
+ type: string;
202
+ minLength: number;
203
+ };
204
+ name?: never;
205
+ };
206
+ required: string[];
207
+ additionalProperties: boolean;
208
+ })[];
209
+ description: "Completion target reference for complete.";
210
+ };
211
+ readonly argument?: {
212
+ type: string;
213
+ properties: {
214
+ name: {
215
+ type: string;
216
+ minLength: number;
217
+ };
218
+ value: {
219
+ type: string;
220
+ };
221
+ };
222
+ required: string[];
223
+ additionalProperties: boolean;
224
+ description: "Completion argument object for complete.";
225
+ };
13
226
  readonly operation: {
14
227
  readonly type: "string";
15
- readonly enum: readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"];
16
- readonly description: "Wrapper operation: get_caplet, check_backend, list_tools, search_tools, get_tool, or call_tool.";
228
+ readonly enum: readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"] | readonly ["get_caplet", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool", "list_resources", "search_resources", "list_resource_templates", "read_resource", "list_prompts", "search_prompts", "get_prompt", "complete"];
229
+ readonly description: "Wrapper operation: get_caplet, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.";
17
230
  };
18
231
  readonly query: {
19
232
  readonly type: "string";
20
- readonly description: "Required for search_tools only.";
233
+ readonly description: "Required for search operations only.";
21
234
  };
22
235
  readonly limit: {
23
236
  readonly type: "integer";
24
237
  readonly minimum: 1;
25
- readonly description: "Optional search_tools result limit.";
238
+ readonly description: "Optional list/search result limit.";
26
239
  };
27
240
  readonly tool: {
28
241
  readonly type: "string";
@@ -30,7 +243,7 @@ export declare function generatedToolInputJsonSchema(): {
30
243
  };
31
244
  readonly arguments: {
32
245
  readonly type: "object";
33
- readonly description: "Required JSON object for call_tool arguments/downstream inputs.";
246
+ readonly description: "JSON object for call_tool arguments/downstream inputs or get_prompt arguments.";
34
247
  };
35
248
  readonly fields: {
36
249
  readonly type: "array";
@@ -1,59 +1,2 @@
1
- //#region src/generated-tool-input-schema.ts
2
- const operations = [
3
- "get_caplet",
4
- "check_backend",
5
- "list_tools",
6
- "search_tools",
7
- "get_tool",
8
- "call_tool"
9
- ];
10
- const generatedToolInputDescriptions = {
11
- operation: "Wrapper operation: get_caplet, check_backend, list_tools, search_tools, get_tool, or call_tool.",
12
- query: "Required for search_tools only.",
13
- limit: "Optional search_tools result limit.",
14
- tool: "Exact downstream tool name for get_tool or call_tool.",
15
- arguments: "Required JSON object for call_tool arguments/downstream inputs.",
16
- fields: "Optional call_tool structured output paths when outputSchema allows it."
17
- };
18
- function generatedToolInputJsonSchema() {
19
- return {
20
- type: "object",
21
- properties: {
22
- operation: {
23
- type: "string",
24
- enum: operations,
25
- description: generatedToolInputDescriptions.operation
26
- },
27
- query: {
28
- type: "string",
29
- description: generatedToolInputDescriptions.query
30
- },
31
- limit: {
32
- type: "integer",
33
- minimum: 1,
34
- description: generatedToolInputDescriptions.limit
35
- },
36
- tool: {
37
- type: "string",
38
- description: generatedToolInputDescriptions.tool
39
- },
40
- arguments: {
41
- type: "object",
42
- description: generatedToolInputDescriptions.arguments
43
- },
44
- fields: {
45
- type: "array",
46
- items: {
47
- type: "string",
48
- minLength: 1
49
- },
50
- minItems: 1,
51
- description: generatedToolInputDescriptions.fields
52
- }
53
- },
54
- required: ["operation"],
55
- additionalProperties: false
56
- };
57
- }
58
- //#endregion
59
- export { generatedToolInputDescriptions, generatedToolInputJsonSchema, operations };
1
+ import { a as generatedToolInputJsonSchemaForCaplet, c as mcpOperations, i as generatedToolInputJsonSchema, l as operations, n as completionRefSchema, o as generatedToolInputSchema, r as generatedToolInputDescriptions, s as generatedToolInputSchemaForCaplet, t as completionArgumentSchema } from "./generated-tool-input-schema-BYoyY-l-.js";
2
+ export { completionArgumentSchema, completionRefSchema, generatedToolInputDescriptions, generatedToolInputJsonSchema, generatedToolInputJsonSchemaForCaplet, generatedToolInputSchema, generatedToolInputSchemaForCaplet, mcpOperations, operations };