You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 498f300
Browse filesBrowse the repository at this point in the historyBrowse files
fix(mcp): dry runs honour tags, single flow files bring their subflows, failed starts say what to check (#278)
- dcd_run_cloud_test with dryRun listed every flow in the folder, because it
read the metadata of all flows rather than the ones that would run. It now
lists the flows after includeTags, excludeTags and excludeFlows, as
`dcd cloud --dry-run` does. Real runs already submitted only those flows.
- `run` with path set to one flow file sent it as yaml on its own, so a flow
that uses other files (runFlow, runScript, addMedia and the like) failed on
the device with an invalid file path. Such a file is now uploaded with its
folder as a bundle, with flow set to the file. A file that uses no other
files is still sent as yaml.
- A start_device call that fails without an answer may still have started a
session, which is billed while it runs. The error now says so and lists
the open sessions started in the last two minutes, so an agent checks
list_devices instead of starting a second device.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
' Or pass path: a flow file on this machine (sent as yaml), or a directory of flows (flow picks the entry file inside it). Only the YAML files and the files the flows use (scripts, media) are uploaded, not builds or anything else in the directory.',
71
+
' Or pass path: a flow file on this machine, or a directory of flows (flow picks the entry file inside it). A file that uses other files (runFlow, runScript, addMedia and the like) is uploaded with its folder; one that uses none is sent as yaml. Only the YAML files and the files the flows use (scripts, media) are uploaded, not builds or anything else in the directory.',
67
72
properties: {
68
73
path: {
69
74
type: 'string',
@@ -87,6 +92,30 @@ export function withLocalInputs(tool: Tool): Tool {
87
92
};
88
93
}
89
94
95
+
/**
96
+
* For a single flow file that uses other files (runFlow, runScript, addMedia
97
+
* and the like): the folder to upload as a bundle, and the file's path
98
+
* inside it. Sent as yaml on its own, the flow would fail on the device with
99
+
* an invalid file path, because the files it uses would not be there. Null
100
+
* when the flow uses no other files, or can't be read (the device reports
return`${head} Call list_devices to check for one before you call start_device again.`;
190
+
}
191
+
192
+
if(recent.length===0){
193
+
return`${head} No session was started in the last ${START_RECOVERY_WINDOW_MS/60_000} minutes, so it is safe to call start_device again.`;
194
+
}
195
+
196
+
constlisted=recent.map((s)=>({
197
+
client_label: s.client_label,
198
+
created_at: s.created_at,
199
+
id: s.id,
200
+
state: s.state,
201
+
}));
202
+
return`${head} Open sessions started in the last ${START_RECOVERY_WINDOW_MS/60_000} minutes: ${JSON.stringify(listed)}. If one is yours, use it (get_device_status with wait: true until it is ready) instead of starting another. Otherwise stop it with stop_device. Check list_devices before you call start_device again.`;
203
+
}
204
+
132
205
/**
133
206
* The hosted device tools, over one connection made on first use and shared
134
207
* by every call.
@@ -247,8 +320,18 @@ export async function createBridgeServer(
247
320
returnerrorResult(`${name} is not available in read-only mode.`);
0 commit comments