post_impressions and post_engaged_users are rejected by Graph (#100).
Use post_media_view and post_clicks instead.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
RCA:
- gpt-5.6-sol is the only model supported by this ChatGPT account; other models
(gpt-4.1-mini, o4-mini, gpt-4o) all return model_not_in_accessible_catalog
- Zod v4 toJSONSchema emits a $schema meta field that gpt-5.6-sol rejects as an
invalid schema keyword; strip it before passing to the automation worker
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- automation.ts: distinguish network/timeout errors from generic failures
- aiAutoReply.ts: upgrade to multi-bubble reply system with female particle enforcement
- codex-runtime.mjs: revert default model to gpt-4.1-mini
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Share IMAGE_ART_DIRECTION between editable image prompts and queued post drafts
- Use ThaiDateTimePicker for week board planning; a11y, clear action, mobile layout
- Show planned day in Thai format in the generation queue
- Wait longer for ChatGPT image download and handle the download menu item
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds PageProfile.website (with migration). Codex runs without network, so
the profile draft route fetches the site server-side (public hosts only,
redirect-checked, size-capped, cached) and passes its text as
<shop_website>. Other prompts receive the URL via the shop profile.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rank by vivid/dark pixels, average within coarse bins, and drop same-hue
anti-aliasing blends. On the 4Tech logo this yields red + charcoal instead
of white/pink fringe colours.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds PageProfile.visualStyle (with migration), feeds it into every AI
prompt route, and samples a logo palette for image generation. Also
hardens Chrome focus handling and image copy in the ChatGPT driver.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ARR's machine-level reverseRewriteHostInResponseHeaders rewrote the host of
Location headers, sending Facebook/Google login dialogs to loma.chat/v21.0/...
Serve a 200 HTML hop to the provider URL instead of a 3xx Location.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add percentage-by-stage progress in the queue UI, a progress rendering
test script, and clearer Chrome focus error details in the ChatGPT worker.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Text generation now runs through a PM2 automation worker (codex exec) and
images through the ChatGPT Chrome extension, replacing the Anthropic API.
generateStructured keeps its signature; results are Zod-validated on the web
side and the worker is reached with a bearer secret.
- AI image assistant in the post editor: editable prompt step, then image
(square or 3:2 only, since Instagram rejects 2:3), stored via putBlob
- Full-post queue (PostGenerationJob + migration): enqueue returns 202, FIFO
claim under an advisory lock, heartbeat, stale-job failure, per-user
request key, cancel while QUEUED; output is always a DRAFT with audit rows
- Separate 10 images/page/day quota; text quota excludes images
- Worker reports Codex usage-limit as 429 with a clear Thai message
- Docs: AI-AUTOMATION.md, ARCHITECTURE/README/.env.example updated
Known gap: the live FIFO queue check (scripts/check-post-queue.mjs) has not
passed yet; the last run hit the Codex account usage limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds basePath config, withBase/appUrl helpers, base-path-aware cookies,
OAuth redirects, manifest, service worker and cron runner.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Facebook Login for Business (the only Login product a Business-type
app gets, needed here for Page/Messenger/Instagram) has no
email/public_profile permission to request, only business asset
permissions - there is no config_id that can resolve a user's
identity. credentials() now always returns null for facebook so the
button stays hidden; Google login is unaffected.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Storage now picks Vercel Blob when a store is connected (BLOB_STORE_ID
or BLOB_READ_WRITE_TOKEN), falling back to local disk for self-hosted
runs. Adds vercel.json cron schedule for the existing cron routes
(ig-publisher capped to once/day on Hobby plan).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds docker-compose.yml so Coolify can provision Postgres and generate
DATABASE_URL/SESSION_SECRET/TOKEN_ENCRYPTION_KEY/CRON_SECRET itself via
its SERVICE_PASSWORD_* magic variables, instead of an operator typing
them into the dashboard by hand.
TOKEN_ENCRYPTION_KEY now derives its AES-256 key via SHA-256 instead of
requiring exactly 32 raw bytes in base64, so a generated magic variable
works regardless of its format.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Replace Vercel-specific infra (Cron, Blob) with self-hosted equivalents
for deployment to Coolify: in-container cron scheduler
(scripts/cron-runner.mjs) and disk-based upload storage served via
/api/uploads/[...path]. Add Dockerfile, .dockerignore, and /api/health
for container health checks.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>