Interface IFlowGraphHostResolver
decodeEventReference?(reference: string): string | undefined;
decodeIndexReference?(
reference: string,
collection?: string,
): number | undefined;
encodeEventReference?(key: string): string;
getObjectReference?(object: object, hint?: string): string | undefined;
}
Methods
Optionaldecode Event Reference
-
Decodes an event reference produced by IFlowGraphHostResolver.encodeEventReference back into its event source key. Must return
undefinedfor values that are not event references.Parameters
- reference: string
the reference to decode
Returns string | undefined
the event source key, or
undefinedwhen the value is not an event reference - reference: string
Optionaldecode Index Reference
-
Decodes the array index denoted by a reference, for cases where a reference addresses an element of one of the host's collections. Must return
undefinedfor values the host does not recognise as an indexed reference.Parameters
- reference: string
the reference to decode
Optionalcollection: stringoptional host collection the decoded reference must address
Returns number | undefined
the index the reference denotes, or
undefinedwhen it does not denote one - reference: string
Optionalencode Event Reference
-
Encodes an event source key as the opaque reference exposed by event blocks on their
eventoutput.References must be stable: two calls with the same key must produce equal values so that equality comparisons of two
eventoutputs of the same source succeed.Parameters
- key: string
the event source key
Returns string
the reference representing the event source
- key: string
Optionalget Object Reference
-
Maps a runtime object to the reference the host addresses it by, for example the JSON Pointer of the resource a loaded object originates from.
Used when an object value is supplied to a templated path input. Returning
undefinedmeans the host cannot address the object, and the value is rejected.Parameters
- object: object
the runtime object to address
Optionalhint: stringoptional disambiguation hint, taken from the path segment preceding the template parameter being resolved. A single object may be addressable in several ways, and the hint tells the host which kind of reference the graph is asking for.
Returns string | undefined
the reference for the object, or
undefinedwhen it cannot be addressed - object: object
Lets the environment hosting a flow graph decide how runtime entities are represented as opaque reference values, so the graph engine itself stays agnostic of the host's object model.
A host (e.g. a glTF loader extension) provides an implementation through IFlowGraphCoordinatorConfiguration.hostResolver. Every member is optional; the engine falls back to a neutral built-in representation for anything the host does not provide.