Skip to content

LLMAPI

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

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:844

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:850

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:856

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:862

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:832

Completion. [llm.complete]

AnyJSONValue

Promise<AnyJSONValue>


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

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

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:836

Embeddings. [llm.embed]

AnyJSONValue

Promise<number[][]>


vision(params): Promise<AnyJSONValue>

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

Vision completion. [llm.vision]

AnyJSONValue

Promise<AnyJSONValue>


agent(params): Promise<AnyJSONValue>

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

Agent loop. [llm.agent]

AnyJSONValue

Promise<AnyJSONValue>


usage(params): Promise<AnyJSONValue>

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

Usage report. [llm.ledger.read]

string

AnyJSONValue

Promise<AnyJSONValue>