@caplets/core 0.18.7 → 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-B9niw4HY.js → completion-RqzHpHRY.js} +16 -6
- package/dist/{generated-tool-input-schema-BYoyY-l-.js → generated-tool-input-schema--kVuUNc5.js} +196 -196
- package/dist/generated-tool-input-schema.d.ts +9 -9
- package/dist/generated-tool-input-schema.js +1 -1
- package/dist/index.js +3128 -2925
- package/dist/native.js +3 -3
- package/dist/{options-CY6p-C9L.js → options-DnOUjft1.js} +49 -44
- package/dist/remote-control/types.d.ts +1 -1
- package/dist/tools.d.ts +1 -1
- package/package.json +4 -4
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
|