t1k:marketing:ua:creative-upload
| Field | Value |
|---|---|
| Module | ua |
| Version | 1.13.11 |
| Effort | medium |
| Tools | — |
How to invoke
Section titled “How to invoke”/t1k:marketing:ua:creative-uploadUA Creative Upload
Section titled “UA Creative Upload”Upload playable zips (images/videos share the flow) to the Mintegral creative library with the studio name, verify the preview, report. Attaching to an offer is out of v1 (see below).
Script: scripts/creative-upload.cjs (Node, JSON out, no deps). API table, naming rule, gotchas: references/mintegral-creative-api.md.
Executed by
Section titled “Executed by”The CLI does the mechanical work (library read, name build, preflight, dry run), so the read-only steps are
cheap-tier (routing SSOT: rules/orchestration-rules.md § “Task-Type → Agent Routing”):
| Step | Agent |
|---|---|
Run list / next-name / preflight / dry-run upload and report the printed JSON | t1k-fact-fetcher |
Show names to the user, get approval, run upload --confirm | stays inline in the main session, not delegated |
Decision Tree
Section titled “Decision Tree”| Intent | Do |
|---|---|
| “What is the next PLA number for X” | list --title X, then next-name |
| “Upload this playable” | name -> preflight -> dry-run -> user OK -> --confirm |
| “Which offer uses this app” | offers --match <regex> (read-only) |
| “Attach to an offer / creative set” | Not in v1: print the plan, see below |
Workflow
Section titled “Workflow”- Name first (no rename API):
bun scripts/creative-upload.cjs next-name --title <Title> --name <ClearName> [--date ddmmyy]. ResultTitle_PLA_<N>_<ClearName>_<ddmmyy>; N = highest PLA of that Title in the library + 1. Title = the app’s existing prefix (listshows them). - Rename the zip to
<name>.zip(creative_nameis the filename,.zipincluded). preflight <zip>(exit 3 on failure): singleindex.html, inline assets, no external requests, <= 5 MB,window.gameReady/gameStart/gameEnd/installpresent.upload <zip...>is a dry run printing the exact request and uploaded-as name. Show it to the user.- After the user approves the names:
upload <zip...> --confirm. It GETs eachpreview_url(must be 200). - Report: final name,
creative_md5, preview status. Never print key values.
Images/videos: add --image-video (uses /creatives/upload; playable checks become warnings).
Attach (v1 decision: not implemented)
Section titled “Attach (v1 decision: not implemented)”Attaching (POST /creative_set) changes LIVE delivery, so it falls under ad-network-mcp-write-safety.md:
only with an explicit per-offer confirmation naming offer, creative names and before -> after. v1 ships no
write path for it; output a plan (offer id from offers, creative names + md5s) and let the user act or approve a separate step.
Hard rules
Section titled “Hard rules”- No rename and no delete-creative API. A wrong name means a dashboard cleanup by the user; list the leftovers in the report.
- Duplicate MD5 is rejected. A re-upload needs changed bytes: add
<!-- creative: <name> -->after<meta charset>inindex.html, re-zip. - Old names are messy (
PLA02,ArrowHeat,_Minegral_); the parser is tolerant, but a name that matches nothing is not counted toward N. - Auth is
md5(API_KEY + md5(timestamp)), recomputed per request; keys come from env or~/.config/t1k/ads.env. - Upload is not spend-neutral downstream: library-only is safe; anything that attaches to an offer is not.