messages

package
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package messages centralizes user-facing text used by the CLI and workflows.

Index

Constants

View Source
const (
	// RootUse is the CLI command name.
	RootUse = "al"
	// RootShort is the short description for the root command.
	RootShort             = "Agent Layer CLI"
	RootVersionFlag       = "Print version and exit"
	RootMissingAgentLayer = "Agent Layer isn't initialized in this repository (missing .agent-layer). Run `al init` to initialize."

	// VersionCommitFmt formats the commit hash for version display.
	VersionCommitFmt  = "commit %s"
	VersionBuildFmt   = "built %s"
	VersionFullFmt    = "%s (%s)"
	VersionTemplate   = "{{.Version}}\n"
	VersionRequired   = "version is required"
	VersionInvalidFmt = "version %q must be in the form vX.Y.Z or X.Y.Z"

	// InitUse is the init command name.
	InitUse   = "init"
	InitShort = "Initialize Agent Layer in this repository"

	InitOverwriteRequiresTerminal = "init overwrite prompts require an interactive terminal; re-run with --force to overwrite without prompts"
	InitOverwritePromptFmt        = "Overwrite %s with the template version?"
	InitOverwriteAllPrompt        = "Overwrite all existing managed files with template versions?"
	InitDeleteUnknownAllPrompt    = "Delete all unknown files under .agent-layer?"
	InitDeleteUnknownPromptFmt    = "Delete %s?"
	InitRunWizardPrompt           = "Run the setup wizard now? (recommended)"

	InitFlagOverwrite = "Prompt before overwriting existing template files"
	InitFlagForce     = "Overwrite existing template files and delete unknown files under .agent-layer without prompting (implies --overwrite)"
	InitFlagNoWizard  = "Skip prompting to run the setup wizard after init"
	InitFlagVersion   = "Pin the repo to a specific Agent Layer version (vX.Y.Z or X.Y.Z)"

	InitWarnUpdateCheckFailedFmt = "Warning: failed to check for updates: %v\n"
	InitWarnDevBuildFmt          = "Warning: running dev build; latest release is %s\n"
	InitWarnUpdateAvailableFmt   = "Warning: update available: %s (current %s)\n"

	// CompletionUse is the completion command usage.
	CompletionUse                 = "completion [bash|zsh|fish]"
	CompletionShort               = "Generate shell completion scripts"
	CompletionInstall             = "Install the completion script for the specified shell"
	CompletionUnsupportedShellFmt = "unsupported shell %q (supported: bash, zsh, fish)"

	CompletionCreateDirErrFmt   = "create completion dir: %w"
	CompletionWriteFileErrFmt   = "write completion file: %w"
	CompletionInstalledFmt      = "Installed %s completion to %s\n"
	CompletionBashNote          = "Bash completion requires bash-completion to be enabled in your shell."
	CompletionFishNote          = "Restart fish or open a new terminal to enable completions."
	CompletionZshNoteFmt        = "Add this to your .zshrc before compinit:\n  fpath=(%s $fpath)"
	CompletionResolveHomeErrFmt = "resolve home dir: %w"

	// PromptYesDefaultFmt formats yes/no prompts with yes as default.
	PromptYesDefaultFmt   = "%s [Y/n]: "
	PromptNoDefaultFmt    = "%s [y/N]: "
	PromptInvalidResponse = "invalid response %q"
	PromptRetryYesNo      = "Please enter y or n."

	// WizardUse is the wizard command name.
	WizardUse              = "wizard"
	WizardShort            = "Interactive setup wizard"
	WizardLong             = "Run the interactive setup wizard for this repository."
	WizardRequiresTerminal = "Wizard requires an interactive terminal."

	// GeminiUse is the gemini command name.
	GeminiUse   = "gemini"
	GeminiShort = "Sync and launch Gemini CLI"

	ClaudeUse   = "claude"
	ClaudeShort = "Sync and launch Claude Code CLI"

	CodexUse   = "codex"
	CodexShort = "Sync and launch Codex CLI"

	VSCodeUse   = "vscode"
	VSCodeShort = "Sync and launch VS Code with CODEX_HOME configured"

	AntigravityUse   = "antigravity"
	AntigravityShort = "Sync and launch Antigravity"

	// ClientsGeminiExitErrorFmt formats gemini exit errors.
	ClientsGeminiExitErrorFmt      = "gemini exited with error: %w"
	ClientsClaudeExitErrorFmt      = "claude exited with error: %w"
	ClientsCodexExitErrorFmt       = "codex exited with error: %w"
	ClientsAntigravityExitErrorFmt = "antigravity exited with error: %w"
	ClientsVSCodeExitErrorFmt      = "vscode exited with error: %w"
	ClientsCodexHomeWarningFmt     = "Warning: CODEX_HOME is set to %s; expected %s\n"

	// StubShortFmt formats stub command descriptions.
	StubShortFmt          = "%s (not implemented yet)"
	StubNotImplementedFmt = "%s is not implemented in this phase"

	// McpPromptsUse is the mcp-prompts command name.
	McpPromptsUse   = "mcp-prompts"
	McpPromptsShort = "Run the internal MCP prompt server over stdio"
)

CLI messages for user-facing commands and prompts.

View Source
const (
	// ConfigMissingFileFmt formats missing config file errors.
	ConfigMissingFileFmt        = "missing config file %s: %w"
	ConfigFailedReadTemplateFmt = "failed to read template config.toml: %w"
	ConfigMissingEnvFileFmt     = "missing env file %s: %w"
	ConfigInvalidEnvFileFmt     = "invalid env file %s: %w"
	ConfigInvalidConfigFmt      = "invalid config %s: %w"

	ConfigMissingCommandsAllowlistFmt    = "missing commands allowlist %s: %w"
	ConfigFailedReadCommandsAllowlistFmt = "failed to read commands allowlist %s: %w"

	ConfigApprovalsModeInvalidFmt       = "%s: approvals.mode must be one of all, mcp, commands, none"
	ConfigGeminiEnabledRequiredFmt      = "%s: agents.gemini.enabled is required"
	ConfigClaudeEnabledRequiredFmt      = "%s: agents.claude.enabled is required"
	ConfigCodexEnabledRequiredFmt       = "%s: agents.codex.enabled is required"
	ConfigVSCodeEnabledRequiredFmt      = "%s: agents.vscode.enabled is required"
	ConfigAntigravityEnabledRequiredFmt = "%s: agents.antigravity.enabled is required"
	ConfigMcpServerIDRequiredFmt        = "%s: mcp.servers[%d].id is required"
	ConfigMcpServerIDReservedFmt        = "%s: mcp.servers[%d].id is reserved for the internal prompt server"
	ConfigMcpServerEnabledRequiredFmt   = "%s: mcp.servers[%d].enabled is required"
	ConfigMcpServerURLRequiredFmt       = "%s: mcp.servers[%d].url is required for http transport"
	ConfigMcpServerCommandNotAllowedFmt = "%s: mcp.servers[%d].command/args are not allowed for http transport"
	ConfigMcpServerEnvNotAllowedFmt     = "%s: mcp.servers[%d].env is not allowed for http transport"
	ConfigMcpServerCommandRequiredFmt   = "%s: mcp.servers[%d].command is required for stdio transport"
	ConfigMcpServerURLNotAllowedFmt     = "%s: mcp.servers[%d].url is not allowed for stdio transport"
	ConfigMcpServerHeadersNotAllowedFmt = "%s: mcp.servers[%d].headers are not allowed for stdio transport"
	ConfigMcpServerTransportInvalidFmt  = "%s: mcp.servers[%d].transport must be http or stdio"
	ConfigMcpServerClientInvalidFmt     = "%s: mcp.servers[%d].clients contains invalid client %q"
	ConfigWarningThresholdInvalidFmt    = "%s: %s must be greater than zero"

	ConfigMissingSlashCommandsDirFmt          = "missing slash commands directory %s: %w"
	ConfigFailedReadSlashCommandFmt           = "failed to read slash command %s: %w"
	ConfigInvalidSlashCommandFmt              = "invalid slash command %s: %w"
	ConfigSlashCommandMissingContent          = "missing content"
	ConfigSlashCommandMissingFrontMatter      = "missing front matter"
	ConfigSlashCommandUnterminatedFrontMatter = "unterminated front matter"
	ConfigSlashCommandFailedReadContentFmt    = "failed to read content: %w"
	ConfigSlashCommandDescriptionEmpty        = "description is empty"
	ConfigSlashCommandMissingDescription      = "missing description in front matter"

	ConfigMissingInstructionsDirFmt = "missing instructions directory %s: %w"
	ConfigNoInstructionFilesFmt     = "no instruction files found in %s"
	ConfigFailedReadInstructionFmt  = "failed to read instruction %s: %w"

	ConfigMissingEnvVarsFmt = "missing environment variables: %s"
)

Config messages for configuration loading and validation.

View Source
const (
	// DoctorUse is the doctor command name.
	DoctorUse   = "doctor"
	DoctorShort = "Check for missing secrets, disabled servers, and common misconfigurations"

	DoctorHealthCheckFmt = "🏥 Checking Agent Layer health in %s...\n\n"

	DoctorCheckNameStructure = "Structure"
	DoctorCheckNameConfig    = "Config"
	DoctorCheckNameSecrets   = "Secrets"
	DoctorCheckNameAgents    = "Agents"
	DoctorCheckNameUpdate    = "Update"

	DoctorMissingRequiredDirFmt       = "Missing required directory: %s"
	DoctorMissingRequiredDirRecommend = "Run `al init` to initialize this repository."
	DoctorPathNotDirFmt               = "%s exists but is not a directory"
	DoctorPathNotDirRecommend         = "Ensure the path is a directory, or re-run `al init`."
	DoctorDirExistsFmt                = "Directory exists: %s"

	DoctorConfigLoadFailedFmt = "Failed to load configuration: %v"
	DoctorConfigLoadRecommend = "Check .agent-layer/config.toml for syntax errors."
	DoctorConfigLoaded        = "Configuration loaded successfully"

	DoctorMissingSecretFmt          = "Missing secret: %s"
	DoctorMissingSecretRecommendFmt = "Add %s to .agent-layer/.env or your environment."
	DoctorSecretFoundEnvFmt         = "Secret found in environment: %s"
	DoctorSecretFoundEnvFileFmt     = "Secret found in .agent-layer/.env: %s"
	DoctorNoRequiredSecrets         = "No required secrets found in configuration."

	DoctorAgentEnabledFmt  = "Agent enabled: %s"
	DoctorAgentDisabledFmt = "Agent disabled: %s"

	DoctorUpdateSkippedFmt          = "Update check skipped because %s is set"
	DoctorUpdateSkippedRecommendFmt = "Unset %s to check for updates."
	DoctorUpdateFailedFmt           = "Failed to check for updates: %v"
	DoctorUpdateFailedRecommend     = "Verify network access and try again."
	DoctorUpdateDevBuildFmt         = "Running dev build; latest release is %s"
	DoctorUpdateDevBuildRecommend   = "Install a release build to use version pinning and dispatch."
	DoctorUpdateAvailableFmt        = "Update available: %s (current %s)"
	DoctorUpdateAvailableRecommend  = "Upgrade the global CLI or update your repo pin if needed."
	DoctorUpToDateFmt               = "Agent Layer is up to date (%s)"

	DoctorWarningSystemHeader        = "\n🔍 Running warning checks..."
	DoctorInstructionsCheckFailedFmt = "Failed to check instructions: %v"
	DoctorMCPCheckFailedFmt          = "Failed to check MCP servers: %v"
	DoctorFailureSummary             = "❌ Some checks failed or triggered warnings. Please address the items above."
	DoctorFailureError               = "doctor checks failed"
	DoctorSuccessSummary             = "✅ All systems go. Agent Layer is ready."

	DoctorStatusOKLabel     = "[OK]  "
	DoctorStatusWarnLabel   = "[WARN]"
	DoctorStatusFailLabel   = "[FAIL]"
	DoctorResultLineFmt     = "%s %-10s %s\n"
	DoctorRecommendationFmt = "       💡 %s\n"
)

Doctor messages for the doctor command.

View Source
const (
	// InstallRootRequired indicates root path is required for install.
	InstallRootRequired = "root path is required"
	// InstallOverwritePromptRequired indicates overwrite prompts need a handler.
	InstallOverwritePromptRequired     = "overwrite prompts require a prompt handler; re-run with --force to overwrite without prompts"
	InstallInvalidPinVersionFmt        = "invalid pin version: %w"
	InstallCreateDirFailedFmt          = "failed to create directory %s: %w"
	InstallExistingPinFileEmptyFmt     = "existing pin file %s is empty"
	InstallFailedReadFmt               = "failed to read %s: %w"
	InstallFailedReadTemplateFmt       = "failed to read template %s: %w"
	InstallFailedCreateDirForFmt       = "failed to create directory for %s: %w"
	InstallFailedWriteFmt              = "failed to write %s: %w"
	InstallFailedStatFmt               = "failed to stat %s: %w"
	InstallFailedReadGitignoreBlockFmt = "failed to read gitignore block %s: %w"
	InstallUnexpectedTemplatePathFmt   = "unexpected template path %s"
	InstallDiffHeader                  = "Found existing files that differ from the templates:"
	InstallDiffLineFmt                 = "  - %s\n"
	InstallDiffFooter                  = "Re-run `al init --overwrite` to review each file, or `al init --force` to replace them without prompts."
	InstallUnknownHeader               = "Found files in .agent-layer not tracked by Agent Layer:"
	InstallUnknownFooter               = "Re-run `al init --overwrite` to review deleting them, or `al init --force` to delete them without prompts."
	InstallDeleteUnknownPromptRequired = "delete prompts require a prompt handler; re-run with --force to delete unknown files without prompts"
	InstallDeleteUnknownFailedFmt      = "failed to delete %s: %w"

	// UpdateCreateRequestErrFmt formats request creation errors.
	UpdateCreateRequestErrFmt         = "create latest release request: %w"
	UpdateFetchLatestReleaseErrFmt    = "fetch latest release: %w"
	UpdateFetchLatestReleaseStatusFmt = "fetch latest release: unexpected status %s"
	UpdateDecodeLatestReleaseErrFmt   = "decode latest release: %w"
	UpdateLatestReleaseMissingTag     = "latest release missing tag_name"
	UpdateInvalidLatestReleaseTagFmt  = "invalid latest release tag %q: %w"
	UpdateInvalidCurrentVersionFmt    = "invalid current version %q: %w"
	UpdateInvalidVersionFmt           = "invalid version %q"
	UpdateInvalidVersionSegmentFmt    = "invalid version segment %q: %w"
)

Install and update messages.

View Source
const (
	// SyncUse is the sync command name.
	SyncUse                                      = "sync"
	SyncShort                                    = "Regenerate client outputs from .agent-layer"
	SyncCompletedWithWarnings                    = "sync completed with warnings"
	SyncAgentEnabledFlagMissingFmt               = "agent %s is missing enabled flag in config"
	SyncAgentDisabledFmt                         = "agent %s is disabled in config"
	SyncMarshalMCPConfigFailedFmt                = "failed to marshal mcp config: %w"
	SyncCreateDirFailedFmt                       = "failed to create %s: %w"
	SyncWriteFileFailedFmt                       = "failed to write %s: %w"
	SyncMarshalClaudeSettingsFailedFmt           = "failed to marshal claude settings: %w"
	SyncMarshalGeminiSettingsFailedFmt           = "failed to marshal gemini settings: %w"
	SyncMarshalVSCodeSettingsFailedFmt           = "failed to marshal vscode settings: %w"
	SyncMarshalVSCodeMCPConfigFailedFmt          = "failed to marshal vscode mcp config: %w"
	SyncMissingPromptServerNoRoot                = "al not found on PATH and no repo root available for go run"
	SyncMissingPromptServerSourceFmt             = "missing prompt server source at %s"
	SyncCheckPathFmt                             = "check %s: %w"
	SyncPromptServerNotDirFmt                    = "prompt server source path %s is not a directory"
	SyncMissingGoForPromptServerFmt              = "missing go on PATH for prompt server: %w"
	SyncReadFailedFmt                            = "failed to read %s: %w"
	SyncRemoveFailedFmt                          = "failed to remove %s: %w"
	SyncMCPServerErrorFmt                        = "mcp server %s: %w"
	SyncMCPServerArgFailedFmt                    = "mcp server %s arg: %w"
	SyncCodexUnsupportedHeaderFmt                = "unsupported header %s for codex http server"
	SyncCodexAuthorizationBearerRequired         = "authorization header must use Bearer token"
	SyncCodexAuthorizationEnvPlaceholderRequired = "authorization header must use env var placeholder"

	MCPServerURLFmt                  = "mcp server %s url: %w"
	MCPServerHeaderFmt               = "mcp server %s header %s: %w"
	MCPServerCommandFmt              = "mcp server %s command: %w"
	MCPServerArgFmt                  = "mcp server %s arg %s: %w"
	MCPServerEnvFmt                  = "mcp server %s env %s: %w"
	MCPServerUnsupportedTransportFmt = "mcp server %s: unsupported transport %s"
)

Sync messages for the sync command.

View Source
const (
	// DispatchErrDispatched indicates dispatch was executed.
	DispatchErrDispatched = "dispatch executed"
	// DispatchMissingArgv0 indicates argv[0] is missing.
	DispatchMissingArgv0            = "missing argv[0]"
	DispatchWorkingDirRequired      = "working directory is required"
	DispatchExitHandlerRequired     = "exit handler is required"
	DispatchAlreadyActiveFmt        = "version dispatch already active (current %s, requested %s)"
	DispatchDevVersionNotAllowedFmt = "cannot dispatch to dev version; set %s to a release version"
	DispatchInvalidBuildVersionFmt  = "invalid build version %q: %w"
	DispatchInvalidEnvVersionFmt    = "invalid %s: %w"
	DispatchResolveUserCacheDirFmt  = "resolve user cache dir: %w"

	DispatchCheckCachedBinaryFmt        = "check cached binary %s: %w"
	DispatchVersionNotCachedFmt         = "version %s is not cached (expected at %s); network access disabled via %s"
	DispatchCreateCacheDirFmt           = "create cache dir: %w"
	DispatchCreateTempFileFmt           = "create temp file: %w"
	DispatchSyncTempFileFmt             = "sync temp file: %w"
	DispatchCloseTempFileFmt            = "close temp file: %w"
	DispatchChmodCachedBinaryFmt        = "chmod cached binary: %w"
	DispatchMoveCachedBinaryFmt         = "move cached binary into place: %w"
	DispatchUnsupportedOSFmt            = "unsupported OS %q"
	DispatchUnsupportedArchFmt          = "unsupported architecture %q"
	DispatchDownloadFailedFmt           = "download %s: %w"
	DispatchDownloadUnexpectedStatusFmt = "download %s: unexpected status %s"
	DispatchReadFailedFmt               = "read %s: %w"
	DispatchChecksumNotFoundFmt         = "checksum for %s not found in %s"
	DispatchOpenFileFmt                 = "open %s: %w"
	DispatchHashFileFmt                 = "hash %s: %w"
	DispatchChecksumMismatchFmt         = "checksum mismatch for %s (expected %s, got %s)"

	DispatchOpenLockFmt             = "open lock %s: %w"
	DispatchLockFmt                 = "lock %s: %w"
	DispatchReadPinFailedFmt        = "read %s: %w"
	DispatchPinFileEmptyFmt         = "pin file %s is empty"
	DispatchInvalidPinnedVersionFmt = "invalid pinned version in %s: %w"

	// RootStartPathRequired indicates start path is required for root resolution.
	RootStartPathRequired   = "start path is required"
	RootResolvePathFmt      = "resolve path %s: %w"
	RootPathNotDirFmt       = "%s exists but is not a directory"
	RootCheckPathFmt        = "check %s: %w"
	RootPathNotDirOrFileFmt = "%s exists but is not a directory or file"

	// RunRootPathRequired indicates root path is required for run metadata.
	RunRootPathRequired    = "root path is required"
	RunGenerateIDFailedFmt = "failed to generate run id: %w"
	RunCreateDirFailedFmt  = "failed to create run dir %s: %w"

	// EnvfileLineErrorFmt formats envfile line errors.
	EnvfileLineErrorFmt     = "line %d: %w"
	EnvfileReadFailedFmt    = "failed to read env content: %w"
	EnvfileExpectedKeyValue = "expected KEY=VALUE"

	// FsutilCreateTempFileFmt formats temp file creation errors.
	FsutilCreateTempFileFmt = "create temp file for %s: %w"
	FsutilSetPermissionsFmt = "set permissions for %s: %w"
	FsutilWriteTempFileFmt  = "write temp file for %s: %w"
	FsutilSyncTempFileFmt   = "sync temp file for %s: %w"
	FsutilCloseTempFileFmt  = "close temp file for %s: %w"
	FsutilRenameTempFileFmt = "rename temp file for %s: %w"
	FsutilOpenDirFmt        = "open dir %s: %w"
	FsutilSyncDirFmt        = "sync dir %s: %w"

	// WarningsResolveConfigFailedFmt formats config resolution failures.
	WarningsResolveConfigFailedFmt   = "Failed to resolve configuration: %v"
	WarningsResolveConfigFix         = "Correct URL/command/auth or environment variables."
	WarningsTooManyServersFmt        = "enabled server count > %d (%d > %d)"
	WarningsTooManyServersFix        = "disable rarely used servers; consolidate."
	WarningsMCPConnectFailedFmt      = "cannot connect, initialize, or list tools: %v"
	WarningsMCPConnectFix            = "correct URL/command/auth; or disable the server."
	WarningsMCPServerTooManyToolsFmt = "server has > %d tools (%d > %d)"
	WarningsMCPServerTooManyToolsFix = "split the server by domain or reduce exported tools."
	WarningsMCPSchemaBloatServerFmt  = "estimated tokens for tool definitions > %d (%d > %d)"
	WarningsMCPSchemaBloatFix        = "reduce schema verbosity; shorten descriptions; remove huge enums/oneOf; reduce tools."
	WarningsMCPTooManyToolsTotalFmt  = "total discovered tools > %d (%d > %d)"
	WarningsMCPTooManyToolsTotalFix  = "disable servers; reduce tool surface."
	WarningsMCPSchemaBloatTotalFmt   = "estimated tokens for all tool definitions > %d (%d > %d)"
	WarningsMCPToolNameCollisionFmt  = "same tool name appears in more than one server: %v"
	WarningsMCPToolNameCollisionFix  = "namespace tool names per server (recommended pattern: <server>__<action>)."
	WarningsInstructionsTooLargeFmt  = "estimated tokens of the combined instruction payload > %d (%d > %d)"
	WarningsInstructionsTooLargeFix  = "reduce always-on instructions; move reference material into docs/ and link to it; remove repetition."

	WarningsUnsupportedTransportFmt = "unsupported transport: %s"
	WarningsConnectionFailedFmt     = "connection failed: %w"
	WarningsListToolsFailedFmt      = "list tools failed: %w"
	WarningsTooManyTools            = "too many tools or infinite loop"

	// CoverReportProfileFlagUsage describes the profile flag.
	CoverReportProfileFlagUsage      = "path to coverage profile"
	CoverReportThresholdFlagUsage    = "required coverage threshold (optional)"
	CoverReportMissingProfileFlag    = "missing required -profile flag"
	CoverReportParseFailedFmt        = "failed to parse coverage profile: %v\n"
	CoverReportWriteTableFailedFmt   = "failed to write summary table: %v\n"
	CoverReportWriteSummaryFailedFmt = "failed to write coverage summary: %v\n"
	CoverReportTableHeader           = "file\tcover%\tlines_missed"
	CoverReportTableRowFmt           = "%s\t%.2f\t%d\n"
	CoverReportTotalWithThresholdFmt = "total coverage: %.2f%% (threshold %.2f%%) %s\n"
	CoverReportTotalFmt              = "total coverage: %.2f%%\n"
	CoverReportStatusPass            = "PASS"
	CoverReportStatusFail            = "FAIL"

	// ExtractChecksumUsageFmt formats extract-checksum usage.
	ExtractChecksumUsageFmt       = "Usage: %s <checksums-file> <target-filename>\n"
	ExtractChecksumFileMissingFmt = "Error: %s not found\n"
	ExtractChecksumReadFailedFmt  = "Error: failed to read %s: %v\n"
	ExtractChecksumNotFoundFmt    = "Error: %s not found in %s\n"

	UpdateFormulaUsageFmt       = "Usage: %s <formula-file> <new-url> <new-sha256>\n"
	UpdateFormulaFileMissingFmt = "Error: %s not found\n"
	UpdateFormulaStatFailedFmt  = "Error: failed to stat %s: %v\n"
	UpdateFormulaReadFailedFmt  = "Error: failed to read %s: %v\n"
	UpdateFormulaWriteFailedFmt = "Error: failed to write %s: %v\n"
	UpdateFormulaURLCountFmt    = "Error: expected 1 url line, found %d\n"
	UpdateFormulaSHACountFmt    = "Error: expected 1 sha256 line, found %d\n"

	// McpRunPromptServerFailedFmt formats MCP prompt server failures.
	McpRunPromptServerFailedFmt = "failed to run MCP prompt server: %w"
)

System messages for internal operations.

View Source
const (
	// WizardInstallPrompt prompts to install Agent Layer.
	WizardInstallPrompt                       = "Agent Layer isn't installed in this repository. Run `al init` now? (recommended)"
	WizardExitWithoutChanges                  = "No changes made."
	WizardInstallFailedFmt                    = "install failed: %w"
	WizardInstallComplete                     = "Installation complete. Continuing the wizard..."
	WizardLoadConfigFailedFmt                 = "failed to load config: %w"
	WizardLoadDefaultMCPServersFailedFmt      = "failed to load default MCP servers: %w"
	WizardLoadWarningDefaultsFailedFmt        = "failed to load warning defaults: %w"
	WizardUnknownApprovalModeFmt              = "unknown approval mode: %q"
	WizardUnknownApprovalModeSelectionFmt     = "unknown approval mode selection: %q"
	WizardApprovalModeTitle                   = "Approval Mode"
	WizardEnableAgentsTitle                   = "Enable Agents"
	WizardPreviewModelWarningTitle            = "Preview Model Warning"
	WizardGeminiModelTitle                    = "Gemini Model"
	WizardClaudeModelTitle                    = "Claude Model"
	WizardCodexModelTitle                     = "Codex Model"
	WizardCodexReasoningEffortTitle           = "Codex Reasoning Effort"
	WizardMissingDefaultMCPServersPromptFmt   = "Default MCP server entries are missing from config.toml: %s. Restore them before continuing?"
	WizardEnableDefaultMCPServersTitle        = "Enable Default MCP Servers"
	WizardInvalidEnvFileFmt                   = "invalid env file %s: %w"
	WizardSecretAlreadySetPromptFmt           = "Secret %s is already set. Overwrite?"
	WizardEnvSecretFoundPromptFmt             = "Found %s in your environment. Write it to .agent-layer/.env?"
	WizardSecretInputPromptFmt                = "Enter %s (leave blank to skip)"
	WizardSecretMissingDisablePromptFmt       = "No value provided for %s. Disable MCP server %s?"
	WizardEnableWarningsPrompt                = "Enable warnings for performance and usage issues?"
	WizardInstructionTokenThresholdTitle      = "Instruction token threshold"
	WizardMCPServerThresholdTitle             = "MCP server threshold"
	WizardMCPToolsTotalThresholdTitle         = "MCP tools total threshold"
	WizardMCPServerToolsThresholdTitle        = "MCP server tools threshold"
	WizardMCPSchemaTokensTotalThresholdTitle  = "MCP schema tokens total threshold"
	WizardMCPSchemaTokensServerThresholdTitle = "MCP schema tokens server threshold"
	WizardSummaryTitle                        = "Summary of Changes"
	WizardApplyChangesPrompt                  = "Apply these changes?"
	WizardCompleted                           = "Wizard completed."

	WizardBackupConfigFailedFmt = "failed to backup config: %w"
	WizardPatchConfigFailedFmt  = "failed to patch config: %w"
	WizardBackupEnvFailedFmt    = "failed to backup .env: %w"
	WizardWriteConfigFailedFmt  = "failed to write config: %w"
	WizardWriteEnvFailedFmt     = "failed to write .env: %w"
	WizardRunningSync           = "Running sync..."
	WizardWarningFmt            = "Warning: %s\n"

	WizardLeaveBlankOption                       = "Leave blank (use client default)"
	WizardCustomOption                           = "Custom..."
	WizardSummaryApprovalsFmt                    = "Approval mode: %s\n"
	WizardSummaryEnabledAgentsHeader             = "\nEnabled Agents:\n"
	WizardSummaryEnabledMCPServersHeader         = "\nEnabled MCP Servers:\n"
	WizardSummaryNoneLoaded                      = "(none loaded)\n"
	WizardSummaryNone                            = "(none)\n"
	WizardSummaryRestoredMCPServersHeader        = "\nRestored Default MCP Servers:\n"
	WizardSummaryDisabledMCPServersHeader        = "\nDisabled MCP Servers (missing secrets):\n"
	WizardSummarySecretsHeader                   = "\nSecrets to Update:\n"
	WizardSummaryWarningsHeader                  = "\nWarnings:\n"
	WizardSummaryWarningsDisabled                = "(disabled)\n"
	WizardSummaryListItemFmt                     = "- %s\n"
	WizardSummaryWarningInstructionTokenFmt      = "- instruction_token_threshold = %d\n"
	WizardSummaryWarningMCPServerFmt             = "- mcp_server_threshold = %d\n"
	WizardSummaryWarningMCPToolsTotalFmt         = "- mcp_tools_total_threshold = %d\n"
	WizardSummaryWarningMCPServerToolsFmt        = "- mcp_server_tools_threshold = %d\n"
	WizardSummaryWarningMCPSchemaTokensTotalFmt  = "- mcp_schema_tokens_total_threshold = %d\n"
	WizardSummaryWarningMCPSchemaTokensServerFmt = "- mcp_schema_tokens_server_threshold = %d\n"
	WizardSummaryAgentFmt                        = "- %s"
	WizardSummaryAgentModelFmt                   = "- %s: %s"
	WizardSummaryCodexModelReasoningFmt          = "%s (%s)"
	WizardSummaryCodexReasoningFmt               = "reasoning: %s"

	WizardCustomPromptFmt        = "Custom %s"
	WizardCustomValueRequiredFmt = "Custom value required for %s"
	WizardPositiveIntRequiredFmt = "%s must be a positive integer"

	WizardApprovalModeHelpIntro       = "Approval modes control what runs without prompts:"
	WizardApprovalModeHelpLineFmt     = "- %s: %s"
	WizardApprovalModeHelpSupportNote = "Support varies by client; Agent Layer applies the closest available behavior."
	WizardPreviewModelWarningText     = "Preview models are pre-release and can change or be removed without notice."

	WizardTemplateNoMCPServers               = "template config contains no MCP servers"
	WizardMissingDefaultMCPServerTemplateFmt = "missing default MCP server template for %q"
	WizardMCPServersUnexpectedTypeFmt        = "mcp.servers has unexpected type %T"
	WizardReadConfigTemplateFailedFmt        = "failed to read config template: %w"
	WizardParseConfigTemplateFailedFmt       = "failed to parse config template: %w"
	WizardNoMCPServerBlocksFound             = "no MCP server blocks found in template"
	WizardMissingMCPServerIDInTemplate       = "missing MCP server id in template block"
	WizardDuplicateMCPServerIDInTemplateFmt  = "duplicate MCP server id %q in template"
	WizardTemplateWarningsDefaultsIncomplete = "template config warnings defaults are incomplete"

	WizardParseConfigFailedFmt      = "parse config: %w"
	WizardDefaultMCPServersRequired = "default MCP servers are required to patch config"
	WizardRenderConfigFailedFmt     = "render config: %w"
	WizardFormatConfigFailedFmt     = "format config: %w"

	WizardTOMLUnterminatedMultiline = "unterminated multiline string in TOML output"

	WizardMultiSelectDescription = "Arrow keys to navigate, Space to toggle, Enter to continue, Esc to cancel."

	WizardApprovalAllDescription      = "Auto-approve shell commands and MCP tool calls (where supported)."
	WizardApprovalMCPDescription      = "Auto-approve MCP tool calls only; commands still prompt."
	WizardApprovalCommandsDescription = "Auto-approve shell commands only; MCP tools still prompt."
	WizardApprovalNoneDescription     = "Prompt for everything."
)

Wizard messages for the interactive setup wizard.

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL