danube-cli 0.2.4 → 0.2.5
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/danube.mjs +9 -8
- 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.
|
|
169
|
+
version: "0.2.5",
|
|
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(() => {
|
|
@@ -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) => {
|
|
@@ -1232,11 +1233,11 @@ function register7(program) {
|
|
|
1232
1233
|
services.command("list [query]").description("List or search available services").option("--limit <n>", "Maximum results", "10").action(handleErrors(async (query, opts) => {
|
|
1233
1234
|
const client = getPublicClient(ctx.profile);
|
|
1234
1235
|
let result = await client.publicGet("/v1/services/public", {
|
|
1235
|
-
limit: opts.limit
|
|
1236
|
+
limit: query ? undefined : opts.limit
|
|
1236
1237
|
});
|
|
1237
1238
|
if (query) {
|
|
1238
1239
|
const q = query.toLowerCase();
|
|
1239
|
-
result = result.filter((s) => s.name.toLowerCase().includes(q) || (s.description ?? "").toLowerCase().includes(q));
|
|
1240
|
+
result = result.filter((s) => s.name.toLowerCase().includes(q) || (s.description ?? "").toLowerCase().includes(q)).slice(0, parseInt(opts.limit, 10));
|
|
1240
1241
|
}
|
|
1241
1242
|
outputTable(result, [
|
|
1242
1243
|
{ header: "ID", key: "id", style: "dim" },
|