[package]
name = "noetl-tools"
version = "3.0.0"
edition = "2021"
license = "MIT"
repository = "https://github.com/noetl/noetl"
homepage = "https://noetl.io"
description = "NoETL Tool Library - Shared tool implementations for workflow execution"

[dependencies]
# Async runtime
tokio = { version = "1", features = ["process", "fs", "sync", "time", "io-util", "rt-multi-thread"] }

# NATS JetStream client (KV / Object Store / JetStream-publish tool kind).
# Pinned to the same major as noetl/worker (0.38.x).
async-nats = "0.38"

# Byte buffer used by async-nats object_store put stream.
bytes = "1"

# Async stream combinators (object_list, kv_keys).
futures = "0.3"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# HTTP client
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }

# Template engine
minijinja = { version = "2.5", features = ["loader"] }

# Rhai scripting
rhai = { version = "1.19", features = ["sync"] }

# DuckDB
duckdb = { version = "1.1", features = ["bundled"] }

# PostgreSQL (async)
deadpool-postgres = "0.14"
tokio-postgres = { version = "0.7", features = ["with-serde_json-1", "with-chrono-0_4"] }

# Kubernetes (for script tool)
kube = { version = "0.98", features = ["runtime", "client", "derive"] }
k8s-openapi = { version = "0.24", features = ["v1_32"] }

# GCP auth
gcp_auth = "0.12"

# Regex for parsing
regex = "1.10"

# Error handling
thiserror = "2.0"
anyhow = "1.0"

# Async trait
async-trait = "0.1"

# Utilities
tracing = "0.1"
chrono = { version = "0.4", features = ["serde"] }
uuid = { version = "1", features = ["v4", "serde"] }
base64 = "0.22"
tempfile = "3.10"

# Apache Arrow columnar substrate.  Added in R-2.1 per Appendix H of
# the global hybrid cloud blueprint:
# https://noetl.dev/docs/architecture/noetl_global_hybrid_cloud_grid_distributed_architecture_blueprint
#
# - `arrow` is the core columnar types (RecordBatch, Schema, Array).
# - `arrow-ipc` is the Feather V2 / IPC reader+writer used to
#   round-trip RecordBatch bytes for the IpcHint payload contract.
# - `arrow-flight` is the gRPC server/client that R-2.2 will use for
#   cross-pod IPC retrieval (Arrow Flight endpoint on the worker).
#
# All three crates ship from the same arrow-rs workspace and share the
# same `arrow-` major version, so version-pin them together to avoid
# the subtle ABI breakage that mixed minors produce in arrow-rs.
arrow = "53"
arrow-ipc = "53"
arrow-flight = "53"

# Rust consumer for the noetl-server's Arrow Flight `do_get`
# endpoint.  Used by the `result_fetch` tool kind to materialise a
# `noetl://execution/<eid>/result/<step>/<id>` URI into the step's
# output under playbook-step policy control (per
# `agents/rules/execution-model.md`).  Falls back to HTTP
# `/api/result/resolve` for non-tabular refs.
#
# `0.5` ships:
# - `FlightTlsConfig` (Phase C2.2) for TLS-fronted Flight endpoints
#   — `result_fetch`'s `tls_ca_path` field threads the on-disk CA
#   bundle through.
# - `FlightAuth` + `FlightConfig` + `connect_with` (Phase C2.3) for
#   bearer-token auth — `result_fetch`'s `bearer_token` field
#   resolves either as a NoETL keychain credential alias (preferred
#   per `agents/rules/execution-model.md`) or a literal token.
# - `FlightTlsConfig::identity` (Phase C2.4) for mTLS — `result_fetch`'s
#   `client_cert_path` + `client_key_path` fields point at the
#   worker-mounted PEM pair (typical: k8s Secret).
noetl-arrow-flight-client = "0.5"

[dev-dependencies]
tokio-test = "0.4"
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
