Skip to content

Capture browser artifact trees with binary file support #315

Description

@chubes4

Context

Studio Web needs Codebox builders to focus on building the website, not on writing product-specific manifests or folder contracts. Codebox should capture the generated artifact tree and return enough metadata for callers to discover entrypoints, local assets, and binary media files.

Scope

  • Capture generated/changed files under the browser artifact root as an artifact tree.
  • Support binary files with encoding, mime_type, size, and sha256 metadata.
  • Preserve safe relative paths without forcing a Studio Web-specific layout.
  • Return text files and binary files in a single generic artifact envelope.
  • Keep this generic to WP Codebox; no Studio Web product semantics.

Acceptance Criteria

  • Browser artifact capture can return HTML/CSS/JS plus image files such as jpg/png/webp/svg.
  • Unsafe paths, traversal, executable server-side extensions, and oversized files are rejected or reported explicitly.
  • Existing text artifact flows continue to work.
  • Tests cover binary capture, safe path validation, and mixed text/binary artifact trees.

Related Architecture

This unlocks Studio Web capturing generated website assets from Codebox without telling the AI builder to produce a prescribed manifest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions