"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EVENT_HOOK_HELP_TOPICS = void 0;
exports.EVENT_HOOK_HELP_TOPICS = [
    {
        path: ["event-hook"],
        usages: ["event-hook <add|list|remove|test|create|update|config>"],
        summary: "Manage publish event hooks.",
        docs: ["event-hooks"],
        notes: [
            "Repo-scoped hooks are stored in alpaca.config.json. User-scoped hook registrations are stored machine-locally, and hook files must live under the configured user directory.",
            "Program hooks are supported on Linux, macOS, and WSL2. Native Windows execution is not a v1 target.",
            "Use a subcommand help page for option details.",
        ],
    },
    {
        path: ["event-hook", "config"],
        root: true,
        usages: [
            "event-hook config set --user-dir <path>",
            "event-hook config show",
        ],
        summary: "Configure machine-local publish event hook settings, including the user-scoped hook file directory used by user hooks.",
        docs: ["event-hooks"],
        options: [
            "--user-dir <path>: Directory for user-scoped event hook files. Relative paths are resolved from the command cwd and saved as absolute paths.",
        ],
        notes: [
            "Set this before using event-hook add/create/update --scope user. The hidden ~/.alpaca/event-hooks directory stores registrations and ledgers only.",
        ],
    },
    {
        path: ["event-hook", "add"],
        root: true,
        usages: [
            "event-hook add --scope repo [--cwd <path>] --path <path> [--runner <command>] --on <trigger> [--on <trigger> ...]",
            "event-hook add --scope user [--cwd <path> | --all-repos] --path <path> [--runner <command>] --on <trigger> [--on <trigger> ...]",
        ],
        summary: "Register an existing repo-scoped or user-scoped publish event hook file for selected triggers, one repo or all repos as allowed.",
        docs: ["event-hooks"],
        options: [
            "--scope repo|user: repo writes alpaca.config.json; user writes machine-local hook registration.",
            "--cwd <path>: Target one repository directory.",
            "--all-repos: With --scope user, register one global machine-local hook for every tracked repository.",
            "--path <path>: Hook file path. Repo-scoped hooks must be repository-relative. User-scoped paths must be relative to the configured user directory.",
            "--runner <command>: Runner command. Defaults from extension: .md worker, .js/.mjs/.cjs node, .py python3, .sh bash.",
            "--on <trigger>: Trigger token such as aiNeedsHuman, completed, issueCreated, workerFailed, systemFailed, or all. Can be repeated or comma-separated.",
        ],
        notes: [
            "For project-local user hooks, run the command once per repository with --cwd <path> or from that repository.",
            "AlpacaLoop does not merge identical project-local hook registrations into a global hook automatically.",
        ],
    },
    {
        path: ["event-hook", "create"],
        root: true,
        usages: [
            "event-hook create --scope repo [--cwd <path>] [--path <path>] [--runner <command>] --on <trigger> --prompt <text> [--save-draft]",
            "event-hook create --scope user [--cwd <path> | --all-repos] [--path <path>] [--runner <command>] --on <trigger> --prompt <text> [--save-draft]",
            "event-hook create --apply-draft <path|->",
        ],
        summary: "Ask a worker to create a repo or user publish event hook file from a prompt, then register it or save/apply a reviewed draft.",
        docs: ["event-hooks"],
        options: [
            "--scope repo|user: repo writes alpaca.config.json; user writes machine-local hook registration.",
            "--cwd <path>: Target one repository directory.",
            "--all-repos: With --scope user, create one global machine-local hook for every tracked repository.",
            "--path <path>: Hook file path. If omitted, AlpacaLoop derives a path from the prompt. User-scoped paths are relative to the configured user directory.",
            "--runner <command>: Runner command. Defaults from extension; without --path, only worker, node, python3, and bash can be inferred.",
            "--on <trigger>: Trigger token. Can be repeated or comma-separated.",
            "--prompt <text>: Natural-language request for the hook body.",
            "--save-draft: Save a reusable draft JSON and do not write the hook file or registration.",
            "--apply-draft <path|->: Apply a saved event-hook draft without running a worker.",
        ],
    },
    {
        path: ["event-hook", "update"],
        root: true,
        usages: [
            "event-hook update --scope repo [--cwd <path>] --path <path> --prompt <text> [--save-draft]",
            "event-hook update --scope user [--cwd <path> | --all-repos] --path <path> --prompt <text> [--save-draft]",
            "event-hook update --apply-draft <path|->",
        ],
        summary: "Ask a worker to update an already registered repo or user publish event hook file from a prompt, or save/apply a reviewed draft.",
        docs: ["event-hooks"],
        options: [
            "--scope repo|user: Select the registry that already contains the hook.",
            "--cwd <path>: Target one repository directory.",
            "--all-repos: With --scope user, target the global machine-local hook registry.",
            "--path <path>: Registered hook file path to update. User-scoped paths are relative to the configured user directory.",
            "--prompt <text>: Natural-language request for the file update.",
            "--save-draft: Save a reusable draft JSON and do not write the hook file.",
            "--apply-draft <path|->: Apply a saved event-hook update draft without running a worker.",
        ],
    },
    {
        path: ["event-hook", "list"],
        root: true,
        usages: [
            "event-hook list [--scope repo|user|all] [--cwd <path> | --all-repos]",
        ],
        summary: "List configured repo and/or user publish event hooks for one repository or all registered repositories.",
        docs: ["event-hooks"],
    },
    {
        path: ["event-hook", "remove"],
        root: true,
        usages: [
            "event-hook remove --scope repo [--cwd <path>] --path <path>",
            "event-hook remove --scope user [--cwd <path> | --all-repos] --path <path>",
        ],
        summary: "Remove a repo-scoped or user-scoped publish event hook registration by path without deleting unrelated hook files.",
        docs: ["event-hooks"],
    },
    {
        path: ["event-hook", "test"],
        root: true,
        usages: [
            "event-hook test [--scope repo|user] --path <path> [--runner <command>]",
        ],
        summary: "Run one publish event hook with sample completed-event JSON to test its runner and observe any real side effects.",
        docs: ["event-hooks"],
        options: [
            "--scope repo|user: Resolve the hook path from the repository root or configured user directory. Defaults to repo.",
            "--path <path>: Hook file path to test. Paths must stay inside the selected scope.",
            "--runner <command>: Runner command. Defaults from the file extension.",
        ],
        notes: [
            "The sample event matches completed and all.",
            "The hook may perform real side effects during the test.",
        ],
    },
];
