bothy-sdk
    Preparing search index...

    Function renderContext

    • Renders a run context with trust marks for the runtime.

      Context messages appear with channel_context first and thread_context second, each in ascending thread_seq. A message with mark trigger, authorized, self or system stands inline; any other mark (unverified or a value this SDK does not know) puts its content and the transcripts of its attachments into data blocks. Every text of fileTexts stands in a data block, also for a file the triggering person uploaded, because a document can carry instructions that are not that person's (T-AI-03). An attachment without a text is listed by name, MIME type and size.

      Parameters

      • ctx: {}

        The context as getRunContext returned it.

      • options: RenderContextOptions = {}

        fileTexts and, for tests only, a fixed boundary.

      Returns RenderedContext

      The system part and the trigger part.

      RangeError when boundary is not 16 lowercase hexadecimal characters.

      const { system, trigger } = renderContext(ctx, { fileTexts: { [fileId]: extracted } });