retell-sync-cli 3.10.0 → 3.13.0
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 +79 -130
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -133802,8 +133802,6 @@ async function formatWithPrettier(content, opts) {
|
|
|
133802
133802
|
// src/lib/utils.ts
|
|
133803
133803
|
var DEFAULT_AGENTS_DIR = "./agents";
|
|
133804
133804
|
var FILE_HASH_LENGTH = 6;
|
|
133805
|
-
var CONFIG_FORMATS = ["yaml", "yml", "json", "jsonc"];
|
|
133806
|
-
var DEFAULT_CONFIG_FORMAT = "yaml";
|
|
133807
133805
|
async function readMarkdown(content) {
|
|
133808
133806
|
const trimmed = content.trim();
|
|
133809
133807
|
if (!trimmed.startsWith("---")) {
|
|
@@ -133843,69 +133841,9 @@ function readJson2(content, schema) {
|
|
|
133843
133841
|
}
|
|
133844
133842
|
return parsed;
|
|
133845
133843
|
}
|
|
133846
|
-
function stripJsoncComments(content) {
|
|
133847
|
-
return content.split(`
|
|
133848
|
-
`).map((line3) => {
|
|
133849
|
-
let inString = false;
|
|
133850
|
-
let escaped = false;
|
|
133851
|
-
for (let i5 = 0;i5 < line3.length; i5++) {
|
|
133852
|
-
const char = line3[i5];
|
|
133853
|
-
if (escaped) {
|
|
133854
|
-
escaped = false;
|
|
133855
|
-
continue;
|
|
133856
|
-
}
|
|
133857
|
-
if (char === "\\") {
|
|
133858
|
-
escaped = true;
|
|
133859
|
-
continue;
|
|
133860
|
-
}
|
|
133861
|
-
if (char === '"') {
|
|
133862
|
-
inString = !inString;
|
|
133863
|
-
continue;
|
|
133864
|
-
}
|
|
133865
|
-
if (!inString && char === "/" && line3[i5 + 1] === "/") {
|
|
133866
|
-
return line3.slice(0, i5).trimEnd();
|
|
133867
|
-
}
|
|
133868
|
-
}
|
|
133869
|
-
return line3;
|
|
133870
|
-
}).join(`
|
|
133871
|
-
`);
|
|
133872
|
-
}
|
|
133873
|
-
function readJsonc(content, schema) {
|
|
133874
|
-
const stripped = stripJsoncComments(content);
|
|
133875
|
-
return readJson2(stripped, schema);
|
|
133876
|
-
}
|
|
133877
133844
|
async function writeJson(obj) {
|
|
133878
133845
|
return formatWithPrettier(JSON.stringify(obj), { parser: "json" });
|
|
133879
133846
|
}
|
|
133880
|
-
async function writeJsonc(obj, { comments = {} } = {}) {
|
|
133881
|
-
const json2 = await formatWithPrettier(JSON.stringify(obj), {
|
|
133882
|
-
parser: "json"
|
|
133883
|
-
});
|
|
133884
|
-
if (Object.keys(comments).length === 0) {
|
|
133885
|
-
return json2;
|
|
133886
|
-
}
|
|
133887
|
-
const lines = json2.split(`
|
|
133888
|
-
`);
|
|
133889
|
-
const result2 = [];
|
|
133890
|
-
let isFirstKey = true;
|
|
133891
|
-
for (const line3 of lines) {
|
|
133892
|
-
const keyMatch = line3.match(/^ {2}"([^"]+)":\s*/);
|
|
133893
|
-
if (keyMatch?.[1]) {
|
|
133894
|
-
const key2 = keyMatch[1];
|
|
133895
|
-
const comment = comments[key2];
|
|
133896
|
-
if (comment) {
|
|
133897
|
-
if (!isFirstKey) {
|
|
133898
|
-
result2.push("");
|
|
133899
|
-
}
|
|
133900
|
-
result2.push(` // ${comment}`);
|
|
133901
|
-
}
|
|
133902
|
-
isFirstKey = false;
|
|
133903
|
-
}
|
|
133904
|
-
result2.push(line3);
|
|
133905
|
-
}
|
|
133906
|
-
return result2.join(`
|
|
133907
|
-
`);
|
|
133908
|
-
}
|
|
133909
133847
|
function readYaml(content, schema) {
|
|
133910
133848
|
const parsed = import_yaml2.default.parse(content);
|
|
133911
133849
|
if (schema) {
|
|
@@ -134225,10 +134163,9 @@ async function getLocalState({
|
|
|
134225
134163
|
}
|
|
134226
134164
|
async function writeState(state, {
|
|
134227
134165
|
agentsDir = DEFAULT_AGENTS_DIR,
|
|
134228
|
-
configFormat = DEFAULT_CONFIG_FORMAT,
|
|
134229
134166
|
agentIds = null
|
|
134230
134167
|
} = {}) {
|
|
134231
|
-
const files = await serializeState(state, { agentsDir
|
|
134168
|
+
const files = await serializeState(state, { agentsDir });
|
|
134232
134169
|
const writtenFiles = new Set;
|
|
134233
134170
|
for (const [filePath, content] of Object.entries(files)) {
|
|
134234
134171
|
const fullPath = path15.resolve(filePath);
|
|
@@ -134282,13 +134219,7 @@ async function listFilesRecursive(dir) {
|
|
|
134282
134219
|
}
|
|
134283
134220
|
return files;
|
|
134284
134221
|
}
|
|
134285
|
-
async function serializeState(state, {
|
|
134286
|
-
agentsDir = DEFAULT_AGENTS_DIR,
|
|
134287
|
-
configFormat = DEFAULT_CONFIG_FORMAT
|
|
134288
|
-
} = {}) {
|
|
134289
|
-
const isYaml = configFormat === "yaml" || configFormat === "yml";
|
|
134290
|
-
const isJsonc = configFormat === "jsonc";
|
|
134291
|
-
const configExt = configFormat;
|
|
134222
|
+
async function serializeState(state, { agentsDir = DEFAULT_AGENTS_DIR } = {}) {
|
|
134292
134223
|
const files = {};
|
|
134293
134224
|
const llmMap = new Map(state.llms.map((llm) => [llm._id, llm]));
|
|
134294
134225
|
const flowMap = new Map(state.conversationFlows.map((flow) => [flow._id, flow]));
|
|
@@ -134301,7 +134232,7 @@ async function serializeState(state, {
|
|
|
134301
134232
|
files[path15.join(agentDirPath, "general_prompt.md")] = await writeMarkdown(llmConfig.general_prompt);
|
|
134302
134233
|
llmConfig.general_prompt = "file://./general_prompt.md";
|
|
134303
134234
|
}
|
|
134304
|
-
files[path15.join(agentDirPath,
|
|
134235
|
+
files[path15.join(agentDirPath, "llm.yaml")] = await writeYaml(llmConfig, { comments: llmFieldDocs });
|
|
134305
134236
|
}
|
|
134306
134237
|
} else if (agent.response_engine.type === "conversation-flow") {
|
|
134307
134238
|
const flow = flowMap.get(agent.response_engine.conversation_flow_id);
|
|
@@ -134350,7 +134281,35 @@ async function serializeState(state, {
|
|
|
134350
134281
|
}
|
|
134351
134282
|
}
|
|
134352
134283
|
}
|
|
134353
|
-
|
|
134284
|
+
const roundPos = (p4) => ({
|
|
134285
|
+
x: Math.round(p4.x),
|
|
134286
|
+
y: Math.round(p4.y)
|
|
134287
|
+
});
|
|
134288
|
+
const positions = {};
|
|
134289
|
+
if (flowConfig.begin_tag_display_position) {
|
|
134290
|
+
positions.begin_tag = roundPos(flowConfig.begin_tag_display_position);
|
|
134291
|
+
delete flowConfig.begin_tag_display_position;
|
|
134292
|
+
}
|
|
134293
|
+
if (flowConfig.nodes) {
|
|
134294
|
+
for (const node of flowConfig.nodes) {
|
|
134295
|
+
if (node.id && node.display_position) {
|
|
134296
|
+
(positions.nodes ??= {})[node.id] = roundPos(node.display_position);
|
|
134297
|
+
delete node.display_position;
|
|
134298
|
+
}
|
|
134299
|
+
}
|
|
134300
|
+
}
|
|
134301
|
+
if (flowConfig.components) {
|
|
134302
|
+
for (const comp of flowConfig.components) {
|
|
134303
|
+
if (comp.name && comp.begin_tag_display_position) {
|
|
134304
|
+
(positions.components ??= {})[comp.name] = roundPos(comp.begin_tag_display_position);
|
|
134305
|
+
delete comp.begin_tag_display_position;
|
|
134306
|
+
}
|
|
134307
|
+
}
|
|
134308
|
+
}
|
|
134309
|
+
if (Object.keys(positions).length > 0) {
|
|
134310
|
+
files[path15.join(agentDirPath, ".positions.json")] = await writeJson(positions);
|
|
134311
|
+
}
|
|
134312
|
+
files[path15.join(agentDirPath, "conversation-flow.yaml")] = await writeYaml(flowConfig, { comments: flowFieldDocs });
|
|
134354
134313
|
}
|
|
134355
134314
|
}
|
|
134356
134315
|
};
|
|
@@ -134375,7 +134334,7 @@ async function serializeState(state, {
|
|
|
134375
134334
|
llm_websocket_url: agent.response_engine.llm_websocket_url
|
|
134376
134335
|
} : voiceAgentConfig;
|
|
134377
134336
|
await serializeResponseEngine(agent, agentDirPath);
|
|
134378
|
-
files[path15.join(agentDirPath,
|
|
134337
|
+
files[path15.join(agentDirPath, "config.yaml")] = await writeYaml(configToWrite, { comments: agentFieldDocs });
|
|
134379
134338
|
}
|
|
134380
134339
|
for (const agent of state.chatAgents) {
|
|
134381
134340
|
const agentDirName = getAgentDirName(agent);
|
|
@@ -134398,7 +134357,7 @@ async function serializeState(state, {
|
|
|
134398
134357
|
llm_websocket_url: agent.response_engine.llm_websocket_url
|
|
134399
134358
|
} : chatAgentConfig;
|
|
134400
134359
|
await serializeResponseEngine(agent, agentDirPath);
|
|
134401
|
-
files[path15.join(agentDirPath,
|
|
134360
|
+
files[path15.join(agentDirPath, "config.yaml")] = await writeYaml(chatConfigToWrite, { comments: chatAgentFieldDocs });
|
|
134402
134361
|
}
|
|
134403
134362
|
return files;
|
|
134404
134363
|
}
|
|
@@ -134433,20 +134392,10 @@ async function canonicalizeFromFiles(files) {
|
|
|
134433
134392
|
})
|
|
134434
134393
|
])
|
|
134435
134394
|
}));
|
|
134436
|
-
const
|
|
134437
|
-
|
|
134438
|
-
const content = fileMap[`${agentDir}/${baseName}.${ext}`];
|
|
134439
|
-
if (content) {
|
|
134440
|
-
const reader = ext === "jsonc" ? readJsonc : ext === "json" ? readJson2 : readYaml;
|
|
134441
|
-
return { content, reader };
|
|
134442
|
-
}
|
|
134443
|
-
}
|
|
134444
|
-
return null;
|
|
134445
|
-
};
|
|
134446
|
-
const configResult = findConfigFile("config");
|
|
134447
|
-
if (!configResult)
|
|
134395
|
+
const configContent = fileMap[`${agentDir}/config.yaml`];
|
|
134396
|
+
if (!configContent)
|
|
134448
134397
|
continue;
|
|
134449
|
-
const agentConfig =
|
|
134398
|
+
const agentConfig = readYaml(configContent, zod_default.looseObject({}));
|
|
134450
134399
|
const resolveFileContent = (filePath) => {
|
|
134451
134400
|
const normalizedPath = filePath.replace(/^\.\//, "");
|
|
134452
134401
|
const fullPath = `${agentDir}/${normalizedPath}`;
|
|
@@ -134458,9 +134407,9 @@ async function canonicalizeFromFiles(files) {
|
|
|
134458
134407
|
};
|
|
134459
134408
|
await resolveFilePlaceholders2(agentConfig, resolveFileContent);
|
|
134460
134409
|
if (agentMeta.response_engine.type === "retell-llm") {
|
|
134461
|
-
const
|
|
134462
|
-
if (
|
|
134463
|
-
const llmConfig =
|
|
134410
|
+
const llmContent = fileMap[`${agentDir}/llm.yaml`];
|
|
134411
|
+
if (llmContent) {
|
|
134412
|
+
const llmConfig = readYaml(llmContent, zod_default.looseObject({}));
|
|
134464
134413
|
await resolveFilePlaceholders2(llmConfig, resolveFileContent);
|
|
134465
134414
|
llms.push({
|
|
134466
134415
|
...llmConfig,
|
|
@@ -134469,10 +134418,30 @@ async function canonicalizeFromFiles(files) {
|
|
|
134469
134418
|
});
|
|
134470
134419
|
}
|
|
134471
134420
|
} else if (agentMeta.response_engine.type === "conversation-flow") {
|
|
134472
|
-
const
|
|
134473
|
-
if (
|
|
134474
|
-
const flowConfig =
|
|
134421
|
+
const flowContent = fileMap[`${agentDir}/conversation-flow.yaml`];
|
|
134422
|
+
if (flowContent) {
|
|
134423
|
+
const flowConfig = readYaml(flowContent, zod_default.looseObject({}));
|
|
134475
134424
|
await resolveFilePlaceholders2(flowConfig, resolveFileContent);
|
|
134425
|
+
const positionsFile = fileMap[`${agentDir}/.positions.json`];
|
|
134426
|
+
if (positionsFile) {
|
|
134427
|
+
const positions = readJson2(positionsFile, zod_default.looseObject({}));
|
|
134428
|
+
if (positions.begin_tag)
|
|
134429
|
+
flowConfig.begin_tag_display_position = positions.begin_tag;
|
|
134430
|
+
if (positions.nodes && Array.isArray(flowConfig.nodes)) {
|
|
134431
|
+
const nodePositions = positions.nodes;
|
|
134432
|
+
for (const node of flowConfig.nodes) {
|
|
134433
|
+
if (node.id && nodePositions[node.id])
|
|
134434
|
+
node.display_position = nodePositions[node.id];
|
|
134435
|
+
}
|
|
134436
|
+
}
|
|
134437
|
+
if (positions.components && Array.isArray(flowConfig.components)) {
|
|
134438
|
+
const compPositions = positions.components;
|
|
134439
|
+
for (const comp of flowConfig.components) {
|
|
134440
|
+
if (comp.name && compPositions[comp.name])
|
|
134441
|
+
comp.begin_tag_display_position = compPositions[comp.name];
|
|
134442
|
+
}
|
|
134443
|
+
}
|
|
134444
|
+
}
|
|
134476
134445
|
conversationFlows.push({
|
|
134477
134446
|
...flowConfig,
|
|
134478
134447
|
_id: agentMeta.response_engine.conversation_flow_id,
|
|
@@ -134560,22 +134529,13 @@ async function getLocalTestCases(agentDirPath) {
|
|
|
134560
134529
|
const testCases = [];
|
|
134561
134530
|
for (const testCaseMeta of metadata.test_cases) {
|
|
134562
134531
|
const testCaseName = toSnakeCase(testCaseMeta.name);
|
|
134563
|
-
|
|
134564
|
-
|
|
134565
|
-
|
|
134566
|
-
const configPath = path15.join(testsDir, `${testCaseName}.${ext}`);
|
|
134567
|
-
const file2 = Bun.file(configPath);
|
|
134568
|
-
if (await file2.exists()) {
|
|
134569
|
-
configContent = await file2.text();
|
|
134570
|
-
reader = ext === "jsonc" ? readJsonc : ext === "json" ? readJson2 : readYaml;
|
|
134571
|
-
break;
|
|
134572
|
-
}
|
|
134573
|
-
}
|
|
134574
|
-
if (!configContent) {
|
|
134532
|
+
const configPath = path15.join(testsDir, `${testCaseName}.yaml`);
|
|
134533
|
+
const configFile = Bun.file(configPath);
|
|
134534
|
+
if (!await configFile.exists()) {
|
|
134575
134535
|
console.warn(`Warning: Could not find config file for test case ${testCaseMeta.name}`);
|
|
134576
134536
|
continue;
|
|
134577
134537
|
}
|
|
134578
|
-
const config2 =
|
|
134538
|
+
const config2 = readYaml(await configFile.text(), zod_default.looseObject({}));
|
|
134579
134539
|
const resolveFileContent = async (filePath) => {
|
|
134580
134540
|
const normalizedPath = filePath.replace(/^\.\//, "");
|
|
134581
134541
|
const fullPath = path15.join(testsDir, normalizedPath);
|
|
@@ -134598,8 +134558,7 @@ async function updateTestCaseDefinition(testCaseId, update) {
|
|
|
134598
134558
|
}
|
|
134599
134559
|
async function fetchAndWriteTestCases({
|
|
134600
134560
|
state,
|
|
134601
|
-
agentsDir = DEFAULT_AGENTS_DIR
|
|
134602
|
-
configFormat = DEFAULT_CONFIG_FORMAT
|
|
134561
|
+
agentsDir = DEFAULT_AGENTS_DIR
|
|
134603
134562
|
}) {
|
|
134604
134563
|
const results = [];
|
|
134605
134564
|
const allAgents = [
|
|
@@ -134633,8 +134592,7 @@ async function fetchAndWriteTestCases({
|
|
|
134633
134592
|
}
|
|
134634
134593
|
await writeTestCases(testCases, {
|
|
134635
134594
|
agentDirPath,
|
|
134636
|
-
responseEngine: engine
|
|
134637
|
-
configFormat
|
|
134595
|
+
responseEngine: engine
|
|
134638
134596
|
});
|
|
134639
134597
|
results.push({ agentDir: agentDirName, testCount: testCases.length });
|
|
134640
134598
|
}
|
|
@@ -134642,14 +134600,10 @@ async function fetchAndWriteTestCases({
|
|
|
134642
134600
|
}
|
|
134643
134601
|
async function writeTestCases(testCases, {
|
|
134644
134602
|
agentDirPath,
|
|
134645
|
-
responseEngine
|
|
134646
|
-
configFormat = DEFAULT_CONFIG_FORMAT
|
|
134603
|
+
responseEngine
|
|
134647
134604
|
}) {
|
|
134648
134605
|
const testsDir = path15.join(agentDirPath, "tests");
|
|
134649
134606
|
await fs8.mkdir(testsDir, { recursive: true });
|
|
134650
|
-
const isYaml = configFormat === "yaml" || configFormat === "yml";
|
|
134651
|
-
const isJsonc = configFormat === "jsonc";
|
|
134652
|
-
const configExt = configFormat;
|
|
134653
134607
|
const metadata = {
|
|
134654
134608
|
response_engine: responseEngine,
|
|
134655
134609
|
test_cases: testCases.map((tc3) => ({
|
|
@@ -134677,8 +134631,10 @@ async function writeTestCases(testCases, {
|
|
|
134677
134631
|
...config2,
|
|
134678
134632
|
user_prompt: `file://./${promptFileName}`
|
|
134679
134633
|
};
|
|
134680
|
-
const configFileName = `${testCaseName}
|
|
134681
|
-
const configContent =
|
|
134634
|
+
const configFileName = `${testCaseName}.yaml`;
|
|
134635
|
+
const configContent = await writeYaml(configWithFileRef, {
|
|
134636
|
+
comments: testCaseFieldDocs
|
|
134637
|
+
});
|
|
134682
134638
|
await Bun.write(path15.join(testsDir, configFileName), configContent);
|
|
134683
134639
|
writtenFiles.add(configFileName);
|
|
134684
134640
|
}
|
|
@@ -137770,7 +137726,6 @@ async function pullCommand(agentIdArgs, opts, cmd) {
|
|
|
137770
137726
|
}
|
|
137771
137727
|
await pull({
|
|
137772
137728
|
agentsDir: globalOpts.agentsDir,
|
|
137773
|
-
configFormat: globalOpts.configFormat,
|
|
137774
137729
|
agentIds,
|
|
137775
137730
|
yes: opts.yes,
|
|
137776
137731
|
version: version2,
|
|
@@ -137786,7 +137741,6 @@ async function pullCommand(agentIdArgs, opts, cmd) {
|
|
|
137786
137741
|
}
|
|
137787
137742
|
async function pull({
|
|
137788
137743
|
agentsDir = DEFAULT_AGENTS_DIR,
|
|
137789
|
-
configFormat = DEFAULT_CONFIG_FORMAT,
|
|
137790
137744
|
agentIds = null,
|
|
137791
137745
|
yes = false,
|
|
137792
137746
|
version: version2,
|
|
@@ -137815,14 +137769,13 @@ async function pull({
|
|
|
137815
137769
|
const totalAgents = remoteState.voiceAgents.length + remoteState.chatAgents.length;
|
|
137816
137770
|
spinner.stop(source_default.dim(`${pluralize("agent", totalAgents, true)} (${remoteState.voiceAgents.length} voice, ${remoteState.chatAgents.length} chat), ${pluralize("LLM", remoteState.llms.length, true)}, ${pluralize("flow", remoteState.conversationFlows.length, true)}`));
|
|
137817
137771
|
const writeSpinner = createSpinner("Writing files...");
|
|
137818
|
-
await writeState(remoteState, { agentsDir,
|
|
137772
|
+
await writeState(remoteState, { agentsDir, agentIds });
|
|
137819
137773
|
writeSpinner.stop(source_default.green("Done"));
|
|
137820
137774
|
if (tests) {
|
|
137821
137775
|
const testSpinner = createSpinner("Fetching test cases...");
|
|
137822
137776
|
const testResults = await fetchAndWriteTestCases({
|
|
137823
137777
|
state: remoteState,
|
|
137824
|
-
agentsDir
|
|
137825
|
-
configFormat
|
|
137778
|
+
agentsDir
|
|
137826
137779
|
});
|
|
137827
137780
|
const totalTests = testResults.reduce((sum, r5) => sum + r5.testCount, 0);
|
|
137828
137781
|
const agentsWithTests = testResults.filter((r5) => r5.testCount > 0).length;
|
|
@@ -137843,7 +137796,6 @@ async function deployCommand(agentIdArgs, opts, cmd) {
|
|
|
137843
137796
|
});
|
|
137844
137797
|
const affectedIds = await deploy({
|
|
137845
137798
|
agentsDir: globalOpts.agentsDir,
|
|
137846
|
-
configFormat: globalOpts.configFormat,
|
|
137847
137799
|
agentIds,
|
|
137848
137800
|
dryRun: opts.dryRun,
|
|
137849
137801
|
verbose: opts.verbose
|
|
@@ -137861,7 +137813,6 @@ async function deployCommand(agentIdArgs, opts, cmd) {
|
|
|
137861
137813
|
}
|
|
137862
137814
|
async function deploy({
|
|
137863
137815
|
agentsDir = DEFAULT_AGENTS_DIR,
|
|
137864
|
-
configFormat = DEFAULT_CONFIG_FORMAT,
|
|
137865
137816
|
agentIds = null,
|
|
137866
137817
|
dryRun = false,
|
|
137867
137818
|
verbose = false
|
|
@@ -138008,7 +137959,7 @@ async function deploy({
|
|
|
138008
137959
|
success2(`Deployed ${pluralize("change", totalChanges, true)}`);
|
|
138009
137960
|
if (!isQuiet()) {
|
|
138010
137961
|
bold("Syncing latest state...");
|
|
138011
|
-
await pull({ agentsDir,
|
|
137962
|
+
await pull({ agentsDir, agentIds });
|
|
138012
137963
|
}
|
|
138013
137964
|
return [...affectedAgentIds];
|
|
138014
137965
|
}
|
|
@@ -138128,7 +138079,6 @@ async function publishCommand(agentIdArgs, opts, cmd) {
|
|
|
138128
138079
|
});
|
|
138129
138080
|
const publishedIds = await publish({
|
|
138130
138081
|
agentsDir: globalOpts.agentsDir,
|
|
138131
|
-
configFormat: globalOpts.configFormat,
|
|
138132
138082
|
agentIds,
|
|
138133
138083
|
dryRun: opts.dryRun
|
|
138134
138084
|
});
|
|
@@ -138145,7 +138095,6 @@ async function publishCommand(agentIdArgs, opts, cmd) {
|
|
|
138145
138095
|
}
|
|
138146
138096
|
async function publish({
|
|
138147
138097
|
agentsDir = DEFAULT_AGENTS_DIR,
|
|
138148
|
-
configFormat = DEFAULT_CONFIG_FORMAT,
|
|
138149
138098
|
agentIds = null,
|
|
138150
138099
|
dryRun = false
|
|
138151
138100
|
} = {}) {
|
|
@@ -138216,7 +138165,7 @@ Would publish ${pluralize("agent", agentIdsToPublish.size, true)}:`));
|
|
|
138216
138165
|
}
|
|
138217
138166
|
if (!isQuiet()) {
|
|
138218
138167
|
bold("Syncing latest state...");
|
|
138219
|
-
await pull({ agentsDir,
|
|
138168
|
+
await pull({ agentsDir, agentIds });
|
|
138220
138169
|
}
|
|
138221
138170
|
return publishedAgentIds;
|
|
138222
138171
|
}
|
|
@@ -138291,7 +138240,7 @@ function patchAgentList(agents, publishedIds, publishedVersions, agentNames, dir
|
|
|
138291
138240
|
|
|
138292
138241
|
// src/cli.ts
|
|
138293
138242
|
var program2 = new Command;
|
|
138294
|
-
program2.name("retell").description("Retell AI agent management CLI").option("-w, --agents-dir <dir>", "Directory for agent files", DEFAULT_AGENTS_DIR)
|
|
138243
|
+
program2.name("retell").description("Retell AI agent management CLI").option("-w, --agents-dir <dir>", "Directory for agent files", DEFAULT_AGENTS_DIR);
|
|
138295
138244
|
program2.command("pull [agentIds...]").description("Pull agents from Retell API (pulls latest draft state by default)").option("-a, --all", "Pull all agents in the account").option("-s, --select", "Force interactive agent selection").option("-y, --yes", "Skip confirmation prompts").option("-v, --version <number>", "Pull a specific version (requires agent IDs)").option("--no-tests", "Skip pulling test case definitions").action(pullCommand);
|
|
138296
138245
|
program2.command("deploy [agentIds...]").description("Deploy local changes to Retell draft").option("-a, --all", "Deploy all agents in the account").option("-s, --select", "Force interactive agent selection").option("-n, --dry-run", "Show changes without applying").option("-v, --verbose", "Show full diff details (use with --dry-run)").option("-q, --quiet", "Output only affected agent IDs (for piping)").action(deployCommand);
|
|
138297
138246
|
program2.command("publish [agentIds...]").description("Publish agents with unpublished draft changes").option("-a, --all", "Publish all agents in the account").option("-s, --select", "Force interactive agent selection").option("-n, --dry-run", "Show what would be published without publishing").option("-q, --quiet", "Output only published agent IDs (for piping)").action(publishCommand);
|