retell-sync-cli 3.5.0 → 3.5.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/cli.js +17 -28
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -134895,8 +134895,13 @@ async function serializeState(state, {
|
|
|
134895
134895
|
for (const n11 of flowConfig.nodes) {
|
|
134896
134896
|
if (n11.id && n11.name)
|
|
134897
134897
|
nodeNameById.set(n11.id, n11.name);
|
|
134898
|
-
const
|
|
134899
|
-
|
|
134898
|
+
const edgesArray = "edges" in n11 ? n11.edges : undefined;
|
|
134899
|
+
const singleEdge = "edge" in n11 ? n11.edge : undefined;
|
|
134900
|
+
const allEdges = [
|
|
134901
|
+
...edgesArray ?? [],
|
|
134902
|
+
...singleEdge ? [singleEdge] : []
|
|
134903
|
+
];
|
|
134904
|
+
for (const edge of allEdges) {
|
|
134900
134905
|
const destId = edge.destination_node_id;
|
|
134901
134906
|
if (destId) {
|
|
134902
134907
|
if (!incomingEdges.has(destId))
|
|
@@ -135509,12 +135514,8 @@ async function deploy({
|
|
|
135509
135514
|
spinner = createSpinner2(`Deploying ${totalChanges} changes...`);
|
|
135510
135515
|
const updateResults = await Promise.allSettled([
|
|
135511
135516
|
...changes.agents.map(async (change) => {
|
|
135512
|
-
const {
|
|
135513
|
-
|
|
135514
|
-
_version,
|
|
135515
|
-
response_engine: _responseEngine,
|
|
135516
|
-
...updateData
|
|
135517
|
-
} = change.current;
|
|
135517
|
+
const { _id, _version, response_engine, ...baseData } = change.current;
|
|
135518
|
+
const updateData = response_engine.type === "custom-llm" ? { ...baseData, response_engine } : baseData;
|
|
135518
135519
|
await retell.agent.update(_id, updateData);
|
|
135519
135520
|
return { type: "agent", id: _id, name: change.name };
|
|
135520
135521
|
}),
|
|
@@ -135558,16 +135559,10 @@ function computeChanges(local, remote) {
|
|
|
135558
135559
|
const remoteAgent = remoteAgents.get(agent._id);
|
|
135559
135560
|
if (!remoteAgent)
|
|
135560
135561
|
continue;
|
|
135561
|
-
const
|
|
135562
|
-
|
|
135563
|
-
|
|
135564
|
-
|
|
135565
|
-
]);
|
|
135566
|
-
const remoteComparable = n9(remoteAgent, [
|
|
135567
|
-
"_id",
|
|
135568
|
-
"_version",
|
|
135569
|
-
"response_engine"
|
|
135570
|
-
]);
|
|
135562
|
+
const isCustomLlm = agent.response_engine.type === "custom-llm";
|
|
135563
|
+
const omitFields = isCustomLlm ? ["_id", "_version"] : ["_id", "_version", "response_engine"];
|
|
135564
|
+
const localComparable = n9(agent, omitFields);
|
|
135565
|
+
const remoteComparable = n9(remoteAgent, omitFields);
|
|
135571
135566
|
const differences = diff(remoteComparable, localComparable);
|
|
135572
135567
|
if (differences.length > 0) {
|
|
135573
135568
|
changes.agents.push({
|
|
@@ -135817,16 +135812,10 @@ function computeChanges2(draft, published) {
|
|
|
135817
135812
|
});
|
|
135818
135813
|
continue;
|
|
135819
135814
|
}
|
|
135820
|
-
const
|
|
135821
|
-
|
|
135822
|
-
|
|
135823
|
-
|
|
135824
|
-
]);
|
|
135825
|
-
const publishedComparable = n9(publishedAgent, [
|
|
135826
|
-
"_id",
|
|
135827
|
-
"_version",
|
|
135828
|
-
"response_engine"
|
|
135829
|
-
]);
|
|
135815
|
+
const isCustomLlm = agent.response_engine.type === "custom-llm";
|
|
135816
|
+
const omitFields = isCustomLlm ? ["_id", "_version"] : ["_id", "_version", "response_engine"];
|
|
135817
|
+
const draftComparable = n9(agent, omitFields);
|
|
135818
|
+
const publishedComparable = n9(publishedAgent, omitFields);
|
|
135830
135819
|
const differences = diff(publishedComparable, draftComparable);
|
|
135831
135820
|
if (differences.length > 0) {
|
|
135832
135821
|
changes.agents.push({
|