messages

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 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"
	RootQuietFlag         = "Suppress agent-layer informational output"
	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"
	// InitAlreadyInitialized is returned when init is invoked on an already-initialized repo.
	InitAlreadyInitialized = "" /* 129-byte string literal not displayed */
	// InitAlreadyInitializedAncestorFmt is returned when init walks up to an ancestor that is already initialized,
	// so the user knows they can scope the install to the current directory with --here.
	InitAlreadyInitializedAncestorFmt = "" /* 190-byte string literal not displayed */
	InitRunWizardPrompt               = "Run the setup wizard now? (recommended)"

	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) or latest"
	InitFlagHere     = "Install in the current directory without walking up to an ancestor .agent-layer/ or .git"

	UpgradeUse                            = "upgrade"
	UpgradeShort                          = "Apply template-managed updates and update the repo pin"
	UpgradePlanUse                        = "plan"
	UpgradePlanShort                      = "Show a dry-run upgrade plan without writing files"
	UpgradePrefetchUse                    = "prefetch"
	UpgradePrefetchShort                  = "Download and cache an Agent Layer release binary"
	UpgradePrefetchVersionFlag            = "Version to prefetch (vX.Y.Z, X.Y.Z, or latest)"
	UpgradePrefetchVersionRequired        = "prefetch requires a release version; pass --version X.Y.Z when running a dev build"
	UpgradePrefetchDoneFmt                = "Prefetched Agent Layer version %s into the local cache.\n"
	UpgradeRepairGitignoreUse             = "repair-gitignore-block"
	UpgradeRepairGitignoreShort           = "Restore `.agent-layer/gitignore.block` and reapply the root `.gitignore` managed block"
	UpgradeRepairGitignoreDone            = "Repaired `.agent-layer/gitignore.block` and updated root `.gitignore`.\n"
	UpgradeRollbackUse                    = "rollback <snapshot-id>"
	UpgradeRollbackShort                  = "Restore a managed-file upgrade snapshot"
	UpgradeRollbackRequiresSnapshotID     = "rollback requires a snapshot id: `al upgrade rollback <snapshot-id>`"
	UpgradeRollbackSuccessFmt             = "Restored snapshot %s.\n"
	UpgradeRollbackFlagList               = "List available upgrade snapshots"
	UpgradeRollbackListHeader             = "Available upgrade snapshots (newest first):"
	UpgradeRollbackNoSnapshots            = "No upgrade snapshots found."
	UpgradeRequiresTerminal               = "" /* 149-byte string literal not displayed */
	UpgradeNonInteractiveRequiresYesApply = "" /* 167-byte string literal not displayed */
	UpgradeYesRequiresApply               = "" /* 139-byte string literal not displayed */
	UpgradeFlagDiffLines                  = "Max number of diff lines shown per file in upgrade previews"
	UpgradeDiffLinesInvalidFmt            = "invalid value for --diff-lines: %d (must be > 0)"
	UpgradeFlagYes                        = "Run non-interactively when used with apply flags"
	UpgradeFlagApplyManagedUpdates        = "Apply managed template updates without prompts"
	UpgradeFlagApplyMemoryUpdates         = "Apply memory file updates without prompts"
	UpgradeFlagApplyDeletions             = "" /* 161-byte string literal not displayed */
	UpgradeFlagApplyTmpDeletions          = "" /* 157-byte string literal not displayed */
	UpgradeFlagVersion                    = "Target Agent Layer version for the upgrade (vX.Y.Z, X.Y.Z, or latest)"

	UpgradeOverwritePromptFmt                       = "Overwrite %s with the template version?"
	UpgradeOverwriteAllPrompt                       = "Overwrite all existing managed files with template versions and update the pin if needed?"
	UpgradeOverwriteManagedHeader                   = "Existing managed files that differ from templates:"
	UpgradeOverwriteMemoryHeader                    = "Existing memory files in docs/agent-layer that differ from templates:"
	UpgradeOverwriteMemoryAllPrompt                 = "Overwrite all existing memory files in docs/agent-layer with template versions?"
	UpgradeViewDiffPrompt                           = "View the full diff?"
	UpgradeDeleteUnknownAllPrompt                   = "Delete all unknown files found during upgrade scan (excludes .agent-layer/tmp/, which is prompted separately)?"
	UpgradeAddToKeepListPrompt                      = "Would you like to add anything to the upgrade keep list?"
	UpgradeKeepListCandidatesFmt                    = "Found %d unknown %s eligible for the upgrade keep list:"
	UpgradeKeepListSelectTitle                      = "Select intentional local paths to keep during future upgrades"
	UpgradeDeleteUnknownPromptFmt                   = "Delete %s?"
	UpgradeDeleteUnknownTmpAllPromptFmt             = "Delete all %d file(s) under .agent-layer/tmp/?"
	UpgradeDeleteUnknownTmpHeader                   = "Files under .agent-layer/tmp/:"
	UpgradeDeleteUnknownTmpDestructiveConfirmPrompt = "" /* 143-byte string literal not displayed */
	UpgradeDeleteUnknownTmpDestructiveWarningHeader = "" /* 182-byte string literal not displayed */
	UpgradeSkillsMigrationPromptFmt                 = "Proceed with migrating %d skill(s) to directory format? (Use 'al upgrade rollback' to undo if needed.)"
	UpgradeSkipManagedUpdatesInfo                   = "Info: skipping managed template updates (pass --apply-managed-updates to include them)."
	UpgradeSkipMemoryUpdatesInfo                    = "Info: skipping memory file updates (pass --apply-memory-updates to include them)."
	UpgradeSkipDeletionsInfo                        = "Info: skipping unknown file deletions outside .agent-layer/tmp/ (pass --apply-deletions to include them)."
	UpgradeSkipTmpDeletionsInfo                     = "" /* 149-byte string literal not displayed */
	UpgradeSkipStatuslineSourceUpdatesInfo          = "Info: skipping statusline source replacements; run interactive `al upgrade` to review user-owned statusline source diffs."
	UpgradeOverwriteStatuslineSourcePromptFmt       = "Replace user-owned statusline source %s with the template version?"
	UpgradeSuccessful                               = "Upgrade successful."
	UpgradeReviewSettingsHint                       = "Run `al wizard` to review your settings."
	UpgradeRunningSync                              = "Running sync..."
	UpgradeSyncFailedFmt                            = "upgrade applied; sync failed: %w (run `al sync` to retry)"

	// Config-default acceptance prompts shown during interactive upgrade.
	UpgradeNewConfigKeyFmt          = "\nNew config key: %s\n  Rationale: %s\n"
	UpgradeAcceptValueFmt           = "Accept value %v for %s?"
	UpgradeDeclinedRequiredKeyFmt   = "user declined default value for required config key %s; run 'al wizard' to set it manually"
	UpgradeConfigChoiceValueFmt     = "  Value: %v\n"
	UpgradeManifestBoolValueErrFmt  = "migration manifest error: expected bool value, got %T (%v)"
	UpgradeManifestEnumValueErrFmt  = "migration manifest error: value %q is not a valid option for %s"
	UpgradeNumberedChoiceHeader     = "\nChoose a value:"
	UpgradeNumberedChoiceOptionFmt  = "  %d) %s\n"
	UpgradeNumberedChoiceEnterFmt   = "Enter choice [%d]: "
	UpgradeNumberedChoiceInvalidFmt = "invalid choice %q"
	UpgradeNumberedChoiceRetryFmt   = "Invalid choice. Enter a number between 1 and %d.\n"

	// Statusline-source review header (interactive upgrade).
	UpgradeStatuslineSourceDiffHeader = "User-owned statusline source that differs from the template:"

	// Upgrade plan-render section titles and labels (dry-run plan output).
	UpgradePlanDryRunNoFiles               = "Upgrade plan (dry-run): no files were written."
	UpgradePlanSectionFilesToAdd           = "Files to add"
	UpgradePlanSectionStatuslineFilesToAdd = "Statusline source files to add"
	UpgradePlanSectionFilesToUpdate        = "Files to update"
	UpgradePlanSectionStatuslineToReview   = "Statusline source files to review"
	UpgradePlanSectionFilesToRename        = "Files to rename"
	UpgradePlanSectionFilesToReviewRemoval = "Files to review for removal"
	UpgradePlanSectionConfigUpdates        = "Config updates"
	UpgradePlanSectionMigrations           = "Migrations"
	UpgradePlanSectionTitleFmt             = "\n%s:\n"
	UpgradePlanNone                        = "  - (none)"
	UpgradePlanItemFmt                     = "  - %s\n"
	UpgradePlanRenameItemFmt               = "  - %s -> %s\n"
	UpgradePlanConfigItemFmt               = "  - %s: %s -> %s\n"
	UpgradePlanMigrationTargetVersionFmt   = "  - target version: %s\n"
	UpgradePlanMigrationSourceVersionFmt   = "  - source version: %s (%s)\n"
	UpgradePlanMigrationSourceNoteFmt      = "  - source note: %s\n"
	UpgradePlanMigrationEntryFmt           = "  - [%s] %s (%s): %s\n"
	UpgradePlanMigrationReasonFmt          = "    reason: %s\n"
	UpgradePlanMigrationBreakingNoticeFmt  = "    BREAKING CHANGE: %s"
	UpgradePlanMigrationBreakingDetailFmt  = "    %s"
	UpgradePlanMigrationBreakingRunHint    = "    Run 'al upgrade' to confirm and apply the migration."
	UpgradePlanPinVersionHeader            = "\nPin version change:"
	UpgradePlanPinCurrentFmt               = "  - current: %q\n"
	UpgradePlanPinTargetFmt                = "  - target: %q\n"
	UpgradePlanPinActionFmt                = "  - action: %s\n"
	UpgradePlanDiffLabel                   = "    diff:"
	UpgradePlanDiffForFmt                  = "Diff for %s:\n"
	UpgradePlanReadinessHeader             = "\nReadiness checks:"
	UpgradePlanReadinessItemFmt            = "  - %s\n"
	UpgradePlanReadinessRecommendationFmt  = "    recommendation: %s\n"
	UpgradePlanReadinessNoteFmt            = "    note: %s\n"
	UpgradePlanReadinessNoteMoreFmt        = "    note: ... and %d more\n"
	UpgradePlanSummaryHeader               = "\nSummary:"
	UpgradePlanSummaryFilesToAddFmt        = "  - files to add: %d\n"
	UpgradePlanSummaryFilesToUpdateFmt     = "  - files to update: %d\n"
	UpgradePlanSummaryFilesToRenameFmt     = "  - files to rename: %d\n"
	UpgradePlanSummaryFilesToReviewFmt     = "files to review for removal: %d"
	UpgradePlanSummaryConfigUpdatesFmt     = "  - config updates: %d\n"
	UpgradePlanSummaryMigrationsFmt        = "  - migrations planned: %d\n"
	UpgradePlanSummaryReadinessWarnFmt     = "readiness warnings: %d"
	UpgradePlanSummaryNeedsReviewFmt       = "needs review before apply: %s"
	UpgradePlanSummaryLineFmt              = "  - %s\n"

	// Upgrade readiness-check summaries (keyed by check ID).
	UpgradeReadinessUnrecognizedKeys      = "Config needs review before upgrade."
	UpgradeReadinessUnresolvedPlaceholder = "Config has placeholders that do not resolve from env."
	UpgradeReadinessProcessEnvOverrides   = "Process environment overrides `.agent-layer/.env` values."
	UpgradeReadinessEmptyDotenv           = "Empty `.env` assignments are masking process environment values."
	UpgradeReadinessPathExpansion         = "Some path-like MCP values do not expand cleanly."
	UpgradeReadinessVSCodeStale           = "VS Code generated files may be stale."
	UpgradeReadinessFloatingDeps          = "Some enabled MCP dependencies use floating versions."
	UpgradeReadinessStaleDisabledAgents   = "Disabled-agent generated files are still present."
	UpgradeReadinessMissingRequiredFields = "Config is missing required fields added in a newer version."

	// Upgrade readiness-check recommended actions (keyed by check ID).
	UpgradeReadinessActionUnrecognizedKeys      = "Fix unknown or invalid keys in `.agent-layer/config.toml` (or run `al wizard`) before applying."
	UpgradeReadinessActionUnresolvedPlaceholder = "Set required env values in `.agent-layer/.env` (AL_* keys) or process env, then rerun `al upgrade plan`."
	UpgradeReadinessActionProcessEnvOverrides   = "Align conflicting env values so CI/local runs use the same secrets and URLs."
	UpgradeReadinessActionEmptyDotenv           = "Remove empty assignments or set explicit values in `.agent-layer/.env` to avoid hidden process-env fallback."
	UpgradeReadinessActionPathExpansion         = "Fix MCP command/arg paths that rely on `~` or `${AL_REPO_ROOT}` and currently resolve to invalid paths."
	UpgradeReadinessActionVSCodeStale           = "Run `al sync` before `al upgrade` so generated VS Code files match current config."
	UpgradeReadinessActionFloatingDeps          = "" /* 127-byte string literal not displayed */
	UpgradeReadinessActionStaleDisabledAgents   = "Remove stale generated files for disabled agents, or re-enable those agents."
	UpgradeReadinessActionMissingRequiredFields = "Run `al wizard` to add missing required fields, or `al upgrade` will apply defaults during migration."

	InitWarnUpdateCheckFailedFmt = "Warning: failed to check for updates: %v\n"
	InitWarnDevBuildFmt          = "Warning: running dev build; latest release is %s\n"
	InitResolveLatestVersionFmt  = "resolve latest version: %w"
	InitLatestVersionMissing     = "latest release check returned an empty version"

	InitCreateReleaseValidationRequestFmt = "create release validation request: %w"
	InitValidateReleaseVersionRequestFmt  = "validate requested release v%s: %w"
	InitValidateReleaseVersionStatusFmt   = "validate requested release v%s: unexpected status %s"
	InitReleaseVersionNotFoundFmt         = "requested release v%s not found; check available versions at %s"

	UpdateUse                         = "update"
	UpdateShort                       = "Update the global Agent Layer CLI"
	UpdateDevBuildUnsupported         = "al update is unavailable for development builds; install a release build first"
	UpdateDispatchedCLIUnsupported    = "" /* 222-byte string literal not displayed */
	UpdateResolveExecutableErrFmt     = "resolve running Agent Layer executable: %w"
	UpdateResolveExecutableLinkErrFmt = "resolve running Agent Layer executable symlink: %w"
	UpdateHomebrewPrefixErrFmt        = "the running Agent Layer executable appears Homebrew-managed, but Homebrew could not identify its formula: %w"
	UpdateHomebrewOwnershipMismatch   = "" /* 171-byte string literal not displayed */
	UpdateScriptLayoutErrFmt          = "cannot derive an install prefix from executable %q; expected <prefix>/bin/al"
	UpdateHomebrewStart               = "Updating the Homebrew installation..."
	UpdateScriptStartFmt              = "Updating the script installation at %s...\n"
	UpdateHomebrewRunErrFmt           = "update Agent Layer with Homebrew: %w"
	UpdateScriptRunErrFmt             = "update Agent Layer with al-install.sh: %w"
	UpdateInstallerRequestErrFmt      = "create Agent Layer installer request: %w"
	UpdateInstallerDownloadErrFmt     = "download Agent Layer installer: %w"
	UpdateInstallerStatusErrFmt       = "download Agent Layer installer: unexpected status %s"
	UpdateInstallerTooLarge           = "download Agent Layer installer: response exceeds size limit"
	UpdateInstallerTempErrFmt         = "create temporary Agent Layer installer: %w"
	UpdateInstallerWriteErrFmt        = "write temporary Agent Layer installer: %w"
	UpdateInstallerCloseErrFmt        = "close temporary Agent Layer installer: %w"
	UpdateComplete                    = "Agent Layer CLI update complete. Run `al upgrade plan` in each initialized repository."

	UpdateUpgradeBlock = "Upgrade:\n  1) Update the global CLI:\n     al update\n  2) Upgrade this repo:\n     al upgrade plan\n     al upgrade"
	UpdateSafetyBlock  = "" /* 409-byte string literal not displayed */
	// UpdateSilenceBlock tells users how to permanently turn off the recurring update warning.
	// It is intentionally appended only to InitWarnUpdateAvailableFmt (the warning shown on
	// `al sync` and `al <client>` runs) and not to the shared blocks, because `al doctor`
	// always checks for updates regardless of version_update_on_sync.
	UpdateSilenceBlock         = "Silence:\n  - To stop this warning, set `version_update_on_sync = false` under `[warnings]` in `.agent-layer/config.toml`."
	InitWarnUpdateAvailableFmt = "Warning: agent-layer update available: %s (current %s)\n\n" + UpdateUpgradeBlock + "\n\n" + UpdateSafetyBlock + "\n\n" + UpdateSilenceBlock + "\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"
	WizardProfileFlagHelp        = "Run wizard in non-interactive profile mode using a profile config TOML file"
	WizardProfileYesFlagHelp     = "Apply profile-mode changes; without this flag profile mode prints a rewrite preview only"
	WizardAnswersFlagHelp        = "Run wizard with a deterministic JSON answer file"
	WizardCleanupBackupsFlagHelp = "Delete wizard backup files (.agent-layer/config.toml.bak and .agent-layer/.env.bak)"
	WizardCleanupBackupsHeader   = "Removed wizard backup files:"
	WizardCleanupBackupsPathFmt  = "  - %s\n"
	WizardCleanupBackupsNone     = "No wizard backup files found."

	AntigravityUse                         = "agy"
	AntigravityShort                       = "Sync and launch Antigravity"
	AntigravityLong                        = "" /* 349-byte string literal not displayed */
	ClientsAntigravityMkdirFailedFmt       = "failed to create Antigravity config dir %s: %w"
	ClientsAntigravityRelativeGeminiDirFmt = "antigravity requires an absolute --gemini_dir path; got %s"
	ClientsAntigravityRelativeRootFmt      = "antigravity requires an absolute project root; got %s"
	ClientsAntigravityBinaryNotFoundFmt    = "" /* 129-byte string literal not displayed */

	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"

	NoSyncInvalidFmt = "invalid value for --no-sync: %q"
	QuietInvalidFmt  = "invalid value for --quiet: %q"

	ProbeUse                       = "probe"
	ProbeShort                     = "Run client capability probes"
	ProbeLong                      = "" /* 198-byte string literal not displayed */
	ProbeAntigravityUse            = "agy"
	ProbeAntigravityShort          = "Probe Antigravity capabilities"
	ProbeAntigravityLong           = "" /* 561-byte string literal not displayed */
	ProbeAntigravityNonZeroExitFmt = "antigravity probe reported a non-zero result (exit code %d): %s"
	ProbeGrokUse                   = "grok"
	ProbeGrokShort                 = "Probe Grok capabilities"
	ProbeGrokLong                  = "" /* 480-byte string literal not displayed */
	ProbeGrokNonZeroExitFmt        = "grok probe reported a non-zero result (exit code %d): %s"

	DispatchUse                          = "dispatch"
	DispatchShort                        = "Run asynchronous headless agent conversations"
	DispatchLong                         = "" /* 186-byte string literal not displayed */
	DispatchAgentFlag                    = "Exact target agent"
	DispatchModelFlag                    = "Exact provider model"
	DispatchReasoningEffortFlag          = "Exact provider reasoning effort"
	DispatchSkillFlag                    = "Portable Agent Layer skill name to invoke in the target"
	DispatchOptionsUse                   = "options"
	DispatchOptionsShort                 = "List available dispatch agents and override options"
	DispatchOptionsLong                  = "" /* 141-byte string literal not displayed */
	DispatchWaitShort                    = "Wait for a terminal state or bounded-wait expiry"
	DispatchWaitLong                     = "" /* 555-byte string literal not displayed */
	DispatchPromptOrSkillRequired        = "`al dispatch` requires prompt text, --skill, or both"
	DispatchUnknownTargetFmt             = "unknown `al dispatch` target %q (supported: codex, claude, antigravity)"
	DispatchMissingSkillFmt              = "`al dispatch` skill %q was not found in .agent-layer/skills"
	DispatchMissingSkillProjectionFmt    = "`al dispatch` skill %q is not synced for %s (missing %s); run al sync"
	DispatchSkillProjectionNotRegularFmt = "`al dispatch` skill projection %s is not a regular file (mode %s); refusing to follow symlink or special file"
	DispatchRunSyncFailedFmt             = "`al dispatch` sync failed: %v"
	DispatchRunSyncCleanupFailedFmt      = "`al dispatch` generated sync outputs succeeded, but post-write lock cleanup failed: %v"

	CopilotUse   = "copilot"
	CopilotShort = "Sync and launch GitHub Copilot CLI"

	GrokUse   = "grok"
	GrokShort = "Sync and launch Grok Build CLI"

	McpPromptsUse        = "mcp-prompts"
	McpPromptsShort      = "Start the MCP prompt server (deprecated)"
	McpPromptsDeprecated = "al mcp-prompts is deprecated: skills are now synced natively. Run 'al sync' to update."

	ClientsExecLookupErrorFmt            = "%[1]s launcher requires `%[1]s` on PATH: %w"
	ClientsExecHandoffErrorFmt           = "%s exec handoff failed: %w"
	ClientsVSCodeExitErrorFmt            = "vscode exited with error: %w"
	ClientsVSCodeCodeNotFoundFmt         = "vscode preflight failed: 'code' command not found on PATH: %w"
	ClientsVSCodeManagedBlockConflictFmt = "vscode preflight failed: managed settings block conflict in %s (%s); run `al sync` to repair `.vscode/settings.json`"

	ClientsCodexHomeWarningFmt       = "Warning: CODEX_HOME is set to %s; expected %s\n"
	ClientsClaudeConfigDirWarningFmt = "Warning: CLAUDE_CONFIG_DIR is set to %s; expected %s\n"
	ClientsGrokHomeWarningFmt        = "Warning: overriding inherited GROK_HOME=%s with repo-local %s\n"

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

CLI messages for user-facing commands and prompts.

View Source
const (
	// SkillsUse is the skills command name.
	SkillsUse   = "skills"
	SkillsShort = "Manage Git-backed Agent Skill imports"
	SkillsLong  = `` /* 537-byte string literal not displayed */

	SkillsAddUse   = "add <repository> <selector>..."
	SkillsAddShort = "Import skills from a Git repository"
	SkillsAddLong  = `` /* 527-byte string literal not displayed */

	SkillsRemoveUse   = "remove <repository> <selector>"
	SkillsRemoveShort = "Remove one configured import selector"
	SkillsRemoveLong  = `` /* 521-byte string literal not displayed */

	SkillsStatusUse   = "status"
	SkillsStatusShort = "Report local imported-skill state"
	SkillsStatusLong  = `` /* 319-byte string literal not displayed */

	SkillsDiffUse   = "diff <name>"
	SkillsDiffShort = "Show a Git diff between two live skill sides"
	SkillsDiffLong  = `` /* 675-byte string literal not displayed */

	SkillsDiffFromFlag = "Source side: base, local, upstream, or destination"
	SkillsDiffToFlag   = "Destination side: base, local, upstream, or destination"

	SkillsPullUse   = "pull"
	SkillsPullShort = "Fetch and reconcile configured skill sources"
	SkillsPullLong  = `` /* 521-byte string literal not displayed */

	SkillsResolveUse   = "resolve <name>"
	SkillsResolveShort = "Finish a conflicted skill pull or push"
	SkillsResolveLong  = `` /* 886-byte string literal not displayed */

	SkillsResetUse   = "reset <name>"
	SkillsResetShort = "Discard one imported skill's local edits"
	SkillsResetLong  = `` /* 592-byte string literal not displayed */

	SkillsPushUse   = "push"
	SkillsPushShort = "Contribute local skill changes to configured destinations"
	SkillsPushLong  = `` /* 584-byte string literal not displayed */

	SkillsRefFlag            = "Source branch, tag, or commit (default: the repository's default branch)"
	SkillsTrackingFlag       = "Tracking mode: tracked or pinned (default: tracked for branches, pinned for tags and commits)"
	SkillsWriteFlag          = "Write policy: none, branch, or direct"
	SkillsPushRepositoryFlag = "Destination repository for upstream writes (default: the source repository)"
	SkillsPushBranchFlag     = "Destination branch, required when --write=branch"
	SkillsAllFlag            = "Expand the summary into one entry per resolved skill and exclusion"
	SkillsYesFlag            = "Confirm the mutation without prompting"
	SkillsAddConfirmFmt      = "Import selectors %s from %s and update project configuration?"
	SkillsRemoveConfirmFmt   = "Remove selector %s from %s and update project configuration?"
	SkillsResetConfirmFmt    = "Permanently discard local edits to imported skill %q?"
	SkillsPushConfirm        = "Publish local changes to every configured writable skill destination?"

	SkillsNonInteractiveRequiresYesFmt = "al skills %s requires --yes outside a terminal"
	SkillsConfirmationDeclinedFmt      = "al skills %s confirmation declined"

	// SkillsOperationFailedFmt reports a failed or partially failed operation.
	SkillsOperationFailedFmt = "al skills %s did not complete successfully"
)

Skill import command messages.

View Source
const (
	// ConfigMissingFileFmt formats missing config file errors.
	ConfigMissingFileFmt        = "missing config file %s: %w"
	ConfigFailedReadTemplateFmt = "failed to read template config.toml: %w"
	ConfigFailedReadEnvFileFmt  = "failed to read env file %s: %w"
	ConfigInvalidEnvFileFmt     = "invalid env file %s: %w"
	ConfigInvalidConfigFmt      = "invalid config %s: %w"
	ConfigFSRequired            = "config filesystem is required"
	ConfigRootRequired          = "config root path is required"
	ConfigRepoRootRequiredPath  = "repo root required for path expansion"
	ConfigPathOutsideRootFmt    = "path %s is outside repo root %s"

	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, yolo"
	ConfigClaudeEnabledRequiredFmt                = "%s: agents.claude.enabled is required"
	ConfigClaudeVSCodeEnabledRequiredFmt          = "%s: agents.claude_vscode.enabled is required"
	ConfigCodexEnabledRequiredFmt                 = "%s: agents.codex.enabled is required"
	ConfigVSCodeEnabledRequiredFmt                = "%s: agents.vscode.enabled is required"
	ConfigAntigravityEnabledRequiredFmt           = "%s: agents.antigravity.enabled is required"
	ConfigAntigravityAgentSpecificModelInvalidFmt = "%s: agents.antigravity.agent_specific.model is not supported; use agents.antigravity.model for Antigravity model selection"
	ConfigCopilotCLIEnabledRequiredFmt            = "%s: agents.copilot_cli.enabled is required"
	ConfigCopilotCLIReasoningEffortUnsupportedFmt = "%s: agents.copilot_cli.reasoning_effort is not supported in this release"
	ConfigGrokEnabledRequiredFmt                  = "%s: agents.grok.enabled is required"
	ConfigGrokAgentSpecificReservedKeyFmt         = "%s: agents.grok.agent_specific.%s is not supported; %s"
	ConfigDispatchMaxDepthInvalidFmt              = "%s: dispatch.max_depth must be greater than zero"
	ConfigDispatchMCPWaitTimeoutInvalidFmt        = "%s: dispatch.mcp_wait_timeout_minutes must be greater than zero"
	ConfigDispatchMCPToolTimeoutInvalidFmt        = "%s: dispatch.mcp_tool_timeout_minutes must be greater than zero"
	ConfigDispatchMCPTimeoutOrderInvalidFmt       = "%s: dispatch.mcp_tool_timeout_minutes (%d) must be greater than dispatch.mcp_wait_timeout_minutes (%d)"
	ConfigMcpServerIDRequiredFmt                  = "%s: mcp.servers[%d].id is required"
	ConfigMcpServerIDReservedFmt                  = "%s: mcp.servers[%d].id is reserved"
	ConfigMcpServerIDDuplicateFmt                 = "%s: mcp.servers[%d].id %q duplicates mcp.servers[%d].id"
	ConfigMcpServerEnabledRequiredFmt             = "%s: mcp.servers[%d].enabled is required"
	ConfigMcpServerURLRequiredFmt                 = "%s: mcp.servers[%d].url is required for http transport"
	ConfigMcpServerHTTPTransportInvalidFmt        = "%s: mcp.servers[%d].http_transport must be sse or streamable"
	ConfigMcpServerCommandRequiredFmt             = "%s: mcp.servers[%d].command is required for stdio transport"
	ConfigMcpServerTransportInvalidFmt            = "%s: mcp.servers[%d].transport must be http or stdio"
	ConfigMcpServerClientInvalidFmt               = "%s: mcp.servers[%d].clients contains invalid client %q"
	ConfigUnrecognizedKeysFmt                     = "%s: unrecognized config keys: %w"
	ConfigLegacyGeminiUnsupportedFmt              = "" /* 229-byte string literal not displayed */
	ConfigLegacyDispatchUnsupportedFmt            = "%s: agents.<agent>.dispatch.default_agent is no longer supported; run 'al upgrade' to remove the retired dispatch defaults"
	ConfigWarningNoiseModeInvalidFmt              = "%s: warnings.noise_mode %q is invalid (allowed: default, reduce, quiet)"
	ConfigWarningThresholdInvalidFmt              = "%s: %s must be greater than zero"

	ConfigMissingSkillsDirFmt            = "missing skills directory %s: %w"
	ConfigFailedReadImportedSkillsDirFmt = "failed to read imported skills directory %s: %w"
	ConfigFailedReadSkillFmt             = "failed to read skill %s: %w"
	ConfigInvalidSkillFmt                = "invalid skill %s: %w"
	ConfigSkillMissingContent            = "missing content"
	ConfigSkillMissingFrontMatter        = "missing front matter"
	ConfigSkillUnterminatedFrontMatter   = "unterminated front matter"
	ConfigSkillInvalidFrontMatterFmt     = "invalid front matter: %w"
	ConfigSkillInvalidFrontMatterTypeFmt = "invalid front matter type: %s"
	ConfigSkillDuplicateKeyFmt           = "skill front matter contains duplicate key %q"
	ConfigSkillFailedReadContentFmt      = "failed to read content: %w"
	ConfigSkillDescriptionEmpty          = "description is empty"
	ConfigSkillMissingDescription        = "missing description in front matter"
	ConfigSkillNameEmpty                 = "name is empty"
	ConfigSkillNameInvalidMultiline      = "name must be a single line scalar"
	ConfigSkillNameMismatchFmt           = "skill in %s has name %q, expected %q"
	ConfigSkillDirEmptyFmt               = "skill directory %s has no SKILL.md"
	ConfigSkillDuplicateNameFmt          = "duplicate skill name %q from %s and %s"
	ConfigSkillFlatFormatUnsupportedFmt  = "" /* 138-byte string literal not displayed */

	// Skill import configuration validation.
	ConfigSkillImportRepositoryRequiredFmt           = "%s: skills.imports[%d].repository is required"
	ConfigSkillImportSelectorsRequiredFmt            = "%s: skills.imports[%d].selectors must list at least one selector"
	ConfigSkillImportPositiveSelectorRequiredFmt     = "%s: skills.imports[%d].selectors must include at least one positive selector; an exclusion never imports a skill by itself"
	ConfigSkillImportSelectorEmptyFmt                = "%s: skills.imports[%d].selectors contains an empty selector"
	ConfigSkillImportSelectorInvalidFmt              = "%s: skills.imports[%d].selectors contains invalid selector %q: %w"
	ConfigSkillImportTrackingInvalidFmt              = "%s: skills.imports[%d].tracking %q is invalid (allowed: tracked, pinned)"
	ConfigSkillImportWritePolicyInvalidFmt           = "%s: skills.imports[%d].write_policy %q is invalid (allowed: none, branch, direct)"
	ConfigSkillImportPushBranchRequiredFmt           = "%s: skills.imports[%d].push_branch is required when write_policy = \"branch\"; Agent Layer never generates branch names"
	ConfigSkillImportPushBranchPrimaryFmt            = "" /* 136-byte string literal not displayed */
	ConfigSkillImportPushBranchUnsupportedFmt        = "%s: skills.imports[%d].push_branch is only supported when write_policy = \"branch\" (write_policy = %q)"
	ConfigSkillImportPushRepositoryUnsupportedFmt    = "%s: skills.imports[%d].push_repository requires write_policy = \"branch\" or \"direct\""
	ConfigSkillImportDuplicateBlockFmt               = "" /* 187-byte string literal not displayed */
	ConfigSkillImportDuplicateSelectorFmt            = "" /* 152-byte string literal not displayed */
	ConfigSkillImportBlockUnparsableFmt              = "failed to parse a [[skills.imports]] block: %w"
	ConfigSkillImportSelectorsAssignmentMissing      = "[[skills.imports]] block has no selectors assignment"
	ConfigSkillImportSelectorsAssignmentUnterminated = "[[skills.imports]] selectors array is unterminated"
	ConfigSkillImportRepositoryInvalidFmt            = "%s: skills.imports[%d].repository is invalid: %w"
	ConfigSkillImportPushRepositoryInvalidFmt        = "%s: skills.imports[%d].push_repository is invalid: %w"
	ConfigSkillSelectorBackslash                     = "use '/' as the path separator"
	ConfigSkillSelectorAbsolute                      = "must be a repository-relative path"
	ConfigSkillSelectorNotNormalized                 = "must be a normalized repository-relative path without '.' or '..' segments"
	ConfigSkillSelectorControlCharacter              = "must not contain control characters"
	ConfigSkillSelectorPatternInvalidFmt             = "contains an invalid wildcard pattern: %v"

	ConfigMissingInstructionsDirFmt = "missing instructions directory %s: %w"
	ConfigFailedReadInstructionFmt  = "failed to read instruction %s: %w"

	ConfigMissingEnvVarsFmt = "missing environment variables: %s"

	// ConfigValidationGuidance is appended to validation errors to direct users to repair tools.
	ConfigValidationGuidance = "(run 'al wizard' to fix or 'al doctor' to diagnose)"

	// ConfigLenientLoadInfoFmt is used when repair tools fall back to lenient config loading.
	ConfigLenientLoadInfoFmt = "Config has validation errors; %s will help you fix them: %v"
)

Config messages for configuration loading and validation.

Naming convention: Config* messages validate configuration inputs (filesystem, root path, file contents) rather than a unified System interface, so they use descriptive names like ConfigFSRequired and ConfigRootRequired instead of ConfigSystemRequired.

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"

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

	DoctorMissingRequiredDirFmt                   = "Missing required directory: %s"
	DoctorMissingRequiredDirRecommend             = "Run `al init` to initialize this repository."
	DoctorMissingOptionalDirFmt                   = "Missing optional directory: %s"
	DoctorMissingOptionalDirRecommend             = "No action needed unless this repo uses committed/shared project-memory docs. Create %s if it does."
	DoctorInstructionReferenceScanFailedFmt       = "Failed to inspect instruction references: %v"
	DoctorInstructionReferenceScanFailedRecommend = "Check .agent-layer/instructions/ for unreadable instruction files."
	DoctorPathNotDirFmt                           = "%s exists but is not a directory"
	DoctorPathNotDirRecommend                     = "Ensure the path is a directory, then run `al init` (fresh repo) or `al upgrade` (existing repo)."
	DoctorDirExistsFmt                            = "Directory exists: %s"

	DoctorConfigLoadFailedFmt         = "Failed to load configuration: %v"
	DoctorConfigLoadRecommend         = "Check .agent-layer/ for missing or malformed files (config.toml, .env, instructions/, skills/, commands.allow)."
	DoctorConfigLoadLenientRecommend  = "Run 'al wizard' to fix or 'al upgrade' to apply missing fields."
	DoctorConfigNeedsUpgradeRecommend = "Run `al upgrade` to migrate config.toml, then re-run `al doctor`."
	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."
	DoctorEnvFileUnreadableFmt       = "Could not read .agent-layer/.env: %v"
	DoctorEnvFileUnreadableRecommend = "Fix the syntax or permissions of .agent-layer/.env, then re-run `al doctor`."

	DoctorAgentEnabledFmt              = "Agent enabled: %s"
	DoctorAgentDisabledFmt             = "Agent disabled: %s"
	DoctorAntigravityNotFound          = "Antigravity binary not found: agy"
	DoctorAntigravityInstallRecommend  = "Install Antigravity (https://antigravity.google) and ensure `agy` (>= 1.0.0) is on PATH; run `al probe agy` to verify."
	DoctorAntigravityVersionFailedFmt  = "Failed to read Antigravity version: %v"
	DoctorAntigravityVersionUnknownFmt = "Could not parse Antigravity version from %q"
	DoctorAntigravityVersionTooOldFmt  = "Antigravity version %s is below required 1.0.0"
	DoctorAntigravityVersionOKFmt      = "Antigravity version OK: %s"
	DoctorGrokNotFound                 = "Grok binary not found: grok"
	DoctorGrokInstallRecommendFmt      = "Install Grok Build CLI and ensure `grok` (>= %s) is on PATH; run `al probe grok` to verify."
	DoctorGrokVersionFailedFmt         = "Failed to read Grok version: %v"
	DoctorGrokVersionUnknownFmt        = "Could not parse Grok version from %q"
	DoctorGrokVersionCompareFailedFmt  = "Could not compare Grok version %q: %v"
	DoctorGrokVersionTooOldFmt         = "Grok version %s is below tested %s"
	DoctorGrokVersionOKFmt             = "Grok version OK: %s"

	DoctorSkillsValidatedFmt       = "Skills validated successfully (%d checked)"
	DoctorSkillsNoneConfigured     = "No skills configured for validation."
	DoctorSkillValidationWarnFmt   = "%s: %s"
	DoctorSkillValidationRecommend = "Update skill frontmatter/path conventions in .agent-layer/skills to match agentskills.io recommendations."
	DoctorSkillValidationFailedFmt = "Failed to validate skill %s: %v"
	DoctorSkillsLoadFailedFmt      = "Failed to load skills from %s: %v"
	DoctorSkillCatalogTooLargeFmt  = "Skill catalog metadata exceeds %d tokens (%d across %d skills)"

	DoctorCheckNameFlatSkills = "FlatSkills"

	DoctorSkillFlatFormatDetectedFmt   = "Found flat-format skill file %q in .agent-layer/skills/; flat format is no longer supported."
	DoctorSkillFlatFormatRecommend     = "Run 'al upgrade' to migrate flat-format skills to directory format (<name>/SKILL.md)."
	DoctorSkillFlatFormatScanFailedFmt = "Failed to scan %s for flat-format skills: %v"
	DoctorSkillFlatFormatScanRecommend = "Ensure .agent-layer/skills/ exists and is readable, then run 'al doctor' again."

	DoctorUpdateSkippedFmt          = "Update check skipped because %s is set"
	DoctorUpdateSkippedRecommendFmt = "Unset %s to check for updates."
	DoctorUpdateRateLimited         = "Update check skipped due to GitHub API rate limit (HTTP 403/429)"
	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        = "Agent Layer update available: %s (current %s)"
	DoctorUpdateAvailableRecommend  = UpdateUpgradeBlock + "\n\n" + UpdateSafetyBlock
	DoctorUpToDateFmt               = "Agent Layer is up to date (%s)"

	// Size summary: informational context-size report. Doctor always prints it (regardless
	// of noise mode or --quiet) so size visibility never depends on whether warnings show.
	// Thresholds set to nil render as "(no limit set)" rather than assuming a default.
	DoctorSizeSummaryHeader              = "\n📊 Context size summary"
	DoctorSizeInstructionsFmt            = "  - Instructions (%s): %d / %d tokens\n"
	DoctorSizeInstructionsNoLimitFmt     = "  - Instructions (%s): %d tokens (no limit set)\n"
	DoctorSizeInstructionsUnavailableFmt = "  - Instructions: size unavailable (%v)\n"
	DoctorSizeSkillsFmt                  = "  - Skills (always-loaded descriptions): %d / %d tokens\n"
	DoctorSizeSkillsUnavailable          = "  - Skills: size unavailable (skills failed to load)\n"
	DoctorSizeMCPServersFmt              = "  - MCP servers enabled: %d / %d\n"
	DoctorSizeMCPServersNoLimitFmt       = "  - MCP servers enabled: %d (no limit set)\n"
	DoctorSizeMCPToolsFmt                = "  - MCP tools (total): %d / %d\n"
	DoctorSizeMCPToolsNoLimitFmt         = "  - MCP tools (total): %d (no limit set)\n"
	DoctorSizeMCPSchemaFmt               = "  - MCP tool schemas (total): %d / %d tokens\n"
	DoctorSizeMCPSchemaNoLimitFmt        = "  - MCP tool schemas (total): %d tokens (no limit set)\n"
	DoctorSizeMCPUnavailable             = "  - MCP servers: size unavailable (server discovery failed)\n"
	DoctorSizeMCPPartialFmt              = "  - Note: %d of %d enabled MCP server(s) unreachable; tool and schema totals exclude them.\n"
	DoctorSizeTotalFmt                   = "  - Total always-loaded (estimated): ~%d tokens\n"
	DoctorSizeTotalExcludesFmt           = "  - Total always-loaded (estimated): ~%d tokens (excludes %s)\n"

	DoctorWarningSystemHeader        = "\n🔍 Running warning checks..."
	DoctorMCPCheckStartFmt           = "⏳ Checking MCP servers (%d enabled)"
	DoctorMCPCheckDone               = " done"
	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"
	DoctorRecommendationPrefix = "       💡 "
	DoctorRecommendationIndent = "         "

	DoctorCheckNameCLISkills             = "CLISkills"
	DoctorCLISkillCatalogLoadFailedFmt   = "Failed to load CLI skill catalog: %v"
	DoctorCLISkillCatalogLoadRecommend   = "Reinstall Agent Layer; the embedded CLI skill catalog could not be read."
	DoctorCLISkillBinaryMissingFmt       = "CLI skill %s is installed but its binary %q is not on PATH"
	DoctorCLISkillBinaryMissingRecommend = "Install %q (see https://agent-layer.dev/best-practices/cli-skill-design) or run `al wizard` to remove the skill."
	DoctorCLISkillBinaryOKFmt            = "CLI skill %s found %q on PATH"
)

Doctor messages for the doctor command.

View Source
const (
	// InstallRootRequired indicates root path is required for install.
	InstallRootRequired = "root path is required"
	// InstallSystemRequired indicates system is required for install.
	InstallSystemRequired = "install system is required"
	// InstallOverwritePromptRequired indicates overwrite prompts need a handler.
	InstallOverwritePromptRequired                   = "" /* 126-byte string literal not displayed */
	InstallInvalidPinVersionFmt                      = "invalid pin version: %w"
	InstallCreateDirFailedFmt                        = "failed to create directory %s: %w"
	InstallAutoRepairPinWarningFmt                   = "Auto-repairing invalid pin file %s (was %q, now %s)\n"
	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"
	InstallInvalidGitignoreBlockFmt                  = "gitignore block %s must not include managed markers or template hash; run `al upgrade` to review regenerating it"
	InstallGitignoreUnterminatedBlockFmt             = "" /* 194-byte string literal not displayed */
	InstallGitignoreDuplicatePatternFmt              = "managed gitignore block has multiple entries for %s"
	InstallGitignoreUnsupportedInlineCommentFmt      = "" /* 153-byte string literal not displayed */
	InstallGitignoreMergeTrackingFmt                 = "merge gitignore tracking settings for %s: %w"
	InstallUnexpectedTemplatePathFmt                 = "unexpected template path %s"
	InstallDiffHeader                                = "Found existing files that differ from the templates:"
	InstallDiffLineFmt                               = "  - %s\n"
	InstallDiffFooter                                = "Run `al upgrade` to review each file. Non-interactive managed apply: `al upgrade --yes --apply-managed-updates`."
	InstallUnknownHeader                             = "Found files under .agent-layer/ or docs/agent-layer/ not tracked by Agent Layer:"
	InstallUnknownFooter                             = "Run `al upgrade` to review deleting them. Non-interactive deletion apply: `al upgrade --yes --apply-deletions`."
	InstallDeleteUnknownPromptRequired               = "" /* 138-byte string literal not displayed */
	InstallDeleteUnknownFailedFmt                    = "failed to delete %s: %w"
	InstallInvalidUpgradeKeepListEntryFmt            = "invalid upgrade keep-list entry in %s at line %d: %w"
	InstallUpgradeKeepListSelectionInvalidFmt        = "upgrade keep-list selection %q was not an offered unknown path"
	InstallUpgradeSnapshotCreatedFmt                 = "Created upgrade snapshot: %s\nIf the upgrade completes, restore with: al upgrade rollback %s\n"
	InstallUpgradeSnapshotRolledBackFmt              = "Upgrade failed during %s. Changes were rolled back using snapshot %s.\n"
	InstallUpgradeSnapshotRollbackFailedFmt          = "Upgrade failed during %[1]s. Rollback using snapshot %[2]s failed: %[3]v\nRetry with: al upgrade rollback %[2]s\n"
	InstallUpgradeRollbackSnapshotIDRequired         = "upgrade rollback requires a snapshot id"
	InstallUpgradeRollbackSnapshotIDInvalid          = "invalid snapshot id %q: must not contain path separators"
	InstallUpgradeRollbackSnapshotNotFoundFmt        = "upgrade snapshot %s not found under %s"
	InstallUpgradeRollbackSnapshotNotRollbackableFmt = "" /* 130-byte string literal not displayed */
	InstallUpgradeRollbackFailedFmt                  = "rollback snapshot %s failed: %w"
	InstallUpgradeSnapshotLargeWarningFmt            = "" /* 142-byte string literal not displayed */
	InstallDiffPreviewPathRequired                   = "diff preview path is required"
	InstallMissingTemplatePathMappingFmt             = "missing template path mapping for %s"
	InstallSectionAwareMarkerDuplicateFmt            = "section-aware marker %q appears multiple times in %s"
	InstallSectionAwareMarkerMissingFmt              = "section-aware marker %q missing in %s"
	InstallFailedRestoreSymlinkFmt                   = "restore symlink %s: %w"
	InstallUnknownPlanDiffModeFmt                    = "unknown plan diff mode %q"
	InstallMigrationSkipDanglingSymlinkFmt           = "skipped %s: dangling symlink, watermarked-delete refuses to remove without verifying target content; resolve manually\n"
	InstallMigrationSkipGeneratedDirFmt              = "skipped %s: generated-artifact deletion refuses to remove directories without explicit generated ownership proof\n"

	// Skills format migration notice banner and summary text (upgrade_migrations_skills.go).
	InstallSkillsMigrationBannerRule        = "============================================================="
	InstallSkillsMigrationBannerTitle       = "  BREAKING CHANGE: Slash-commands renamed to skills"
	InstallSkillsMigrationBannerBody1       = "  Slash-commands are being renamed to skills and converted to"
	InstallSkillsMigrationBannerBody2       = "  directory format. The old flat file format (<name>.md) will"
	InstallSkillsMigrationBannerBody3       = "  no longer work after this upgrade."
	InstallSkillsMigrationFoundFlatFmt      = "  Found %d flat-format skill(s) that must be migrated:\n"
	InstallSkillsMigrationFlatToDirFmt      = "    %s.md  ->  %s/SKILL.md\n"
	InstallSkillsMigrationBlockedHeader     = "  MIGRATION BLOCKED"
	InstallSkillsMigrationBlockedBody1      = "  The following skills exist in BOTH flat and directory format"
	InstallSkillsMigrationBlockedBody2      = "  with DIFFERENT content. The migration cannot choose which"
	InstallSkillsMigrationBlockedBody3      = "  version to keep — you need to resolve this manually."
	InstallSkillsMigrationConflictSkillFmt  = "    Skill: %s\n"
	InstallSkillsMigrationConflictFlatFmt   = "      Flat file:  %s\n"
	InstallSkillsMigrationConflictDirFmt    = "      Directory:  %s\n"
	InstallSkillsMigrationFixHint1          = "  To fix: choose which version to keep for each skill above,"
	InstallSkillsMigrationFixHint2          = "  then delete the other one:"
	InstallSkillsMigrationFixKeepDir        = "    Keep directory version:  rm .agent-layer/skills/<name>.md"
	InstallSkillsMigrationFixKeepFlat       = "    Keep flat version:       rm -r .agent-layer/skills/<name>/"
	InstallSkillsMigrationFixRerun          = "  Then re-run: al upgrade"
	InstallSkillsMigrationNoConflicts       = "  No conflicts detected — all skills can be migrated automatically."
	InstallSkillsMigrationMigratedCountFmt  = "  Migrated %d skill(s) to directory format:\n"
	InstallSkillsMigrationComplete          = "  Skills migration complete."
	InstallSkillsMigrationBlockedErrFmt     = "skills format migration blocked by %d conflict(s); resolve manually and re-run 'al upgrade'"
	InstallSkillsMigrationPromptErrFmt      = "skills migration prompt: %w"
	InstallSkillsMigrationDeclinedErr       = "skills format migration declined by user"
	InstallSkillsMigrationConflictReasonFmt = "%s.md and %s/SKILL.md have different content"

	// 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"
	SyncMarshalVSCodeSettingsFailedFmt              = "failed to marshal vscode settings: %w"
	SyncMarshalVSCodeMCPConfigFailedFmt             = "failed to marshal vscode mcp config: %w"
	SyncMarshalCodexAgentSpecificFailedFmt          = "failed to marshal codex agent-specific config: %w"
	SyncCodexTrustRootRequired                      = "repo root required for codex trust stanza"
	SyncCodexTrustRootResolveFailedFmt              = "failed to resolve repo root for codex trust stanza %q: %w"
	SyncCodexTrustRootControlCharFmt                = "" /* 174-byte string literal not displayed */
	SyncCodexTrustRootInvalidUTF8Fmt                = "" /* 166-byte string literal not displayed */
	SyncGrokTrustRootRequired                       = "repo root required for grok folder trust"
	SyncGrokTrustRootResolveFailedFmt               = "failed to resolve repo root for grok folder trust %q: %w"
	SyncGrokTrustReadFailedFmt                      = "failed to read grok folder trust %s: %w"
	SyncGrokTrustParseFailedFmt                     = "failed to parse grok folder trust %s: %w"
	SyncCodexStatuslineInvalidTOMLFmt               = "%s: invalid codex statusline TOML: %w"
	SyncCodexStatuslineOnlyStatusLineFmt            = "" /* 126-byte string literal not displayed */
	SyncCodexStatuslineStatusLineMissingFmt         = "%s: codex statusline fragment must define [tui].status_line"
	SyncCodexStatuslineStatusLineTypeFmt            = "%s: [tui].status_line must be an array of strings"
	SyncCodexStatuslineTUITableConflict             = "" /* 178-byte string literal not displayed */
	SyncCodexExistingConfigInvalidFmt               = "%s: invalid existing Codex config TOML; fix the file or move it aside before running al sync: %w"
	SyncCodexExistingConfigShapeConflictFmt         = "%s: existing Codex config has incompatible shape at %s; fix that value before running al sync"
	SyncCodexAgentSpecificProjectsTableConflict     = "agents.codex.agent_specific.projects must be a table; fix or remove that passthrough before running al sync"
	SyncCodexAgentSpecificProjectEntryTableFmt      = "agents.codex.agent_specific.projects.%q must be a table; fix or remove that passthrough before running al sync"
	SyncClaudeQuestionToolKeyTableConflictFmt       = "" /* 171-byte string literal not displayed */
	SyncClaudeQuestionToolListConflictFmt           = "" /* 170-byte string literal not displayed */
	SyncLegacyAgentSpecificChimeFmt                 = "%s contains an Agent Layer chime hook; remove that per-agent hook and set notifications.chime = true under [notifications]"
	SyncChimeKeyTableConflictFmt                    = "" /* 129-byte string literal not displayed */
	SyncChimeListConflictFmt                        = "" /* 128-byte string literal not displayed */
	SyncChimePathConflictFmt                        = "%s must be a real file inside the repository while cleaning Agent Layer chime hooks"
	SyncCodexChimeMarkerConflictFmt                 = "" /* 130-byte string literal not displayed */
	SyncCodexChimeOwnershipConflictFmt              = "%s contains an augmented or ambiguous Agent Layer chime hook; remove that hook before running al sync"
	SyncAntigravityChimePluginConflictFmt           = "%s already exists and is not the Agent Layer-managed chime plugin; remove or rename it before running al sync"
	SyncGrokChimeHookConflictFmt                    = "%s already exists and is not the Agent Layer-managed Grok chime hook; remove or rename it before running al sync"
	SyncClaudeStatuslineSourceMissingFmt            = "" /* 181-byte string literal not displayed */
	SyncCodexStatuslineSourceMissingFmt             = "" /* 180-byte string literal not displayed */
	SyncMarshalAntigravitySettingsFailedFmt         = "failed to marshal antigravity settings: %w"
	SyncMarshalAntigravityMCPConfigFailedFmt        = "failed to marshal antigravity MCP config: %w"
	SyncMarshalCopilotMCPConfigFailedFmt            = "failed to marshal copilot mcp config: %w"
	SyncInvalidVSCodeSettingsFmt                    = "invalid vscode settings %s: %w"
	SyncReadTemplateFailedFmt                       = "failed to read template %s: %w"
	SyncReadFailedFmt                               = "failed to read %s: %w"
	SyncRemoveFailedFmt                             = "failed to remove %s: %w"
	SyncRenameFailedFmt                             = "failed to rename %s to %s: %w"
	SyncMCPServerErrorFmt                           = "mcp server %s: %w"
	SyncMCPServerArgFailedFmt                       = "mcp server %s arg: %w"
	SyncCodexHeaderPlaceholderUnsupportedFmt        = "codex header %s must be literal or use ${VAR}"
	SyncCodexAuthorizationPlaceholderUnsupportedFmt = "authorization header must be literal, ${VAR}, or Bearer ${VAR}"
	SyncSystemRequired                              = "sync system is required"
	SyncProjectRequired                             = "sync project is required"
	SyncConfigFSRequired                            = "sync config filesystem is required"
	SyncFailedReadGitignoreBlockFmt                 = "failed to read gitignore block %s: %w"
	SyncOpenLockFmt                                 = "failed to open sync lock %s: %w"
	SyncLockFmt                                     = "failed to lock sync %s: %w"
	SyncLockTimeoutFmt                              = "timed out after %s waiting for sync lock %s; another sync may still be generating files. Wait for it to finish, then retry"
	SyncUnlockFmt                                   = "failed to unlock sync %s: %w"
	SyncCloseLockFmt                                = "failed to close sync lock %s: %w"

	MCPServerResolveFmt              = "mcp server %s: %w"
	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"
	MCPUnsupportedTransportFmt       = "unsupported transport %s"
	MCPServerUnsupportedTransportFmt = "mcp server %s: unsupported transport %s"
)

Sync messages for the sync command.

View Source
const (
	SyncGrokHomeEnsureFailedFmt        = "grok home directory: %w"
	SyncGrokConfigDirConflictFmt       = "grok config directory must be a real directory: %s"
	SyncGrokConfigTargetConflictFmt    = "grok config target must be a regular file, not a symlink or special file: %s"
	SyncGrokConfigOwnershipConflictFmt = "" /* 136-byte string literal not displayed */
	SyncGrokHomeConfigReadFailedFmt    = "failed to read grok home config %s: %w"
	SyncGrokHomeConfigParseFailedFmt   = "failed to parse grok home config %s: %w"
	SyncGrokHomeConfigCompatFmt        = "failed to set grok home [compat.claude] agents = false in %s: %w"
	SyncGrokHomeConfigCompatUnapplied  = "could not disable Grok Claude-named instruction discovery"
)

Grok path messages are kept together because sync and launch apply the same safety checks while creating the isolated home and generating project outputs.

View Source
const (
	// SyncImportedSkillOrphanFmt reports imported directories with no lock entry.
	SyncImportedSkillOrphanFmt = "" /* 189-byte string literal not displayed */
	// SyncImportedSkillInvalidFmt reports an imported skill whose local content
	// Agent Layer cannot project faithfully.
	SyncImportedSkillInvalidFmt = "" /* 139-byte string literal not displayed */
	// SyncSkillTierCollisionFmt reports one skill name owned by both tiers.
	SyncSkillTierCollisionFmt = "" /* 157-byte string literal not displayed */
)

Skill source snapshot messages. These describe ownership problems that only exist once Git-backed imports are configured alongside user-managed skills.

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"
	DispatchSystemRequired          = "dispatch system 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"
	DispatchTruncateTempFileFmt         = "truncate temp file: %w"
	DispatchResetTempFileOffsetFmt      = "reset temp file offset: %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"
	DispatchDownloadTooLargeFmt         = "download %s: response too large (%d bytes > limit %d bytes)"
	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)"

	DispatchDownload404Fmt     = "" /* 316-byte string literal not displayed */
	DispatchDownloadTimeoutFmt = "" /* 242-byte string literal not displayed */

	DispatchDownloadingFmt = "Downloading al v%s...\n"
	DispatchDownloadedFmt  = "Downloaded al v%s\n"

	DispatchOpenLockFmt      = "open lock %s: %w"
	DispatchLockFmt          = "lock %s: %w"
	DispatchLockTimeoutFmt   = "timed out waiting for lock after %s"
	DispatchReadPinFailedFmt = "read %s: %w"

	DispatchPinFileEmptyWarningFmt         = "warning: pin file %s is empty; ignoring (run al upgrade to repair)\n"
	DispatchInvalidPinnedVersionWarningFmt = "warning: invalid pinned version in %s: %v; ignoring (run al upgrade to repair)\n"
	DispatchVersionSourceFmt               = "Agent Layer version source: %s (%s)\n"
	DispatchVersionOverrideWarningFmt      = "warning: %s overrides repo pin %s from .agent-layer/al.version\n"

	// 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; move or remove it and retry"
	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"
	EnvfileUnterminatedQuotedValue = "unterminated quoted value"
	EnvfileInvalidQuotedSuffix     = "invalid trailing characters after quoted value"

	// Filesystem write errors.
	FsutilCheckExistingFileFmt      = "check existing file %s: %w"
	FsutilReadExistingFileFmt       = "read existing file %s: %w"
	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"
	FsutilPrivateDirStatFmt         = "stat %s: %w"
	FsutilPrivateDirCreateFmt       = "create directory %s: %w"
	FsutilPrivateDirNotDirectoryFmt = "%s must be a real directory, not a symlink or file"
	FsutilPrivateDirChmodFmt        = "restrict %s to owner-only permissions: %w"
	FsutilPrivateDirInvalidPathFmt  = "private directory path %q is invalid"

	// 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."
	WarningsPolicySecretInURL               = "mcp server URL appears to contain a literal secret-like value"
	WarningsPolicySecretInURLFix            = "Move secrets out of URL query/userinfo. Use .agent-layer/.env AL_* keys and projected headers/env placeholders instead."
	WarningsPolicyCodexHeaderForm           = "one or more MCP header values are incompatible with Codex header projection"
	WarningsPolicyCodexHeaderFormFix        = "For Codex-targeted servers, use literal values, ${VAR}, or Authorization: Bearer ${VAR} only."
	WarningsPolicyAgentSpecificOverridesFmt = "agent-specific %s config overrides Agent Layer-managed keys"
	WarningsPolicyAgentSpecificOverridesFix = "Remove the override if you want Agent Layer to manage those keys, or keep it to take full control."
	WarningsPolicyClaudeReasoningUnknownFmt = "agents.claude.reasoning_effort=%q is not a known value (known: %s); sync still proceeds"
	WarningsPolicyClaudeReasoningUnknownFix = "" /* 196-byte string literal not displayed */
	WarningsPolicyYOLOAck                   = "[yolo] permission prompts disabled for supported clients"
	WarningsNoiseModeInvalidFmt             = "unknown warnings noise mode %q; expected one of: %s, %s, %s"
	WarningsNoiseModeInvalidFix             = "Set warnings.noise_mode to default, reduce, or quiet."

	WarningsUnsupportedTransportFmt     = "unsupported transport: %s"
	WarningsUnsupportedHTTPTransportFmt = "unsupported http 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"
	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"
	CoverReportTotalFmt              = "total coverage: %.2f%%\n"

	// 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> <tag> <checksums-file>\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"
	UpdateFormulaChecksumMissingFmt = "Error: checksum for %s not found in %s\n"
	UpdateFormulaRenderFailedFmt    = "Error: failed to render formula: %v\n"
)

System messages for internal operations.

View Source
const (
	WizardProfileAnswersConflict            = "--profile and --answers cannot be used together"
	WizardYesRequiresProfile                = "--yes can only be used with --profile"
	WizardInstallFailedFmt                  = "install failed: %w"
	WizardPartialInstallUpgradeRequired     = "" /* 153-byte string literal not displayed */
	WizardLoadConfigFailedFmt               = "failed to load config: %w"
	WizardConfigNeedsUpgradeFmt             = "The wizard can't fix this config — it needs a migration:\n  %v\nRun 'al upgrade' to migrate, then re-run 'al wizard'."
	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"
	WizardUnknownInstructionSetFmt          = "unknown instruction set: %q"
	WizardUnknownInstructionSetSelectionFmt = "unknown instruction set selection: %q"
	WizardInvalidEnvFileFmt                 = "invalid env file %s: %w"
	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"
	WizardWriteEnvRollbackConfigFailedFmt   = "failed to write .env: %v (also failed to rollback config: %w)"
	WizardProfilePathRequired               = "profile mode requires --profile <path-to-config.toml>"
	WizardProfileReadFailedFmt              = "failed to read profile %s: %w"
	WizardProfileInvalidFmt                 = "invalid profile config: %w"
	WizardCustomValueRequiredFmt            = "custom value required for %s"
	WizardPositiveIntRequiredFmt            = "%s must be a positive integer"
	WizardParseConfigFailedFmt              = "parse config: %w"
	WizardCodexInlineFeaturesUnsupported    = "" /* 160-byte string literal not displayed */
	WizardDefaultMCPServersRequired         = "default MCP servers are required to patch config"
	WizardRenderConfigFailedFmt             = "render config: %w"
	WizardFormatConfigFailedFmt             = "format config: %w"
	WizardTOMLUnterminatedMultiline         = "unterminated multiline string in TOML output"
	WizardApplySkillsFailedFmt              = "failed to apply skill changes: %w"
)

Wizard error messages and validation text.

View Source
const (
	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."
	WizardApprovalYOLODescription     = "YOLO: skip ALL permission prompts (use only in sandboxed/ephemeral environments)."
)

Wizard help and descriptive text.

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."
	WizardFirstStepEscapeExitPrompt  = "Escape pressed on the first wizard step. Exit without saving changes?"
	WizardInstallComplete            = "Installation complete. Continuing the wizard..."
	WizardApprovalModeTitle          = "Approval Mode"
	WizardEnableAgentsTitle          = "Enable Agents"
	WizardAntigravityModelTitle      = "Antigravity Model"
	WizardClaudeModelTitle           = "Claude Model"
	WizardClaudeReasoningEffortTitle = "Claude Reasoning Effort"
	WizardClaudeLocalConfigDirPrompt = "Isolate Claude settings and caches per repo? (auth remains shared globally — upstream limitation)"
	WizardCodexModelTitle            = "Codex Model"
	WizardCodexReasoningEffortTitle  = "Codex Reasoning Effort"
	WizardCodexLocalConfigDirPrompt  = "Use repo-local Codex home for auth, sessions, logs, and runtime state?"
	WizardCopilotCLIModelTitle       = "Copilot CLI Model"
	WizardGrokModelTitle             = "Grok Model"
	WizardGrokReasoningEffortTitle   = "Grok Reasoning Effort"
	WizardGrokFeatureMemoryLabel     = "Experimental memory"
	WizardGrokFeaturesTitle          = "Grok features (checked = keep enabled; uncheck to disable)" +
		"\n  Experimental memory: Grok memory is off by default; uncheck to force --no-memory even if enabled elsewhere."
	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"
	WizardRewritePreviewTitle                 = "Rewrite Preview"
	WizardApplyChangesPrompt                  = "Apply these config, secret, skills, instructions, memory-file, gitignore-source, and statusline-source changes?"
	WizardCompleted                           = "Wizard completed."
	WizardRunningSync                         = "Running sync..."
	WizardWarningFmt                          = "Warning: %s\n"
	WizardProfilePreviewHeader                = "Profile rewrite preview (.agent-layer/config.toml):"
	WizardProfilePreviewOnly                  = "Profile preview only. Re-run with --yes to apply."
	WizardProfileNoConfigChanges              = "Profile matches current config; no config changes are required."
	WizardProfileExistingConfigInvalidWarnFmt = "Warning: existing .agent-layer/config.toml is invalid TOML and will be replaced by the profile: %v"
	WizardLeaveBlankOption                    = "Leave blank (use client default)"
	WizardCustomOption                        = "Custom..."
	WizardCustomPromptFmt                     = "Custom %s"

	// WizardInstructionSetTitle labels the always-on instruction select screen.
	WizardInstructionSetTitle = "Agent instructions" +
		"\n  Always-on project instructions. Independent of the skills list below."
	WizardInstructionSetNone           = "None — no Agent Layer instruction files"
	WizardInstructionSetRules          = "Rules — agent artifacts go in .agent-layer/tmp; git safety; when to ask you"
	WizardInstructionSetRulesAndMemory = "Rules and memory — rules, plus docs/agent-layer/ (CONTEXT, DECISIONS, ISSUES, BACKLOG, COMMANDS)"
	// WizardEnableCLISkillsTitle labels the catalog multiselect screen.
	WizardEnableCLISkillsTitle = "Enable skills" +
		"\n  Check a row to install it. Uncheck to leave it out." +
		"\n  Tool rows need their CLI on PATH; `al doctor` reports missing binaries."
	// WizardGitTrackingTitle labels the multiselect that controls the managed
	// gitignore block source. Checked folders are left trackable by git; unchecked
	// folders are written as ignore patterns in .agent-layer/gitignore.block.
	WizardGitTrackingTitle = "Track the following Agent Layer folders in git? (checked = tracked; unchecked = gitignored)" +
		"\n  .agent-layer/: repo-local config, instructions, and skills; .agent-layer/.gitignore still protects .env, tmp, state, templates, and generated launchers." +
		"\n  docs/agent-layer/: project memory docs."
	// WizardEnableDefaultMCPServersTitle labels the MCP server multiselect screen.
	// The warning steers users toward CLI command-based skills for ordinary
	// CLI-backed tools, where MCP servers add tool-schema overhead and config drift.
	WizardEnableDefaultMCPServersTitle = "Enable Default MCP Servers" +
		"\n  MCP servers are not the recommended default for ordinary CLI-backed tools; prefer CLI command-based skills." +
		"\n  See https://agent-layer.dev/cli-skill-design. Do not enable both an MCP server and a CLI skill for the same tool (for example, Tavily)." +
		"\n  Unselected defaults already in config.toml are set enabled = false (the entry is kept, not deleted); missing defaults are added only when selected."
	// WizardKeepCustomMCPServersTitle labels the multiselect for MCP servers found
	// in config.toml that are not part of Agent Layer's default catalog. Selected
	// servers stay enabled; unselected servers are set to enabled = false. The
	// entry is preserved in config.toml either way — disabling never deletes it.
	WizardKeepCustomMCPServersTitle = "Keep custom MCP servers (not part of Agent Layer's defaults)" +
		"\n  Selected = keep enabled. Unselected = set enabled = false (the entry stays in config.toml; it is not deleted)."

	// Per-feature checkbox labels for the model-step multi-selects. Each label is
	// the load-bearing option identity: MultiSelect uses the option string as both
	// label and returned value, and the wizard matches the returned selection on
	// these exact strings to invert checkbox state back into the disable-sense
	// Choices fields. Define each label ONCE here and reuse it on both the
	// option-list and contains-check sides so the identity cannot drift.
	WizardClaudeFeatureStatuslineLabel   = "Claude statusline"
	WizardClaudeFeatureIDEReadingLabel   = "IDE open-file reading"
	WizardClaudeFeatureMemoryLabel       = "Auto-memory"
	WizardClaudeFeatureConnectorsLabel   = "claude.ai connectors"
	WizardClaudeFeatureQuestionToolLabel = "AskUserQuestion tool"
	WizardCodexFeatureStatuslineLabel    = "Codex statusline"
	WizardCodexFeatureAppsLabel          = "Built-in apps (GitHub, Gmail, etc.)"
	WizardCodexFeaturePluginsLabel       = "Plugins and plugin skills"
	WizardCodexFeatureBrowserLabel       = "Browser / computer-use"
	WizardGitTrackAgentLayerLabel        = ".agent-layer/"
	WizardGitTrackDocsAgentLayerLabel    = "docs/agent-layer/"

	// WizardClaudeFeaturesTitle labels the Claude feature multi-select. Checked =
	// keep the feature enabled (Claude Code's native default); unchecking disables
	// it. The per-feature explanations live in the title because MultiSelect has no
	// per-option description field (same multi-line convention as the MCP/CLI-skills
	// titles above).
	WizardClaudeFeaturesTitle = "Claude features (checked = keep enabled; uncheck to disable)" +
		"\n  Claude statusline: use .agent-layer/claude-statusline.sh for Claude Code statusLine." +
		"\n  IDE open-file reading: Claude Code otherwise auto-connects to your IDE and reads files open in the editor." +
		"\n  Auto-memory: Claude Code's auto-memory persists notes across sessions. (This does not affect CLAUDE.md.)" +
		"\n  claude.ai connectors: claude.ai app connectors load only under Claude.ai-subscription auth." +
		"\n  AskUserQuestion tool: Claude Code's structured clarification-question tool; disabling blocks it via permissions.deny and a PreToolUse hook (the hook also enforces it under YOLO)."
	// WizardCodexFeaturesTitle labels the Codex feature multi-select. Checked =
	// keep the feature enabled; unchecking disables it. Built-in apps default to
	// unchecked (Agent Layer disables Codex's app surface by default and always
	// writes an explicit features.apps). Plugins default checked, matching
	// Codex's native default when features.plugins is absent.
	WizardCodexFeaturesTitle = "Codex features (checked = keep enabled; uncheck to disable)" +
		"\n  Codex statusline: use .agent-layer/codex-statusline.toml for [tui].status_line." +
		"\n  Built-in apps (GitHub, Gmail, etc.): Codex's built-in app integrations add extra tools to every session." +
		"\n  Plugins and plugin skills: Codex plugins can add skills, app integrations, and MCP servers to sessions." +
		"\n  Browser / computer-use: these tools let Codex drive a browser and control the screen."
	// WizardCodexRuntimeFeaturesTitle labels the VS Code-only Codex feature
	// multi-select. These runtime settings share .codex/config.toml with the
	// Codex CLI; the terminal-only statusline is intentionally excluded.
	WizardCodexRuntimeFeaturesTitle = "Codex runtime features (checked = keep enabled; uncheck to disable)" +
		"\n  Built-in apps (GitHub, Gmail, etc.): Codex's built-in app integrations add extra tools to every session." +
		"\n  Plugins and plugin skills: Codex plugins can add skills, app integrations, and MCP servers to sessions." +
		"\n  Browser / computer-use: these tools let Codex drive a browser and control the screen."
)

Wizard prompt and UI text.

View Source
const (
	WizardSummaryApprovalsFmt                    = "Approval mode: %s\n"
	WizardSummaryEnabledAgentsHeader             = "\nEnabled Agents:\n"
	WizardSummaryEnabledMCPServersHeader         = "\nEnabled MCP Servers:\n"
	WizardSummaryNoneLoaded                      = "(none loaded)\n"
	WizardSummaryNone                            = "(none)\n"
	WizardSummaryDisabledMCPServersHeader        = "\nDisabled MCP Servers (missing secrets):\n"
	WizardSummaryDisabledCustomMCPServersHeader  = "\nDisabled Custom MCP Servers (entry kept, enabled = false):\n"
	WizardSummarySecretsHeader                   = "\nSecrets to Update:\n"
	WizardSummaryWarningsHeader                  = "\nWarnings:\n"
	WizardSummaryGitTrackingHeader               = "\nGit tracking:\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"
	WizardSummaryModelReasoningFmt               = "%s (%s)"
	WizardSummaryReasoningFmt                    = "reasoning: %s"
	WizardSummaryGitTrackedFmt                   = "- %s: tracked\n"
	WizardSummaryGitIgnoredFmt                   = "- %s: gitignored\n"
	WizardSummaryClaudeLocalConfigDir            = "\nClaude config isolation: enabled (per-repo settings and caches; auth shared globally — upstream limitation)\n"
	WizardSummaryCodexLocalConfigDir             = "\nCodex local home: enabled (per-repo auth, sessions, logs, and runtime state)\n"
	WizardSummaryCodexAppsDisabled               = "\nCodex built-in apps: disabled (suppresses GitHub/Gmail/etc. tool surface)\n"
	WizardSummaryCodexAppsEnabled                = "\nCodex built-in apps: enabled\n"
	WizardSummaryCodexPluginsDisabled            = "\nCodex plugins: disabled (suppresses plugin skills and plugin tool surfaces)\n"
	WizardSummaryCodexPluginsEnabled             = "\nCodex plugins: enabled\n"
	WizardSummaryClaudeStatuslineEnabled         = "\nClaude statusline: enabled\n"
	WizardSummaryClaudeStatuslineDisabled        = "\nClaude statusline: disabled\n"
	WizardSummaryCodexStatuslineEnabled          = "\nCodex statusline: enabled\n"
	WizardSummaryCodexStatuslineDisabled         = "\nCodex statusline: disabled\n"
	// Disable-toggle summary lines. Each is emitted only when the toggle is on
	// (the feature is disabled); leaving a toggle off keeps the client default
	// and prints nothing.
	WizardSummaryCodexBrowserDisabled       = "\nCodex browser/computer-use: disabled\n"
	WizardSummaryClaudeIDEReadingDisabled   = "\nClaude IDE open-file reading: disabled\n"
	WizardSummaryClaudeMemoryDisabled       = "\nClaude memory: disabled (auto-memory off; does not affect CLAUDE.md)\n"
	WizardSummaryClaudeConnectorsDisabled   = "\nClaude connectors: disabled\n"
	WizardSummaryClaudeQuestionToolDisabled = "\nClaude AskUserQuestion tool: disabled (permissions.deny + PreToolUse hook)\n"
	WizardSummaryGrokMemoryDisabled         = "\nGrok memory: disabled (--no-memory / GROK_MEMORY=0)\n"
)

Wizard summary output strings.

View Source
const (
	WizardTemplateNoMCPServers               = "template config contains no MCP servers"
	WizardCatalogNoMCPServers                = "MCP catalog mcp-catalog.toml contains no MCP servers"
	WizardMissingDefaultMCPServerTemplateFmt = "missing default MCP server template for %q"
	WizardReadConfigTemplateFailedFmt        = "failed to read config template: %w"
	WizardLoadMCPCatalogFailedFmt            = "failed to load MCP catalog mcp-catalog.toml: %w"
	WizardTemplateWarningsDefaultsIncomplete = "template config warnings defaults are incomplete"

	WizardLoadCLISkillsCatalogFailedFmt                = "failed to load CLI skills catalog cli-skills-catalog.toml: %w"
	WizardCatalogNoCLISkills                           = "CLI skills catalog cli-skills-catalog.toml contains no entries"
	WizardCLISkillCatalogEntryMissingIDFmt             = "CLI skills catalog entry %d is missing required id"
	WizardCLISkillCatalogEntryMissingNameFmt           = "CLI skills catalog entry %q is missing required name"
	WizardCLISkillCatalogEntryInvalidIDFmt             = "CLI skills catalog entry %d has invalid id %q"
	WizardCLISkillCatalogEntryDuplicateIDFmt           = "CLI skills catalog entry %d duplicates id %q"
	WizardCLISkillCatalogEntryDuplicateNameFmt         = "CLI skills catalog entry %d duplicates name %q"
	WizardCLISkillCatalogEntryInvalidMemberFmt         = "CLI skills catalog entry %q has invalid member %q"
	WizardCLISkillCatalogEntryDuplicateMemberFmt       = "CLI skills catalog entry %q duplicates member %q"
	WizardCLISkillCatalogEntryMemberCollidesIDFmt      = "CLI skills catalog member %q collides with catalog id %q"
	WizardCLISkillCatalogEntryMemberMissingTemplateFmt = "CLI skills catalog member %q has no embedded skills/%s/ files"
)

Wizard template parsing and validation errors.

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