Skip to content

LLMAPI

Defined in: namespaces-core-plugins.ts:799

Engine-direct LLM verbs + contributor registries (fn-100). Permission is enforced at facade ingress; audit rides lifecycle events + durable usage rows (no action receipts for LLM verbs in v1).

QUIRK: the JS surface exposes providers / preprocessors / postprocessors / routers sub-objects; the Swift export flattens these to registerProvider etc. Preprocessor/postprocessor/router register are SYNCHRONOUS (in-memory binding); provider register is async (durable persistence).

fn-100

providers: object

Defined in: namespaces-core-plugins.ts:813

Provider contributor registry.

register(spec): Promise<{ id: string; }>

[llm.provider.register] — async (durable).

AnyJSONValue

Promise<{ id: string; }>

unregister(params): Promise<void>

string

Promise<void>


preprocessors: object

Defined in: namespaces-core-plugins.ts:819

Preprocessor contributor registry.

register(spec): object

[llm.preprocessor.register] — SYNC (in-memory).

AnyJSONValue

object

id: string

unregister(params): Promise<void>

string

Promise<void>


postprocessors: object

Defined in: namespaces-core-plugins.ts:825

Postprocessor contributor registry.

register(spec): object

[llm.postprocessor.register] — SYNC (in-memory).

AnyJSONValue

object

id: string

unregister(params): Promise<void>

string

Promise<void>


routers: object

Defined in: namespaces-core-plugins.ts:831

Router contributor registry.

register(params): object

[llm.router.register] — SYNC (in-memory).

AnyJSONValue

object

id: string

unregister(params): Promise<void>

string

Promise<void>

complete(params): Promise<AnyJSONValue>

Defined in: namespaces-core-plugins.ts:801

Completion. [llm.complete]

AnyJSONValue

Promise<AnyJSONValue>


stream(params): Promise<{ result: AnyJSONValue; cancel: () => void; }>

Defined in: namespaces-core-plugins.ts:803

Streaming completion — resolves to a result + cancel pair. [llm.stream]

AnyJSONValue

Promise<{ result: AnyJSONValue; cancel: () => void; }>


embed(params): Promise<number[][]>

Defined in: namespaces-core-plugins.ts:805

Embeddings. [llm.embed]

AnyJSONValue

Promise<number[][]>


vision(params): Promise<AnyJSONValue>

Defined in: namespaces-core-plugins.ts:807

Vision completion. [llm.vision]

AnyJSONValue

Promise<AnyJSONValue>


agent(params): Promise<AnyJSONValue>

Defined in: namespaces-core-plugins.ts:809

Agent loop. [llm.agent]

AnyJSONValue

Promise<AnyJSONValue>


usage(params): Promise<AnyJSONValue>

Defined in: namespaces-core-plugins.ts:811

Usage report. [llm.ledger.read]

string

AnyJSONValue

Promise<AnyJSONValue>