Packages
Secure BEAM sandbox runtime for LLM code mode and MCP aggregation. Run concurrent LLM/tool clients safely while agents orchestrate approved tools, call upstream MCP/OpenAPI servers, and transform data.
Current section
Files
Jump to
Current section
Files
ptc_runner
mix.exs
mix.exs
defmodule PtcRunner.MixProject do
use Mix.Project
def project do
[
app: :ptc_runner,
version: "0.2.0",
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
elixirc_paths: elixirc_paths(Mix.env()),
deps: deps(),
aliases: aliases(),
name: "PtcRunner",
description: "A BEAM-native Elixir library for Programmatic Tool Calling (PTC)",
source_url: "https://github.com/andreasronge/ptc_runner",
docs: docs(),
package: package(),
test_coverage: [
ignore_modules: [PtcRunner.TestSupport.LLMClient]
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
def cli do
[
preferred_envs: [precommit: :test]
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:jason, "~> 1.4"},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.31", only: :dev, runtime: false},
{:req_llm, "~> 1.0.0-rc", only: :test}
]
end
defp aliases do
[
precommit: [
"format --check-formatted",
"compile --warnings-as-errors",
"credo --strict",
"test --warnings-as-errors"
]
]
end
defp docs do
[
main: "readme",
extras: ["README.md", "docs/architecture.md", "CHANGELOG.md"],
before_closing_body_tag: &before_closing_body_tag/1
]
end
defp before_closing_body_tag(:html) do
"""
<script src="https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function () {
mermaid.initialize({
startOnLoad: false,
theme: document.body.className.includes("dark") ? "dark" : "default"
});
let id = 0;
for (const codeEl of document.querySelectorAll("pre code.mermaid")) {
const preEl = codeEl.parentElement;
const graphDefinition = codeEl.textContent;
const graphEl = document.createElement("div");
const graphId = "mermaid-graph-" + id++;
mermaid.render(graphId, graphDefinition).then(({svg, bindFunctions}) => {
graphEl.innerHTML = svg;
bindFunctions?.(graphEl);
preEl.insertAdjacentElement("afterend", graphEl);
preEl.remove();
});
}
});
</script>
"""
end
defp before_closing_body_tag(_), do: ""
defp package do
[
files: ~w(lib priv .formatter.exs mix.exs README.md LICENSE CHANGELOG.md),
licenses: ["MIT"],
links: %{
"GitHub" => "https://github.com/andreasronge/ptc_runner",
"Changelog" => "https://github.com/andreasronge/ptc_runner/blob/main/CHANGELOG.md"
}
]
end
end