Skip to content

v2.4.0

Choose a tag to compare

@github-actions github-actions released this 20 May 10:22
· 1272 commits to main since this release

v2.4.0 — v1.50 asset metadata, EXIF policy, and media-picker queries

Wires the v1.50 gateway surface (@run402/functions@2.4.0) through the public packages so agents can attach metadata to uploads, control EXIF retention, and query the asset inventory with sort + filter for media-picker UIs.

New SDK surface (@run402/sdk)

  • Assets.put(key, source, { metadata, exifPolicy }) — attach a flat metadata bag (string | number | boolean | string[] leaves, ≤4 KB) and pick "keep" or "strip" for EXIF on image uploads.
  • Assets.list({ sort, filter }) — sort by key:asc (default), createdAt:asc, or createdAt:desc. Filter by uploaded_by, tag, format, is_image, min_width/max_width/min_height/max_height. Cursor is sort-pinned (gateway returns INVALID_CURSOR_FOR_SORT on cross-sort reuse).
  • New flat AssetRef / BlobSummary fields — metadata, image_format, image_info (has_alpha, color_space, animated, frame_count, bit_depth, orientation), image_exif, image_exif_policy. Same flat shape as the v1.49 width_px / height_px / blurhash / variants additions — never nested under image: {}.
  • Typed errors — INVALID_ASSET_METADATA, INVALID_EXIF_POLICY, INVALID_FILTER_KEY, INVALID_SORT, INVALID_CURSOR_FOR_SORT, IMAGE_DECODE_FAILED. Local validators reject malformed inputs with the canonical gateway code before any HTTP call, so catch (e) { if (e.code === "INVALID_ASSET_METADATA") ... } works the same whether the rejection happened locally or remotely.

New MCP tool fields

  • assets_put accepts metadata (record of string|number|boolean|string[]) and exif_policy (keep | strip). Response markdown now surfaces Image format, Image info, EXIF policy, EXIF, and Metadata.
  • assets_ls accepts sort and the 8 documented filter.* keys. The result table now renders Image (format + dimensions + EXIF policy + intrinsic summary) and Metadata columns.

New CLI flags

  • run402 assets put --meta key=value (repeatable, coerces digits → number, true/false → boolean, commas → string[]) and --exif-policy keep|strip.
  • run402 assets ls --sort key:asc|createdAt:asc|createdAt:desc and --filter key=value (repeatable, validated against the 8 documented keys).

Agent docs

  • cli/llms-cli.txt and SKILL.md document the new flags, v1.50 response fields, and typed errors.
  • openclaw/SKILL.md adds CLI examples for --meta / --exif-policy / --sort / --filter.

CI

  • New .github/workflows/publish.yml publishes all three packages via Trusted Publisher OIDC (matches the existing publish-astro.yml model). No npm token in repo secrets.

Closes #393.

Install

npm install -g run402@2.4.0
npm install @run402/sdk@2.4.0