@wirecat/slack-cli 0.0.0-stage → 0.1.0
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/CHANGELOG.md +104 -0
- package/LICENSE +204 -0
- package/README.md +131 -2
- package/contracts/wirecat.json +5526 -0
- package/dist/bin/slack.d.ts +3 -0
- package/dist/bin/slack.d.ts.map +1 -0
- package/dist/bin/slack.js +40 -0
- package/dist/bin/slack.js.map +1 -0
- package/dist/bundle/agent-GOFXFUQP.js +37 -0
- package/dist/bundle/all-profiles-4C7VOT2D.js +320 -0
- package/dist/bundle/anthropic-ZD66TC5S.js +91 -0
- package/dist/bundle/app-server-QNCVEDMY.js +249 -0
- package/dist/bundle/bun-2FULBYXS.js +169 -0
- package/dist/bundle/bun-sqlite-PMS26ZUT.js +76 -0
- package/dist/bundle/chunk-2LB5BWC4.js +362 -0
- package/dist/bundle/chunk-2ZEYRHZV.js +18 -0
- package/dist/bundle/chunk-3IJ3THPV.js +7 -0
- package/dist/bundle/chunk-4HSVEQ3R.js +29 -0
- package/dist/bundle/chunk-4QPMHVM5.js +1007 -0
- package/dist/bundle/chunk-53LIHHXC.js +16 -0
- package/dist/bundle/chunk-5F36CXDM.js +794 -0
- package/dist/bundle/chunk-5LPREGD3.js +12636 -0
- package/dist/bundle/chunk-5R5YRYIP.js +1148 -0
- package/dist/bundle/chunk-5RSQTG7L.js +388 -0
- package/dist/bundle/chunk-5SXZETJF.js +170 -0
- package/dist/bundle/chunk-6PDQP5RM.js +50 -0
- package/dist/bundle/chunk-75BLNPN3.js +1197 -0
- package/dist/bundle/chunk-7BEO72EN.js +131 -0
- package/dist/bundle/chunk-7F6RNAIM.js +230 -0
- package/dist/bundle/chunk-AG7FP64Z.js +77 -0
- package/dist/bundle/chunk-B7ZM3FCB.js +61 -0
- package/dist/bundle/chunk-BRXTN5LJ.js +338 -0
- package/dist/bundle/chunk-CABZAU37.js +319 -0
- package/dist/bundle/chunk-CCOSG3F2.js +24616 -0
- package/dist/bundle/chunk-CDTZSFTN.js +58 -0
- package/dist/bundle/chunk-CMZBCWND.js +1246 -0
- package/dist/bundle/chunk-CRQEEJNF.js +185 -0
- package/dist/bundle/chunk-CWYU4R65.js +358 -0
- package/dist/bundle/chunk-CZFR6JQX.js +52 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DVHX7R54.js +4072 -0
- package/dist/bundle/chunk-DYKOG7QR.js +9596 -0
- package/dist/bundle/chunk-ECDI42G6.js +100 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-ELY2TLCY.js +259 -0
- package/dist/bundle/chunk-ERRVUVKR.js +156 -0
- package/dist/bundle/chunk-FBWR4E5D.js +353 -0
- package/dist/bundle/chunk-GKS6KL57.js +6848 -0
- package/dist/bundle/chunk-H2COZZ55.js +2787 -0
- package/dist/bundle/chunk-HGXTEK7R.js +82 -0
- package/dist/bundle/chunk-HXLXM7HV.js +726 -0
- package/dist/bundle/chunk-IPP4N6HD.js +24 -0
- package/dist/bundle/chunk-IWTVR7S7.js +53 -0
- package/dist/bundle/chunk-IYJH75D4.js +63 -0
- package/dist/bundle/chunk-JCZLRT4Z.js +39 -0
- package/dist/bundle/chunk-JGRWMR5H.js +123 -0
- package/dist/bundle/chunk-JYRYQJBN.js +633 -0
- package/dist/bundle/chunk-KIKLDI74.js +161 -0
- package/dist/bundle/chunk-L4WO3XH6.js +2020 -0
- package/dist/bundle/chunk-LQDNUAK3.js +274 -0
- package/dist/bundle/chunk-LV5ONLQH.js +38 -0
- package/dist/bundle/chunk-M27Z23OZ.js +23 -0
- package/dist/bundle/chunk-M5XTZHXM.js +142 -0
- package/dist/bundle/chunk-MJBEGUIZ.js +76 -0
- package/dist/bundle/chunk-N4WOLGIV.js +2333 -0
- package/dist/bundle/chunk-N5K4OHPT.js +206 -0
- package/dist/bundle/chunk-NYAPUET7.js +108 -0
- package/dist/bundle/chunk-P4IFLOIK.js +218 -0
- package/dist/bundle/chunk-P6G2QTCD.js +288 -0
- package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
- package/dist/bundle/chunk-PU7R6XNV.js +80 -0
- package/dist/bundle/chunk-QLLBACDR.js +72 -0
- package/dist/bundle/chunk-QP7XN5KX.js +407 -0
- package/dist/bundle/chunk-QY2F6A3D.js +557 -0
- package/dist/bundle/chunk-RLIT7VAZ.js +66 -0
- package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
- package/dist/bundle/chunk-SKGAKI62.js +86 -0
- package/dist/bundle/chunk-SQMZP5MA.js +66653 -0
- package/dist/bundle/chunk-UB6NTICY.js +95 -0
- package/dist/bundle/chunk-UBHQO5HV.js +778 -0
- package/dist/bundle/chunk-UM4RKO24.js +106 -0
- package/dist/bundle/chunk-VAHFY732.js +1068 -0
- package/dist/bundle/chunk-VGDM4C3F.js +188 -0
- package/dist/bundle/chunk-VOUAKCPM.js +41181 -0
- package/dist/bundle/chunk-WCCFJ4Q6.js +3736 -0
- package/dist/bundle/chunk-WV6EXRDV.js +46 -0
- package/dist/bundle/chunk-WVAT5TGY.js +334 -0
- package/dist/bundle/chunk-WW76JMKE.js +1243 -0
- package/dist/bundle/chunk-XXOMUKC6.js +54 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YDO6RJ2P.js +1337 -0
- package/dist/bundle/chunk-ZBCFZCJW.js +388 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-BWGRUY6L.js +37 -0
- package/dist/bundle/command-server-entry-BATOWE3Y.js +166 -0
- package/dist/bundle/decode-MZQGYXJH.js +297 -0
- package/dist/bundle/definitions-3EONB23J.js +8600 -0
- package/dist/bundle/dispatch-NYC4ARWX.js +411 -0
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/dist-XZ65GRQ6.js +7577 -0
- package/dist/bundle/echarts-7OYGL2GW.js +42501 -0
- package/dist/bundle/embed-4I25DVKZ.js +38 -0
- package/dist/bundle/embedder-YXKQHAZO.js +111 -0
- package/dist/bundle/emoji-4LYX3GOS.js +4271 -0
- package/dist/bundle/failure-3YOVYZTX.js +25 -0
- package/dist/bundle/first-run-2VL2BOV7.js +29 -0
- package/dist/bundle/first-screen-C7FIWZL2.js +37 -0
- package/dist/bundle/instructions-UMNDHXG2.js +11 -0
- package/dist/bundle/mcp-V27RHILF.js +167 -0
- package/dist/bundle/meeting-combined-LS6XO4JH.js +24 -0
- package/dist/bundle/meeting-model-VIR465CY.js +25 -0
- package/dist/bundle/meeting-semantic-H5J3OOF2.js +22 -0
- package/dist/bundle/node-JJ3WDCNJ.js +2340 -0
- package/dist/bundle/node-PYFPGL4E.js +176 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-sqlite-LFWPGDVP.js +74 -0
- package/dist/bundle/oauth-42VCSIVL.js +20 -0
- package/dist/bundle/open-XJ5R5LHC.js +23 -0
- package/dist/bundle/openai-RZBLV4HG.js +238 -0
- package/dist/bundle/process-DD6H3K7L.js +91 -0
- package/dist/bundle/program-33RT6DER.js +35421 -0
- package/dist/bundle/prompt-NQRDM5LY.js +17 -0
- package/dist/bundle/recognize-EM7H2IZS.js +26 -0
- package/dist/bundle/remote-Z6NU6QQA.js +31 -0
- package/dist/bundle/rerank-PNPCSPNF.js +52 -0
- package/dist/bundle/schemas-JMKNP4U3.js +2765 -0
- package/dist/bundle/serve-SQVGX76J.js +199 -0
- package/dist/bundle/server-NPJH45FZ.js +212 -0
- package/dist/bundle/server-Z4ZMGRAH.js +79 -0
- package/dist/bundle/slack.js +184 -0
- package/dist/bundle/sqlite-runtime-F3AJGAPN.js +20 -0
- package/dist/bundle/state-JT7ZFSXN.js +36 -0
- package/dist/bundle/store-FXGMHRF3.js +181 -0
- package/dist/bundle/store-J5ZL2USR.js +295 -0
- package/dist/bundle/store-maintenance-command-TIHOIKLZ.js +66 -0
- package/dist/bundle/surface-NW6T5OR6.js +65 -0
- package/dist/commands/api.d.ts +7 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +49 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/comments.d.ts +3 -0
- package/dist/commands/comments.d.ts.map +1 -0
- package/dist/commands/comments.js +114 -0
- package/dist/commands/comments.js.map +1 -0
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +53 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/session.d.ts +7 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +26 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +75 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +59 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +75 -0
- package/dist/context.js.map +1 -0
- package/dist/generated/definitions.d.ts +3 -0
- package/dist/generated/definitions.d.ts.map +1 -0
- package/dist/generated/definitions.js +8596 -0
- package/dist/generated/definitions.js.map +1 -0
- package/dist/generated/emoji.d.ts +2 -0
- package/dist/generated/emoji.d.ts.map +1 -0
- package/dist/generated/emoji.js +4265 -0
- package/dist/generated/emoji.js.map +1 -0
- package/dist/generated/manifest.d.ts +6 -0
- package/dist/generated/manifest.d.ts.map +1 -0
- package/dist/generated/manifest.js +6139 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +631 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2426 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +3220 -0
- package/dist/generated/types.d.ts.map +1 -0
- package/dist/generated/types.js +5 -0
- package/dist/generated/types.js.map +1 -0
- package/dist/identity.d.ts +29 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +32 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/messenger.d.ts +12 -0
- package/dist/messenger.d.ts.map +1 -0
- package/dist/messenger.js +184 -0
- package/dist/messenger.js.map +1 -0
- package/dist/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +116 -0
- package/dist/program.js.map +1 -0
- package/dist/reasons.d.ts +7 -0
- package/dist/reasons.d.ts.map +1 -0
- package/dist/reasons.js +20 -0
- package/dist/reasons.js.map +1 -0
- package/dist/sample/comments.d.ts +61 -0
- package/dist/sample/comments.d.ts.map +1 -0
- package/dist/sample/comments.js +39 -0
- package/dist/sample/comments.js.map +1 -0
- package/dist/sample/records.d.ts +16 -0
- package/dist/sample/records.d.ts.map +1 -0
- package/dist/sample/records.js +22 -0
- package/dist/sample/records.js.map +1 -0
- package/dist/sample/transport.d.ts +42 -0
- package/dist/sample/transport.d.ts.map +1 -0
- package/dist/sample/transport.js +153 -0
- package/dist/sample/transport.js.map +1 -0
- package/dist/setup/flow.d.ts +2 -0
- package/dist/setup/flow.d.ts.map +1 -0
- package/dist/setup/flow.js +83 -0
- package/dist/setup/flow.js.map +1 -0
- package/dist/setup/guide.d.ts +6 -0
- package/dist/setup/guide.d.ts.map +1 -0
- package/dist/setup/guide.js +13 -0
- package/dist/setup/guide.js.map +1 -0
- package/dist/setup/texts.d.ts +24 -0
- package/dist/setup/texts.d.ts.map +1 -0
- package/dist/setup/texts.js +24 -0
- package/dist/setup/texts.js.map +1 -0
- package/dist/slack/adapter.d.ts +36 -0
- package/dist/slack/adapter.d.ts.map +1 -0
- package/dist/slack/adapter.js +551 -0
- package/dist/slack/adapter.js.map +1 -0
- package/dist/slack/app-manifest.d.ts +25 -0
- package/dist/slack/app-manifest.d.ts.map +1 -0
- package/dist/slack/app-manifest.js +51 -0
- package/dist/slack/app-manifest.js.map +1 -0
- package/dist/slack/client.d.ts +45 -0
- package/dist/slack/client.d.ts.map +1 -0
- package/dist/slack/client.js +236 -0
- package/dist/slack/client.js.map +1 -0
- package/dist/slack/map.d.ts +429 -0
- package/dist/slack/map.d.ts.map +1 -0
- package/dist/slack/map.js +406 -0
- package/dist/slack/map.js.map +1 -0
- package/dist/slack/mrkdwn.d.ts +9 -0
- package/dist/slack/mrkdwn.d.ts.map +1 -0
- package/dist/slack/mrkdwn.js +56 -0
- package/dist/slack/mrkdwn.js.map +1 -0
- package/dist/slack/search.d.ts +24 -0
- package/dist/slack/search.d.ts.map +1 -0
- package/dist/slack/search.js +99 -0
- package/dist/slack/search.js.map +1 -0
- package/dist/slack/threads.d.ts +28 -0
- package/dist/slack/threads.d.ts.map +1 -0
- package/dist/slack/threads.js +56 -0
- package/dist/slack/threads.js.map +1 -0
- package/dist/slack/tokens.d.ts +17 -0
- package/dist/slack/tokens.d.ts.map +1 -0
- package/dist/slack/tokens.js +27 -0
- package/dist/slack/tokens.js.map +1 -0
- package/dist/slack/writes.d.ts +43 -0
- package/dist/slack/writes.d.ts.map +1 -0
- package/dist/slack/writes.js +277 -0
- package/dist/slack/writes.js.map +1 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/dist/wcat.d.ts +3 -0
- package/dist/wcat.d.ts.map +1 -0
- package/dist/wcat.js +4 -0
- package/dist/wcat.js.map +1 -0
- package/package.json +89 -4
- package/skills/slack-cli/SKILL.md +117 -0
- package/skills/slack-cli/references/api/api-admin.md +541 -0
- package/skills/slack-cli/references/api/api-api.md +13 -0
- package/skills/slack-cli/references/api/api-apps.md +78 -0
- package/skills/slack-cli/references/api/api-auth.md +18 -0
- package/skills/slack-cli/references/api/api-bots.md +12 -0
- package/skills/slack-cli/references/api/api-calls.md +68 -0
- package/skills/slack-cli/references/api/api-chat.md +123 -0
- package/skills/slack-cli/references/api/api-conversations.md +230 -0
- package/skills/slack-cli/references/api/api-dialog.md +13 -0
- package/skills/slack-cli/references/api/api-dnd.md +31 -0
- package/skills/slack-cli/references/api/api-emoji.md +8 -0
- package/skills/slack-cli/references/api/api-files.md +120 -0
- package/skills/slack-cli/references/api/api-migration.md +14 -0
- package/skills/slack-cli/references/api/api-pins.md +37 -0
- package/skills/slack-cli/references/api/api-reactions.md +58 -0
- package/skills/slack-cli/references/api/api-reminders.md +51 -0
- package/skills/slack-cli/references/api/api-search.md +18 -0
- package/skills/slack-cli/references/api/api-stars.md +42 -0
- package/skills/slack-cli/references/api/api-team.md +55 -0
- package/skills/slack-cli/references/api/api-usergroups.md +80 -0
- package/skills/slack-cli/references/api/api-users.md +101 -0
- package/skills/slack-cli/references/api/api-views.md +46 -0
- package/skills/slack-cli/references/api/api-workflows.md +36 -0
- package/skills/slack-cli/references/api.md +35 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
require_cross_spawn
|
|
5
|
+
} from "./chunk-D72URWJE.js";
|
|
6
|
+
import {
|
|
7
|
+
BUILT_IN_COMMANDS,
|
|
8
|
+
DESCRIBE_FLAG,
|
|
9
|
+
DESCRIBE_MAX_BYTES,
|
|
10
|
+
FIRST_PARTY_TOOLS,
|
|
11
|
+
PROGRAM_PREFIX,
|
|
12
|
+
TOOL_NAME,
|
|
13
|
+
fileState,
|
|
14
|
+
parseDescribe,
|
|
15
|
+
shimFiles,
|
|
16
|
+
writeShim
|
|
17
|
+
} from "./chunk-N5K4OHPT.js";
|
|
18
|
+
import "./chunk-Y5E2WNWB.js";
|
|
19
|
+
import {
|
|
20
|
+
CliError
|
|
21
|
+
} from "./chunk-QLLBACDR.js";
|
|
22
|
+
import {
|
|
23
|
+
__name,
|
|
24
|
+
__toESM
|
|
25
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
26
|
+
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.132.0_@scalar+openapi-upgrader@0.4.6_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
28
|
+
var import_cross_spawn2 = __toESM(require_cross_spawn(), 1);
|
|
29
|
+
import { randomUUID } from "node:crypto";
|
|
30
|
+
import { constants } from "node:os";
|
|
31
|
+
|
|
32
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.132.0_@scalar+openapi-upgrader@0.4.6_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/path.js
|
|
33
|
+
import { readdirSync, statSync } from "node:fs";
|
|
34
|
+
import { join } from "node:path";
|
|
35
|
+
var variable = /* @__PURE__ */ __name((env, name, platform) => platform === "win32" ? Object.entries(env).find(([key]) => key.toUpperCase() === name)?.[1] : env[name], "variable");
|
|
36
|
+
var pathEntries = /* @__PURE__ */ __name(({ env, platform }) => {
|
|
37
|
+
const raw = variable(env, "PATH", platform) ?? "";
|
|
38
|
+
const entries = raw.split(platform === "win32" ? ";" : ":").map((entry) => entry.replace(/^"(.*)"$/, "$1"));
|
|
39
|
+
const seen = /* @__PURE__ */ new Set();
|
|
40
|
+
return entries.filter((entry) => {
|
|
41
|
+
const key = platform === "win32" ? entry.toLowerCase().replace(/[\\/]+$/, "") : entry.replace(/\/+$/, "");
|
|
42
|
+
if (entry === "" || seen.has(key))
|
|
43
|
+
return false;
|
|
44
|
+
seen.add(key);
|
|
45
|
+
return true;
|
|
46
|
+
});
|
|
47
|
+
}, "pathEntries");
|
|
48
|
+
var programExtensions = /* @__PURE__ */ __name(({ env, platform }) => platform === "win32" ? (variable(env, "PATHEXT", platform) ?? ".COM;.EXE;.BAT;.CMD").split(";").filter((ext) => /^\.[a-z0-9]+$/i.test(ext)).map((ext) => ext.toLowerCase()) : [""], "programExtensions");
|
|
49
|
+
var isProgram = /* @__PURE__ */ __name((path, platform) => {
|
|
50
|
+
try {
|
|
51
|
+
const stat = statSync(path);
|
|
52
|
+
return stat.isFile() && (platform === "win32" || (stat.mode & 73) !== 0);
|
|
53
|
+
} catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}, "isProgram");
|
|
57
|
+
var findOnPath = /* @__PURE__ */ __name((command, search) => {
|
|
58
|
+
const extensions = programExtensions(search);
|
|
59
|
+
return pathEntries(search).flatMap((dir) => {
|
|
60
|
+
for (const extension of extensions) {
|
|
61
|
+
const path = join(dir, command + extension);
|
|
62
|
+
if (isProgram(path, search.platform))
|
|
63
|
+
return [path];
|
|
64
|
+
}
|
|
65
|
+
return [];
|
|
66
|
+
});
|
|
67
|
+
}, "findOnPath");
|
|
68
|
+
var findTools = /* @__PURE__ */ __name((search) => {
|
|
69
|
+
const extensions = programExtensions(search);
|
|
70
|
+
const tools = /* @__PURE__ */ new Map();
|
|
71
|
+
for (const dir of pathEntries(search)) {
|
|
72
|
+
let files;
|
|
73
|
+
try {
|
|
74
|
+
files = readdirSync(dir);
|
|
75
|
+
} catch {
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
const here = /* @__PURE__ */ new Map();
|
|
79
|
+
for (const file of files) {
|
|
80
|
+
if (!(search.platform === "win32" ? file.toLowerCase() : file).startsWith(PROGRAM_PREFIX))
|
|
81
|
+
continue;
|
|
82
|
+
const extension = extensions.find((ext) => ext !== "" && file.toLowerCase().endsWith(ext)) ?? "";
|
|
83
|
+
if (search.platform === "win32" && extension === "")
|
|
84
|
+
continue;
|
|
85
|
+
const base = search.platform === "win32" ? file.toLowerCase() : file;
|
|
86
|
+
const name = base.slice(PROGRAM_PREFIX.length, base.length - extension.length);
|
|
87
|
+
if (!TOOL_NAME.test(name))
|
|
88
|
+
continue;
|
|
89
|
+
const best = here.get(name);
|
|
90
|
+
const rank = /* @__PURE__ */ __name((path2) => extensions.findIndex((ext) => path2.toLowerCase().endsWith(ext)), "rank");
|
|
91
|
+
const path = join(dir, file);
|
|
92
|
+
if (best !== void 0 && rank(best) <= rank(path))
|
|
93
|
+
continue;
|
|
94
|
+
if (isProgram(path, search.platform))
|
|
95
|
+
here.set(name, path);
|
|
96
|
+
}
|
|
97
|
+
for (const [name, path] of here)
|
|
98
|
+
tools.set(name, [...tools.get(name) ?? [], path]);
|
|
99
|
+
}
|
|
100
|
+
return new Map([...tools].sort(([a], [b]) => a < b ? -1 : 1));
|
|
101
|
+
}, "findTools");
|
|
102
|
+
var isBuiltIn = /* @__PURE__ */ __name((name) => name === "wcat" || BUILT_IN_COMMANDS.includes(name), "isBuiltIn");
|
|
103
|
+
|
|
104
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.132.0_@scalar+openapi-upgrader@0.4.6_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/probe.js
|
|
105
|
+
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
106
|
+
import { readFileSync } from "node:fs";
|
|
107
|
+
var probeDescribe = /* @__PURE__ */ __name((path, { env, timeoutMs }) => new Promise((resolve) => {
|
|
108
|
+
let child;
|
|
109
|
+
try {
|
|
110
|
+
child = (0, import_cross_spawn.default)(path, [DESCRIBE_FLAG], { stdio: ["ignore", "pipe", "ignore"], env, windowsHide: true });
|
|
111
|
+
} catch {
|
|
112
|
+
resolve(void 0);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const chunks = [];
|
|
116
|
+
let size = 0;
|
|
117
|
+
let settled = false;
|
|
118
|
+
const settle = /* @__PURE__ */ __name((answer) => {
|
|
119
|
+
if (settled)
|
|
120
|
+
return;
|
|
121
|
+
settled = true;
|
|
122
|
+
clearTimeout(timer);
|
|
123
|
+
resolve(answer);
|
|
124
|
+
}, "settle");
|
|
125
|
+
const giveUp = /* @__PURE__ */ __name(() => {
|
|
126
|
+
child.kill();
|
|
127
|
+
child.stdout?.destroy();
|
|
128
|
+
child.unref();
|
|
129
|
+
settle(void 0);
|
|
130
|
+
}, "giveUp");
|
|
131
|
+
const timer = setTimeout(giveUp, timeoutMs);
|
|
132
|
+
child.stdout?.on("data", (chunk) => {
|
|
133
|
+
size += chunk.length;
|
|
134
|
+
if (size > DESCRIBE_MAX_BYTES)
|
|
135
|
+
giveUp();
|
|
136
|
+
else
|
|
137
|
+
chunks.push(chunk);
|
|
138
|
+
});
|
|
139
|
+
child.once("error", () => settle(void 0));
|
|
140
|
+
child.once("close", (code) => settle(code === 0 ? parseDescribe(Buffer.concat(chunks).toString("utf8")) : void 0));
|
|
141
|
+
}), "probeDescribe");
|
|
142
|
+
var baseVersion = /* @__PURE__ */ __name(() => {
|
|
143
|
+
try {
|
|
144
|
+
const raw = readFileSync(new URL("../../package.json", new URL("wcat/probe.js", import.meta.resolve("@wirecat/cli-base")).href), "utf8");
|
|
145
|
+
const { name, version } = JSON.parse(raw);
|
|
146
|
+
return name === "@wirecat/cli-base" && typeof version === "string" ? version : "unknown";
|
|
147
|
+
} catch {
|
|
148
|
+
return "unknown";
|
|
149
|
+
}
|
|
150
|
+
}, "baseVersion");
|
|
151
|
+
|
|
152
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.132.0_@scalar+openapi-upgrader@0.4.6_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/shortcuts.js
|
|
153
|
+
import { closeSync, openSync, readSync, realpathSync, rmSync } from "node:fs";
|
|
154
|
+
import { basename, dirname } from "node:path";
|
|
155
|
+
var WIRECAT_PACKAGE = /node_modules[\\/]+@wirecat[\\/]/;
|
|
156
|
+
var isWirecatPackage = /* @__PURE__ */ __name((path) => {
|
|
157
|
+
try {
|
|
158
|
+
if (WIRECAT_PACKAGE.test(realpathSync(path)))
|
|
159
|
+
return true;
|
|
160
|
+
const buffer = Buffer.alloc(16 * 1024);
|
|
161
|
+
const fd = openSync(path, "r");
|
|
162
|
+
try {
|
|
163
|
+
const read = readSync(fd, buffer, 0, buffer.length, 0);
|
|
164
|
+
return WIRECAT_PACKAGE.test(buffer.subarray(0, read).toString("latin1"));
|
|
165
|
+
} finally {
|
|
166
|
+
closeSync(fd);
|
|
167
|
+
}
|
|
168
|
+
} catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}, "isWirecatPackage");
|
|
172
|
+
var ourShortcut = /* @__PURE__ */ __name((path) => {
|
|
173
|
+
const state = fileState(path);
|
|
174
|
+
return state.state === "ours" && state.mark.kind === "shortcut";
|
|
175
|
+
}, "ourShortcut");
|
|
176
|
+
var statusOf = /* @__PURE__ */ __name((name, program, search) => {
|
|
177
|
+
const files = shimFiles("shortcut", {
|
|
178
|
+
dir: dirname(program),
|
|
179
|
+
name,
|
|
180
|
+
target: basename(program),
|
|
181
|
+
platform: search.platform
|
|
182
|
+
});
|
|
183
|
+
const named = findOnPath(name, search);
|
|
184
|
+
const made = [...files.map((file) => file.path), ...named].find(ourShortcut);
|
|
185
|
+
if (made)
|
|
186
|
+
return { name, status: "made", path: made, program };
|
|
187
|
+
const first = named[0];
|
|
188
|
+
if (first === void 0)
|
|
189
|
+
return { name, status: "free", program };
|
|
190
|
+
return { name, status: isWirecatPackage(first) ? "package" : "taken", path: first, program };
|
|
191
|
+
}, "statusOf");
|
|
192
|
+
var changeFile = /* @__PURE__ */ __name((path, change) => {
|
|
193
|
+
try {
|
|
194
|
+
change();
|
|
195
|
+
} catch (error) {
|
|
196
|
+
throw new CliError("permission_error", `could not change ${path}: ${error.code ?? error}`, {
|
|
197
|
+
reason: "access.denied"
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}, "changeFile");
|
|
201
|
+
var installedPrograms = /* @__PURE__ */ __name((search) => new Map([...findTools(search)].filter(([name]) => !isBuiltIn(name))), "installedPrograms");
|
|
202
|
+
var chosen = /* @__PURE__ */ __name((names, search) => {
|
|
203
|
+
const installed = installedPrograms(search);
|
|
204
|
+
if (names === void 0 || names.length === 0)
|
|
205
|
+
return [...installed].map(([name, paths]) => [name, paths[0]]);
|
|
206
|
+
const missing = names.filter((name) => !installed.has(name));
|
|
207
|
+
if (missing.length > 0)
|
|
208
|
+
throw new CliError("not_found", `not installed: ${missing.map((name) => `wcat-${name}`).join(", ")}`, {
|
|
209
|
+
reason: "tool.not-installed",
|
|
210
|
+
tool: missing[0],
|
|
211
|
+
installed: [...installed.keys()]
|
|
212
|
+
});
|
|
213
|
+
return [...new Set(names)].map((name) => [name, installed.get(name)[0]]);
|
|
214
|
+
}, "chosen");
|
|
215
|
+
var listShortcuts = /* @__PURE__ */ __name((search, names) => chosen(names, search).map(([name, program]) => statusOf(name, program, search)), "listShortcuts");
|
|
216
|
+
var addShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(search, names).map((shortcut) => {
|
|
217
|
+
if (shortcut.status !== "free")
|
|
218
|
+
return { ...shortcut, changed: false };
|
|
219
|
+
const files = shimFiles("shortcut", {
|
|
220
|
+
dir: dirname(shortcut.program),
|
|
221
|
+
name: shortcut.name,
|
|
222
|
+
target: basename(shortcut.program),
|
|
223
|
+
platform: search.platform
|
|
224
|
+
});
|
|
225
|
+
for (const file of files)
|
|
226
|
+
changeFile(file.path, () => writeShim(file));
|
|
227
|
+
return { ...shortcut, status: "made", path: files[0]?.path, changed: true };
|
|
228
|
+
}), "addShortcuts");
|
|
229
|
+
var removeShortcuts = /* @__PURE__ */ __name((search, names) => listShortcuts(search, names).map((shortcut) => {
|
|
230
|
+
if (shortcut.status !== "made")
|
|
231
|
+
return { ...shortcut, changed: false };
|
|
232
|
+
const files = shimFiles("shortcut", {
|
|
233
|
+
dir: dirname(shortcut.path),
|
|
234
|
+
name: shortcut.name,
|
|
235
|
+
target: basename(shortcut.program),
|
|
236
|
+
platform: search.platform
|
|
237
|
+
});
|
|
238
|
+
for (const file of files)
|
|
239
|
+
if (ourShortcut(file.path))
|
|
240
|
+
changeFile(file.path, () => rmSync(file.path, { force: true }));
|
|
241
|
+
return { ...statusOf(shortcut.name, shortcut.program, search), changed: true };
|
|
242
|
+
}), "removeShortcuts");
|
|
243
|
+
|
|
244
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.132.0_@scalar+openapi-upgrader@0.4.6_commander@15.0.0_esbuild@0.28.2_typescript@7.0.2_vitest@5.0.5/node_modules/@wirecat/cli-base/dist/wcat/dispatch.js
|
|
245
|
+
var DEFAULT_DESCRIBE_TIMEOUT_MS = 2e3;
|
|
246
|
+
var listTools = /* @__PURE__ */ __name(async (context) => {
|
|
247
|
+
const installed = installedPrograms(context);
|
|
248
|
+
const timeoutMs = context.describeTimeoutMs ?? DEFAULT_DESCRIBE_TIMEOUT_MS;
|
|
249
|
+
const found = await Promise.all([...installed].map(async ([name, paths]) => {
|
|
250
|
+
const [path, ...shadowed] = paths;
|
|
251
|
+
const own = context.self?.command === name ? context.self : void 0;
|
|
252
|
+
const described = own ?? await probeDescribe(path, { env: context.env, timeoutMs });
|
|
253
|
+
return {
|
|
254
|
+
name,
|
|
255
|
+
installed: true,
|
|
256
|
+
path,
|
|
257
|
+
...described?.version ? { version: described.version } : {},
|
|
258
|
+
...described?.description ? { description: described.description } : {},
|
|
259
|
+
...described?.docs ? { docs_url: described.docs } : {},
|
|
260
|
+
...shadowed.length > 0 ? { shadowed } : {}
|
|
261
|
+
};
|
|
262
|
+
}));
|
|
263
|
+
const missing = FIRST_PARTY_TOOLS.filter((tool) => tool.package && !installed.has(tool.name)).map((tool) => ({
|
|
264
|
+
name: tool.name,
|
|
265
|
+
installed: false,
|
|
266
|
+
package: tool.package,
|
|
267
|
+
install: `npm install -g ${tool.package}`
|
|
268
|
+
}));
|
|
269
|
+
return [...found, ...missing];
|
|
270
|
+
}, "listTools");
|
|
271
|
+
var envelope = /* @__PURE__ */ __name((items, started) => ({
|
|
272
|
+
items,
|
|
273
|
+
page: { mode: "page", limit: Math.max(items.length, 1), has_more: false },
|
|
274
|
+
meta: { run_id: randomUUID(), duration_ms: Math.max(0, Math.round(performance.now() - started)), complete: true }
|
|
275
|
+
}), "envelope");
|
|
276
|
+
var column = /* @__PURE__ */ __name((rows) => {
|
|
277
|
+
const widths = rows[0]?.map((_, at) => rows.reduce((wide, row) => Math.max(wide, (row[at] ?? "").length), 0)) ?? [];
|
|
278
|
+
return rows.map((row) => ` ${row.map((cell, at) => cell.padEnd(widths[at] ?? 0)).join(" ")}`.trimEnd());
|
|
279
|
+
}, "column");
|
|
280
|
+
var USAGE = [
|
|
281
|
+
"wcat <tool> [arguments] run a tool: wcat tg --help",
|
|
282
|
+
"wcat shortcuts [add|remove] [tool...] short names, such as tg, for installed tools",
|
|
283
|
+
"wcat --json the list below as JSON"
|
|
284
|
+
];
|
|
285
|
+
var listText = /* @__PURE__ */ __name((tools) => {
|
|
286
|
+
const installed = tools.filter((tool) => tool.installed);
|
|
287
|
+
const missing = tools.filter((tool) => !tool.installed);
|
|
288
|
+
return [
|
|
289
|
+
"wcat runs WireCat tools, and any other wcat-<name> program on PATH.",
|
|
290
|
+
"",
|
|
291
|
+
...USAGE,
|
|
292
|
+
"",
|
|
293
|
+
installed.length > 0 ? "Installed:" : "Installed: none",
|
|
294
|
+
...column(installed.map((tool) => [tool.name, tool.version ?? "", tool.description ?? "(no description)"])),
|
|
295
|
+
...missing.length > 0 ? ["", "Not installed:", ...column(missing.map((tool) => [tool.name, tool.install ?? ""]))] : [],
|
|
296
|
+
""
|
|
297
|
+
].join("\n");
|
|
298
|
+
}, "listText");
|
|
299
|
+
var shadowWarnings = /* @__PURE__ */ __name((tools) => tools.filter((tool) => tool.shadowed).map((tool) => `wcat: ${(tool.shadowed?.length ?? 0) + 1} programs are named ${PROGRAM_PREFIX}${tool.name}; wcat runs the first:
|
|
300
|
+
${[tool.path, ...tool.shadowed ?? []].map((path) => ` ${path}`).join("\n")}
|
|
301
|
+
`).join(""), "shadowWarnings");
|
|
302
|
+
var shortcutText = /* @__PURE__ */ __name((shortcuts2) => {
|
|
303
|
+
if (shortcuts2.length === 0)
|
|
304
|
+
return "No wcat-<name> programs are installed.\n";
|
|
305
|
+
const said = /* @__PURE__ */ __name((shortcut) => {
|
|
306
|
+
switch (shortcut.status) {
|
|
307
|
+
case "made":
|
|
308
|
+
return `made: ${shortcut.path}`;
|
|
309
|
+
case "free":
|
|
310
|
+
return shortcut.changed ? "removed" : "free: wcat shortcuts add makes it";
|
|
311
|
+
case "package":
|
|
312
|
+
return `installed by the package: ${shortcut.path}`;
|
|
313
|
+
case "taken":
|
|
314
|
+
return `taken by ${shortcut.path}`;
|
|
315
|
+
}
|
|
316
|
+
}, "said");
|
|
317
|
+
return `${column(shortcuts2.map((shortcut) => [shortcut.name, said(shortcut)])).join("\n")}
|
|
318
|
+
`;
|
|
319
|
+
}, "shortcutText");
|
|
320
|
+
var signalNumber = /* @__PURE__ */ __name((signal) => constants.signals[signal] ?? 1, "signalNumber");
|
|
321
|
+
var runTool = /* @__PURE__ */ __name((path, args, context) => new Promise((resolve, reject) => {
|
|
322
|
+
const signals = context.signals ?? process;
|
|
323
|
+
const child = (0, import_cross_spawn2.default)(path, [...args], { stdio: "inherit", env: context.env });
|
|
324
|
+
const pass = /* @__PURE__ */ __name((signal) => () => child.kill(signal), "pass");
|
|
325
|
+
const term = pass("SIGTERM");
|
|
326
|
+
const hup = pass("SIGHUP");
|
|
327
|
+
const ignore = /* @__PURE__ */ __name(() => {
|
|
328
|
+
}, "ignore");
|
|
329
|
+
signals.on("SIGTERM", term).on("SIGHUP", hup).on("SIGINT", ignore);
|
|
330
|
+
const done = /* @__PURE__ */ __name(() => signals.off("SIGTERM", term).off("SIGHUP", hup).off("SIGINT", ignore), "done");
|
|
331
|
+
child.once("error", (error) => {
|
|
332
|
+
done();
|
|
333
|
+
reject(new CliError("configuration_error", `could not start ${path}: ${error.message}`));
|
|
334
|
+
});
|
|
335
|
+
child.once("exit", (code, signal) => {
|
|
336
|
+
done();
|
|
337
|
+
resolve(code ?? (signal ? 128 + signalNumber(signal) : 1));
|
|
338
|
+
});
|
|
339
|
+
}), "runTool");
|
|
340
|
+
var fail = /* @__PURE__ */ __name(async (error, json, context) => {
|
|
341
|
+
const { errorObjectOf, exitCodeOfError, renderError } = await import("./failure-3YOVYZTX.js");
|
|
342
|
+
const object = errorObjectOf(error);
|
|
343
|
+
context.stderr.write(`${renderError(object, { cli: "wcat", interactive: !json })}
|
|
344
|
+
`);
|
|
345
|
+
return exitCodeOfError(object);
|
|
346
|
+
}, "fail");
|
|
347
|
+
var shortcuts = /* @__PURE__ */ __name(async (args, json, context) => {
|
|
348
|
+
const [action, ...names] = args;
|
|
349
|
+
const started = performance.now();
|
|
350
|
+
const result = action === "add" ? addShortcuts(context, names) : action === "remove" ? removeShortcuts(context, names) : action === void 0 || action === "list" ? listShortcuts(context, names) : void 0;
|
|
351
|
+
if (result === void 0)
|
|
352
|
+
throw new CliError("validation_error", `wcat shortcuts takes list, add or remove, not "${action}"`, {
|
|
353
|
+
reason: "input.invalid"
|
|
354
|
+
});
|
|
355
|
+
context.stdout.write(json ? `${JSON.stringify(envelope(result, started))}
|
|
356
|
+
` : shortcutText(result));
|
|
357
|
+
return 0;
|
|
358
|
+
}, "shortcuts");
|
|
359
|
+
var runWcat = /* @__PURE__ */ __name(async (args, context) => {
|
|
360
|
+
const [first, ...rest] = args;
|
|
361
|
+
const json = args.includes("--json");
|
|
362
|
+
const words = args.filter((word) => word !== "--json");
|
|
363
|
+
const started = performance.now();
|
|
364
|
+
try {
|
|
365
|
+
if (first === "--version" || first === "-V" || first === "version") {
|
|
366
|
+
const tools = await listTools(context);
|
|
367
|
+
const by = context.self ? `, run by ${PROGRAM_PREFIX}${context.self.command} ${context.self.version}` : "";
|
|
368
|
+
context.stdout.write(`wcat ${baseVersion()} (@wirecat/cli-base${by})
|
|
369
|
+
|
|
370
|
+
${listText(tools)}`);
|
|
371
|
+
return 0;
|
|
372
|
+
}
|
|
373
|
+
if (words.length === 0 || first === "--help" || first === "-h" || first === "help") {
|
|
374
|
+
const tools = await listTools(context);
|
|
375
|
+
if (json)
|
|
376
|
+
context.stdout.write(`${JSON.stringify(envelope(tools, started))}
|
|
377
|
+
`);
|
|
378
|
+
else {
|
|
379
|
+
context.stderr.write(shadowWarnings(tools));
|
|
380
|
+
context.stdout.write(listText(tools));
|
|
381
|
+
}
|
|
382
|
+
return 0;
|
|
383
|
+
}
|
|
384
|
+
if (first === "shortcuts")
|
|
385
|
+
return await shortcuts(words.slice(1), json, context);
|
|
386
|
+
if (BUILT_IN_COMMANDS.includes(first))
|
|
387
|
+
throw new CliError("validation_error", `wcat ${first} is reserved for a later version of wcat`, {
|
|
388
|
+
reason: "input.invalid"
|
|
389
|
+
});
|
|
390
|
+
if (first?.startsWith("-"))
|
|
391
|
+
throw new CliError("validation_error", `wcat does not take ${first} before a tool's name`, {
|
|
392
|
+
reason: "input.invalid"
|
|
393
|
+
});
|
|
394
|
+
const name = first;
|
|
395
|
+
const [path, ...shadowed] = TOOL_NAME.test(name) ? findOnPath(`${PROGRAM_PREFIX}${name}`, context) : [];
|
|
396
|
+
if (path === void 0) {
|
|
397
|
+
const installed = [...installedPrograms(context).keys()];
|
|
398
|
+
throw new CliError("not_found", `no ${PROGRAM_PREFIX}${name} on PATH; installed: ${installed.length > 0 ? installed.join(", ") : "none"}`, { reason: "tool.not-installed", tool: name, installed });
|
|
399
|
+
}
|
|
400
|
+
if (shadowed.length > 0 && context.stderr.isTTY)
|
|
401
|
+
context.stderr.write(shadowWarnings([{ name, installed: true, path, shadowed }]));
|
|
402
|
+
return await runTool(path, rest, context);
|
|
403
|
+
} catch (error) {
|
|
404
|
+
return fail(error, json, context);
|
|
405
|
+
}
|
|
406
|
+
}, "runWcat");
|
|
407
|
+
export {
|
|
408
|
+
listTools,
|
|
409
|
+
runTool,
|
|
410
|
+
runWcat
|
|
411
|
+
};
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { createRequire as __bundleRequire } from "node:module";
|
|
2
|
+
const require = __bundleRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
BAGGAGE_META_KEY,
|
|
5
|
+
CLIENT_CAPABILITIES_META_KEY,
|
|
6
|
+
CLIENT_INFO_META_KEY,
|
|
7
|
+
DEFAULT_MAX_REQUEST_BODY_SIZE,
|
|
8
|
+
DEFAULT_NEGOTIATED_PROTOCOL_VERSION,
|
|
9
|
+
DEFAULT_REQUEST_TIMEOUT_MSEC,
|
|
10
|
+
INTERNAL_ERROR,
|
|
11
|
+
INVALID_PARAMS,
|
|
12
|
+
INVALID_REQUEST,
|
|
13
|
+
InMemoryServerEventBus,
|
|
14
|
+
InMemoryTransport,
|
|
15
|
+
JSONRPC_VERSION,
|
|
16
|
+
LATEST_PROTOCOL_VERSION,
|
|
17
|
+
LOG_LEVEL_META_KEY,
|
|
18
|
+
METHOD_NOT_FOUND,
|
|
19
|
+
McpServer,
|
|
20
|
+
MissingRequiredClientCapabilityError,
|
|
21
|
+
OAuthError,
|
|
22
|
+
OAuthErrorCode,
|
|
23
|
+
PARSE_ERROR,
|
|
24
|
+
PROTOCOL_VERSION_META_KEY,
|
|
25
|
+
PerRequestHTTPServerTransport,
|
|
26
|
+
Protocol,
|
|
27
|
+
ProtocolError,
|
|
28
|
+
ProtocolErrorCode,
|
|
29
|
+
RELATED_TASK_META_KEY,
|
|
30
|
+
ReadBuffer,
|
|
31
|
+
ResourceNotFoundError,
|
|
32
|
+
ResourceTemplate,
|
|
33
|
+
SERVER_INFO_META_KEY,
|
|
34
|
+
STDIO_DEFAULT_MAX_BUFFER_SIZE,
|
|
35
|
+
SUBSCRIPTION_ID_META_KEY,
|
|
36
|
+
SUPPORTED_PROTOCOL_VERSIONS,
|
|
37
|
+
SdkError,
|
|
38
|
+
SdkErrorCode,
|
|
39
|
+
SdkHttpError,
|
|
40
|
+
Server,
|
|
41
|
+
TRACEPARENT_META_KEY,
|
|
42
|
+
TRACESTATE_META_KEY,
|
|
43
|
+
UnsupportedProtocolVersionError,
|
|
44
|
+
UriTemplate,
|
|
45
|
+
UrlElicitationRequiredError,
|
|
46
|
+
WebStandardStreamableHTTPServerTransport,
|
|
47
|
+
acceptedContent,
|
|
48
|
+
assertCompleteRequestPrompt,
|
|
49
|
+
assertCompleteRequestResourceTemplate,
|
|
50
|
+
bearerAuthChallengeResponse,
|
|
51
|
+
buildOAuthProtectedResourceMetadata,
|
|
52
|
+
checkResourceAllowed,
|
|
53
|
+
classifyInboundRequest,
|
|
54
|
+
completable,
|
|
55
|
+
createFetchWithInit,
|
|
56
|
+
createMcpHandler,
|
|
57
|
+
createRequestStateCodec,
|
|
58
|
+
deserializeMessage,
|
|
59
|
+
fromJsonSchema,
|
|
60
|
+
getDisplayName,
|
|
61
|
+
getOAuthProtectedResourceMetadataUrl,
|
|
62
|
+
hostHeaderValidationResponse,
|
|
63
|
+
inputRequired,
|
|
64
|
+
inputResponse,
|
|
65
|
+
isCallToolResult,
|
|
66
|
+
isCompletable,
|
|
67
|
+
isInitializeRequest,
|
|
68
|
+
isInitializedNotification,
|
|
69
|
+
isInputRequiredResult,
|
|
70
|
+
isJSONRPCErrorResponse,
|
|
71
|
+
isJSONRPCNotification,
|
|
72
|
+
isJSONRPCRequest,
|
|
73
|
+
isJSONRPCResponse,
|
|
74
|
+
isJSONRPCResultResponse,
|
|
75
|
+
isJsonContentType,
|
|
76
|
+
isLegacyRequest,
|
|
77
|
+
isSpecType,
|
|
78
|
+
isTaskAugmentedRequestParams,
|
|
79
|
+
legacyStatelessFallback,
|
|
80
|
+
localhostAllowedHostnames,
|
|
81
|
+
localhostAllowedOrigins,
|
|
82
|
+
mergeCapabilities,
|
|
83
|
+
oauthMetadataResponse,
|
|
84
|
+
originValidationResponse,
|
|
85
|
+
parseJSONRPCMessage,
|
|
86
|
+
preloadSchemas,
|
|
87
|
+
readRequestBody,
|
|
88
|
+
requireBearerAuth,
|
|
89
|
+
requireScopes,
|
|
90
|
+
resourceUrlFromServerUrl,
|
|
91
|
+
serializeMessage,
|
|
92
|
+
specTypeSchemas,
|
|
93
|
+
validateHostHeader,
|
|
94
|
+
validateOriginHeader,
|
|
95
|
+
verifyBearerToken
|
|
96
|
+
} from "./chunk-PL5P7UKW.js";
|
|
97
|
+
import "./chunk-ZVVMGPBJ.js";
|
|
98
|
+
export {
|
|
99
|
+
BAGGAGE_META_KEY,
|
|
100
|
+
CLIENT_CAPABILITIES_META_KEY,
|
|
101
|
+
CLIENT_INFO_META_KEY,
|
|
102
|
+
DEFAULT_MAX_REQUEST_BODY_SIZE,
|
|
103
|
+
DEFAULT_NEGOTIATED_PROTOCOL_VERSION,
|
|
104
|
+
DEFAULT_REQUEST_TIMEOUT_MSEC,
|
|
105
|
+
INTERNAL_ERROR,
|
|
106
|
+
INVALID_PARAMS,
|
|
107
|
+
INVALID_REQUEST,
|
|
108
|
+
InMemoryServerEventBus,
|
|
109
|
+
InMemoryTransport,
|
|
110
|
+
JSONRPC_VERSION,
|
|
111
|
+
LATEST_PROTOCOL_VERSION,
|
|
112
|
+
LOG_LEVEL_META_KEY,
|
|
113
|
+
METHOD_NOT_FOUND,
|
|
114
|
+
McpServer,
|
|
115
|
+
MissingRequiredClientCapabilityError,
|
|
116
|
+
OAuthError,
|
|
117
|
+
OAuthErrorCode,
|
|
118
|
+
PARSE_ERROR,
|
|
119
|
+
PROTOCOL_VERSION_META_KEY,
|
|
120
|
+
PerRequestHTTPServerTransport,
|
|
121
|
+
Protocol,
|
|
122
|
+
ProtocolError,
|
|
123
|
+
ProtocolErrorCode,
|
|
124
|
+
RELATED_TASK_META_KEY,
|
|
125
|
+
ReadBuffer,
|
|
126
|
+
ResourceNotFoundError,
|
|
127
|
+
ResourceTemplate,
|
|
128
|
+
SERVER_INFO_META_KEY,
|
|
129
|
+
STDIO_DEFAULT_MAX_BUFFER_SIZE,
|
|
130
|
+
SUBSCRIPTION_ID_META_KEY,
|
|
131
|
+
SUPPORTED_PROTOCOL_VERSIONS,
|
|
132
|
+
SdkError,
|
|
133
|
+
SdkErrorCode,
|
|
134
|
+
SdkHttpError,
|
|
135
|
+
Server,
|
|
136
|
+
TRACEPARENT_META_KEY,
|
|
137
|
+
TRACESTATE_META_KEY,
|
|
138
|
+
UnsupportedProtocolVersionError,
|
|
139
|
+
UriTemplate,
|
|
140
|
+
UrlElicitationRequiredError,
|
|
141
|
+
WebStandardStreamableHTTPServerTransport,
|
|
142
|
+
acceptedContent,
|
|
143
|
+
assertCompleteRequestPrompt,
|
|
144
|
+
assertCompleteRequestResourceTemplate,
|
|
145
|
+
bearerAuthChallengeResponse,
|
|
146
|
+
buildOAuthProtectedResourceMetadata,
|
|
147
|
+
checkResourceAllowed,
|
|
148
|
+
classifyInboundRequest,
|
|
149
|
+
completable,
|
|
150
|
+
createFetchWithInit,
|
|
151
|
+
createMcpHandler,
|
|
152
|
+
createRequestStateCodec,
|
|
153
|
+
deserializeMessage,
|
|
154
|
+
fromJsonSchema,
|
|
155
|
+
getDisplayName,
|
|
156
|
+
getOAuthProtectedResourceMetadataUrl,
|
|
157
|
+
hostHeaderValidationResponse,
|
|
158
|
+
inputRequired,
|
|
159
|
+
inputResponse,
|
|
160
|
+
isCallToolResult,
|
|
161
|
+
isCompletable,
|
|
162
|
+
isInitializeRequest,
|
|
163
|
+
isInitializedNotification,
|
|
164
|
+
isInputRequiredResult,
|
|
165
|
+
isJSONRPCErrorResponse,
|
|
166
|
+
isJSONRPCNotification,
|
|
167
|
+
isJSONRPCRequest,
|
|
168
|
+
isJSONRPCResponse,
|
|
169
|
+
isJSONRPCResultResponse,
|
|
170
|
+
isJsonContentType,
|
|
171
|
+
isLegacyRequest,
|
|
172
|
+
isSpecType,
|
|
173
|
+
isTaskAugmentedRequestParams,
|
|
174
|
+
legacyStatelessFallback,
|
|
175
|
+
localhostAllowedHostnames,
|
|
176
|
+
localhostAllowedOrigins,
|
|
177
|
+
mergeCapabilities,
|
|
178
|
+
oauthMetadataResponse,
|
|
179
|
+
originValidationResponse,
|
|
180
|
+
parseJSONRPCMessage,
|
|
181
|
+
preloadSchemas,
|
|
182
|
+
readRequestBody,
|
|
183
|
+
requireBearerAuth,
|
|
184
|
+
requireScopes,
|
|
185
|
+
resourceUrlFromServerUrl,
|
|
186
|
+
serializeMessage,
|
|
187
|
+
specTypeSchemas,
|
|
188
|
+
validateHostHeader,
|
|
189
|
+
validateOriginHeader,
|
|
190
|
+
verifyBearerToken
|
|
191
|
+
};
|