TroveClient
A scoped client over the calling user’s own Trove knowledge base.
Present on ToolContext.trove only when the manifest scopes
granted it (trove:search for reads, trove:ingest for writes); otherwise
ctx.trove is undefined.
Methods
Section titled “Methods”getDocument()
Section titled “getDocument()”getDocument(id: string): Promise<TroveDocument>;Fetch a full document by id. Requires trove:search.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
id | string |
Returns
Section titled “Returns”Promise<TroveDocument>
ingest()
Section titled “ingest()”ingest(docs: TroveIngestDoc[]): Promise<TroveIngestResult>;Write documents into the knowledge base. Requires trove:ingest.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
docs | TroveIngestDoc[] |
Returns
Section titled “Returns”Promise<TroveIngestResult>
search()
Section titled “search()”search(query: string, opts?: TroveSearchOpts): Promise<TroveSearchResult[]>;Semantic search over the user’s knowledge base. Requires trove:search.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
query | string |
opts? | TroveSearchOpts |
Returns
Section titled “Returns”Promise<TroveSearchResult[]>