danube-cli 0.2.4 → 0.2.6

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.
Files changed (2) hide show
  1. package/dist/danube.mjs +15 -13
  2. package/package.json +1 -1
package/dist/danube.mjs CHANGED
@@ -166,7 +166,7 @@ var package_default;
166
166
  var init_package = __esm(() => {
167
167
  package_default = {
168
168
  name: "danube-cli",
169
- version: "0.2.4",
169
+ version: "0.2.6",
170
170
  description: "Danube CLI — agent-first tool infrastructure for AI agents",
171
171
  type: "module",
172
172
  license: "MIT",
@@ -718,8 +718,7 @@ Examples:
718
718
  outputTable(tools, [
719
719
  { header: "ID", key: "id", style: "dim" },
720
720
  { header: "Name", key: "name", style: "bold" },
721
- { header: "Description", key: "description" },
722
- { header: "Service", key: "service_name" }
721
+ { header: "Description", key: "description" }
723
722
  ], `Tools matching '${query}'`);
724
723
  }));
725
724
  }
@@ -835,14 +834,17 @@ Examples:
835
834
  const result = await client.post(`/v1/tools/call/${toolId}`, {
836
835
  tool_input: params
837
836
  });
837
+ const hasError = result.error || result.success === false;
838
838
  output({
839
- success: result.success,
839
+ success: result.success ?? !result.error,
840
840
  result: result.result,
841
841
  error: result.error,
842
842
  tool_id: result.tool_id,
843
843
  tool_name: result.tool_name,
844
844
  duration_ms: result.duration_ms
845
845
  });
846
+ if (hasError)
847
+ process.exit(1);
846
848
  }));
847
849
  }
848
850
  var init_execute = __esm(() => {
@@ -1147,8 +1149,8 @@ function register6(program) {
1147
1149
  process.exit(1);
1148
1150
  }
1149
1151
  const client = getClient(ctx.apiKey, ctx.profile);
1150
- const results = await client.post("/v1/tools/call/batch", calls);
1151
- output(results);
1152
+ const results = await client.post("/v1/tools/call/batch", { calls });
1153
+ output(results.results ?? results);
1152
1154
  }));
1153
1155
  tools.command("search <query>").description("Search for tools by name or description").option("--service <id>", "Filter by service ID").option("--limit <n>", "Maximum results", "10").action(handleErrors(async (query, opts) => {
1154
1156
  const client = getClient(ctx.apiKey, ctx.profile);
@@ -1160,8 +1162,7 @@ function register6(program) {
1160
1162
  outputTable(result, [
1161
1163
  { header: "ID", key: "id", style: "dim" },
1162
1164
  { header: "Name", key: "name", style: "bold" },
1163
- { header: "Description", key: "description" },
1164
- { header: "Service", key: "service_name" }
1165
+ { header: "Description", key: "description" }
1165
1166
  ], `Tools matching '${query}'`);
1166
1167
  }));
1167
1168
  tools.command("rate <tool> <rating>").description("Rate a tool (1-5 stars)").option("--comment <text>", "Optional comment").action(handleErrors(async (tool, rating, opts) => {
@@ -1207,9 +1208,10 @@ function register6(program) {
1207
1208
  limit: opts.limit
1208
1209
  });
1209
1210
  outputTable(result, [
1210
- { header: "ID", key: "id", style: "dim" },
1211
- { header: "Name", key: "name", style: "bold" },
1212
- { header: "Description", key: "description" }
1211
+ { header: "ID", key: "tool_id", style: "dim" },
1212
+ { header: "Name", key: "tool_name", style: "bold" },
1213
+ { header: "Description", key: "description" },
1214
+ { header: "Reason", key: "reason" }
1213
1215
  ], `Recommended tools based on ${toolInfo.name}`);
1214
1216
  }));
1215
1217
  }
@@ -1232,11 +1234,11 @@ function register7(program) {
1232
1234
  services.command("list [query]").description("List or search available services").option("--limit <n>", "Maximum results", "10").action(handleErrors(async (query, opts) => {
1233
1235
  const client = getPublicClient(ctx.profile);
1234
1236
  let result = await client.publicGet("/v1/services/public", {
1235
- limit: opts.limit
1237
+ limit: query ? undefined : opts.limit
1236
1238
  });
1237
1239
  if (query) {
1238
1240
  const q = query.toLowerCase();
1239
- result = result.filter((s) => s.name.toLowerCase().includes(q) || (s.description ?? "").toLowerCase().includes(q));
1241
+ result = result.filter((s) => s.name.toLowerCase().includes(q) || (s.description ?? "").toLowerCase().includes(q)).slice(0, parseInt(opts.limit, 10));
1240
1242
  }
1241
1243
  outputTable(result, [
1242
1244
  { header: "ID", key: "id", style: "dim" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danube-cli",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "description": "Danube CLI — agent-first tool infrastructure for AI agents",
5
5
  "type": "module",
6
6
  "license": "MIT",