Member Junction
    Preparing search index...

    Coordinates prompt context assembly, catalog markdown generation, and cache-preserving <mj-runtime-state> trailing message construction for BaseAgent.

    Index

    Constructors

    Methods

    • Applies auto-alignment rules to includeResponseTypeDefinition based on documentation and capability flags on params.

      Parameters

      • params: Record<string, unknown>
      • OptionalexplicitResponseType: Record<string, unknown>
      • decisionsEnabled: boolean = ...

      Returns void

    • Builds the current application context markdown section from extraData.appContext.

      Parameters

      • OptionalextraData: Record<string, unknown>

      Returns string

    • Extracts default values from an agent type's JSON Schema PromptParamsSchema.

      Parameters

      • schemaJson: string

      Returns Record<string, unknown>

    • Formats action details as compact markdown for inclusion in prompt context. Produces ~75% fewer tokens than the previous JSON format while preserving all information the LLM needs to invoke actions correctly.

      A parameter the run binds (ExecuteAgentParams.boundActionParams) is left out, so the model is never told it exists. With no bindings the output is the cached catalog's, unchanged.

      Parameters

      Returns string

    • Formats the skill CATALOG as compact markdown — name + description ONLY. This is progressive disclosure by design: the LLM sees just enough to decide whether to activate a skill (via a 'Skill' next step), but never sees Instructions until it does.

      Parameters

      Returns string

    • Resolves the three temporal placeholders (_CURRENT_DATE, _CURRENT_DAY_OF_WEEK, _CURRENT_TIME) for the trailing runtime-state fragment. Resolves only the three temporal placeholders (by name, through the same registry the template uses, so a registered override applies here too) rather than every system placeholder — this runs on every loop iteration.

      Parameters

      • promptParams: AIPromptParams
      • OptionalonError: (error: string | Error, placeholderName: string) => void

      Returns Promise<RuntimeStateDateTime>

    • Determines whether model (as served by vendor) sits behind a byte-prefix prompt cache (LLM.PrefixPromptCache), read from the model catalog's ModelConfiguration cascade — AIModelType < AIModel < AIVendor.Configuration.ModelDefaults < AIModelVendor — via AIEngine.GetEffectiveModelConfiguration. The most specific layer is the INFERENCE-PROVIDER model-vendor row for vendor, whose vendor row supplies the host-wide default that beats the model's own bag; when the vendor is unknown, or has no inference row for this model, the model and type layers still answer. False when no layer declares it, which callers treat as a block cache (replace-in-place).

      Returns boolean

    • Returns true when unrendered template text contains any volatile state marker (indicating the template still embeds volatile state directly).

      Parameters

      • templateText: string
      • markers: readonly string[] = VOLATILE_TEMPLATE_MARKERS

      Returns boolean