IntelligenceProvider
@totemsdk/intelligence / IntelligenceProvider
Interface: IntelligenceProvider
Provider-neutral intelligence interface.
Implementors wrap a concrete inference runtime (QVAC, remote LLM gateway, embedded model host, …). The provider is compute-only: it cannot sign, cannot move value, and must never hold private keys.
Properties
capabilities
readonlycapabilities: readonly`intelligence:${string}`[]
Domains the provider currently supports.
displayName
readonlydisplayName:string
Human-readable provider name, e.g. 'QVAC In-situ Inference'.
id
readonlyid:string
Stable provider identifier, e.g. 'qvac'.
isReady
readonlyisReady:boolean
True if the provider is connected / ready.
version
readonlyversion:string
Wrapped provider runtime version.
Methods
cancel()
cancel(
requestId):Promise<IntelligenceOutcome<void>>
Cancel an in-flight operation by request id.
Parameters
requestId
string
Returns
Promise<IntelligenceOutcome<void>>
close()
close():
Promise<void>
Release provider resources. Further invoke calls should reject.
Returns
Promise<void>
invoke()
invoke<
T>(op):Promise<IntelligenceOutcome<T>>
Execute a single inference operation.
Implementations MAY throw IntelligenceError for hard failures but should prefer returning IntelligenceErrorResult for operational failures so the caller can inspect code/retryable without try/catch.
Type Parameters
T
T = unknown
Parameters
op
Returns
Promise<IntelligenceOutcome<T>>
invokeStream()
invokeStream(
op):AsyncIterable<IntelligenceStreamChunk>
Execute a streaming inference operation.
Returns an async iterable of stream chunks. If the operation is not stream-capable, the implementation must throw NOT_IMPLEMENTED.
Parameters
op
Returns
AsyncIterable<IntelligenceStreamChunk>