Skip to content

feat: PRO-1122: governance permit and write parameters on the clients [kyle-agent] - #261

Merged
kyleking-cohere merged 2 commits into
data-governancefrom
kyle/pro-1122-governance-params
Nov 27, 2026
Merged

kyleking-cohere merged 2 commits into
data-governancefrom
kyle/pro-1122-governance-params

Conversation

@kyleking-cohere

Copy link
Copy Markdown

Adds optional governance parameters to the Compass clients (sync and async), for deployments where a governance service decides what a caller may read and how written content is labelled.

  • Reads take permit: GovernancePermit | None (permit_id, rule): search_documents, search_chunks, direct_search and direct_search_scroll send it as the body's governance; get_document, get_document_asset, get_visual_element and get_media_clip send it as the permit_id and permit_rule query parameters.
  • Writes take governance: GovernanceWrite | None (actor, label): insert_docs, insert_doc, upload_document and upload_document_via_uuid send it as the body's governance.
  • When these are left unset, the requests don't change: the body field is dropped as None, and the query adds nothing.

Callers can now pass these instead of overriding the private _send_request. One parametrized test covers each method, set and unset, on both clients.

Part of PRO-1122.

@kyleking-cohere
kyleking-cohere requested a review from a team as a code owner November 27, 2026 09:14
@kyleking-cohere
kyleking-cohere requested review from CelineWei-cohere and removed request for a team November 27, 2026 09:14
@cla-assistant

cla-assistant Bot commented Nov 27, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Nov 27, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@kyleking-cohere

Copy link
Copy Markdown
Author

@North-Code review

@kyleking-cohere
kyleking-cohere merged commit 5276d6a into data-governance Nov 27, 2026
5 of 6 checks passed
@kyleking-cohere

Copy link
Copy Markdown
Author

Merged on coordinator review; no review bot runs on this repo.

@kyleking-cohere
kyleking-cohere deleted the kyle/pro-1122-governance-params branch November 27, 2026 10:06
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