Skip to content

feat(ingest): add Confluence Cloud source adapter - #319

Open
mattsenicksigma wants to merge 5 commits into
Kaelio:mainfrom
mattsenicksigma:feat/confluence-integration
Open

feat(ingest): add Confluence Cloud source adapter#319
mattsenicksigma wants to merge 5 commits into
Kaelio:mainfrom
mattsenicksigma:feat/confluence-integration

Conversation

@mattsenicksigma

Copy link
Copy Markdown
Contributor

Summary

Closes #169

Adds a Confluence Cloud ingest adapter that fetches pages from one or more Confluence spaces and synthesizes them into ktx wiki items via a new confluence_synthesize skill.

  • New confluence driver recognized in connectionConfigSchema and sourceAdapterByDriver
  • Adapter follows the established SourceAdapter pattern: detect / fetch / chunk
  • Fetch does incremental sync — unchanged pages (same version number + timestamp) are skipped on subsequent runs
  • Pages are staged as JSON files containing the raw Confluence storage XML, title, breadcrumb, URL, and version metadata
  • confluence_synthesize skill guides the memory agent in extracting durable wiki candidates from storage XML
  • 35 unit tests covering detect, chunk (including diffSet re-sync and batching), pull config parsing, and local connection resolution

ktx.yaml connection shape:

my-confluence:
  driver: confluence
  base_url: https://yourorg.atlassian.net
  email: you@yourorg.com
  api_token: <token>          # or api_token_ref: env:CONFLUENCE_API_TOKEN
  space_keys: [ENG, PROD]     # optional — omit to ingest all global spaces

Test plan

  • pnpm run type-check passes
  • pnpm run test passes (35 new confluence tests)
  • pnpm run dead-code passes (Biome + Knip default + Knip production)
  • pnpm run build passes
  • Manual: add a confluence connection to a ktx project and run ktx ingest <connection-id>

🤖 Generated with Claude Code

Adds a Confluence Cloud ingest adapter so ktx can pull pages from
Confluence spaces and synthesize them into wiki items.

Closes Kaelio#169

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@mattsenicksigma is attempting to deploy a commit to the Kaelio Team on Vercel.

A member of the Team first needs to authorize it.

@mattsenicksigma

Copy link
Copy Markdown
Contributor Author

More Human Comment

Should retrieve pages from confluence and update/add wiki entries where applicable. No real assumptions made here, decent amount straightforward, just grabbing the pages and feeding the content in.

Was able to get both a fresh ingest to run as well as a subsequent ingest call:
image

Documents the confluence driver in context-sources.mdx and ktx-yaml.mdx,
following the same structure as other context-source integrations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@luca-martial
luca-martial requested a review from andreybavt June 27, 2026 17:20
… fetch sync paths

Applies the same fixes andreybavt flagged on the Sigma adapter (PR Kaelio#316) before
he reviews this one: the manifest's fresh fetchedAt was included in rawFiles,
which would spuriously mark it modified on every diff; pageCount double-counted
pages that were re-fetched (present in both totalFetched and the stale
existingByPageId map); and the confluence_synthesize skill documented a capped
field that fetch.ts never writes. Also adds fetch.test.ts, which the adapter
was missing entirely, covering skip-unchanged, refetch-on-version-change,
stale-page eviction, and preserve-on-transient-failure.
…config

tryPull() called git.pull() with no strategy, so a diverged cache's fate
depended on the developer's global pull.rebase/pull.ff config instead of
being deterministic. With pull.rebase=true, a locally-diverged cache
silently rebased instead of failing, which skipped the cloneFresh fallback
that the code (and repo-fetch.test.ts) both assume runs on divergence.
…egration

# Conflicts:
#	docs-site/content/docs/configuration/ktx-yaml.mdx
#	docs-site/content/docs/integrations/context-sources.mdx
#	packages/cli/src/context/ingest/local-adapters.ts
#	packages/cli/src/context/project/driver-schemas.ts
#	packages/cli/src/public-ingest.ts
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.

Add Confluence context source

1 participant