Skip to content

feat: product file-integrity section for the agent API - #46

Merged
selul merged 2 commits into
masterfrom
feat/integrity-section
Aug 21, 2026
Merged

feat: product file-integrity section for the agent API#46
selul merged 2 commits into
masterfrom
feat/integrity-section

Conversation

@selul

@selul selul commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Adds TI_Parrot_Integrity and three agent-API routes:

  • GET /integrity — ThemeIsle products detected on the site (plugins/themes bundling vendor/codeinwp/themeisle-sdk, plus themeisle_sdk_products registrations; deduped, with version, active flag and the WordPress Available header).
  • GET /integrity/{slug} — verifies local files against the release checksum manifest and reports modified (with expected/actual sha256), missing, added (VCS/junk ignored) and skipped, with full counts, list caps and partial status under time/byte budgets. Manifest source is chosen by the SDK's WordPress Available: header — wp.org plugin-checksums for free plugins, api.themeisle.com/checksum/{slug}/{version} for pro products and themes (wp.org has no theme checksums), one-hop 404 fallback.
  • GET /integrity/{slug}/file?path&offset&length — bounded base64 chunks (default 128 KiB, max 176 KiB so the JSON stays under the 256 KB respond() cap), traversal- and symlink-safe.

/manifest grows an integrity section; SCHEMA_VERSION → 1.1.

Server side: Codeinwp/themeisle-lambda-functions#31 serves the manifests generated by Codeinwp/action-release-checksums.

Tests: 24 new (detection incl. real plugin/theme dirs, source selection, fallback order, budgets, truncation, chunk reassembly, traversal/symlink rejection, redact() path survival, auth); suite 54/54; parse-safe to the PHP 5.4 CI floor.

🤖 Generated with Claude Code

selul and others added 2 commits August 20, 2026 21:26
Detects installed ThemeIsle products (themeisle-sdk bundlers, plugins
and themes, plus themeisle_sdk_products registrations), verifies their
files against the release checksum manifest and reports
modified/missing/added files. Manifest source is chosen by the SDK's
'WordPress Available' header: wp.org plugin-checksums for free plugins,
api.themeisle.com/checksum for pro products and themes, with a one-hop
404 fallback. /integrity/{slug}/file returns bounded base64 chunks
(symlink/traversal-safe, under the 256KB respond() cap).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diagnostic-only field with no consumer in the integrity flow; keeps the
payload lean. SDK-dir presence still drives detection.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@selul
selul changed the base branch from development to master August 21, 2026 09:32
@selul
selul merged commit e237b3e into master Aug 21, 2026
21 checks passed
@selul
selul deleted the feat/integrity-section branch August 21, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant