Skip to content

docs: unify integration documentation#13

Merged
TheRealAgentK merged 12 commits intomasterfrom
docs/unify-integration-docs
Mar 16, 2026
Merged

docs: unify integration documentation#13
TheRealAgentK merged 12 commits intomasterfrom
docs/unify-integration-docs

Conversation

@TheRealAgentK
Copy link
Copy Markdown
Collaborator

@TheRealAgentK TheRealAgentK commented Mar 11, 2026

Consolidates integration documentation into the SDK repo as the single source of truth for "how to build an integration."

Part of a cross-repo documentation unification effort across integrations-sdk, autohive-integrations-tooling, integrations-autohive, and integrations.

Phase 1 — Complete ✅

  • 1.1 Rewrote docs/manual/building_your_first_integration.md — comprehensive tutorial covering config.json, actions, auth, context.fetch(), testing, multi-file patterns
  • 1.2 Updated docs/manual/billing.md — added cross-reference to main tutorial, clarified ActionResult as standard return type
  • 1.3 Updated docs/manual/connected_account.md — added cross-reference, fixed all code examples (replaced non-existent context.http_client with context.fetch()), added auth injection comments
  • 1.4 Created docs/manual/integration_structure.md — canonical reference for file structure, naming conventions, and full config.json schema. Fixed tutorial: modular imports changed from relative to absolute (matching real integrations), removed false "minimum 10 characters" claim
  • 1.5 Created docs/manual/patterns.md — pagination (page-number, cursor, caller-controlled), centralized API helpers, multi-field custom auth. Fixed context.auth credential nesting across all docs
  • 1.6 Upgraded samples/api-fetch/ — kebab-case name, auth.title, display_name on actions, proper ActionResult usage, added __init__.py/README.md/icon.png, SDK pin with ~=
  • 1.7 Created samples/template/ — clean starter template with config.json, action handler, tests, README. Replaces old templates in other repos
  • 1.8 Improved SDK source docstrings (module docstring, AuthType members, ActionHandler/ConnectedAccountHandler examples, ExecutionContext auth shape, fetch() auto-injection docs) and regenerated docs/apidocs/ with pdoc 16.0.0
  • 1.9 Updated README.md — doc index table, samples table, link to tooling repo for validation, removed stale Raygun section

Next phases (separate PRs in other repos)

  • Phase 2: Slim down tooling repo docs (INTEGRATION_CHECKLIST.md, CONTRIBUTING.md), add cross-links to SDK
  • Phase 3: Clean up public integrations repo — delete superseded docs, update CONTRIBUTING.md and README
  • Phase 4: Clean up private integrations repo — delete stale docs/templates, add CONTRIBUTING.md
  • Phase 5: Cross-linking verification across all 4 repos

- Update Python version requirement to 3.13+
- Replace vendored SDK references with pip package imports
- Use ActionResult as required return type (matches SDK enforcement)
- Add auth section covering custom (title), platform, and no-auth patterns
- Add context.fetch() examples for GET, POST JSON, POST form
- Add multi-file integration pattern with explicit config path
- Add testing section with context.py and IntegrationResult pattern
- Pin SDK dependency with ~= compatible release operator
- Remove polling triggers (not supported in production)
- Remove opinionated error handling guidance
- Link to tooling repo for validation, billing.md, connected_account.md
- Add cross-references to main tutorial in both docs
- Fix connected_account.md examples: context.http_client does not exist,
  replaced with context.fetch() matching SDK API and real integrations
- Add comments explaining context.fetch() auto-injects auth for platform OAuth
- Fix name-splitting logic in generic example to match real integration pattern
- Update billing best practice: ActionResult is the standard return type
  regardless of billing support
…ps 1.4)

- Create docs/manual/integration_structure.md: canonical reference for file
  structure, naming conventions, and config.json schema
- Fix tutorial: modular integration imports changed from relative to absolute,
  matching all real integrations (Instagram, Facebook, Humanitix)
- Fix tutorial: remove false 'minimum 10 characters' claim on action
  description (tooling doesn't enforce this)
- Create docs/manual/patterns.md: pagination (page-number, cursor, caller-
  controlled), centralized API helpers (helpers.py module, static API class),
  and multi-field custom auth patterns
- Fix credential access across all docs: context.auth['api_key'] is wrong,
  credentials are nested under context.auth['credentials'] — verified against
  SDK source (integration.py L280) and all real integrations
- Fix tutorial test example to use {'credentials': {'api_token': '...'}}
  nesting, matching real test files (Freshdesk, Circle, Coda)
- config.json: name to kebab-case, identifier to title, add display_name,
  remove supports_connected_account, api_key format to password
- api_fetch.py: remove fake connected account handler, remove print()
  statements, fix auth access, add return type annotations
- requirements.txt: was empty UTF-16 BOM, now has SDK with ~= pin
- tests: fix auth to pass flat (SDK validates against fields schema),
  add dependencies path back to context.py, use httpbin.org endpoints
- Add __init__.py, README.md, icon.png (512x512 placeholder)
- Remove .gitignore deletion (still needed for dependencies/)
- Tutorial: fix test example to use flat auth, add note explaining
  production credentials nesting vs local testing
@TheRealAgentK TheRealAgentK requested review from Hamish-taylor, NinosMan and ProRedCat and removed request for Hamish-taylor and NinosMan March 12, 2026 19:38
@TheRealAgentK TheRealAgentK marked this pull request as ready for review March 12, 2026 19:39
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 45bb446384

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread samples/template/my_integration.py
Copy link
Copy Markdown
Contributor

@Hamish-taylor Hamish-taylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minoeR comments. I don't mind if you want to address these in other PR's like you mentioned this morning

Comment thread docs/manual/billing.md Outdated
Comment thread docs/manual/building_your_first_integration.md
Comment thread docs/manual/patterns.md
Comment thread samples/api-fetch/api_fetch.py Outdated
Co-authored-by: Hamish Taylor <Hamisht11@gmail.com>
Copy link
Copy Markdown
Contributor

@Hamish-taylor Hamish-taylor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing those comments!

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.

2 participants