158 lines
6.0 KiB
Markdown
158 lines
6.0 KiB
Markdown
# KIMI — Repo Pull Review: LinkedIn Video + Remotion Demo
|
|
|
|
**Date:** 2026-05-11
|
|
**Source:** `git pull` from `https://git.fetcherpay.com/garfield/hermes-mcp`
|
|
**Commits:** `6bf4cfd..c2eabd8` (fast-forward)
|
|
**Analyst:** KIMI
|
|
|
|
---
|
|
|
|
## What was pulled
|
|
|
|
### 1. LinkedIn Video Upload (Phase 01 — Complete)
|
|
|
|
**Status:** ✅ Fully implemented and wired
|
|
|
|
**New capabilities:**
|
|
- `uploadVideo(videoUrl, ownerUrn, accessToken)` — 5-step LinkedIn Videos API flow
|
|
1. Download video from public URL (ArrayBuffer, 120s timeout)
|
|
2. Initialize upload via `POST /rest/videos?action=initializeUpload`
|
|
3. Chunk upload at 4MB per chunk with ETag collection
|
|
4. Finalize upload
|
|
5. Poll every 3s up to 90s until status = `AVAILABLE`
|
|
- `createVideoPost(args, customer)` — orchestrates upload + post creation
|
|
- Uses `POST /rest/posts` (NOT `/v2/ugcPosts`) — video content field required
|
|
- Reads post URN from `x-restli-id` response header
|
|
- Includes audit logging
|
|
- `linkedinRestRequest()` — helper for LinkedIn REST API (`api.linkedin.com/rest`)
|
|
- Adds `LinkedIn-Version: 202501` header
|
|
- Separate from existing `linkedinRequest()` which targets `/v2`
|
|
|
|
**Wiring:**
|
|
- MCP tool: `linkedin_upload_video` (registered in `src/tools.ts`)
|
|
- REST endpoint: `POST /api/linkedin/video` (registered in `src/index.ts`)
|
|
- Tool schema requires: `video_url` (public MP4 URL), `text` (caption)
|
|
- Optional: `visibility` (PUBLIC/CONNECTIONS), `account`
|
|
|
|
**Files changed:**
|
|
- `src/clients/linkedin.ts` — ~120 lines added
|
|
- `src/tools.ts` — import + tool definition + switch case
|
|
- `src/index.ts` — REST route
|
|
|
|
**Planning docs:**
|
|
- `.planning/phases/01-linkedin-video-upload/01-01-PLAN.md` — Client implementation plan
|
|
- `.planning/phases/01-linkedin-video-upload/01-01-SUMMARY.md` — Completed
|
|
- `.planning/phases/01-linkedin-video-upload/01-02-PLAN.md` — Tool wiring plan
|
|
- `.planning/phases/01-linkedin-video-upload/01-02-SUMMARY.md` — Completed
|
|
|
|
**Key technical decisions:**
|
|
- Inline `fetch` for `POST /rest/posts` to read `x-restli-id` header before body consumption
|
|
- ETags stripped of surrounding quotes before finalize
|
|
- Chunk size: 4,194,304 bytes (4MB)
|
|
- Poll timeout: 90 seconds with 3-second intervals
|
|
|
|
---
|
|
|
|
### 2. Remotion Video Demo Project
|
|
|
|
**Status:** 🎬 New project added (not deployed)
|
|
|
|
**Location:** `videos/remotion-demo/`
|
|
|
|
**What it is:**
|
|
A React-based video generation pipeline using Remotion for creating SquareMCP marketing videos.
|
|
|
|
**Scenes built:**
|
|
| Scene | Purpose |
|
|
|-------|---------|
|
|
| `HeroLogoReveal` | Animated logo intro |
|
|
| `HeroMCPLayer` | MCP protocol visualization |
|
|
| `HeroNetwork` | Network/connection animation |
|
|
| `Scene1Hook` | Problem hook (30s video) |
|
|
| `Scene2Problem` | Pain point exposition |
|
|
| `Scene3Solution` | SquareMCP solution reveal |
|
|
| `Scene4Architecture` | Technical architecture diagram |
|
|
| `Scene5Benefits` | Feature/benefit showcase |
|
|
| `Scene6CTA` | Call-to-action outro |
|
|
|
|
**Compositions:**
|
|
- `SquareMCPHeroLoop` — Infinite loop for website hero background
|
|
- `SquareMCPLinkedIn` — LinkedIn-optimized video format
|
|
|
|
**Assets:**
|
|
- `public/squaremcp-logo.svg` — Brand logo
|
|
|
|
**Dependencies:**
|
|
- Remotion core + player + renderer
|
|
- TypeScript + ESLint + Prettier
|
|
|
|
**Build command:**
|
|
```bash
|
|
cd videos/remotion-demo
|
|
npm install
|
|
npx remotion render src/index.ts SquareMCPLinkedIn out/squaremcp-linkedin.mp4
|
|
```
|
|
|
|
---
|
|
|
|
## Impact on existing work
|
|
|
|
### Conflicts: NONE
|
|
The pulled changes are additive:
|
|
- LinkedIn video functions added AFTER existing functions (no modifications)
|
|
- Remotion project is in a new `videos/` directory
|
|
- `.gitignore` updated to exclude Remotion outputs
|
|
|
|
### Tool count update
|
|
Previous count: 36 tools
|
|
After pull: **37 tools** (added `linkedin_upload_video`)
|
|
|
|
### OpenAPI schema impact
|
|
The new `POST /api/linkedin/video` endpoint is NOT yet in `getOpenApiSpec()` in `src/manifest.ts`. If exposing to ChatGPT, it needs to be added (and would push operations from 25 → 26, still under the 30 limit).
|
|
|
|
---
|
|
|
|
## Integration with today's social builds
|
|
|
|
| Platform | Today's work | Pulled work | Combined status |
|
|
|----------|-------------|-------------|-----------------|
|
|
| LinkedIn | Text posts (`linkedin_create_post`) | **Video posts (`linkedin_upload_video`)** | ✅ Complete — text + video |
|
|
| Telegram | Bot messaging | — | ✅ Deployed |
|
|
| Discord | Bot messaging | — | ⚠️ Needs token |
|
|
| Instagram | Graph API posts | — | ⚠️ Needs credentials |
|
|
| Twitter/X | Read-only search | — | ⚠️ Needs Bearer token |
|
|
| WhatsApp | Meta Cloud API | — | ⚠️ Needs Cloud API number |
|
|
|
|
**LinkedIn is now the most complete platform** — supports text posts, video posts, and profile reads.
|
|
|
|
---
|
|
|
|
## Gaps identified
|
|
|
|
1. **OpenAPI schema incomplete** — missing `/api/linkedin/video` (and potentially other new endpoints)
|
|
2. **Remotion not integrated** — video generation is a separate project, not connected to the MCP server
|
|
3. **No video hosting** — `linkedin_upload_video` requires a public URL; need a CDN or S3 bucket for rendered videos
|
|
4. **K8s deployment** — Remotion project is not containerized or deployed
|
|
|
|
---
|
|
|
|
## Recommended next actions
|
|
|
|
1. **Add `/api/linkedin/video` to OpenAPI schema** if exposing to ChatGPT
|
|
2. **Build and test Remotion demo** — render a sample LinkedIn video
|
|
3. **Upload a test video** — use `linkedin_upload_video` with a public MP4 URL
|
|
4. **Deploy Remotion renderer** — could run as a K8s job or use Remotion Lambda
|
|
5. **Integrate video pipeline** — MCP tool that renders + uploads in one step
|
|
|
|
---
|
|
|
|
## Meta: What this reveals about product direction
|
|
|
|
The pulled work shows a shift from "API integrations" to "content generation":
|
|
- Phase 01: LinkedIn video upload (distribution)
|
|
- Remotion: Video creation (production)
|
|
|
|
This suggests the product vision includes **AI-powered content creation + distribution** — not just API access.
|
|
|
|
**Strategic implication:** The GPT architecture analysis (split into Mail/Social) becomes more important. Video upload is a high-value social feature that belongs in the **Social GPT**, not the Mail GPT.
|