@web42/cli 0.2.9 → 0.2.11
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/commands/search.js +1 -1
- package/dist/commands/send.js +6 -2
- package/dist/commands/serve.js +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/commands/search.js
CHANGED
|
@@ -38,7 +38,7 @@ export const searchCommand = new Command("search")
|
|
|
38
38
|
const name = getCardName(agent.agent_card);
|
|
39
39
|
const description = getCardDescription(agent.agent_card);
|
|
40
40
|
const priceCents = getMarketplacePrice(agent.agent_card);
|
|
41
|
-
const ref =
|
|
41
|
+
const ref = agent.slug.replace("~", "/");
|
|
42
42
|
const stars = agent.stars_count > 0 ? chalk.yellow(` \u2605 ${agent.stars_count}`) : "";
|
|
43
43
|
const price = priceCents > 0
|
|
44
44
|
? chalk.green(` $${(priceCents / 100).toFixed(2)}`)
|
package/dist/commands/send.js
CHANGED
|
@@ -23,11 +23,15 @@ function getCachedToken(slug) {
|
|
|
23
23
|
}
|
|
24
24
|
export const sendCommand = new Command("send")
|
|
25
25
|
.description("Send a message to an A2A agent")
|
|
26
|
-
.argument("<agent>", "Agent slug (e.g.
|
|
26
|
+
.argument("<agent>", "Agent slug (e.g. @yan/richard) or direct URL (http://localhost:3001)")
|
|
27
27
|
.argument("<message>", "Message to send")
|
|
28
28
|
.option("--new", "Start a new conversation (clears saved context)")
|
|
29
29
|
.option("--context <id>", "Use a specific context ID")
|
|
30
|
-
.action(async (
|
|
30
|
+
.action(async (rawAgent, userMessage, opts) => {
|
|
31
|
+
// Normalize slug: @user/name → @user~name (DB format)
|
|
32
|
+
const agent = rawAgent.includes("/") && !isUrl(rawAgent)
|
|
33
|
+
? rawAgent.replace("/", "~")
|
|
34
|
+
: rawAgent;
|
|
31
35
|
const config = requireAuth();
|
|
32
36
|
let agentUrl;
|
|
33
37
|
let bearerToken;
|
package/dist/commands/serve.js
CHANGED
|
@@ -119,7 +119,8 @@ async function publishLiveUrl({ apiUrl, token, slug, a2aUrl, enabled, gatewaySta
|
|
|
119
119
|
body: JSON.stringify({ a2a_url: a2aUrl, a2a_enabled: enabled, gateway_status: gatewayStatus }),
|
|
120
120
|
});
|
|
121
121
|
if (!res.ok) {
|
|
122
|
-
|
|
122
|
+
const errBody = await res.json().catch(() => ({}));
|
|
123
|
+
console.warn(chalk.yellow(` Could not register URL with marketplace: ${errBody.error ?? res.status}`));
|
|
123
124
|
}
|
|
124
125
|
else {
|
|
125
126
|
console.log(chalk.dim(" Registered with marketplace"));
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_VERSION = "0.2.
|
|
1
|
+
export declare const CLI_VERSION = "0.2.11";
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = "0.2.
|
|
1
|
+
export const CLI_VERSION = "0.2.11";
|