@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
52 lines (51 loc) • 1.99 kB
TypeScript
import type { CommitmentDefinition } from '../_base/CommitmentDefinition';
/**
* Type of commitment notice surfaced in docs and editor UI.
*
* @private internal type of commitment catalog presentation
*/
export type CommitmentNoticeMetadata = {
/**
* Machine-readable notice kind.
*/
readonly kind: 'deprecated' | 'unfinished' | 'lowLevel';
/**
* Short badge label shown in documentation and menus.
*/
readonly badgeLabel: string;
/**
* Longer label used in documentation bodies and editor details.
*/
readonly detailLabel: string;
/**
* Human-readable notice message shown in editor and documentation callouts.
*/
readonly message: string;
};
/**
* Formats preferred replacement guidance for deprecated commitments.
*
* @param replacedBy - Preferred replacement commitment keywords.
* @returns Optional replacement guidance sentence with leading space.
*
* @private internal utility of commitment catalog notices
*/
export declare function formatCommitmentReplacementText(replacedBy?: ReadonlyArray<string>): string;
/**
* Returns true when one commitment notice should be rendered with low-visibility styling.
*
* @param notice - Commitment notice metadata or null.
* @returns True for unfinished and low-level notices.
*
* @private internal utility of commitment catalog notices
*/
export declare function isLowVisibilityCommitmentNotice(notice: CommitmentNoticeMetadata | null): boolean;
/**
* Resolves the notice metadata for deprecated, unfinished, or low-level commitments.
*
* @param definition - Commitment definition to inspect.
* @returns Notice metadata when the commitment should be surfaced with caution.
*
* @private internal utility of commitment catalog notices
*/
export declare function getCommitmentNoticeMetadata(definition: Pick<CommitmentDefinition, 'deprecation'> & Partial<Pick<CommitmentDefinition, 'isUnfinished' | 'isLowLevel'>>): CommitmentNoticeMetadata | null;