@bankr/cli 0.2.3 → 0.2.4

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.
@@ -210,7 +210,9 @@ export default async function handler(req: Request): Promise<Response> {
210
210
  properties: {
211
211
  [isPost ? "field" : "param"]: {
212
212
  type: "string",
213
- description: isPost ? "Example body field" : "Example query parameter",
213
+ description: isPost
214
+ ? "Example body field"
215
+ : "Example query parameter",
214
216
  },
215
217
  },
216
218
  required: [isPost ? "field" : "param"],
@@ -629,7 +631,7 @@ function renderLegacySchema(obj) {
629
631
  const pretty = JSON.stringify(v, null, 2);
630
632
  const indented = pretty
631
633
  .split("\n")
632
- .map((line, i) => (i === 0 ? line : `${P} ${" ".repeat(k.length)}${line}`))
634
+ .map((line, i) => i === 0 ? line : `${P} ${" ".repeat(k.length)}${line}`)
633
635
  .join("\n");
634
636
  lines.push(`${P} ${chalk.cyan(k)} ${chalk.dim(indented)}`);
635
637
  }
@@ -736,19 +738,22 @@ export async function x402SearchCommand(queryParts, opts = {}) {
736
738
  const res = await fetch(`${getApiUrl()}/x402/endpoints/discover?${params}`);
737
739
  const result = await handleResponse(res);
738
740
  spin.stop();
739
- if (result.services.length === 0) {
741
+ // Filter low-relevance results client-side
742
+ const MIN_DISPLAY_SCORE = 0.15;
743
+ const services = result.services.filter((s) => !s.score || s.score >= MIN_DISPLAY_SCORE);
744
+ if (services.length === 0) {
740
745
  output.info(`No services found for "${query}"`);
741
746
  return;
742
747
  }
743
748
  // Raw mode: dump JSON and exit
744
749
  if (opts.raw) {
745
- console.log(JSON.stringify(result.services, null, 2));
750
+ console.log(JSON.stringify(services, null, 2));
746
751
  return;
747
752
  }
748
753
  console.log();
749
- console.log(` ${chalk.dim(`Found ${result.services.length} service(s) for`)} "${query}"`);
754
+ console.log(` ${chalk.dim(`Found ${services.length} service(s) for`)} "${query}"`);
750
755
  console.log(` ${chalk.dim("─".repeat(60))}`);
751
- for (const svc of result.services) {
756
+ for (const svc of services) {
752
757
  printServiceFormatted(svc);
753
758
  }
754
759
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bankr/cli",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Official CLI for the Bankr AI agent platform",
5
5
  "type": "module",
6
6
  "bin": {