Skip to content
中文

Knowledge, answering & presentation ​

Kit · Optional business libraries · Back to layer index

SymbolKindPurpose
AnswerCheckinterfaceResult of one local or review check over a generated answer.
AnswerCheckerinterfaceOne named check applied to a generated answer value.
AnswerFlowDefinitioninterfaceStatic handlers and limits; signal, diagnostics and App dependencies arrive at run.
Answeringconstant
AnswerIssueinterfaceValidation problem produced while checking a generated answer.
AnswerIteminterfaceOne unit an answer batch must produce.
AnswerReaderinterfaceApp-owned reader that gathers evidence for one task.
AnswerResultinterfaceFinal outcome for one item.
AnswerTaskDefinitioninterfaceStatic binding of one answerable task.
AnswerTaskPortsinterfaceRegistries a task catalog validates its references against.
CompiledReplyFormatinterfaceA resolved format with its checks bound; callers only inspect replies using it.
defineAnswerCheckCatalogfunctionCompile a checker catalog. A checker may return a replacement value; it is threaded into the next checker, so the selected ids behave like an ordered chain rather than independent assertions.
defineAnswerFlowfunctionCompile a reusable answer workflow. Reusable answer workflow. Requests own cells and repair budgets; models remain caller-owned. The flow runs at most maxRepairs + 1 rounds: one generation pass, then one repair round per failing item set, and finally an explicit accepted/fallback/blocked result per item.
defineAnswerReaderCatalogfunctionCompile a reader catalog.
defineAnswerTaskCatalogfunctionCompile the answer task catalog from its declarations and shared ports. Task ids, schemas, readers, outputs and checks have one compiled authority: a task can only reference a reader or check that the ports actually registered, and metadata is cloned and frozen so later mutation by the caller cannot change a registered task.
defineKnowledgeCatalogfunctionCompile a knowledge catalog from document declarations. Reads are declarative: document returns the whole text, self returns exactly the named sections and subtree includes their nested sections. Section ids are validated up front, so a typo fails at read time instead of silently returning partial content.
defineKnowledgePublicationfunctionCompile a publication lifecycle over one App-owned atomic record. Candidate preparation and publication share the same compiler and an App-owned atomic revision. propose compiles and validates a candidate but leaves published documents alone; publish re-verifies sources and the base revision before swapping, so a stale candidate can never overwrite newer content.
defineOutputCatalogfunctionCompile output definitions into one catalog. Compilation is where most mistakes surface: group membership is checked for cycles, master templates must have exactly one slot per field, and every bound/semantic field must name a registered provider. Composition then trusts the compiled catalog.
defineReplyFormatsfunctionCompile reply formats so that checks run only for templates the current turn uses.
defineSemanticSlotsfunctionModels select public semantic keys; hosts retain private values and selection policy. A text is valid when it uses at most maxOccurrences namespaced slots, every name is a declared key, and no malformed {{namespace remnant is left behind — the last check stops partial or misspelled placeholders from reaching the template engine.
defineTextTemplatefunctionThe program owns the master; inserted model text is a value and is substituted once only. Substitution is single-pass String.replace: a value that itself contains {{slot}} is left as literal text, so a slot value cannot inject further substitutions.
Knowledgeconstant
KnowledgeCandidateinterfaceA proposed document awaiting publish or reject.
KnowledgeCataloginterfaceCompiled catalog of knowledge documents.
KnowledgeCatalogOptionsinterfaceCatalog construction options.
KnowledgeDocumentinterfaceOne versioned document as supplied by the App.
KnowledgeParttypeDocument content: a text leaf or a nested section.
KnowledgePublicationinterfaceCompiled publication workflow.
knowledgePublicationOperationsconstant
KnowledgePublicationOptionsinterfaceApp-owned guards, store and limits for a publication workflow.
KnowledgePublicationRecordinterfaceStored publication state: one published revision plus pending candidates.
KnowledgePublicationStoreinterfaceSingle-writer store for the publication record.
KnowledgeReadinterfaceA request for one document selection.
KnowledgeSectioninterfaceA named section that may contain text and further sections.
KnowledgeSnapshotinterfaceMaterialized read result.
KnowledgeSourceReferenceinterfaceCitation of the material a candidate was derived from.
mergeReplyBubblesfunctionNormalize a reply that has no declared format: drop blank bubbles and merge overflow into the last allowed one. Text content is preserved.
OutputCatalogOptionsinterfaceCatalog construction options.
OutputComposeInputinterfaceInput for composing one output: model values plus program-assigned group members.
OutputDefinitioninterfaceOne output shape.
OutputFieldinterfaceOne field of an output definition.
OutputIssueinterfaceOutput problem with a guaranteed field path.
OutputProviderinterfaceApp-owned value provider for bound and semantic fields.
OutputResultinterfaceComposed output value.
parseKnowledgeDocumentfunctionPaired, nestable anchors are one text adapter. Other sources supply the same document contract directly.
Presentationconstant
ReplyFormatCheckinterfaceOne check a template declares, evaluated against the rendered bubbles.
replyFormatChecksconstant
ReplyFormatDefinitioninterfaceA template-bound reply format, matched against per-turn facts.
ReplyFormatOptionsinterfaceDeclaration input for defineReplyFormats.
resolvePreferencefunctionResolve the preferred candidate. Highest priority wins; order breaks ties with the later entry first, so recency can be encoded without touching priority. The input array is copied before sorting.
SectionSelectiontypeWhich part of a document a read returns.
selectVariantfunctionPick one variant, avoiding an immediate repeat when alternatives exist. When every candidate equals previous, the full list is used again, so a single-value set still yields a result instead of failing.
SemanticSlotDefinitioninterfaceDeclares the {{namespace:key}} slots a model may use, and how often.
TextTemplateOptionsinterfaceText template construction options.
validateAnswerBatchfunctionValidate that one batch is well formed and fully covered.

API reference, usage examples and developer guides.