@karmaniverous/jeeves-runner
    Preparing search index...

    Function createRunner

    • Create the runner. Initializes database, scheduler, API server, and sets up graceful shutdown.

      Parameters

      • config: {
            dbPath: string;
            gatewayApiKey?: string;
            gatewayUrl: string;
            host: string;
            jobsDir?: string;
            logging: {
                file?: string;
                level: "trace" | "debug" | "info" | "warn" | "error" | "fatal";
            };
            maxConcurrency: number;
            notifications: {
                defaultOnFailure: string
                | null;
                defaultOnSuccess: string | null;
                slackTokenPath?: string;
            };
            port: number;
            reconcileIntervalMs: number;
            runners: Record<string, string>;
            runRetentionDays: number;
            scriptsDir?: string;
            shutdownGraceMs: number;
            stateCleanupIntervalMs: number;
        }
        • dbPath: string

          Path to SQLite database file.

        • OptionalgatewayApiKey?: string

          OpenClaw Gateway API key (direct value). Falls back to OPENCLAW_GATEWAY_TOKEN env var at runtime.

        • gatewayUrl: string

          OpenClaw Gateway URL.

        • host: string

          Bind address for the HTTP server. Defaults to the platform-standard bind address.

        • OptionaljobsDir?: string

          Deprecated (DD#64): use scriptsDir instead. Not tagged @deprecated because the runner itself must still read it until the next major; sync-jobs warns at runtime instead. Absolute path to directory containing legacy job-definition JSON files (*.json arrays). When omitted, sync-jobs falls back to join(configDir, 'scripts/jobs'). This source is kept for the 0.12.0 release with a deprecation warning on use; it is removed in the next major (DD#64).

        • logging: {
              file?: string;
              level: "trace" | "debug" | "info" | "warn" | "error" | "fatal";
          }

          Logging configuration.

          • Optionalfile?: string

            Optional log file path.

          • level: "trace" | "debug" | "info" | "warn" | "error" | "fatal"

            Log level threshold (trace, debug, info, warn, error, fatal).

        • maxConcurrency: number

          Maximum number of concurrent job executions.

        • notifications: {
              defaultOnFailure: string | null;
              defaultOnSuccess: string | null;
              slackTokenPath?: string;
          }

          Notification configuration for job completion events.

          • defaultOnFailure: string | null

            Default Slack channel ID for failure notifications.

          • defaultOnSuccess: string | null

            Default Slack channel ID for success notifications.

          • OptionalslackTokenPath?: string

            Path to Slack bot token file.

        • port: number

          HTTP server port for the runner API.

        • reconcileIntervalMs: number

          Interval in milliseconds for job reconciliation checks.

        • runners: Record<string, string>

          Custom command runners keyed by file extension. The command string is split on whitespace; first token is the executable, rest are prefix args before the script path. Falls back to built-in defaults for unconfigured extensions.

        • runRetentionDays: number

          Number of days to retain completed run records.

        • OptionalscriptsDir?: string

          Absolute path to an instance's jeeves-scripts repo (the directory containing bin/jeeves-scripts.js). When set, sync-jobs runs node <scriptsDir>/bin/jeeves-scripts.js list --json and registers each non-null-manifest entry as a launcher job (DD#61).

        • shutdownGraceMs: number

          Grace period in milliseconds for shutdown completion.

        • stateCleanupIntervalMs: number

          Interval in milliseconds for expired state cleanup task.

      • Optionaldeps: RunnerDeps

      Returns Runner