-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmix.exs
More file actions
106 lines (95 loc) · 2.82 KB
/
Copy pathmix.exs
File metadata and controls
106 lines (95 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
defmodule CrucibleTrace.MixProject do
use Mix.Project
@version "0.3.1"
@source_url "https://github.com/North-Shore-AI/crucible_trace"
def project do
[
app: :crucible_trace,
version: @version,
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
docs: docs(),
source_url: @source_url,
homepage_url: @source_url,
name: "CrucibleTrace"
]
end
def application do
[
extra_applications: [:logger]
]
end
defp deps do
[
{:crucible_ir, "~> 0.2.1"},
{:jason, "~> 1.4"},
{:telemetry, "~> 1.3"},
{:ex_doc, "~> 0.40.0", only: :dev, runtime: false},
{:dialyxir, "~> 1.4", only: [:dev], runtime: false},
{:credo, "~> 1.7", only: [:dev, :test], runtime: false}
]
end
defp description do
"Structured causal reasoning chain logging for LLMs. Captures decision-making processes with cryptographic verification for transparency and debugging."
end
defp package do
[
name: "crucible_trace",
description: description(),
files: ~w(lib assets mix.exs README.md CHANGELOG.md LICENSE),
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Online documentation" => "https://hexdocs.pm/crucible_trace"
},
maintainers: ["nshkrdotcom"]
]
end
defp docs do
[
main: "readme",
name: "CrucibleTrace",
source_ref: "v#{@version}",
source_url: @source_url,
homepage_url: @source_url,
extras: ["README.md", "CHANGELOG.md"],
assets: %{"assets" => "assets"},
logo: "assets/crucible_trace.svg",
before_closing_head_tag: &mermaid_config/1
]
end
defp mermaid_config(:html) do
"""
<script defer src="https://cdn.jsdelivr.net/npm/mermaid@10.2.3/dist/mermaid.min.js"></script>
<script>
let initialized = false;
window.addEventListener("exdoc:loaded", () => {
if (!initialized) {
mermaid.initialize({
startOnLoad: false,
theme: document.body.className.includes("dark") ? "dark" : "default"
});
initialized = true;
}
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 mermaid_config(_), do: ""
end