@caplets/core 0.18.8 → 0.18.9
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/cli/commands.d.ts +4 -2
- package/dist/cli/setup.d.ts +19 -0
- package/dist/cli.d.ts +2 -0
- package/dist/{completion-DvWQk5qR.js → completion-RqzHpHRY.js} +16 -6
- package/dist/{generated-tool-input-schema-MbYF5jMW.js → generated-tool-input-schema--kVuUNc5.js} +2 -2
- package/dist/generated-tool-input-schema.d.ts +9 -9
- package/dist/generated-tool-input-schema.js +1 -1
- package/dist/index.js +3127 -2924
- package/dist/native.js +3 -3
- package/dist/{options--RoZwWjs.js → options-DnOUjft1.js} +44 -39
- package/dist/remote-control/types.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/package.json +2 -2
package/dist/cli/commands.d.ts
CHANGED
|
@@ -5,10 +5,11 @@ export declare const cliCommands: {
|
|
|
5
5
|
readonly completeHidden: "__complete";
|
|
6
6
|
readonly serve: "serve";
|
|
7
7
|
readonly init: "init";
|
|
8
|
+
readonly setup: "setup";
|
|
8
9
|
readonly list: "list";
|
|
9
10
|
readonly install: "install";
|
|
10
11
|
readonly add: "add";
|
|
11
|
-
readonly
|
|
12
|
+
readonly inspect: "inspect";
|
|
12
13
|
readonly checkBackend: "check-backend";
|
|
13
14
|
readonly listTools: "list-tools";
|
|
14
15
|
readonly searchTools: "search-tools";
|
|
@@ -25,12 +26,13 @@ export declare const cliCommands: {
|
|
|
25
26
|
readonly config: "config";
|
|
26
27
|
readonly auth: "auth";
|
|
27
28
|
};
|
|
28
|
-
export declare const topLevelCommandNames: readonly ["serve", "init", "list", "install", "add", "
|
|
29
|
+
export declare const topLevelCommandNames: readonly ["serve", "init", "setup", "list", "install", "add", "inspect", "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", "config", "auth", "completion"];
|
|
29
30
|
export declare const cliSubcommands: {
|
|
30
31
|
readonly add: readonly ["cli", "mcp", "openapi", "graphql", "http"];
|
|
31
32
|
readonly auth: readonly ["login", "logout", "list"];
|
|
32
33
|
readonly completion: readonly ["bash", "zsh", "fish", "powershell", "cmd"];
|
|
33
34
|
readonly config: readonly ["path", "paths"];
|
|
35
|
+
readonly setup: readonly ["codex", "claude-code", "opencode", "pi", "mcp-client"];
|
|
34
36
|
};
|
|
35
37
|
export declare const capletIdCommands: Set<string>;
|
|
36
38
|
export declare const qualifiedToolCommands: Set<string>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const setupIntegrationIds: readonly ["codex", "claude-code", "opencode", "pi", "mcp-client"];
|
|
2
|
+
export type SetupIntegrationId = (typeof setupIntegrationIds)[number];
|
|
3
|
+
export type SetupFormat = "plain" | "json";
|
|
4
|
+
export type SetupCommandResult = {
|
|
5
|
+
stdout: string;
|
|
6
|
+
stderr: string;
|
|
7
|
+
};
|
|
8
|
+
export type SetupCommandRunner = (command: string, args: string[]) => Promise<SetupCommandResult>;
|
|
9
|
+
export type SetupOptions = {
|
|
10
|
+
remote?: boolean;
|
|
11
|
+
serverUrl?: string;
|
|
12
|
+
output?: string;
|
|
13
|
+
dryRun?: boolean;
|
|
14
|
+
env?: NodeJS.ProcessEnv | Record<string, string | undefined>;
|
|
15
|
+
format?: SetupFormat;
|
|
16
|
+
runCommand?: SetupCommandRunner;
|
|
17
|
+
};
|
|
18
|
+
export declare function formatSetupMenu(): string;
|
|
19
|
+
export declare function runSetup(integration: string, options?: SetupOptions): Promise<string>;
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
|
+
import { type SetupCommandRunner } from "./cli/setup";
|
|
2
3
|
import { type ServeOptions } from "./serve";
|
|
3
4
|
export { initConfig, starterConfig } from "./cli/init";
|
|
4
5
|
export { installCaplets, normalizeGitRepo } from "./cli/install";
|
|
@@ -12,6 +13,7 @@ type CliIO = {
|
|
|
12
13
|
version?: string;
|
|
13
14
|
setExitCode?: (code: number) => void;
|
|
14
15
|
serve?: (options: ServeOptions) => Promise<void>;
|
|
16
|
+
runSetupCommand?: SetupCommandRunner;
|
|
15
17
|
};
|
|
16
18
|
export declare function runCli(args: string[], io?: CliIO): Promise<void>;
|
|
17
19
|
export declare function createProgram(io?: CliIO): Command;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ct as resolveCapletsRoot, Et as resolveProjectConfigPath,
|
|
1
|
+
import { Ct as resolveCapletsRoot, Et as resolveProjectConfigPath, Lt as __exportAll, Pt as CapletsError, St as DEFAULT_COMPLETION_CACHE_DIR, gt as loadConfigWithSources, wt as resolveConfigPath, xt as DEFAULT_AUTH_DIR } from "./options-DnOUjft1.js";
|
|
2
2
|
import { mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import { createHash } from "node:crypto";
|
|
@@ -15,10 +15,11 @@ const cliCommands = {
|
|
|
15
15
|
completeHidden: "__complete",
|
|
16
16
|
serve: "serve",
|
|
17
17
|
init: "init",
|
|
18
|
+
setup: "setup",
|
|
18
19
|
list: "list",
|
|
19
20
|
install: "install",
|
|
20
21
|
add: "add",
|
|
21
|
-
|
|
22
|
+
inspect: "inspect",
|
|
22
23
|
checkBackend: "check-backend",
|
|
23
24
|
listTools: "list-tools",
|
|
24
25
|
searchTools: "search-tools",
|
|
@@ -38,10 +39,11 @@ const cliCommands = {
|
|
|
38
39
|
const topLevelCommandNames = [
|
|
39
40
|
cliCommands.serve,
|
|
40
41
|
cliCommands.init,
|
|
42
|
+
cliCommands.setup,
|
|
41
43
|
cliCommands.list,
|
|
42
44
|
cliCommands.install,
|
|
43
45
|
cliCommands.add,
|
|
44
|
-
cliCommands.
|
|
46
|
+
cliCommands.inspect,
|
|
45
47
|
cliCommands.checkBackend,
|
|
46
48
|
cliCommands.listTools,
|
|
47
49
|
cliCommands.searchTools,
|
|
@@ -73,10 +75,17 @@ const cliSubcommands = {
|
|
|
73
75
|
"list"
|
|
74
76
|
],
|
|
75
77
|
[cliCommands.completion]: [...completionShells],
|
|
76
|
-
[cliCommands.config]: ["path", "paths"]
|
|
78
|
+
[cliCommands.config]: ["path", "paths"],
|
|
79
|
+
[cliCommands.setup]: [
|
|
80
|
+
"codex",
|
|
81
|
+
"claude-code",
|
|
82
|
+
"opencode",
|
|
83
|
+
"pi",
|
|
84
|
+
"mcp-client"
|
|
85
|
+
]
|
|
77
86
|
};
|
|
78
87
|
const capletIdCommands = new Set([
|
|
79
|
-
cliCommands.
|
|
88
|
+
cliCommands.inspect,
|
|
80
89
|
cliCommands.checkBackend,
|
|
81
90
|
cliCommands.listTools,
|
|
82
91
|
cliCommands.searchTools,
|
|
@@ -439,6 +448,7 @@ const optionValueSuggestions = {
|
|
|
439
448
|
"json"
|
|
440
449
|
] },
|
|
441
450
|
serve: { "--transport": ["stdio", "http"] },
|
|
451
|
+
setup: { "--format": ["plain", "json"] },
|
|
442
452
|
"add:mcp": { "--transport": ["http", "sse"] },
|
|
443
453
|
"add:cli": { "--include": [
|
|
444
454
|
"git",
|
|
@@ -562,7 +572,7 @@ function cmdCompletionScript() {
|
|
|
562
572
|
REM caplets cmd completion helper
|
|
563
573
|
REM cmd.exe has no native programmable completion API. This doskey macro prints suggestions for the current words.
|
|
564
574
|
doskey caplets-complete=caplets __complete --shell cmd -- $* 2^>nul
|
|
565
|
-
REM Usage: caplets-complete
|
|
575
|
+
REM Usage: caplets-complete inspect
|
|
566
576
|
`;
|
|
567
577
|
}
|
|
568
578
|
//#endregion
|
package/dist/{generated-tool-input-schema-MbYF5jMW.js → generated-tool-input-schema--kVuUNc5.js}
RENAMED
|
@@ -4559,7 +4559,7 @@ function preprocess(fn, schema) {
|
|
|
4559
4559
|
//#endregion
|
|
4560
4560
|
//#region src/generated-tool-input-schema.ts
|
|
4561
4561
|
const operations = [
|
|
4562
|
-
"
|
|
4562
|
+
"inspect",
|
|
4563
4563
|
"check_backend",
|
|
4564
4564
|
"list_tools",
|
|
4565
4565
|
"search_tools",
|
|
@@ -4578,7 +4578,7 @@ const mcpOperations = [
|
|
|
4578
4578
|
"complete"
|
|
4579
4579
|
];
|
|
4580
4580
|
const generatedToolInputDescriptions = {
|
|
4581
|
-
operation: "Wrapper operation:
|
|
4581
|
+
operation: "Wrapper operation: inspect, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.",
|
|
4582
4582
|
query: "Required for search operations only.",
|
|
4583
4583
|
limit: "Optional list/search result limit.",
|
|
4584
4584
|
tool: "Exact downstream tool name for get_tool or call_tool.",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const operations: readonly ["
|
|
3
|
-
export declare const mcpOperations: readonly ["
|
|
2
|
+
export declare const operations: readonly ["inspect", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"];
|
|
3
|
+
export declare const mcpOperations: readonly ["inspect", "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
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
9
|
export declare const generatedToolInputDescriptions: {
|
|
10
|
-
readonly operation: "Wrapper operation:
|
|
10
|
+
readonly operation: "Wrapper operation: inspect, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.";
|
|
11
11
|
readonly query: "Required for search operations only.";
|
|
12
12
|
readonly limit: "Optional list/search result limit.";
|
|
13
13
|
readonly tool: "Exact downstream tool name for get_tool or call_tool.";
|
|
@@ -53,7 +53,7 @@ export declare function generatedToolInputSchemaForCaplet(caplet: CapletSchemaBa
|
|
|
53
53
|
search_tools: "search_tools";
|
|
54
54
|
get_tool: "get_tool";
|
|
55
55
|
check_backend: "check_backend";
|
|
56
|
-
|
|
56
|
+
inspect: "inspect";
|
|
57
57
|
call_tool: "call_tool";
|
|
58
58
|
}>;
|
|
59
59
|
}, z.core.$strict>;
|
|
@@ -68,7 +68,7 @@ export declare const generatedToolInputSchema: z.ZodObject<{
|
|
|
68
68
|
search_tools: "search_tools";
|
|
69
69
|
get_tool: "get_tool";
|
|
70
70
|
check_backend: "check_backend";
|
|
71
|
-
|
|
71
|
+
inspect: "inspect";
|
|
72
72
|
call_tool: "call_tool";
|
|
73
73
|
}>;
|
|
74
74
|
}, z.core.$strict>;
|
|
@@ -132,8 +132,8 @@ export declare function generatedToolInputJsonSchemaForCaplet(caplet: CapletSche
|
|
|
132
132
|
};
|
|
133
133
|
readonly operation: {
|
|
134
134
|
readonly type: "string";
|
|
135
|
-
readonly enum: readonly ["
|
|
136
|
-
readonly description: "Wrapper operation:
|
|
135
|
+
readonly enum: readonly ["inspect", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"] | readonly ["inspect", "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: inspect, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.";
|
|
137
137
|
};
|
|
138
138
|
readonly query: {
|
|
139
139
|
readonly type: "string";
|
|
@@ -225,8 +225,8 @@ export declare function generatedToolInputJsonSchema(): {
|
|
|
225
225
|
};
|
|
226
226
|
readonly operation: {
|
|
227
227
|
readonly type: "string";
|
|
228
|
-
readonly enum: readonly ["
|
|
229
|
-
readonly description: "Wrapper operation:
|
|
228
|
+
readonly enum: readonly ["inspect", "check_backend", "list_tools", "search_tools", "get_tool", "call_tool"] | readonly ["inspect", "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: inspect, check_backend, list_tools, search_tools, get_tool, call_tool. MCP Caplets also expose resources, prompts, and completions.";
|
|
230
230
|
};
|
|
231
231
|
readonly query: {
|
|
232
232
|
readonly type: "string";
|
|
@@ -1,2 +1,2 @@
|
|
|
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
|
|
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--kVuUNc5.js";
|
|
2
2
|
export { completionArgumentSchema, completionRefSchema, generatedToolInputDescriptions, generatedToolInputJsonSchema, generatedToolInputJsonSchemaForCaplet, generatedToolInputSchema, generatedToolInputSchemaForCaplet, mcpOperations, operations };
|