Commit Graph
2 Commits
Author SHA1 Message Date
Magnus Hedemarkandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> a20b66e6c1 fix(ghost): send source=html on html writes and repair scrutiny round-1 findings
Admin API writes carrying an html payload (create-post, update-post,
create-page) now attach the docs-required ?source=html query flag;
_post/_put gained params plumbing, and the create-post dry-run plan
includes params for plan/request parity. Regression tests pin the param
whenever an html payload is present (mocked request capture and dry-run
plans) and assert its absence on mobiledoc/lexical writes.

Docs: fix the jq interpolation typo in worked-recipes recipe 2 (missing
backslash made the scheduled-posts line exit 5), replace the blanket
"exit code 2" claim in admin-auth-and-basics with the script's actual
2-5 failure-class mapping, and state the source=html requirement in the
SKILL.md --html gotcha.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-29 19:53:50 -04:00
Magnus Hedemarkandfactory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> cc7e61ed30 docs(ghost): thicken Admin API skill
Full lastfm-model rebuild of the ghost skill against current docs.ghost.org
research:

- Fix JWT signer correctness: hex-decode the secret half before HMAC-SHA256
  signing (official contract; literal-hex signing produced invalid tokens),
  document HS256 + kid header + aud /admin/ + 5-minute token window, add
  admin_api_audience() derivation and Ghost-scheme error handling with
  researched signatures (409 UPDATE_COLLISION, 404 non-public guidance,
  INVALID_AUTH_HEADER hint, 204 delete tolerance).
- Extend CLI surface: get-post, update-post (updated_at collision guard),
  delete-post, create-page, create-tag, posts pagination (--page/--order,
  meta.pagination surfaced), scheduled posting with --published-at guard;
  dry-run now previews method/URL/payload exactly as executed.
- Add 5 cited reference files (auth/basics, content-vs-admin split incl.
  draft-visibility asymmetry, endpoint guide, worked recipes, gotchas).
- Add scripts/test_ghost.py: 28 offline tests incl. fixed-vector JWT
  known-answer checks and jq-executed pipeline-consumability chains.
- Add evals/evals.json (6 cases incl. npm ghost-cli negative probe).
- Rewrite SKILL.md (155-line body) and README in lastfm model.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2026-08-26 21:24:20 -04:00