@avallon-labs/mcp 68.2.0-staging.1418 → 68.3.0-staging.1440

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/index.js CHANGED
@@ -56,5 +56,5 @@ function describeErrors(body) {
56
56
 
57
57
  // src/index.ts
58
58
  setupFetch();
59
- await import("./server-2WLFXTEC.js");
59
+ await import("./server-IFIJMP7X.js");
60
60
  //# sourceMappingURL=index.js.map
@@ -523,6 +523,28 @@ var deleteArtifact = async (id, options) => {
523
523
  const data = body ? JSON.parse(body) : {};
524
524
  return { data, status: res.status, headers: res.headers };
525
525
  };
526
+ var getGetArtifactChunksUrl = (params) => {
527
+ const normalizedParams = new URLSearchParams();
528
+ Object.entries(params || {}).forEach(([key, value]) => {
529
+ if (value !== void 0) {
530
+ normalizedParams.append(key, value === null ? "null" : String(value));
531
+ }
532
+ });
533
+ const stringifiedParams = normalizedParams.toString();
534
+ return stringifiedParams.length > 0 ? `/v1/artifact-chunks?${stringifiedParams}` : `/v1/artifact-chunks`;
535
+ };
536
+ var getArtifactChunks = async (params, options) => {
537
+ const res = await fetch(
538
+ getGetArtifactChunksUrl(params),
539
+ {
540
+ ...options,
541
+ method: "GET"
542
+ }
543
+ );
544
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
545
+ const data = body ? JSON.parse(body) : {};
546
+ return { data, status: res.status, headers: res.headers };
547
+ };
526
548
  var getGetArtifactStatusSummaryUrl = (params) => {
527
549
  const normalizedParams = new URLSearchParams();
528
550
  const deepObjectEntries = [];
@@ -4913,6 +4935,29 @@ var deleteArtifactHandler = async (args, options) => {
4913
4935
  structuredContent: res.data
4914
4936
  };
4915
4937
  };
4938
+ var getArtifactChunksHandler = async (args, options) => {
4939
+ const res = await getArtifactChunks(args.queryParams, options);
4940
+ if (res.status >= 400) {
4941
+ return {
4942
+ content: [
4943
+ {
4944
+ type: "text",
4945
+ text: JSON.stringify(res.data ?? null)
4946
+ }
4947
+ ],
4948
+ isError: true
4949
+ };
4950
+ }
4951
+ return {
4952
+ content: [
4953
+ {
4954
+ type: "text",
4955
+ text: JSON.stringify(res.data ?? null)
4956
+ }
4957
+ ],
4958
+ structuredContent: res.data
4959
+ };
4960
+ };
4916
4961
  var getArtifactStatusSummaryHandler = async (args, options) => {
4917
4962
  const res = await getArtifactStatusSummary(args.queryParams, options);
4918
4963
  if (res.status >= 400) {
@@ -10184,6 +10229,26 @@ var DeleteArtifactResponse = zod.object({
10184
10229
  "data": zod.object({}),
10185
10230
  "message": zod.string()
10186
10231
  });
10232
+ var GetArtifactChunksQueryParams = zod.object({
10233
+ "ids": zod.string()
10234
+ });
10235
+ var GetArtifactChunksResponse = zod.object({
10236
+ "data": zod.object({
10237
+ "chunks": zod.record(zod.string(), zod.object({
10238
+ "artifact_id": zod.string(),
10239
+ "artifact_name": zod.string(),
10240
+ "page": zod.union([zod.number(), zod.null()]),
10241
+ "bounding_box": zod.union([zod.object({
10242
+ "left": zod.number(),
10243
+ "top": zod.number(),
10244
+ "width": zod.number(),
10245
+ "height": zod.number()
10246
+ }), zod.null()]),
10247
+ "content": zod.string()
10248
+ }))
10249
+ }),
10250
+ "message": zod.string()
10251
+ });
10187
10252
  var GetArtifactStatusSummaryQueryParams = zod.object({
10188
10253
  "scope": zod.record(zod.string(), zod.string()).describe("Scope to summarize, using bracket notation (e.g. scope[email_id]=abc-123). At least one key is required. Multiple keys are combined with AND logic.")
10189
10254
  });
@@ -15680,6 +15745,22 @@ var createMcpServer = (options) => {
15680
15745
  signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
15681
15746
  })
15682
15747
  );
15748
+ tools.getArtifactChunks = server2.registerTool(
15749
+ "getArtifactChunks",
15750
+ {
15751
+ title: "Get artifact chunks",
15752
+ description: "Resolve chunk ids to their document, page, bounding box and text, keyed by chunk id.\n\nChunk ids are the `[chunk_id=\u2026]` markers in `content_with_chunkids_md` and the values\nworkers cite (e.g. `data-cite-chunk`). Ids that are unknown or whose document was deleted\nare omitted.",
15753
+ inputSchema: {
15754
+ queryParams: GetArtifactChunksQueryParams
15755
+ },
15756
+ outputSchema: GetArtifactChunksResponse,
15757
+ annotations: { readOnlyHint: true }
15758
+ },
15759
+ (args, ctx) => getArtifactChunksHandler(args, {
15760
+ ...options,
15761
+ signal: options?.signal ? AbortSignal.any([options.signal, ctx.signal]) : ctx.signal
15762
+ })
15763
+ );
15683
15764
  tools.getArtifactStatusSummary = server2.registerTool(
15684
15765
  "getArtifactStatusSummary",
15685
15766
  {
@@ -18722,4 +18803,4 @@ var transport = new StdioServerTransport();
18722
18803
  server.connect(transport).then(() => {
18723
18804
  console.error("MCP server running on stdio");
18724
18805
  }).catch(console.error);
18725
- //# sourceMappingURL=server-2WLFXTEC.js.map
18806
+ //# sourceMappingURL=server-IFIJMP7X.js.map