retell-cli 1.0.1 → 1.0.2

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/index.js +14 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1351,15 +1351,23 @@ async function diffPromptsCommand(agentId, options) {
1351
1351
 
1352
1352
  // src/commands/agent/publish.ts
1353
1353
  async function publishAgentCommand(agentId) {
1354
+ const client = getRetellClient();
1354
1355
  try {
1355
- const client = getRetellClient();
1356
- const result = await client.agent.publish(agentId);
1356
+ await client.agent.publish(agentId);
1357
+ } catch (error) {
1358
+ if (error instanceof Error && error.message.includes("invalid json response body") && error.message.includes("Unexpected end of JSON input")) {
1359
+ } else {
1360
+ handleSdkError(error);
1361
+ }
1362
+ }
1363
+ try {
1364
+ const agent = await client.agent.retrieve(agentId);
1357
1365
  outputJson({
1358
1366
  message: "Agent published successfully",
1359
- agent_id: result?.agent_id || agentId,
1360
- agent_name: result?.agent_name || "Unknown",
1361
- version: result?.version || "Unknown",
1362
- is_published: result?.is_published ?? true,
1367
+ agent_id: agent.agent_id,
1368
+ agent_name: agent.agent_name || "Unknown",
1369
+ version: agent.version || "Unknown",
1370
+ is_published: agent.is_published ?? true,
1363
1371
  note: "Draft version incremented and ready for new changes"
1364
1372
  });
1365
1373
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "retell-cli",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Community CLI for Retell AI - efficient access to transcripts, agents, and prompts for AI assistants without MCP overhead",
5
5
  "main": "dist/index.js",
6
6
  "bin": {