feat(onboarding): PLC/blob file upload (multipart) + single-file ingest fix #163

Merged
sharang merged 2 commits from feat/artifact-file-upload into main 2026-07-16 09:41:13 +00:00
2 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 4.8 c8ab5177bb fix(ingest): materialize single-file PLC uploads so the scanner finds them
CI / Check (pull_request) Successful in 6m42s
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
A PlcProject uploaded as a single .st/.xml file (not a zip) was stored as a
content-addressed blob with no extension, so the PLC scanner's extension-based
file discovery skipped it — an uploaded project produced zero findings.

When an "extractable" blob turns out not to be an archive, materialize it into
the artifact work dir under its original file name (from source_ref, which the
upload handler sets to the uploaded filename). analyze_tree then discovers it by
extension and reports a readable path. Falls back to the raw blob if the copy
fails. Covers the demo's upload -> scan path end to end.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 11:33:56 +02:00
Sharang ParnerkarandClaude Opus 4.8 bd80ccef49 feat(onboarding): multipart file upload for blob artifacts
Add a real file-upload path so PLC projects (and other blob artifacts:
firmware images, source archives, mobile packages) can be delivered to
the agent instead of referencing a local path.

- agent: POST /api/v1/targets/{id}/artifacts/upload (axum multipart);
  stores bytes under {artifact_store_base_path}/uploads/{id}/... and
  $push-es the artifact (with stored_path + size_bytes) onto the target.
- dashboard: upload_target_artifact server fn (reqwest multipart) + wizard
  file input for blob artifact kinds, with a PLC format selector.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 11:28:35 +02:00