Skip to content

Commit 31fd920

Browse files
committed
Make small improvements
1 parent ddfdfd0 commit 31fd920

5 files changed

Lines changed: 30 additions & 8 deletions

File tree

bin/deploy-runner.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

servers/genesys-cloud-architect-mcp.js

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

skills/write-flow/SKILL.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,21 @@ The user's project must have the Architect Scripting SDK installed for type chec
3131
npm install --save-dev purecloud-flow-scripting-api-sdk-javascript
3232
```
3333

34+
## Deploy only (existing flow file)
35+
36+
If the user already has a flow file and just wants to deploy it, skip straight to **step 5** — call the `deploy_flow` MCP tool with the file path. Only fall back to steps 1–4 if deployment fails or the user asks for help writing/fixing the flow.
37+
3438
## Workflow
3539

3640
### 1. Understand the requirement
3741

3842
Ask the user:
3943
- **Flow type**: inbound call, inbound chat, inbound email, inbound message (SMS), or workflow
4044
- **What it should do**: routing, menus, greetings, queue transfers, data lookups, etc.
41-
- **Queue names**: which Genesys Cloud queues to route to (must exist in the org)
4245
- **Flow name**: what to name the flow in Architect
4346

47+
Only ask about queue names if the user's description involves queue transfers. Not every flow routes to a queue.
48+
4449
### 2. Read the relevant references
4550

4651
Before writing any flow code, read these reference files from this skill:

src/deploy-runner/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,12 @@ const origGet = https.get;
110110
const origConsoleLog = console.log;
111111
const tracePrefix = "TRACE:";
112112

113+
const SUPPRESSED_TRACES = [/Unknown feature being requested/];
114+
113115
function interceptTrace(text: string): boolean {
114116
if (text.startsWith(tracePrefix)) {
115117
const msg = text.slice(tracePrefix.length).trim();
118+
if (SUPPRESSED_TRACES.some((p) => p.test(msg))) return true;
116119
traces.push(msg);
117120
emit("log", "info", msg);
118121
return true;

src/mcp-server/tools/deploy-flow.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export const deployFlow: ToolFactory<DeployFlowConfig> = (toolConfig) => ({
2828
description:
2929
"Deploys a Genesys Cloud Architect flow from a TypeScript file. " +
3030
"The file must export an async buildFlow(scripting) function that " +
31-
"creates and saves the flow using the Architect Scripting SDK.",
31+
"creates and saves the flow using the Architect Scripting SDK. " +
32+
'The project\'s package.json must have "type": "module" for the ES module import to work.',
3233
annotations: {
3334
title: "Deploy Flow",
3435
readOnlyHint: false,
@@ -140,8 +141,17 @@ export const deployFlow: ToolFactory<DeployFlowConfig> = (toolConfig) => ({
140141
}
141142
}
142143

143-
if (stderrBuf.trim()) {
144-
logs.push(`[stderr] ${stderrBuf.trim()}`);
144+
const filteredStderr = stderrBuf
145+
.split("\n")
146+
.filter(
147+
(l) =>
148+
!l.includes("url.parse()") &&
149+
!l.includes("[DEP0169]"),
150+
)
151+
.join("\n")
152+
.trim();
153+
if (filteredStderr) {
154+
logs.push(`[stderr] ${filteredStderr}`);
145155
}
146156

147157
const logOutput = logs.length

0 commit comments

Comments
 (0)