-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmix.exs
More file actions
156 lines (143 loc) · 3.71 KB
/
mix.exs
File metadata and controls
156 lines (143 loc) · 3.71 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
defmodule AgentObs.MixProject do
use Mix.Project
@version "0.1.4"
@source_url "https://github.com/lostbean/agent_obs"
def project do
[
app: :agent_obs,
version: @version,
elixir: "~> 1.14",
start_permanent: Mix.env() == :prod,
deps: deps(),
description: description(),
package: package(),
docs: docs(),
dialyzer: [
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],
aliases: aliases()
]
end
def application do
[
extra_applications: [:logger],
mod: {AgentObs.Application, []}
]
end
defp deps do
[
# Core telemetry and OpenTelemetry dependencies
{:telemetry, "~> 1.0"},
{:opentelemetry_api, "~> 1.2"},
{:opentelemetry, "~> 1.3"},
{:opentelemetry_exporter, "~> 1.6"},
{:jason, "~> 1.2"},
# Optional dependencies for integrations
{:req_llm, "~> 1.0", optional: true},
{:jido, "~> 2.0", optional: true},
# Development and testing dependencies
{:ex_doc, "~> 0.28", only: :dev, runtime: false},
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false}
]
end
defp description do
"""
An Elixir library for LLM agent observability.
Provides instrumentation for agent loops, tool calls, and LLM requests
with support for OpenTelemetry and OpenInference semantic conventions.
"""
end
defp package do
[
name: "agent_obs",
files: ~w(lib .formatter.exs mix.exs README.md LICENSE CHANGELOG.md),
licenses: ["MIT"],
links: %{
"GitHub" => @source_url,
"Docs" => "https://hexdocs.pm/agent_obs"
},
maintainers: ["Your Name"]
]
end
defp docs do
[
main: "home",
name: "AgentObs",
source_url: @source_url,
source_ref: "v#{@version}",
homepage_url: @source_url,
formatters: ["html"],
extras: [
"home.md",
"README.md",
"CHANGELOG.md",
"guides/getting_started.md",
"guides/configuration.md",
"guides/instrumentation.md",
"guides/req_llm_integration.md",
"guides/jido_integration.md",
"guides/custom_handlers.md"
],
groups_for_extras: [
Guides: [
"guides/getting_started.md",
"guides/configuration.md",
"guides/instrumentation.md",
"guides/req_llm_integration.md",
"guides/jido_integration.md",
"guides/custom_handlers.md"
]
],
groups_for_modules: [
"Core API": [
AgentObs,
AgentObs.Events
],
Handlers: [
AgentObs.Handler,
AgentObs.Handlers.Phoenix,
AgentObs.Handlers.Generic,
AgentObs.Handlers.Phoenix.Translator
],
Integrations: [
AgentObs.ReqLLM,
AgentObs.JidoTracer
],
Infrastructure: [
AgentObs.Application,
AgentObs.Supervisor
]
],
before_closing_body_tag: &before_closing_body_tag/1
]
end
# Add analytics or custom scripts if needed
defp before_closing_body_tag(:html) do
"""
<script>
// Add any custom JavaScript for documentation here
</script>
"""
end
defp before_closing_body_tag(_), do: ""
def cli do
[preferred_envs: [precommit: :test, ci: :test]]
end
defp aliases do
[
# Pre-commit hook: format code, run tests, check code quality
precommit: [
"format",
"test",
"credo --strict"
],
# CI pipeline: check formatting, run tests, check code quality
ci: [
"format --check-formatted",
"test",
"credo --strict"
]
]
end
end