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.
- package/dist/index.js +14 -6
- 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
|
-
|
|
1356
|
-
|
|
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:
|
|
1360
|
-
agent_name:
|
|
1361
|
-
version:
|
|
1362
|
-
is_published:
|
|
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