Skip to content

feat(device): bundle only the files a directory's flows use - #275

Merged
riglar merged 1 commit into
devfrom
feat/mcp-bundle-deps
Oct 26, 2026
Merged

riglar merged 1 commit into
devfrom
feat/mcp-bundle-deps

Conversation

@riglar

@riglar riglar commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Why

dcd device run <dir> and the MCP run tool's path input zipped every file in the directory. In a samples folder with app builds next to the flows, that meant uploading all the builds just to run a few YAML files. The workaround was to copy the flow, scripts and subflows into a temp folder by hand.

What

bundleFiles(dir, entry?) now picks:

  • every YAML file (flows, subflows, config)
  • the files the flows use: runFlow, runScript, addMedia, assertScreenshot and so on, found with the same processDependencies that dcd cloud uses
  • config.yaml's includedPaths (now exported from the execution-plan service)

Nothing else goes in. Dot-folders and node_modules stay out, as before.

How missing files are handled:

  • With an entry flow (--entry, or the MCP flow input): the entry's files must exist. A broken file in some other flow doesn't block the entry.
  • Without one: every flow can run, so every flow's files must exist.
  • A file outside the directory is an error that names it.
  • An entry that isn't in the directory is refused before anything uploads.

The MCP bridge passes flow through as the entry. Its path description now says only flows and the files they use are uploaded.

Checks

  • Unit suite: 500 passing. New tests cover scripts and media, includedPaths, skipped builds, missing files with and without an entry, files outside the directory, and an unknown entry.
  • typecheck and build are clean. lint reports the same 24 warnings as before, and no new ones.
  • Tried on a real 15 MB flows folder that has builds in it: 4 YAML files bundled.

🤖 Generated with Claude Code

`dcd device run <dir>` and the MCP `run` tool's `path` zipped every file in
the directory. A samples folder with builds next to its flows sent all of
them, so an agent copied the flow, scripts and subflows to a temp folder by
hand.

A bundle now holds every YAML file (flows, subflows, config), the files the
flows use (runScript, addMedia, assertScreenshot and the like, found the
way `dcd cloud` finds them), and config's includedPaths. Nothing else.

With an entry flow (`--entry`, or the MCP `flow` input), only its files must
exist; another flow's missing file doesn't stop it. Without one, every
flow's must. A file outside the directory is an error that names it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 26, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@riglar
riglar merged commit 7b31b1e into dev Oct 26, 2026
9 checks passed
@riglar
riglar deleted the feat/mcp-bundle-deps branch October 26, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant