=== Maruhide Postkeeper - AI Auto-Post & Recovery ===
Contributors: maruhidedev
Tags: ai, auto-post, scheduled-posts, content-generator, automation
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI auto-posting: publishes daily, retries on failure, and recovers missed scheduled posts, using your own Anthropic/OpenAI key (BYOK). All free.

== Description ==

Most AI content plugins for WordPress stop at "generating an article". **Maruhide Postkeeper** is built for what happens *after* generation — the ongoing **operation**: auto-publishing on a daily schedule, retrying automatically when the AI API call fails, and recovering posts that missed their scheduled publish time. Bring your own Anthropic (Claude) or OpenAI (GPT) API key (BYOK).

**Every feature is free and fully functional.** There is no license key, no locked feature, and no usage limit inside the plugin.

**BYOK (Bring Your Own Key).** You use your own Anthropic (Claude) or OpenAI API key. The generation cost is billed directly by the provider, and your key is stored only inside your own site. The plugin author never receives your key.

= Key features =
* **AI article generation (BYOK)** — Anthropic (Claude) or OpenAI, using your own key.
* **Daily auto-generation** — one article at your chosen time, via WP-Cron.
* **Auto-retry on failure** — exponential backoff so a transient API error does not silently drop a post.
* **Missed-publish recovery / sweeper** — scheduled posts that got stuck as "future" are published automatically.
* **Auto eyecatch (featured image)** — a clean title card is generated with GD (Japanese title supported when a font is bundled).
* **Compliance-first defaults** — AI-generated disclosure label and draft/review mode are **enabled by default**, so a human reviews before publishing.

= 日本語 =

多くのAIツールは「記事を生成する」ところで終わります。本プラグインは、生成した後の **運用**――毎日の予約投稿、失敗時の自動リトライ、公開漏れの自動修復（スイーパー）――までを自動化します。すべての機能を無料で、制限なくご利用いただけます。

* **BYOK（Bring Your Own Key）**：ご自身の Anthropic (Claude) / OpenAI のAPIキーを使用。生成の対価は各社へ直接支払われ、キーはご自身のサイト内にのみ保存されます（開発元はキーを受け取りません）。
* **毎日自動生成 / 自動リトライ / 投稿漏れ自動修復**。
* **アイキャッチ自動生成**（GD・日本語タイトル対応）。
* **規約準拠を既定に**：AI生成の開示表示と、公開前の下書き/レビューを既定で有効化。

== External services ==

This plugin connects to the following external services. **Understand what data is sent before you use each feature.**

1. **Anthropic API** (api.anthropic.com) — used only when you select "Anthropic" as the provider and start a generation.
   * Data sent: the generation prompt (your configured keyword) and your Anthropic API key.
   * Purpose: generating the article body.
   * Terms / Privacy: https://www.anthropic.com/legal/aup , https://www.anthropic.com/legal/privacy

2. **OpenAI API** (api.openai.com) — used only when you select "OpenAI" as the provider and start a generation.
   * Data sent: the generation prompt and your OpenAI API key.
   * Purpose: generating the article body.
   * Terms / Privacy: https://openai.com/policies/usage-policies/ , https://openai.com/policies/privacy-policy/

No article content or API keys are ever sent to the plugin author's own servers.

== Frequently Asked Questions ==

= Is this plugin free? =
Yes. Every feature — manual and daily auto-generation, auto-retry, missed-publish recovery, scheduled publishing, and the eyecatch generator — is free and fully functional. There is no paid tier, license key or usage limit in the plugin. You only pay your own AI provider for generation, because you use your own API key (BYOK).

= Is my API key sent to the plugin author? =
No. Your key is stored only in your site's database and is sent only to the AI provider you configured (Anthropic or OpenAI) at generation time.

= Are generated articles published automatically? =
By default, "draft / review mode" is on, so articles are saved as drafts for a human to review before publishing (human-in-the-loop, as AI usage policies expect). You can turn on daily auto-generation and scheduled publishing in the settings.

= Which models can I use? =
Any current model name accepted by your provider's API (for example a current Claude or GPT model). You enter the model name in the settings.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/` and activate it, or install it from the Plugins screen.
2. Go to **Settings → AI自動投稿**.
3. Choose your provider (Anthropic or OpenAI), enter **your own** API key and a model name.
4. Add one keyword per line, then use "Generate now" to test, or enable daily auto-generation.

== Credits ==

* Bundled font: **BIZ UDGothic** (Morisawa / The BIZ UDGothic Project), licensed under the SIL Open Font License 1.1. See `assets/OFL.txt`.

== Changelog ==

= 0.5.0 =
* All features are now free and fully functional — removed the license gating on daily auto-generation, auto-retry, missed-publish recovery and scheduled publishing.
* Removed the bundled licensing SDK and the developer unlock toggle.
* Renamed to "Maruhide Postkeeper - AI Auto-Post & Recovery" for a distinctive display name.

= 0.4.7 =
* Eyecatch redesign: gradient card, centered layout with crop-tolerant safe zone (survives theme featured-image aspect cropping), auto-fitting title, site-name label.
* Bundled Japanese OFL font (BIZ UDGothic) so eyecatch titles render in Japanese out of the box.
* Measurement/log layer moved to a dedicated table (concurrency-safe; fixes lost counts under rapid use). Success-rate summary + CSV export.
* Hardening for WordPress.org guidelines: prepared/escaped output, nonces and capability checks, external-service disclosure.

= 0.1.0 =
* Initial scaffold: settings screen (BYOK / content / compliance).

== Upgrade Notice ==

= 0.5.0 =
All features are free — no license key required.
