UNPKG

@agentled/cli

Version:

CLI for Agentled — manage workflows, apps, and knowledge from the command line. Zero context-window cost for AI agents.

38 lines (37 loc) 1.7 kB
/** * Context / input-page field schema catalog. * * Canonical source: `ExecutionInputFieldType` enum + `ExecutionInputField` * interface in `shared/types/pipeline/PipelineTypes.ts`. This file is the * CLI-distributable mirror — drift is guarded by * `agentled-mcp-server/__tests__/context-field-types.test.ts`. * * Why a mirror and not an import: the CLI is published to npm and can't * pull in the whole frontend build graph at install time. The drift test * fails CI if this file disagrees with the enum, so it cannot rot silently. */ export interface ContextFieldTypeDoc { /** Wire value — what an agent writes into `field.type`. */ value: string; /** One-line description of what the UI renders. */ description: string; /** Extra config keys the type reads beyond the base set. */ extraKeys?: string[]; /** Tiny example fragment for the quick-start. */ example?: Record<string, unknown>; } /** * Base keys every field supports regardless of `type`. */ export declare const BASE_FIELD_KEYS: readonly ["name", "label", "type", "description", "placeholder", "required", "defaultValue", "suggestions", "addSeparatorAfter"]; export declare const CONTEXT_FIELD_TYPES: ContextFieldTypeDoc[]; export declare const VALID_CONTEXT_FIELD_TYPE_VALUES: Set<string>; /** * Aliases the runtime accepts but the canonical name should be used going forward. * Keyed by the alias, value is the canonical name. */ export declare const CONTEXT_FIELD_TYPE_ALIASES: Record<string, string>; /** * Heuristic "did you mean" for the most common invented / typo'd field types. */ export declare function suggestContextFieldTypeFix(invalid: string): string | undefined;