@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/native.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Pt as CapletsError, Q as ToolListChangedNotificationSchema, _ as StreamableHTTPClientTransport, a as resolveCapletsServer, b as Client, bt as parseConfig, i as resolveCapletsMode, l as capabilityDescription, n as mcpUrlForBase, o as CapletsEngine, vt as loadLocalOverlayConfigWithSources } from "./options--RoZwWjs.js";
2
- import { a as generatedToolInputJsonSchemaForCaplet, i as generatedToolInputJsonSchema, l as operations, o as generatedToolInputSchema } from "./generated-tool-input-schema-MbYF5jMW.js";
1
+ import { Pt as CapletsError, Q as ToolListChangedNotificationSchema, _ as StreamableHTTPClientTransport, a as resolveCapletsServer, b as Client, bt as parseConfig, i as resolveCapletsMode, l as capabilityDescription, n as mcpUrlForBase, o as CapletsEngine, vt as loadLocalOverlayConfigWithSources } from "./options-DnOUjft1.js";
2
+ import { a as generatedToolInputJsonSchemaForCaplet, i as generatedToolInputJsonSchema, l as operations, o as generatedToolInputSchema } from "./generated-tool-input-schema--kVuUNc5.js";
3
3
  //#region src/native/options.ts
4
4
  const DEFAULT_POLL_INTERVAL_MS = 3e4;
5
5
  function resolveNativeCapletsServiceOptions(input = {}, env = process.env) {
@@ -42,7 +42,7 @@ function nativeCapletsSystemGuidance(toolNames) {
42
42
  "Available Caplets native tools:",
43
43
  toolNames.length > 0 ? toolNames.map((tool) => `- ${tool}`).join("\n") : "- none",
44
44
  "",
45
- "Flow: get_caplet when the domain is unfamiliar; use search_tools/list_tools for actions; MCP-backed Caplets may also expose resources, prompts, and completions in their tool schema.",
45
+ "Flow: inspect when the domain is unfamiliar; use search_tools/list_tools for actions; MCP-backed Caplets may also expose resources, prompts, and completions in their tool schema.",
46
46
  "Use fields on call_tool when a non-GraphQL downstream outputSchema allows selecting only needed structured paths."
47
47
  ].join("\n");
48
48
  }
@@ -1,4 +1,4 @@
1
- import { A as url, B as clone, C as object$1, D as string, E as record, F as $ZodType, H as normalizeParams, I as parse$2, L as parseAsync, M as toJSONSchema, N as _coercedNumber, O as union, P as $ZodObject, R as safeParse$1, S as number$1, T as preprocess, U as $constructor, V as defineLazy, W as NEVER, _ as custom, b as literal, c as mcpOperations, f as _enum, g as boolean, h as array, i as generatedToolInputJsonSchema, j as datetime, k as unknown, l as operations, m as any, p as _null, s as generatedToolInputSchemaForCaplet, u as ZodNumber$1, v as discriminatedUnion, w as optional, x as looseObject, y as intersection, z as safeParseAsync$1 } from "./generated-tool-input-schema-MbYF5jMW.js";
1
+ import { A as url, B as clone, C as object$1, D as string, E as record, F as $ZodType, H as normalizeParams, I as parse$2, L as parseAsync, M as toJSONSchema, N as _coercedNumber, O as union, P as $ZodObject, R as safeParse$1, S as number$1, T as preprocess, U as $constructor, V as defineLazy, W as NEVER, _ as custom, b as literal, c as mcpOperations, f as _enum, g as boolean, h as array, i as generatedToolInputJsonSchema, j as datetime, k as unknown, l as operations, m as any, p as _null, s as generatedToolInputSchemaForCaplet, u as ZodNumber$1, v as discriminatedUnion, w as optional, x as looseObject, y as intersection, z as safeParseAsync$1 } from "./generated-tool-input-schema--kVuUNc5.js";
2
2
  import { createRequire } from "node:module";
3
3
  import { accessSync, chmodSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
4
4
  import minpath, { basename, delimiter, dirname, extname, isAbsolute, join, parse, posix, relative, resolve, win32 } from "node:path";
@@ -274,7 +274,7 @@ function renderDiscoveryWrapper(value, context, title) {
274
274
  else if (context.operation === "list_prompts" || context.operation === "search_prompts") lines.push("## Prompts", "", renderNamedList(arrayValue(result?.prompts), "prompt"), "");
275
275
  else if (context.operation === "get_tool") lines.push("## Tool", "", renderToolSummary(asRecord$2(result?.tool)), "");
276
276
  else if (context.operation === "check_backend") lines.push("## Backend Status", "", renderBackendStatus(result), "");
277
- else if (context.operation === "get_caplet") lines.push("## Caplet", "", renderCapletSummary(result), "");
277
+ else if (context.operation === "inspect") lines.push("## Caplet", "", renderCapletSummary(result), "");
278
278
  lines.push("## Full Result", "", jsonFence(value.result));
279
279
  if (value.caplets !== void 0) lines.push("", "## Caplets Metadata", "", jsonFence(value.caplets));
280
280
  return lines.join("\n");
@@ -24503,7 +24503,7 @@ var Client = class extends Protocol {
24503
24503
  var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24504
24504
  module.exports = isexe;
24505
24505
  isexe.sync = sync;
24506
- var fs$2 = __require("fs");
24506
+ var fs$3 = __require("fs");
24507
24507
  function checkPathExt(path, options) {
24508
24508
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
24509
24509
  if (!pathext) return true;
@@ -24520,12 +24520,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24520
24520
  return checkPathExt(path, options);
24521
24521
  }
24522
24522
  function isexe(path, options, cb) {
24523
- fs$2.stat(path, function(er, stat) {
24523
+ fs$3.stat(path, function(er, stat) {
24524
24524
  cb(er, er ? false : checkStat(stat, path, options));
24525
24525
  });
24526
24526
  }
24527
24527
  function sync(path, options) {
24528
- return checkStat(fs$2.statSync(path), path, options);
24528
+ return checkStat(fs$3.statSync(path), path, options);
24529
24529
  }
24530
24530
  }));
24531
24531
  //#endregion
@@ -24533,14 +24533,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24533
24533
  var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24534
24534
  module.exports = isexe;
24535
24535
  isexe.sync = sync;
24536
- var fs$1 = __require("fs");
24536
+ var fs$2 = __require("fs");
24537
24537
  function isexe(path, options, cb) {
24538
- fs$1.stat(path, function(er, stat) {
24538
+ fs$2.stat(path, function(er, stat) {
24539
24539
  cb(er, er ? false : checkStat(stat, options));
24540
24540
  });
24541
24541
  }
24542
24542
  function sync(path, options) {
24543
- return checkStat(fs$1.statSync(path), options);
24543
+ return checkStat(fs$2.statSync(path), options);
24544
24544
  }
24545
24545
  function checkStat(stat, options) {
24546
24546
  return stat.isFile() && checkMode(stat, options);
@@ -24604,7 +24604,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24604
24604
  //#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
24605
24605
  var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24606
24606
  const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
24607
- const path$2 = __require("path");
24607
+ const path$3 = __require("path");
24608
24608
  const COLON = isWindows ? ";" : ":";
24609
24609
  const isexe = require_isexe();
24610
24610
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -24634,7 +24634,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24634
24634
  if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
24635
24635
  const ppRaw = pathEnv[i];
24636
24636
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
24637
- const pCmd = path$2.join(pathPart, cmd);
24637
+ const pCmd = path$3.join(pathPart, cmd);
24638
24638
  resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
24639
24639
  });
24640
24640
  const subStep = (p, i, ii) => new Promise((resolve, reject) => {
@@ -24655,7 +24655,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24655
24655
  for (let i = 0; i < pathEnv.length; i++) {
24656
24656
  const ppRaw = pathEnv[i];
24657
24657
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
24658
- const pCmd = path$2.join(pathPart, cmd);
24658
+ const pCmd = path$3.join(pathPart, cmd);
24659
24659
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
24660
24660
  for (let j = 0; j < pathExt.length; j++) {
24661
24661
  const cur = p + pathExt[j];
@@ -24686,7 +24686,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24686
24686
  //#endregion
24687
24687
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
24688
24688
  var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24689
- const path$1 = __require("path");
24689
+ const path$2 = __require("path");
24690
24690
  const which = require_which();
24691
24691
  const getPathKey = require_path_key();
24692
24692
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -24701,12 +24701,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
24701
24701
  try {
24702
24702
  resolved = which.sync(parsed.command, {
24703
24703
  path: env[getPathKey({ env })],
24704
- pathExt: withoutPathExt ? path$1.delimiter : void 0
24704
+ pathExt: withoutPathExt ? path$2.delimiter : void 0
24705
24705
  });
24706
24706
  } catch (e) {} finally {
24707
24707
  if (shouldSwitchCwd) process.chdir(cwd);
24708
24708
  }
24709
- if (resolved) resolved = path$1.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
24709
+ if (resolved) resolved = path$2.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
24710
24710
  return resolved;
24711
24711
  }
24712
24712
  function resolveCommand(parsed) {
@@ -24755,16 +24755,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
24755
24755
  //#endregion
24756
24756
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
24757
24757
  var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24758
- const fs = __require("fs");
24758
+ const fs$1 = __require("fs");
24759
24759
  const shebangCommand = require_shebang_command();
24760
24760
  function readShebang(command) {
24761
24761
  const size = 150;
24762
24762
  const buffer = Buffer.alloc(size);
24763
24763
  let fd;
24764
24764
  try {
24765
- fd = fs.openSync(command, "r");
24766
- fs.readSync(fd, buffer, 0, size, 0);
24767
- fs.closeSync(fd);
24765
+ fd = fs$1.openSync(command, "r");
24766
+ fs$1.readSync(fd, buffer, 0, size, 0);
24767
+ fs$1.closeSync(fd);
24768
24768
  } catch (e) {}
24769
24769
  return shebangCommand(buffer.toString());
24770
24770
  }
@@ -24773,7 +24773,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24773
24773
  //#endregion
24774
24774
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
24775
24775
  var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24776
- const path = __require("path");
24776
+ const path$1 = __require("path");
24777
24777
  const resolveCommand = require_resolveCommand();
24778
24778
  const escape = require_escape();
24779
24779
  const readShebang = require_readShebang();
@@ -24796,7 +24796,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
24796
24796
  const needsShell = !isExecutableRegExp.test(commandFile);
24797
24797
  if (parsed.options.forceShell || needsShell) {
24798
24798
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
24799
- parsed.command = path.normalize(parsed.command);
24799
+ parsed.command = path$1.normalize(parsed.command);
24800
24800
  parsed.command = escape.command(parsed.command);
24801
24801
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
24802
24802
  parsed.args = [
@@ -26147,7 +26147,7 @@ async function registerClient(authorizationServerUrl, { metadata, clientMetadata
26147
26147
  return OAuthClientInformationFullSchema.parse(await response.json());
26148
26148
  }
26149
26149
  //#endregion
26150
- //#region ../../node_modules/.pnpm/eventsource-parser@3.0.8/node_modules/eventsource-parser/dist/index.js
26150
+ //#region ../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/index.js
26151
26151
  var ParseError = class extends Error {
26152
26152
  constructor(message, options) {
26153
26153
  super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
@@ -26155,26 +26155,30 @@ var ParseError = class extends Error {
26155
26155
  };
26156
26156
  const LF = 10, CR = 13, SPACE = 32;
26157
26157
  function noop(_arg) {}
26158
- function createParser(callbacks) {
26159
- if (typeof callbacks == "function") throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
26160
- const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks, pendingFragments = [];
26161
- let isFirstChunk = !0, id, data = "", dataLines = 0, eventType;
26158
+ function createParser(config) {
26159
+ if (typeof config == "function") throw new TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");
26160
+ const { onEvent = noop, onError = noop, onRetry = noop, onComment, maxBufferSize } = config, pendingFragments = [];
26161
+ let pendingFragmentsLength = 0, isFirstChunk = !0, id, data = "", dataLines = 0, eventType, terminated = !1;
26162
26162
  function feed(chunk) {
26163
+ if (terminated) throw new Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");
26163
26164
  if (isFirstChunk && (isFirstChunk = !1, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
26164
26165
  const trailing2 = processLines(chunk);
26165
- trailing2 !== "" && pendingFragments.push(trailing2);
26166
+ trailing2 !== "" && (pendingFragments.push(trailing2), pendingFragmentsLength = trailing2.length), checkBufferSize();
26166
26167
  return;
26167
26168
  }
26168
26169
  if (chunk.indexOf(`
26169
26170
  `) === -1 && chunk.indexOf("\r") === -1) {
26170
- pendingFragments.push(chunk);
26171
+ pendingFragments.push(chunk), pendingFragmentsLength += chunk.length, checkBufferSize();
26171
26172
  return;
26172
26173
  }
26173
26174
  pendingFragments.push(chunk);
26174
26175
  const input = pendingFragments.join("");
26175
- pendingFragments.length = 0;
26176
+ pendingFragments.length = 0, pendingFragmentsLength = 0;
26176
26177
  const trailing = processLines(input);
26177
- trailing !== "" && pendingFragments.push(trailing);
26178
+ trailing !== "" && (pendingFragments.push(trailing), pendingFragmentsLength = trailing.length), checkBufferSize();
26179
+ }
26180
+ function checkBufferSize() {
26181
+ maxBufferSize !== void 0 && (pendingFragmentsLength + data.length <= maxBufferSize || (terminated = !0, pendingFragments.length = 0, pendingFragmentsLength = 0, id = void 0, data = "", dataLines = 0, eventType = void 0, onError(new ParseError(`Buffered data exceeded max buffer size of ${maxBufferSize} characters`, { type: "max-buffer-size-exceeded" }))));
26178
26182
  }
26179
26183
  function processLines(chunk) {
26180
26184
  let searchIndex = 0;
@@ -26294,7 +26298,7 @@ ${value}`, dataLines++;
26294
26298
  const incompleteLine = pendingFragments.join("");
26295
26299
  parseLine(incompleteLine, 0, incompleteLine.length);
26296
26300
  }
26297
- isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
26301
+ isFirstChunk = !0, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0, pendingFragmentsLength = 0, terminated = !1;
26298
26302
  }
26299
26303
  return {
26300
26304
  feed,
@@ -26308,9 +26312,9 @@ function isEventPrefix(chunk, i, firstCharCode) {
26308
26312
  return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
26309
26313
  }
26310
26314
  //#endregion
26311
- //#region ../../node_modules/.pnpm/eventsource-parser@3.0.8/node_modules/eventsource-parser/dist/stream.js
26315
+ //#region ../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js
26312
26316
  var EventSourceParserStream = class extends TransformStream {
26313
- constructor({ onError, onRetry, onComment } = {}) {
26317
+ constructor({ onError, onRetry, onComment, maxBufferSize } = {}) {
26314
26318
  let parser;
26315
26319
  super({
26316
26320
  start(controller) {
@@ -26319,10 +26323,11 @@ var EventSourceParserStream = class extends TransformStream {
26319
26323
  controller.enqueue(event);
26320
26324
  },
26321
26325
  onError(error) {
26322
- onError === "terminate" ? controller.error(error) : typeof onError == "function" && onError(error);
26326
+ typeof onError == "function" && onError(error), (onError === "terminate" || error.type === "max-buffer-size-exceeded") && controller.error(error);
26323
26327
  },
26324
26328
  onRetry,
26325
- onComment
26329
+ onComment,
26330
+ maxBufferSize
26326
26331
  });
26327
26332
  },
26328
26333
  transform(chunk) {
@@ -53490,7 +53495,7 @@ function capabilityDescription(server) {
53490
53495
  return [
53491
53496
  `${server.name} Caplet.`,
53492
53497
  server.description,
53493
- server.backend === "mcp" ? "Use get_caplet for details when needed; use tools for actions, resources for readable context, prompts for reusable workflows, and complete for prompt/resource-template arguments." : "Use get_caplet for details when needed; use search_tools or list_tools to discover downstream operations."
53498
+ server.backend === "mcp" ? "Use inspect for details when needed; use tools for actions, resources for readable context, prompts for reusable workflows, and complete for prompt/resource-template arguments." : "Use inspect for details when needed; use search_tools or list_tools to discover downstream operations."
53494
53499
  ].filter(Boolean).join(" ");
53495
53500
  }
53496
53501
  //#endregion
@@ -53716,7 +53721,7 @@ async function handleServerTool(server, request, registry, downstream, openapi,
53716
53721
  const startedAt = Date.now();
53717
53722
  const parsed = validateOperationRequest(request, registry.config.options.maxSearchLimit, server.backend);
53718
53723
  switch (parsed.operation) {
53719
- case "get_caplet": return jsonResult(registry.detail(server), metadataFor(server, "get_caplet", void 0, startedAt));
53724
+ case "inspect": return jsonResult(registry.detail(server), metadataFor(server, "inspect", void 0, startedAt));
53720
53725
  case "check_backend": return jsonResult(await backendFor(server, downstream, openapi, graphql, http, cli, caplets).check(server), metadataFor(server, "check_backend", void 0, startedAt));
53721
53726
  case "list_tools": {
53722
53727
  const backend = backendFor(server, downstream, openapi, graphql, http, cli, caplets);
@@ -53834,7 +53839,7 @@ function validateOperationRequest(request, maxSearchLimit, backend = "tool") {
53834
53839
  if (extras.length > 0) throw new CapletsError("REQUEST_INVALID", `Unexpected field(s) for ${value.operation}: ${extras.join(", ")}`);
53835
53840
  };
53836
53841
  switch (value.operation) {
53837
- case "get_caplet":
53842
+ case "inspect":
53838
53843
  case "check_backend":
53839
53844
  allowed([]);
53840
53845
  return { operation: value.operation };
@@ -54445,7 +54450,7 @@ var CapletsEngine = class {
54445
54450
  }
54446
54451
  }
54447
54452
  async completeCliWords(words) {
54448
- const { completeCliWords } = await import("./completion-DvWQk5qR.js").then((n) => n.r);
54453
+ const { completeCliWords } = await import("./completion-RqzHpHRY.js").then((n) => n.r);
54449
54454
  return await completeCliWords(words, {
54450
54455
  config: this.registry.config,
54451
54456
  managers: {
@@ -54785,4 +54790,4 @@ function hasEnv(value) {
54785
54790
  return value !== void 0 && value.trim() !== "";
54786
54791
  }
54787
54792
  //#endregion
54788
- export { assertCompleteRequestPrompt as $, CreateMessageResultSchema as A, hasRenderableStructuredContent as At, JSONRPCMessageSchema as B, __toESM as Bt, AjvJsonSchemaValidator as C, resolveCapletsRoot as Ct, CallToolRequestSchema as D, discoverCapletFiles as Dt, toJsonSchemaCompat as E, resolveProjectConfigPath as Et, EmptyResultSchema as F, redactSecrets as Ft, ListRootsResultSchema as G, ListPromptsRequestSchema as H, ErrorCode as I, toSafeError as It, McpError as J, ListToolsRequestSchema as K, GetPromptRequestSchema as L, __commonJSMin as Lt, CreateTaskResultSchema as M, markdownStructuredContent as Mt, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as N, CAPLETS_ERROR_CODES as Nt, CallToolResultSchema as O, validateCapletFile as Ot, ElicitResultSchema as P, CapletsError as Pt, ToolListChangedNotificationSchema as Q, InitializeRequestSchema as R, __exportAll as Rt, assertToolsCallTaskCapability as S, DEFAULT_COMPLETION_CACHE_DIR as St, mergeCapabilities as T, resolveProjectCapletsRoot as Tt, ListResourceTemplatesRequestSchema as U, LATEST_PROTOCOL_VERSION as V, ListResourcesRequestSchema as W, SUPPORTED_PROTOCOL_VERSIONS as X, ReadResourceRequestSchema as Y, SetLevelRequestSchema as Z, StreamableHTTPClientTransport as _, loadGlobalConfig as _t, resolveCapletsServer as a, getLiteralValue as at, Client as b, parseConfig as bt, ServerRegistry as c, getSchemaDescription as ct, runOAuthFlow as d, normalizeObjectSchema as dt, assertCompleteRequestResourceTemplate as et, startGenericOAuthFlow as f, objectFromShape as ft, readTokenBundle as g, loadConfigWithSources as gt, isTokenBundleExpired as h, loadConfig as ht, resolveCapletsMode as i, isJSONRPCResultResponse as it, CreateMessageResultWithToolsSchema as j, markdownCallToolResultContent as jt, CompleteRequestSchema as k, SERVER_ID_PATTERN as kt, capabilityDescription as l, isSchemaOptional as lt, deleteTokenBundle as m, safeParseAsync as mt, mcpUrlForBase as n, isJSONRPCErrorResponse as nt, CapletsEngine as o, getObjectShape as ot, startOAuthFlow as p, safeParse as pt, LoggingLevelSchema as q, parseServerBaseUrl as r, isJSONRPCRequest as rt, handleServerTool as s, getParseErrorMessage as st, controlUrlForBase as t, isInitializeRequest as tt, runGenericOAuthFlow as u, isZ4Schema as ut, ReadBuffer as v, loadLocalOverlayConfigWithSources as vt, Protocol as w, resolveConfigPath as wt, assertClientRequestTaskCapability as x, DEFAULT_AUTH_DIR as xt, serializeMessage as y, loadProjectConfig as yt, InitializedNotificationSchema as z, __require as zt };
54793
+ export { assertCompleteRequestPrompt as $, CreateMessageResultSchema as A, hasRenderableStructuredContent as At, JSONRPCMessageSchema as B, AjvJsonSchemaValidator as C, resolveCapletsRoot as Ct, CallToolRequestSchema as D, discoverCapletFiles as Dt, toJsonSchemaCompat as E, resolveProjectConfigPath as Et, EmptyResultSchema as F, redactSecrets as Ft, ListRootsResultSchema as G, ListPromptsRequestSchema as H, ErrorCode as I, toSafeError as It, McpError as J, ListToolsRequestSchema as K, GetPromptRequestSchema as L, __exportAll as Lt, CreateTaskResultSchema as M, markdownStructuredContent as Mt, DEFAULT_NEGOTIATED_PROTOCOL_VERSION as N, CAPLETS_ERROR_CODES as Nt, CallToolResultSchema as O, validateCapletFile as Ot, ElicitResultSchema as P, CapletsError as Pt, ToolListChangedNotificationSchema as Q, InitializeRequestSchema as R, assertToolsCallTaskCapability as S, DEFAULT_COMPLETION_CACHE_DIR as St, mergeCapabilities as T, resolveProjectCapletsRoot as Tt, ListResourceTemplatesRequestSchema as U, LATEST_PROTOCOL_VERSION as V, ListResourcesRequestSchema as W, SUPPORTED_PROTOCOL_VERSIONS as X, ReadResourceRequestSchema as Y, SetLevelRequestSchema as Z, StreamableHTTPClientTransport as _, loadGlobalConfig as _t, resolveCapletsServer as a, getLiteralValue as at, Client as b, parseConfig as bt, ServerRegistry as c, getSchemaDescription as ct, runOAuthFlow as d, normalizeObjectSchema as dt, assertCompleteRequestResourceTemplate as et, startGenericOAuthFlow as f, objectFromShape as ft, readTokenBundle as g, loadConfigWithSources as gt, isTokenBundleExpired as h, loadConfig as ht, resolveCapletsMode as i, isJSONRPCResultResponse as it, CreateMessageResultWithToolsSchema as j, markdownCallToolResultContent as jt, CompleteRequestSchema as k, SERVER_ID_PATTERN as kt, capabilityDescription as l, isSchemaOptional as lt, deleteTokenBundle as m, safeParseAsync as mt, mcpUrlForBase as n, isJSONRPCErrorResponse as nt, CapletsEngine as o, getObjectShape as ot, startOAuthFlow as p, safeParse as pt, LoggingLevelSchema as q, parseServerBaseUrl as r, isJSONRPCRequest as rt, handleServerTool as s, getParseErrorMessage as st, controlUrlForBase as t, isInitializeRequest as tt, runGenericOAuthFlow as u, isZ4Schema as ut, ReadBuffer as v, loadLocalOverlayConfigWithSources as vt, Protocol as w, resolveConfigPath as wt, assertClientRequestTaskCapability as x, DEFAULT_AUTH_DIR as xt, serializeMessage as y, loadProjectConfig as yt, InitializedNotificationSchema as z };
@@ -1,5 +1,5 @@
1
1
  import type { CapletsErrorCode } from "../errors";
2
- export type RemoteCliCommand = "list" | "get_caplet" | "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" | "init" | "add" | "install" | "complete_cli" | "auth_login_start" | "auth_login_complete" | "auth_logout" | "auth_list";
2
+ export type RemoteCliCommand = "list" | "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" | "init" | "add" | "install" | "complete_cli" | "auth_login_start" | "auth_login_complete" | "auth_logout" | "auth_list";
3
3
  export type RemoteCliRequest = {
4
4
  command: RemoteCliCommand;
5
5
  arguments: Record<string, unknown>;
package/dist/tools.d.ts CHANGED
@@ -13,7 +13,7 @@ export type GeneratedServerToolRequest = RequiredOperationRequest;
13
13
  export declare function handleServerTool(server: CapletConfig, request: unknown, registry: ServerRegistry, downstream: DownstreamManager, openapi?: OpenApiManager, graphql?: GraphQLManager, http?: HttpActionManager, cli?: CliToolsManager, caplets?: CapletSetManager): Promise<any>;
14
14
  export declare function validateOperationRequest(request: unknown, maxSearchLimit: number, backend?: string): RequiredOperationRequest;
15
15
  type RequiredOperationRequest = {
16
- operation: "get_caplet" | "check_backend";
16
+ operation: "inspect" | "check_backend";
17
17
  } | {
18
18
  operation: "list_tools";
19
19
  limit?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caplets/core",
3
- "version": "0.18.8",
3
+ "version": "0.18.9",
4
4
  "description": "Core runtime library for Caplets progressive disclosure gateways.",
5
5
  "keywords": [
6
6
  "caplets",
@@ -48,7 +48,7 @@
48
48
  "@hono/mcp": "^0.3.0",
49
49
  "@hono/node-server": "^2.0.4",
50
50
  "@modelcontextprotocol/sdk": "^1.29.0",
51
- "commander": "^14.0.3",
51
+ "commander": "^15.0.0",
52
52
  "graphql": "^16.14.0",
53
53
  "hono": "^4.12.23",
54
54
  "vfile": "^6.0.3",