KnowledgeAssessor typedef

KnowledgeAssessor = Future<KnowledgeAssessment> Function(KnowledgeAssessmentInput input, WayfinderCancellation? cancel)

Runs a Profile assessment for KnowledgeWriter.prepare, which calls it once per plan after okf's shared claim on the bundle is released, and for KnowledgeAdoption, which calls it once when planning and once for the bundle it adopted. Either gives it only what okf loaded or prepared in memory.

It returns what KnowledgeAssessmentInput.assess returns for input. The default runs that on the calling isolate. A host that must bound a Profile's rules runs it on an isolate it kills at a deadline, or when cancel, the cancellation the caller was given, is cancelled, as KnowledgeAssessmentInput.assessWithin does; whatever it throws, such as WayfinderException.cancelled, the caller throws or reports.

Implementation

typedef KnowledgeAssessor =
    Future<KnowledgeAssessment> Function(
      KnowledgeAssessmentInput input,
      WayfinderCancellation? cancel,
    );