@caplets/core 0.19.0 → 0.20.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.
- package/dist/auth.d.ts +2 -2
- package/dist/caplet-files-bundle.d.ts +24 -9
- package/dist/caplet-source.js +368 -4588
- package/dist/cli/auth.d.ts +40 -2
- package/dist/cli/cloud-add.d.ts +8 -0
- package/dist/cli/code-mode.d.ts +16 -0
- package/dist/cli/commands.d.ts +3 -1
- package/dist/cli/doctor.d.ts +3 -0
- package/dist/cli/setup.d.ts +7 -0
- package/dist/cli-tools.d.ts +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cloud-auth/client.d.ts +15 -0
- package/dist/cloud-auth/types.d.ts +2 -1
- package/dist/code-mode/api.d.ts +32 -0
- package/dist/code-mode/declarations.d.ts +5 -0
- package/dist/code-mode/diagnostics.d.ts +8 -0
- package/dist/code-mode/index.d.ts +4 -0
- package/dist/code-mode/logs.d.ts +21 -0
- package/dist/code-mode/runner.d.ts +15 -0
- package/dist/code-mode/runtime-api.generated.d.ts +1 -0
- package/dist/code-mode/sandbox.d.ts +28 -0
- package/dist/code-mode/static-analysis.d.ts +2 -0
- package/dist/code-mode/tool.d.ts +11 -0
- package/dist/code-mode/types.d.ts +120 -0
- package/dist/code-mode.js +147855 -0
- package/dist/{completion-brgziz4L.js → completion-D-kuyArL.js} +5 -2
- package/dist/config/paths.d.ts +2 -0
- package/dist/config-runtime.d.ts +13 -4
- package/dist/config-runtime.js +31 -2
- package/dist/config.d.ts +34 -9
- package/dist/downstream.d.ts +20 -2
- package/dist/engine.d.ts +20 -0
- package/dist/exposure/direct-names.d.ts +9 -0
- package/dist/exposure/discovery.d.ts +75 -0
- package/dist/exposure/policy.d.ts +8 -0
- package/dist/generated-tool-input-schema.d.ts +89 -59
- package/dist/generated-tool-input-schema.js +38 -27
- package/dist/graphql.d.ts +1 -1
- package/dist/http-actions.d.ts +1 -1
- package/dist/index.d.ts +13 -0
- package/dist/index.js +1096 -154
- package/dist/native/service.d.ts +6 -0
- package/dist/native/tools.d.ts +2 -0
- package/dist/native.d.ts +1 -1
- package/dist/native.js +2 -2
- package/dist/observed-output-shapes/extract.d.ts +5 -0
- package/dist/observed-output-shapes/file-store.d.ts +17 -0
- package/dist/observed-output-shapes/index.d.ts +7 -0
- package/dist/observed-output-shapes/key.d.ts +14 -0
- package/dist/observed-output-shapes/merge.d.ts +2 -0
- package/dist/observed-output-shapes/pure.d.ts +5 -0
- package/dist/observed-output-shapes/pure.js +241 -0
- package/dist/observed-output-shapes/schema.d.ts +1 -0
- package/dist/observed-output-shapes/types.d.ts +84 -0
- package/dist/observed-output-shapes/typescript.d.ts +7 -0
- package/dist/observed-output-shapes-uzAMQPhg.js +485 -0
- package/dist/observed-output-shapes.js +2 -0
- package/dist/openapi.d.ts +1 -1
- package/dist/project-binding/index.d.ts +2 -0
- package/dist/project-binding.js +22 -0
- package/dist/redaction.d.ts +14 -0
- package/dist/redaction.js +30 -0
- package/dist/registry.d.ts +4 -0
- package/dist/remote/options.d.ts +2 -0
- package/dist/remote-control/types.d.ts +1 -1
- package/dist/runtime-plan/resources.d.ts +2 -0
- package/dist/runtime-plan.js +8 -2
- package/dist/schemas-1HZ0kFpx.js +4270 -0
- package/dist/serve/session.d.ts +15 -3
- package/dist/{service-BXcE4Rv8.js → service-Bsq7R0mt.js} +29312 -26554
- package/dist/stable-json.d.ts +3 -0
- package/dist/stable-json.js +26 -0
- package/dist/tools.d.ts +22 -11
- package/dist/{validation-BBG4skZf.js → validation-CdqbI2zN.js} +25 -4
- package/package.json +29 -3
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const operations: readonly ["inspect", "
|
|
3
|
-
export declare const mcpOperations: readonly ["inspect", "
|
|
2
|
+
export declare const operations: readonly ["inspect", "check", "tools", "search_tools", "describe_tool", "call_tool"];
|
|
3
|
+
export declare const mcpOperations: readonly ["inspect", "check", "tools", "search_tools", "describe_tool", "call_tool", "resources", "search_resources", "resource_templates", "read_resource", "prompts", "search_prompts", "get_prompt", "complete"];
|
|
4
4
|
export type GeneratedOperation = (typeof operations)[number];
|
|
5
5
|
export type GeneratedMcpOperation = (typeof mcpOperations)[number];
|
|
6
6
|
export type CapletSchemaBackend = {
|
|
7
7
|
backend: string;
|
|
8
8
|
};
|
|
9
|
+
export type GeneratedToolInputSchemaOptions = {
|
|
10
|
+
includeFields?: boolean;
|
|
11
|
+
};
|
|
9
12
|
export declare const generatedToolInputDescriptions: {
|
|
10
|
-
readonly operation: "Wrapper operation: inspect,
|
|
13
|
+
readonly operation: "Wrapper operation: inspect, check, tools, search_tools, describe_tool, call_tool, resources, search_resources, resource_templates, read_resource, prompts, search_prompts, get_prompt, complete.";
|
|
11
14
|
readonly query: "Required for search operations only.";
|
|
12
15
|
readonly limit: "Optional list/search result limit.";
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
+
readonly cursor: "Opaque pagination cursor returned by list/search operations.";
|
|
17
|
+
readonly name: "Exact downstream tool or prompt name from tools/search_tools/prompts/search_prompts; do not guess.";
|
|
18
|
+
readonly args: "JSON object for call_tool/get_prompt arguments; use tools/search_tools arg hints when enough, otherwise describe_tool inputSchema.";
|
|
19
|
+
readonly fields: "Optional call_tool structured output paths. Use only after describe_tool returns fieldSelection.supported true.";
|
|
16
20
|
readonly uri: "Exact downstream resource URI for read_resource.";
|
|
17
|
-
readonly prompt: "Exact downstream prompt name for get_prompt.";
|
|
18
21
|
readonly ref: "Completion target reference for complete.";
|
|
19
22
|
readonly argument: "Completion argument object for complete.";
|
|
20
23
|
};
|
|
@@ -29,9 +32,8 @@ export declare const completionArgumentSchema: z.ZodObject<{
|
|
|
29
32
|
name: z.ZodString;
|
|
30
33
|
value: z.ZodString;
|
|
31
34
|
}, z.core.$strict>;
|
|
32
|
-
export declare function generatedToolInputSchemaForCaplet(caplet: CapletSchemaBackend): z.ZodObject<{
|
|
35
|
+
export declare function generatedToolInputSchemaForCaplet(caplet: CapletSchemaBackend, options?: GeneratedToolInputSchemaOptions): z.ZodObject<{
|
|
33
36
|
uri?: z.ZodOptional<z.ZodString>;
|
|
34
|
-
prompt?: z.ZodOptional<z.ZodString>;
|
|
35
37
|
ref?: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
36
38
|
type: z.ZodLiteral<"prompt">;
|
|
37
39
|
name: z.ZodString;
|
|
@@ -45,44 +47,68 @@ export declare function generatedToolInputSchemaForCaplet(caplet: CapletSchemaBa
|
|
|
45
47
|
}, z.core.$strict>>;
|
|
46
48
|
query: z.ZodOptional<z.ZodString>;
|
|
47
49
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
51
|
+
name: z.ZodOptional<z.ZodString>;
|
|
52
|
+
args: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodAny>>>;
|
|
50
53
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
51
54
|
operation: z.ZodEnum<{
|
|
52
|
-
|
|
55
|
+
check: "check";
|
|
56
|
+
inspect: "inspect";
|
|
57
|
+
call_tool: "call_tool";
|
|
58
|
+
tools: "tools";
|
|
53
59
|
search_tools: "search_tools";
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
describe_tool: "describe_tool";
|
|
61
|
+
}>;
|
|
62
|
+
} | {
|
|
63
|
+
uri?: z.ZodOptional<z.ZodString>;
|
|
64
|
+
ref?: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
65
|
+
type: z.ZodLiteral<"prompt">;
|
|
66
|
+
name: z.ZodString;
|
|
67
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"resourceTemplate">;
|
|
69
|
+
uri: z.ZodString;
|
|
70
|
+
}, z.core.$strict>]>>;
|
|
71
|
+
argument?: z.ZodOptional<z.ZodObject<{
|
|
72
|
+
name: z.ZodString;
|
|
73
|
+
value: z.ZodString;
|
|
74
|
+
}, z.core.$strict>>;
|
|
75
|
+
query: z.ZodOptional<z.ZodString>;
|
|
76
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
77
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
args: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodAny>>>;
|
|
80
|
+
operation: z.ZodEnum<{
|
|
81
|
+
check: "check";
|
|
56
82
|
inspect: "inspect";
|
|
57
83
|
call_tool: "call_tool";
|
|
84
|
+
tools: "tools";
|
|
85
|
+
search_tools: "search_tools";
|
|
86
|
+
describe_tool: "describe_tool";
|
|
58
87
|
}>;
|
|
59
88
|
}, z.core.$strict>;
|
|
60
89
|
export declare const generatedToolInputSchema: z.ZodObject<{
|
|
61
90
|
query: z.ZodOptional<z.ZodString>;
|
|
62
91
|
limit: z.ZodOptional<z.ZodNumber>;
|
|
63
|
-
|
|
64
|
-
|
|
92
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
93
|
+
name: z.ZodOptional<z.ZodString>;
|
|
94
|
+
args: z.ZodOptional<z.ZodObject<{}, z.core.$catchall<z.ZodAny>>>;
|
|
65
95
|
fields: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
96
|
operation: z.ZodEnum<{
|
|
67
|
-
|
|
68
|
-
search_tools: "search_tools";
|
|
69
|
-
get_tool: "get_tool";
|
|
70
|
-
check_backend: "check_backend";
|
|
97
|
+
check: "check";
|
|
71
98
|
inspect: "inspect";
|
|
72
99
|
call_tool: "call_tool";
|
|
100
|
+
tools: "tools";
|
|
101
|
+
search_tools: "search_tools";
|
|
102
|
+
describe_tool: "describe_tool";
|
|
73
103
|
}>;
|
|
74
104
|
}, z.core.$strict>;
|
|
75
|
-
export declare function generatedToolInputJsonSchemaForCaplet(caplet: CapletSchemaBackend): {
|
|
105
|
+
export declare function generatedToolInputJsonSchemaForCaplet(caplet: CapletSchemaBackend, options?: GeneratedToolInputSchemaOptions): {
|
|
76
106
|
readonly type: "object";
|
|
77
107
|
readonly properties: {
|
|
78
108
|
readonly uri?: {
|
|
79
109
|
type: string;
|
|
80
110
|
description: "Exact downstream resource URI for read_resource.";
|
|
81
111
|
};
|
|
82
|
-
readonly prompt?: {
|
|
83
|
-
type: string;
|
|
84
|
-
description: "Exact downstream prompt name for get_prompt.";
|
|
85
|
-
};
|
|
86
112
|
readonly ref?: {
|
|
87
113
|
oneOf: ({
|
|
88
114
|
type: string;
|
|
@@ -130,10 +156,19 @@ export declare function generatedToolInputJsonSchemaForCaplet(caplet: CapletSche
|
|
|
130
156
|
additionalProperties: boolean;
|
|
131
157
|
description: "Completion argument object for complete.";
|
|
132
158
|
};
|
|
159
|
+
readonly fields?: {
|
|
160
|
+
type: string;
|
|
161
|
+
items: {
|
|
162
|
+
type: string;
|
|
163
|
+
minLength: number;
|
|
164
|
+
};
|
|
165
|
+
minItems: number;
|
|
166
|
+
description: "Optional call_tool structured output paths. Use only after describe_tool returns fieldSelection.supported true.";
|
|
167
|
+
};
|
|
133
168
|
readonly operation: {
|
|
134
169
|
readonly type: "string";
|
|
135
|
-
readonly enum: readonly ["inspect", "
|
|
136
|
-
readonly description: "Wrapper operation: inspect,
|
|
170
|
+
readonly enum: readonly ["inspect", "check", "tools", "search_tools", "describe_tool", "call_tool"] | readonly ["inspect", "check", "tools", "search_tools", "describe_tool", "call_tool", "resources", "search_resources", "resource_templates", "read_resource", "prompts", "search_prompts", "get_prompt", "complete"];
|
|
171
|
+
readonly description: "Wrapper operation: inspect, check, tools, search_tools, describe_tool, call_tool, resources, search_resources, resource_templates, read_resource, prompts, search_prompts, get_prompt, complete.";
|
|
137
172
|
};
|
|
138
173
|
readonly query: {
|
|
139
174
|
readonly type: "string";
|
|
@@ -144,22 +179,17 @@ export declare function generatedToolInputJsonSchemaForCaplet(caplet: CapletSche
|
|
|
144
179
|
readonly minimum: 1;
|
|
145
180
|
readonly description: "Optional list/search result limit.";
|
|
146
181
|
};
|
|
147
|
-
readonly
|
|
182
|
+
readonly cursor: {
|
|
148
183
|
readonly type: "string";
|
|
149
|
-
readonly description: "
|
|
184
|
+
readonly description: "Opaque pagination cursor returned by list/search operations.";
|
|
150
185
|
};
|
|
151
|
-
readonly
|
|
152
|
-
readonly type: "
|
|
153
|
-
readonly description: "
|
|
186
|
+
readonly name: {
|
|
187
|
+
readonly type: "string";
|
|
188
|
+
readonly description: "Exact downstream tool or prompt name from tools/search_tools/prompts/search_prompts; do not guess.";
|
|
154
189
|
};
|
|
155
|
-
readonly
|
|
156
|
-
readonly type: "
|
|
157
|
-
readonly
|
|
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.";
|
|
190
|
+
readonly args: {
|
|
191
|
+
readonly type: "object";
|
|
192
|
+
readonly description: "JSON object for call_tool/get_prompt arguments; use tools/search_tools arg hints when enough, otherwise describe_tool inputSchema.";
|
|
163
193
|
};
|
|
164
194
|
};
|
|
165
195
|
readonly required: readonly ["operation"];
|
|
@@ -172,10 +202,6 @@ export declare function generatedToolInputJsonSchema(): {
|
|
|
172
202
|
type: string;
|
|
173
203
|
description: "Exact downstream resource URI for read_resource.";
|
|
174
204
|
};
|
|
175
|
-
readonly prompt?: {
|
|
176
|
-
type: string;
|
|
177
|
-
description: "Exact downstream prompt name for get_prompt.";
|
|
178
|
-
};
|
|
179
205
|
readonly ref?: {
|
|
180
206
|
oneOf: ({
|
|
181
207
|
type: string;
|
|
@@ -223,10 +249,19 @@ export declare function generatedToolInputJsonSchema(): {
|
|
|
223
249
|
additionalProperties: boolean;
|
|
224
250
|
description: "Completion argument object for complete.";
|
|
225
251
|
};
|
|
252
|
+
readonly fields?: {
|
|
253
|
+
type: string;
|
|
254
|
+
items: {
|
|
255
|
+
type: string;
|
|
256
|
+
minLength: number;
|
|
257
|
+
};
|
|
258
|
+
minItems: number;
|
|
259
|
+
description: "Optional call_tool structured output paths. Use only after describe_tool returns fieldSelection.supported true.";
|
|
260
|
+
};
|
|
226
261
|
readonly operation: {
|
|
227
262
|
readonly type: "string";
|
|
228
|
-
readonly enum: readonly ["inspect", "
|
|
229
|
-
readonly description: "Wrapper operation: inspect,
|
|
263
|
+
readonly enum: readonly ["inspect", "check", "tools", "search_tools", "describe_tool", "call_tool"] | readonly ["inspect", "check", "tools", "search_tools", "describe_tool", "call_tool", "resources", "search_resources", "resource_templates", "read_resource", "prompts", "search_prompts", "get_prompt", "complete"];
|
|
264
|
+
readonly description: "Wrapper operation: inspect, check, tools, search_tools, describe_tool, call_tool, resources, search_resources, resource_templates, read_resource, prompts, search_prompts, get_prompt, complete.";
|
|
230
265
|
};
|
|
231
266
|
readonly query: {
|
|
232
267
|
readonly type: "string";
|
|
@@ -237,22 +272,17 @@ export declare function generatedToolInputJsonSchema(): {
|
|
|
237
272
|
readonly minimum: 1;
|
|
238
273
|
readonly description: "Optional list/search result limit.";
|
|
239
274
|
};
|
|
240
|
-
readonly
|
|
275
|
+
readonly cursor: {
|
|
241
276
|
readonly type: "string";
|
|
242
|
-
readonly description: "
|
|
277
|
+
readonly description: "Opaque pagination cursor returned by list/search operations.";
|
|
243
278
|
};
|
|
244
|
-
readonly
|
|
245
|
-
readonly type: "
|
|
246
|
-
readonly description: "
|
|
279
|
+
readonly name: {
|
|
280
|
+
readonly type: "string";
|
|
281
|
+
readonly description: "Exact downstream tool or prompt name from tools/search_tools/prompts/search_prompts; do not guess.";
|
|
247
282
|
};
|
|
248
|
-
readonly
|
|
249
|
-
readonly type: "
|
|
250
|
-
readonly
|
|
251
|
-
readonly type: "string";
|
|
252
|
-
readonly minLength: 1;
|
|
253
|
-
};
|
|
254
|
-
readonly minItems: 1;
|
|
255
|
-
readonly description: "Optional call_tool structured output paths when outputSchema allows it.";
|
|
283
|
+
readonly args: {
|
|
284
|
+
readonly type: "object";
|
|
285
|
+
readonly description: "JSON object for call_tool/get_prompt arguments; use tools/search_tools arg hints when enough, otherwise describe_tool inputSchema.";
|
|
256
286
|
};
|
|
257
287
|
};
|
|
258
288
|
readonly required: readonly ["operation"];
|
|
@@ -2,32 +2,32 @@ import { a as any, d as literal, m as object, o as array, p as number, r as _enu
|
|
|
2
2
|
//#region src/generated-tool-input-schema.ts
|
|
3
3
|
const operations = [
|
|
4
4
|
"inspect",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"check",
|
|
6
|
+
"tools",
|
|
7
7
|
"search_tools",
|
|
8
|
-
"
|
|
8
|
+
"describe_tool",
|
|
9
9
|
"call_tool"
|
|
10
10
|
];
|
|
11
11
|
const mcpOperations = [
|
|
12
12
|
...operations,
|
|
13
|
-
"
|
|
13
|
+
"resources",
|
|
14
14
|
"search_resources",
|
|
15
|
-
"
|
|
15
|
+
"resource_templates",
|
|
16
16
|
"read_resource",
|
|
17
|
-
"
|
|
17
|
+
"prompts",
|
|
18
18
|
"search_prompts",
|
|
19
19
|
"get_prompt",
|
|
20
20
|
"complete"
|
|
21
21
|
];
|
|
22
22
|
const generatedToolInputDescriptions = {
|
|
23
|
-
operation: "Wrapper operation: inspect,
|
|
23
|
+
operation: "Wrapper operation: inspect, check, tools, search_tools, describe_tool, call_tool, resources, search_resources, resource_templates, read_resource, prompts, search_prompts, get_prompt, complete.",
|
|
24
24
|
query: "Required for search operations only.",
|
|
25
25
|
limit: "Optional list/search result limit.",
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
cursor: "Opaque pagination cursor returned by list/search operations.",
|
|
27
|
+
name: "Exact downstream tool or prompt name from tools/search_tools/prompts/search_prompts; do not guess.",
|
|
28
|
+
args: "JSON object for call_tool/get_prompt arguments; use tools/search_tools arg hints when enough, otherwise describe_tool inputSchema.",
|
|
29
|
+
fields: "Optional call_tool structured output paths. Use only after describe_tool returns fieldSelection.supported true.",
|
|
29
30
|
uri: "Exact downstream resource URI for read_resource.",
|
|
30
|
-
prompt: "Exact downstream prompt name for get_prompt.",
|
|
31
31
|
ref: "Completion target reference for complete.",
|
|
32
32
|
argument: "Completion argument object for complete."
|
|
33
33
|
};
|
|
@@ -45,17 +45,18 @@ const completionArgumentSchema = object({
|
|
|
45
45
|
const baseShape = {
|
|
46
46
|
query: string().optional().describe(generatedToolInputDescriptions.query),
|
|
47
47
|
limit: number().int().positive().optional().describe(generatedToolInputDescriptions.limit),
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
cursor: string().optional().describe(generatedToolInputDescriptions.cursor),
|
|
49
|
+
name: string().optional().describe(generatedToolInputDescriptions.name),
|
|
50
|
+
args: object({}).catchall(any()).optional().describe(generatedToolInputDescriptions.args),
|
|
50
51
|
fields: array(string().min(1)).min(1).optional().describe(generatedToolInputDescriptions.fields)
|
|
51
52
|
};
|
|
52
|
-
function generatedToolInputSchemaForCaplet(caplet) {
|
|
53
|
+
function generatedToolInputSchemaForCaplet(caplet, options = {}) {
|
|
54
|
+
const includeFields = options.includeFields ?? true;
|
|
53
55
|
return object({
|
|
54
56
|
operation: (caplet.backend === "mcp" ? _enum(mcpOperations) : _enum(operations)).describe(generatedToolInputDescriptions.operation),
|
|
55
|
-
...
|
|
57
|
+
...schemaShape(includeFields),
|
|
56
58
|
...caplet.backend === "mcp" ? {
|
|
57
59
|
uri: string().optional().describe(generatedToolInputDescriptions.uri),
|
|
58
|
-
prompt: string().optional().describe(generatedToolInputDescriptions.prompt),
|
|
59
60
|
ref: completionRefSchema.optional().describe(generatedToolInputDescriptions.ref),
|
|
60
61
|
argument: completionArgumentSchema.optional().describe(generatedToolInputDescriptions.argument)
|
|
61
62
|
} : {}
|
|
@@ -65,8 +66,9 @@ const generatedToolInputSchema = object({
|
|
|
65
66
|
operation: _enum(operations).describe(generatedToolInputDescriptions.operation),
|
|
66
67
|
...baseShape
|
|
67
68
|
}).strict();
|
|
68
|
-
function generatedToolInputJsonSchemaForCaplet(caplet) {
|
|
69
|
+
function generatedToolInputJsonSchemaForCaplet(caplet, options = {}) {
|
|
69
70
|
const mcp = caplet.backend === "mcp";
|
|
71
|
+
const includeFields = options.includeFields ?? true;
|
|
70
72
|
return {
|
|
71
73
|
type: "object",
|
|
72
74
|
properties: {
|
|
@@ -84,15 +86,19 @@ function generatedToolInputJsonSchemaForCaplet(caplet) {
|
|
|
84
86
|
minimum: 1,
|
|
85
87
|
description: generatedToolInputDescriptions.limit
|
|
86
88
|
},
|
|
87
|
-
|
|
89
|
+
cursor: {
|
|
88
90
|
type: "string",
|
|
89
|
-
description: generatedToolInputDescriptions.
|
|
91
|
+
description: generatedToolInputDescriptions.cursor
|
|
90
92
|
},
|
|
91
|
-
|
|
93
|
+
name: {
|
|
94
|
+
type: "string",
|
|
95
|
+
description: generatedToolInputDescriptions.name
|
|
96
|
+
},
|
|
97
|
+
args: {
|
|
92
98
|
type: "object",
|
|
93
|
-
description: generatedToolInputDescriptions.
|
|
99
|
+
description: generatedToolInputDescriptions.args
|
|
94
100
|
},
|
|
95
|
-
fields: {
|
|
101
|
+
...includeFields ? { fields: {
|
|
96
102
|
type: "array",
|
|
97
103
|
items: {
|
|
98
104
|
type: "string",
|
|
@@ -100,16 +106,12 @@ function generatedToolInputJsonSchemaForCaplet(caplet) {
|
|
|
100
106
|
},
|
|
101
107
|
minItems: 1,
|
|
102
108
|
description: generatedToolInputDescriptions.fields
|
|
103
|
-
},
|
|
109
|
+
} } : {},
|
|
104
110
|
...mcp ? {
|
|
105
111
|
uri: {
|
|
106
112
|
type: "string",
|
|
107
113
|
description: generatedToolInputDescriptions.uri
|
|
108
114
|
},
|
|
109
|
-
prompt: {
|
|
110
|
-
type: "string",
|
|
111
|
-
description: generatedToolInputDescriptions.prompt
|
|
112
|
-
},
|
|
113
115
|
ref: {
|
|
114
116
|
oneOf: [{
|
|
115
117
|
type: "object",
|
|
@@ -155,6 +157,15 @@ function generatedToolInputJsonSchemaForCaplet(caplet) {
|
|
|
155
157
|
additionalProperties: false
|
|
156
158
|
};
|
|
157
159
|
}
|
|
160
|
+
function schemaShape(includeFields) {
|
|
161
|
+
return includeFields ? baseShape : {
|
|
162
|
+
query: baseShape.query,
|
|
163
|
+
limit: baseShape.limit,
|
|
164
|
+
cursor: baseShape.cursor,
|
|
165
|
+
name: baseShape.name,
|
|
166
|
+
args: baseShape.args
|
|
167
|
+
};
|
|
168
|
+
}
|
|
158
169
|
function generatedToolInputJsonSchema() {
|
|
159
170
|
return generatedToolInputJsonSchemaForCaplet({ backend: "tool" });
|
|
160
171
|
}
|
package/dist/graphql.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CompatibilityCallToolResult, Tool } from "@modelcontextprotocol/sdk/types";
|
|
2
2
|
import type { GraphQlEndpointConfig } from "./config";
|
|
3
|
-
import type
|
|
3
|
+
import { type CompactTool } from "./downstream";
|
|
4
4
|
import type { ServerRegistry } from "./registry";
|
|
5
5
|
export type { GraphQlEndpointConfig as GraphqlEndpointConfig } from "./config";
|
|
6
6
|
export declare class GraphQLManager {
|
package/dist/http-actions.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CompatibilityCallToolResult, Tool } from "@modelcontextprotocol/sdk/types";
|
|
2
2
|
import type { HttpApiConfig } from "./config";
|
|
3
|
-
import type
|
|
3
|
+
import { type CompactTool } from "./downstream";
|
|
4
4
|
import type { ServerRegistry } from "./registry";
|
|
5
5
|
export declare class HttpActionManager {
|
|
6
6
|
private registry;
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,19 @@ export type { CapletRuntimePlan, RuntimePlanDeployment, RuntimePlanOptions, Runt
|
|
|
9
9
|
export { capabilityDescription, ServerRegistry } from "./registry";
|
|
10
10
|
export { generatedToolInputSchema, handleServerTool } from "./tools";
|
|
11
11
|
export type { CapletExecutionMetadata, CapletResultMetadata } from "./tools";
|
|
12
|
+
export { createCodeModeCapletsApi, listCodeModeCallableCaplets } from "./code-mode/api";
|
|
13
|
+
export type { CodeModeCapletHandle, CodeModeCapletsApi, CodeModeDebugApi, CreateCodeModeCapletsApiInput, } from "./code-mode/api";
|
|
14
|
+
export { codeModeDeclarationHash, generateCodeModeDeclarations, generateCodeModeRunToolDescription, minifyCodeModeDeclarationText, } from "./code-mode/declarations";
|
|
15
|
+
export { diagnoseCodeModeTypeScript } from "./code-mode/diagnostics";
|
|
16
|
+
export type { DiagnoseCodeModeTypeScriptInput } from "./code-mode/diagnostics";
|
|
17
|
+
export { CodeModeLogStore, redactCodeModeLogText } from "./code-mode/logs";
|
|
18
|
+
export type { CodeModeLogStoreOptions, StoreCodeModeLogsResult } from "./code-mode/logs";
|
|
19
|
+
export { FileObservedOutputShapeStore, observeOutputShape, observedOutputShapeKey, type ObservedOutputShape, type ObservedOutputShapeKey, type ObservedOutputShapeStore, } from "./observed-output-shapes";
|
|
20
|
+
export { runCodeMode } from "./code-mode/runner";
|
|
21
|
+
export type { RunCodeModeInput } from "./code-mode/runner";
|
|
22
|
+
export { QuickJsCodeModeSandbox } from "./code-mode/sandbox";
|
|
23
|
+
export type { CodeModeSandbox, CodeModeSandboxInput, CodeModeSandboxInvokeInput, CodeModeSandboxResult, } from "./code-mode/sandbox";
|
|
24
|
+
export type { CodeModeCallableCaplet, CodeModeDeclarationInput, CodeModeDiagnostic, CodeModeLogs, CodeModeRunEnvelope, CodeModeRunError, CodeModeRunMeta, CodeModeTypesJson, JsonValue, ReadLogsInput, ReadLogsResult, ToolCallResult, } from "./code-mode/types";
|
|
12
25
|
export type { CapletSetupCommandConfig, CapletSetupConfig } from "./config";
|
|
13
26
|
export { capletSetupContentHash, stableJson } from "./setup/hash";
|
|
14
27
|
export { LocalSetupStore } from "./setup/local-store";
|