Skip to main content

Classes

References

defineContract

Re-exports defineContract

ModelContract

Re-exports ModelContract

ModelImplementation

Re-exports ModelImplementation

ModelBindings

Re-exports ModelBindings

BoundModel

Re-exports BoundModel

defineModelProvider

Re-exports defineModelProvider

ModelDefinition

Re-exports ModelDefinition

ModelSpecification

Re-exports ModelSpecification

ModelEvaluation

Re-exports ModelEvaluation

ModelCall

Re-exports ModelCall

ModelProvider

Re-exports ModelProvider

ModelProviderRequest

Re-exports ModelProviderRequest

ModelSampling

Re-exports ModelSampling

ModelInvocation

Re-exports ModelInvocation

modelValues

Re-exports modelValues

ModelSemantics

Re-exports ModelSemantics

ModelSemanticRule

Re-exports ModelSemanticRule

Type Aliases

ProgramReference

Ƭ ProgramReference: Object Not exported: an exported type refers to it.

Type declaration


ModelArtifactSource

Ƭ ModelArtifactSource: Object

Type declaration


ModelArtifactSpecification

Ƭ ModelArtifactSpecification: Object

Type declaration


ModelArtifact

Ƭ ModelArtifact<T>: Object

Type parameters

Type declaration


ModelRunSummary

Ƭ ModelRunSummary: Object

Type declaration


ModelInspection

Ƭ ModelInspection: Object

Type declaration


Requirements

Ƭ Requirements: Record<string, ModelContract<any, any>> Not exported: an exported type refers to it.

Calls

Ƭ Calls<R>: { [K in keyof R]: R[K] extends ModelContract<infer I, infer O> ? Function : never } Not exported: an exported type refers to it.

Type parameters


ModelProgramItem

Ƭ ModelProgramItem<R>: Object Calls one ctx.map item makes; their keys are scoped to that item.

Type parameters

Type declaration


ModelProgramContext

Ƭ ModelProgramContext<R, P>: GenericQueryCtx<GenericDataModel> & { models: Calls<R> ; parameters: Readonly<Infer<AsObjectValidator<P>>> ; map: <T, U>(group: string, items: readonly T[], options: { key: (item: T) => string }, evaluate: (item: T, scope: ModelProgramItem<R>) => Promise<U>) => Promise<U[]> }

Type parameters


Call

Ƭ Call: Object Not exported: an exported type refers to it.

Type declaration


ModelReference

Ƭ ModelReference<Input, Output>: Object A generated capability handle. The selected release owns its implementation.

Type parameters

Type declaration


SimulationFactor

Ƭ SimulationFactor: Object

Type declaration

Variables

t

• Const t: Readonly<{ ref: <TableName>(tableName: TableName) => VId<GenericId<TableName>, "required"> = v.id; quantity: <Unit, Scale>(unit: Unit, scale: Scale) => VObject<{ unit: Unit ; amount: bigint ; scale: Scale }, { amount: VInt64<bigint, "required"> ; unit: VLiteral<Unit, "required"> ; scale: VLiteral<Scale, "required"> }, "required", "unit" | "amount" | "scale"> ; interval: () => VObject<{ kind: "interval" ; startMs: bigint ; endMs: bigint }, { kind: VLiteral<"interval", "required"> ; startMs: VInt64<bigint, "required"> ; endMs: VInt64<bigint, "required"> }, "required", "kind" | "startMs" | "endMs"> ; forecast: <V>(value: V) => VObject<Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “value” | “horizon”]: Infer<Object[Property]> }>, { kind: VLiteral<"predicted", "required"> ; horizon: VObject<{ kind: "interval" ; startMs: bigint ; endMs: bigint }, { kind: VLiteral<"interval", "required"> ; startMs: VInt64<bigint, "required"> ; endMs: VInt64<bigint, "required"> }, "required", "kind" | "startMs" | "endMs"> ; value: V }, "required", "kind" | "value" | "horizon" | `value.\{V["fieldPaths"]}\` \| ``"horizon.kind"`` \| ``"horizon.startMs"`` \| ``"horizon.endMs"``\> ; `proposal`: \<V\>(`value`: `V`) => [`VObject`](/api/classes/values.VObject)\<[`Expand`](/api/modules/server#expand)\<\{ [Property in "value"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "kind" \| "value"]: Infer\<Object[Property]\> \}\>, \{ `kind`: [`VLiteral`](/api/classes/values.VLiteral)\<``"proposed"``, ``"required"``\> ; `value`: `V` \}, ``"required"``, ``"kind"`` \| ``"value"`` \| \`value.{V[“fieldPaths”]}`> ; history: <V>(record: V) => VObject<{ observations: { key: string; record: (VNull<null, “required”> | V)[“type”]; id: string; knownAt: number; validFrom: number; }[] }, { observations: VArray<{ key: string ; record: VNull<null, "required"> | V["type"] ; id: string ; knownAt: number ; validFrom: number }[], VObject<{ key: string ; record: VNull<null, "required"> | V["type"] ; id: string ; knownAt: number ; validFrom: number }, { id: VString<string, "required"> ; key: VString<string, "required"> ; knownAt: VFloat64<number, "required"> ; validFrom: VFloat64<number, "required"> ; record: VUnion<VNull<null, "required"> | V["type"], [V, VNull<null, "required">], "required", VNull<null, "required"> | V["fieldPaths"]> }, "required", "key" | "record" | "id" | "knownAt" | "validFrom" | `record.\{(VNull\<null, "required"\> \| V)["fieldPaths"]}\`\>, ``"required"``\> \}, ``"required"``, ``"observations"``\> ; `series`: \<E, V, Grain\>(`definition`: \{ `entity`: `E` ; `value`: `V` ; `grain`: `Grain` \}) => [`VObject`](/api/classes/values.VObject)\<\{ `kind`: ``"series"`` ; `points`: [`Expand`](/api/modules/server#expand)\<\{ [Property in "value" \| "entity"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "value" \| "entity" \| "atMs"]: Infer\<Object[Property]\> \}\>[] ; `grain`: `Grain` \}, \{ `kind`: [`VLiteral`](/api/classes/values.VLiteral)\<``"series"``, ``"required"``\> ; `grain`: [`VLiteral`](/api/classes/values.VLiteral)\<`Grain`, ``"required"``\> ; `points`: [`VArray`](/api/classes/values.VArray)\<[`Expand`](/api/modules/server#expand)\<\{ [Property in "value" \| "entity"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "value" \| "entity" \| "atMs"]: Infer\<Object[Property]\> \}\>[], [`VObject`](/api/classes/values.VObject)\<[`Expand`](/api/modules/server#expand)\<\{ [Property in "value" \| "entity"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "value" \| "entity" \| "atMs"]: Infer\<Object[Property]\> \}\>, \{ `entity`: `E` = definition.entity; `atMs`: [`VInt64`](/api/classes/values.VInt64)\<`bigint`, ``"required"``\> ; `value`: `V` = definition.value \}, ``"required"``, ``"value"`` \| ``"entity"`` \| ``"atMs"`` \| \`value.{V[“fieldPaths”]}` | `entity.\{E["fieldPaths"]}\`\>, ``"required"``\> \}, ``"required"``, ``"kind"`` \| ``"points"`` \| ``"grain"``\> ; `samples`: \<V\>(`value`: `V`) => [`VObject`](/api/classes/values.VObject)\<\{ `kind`: ``"samples"`` ; `draws`: [`Expand`](/api/modules/server#expand)\<\{ [Property in "value"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "value" \| "sample"]: Infer\<Object[Property]\> \}\>[] \}, \{ `kind`: [`VLiteral`](/api/classes/values.VLiteral)\<``"samples"``, ``"required"``\> ; `draws`: [`VArray`](/api/classes/values.VArray)\<[`Expand`](/api/modules/server#expand)\<\{ [Property in "value"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "value" \| "sample"]: Infer\<Object[Property]\> \}\>[], [`VObject`](/api/classes/values.VObject)\<[`Expand`](/api/modules/server#expand)\<\{ [Property in "value"]?: Exclude\<Infer\<Object[Property]\>, undefined\> \} & \{ [Property in "value" \| "sample"]: Infer\<Object[Property]\> \}\>, \{ `sample`: [`VString`](/api/classes/values.VString)\<`string`, ``"required"``\> ; `value`: `V` \}, ``"required"``, ``"value"`` \| ``"sample"`` \| \`value.{V[“fieldPaths”]}`>, "required"> }, "required", "kind" | "draws"> ; point: (options: Partial<AppGeometryDeclaration> & { profile?: "wgs84-2d-linear-sphere-v1" }) => Validator<Point, "required", "type" | "coordinates"> ; polygon: (options: Partial<AppGeometryDeclaration> & { profile?: "wgs84-2d-linear-sphere-v1" }) => Validator<Polygon, "required", "type" | "coordinates"> ; geometry: (options: Partial<AppGeometryDeclaration> & { profile?: "wgs84-2d-linear-sphere-v1" } & { types?: readonly AppGeometryType[] }) => Validator<Geometry, "required", "type" | "coordinates"> ; position: (options: Partial<AppGeometryDeclaration> & { profile?: "wgs84-2d-linear-sphere-v1" }) => Validator<Position, "required", "point" | "accuracy_m" | "point.type" | "point.coordinates"> ; file: () => VFile<FileRef, "required"> ; fileInput: (options: FileInputOptions) => VFileInput<StagedFileRef, "required"> ; id: <TableName>(tableName: TableName) => VId<GenericId<TableName>, "required"> ; null: () => VNull<null, "required"> ; number: () => VFloat64<number, "required"> ; float64: () => VFloat64<number, "required"> ; bigint: () => VInt64<bigint, "required"> ; int64: () => VInt64<bigint, "required"> ; commitTs: () => VCommitTs<bigint | CommitTsPlaceholder, "required"> ; boolean: () => VBoolean<boolean, "required"> ; string: () => VString<string, "required"> ; bytes: () => VBytes<ArrayBuffer, "required"> ; literal: <T>(literal: T) => VLiteral<T, "required"> ; array: <T>(element: T) => VArray<T["type"][], T, "required"> ; object: <T>(fields: T) => VObject<Expand<{ [Property in string | number | symbol]?: Exclude<Infer<T[Property]>, undefined> } & { [Property in string | number | symbol]: Infer<T[Property]> }>, T, "required", { [Property in string | number | symbol]: Property | `\{Property & string}.{T[Property][“fieldPaths”]}` }[keyof T] & string> ; record: <Key, Value>(keys: Key, values: Value) => VRecord<Record<Infer<Key>, Value["type"]>, Key, Value, "required", string> ; union: <T>(…members: T) => VUnion<T[number]["type"], T, "required", T[number]["fieldPaths"]> ; any: () => VAny<any, "required", string> ; optional: <T>(value: T) => VOptional<T> ; nullable: <T>(value: T) => VUnion<T | VNull<null, "required">["type"], [T, VNull<null, "required">], "required", T | VNull<null, "required">["fieldPaths"]> }> Native validators with explicit quantities, business time and result provenance.

simulation

• Const simulation: Readonly<{ now: () => number ; uniform: (input: SimulationFactor) => number }> Addressed business randomness in the native simulation invocation stream. Equal keys share a draw, regardless of call order. Unavailable in live code.

Functions

defineModelArtifact

▸ defineModelArtifact<T>(definition): ModelArtifact<T> Small model parameters and evidence travel with the immutable program. References describe lineage; they do not confer data access or certify calibration quality.

Type parameters

Parameters

Returns

ModelArtifact<T>

restoreModelArtifact

▸ restoreModelArtifact<T>(saved, validator): ModelArtifact<T> Load a saved artifact into model code, checking both content identity and parameter shape.

Type parameters

Parameters

Returns

ModelArtifact<T>

defineModelProgram

▸ defineModelProgram<I, O, R, P>(definition): RegisteredQuery<"public", { parameters: any ; input: any ; answers: any[] }, Promise<{ state: "calls" ; calls: Call[] = batch; output?: undefined } | { calls?: undefined = batch; state: "complete" ; output: NonNullable<O> }>> Export this ordinary query, then bind its generated reference with contract.implement. Only the native executor dispatches child calls. Replaying this query performs reads only.

Type parameters

Parameters

Returns

RegisteredQuery<"public", { parameters: any ; input: any ; answers: any[] }, Promise<{ state: "calls" ; calls: Call[] = batch; output?: undefined } | { calls?: undefined = batch; state: "complete" ; output: NonNullable<O> }>>

makeModelReference

▸ makeModelReference<Input, Output>(name, input, output): ModelReference<Input, Output> Construct a data-only handle from admitted application signatures. Used by generated bindings.

Type parameters

Parameters

Returns

ModelReference<Input, Output>