Repository navigation
v2.4.0
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 bykey:asc(default),createdAt:asc, orcreatedAt:desc. Filter byuploaded_by,tag,format,is_image,min_width/max_width/min_height/max_height. Cursor is sort-pinned (gateway returnsINVALID_CURSOR_FOR_SORTon cross-sort reuse).- New flat
AssetRef/BlobSummaryfields —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.49width_px/height_px/blurhash/variantsadditions — never nested underimage: {}. - 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, socatch (e) { if (e.code === "INVALID_ASSET_METADATA") ... }works the same whether the rejection happened locally or remotely.
New MCP tool fields
assets_putacceptsmetadata(record of string|number|boolean|string[]) andexif_policy(keep|strip). Response markdown now surfacesImage format,Image info,EXIF policy,EXIF, andMetadata.assets_lsacceptssortand the 8 documentedfilter.*keys. The result table now rendersImage(format + dimensions + EXIF policy + intrinsic summary) andMetadatacolumns.
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:descand--filter key=value(repeatable, validated against the 8 documented keys).
Agent docs
cli/llms-cli.txtandSKILL.mddocument the new flags, v1.50 response fields, and typed errors.openclaw/SKILL.mdadds CLI examples for--meta/--exif-policy/--sort/--filter.
CI
- New
.github/workflows/publish.ymlpublishes all three packages via Trusted Publisher OIDC (matches the existingpublish-astro.ymlmodel). No npm token in repo secrets.
Closes #393.
Install
npm install -g run402@2.4.0
npm install @run402/sdk@2.4.0
- npm:
run402-mcp·run402·@run402/sdk - Full changelog: v2.3.1...v2.4.0