UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

61 lines (60 loc) • 4.54 kB
/** * The reference's prompt-trait declaration per model id, and the lookup that finds an id's row (through the one reading of * a Claude model id, `claude-model-id.ts`). * * DATA, NOT MECHANISM (the model-presets.ts stance): the engine never reads a model id to choose prompt text — its * model door reads `Model.promptTraits` and nothing else. This module is for whoever MINTS a `Model`: a host copies * a row into the model it builds (`fable5Model()` does), or leaves the key out when the id is not one it recognizes, * and the model receives the undeclared default (`lean_prompt`). Nothing on the assembly path imports this module * (pinned: test/backlog4297-s1-reference-presets.test.ts). * * A row is the reference registry's capabilities for that id, kept to the names this engine carries, plus the words * the reference lights by id rather than by capability (the identity and research-note stand-ins, `read_before_edit` on the * reference's ten older ids, and the reference's hard-coded `fable_5_mitigations` for `claude-mythos-5`), plus * `lean_prompt` — which every row holds: the newest * models declare it, and the older ones the reference serves its classic shape keep the lean one here (that classic * shape's sections are not carried). gate:prompt-trait-anchor derives every row from the anchor corpus and reds on * any difference not declared in scripts/prompt-trait-anchor.json. */ import type { PromptTraitName } from "../prompt-assembly/catalog/schema.js"; /** One row per model id the reference knows: its registry entries and its three registry-less older ids. */ export declare const REFERENCE_MODEL_PROMPT_TRAITS: Readonly<{ "claude-3-5-haiku": readonly ["lean_prompt", "read_before_edit"]; "claude-haiku-4-5": readonly ["lean_prompt", "read_before_edit"]; "claude-haiku-5-5": readonly ["lean_prompt", "haiku_5_5_early_stopping_guidance"]; "claude-3-5-sonnet": readonly ["lean_prompt", "read_before_edit"]; "claude-3-7-sonnet": readonly ["lean_prompt", "read_before_edit"]; "claude-sonnet-4-0": readonly ["lean_prompt", "read_before_edit"]; "claude-sonnet-4-5": readonly ["lean_prompt", "read_before_edit"]; "claude-sonnet-4-6": readonly ["lean_prompt"]; "claude-sonnet-5": readonly ["lean_prompt"]; "claude-sonnet-5-5": readonly ["lean_prompt", "silent_turn_reminder"]; "claude-opus-4-0": readonly ["lean_prompt", "read_before_edit"]; "claude-opus-4-1": readonly ["lean_prompt", "read_before_edit"]; "claude-opus-4-5": readonly ["lean_prompt", "read_before_edit"]; "claude-opus-4-6": readonly ["lean_prompt", "read_before_edit"]; "claude-opus-4-7": readonly ["lean_prompt"]; "claude-opus-4-8": readonly ["lean_prompt"]; "claude-opus-5": readonly ["lean_prompt", "opus_5_prompt_bundle"]; "claude-opus-5-5": readonly ["lean_prompt", "opus_5_5_prompt_bundle"]; "claude-fable-5": readonly ["lean_prompt", "fable_5_mitigations", "fable_identity_5"]; "claude-fable-5-1": readonly ["lean_prompt", "fable_5_mitigations", "fable_5_1_prompt_bundle", "fable_identity_5_1"]; "claude-fable-5-2": readonly ["lean_prompt", "fable_5_2_prompt_bundle", "fable_identity_5_2", "llm_rnd_capabilities"]; "claude-mythos-5": readonly ["lean_prompt", "fable_5_mitigations"]; "claude-mythos-5-1": readonly ["lean_prompt", "fable_5_mitigations", "fable_5_1_prompt_bundle"]; "claude-mythos-5-2": readonly ["lean_prompt", "fable_5_2_prompt_bundle", "llm_rnd_capabilities"]; "claude-3-opus": readonly ["lean_prompt"]; "claude-3-sonnet": readonly ["lean_prompt"]; "claude-3-haiku": readonly ["lean_prompt"]; }>; /** A model id the reference preset table has a row for. */ export type ReferenceModelId = keyof typeof REFERENCE_MODEL_PROMPT_TRAITS; /** * The preset row an id names: parsed ({@link parseClaudeModelId}, `claude-model-id.ts`), then matched by * {@link sameParsedClaudeModel} — family, spelling and version, a missing minor reading as 0 — so `claude-opus-5-0`, * `claude-opus-5@20260101` and `us.anthropic.claude-opus-5-v1:0` all name `claude-opus-5`. An id no row matches ⇒ `undefined`. */ export declare function referenceModelIdOf(id: string): ReferenceModelId | undefined; /** The reference's prompt-trait declaration for an id ({@link referenceModelIdOf}), or `undefined` for an id the table * has no row for — which a host mints as "no `promptTraits`", the undeclared default. */ export declare function referencePromptTraitsOf(id: string): readonly PromptTraitName[] | undefined;