retell-sync-cli 3.4.1 → 3.5.1
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/cli.js +31 -31
- package/package.json +1 -1
- package/.todo +0 -1
package/dist/cli.js
CHANGED
|
@@ -113746,6 +113746,7 @@ var agentFieldDocs = {
|
|
|
113746
113746
|
fallback_voice_ids: "Fallback voices when primary TTS provider has outages. Must be from different providers.",
|
|
113747
113747
|
interruption_sensitivity: "How sensitive to user interruptions [0,1]. Lower = harder to interrupt. Default 1. Set to 0 to never interrupt.",
|
|
113748
113748
|
language: "Language/dialect for speech recognition. Default en-US. Use 'multi' for multilingual.",
|
|
113749
|
+
llm_websocket_url: "Websocket URL for custom LLM. Only applies to agents with custom-llm response engine type.",
|
|
113749
113750
|
max_call_duration_ms: "Max call length in ms. Min 60000 (1 min), max 7200000 (2 hours). Default 3600000 (1 hour).",
|
|
113750
113751
|
normalize_for_speech: "Normalize numbers, currency, dates to spoken form for consistent synthesis.",
|
|
113751
113752
|
opt_in_signed_url: "Enable signed URLs for public logs/recordings with security signatures that expire after 24 hours.",
|
|
@@ -134855,10 +134856,11 @@ async function serializeState(state, {
|
|
|
134855
134856
|
const hash2 = agent._id.slice(-FILE_HASH_LENGTH);
|
|
134856
134857
|
const agentDirName = `${toSnakeCase(agentName)}_${hash2}`;
|
|
134857
134858
|
const agentDirPath = path15.join(agentsDir, agentDirName);
|
|
134859
|
+
const responseEngineForMeta = agent.response_engine.type === "custom-llm" ? { type: "custom-llm" } : agent.response_engine;
|
|
134858
134860
|
files[path15.join(agentDirPath, ".agent.json")] = await writeJson({
|
|
134859
134861
|
id: agent._id,
|
|
134860
134862
|
version: agent._version,
|
|
134861
|
-
response_engine:
|
|
134863
|
+
response_engine: responseEngineForMeta
|
|
134862
134864
|
});
|
|
134863
134865
|
const {
|
|
134864
134866
|
_id: _agentId,
|
|
@@ -134866,6 +134868,9 @@ async function serializeState(state, {
|
|
|
134866
134868
|
response_engine: _responseEngine,
|
|
134867
134869
|
...agentConfig
|
|
134868
134870
|
} = agent;
|
|
134871
|
+
if (agent.response_engine.type === "custom-llm") {
|
|
134872
|
+
agentConfig.llm_websocket_url = agent.response_engine.llm_websocket_url;
|
|
134873
|
+
}
|
|
134869
134874
|
if (agent.response_engine.type === "retell-llm") {
|
|
134870
134875
|
const llm = llmMap.get(agent.response_engine.llm_id);
|
|
134871
134876
|
if (llm) {
|
|
@@ -134948,6 +134953,9 @@ async function canonicalizeFromFiles(files) {
|
|
|
134948
134953
|
type: zod_default.literal("conversation-flow"),
|
|
134949
134954
|
conversation_flow_id: zod_default.string(),
|
|
134950
134955
|
version: zod_default.number().optional()
|
|
134956
|
+
}),
|
|
134957
|
+
zod_default.object({
|
|
134958
|
+
type: zod_default.literal("custom-llm")
|
|
134951
134959
|
})
|
|
134952
134960
|
])
|
|
134953
134961
|
}));
|
|
@@ -134975,14 +134983,13 @@ async function canonicalizeFromFiles(files) {
|
|
|
134975
134983
|
return content;
|
|
134976
134984
|
};
|
|
134977
134985
|
await resolveFilePlaceholders(agentConfig, resolveFileContent);
|
|
134978
|
-
const responseEngineVersion = agentMeta.response_engine.version ?? 0;
|
|
134979
134986
|
if (agentMeta.response_engine.type === "retell-llm") {
|
|
134980
134987
|
const llmResult = findConfigFile("llm");
|
|
134981
134988
|
if (llmResult) {
|
|
134982
134989
|
const llmConfig = await llmResult.reader(llmResult.content, zod_default.looseObject({}));
|
|
134983
134990
|
await resolveFilePlaceholders(llmConfig, resolveFileContent);
|
|
134984
134991
|
llmConfig._id = agentMeta.response_engine.llm_id;
|
|
134985
|
-
llmConfig._version =
|
|
134992
|
+
llmConfig._version = agentMeta.response_engine.version ?? 0;
|
|
134986
134993
|
llms.push(llmConfig);
|
|
134987
134994
|
}
|
|
134988
134995
|
} else if (agentMeta.response_engine.type === "conversation-flow") {
|
|
@@ -134991,14 +134998,23 @@ async function canonicalizeFromFiles(files) {
|
|
|
134991
134998
|
const flowConfig = await flowResult.reader(flowResult.content, zod_default.looseObject({}));
|
|
134992
134999
|
await resolveFilePlaceholders(flowConfig, resolveFileContent);
|
|
134993
135000
|
flowConfig._id = agentMeta.response_engine.conversation_flow_id;
|
|
134994
|
-
flowConfig._version =
|
|
135001
|
+
flowConfig._version = agentMeta.response_engine.version ?? 0;
|
|
134995
135002
|
conversationFlows.push(flowConfig);
|
|
134996
135003
|
}
|
|
134997
135004
|
}
|
|
134998
135005
|
delete agentConfig.version_title;
|
|
134999
135006
|
agentConfig._id = agentMeta.id;
|
|
135000
135007
|
agentConfig._version = agentMeta.version;
|
|
135001
|
-
|
|
135008
|
+
if (agentMeta.response_engine.type === "custom-llm") {
|
|
135009
|
+
const llmWebsocketUrl = agentConfig.llm_websocket_url;
|
|
135010
|
+
delete agentConfig.llm_websocket_url;
|
|
135011
|
+
agentConfig.response_engine = {
|
|
135012
|
+
type: "custom-llm",
|
|
135013
|
+
llm_websocket_url: llmWebsocketUrl ?? ""
|
|
135014
|
+
};
|
|
135015
|
+
} else {
|
|
135016
|
+
agentConfig.response_engine = agentMeta.response_engine;
|
|
135017
|
+
}
|
|
135002
135018
|
voiceAgents.push(agentConfig);
|
|
135003
135019
|
}
|
|
135004
135020
|
return {
|
|
@@ -135493,12 +135509,8 @@ async function deploy({
|
|
|
135493
135509
|
spinner = createSpinner2(`Deploying ${totalChanges} changes...`);
|
|
135494
135510
|
const updateResults = await Promise.allSettled([
|
|
135495
135511
|
...changes.agents.map(async (change) => {
|
|
135496
|
-
const {
|
|
135497
|
-
|
|
135498
|
-
_version,
|
|
135499
|
-
response_engine: _responseEngine,
|
|
135500
|
-
...updateData
|
|
135501
|
-
} = change.current;
|
|
135512
|
+
const { _id, _version, response_engine, ...baseData } = change.current;
|
|
135513
|
+
const updateData = response_engine.type === "custom-llm" ? { ...baseData, response_engine } : baseData;
|
|
135502
135514
|
await retell.agent.update(_id, updateData);
|
|
135503
135515
|
return { type: "agent", id: _id, name: change.name };
|
|
135504
135516
|
}),
|
|
@@ -135542,16 +135554,10 @@ function computeChanges(local, remote) {
|
|
|
135542
135554
|
const remoteAgent = remoteAgents.get(agent._id);
|
|
135543
135555
|
if (!remoteAgent)
|
|
135544
135556
|
continue;
|
|
135545
|
-
const
|
|
135546
|
-
|
|
135547
|
-
|
|
135548
|
-
|
|
135549
|
-
]);
|
|
135550
|
-
const remoteComparable = n9(remoteAgent, [
|
|
135551
|
-
"_id",
|
|
135552
|
-
"_version",
|
|
135553
|
-
"response_engine"
|
|
135554
|
-
]);
|
|
135557
|
+
const isCustomLlm = agent.response_engine.type === "custom-llm";
|
|
135558
|
+
const omitFields = isCustomLlm ? ["_id", "_version"] : ["_id", "_version", "response_engine"];
|
|
135559
|
+
const localComparable = n9(agent, omitFields);
|
|
135560
|
+
const remoteComparable = n9(remoteAgent, omitFields);
|
|
135555
135561
|
const differences = diff(remoteComparable, localComparable);
|
|
135556
135562
|
if (differences.length > 0) {
|
|
135557
135563
|
changes.agents.push({
|
|
@@ -135801,16 +135807,10 @@ function computeChanges2(draft, published) {
|
|
|
135801
135807
|
});
|
|
135802
135808
|
continue;
|
|
135803
135809
|
}
|
|
135804
|
-
const
|
|
135805
|
-
|
|
135806
|
-
|
|
135807
|
-
|
|
135808
|
-
]);
|
|
135809
|
-
const publishedComparable = n9(publishedAgent, [
|
|
135810
|
-
"_id",
|
|
135811
|
-
"_version",
|
|
135812
|
-
"response_engine"
|
|
135813
|
-
]);
|
|
135810
|
+
const isCustomLlm = agent.response_engine.type === "custom-llm";
|
|
135811
|
+
const omitFields = isCustomLlm ? ["_id", "_version"] : ["_id", "_version", "response_engine"];
|
|
135812
|
+
const draftComparable = n9(agent, omitFields);
|
|
135813
|
+
const publishedComparable = n9(publishedAgent, omitFields);
|
|
135814
135814
|
const differences = diff(publishedComparable, draftComparable);
|
|
135815
135815
|
if (differences.length > 0) {
|
|
135816
135816
|
changes.agents.push({
|
package/package.json
CHANGED
package/.todo
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
- [ ] Make `deploy --publish` command update phone number to new agent version
|