@sema-agent/core
Version:
Stateless, task-oriented AI agent core
58 lines (57 loc) • 2.02 kB
TypeScript
export interface ExplainInput {
constitution: "core" | "replaced" | "provider-assembled";
blocks: Array<{
id: string;
chars: number;
hash: string;
}>;
sections?: Array<{
id: string;
slot: string;
carrier: string;
cadence: string;
cacheClass: string;
chars: number;
hash: string;
contentHash?: string;
}>;
tools?: Array<{
wireName: string;
contractId: string;
cardId: string;
shapeDigest: string;
}>;
epoch?: {
epoch: number;
artifactDigest: string;
packId: string;
activatedBy: string;
};
}
/** Render a `prompt.assembled` manifest (+ optional epoch pin) as a readable report. */
export declare function explainPromptAssembly(input: ExplainInput): string;
/**
* the CENTER-facing read-only description of the default pack: section
* metadata (id/slot/rank/ownership/locked) plus the default role-base TEXT (the append-mode
* compile skeleton the web UI prepends to a user's "Role details"). Deliberately NO other section
* texts (the no-prompt-bodies observability line — structure yes, prose no; the role base is
* the one deliberate exception: it is the public compile input of the append mode, and its text is
* this open repo's DEFAULT_SYSTEM_PROMPT). Programmatic — a static copy in the web tier would
* silently drift the moment core's default prompt changes (no static copies).
*/
export interface DefaultPackDescription {
packId: string;
/** The pack-default role base (append-mode skeleton). */
roleBaseText: string;
sections: Array<{
id: string;
slot: string;
rank: number;
owner: string;
trust: string;
mutability: string;
/** True ⇒ not deployment-writable (the UI shows the platform-managed indicator, never an editor). */
locked: boolean;
}>;
}
export declare function describeDefaultPack(): DefaultPackDescription;