@ai-ecoverse/mcpcat 0.27.1 → 0.27.3

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.
@@ -9001,7 +9001,9 @@ async function createPiConnection(options) {
9001
9001
  );
9002
9002
  },
9003
9003
  async complete(ref, argument) {
9004
- return client.request("completion/complete", { ref, argument }, reqOpts2());
9004
+ return guard(
9005
+ client.request("completion/complete", { ref, argument }, reqOpts2())
9006
+ );
9005
9007
  },
9006
9008
  async close() {
9007
9009
  await client.close();
@@ -17899,13 +17901,15 @@ async function runComplete(platform2, conn, args2, json) {
17899
17901
  return EXIT_OK;
17900
17902
  }
17901
17903
  const completion = result?.completion;
17902
- for (const v of completion?.values ?? []) {
17903
- await platform2.write(1, sanitizeTerminal(`${v}
17904
+ const values = completion?.values ?? [];
17905
+ for (const v of values) {
17906
+ const line = String(v).replace(/\\/g, "\\\\").replace(/\r/g, "\\r").replace(/\n/g, "\\n");
17907
+ await platform2.write(1, sanitizeTerminal(`${line}
17904
17908
  `));
17905
17909
  }
17906
17910
  if (completion?.hasMore) {
17907
17911
  const total = completion.total !== void 0 ? ` of ${completion.total}` : "";
17908
- await platform2.write(2, `mcpcat: ${completion.values.length}${total} values, more available
17912
+ await platform2.write(2, `mcpcat: ${values.length}${total} values, more available
17909
17913
  `);
17910
17914
  }
17911
17915
  return EXIT_OK;
@@ -19374,5 +19378,5 @@ try {
19374
19378
  });
19375
19379
  } catch {
19376
19380
  }
19377
- var code = await run(platform, "0.27.1", args);
19381
+ var code = await run(platform, "0.27.3", args);
19378
19382
  process.exit(code);
@@ -8622,7 +8622,9 @@ async function createPiConnection(options) {
8622
8622
  );
8623
8623
  },
8624
8624
  async complete(ref, argument) {
8625
- return client.request("completion/complete", { ref, argument }, reqOpts2());
8625
+ return guard(
8626
+ client.request("completion/complete", { ref, argument }, reqOpts2())
8627
+ );
8626
8628
  },
8627
8629
  async close() {
8628
8630
  await client.close();
@@ -17416,13 +17418,15 @@ async function runComplete(platform2, conn, args, json) {
17416
17418
  return EXIT_OK;
17417
17419
  }
17418
17420
  const completion = result?.completion;
17419
- for (const v of completion?.values ?? []) {
17420
- await platform2.write(1, sanitizeTerminal(`${v}
17421
+ const values = completion?.values ?? [];
17422
+ for (const v of values) {
17423
+ const line = String(v).replace(/\\/g, "\\\\").replace(/\r/g, "\\r").replace(/\n/g, "\\n");
17424
+ await platform2.write(1, sanitizeTerminal(`${line}
17421
17425
  `));
17422
17426
  }
17423
17427
  if (completion?.hasMore) {
17424
17428
  const total = completion.total !== void 0 ? ` of ${completion.total}` : "";
17425
- await platform2.write(2, `mcpcat: ${completion.values.length}${total} values, more available
17429
+ await platform2.write(2, `mcpcat: ${values.length}${total} values, more available
17426
17430
  `);
17427
17431
  }
17428
17432
  return EXIT_OK;
@@ -18601,7 +18605,7 @@ async function main(ctx) {
18601
18605
  packageDir: "/node_modules/@ai-ecoverse/mcpcat"
18602
18606
  });
18603
18607
  const args = ctx.argv.slice(1);
18604
- return run(platform2, "0.27.1", args);
18608
+ return run(platform2, "0.27.3", args);
18605
18609
  }
18606
18610
  export {
18607
18611
  main as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ecoverse/mcpcat",
3
- "version": "0.27.1",
3
+ "version": "0.27.3",
4
4
  "description": "A curl for the Model Context Protocol",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -58,7 +58,7 @@
58
58
  "trust:dry": "npx fledgling sync --dry-run -y --skip-publish"
59
59
  },
60
60
  "devDependencies": {
61
- "@ai-ecoverse/slicc-kernel": "1.157.0",
61
+ "@ai-ecoverse/slicc-kernel": "1.157.1",
62
62
  "@ai-ecoverse/slicc-shared-web": "2.12.0",
63
63
  "@biomejs/biome": "2.5.15",
64
64
  "@earendil-works/pi-codemode": "1.3.0",