feat(sharepoint): add SharePoint context source support#341
Open
Aryan1718 wants to merge 1 commit into
Open
Conversation
|
@Aryan1718 is attempting to deploy a commit to the Kaelio Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new sharepoint context-source driver to ktx. It supports ingesting Markdown and Word documents from a
Microsoft Graph drive folder, covering both SharePoint document libraries and OneDrive folders through the same
drive_id + folder_id model.
The implementation includes connection parsing, credential resolution, Graph-based folder traversal, staged ingest
output, CLI setup and verification flows, runtime skill wiring, documentation, and test coverage.
What was added
New sharepoint context-source driver
Added a new adapter under packages/cli/src/context/ingest/adapters/sharepoint/ with behavior aligned to the existing
ingest stack:
Supports driver: sharepoint
Ingests .md and .docx files only
Traverses a Microsoft Graph drive folder, with optional recursion
Stages output as:
Uses stable compact staged directory names derived from document title and item ID
Microsoft Graph authentication and connection resolution
Added SharePoint connection resolution using Azure AD client credentials:
Graph-based file discovery and download
Implemented a lightweight Graph client using native fetch:
Document conversion and normalization
Added content handling for both supported formats:
CLI and runtime integration
Integrated the new source across user-facing CLI flows:
Documentation
Updated docs for configuration and usage:
Also documented required Microsoft Graph application permissions with admin consent:
Testing
Added targeted coverage for the new SharePoint surface, including:
Verification
Verified with:
Result:
Close #171