Identity
Stable id, familyID, optional legacyIDs, semantic version, minimum app version, and contract version.
Synthetiq Books · Source development
Create a GitHub source repository for page-image publications, text, EPUB, or PDF. The guide covers the complete module contract, safe runtime boundaries, deterministic fixtures, live probes, and iOS certification.
AI prompt
Enter a website, choose its content type, and generate a master prompt for Codex, Claude, Gemini, Cursor, or another coding agent. The prompt links to one canonical public tester and requires honest evidence.
Workflow
Repository
index.json
modules/
example-source/
manifest.json
index.js
icon.png
fixtures/
expected.json
search.html
details.html
chapters.html
images.htmlZIP files, APKs, remote scripts, and generated binaries are not part of the Books source format. Every path resolves relative to index.json.
Manifest
Stable id, familyID, optional legacyIDs, semantic version, minimum app version, and contract version.
pageImages, text, or publication, with truthful rating, language, release track, and status.
HTTPS base URL, narrow host allowlist, timeout, response size, script size, request concurrency, and cache TTL.
SHA-256 descriptors for manifest, script, and icon plus attribution and authorisation references.
{
"id": "example-source-v1",
"familyID": "example-source-v1",
"version": "1.0.0",
"contractVersion": 1,
"contentType": "pageImages",
"capabilities": ["discovery", "search", "details", "chapters", "images"],
"baseURL": "https://your-library.example",
"allowedHosts": ["your-library.example", "cdn.your-library.example"],
"entry": {"path": "modules/example-source/index.js", "sha256": "…"}
}Handlers
globalThis.SynthetiqModule = {
discoveryHome, discoveryFeed,
searchResults, extractDetails, extractChapters,
extractImages, extractText, extractResources
};hasMore.Runtime
Modules run in an isolated WebKit context. They do not receive filesystem, process, UIKit, contacts, camera, library database, or Keychain access.
fetchv2For bounded direct HTTPS requests. Preserve necessary headers and validate status, type, body, redirects, and shape.
pagev2For explicitly declared interactive browser work. It is not a CAPTCHA bypass and requires iOS runtime evidence.
Fixtures
Fixtures must be deterministic UTF-8 HTML or JSON using invented/minimal content. Preserve structural fields needed to test parsing, pagination, exclusions, duplicates, and terminal resources. Never commit credentials, private metadata, account cookies, or complete copyrighted chapters.
npm test
node scripts/validate.mjs --skip-hashes
npm run test:module:fixtures -- example-source
npm run test:module:report:fixtures -- example-sourceTesting
The canonical public guide contains every command, the report format, failure interpretation, iOS certification boundary, and required handoff.
| Evidence | What it proves | What it does not prove |
|---|---|---|
CONTRACT_PASS | Shape, metadata, paths, and hashes | Parser behaviour or live access |
FIXTURE_PASS | Deterministic handler behaviour | Current website or network |
LIVE_NODE_PASS | Bounded live handler and terminal-content path | WebKit, install, reader, or downloads |
IOS_RUNTIME_PASS | Installed module through the Books WebKit runtime | Permanent future source availability |
AI certifier
The repository includes a command-allowlisted local MCP server exposing list_modules, certify_module, certify_flagships, and latest_report. It cannot run arbitrary shell commands or arbitrary paths.
{
"mcpServers": {
"synthetiq-books-source-certifier": {
"command": "node",
"args": ["/ABSOLUTE/REPOSITORY/PATH/scripts/module-certifier-mcp.mjs"]
}
}
}Updates
node scripts/finalize-hashes.mjs. This updates exact repository descriptors.npm test. Publish only after deterministic verification succeeds.Security and policy
eval, new Function, downloaded scripts, analytics, telemetry, or browser storage.Troubleshooting
| Problem | Likely cause | Required action |
|---|---|---|
| Empty discovery/search | Wrong endpoint, parser, or challenge body | Inspect real response shape and add a sanitized fixture. |
| Only some chapters | Source pagination was ignored | Follow every page and deduplicate by stable identity. |
| Pages return HTML | Challenge, login, hotlink, or expired route | Reject it and report the typed failure. |
| Node passes, iOS fails | WebKit bridge or pagev2 difference | Treat iOS runtime evidence as authoritative. |
| Update rejected | Same-version byte change, downgrade, hash, or identity mismatch | Bump version and regenerate all descriptors. |
| Works once, then fails | Rate limiting, unstable IDs, or stale cookies | Bound requests, preserve IDs, and test recovery without bypasses. |
FAQ
No. Books reads files users import and source repositories they choose. A module author remains responsible for its source and use.
No. It earns FIXTURE_PASS. Live and iOS evidence are separate.
No. Books installs loose manifest, JavaScript, and icon files from a repository index.
Yes, when the publication is openly downloadable or otherwise authorised, uses HTTPS, and is not DRM-protected.
The Node probe cannot reproduce WebKit-owned browser state or pagev2 exactly.