trypost/app/Actions/Post
Paulo Castellano eb2b345163
feat: Asset Library list, preview, and attach via API and MCP (#282)
* feat: list, preview, and attach Asset Library media via API and MCP

Let API and MCP clients reuse workspace assets instead of re-uploading, sharing the same scoped query, signed preview, and idempotent attach path.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Align Asset Library API and MCP with main media patterns.

Drop the signed-preview stack, return Storage URLs and PostResource like existing attach flows, and query medias by morph owner instead of getMedia().

Co-authored-by: Cursor <cursoragent@cursor.com>

* Paginate workspace assets with the app default page size.

Keep list pagination in the action via config('app.pagination.default') instead of a hardcoded API page size.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Move asset API and MCP input rules into FormRequests.

Keep controllers and tools free of inline field validation; MCP tools reuse the request rule definitions.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Document asset MCP tools with explicit parameters and constraints.

Spell out workspace scope, return fields, sibling tools, and rejection cases so agents can call list/get/attach without guessing.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Harden asset attach against races and keep library metadata on the post.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Relock the library asset on attach so a deleted file cannot land on the post.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Document that omitting alt on attach keeps the library alt text.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 17:08:20 -03:00
..
AttachExistingAsset.php feat: Asset Library list, preview, and attach via API and MCP (#282) 2026-08-16 17:08:20 -03:00
CreatePost.php Add optional Pinterest pin title and destination link (#232) 2026-08-05 18:15:50 -03:00
DeletePost.php feat: workspace-scoped broadcast channel and post lifecycle events 2026-05-07 16:02:22 -03:00
DuplicatePost.php fix: skip removed social accounts when duplicating posts (#226) 2026-08-03 13:04:42 -03:00
HostInlineMedia.php refactor(api): extract inline-media hosting into a HostInlineMedia action 2026-06-28 21:15:01 -03:00
SyncPostPlatforms.php feat: proactive connection check for at-risk posts + SocialAccount name centralization (#256) 2026-08-09 11:10:39 -03:00
UpdatePost.php Add optional Pinterest pin title and destination link (#232) 2026-08-05 18:15:50 -03:00