@wirecat/attio-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 +20 -0
- package/LICENSE +204 -0
- package/README.md +248 -2
- package/contracts/wirecat.json +2321 -0
- package/dist/bin/attio.d.ts +3 -0
- package/dist/bin/attio.d.ts.map +1 -0
- package/dist/bin/attio.js +40 -0
- package/dist/bin/attio.js.map +1 -0
- package/dist/bundle/agent-KLBL3FYD.js +37 -0
- package/dist/bundle/all-profiles-C2NMRQPE.js +320 -0
- package/dist/bundle/anthropic-KOU2ILDK.js +91 -0
- package/dist/bundle/app-server-TINV4NNY.js +249 -0
- package/dist/bundle/attio.js +183 -0
- package/dist/bundle/bun-GVNM6IWY.js +169 -0
- package/dist/bundle/bun-sqlite-IF6B3EQI.js +76 -0
- package/dist/bundle/chunk-2343HKEW.js +362 -0
- package/dist/bundle/chunk-2H2MWGBD.js +988 -0
- package/dist/bundle/chunk-2P7ENEQ7.js +288 -0
- package/dist/bundle/chunk-4EYKJLWI.js +771 -0
- package/dist/bundle/chunk-4HQDT5PF.js +338 -0
- package/dist/bundle/chunk-4QE4L7UL.js +142 -0
- package/dist/bundle/chunk-4XHWGJXT.js +6848 -0
- package/dist/bundle/chunk-5DCRHSBI.js +72 -0
- package/dist/bundle/chunk-5ETXE5KF.js +372 -0
- package/dist/bundle/chunk-5WAGTWCS.js +156 -0
- package/dist/bundle/chunk-6B5PSQQ7.js +319 -0
- package/dist/bundle/chunk-6BVPS2YY.js +230 -0
- package/dist/bundle/chunk-6L5EUGLP.js +188 -0
- package/dist/bundle/chunk-7NFEMS4A.js +1028 -0
- package/dist/bundle/chunk-A7YQTQ5U.js +733 -0
- package/dist/bundle/chunk-AEPOHR4Z.js +82 -0
- package/dist/bundle/chunk-ARRQVUJ2.js +334 -0
- package/dist/bundle/chunk-BHNFRL3H.js +95 -0
- package/dist/bundle/chunk-CBPL3GID.js +23 -0
- package/dist/bundle/chunk-D72URWJE.js +532 -0
- package/dist/bundle/chunk-DFDN6AUB.js +21 -0
- package/dist/bundle/chunk-DVN54VPI.js +16 -0
- package/dist/bundle/chunk-DW3V7GTY.js +388 -0
- package/dist/bundle/chunk-EH6ZEJGT.js +932 -0
- package/dist/bundle/chunk-ETSOG6TZ.js +65288 -0
- package/dist/bundle/chunk-FJV3MO57.js +29 -0
- package/dist/bundle/chunk-HLLRNP2G.js +170 -0
- package/dist/bundle/chunk-HQJ2TABD.js +18 -0
- package/dist/bundle/chunk-ICUXAOEM.js +42063 -0
- package/dist/bundle/chunk-IGALQ74S.js +358 -0
- package/dist/bundle/chunk-IPHUAWFG.js +100 -0
- package/dist/bundle/chunk-IYMWUL6E.js +633 -0
- package/dist/bundle/chunk-JKCXDIGC.js +52 -0
- package/dist/bundle/chunk-JTOKDROB.js +95 -0
- package/dist/bundle/chunk-JZMGOVCZ.js +80 -0
- package/dist/bundle/chunk-KB3YJJPN.js +794 -0
- package/dist/bundle/chunk-KD4EUUER.js +37 -0
- package/dist/bundle/chunk-LB6D4QF2.js +2333 -0
- package/dist/bundle/chunk-LWUJZ2E3.js +108 -0
- package/dist/bundle/chunk-MCQOXTAL.js +53 -0
- package/dist/bundle/chunk-MMGCGPKM.js +3571 -0
- package/dist/bundle/chunk-MXDIXBIV.js +24 -0
- package/dist/bundle/chunk-MYVWV5L5.js +407 -0
- package/dist/bundle/chunk-MZNRIH3T.js +1233 -0
- package/dist/bundle/chunk-NEFILPPV.js +353 -0
- package/dist/bundle/chunk-O6CVJGGL.js +131 -0
- package/dist/bundle/chunk-OPXCRQTV.js +161 -0
- package/dist/bundle/chunk-PKNFA5TU.js +38 -0
- package/dist/bundle/chunk-PL5P7UKW.js +25216 -0
- package/dist/bundle/chunk-PO6PLQYL.js +50 -0
- package/dist/bundle/chunk-PWUQC2GI.js +218 -0
- package/dist/bundle/chunk-QCEEPJNN.js +185 -0
- package/dist/bundle/chunk-QG4WCLGB.js +1332 -0
- package/dist/bundle/chunk-QNQ2OF24.js +9578 -0
- package/dist/bundle/chunk-RCKRXBJF.js +1392 -0
- package/dist/bundle/chunk-RK4GN2II.js +2000 -0
- package/dist/bundle/chunk-RRH7UK7L.js +106 -0
- package/dist/bundle/chunk-S4UUN6LD.js +1410 -0
- package/dist/bundle/chunk-S7WJXELM.js +58 -0
- package/dist/bundle/chunk-SBRFKB77.js +1197 -0
- package/dist/bundle/chunk-SP6DPFZ4.js +4072 -0
- package/dist/bundle/chunk-SWJDLFDM.js +557 -0
- package/dist/bundle/chunk-TWCVCW5T.js +66 -0
- package/dist/bundle/chunk-V2R2BJJU.js +63 -0
- package/dist/bundle/chunk-V5K3M7FE.js +78 -0
- package/dist/bundle/chunk-V6ALLFEE.js +1068 -0
- package/dist/bundle/chunk-V6EVJXLO.js +259 -0
- package/dist/bundle/chunk-VJ4CPL6F.js +54 -0
- package/dist/bundle/chunk-VL25A6V2.js +41 -0
- package/dist/bundle/chunk-WBEZZGZE.js +12645 -0
- package/dist/bundle/chunk-WIYAMDPP.js +73 -0
- package/dist/bundle/chunk-WRJGITBX.js +76 -0
- package/dist/bundle/chunk-XHIVZPQ2.js +7 -0
- package/dist/bundle/chunk-XQUUANA2.js +24600 -0
- package/dist/bundle/chunk-XTQIXZVM.js +2788 -0
- package/dist/bundle/chunk-Y5E2WNWB.js +35 -0
- package/dist/bundle/chunk-YKN4Y35P.js +206 -0
- package/dist/bundle/chunk-ZMJZQGCN.js +46 -0
- package/dist/bundle/chunk-ZPSH27BB.js +274 -0
- package/dist/bundle/chunk-ZVVMGPBJ.js +50 -0
- package/dist/bundle/command-contract-3FR7BK72.js +37 -0
- package/dist/bundle/command-server-entry-4XR4GDS7.js +166 -0
- package/dist/bundle/decode-24EITKP4.js +297 -0
- package/dist/bundle/definitions-HU62PG4L.js +43364 -0
- package/dist/bundle/dispatch-VE6CXCJW.js +411 -0
- package/dist/bundle/dist-PAKDDIBT.js +191 -0
- package/dist/bundle/dist-ZSNEZYVF.js +7577 -0
- package/dist/bundle/echarts-LEVLEF7L.js +42501 -0
- package/dist/bundle/embed-G6FGY3VZ.js +38 -0
- package/dist/bundle/embedder-B6LNMXZZ.js +111 -0
- package/dist/bundle/failure-ASVFQXMF.js +25 -0
- package/dist/bundle/first-run-NVXVVALW.js +29 -0
- package/dist/bundle/first-screen-N3IPK5AT.js +37 -0
- package/dist/bundle/instructions-F3KPYMJK.js +11 -0
- package/dist/bundle/mcp-BUCB5ZPE.js +167 -0
- package/dist/bundle/meeting-combined-7FREWXMB.js +24 -0
- package/dist/bundle/meeting-model-GJPAIUQL.js +25 -0
- package/dist/bundle/meeting-semantic-YWY645AH.js +22 -0
- package/dist/bundle/node-KM3CUABH.js +2340 -0
- package/dist/bundle/node-TLZSIHIJ.js +21 -0
- package/dist/bundle/node-WVUZSDLD.js +176 -0
- package/dist/bundle/node-sqlite-V4NNKABG.js +74 -0
- package/dist/bundle/oauth-7CENTQIN.js +20 -0
- package/dist/bundle/open-OLTONZBG.js +23 -0
- package/dist/bundle/openai-M6ES74YN.js +238 -0
- package/dist/bundle/process-VFIFK5KO.js +91 -0
- package/dist/bundle/program-N72VUDXM.js +33418 -0
- package/dist/bundle/prompt-TNWPBEBB.js +17 -0
- package/dist/bundle/recognize-PV2WOUWS.js +26 -0
- package/dist/bundle/remote-3F6JACS5.js +31 -0
- package/dist/bundle/rerank-33C67PIV.js +52 -0
- package/dist/bundle/schemas-RLDEALIJ.js +21410 -0
- package/dist/bundle/serve-3DEMACSQ.js +199 -0
- package/dist/bundle/server-AAK2HWQM.js +79 -0
- package/dist/bundle/server-LIBRGMUZ.js +212 -0
- package/dist/bundle/sqlite-runtime-SMAREHYG.js +20 -0
- package/dist/bundle/state-WPHAVJIU.js +36 -0
- package/dist/bundle/store-A7V4FEXE.js +177 -0
- package/dist/bundle/store-PMAPJNXT.js +291 -0
- package/dist/bundle/store-maintenance-command-QHRHAEYN.js +66 -0
- package/dist/bundle/surface-MN4RTNYW.js +65 -0
- package/dist/commands/api.d.ts +12 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +27 -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/crm.d.ts +4 -0
- package/dist/commands/crm.d.ts.map +1 -0
- package/dist/commands/crm.js +66 -0
- package/dist/commands/crm.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 +22 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +14 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +37 -0
- package/dist/context.d.ts.map +1 -0
- package/dist/context.js +31 -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 +43360 -0
- package/dist/generated/definitions.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 +5158 -0
- package/dist/generated/manifest.js.map +1 -0
- package/dist/generated/schemas.d.ts +383 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +21196 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/types.d.ts +10156 -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/generated/wirecat-config.d.ts +15 -0
- package/dist/generated/wirecat-config.d.ts.map +1 -0
- package/dist/generated/wirecat-config.js +328 -0
- package/dist/generated/wirecat-config.js.map +1 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.d.ts.map +1 -0
- package/dist/hooks.js +7 -0
- package/dist/hooks.js.map +1 -0
- package/dist/identity.d.ts +33 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/identity.js +31 -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/program.d.ts +6 -0
- package/dist/program.d.ts.map +1 -0
- package/dist/program.js +54 -0
- package/dist/program.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/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 +87 -4
- package/skills/attio-cli/SKILL.md +58 -0
- package/skills/attio-cli/references/api/api-activities.md +62 -0
- package/skills/attio-cli/references/api/api-activity-records.md +96 -0
- package/skills/attio-cli/references/api/api-attributes.md +148 -0
- package/skills/attio-cli/references/api/api-call-recordings.md +53 -0
- package/skills/attio-cli/references/api/api-comments.md +36 -0
- package/skills/attio-cli/references/api/api-emails.md +23 -0
- package/skills/attio-cli/references/api/api-entries.md +127 -0
- package/skills/attio-cli/references/api/api-files.md +63 -0
- package/skills/attio-cli/references/api/api-lists.md +44 -0
- package/skills/attio-cli/references/api/api-meetings.md +82 -0
- package/skills/attio-cli/references/api/api-meta.md +8 -0
- package/skills/attio-cli/references/api/api-notes.md +64 -0
- package/skills/attio-cli/references/api/api-objects.md +55 -0
- package/skills/attio-cli/references/api/api-records.md +168 -0
- package/skills/attio-cli/references/api/api-sequences.md +15 -0
- package/skills/attio-cli/references/api/api-sql.md +15 -0
- package/skills/attio-cli/references/api/api-tasks.md +67 -0
- package/skills/attio-cli/references/api/api-threads.md +35 -0
- package/skills/attio-cli/references/api/api-transcripts.md +17 -0
- package/skills/attio-cli/references/api/api-views.md +133 -0
- package/skills/attio-cli/references/api/api-webhooks.md +62 -0
- package/skills/attio-cli/references/api/api-workspace-blocklist.md +39 -0
- package/skills/attio-cli/references/api/api-workspace-members.md +19 -0
- package/skills/attio-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-YKN4Y35P.js";
|
|
18
|
+
import "./chunk-Y5E2WNWB.js";
|
|
19
|
+
import {
|
|
20
|
+
CliError
|
|
21
|
+
} from "./chunk-5DCRHSBI.js";
|
|
22
|
+
import {
|
|
23
|
+
__name,
|
|
24
|
+
__toESM
|
|
25
|
+
} from "./chunk-ZVVMGPBJ.js";
|
|
26
|
+
|
|
27
|
+
// node_modules/.pnpm/@wirecat+cli-base@0.118.0_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.118.0_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.118.0_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.118.0_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.118.0_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-ASVFQXMF.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
|
+
};
|