"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PRIVATE_LICENSE_OPERATION_SOURCE_PATH_PATTERN = exports.PRIVATE_LICENSE_OPERATION_RELEASE_NOTE_TITLE = exports.PRIVATE_LICENSE_OPERATION_RELEASE_NOTE_REDACTION = exports.RELEASE_VERSION_ALIAS_PATTERN = exports.RELEASE_STABLE_SEMVER_PATTERN = exports.INSTALLED_COMMAND_NAME_PATTERN = exports.DEFAULT_INSTALLED_COMMAND_NAME = exports.PUBLIC_CLI_EXCLUDED_PRIVATE_RUNTIME_FILES = exports.DEFAULT_WINDOWS_BIN_DIRECTORY = exports.DEFAULT_WINDOWS_INSTALL_DIRECTORY = exports.DEFAULT_POSIX_BIN_DIRECTORY = exports.DEFAULT_POSIX_INSTALL_DIRECTORY = exports.RELEASE_WINDOWS_UNINSTALLER_FILENAME = exports.RELEASE_WINDOWS_INSTALLER_FILENAME = exports.RELEASE_POSIX_UNINSTALLER_FILENAME = exports.RELEASE_POSIX_INSTALLER_FILENAME = exports.RELEASE_NOTES_PROVENANCE_FILENAME = exports.RELEASE_NOTES_FILENAME = exports.RELEASE_MANIFEST_FILENAME = exports.RELEASE_INSTALLER_MANIFEST_FILENAME = exports.RELEASE_CHECKSUMS_FILENAME = exports.RELEASE_ARTIFACT_CHECKSUMS_FILENAME = exports.RELEASE_DOWNLOAD_BUNDLE_DIRECTORY = exports.RELEASE_INSTALLATION_README_FILENAME = exports.DEFAULT_RELEASE_DOWNLOAD_ORIGIN = exports.RELEASE_SUCCESS_MARKER_FILE = exports.CLI_INIT_IGNORE_HANDOFF_MESSAGE = exports.LINK_MATERIALIZE_NO_WRITE_BOUNDARY = exports.VALIDATION_LINKS_CHECK_NO_WRITE_BOUNDARY = exports.VALIDATION_ROLLUP_NO_WRITE_BOUNDARY = exports.CLI_CONFIG_SET_KEY_HELP = exports.CLI_CONFIG_GET_SELECTOR_HELP = exports.CLI_WORKSPACE_UPGRADE_CONFIRMATION = exports.CLI_MAX_REVIEW_RESULT_BYTES = exports.CLI_TASK_BASELINE_IDENTITY_MISMATCH = exports.CLI_TASK_BASELINE_CHECKPOINT_IDENTITY_CONTRACT = exports.CLI_TASK_BASELINE_TASK_CYCLE_IDENTITY_CONTRACT = exports.CLI_SOURCE_SPEC_PLANNING_RECOVERY_WORKFLOW = exports.CLI_SOURCE_SPEC_PLANNING_WORKFLOW = exports.CLI_SOURCE_SPEC_PLANNING_RECOVERY_COMMAND = exports.CLI_DEFAULT_SOURCE_SPEC_SURFACE = exports.CLI_REPOSITORY_RELATIVE_PARENT_LINK_KEYS = exports.CLI_METADATA_STATUS_AND_PLANNING_FIELDS = exports.CLI_SPEC_INDEX_PATH = exports.WORK_CANDIDATES_MAX_RESULTS = exports.WORK_CANDIDATES_DEFAULT_MAX_RESULTS = exports.CLI_ROOT_HELP_INIT_WORKSPACE_LOCATION = exports.DAY_SHIFT_REMINDER_SEED_ENV = exports.REMINDER_STATE_FILE_NAME = exports.REMINDER_STATE_SCHEMA_VERSION = void 0;
exports.TRANSACTION_STATES = exports.DIRECTORY_FSYNC_PORTABILITY_ERRORS = exports.FILE_FSYNC_PORTABILITY_ERRORS = exports.DEFAULT_TEMPORARY_NAME_ATTEMPTS = exports.DEFAULT_CREATION_MODE = exports.TEMPLATE_CANONICAL_PLACEHOLDER_PATTERN = exports.PRIVATE_LICENSE_OPERATION_TEXT_PATTERNS = void 0;
exports.REMINDER_STATE_SCHEMA_VERSION = 1;
exports.REMINDER_STATE_FILE_NAME = 'reminder-state.json';
exports.DAY_SHIFT_REMINDER_SEED_ENV = 'DAY_SHIFT_REMINDER_SEED';
exports.CLI_ROOT_HELP_INIT_WORKSPACE_LOCATION = [
    '',
    'Agent Orientation:',
    '  Use this guardrail before automation agents plan, edit, validate, summarize, or reconcile work:',
    '    day-shift agent',
    '',
    '  Automation agents should prefer the machine-readable command envelope:',
    '    day-shift agent --format json',
    '',
    'Initialize Workspace Location:',
    '  By default, Day Shift initializes workspace state at repository root:',
    '    day-shift init',
    '',
    '  Use --directory to initialize inside a specific subdirectory (target must remain inside repository root):',
    '    day-shift init --directory <path>',
    '',
    '  When --directory is provided, Day Shift creates .day-shift/ in the target directory.',
    '',
].join('\n');
exports.WORK_CANDIDATES_DEFAULT_MAX_RESULTS = 10;
exports.WORK_CANDIDATES_MAX_RESULTS = 50;
exports.CLI_SPEC_INDEX_PATH = '.day-shift/specs/index.json';
exports.CLI_METADATA_STATUS_AND_PLANNING_FIELDS = new Set([
    'status',
    'readiness',
    'implementation_status',
    'reconciliation_status',
    'slice',
    'phase',
    'milestone',
    'task',
    'planning_depth',
]);
exports.CLI_REPOSITORY_RELATIVE_PARENT_LINK_KEYS = [
    'upstream.work_overview',
    'upstream.slice_overview',
    'upstream.phase_overview',
    'upstream.milestone_overview',
    'upstream.task_definition',
];
exports.CLI_DEFAULT_SOURCE_SPEC_SURFACE = 'selected source spec and spec registry entry';
exports.CLI_SOURCE_SPEC_PLANNING_RECOVERY_COMMAND = 'day-shift slice new --spec-id <id>';
exports.CLI_SOURCE_SPEC_PLANNING_WORKFLOW = '.day-shift/workflows/02-plan-from-spec.md';
exports.CLI_SOURCE_SPEC_PLANNING_RECOVERY_WORKFLOW = exports.CLI_SOURCE_SPEC_PLANNING_WORKFLOW;
exports.CLI_TASK_BASELINE_TASK_CYCLE_IDENTITY_CONTRACT = 'task-cycle-id equals the current attempt_id.';
exports.CLI_TASK_BASELINE_CHECKPOINT_IDENTITY_CONTRACT = 'checkpoint-id equals that attempt readiness_review_id.';
exports.CLI_TASK_BASELINE_IDENTITY_MISMATCH = 'TASK_BASELINE_IDENTITY_MISMATCH';
exports.CLI_MAX_REVIEW_RESULT_BYTES = 2 * 1024 * 1024;
exports.CLI_WORKSPACE_UPGRADE_CONFIRMATION = 'apply-workspace-upgrade';
exports.CLI_CONFIG_GET_SELECTOR_HELP = [
    'Supported selectors:',
    '  - default_readiness, cli_command, cli_resolution, cli_verified, cli_verified_via, editor, monorepo_projects',
    '  - workflow (family): effective level, agent mode, evidence profile, planning root, projects, and project context',
    '  - workflow.level, workflow.agent_mode, workflow.evidence_profile, workflow.project_context',
    '  - structural_pressure (family)',
    '  - structural_pressure.source (family), structural_pressure.test (family)',
    '  - structural_pressure.excluded_extensions, structural_pressure.blocked_segments, structural_pressure.excluded_basenames',
    '  - structural_pressure.source.watch, structural_pressure.source.pressure, structural_pressure.source.hotspot',
    '  - structural_pressure.test.watch, structural_pressure.test.pressure, structural_pressure.test.hotspot',
    '  - runtime_evidence (family), runtime_evidence.path_policy (family)',
    '  - runtime_evidence.path_policy.documentation_only_paths, runtime_evidence.path_policy.runtime_eligible_paths',
].join('\n');
exports.CLI_CONFIG_SET_KEY_HELP = [
    'Writable keys:',
    '  - default_readiness, cli_command, cli_resolution, cli_verified, cli_verified_via, editor',
    '  - structural_pressure.excluded_extensions, structural_pressure.blocked_segments, structural_pressure.excluded_basenames',
    '  - structural_pressure.source.watch, structural_pressure.source.pressure, structural_pressure.source.hotspot',
    '  - structural_pressure.test.watch, structural_pressure.test.pressure, structural_pressure.test.hotspot',
    '  - runtime_evidence.path_policy.runtime_eligible_paths',
    '',
    'Array value example:',
    '  day-shift config set structural_pressure.excluded_basenames \'["pnpm-lock.yaml","package-lock.json"]\'',
    '  day-shift config set runtime_evidence.path_policy.runtime_eligible_paths \'["backend","cmd"]\'',
].join('\n');
exports.VALIDATION_ROLLUP_NO_WRITE_BOUNDARY = 'Reports rollup evidence only; must not repair links, synchronize metadata, write checkpoints, mutate status, or generate planning artifacts.';
exports.VALIDATION_LINKS_CHECK_NO_WRITE_BOUNDARY = 'Reports trace-link evidence only; must not repair links, rewrite parent references, synchronize metadata, write checkpoints, mutate status, or generate planning artifacts.';
exports.LINK_MATERIALIZE_NO_WRITE_BOUNDARY = 'Dry-run inspects validation and Markdown body-link materialization together without writing files. Write execution is explicit, selected-artifact or selected-directory scoped, and bound to the exact preview evidence ID.';
exports.CLI_INIT_IGNORE_HANDOFF_MESSAGE = "Run 'day-shift ignore install' to install recommended local-only ignore rules (.day-shift/runs/ and .day-shift/local.toml).";
exports.RELEASE_SUCCESS_MARKER_FILE = '.day-shift-release-success.json';
exports.DEFAULT_RELEASE_DOWNLOAD_ORIGIN = 'https://tnsds.tech/downloads/';
exports.RELEASE_INSTALLATION_README_FILENAME = 'INSTALL.md';
exports.RELEASE_DOWNLOAD_BUNDLE_DIRECTORY = 'download-bundle';
exports.RELEASE_ARTIFACT_CHECKSUMS_FILENAME = 'artifact-checksums.json';
exports.RELEASE_CHECKSUMS_FILENAME = 'checksums.sha256';
exports.RELEASE_INSTALLER_MANIFEST_FILENAME = 'installer-manifest.json';
exports.RELEASE_MANIFEST_FILENAME = 'release-manifest.json';
exports.RELEASE_NOTES_FILENAME = 'release-notes.md';
exports.RELEASE_NOTES_PROVENANCE_FILENAME = 'release-notes-provenance.json';
exports.RELEASE_POSIX_INSTALLER_FILENAME = 'install.sh';
exports.RELEASE_POSIX_UNINSTALLER_FILENAME = 'uninstall.sh';
exports.RELEASE_WINDOWS_INSTALLER_FILENAME = 'install.ps1';
exports.RELEASE_WINDOWS_UNINSTALLER_FILENAME = 'uninstall.ps1';
exports.DEFAULT_POSIX_INSTALL_DIRECTORY = '$HOME/.local/day-shift';
exports.DEFAULT_POSIX_BIN_DIRECTORY = '$HOME/.local/bin';
exports.DEFAULT_WINDOWS_INSTALL_DIRECTORY = '$HOME\\AppData\\Local\\DayShift';
exports.DEFAULT_WINDOWS_BIN_DIRECTORY = '$HOME\\AppData\\Local\\Microsoft\\WindowsApps';
exports.PUBLIC_CLI_EXCLUDED_PRIVATE_RUNTIME_FILES = [
    'dist/lib/license/license-issuer.js',
    'dist/lib/license/license-issuer.js.map',
    'dist/lib/license/license-issuer.d.ts',
];
exports.DEFAULT_INSTALLED_COMMAND_NAME = 'day-shift';
exports.INSTALLED_COMMAND_NAME_PATTERN = /^(?=.*[A-Za-z0-9])[A-Za-z0-9][A-Za-z0-9._-]*$/;
exports.RELEASE_STABLE_SEMVER_PATTERN = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/;
exports.RELEASE_VERSION_ALIAS_PATTERN = /^(?:latest|next|stable|current)$/i;
exports.PRIVATE_LICENSE_OPERATION_RELEASE_NOTE_REDACTION = 'Private beta/VIP license-operation details are intentionally omitted from public release notes; recipient-facing release guidance covers signed license installation and local status checks.';
exports.PRIVATE_LICENSE_OPERATION_RELEASE_NOTE_TITLE = 'Private beta/VIP license-operation boundary';
exports.PRIVATE_LICENSE_OPERATION_SOURCE_PATH_PATTERN = /(?:license-issuer|issue-local-license|local-license-ops|recipients\.(?:csv|json)|licenses-out|issuance-report|support-records?)/i;
exports.PRIVATE_LICENSE_OPERATION_TEXT_PATTERNS = [
    /\bissue-local-license\.(?:js|cjs|mjs)\b/i,
    /\blicense-issuer\b/i,
    /\blocal-license-ops\b/i,
    /\brecipients\.(?:csv|json)\b/i,
    /\blicenses-out\b/i,
    /\bissuance-report\.json\b/i,
    /\bprivate (?:signing )?key\b/i,
    /\bsupport-records?\b/i,
    /\bday-shift\s+license\s+issue\b/i,
];
exports.TEMPLATE_CANONICAL_PLACEHOLDER_PATTERN = /{{([a-z_][a-z0-9_]*)}}/g;
exports.DEFAULT_CREATION_MODE = 0o666;
exports.DEFAULT_TEMPORARY_NAME_ATTEMPTS = 16;
exports.FILE_FSYNC_PORTABILITY_ERRORS = new Set(['EINVAL', 'ENOSYS', 'ENOTSUP']);
exports.DIRECTORY_FSYNC_PORTABILITY_ERRORS = new Set([
    ...exports.FILE_FSYNC_PORTABILITY_ERRORS,
    'EACCES',
    'EISDIR',
    'EPERM',
]);
exports.TRANSACTION_STATES = new Set([
    'staged',
    'applying',
    'committed',
    'restored',
    'no-write',
    'incomplete',
]);
