harn-stdlib 0.10.199

Embedded Harn standard library source catalog
Documentation
/** Generated by scripts/generate_cli_localization.mjs. Do not edit. */
import { MESSAGE_52 } from "std/cli/localization/messages/part_10"
import { MESSAGE_69 } from "std/cli/localization/messages/part_13"
import { MESSAGE_88, MESSAGE_89 } from "std/cli/localization/messages/part_17"
import { MESSAGE_91 } from "std/cli/localization/messages/part_18"
import { MESSAGE_98 } from "std/cli/localization/messages/part_19"
import { MESSAGE_105 } from "std/cli/localization/messages/part_21"
import { MESSAGE_117 } from "std/cli/localization/messages/part_23"
import { MESSAGE_141, MESSAGE_142, MESSAGE_143 } from "std/cli/localization/messages/part_28"
import { MESSAGE_150, MESSAGE_151, MESSAGE_152 } from "std/cli/localization/messages/part_30"
import { MESSAGE_155 } from "std/cli/localization/messages/part_31"
import { MESSAGE_163 } from "std/cli/localization/messages/part_32"
import { MESSAGE_208 } from "std/cli/localization/messages/part_41"
import { MESSAGE_257, MESSAGE_259 } from "std/cli/localization/messages/part_51"
import { MESSAGE_283, MESSAGE_284 } from "std/cli/localization/messages/part_56"
import { MESSAGE_287, MESSAGE_288 } from "std/cli/localization/messages/part_57"
import { MESSAGE_49 } from "std/cli/localization/messages/part_9"
import { MessageTemplate, render_message } from "std/cli/message_template"

const MESSAGES: dict<string, MessageTemplate> = {
  "  embedding save policy: {0}": MESSAGE_49,
  "  expected trainer identity: {0}": MESSAGE_52,
  "  inference catalog: {0}": MESSAGE_69,
  "  modules to save: none": MESSAGE_88,
  "  modules to save: {0}": MESSAGE_89,
  "  observed trainer identity: {0}": MESSAGE_91,
  "  probe command templates:": MESSAGE_98,
  "  prompt catalog: {0}": MESSAGE_105,
  "  required probe cases:": MESSAGE_117,
  "  tool catalog hash: {0}": MESSAGE_141,
  "  tool catalog id: {0}": MESSAGE_142,
  "  tool catalog policy: {0}": MESSAGE_143,
  "  trainer environment attestation: {0}": MESSAGE_150,
  "  trainer environment: {0} promotable={1}": MESSAGE_151,
  "  trainer identity: {0} promotable={1}": MESSAGE_152,
  "  training catalog: {0}": MESSAGE_155,
  "  weight tying policy: {0}": MESSAGE_163,
  "PEFT save notes": MESSAGE_208,
  "probe {0}": MESSAGE_257,
  "probe {0} notes": MESSAGE_259,
  "tool catalog gates": MESSAGE_283,
  "tool catalog notes": MESSAGE_284,
  "trainer environment errors": MESSAGE_287,
  "trainer identity errors": MESSAGE_288,
}

/**
 * Select a registered CLI template without interpreting argument text.
 * @effects: []
 * @errors: ["Unregistered CLI localization message", "CLI localization argument count does not match its registered template"]
 */
pub fn cli_message(locale: string, source: string, values: list<string>) -> string {
  const template = MESSAGES[source]
  guard template != nil else {
    throw "Unregistered CLI localization message"
  }
  return render_message(template, locale, values)
}