Share
shareCreate a one-time invite link that lets a named person search this knowledge corpus. Preview what would be exposed first, then confirm to register the owner and start the background upload.
Instructions
SHARE this knowledge base with someone — returns a link to send them.
Reach for this when the user says share my KB / send my knowledge base to X / let X search what I've read. It hands back one link. The person who opens it can install Opyt if they need to, and after that their assistant can search this corpus, with every result attributed here.
TWO-PHASE, and the preview is the consent step, so run it first: • confirm=False (the default) → a PREVIEW. It publishes nothing, mints nothing and hands nobody anything; on an install that has already shared it asks the service whether an export has landed, and that is the only thing it sends. It reports WHAT would be shared — how many atoms, from which sources and authors, over what date span — and what sharing means. READ THAT BACK to the user before confirming. Sharing is the WHOLE knowledge base, standing, not a slice and not a snapshot: there is no way to share part of it, anyone given a link keeps access until it is revoked, and the copy refreshes itself when people read it. • confirm=True → registers this install with the service if it is not registered yet, starts the first upload, mints a one-time invite, and returns the link.
Skip straight to confirm=True only when the user has already said yes to sharing THIS knowledge base, having been told what is in it.
The first share uploads the whole corpus, which runs in the background and usually takes a minute or two. The link works immediately: a reader who accepts inside that window is registered normally, and it is their first SEARCH that comes back saying the copy is still arriving. The next one works. Later shares are instant.
WHAT THIS IS NOT. It does not publish anything on the open web — the service serves only people holding a link, one reader token per link, revocable. It does not send anything to the person for you: hand the user the link and let them send it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_name | No | what to call this knowledge base's owner. This is what every recipient's install suggests as the name they search under, so use the user's own name or handle. Required on the FIRST share; ignored afterwards, because the name is already registered. | |
| confirm | No | False (default) = preview only, nothing written or sent; True = register, publish and mint the invite. | |
| for_whom | No | an optional label for who this particular invite is for ("Leo"). It is the handle that makes that person nameable afterwards: `unshare(reader="Leo")` cuts off exactly them. Without it they can only be named by a token id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||