;; Title: Miniforge.ai
;; Subtitle: An agentic SDLC / fleet-control platform
;; Author: Christopher Lester
;; Line: Founder, Miniforge.ai (project)
;; Copyright 2025-2026 Christopher Lester (christopher@miniforge.ai)
;;
;; Licensed under the Apache License, Version 2.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;;     http://www.apache.org/licenses/LICENSE-2.0
;;
;; Unless required by applicable law or agreed to in writing, software
;; distributed under the License is distributed on an "AS IS" BASIS,
;; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;; See the License for the specific language governing permissions and
;; limitations under the License.

(ns ai.miniforge.bb-etl-runner.interface
  "Generic pack-ETL runner. Each product adapter supplies configuration
   (pack src, CLI ns, pipeline/env EDN, output path); this component
   shells out to the pack's CLI and normalises the result.

   Pass-through to `core`."
  (:require [ai.miniforge.bb-etl-runner.core :as core]))

;------------------------------------------------------------------------------ Layer 0
;; Public API — pass-through only

(defn run!
  "Run a pack ETL. See `core/run!` for the opts map shape. Returns
   `{:success? bool :output path-or-nil :error str-or-nil}`."
  [opts]
  (core/run! opts))

(defn invocation-argv
  "Deterministic argv for `clojure` that the runner would execute.
   Exposed for tests and for adapters that want to preview the command."
  [opts]
  (core/invocation-argv opts))

;------------------------------------------------------------------------------ Rich Comment
(comment
  (invocation-argv {:pack-src "/tmp/pack/src"
                    :cli-ns "ai.thesium.etl.cli"
                    :pipeline "/tmp/p.edn"
                    :env "/tmp/e.edn"
                    :output "/tmp/o.json"})

  :leave-this-here)
